{"version":3,"file":"chunk.6600.9d0fdc6e4bd13c68e5db.js","names":["_AdapterError","errors","message","this","isAdapterError","error","Error","call","stack","description","fileName","lineNumber","name","number","title","detail","prototype","Object","create","code","extend","extendFn","AdapterError","getOrSetGlobal","ErrorClass","defaultMessage","ParentErrorClass","InvalidError","TimeoutError","AbortError","UnauthorizedError","ForbiddenError","NotFoundError","ConflictError","ServerError","newline","parseResponseHeaders","headersString","headers","headerPairs","split","i","length","header","j","foundSep","charCodeAt","field","substring","trim","value","toLowerCase","RBRACKET","buildParams","prefix","obj","s","len","key","Array","isArray","test","add","toString","k","v","undefined","encodeURIComponent","_fetch","serializeIntoHash","store","modelClass","snapshot","options","includeId","upgradeStore","serializer","serializerFor","modelName","data","serialize","mixinProps","buildURL","id","requestType","query","urlForFindRecord","urlForFindAll","urlForQuery","urlForQueryRecord","urlForFindMany","urlForFindHasMany","urlForFindBelongsTo","urlForCreateRecord","urlForUpdateRecord","urlForDeleteRecord","_buildURL","path","url","host","urlPrefix","pathForType","push","unshift","urlString","join","charAt","snapshots","ids","parentURL","namespace","camelized","camelize","pluralize","BuildURLMixin","Mixin","deferred","WeakMap","service","_store","Adapter","EmberObject","constructor","args","super","target","prop","desc","_a","cursor","get","defineProperty","enumerable","configurable","writable","initializer","findRecord","type","findAll","neverSet","snapshotRecordArray","queryRecord","adapterOptions","createRecord","updateRecord","deleteRecord","coalesceFindRequests","_coalesceFindRequests","groupRecordsForFindMany","shouldReloadRecord","shouldReloadAll","shouldBackgroundReloadRecord","shouldBackgroundReloadAll","decorators","decorator","proto","map","Map","set","RESTAdapter","_defineProperty","fastboot","_fastboot","getOwner","lookup","sortQueryParams","keys","newQueryParams","sortedKeys","sort","buildQuery","ajax","sinceToken","since","findMany","findHasMany","relationship","findBelongsTo","schema","_stripIDFromURL","expandedURL","lastSegment","decodeURIComponent","string","suffix","String","endsWith","includes","groups","maxURLLength","forEach","baseUrl","has","groupsArray","group","splitGroups","adapter","idsSize","additionalLength","lastGroupIndex","splitGroup","handleResponse","status","payload","requestData","isSuccess","isInvalid","normalizeErrorResponse","detailedMessage","generatedDetailedMessage","_headers","_payload","method","useFetch","hash","ajaxOptions","response","_fetchRequest","promise","text","Promise","resolve","catch","e","then","ret","ok","payloadIsEmpty","statusIndicatesEmptyResponse","JSON","parse","SyntaxError","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","json","shortenedPayload","payloadContentType","include","statusText","headersToObject","getAllResponseHeaders","headersObject","credentials","queryParamDelimiter","queryParamsObject","body","getOwnPropertyDescriptor","computed","StoreTypesMap","debugInfo","relationships","expensiveProperties","identifier","recordIdentifierFor","fields","attrGroup","properties","expand","attributes","values","kind","propertyInfo","includeOtherProperties","InspectorDataAdapter","DataAdapter","getFilters","_nameToClass","modelFor","watchModelTypes","typesAdded","typesUpdated","discoveredTypes","typesMap","unsub","notifications","subscribe","notificationType","watchTypeIfUnseen","_releaseMethods","unsubscribe","identifierCache","_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","dataAdapter","getStore","wrapper","expandingGet","cache","key1","key2","expandingSet","peekCache","Boolean","isBelongsTo","definition","isImplicit","isHasMany","forAllRelatedIdentifiers","rel","cb","remoteState","localState","inverseIdentifier","additions","localMembers","remoteMembers","removeIdentifierCompletelyFromRelationship","graph","silenceNotifications","notifyChange","delete","wasInRemovals","removals","canonicalIndex","indexOf","splice","currentIndex","accessed","_removing","isLegacyField","BOOL_LATER","IMPLICIT_KEY_RAND","Date","now","implicitKeyFor","syncMeta","inverseDefinition","inverseKind","inverseKey","inverseType","inverseIsAsync","isAsync","inverseIsCollection","isCollection","inverseIsPolymorphic","isPolymorphic","inverseIsImplicit","inverseIsLinksMode","isLinksMode","resetOnRemoteUpdate","upgradeMeta","async","inverse","niceMeta","polymorphic","linksMode","replaceRelatedRecords","op","isRemote","identifiers","_addToTransaction","wasDirty","isDirty","state","hasReceivedData","diff","diffCollection","registerPolymorphicType","addToInverse","removeFromInverse","finalSet","finalState","changed","_diff","flushCanonical","localBecameDirty","onAdd","removalsHas","onRemove","additionsHas","size","del","becameDirty","isEmpty","_add","_removeRemote","_removeLocal","_scheduleLocalSync","replaceRelatedRecord","existingState","isStale","hasFailedLoadAttempt","onDel","Set","priorLocalState","duplicates","newState","newMembers","prevState","prevSet","newLength","prevLength","iterationLength","Math","max","remoteOrderChanged","added","removed","priorLocalLength","member","adv","list","prevMember","finalLength","equalLength","index","hasValidIndex","rollbackRelationship","slice","legacyGetCollectionRelationshipData","source","getRemoteState","storage","links","legacyGetResourceRelationshipData","addRelatedRecord","removeRelatedRecord","_normalizeLink","link","upgradeIdentifiers","arr","upgradeIdentifier","Graphs","Graph","_definitionCache","_metaCache","_potentialPolymorphicTypes","isDestroyed","_willSyncRemote","_willSyncLocal","_pushedUpdates","belongsTo","hasMany","deletions","_updatedRelationships","_transaction","propertyName","getDefinition","defs","storeWrapper","polymorphicLookup","cached","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","shouldForceReload","hasDematerializedInverse","transactionRef","getData","getRemoteData","type1","type2","typeCache","t1","t2","isReleasable","unload","removeCompletelyFromInverse","inverseIdentifer","localInverse","removeDematerializedInverse","notifyInverseOfDematerialization","clearRelationship","destroyRelationship","_isDirty","hasAdditions","hasRemovals","isReordered","getChanged","reordered","hasChanged","rollback","remove","cacheForKind","cacheForType","cacheForField","_cbs","_schedule","_flushRemoteQueue","_run","update","mergeIdentifier","hasRelationshipDataProperty","hasUpdatedLink","originalLinks","related","relatedLink","currentLink","currentLinkHref","warn","relationshipIsEmpty","relationshipTransactionId","graphTransactionId","updateRelationshipOperation","_isBelongsTo","addToRelatedRecords","removeFromRelatedRecords","_flushLocalQueue","peekTransient","setTransient","updates","flushPending","updated","destroy","clear","ops","opList","localMember","getWrapper","_instanceCache","_storeWrapper","peekGraph","graphFor","_graph","SnapshotRecordArray","__store","_snapshots","_recordArray","_fetchManager","SOURCE","createSnapshot","assertIdentifierHasId","iterateData","normalizeResponseHelper","normalizeResponse","Snapshot","__attributes","_belongsToRelationships","_belongsToIds","_hasManyRelationships","_hasManyIds","hasRecord","peek","_attributes","_changedAttributes","changedAttrs","peekRecord","attrs","keyName","getAttr","attr","changedAttributes","changedAttributeKeys","returnModeIsId","result","esc","getOrCreateRecordIdentifier","isDeleted","returnModeIsIds","results","cachedIds","cachedSnapshots","callback","binding","eachRelationship","SaveOp","Symbol","FetchManager","_pendingFetch","requestCache","getRequestStateService","scheduleSave","resolver","createDeferred","queryRequest","recordIdentifier","pendingSaveItem","monitored","_enqueue","pending","adapterFor","operation","adapterPayload","scheduleFetch","pendingFetch","getPendingFetch","pendingFetchItem","resolverPromise","isInitialLoad","recordIsLoaded","lid","potentiallyNewIm","_push","reload","_enableAsyncFlush","unloadRecord","setTimeout","flushAllPendingFetches","fetchesByType","fetchesById","requestsForIdentifier","pendingFetches","matchingPendingFetch","find","existingOptions","current","existing","arrCurrent","arrExisting","fetchItem","pendingFetchMap","pendingFetchItems","totalItems","fetchMap","l","_processCoalescedGroup","_fetchRecord","fetchDataIfNeededForIdentifier","instanceCache","isLoading","req","getPendingRequestsForRecord","some","r","rejectFetchedItems","pair","coerceId","payloads","coalescedPayload","snapshotsById","snapshotGroup","included","resources","resource","rejected","snapshotArray","instantiateRecord","createRecordArgs","createOptions","_createProps","_secretInit","secretInit","setOwner","getModelFactory","class","teardownRecord","normalizeModelName","maybeFactory","isModel","_forceShim","setRecordIdentifier","StoreMap","setCacheFor","_attr","isAttribute","isDestroying","setAttr","isValid","currentState","cleanErrorRequests","isElementDescriptor","lookupLegacySupport","getBelongsTo","support","RecordStore","_join","setDirtyBelongsTo","normalizeType","singularize","dasherize","deprecate","until","for","available","enabled","getHasMany","records","manyArray","getManyArray","maybeTarget","maybeKey","maybeDesc","PromiseObject","ObjectProxy","PromiseProxyMixin","decorateFieldV2","decorateMethodV2","initializeDeferredDecorator","LegacyPromiseProxy","Extended","PromiseBelongsTo","legacySupport","_belongsToState","referenceFor","reloadBelongsTo","_PromiseBelongsTo","PromiseManyArray","content","_update","f","finally","proxy","isPending","isSettled","isFulfilled","isRejected","_PromiseManyArray","compat","defineSignal","HasManyReference","parentIdentifier","hasManyRelationship","___identifier","___token","bucket","notifiedKey","_ref","___relatedTokenMap","token","ensureRefCanSubscribe","_resource","resourceIdentifier","getRelationship","remoteType","doc","skipFetch","dataDoc","isResourceData","isMaybeResource","newData","load","_isLoaded","every","LEGACY_SUPPORT","areAllInverseRecordsLoaded","reloadHasMany","object","filter","isResourceIdentiferWithRelatedLinks","BelongsToReference","belongsToRelationship","___relatedToken","LegacySupport","storeFor","_manyArrayCache","_relationshipPromisesCache","_relationshipProxyCache","_pending","references","_syncArray","array","jsonApi","_getCurrentState","fastPush","mutate","mutation","_findBelongsTo","_findBelongsToByJsonApiResource","handleCompletedRelationshipRequest","loadingPromise","_updatePromiseProxyFor","relatedIdentifier","isLoaded","getRecord","RelatedCollection","_inverseIsAsync","manager","allowMutation","fetchAsyncHasMany","_findHasManyByJsonApiResource","promiseProxy","reference","relationshipKind","allInverseRecordsAreLoaded","shouldFindViaLink","useLink","getRelatedLink","EnableHydration","cacheOptions","preferLocalCache","hasLocalPartialData","attemptLocalCache","future","recordExt","notify","_flush","ArrayProxyWithCustomOverrides","ArrayProxy","_messages2","_isEmpty","Errors","_classPrivateFieldInitSpec","errorsByAttributeName","errorsFor","attribute","unknownProperty","messages","_findOrCreateMessages","addObjects","__record","notifyPropertyChange","messagesArray","_messages","err","findBy","rejectBy","setObjects","notifyRelationship","hasPromise","notifyAttribute","cacheFor","_Errors","mapBy","not","SOURCE_POINTER_REGEXP","SOURCE_POINTER_PRIMARY_REGEXP","isInvalidError","RecordState","storeFor$1","identity","pendingCount","fulfilledCount","rejectedCount","_errorRequests","_lastError","requests","handleRequest","isSaving","notifyErrorsStateChanged","subscribeForRecord","lastRequest","getLastRequestForRecord","updateInvalidErrors","notifySignal","jsonApiErrors","getErrors","pointer","keyMatch","search","errMsg","isSaved","rd","isDeletionCommitted","hasChangedAttrs","isError","adapterError","isPreloaded","stateName","dirtyType","computeOnce","getter","hasComputed","_RecordState","subscribed","Model","init","createProps","___recordState","setProperties","___private_notifications","relationshipsByName","recordIdentifierFor$1","normalizedId","didChange","setRecordId","_v","relationshipFor","inverseFor","typeForRelationship","inverseMap","_findInverseFor","hasResource","relationshipNames","names","eachComputedProperty","isRelationshipSchema","relatedTypes","types","rels","relationshipsObject","isAttributeSchema","eachRelatedType","relationshipTypes","determineRelationshipType","knownSide","knownKey","knownKind","transformedAttributes","eachTransformedAttribute","_Model","save","saveRecord","destroyRecord","serializeRecord","_createSnapshot","rollbackAttributes","rollbackAttrs","isReloading","ModelSchemaProvider","_schemas","_typeMisses","resourceTypes","from","hasTrait","resourceHasTrait","trait","transformation","derivation","hashFn","_loadModelSchema","registerResources","schemas","registerResource","registerTransformation","transform","registerDerivation","registerHashFn","attributeMap","internalSchema","legacy","buildSchema","_modelFactoryCache","factory","factoryFor","normalizedModelName","owner","MaybeMixin","mixin","ModelForMixin","__isMixin","__mixin","register","hasOwnProperty","doesTypeExist","attributesDefinitionFor","relationshipsDefinitionFor","defaultRules","plurals","singular","irregularPairs","uncountable","BLANK_REGEX","LAST_WORD_DASHED_REGEX","LAST_WORD_CAMELIZED_REGEX","CAMELIZED_REGEX","CAPITALIZE_REGEX","str","toUpperCase","loadUncountable","rules","loadIrregular","irregular","irregularInverse","Inflector","ruleSet","makeDictionary","enableCache","_dict","purgeCache","word","_cacheUsed","_sCache","_singularize","numberOrWord","cacheKey","withoutCount","_pCache","_pluralize","disableCache","plural","regex","wordOrCount","inflect","parseFloat","typeRules","inflection","substitution","lowercase","wordSplit","lastWord","isBlank","isCamelized","rule","isUncountable","exec","RegExp","inflector","default","originalPlural","originalSingular","originalIrregular","originalUncountable","defaultPluralKeys","defaultSingularKeys","defaultRules$1","irregularMap","toIgnore","uncountableSet","single","plur","irregularLookups","replacement","defaultPlur","actualSingle","apply","LRUCache","doWork","newValue","STRING_DASHERIZE_REGEXP","STRING_DECAMELIZE_REGEXP","STRING_DASHERIZE_CACHE","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","setMaxLRUCacheSize","SINGULARS","SINGULAR_RULES","INVERSE_IRREGULAR","PLURALS","PLURAL_RULES","IRREGULAR","UNCOUNTABLE","reverse","uncountables","resetToDefaults","clearRules","unshiftMap","entries","irregulars","PromiseCache","getOrSetUniversal","RequestMap","setRequestResult","requestId","clearRequestResult","getRequestResult","setPromiseResult","IS_CACHE_HANDLER","isDoc","STRUCTURED","ensureDoc","getResponse","enhanceReason","reason","DOMException","executeNextHandler","wares","god","ContextOwner","_isCacheHandler","Context","outcome","nextCalled","_finalize","cbs","resolveStream","onFinalize","IS_FUTURE","getStream","abort","maybe","inbound","outbound","setStream","document","stream","controller","signal","aborted","res","rej","upgradePromise","upgradeHeaders","clone","Headers","toJSON","cloneResponseProperties","redirected","isRoot","sizeHint","addEventListener","enhancedRequest","hasSubscribers","hasRequestedStream","hasSetResponse","hint","parseInt","hasSetStream","setResponse","Response","_owner","isCacheHandler","_finalized","_classPrivateFieldGet","setIdentifier","_handlers","RequestManager","_deduped","useCache","cacheHandler","use","newHandlers","handlers","AbortController","peekUniversalTransient","setUniversalTransient","cacheResult","finalPromise","globalThis","setWarpDriveLogging","setLogging","getWarpDriveRuntimeConfig","getRuntimeConfig","Serializer","normalize","_typeClass","JSONSerializer","primaryKey","mergedProperties","applyTransforms","transformFor","transformMeta","deserialize","primaryModelClass","normalizeFindRecordResponse","normalizeQueryRecordResponse","normalizeFindAllResponse","normalizeFindBelongsToResponse","normalizeFindHasManyResponse","normalizeFindManyResponse","normalizeQueryResponse","normalizeCreateRecordResponse","normalizeDeleteRecordResponse","normalizeUpdateRecordResponse","normalizeSingleResponse","normalizeArrayResponse","normalizeSaveResponse","_normalizeResponse","isSingle","documentHash","extractMeta","item","concat","resourceHash","normalizeUsingDeclaredMapping","extractId","extractAttributes","extractRelationships","attributeKey","keyForAttribute","extractRelationship","relationshipModelName","relationshipHash","modelNameFromPayloadKey","extractPolymorphicRelationship","relationshipOptions","relationshipMeta","relationshipKey","keyForRelationship","linkKey","keyForLink","normalizeRelationships","payloadKey","normalizedKey","_getMappedKey","mappedKey","_canSerialize","_mustSerialize","shouldSerializeHasMany","relationshipType","serializeAttribute","serializeBelongsTo","serializeHasMany","belongsToId","serializePolymorphicType","extractErrors","extracted","attributeType","skipAssertion","JSONAPISerializer","_normalizeDocumentHelper","_normalizeResourceHelper","normalized","_normalizeRelationshipDataHelper","relationshipDataHash","pushPayload","normalizedPayload","_super","_extractType","payloadKeyFromModelName","belongsToIsNotNew","nonNewHasMany","payloadType","EmbeddedRecordsMixin","normalizedHash","_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","ModelSchema","typeSerializer","typeKey","typeProperty","Transform","BooleanTransform","serialized","allowNull","deserialized","DateTransform","TransformName","_options","offset","date","isNaN","toISOString","isNumber","Infinity","NumberTransform","transformed","Number","StringTransform","CACHE_OWNER","ensureStringId","isResource","hasProp","hasLid","hasId","DOCUMENTS","isStableIdentifier","isDocumentIdentifier","_crypto","crypto","NEW_IDENTIFIERS","IDENTIFIER_CACHE_ID","defaultUpdateMethod","typeMap","idMap","defaultKeyInfoMethod","known","defaultGenerationMethod","randomUUID","defaultEmptyCallback","defaultMergeMethod","a","_b","_c","IdentifierCache","_generate","_forget","_reset","_merge","_keyInfoForResource","_id","documents","polymorphicLidBackMap","__configureMerge","_getRecordIdentifier","shouldGenerate","getIdentifierFromLid","makeStableRecordIdentifier","keyInfo","addResourceToCache","peekRecordIdentifier","getOrCreateDocumentIdentifier","createIdentifierForNewRecord","newLid","updateRecordIdentifier","identifierObject","existingIdentifier","newId","typeSet","newType","newTypeSet","detectMerge","hadLid","generatedIdentifier","_mergeRecordIdentifiers","updateFn","performRecordIdentifierUpdate","kept","abandoned","abandonedBackReferences","forgetRecordIdentifier","keptBackReferences","backReferences","clientOriginated","urlFromLink","_ReactiveDocument_brand","WeakSet","ReactiveDocument","localCache","_localCache","_identifier","_assertClassBrand","_request","next","prev","first","last","defineSubscription","recordArrayManager","getCollection","RecordReference","objectOrPromise","CacheCapabilitiesManager","_willNotify","_pendingNotifies","_scheduleNotification","_flushNotifications","disconnectRecord","disconnect","getSchemaDefinitionService","CacheForIdentifierCache","removeRecordDataFor","instance","RecordCache","InstanceCache","__instances","matchedIdentifier","resourceData","keptIdentifier","staleIdentifier","keptHasRecord","staleHasRecord","patch","getDocument","getReference","filterDeleted","_requestCache","_clearEntries","oldId","_convertPreloadRelationshipToJSON","AvailableShims","ShimModelClass","isCacheOperationValue","runLoopIsFlushing","_backburner","currentInstance","_autorun","NotificationManager","_buffered","_hasFlush","callbacks","buffer","_scheduleNotify","_onNextFlush","_onFlushCB","asyncFlush","buffered","states","_flushNotification","callbackMap","NativeProxy","Proxy","ARRAY_GETTER_METHODS","iterator","ARRAY_SETTER_METHODS","SYNC_PROPS","isArrayGetter","isSelfProp","self","ARRAY_SIGNAL","MUTATE","NOTIFY","IS_COLLECTION","notifyArray","addToTransaction","convertToInt","num","IdentifierArray","_manager","createSignal","boundFns","_SIGNAL","PrivateState","transaction","receiver","shouldReset","t","Reflect","original","newIdentifier","deleteProperty","getPrototypeOf","createArrayTags","bind","isUpdating","_updatingPromise","updatingPromise","all","Collection","_managed","FAKE_ARR","SLICE_BATCH_SIZE","startLength","RecordArrayManager","_live","_staged","_keyedArrays","_identifiers","_set","_visibilitySet","_subscription","dirtyArray","identifierAdded","identifierRemoved","identifierChanged","isRequestArray","changes","arraySet","adds","removes","tag","populateManagedArray","liveArrayFor","staged","config","associate","delta","shouldSyncFromCache","addTransactionCB","_getPendingFor","includeManaged","isRemove","liveArray","allPending","managed","pendingLive","old","ArraysCache","disassociateIdentifier","changeSets","isClear","Touching","RequestPromise","EMPTY_ARR","RequestStateService","_done","_triggerSubscriptions","_dequeue","finalizedRequest","_addDone","_toFlush","_flushRequest","subscriptions","_subscriptions","requestDataOp","isNonEmptyString","constructResource","trueId","EmptyClass","BaseClass","Store","_schema","createSchemaService","_isDestroying","_isDestroyed","createArgs","coalesce","sync","_getAllPending","requestConfig","opts","requestManager","shims","shim","inputProperties","generateIdForRecord","extractIdentifiersFromRecords$1","extractIdentifierFromRecord$1","resultProps","clientDidCreate","setIsDeleted","isMaybeIdentifier","preload","jsonPayload","preloadValue","relatedType","upsert","SkipCache","stableIdentifier","unloadAll","pushed","jsonApiDoc","put","createCache","maybeIdentifier","recordOrPromiseRecord","registerSchemaDefinitionService","registerSchema","MUTATION_OPS","isMutation","cloneError","isAggregate","AggregateError","cloned","structuredClone","getPriority","deduped","priority","CacheHandler","DEDUPE","activeRequest","peeked","peekRequest","hasCachedValue","lifetimes","isHardExpired","blocking","fetchContentAndHydrate","willFetch","backgroundReload","isSoftExpired","shouldHydrate","maybeUpdateUiObjects","newError","isMut","willCommit","willRequest","didCommit","didRequest","commitWasRejected","mutateReplaceRelatedRecords","prior","collection","operationInfo","newValues","extractIdentifiersFromRecords","assertNoDuplicates","seen","unique","newArgs","mutateAddToRelatedRecords","mutateRemoveFromRelatedRecords","start","deleteCount","extractIdentifierFromRecord","currentValue","b","localeCompare","DEPRECATED_CLASS_NAME","maybeConsume","consumeTag","maybeDirty","dirtyTag","TRANSACTION","sub","ref","props","Signals","signals","_signal","lastValue","tagForProperty","getSignal","initialState","_target","setter","dependentKeyCompat","descriptor","caches","getValue","DEPRECATIONS","getDeprecationsForContext","TypeError","deprecations","URLSearchParams","queryParams","location","disabledDeprecations","debugDeprecations","registerDeprecationHandler","WARNINGS","getWarningsForContext","warnings","disabledWarnings","debugWarnings","registerWarnHandler","RegistryProxyMixin","ContainerProxyMixin","_emberTestHelpersMockOwner","unregister","fullName","__container__","reset","__registry__","global$1","window","global","Function","hasEmberVersion","major","minor","numbers","VERSION","actualMajor","actualMinor","DESTROYING","DESTROYED","ARGS_SET","DEBUG","GlimmerComponent","willDestroy","BaseComponentManager","createComponent","ComponentClass","named","getContext","component","CAPABILITIES","capabilities","destructor","asyncLifecycleCallbacks","updateHook","scheduledDestroyComponent","EmberGlimmerComponentManager","destroyComponent","schedule","Component","setComponentManager","_extendStatics","setPrototypeOf","__proto__","__extends","_assign","__rest","getOwnPropertySymbols","propertyIsEnumerable","__decorate","n","decorate","o","__param","__metadata","metadata","__awaiter","h","throw","done","__generator","label","sent","trys","return","pop","__createBinding","__exportStar","__values","__read","__spread","__spreadArrays","__spreadArray","__await","__asyncGenerator","asyncIterator","p","shift","__asyncDelegator","__asyncValues","__makeTemplateObject","raw","__setModuleDefault","__importStar","__esModule","__importDefault","__classPrivateFieldGet","__classPrivateFieldSet","t$3","ShadowRoot","ShadyCSS","nativeShadow","Document","CSSStyleSheet","e$8","n$5","s$3","_$cssResult$","cssText","styleSheet","replaceSync","o$5","r$3","reduce","i$3","adoptStyles","adoptedStyleSheets","createElement","litNonce","setAttribute","textContent","appendChild","S$1","cssRules","e$7","trustedTypes","r$2","emptyScript","h$2","reactiveElementPolyfillSupport","o$4","toAttribute","fromAttribute","n$4","notEqual","l$3","converter","reflect","t$2","a$1","HTMLElement","_$Et","isUpdatePending","hasUpdated","_$Ei","addInitializer","observedAttributes","finalize","elementProperties","_$Eh","_$Eu","createProperty","noAccessor","getPropertyDescriptor","requestUpdate","getPropertyOptions","finalized","getOwnPropertyNames","elementStyles","finalizeStyles","styles","flat","_$Ep","enableUpdating","_$AL","_$Em","addController","_$Eg","renderRoot","isConnected","hostConnected","removeController","createRenderRoot","shadowRoot","attachShadow","shadowRootOptions","connectedCallback","disconnectedCallback","hostDisconnected","attributeChangedCallback","_$AK","_$ES","removeAttribute","_$E_","_$EC","_asyncToGenerator","scheduleUpdate","performUpdate","shouldUpdate","willUpdate","hostUpdate","_$EU","_$AE","hostUpdated","firstUpdated","updateComplete","getUpdateComplete","mode","ReactiveElement","s$2","reactiveElementVersions","i$2","s$1","createPolicy","createHTML","e$6","random","o$3","n$3","l$2","h$1","createComment","r$1","d","u","c","m","g","_$litType$","strings","$","y","w","T","x","render","renderBefore","_$litPart$","N","insertBefore","_$AI","createTreeWalker","C","getTemplateHtml","lastIndex","startsWith","P","E","parts","el","currentNode","firstChild","append","childNodes","nextNode","nodeType","hasAttributes","getAttributeNames","getAttribute","ctor","M","H","I","S","tagName","innerHTML","_$Cl","_$Cu","_$litDirective$","_$AO","_$AT","_$AS","V","_$AN","_$AD","_$AM","parentNode","_$AU","creationScope","importNode","nextSibling","L","_$AH","_$AA","_$AB","_$Cg","startNode","endNode","_$AR","createTextNode","_$AC","_$AP","setConnected","element","fill","capture","once","passive","removeEventListener","handleEvent","R","D","O","F","B","W","Z","z","litHtmlPolyfillSupport","l$1","o$2","litHtmlVersions","renderOptions","_$Dt","_$litElement$","litElementHydrateSupport","LitElement","n$2","litElementPolyfillSupport","_$attributeToProperty","litElementVersions","n$1","customElements","define","elements","finisher","i$1","standardProperty","_objectSpread2","placement","originalKey","e$5","t$1","e$4","legacyPrototypeMethod","standardPrototypeMethod","o$1","e$3","querySelector","e$2","querySelectorAll","e$1","HTMLSlotElement","assignedElements","assignedNodes","Node","ELEMENT_NODE","slot","selector","matches","flatten","commonjsGlobal","getDefaultExportFromCjs","getDefaultExportFromNamespaceIfPresent","getDefaultExportFromNamespaceIfNotNamed","getAugmentedNamespace","commonjsRequire","lottie$1","exports","module","navigator","svgNS","locationHref","_useWebWorker","initialDefaultFrame","setWebWorker","getWebWorker","setLocationHref","getLocationHref","createTag","extendPrototype","getDescriptor","createProxyFunction","audioControllerFactory","audios","audioFactory","_volume","_isMuted","addAudio","pause","resume","setRate","createAudio","Howl","src","isPlaying","play","seek","playing","rate","setVolume","setAudioFactory","_updateVolume","mute","unmute","getVolume","volume","createTypedArray","Uint8ClampedArray","Float32Array","Int16Array","createSizedArray","_typeof$6","subframeEnabled","expressionsPlugin","expressionsInterfaces","idPrefix$1","isSafari","userAgent","_shouldRoundValues","bmPow","pow","bmSqrt","sqrt","bmFloor","floor","bmMax","bmMin","min","BMMath","ProjectInterface$1","abs","defaultCurveSegments","degToRads","PI","roundCorner","roundValues","bmRnd","round","styleDiv","style","position","top","left","display","transformOrigin","webkitTransformOrigin","backfaceVisibility","webkitBackfaceVisibility","transformStyle","webkitTransformStyle","mozTransformStyle","BMEnterFrameEvent","currentTime","totalTime","direction","BMCompleteEvent","BMCompleteLoopEvent","currentLoop","totalLoops","BMSegmentStartEvent","firstFrame","totalFrames","BMDestroyEvent","BMRenderFrameErrorEvent","nativeError","BMConfigErrorEvent","BMAnimationConfigErrorEvent","createElementID","_count","HSVtoRGB","RGBtoHSV","addSaturationToRGB","addBrightnessToRGB","addHueToRGB","rgbToHex","setSubframeEnabled","getSubframeEnabled","setExpressionsPlugin","getExpressionsPlugin","setExpressionInterfaces","getExpressionInterfaces","setDefaultCurveSegments","getDefaultCurveSegments","setIdPrefix","getIdPrefix","createNS","createElementNS","_typeof$5","dataManager","onmessage","postMessage","_workerSelf","Worker","Blob","URL","createObjectURL","completed","hasMask","masksProperties","pt","ty","layers","refId","shapes","__used","ks","it","assets","chars","ip","st","sr","sk","sa","closed","cl","completeData","__complete","checkColors","checkChars","checkPathProperties","checkShapes","completeLayers","assetLoader","getResponseHeader","responseType","XMLHttpRequest","onreadystatechange","readyState","open","send","fullPath","animation","onComplete","onError","loadAnimation","origin","pathname","loadData","completeAnimation","ImagePreloader","width","height","fillStyle","fillRect","loadedAssets","totalImages","loadedFootagesCount","totalFootages","imagesLoadedCb","setInterval","getBBox","_imageLoaded","clearInterval","assetData","assetsPath","img","_footageLoaded","testImageLoaded","createFootageData","images","loadAssets","_createImageData","setAssetsPath","setPath","loadedImages","loadedFootages","getAsset","createImgData","crossOrigin","createImageData","setAttributeNS","_elementHelper","imageLoaded","footageLoaded","setCacheType","BaseEvent","triggerEvent","markerParser","time","tm","duration","dr","cm","ProjectInterface","compositions","nm","prepareFrame","xt","currentFrame","compInterface","registerComposition","renderers","registerRenderer","getRenderer","_typeof$4","AnimationItem","currentRawFrame","frameRate","frameMult","playSpeed","playDirection","playCount","animationData","isPaused","autoplay","loop","renderer","animationID","timeCompleted","segmentPos","isSubframeEnabled","segments","_idle","_completedLoop","projectInterface","imagePreloader","audioController","markers","configAnimation","onSetupError","onSegmentComplete","drawnFrameEvent","setParams","container","animType","rendererSettings","globalData","setProjectInterface","autoloadSegments","initialSegment","setupAnimation","lastIndexOf","trigger","setData","getNamedItem","prerender","includeLayers","fonts","fontManager","addChars","addFonts","initExpressions","loadNextSegment","loadSegments","imagesLoaded","checkLoaded","preloadImages","fr","searchExtraCompositions","updaFrameModifier","waitForFontsLoaded","triggerConfigError","rendererType","initItems","gotoFrame","resize","updateContainerSize","setSubframe","renderFrame","triggerRenderFrameError","togglePause","stop","setCurrentRawFrameValue","getMarkerData","goToAndStop","frameModifier","goToAndPlay","playSegments","advanceTime","checkSegments","adjustSegment","setSpeed","setDirection","setSegment","resetSegments","onEnterFrame","onLoopComplete","onSegmentStart","onDestroy","getPath","getAssetsPath","getAssetData","hide","show","getDuration","updateDocumentData","getElementByPath","animationManager","elem","requestAnimationFrame","registerAnimation","searchAnimations","getElementsByClassName","getElementsByTagName","innerText","freeze","unfreeze","getRegisteredAnimations","BezierFactory","getBezierEasing","_p","_mSampleValues","_precomputed","_precompute","_getTForX","_calcSampleValues","pooling","double","poolFactory","newElement","bezierLengthPool","addedLength","percents","lengths","segmentsLengthPool","totalLength","bezFunction","segmentLength","points","partialLength","point","getSegmentsLength","_length","getNewSegment","getPointInSegment","buildBezierData","pointOnLine2D","pointOnLine3D","bez","PropertyFactory","offsetTime","propType","pv","keyframes","keyframesMetadata","to","bezierData","ti","__fnct","lastFrame","_lastKeyframeIndex","_lastAddedLength","_lastPoint","sh","acos","sin","atan2","asin","keyframeMetadata","cos","comp","renderedFrame","_caching","interpolateValue","mult","_mdf","frameId","effectsSequence","lock","setVValue","_isFirstFrame","kf","addDynamicProperty","vel","addEffect","getProp","DynamicPropertyContainer","dynamicProperties","_isAnimated","iterateDynamicProperties","initDynamicPropertyContainer","pointPool","ShapePath","_maxLength","setPathData","setLength","doubleArrayLength","setXYAt","setTripleAt","shapePool","ShapeCollection","addShape","releaseShapes","shapeCollectionPool","ob","newShapeCollection","pool","ShapePropertyFactory","interpolateShape","paths","localShapeCollection","convertEllToPath","sy","ir","is","convertToPath","convertStarToPath","convertPolygonToPath","or","os","convertRectToPath","getShapeProp","getConstructorFunction","getKeyframedConstructorFunction","Matrix","tan","_t","shear","_identityCalculated","_identity","getInverseMatrix","applyToPointArray","isIdentity","rotate","rotateX","rotateY","rotateZ","skew","skewFromAxis","scale","setTransform","translate","applyToPoint","applyToX","applyToY","applyToZ","applyToTriplePoints","applyToPointStringified","toCSS","to2dCSS","cloneFromProps","equals","inversePoints","inversePoint","_typeof$3","lottie","standalone","setLocation","setSubframeRendering","setPrefix","setQuality","inBrowser","installPlugin","getFactory","checkReady","readyStateCheckInterval","getQueryVariable","queryString","useWebWorker","setIDPrefix","__getFactory","version","scripts","myScript","bodymovin","ShapeModifiers","registerModifier","getModifier","ShapeModifier","TrimModifier","PuckerAndBloatModifier","initModifierProperties","addShapeToModifier","shape","setAsAnimated","processKeys","sValue","eValue","pathsData","calculateShapeEdges","releasePathsData","processShapes","totalShapeLength","addShapes","addPaths","addSegment","addSegmentFromArray","amount","processPath","TransformPropertyFactory","pre","appliedTransformations","px","py","pz","rx","ry","rz","applyToMatrix","precalculateMatrix","autoOriented","getValueAtTime","autoOrient","_addDynamicProperty","getTransformProperty","RepeaterModifier","RoundCornersModifier","floatEqual","floatZero","lerp","lerpPoint","quadRoots","polynomialCoefficients","singlePoint","PolynomialBezier","pointEqual","extrema","intersectData","boundingBox","cx","cy","splitData","boxIntersect","intersectsImpl","crossProduct","lineIntersection","polarOffset","pointDistance","hypot","ZigZagModifier","setPoint","getPerpendicularVector","getProjectingAngle","zigZagCorner","zigZagSegment","normalAngle","linearOffset","offsetSegment","joinLines","tangentAngle","getIntersection","intersections","pruneSegmentIntersection","pruneIntersections","offsetSegmentSplit","inflectionPoints","OffsetPathModifier","getFontProperties","fStyle","weight","fWeight","tr","so","eo","pMatrix","rMatrix","sMatrix","tMatrix","matrix","pos","elemsData","_currentCopies","_elements","_groups","resetElements","_processed","cloneElements","changeGroupRender","_render","ceil","ix","reloadShapes","mProps","derivative","bounds","right","bottom","shapeSegment","shapeSegmentInverted","amplitude","frequency","pointsType","miterLimit","ml","lineJoin","lj","FontManager","fontFamily","fontSize","fontVariant","fontStyle","fontWeight","letterSpacing","offsetWidth","node","parent","fFamily","fClass","OffscreenCanvas","font","measureText","getComputedTextLength","typekitLoaded","_warned","initTime","setIsLoadedBinded","setIsLoaded","checkLoadedFontsBinded","checkLoadedFonts","isModifier","isZeroWidthJoiner","isCombinedCharacter","ch","helper","loaded","monoCase","sansCase","fPath","fOrigin","getCharData","console","getFontByName","fName","removeChild","RenderableElement","initRenderable","isInRange","hidden","isTransparent","renderableComponents","addRenderableComponent","removeRenderableComponent","prepareRenderableFrame","checkLayerLimits","checkTransparency","finalTransform","mProp","renderConfig","hideOnTransparent","renderRenderable","sourceRectAtTime","getLayerSize","textData","getBlendMode","blendModeEnums","SliderEffect","AngleEffect","ColorEffect","PointEffect","LayerIndexEffect","MaskIndexEffect","CheckboxEffect","NoValueEffect","EffectsManager","ef","effectElements","GroupEffect","BaseElement","FrameElement","FootageElement","initFrame","footageData","imageLoader","initBaseData","AudioElement","_isPlaying","_canPlay","audio","_currentTime","_volumeMultiplier","_previousVolume","_placeholder","lv","au","BaseRenderer","TransformElement","MaskElement","storedData","maskElement","viewData","solidPath","inv","lastPath","expan","lastOperator","filterId","lastRadius","createLayerSolidPath","invRect","drawPath","maskedElement","checkMasks","layerInterface","maskManager","registerMaskInterface","createEffectsInterface","registerEffectsInterface","shapeInterface","shapesData","itemsData","textInterface","setBlendMode","bm","baseElement","layerElement","layerId","effectsManager","getType","prepareProperties","_isParent","getBaseElement","getFootageData","checkLayers","buildItem","checkPendingElements","createItem","createImage","createComp","createSolid","createNull","createShape","createText","createCamera","createFootage","buildAllItems","progressiveLoad","buildElementParenting","ind","setAsParent","setHierarchy","addPendingElement","pendingElements","setupGlobalData","animationItem","compSize","initTransform","_matMdf","_opMdf","mat","ao","renderTransform","hierarchy","globalToLocal","mHelper","getMaskProperty","getMaskelement","filtersFactory","createFilter","createAlphaToLuminanceFilter","featureSupport","maskType","registeredEffects","idPrefix","SVGEffects","filters","effect","countsAsEffect","registerEffect","SVGBaseElement","HierarchyElement","RenderableDOMElement","IImageElement","initElement","sourceRect","ProcessedElement","IShapeElement","initRendererElement","createContainerElements","matteElement","transformedElement","_sizeChanged","td","matteMasks","tt","ln","hd","renderElement","destroyBaseElement","createRenderableComponents","renderableEffectsManager","getMatte","setMatte","initHierarchy","checkParenting","createContent","renderInnerContent","innerElem","pr","imagePreserveAspectRatio","addShapeToModifiers","shapeModifiers","isShapeInAnimatedModifiers","isAnimatedWithShape","renderModifiers","searchProcessedElement","processedElements","addProcessedElement","lineCapEnum","lineJoinEnum","SVGShapeData","transformers","lStr","lvl","SVGStyleData","pElem","msElem","DashProperty","dataProps","dashStr","dashArray","dashoffset","SVGStrokeStyleData","SVGFillStyleData","SVGNoStyleData","GradientProperty","_cmdf","_omdf","_collapsable","checkCollapsable","_hasOpacity","SVGGradientFillStyleData","initGradientData","SVGGradientStrokeStyleData","ShapeGroupData","prevViewData","gr","SVGTransformData","comparePoints","stops","setGradientData","setGradientOpacity","gf","cst","lc","of","ms","ost","maskId","buildShapeString","SVGElementsRenderer","createRenderFunction","SVGShapeElement","stylesList","animatedContents","LetterProps","sw","sc","fc","TextProperty","_frameId","keysIndex","canResize","minimumFontSize","currentData","ascent","boxWidth","defaultBoxWidth","justifyOffset","lh","lineWidths","ls","sz","ps","fillColorAnim","strokeColorAnim","strokeWidthAnim","yOffset","finalSize","finalText","finalLineHeight","copyData","searchProperty","completeTextData","initSecondaryElement","identityMatrix","buildExpressionInterface","searchShapes","filterUniqueShapes","setShapesAsAnimated","createStyleElement","addToAnimatedContents","createGroupElement","createTransformElement","createShapeElement","setElementStyles","renderShape","setCurrentData","searchKeyframes","getKeyframeValue","buildFinalText","an","anIndexes","val","line","animatorJustifyOffset","extra","fh","fs","fb","rn","totalChars","recalculate","canResizeFont","setMinimumFontSize","TextSelectorProp","_currentTextLength","finalS","finalE","xe","ne","sm","getMult","textProperty","getTextSelectorProp","TextAnimatorDataProperty","TextAnimatorProperty","_hasMaskedPath","_textData","_renderType","_elem","_animatorsData","_pathData","_moreOptions","alignment","renderedLetters","lettersChangedFlag","ITextElement","searchProperties","getMeasures","tLength","pi","G","q","U","Y","X","K","J","Q","et","defaultPropsArray","rt","at","nt","ot","ht","atan","textAnimator","renderType","buildNewText","createPathShape","applyTextPropertiesToMatrix","buildColor","emptyProp","emptyShapeData","SVGTextLottieElement","textSpans","ISolidElement","NullElement","SVGRendererBase","ICompElement","SVGCompElement","supports3d","SVGRenderer","svgElement","preserveAspectRatio","contentVisibility","viewBoxOnly","viewBoxSize","className","focusable","filterSize","runExpressions","frameNum","destroyed","CVContextData","saved","cArrPos","cTr","cO","savedOp","ShapeTransformManager","sequences","sequenceList","transform_key_count","CVEffects","CVMaskElement","hasMasks","CVBaseElement","CVShapeData","styledShapes","transforms","addTransformSequence","trNodes","CVShapeElement","transformsManager","CVTextElement","stroke","currentRender","sWidth","fValue","CVImageElement","CVSolidElement","CanvasRendererBase","clearCanvas","dpr","devicePixelRatio","currentGlobalAlpha","contextData","transformMat","CVCompElement","CanvasRenderer","HBaseElement","HSolidElement","HShapeElement","shapesContainer","currentBBox","HTextElement","textPaths","isMasked","HCameraElement","pe","_prevMat","HImageElement","HybridRendererBase","threeDElements","camera","HCompElement","HybridRenderer","singleShape","textContainer","buildTextContents","fromCharCode","buildShapeData","span","childSpan","glyph","_debug","bbox","findIndexByInd","appendElementInPos","tp","setElements","getElements","destroyElements","duplicate","processSequence","processSequences","getNewKey","canvasContext","beginPath","moveTo","lineTo","bezierCurveTo","clip","createElements","blendMode","globalCompositeOperation","hideElement","showElement","ctxTransform","ctxOpacity","restore","transformHelper","opacity","dashResetter","preTransforms","co","wi","da","do","addTransformToStyleList","removeTransformFromStyleList","closeStyles","_shouldRender","renderShapeTransform","drawLayer","coOp","strokeStyle","grd","lineWidth","lineCap","setLineDash","lineDashOffset","pts","closePath","renderPath","renderFill","renderStroke","renderGradientFill","renderStyledShape","createLinearGradient","createRadialGradient","addColorStop","tHelper","drawImage","globalAlpha","mozTransformOrigin","transformCanvas","sx","tx","isDashed","canvas","offsetHeight","rect","clearRect","checkBlendMode","tg","webkitTransform","addEffects","backgroundColor","_renderShapeFrame","shapeCont","getTransformedPoint","calculateShapeBoundingBox","checkBounds","getBoundsOfCurve","shapeBoundingBox","xMax","yMax","tempBoundingBox","calculateF","calculateBoundingBox","expandStrokeBoundingBox","currentBoxContains","compW","compH","strokeWidth","lineHeight","children","setup","perspectiveElem","perspective","webkitPerspective","Image","imageElem","ddd","addTo3dContainer","getThreeDContainerByPos","startPos","endPos","createThreeDContainer","build3dContainers","resizerElem","overflow","_createBaseContainerElements","CompExpressionInterface","layer","pixelAspect","frameDuration","displayStartTime","numLayers","Expressions","pushExpression","popExpression","registerExpressionProperty","MaskManagerInterface","_mask","_data","ExpressionPropertyInterface","getVelocityAtTime","numKeys","valueAtTime","speedAtTime","getSpeedAtTime","velocityAtTime","propertyGroup","TransformExpressionInterface","rotation","xRotation","yRotation","xPosition","yPosition","zPosition","anchorPoint","LayerExpressionInterface","getMatrix","applyPoint","invertPoint","toWorld","toWorldVec","fromWorld","fromWorldVec","toComp","fromComp","sampleImage","defineProperties","hasParent","anchor_point","active","startTime","inPoint","outPoint","_name","mask","propertyGroupFactory","PropertyInterface","EffectsExpressionInterface","mn","numProperties","np","en","setGroupProperty","ShapePathInterface","propertyIndex","ShapeExpressionInterface","cix","startPoint","endPoint","dash","end","skewAxis","outerRadius","outerRoundness","innerRoundness","innerRadius","roundness","radius","copies","TextExpressionInterface","sourceText","_typeof$2","FootageInterface","dataInterfaceFactory","outlineInterface","dataInterface","interfaces","effects","footage","getInterface","_typeof$1","seedRandom","seedrandom","entropy","Uint8Array","msCrypto","getRandomValues","plugins","screen","int32","quick","pass","initialize$2","propTypes","SHAPE","_typeof","ExpressionManager","frames","$bm_isInstanceOfArray","isNumerable","$bm_neg","easeInBez","easeOutBez","easeInOutBez","sum","mul","div","mod","$bm_sum","$bm_sub","$bm_mul","$bm_div","$bm_mod","clamp","radiansToDegrees","radians_to_degrees","degreesToRadians","degrees_to_radians","helperLengthArray","rgbToHsl","hue2rgb","hslToRgb","linear","createPath","initiateExpression","property","noOp","needsVelocity","_needsRandom","elemType","$bm_transform","thisProperty","loopIn","loop_in","loopOut","loop_out","smooth","fromCompToSurface","thisLayer","thisComp","scoped_bm_rt","expression_function","eval","wiggle","loopInDuration","loopOutDuration","velocity","textIndex","textTotal","selectorValue","lookAt","easeOut","applyEase","easeIn","ease","nearestKey","framesToTime","timeToFrames","randSeed","posterizeTime","executeExpression","frameExpressionId","__preventDeadCodeRemoval","expressionHelpers","searchExpressions","_cachingAtTime","getStaticValueAtTime","addPropertyDecorator","_transformCachingAtTime","vertices","inTangents","outTangents","isClosed","pointOnPath","_segmentsLength","vectorOnPath","tangentOnPath","normalOnPath","shapeValue","lastTime","initialize$1","addDecorator","getExpressionValue","calculateExpression","initialize","SVGComposableEffect","SVGTintFilter","filterManager","matrixFilter","createMergeNode","SVGFillFilter","SVGStrokeEffect","initialized","SVGTritoneFilter","feFuncR","feFuncG","feFuncB","SVGProLevelsFilter","createFeFunc","feFuncA","feFuncRComposed","feFuncGComposed","feFuncBComposed","SVGDropShadowEffect","feGaussianBlur","feOffset","feFlood","masker","pathMasker","getTotalLength","getTableValue","_svgMatteSymbols","SVGMatte3Effect","filterElem","SVGGaussianBlurEffect","findSymbol","replaceInParent","setElementAsMask","_templateObject$1","_taggedTemplateLiteral","LOTTIE_PLAYER_VERSION","LOTTIE_WEB_VERSION","_templateObject","_templateObject2","_templateObject3","_templateObject4","_templateObject5","PlayerState","PlayMode","PlayerEvents","parseSrc","isLottie","fromURL","_fromURL","Destroyed","Frozen","Loading","Paused","Playing","Stopped","Bounce","Normal","Complete","Frame","Freeze","Load","Loop","Pause","Play","Ready","Rendered","Stop","LottiePlayer","background","controls","disableCheck","disableShadowDOM","hover","intermission","speed","_io","_counter","_lottie","webworkers","_attachEventListeners","dispatchEvent","CustomEvent","getLottie","getVersions","lottieWebVersion","lottiePlayerVersion","seeker","XMLSerializer","serializeToString","download","click","setLooping","togglePlay","toggleLooping","_onVisibilityChange","renderControls","IntersectionObserver","isIntersecting","observe","_handleSeekChange","_prevState","frame","auto","basePlacements","clippingParents","viewport","popper","variationPlacements","acc","placements","beforeRead","read","afterRead","beforeMain","main","afterMain","beforeWrite","write","afterWrite","modifierPhases","getNodeName","nodeName","getWindow","ownerDocument","defaultView","isElement","Element","isHTMLElement","isShadowRoot","modifiers_applyStyles","phase","_ref2","initialStyles","strategy","margin","arrow","requires","getBasePlacement","getUAString","uaData","userAgentData","brands","brand","isLayoutViewport","getBoundingClientRect","includeScale","isFixedStrategy","clientRect","scaleX","scaleY","visualViewport","addVisualOffsets","offsetLeft","offsetTop","getLayoutRect","contains","child","rootNode","getRootNode","isSameNode","getComputedStyle","isTableElement","getDocumentElement","documentElement","getParentNode","assignedSlot","getTrueOffsetParent","offsetParent","getOffsetParent","isFirefox","css","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","modifiers_computeStyles","_ref5","_options$gpuAccelerat","_options$adaptive","_options$roundOffsets","eventListeners","_options$scroll","scroll","_options$resize","scrollParents","scrollParent","getOppositePlacement","matched","getOppositeVariationPlacement","getWindowScroll","scrollLeft","pageXOffset","scrollTop","pageYOffset","getWindowScrollBarX","isScrollParent","_getComputedStyle","overflowX","overflowY","getScrollParent","listScrollParents","_element$ownerDocumen","isBody","updatedList","rectToClientRect","getClientRectFromMixedType","clippingParent","html","layoutViewport","clientTop","clientLeft","winScroll","scrollWidth","scrollHeight","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","referenceRect","checksMap","makeFallbackChecks","firstFittingPlacement","_basePlacement","isStartVariation","isVertical","mainVariationSide","altVariationSide","checks","check","_loop","_i","fittingPlacement","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","_ref$options","cleanupFn","forceUpdate","_state$elements","_state$orderedModifie","_state$orderedModifie2","onFirstUpdate","createPopper","computeStyles","applyStyles","flip","DEBUG_BUILD","__SENTRY_DEBUG__","cachedImplementations","getNativeImplementation","impl","WINDOW","isNativeFunction","sandbox","head","contentWindow","core","debug","rest","accessors","dataset","_safeRead","arg","_htmlElementAsString","keyAttrs","out","sentryComponent","sentryElement","keyAttrPairs","keyAttr","keyAttrPair","isString","classes","currentElem","MAX_TRAVERSE_HEIGHT","separator","sepLength","nextStr","maxStringLength","debounceTimerID","lastCapturedEventType","lastCapturedEventTargetId","instrumentDOM","triggerDOMHandler","triggerHandlers","globalDOMEventHandler","makeDOMEventHandler","globalObject","originalAddEventListener","listener","__sentry_instrumentation_handlers__","handlerForType","refCount","originalRemoveEventListener","globalListener","event","_sentryCaptured","eventType","isContentEditable","addNonEnumerableProperty","_sentryId","uuid4","clearTimeout","addHandler","maybeInstrument","lastHref","instrumentHistory","historyReplacementFunction","originalHistoryFunction","urlOrPath","handlerData","supportsHistory","history","SENTRY_XHR_DATA_KEY","instrumentXHR","xhrproto","originalOpen","xhrOpenThisArg","xhrOpenArgArray","virtualError","startTimestamp","timestampInSeconds","request_headers","__sentry_own_request__","onreadystatechangeHandler","xhrInfo","status_code","endTimestamp","originalOnreadystatechange","onreadystatechangeThisArg","onreadystatechangeArgArray","originalSetRequestHeader","setRequestHeaderThisArg","setRequestHeaderArgArray","originalSend","sendThisArg","sendArgArray","sentryXhrData","wat","_lcpEntry","_clsEntry","_performanceCursor","_measurements","resetWebVitalState","_addMeasureSpans","entry","timeOrigin","ignorePerformanceApiSpans","entryType","devtools","track","stringMatchesSomePattern","navEntry","getNavigationEntry","requestTime","msToSec","requestStart","measureStartTimestamp","startTimeStamp","measureEndTimestamp","SEMANTIC_ATTRIBUTE_SENTRY_ORIGIN","performanceMeasure","isPrimitive","startAndEndSpan","_addNavigationSpans","_addPerformanceNavigationTiming","requestStartTimestamp","responseEndTimestamp","responseEnd","responseStartTimestamp","responseStart","eventEnd","utils","redirectCount","_addResourceSpans","resourceUrl","ignoredResourceSpanOps","initiatorType","parsedUrl","parseUrl","URL_FULL","_setResourceRequestAttributes","attributesWithResourceTiming","attributes$1","resourceTiming","resourceTimingToSpanAttributes","entryKey","entryVal","performance","getBrowserPerformanceAPI","browserPerformanceTimeOrigin","getEntries","spanStreamingEnabled","ignoreResourceSpans","performanceEntries","start_timestamp","transactionStartTime","spanToJSON","connection","effectiveType","isMeasurementValue","rtt","setMeasurement","deviceMemory","hardwareConcurrency","recordClsOnPageloadSpan","recordLcpOnPageloadSpan","unit","shortWebVitalName","customAttrName","attrKey","log","measurementName","cls","lcp","measurement","htmlTreeAsString","loadTime","renderTime","sources","getActivationStart","addPerformanceInstrumentationHandler","getActiveSpan","spanOptions","componentName","getComponentName","observer","PerformanceObserver","parentStartTimestamp","parentOp","initialScript","invoker","invokerType","sourceURL","sourceFunctionName","sourceCharPosition","recordClsStandaloneSpans","recordLcpStandaloneSpans","client","mark","lcpCleanupCallback","trackLcpAsStandaloneSpan","addLcpInstrumentationHandler","metric","isValidLcpMetric","clsCleanupCallback","trackClsAsStandaloneSpan","addClsInstrumentationHandler","ttfbCleanupCallback","addTtfbInstrumentationHandler","ttfb","fpFcpCleanupCallback","firstHidden","getVisibilityWatcher","shouldRecord","firstHiddenTime","fp","fcp","_sendStandaloneClsSpan","clsValue","pageloadSpanId","reportEvent","routeName","getCurrentScope","getScopeData","transactionName","SEMANTIC_ATTRIBUTE_SENTRY_OP","SEMANTIC_ATTRIBUTE_EXCLUSIVE_TIME","startStandaloneWebVitalSpan","addEvent","SEMANTIC_ATTRIBUTE_SENTRY_MEASUREMENT_UNIT","SEMANTIC_ATTRIBUTE_SENTRY_MEASUREMENT_VALUE","standaloneClsEntry","standaloneCLsValue","supportsWebVital","cleanupClsHandler","listenForWebVitalReportEvents","elementTimingIntegration","defineIntegration","_elementTimingIntegration","elementEntry","paintType","metricAttributes","naturalWidth","naturalHeight","metrics","distribution","LAST_INTERACTIONS","INTERACTIONS_SPAN_MAP","ELEMENT_NAME_TIMESTAMP_MAP","INP_ENTRY_MAP","pointerdown","pointerup","mousedown","mouseup","touchstart","touchend","mouseover","mouseout","mouseenter","mouseleave","pointerover","pointerout","pointerenter","pointerleave","dragstart","dragend","drag","dragenter","dragleave","dragover","drop","keydown","keyup","keypress","_trackINP","addInpInstrumentationHandler","_onInp","entry2","interactionId","interactionType","activeSpan","rootSpan","getRootSpan","cachedInteractionContext","spanToUse","elementName","interactionEvents","captureElementFromEvent","timestamp","timeStamp","firstKey","isBrowser","handleEntries","activeRootSpan","isPerformanceEventTiming","nearbyName","inpCallback","instrumented","_previousCls","_previousLcp","_previousTtfb","_previousInp","typeHandlers","getFunctionName","instrumentCls","onCLS","reportAllChanges","instrumentLcp","onLCP","instrumentTtfb","onTTFB","instrumentInp","onINP","addMetricObserver","instrumentFn","previousValue","stopOnCallback","stopListening","getCleanupCallback","durationThreshold","lcpValue","_sendStandaloneLcpSpan","standaloneLcpEntry","standaloneLcpValue","cleanupLcpHandler","getAbsoluteTime","timingSpanData","nextHopProtocol","extractNetworkProtocol","redirectStart","redirectEnd","workerStart","fetchStart","domainLookupStart","domainLookupEnd","connectStart","secureConnectionStart","connectEnd","fromEntries","char","isFinite","collectorCallback","pageloadSpan","collected","_runCollectorCallbackOnce","spanContext","spanId","onHidden","unsubscribeStartNavigation","on","isRedirect","unsubscribeAfterStartPageLoadSpan","parentSpan","startTimeInSeconds","endTime","ctx","parentStartTime","updateStartTime","withActiveSpan","startInactiveSpan","getClient","passedAttributes","environment","getOptions","userInfo","getDataCollectionOptions","replay","getIntegrationByName","replayId","getReplayId","scope","user","getUser","userDisplay","email","ip_address","profileId","contexts","profile","profile_id","replay_id","experimental","supportedEntryTypes","CLSThresholds","onReport","onFCP","runOnce","initMetric","report","visibilityWatcher","layoutShiftManager","initUnique","LayoutShiftManager","_processEntry","_sessionValue","_sessionEntries","po","bindReporter","takeRecords","INPThresholds","PerformanceEventTiming","whenActivated","initInteractionCountPolyfill","interactionManager","InteractionManager","whenIdleOrHidden","inp","_estimateP98LongestInteraction","_latency","LCPThresholds","lcpEntryManager","LCPEntryManager","stopListeningWrapper","isTrusted","removePageListener","addPageListener","prevInteractionCount","_longestInteractionList","_longestInteractionMap","_resetInteractions","getInteractionCount","candidateInteractionIndex","_onBeforeProcessingEntry","minLongestInteraction","interaction","removedInteractions","_onAfterProcessingINPCandidate","hadRecentInput","firstSessionEntry","lastSessionEntry","_onAfterProcessingUnexpectedShift","thresholds","prevValue","forceReport","rating","getRating","generateUniqueID","activationStart","checkResponseStart","navigationEntry","getEntriesByType","onHiddenFunctions","onVisibilityUpdate","visibilityState","onHiddenFunction","firstVisibilityStateHiddenTime","prerendering","navigationType","wasDiscarded","instanceMap","identityObj","ClassObj","_e","onHiddenOrPageHide","interactionCountEstimate","minKnownInteractionId","maxKnownInteractionId","updateEstimate","interactionCount","called","rIC","requestIdleCallback","FCPThresholds","TTFBThresholds","whenReady","_emitWebVitalSpan","metricName","SENTRY_TRANSACTION","SENTRY_SEGMENT_NAME","spanToStreamedSpanJSON","_sendLcpSpan","performanceTimeOrigin","_sendClsSpan","_sendInpSpan","inpValue","cachedContext","getCachedInteractionContext","clsEntry","onInp","MAX_PLAUSIBLE_INP_DURATION","lcpEntry","ORIGINAL_REQ_BODY","serializeFormData","formData","FormData","fetchArgs","Request","originalBody","GLOBAL_OBJ","BrowserClient","browser","Client","applyDefaultOptions","sdkSource","SENTRY_SDK_SOURCE","getSDKSource","applySdkMetadata","_metadata","sdk","settings","infer_ip","sendClientReports","_flushOutcomes","queueMicrotask","flush","addAutoIpAddressToSession","eventFromException","exception","stackParser","attachStacktrace","eventFromMessage","level","_prepareEvent","currentScope","isolationScope","platform","optionsArg","__SENTRY_RELEASE__","helpers","SENTRY_RELEASE","parentSpanIsAlwaysRootSpan","getDsn","tunnel","suppressTracing","exceptionFromError","ex","parseStackFrames","extractType","extractMessage","stacktrace","eventFromError","skipLines","reactMinifiedRegexp","framesToPop","isWebAssemblyException","WebAssembly","Exception","_INTERNAL_enhanceErrorWithSentryInfo","eventFromUnknownInput","syntheticException","isUnhandledRejection","isErrorEvent","isDOMError","isDOMException","domException","firstException","addExceptionMechanism","synthetic","eventFromString","addExceptionTypeValue","tags","isPlainObject","isEvent","normalizeDepth","errorFromProp","__serialized__","normalizeToSize","getNonErrorObjectExceptionValue","isParameterizedString","__sentry_template_string__","__sentry_template_values__","logentry","params","extractExceptionKeysForMessage","captureType","event_id","resolvedSyncPromise","feedbackAsyncIntegration","feedback","buildFeedbackIntegration","lazyLoadIntegration","feedbackSyncIntegration","getModalIntegration","feedbackModalIntegration","getScreenshotIntegration","feedbackScreenshotIntegration","ignoreOnError","ignoreNextOnError","referrer","Referer","wrap","__sentry_wrapped__","getOriginalFunction","sentryWrapped","_sentryWrappedDepth","wrappedArguments","withScope","addEventProcessor","mechanism","captureException","markFunctionWrapped","breadcrumbsIntegration","_breadcrumbsIntegration","dom","sentry","addConsoleInstrumentationHandler","breadcrumb","category","logger","severityLevelFromString","safeJoin","addBreadcrumb","addClickKeypressInstrumentationHandler","addXhrInstrumentationHandler","getBreadcrumbLogLevelFromHttpStatusCode","emit","addFetchInstrumentationHandler","fetchData","addHistoryInstrumentationHandler","parsedLoc","parsedFrom","parsedTo","relative","getEventDescription","DEFAULT_EVENT_TARGET","browserApiErrorsIntegration","_browserApiErrorsIntegration","eventTarget","unregisterOriginalCallbacks","setupOnce","_wrapTimeFunction","_wrapRAF","_wrapXHR","eventTargetOption","integrationOptions","eventName","handled","originalEventHandler","originalCallback","wrapOptions","originalFunction","browserSessionIntegration","lifecycle","startSession","ignoreDuration","initialSessionSent","captureSession","getIsolationScope","previousUser","addScopeListener","maybeNewUser","contextLinesIntegration","_contextLinesIntegration","processEvent","_hint","contextLines","htmlFilename","stripUrlQueryAndFragment","exceptions","htmlLines","applySourceContextToFrame","frameContextLines","linesOfContext","filename","lineno","addContextToFrame","cultureContextIntegration","_cultureContextIntegration","preprocessEvent","culture","getCultureContext","processSegmentSpan","safeSetSpanJSONAttributes","locale","timezone","calendar","intl","Intl","DateTimeFormat","resolvedOptions","timeZone","growthbookIntegration","growthbookClass","launchDarklyIntegration","_client","_INTERNAL_copyFlagsFromScopeToEvent","synchronous","flagKey","flagDetail","_context","_INTERNAL_insertFlagToScope","_INTERNAL_addFeatureFlagToActiveSpan","openFeatureIntegration","after","_hookContext","evaluationDetails","hookContext","_error","_hookHints","defaultValue","statsigIntegration","featureFlagClient","statsigClient","gate","unleashIntegration","featureFlagClientClass","unleashClientClass","unleashClientPrototype","_wrappedIsEnabled","toggleName","responseToStreamSpan","responseToFallbackTimeout","STREAMING_CONTENT_TYPES","fetchStreamPerformanceIntegration","addFetchEndInstrumentationHandler","streamSpan","fallbackTimeout","parseStringToURLObject","sanitizedUrl","stripDataUrlContent","getSanitizedUrlStringFromUrlObject","isRecording","globalHandlersIntegration","_globalHandlersIntegration","onerror","onunhandledrejection","stackTraceLimit","addGlobalErrorInstrumentationHandler","shouldIgnoreOnError","msg","column","colno","ev","ev0","ev0s","ev0sf","getFilenameFromUrl","function","UNKNOWN_FUNCTION","in_app","captureEvent","originalException","globalHandlerLog","addGlobalUnhandledRejectionInstrumentationHandler","_getUnhandledRejectionError","_eventFromRejectionWithPrimitive","eventbuilder","_getGraphQLOperation","requestBody","isPersistedRequest","operationName","isStandardRequest","graphqlQuery","graphqlOperationName","operationType","parseGraphQLQuery","getRequestPayloadXhrOrFetch","getBodyString","sentryFetchData","getFetchRequestArgBody","namedMatch","unnamedMatch","isObjectLike","extensions","persistedQuery","sha256Hash","getGraphQLRequestPayload","graphqlClientIntegration","spanAttributes","httpUrl","httpMethod","SEMANTIC_ATTRIBUTE_HTTP_REQUEST_METHOD","endpoints","isTracedGraphqlEndpoint","graphqlBody","updateName","graphQL","GRAPHQL_DOCUMENT","graphql","httpClientIntegration","_httpClientIntegration","failedRequestStatusCodes","failedRequestTargets","supportsNativeFetch","requestInfo","requestInit","_shouldCaptureResponse","bodyUsed","requestHeaders","responseHeaders","requestCookies","responseCookies","dc","_getDataCollectionSettings","_INTERNAL_filterKeyValueData","_extractFetchHeaders","cookies","reqCookieStr","filtered","_INTERNAL_filterCookies","resCookieStr","_createEvent","responseURL","cookieString","_getResponseSizeFromHeaders","contentLength","range","givenRequestTarget","isSentryRequestUrl","virtualStackTrace","body_size","dataCollection","sendDefaultPii","httpHeaders","httpContextIntegration","reqData","getHttpRequestData","processSpan","USER_AGENT_ORIGINAL","is_segment","SENTRY_OP","HTTP_REQUEST_HEADER_KEY_BASE","linkedErrorsIntegration","_linkedErrorsIntegration","limit","applyAggregateErrorsToEvent","SETUP_CLIENTS","reportingObserverIntegration","_reportingObserverIntegration","reports","setExtra","details","plainBody","crashId","captureMessage","supportsReportingObserver","ReportingObserver","spanStreamingIntegration","beforeSetup","clientOptions","traceLifecycle","initialMessage","fallbackMsg","hasSpanStreamingEnabled","beforeSendSpan","isStreamedBeforeSendSpanCallback","SpanBuffer","spanIsSampled","captureSpan","segmentSpan","traceId","INTEGRATION_NAME","SPOTLIGHT_IGNORE_SPANS","spotlightBrowserIntegration","_spotlightIntegration","sidecarUrl","ignoreSpans","afterAllSetup","makeFetch","browserUtils","failCount","envelope","serializeEnvelope","viewHierarchyIntegration","skipHtmlTags","walk","windows","depth","onElement","visible","alpha","shouldAttach","root","rendering_system","positioning","rootElement","attachment","attachmentType","attachments","WEB_VITALS_INTEGRATION_NAME","webVitalsIntegration","ignored","ignore","enableStandaloneClsSpans","enableStandaloneLcpSpans","_experiments","finalizeWebVitals","startTrackingWebVitals","pageloadSpans","addWebVitalsToSpan","trackLcpAsSpan","trackClsAsSpan","trackInpAsSpan","startTrackingINP","registerInpInteractionListener","webWorkerIntegration","worker","listenForSentryMessages","addWorker","worker2","eventData","_sentryMessage","hasDebugIds","hasModuleMetadata","hasWorkerError","hasWasmImages","_sentryDebugIds","_sentryModuleMetadata","_sentryWorkerError","_sentryWasmImages","code_file","stopImmediatePropagation","existingImages","newImages","newImg","workerError","globalhandlers","serializedError","HTML_ELEMENT_CONSTRUCTOR_NAME_REGEX","objName","_profiler","_chunkTimer","_profilerId","_isRunning","_sessionSampled","_lifecycleMode","_activeRootSpanIds","_rootSpanTimeouts","lifecycleMode","profileLifecycle","sessionSampled","shouldProfileSession","_setupTraceLifecycleListeners","setThreadAttributes","_beginProfiling","_endProfiling","notifyRootSpanActive","_registerTraceRootSpan","rootSpanCount","getGlobalScope","setContext","profiler_id","_startProfilerInstance","_resetProfilerInfo","_startPeriodicChunking","_clearAllRootSpanTimeouts","_collectCurrentChunk","timeout","_onRootSpanTimeout","stopped","profiler","startJSSelfProfile","rootSpanId","prevProfiler","chunk","createProfileChunkPayload","validationReturn","validateProfileChunk","_sendProfileChunk","sdkInfo","getSdkMetadataForEnvelopeHeader","getSdkMetadata","dsn","createEnvelope","sent_at","dsnToString","sendEnvelope","uiProfiler","startProfiler","stopProfiler","browserProfilingIntegration","_browserProfilingIntegration","UIProfiler","hasLegacyProfiling","profilesSampleRate","profileSessionSampleRate","isAutomatedPageLoadSpan","shouldProfileSpanLegacy","startProfileForSpan","PROFILED_ROOT_SPANS","rootSpan2","getActiveProfilesCount","profiledTransactionEvents","findProfiledTransactionsFromEnvelope","profilesToAddToEnvelope","profiledTransaction","takeProfileFromGlobalCache","profileEvent","createProfilingEvent","addProfilesToEnvelope","hasSpansEnabled","laterActiveSpan","laterRootSpan","processedProfile","onProfileHandler","maxDurationTimeoutID","debugBuild","addProfileToGlobalCache","MAX_PROFILE_DURATION_MS","originalEnd","MS_TO_NS","isMainThread","importScripts","PROFILER_THREAD_ID_STRING","PROFILER_THREAD_NAME","OS_PLATFORM","OS_PLATFORM_VERSION","OS_ARCH","OS_BROWSER","OS_MODEL","OS_LOCALE","language","languages","enrichWithThreadInformation","convertJSSelfProfileToSampledFormat","createProfilePayload","processed_profile","trace","trace_id","enrichedThreadProfile","transactionStartMs","transactionEndMs","DEFAULT_ENVIRONMENT","runtime","build_number","device","model","manufacturer","architecture","is_emulator","debug_meta","applyDebugMetadata","transactions","active_thread_id","relative_start_ns","relative_end_ns","toFixed","EMPTY_STACK_ID","STACK_ID","samples","stacks","thread_metadata","firstSample","perfOrigin","adjustForOriginChange","jsSample","stackId","elapsed_since_start_ns","stack_id","thread_id","stackTop","abs_path","resourceId","parentId","sample","resource_paths","getDebugImagesForResources","isValidSampleRate","getHighEntropyValues","ua","platformVersion","fullVersionList","firstUa","PROFILING_CONSTRUCTOR_FAILED","PROFILE_MAP","profiles","jsSelfProfile","profilerId","continuousProfile","stackHead","timestampSeconds","chunk_id","client_sdk","events","forEachEnvelopeItem","JSProfilerConstructor","Profiler","maxSamples","sampleInterval","maxBufferSize","isHex32","valid","optionalDocument","injectionPoint","mergedOptions","eventId","lastEventId","script","getReportDialogEndpoint","onLoad","onClose","onload","reportDialogClosedMessageHandler","getDefaultIntegrations","inboundFiltersIntegration","functionToStringIntegration","conversationIdIntegration","dedupeIntegration","shouldDisableBecauseIsBrowserExtenstion","skipBrowserExtensionCheck","detectBrowserExtension","checkAndWarnIfIsEmbeddedBrowserExtension","defaultIntegrations","stackParserFromStackParserOptions","stackParsers","defaultStackParser","integrations","getIntegrationsToSetup","transport","makeFetchTransport","setNormalizeStringifier","normalizeStringifyValue","initAndBind","createFrame","func","chromeRegexNoFnName","chromeRegex","chromeEvalRegex","chromeDataUriRegex","chromeStackLineParser","dataUriMatch","noFnParts","col","line2","subMatch","extractSafariExtensionDetails","geckoREgex","geckoEvalRegex","geckoStackLineParser","winjsRegex","winjsStackLineParser","opera10Regex","opera10StackLineParser","opera11Regex","opera11StackLineParser","defaultStackLineParsers","createStackParser","isSafariExtension","isSafariWebExtension","cancelledStatus","setStatus","SPAN_STATUS_ERROR","BROWSER_TRACING_INTEGRATION_ID","BOT_USER_AGENT_RE","isBotUserAgent","nav","DEFAULT_BROWSER_TRACING_OPTIONS","TRACING_DEFAULTS","instrumentNavigation","instrumentPageLoad","markBackgroundSpan","enableLongTask","enableLongAnimationFrame","enableInp","detectRedirects","linkPreviousTrace","consistentTraceSampling","enableReportPageLoaded","defaultRequestInstrumentationOptions","startBrowserTracingPageLoadSpan","traceOptions","setTransactionName","getActiveIdleSpan","startBrowserTracingNavigationSpan","isRedirect2","setSDKProcessingMetadata","normalizedRequest","getMetaContent","metaName","optionalWindowDocument","metaTag","getServerTiming","navigation","serverTiming","ACTIVE_IDLE_SPAN_PROPERTY","setActiveIdleSpan","browserTracingIntegration","consoleSandbox","latestRoute","enableInteractions","beforeStartSpan","idleTimeout","finalTimeout","childSpanTimeout","traceFetch","traceXHR","trackFetchStreamPerformance","shouldCreateSpanForRequest","enableHTTPTimings","onRequestSpanStart","onRequestSpanEnd","_isBot","lastInteractionTimestamp","_pageloadSpan","_createRouteSpan","startSpanOptions","makeActive","isPageloadSpan","initialSpanName","finalStartSpanOptions","urlObject","URL_PATH","isURLObjectRelative","SEMANTIC_ATTRIBUTE_SENTRY_SOURCE","dateTimestampInSeconds","idleSpan","startIdleSpan","disableAutoFinish","beforeSpanEnd","addPerformanceEntries","oldPropagationContext","getPropagationContext","setPropagationContext","sampled","dsc","getDynamicSamplingContextFromSpan","trimIdleSpanEndTimestamp","emitFinish","registerSpanErrorInstrumentation","startTrackingLongAnimationFrames","startTrackingLongTasks","startTrackingInteractions","interactionHandler","navigationOptions","maybeEndActiveSpan","generateTraceId","sampleRand","propagationSpanId","generateSpanId","forceTransaction","sentryTrace","baggage","propagationContext","propagationContextFromHeaders","SEMANTIC_ATTRIBUTE_SENTRY_IDLE_SPAN_FINISH_REASON","addIntegration","startingUrl","linkTraces","parsed","navigationIsRedirect","spanData","registerBackgroundTabDetection","inflightInteractionSpan","registerInteractionTransaction","activeIdleSpan","currentRootSpanOp","instrumentOutgoingRequests","tracePropagationTargets","PREVIOUS_TRACE_KEY","PREVIOUS_TRACE_TMP_SPAN_ATTRIBUTE","addPreviousTraceSpanLink","previousTraceInfo","spanJson","updatedPreviousTraceInfo","sampleRate","oldSampleRate","SEMANTIC_ATTRIBUTE_SENTRY_SAMPLE_RATE","sample_rate","previousTraceSpanCtx","addLink","SEMANTIC_LINK_ATTRIBUTE_LINK_TYPE","spanContextSampled","storePreviousTraceInSessionStorage","sessionStorage","setItem","getPreviousTraceFromSessionStorage","getItem","traceFlags","useSessionStorage","inMemoryPreviousTraceInfo","isFirstTraceOnPageload","mutableSamplingContextData","currentPropagationContext","parentSpanId","parentSampled","parentSampleRate","SEMANTIC_ATTRIBUTE_SENTRY_PREVIOUS_TRACE_SAMPLE_RATE","addHTTPTimings","onEntryFound","unsubscribePerformanceObsever","capturedEndTimestamp","isEnded","endSpanAndCleanup","isPerformanceResourceTiming","setAttributes","shouldAttachHeaders","targetUrl","resolvedUrl","currentOrigin","isSameOriginRequest","isRelativeSameOriginRequest","shouldCreateSpan","shouldAttachHeadersWithTargets","spans","propagateTraceparent","createdSpan","instrumentFetchRequest","fullUrl","getFullURL","sanitizedFullUrl","HTTP_URL","shouldAttachHeaders2","shouldCreateSpanResult","__sentry_xhr_span_id__","setHttpStatus","span2","createHeadersSafely","parseXhrResponseHeaders","urlForSpanName","shouldEmitSpan","SentryNonRecordingSpan","spanForTraceHeaders","spanIsIgnored","recordDroppedEvent","traceparent","getTraceData","sentryTraceHeader","sentryBaggageHeader","traceparentHeader","originalHeaders","__sentry_xhr_v3__","originalBaggageHeader","baggageHeaderHasSentryValues","maybePreviousActiveSpan","thisArg","_INTERNAL_setSpanForScope","baggageHeader","nativeFetch","pendingBodySize","createTransport","requestSize","requestOptions","referrerPolicy","keepalive","statusCode","clearCachedImplementation","makePromiseBuffer","bufferSize","promisifyRequest","oncomplete","onsuccess","onabort","createStore","dbName","storeName","indexedDB","onupgradeneeded","createObjectStore","dbp","db","objectStore","getAllKeys","maxQueueSize","store2","keys2","createIndexedDbStore","env","parseEnvelope","makeOfflineTransport","_window","nw","extensionObject","chrome","LAZY_LOADABLE_NAMES","HYPHENATED_BUNDLES","replayCanvasIntegration","WindowWithMaybeIntegration","scriptNonce","bundle","sentryOnWindow","Sentry","baseURL","cdnBaseUrl","SDK_VERSION","waitForLoad","currentScript","parentElement","integrationFn","getBaseApiEndpoint","port","projectId","sentry_version","publicKey","sentry_key","sentry_client","dsnLike","dialogOptions","makeDsn","endpoint","encodedOptions","dsn$1","carrier$1","getSentryCarrier","acs","getStackAsyncContextStrategy","registry","getMainCarrier","AsyncContextStack","scope$1","assignedScope","assignedIsolationScope","Scope","_stack","_isolationScope","_pushScope","maybePromiseResult","_popScope","isThenable","chainAndCopyPromiseLike","getStackTop","getScope","getAsyncContextStack","defaultScopes","getDefaultCurrentScope","getDefaultIsolationScope","withSetScope","withIsolationScope","withSetIsolationScope","asyncLocalStorage","getScopes","getStoreWithActiveSpan","activeScope","_setSpanForScope","waitForTracingChannelBinding","retries","getAsyncContextStrategy","carrier","getTracingChannelBinding","safeUnref","isAttributeObject","maybeObj","attributeValueToTypedAttributeValue","rawValue","useFallback","attributeValue","primitiveType","isInteger","checkedUnit","stringValue","estimatePrimitiveSizeInBytes","fallback","serializedAttributes","typedValue","DEFAULT_BREADCRUMBS","beforeBreadcrumb","maxBreadcrumbs","mergedBreadcrumb","finalBreadcrumb","debugLogger","__SENTRY__","creator","worldwide","checkIn","dynamicSamplingContext","safeDateNow","ALREADY_SEEN_ERROR","MISSING_RELEASE_FOR_SESSION_ERROR","INTERNAL_ERROR_SYMBOL","DO_NOT_SEND_EVENT_SYMBOL","_makeInternalError","_makeDoNotSendEventError","_isInternalError","_isDoNotSendEventError","setupWeightBasedFlushing","afterCaptureHook","flushHook","estimateSizeFn","flushFn","flushTimeout","isTimerActive","flushInterval","_flushInterval","getDataCategoryByType","isTransactionEvent","estimateMetricSizeInBytes","estimateAttributesSizeInBytes","estimateLogSizeInBytes","_integrations","_numProcessing","_outcomes","_hooks","_eventProcessors","_promiseBuffer","transportOptions","base","DEFAULT_TRANSPORT_BUFFER_SIZE","_dataCollection","resolveDataCollectionOptions","_dsn","getEnvelopeEndpointWithUrlEncodedAuth","_transport","enableLogs","_INTERNAL_flushLogsBuffer","enableMetrics","_INTERNAL_flushMetricsBuffer","checkOrSetAlreadyCaught","hintWithEventId","_process","_captureEvent","eventMessage","isMessage","promisedEvent","sdkProcessingMetadata","capturedSpanScope","capturedSpanIsolationScope","dataCategory","session$1","sendSession","session","updateSession","getTransport","clientFinished","_isClientDoneProcessing","transportFlushed","close","getEventProcessors","eventProcessor","_isEnabled","_setupIntegrations","integrationName","getIntegrationNames","integration$1","isAlreadyInstalled","integration","setupIntegration","afterSetupIntegrations","sendEvent","genAiSpanItem","extractGenAiSpansFromEvent","createEventEnvelope","addItemToEnvelope","envelope$1","createAttachmentEnvelopeItem","sendResponse","clientReleaseOption","clientEnvironmentOption","sessionAttrs","createSessionEnvelope","hook","hookCallbacks","uniqueCallback","registerCleanup","dispose","setupIntegrations","_updateSessionFromEvent","crashed","errored","sessionNonTerminal","ticked","setLastEventId","prepareEvent","evt","getTraceContextFromScope","getDynamicSamplingContextFromScope","dynamicSamplingContext$1","currentScopes","eventUtils","getPossibleEventMessages","_processEvent","finalEvent","isTransaction","beforeSendLabel","parsedSampleRate","parseSampleRate","prepared","__sentry__","beforeSendTransaction","processedEvent","rootSpanJson","convertTransactionEventToSpanJson","shouldIgnoreSpan","processedRootSpanJson","merge","transactionEvent","convertSpanJsonToTransactionEvent","showSpanDropWarning","processedSpans","initialSpans","reparentChildSpans","processedSpan","droppedSpans","spanCountBefore","spanCountBeforeProcessing","beforeSendResult","invalidValueError","spanCount","getSession","randomSafeContext","safeMathRandom","droppedSpanCount","transactionInfo","transaction_info","taskProducer","SENTRY_BUFFER_FULL_ERROR","_clearOutcomes","outcomes","quantity","createClientReportEnvelope","_externalPropagationContextProvider","getExternalPropagationContext","getGlobalSingleton","externalContext","span_id","traceContext","parent_span_id","_enhanceEventWithSdkInfo","newSdkInfo","eventSdkInfo","packages","envelopeHeaders","createEventEnvelopeHeaders","eventItem","envelopeItem","dsc2","public_key","beforeSendSpan$1","filteredSpans","spanUtils","convertToSpanJSON","items","createSpanEnvelopeItem","_notifyEventProcessors","processors","processor","final","syncpromise","rejectedSyncPromise","endSession","closeSession","_sendSessionUpdate","setSession","parseEventHintOrCaptureContext","captureContext","conversationId","setConversationId","extras","setExtras","setTag","setTags","setUser","getCombinedScopeData","makeSession","currentSession","associatedEventId","feedbackEvent","contact_email","associated_event_id","_callOnRequestSpanEnd","spanOriginOrOptions","_INTERNAL_getTracingHeadersForFetchRequest","fetchOptionsObj","traceHeaders","isRequest","isInstanceOf","newHeaders","prevBaggageHeader","baggageHeaderHasSentryBaggageValues","prevBaggageHeaderWithSentryValues","existingSentryTraceHeader","existingTraceparentHeader","existingBaggageHeader","newBaggageHeaders","headerItem","baggageEntry","SENTRY_BAGGAGE_KEY_PREFIX","getSpanStartOptions","url$1","spanOrigin","getFetchSpanAttributes","__span","contentLengthNum","sentryNonRecordingSpan","fetchHint","_filter","instrumentedLevels","instrumentConsole","CONSOLE_LEVELS","originalConsoleMethod","originalConsoleMethods","firstArg","isFiltered","isEnabled","removeHandler","instrumentFetch","onFetchResolved","skipNativeFetchCheck","originalFetch","parseFetchArgs","getHeadersFromFetchArgs","enhanceOption","enhanceFetchErrorMessages","hostname","streamHandler","clonedResponseForResolving","onFinishedResolving","responseReader","getReader","maxFetchDurationTimeout","cancel","readingActive","chunkTimeout","releaseLock","getUrlFromResource","requestArgument","optionsArgument","_oldOnErrorHandler","instrumentError","__SENTRY_INSTRUMENTED__","_oldOnUnhandledRejectionHandler","instrumentUnhandledRejection","installedIntegrations","integrationIndex","extendedIntegration","wrappedIntegration","baseValue","extendedValue","wrappedFunction","userIntegrations","isDefaultInstance","resolvedUserIntegrations","integrationsByName","existingInstance","captureConsoleIntegration","_captureConsoleIntegration","levels","severityLevel","DEFAULT_CAPTURED_LEVELS","CONSOLA_TYPE_TO_LOG_SEVERITY_LEVEL_MAP","silent","fatal","fail","ready","box","verbose","critical","notice","CONSOLA_LEVEL_TO_LOG_SEVERITY_LEVEL_MAP","providedClient","logObj","consolaMessage","_date","logSeverityLevel","mappedLevel","normalizeMaxBreadth","extractionResult","messageTemplate","messageParameters","messageParamAttributes","templateAttrs","createConsoleTemplateAttributes","formatConsoleArgs","remainingArgsStartIndex","followingArgs","shouldAddTemplateAttr","hasConsoleSubstitutions","_INTERNAL_captureLog","consoleIntegration","addConsoleBreadcrumb","addConsoleInstrumentationFilter","assertionArgs","util","format","_conversationIdIntegration","scopeData","isolationScopeData","GEN_AI_CONVERSATION_ID_ATTRIBUTE","_dedupeIntegration","previousEvent","currentEvent","_shouldDropEvent","currentMessage","previousMessage","_isSameFingerprint","_isSameStacktrace","previousException","_getExceptionFromEvent","currentException","currentFrames","getFramesFromEvent","previousFrames","frameA","frameB","currentFingerprint","fingerprint","previousFingerprint","DEFAULT_IGNORE_ERRORS","eventFiltersIntegration","_mergeOptions","ignoreTransactions","misc","ignoreErrors","denyUrls","_getEventFilterUrl","allowUrls","internalOptions","disableErrorDefaults","rootException","parent_id","didLegacyDeprecationWarning","expressErrorHandler","shouldHandleError","getShouldHandleError","defaultShouldHandleError","optionsOrExports","maybeGetOptions","moduleExports","express","express2","getDefaultExport","routerProto","isExpressWithRouterPrototype","Router","isExpressWithoutRouterPrototype","originalRouteMethod","route","wrapMethod","patchLayer","getLayerPath","originalRouterUse","application","originalApplicationUse","router","_router","app","_res","maybeLayer","layerPath","handle","layerHandleOriginal","layerHandlePatched","otherArgs","storeLayer","storedLayers","getStoredLayers","isLayerPathStored","constructedRoute","getConstructedRoute","actualMatchedRoute","getActualMatchedRoute","onRouteResolved","getLayerMetadata","ATTR_EXPRESS_NAME","ATTR_EXPRESS_TYPE","ATTR_HTTP_ROUTE","isLayerIgnored","startSpanManual","spanHasEnded","ExpressLayerType_ROUTER","onResponseFinish","maybeError","asErrorAndMessage","removeListener","anyError","requestLayerStore","request$1","sdkProcMeta","httpRequestToRequestData","isRoutePattern","getRouterPath","stackLayer","extractLayerPathSegment","isExpressRouterPrototype","output","layersStore","originalUrl","normalizedRoute","extractedRouterPath","ExpressLayerType_REQUEST_HANDLER","ExpressLayerType_MIDDLEWARE","ignoreLayersType","ignoreLayers","extraErrorDataIntegration","_extraErrorDataIntegration","captureErrorCause","maxValueLength","exceptionName","errorData","_extractErrorData","normalizedErrorData","setSkipNormalizationHint","nativeKeys","extraErrorInfo","truncate","cause","errorName","oO","featureFlagsIntegration","addFeatureFlag","isOn","_wrapAndCaptureBooleanResult","getFeatureValue","flagName","_functionToStringIntegration","originalFunctionToString","unwrappedFunction","getRequestUrl","getRequestUrlFromClientRequest","getSanitizedUrlString","onHttpClientRequestCreated","patchHttpModuleClient","httpModuleExport","httpModule","ClientRequest","_storeHeader","getHttpClientSubscriptions","http","HTTP_ON_CLIENT_REQUEST","originalStoreHeader","propagationDecisionMap","LRUMap","SUPPRESS_TRACING_KEY","errorMonitor","createSpans","propagateTrace","breadcrumbs","https","suppressOtelWarning","ignoreOutgoingRequests","addedBreadcrumbs","addBreadcrumbs","addOutgoingRequestBreadcrumb","request2","prependListener","listenerCount","injectTracePropagationHeaders","doubleWrapWarning","getOutgoingSpanData","getOutgoingRequestSpanData","outgoingRequestHook","spanEnded","endSpan","requestOnClose","SPAN_STATUS_UNSET","constants","LOG_PREFIX","setIncomingResponseSpanData","bindScopeToEmitter","outgoingResponseHook","finished","finishWithResponse","complete","spanstatus","getSpanStatusFromHttpCode","applyCustomAttributesOnSpan","isOtelWrapped","__unwrap","warning","didDoubleWrapWarning","getSocketAttrs","socket","remoteAddress","remotePort","getResponseContentLengthAttributes","contentLengthHeader","encoding","getHttpSpanDetailsFromUrlObject","getHeader","onlyIfParent","statusMessage","httpVersion","getRequestOptions","hostWithPort","portInHost","getHeaders","getRequestUrlObject","tracePropagationTargets$1","shouldPropagateTraceForUrl","traceData","baggage$1","traceData$1","setHeader","mergeBaggageHeaders","maxIncomingRequestBodySize","bodyByteLength","chunks","maxBodySize","getMaxBodyByteLength","addListener","restArgs","thisArg2","args2","bufferifiedChunk","Buffer","byteLength","_err","off","modifiedArgs","truncatedBody","subarray","clientToRequestSessionAggregatesMap","requestIsolationScope","sessionFlushingDelayMS","requestSession","roundedDate","setSeconds","dateBucketKey","existingClientAggregate","exited","newClientAggregate","flushPendingClientAggregates","unregisterClientFlushHook","aggregatePayload","started","aggregates","lastSentryEmitMap","kRequestMark","instrumentServer","server","currentEmit","newEmit","setClient","ipAddress","maxRequestBodySize","ignoreRequestBody","sessions","patchRequestToCaptureBody","bestEffortTransactionName","recordRequestSession","sentryTraceValue","continueTrace","wrapServerEmitRequest","emitResult","isStaticAssetRequest","urlPath","getRequestContentLengthAttribute","userWrap","spanWrap","ignoreIncomingRequests","ignoreStaticAssets","onSpanCreated","onSpanEnd","__SENTRY_TRACING__","createSpan","urlObj","httpTargetWithoutQueryFragment","ips","scheme","localAddress","localPort","SPAN_KIND","SERVER","httpHeadersToSpanAttributes","headersToDict","httpStatus","effectiveOptions","HTTP_ON_SERVER_REQUEST","options2","getNotificationAttributes","recordInputs","MCP_LOGGING_LEVEL_ATTRIBUTE","MCP_LOGGING_LOGGER_ATTRIBUTE","MCP_LOGGING_DATA_TYPE_ATTRIBUTE","MCP_LOGGING_MESSAGE_ATTRIBUTE","progressToken","progress","total","uri","MCP_RESOURCE_URI_ATTRIBUTE","targetInfo","extractTargetInfo","MCP_REQUEST_ID_ATTRIBUTE","methodConfig","getRequestArguments","sessionToSpanMap","statelessSpanMap","getOrCreateSpanMap","sessionId","spanMap","hasError","responseSessionData","sessionExtraction","extractSessionDataFromInitializeResponse","extractSessionDataFromResponse","protocolVersion","serverInfo","updateSessionDataForTransport","responseAttributes","buildServerAttributesFromInfo","MCP_PROTOCOL_VERSION_ATTRIBUTE","toolAttributes","extractToolResultAttributes","capturePolicy","recordOutputs","promptAttributes","extractPromptResultAttributes","errorType","extraData","error_type","wrapMethodHandler","serverInstance","methodName","originalMethod","wrappedHandler","createWrappedHandler","originalHandler","handlerName","handlerArgs","createErrorCapturingHandler","captureHandlerError","tool_name","captureError","resource_uri","prompt_name","_captureErr","wrapToolHandlers","tool","registerTool","wrapResourceHandlers","wrapPromptHandlers","prompt","registerPrompt","registeredTools","_registeredTools","executor","registeredResources","_registeredResources","readCallback","registeredResourceTemplates","_registeredResourceTemplates","template","registeredPrompts","_registeredPrompts","wrappedMcpServerInstances","mcpServerInstance","validateMcpServerInstance","captureOptions","originalConnect","transport$1","wrapTransportOnMessage","wrapTransportSend","wrapTransportOnClose","wrapTransportError","wrapAllMCPHandlers","wrapExistingHandlers","METHOD_CONFIGS","targetField","targetAttribute","MCP_TOOL_NAME_ATTRIBUTE","captureArguments","argumentsField","captureUri","MCP_PROMPT_NAME_ATTRIBUTE","captureName","argumentsObj","MCP_REQUEST_ARGUMENT","NETWORK_PII_ATTRIBUTES","CLIENT_ADDRESS_ATTRIBUTE","CLIENT_PORT_ATTRIBUTE","isValidContentItem","MCP_PROMPT_RESULT_DESCRIPTION_ATTRIBUTE","MCP_PROMPT_RESULT_MESSAGE_COUNT_ATTRIBUTE","safeSet","attrName","role","includeContent","MCP_TOOL_RESULT_CONTENT_COUNT_ATTRIBUTE","mimeType","MCP_TOOL_RESULT_IS_ERROR_ATTRIBUTE","MCP_PROTOCOL_VERSION_META_KEY","MCP_CLIENT_INFO_META_KEY","MCP_SERVER_INFO_META_KEY","extractPartyInfo","partyInfo","getClientAttributes","clientInfo","getClientInfoForTransport","getServerAttributes","getSessionDataForTransport","MCP_SERVER_NAME_ATTRIBUTE","MCP_SERVER_TITLE_ATTRIBUTE","MCP_SERVER_VERSION_ATTRIBUTE","extractClientInfo","address","clientAddress","clientPort","getTransportTypes","mcpTransport","networkTransport","transportName","lowerTransportName","clientAttributes","serverAttributes","getProtocolVersionForTransport","MCP_SESSION_ID_ATTRIBUTE","MCP_TRANSPORT_ATTRIBUTE","NETWORK_TRANSPORT_ATTRIBUTE","NETWORK_PROTOCOL_VERSION_ATTRIBUTE","sessionData","_meta","sessionToSessionData","statelessSessionData","getSessionData","partialSessionData","createSpanName","buildSentryAttributes","MCP_SERVER_OP_VALUE","MCP_FUNCTION_ORIGIN_VALUE","MCP_NOTIFICATION_CLIENT_TO_SERVER_OP_VALUE","MCP_NOTIFICATION_ORIGIN_VALUE","MCP_NOTIFICATION_SERVER_TO_CLIENT_OP_VALUE","MCP_ROUTE_SOURCE_VALUE","createMcpSpan","spanName","rawAttributes","buildTransportAttributes","MCP_METHOD_NAME_ATTRIBUTE","buildTypeSpecificAttributes","piiFiltering","filterMcpPiiFromSpanData","startSpan","jsonRpcMessage","resolveMcpOptions","genAI","inputs","outputs","originalOnError","onclose","originalOnClose","cleanupPendingSpansForTransport","cleanupSessionDataForTransport","originalOnMessage","isJsonRpcRequest","notification","isJsonRpcNotification","messageSessionData","extractSessionDataFromInitializeRequest","extractSessionDataFromMessage","spanConfig","buildMcpServerSpanConfig","buildClientAttributesFromInfo","storeSpanForRequest","createMcpNotificationSpan","createMcpOutgoingNotificationSpan","isJsonRpcResponse","errorResponse","jsonRpcError","completeSpanWithResults","jsonrpc","moduleMetadataIntegration","stripMetadataFromStackFrames","addMetadataToStackFrames","SQL_OPERATION_REGEX","CONNECTION_CONTEXT_SYMBOL","INSTRUMENTED_MARKER","QUERY_FROM_INSTRUMENTED_SQL","_instrumentSqlInstance","sql","parentConnectionContext","proxiedSql","argumentsList","_wrapSingleQueryHandle","parentSqlInstance","parentContext","sqlInstance","wrappedCallback","instrumentedSql","_buildConnectionContext","__sentryWrapped","originalHandle","wrappedHandle","executed","requireParentSpan","sanitizedSqlQuery","_sanitizeSqlQuery","_reconstructQuery","connectionContext","_setConnectionAttributes","requestHook","queryWithCallbacks","resolveTarget","resolveThisArg","resolveArgs","_setOperationName","command","rejectTarget","rejectThisArg","rejectArgs","integerLiteralRE","sqlQuery","ATTR_DB_NAMESPACE","ATTR_SERVER_ADDRESS","ATTR_SERVER_PORT","portNumber","sanitizedQuery","operationMatch","database","requestDataIntegration","_requestDataIntegration","resolveIncludeAndDataCollection","query_string","urlQueryParams","additionalData","extractNormalizedRequestData","getIpAddress","getClientIPAddress","URL_QUERY","cookieAttributes","cookie","headerAttributes","semanticAttributes","SEMANTIC_ATTRIBUTE_USER_IP_ADDRESS","ipHeaderNamesLower","ipHeaderNames","parseCookie","rewriteFramesIntegration","iteratee","generateIteratee","originalEvent","isWindowsFrame","startsWithSlash","oldFilename","basename","AUTH_OPERATIONS_TO_INSTRUMENT","AUTH_ADMIN_OPERATIONS_TO_INSTRUMENT","FILTER_MAPPINGS","eq","neq","gt","gte","lt","lte","like","ilike","in","cs","cd","nxl","sl","nxr","adj","ov","fts","plfts","phfts","wfts","DB_OPERATIONS_TO_INSTRUMENT","markAsInstrumented","isInstrumented","getMutationBodyPayloadForTelemetry","rawBody","plainHeaders","lowerCaseName","headerName","extractOperation","translateFiltersIntoMethods","instrumentAuthOperation","isAdmin","exports$1","SPAN_STATUS_OK","instrumentPostgRESTFilterBuilder","PostgRESTFilterBuilder","operations","typedThis","pathParts","table","queryItems","searchParams","shouldSendData","sendOperationData","databaseQueryData","bodyPayload","mutationPart","queryPart","descriptionMiddle","trimEnd","supabaseContext","instrumentSupabaseClient","supabaseClient","SupabaseClient","rv","PostgRESTQueryBuilder","supabaseClientInstance","auth","authOperation","admin","supabaseIntegration","_supabaseIntegration","thirdPartyErrorFilterIntegration","ignoreSentryInternalFrames","insideSentryWrapped","frameKeys","instruction_addr","frameIndex","context_line","pre_context","SENTRY_INTERNAL_FN_APPLY","SENTRY_INTERNAL_COMMENT","module_metadata","BUNDLER_PLUGIN_APP_KEY_PREFIX","behaviour","filterKeys","third_party_code","flattenIssue","issue","unionErrors","flattenIssuePath","formatIssueMessage","zodError","errorKeyMap","iss","issues","issuePath","errorKeys","rootExpectedType","expected","applyZodErrorsToEvent","saveZodIssuesAsAttachment","flattenedIssues","zodErrorsIntegration","_zodErrorsIntegration","DEFAULT_ATTRIBUTES","consoleLoggingIntegration","_consoleLoggingIntegration","assertionMessage","isLevelLog","severityNumber","createLogContainerEnvelopeItem","inferUserData","inferSetting","item_count","content_type","ingest_settings","infer_user_agent","logs","setLogAttribute","logAttributes","setEvenIfPresent","_INTERNAL_captureSerializedLog","serializedLog","bufferMap","_getBufferMap","logBuffer","_INTERNAL_getLogBuffer","maybeLogBuffer","createLogEnvelope","sanitizeLogAttributes","sanitized","sanitizedKey","_removeLoneSurrogates","strObj","isWellFormed","toWellFormed","beforeLog","captureSerializedLog","beforeSendLog","_getTraceInfoFromScope","processedLogAttributes","username","scopeAttributes","getRecordingMode","beforeLogMessage","param","_getSpanForScope","processedLog","sequenceAttr","getSequenceAttribute","severity_number","SEVERITY_TEXT_TO_SEVERITY_NUMBER","serializeAttributes","captureLog","safeJoinConsoleArgs","filenameMetadataMap","parsedStacks","getMetadataForUrl","parser","filenameMap","createMetricContainerEnvelopeItem","setMetricAttribute","_INTERNAL_captureSerializedMetric","serializedMetric","metricBuffer","_INTERNAL_getMetricBuffer","maybeMetricBuffer","createMetricEnvelope","beforeMetric","captureSerializedMetric","beforeSendMetric","enrichedMetric","processedMetricAttributes","beforeSendCallback","processedMetric","captureMetric","_INTERNAL_captureMetric","captureCheckIn","upsertMonitorConfig","monitorSlug","runCallback","checkInId","finishCheckIn","isolateTrace","startNewTrace","isContinuingTrace","isProfilingIntegrationWithProfiler","_notifyingListeners","_scopeListeners","_breadcrumbs","_attachments","_user","_tags","_extra","_contexts","_sdkProcessingMetadata","_propagationContext","newScope","flags","_level","_session","_transactionName","_fingerprint","_lastEventId","_conversationId","spanOnScope","_notifyScopeListeners","newAttributes","setFingerprint","setLevel","scopeToMerge","scopeInstance","maxCrumbs","getLastBreadcrumb","clearBreadcrumbs","addAttachment","clearAttachments","eventProcessors","setCurrentClient","clientClass","enable","initialScope","ServerRuntimeClient","addUserAgentToTransportHeaders","_disposeCallbacks","_setUpMetricsProcessing","setCurrentRequestSessionErroredOrCrashed","monitorConfig","serializedCheckIn","check_in_id","monitor_slug","monitor_config","checkin_margin","checkinMargin","max_runtime","maxRuntime","failure_issue_threshold","failureIssueThreshold","recovery_threshold","recoveryThreshold","createCheckInEnvelope","hookName","serverName","server_name","eventHint","isHandledException","did","abnormal_mechanism","sid","startingTime","user_agent","INTERNAL","CLIENT","PRODUCER","CONSUMER","SPAN_KIND_NAME","isContentMedia","part","hasInlineData","image_url","hasNestedImageUrl","hasInputAudio","hasFileData","media_type","mediaType","image","inlineData","input_audio","file","file_data","REMOVED_STRING","MEDIA_FIELDS","stripInlineMediaFromSingleMessage","strip","DEFAULT_GEN_AI_MESSAGES_BYTE_LIMIT","utf8Bytes","TextEncoder","encode","jsonBytes","truncateTextByBytes","maxBytes","low","high","bestFit","mid","candidate","getItemText","withItemText","isContentArrayMessage","isPartsMessage","stripInlineMediaFromMessages","newMessage","truncateMessagesByBytes","effectiveMaxBytes","stripped","strippedMessage","truncated","emptyMessage","availableForContent","truncatedContent","emptyItems","remainingBytes","includedItems","textSize","truncateSingleMessage","currentPath","GEN_AI_RESPONSE_STREAMING_ATTRIBUTE","responseId","GEN_AI_RESPONSE_ID_ATTRIBUTE","responseModel","GEN_AI_RESPONSE_MODEL_ATTRIBUTE","promptTokens","genAiAttributes","GEN_AI_USAGE_INPUT_TOKENS_ATTRIBUTE","completionTokens","GEN_AI_USAGE_OUTPUT_TOKENS_ATTRIBUTE","totalTokens","GEN_AI_USAGE_TOTAL_TOKENS_ATTRIBUTE","cacheCreationInputTokens","cacheReadInputTokens","finishReasons","GEN_AI_RESPONSE_FINISH_REASONS_ATTRIBUTE","responseTexts","GEN_AI_RESPONSE_TEXT_ATTRIBUTE","toolCalls","GEN_AI_RESPONSE_TOOL_CALLS_ATTRIBUTE","systemInstructions","filteredMessages","systemMessageIndex","findIndex","systemMessage","systemContent","truncateGenAiStringInput","truncateGenAiMessages","cachedInputTokens","cachedOutputTokens","enableTruncation","streamGenAiSpans","originalPromiseLike","instrumentedPromise","toStringTag","originalWithResponse","instrumentedResult","originalWrapper","streaming","suppressDelegatedCreate","INSTRUMENTED_METHODS","extractRequestAttributes","methodPath","GEN_AI_SYSTEM_ATTRIBUTE","GEN_AI_OPERATION_NAME_ATTRIBUTE","tools","GEN_AI_REQUEST_AVAILABLE_TOOLS_ATTRIBUTE","GEN_AI_REQUEST_MODEL_ATTRIBUTE","GEN_AI_REQUEST_TEMPERATURE_ATTRIBUTE","temperature","GEN_AI_REQUEST_TOP_P_ATTRIBUTE","top_p","GEN_AI_REQUEST_STREAM_ATTRIBUTE","GEN_AI_REQUEST_TOP_K_ATTRIBUTE","top_k","GEN_AI_REQUEST_FREQUENCY_PENALTY_ATTRIBUTE","frequency_penalty","GEN_AI_REQUEST_MAX_TOKENS_ATTRIBUTE","max_tokens","addPrivateRequestAttributes","messagesFromParams","setMessagesAttribute","GEN_AI_PROMPT_ATTRIBUTE","addResponseAttributes","handleResponseError","completion","input_tokens","usage","setTokenUsageAttributes","output_tokens","cache_creation_input_tokens","cache_read_input_tokens","handleStreamingError","instrumentMethod","instrumentedMethod","invocationThis","isStreamingMethod","requestAttributes","isStreamRequested","originalResult","shouldEnableTruncation","instrumentAsyncIterableStream","wrapPromiseWithMethods","messageStream","instrumentMessageStream","anthropicAiClient","ANTHROPIC_METHOD_REGISTRY","segment","resolveAIRecordingOptions","utils$1","mapAnthropicErrorToStatusMessage","stop_reason","content_block","activeToolBlocks","inputJsonParts","partial_json","parsedInput","__unparsed","endStreamSpan","ANTHROPIC_ERROR_TYPE_TO_SPAN_STATUS","invalid_request_error","authentication_error","permission_error","not_found_error","request_too_large","rate_limit_error","api_error","overloaded_error","system","systemMessages","inputParamMessages","messagesParamMessages","extractSystemInstructions","GEN_AI_SYSTEM_INSTRUCTIONS_ATTRIBUTE","filteredLength","GEN_AI_INPUT_MESSAGES_ATTRIBUTE","getTruncatedJsonString","GEN_AI_INPUT_MESSAGES_ORIGINAL_LENGTH_ATTRIBUTE","ADD_LISTENER_METHODS","REMOVE_LISTENER_METHODS","SCOPE_BOUND_LISTENERS","registeringWrapper","isBoundListener","patchAddListener","ee","getPatchMap","createPatchMap","listeners","boundListener","previous","patchRemoveListener","emitter","removeAllListeners","CAPTURED_SPANS","isSpanAlreadyCaptured","markSpanCaptured","CLIENT_QUEUES","deferredSegmentSpanCaptureStrategy","onSegmentSpanEnded","convert","enqueue","onSpanCaptured","onChildSpanEnded","captureOrphan","getSegmentSpanCaptureStrategy","setSegmentSpanCaptureStrategy","pendingCaptures","debouncedDrain","debounce","captures","maxWait","FROZEN_DSC_FIELD","getDynamicSamplingContextFromClient","org_id","extractOrgIdFromClient","rootSpanAttributes","traceState","rootSpanSampleRate","applyLocalSampleRateToDsc","frozenDsc","isNonRecordingRoot","spanIsNonRecordingSpan","isIgnoredRoot","dropReason","capturedScope","getCapturedScopesOnSpan","traceStateDsc","dscOnTraceState","baggageHeaderToDynamicSamplingContext","sample_rand","spanWithMaybeDsc","dynamicSamplingContextToSentryBaggageHeader","errorsInstrumented","errorCallback","proxyResultPath","extractModel","contextObj","modelVersion","GOOGLE_GENAI_SYSTEM_NAME","topP","topK","maxOutputTokens","frequencyPenalty","presencePenalty","GEN_AI_REQUEST_PRESENCE_PENALTY_ATTRIBUTE","functionDeclarations","flatMap","contents","GEN_AI_EMBEDDINGS_INPUT_ATTRIBUTE","systemInstruction","contentUnionToMessages","usageMetadata","promptTokenCount","candidatesTokenCount","totalTokenCount","candidates","functionCalls","createDeepProxy","buildMethodPath","GOOGLE_GENAI_METHOD_REGISTRY","wrappedMethod","isEmbeddings","instrumentStream","handleCallbackErrors","processChunk","promptFeedback","blockReason","blockReasonMessage","finishReason","functionCall","content2","activities","_idleTimeoutID","_childSpanTimeoutID","_finished","_finishReason","_autoFinishAllowed","_cleanupHooks","setCapturedScopesOnSpan","previousActiveSpan","_cancelIdleTimeout","_cancelChildSpanTimeout","_restartIdleTimeout","_restartChildSpanTimeout","onIdleSpanEnded","cleanup","spanJSON","currentStatus","childSpans","getSpanDescendants","discardedSpans","childSpanJSON","childEndTimestamp","childStartTimestamp","spanStartedBeforeIdleSpanEnd","spanEndedBeforeFinalTimeout","stringifiedSpan","removeChildSpanFromSpan","definedEndTimestamp","spanEndTimestamp","spanTimeInputToSeconds","latestSpanEndTimestamp","currentSpanJson","spanStartTimestamp","startedSpan","sentrySpan","SentrySpan","isStandaloneSpan","endedSpan","spanToAllowAutoFinish","human","ai","assistant","_INTERNAL_getLangChainEmbeddingsSpanOptions","embeddingsInstance","LANGCHAIN_ORIGIN","GEN_AI_EMBEDDINGS_OPERATION_ATTRIBUTE","GEN_AI_REQUEST_DIMENSIONS_ATTRIBUTE","dimensions","GEN_AI_REQUEST_ENCODING_FORMAT_ATTRIBUTE","encodingFormat","instrumentEmbeddingMethod","embedQuery","embedDocuments","exitSpan","runId","lc_serializable","lc_namespace","lc_secrets","lc_attributes","lc_aliases","lc_serializable_keys","lc_id","lc_kwargs","ignoreLLM","ignoreChain","ignoreAgent","ignoreRetriever","ignoreCustomEvent","raiseError","awaitHandlers","handleLLMStart","llm","prompts","_parentRunId","_extraParams","_runName","invocationParams","getInvocationParams","extractLLMRequestAttributes","getAgentNameFromMetadata","handleChatModelStart","extraParams","extractChatModelRequestAttributes","toolDefsJson","extractToolDefinitions","handleLLMEnd","extractLlmResponseAttributes","handleLLMError","handleChainStart","chain","_runType","runName","__sentry_langgraph__","chainName","handleChainEnd","handleChainError","handleToolStart","toolName","GEN_AI_TOOL_NAME_ATTRIBUTE","GEN_AI_TOOL_INPUT_ATTRIBUTE","handleToolEnd","GEN_AI_TOOL_OUTPUT_ATTRIBUTE","handleToolError","copy","toJSONNotImplemented","setIfDefined","setNumberIfDefined","normalizeContent","mediaStripping","normalizeMessageRole","ROLE_MAP","normalizeRoleNameFromCtor","normalizeLangChainMessages","maybeGetType","_getType","kwargs","messageType","extractCommonRequestAttributes","langSmithMetadata","ls_temperature","maxTokens","ls_max_tokens","presence_penalty","baseRequestAttributes","isSentryHandler","containsSentryHandler","sentryHandler","copied","langChainMessages","ls_provider","ls_model_name","llmResult","generations","generationInfo","finish_reason","generation_info","flatGenerations","gen","msgToolCalls","tool_calls","texts","llmOutput","tokenUsage","anthropicUsage","GEN_AI_USAGE_CACHE_CREATION_INPUT_TOKENS_ATTRIBUTE","GEN_AI_USAGE_CACHE_READ_INPUT_TOKENS_ATTRIBUTE","firstGeneration","v1Message","model_name","response_metadata","stopReason","GEN_AI_RESPONSE_STOP_REASON_ATTRIBUTE","invocation_params","toolDefs","agentName","lc_agent_name","GEN_AI_AGENT_NAME_ATTRIBUTE","_insideCreateReactAgent","SENTRY_PATCHED","_INTERNAL_getLangGraphCreateAgentSpanOptions","LANGGRAPH_ORIGIN","instrumentStateGraphCompile","originalCompile","createLangChainCallbackHandler","compiledGraph","compileOptions","originalInvoke","invoke","instrumentCompiledGraphInvoke","graphInstance","sentryCallbackHandler","GEN_AI_INVOKE_AGENT_OPERATION_ATTRIBUTE","graphName","GEN_AI_PIPELINE_NAME_ATTRIBUTE","threadId","invokeConfig","existingMetadata","_INTERNAL_mergeLangChainCallbackHandler","extractToolsFromCompiledGraph","inputMessages","normalizedMessages","setResponseAttributes","instrumentStateGraph","stateGraph","compile","instrumentLangGraph","originalCreateReactAgent","extractLLMFromParams","extractAgentNameFromParams","wrapToolsWithSpans","extractToolCalls","extractTokenUsageFromMessage","inputTokens","outputTokens","usage_metadata","total_tokens","extractModelMetadata","builder","nodes","runnable","resultObj","outputMessages","inputCount","newMessages","normalizedNewMessages","totalInputTokens","totalOutputTokens","tokens","SENTRY_WRAPPED","toolDescription","wrappedInvoke","GEN_AI_EXECUTE_TOOL_OPERATION_ATTRIBUTE","GEN_AI_TOOL_TYPE_ATTRIBUTE","callConfig","callAgentName","GEN_AI_TOOL_DESCRIPTION_ATTRIBUTE","GEN_AI_TOOL_CALL_ID_ATTRIBUTE","toolArgs","isRootSpan","infoParts","op2","description2","measurements","RESPONSES_TOOL_CALL_EVENT_TYPES","RESPONSE_EVENT_TYPES","availableTools","web_search_options","extractRequestParameters","addRequestAttributes","OPENAI_METHOD_REGISTRY","originalResult2","instrumentedPromise2","processChatCompletionToolCalls","toolCall","chatCompletionToolCalls","existingToolCall","processChatCompletionChunk","prompt_tokens","completion_tokens","choice","choices","processResponsesApiEvent","streamEvent","eventTypes","responsesApiToolCalls","output_text","isChatCompletionChunk","isResponsesApiStreamEvent","allToolCalls","calls","encoding_format","conversation","previous_response_id","samplingContext","localSampleRateWasApplied","tracesSampler","inheritOrSampleWith","fallbackSampleRate","tracesSampleRate","shouldSample","segmentSpanCaptureStrategy","NON_RECORDING_SPAN_FIELD","_traceId","_spanId","TRACE_FLAG_NONE","_timestamp","_value","_values","_status","_attributesOrStartTime","_startTime","_link","addLinks","_links","recordException","_exception","_time","_parentSpanId","_sampled","_endTime","_events","_isStandaloneSpan","isStandalone","_onSpanEnded","_frozen","TRACE_FLAG_SAMPLED","spanShouldInferOtelSource","markSpanSourceAsExplicit","timeInput","logSpanEnd","spanIsTracerProviderSpan","getSpanJSON","getStatusMessage","SEMANTIC_ATTRIBUTE_PROFILE_ID","exclusive_time","timedEventsToMeasurements","segment_id","convertSpanLinksForEnvelope","getStreamedSpanJSON","end_timestamp","getSimpleStatus","addStatusMessageAttribute","getStreamedSpanLinks","attributesOrStartTime","isSpanTimeInput","time$1","isSegmentSpan","spanItems","createSpanEnvelope","_convertSpanToTransaction","scope2","isFullFinishedSpan","descendant","SEMANTIC_ATTRIBUTE_SENTRY_CUSTOM_SPAN_NAME","hasGenAiSpans","spanToTransactionTraceContext","_streamed","originalAttributes","applyBeforeSendSpanCallback","INTERNAL_getSegmentSpan","serializedSegmentSpan","spanIsolationScope","spanScope","finalScopeData","SENTRY_TRACE_LIFECYCLE","SENTRY_SEGMENT_ID","SENTRY_SDK_NAME","SENTRY_SDK_VERSION","SEMANTIC_ATTRIBUTE_SENTRY_RELEASE","SEMANTIC_ATTRIBUTE_SENTRY_ENVIRONMENT","SEMANTIC_ATTRIBUTE_USER_ID","SEMANTIC_ATTRIBUTE_USER_EMAIL","SEMANTIC_ATTRIBUTE_USER_USERNAME","spanKind","segmentSpanJSON","scopeContextsToSpanAttributes","integrationNames","SEMANTIC_ATTRIBUTE_SENTRY_SDK_INTEGRATIONS","spanNameSource","streamedSpanJsonToSerializedSpan","_segmentSpan","dscHasRequiredProps","serializedSpans","spanContainer","estimateTypedAttributesSizeInBytes","firstLink","genAiSpans","remainingSpans","spanJsonToSerializedStreamedSpan","cloud_resource","angular","react","_traceBuckets","maxSpanLimit","maxTraceWeightInBytes","_maxSpanLimit","_maxTraceWeight","drain","estimateSerializedSpanSizeInBytes","_removeTrace","cleanedSpans","cleanSpanJSON","createStreamedSpanEnvelope","streamedSpan","spanStatus","_startInactiveSpanImpl","spanArguments","parseSentrySpanArguments","customParentSpan","getParentSpan","startMissingRequiredParentSpan","createChildOrRootSpan","getAcs","isTracingSuppressed","scopePropagationContext","addChildSpanToSpan","ignoredSpan","_isTracingSuppressed","_startRootSpan","freezeDscOnSpan","logSpanStart","initialCtx","mutableSpanSamplingData","decision","finalParentSampled","finalAttributes","sampling","sampleSpan","getActiveSpanWrapper","incomingDsc","shouldContinueTrace","customScope","customForkedScope","SCOPE_ON_START_SPAN_FIELD","ISOLATION_SCOPE_ON_START_SPAN_FIELD","OTEL_SOURCE_INFERENCE_SPAN_FIELD","OTEL_SOURCE_EXPLICITLY_SET_SPAN_FIELD","TRACER_PROVIDER_SPAN_FIELD","spanWithScopes","derefWeakRef","weakRef","makeWeakRef","toolCallSpanContextMap","toolDescriptionMap","SPAN_TO_OPERATION_NAME","onVercelAiSpanStart","AI_TOOL_CALL_NAME_ATTRIBUTE","vercelAiAttributes","AI_TOOL_CALL_ID_ATTRIBUTE","renameAttributeKey","toolCallId","AI_OPERATION_ID_ATTRIBUTE","_INTERNAL_skipAiProviderWrapping","constants$1","WORKERS_AI_INTEGRATION_NAME","nameWthoutAi","functionId","AI_TELEMETRY_FUNCTION_ID_ATTRIBUTE","requestMessagesFromPrompt","AI_MODEL_ID_ATTRIBUTE","modelId","AI_PROMPT_TOOLS_ATTRIBUTE","descriptions","toolStr","vercelAiEventProcessor","tokenAccumulator","processEndedVercelAiSpan","accumulateTokensForParent","applyToolDescriptionsAndTokens","applyAccumulatedTokens","normalizeFinishReason","processVercelAiSpanAttributes","AI_USAGE_COMPLETION_TOKENS_ATTRIBUTE","AI_USAGE_PROMPT_TOKENS_ATTRIBUTE","AI_USAGE_CACHED_INPUT_TOKENS_ATTRIBUTE","GEN_AI_USAGE_INPUT_TOKENS_CACHED_ATTRIBUTE","AI_USAGE_TOKENS_ATTRIBUTE","AI_USAGE_INPUT_TOKEN_DETAILS_ATTRIBUTE_PREFIX","convertAvailableToolsToJsonString","OPERATION_NAME_ATTRIBUTE","rawOperationName","AI_PROMPT_MESSAGES_ATTRIBUTE","AI_RESPONSE_TEXT_ATTRIBUTE","responseToolCalls","AI_RESPONSE_TOOL_CALLS_ATTRIBUTE","AI_RESPONSE_FINISH_REASON_ATTRIBUTE","outputMessage","GEN_AI_OUTPUT_MESSAGES_ATTRIBUTE","AI_RESPONSE_OBJECT_ATTRIBUTE","AI_TOOL_CALL_ARGS_ATTRIBUTE","AI_TOOL_CALL_RESULT_ATTRIBUTE","AI_SCHEMA_ATTRIBUTE","AI_VALUES_ATTRIBUTE","providerMetadata","AI_RESPONSE_PROVIDER_METADATA_ATTRIBUTE","lastStepOnly","derived","getProviderMetadataAttributes","LAST_STEP_ONLY_USAGE_KEYS","oldKey","newKey","CLIENTS_WITH_VERCEL_AI_PROCESSORS","openaiMetadata","openai","azure","setAttributeIfDefined","cachedPromptTokens","reasoningTokens","acceptedPredictionTokens","rejectedPredictionTokens","anthropic","cacheWriteInputTokens","GEN_AI_USAGE_INPUT_TOKENS_CACHE_WRITE_ATTRIBUTE","bedrock","deepseek","promptCacheHitTokens","promptCacheMissTokens","googleUsage","google","vertex","thoughtsTokenCount","spanOrTrace","accumulated","filterMessagesArray","convertUserInputToMessagesFormat","userInput","toolDescriptions","toolObjects","AI_PROMPT_ATTRIBUTE","originalMessagesJson","messagesJson","originalRun","_INTERNAL_shouldSkipAiProviderWrapping","runOptions","getOperationName","returnsRawResponse","returnRawResponse","websocket","handleError","pipeThrough","instrumentWorkersAiStream","accumulateStreamingToolCalls","accumulator","processLine","toolCallAccumulator","trimmed","reader","decoder","TextDecoder","finish","accumulatedToolCalls","setOutputMessagesAttribute","flushBuffer","isDone","lines","ReadableStream","pull","decode","GEN_AI_EMBEDDINGS_INPUT","GEN_AI_SYSTEM_INSTRUCTIONS","GEN_AI_INPUT_MESSAGES","GEN_AI_PROVIDER_NAME","WORKERS_AI_PROVIDER_NAME","GEN_AI_OPERATION_NAME","WORKERS_AI_ORIGIN","GEN_AI_REQUEST_MODEL","GEN_AI_REQUEST_TEMPERATURE","GEN_AI_REQUEST_MAX_TOKENS","GEN_AI_REQUEST_TOP_P","GEN_AI_REQUEST_TOP_K","GEN_AI_REQUEST_FREQUENCY_PENALTY","GEN_AI_REQUEST_PRESENCE_PENALTY","makeRequest","rateLimits","filteredEnvelopeItems","envelopeItemTypeToDataCategory","isRateLimited","filteredEnvelope","recordEnvelopeLoss","envelopeContainsItemType","requestTask","ratelimit","updateRateLimits","MULTIPLEXED_TRANSPORT_EXTRA_KEY","eventFromEnvelope","overrideDsn","matcher","fallbackTransport","otherTransports","actualMatcher","getEvent","validatedDsn","dsnFromString","transports","transportsWithFallback","allTransports","MIN_DELAY","START_DELAY","flushTimer","retryDelay","flushIn","delay","found","flushWithBackOff","isRetry","shouldSend","parseRetryAfterHeader","retryDelay2","shouldStore","flushAtStartup","sdkMetadata","sdkUserAgent","trpcCaptureContext","rawInput","getRawInput","trpcContext","procedure_path","procedure_type","setNormalizationDepthOverrideHint","attachRpcInput","httpBodies","rawRes","nextResult","aggregateExceptionsFromError","exceptionFromErrorImplementation","prevExceptions","exceptionId","newExceptions","applyExceptionGroupFieldsForParentException","newException","newExceptionId","applyExceptionGroupFieldsForChildException","isExceptionGroup","childError","is_exception_group","exception_id","SKIPPED_AI_PROVIDERS","modules","getModuleFromFilename","columnNumber","functionName","filenameIsInApp","createTimer","pollInterval","anrThreshold","timer","triggered","diffMs","getTimeMs","poll","parseBaggageHeader","curr","currBaggageObject","baggageHeaderToObject","eqIdx","keyOrValue","objectToBaggageHeader","objectKey","objectValue","newBaggageHeader","baggageObject","dscKey","dscValue","incoming","existingEntries","incomingEntries","hasNewSentryEntries","newSentryEntries","newNonSentryEntries","maxTraverseHeight","isActualPromise","kChainedCopy","onSuccess","chained","copyProps","mutated","discarded_events","clientReportItem","endIdx","variables","stackFrameVariables","deny","filteringSnippets","PII_HEADER_SNIPPETS","behavior","filterKeyValueData","SENSITIVE_COOKIE_NAME_SNIPPETS","FILTERED","FILTERED_VALUE","isSensitiveKey","lower","denySnippets","snippet","additionalDenyTerms","SENSITIVE_KEY_SNIPPETS","lowerTerms","isDenied","term","allow","isAllowed","DEFAULTS","defaultPiiToCollectionOptions","wait","callbackReturnValue","timerId","maxTimerId","setTimeoutImpl","invokeFunc","cancelTimers","debounced","parsedStackResults","lastSentryKeysCount","lastNativeKeysCount","cachedFilenameDebugIds","getFilenameToDebugIdMap","sentryDebugIdMap","nativeDebugIdMap","_debugIds","sentryDebugIdKeys","nativeDebugIdKeys","processDebugIds","debugIdKeys","debugIdMap","debugId","parsedStack","stackFrame","filenameDebugIdMap","normalizedPath","normalizeStackTracePath","debug_id","wrappedFuncs","wrappedLevels","_getLoggerSettings","_maybeLog","disable","ORG_ID_REGEX","DSN_REGEX","projectMatch","dsnFromComponents","components","extractOrgIdFromDsnHost","withPassword","orgId","__SENTRY_BROWSER_BUNDLE__","FALSY_ENV_VALUES","TRUTHY_ENV_VALUES","strict","envelopeItems","encodeUTF8","encodePolyfill","DATA_CATEGORY_OVERRIDES","client_report","user_report","profile_chunk","replay_event","replay_recording","check_in","raw_security","trace_metric","newItem","attachment_type","metadataOrEvent","readBinary","bin","readJson","decodePolyfill","envelopeHeader","itemHeader","binaryLength","envHeaders","itemHeaders","stringifiedPayload","buffers","buf","SentryError","logLevel","possibleMessages","lastException","_enhanceErrorWithSentryInfo","__sentry_fetch_url_host__","getException","exportName","wrappedConstructor","SPAN_FLAG_ATTRIBUTE_PREFIX","_INTERNAL_insertToFlagBuffer","maxSize","flag","maxFlagsPerSpan","flagContext","flagBuffer","scopeContexts","flushWithTimeout","cloudflareWaitUntil","cloudflareCtx","waitUntil","vercelWaitUntil","process","FUNCTIONS_WORKER_RUNTIME","LAMBDA_TASK_ROOT","K_SERVICE","CF_PAGES","VERCEL","NETLIFY","moduleExport","onFinally","maybeOptions","objWithMaybeUser","objectToString","isBuiltin","Event","__isVue","_isVue","__v_isVNode","isNodeEnv","checkDsn","urlParts","dsnHost","removeTrailingSlash","_maxSize","nextKey","initialObj","mergeObj","emptyUuid","getFirstException","SEMVER_REGEXP","_parseInt","isAlreadyCaptured","__sentry_captured__","maxLines","sourceLine","snipLine","lineIndex","post_context","newMechanism","currentMechanism","mergedData","buildmetadata","prerelease","gbl","withRandomSafeContext","isNative","getModule","FILENAME_MATCH","FULL_MATCH","DATA_URI_MATCH","lineMatch","typeName","methodStart","objectEnd","maybeDecodedFilename","decodeURI","_parseIntOrUndefined","dynamicRequire","isBrowserBundle","moduleName","existingModule","cwd","SENTRY_SKIP_NORMALIZATION","SENTRY_OVERRIDE_NORMALIZATION_DEPTH","stringifier","maxProperties","visit","ERROR","memo","inner","memoize","unmemoize","stringified","stringifyValue","hasSkipNormalizationHint","overrideDepth","getNormalizationDepthOverrideHint","remainingDepth","valueWithToJSON","numAdded","visitable","convertToPlainObject","visitKey","visitValue","encodeURI","basePath","escapedBase","newUrl","newStringifier","__sentry_original__","getOwnProperties","currentTarget","_dropUndefinedKeys","inputValue","memoizationMap","memoVal","returnValue","replacementFactory","objectified","parameterize","formatted","fmt","normalizeArray","allowAboveRoot","up","splitPathRe","splitPath","resolvedPath","resolvedAbsolute","normalizePath","isPathAbsolute","isAbsolute","trailingSlash","ext","dir","fromParts","toParts","samePartsLength","outputParts","applyClientOptions","dist","applyDebugIds","applyDebugMeta","getFinalScope","finalScope","captureContextKeys","clientEventProcessors","applyScopeDataToEvent","notifyEventProcessors","eventProcessors$1","maxBreadth","task","drainPromise","allSettled","promises","race","RESOLVED_RUNNER","sym","globalWithSymbol","headerDelay","headerDate","disabledUntil","limits","updatedRateLimits","rateLimitHeader","retryAfterHeader","retryAfter","categories","namespaces","MAX_BODY_BYTE_LENGTH","TEXT_CONTENT_TYPES","winterCGHeadersToDict","winterCGHeaders","reqHeaders","normalizeAttributeKey","parseCookieHeader","isSetCookie","semicolonIndex","equalSignIndex","cookieKey","cookieValue","extractQueryParamsFromUrl","lowerContentType","bodyPromise","timeoutPromise","bytes","resolvedDataCollection","headerBehavior","cookieBehavior","regularHeaders","lowerKey","headerKey","encrypted","absoluteUrl","mergeScopeData","mergeData","mergeAndOverwriteScopeData","mergeVal","spanToTraceContext","mergedBreadcrumbs","name2","logIgnoredSpan","droppedSpan","isStringOrRegExp","dropSpan","droppedSpanParentId","droppedSpanId","pattern","isMatchingPattern","nameMatches","opMatches","attrsMatch","valuePattern","_matchesAttributeValue","actual","pat","SCOPE_SPAN_FIELD","hasShownSpanDropWarning","restContext","ensureTimestampInSeconds","getTime","spanIsSentrySpan","spanIsOpenTelemetrySdkTraceBaseSpan","getOtelParentSpanId","parentSpanContext","castSpan","SEMANTIC_ATTRIBUTE_SENTRY_STATUS_MESSAGE","CHILD_SPANS_FIELD","ROOT_SPAN_FIELD","resultSet","addSpanChildren","generateSentryTraceHeader","generateTraceparentHeader","TABLE_NAME","DDL_RE","INSERT_RE","UPDATE_RE","DELETE_RE","SELECT_RE","PRAGMA_RE","TOKEN_RE","QUOTED_OR_PLAIN_TABLE_RE","COMMA_TABLE_RE","SUBQUERY_SELECT_RE","extractTableNames","tables","subqueryMatch","tableMatch","commaMatch","afterTable","summary","lastSpace","pragmaMatch","parenIdx","ddlMatch","insertMatch","subSelect","selectTables","updateMatch","deleteMatch","selectMatch","WEBPACK_ERROR_REGEXP","STRIP_FRAME_REGEXP","parsers","sortedParsers","skipFirstLines","cleanedLine","stripSentryFramesAndReverse","localStack","getLastStackFrame","defaultFunctionName","requireExactStringMatch","isRegExp","delimiter","newLine","lineLength","testString","patterns","supportsFetch","_isFetchSupported","DOMError","ErrorEvent","EdgeRuntime","SyncPromise","_state","_runExecutor","onfulfilled","onrejected","_executeHandlers","onfinally","cachedHandlers","setResult","_cachedTimestampInSeconds","cachedTimeOrigin","threshold","performanceNow","dateNow","navigationStart","timing","unref","_previousTimestampMs","_sequenceNumber","nowMs","isTwpPlaceholder","hasExternalPropagationContext","spanToTraceHeader","TRACEPARENT_REGEXP","spanToTraceparentHeader","NOT_PROPAGATED_MESSAGE","decisionMap","cachedDecision","extractTraceparentData","sampledString","traceparentData","parsedSampleRand","baggageOrgId","clientOrgId","strictTraceContinuation","allowedDsns","arrayBuffer","allowed","dsnComponents","sentryIngestUrl","password","getHttpSpanNameFromUrlObject","urlBase","isRelative","canParse","fullUrlObject","fragment","includeDataPrefix","isBase64","dataStart","dataPrefix","vercelRequestContextGlobal","deref","WeakRefImpl","WeakRef","regexString","lowerCaseHeaders","DOCUMENT","NAVIGATOR","TRIGGER_LABEL","ERROR_EMPTY_MESSAGE_TEXT","ERROR_NO_CLIENT_TEXT","ERROR_TIMEOUT_TEXT","ERROR_FORBIDDEN_TEXT","ERROR_GENERIC_TEXT","DEFAULT_MESSAGES","ERROR_EMPTY_MESSAGE","ERROR_NO_CLIENT","ERROR_TIMEOUT","ERROR_FORBIDDEN","ERROR_GENERIC","resolveFeedbackErrorMessage","createFeedbackError","sendFeedback","includeReplay","errorMessages","captureFeedback","mergeOptions","optionOverrides","onFormOpen","onFormClose","onSubmitSuccess","onSubmitError","onFormSubmitted","themeDark","themeLight","setAttributesNS","PURPLE","DEFAULT_LIGHT","foreground","accentForeground","accentBackground","successColor","errorColor","border","boxShadow","outline","interactiveFilter","DEFAULT_DARK","getThemedCssVariables","theme","createMainStyles","colorScheme","styleNonce","u$1","f$1","c$1","v$1","p$1","y$1","defaultProps","d$1","__k","__","__b","__e","__d","__c","__v","__i","__u","vnode","b$1","m$1","w$1","__P","__n","ownerSVGElement","k$1","x$1","C$1","__r","debounceRendering","j$1","P$1","g$1","T$1","setProperty","A$1","D$1","contextType","__E","q$1","__h","_sb","__s","getDerivedStateFromProps","componentWillMount","componentDidMount","componentWillReceiveProps","shouldComponentUpdate","componentWillUpdate","componentDidUpdate","getChildContext","getSnapshotBeforeUpdate","z$1","diffed","localName","__html","unmount","componentWillUnmount","getDerivedStateFromError","setState","componentDidCatch","__H","__V","__N","__m","cancelAnimationFrame","useDebugValue","SentryLogo","svg","viewBox","DialogHeader","logoHtml","useMemo","outerHTML","formTitle","showBranding","dangerouslySetInnerHTML","retrieveStringValue","Form","defaultEmail","defaultName","onSubmit","showEmail","showName","screenshotInput","addScreenshotButtonLabel","removeScreenshotButtonLabel","cancelButtonLabel","emailLabel","emailPlaceholder","isEmailRequired","isNameRequired","messageLabel","messagePlaceholder","nameLabel","namePlaceholder","submitButtonLabel","isRequiredLabel","isSubmitting","setIsSubmitting","useState","setError","showScreenshotInput","setShowScreenshotInput","ScreenshotInputComponent","screenshotError","setScreenshotError","onScreenshotError","useCallback","error2","hasAllRequiredFields","missingFields","emptyFields","handleSubmit","preventDefault","HTMLFormElement","disabled","LabelText","isRequired","placeholder","required","autoFocus","rows","onClick","SuccessIcon","clipPath","path2","speakerDefs","speakerClipPathDef","speakerRect","Dialog","successIconHtml","timeoutId","setTimeoutId","handleOnSuccessClick","successMessageText","stopPropagation","createScreenshotInputStyles","surface200","gray100","with2dContext","paintImage","maybeDest","destCanvas","destCtx","paintForeground","maybeCanvas","strokeColor","drawCommands","shadowColor","shadowBlur","ScreenshotEditorFactory","h2","hooks","outputBuffer","dialog","useTakeScreenshot","onBeforeScreenshot","onScreenshot","onAfterScreenshot","dpi","setDpi","useEffect","onChange","media","matchMedia","mediaDevices","getDisplayMedia","video","innerWidth","innerHeight","monitorTypeSurfaces","preferCurrentTab","selfBrowserSurface","surfaceSwitching","srcObject","onloadedmetadata","getTracks","Toolbar","action","setAction","highlightToolText","hideToolText","IconClose","editorStyleInnerText","dialogStyle","ScreenshotEditor","screenshot","setDrawCommands","measurementRef","useRef","backgroundRef","foregroundRef","mouseRef","scaleFactor","setScaleFactor","sentryFeedback","getElementById","computedStyle","getPropertyValue","useLayoutEffect","handleResize","measurementDiv","setCanvasSize","deleteRect","updatedRects","handleStopPropagation","nonce","onMouseDown","boundingRect","startingPoint","offsetX","offsetY","getDrawCommand","e2","clientX","clientY","handleMouseMove","handleMouseUp","drawCommand","removeHighlightText","onMouseUp","setScreenshot","screenshotVideo","videoWidth","videoHeight","feedbackIntegration","autoInject","enableScreenshot","useSentryUser","confirmButtonLabel","triggerLabel","triggerAriaLabel","errorEmptyMessageText","errorNoClientText","errorTimeoutText","errorForbiddenText","errorGenericText","_shadow","_mainStyle","_createShadow","_loadAndRenderDialog","screenshotRequired","maxTouchPoints","isSecureContext","modalIntegration","screenshotIntegration","screenshotIntegrationFn","createDialog","wrappedSendFeedback","shadow","_attachTo","targetEl","handleClick","removeFromDom","appendToDom","_createActor","actor","ariaHidden","ariaLabel","attachTo","createWidget","createForm","setTheme","newStyle","replaceChild","prepend","userKey","currentUser","isolationUser","globalUser","originalOverflow","renderContent","createInput","blob","toBlob","__defProp","__publicField","__defNormalProp","distanceToMatch","matchPredicate","createMatchPredicate","eIndex","classList","DEPARTED_MIRROR_ACCESS_WARNING","_mirror","getId","getNode","removeNodeFromMap","hookSetter","isRevoked","__rrweb_original__","isBlocked","blockClass","blockSelector","unblockSelector","checkAncestors","blockedPredicate","isUnblocked","blockDistance","unblockDistance","getImplementation","document2","onRequestAnimationFrame","CanvasContext","CanvasContext2","WebGL","WebGL2","errorHandler","callbackWrapper","rrwebWrapped","canvasVarMap","saveWebGLVar","isInstanceOfWebGLObject","contextMap","serializeArg","Float64Array","Int32Array","Uint32Array","Uint16Array","Int8Array","rr_type","ArrayBuffer","base64","arraybuffer","i2","DataView","byteOffset","HTMLImageElement","HTMLCanvasElement","toDataURL","ImageData","serializeArgs","supportedWebGLConstructorNames","initCanvasContextObserver","setPreserveDrawingBufferToTrue","restoreHandler","ctxName","__context","contextAttributes","preserveDrawingBuffer","patchGLPrototype","blockClass2","_mirror2","recordArgs","hookHandler","CanvasManager","pendingCanvasMutations","rafStamps","latestId","invokeId","shadowDoms","windowsSet","restoreHandlers","frozen","locked","snapshotInProgressMap","lastSnapshotTime","processMutation","enableManualSnapshot","recordCanvas","errorHandler2","mutationCb","mirror","initFPSWorker","addWindow","startRAFTimestamping","startPendingCanvasMutationFlusher","initCanvasFPSObserver","terminate","unlock","initCanvasMutationObserver","canvasContextReset","addShadowRoot","resetShadowRoots","canvasElement","skipRequestAnimationFrame","takeSnapshot","commands","rafId","rafCallback","canvas2DReset","props2D","CanvasRenderingContext2D","canvasWebGL1and2Reset","WebGLRenderingContext","WebGL2RenderingContext","getCanvasElements","matchedCanvas","searchCanvas","window2","_document","isManualSnapshot","dataURLOptions","maxCanvasSize","timeBetweenSnapshots","hasNode","getContextAttributes","COLOR_BUFFER_BIT","createImageBitmap","bitmap","flushPendingCanvasMutations","setLatestRAFTimestamp","flushPendingCanvasMutationFor","valuesWithType","cleanFrame","getMeta","idNodeMap","getIds","nodeMetaMap","childNode","oldNode","NotStarted","Running","CANVAS_QUALITY","quality","medium","DEFAULT_MAX_CANVAS_SIZE","_replayCanvasIntegration","maxCanvasWidth","maxCanvasHeight","_canvasOptions","currentCanvasManager","canvasManagerResolve","_canvasManager","getCanvasManager","getCanvasManagerOptions","__rrweb__","REPLAY_SESSION_KEY","UNABLE_TO_SEND_REPLAY","NETWORK_BODY_MAX_SIZE","CONSOLE_ARG_MAX_SIZE","REPLAY_MAX_EVENT_BUFFER_SIZE","NodeType","NodeType2","DocumentType","Text","CDATA","Comment","isNativeShadowDom","stringifyStylesheet","stringifyRule","importStringified","statement","layerName","supportsText","mediaText","needsSafariColonFix","selectorText","needsAllFix","styleDeclaration","isImportant","getPropertyPriority","Mirror","shouldMaskInput","maskInputOptions","maskInputValue","maskInputFn","repeat","ORIGINAL_ATTRIBUTE_NAME","getInputType","hasAttribute","getInputValue","extractFileExtension","cachedImplementations$1","getImplementation$1","setTimeout$1","clearTimeout$1","getIFrameContentDocument","iframe","contentDocument","tagNameRegex","genId","canvasService","canvasCtx","URL_IN_CSS_REF","URL_PROTOCOL_MATCH","URL_WWW_MATCH","DATA_URI","absoluteToStylesheet","quote1","path1","quote2","path3","filePath","maybeQuote","SRCSET_NOT_SPACES","SRCSET_COMMAS_OR_SPACES","cachedDocument","absoluteToDoc","getHref","customHref","transformAttribute","maskAttributeFn","ignoreCSSAttributes","collectCharacters","regEx","chars2","descriptorsStr","inParens","processedStyle","ignoredProperties","filteredProperties","colonIndex","ignoreAttribute","needMaskingText","maskTextClass","maskTextSelector","unmaskTextClass","unmaskTextSelector","maskAllText","autocomplete","maskDistance","unmaskDistance","lowerIfExists","maybeAttr","serializeNodeWithId","skipChild","inlineStylesheet","maskTextFn","slimDOMOptions","inlineImages","onSerialize","onIframeLoad","iframeLoadTimeout","onBlockedImageLoad","onStylesheetLoad","stylesheetLoadTimeout","keepIframeSrcFn","newlyAddedElement","preserveWhiteSpace","_serializedNode","rootId","docId","DOCUMENT_NODE","compatMode","DOCUMENT_TYPE_NODE","publicId","systemId","needBlock","processedTagName","attributes2","stylesheet","styleSheets","crossorigin","_cssText","sheet","checked","forceMask","selected","select","getImageData","originalGetImageData","pixel","rr_dataURL","canvasDataURL","blankCanvas","imageSrc","currentSrc","priorCrossOrigin","recordInlineImage","rr_mediaState","paused","rr_mediaCurrentTime","rr_scrollLeft","rr_scrollTop","rr_width","rr_height","isCustomElement","rr_src","isSVG","isCustom","TEXT_NODE","parentTagName","isStyle","isScript","isTextarea","previousSibling","textarea","CDATA_SECTION_NODE","COMMENT_NODE","sn","comment","headFavicon","headMetaDescKeywords","headMetaSocial","headMetaRobots","headMetaHttpEquiv","headMetaAuthorship","headMetaVerification","serializedNode2","recordChild","isShadowHost","NodeType$1","headWhitespace","bypassOptions","childN","serializedChildNode","isShadow","iframeEl","fired","blankUrl","iframeDoc","serializedIframeNode","updateImageDimensions","styleSheetLoadTimeout","styleSheetLoaded","serializedLinkNode","throttle","leading","remaining","trailing","nowTimestamp","scrollingElement","getWindowHeight","getWindowWidth","closestElementOfNode","isIgnored","isAncestorRemoved","legacy_isTouchEvent","changedTouches","isSerializedIframe","isSerializedStylesheet","hasShadowRoot","StyleSheetMirror","styleIDMap","idStyleMap","getStyle","generateId","getShadowHost","shadowHost","DOCUMENT_FRAGMENT_NODE","inDom","rootShadowHost","EventType","EventType2","DomContentLoaded","FullSnapshot","IncrementalSnapshot","Meta","Custom","Plugin","IncrementalSource","IncrementalSource2","Mutation","MouseMove","MouseInteraction","Scroll","ViewportResize","Input","TouchMove","MediaInteraction","StyleSheetRule","CanvasMutation","Font","Log","Drag","StyleDeclaration","Selection","AdoptedStyleSheet","CustomElement","MouseInteractions","MouseInteractions2","MouseUp","MouseDown","Click","ContextMenu","DblClick","Focus","Blur","TouchStart","TouchMove_Departed","TouchEnd","TouchCancel","PointerTypes","PointerTypes2","Mouse","Pen","Touch","MediaInteractions","MediaInteractions2","Seeked","VolumeChange","RateChange","CanvasManagerNoop","getIFrameContentWindow","StyleDeclarationParser","unattachedDoc","styleText","parseWithConstructableStylesheet","parseWithDetachedElement","CSSRule","STYLE_RULE","getUnattachedDoc","implementation","createHTMLDocument","isNodeInLinkedList","n2","DoubleLinkedList","tail","addNode","__ln","removeNode","moveKey","MutationBuffer","mapRemoves","movedMap","addedSet","movedSet","droppedSet","processMutations","mutations","addedIds","addList","getNextId","ns","nextId","pushAdd","currentN","iframeManager","addIframe","stylesheetManager","trackLinkElement","shadowDomManager","childSn","attachIframe","canvasManager","observeAttachShadow","attachLinkElement","_imageEl","serializedNode","isParentRemoved","isAncestorInSet","tailNode","_node","unhandledNode","diffAsStr","styleDiff","unchangedAsStr","_unchangedStyles","oldValue","attributeName","isInputMasked","oldStyle","styleDeclarationParser","pname","newPriority","addedNodes","genAdds","removedNodes","nodeId","deepDelete","processedNodeManager","inOtherBuffer","targetId","isFrozen","addsSet","mirror2","r2","_isAncestorInSet","mutationBuffers","getEventTarget","composedPath","initMutationObserver","rootEl","mutationBuffer","mutationObserverCtor","MutationObserver","__rrMutationObserver","angularZoneSymbol","Zone","__symbol__","onMutation","attributeOldValue","characterData","characterDataOldValue","childList","subtree","initScrollObserver","scrollCb","scrollLeftTop","INPUT_TAGS","lastInputValueMap","initInputObserver","inputCb","ignoreClass","ignoreSelector","userTriggeredOnInput","eventHandler","userTriggered","isChecked","cbWithDedup","el2","text2","v2","lastInputValue","currentWindow","propertyDescriptor","HTMLInputElement","hookProperties","HTMLSelectElement","HTMLTextAreaElement","HTMLOptionElement","getNestedCSSRulePositions","childRule","hasNestedCSSRule","parentRule","CSSGroupingRule","CSSMediaRule","CSSSupportsRule","CSSConditionRule","parentStyleSheet","getIdAndStyleId","styleMirror","styleId","ownerNode","initAdoptedStyleSheetObserver","hostId","patchTarget","originalPropertyDescriptor","sheets","adoptStyleSheets","initObservers","o2","mutationObserver","recordDOM","mousemoveHandler","mousemoveCb","mousemove","callbackThreshold","mousemoveCallback","timeBaseline","positions","wrappedCb","totalOffset","timeOffset","updatePosition","DragEvent","MouseEvent","mouseInteractionHandler","mouseInteractionCb","mouseInteraction","disableMap","currentPointerType","eventKey","pointerType","thisEventKey","PointerEvent","scrollHandler","viewportResizeHandler","viewportResizeCb","lastH","lastW","inputHandler","mediaInteractionHandler","mediaInteractionCb","muted","playbackRate","styleSheetObserver","adoptedStyleSheetObserver","styleDeclarationObserver","fontObserver","styleSheetRuleCb","insertRule","deleteRule","supportedNestedCSSRuleTypes","canMonkeyPatchNestedCSSRule","unmodifiedFunctions","styleDeclarationCb","CSSStyleDeclaration","removeProperty","collectFonts","fontCb","fontMap","originalFontFace","FontFace","family","descriptors","fontFace","fontSource","selectionObserver","selectionCb","collapsed","updateSelection","selection","getSelection","isCollapsed","ranges","rangeCount","getRangeAt","startContainer","startOffset","endContainer","endOffset","customElementObserver","customElementCb","pluginHandlers","plugin","CrossOriginIframeMirror","generateIdFn","iframeIdToRemoteIdMap","iframeRemoteIdToIdMap","remoteId","idToRemoteMap","remoteToIdMap","idToRemoteIdMap","getIdToRemoteIdMap","remoteIdToIdMap","getRemoteIdToIdMap","getRemoteId","getRemoteIds","IframeManagerNoop","crossOriginIframeMirror","crossOriginIframeRootIdMap","addLoadListener","IframeManager","iframes","crossOriginIframeMap","wrappedEmit","recordCrossOriginIframes","crossOriginIframeStyleMirror","handleMessage","loadListener","isAttachIframe","crossOriginMessageEvent","transformedEvent","transformCrossOriginEvent","isCheckout","replaceIdOnNode","patchRootIdOnNode","replaceIds","replaceStyleIds","iframeMirror","NodeType$2","ShadowDomManagerNoop","ShadowDomManager","patchAttachShadow","iframeElement","iframeWindow","StylesheetManager","trackedLinkElements","adoptedStyleSheetCb","linkEl","trackStylesheetInLinkElement","adoptedStyleSheetData","styleIds","_linkEl","ProcessedNodeManager","nodeMap","thisBuffer","_takeFullSnapshot","checkoutEveryNms","checkoutEveryNth","maskAllInputs","_maskInputOptions","_slimDOMOptions","packFn","mousemoveWait","recordAfter","registerErrorHandler","inEmittingFrame","passEmitsToParent","month","tel","week","radio","checkbox","lastFullSnapshotEvent","NodeList","DOMTokenList","incrementalSnapshotCount","exceedCount","exceedTime","takeFullSnapshot2","wrappedMutationEmit","wrappedScrollEmit","wrappedCanvasMutationEmit","a2","__RRWEB_EXCLUDE_IFRAME__","getMirror","nodeMirror","getCanvasManagerFn","__RRWEB_EXCLUDE_SHADOW_DOM__","slimDOM","initialOffset","canvasMutationCb","c2","timestampToMs","timestampToS","addBreadcrumbEvent","triggerUserActivity","checkAndHandleExpiredSession","addUpdate","throttledAddEvent","getClosestInteractive","closest","getClickTargetNode","getTargetNode","takeFullSnapshot","IncrementalMutationSources","ClickDetector","slowClickConfig","_addBreadcrumbEvent","_lastMutation","_lastScroll","_clicks","_timeout","_threshold","_scrollTimeout","scrollTimeout","_replay","_ignoreSelector","addListeners","cleanupWindowOpen","nowInSeconds","originalWindowOpen","_teardown","removeListeners","_checkClickTimeout","SLOW_CLICK_TAGS","newClick","clickBreadcrumb","clickCount","_scheduleCheckClicks","registerMutation","registerScroll","registerClick","_handleMultiClick","_getClicks","_checkClicks","timedOutClicks","mutationAfter","scrollAfter","_generateBreadcrumbs","hadScroll","hadMutation","isSlowClick","timeAfterClickMs","endReason","getCurrentRoute","createBreadcrumb","ATTRIBUTES_TO_RECORD","getAttributesToRecord","getBaseDomBreadcrumb","node2","ENTRY_TYPES","decodedBodySize","encodedBodySize","responseStatus","transferSize","paint","domComplete","domContentLoadedEventStart","domContentLoadedEventEnd","domInteractive","loadEventStart","loadEventEnd","webVitalHandler","replayPerformanceEntries","createPerformanceEntry","getLargestContentfulPaint","lastEntry","getWebVital","isLayoutShift","getCumulativeLayoutShift","layoutShifts","nodeIds","getInteractionToNextPaint","attributions","PREFIX","_addBreadcrumb","_capture","_trace","infoTick","setConfig","captureExceptions","traceInternals","coreDebug","EventBufferSizeExceededError","WorkerDestroyedError","EventBufferArray","_totalSize","hasCheckout","waitForCheckout","hasEvents","eventSize","eventsRet","getEarliestTimestamp","ts","WorkerHandler","_onMessage","_worker","ensureReady","_ensureReadyPromise","_getAndIncrementId","EventBufferCompressionWorker","_earliestTimestamp","_sendEventToWorker","_finishRequest","EventBufferProxy","_fallback","_compression","_used","_ensureWorkerIsLoadedPromise","_ensureWorkerIsLoaded","ensureWorkerIsLoaded","_switchToCompressionWorker","addEventPromises","hasSessionStorage","isSampled","saveSession","lastActivity","segmentId","previousSessionId","dirty","createSession","sessionSampleRate","allowBuffering","stickySession","isExpired","initialTime","expiry","targetTime","shouldRefreshSession","sessionIdleExpire","maxReplayDuration","loadOrCreateSession","sessionOptions","existingSession","sessionStringFromStorage","sessionObj","addEventSync","shouldAddEvent","_addEvent","eventBuffer","isBufferMode","recordingMode","eventAfterPossibleCallback","beforeAddRecordingEvent","handleException","isExceeded","timestampInMs","timeouts","sessionIdlePause","initialTimestamp","addSegmentDetailsToContext","segmentName","replayContext","traceIds","segmentNames","isFeedbackEvent","isBreadcrumbWithCategory","resetReplayIdOnDynamicSamplingContext","setReplayIdOnDynamicSamplingContext","createPerformanceSpans","addNetworkBreadcrumb","getBodySize","textEncoder","formDataStr","parseContentLengthHeader","mergeWarning","newMeta","existingWarnings","makeNetworkReplayBreadcrumb","buildSkippedNetworkRequestOrResponse","bodySize","buildNetworkRequestOrResponse","normalizedBody","exceedsSizeLimit","isProbablyJson","getAllowedHeaders","allowedHeaders","filteredHeaders","urlMatches","urls","baseURI","fixedUrl","getAllHeaders","allHeaders","getHeadersFromOptions","addGlobalListeners","isClick","clickDetector","altKey","metaKey","ctrlKey","shiftKey","isTruncated","normalizedArgs","normalizedArg","networkDetailAllowUrls","networkDetailDenyUrls","networkCaptureBodies","networkRequestHeaders","networkResponseHeaders","reqSize","resSize","request_body_size","response_body_size","requestBodySize","responseBodySize","requestWarning","responseBody","responseWarning","captureDetails","bodyStr","bodyText","txt","handleNetworkBreadcrumbs","getSessionId","feedbackId","isErrorEventSampled","errorSampleRate","exceptionValue","errorIds","beforeErrorSampling","sendBufferedReplayOrFlush","lastActiveSpan","createMemoryEntry","memoryEntry","jsHeapSizeLimit","totalJSHeapSize","usedJSHeapSize","memory","getHandleRecordingEmit","hadFirstEvent","_isCheckout","setInitialState","shouldRecordCanvas","isRecordingCanvas","useCompressionOption","useCompression","blockAllMedia","networkDetailHasUrls","networkRequestHasHeaders","networkResponseHasHeaders","earliestEvent","TransportStatusCodeError","RateLimitError","ReplayDurationLimitError","sendReplay","replayData","retryConfig","interval","recordingData","eventContext","preparedRecordingData","payloadWithSequence","replayHeaders","sequence","baseEvent","replay_start_timestamp","error_ids","trace_ids","segment_names","replay_type","replayEvent","preparedEvent","_retryCount","THROTTLED","ReplayContainer","recordingOptions","_lastActivity","_isPaused","_requiresManualStart","_hasInitializedCoreListeners","initialUrl","_recordingOptions","_debouncedFlush","debounceCore","flushMinDelay","flushMaxDelay","_throttledAddEvent","counter","isThrottled","wasThrottled","slowClickTimeout","slowClickIgnoreSelectors","experiments","_handleVisibilityChange","_doChangeToForegroundTasks","_doChangeToBackgroundTasks","_handleWindowBlur","_handleWindowFocus","_handleKeyboardEvent","updateUserActivity","hasModifierKey","isCharacterKey","_canvas","initializeSampling","requiresManualStart","_initializeSessionForSampling","_initializeRecording","_updateUserActivity","startBuffering","startRecording","canvasOptions","_stopRecording","continuousCheckout","_onMutationHandler","stopRecording","forceFlush","_removeListeners","force","removeItem","_checkSession","continueRecording","flushImmediate","activityTime","hasStoppedRecording","_updateSessionActivity","_maybeSaveSession","cbResult","conditionalFlush","cancelFlush","onlyIfSampled","_clearContext","lastRootSpan","workerUrl","customWorkerUrl","__SENTRY_EXCLUDE_REPLAY_WORKER__","_addListeners","_refreshSession","_performanceCleanupCallback","addPerformanceEntry","onEntries","clearCallbacks","clearCallback","_createCustomBreadcrumb","_addPerformanceEntries","initialTimestampInSeconds","_updateInitialTimestampFromEventBuffer","_popEventContext","_runFlush","tooShort","minReplayDuration","tooLong","_flushInProgress","_flushLock","ignoreMutations","mutationLimit","overMutationLimit","mutationBreadcrumbLimit","getOption","selectors","defaultSelectors","MEDIA_SELECTORS","DEFAULT_NETWORK_HEADERS","ORIGINAL_BODY","_initialized","_isRequestInstrumented","Replay","MAX_REPLAY_DURATION","maskAttributes","unmask","block","unblock","maskFn","attachRawBodyFromRequest","privacyOptions","masksNamedAttribute","masksSubmitButtonValue","_initialOptions","_getMergedNetworkHeaders","_isInitialized","OriginalRequest","SentryRequest","_setup","_initialize","_maybeLoadFromReplayCanvasIntegration","finalOptions","initialOptions","opt","replaysSessionSampleRate","replaysOnErrorSampleRate","canvasIntegration","GlobalRef","UniversalCache","__warpDrive_universalCache","__version","GlobalSink","ModuleScopedCaches","__warpDrive_ModuleScopedCaches","__warpDrive_hasOtherCopy","RuntimeConfig","TRANSITION_END","toType","Util","getUID","getSelectorFromElement","hrefAttr","getTransitionDurationFromElement","transitionDuration","$__default","transitionDelay","floatTransitionDuration","floatTransitionDelay","reflow","triggerTransitionEnd","supportsTransitionEnd","typeCheckConfig","configTypes","expectedTypes","valueType","findShadowRoot","jQueryDetection","jquery","emulateTransitionEnd","_this","one","special","bindType","delegateType","handleObj","NAME","DATA_KEY","EVENT_KEY","DATA_KEY$a","JQUERY_NO_CONFLICT","NAME$a","EVENT_CLOSE","EVENT_KEY$a","EVENT_CLOSED","EVENT_CLICK_DATA_API","Alert","_element","_getRootElement","_triggerCloseEvent","isDefaultPrevented","_removeElement","_proto","removeData","closeEvent","removeClass","hasClass","_destroyElement","detach","_jQueryInterface","each","$element","_handleDismiss","alertInstance","EVENT_CLICK_DATA_API$6","Constructor","noConflict","JQUERY_NO_CONFLICT$a","DATA_KEY$9","DATA_API_KEY","NAME$9","CLASS_NAME_ACTIVE","EVENT_KEY$9","DATA_API_KEY$6","EVENT_FOCUS_BLUR_DATA_API","EVENT_LOAD_DATA_API","SELECTOR_DATA_TOGGLE_CARROT","SELECTOR_INPUT","SELECTOR_BUTTON","Button","shouldAvoidTriggerChange","toggle","triggerChangeEvent","addAriaPressed","CLASS_NAME_ACTIVE$3","activeElement","focus","toggleClass","avoidTriggerChange","EVENT_CLICK_DATA_API$5","button","initialButton","inputBtn","EVENT_LOAD_DATA_API$2","buttons","_button","JQUERY_NO_CONFLICT$9","DATA_KEY$8","NAME$8","DIRECTION_NEXT","DIRECTION_PREV","EVENT_SLIDE","EVENT_KEY$8","EVENT_SLID","EVENT_KEYDOWN","EVENT_MOUSEENTER","EVENT_MOUSELEAVE","EVENT_TOUCHSTART","EVENT_TOUCHMOVE","EVENT_TOUCHEND","EVENT_POINTERDOWN","EVENT_POINTERUP","EVENT_DRAG_START","DATA_API_KEY$5","SELECTOR_ACTIVE_ITEM","Default","keyboard","slide","touch","DefaultType","PointerType","TOUCH","PEN","Carousel","_items","_interval","_activeElement","_isSliding","touchTimeout","touchStartX","touchDeltaX","_config","_getConfig","_indicatorsElement","_touchSupported","_pointerEvent","MSPointerEvent","_addEventListeners","_slide","nextWhenVisible","cycle","_updateInterval","activeIndex","_getItemIndex","_extends","Default$7","DefaultType$7","_handleSwipe","absDeltax","_this2","_keydown","_addTouchEventListeners","_this3","touches","which","_getItemByDirection","isNextDirection","isPrevDirection","lastItemIndex","itemIndex","_triggerSlideEvent","relatedTarget","eventDirectionName","targetIndex","fromIndex","slideEvent","_setActiveIndicatorElement","indicators","CLASS_NAME_ACTIVE$2","nextIndicator","addClass","elementInterval","defaultInterval","directionalClassName","orderClassName","_this4","activeElementIndex","nextElement","nextElementIndex","isCycling","slidEvent","ride","_dataApiClickHandler","slideIndex","EVENT_CLICK_DATA_API$4","EVENT_LOAD_DATA_API$1","carousels","$carousel","JQUERY_NO_CONFLICT$8","DATA_KEY$7","NAME$7","CLASS_NAME_SHOW","CLASS_NAME_COLLAPSE","CLASS_NAME_COLLAPSING","CLASS_NAME_COLLAPSED","DIMENSION_WIDTH","EVENT_SHOW","EVENT_KEY$7","EVENT_SHOWN","EVENT_HIDE","EVENT_HIDDEN","SELECTOR_DATA_TOGGLE","Collapse","_isTransitioning","_triggerArray","toggleList","filterElement","foundElem","_selector","_parent","_getParent","_addAriaAndCollapsedClass","CLASS_NAME_SHOW$6","actives","activesData","startEvent","EVENT_SHOW$4","dimension","_getDimension","setTransitioning","scrollSize","EVENT_SHOWN$4","EVENT_HIDE$4","triggerArrayLength","EVENT_HIDDEN$4","isTransitioning","Default$6","DefaultType$6","_getTargetFromElement","triggerArray","isOpen","EVENT_CLICK_DATA_API$3","SELECTOR_DATA_TOGGLE$3","$trigger","$target","JQUERY_NO_CONFLICT$7","DATA_KEY$6","NAME$6","REGEXP_KEYDOWN","ARROW_UP_KEYCODE","CLASS_NAME_DISABLED","CLASS_NAME_MENURIGHT","EVENT_KEY$6","EVENT_CLICK","DATA_API_KEY$3","EVENT_KEYDOWN_DATA_API","EVENT_KEYUP_DATA_API","SELECTOR_MENU","popperConfig","Dropdown","_popper","_menu","_getMenuElement","_inNavbar","_detectNavbar","CLASS_NAME_DISABLED$1","isActive","CLASS_NAME_SHOW$5","_clearMenus","usePopper","showEvent","EVENT_SHOW$3","_getParentFromElement","Popper__default","referenceElement","_getPopperConfig","noop","EVENT_SHOWN$3","hideEvent","EVENT_HIDE$3","EVENT_HIDDEN$3","_getPlacement","$parentDropdown","_getOffset","boundariesElement","applyStyle","toggles","clickEvent","dropdownMenu","_dataApiKeydownHandler","SELECTOR_DATA_TOGGLE$2","Default$5","DefaultType$5","EVENT_CLICK_DATA_API$2","JQUERY_NO_CONFLICT$6","DATA_KEY$5","NAME$5","CLASS_NAME_OPEN","CLASS_NAME_FADE","CLASS_NAME_STATIC","EVENT_KEY$5","EVENT_HIDE_PREVENTED","EVENT_FOCUSIN","EVENT_RESIZE","EVENT_CLICK_DISMISS","EVENT_KEYDOWN_DISMISS","EVENT_MOUSEUP_DISMISS","EVENT_MOUSEDOWN_DISMISS","SELECTOR_FIXED_CONTENT","SELECTOR_STICKY_CONTENT","backdrop","Modal","_dialog","_backdrop","_isShown","_isBodyOverflowing","_ignoreBackdropClick","_scrollbarWidth","EVENT_SHOW$2","CLASS_NAME_FADE$4","_checkScrollbar","_setScrollbar","_adjustDialog","_setEscapeEvent","_setResizeEvent","EVENT_CLICK_DISMISS$1","_showBackdrop","_showElement","EVENT_HIDE$2","transition","CLASS_NAME_SHOW$4","_hideModal","htmlElement","handleUpdate","Default$4","DefaultType$4","_triggerBackdropTransition","hideEventPrevented","isModalOverflowing","modalTransitionDuration","modalBody","_enforceFocus","shownEvent","EVENT_SHOWN$2","transitionComplete","_this5","_this6","_this7","_this8","_resetAdjustments","_resetScrollbar","EVENT_HIDDEN$2","_removeBackdrop","_this9","animate","appendTo","backdropTransitionDuration","callbackRemove","_backdropTransitionDuration","paddingLeft","paddingRight","_getScrollbarWidth","_this10","fixedContent","stickyContent","actualPadding","calculatedPadding","actualMargin","marginRight","calculatedMargin","scrollDiv","scrollbarWidth","EVENT_CLICK_DATA_API$1","_this11","JQUERY_NO_CONFLICT$5","uriAttrs","SAFE_URL_PATTERN","DATA_URL_PATTERN","sanitizeHtml","unsafeHtml","whiteList","sanitizeFn","createdDocument","DOMParser","parseFromString","whitelistKeys","elName","attributeList","whitelistedAttributes","allowedAttributeList","nodeValue","regExp","attrRegex","DATA_KEY$4","NAME$4","CLASS_PREFIX","BSCLS_PREFIX_REGEX","CLASS_PREFIX$1","DISALLOWED_ATTRIBUTES","HOVER_STATE_SHOW","HOVER_STATE_OUT","TRIGGER_HOVER","TRIGGER_FOCUS","AttachmentMap","AUTO","TOP","RIGHT","BOTTOM","LEFT","fallbackPlacement","customClass","sanitize","area","br","em","hr","h1","h3","h4","h5","h6","li","ol","small","sup","strong","ul","HIDE","EVENT_KEY$4","HIDDEN","SHOW","SHOWN","INSERTED","CLICK","FOCUSIN","FOCUSOUT","MOUSEENTER","MOUSELEAVE","Tooltip","_hoverState","_activeTrigger","tip","_setListeners","toggleEnabled","dataKey","_getDelegateConfig","_isWithActiveTrigger","_enter","_leave","getTipElement","CLASS_NAME_SHOW$3","_hideModalHandler","isWithContent","isInTheDom","tipId","setContent","CLASS_NAME_FADE$3","_getAttachment","addAttachmentClass","_getContainer","_fixTransition","prevHoverState","_cleanTipClass","getTitle","setElementContent","empty","onCreate","originalPlacement","_handlePopperPlacementChange","onUpdate","eventIn","eventOut","_fixTitle","titleType","dataAttributes","dataAttr","$tip","tabClass","popperData","initConfigAnimation","Default$3","Event$1","DefaultType$3","JQUERY_NO_CONFLICT$4","DATA_KEY$3","NAME$3","EVENT_KEY$3","Popover","_Tooltip","_getContent","CLASS_NAME_FADE$2","Default$2","DefaultType$2","JQUERY_NO_CONFLICT$3","DATA_KEY$2","NAME$2","EVENT_ACTIVATE","EVENT_KEY$2","EVENT_SCROLL","METHOD_POSITION","SELECTOR_NAV_LIST_GROUP","SELECTOR_NAV_LINKS","SELECTOR_LIST_ITEMS","ScrollSpy","_scrollElement","_offsets","_targets","_activeTarget","_scrollHeight","refresh","autoMethod","offsetMethod","offsetBase","_getScrollTop","_getScrollHeight","targetSelector","targetBCR","Default$1","DefaultType$1","_getOffsetHeight","maxScroll","_activate","_clear","queries","$link","CLASS_NAME_ACTIVE$1","parents","SELECTOR_NAV_LIST_GROUP$1","scrollSpys","$spy","JQUERY_NO_CONFLICT$2","DATA_KEY$1","NAME$1","EVENT_KEY$1","SELECTOR_ACTIVE","SELECTOR_ACTIVE_UL","Tab","listElement","itemSelector","EVENT_HIDE$1","EVENT_SHOW$1","hiddenEvent","EVENT_HIDDEN$1","EVENT_SHOWN$1","CLASS_NAME_FADE$1","_transitionComplete","CLASS_NAME_SHOW$1","dropdownChild","dropdownElement","dropdownToggleList","$this","JQUERY_NO_CONFLICT$1","CLASS_NAME_HIDE","CLASS_NAME_SHOWING","autohide","Toast","_clearTimeout","_close","seal","construct","Func","_len2","_key2","arrayForEach","unapply","arrayLastIndexOf","arrayPop","arrayPush","arraySplice","arrayIsArray","stringToLowerCase","stringToString","stringMatch","stringReplace","stringIndexOf","stringTrim","numberToString","booleanToString","bigintToString","BigInt","symbolToString","objectHasOwnProperty","regExpTest","typeErrorCreate","_len4","_key4","_len3","_key3","addToSet","transformCaseFunc","lcElement","cleanArray","newObject","_slicedToArray","lookupGetter","html$1","svg$1","svgFilters","svgDisallowed","mathMl$1","mathMlDisallowed","mathMl","xml","MUSTACHE_EXPR","ERB_EXPR","TMPLIT_EXPR","DATA_ATTR","ARIA_ATTR","IS_ALLOWED_URI","IS_SCRIPT_OR_DATA","ATTR_WHITESPACE","DOCTYPE_NAME","CUSTOM_ELEMENT","ELEMENT_MARKUP_PROBE","COMMENT_MARKUP_PROBE","FALLBACK_TAG_CLOSE","SELF_CLOSING_TAG","LITERAL_TEXT_ELEMENT_NAMES","LITERAL_TEXT_ELEMENTS","LITERAL_TEXT_CLOSE","_resolveSetOption","cfg","_resolveObjectOption","makeFallback","purify","createDOMPurify","DOMPurify","isSupported","originalDocument","DocumentFragment","HTMLTemplateElement","NodeFilter","NamedNodeMap","MozNamedAttrMap","ElementPrototype","cloneNode","getNextSibling","getChildNodes","getShadowRoot","getAttributes","getNodeType","getOwnerDocument","_readNodeType","_readNodeName","trustedTypesPolicy","defaultTrustedTypesPolicy","emptyHTML","defaultTrustedTypesPolicyResolved","IN_TRUSTED_TYPES_POLICY","_assertNotInTrustedTypesPolicy","_createTrustedHTML","createNodeIterator","createDocumentFragment","afterSanitizeAttributes","afterSanitizeElements","afterSanitizeShadowDOM","beforeSanitizeAttributes","beforeSanitizeElements","beforeSanitizeShadowDOM","uponSanitizeAttribute","uponSanitizeElement","uponSanitizeShadowNode","MUSTACHE_EXPR$1","IS_ALLOWED_URI$1","ALLOWED_TAGS","DEFAULT_ALLOWED_TAGS","ALLOWED_ATTR","DEFAULT_ALLOWED_ATTR","CUSTOM_ELEMENT_HANDLING","tagNameCheck","attributeNameCheck","allowCustomizedBuiltInElements","FORBID_TAGS","FORBID_ATTR","EXTRA_ELEMENT_HANDLING","tagCheck","attributeCheck","ALLOW_ARIA_ATTR","ALLOW_DATA_ATTR","ALLOW_UNKNOWN_PROTOCOLS","ALLOW_SELF_CLOSE_IN_ATTR","SAFE_FOR_TEMPLATES","SAFE_FOR_XML","WHOLE_DOCUMENT","SET_CONFIG","SET_CONFIG_ALLOWED_TAGS","SET_CONFIG_ALLOWED_ATTR","FORCE_BODY","RETURN_DOM","RETURN_DOM_FRAGMENT","RETURN_TRUSTED_TYPE","SANITIZE_DOM","SANITIZE_NAMED_PROPS","SANITIZE_NAMED_PROPS_PREFIX","KEEP_CONTENT","IN_PLACE","USE_PROFILES","FORBID_CONTENTS","DEFAULT_FORBID_CONTENTS","DATA_URI_TAGS","DEFAULT_DATA_URI_TAGS","URI_SAFE_ATTRIBUTES","DEFAULT_URI_SAFE_ATTRIBUTES","MATHML_NAMESPACE","SVG_NAMESPACE","HTML_NAMESPACE","NAMESPACE","IS_EMPTY_INPUT","ALLOWED_NAMESPACES","DEFAULT_ALLOWED_NAMESPACES","DEFAULT_MATHML_TEXT_INTEGRATION_POINTS","MATHML_TEXT_INTEGRATION_POINTS","DEFAULT_HTML_INTEGRATION_POINTS","HTML_INTEGRATION_POINTS","COMMON_SVG_AND_HTML_ELEMENTS","PARSER_MEDIA_TYPE","SUPPORTED_PARSER_MEDIA_TYPES","CONFIG","formElement","isRegexOrFunction","testValue","_parseConfig","_unused","ALLOWED_URI_REGEXP","customElementHandling","TAGS","ATTRS","ADD_TAGS","ADD_ATTR","ADD_FORBID_CONTENTS","tbody","TRUSTED_TYPES_POLICY","createScriptURL","previousTrustedTypesPolicy","purifyHostElement","ATTR_NAME","policyName","scriptUrl","ALL_SVG_TAGS","ALL_MATHML_TAGS","_forceRemove","_stripAttributeNode","removeAttributeNode","_neutralizeRoot","_neutralizeSubtree","_removeAttribute","getAttributeNode","_stripDisallowedAttributes","_isPatchLinkageAttribute","lcName","lcTag","_initDocument","leadingWhitespace","dirtyPayload","createDocument","_createNodeIterator","SHOW_ELEMENT","SHOW_COMMENT","SHOW_TEXT","SHOW_PROCESSING_INSTRUCTION","SHOW_CDATA_SECTION","_stripTemplateExpressions","_scrubTemplateExpressions","_node$querySelectorAl","walker","templates","tmpl","_isDocumentFragment","_isClobbered","realTagName","namespaceURI","hasChildNodes","_isNode","_executeHooks","_matchesNameCheck","_forkSharedAllowlist","hookList","defaultSet","setConfigSet","_handleHookDetachedNode","_sanitizeElements","allowedTags","firstElementChild","_isBasicCustomElement","hoisted","_isValidAttribute","nameIsPermitted","ATTR_WHITESPACE$1","IS_SCRIPT_OR_DATA$1","RESERVED_CUSTOM_ELEMENT_NAMES","CUSTOM_ELEMENT$1","_applyTrustedTypesToAttribute","getAttributeType","_setAttributeValue","_sanitizeAttributes","hookEvent","attrValue","keepAttr","allowedAttributes","forceKeepAttr","initValue","_sanitizeShadowDOM","shadowNode","shadowIterator","innerSr","_sanitizeAttachedShadowRoots","rootName","importedNode","returnNode","valueAsRecord","valueToString","inPlace","nn","walkRoot","nodeIterator","shadowroot","shadowrootmode","serializedHTML","doctype","clearConfig","isValidAttribute","addHook","entryPoint","hookFunction","removeHook","removeHooks","removeAllHooks","esCompat","scrollLineHeight","getScrollDeltas","deltaX","deltaY","deltaMode","visibility","iframeDocument","getScrollLineHeight","calculateScrollDistribution","scrollInformation","scrollLeftMax","scrollTopMax","availableScroll","elementStyle","distributeScroll","scrollInfos","BasicDropdownContent","transitioningInClass","transitionedInClass","transitioningOutClass","isTouchDevice","dropdown","uniqueId","_contentWormhole","_animationClass","dropdownContentWormhole","actions","registerDropdownElement","triggerElement","getTriggerElement","handleRootMouseDown","hasMoved","touchMoveEvent","dropdownIsValidParent","dropdownId","rootEventType","repositionBound","touchStartHandlerBound","scrollableAncestors","nextScrollable","nextParent","addScrollHandling","removeGlobalEvents","removeScrollHandling","reposition","animationEnabled","waitForAnimations","animationClass","destinationElement","renderInPlace","shouldReposition","containsRelevantMutation","touchMoveHandler","touchStartHandler","destination","animationEnabledArg","positionStyles","htmlTag","touchMoveHandlerBound","preventScroll","wheelHandler","deltaXNegative","deltaXPositive","deltaYNegative","deltaYPositive","defaultPrevented","addScrollEvents","removeScrollEvents","nodeList","closestContent","animationName","animationPlayState","eventCallback","closestDropdown","parentDropdown","parentAttrId","_BasicDropdownContent","tracked","setComponentTemplate","createTemplateFactory","isStrictMode","BasicDropdownTrigger","disableDocumentTextSelect","_BasicDropdownTrigger","DropdownTriggerModifier","BasicDropdownWormhole","getDestinationId","getConfig","_BasicDropdownWormhole","IGNORED_STYLES","_hPosition","_vPosition","_top","_left","_right","_width","_height","_otherStyles","_renderInPlace","_isOpen","BasicDropdown","horizontalPosition","verticalPosition","_getDestinationId","publicAPI","_uid","_actions","guidFor","updatePublicApi","registerTriggerElement","onInit","registerAPI","onOpen","_getTriggerElement","_dropdownId","skipFocus","hPosition","vPosition","previousVerticalPosition","previousHorizontalPosition","tabIndex","_getDropdownElement","matchTriggerWidth","positionData","calculatePosition","applyReposition","_trigger","otherStyles","triggerComponent","contentComponent","_BasicDropdown","initiallyOpened","Modifier","handleMouseEvent","handleKeyDown","handleTouchStart","handleTouchEnd","_touchMoveHandler","registerDestructor","modify","positional","assert","desiredEventType","didSetup","_previousDisabled","handleMouseEventBound","handleKeyDownBound","handleTouchStartBound","handleTouchEndBound","_positional","notLeftClick","toggleIsBeingHandledByTouchEvents","keyCode","createEvent","initMouseEvent","_DropdownTriggerModifier","getViewData","scrollX","scrollY","triggerLeft","triggerTop","triggerWidth","triggerHeight","dropdownHeight","dropdownWidth","viewportWidth","viewportBottom","excludeStaticParent","overflowRegex","_destination","dropdownRect","triggerRect","viewportRight","anchorElement","anchorPosition","isBodyPositionRelative","triggerLeftWithScroll","leftVisible","rightVisible","triggerTopWithScroll","enoughRoomBelow","enoughRoomAbove","endEvent","moveEvent","touchType","horizontalDistance","pageX","verticalDistance","pageY","taskHelperClosure","helperName","taskMethod","_args","outerArgs","innerArgs","cancelHelper","cancelable","cancelAll","maybeReportError","performHelper","perform","_curry","Environment","reportUncaughtRejection","defer","deferable","globalDebuggingEnabled","EMBER_ENVIRONMENT","Ember","ENV","DEBUG_TASKS","cancelableSymbol","yieldableSymbol","YIELDABLE_CONTINUE","YIELDABLE_RETURN","YieldableState","taskInstance","resumeIndex","_taskInstance","_resumeIndex","getTaskInstance","proceed","Yieldable","onYield","_deferable","def","_toPromise","thinInstance","_index","resumeType","maybeDisposer","AnimationFrameYieldable","RawTimeoutYieldable","animationFrame","forever","rawTimeout","EmberYieldable","TimeoutYieldable","later","BoundedPolicy","maxConcurrency","TYPE_CANCELLED","TYPE_STARTED","STARTED","QUEUED","makeCancelState","CANCELLED","DropReducer","remainingSlots","step","DropPolicy","makeReducer","EnqueuedReducer","EnqueuedPolicy","KeepLatestReducer","numToCancel","KeepLatestPolicy","numRunning","numQueued","totalRunning","RestartableReducer","RestartablePolicy","taskFactorySymbol","propertyModifiers","restartable","setBufferPolicy","RestartableSchedulerPolicy","EnqueueSchedulerPolicy","DropSchedulerPolicy","keepLatest","KeepLatestSchedulerPolicy","setMaxConcurrency","taskGroupPath","setGroup","evented","setEvented","setDebug","onState","setOnState","TaskProperty","TaskGroupProperty","callSuperSetup","setName","_setupEmberKVO","addPerformEvents","cancelOn","addCancelEvents","observes","addObserverKeys","setDecorator","_setClassicDecorator","taskComputed","cp","LAST_APPLIED_TAGS","Refresh","schedulerPolicy","stateTracker","taskInstances","initialTaskInstances","startingInstances","filterFinishedTaskInstances","reducer","finalTaskInstances","setTaskInstanceExecutionState","computeFinalStates","applyState","taskState","stateFor","executorState","isFinished","onCompletion","hasStarted","desiredState","counted","onPerformed","onStart","onRunning","TYPE_QUEUED","onQueued","taskable","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","cancelRequest","cancelations","guids","cancelation","scheduleRefresh","SchedulerRefresh","SINGLETON_REDUCER","UnboundedPolicy","DEFAULT_STATE","performCount","TASK_CANCELATION_NAME","didCancel","CANCEL_KIND_EXPLICIT","CANCEL_KIND_LIFESPAN_END","CancelRequest","guidId","Taskable","enabledModifiers","hasEnabledEvents","modifierOptions","onStateCallback","scheduler","cancelRequestKind","resetState","_resetState","_isAlive","isRunning","isQueued","isIdle","GeneratorStepResult","GeneratorState","generatorFactory","resolvedValue","iteratorMethod","getIterator","INITIAL_STATE","COMPLETION_PENDING","isSuccessful","isCanceled","PERFORM_TYPE_DEFAULT","PERFORM_TYPE_UNLINKED","PERFORM_TYPE_LINKED","CANCEL_RETURN_VALUE_SENTINEL","TASK_INSTANCE_STACK","TaskInstanceExecutor","generatorState","disposers","finalizeCallbacks","proceedSync","onStarted","requestCancel","proceedWithCancelAsync","finalizeWithCancel","proceedChecked","yieldResumeType","advanceIndex","YIELDABLE_CANCEL","proceedAsync","handleResolvedReturnedValue","handleResolvedContinueValue","resumeValue","beforeIndex","stepResult","generatorStep","handleYieldedValue","YIELDABLE_THROW","handleYieldedUnknownThenable","thenable","yieldedValue","addDisposer","invokeYieldable","proceedWithSimpleValue","disposer","nextValue","_expectsLinkedYield","performType","maybeResolveDefer","runFinalizeCallbacks","maybeThrowUnhandledTaskErrorLater","asyncErrorsHandled","finalizeShared","cancelReason","formatCancelReason","debugEnabled","dispatchFinalizeEvents","onCancel","onYielded","getPerformType","detectSelfCancelLoop","parentCancelRequest","selfCancelLoopWarning","TaskLinkProxy","linkedObject","_performShared","Task","_perform","linked","unlinked","_clone","_curryArgs","fullArgs","_taskInstanceFactory","_taskInstanceOptions","_linkedObject","MODIFIER_REGISTRY","groupName","hasModifier","taskDefinition","UnboundedSchedulerPolicy","_processModifierOptions","createTask","getTaskOptions","createTaskGroup","TaskGroup","getScheduler","_onStateCallback","_taskGroupPath","_schedulerPolicyClass","_maxConcurrency","_hasEnabledEvents","_enabledModifiers","policy","_hasSetBufferPolicy","_hasSetConcurrencyConstraint","setTaskDefinition","taskFromPropertyDescriptor","factoryClass","TaskFactory$1","taskFn","displayName","tasks","taskGroupPropertyDescriptor","_descriptor","taskGroups","decoratorWithParams","descriptorFn","possibleDesc","createDecorator","baseOptions","TaskFactory","userOptions","createTaskDecorator","createTaskGroupDecorator","taskName","lastInstance","EmberScheduler","BaseTaskInstance","parentTaskInstance","isDropped","applyTracked","initial","propDesc","TRACKED_INITIAL_TASK_STATE","TRACKED_INITIAL_INSTANCE_STATE","INITIAL_TASK_STATE","INITIAL_INSTANCE_STATE","TaskInstance","_recomputeState","getName","parentName","childName","allArgs","eventNamespace","TASKABLE_MIXIN","_performCount","derivedState","Task$1","currentTaskInstanceSymbol","EncapsulatedTask","taskObj","_encapsulatedTaskStates","_encapsulatedTaskInstanceProxies","_getEncapsulatedTaskClass","encapsulatedTaskImplClass","_encapsulatedTaskImplClass","taskInstanceProxy","encapsulatedTaskImpl","_wrappedEncapsulatedTaskInstance","ownKeys","TaskGroup$1","handlerCounter","registerOnPrototype","addListenerOrObserver","makeTaskCallback","scheduleOnce","ensureArray","possibleArr","eventNames","propertyPaths","cancelEventNames","_cancelEventNames","_observes","_eventNames","lastValue$1","dropTask","enqueueTask","keepLatestTask","restartableTask","dropTaskGroup","enqueueTaskGroup","keepLatestTaskGroup","restartableTaskGroup","taskFnOrProtoOrDecoratorOptions","isDecoratorOptions","taskDecorator","taskProperty","possibleDecoratorOptions","taskGroupDecorator","possibleOptions","taskAwareVariantOf","RSVP","Promise$1","getValues","hashSettled","castForPromiseHelper","castable","getItems","awaitable","awaitables","arrOrHash","hasCancelled","WaitForQueueYieldable","queueName","WaitForEventYieldable","usesDOMEvents","WaitForPropertyYieldable","predicateCallback","observerBound","observerFn","waitForQueue","waitForEvent","waitForProperty","setupDeprecationWorkflow","deprecationWorkflow","deprecationLog","handleDeprecationWorkflow","deprecationCollector","flushDeprecations","matchesWorkflow","detectWorkflow","workflow","idMatcher","matchMessage","matchId","mergedConfig","matchingWorkflow","logCounts","throwOnUnhandled","FlashMessage","_FlashMessage_brand","_active","_pendingSet","_mouseEnterHandler","_mouseLeaveHandler","_mouseEnter","flash","preventExit","_mouseLeave","exiting","allowExit","destroyOnClick","_destroyFlashMessage","pendingSet","messageStyle","showProgress","notExiting","showProgressBar","exitingClass","messageStylePrefix","_defaultMessageStylePrefix","alertType","flashType","classNames","progressDuration","htmlSafe","destroyMessage","_FlashMessage","INTERNAL_KEYS","_exiting","_message","_isExitable","_initializedTime","_timerTask","_exitTask","_flashService","_FlashObject_brand","FlashObject","_guid","msgString","toHTML","extendedTimeout","sticky","preventDuplicates","_classPrivateFieldSet","flashService","onDidDestroyMessage","onDidExitMessage","shouldDisableTimeout","testHelperDisableTimeout","isTimeoutDisabled","_cancelAllTimers","_startTimer","_startExitTimer","exitMessage","_checkIfShouldExit","pauseTimer","resumeTimer","elapsed","isExitable","timerTaskInstance","queue","removeFromGuidSet","_FlashObject","DEFAULT_FLASH_MESSAGE_OPTIONS","_queue","_guidSet","_overridePreventDuplicates","_FlashMessagesService_brand","FlashMessagesService","Service","arrangedQueue","defaultTimeout","flashMessageDefaults","defaultExtendedTimeout","defaultPriority","defaultSticky","defaultShowProgress","defaultType","defaultTypes","defaultPreventDuplicates","_guids","registerTypes","clearMessages","flashInstance","_createFlashMessage","_registerType","peekFirst","peekLast","getFlashObject","removeBy","defaults","flashOptions","associateDestroyableChild","_FlashMessagesService","EmberEnvironment","getOnerror","CANCEL_KIND_YIELDABLE_CANCEL","CANCEL_KIND_PARENT_CANCEL","buildTask","contextFn","bufferPolicyName","optionsWithBufferPolicy","generator","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","dump","hydrate","_createCache","propertyNames","propertyValue","fieldType","__peek","committedIdentifier","existingId","newCanonicalAttributes","setupRelationships","changedKeys","calculateChangedKeys","patchLocalAttributes","notifyAttributes","removeFromRecordArray","defaultAttrs","relatedIdentifiers","originating","_directlyRelatedIdentifiersIterable","isSimplePath","attrSchema","schemaHasLegacyDefaultValueFn","getRemoteAttr","currentAttr","existingAttr","currentLocal","nextLink","dirtyKeys","changedRelationships","hasChangedRelationships","rollbackRelationships","getRemoteRelationship","allowDestroyed","getLocalState","hasLegacyDefaultValueFn","cacheIsEmpty","relationshipData","isRelationship","changedRemoteKeys","hasAppliedPatch","mutatedKeys","initializedRelationships","initializedRelationshipsArr","findNext","existed","_isLoading","isUpdate","Cache","isRecord","shouldNotify","toRemove","syncRelationshipDataFromLink","parentRelationship","parentType","parentRelationshipData","relData","relatedDataHash","parentPayload","PotentialLegacyOperations","LegacyNetworkHandler","maybeRecordArray","_findAll","recordArray","pendingRequest","fetches","saveOptions","errorsHash","PRIMARY_ATTRIBUTE_KEY","isAsyncFlush","_allowMissing","_adapterCache","_deprecatingNormalize","_serializerCache","inputPayload","adapterName","serializerName","ERROR_STATUS_CODE_FOR","Fetch","isRequestError","isMutationOp","toUTCString","overrides","isStreaming","TransformStream","writer","getWriter","readable","errorPayload","replaceAll","BaseStore","store_defineProperty","UNINITIALIZED","ElementHelper","Helper","compute","componentClass","EmberComponent","runInDebug","_loop_1","args_1","HOOKS","_disable","allowInput","allowInvalidPreload","altFormat","altInput","altInputClass","ariaDateFormat","autoFillDefaultTime","clickOpens","closeOnSelect","conjunction","dateFormat","defaultHour","defaultMinute","defaultSeconds","disableMobile","enableSeconds","enableTime","getWeek","givenDate","setHours","setDate","getDate","getDay","week1","getFullYear","hourIncrement","ignoredFocusElements","inline","minuteIncrement","monthSelectorType","nextArrow","noCalendar","onDayCreate","onKeyDown","onMonthChange","onParseConfig","onReady","onValueUpdate","onYearChange","onPreCalendarPosition","positionElement","prevArrow","shorthandCurrentMonth","showMonths","static","time_24hr","weekNumbers","english","weekdays","shorthand","longhand","months","daysInMonth","firstDayOfWeek","ordinal","nth","rangeSeparator","weekAbbreviation","scrollTitle","toggleTitle","amPM","yearAriaLabel","monthAriaLabel","hourAriaLabel","minuteAriaLabel","l10n_default","pad","int","bool","arrayify","clearNode","findParent","condition","createNumberInput","inputClassName","numInput","arrowUp","arrowDown","doNothing","monthToStr","monthNumber","revFormat","dateObj","monthName","setMonth","hour","getHours","day","shortMonth","seconds","unixSeconds","weekNum","weekNumber","year","setFullYear","ISODate","minutes","setMinutes","unixMillSeconds","tokenRegex","formats","getMonth","getSeconds","getMinutes","createDateFormatter","l10n","_d","isMobile","frmt","overrideLocale","formatDate","createDateParser","givenFormat","timeless","customLocale","parsedDate","dateOrig","datestr","parseDate","matchIndex","regexStr","isBackSlash","escaped","compareDates","date1","date2","calculateSecondsSinceMidnight","hours","getDefaultHours","minDate","minHour","minMinutes","minSeconds","maxDate","maxHr","maxMinutes","__assign","il","jl","FlatpickrInstance","instanceConfig","flatpickr","defaultConfig","English","getClosestActiveElement","calendarContainer","bindToInstance","setCalendarWidth","daysContainer","daysWidth","days","weekWrapper","updateTime","selectedDates","defaultDate","getMilliseconds","latestSelectedDateObj","isKeyDown","curValue","isHourElem","hourElement","isMinuteElem","minuteElement","incrementNumInput","_input","setHoursFromInputs","updateValue","_debouncedChange","secondElement","limitMinHours","minTime","minDateHasTime","limitMaxHours","maxTime","maxDateHasTime","minBound","maxBound","secondsSinceMidnight","setHoursFromDate","onYearInput","changeYear","triggerChange","jumpToDate","jumpDate","jumpTo","oldYear","currentYear","oldMonth","currentMonth","buildMonthSwitch","redraw","timeIncrement","inputElem","createDay","_dayNumber","dateIsEnabled","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","getDaysInMonth","isMultiMonth","prevMonthDayClass","nextMonthDayClass","dayNumber","dayIndex","dayNum","dayContainer","buildDays","frag","shouldBuildMonth","monthsDropdownContainer","buildMonth","monthElement","monthNavFragment","selectedMonth","yearInput","tabindex","yearElement","buildMonths","monthNav","prevMonthNav","yearElements","monthElements","nextMonthNav","buildWeekdays","weekdayContainer","updateWeekdays","isOffset","_hidePrevMonthArrow","_hideNextMonthArrow","updateNavigationCurrentMonth","isCalendarElem","documentClick","eventTarget_1","isCalendarElement","lostFocus","timeContainer","newYear","newYearNum","isNewYear","dateToCheck","onBlur","isInput","valueChanged","getDateStr","allowKeydown","allowInlineKeydown","blur","isTimeObj","focusAndClose","selectDate","delta_1","currentYearElement","elems","pluginElements","cellClass","hoverDate","initialDate","rangeStartDate","rangeEndDate","containsDisabled","minRange","maxRange","rContainer","dayElem","ts1","ts2","outOfRange","onResize","positionCalendar","minMaxDateSetter","inverseDateObj","getInputElem","setupLocale","l10ns","customPositionElement","_positionElement","calendarHeight","calendarWidth","configPos","configPosVertical","configPosHorizontal","inputBounds","distanceFromBottom","showOnTop","isCenter","isRight","rightMost","centerMost","editableSheet","bodyWidth","centerLeft","centerIndex","centerStyle","centerBefore","msMaxTouchPoints","selectedDate","shouldChangeMonth","selectedIndex","loadedPlugins","_bind","_setHoursFromDate","_positionCalendar","toInitial","mobileInput","_initialDate","_createElement","lastChild","_type","wasOpen","CALLBACKS","setSelectedDate","updatePositionElement","inputDate","dates","parseDateRules","initEvent","specificFormat","dObj","mobileFormatStr","onMonthNavClick","isPrevMonth","isNextMonth","boolOpts","userConfig","_enable","timeMode","defaultDateFormat","defaultAltFormat","_minDate","_maxDate","minMaxTimeSetter","_minTime","_maxTime","pluginConf","preloadedDate","yr","__hidePrevMonthArrow","__hideNextMonthArrow","innerContainer","hourInput","minuteInput","secondInput","customAppend","inputType","debouncedResize","ontouchstart","_flatpickr","instances","HTMLCollection","localize","setDefaults","fp_incr","esm","EmberFlatpickr","_applyDecoratedDescriptor","_class","onInsert","setupFlatpickr","onWillDestroy","flatpickrRef","_setFlatpickrOptions","waitForPromise","__webpack_require__","_setDisabled","onAltFormatUpdated","onAltInputClassUpdated","onDateUpdated","onDisabledUpdated","onLocaleUpdated","onMaxDateUpdated","onMinDateUpdated","TEMPLATE","candidateSelectors","candidateSelector","NoElement","msMatchesSelector","webkitMatchesSelector","_element$getRootNode","_isInert","lookUp","_node$getAttribute","inertAtt","getCandidates","includeContainer","isInert","_getCandidatesIteratively","elementsToCheck","assigned","nestedCandidates","scopeParent","validShadowRoot","shadowRootFilter","_nestedCandidates","hasTabIndex","getTabIndex","_node$getAttribute2","attValue","sortOrderedTabbables","documentOrder","isZeroArea","_node$getBoundingClie","isNodeMatchingSelectorFocusable","displayCheck","checkVisibility","checkOpacity","opacityProperty","contentVisibilityAuto","visibilityProperty","checkVisibilityCSS","nodeUnderDetails","originalNode","_nodeRoot","_nodeRootHost","_nodeRootHost$ownerDo","_node$ownerDocument","nodeRoot","nodeRootHost","attached","_nodeRoot2","_nodeRootHost2","_nodeRootHost2$ownerD","getClientRects","isNodeMatchingSelectorTabbable","radioSet","radioScope","form","queryRadios","CSS","escape","isShadowRootTabbable","shadowHostNode","_sortByOrder","regularTabbables","orderedTabbables","isScope","candidateTabindex","sortable","isTabbable","focusableCandidateSelector","isFocusable","activeFocusTraps","getActiveTrap","trapStack","activateTrap","trap","pauseTrap","trapIndex","deactivateTrap","unpauseTrap","activeTrap","_setPausedState","_isManuallyPaused","isTabEvent","isKeyForward","isKeyBackward","valueOrHandler","getActualTarget","internalTrapStack","createFocusTrap","returnFocusOnDeactivate","escapeDeactivates","delayInitialFocus","isolateSubtrees","containers","containerGroups","tabbableGroups","adjacentElements","alreadySilent","nodeFocusedBeforeActivation","mostRecentlyFocusedNode","manuallyPaused","delayInitialFocusTimer","recentNavEvent","configOverrideOptions","optionName","configOptionName","findContainerIndex","tabbableNodes","getNodeForOption","_ref2$hasFallback","hasFallback","_ref2$params","optionValue","getInitialFocusNode","tabbableOptions","firstTabbableGroup","firstTabbableNode","updateTabbableNodes","getCandidatesIteratively","sortByOrder","focusableNodes","lastTabbableNode","firstDomTabbableNode","lastDomTabbableNode","posTabIndexesFound","nextTabbableNode","forward","nodeIdx","_getActiveElement","getActiveElement","_tryFocus","tryFocus","getReturnFocusNode","previousActiveElement","findNextNavNode","_ref3$isBackward","isBackward","destinationNode","containerIndex","containerGroup","startOfGroupIndex","destinationGroupIndex","destinationGroup","lastOfGroupIndex","_destinationGroupIndex","_destinationGroup","checkPointerDown","clickOutsideDeactivates","deactivate","returnFocus","allowOutsideClick","checkFocusIn","targetContained","navAcrossContainers","mruContainerIdx","mruTabIdx","checkTabKey","checkEscapeKey","checkClick","updateObservedNodes","activate","activateOptions","_preexistingTrap$_set","onActivate","onPostActivate","checkCanFocusTrap","preexistingTrap","revertState","_setSubtreeIsolation","finishActivation","_preexistingTrap$_set2","deactivateOptions","onDeactivate","onPostDeactivate","checkCanReturnFocus","finishDeactivation","pauseOptions","unpause","unpauseOptions","updateContainerElements","containerElements","elementsAsArray","_step","containerAncestors","_iterator","_createForOfIteratorHelper","insideShadowRoot","siblings","_step2","_iterator2","onPause","onPostPause","onUnpause","onPostUnpause","_el$getAttribute","inert","cap","focusTrapModifier","setModifierManager","createModifier","focusTrapOptions","shouldSelfFocus","focusTrap","installModifier","additionalElements","_createFocusTrap","initialFocus","updateModifier","destroyModifier","makeHelper","fullParams","helperFunction","HTMLBars","makeBoundHelper","Handlebars","getTask","taskOrName","registeredTimers","_setRegisteredTimers","mapForTesting","getTimers","destroyable","timers","cancelId","cancelTask","runTask","NULL_TIMER_ID","scheduleTask","taskWrapper","taskArgs","throttleTask","throttleArgs","lastArgument","spacing","registeredPollers","_setRegisteredPollers","_shouldPollOverride","setShouldPoll","getQueuedPollTasks","symbol","globalObj","queuedPollTasks","pollTask","getNextToken","tick","pollers","cancelPoll","testing","pollToken","registeredDebounces","debounceTask","debounceArgs","pendingDebounces","debounces","debouncedTask","cancelDebounce","getTimeoutOrTestFallback","testTimeout","scaling","ClassBasedModifierManager","modifierClass","createdState","installedState","ClassBasedModifier","MANAGER","teardown","getDebugName","getDebugInstance","computeFn","datetime","allowEmpty","globalAllowEmpty","emberService","BaseHelper","moment","disableInterval","__config__","supportsGlobalAllowEmpty","localeOrTimeZoneChanged","recompute","clearTimer","intervalTimer","run","morphMoment","momentService","tz","isAfter","precision","comparisonArgs","isBefore","isBetween","inclusivity","_params","isSameOrAfter","isSameOrBefore","isSame","momentAdd","additionArgs","typeOf","momentCalendar","formatHash","referenceTime","mergedFormats","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","emberService__default","Evented","_timeZone","localeOptions","outputFormat","readOnly","propertyKey","setLocale","changeLocale","updateLocale","setTimeZone","changeTimeZone","isMoment","momentObj","isPromiseLike","thing","isCancellablePromise","toPlainArray","coll","getOptionMatcher","defaultMatcher","searchField","_resolvedOptions","_resolvedSelected","_repeatingChar","_expirableSearchText","_searchResult","_isActive","_loading","_searchText","_lastSearchedText","_highlighted","PowerSelect","_search","highlight","_highlight","_select","choose","_choose","scrollTo","_scrollTo","labelClick","_labelClick","searchText","__updateOptions","eager","__updateSelected","__registerAPI","__performSearch","multiple","highlighted","resultsCount","loading","lastSearchedText","_publicAPIActions","searchStartOffset","repeatingChar","storedAPI","indexOfOption","findWithOffset","highlightOnHover","labelClickAction","highlightedIndex","pathForOption","searchMessage","noMatchesMessage","resultCountMessage","mustShowSearchMessage","mustShowNoMessages","_filterResultsCache","countOptions","isSelectedPresent","emberPowerSelectIsSelectedPresent","ariaMultiSelectable","triggerId","labelId","ariaLabelledBy","labelText","labelComponent","searchFieldPosition","searchEnabled","buildSelection","_defaultMultipleBuildSelection","PowerSelectLabel","PowerSelectTrigger","placeholderComponent","PowerSelectPlaceholder","beforeOptionsComponent","PowerSelectBeforeOptions","searchMessageComponent","PowerSelectSearchMessage","noMatchesMessageComponent","PowerSelectNoMatchesMessage","optionsComponent","PowerSelectOptions","groupComponent","PowerSelectPowerSelectGroup","selectedItemComponent","afterOptionsComponent","handleOpen","focusInput","KeyboardEvent","_resetHighlighted","handleClose","handleInput","correctedTerm","onInput","handleKeydown","onKeydown","_routeKeydown","handleTriggerKeydown","triggerTypingTask","_handleKeySpace","handleFocus","_updateIsActive","onFocus","handleBlur","_updateHighlighted","isEqual","optionsList","optionElement","optionTopScroll","optionBottomScroll","_lastOptionsPromise","currentOptionsPromise","_lastSelectedPromise","currentSelectedPromise","resolvedSelected","_lastSearchPromise","searchResult","newSelection","idx","_handleKeyUpDown","_handleKeyEnter","_handleKeyTab","_handleKeyESC","newHighlighted","advanceSelectableOption","defHighlighted","defaultHighlighted","skipDisabled","optionMatcher","filterOptions","typeAheadOptionMatcher","defaultTypeAheadMatcher","findOptionWithOffset","_PowerSelect","and","notEq","_focusInput","autofocus","focusLaterTask","_PowerSelectBeforeOptions","PowerSelectInput","_openChanged","isDefaultPlaceholder","searchPlaceholder","lastSelection","_lastIsOpen","_PowerSelectInput","onLabelClick","_PowerSelectLabel","_PowerSelectNoMatchesMessage","ElementProto","mozMatchesSelector","_isTouchDevice","_didHandlerSetup","_listElement","_addHandlers","_removeHandlers","isOptionDisabled","groupTyping","optionTyping","_optionFromIndex","_hasMoved","changedTouch","findOptionAndPerform","optionItem","optionIndex","mouseUpHandler","mouseOverHandler","touchEndHandler","_PowerSelectOptions","emberPowerSelectIsGroup","emberPowerSelectIsEqual","_PowerSelectPlaceholder","_PowerSelectPowerSelectGroup","_PowerSelectSearchMessage","inputComponent","selectedMultiple","chooseOption","numericIndex","selectedObject","_el","objectAt","_PowerSelectTrigger","emberPowerSelectIsArray","maybeArray","maybeGroup","isGroup","optionAtIndex","originalCollection","ancestorIsDisabled","localCounter","copyGroup","subOptions","groupCopy","foundBeforeOffset","foundAfterOffset","canStop","entryIsDisabled","suboptions","currentOption","resultsLength","DIACRITICS","Ａ","À","Á","Â","Ầ","Ấ","Ẫ","Ẩ","Ã","Ā","Ă","Ằ","Ắ","Ẵ","Ẳ","Ȧ","Ǡ","Ä","Ǟ","Ả","Å","Ǻ","Ǎ","Ȁ","Ȃ","Ạ","Ậ","Ặ","Ḁ","Ą","Ⱥ","Ɐ","Ꜳ","Æ","Ǽ","Ǣ","Ꜵ","Ꜷ","Ꜹ","Ꜻ","Ꜽ","Ｂ","Ḃ","Ḅ","Ḇ","Ƀ","Ƃ","Ɓ","Ｃ","Ć","Ĉ","Ċ","Č","Ç","Ḉ","Ƈ","Ȼ","Ꜿ","Ｄ","Ḋ","Ď","Ḍ","Ḑ","Ḓ","Ḏ","Đ","Ƌ","Ɗ","Ɖ","Ꝺ","Ǳ","Ǆ","ǲ","ǅ","Ｅ","È","É","Ê","Ề","Ế","Ễ","Ể","Ẽ","Ē","Ḕ","Ḗ","Ĕ","Ė","Ë","Ẻ","Ě","Ȅ","Ȇ","Ẹ","Ệ","Ȩ","Ḝ","Ę","Ḙ","Ḛ","Ɛ","Ǝ","Ｆ","Ḟ","Ƒ","Ꝼ","Ｇ","Ǵ","Ĝ","Ḡ","Ğ","Ġ","Ǧ","Ģ","Ǥ","Ɠ","Ꞡ","Ᵹ","Ꝿ","Ｈ","Ĥ","Ḣ","Ḧ","Ȟ","Ḥ","Ḩ","Ḫ","Ħ","Ⱨ","Ⱶ","Ɥ","Ｉ","Ì","Í","Î","Ĩ","Ī","Ĭ","İ","Ï","Ḯ","Ỉ","Ǐ","Ȉ","Ȋ","Ị","Į","Ḭ","Ɨ","Ｊ","Ĵ","Ɉ","Ｋ","Ḱ","Ǩ","Ḳ","Ķ","Ḵ","Ƙ","Ⱪ","Ꝁ","Ꝃ","Ꝅ","Ꞣ","Ｌ","Ŀ","Ĺ","Ľ","Ḷ","Ḹ","Ļ","Ḽ","Ḻ","Ł","Ƚ","Ɫ","Ⱡ","Ꝉ","Ꝇ","Ꞁ","Ǉ","ǈ","Ｍ","Ḿ","Ṁ","Ṃ","Ɱ","Ɯ","Ｎ","Ǹ","Ń","Ñ","Ṅ","Ň","Ṇ","Ņ","Ṋ","Ṉ","Ƞ","Ɲ","Ꞑ","Ꞥ","Ǌ","ǋ","Ｏ","Ò","Ó","Ô","Ồ","Ố","Ỗ","Ổ","Õ","Ṍ","Ȭ","Ṏ","Ō","Ṑ","Ṓ","Ŏ","Ȯ","Ȱ","Ö","Ȫ","Ỏ","Ő","Ǒ","Ȍ","Ȏ","Ơ","Ờ","Ớ","Ỡ","Ở","Ợ","Ọ","Ộ","Ǫ","Ǭ","Ø","Ǿ","Ɔ","Ɵ","Ꝋ","Ꝍ","Ƣ","Ꝏ","Ȣ","Ｐ","Ṕ","Ṗ","Ƥ","Ᵽ","Ꝑ","Ꝓ","Ꝕ","Ｑ","Ꝗ","Ꝙ","Ɋ","Ｒ","Ŕ","Ṙ","Ř","Ȑ","Ȓ","Ṛ","Ṝ","Ŗ","Ṟ","Ɍ","Ɽ","Ꝛ","Ꞧ","Ꞃ","Ｓ","ẞ","Ś","Ṥ","Ŝ","Ṡ","Š","Ṧ","Ṣ","Ṩ","Ș","Ş","Ȿ","Ꞩ","Ꞅ","Ｔ","Ṫ","Ť","Ṭ","Ț","Ţ","Ṱ","Ṯ","Ŧ","Ƭ","Ʈ","Ⱦ","Ꞇ","Ꜩ","Ｕ","Ù","Ú","Û","Ũ","Ṹ","Ū","Ṻ","Ŭ","Ü","Ǜ","Ǘ","Ǖ","Ǚ","Ủ","Ů","Ű","Ǔ","Ȕ","Ȗ","Ư","Ừ","Ứ","Ữ","Ử","Ự","Ụ","Ṳ","Ų","Ṷ","Ṵ","Ʉ","Ｖ","Ṽ","Ṿ","Ʋ","Ꝟ","Ʌ","Ꝡ","Ｗ","Ẁ","Ẃ","Ŵ","Ẇ","Ẅ","Ẉ","Ⱳ","Ｘ","Ẋ","Ẍ","Ｙ","Ỳ","Ý","Ŷ","Ỹ","Ȳ","Ẏ","Ÿ","Ỷ","Ỵ","Ƴ","Ɏ","Ỿ","Ｚ","Ź","Ẑ","Ż","Ž","Ẓ","Ẕ","Ƶ","Ȥ","Ɀ","Ⱬ","Ꝣ","ａ","ẚ","à","á","â","ầ","ấ","ẫ","ẩ","ã","ā","ă","ằ","ắ","ẵ","ẳ","ȧ","ǡ","ä","ǟ","ả","å","ǻ","ǎ","ȁ","ȃ","ạ","ậ","ặ","ḁ","ą","ⱥ","ɐ","ꜳ","æ","ǽ","ǣ","ꜵ","ꜷ","ꜹ","ꜻ","ꜽ","ｂ","ḃ","ḅ","ḇ","ƀ","ƃ","ɓ","ｃ","ć","ĉ","ċ","č","ç","ḉ","ƈ","ȼ","ꜿ","ↄ","ｄ","ḋ","ď","ḍ","ḑ","ḓ","ḏ","đ","ƌ","ɖ","ɗ","ꝺ","ǳ","ǆ","ｅ","è","é","ê","ề","ế","ễ","ể","ẽ","ē","ḕ","ḗ","ĕ","ė","ë","ẻ","ě","ȅ","ȇ","ẹ","ệ","ȩ","ḝ","ę","ḙ","ḛ","ɇ","ɛ","ǝ","ｆ","ḟ","ƒ","ꝼ","ｇ","ǵ","ĝ","ḡ","ğ","ġ","ǧ","ģ","ǥ","ɠ","ꞡ","ᵹ","ꝿ","ｈ","ĥ","ḣ","ḧ","ȟ","ḥ","ḩ","ḫ","ẖ","ħ","ⱨ","ⱶ","ɥ","ƕ","ｉ","ì","í","î","ĩ","ī","ĭ","ï","ḯ","ỉ","ǐ","ȉ","ȋ","ị","į","ḭ","ɨ","ı","ｊ","ĵ","ǰ","ɉ","ｋ","ḱ","ǩ","ḳ","ķ","ḵ","ƙ","ⱪ","ꝁ","ꝃ","ꝅ","ꞣ","ｌ","ŀ","ĺ","ľ","ḷ","ḹ","ļ","ḽ","ḻ","ſ","ł","ƚ","ɫ","ⱡ","ꝉ","ꞁ","ꝇ","ǉ","ｍ","ḿ","ṁ","ṃ","ɱ","ɯ","ｎ","ǹ","ń","ñ","ṅ","ň","ṇ","ņ","ṋ","ṉ","ƞ","ɲ","ŉ","ꞑ","ꞥ","ǌ","ｏ","ò","ó","ô","ồ","ố","ỗ","ổ","õ","ṍ","ȭ","ṏ","ō","ṑ","ṓ","ŏ","ȯ","ȱ","ö","ȫ","ỏ","ő","ǒ","ȍ","ȏ","ơ","ờ","ớ","ỡ","ở","ợ","ọ","ộ","ǫ","ǭ","ø","ǿ","ɔ","ꝋ","ꝍ","ɵ","ƣ","ȣ","ꝏ","ｐ","ṕ","ṗ","ƥ","ᵽ","ꝑ","ꝓ","ꝕ","ｑ","ɋ","ꝗ","ꝙ","ｒ","ŕ","ṙ","ř","ȑ","ȓ","ṛ","ṝ","ŗ","ṟ","ɍ","ɽ","ꝛ","ꞧ","ꞃ","ｓ","ß","ś","ṥ","ŝ","ṡ","š","ṧ","ṣ","ṩ","ș","ş","ȿ","ꞩ","ꞅ","ẛ","ｔ","ṫ","ẗ","ť","ṭ","ț","ţ","ṱ","ṯ","ŧ","ƭ","ʈ","ⱦ","ꞇ","ꜩ","ｕ","ù","ú","û","ũ","ṹ","ū","ṻ","ŭ","ü","ǜ","ǘ","ǖ","ǚ","ủ","ů","ű","ǔ","ȕ","ȗ","ư","ừ","ứ","ữ","ử","ự","ụ","ṳ","ų","ṷ","ṵ","ʉ","ｖ","ṽ","ṿ","ʋ","ꝟ","ʌ","ꝡ","ｗ","ẁ","ẃ","ŵ","ẇ","ẅ","ẘ","ẉ","ⱳ","ｘ","ẋ","ẍ","ｙ","ỳ","ý","ŷ","ỹ","ȳ","ẏ","ÿ","ỷ","ẙ","ỵ","ƴ","ɏ","ỿ","ｚ","ź","ẑ","ż","ž","ẓ","ẕ","ƶ","ȥ","ɀ","ⱬ","ꝣ","Ά","Έ","Ή","Ί","Ϊ","Ό","Ύ","Ϋ","Ώ","ά","έ","ή","ί","ϊ","ΐ","ό","ύ","ϋ","ΰ","ω","ς","stripDiacritics","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","_eak_seen","pluralizedTypes","makeToString","modulePrefix","shouldWrapInClassFactory","parseName","parsedName","fullNameParts","prefixParts","nameParts","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","AuthenticatorEventTarget","EsaEventTarget","EsaBaseAuthenticator","authenticate","invalidate","authenticatorEvents","Configuration","rootURL","routeAfterAuthentication","useResolver","emberSimpleAuth","resolveRegistration","Adaptive","Cookie","LocalStorage","InternalSession","SessionEventTarget","sessionStore","_initializerDefineProperty","_descriptor2","_descriptor3","_descriptor4","sessionEvents","_busy","_authenticators","_setAuthenticators","authenticators","_lookupStore","_bindToStoreEvents","currentAuthenticators","authenticator","authenticatorFactory","_findAuthenticator","rejectWithError","authenticated","_onSessionDataUpdated","restoredContent","_clearWithContent","authenticatedContent","isAuthenticated","_bindToAuthenticatorEvents","_updateStore","setUnknownProperty","persist","_onSessionDataInvalidated","authenticatorRef","authenticatorMatches","_lookupAuthenticator","authenticatorName","isNone","setRedirectTarget","getRedirectTarget","clearRedirectTarget","SESSION_DATA_KEY_PREFIX","assertSetupHasBeenCalled","isSetupCalled","SessionService","_dec","_dec2","_dec3","_dec4","alias","createConfiguration","createAuthenticators","setupStore","createSessionStore","configuration","redirectTargetKey","cookieName","sessionDataKey","_setupHandlers","handleAuthentication","handleInvalidation","requireAuthentication","routeOrCallback","extraArgs","_setupIsCalled","sessionService","redirectTarget","intent","authenticationRoute","transitionTo","prohibitAuthentication","routeIfAlreadyAuthenticated","attemptedTransition","routerService","retry","handleSessionAuthenticated","routeAfterInvalidation","handleSessionInvalidated","LOCAL_STORAGE_TEST_KEY","proxyToInternalStore","AdaptiveStore","_dec5","_dec6","EsaBaseSessionStore","_descriptor5","_descriptor6","_descriptor7","cookieExpirationTime","_cookieExpirationTime","_isLocalStorageAvailable","__isLocalStorageAvailable","localStorage","emberOwner","SESSION_STORE_SETUP","_createOrLookupStore","LocalStorageStore","_isFastBoot","cookieStorage","CookieStore","getProperties","_setupStoreEvents","factoryName","SessionStoreEventTarget","initializedStores","sessionStoreEvents","persistingProperty","beforeSet","rewriteCookie","_oldCookieName","_cookieName","_secureCookies","_isPageVisible","cachedExpirationTime","_read","parsedExpirationTime","_renew","_syncData","_renewExpiration","_lastData","stringifiedData","expiration","_calculateExpirationTime","_write","cachedExpirationTimeCookie","thisCookieExpirationTime","cookieOptions","domain","expires","secure","sameSite","partitioned","oldCookie","expirationCookieName","objectsAreEqual","_syncDataTimeout","_renewExpirationTimeout","_handleStorageEvent","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","setOnerror","dispatchOverride","getDispatchOverride","setDispatchOverride","objectPrototype","UNDEFINED","ListenerKind","ADD","ONCE","REMOVE","currentListenerVersion","_descriptors","_mixins","_lazyChains","_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","writableListeners","indexOfListener","_inheritedEnd","_flattenedVersion","flattenedListeners","parentListeners","matchingListeners","observerEvents","metaStore","setMeta","peekMeta","maybeMeta","deprecateProperty","deprecatedKey","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","isObject","combine","ProxyMixin","setProxy","setCustomTagFor","isTruthy","ActionHandler","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","touchmove","touchcancel","contextmenu","dblclick","focusin","focusout","submit","change","addedEvents","_rootElement","finalEventNameMapping","_reverseEventNameMapping","lazyEvents","specifiedRootElement","_sanitizedRootElement","_didSetup","setupHandlerForBrowserEvent","setupHandler","setupHandlerForEmberEvent","viewHandler","view","getElementView","_eventHandlers","cancelBubble","isSimpleClick","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","getBounds","getViewRange","createRange","setStartBefore","firstNode","setEndAfter","lastNode","getViewClientRects","getViewBoundingClientRect","_renderer","CoreView","FrameworkObject","_superTrigger","_superHas","_has","_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","eventDispatcher","customEvents","autoboot","hasDOM","_globalsMode","_readinessDeferrals","_booted","_applicationInstances","_prepareForGlobalsMode","waitForDOMReady","buildInstance","ApplicationInstance","_watchInstance","_unwatchInstance","_buildDeprecatedInstance","__deprecatedInstance__","domReady","_bootSync","deferReadiness","advanceReadiness","didBecomeReady","boot","_bootPromise","_bootResolver","runInitializers","runLoadHooks","startRouting","_loaded","buildInitializerMethod","EngineInstance","instantiate","_BootOptions","setupRegistry","runInstanceInitializers","isInteractive","setupEventDispatcher","didCreateRootView","setupRouter","handleURL","dispatcher","applicationCustomEvents","instanceCustomEvents","getURL","bootOptions","setURL","followRedirects","handleTransitionResolve","shouldRender","renderSettled","coptions","toEnvironment","_renderMode","loadHooks","EMBER_LOAD_HOOKS","Namespace","addNamespace","existing_name","findNamespaces","nameClasses","processNamespace","removeNamespace","NAMESPACES","NAMESPACES_BY_ID","processAllNamespaces","findNamespace","isNamespace","EMBER_ARRAYS","setEmberArray","isEmberArray","EMPTY_ARRAY","identityFunction","uniqBy","keyOrFunc","iter","valueProvided","predicate","startAt","any","withNaNCheck","removeAt","insertAt","EmberArray","detect","nonEnumerableComputed","Enumerable","objectsAt","indexes","firstObject","lastObject","beginIndex","validatedEndIndex","getEach","setEach","filterBy","isEvery","isAny","initialValue","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","ARRAY_OBSERVER_MAPPING","customTagForArrayProxy","_revalidate","_arrTag","_lengthTag","PROPERTY_DID_CHANGE","_removeArrangedContentArrayObserver","objectAtContent","arrangedContent","amt","replaceContent","_objects","_objectsDirtyIndex","_lengthDirty","removedCount","_invalidate","_updateArrangedContentArray","oldLength","arrayContentWillChange","arrayContentDidChange","_addArrangedContentArrayObserver","addArrayObserver","_arrangedContent","removeArrayObserver","_arrangedContentArrayWillChange","_arrangedContentArrayDidChange","_proxy","dirtyIndex","_arrangedContentIsUpdating","_arrangedContentTag","validateTag","_arrangedContentRevision","arrangedContentTag","valueForTag","reopen","DEFAULT_FEATURES","FEATURES","feature","ENABLE_OPTIONAL_FEATURES","setComponentManager$1","templateOnly","templateOnlyComponent","MODEL","ControllerMixin","isController","concatenatedProperties","_qpDelegate","_qpChanged","_prop","dotIndex","Controller","inject$1","ContainerDebugAdapter","canCatalogEntriesByType","catalogEntriesByType","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","searchKeywords","filterValues","_record","debugSeal","debugFreeze","setDebugFunction","getDebugFunction","deprecateFunc","defaultDeprecate","captureRenderTree","domRenderer","debugRenderTree","registerHandler","missingOptionDeprecation","HANDLERS","_callback","functionToString","objectKeys","LIST_LIMIT","SAFE_KEY","inspect","inspectValue","valueIsArray","inspectKey","isTesting","setTesting","registerDestructor$1","unregisterDestructor","unregisterDestructor$1","Registry","resolverFor","optionsForType","singleton","RoutingService","setupEngineRegistry","ensureInitializers","_initializersRan","instanceInitializer","_runInitializer","bucketName","initializersByName","initializers","DAG","before","topsort","humanName","superclass","reopenClass","ENGINE_PARENT","_registry","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","regexes","setModifierManager$1","on$1","wrapGetterSetter","originalGet","propertyTag","_desc","isClassicDecorator","setClassicDecorator","hasSetUnknownProperty","wasApplied","prototypeMixinMap","destroyCalled","ensureDestroyCalled","keyNames","descriptorForProperty","isDescriptor","activateObserver","CoreObject","OWNER","applyMixin","_properties","extension","toStringExtension","getFactoryFor","mixins","Class","PrototypeMixin","setFactoryFor","flattenProps","willReopen","detectInstance","metaForProperty","prototypeMixin","ownerConstructor","initProperties","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","oneWay","deprecatingAlias","isNativeOrEmberArray","reduceMacro","arrayMacro","multiArrayMacro","_dependentKeys","additionalDependentKeysOrCallback","cCallback","uniqBy$1","union","intersect","arrays","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","_popstateHandler","initState","_previousURL","replaceState","pushState","uuid","bucketKey","stash","controllerFor","controllerName","lookupOptions","isCallback","DSLImpl","enableLoadingSubstates","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","getQuery","getFullPath","getOrigin","replacePath","QueryParams","RouterState","emberRouter","routerJsState","isActiveIntent","models","visibleQueryParams","_prepareQueryParams","shallowEqual","ROUTER","hasRoute","shouldReplace","_doTransition","normalizeQueryParams","_generateURL","generateURL","_initialTransitionStarted","isActiveForRoute","routerState","_routerMicrolib","recognizer","handlersFor","leafName","maximumContexts","handlerInfos","targetState","currentRouteName","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","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","routeQpMeta","cleanURL","_currentRouteName","_currentURL","_rootURL","_currentRoute","_doURLTransition","replaceWith","urlFor","routerMicrolib","currentQueryParams","recognize","internalURL","recognizeAndLoad","pivotRouteName","pivotRoute","_RouterService","dslCallbacks","_routePath","oldNameParts","intersectionMatches","a1","_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","outlets","_toplevelView","setOutletState","OutletView","_url","routerJsMethod","didBeginTransition","updatePaths","_engineInstances","queryParameterName","_fireQueryParamTransition","resolvedLocation","_serializeQueryParams","forEachQueryParam","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","errorArgs","targetName","routeInfoWithSlowLoading","loadingRouteName","loadingSubstateName","pivotHandler","substateNameFull","routeHasBeenDefined","stateNameFull","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","methodOrTarget","methodOrArg","additionalArgs","curried","begin","_hasScheduledTimers","hasTimers","_cancelTimers","__emberTemplateCompiler","__registerTemplateCompiler","compileTemplate","registerAsyncHelper","registerHelper","registerWaiter","unregisterHelper","unregisterWaiter","_impl","testingNotAvailableMessage","registerTestImplementation","Test","TYPE_ORDER","null","boolean","filelist","spaceship","sign","isComparable","vLen","wLen","hasUnknownProperty","isPresent","TYPE_MAP","DESTROYABLE_META","getDestroyableMeta","eagerDestructors","destructors","parentMeta","childMeta","destructorsKey","scheduleDestroy","scheduleDestroyed","destroyChildren","_hasDestroyableChildren","toIterator","toBool","setProp","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","closingNode","isCloseBlock","newClosingBlock","cursors","disableRehydration","enableRehydration","pushElement","blockDepth","clearMismatch","getBlockDepthWithOffset","__openBlock","__closeBlock","isRehydrating","__appendNode","__appendHTML","candidateBounds","markerBounds","newBounds","ConcreteBounds","possibleEmptyMarker","expect","_candidate","isMarker","__appendText","__appendComment","__openElement","NS_SVG","unmatchedAttributes","injectedOmittedNode","__setAttribute","unmatched","findByName","__setProperty","__flushElement","constructing","willCloseElement","popElement","getMarker","marker","castToSimple","__pushRemoteElement","cursorId","castToBrowser","RemoteBlock","pushBlock","didAppendBounds","rehydrationBuilder","forInitialRender","LOCAL_LOGGER","LOGGER","clearElement","intern","enumerate","isPresentArray","getFirst","getLast","assertNever","$REVISION","bump","COMPUTE","TYPE","MonomorphicTagImpl","CONSTANT_TAG","subtag","lastChecked","subtagValue","subtagBufferCache","updateTag","_tag","_subtag","disableConsumptionAssertion","DIRTY_TAG","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","_collection","_storages","_TrackedArray_brand","TrackedArray","_classPrivateMethodInitSpec","nativelyAccessingLengthFromWriteMethod","_readStorageFor","_dirtyStorageFor","_dirtyCollection","trackedArray","_options2","_collection2","_storages2","_vals","_TrackedMap_brand","TrackedMap","_storageFor","getOrInsert","getOrInsertComputed","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","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","variant","isFlushElement","isStringLiteral","expr","getStringFromValue","isArgument","isHelper","isGet","Strict","ResolveAsComponentOrHelperHead","ResolveAsHelperHead","ResolveAsModifierHead","ResolveAsComponentHead","EMPTY_ATTRS","indexOfAttribute","adjustAttrName","specified","ChildNodes","stale","oldLen","newChild","refChild","oldChild","_childNodes","SimpleNodeImpl","deep","nextChild","getAttributeNS","qualifiedName","removeAttributeNS","createRawHTMLSection","SET_TIMEOUT","buildNext","autorunPromise","iterations","buildPlatform","clearNext","NUMBER","isCoercableNumber","suspect","getOnError","findItem","findTimerItem","getQueueItems","queueItemLength","queueItemPositionOffset","queueItems","queueItem","binarySearch","middle","Queue","globalOptions","_queueBeingFlushed","targetQueues","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","_buildPlatform","_platform","counters","autoruns","created","scheduleIterable","deferOnce","loops","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","addEdge","addEdges","IntStack","msg_1","pushIncoming","incomming","indices","_Ember","Container","_setComponentManager","_componentManagerCapabilities","componentCapabilities","_modifierManagerCapabilities","modifierCapabilities","_cacheGetValue","_cacheIsConst","_getPath","_tracked","changeProperties","libraries","LIBRARIES","_ContainerProxyMixin","_ProxyMixin","_RegistryProxyMixin","_Cache","GUID_KEY","canInvoke","generateGuid","canary_features","_Input","_captureRenderTree","Debug","registerHandler$1","isComputed","_assertDestroyablesDestroyed","assertDestroyablesDestroyed","_associateDestroyableChild","_enableDestroyableTracking","enableDestroyableTracking","_registerDestructor","_unregisterDestructor","Instrumentation","_action","trySet","getCachedValueFor","_dependentKeyCompat","RouterDSL","ViewUtils","_getComponentTemplate","getComponentTemplate","_helperManagerCapabilities","_setComponentTemplate","_setHelperManager","_setModifierManager","_templateOnlyComponent","_invokeHelper","_hash","_array","_concat","_get","_on","_fn","_Backburner","__loader","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","addRoute","routeArray","eachRoute","baseRoute","normalizeSegment","contextEntered","SEGMENT_RESERVED_CHARS","PATH_SEGMENT_ENCODINGS","encodePathSegment","escapeRegex","getParam","eachChar","RouteRecognizer","ENCODE_AND_DECODE_PATH_SEGMENTS","EmptyObject","EmptyArray","shouldDecodes","isEqualCharSpec","spec","negate","State","nextStates","_regex","isMatch","recognizeChar","child$1","returned","RecognizeResults","decodeQueryParamPart","rootState","allSegments","generateQueryString","pairs","arrayPair","parseQueryString","keyLength","isSlashDropped","hashStart","queryStart","pathLen","solutions","astatics","adynamics","astars","ref$1","bstatics","bdynamics","bstars","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","arrayObserversHelper","SIGN_BIT","MAX_INT","MIN_INT","isHandle","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","queued","_mapLine","STYLES","var","varReference","varBinding","specialVar","specialProp","builtin","punct","kw","specialString","atom","constant","dim","internals","diffAdd","diffDelete","diffChange","sublabel","errorLabel","errorMessage","unbold","pointee","focusColor","intoFormat","FORMATTERS","integer","_Fragment_brand","isSubtle","leaves","leaf","ifPresent","_shouldShow","_subtle","styleAll","allFormats","toLoggable","override","footnote","appendValueAsFootnote","intoFragment","fragments","intoFragments","intoLeafFragment","dynamic","_Fragment","EMPTY","InternalComponentCapabilities","capabilityFlagsFrom","capability","managerHasCapability","hasCapability","__export","decorateClass","decorateFieldV1","decorateMethodV1","decoratePOJO","pojo","decorated","decoratePojoField","unwrap","dict","isDict","isIndexable","StackImpl","unwrapHandle","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","APPEND_OPCODES","VM_SYSCALL_SIZE","evaluate","evaluateOpcode","syscall","opcode","isMachine","lowlevel","INNER","ARGS","RESOLVED","CURRIED_VALUES","isCurriedValue","isCurriedType","CurriedValue","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","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","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","pushFrame","pushScope","invokingScope","locals","parameters","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","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","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","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","symbolName","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","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","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","insertHTMLBefore","WHITESPACE","isWhitespace","DOMChangesImpl","insertAfter","DOMChanges","normalizeProperty","slotName","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","badProtocols","badTags","badTagsForDataURI","badAttributes","badAttributesForDataURI","checkURI","checkDataURI","requiresSanitization","_protocolForUrlImplementation","sanitizeAttributeValue","weirdURL","nodeURL","dynamicAttribute","isTrusting","buildDynamicAttribute","SafeDynamicProperty","InputValueDynamicAttribute","OptionSelectedDynamicAttribute","DefaultDynamicProperty","SafeDynamicAttribute","SimpleDynamicAttribute","DynamicAttribute","_env","normalizedValue","normalizeValue","normalizedName","TreeConstruction","DOMTreeConstruction","First","Last","getAppendOperations","updateOperations","getDOM","debugBlocks","blockStack","hasBlocks","AppendingBlockImpl","pushResettableBlock","ResettableBlockImpl","pushBlockList","AppendingBlockList","pushModifiers","didOpenElement","popModifiers","modifierStack","didAppendNode","__appendFragment","trustedContent","untrustedContent","nesting","boundList","_bounds","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","artifacts","ProgramHeapImpl","Window","location$1","history$1","isChrome","opera","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","isValidInputType","_AbstractInput","INPUT_TYPES","INPUT_ELEMENT","isCheckbox","_checked","checkedDidChange","_Input2","LinkToTemplate","EMPTY_ARRAY$1","EMPTY_QUERY_PARAMS","isMissing","isQueryParams","_routing","_LinkTo","routing","classFor","willBeActive","isDisabled","namespaceRoute","currentRoute","currentRouteCache","isActiveForState","isEngine","engineMountPoint","currentWhen","_LinkTo2","descriptorFor","superOnUnsupportedArgument","superModelsGetter","superQueryGetter","LinkTo","TextareaTemplate","_Textarea","_Textarea2","Textarea","referenceForParts","rootRef","childRefFromParts","parseAttributeBinding","microsyntax","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","classNameBindings","isPath","rerenderInstrumentDetails","initialRender","CURLY_COMPONENT_MANAGER","isCurlyManager","lazyEventsProcessed","didReceiveAttrs","didUpdateAttrs","willRender","_superRerender","_rerender","_dispatcher","lazyEventsProcessedForComponentClass","mappedEventName","__dispatcher","DIRTY_TAG$1","readDOMAttr","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","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","ComponentRootState","renderComponent$1","into","isFor","_component","ClassicRootState","renderMain","possibleRoot","inTransaction","_resetRenderers","deregister","renderSettledDeferred","_lastRevision","_inRenderTransaction","_destroyed","_roots","_removedRoots","_RendererState_brand","RendererState","clearAllRoots","inRenderTransaction","_renderRootsTransaction","renderRoots","initialRootsLength","removedRoots","rootIndex","completedWithoutError","renderComponent","RENDERER_CACHE","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","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","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","WrappedBuilder","attrsBlockIndex","attrsBlockNumber","syntax","clientId","templateCacheCounters","cacheHit","cacheMiss","templateId","parsedBlock","ownerlessTemplate","templateCache","TemplateImpl","__id","__meta","parsedLayout","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","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","RangeError","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","UpdatingVMFrame","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","routeInfoWithAttribute","createRouteInfoWithAttributes","routeInfosRef","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","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","_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","isTransitionAborted","partition","partitionRoutes","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","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","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","EMPTY_OBJECT","FilterEnumerator","filterFn","vertxNext","asap","scheduleFlush","browserWindow","browserGlobal","BrowserMutationObserver","WebKitMutationObserver","isNode","isWorker","MessageChannel","useSetTimeout","nextTick","versions","setImmediate","channel","port1","port2","vertx","runOnLoop","runOnContext","__PROMISE_INSTRUMENTATION__","RSVP$1","NEEDS_EXTRA_CLOSE","SerializeBuilder","serializeBlockDepth","openIndex","serializeBuilder","sugaryCheck","TEMPLATES","getTemplate","hasTemplate","setTemplate","GENERATED_SYMBOLS","isInternalSymbol","possibleSymbol","buildTransitionAborted","maybeAbortable","coerceQueryParamsToString","oldObject","oldElement","REDIRECT_DESTINATION_SYMBOL","handlerInfo","onFulfilled","onRejected","captureStackTrace","DASHERIZE_REGEX","StyleModifier","setStyles","newStyles","existingStyles","rulesToRemove","__WEBPACK_AMD_DEFINE_RESULT__","noGlobal","getProto","class2type","hasOwn","ObjectFunctionString","isWindow","preservedScriptAttributes","noModule","DOMEval","rhtmlSuffix","isArrayLike","pushStack","prevObject","even","grep","odd","copyIsArray","expando","isReady","Ctor","isEmptyObject","globalEval","inArray","isXMLDoc","docElem","second","invert","callbackExpect","whitespace","rtrimCSS","bup","compareDocumentPosition","rcssescape","fcssescape","asCodePoint","escapeSelector","sel","preferredDoc","pushNative","Expr","outermostContext","sortInput","hasDuplicate","documentIsHTML","rbuggyQSA","dirruns","classCache","tokenCache","compilerCache","nonnativeSelectorCache","sortOrder","booleans","pseudos","rwhitespace","rcomma","rleadingCombinator","rdescend","rpseudo","ridentifier","matchExpr","ID","CLASS","ATTR","PSEUDO","CHILD","needsContext","rinputs","rheader","rquickExpr","rsibling","runescape","funescape","nonHex","unloadHandler","setDocument","inDisabledFieldset","addCombinator","els","seed","nid","newSelector","newContext","testContext","tokenize","toSelector","qsaError","cacheLength","markFunction","createInputPseudo","createButtonPseudo","createDisabledPseudo","createPositionalPseudo","argument","matchIndexes","subWindow","getById","getElementsByName","disconnectedMatch","cssHas","attrId","sortDetached","matchesSelector","attrHandle","uniqueSort","sortStable","createPseudo","preFilter","excess","unquoted","nodeNameSelector","expectedNodeName","operator","what","_argument","simple","ofType","outerCache","nodeIndex","pseudo","setFilters","lang","elemLang","hasFocus","_matchIndexes","parseOnly","soFar","preFilters","combinator","skip","checkNonElements","doneName","oldCache","newCache","elementMatcher","matchers","condense","newUnmatched","mapped","setMatcher","postFilter","postFinder","postSelector","temp","matcherOut","preMap","postMap","preexisting","matcherIn","matcherFromTokens","checkContext","leadingRelative","implicitRelative","matchContext","matchAnyContext","setMatchers","elementMatchers","bySet","byElement","superMatcher","outermost","matchedCount","setMatched","contextBackup","dirrunsUnique","getText","isXML","rneedsContext","rsingleTag","winnow","qualifier","rootjQuery","parseHTML","rparentsprev","guaranteedUnique","sibling","cur","prevAll","addBack","parentsUntil","nextAll","nextUntil","prevUntil","rnothtmlwhite","Identity","Thrower","adoptValue","noValue","Callbacks","firing","firingIndex","fire","stopOnFalse","fireWith","Deferred","tuples","always","pipe","fns","newDefer","tuple","onProgress","maxDepth","that","mightThrow","notifyWith","resolveWith","exceptionHook","rejectWith","getErrorHook","getStackHook","stateString","singleValue","resolveContexts","resolveValues","primary","updateFunc","rerrorNames","asyncError","readyException","readyList","readyWait","doScroll","access","chainable","emptyGet","bulk","rmsPrefix","rdashAlpha","fcamelCase","_all","letter","camelCase","acceptData","Data","uid","hasData","dataPriv","dataUser","rbrace","rmultiDash","_removeData","dequeue","_queueHooks","clearQueue","tmp","pnum","rcssNum","cssExpand","isAttached","composed","isHiddenWithinTree","adjustCSS","valueParts","tween","adjusted","maxIterations","cssNumber","initialInUnit","defaultDisplayMap","getDefaultDisplay","showHide","rcheckableType","rtagName","rscriptType","checkClone","noCloneChecked","wrapMap","thead","_default","getAll","setGlobalEval","refElements","tfoot","colgroup","caption","th","optgroup","rhtml","buildFragment","htmlPrefilter","rtypenamespace","returnTrue","returnFalse","origFn","leverageNative","isSetup","isTrigger","isImmediatePropagationStopped","handleObjIn","eventHandle","origType","elemData","dispatch","delegateCount","mappedTypes","origCount","removeEvent","nativeEvent","handlerQueue","fix","delegateTarget","preDispatch","isPropagationStopped","rnamespace","postDispatch","matchedHandlers","matchedSelectors","addProp","noBubble","beforeunload","isSimulated","bubbles","eventPhase","charCode","pointerId","screenX","screenY","targetTouches","toElement","focusMappedHandler","documentMode","simulate","attaches","dataHolder","rnoInnerhtml","rchecked","rcleanScript","manipulationTarget","disableScript","restoreScript","cloneCopyEvent","dest","udataOld","udataCur","fixInput","domManip","hasScripts","iNoClone","valueIsFunction","_evalUrl","keepData","cleanData","dataAndEvents","deepDataAndEvents","srcElements","destElements","inPage","prependTo","insert","rnumnonpx","rcustomProp","getStyles","opener","swap","rboxStyle","curCSS","minWidth","maxWidth","isCustomProp","pixelBoxStyles","addGetHookIf","conditionFn","hookFn","computeStyleTests","divStyle","pixelPositionVal","reliableMarginLeftVal","roundPixelMeasures","marginLeft","pixelBoxStylesVal","boxSizingReliableVal","scrollboxSizeVal","measure","reliableTrDimensionsVal","backgroundClip","clearCloneStyle","boxSizingReliable","pixelPosition","reliableMarginLeft","scrollboxSize","reliableTrDimensions","trChild","trStyle","borderTopWidth","borderBottomWidth","cssPrefixes","emptyStyle","vendorProps","finalPropName","cssProps","capName","rdisplayswap","cssShow","cssNormalTransform","setPositiveNumber","boxModelAdjustment","isBorderBox","computedVal","marginDelta","getWidthOrHeight","valueIsBorderBox","offsetProp","Tween","easing","cssHooks","animationIterationCount","aspectRatio","borderImageSlice","columnCount","flexGrow","flexShrink","gridArea","gridColumn","gridColumnEnd","gridColumnStart","gridRow","gridRowEnd","gridRowStart","orphans","widows","zIndex","zoom","fillOpacity","floodOpacity","stopOpacity","strokeMiterlimit","strokeOpacity","origName","scrollboxSizeBuggy","expanded","propHooks","percent","eased","fx","swing","fxNow","inProgress","rfxtypes","rrun","createFxNow","genFx","includeWidth","createTween","Animation","tweeners","prefilters","tweens","specialEasing","originalProperties","originalOptions","gotoEnd","anim","tweener","oldfire","propTween","restoreDisplay","isBox","dataShow","unqueued","prefilter","speeds","fadeTo","optall","doAnimation","stopQueue","cssFn","slideDown","slideUp","slideToggle","fadeIn","fadeOut","fadeToggle","slow","fast","checkOn","optSelected","radioValue","boolHook","removeAttr","nType","attrHooks","attrNames","lowercaseName","rfocusable","rclickable","stripAndCollapse","getClass","classesToArray","removeProp","propFix","finalValue","stateVal","isValidValue","rreturn","valHooks","optionSet","rquery","parseXML","parserErrorElem","rfocusMorph","stopPropagationCallback","onlyHandlers","bubbleType","ontype","lastElement","eventPath","parentWindow","triggerHandler","rbracket","rCRLF","rsubmitterTypes","rsubmittable","traditional","valueOrFunction","serializeArray","r20","rhash","rantiCache","rheaders","rnoContent","rprotocol","allTypes","originAnchor","addToPrefiltersOrTransports","structure","dataTypeExpression","dataTypes","inspectPrefiltersOrTransports","inspected","seekingTransport","prefilterOrFactory","dataTypeOrTransport","ajaxExtend","flatOptions","ajaxSettings","lastModified","etag","isLocal","processData","accepts","responseFields","converters","ajaxSetup","ajaxPrefilter","ajaxTransport","cacheURL","responseHeadersString","timeoutTimer","urlAnchor","fireGlobals","uncached","callbackContext","globalEventContext","completeDeferred","requestHeadersNames","strAbort","overrideMimeType","crossDomain","hasContent","ifModified","nativeStatusText","responses","modified","ct","finalDataType","firstDataType","conv2","conv","dataFilter","throws","getJSON","getScript","wrapAll","wrapInner","htmlIsFunction","xhrSuccessStatus","xhrSupported","cors","xhrFields","ontimeout","binary","scriptAttrs","charset","scriptCharset","oldCallbacks","rjsonp","jsonp","jsonpCallback","originalSettings","callbackName","overwritten","responseContainer","jsonProp","keepScripts","animated","setOffset","curPosition","curLeft","curCSSTop","curTop","curOffset","curCSSLeft","curElem","using","parentOffset","Height","Width","defaultExtra","funcName","unbind","undelegate","fnOver","fnOut","rtrim","holdReady","hold","parseJSON","isNumeric","_jQuery","_$","createCommonjsModule","graphemeSplitter","Extend","Regional_Indicator","Prepend","E_Base","Glue_After_Zwj","E_Base_GAZ","isSurrogate","codePointAt","hi","shouldBreak","eModifierIndex","rIIndex","previousNonExtendIndex","getGraphemeBreakProperty","nextBreak","splitGraphemes","brk","iterateGraphemes","countGraphemes","splitter","startLine","startColumn","endLine","endColumn","repeatString","printLine","maxNumLength","formattedNum","maxLength","targetLen","fillLen","tabReplacement","tabSize","printLines","defaultSettings","extraLines","linePos","columnPos","startLinePos","endLinePos","prevLines","targetLineBeforeCursor","errorStack","rawMessage","parseErrorTypes","tokenizeErrorTypes","punctuatorTokensMap","keywordTokensMap","true","false","escapes$1","isDigit1to9","isDigit","isHex","isExp","parseWhitespace","parseChar","parseKeyword","parseString$1","curChar","parseNumber","passedValueIndex","errorEof","tokenList","parseHexEscape","hexCode","escapes","passEscapes","parseString","nextChar","parseObject","startToken","parseProperty","parseValue","parseArray","parseLiteral","literal","__WEBPACK_AMD_DEFINE_FACTORY__","__WEBPACK_AMD_DEFINE_ARRAY__","cachedGuess","zones","countries","guesses","logError","momentVersion","charCodeToInt","unpackBase60","whole","fractional","multiplier","arrayToInt","mapIndices","unpack","untils","abbrs","population","packedString","Country","country_name","zone_names","OffsetAt","timeString","toTimeString","abbr","getTimezoneOffset","ZoneScore","zone","offsetScore","abbrScore","findChange","sortZoneScores","addToGuesses","guessesForUserOffsets","guessesOffset","offsetsLength","filteredGuesses","checkedOffsets","normalizeName","addZone","packed","getZone","aliases","normal0","normal1","needsOffset","isUnixTimestamp","_f","_tzm","unpacked","lo","zone_name","country_code","offsetNext","offsetPrev","moveAmbiguousForward","moveInvalidForward","mom","utcOffset","scoreOffsetAt","offsetAt","dataVersion","_zones","_countries","country_zones","zoneExists","didShowError","guess","ignoreCache","intlName","zoneScore","nextOffset","startYear","lastOffset","zoneScores","zonesForCountry","country","with_offset","abbrWrap","_z","resetZoneWrap","defaultZone","updateOffset","keepTime","_isUTC","zoneName","zoneAbbr","setDefault","momentProperties","defineLocale","monthsShort","weekdaysShort","weekdaysMin","meridiemParse","isPM","meridiem","isLower","longDateFormat","LT","LTS","LL","LLL","LLLL","sameDay","nextDay","nextWeek","lastDay","lastWeek","sameElse","relativeTime","past","ss","mm","hh","dd","MM","yy","dayOfMonthOrdinalParse","dow","doy","pluralForm","withoutSuffix","isFuture","weekdaysParseExact","minute","postformat","symbolMap","preparse","numberMap","relativeTimeWithPlural","forms","isFormat","period","ww","lastDigit","last2Digits","meridiemHour","monthsShortRegex","monthsParseExact","relativeTimeWithMutation","mutationTable","lastNumber","monthsParse","monthsRegex","minWeekdaysParse","weekdaysParse","fullWeekdaysParse","shortWeekdaysParse","monthsStrictRegex","monthsShortStrictRegex","longMonthsParse","shortMonthsParse","ll","lll","llll","processRelativeTime","monthsNominativeEl","monthsGenitiveEl","momentToFormat","_monthsGenitiveEl","_monthsNominativeEl","calendarEl","_calendarEl","monthsShortDot","invalidDate","numbersPast","numbersFuture","monthsShortWithDots","monthsShortWithoutDots","weekEndings","eras","narrow","eraYearOrdinalRegex","eraYearOrdinalParse","$0","$1","$2","isUpper","eifelerRegelAppliesToNumber","units","translateSingular","relativeTimeWithSingular","translator","words","correctGrammaticalCase","wordKey","relativeTimeMr","monthsNominative","monthsSubjective","numbersNouns","numberNoun","hundred","ten","hm","processHoursFunction","nominative","accusative","genitive","hookCallback","hasOwnProp","isObjectEmpty","isUndefined","isDate","arrLen","createUTC","createLocalOrUTC","getParsingFlags","_pf","unusedTokens","unusedInput","charsLeftOver","nullInput","invalidEra","invalidMonth","invalidFormat","userInvalidated","iso","parsedDateParts","era","rfc2822","weekdayMismatch","parsedParts","isNowValid","invalidWeekday","_strict","bigHour","_isValid","createInvalid","fun","updateInProgress","copyConfig","momentPropertiesLen","_isAMomentObject","_l","_locale","Moment","suppressDeprecationWarnings","firstTime","deprecationHandler","argLen","deprecateSimple","mergeConfigs","parentConfig","childConfig","Locale","zeroFill","targetLength","forceSign","absNumber","zerosToFill","formattingTokens","localFormattingTokens","formatFunctions","formatTokenFunctions","addFormatToken","padded","localeData","removeFormattingTokens","formatMoment","expandFormat","replaceLongDateFormatTokens","weekday","isoweekdays","isoweekday","DDD","dayofyears","dayofyear","milliseconds","millisecond","quarters","quarter","gg","weekyears","weekyear","GG","isoweekyears","isoweekyear","weeks","isoweeks","isoweek","years","normalizeUnits","normalizeObjectUnits","inputObject","normalizedProp","normalizedInput","priorities","isoWeekday","dayOfYear","weekYear","isoWeekYear","isoWeek","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","addParseToken","tokenLen","addWeekParseToken","_w","addTimeToArrayFromToken","isLeapYear","YEAR","MONTH","DATE","HOUR","MINUTE","SECOND","MILLISECOND","WEEK","WEEKDAY","daysInYear","parseTwoDigitYear","getSetYear","makeGetSet","set$1","isUTC","getUTCMilliseconds","getUTCSeconds","getUTCMinutes","getUTCHours","getUTCDate","getUTCDay","getUTCMonth","getUTCFullYear","setUTCMilliseconds","setMilliseconds","setUTCSeconds","setUTCMinutes","setUTCHours","setUTCDate","setUTCFullYear","modMonth","defaultLocaleMonths","defaultLocaleMonthsShort","MONTHS_IN_FORMAT","defaultMonthsShortRegex","defaultMonthsRegex","handleStrictParse","ii","llc","toLocaleLowerCase","_monthsParse","_longMonthsParse","_shortMonthsParse","setUTCMonth","getSetMonth","computeMonthsParse","cmpLenRev","shortP","longP","shortPieces","longPieces","mixedPieces","_monthsRegex","_monthsShortRegex","_monthsStrictRegex","_monthsShortStrictRegex","createDate","createUTCDate","UTC","firstWeekOffset","fwd","dayOfYearFromWeeks","resYear","resDayOfYear","weekOfYear","resWeek","weekOffset","weeksInYear","weekOffsetNext","shiftWeekdays","ws","weekdaysMinRegex","weekdaysShortRegex","weekdaysRegex","defaultLocaleWeekdays","defaultLocaleWeekdaysShort","defaultLocaleWeekdaysMin","defaultWeekdaysRegex","defaultWeekdaysShortRegex","defaultWeekdaysMinRegex","handleStrictParse$1","weekdayName","_weekdaysParse","_shortWeekdaysParse","_minWeekdaysParse","computeWeekdaysParse","minp","shortp","longp","minPieces","_weekdaysRegex","_weekdaysShortRegex","_weekdaysMinRegex","_weekdaysStrictRegex","_weekdaysShortStrictRegex","_weekdaysMinStrictRegex","hFormat","matchMeridiem","_meridiemParse","kInput","_isPm","_meridiem","pos1","pos2","globalLocale","getSetHour","baseConfig","locales","localeFamilies","commonPrefix","arr1","arr2","minl","normalizeLocale","loadLocale","oldLocale","_abbr","aliasedRequire","getSetGlobalLocale","getLocale","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","obsOffset","militaryOffset","numOffset","configFromArray","currentDate","expectedWeekday","yearToUse","nowValue","_useUTC","weekdayOverflow","curWeek","createLocal","_week","_dayOfYear","_nextDay","ISO_8601","RFC_2822","skipped","stringLength","totalParsedInputLength","isPm","erasConvertYear","prepareConfig","tempConfig","bestMoment","scoreToBeat","currentScore","validFormatFound","bestFormatIsValid","configfLen","score","createFromInputFallback","dayOrDate","prototypeMin","prototypeMax","pickBy","moments","ordering","Duration","unitHasDecimal","orderLen","_milliseconds","_days","_months","_bubble","isDuration","absRound","offsetFromString","chunkOffset","cloneWithOffset","setTime","getDateOffset","isUtc","aspNetRegex","isoRegex","createDuration","diffRes","parseIso","positiveMomentsDifference","createAdder","addSubtract","isAdding","invalid","isMomentInput","arrayTest","dataTypeTest","objectTest","propertyTest","propertyLen","monthDiff","wholeMonthDiff","anchor","newLocaleData","defaultFormatUtc","MS_PER_SECOND","MS_PER_MINUTE","MS_PER_HOUR","MS_PER_400_YEARS","mod$1","dividend","divisor","localStartOfDate","utcStartOfDate","matchEraAbbr","erasAbbrRegex","computeErasParse","erasName","erasAbbr","erasNarrow","abbrPieces","namePieces","narrowPieces","_erasRegex","_erasNameRegex","_erasAbbrRegex","_erasNarrowRegex","addWeekYearFormatToken","getSetWeekYearHelper","weeksTarget","setWeekAll","dayOfYearData","erasNameRegex","erasNarrowRegex","erasParse","_eraYearOrdinalRegex","_dayOfMonthOrdinalParse","_ordinalParse","_dayOfMonthOrdinalParseLenient","getSetDayOfMonth","getSetMinute","getSetMillisecond","getSetSecond","parseMs","preParsePostFormat","sod","startOf","calendarFormat","asFloat","zoneDelta","endOf","startOfDate","inputString","invalidAt","localInput","localFrom","localTo","inputMs","parsingFlags","prioritized","unitsObj","prioritizedLen","toObject","toDate","keepOffset","creationData","eraName","eraNarrow","eraAbbr","eraYear","isoWeeks","weekInfo","weeksInWeekYear","isoWeeksInYear","isoWeeksInISOWeekYear","keepLocalTime","keepMinutes","localAdjust","_changeInProgress","parseZone","tZone","hasAlignedHourOffset","isDST","isUtcOffset","isDSTShifted","_isDSTShifted","array1","array2","lengthDiff","diffs","proto$1","listMonthsImpl","listWeekdaysImpl","localeSorted","_calendar","_longDateFormat","formatUpper","tok","_invalidDate","_ordinal","_relativeTime","pastFuture","_eras","_monthsShort","_monthsParseExact","firstDayOfYear","_weekdays","_weekdaysMin","_weekdaysShort","_weekdaysParseExact","_fullWeekdaysParse","langData","mathAbs","addSubtract$1","absCeil","daysToMonths","monthsToDays","makeAs","asMilliseconds","asSeconds","asMinutes","asHours","asDays","asWeeks","asMonths","asQuarters","asYears","valueOf$1","makeGetter","substituteTimeAgo","abs$1","toISOString$1","totalSign","ymSign","daysSign","hmsSign","proto$2","monthsFromDays","argWithSuffix","argThresholds","withSuffix","posNegDuration","toIsoString","tmpLocale","relativeTimeRounding","roundingFunction","relativeTimeThreshold","myMoment","HTML5_FMT","DATETIME_LOCAL","DATETIME_LOCAL_SECONDS","DATETIME_LOCAL_MS","TIME","TIME_SECONDS","TIME_MS","timeoutDuration","longerTimeoutBrowsers","scheduled","functionToCheck","getStyleComputedProperty","_getStyleComputedProp","getReferenceNode","referenceNode","isIE11","MSInputMethodContext","isIE10","isIE","noOffsetParent","nextElementSibling","getRoot","findCommonOffsetParent","element1","element2","DOCUMENT_POSITION_FOLLOWING","setStart","setEnd","commonAncestorContainer","element1root","getScroll","upperSide","getBordersSize","sideA","sideB","getSize","getWindowSizes","getClientRect","sizes","horizScrollbar","vertScrollbar","getOffsetRectRelativeToArbitraryNode","fixedPosition","isHTML","childrenRect","parentRect","borderLeftWidth","marginTop","getFixedPositionOffsetParent","getBoundaries","boundaries","excludeScroll","relativeOffset","boundariesNode","_getWindowSizes","isPaddingNumber","computeAutoPlacement","refRect","sortedAreas","filteredAreas","computedPlacement","getReferenceOffsets","getOuterSizes","marginBottom","getPopperOffsets","referenceOffsets","isHoriz","secondarySide","secondaryMeasurement","runModifiers","ends","positionFixed","isCreated","isModifierEnabled","modifierName","getSupportedPropertyName","prefixes","upperProp","toCheck","disableEventListeners","removeOnDestroy","attachToScrollParents","setupEventListeners","updateBound","scrollElement","eventsEnabled","enableEventListeners","isModifierRequired","requestingName","requestedName","requesting","_requesting","requested","validPlacements","clockwise","Defaults","shiftvariation","_data$offsets","shiftOffsets","useHeight","divider","splitRegex","mergeWithPrevious","index2","transformProp","popperStyles","escapeWithReference","opSide","sideCapitalized","arrowElementSize","popperMarginSide","popperBorderSide","sideValue","_data$offsets$arrow","flipped","placementOpposite","flipOrder","refOffsets","overlapsRef","overflowsLeft","overflowsRight","overflowsTop","overflowsBottom","overflowsBoundaries","flippedVariationByRef","flippedVariationByContent","flipVariationsByContent","flippedVariation","subtractLength","bound","legacyGpuAccelerationOption","offsetParentRect","shouldRound","noRound","referenceWidth","popperWidth","isVariation","horizontalToInteger","verticalToInteger","prefixedProperty","invertTop","invertLeft","arrowStyles","Popper","PopperUtils","_popperOptions","_setEventListeners","allowHtml","tooltipGenerator","tooltipNode","titleNode","innerSelector","_addTitleContent","_isOpening","_tooltipNode","popperInstance","_create","_findContainer","_append","popperOptions","arrowSelector","_hide","directEvents","oppositeEvents","usedByTooltip","_scheduleShow","_scheduleHide","closeOnClickOutside","computedDelay","_showTimeout","_show","_setTooltipNodeEvent","_clearTitleContent","lastTitle","_dispose","updateTitleContent","_updateTitleContent","relatedreference","evt2","relatedreference2","readStorageFor","createStorage","dirtyStorageFor","setValue","vals","storageFor","set_defineProperty","mapfn","nativelyAccessingLengthFromPushOrUnshift","TrackedObjectImplementation","_TrackedObjectImplementation_brand","glimmerTracked","AI_CITATIONS","AI_COMPLETION_TOKENS_USED","AI_DOCUMENTS","AI_FINISH_REASON","AI_FREQUENCY_PENALTY","AI_FUNCTION_CALL","AI_GENERATION_ID","AI_INPUT_MESSAGES","AI_IS_SEARCH_REQUIRED","AI_METADATA","AI_MODEL_ID","AI_MODEL_PROVIDER","AI_PIPELINE_NAME","AI_PREAMBLE","AI_PRESENCE_PENALTY","AI_PROMPT_TOKENS_USED","AI_RAW_PROMPTING","AI_RESPONSES","AI_RESPONSE_FORMAT","AI_SEARCH_QUERIES","AI_SEARCH_RESULTS","AI_SEED","AI_STREAMING","AI_TAGS","AI_TEMPERATURE","AI_TEXTS","AI_TOOLS","AI_TOOL_CALLS","AI_TOP_K","AI_TOP_P","AI_TOTAL_COST","AI_TOTAL_TOKENS_USED","AI_WARNINGS","ANGULAR_VERSION","APP_APP_BUILD","APP_APP_IDENTIFIER","APP_APP_NAME","APP_APP_START_TIME","APP_APP_VERSION","APP_BUILD","APP_IDENTIFIER","APP_IN_FOREGROUND","APP_NAME","APP_START_COLD","APP_START_TIME","APP_START_TYPE","APP_START_WARM","APP_VERSION","APP_VITALS_FRAMES_DELAY_VALUE","APP_VITALS_FRAMES_FROZEN_COUNT","APP_VITALS_FRAMES_SLOW_COUNT","APP_VITALS_FRAMES_TOTAL_COUNT","APP_VITALS_START_COLD_VALUE","APP_VITALS_START_PREWARMED","APP_VITALS_START_REASON","APP_VITALS_START_SCREEN","APP_VITALS_START_TYPE","APP_VITALS_START_WARM_VALUE","APP_VITALS_TTFD_VALUE","APP_VITALS_TTID_VALUE","ART_GC_BLOCKING_COUNT","ART_GC_BLOCKING_TIME","ART_GC_PRE_OOME_COUNT","ART_GC_TOTAL_COUNT","ART_GC_TOTAL_TIME","ART_GC_WAITING_TIME","ART_MEMORY_FREE","ART_MEMORY_FREE_UNTIL_GC","ART_MEMORY_FREE_UNTIL_OOME","ART_MEMORY_MAX","ART_MEMORY_TOTAL","ATTRIBUTE_METADATA","brief","applyScrubbing","isInOtel","example","changelog","prs","app_start_cold","app_start_type","app_start_warm","blocked_main_thread","hasDynamicSuffix","additionalContext","connectionType","effectiveConnectionType","frames_frozen_rate","frames_slow_rate","fs_error","previous_route","stall_percentage","stall_total_time","time_to_full_display","time_to_initial_display","ATTRIBUTE_TYPE","AWS_CLOUDWATCH_LOGS_LOG_GROUP","AWS_CLOUDWATCH_LOGS_LOG_STREAM","AWS_CLOUDWATCH_LOGS_URL","AWS_DYNAMODB_ATTRIBUTE_DEFINITIONS","AWS_DYNAMODB_CONSISTENT_READ","AWS_DYNAMODB_CONSUMED_CAPACITY","AWS_DYNAMODB_COUNT","AWS_DYNAMODB_EXCLUSIVE_START_TABLE","AWS_DYNAMODB_GLOBAL_SECONDARY_INDEXES","AWS_DYNAMODB_GLOBAL_SECONDARY_INDEX_UPDATES","AWS_DYNAMODB_INDEX_NAME","AWS_DYNAMODB_ITEM_COLLECTION_METRICS","AWS_DYNAMODB_LIMIT","AWS_DYNAMODB_LOCAL_SECONDARY_INDEXES","AWS_DYNAMODB_PROJECTION","AWS_DYNAMODB_PROVISIONED_READ_CAPACITY","AWS_DYNAMODB_PROVISIONED_WRITE_CAPACITY","AWS_DYNAMODB_SCANNED_COUNT","AWS_DYNAMODB_SCAN_FORWARD","AWS_DYNAMODB_SEGMENT","AWS_DYNAMODB_SELECT","AWS_DYNAMODB_TABLE_COUNT","AWS_DYNAMODB_TABLE_NAMES","AWS_DYNAMODB_TOTAL_SEGMENTS","AWS_EXTENDED_REQUEST_ID","AWS_KINESIS_STREAM_NAME","AWS_LAMBDA_AWS_REQUEST_ID","AWS_LAMBDA_EXECUTION_DURATION_IN_MILLIS","AWS_LAMBDA_FUNCTION_NAME","AWS_LAMBDA_FUNCTION_VERSION","AWS_LAMBDA_INVOKED_ARN","AWS_LAMBDA_INVOKED_FUNCTION_ARN","AWS_LAMBDA_REMAINING_TIME_IN_MILLIS","AWS_LOG_GROUP_NAMES","AWS_LOG_STREAM_NAMES","AWS_REQUEST_EXTENDED_ID","AWS_REQUEST_ID","AWS_S3_BUCKET","AWS_SECRETSMANAGER_SECRET_ARN","AWS_SNS_TOPIC_ARN","AWS_STEP_FUNCTIONS_ACTIVITY_ARN","AWS_STEP_FUNCTIONS_STATE_MACHINE_ARN","BLOCKED_MAIN_THREAD","BROWSER_NAME","BROWSER_PERFORMANCE_NAVIGATION_ACTIVATION_START","BROWSER_PERFORMANCE_TIME_ORIGIN","BROWSER_REPORT_TYPE","BROWSER_SCRIPT_INVOKER","BROWSER_SCRIPT_INVOKER_TYPE","BROWSER_SCRIPT_SOURCE_CHAR_POSITION","BROWSER_VERSION","BROWSER_WEB_VITAL_CLS_REPORT_EVENT","BROWSER_WEB_VITAL_CLS_SOURCE_KEY","BROWSER_WEB_VITAL_CLS_SOURCE_KEY_BASE","BROWSER_WEB_VITAL_CLS_VALUE","BROWSER_WEB_VITAL_FCP_VALUE","BROWSER_WEB_VITAL_FP_VALUE","BROWSER_WEB_VITAL_INP_VALUE","BROWSER_WEB_VITAL_LCP_ELEMENT","BROWSER_WEB_VITAL_LCP_ID","BROWSER_WEB_VITAL_LCP_LOAD_TIME","BROWSER_WEB_VITAL_LCP_RENDER_TIME","BROWSER_WEB_VITAL_LCP_REPORT_EVENT","BROWSER_WEB_VITAL_LCP_SIZE","BROWSER_WEB_VITAL_LCP_URL","BROWSER_WEB_VITAL_LCP_VALUE","BROWSER_WEB_VITAL_TTFB_REQUEST_TIME","BROWSER_WEB_VITAL_TTFB_VALUE","CACHE_HIT","CACHE_ITEM_SIZE","CACHE_KEY","CACHE_OPERATION","CACHE_TTL","CACHE_WRITE","CHANNEL","CLIENT_ADDRESS","CLIENT_PORT","CLOUDFLARE_D1_DURATION","CLOUDFLARE_D1_QUERY_TYPE","CLOUDFLARE_D1_ROWS_READ","CLOUDFLARE_D1_ROWS_WRITTEN","CLOUDFLARE_DURABLE_OBJECT_QUERY_BINDINGS","CLOUDFLARE_DURABLE_OBJECT_RESPONSE_ROWS_READ","CLOUDFLARE_DURABLE_OBJECT_RESPONSE_ROWS_WRITTEN","CLOUDFLARE_R2_BUCKET","CLOUDFLARE_R2_OPERATION","CLOUDFLARE_R2_REQUEST_DELIMITER","CLOUDFLARE_R2_REQUEST_KEY","CLOUDFLARE_R2_REQUEST_PART_NUMBER","CLOUDFLARE_R2_REQUEST_PREFIX","CLOUDFLARE_WORKFLOW_ATTEMPT","CLOUDFLARE_WORKFLOW_RETRIES_BACKOFF","CLOUDFLARE_WORKFLOW_RETRIES_DELAY","CLOUDFLARE_WORKFLOW_RETRIES_LIMIT","CLOUDFLARE_WORKFLOW_TIMEOUT","CLOUD_ACCOUNT_ID","CLOUD_AVAILABILITY_ZONE","CLOUD_PLATFORM","CLOUD_PROVIDER","CLOUD_REGION","CLOUD_RESOURCE_ID","CLS","CLS_SOURCE_KEY","CLS_SOURCE_KEY_BASE","CODE_FILEPATH","CODE_FILE_PATH","CODE_FUNCTION","CODE_FUNCTION_NAME","CODE_LINENO","CODE_LINE_NUMBER","CODE_NAMESPACE","CONNECTIONTYPE","CONNECTION_RTT","CULTURE_CALENDAR","CULTURE_DISPLAY_NAME","CULTURE_IS_24_HOUR_FORMAT","CULTURE_LOCALE","CULTURE_TIMEZONE","DB_COLLECTION_NAME","DB_DRIVER_NAME","DB_NAME","DB_NAMESPACE","DB_OPERATION","DB_OPERATION_BATCH_SIZE","DB_OPERATION_NAME","DB_QUERY_PARAMETER_KEY","DB_QUERY_PARAMETER_KEY_BASE","DB_QUERY_SUMMARY","DB_QUERY_TEXT","DB_REDIS_CONNECTION","DB_REDIS_KEY","DB_REDIS_PARAMETERS","DB_RESPONSE_STATUS_CODE","DB_SQL_BINDINGS","DB_STATEMENT","DB_STORED_PROCEDURE_NAME","DB_SYSTEM","DB_SYSTEM_NAME","DB_USER","DEVICEMEMORY","DEVICE_ARCHS","DEVICE_BATTERY_LEVEL","DEVICE_BATTERY_TEMPERATURE","DEVICE_BOOT_TIME","DEVICE_BRAND","DEVICE_CHARGING","DEVICE_CHIPSET","DEVICE_CLASS","DEVICE_CONNECTION_TYPE","DEVICE_CPU_DESCRIPTION","DEVICE_EXTERNAL_FREE_STORAGE","DEVICE_EXTERNAL_STORAGE_SIZE","DEVICE_FAMILY","DEVICE_FREE_MEMORY","DEVICE_FREE_STORAGE","DEVICE_ID","DEVICE_LOCALE","DEVICE_LOW_MEMORY","DEVICE_LOW_POWER_MODE","DEVICE_MANUFACTURER","DEVICE_MEMORY_ESTIMATED_CAPACITY","DEVICE_MEMORY_SIZE","DEVICE_MODEL","DEVICE_MODEL_ID","DEVICE_NAME","DEVICE_ONLINE","DEVICE_ORIENTATION","DEVICE_PROCESSOR_COUNT","DEVICE_PROCESSOR_FREQUENCY","DEVICE_SCREEN_DENSITY","DEVICE_SCREEN_DPI","DEVICE_SCREEN_HEIGHT_PIXELS","DEVICE_SCREEN_WIDTH_PIXELS","DEVICE_SIMULATOR","DEVICE_STORAGE_SIZE","DEVICE_THERMAL_STATE","DEVICE_TIMEZONE","DEVICE_USABLE_MEMORY","DIST","EFFECTIVECONNECTIONTYPE","ENVIRONMENT","ERROR_TYPE","EVENT_ID","EVENT_NAME","EXCEPTION_ESCAPED","EXCEPTION_MESSAGE","EXCEPTION_STACKTRACE","EXCEPTION_TYPE","FAAS_COLDSTART","FAAS_CRON","FAAS_DURATION_IN_MS","FAAS_ENTRY_POINT","FAAS_EXECUTION","FAAS_ID","FAAS_IDENTITY","FAAS_INVOCATION_ID","FAAS_INVOKED_NAME","FAAS_INVOKED_PROVIDER","FAAS_INVOKED_REGION","FAAS_NAME","FAAS_TIME","FAAS_TRIGGER","FAAS_VERSION","FCP","FLAG_EVALUATION_KEY","FLAG_EVALUATION_KEY_BASE","FP","FRAMES_DELAY","FRAMES_FROZEN","FRAMES_FROZEN_RATE","FRAMES_SLOW","FRAMES_SLOW_RATE","FRAMES_TOTAL","FS_ERROR","GCP_FUNCTION_CONTEXT_EVENT_ID","GCP_FUNCTION_CONTEXT_EVENT_TYPE","GCP_FUNCTION_CONTEXT_ID","GCP_FUNCTION_CONTEXT_RESOURCE","GCP_FUNCTION_CONTEXT_SOURCE","GCP_FUNCTION_CONTEXT_SPECVERSION","GCP_FUNCTION_CONTEXT_TIME","GCP_FUNCTION_CONTEXT_TIMESTAMP","GCP_FUNCTION_CONTEXT_TYPE","GCP_PROJECT_ID","GEN_AI_AGENT_NAME","GEN_AI_CONTEXT_UTILIZATION","GEN_AI_CONTEXT_WINDOW_SIZE","GEN_AI_CONVERSATION_ID","GEN_AI_COST_CACHE_CREATION_INPUT_TOKENS","GEN_AI_COST_CACHE_READ_INPUT_TOKENS","GEN_AI_COST_INPUT_TOKENS","GEN_AI_COST_OUTPUT_TOKENS","GEN_AI_COST_REASONING_OUTPUT_TOKENS","GEN_AI_COST_TOTAL_TOKENS","GEN_AI_FUNCTION_ID","GEN_AI_OPERATION_TYPE","GEN_AI_OUTPUT_MESSAGES","GEN_AI_PIPELINE_NAME","GEN_AI_PROMPT","GEN_AI_PROMPT_NAME","GEN_AI_REQUEST_AVAILABLE_TOOLS","GEN_AI_REQUEST_MESSAGES","GEN_AI_REQUEST_REASONING_EFFORT","GEN_AI_REQUEST_SEED","GEN_AI_REQUEST_STOP_SEQUENCES","GEN_AI_RESPONSE_FINISH_REASONS","GEN_AI_RESPONSE_ID","GEN_AI_RESPONSE_MODEL","GEN_AI_RESPONSE_STREAMING","GEN_AI_RESPONSE_TEXT","GEN_AI_RESPONSE_TIME_TO_FIRST_CHUNK","GEN_AI_RESPONSE_TIME_TO_FIRST_TOKEN","GEN_AI_RESPONSE_TOKENS_PER_SECOND","GEN_AI_RESPONSE_TOOL_CALLS","GEN_AI_SYSTEM","GEN_AI_SYSTEM_MESSAGE","GEN_AI_TOOL_CALL_ARGUMENTS","GEN_AI_TOOL_CALL_RESULT","GEN_AI_TOOL_DEFINITIONS","GEN_AI_TOOL_DESCRIPTION","GEN_AI_TOOL_INPUT","GEN_AI_TOOL_MESSAGE","GEN_AI_TOOL_NAME","GEN_AI_TOOL_OUTPUT","GEN_AI_TOOL_TYPE","GEN_AI_USAGE_CACHE_CREATION_INPUT_TOKENS","GEN_AI_USAGE_CACHE_READ_INPUT_TOKENS","GEN_AI_USAGE_COMPLETION_TOKENS","GEN_AI_USAGE_INPUT_TOKENS","GEN_AI_USAGE_INPUT_TOKENS_CACHED","GEN_AI_USAGE_INPUT_TOKENS_CACHE_WRITE","GEN_AI_USAGE_OUTPUT_TOKENS","GEN_AI_USAGE_OUTPUT_TOKENS_REASONING","GEN_AI_USAGE_PROMPT_TOKENS","GEN_AI_USAGE_REASONING_OUTPUT_TOKENS","GEN_AI_USAGE_TOTAL_TOKENS","GRAPHQL_OPERATION_NAME","GRAPHQL_OPERATION_TYPE","HARDWARECONCURRENCY","HTTP_CLIENT_IP","HTTP_DECODED_RESPONSE_CONTENT_LENGTH","HTTP_FLAVOR","HTTP_FRAGMENT","HTTP_HOST","HTTP_METHOD","HTTP_QUERY","HTTP_REQUEST_BODY_DATA","HTTP_REQUEST_CONNECTION_END","HTTP_REQUEST_CONNECT_START","HTTP_REQUEST_DOMAIN_LOOKUP_END","HTTP_REQUEST_DOMAIN_LOOKUP_START","HTTP_REQUEST_FETCH_START","HTTP_REQUEST_HEADER_KEY","HTTP_REQUEST_METHOD","HTTP_REQUEST_REDIRECT_END","HTTP_REQUEST_REDIRECT_START","HTTP_REQUEST_REQUEST_START","HTTP_REQUEST_RESEND_COUNT","HTTP_REQUEST_RESPONSE_END","HTTP_REQUEST_RESPONSE_START","HTTP_REQUEST_SAME_ORIGIN","HTTP_REQUEST_SECURE_CONNECTION_START","HTTP_REQUEST_TIME_TO_FIRST_BYTE","HTTP_REQUEST_WORKER_START","HTTP_RESPONSE_BODY_SIZE","HTTP_RESPONSE_CONTENT_LENGTH","HTTP_RESPONSE_HEADER_CONTENT_LENGTH","HTTP_RESPONSE_HEADER_KEY","HTTP_RESPONSE_HEADER_KEY_BASE","HTTP_RESPONSE_SIZE","HTTP_RESPONSE_STATUS_CODE","HTTP_RESPONSE_TRANSFER_SIZE","HTTP_ROUTE","HTTP_SCHEME","HTTP_SERVER_NAME","HTTP_SERVER_REQUEST_TIME_IN_QUEUE","HTTP_STATUS_CODE","HTTP_TARGET","HTTP_USER_AGENT","INP","JSONRPC_PROTOCOL_VERSION","JSONRPC_REQUEST_ID","JVM_GC_ACTION","JVM_GC_NAME","JVM_MEMORY_POOL_NAME","JVM_MEMORY_TYPE","JVM_THREAD_DAEMON","JVM_THREAD_STATE","KOA_NAME","KOA_TYPE","LCP","LCP_ELEMENT","LCP_ID","LCP_LOADTIME","LCP_RENDERTIME","LCP_SIZE","LCP_URL","LOGGER_NAME","MCP_CANCELLED_REASON","MCP_CANCELLED_REQUEST_ID","MCP_CLIENT_NAME","MCP_CLIENT_TITLE","MCP_CLIENT_VERSION","MCP_LIFECYCLE_PHASE","MCP_LOGGING_DATA_TYPE","MCP_LOGGING_LEVEL","MCP_LOGGING_LOGGER","MCP_LOGGING_MESSAGE","MCP_METHOD_NAME","MCP_PROGRESS_CURRENT","MCP_PROGRESS_MESSAGE","MCP_PROGRESS_PERCENTAGE","MCP_PROGRESS_TOKEN","MCP_PROGRESS_TOTAL","MCP_PROMPT_NAME","MCP_PROMPT_RESULT_DESCRIPTION","MCP_PROMPT_RESULT_MESSAGE_CONTENT","MCP_PROMPT_RESULT_MESSAGE_COUNT","MCP_PROMPT_RESULT_MESSAGE_ROLE","MCP_PROTOCOL_READY","MCP_PROTOCOL_VERSION","MCP_REQUEST_ARGUMENT_KEY","MCP_REQUEST_ARGUMENT_KEY_BASE","MCP_REQUEST_ARGUMENT_NAME","MCP_REQUEST_ARGUMENT_URI","MCP_REQUEST_ID","MCP_RESOURCE_PROTOCOL","MCP_RESOURCE_URI","MCP_SERVER_NAME","MCP_SERVER_TITLE","MCP_SERVER_VERSION","MCP_SESSION_ID","MCP_TOOL_NAME","MCP_TOOL_RESULT_CONTENT","MCP_TOOL_RESULT_CONTENT_COUNT","MCP_TOOL_RESULT_IS_ERROR","MCP_TRANSPORT","MDC_KEY","MDC_KEY_BASE","MESSAGING_BATCH_MESSAGE_COUNT","MESSAGING_DESTINATION","MESSAGING_DESTINATION_CONNECTION","MESSAGING_DESTINATION_NAME","MESSAGING_MESSAGE_BODY_SIZE","MESSAGING_MESSAGE_CONVERSATION_ID","MESSAGING_MESSAGE_ENVELOPE_SIZE","MESSAGING_MESSAGE_ID","MESSAGING_MESSAGE_RECEIVE_LATENCY","MESSAGING_MESSAGE_RETRY_COUNT","MESSAGING_OPERATION_NAME","MESSAGING_OPERATION_TYPE","MESSAGING_RABBITMQ_DESTINATION_ROUTING_KEY","MESSAGING_SYSTEM","METHOD","MIDDLEWARE_NAME","NAVIGATION_ORIGIN","NAVIGATION_ROUTE_ID","NAVIGATION_TYPE","NEL_ELAPSED_TIME","NEL_PHASE","NEL_REFERRER","NEL_SAMPLING_FUNCTION","NEL_TYPE","NETWORK_CONNECTION_EFFECTIVE_TYPE","NETWORK_CONNECTION_RTT","NETWORK_CONNECTION_TYPE","NETWORK_LOCAL_ADDRESS","NETWORK_LOCAL_PORT","NETWORK_PEER_ADDRESS","NETWORK_PEER_PORT","NETWORK_PROTOCOL_NAME","NETWORK_PROTOCOL_VERSION","NETWORK_TRANSPORT","NETWORK_TYPE","NET_HOST_IP","NET_HOST_NAME","NET_HOST_PORT","NET_PEER_IP","NET_PEER_NAME","NET_PEER_PORT","NET_PROTOCOL_NAME","NET_PROTOCOL_VERSION","NET_SOCK_FAMILY","NET_SOCK_HOST_ADDR","NET_SOCK_HOST_PORT","NET_SOCK_PEER_ADDR","NET_SOCK_PEER_NAME","NET_SOCK_PEER_PORT","NET_TRANSPORT","OS_BUILD","OS_BUILD_ID","OS_DESCRIPTION","OS_KERNEL_VERSION","OS_NAME","OS_RAW_DESCRIPTION","OS_ROOTED","OS_THEME","OS_TYPE","OS_VERSION","OTEL_KIND","OTEL_SCOPE_NAME","OTEL_SCOPE_VERSION","OTEL_STATUS_CODE","OTEL_STATUS_DESCRIPTION","PARAMS_KEY","PARAMS_KEY_BASE","PERFORMANCE_ACTIVATIONSTART","PERFORMANCE_TIMEORIGIN","PREVIOUS_ROUTE","PROCESS_COMMAND_ARGS","PROCESS_EXECUTABLE_NAME","PROCESS_PID","PROCESS_RUNTIME_DESCRIPTION","PROCESS_RUNTIME_ENGINE_NAME","PROCESS_RUNTIME_ENGINE_VERSION","PROCESS_RUNTIME_NAME","PROCESS_RUNTIME_VERSION","QUERY_KEY","QUERY_KEY_BASE","REACT_VERSION","RELEASE","REMIX_ACTION_FORM_DATA_KEY","REMIX_ACTION_FORM_DATA_KEY_BASE","REPLAY_ID","RESOURCE_DEPLOYMENT_ENVIRONMENT","RESOURCE_DEPLOYMENT_ENVIRONMENT_NAME","RESOURCE_RENDER_BLOCKING_STATUS","ROUTE","RPC_GRPC_STATUS_CODE","RPC_METHOD","RPC_RESPONSE_STATUS_CODE","RPC_SERVICE","RPC_SYSTEM","RPC_SYSTEM_NAME","RUNTIME_BUILD","RUNTIME_NAME","RUNTIME_RAW_DESCRIPTION","RUNTIME_VERSION","SCORE_KEY","SCORE_KEY_BASE","SCORE_RATIO_KEY","SCORE_RATIO_KEY_BASE","SCORE_TOTAL","SCORE_WEIGHT_KEY","SCORE_WEIGHT_KEY_BASE","SENTRY_ACTION","SENTRY_BROWSER_NAME","SENTRY_BROWSER_VERSION","SENTRY_CANCELLATION_REASON","SENTRY_CATEGORY","SENTRY_CLIENT_SAMPLE_RATE","SENTRY_DESCRIPTION","SENTRY_DIST","SENTRY_DOMAIN","SENTRY_DSC_ENVIRONMENT","SENTRY_DSC_PROJECT_ID","SENTRY_DSC_PUBLIC_KEY","SENTRY_DSC_RELEASE","SENTRY_DSC_SAMPLED","SENTRY_DSC_SAMPLE_RATE","SENTRY_DSC_TRACE_ID","SENTRY_DSC_TRANSACTION","SENTRY_ENVIRONMENT","SENTRY_EXCLUSIVE_TIME","SENTRY_GRAPHQL_OPERATION","SENTRY_GROUP","SENTRY_HTTP_PREFETCH","SENTRY_IDLE_SPAN_FINISH_REASON","SENTRY_IS_REMOTE","SENTRY_KIND","SENTRY_MAIN_THREAD","SENTRY_MESSAGE_PARAMETER_KEY","SENTRY_MESSAGE_TEMPLATE","SENTRY_METRIC_SOURCE","SENTRY_MOBILE","SENTRY_MODULE_KEY","SENTRY_MODULE_KEY_BASE","SENTRY_NEXTJS_SSR_FUNCTION_ROUTE","SENTRY_NEXTJS_SSR_FUNCTION_TYPE","SENTRY_NORMALIZED_DB_QUERY","SENTRY_NORMALIZED_DB_QUERY_HASH","SENTRY_NORMALIZED_DESCRIPTION","SENTRY_OBSERVED_TIMESTAMP_NANOS","SENTRY_ORIGIN","SENTRY_PLATFORM","SENTRY_PROFILER_ID","SENTRY_PROFILE_ID","SENTRY_REPLAY_ID","SENTRY_REPLAY_IS_BUFFERING","SENTRY_REPORT_EVENT","SENTRY_SDK_INTEGRATIONS","SENTRY_SERVER_SAMPLE_RATE","SENTRY_SOURCE","SENTRY_SPAN_SOURCE","SENTRY_STATUS","SENTRY_STATUS_CODE","SENTRY_STATUS_MESSAGE","SENTRY_SVELTEKIT_NAVIGATION_FROM","SENTRY_SVELTEKIT_NAVIGATION_TO","SENTRY_SVELTEKIT_NAVIGATION_TYPE","SENTRY_THREAD_ID","SENTRY_TIMESTAMP_SEQUENCE","SENTRY_TRACE_PARENT_SPAN_ID","SENTRY_TRACE_STATUS","SENTRY_USER_EMAIL","SENTRY_USER_GEO_CITY","SENTRY_USER_GEO_COUNTRY_CODE","SENTRY_USER_GEO_REGION","SENTRY_USER_GEO_SUBDIVISION","SENTRY_USER_ID","SENTRY_USER_IP","SENTRY_USER_USERNAME","SERVER_ADDRESS","SERVER_NAME","SERVER_PORT","SERVICE_NAME","SERVICE_VERSION","SESSION_ID","STALL_PERCENTAGE","STALL_TOTAL_TIME","STATE_TYPE","THREAD_ID","THREAD_NAME","TIMBER_TAG","TIME_TO_FULL_DISPLAY","TIME_TO_INITIAL_DISPLAY","TRPC_PROCEDURE_PATH","TRPC_PROCEDURE_TYPE","TTFB","TTFB_REQUESTTIME","UI_COMPONENT_NAME","UI_CONTRIBUTES_TO_TTFD","UI_CONTRIBUTES_TO_TTID","UI_ELEMENT_HEIGHT","UI_ELEMENT_ID","UI_ELEMENT_IDENTIFIER","UI_ELEMENT_LOAD_TIME","UI_ELEMENT_PAINT_TYPE","UI_ELEMENT_RENDER_TIME","UI_ELEMENT_TYPE","UI_ELEMENT_URL","UI_ELEMENT_WIDTH","URL_DOMAIN","URL_FRAGMENT","URL_PATH_PARAMETER_KEY","URL_PATH_PARAMETER_KEY_BASE","URL_PORT","URL_SAME_ORIGIN","URL_SCHEME","URL_TEMPLATE","USER_EMAIL","USER_FULL_NAME","USER_GEO_CITY","USER_GEO_COUNTRY_CODE","USER_GEO_REGION","USER_GEO_SUBDIVISION","USER_HASH","USER_ID","USER_IP_ADDRESS","USER_NAME","USER_ROLES","VERCEL_BRANCH","VERCEL_BUILD_ID","VERCEL_DEPLOYMENT_ID","VERCEL_DESTINATION","VERCEL_EDGE_TYPE","VERCEL_ENTRYPOINT","VERCEL_EXECUTION_REGION","VERCEL_ID","VERCEL_JA3_DIGEST","VERCEL_JA4_DIGEST","VERCEL_LOG_TYPE","VERCEL_PATH","VERCEL_PROJECT_ID","VERCEL_PROJECT_NAME","VERCEL_PROXY_CACHE_ID","VERCEL_PROXY_CLIENT_IP","VERCEL_PROXY_HOST","VERCEL_PROXY_LAMBDA_REGION","VERCEL_PROXY_METHOD","VERCEL_PROXY_PATH","VERCEL_PROXY_PATH_TYPE","VERCEL_PROXY_PATH_TYPE_VARIANT","VERCEL_PROXY_REFERER","VERCEL_PROXY_REGION","VERCEL_PROXY_RESPONSE_BYTE_SIZE","VERCEL_PROXY_SCHEME","VERCEL_PROXY_STATUS_CODE","VERCEL_PROXY_TIMESTAMP","VERCEL_PROXY_USER_AGENT","VERCEL_PROXY_VERCEL_CACHE","VERCEL_PROXY_VERCEL_ID","VERCEL_PROXY_WAF_ACTION","VERCEL_PROXY_WAF_RULE_ID","VERCEL_REQUEST_ID","VERCEL_SOURCE","VERCEL_STATUS_CODE","_AWS_KINESIS_STREAM_NAME","_AWS_REQUEST_ID","_HTTP_REQUEST_METHOD","_SENTRY_SEGMENT_ID","STRINGS","setStrings","getStrings","getString","resolveInitializer","loadInitializers","initializerPrefix","instanceInitializerPrefix","instanceInitializers","gfm","pedantic","tokenizer","walkTokens","caret","getRegex","Te","codeRemoveIndent","outputLinkReplace","indentCodeCompensation","beginningSpace","endingHash","startingSpaceChar","endingSpaceChar","nonSpaceChar","newLineCharGlobal","tabCharGlobal","multipleSpaceGlobal","blankLine","doubleBlankLine","blockquoteStart","blockquoteSetextReplace","blockquoteSetextReplace2","listReplaceNesting","listIsTask","listReplaceTask","listTaskCheckbox","anyLine","hrefBrackets","tableDelimiter","tableAlignChars","tableRowBlankLine","tableAlignRight","tableAlignCenter","tableAlignLeft","startATag","endATag","startPreScriptTag","endPreScriptTag","startAngleBracket","endAngleBracket","pedanticHrefTitle","unicodeAlphaNumeric","escapeTest","escapeReplace","escapeTestNoEncode","escapeReplaceNoEncode","percentDecode","findPipe","splitPipe","slashPipe","carriageReturn","spaceLine","notSpaceStart","endingNewline","listItemRegex","nextBulletRegex","hrRegex","fencesBeginRegex","headingBeginRegex","htmlBeginRegex","blockquoteBeginRegex","oe","ae","Se","$e","Le","Me","le","ze","Ee","blockquote","fences","heading","lheading","paragraph","se","Ae","Ie","ve","ue","Qe","ce","Ne","je","Ue","he","Ke","We","Je","Ve","de","ke","ie","_backpedal","anyPunctuation","autolink","blockSkip","delLDelim","delRDelim","emStrongLDelim","emStrongRDelimAst","emStrongRDelimUnd","nolink","punctuation","reflink","reflinkSearch","ut","normal","ge","te","me","inLink","inlineTokens","space","codeBlockStyle","lexer","blockTokens","ordered","loose","trimStart","re","be","Re","rawLine","inlineQueue","align","inRawBlock","emStrong","codespan","inlineText","lex","lexInline","infiniteLoopError","startBlock","emStrongMask","startInline","langString","parseInline","listitem","tablecell","tablerow","textRenderer","_Class3","preprocess","postprocess","processAllTokens","provideLexer","provideParser","parseMarkdown","childTokens","passThroughHooks","passThroughHooksRespectAsync","kt","getDefaults","Parser","TextRenderer","Lexer","Tokenizer","Hooks","pn"],"sources":["webpack://__ember_auto_import__/node_modules/@ember-data/adapter/dist/error.js","webpack://__ember_auto_import__/node_modules/@ember-data/adapter/dist/serialize-into-hash-DIFDGeuT.js","webpack://__ember_auto_import__/node_modules/@ember-data/adapter/dist/build-url-mixin-DWfVjH3O.js","webpack://__ember_auto_import__/node_modules/@ember-data/adapter/dist/index-DokvKSvT.js","webpack://__ember_auto_import__/node_modules/@ember-data/adapter/dist/rest.js","webpack://__ember_auto_import__/node_modules/@ember-data/debug/dist/data-adapter.js","webpack://__ember_auto_import__/node_modules/@ember-data/graph/dist/-private.js","webpack://__ember_auto_import__/node_modules/@ember-data/legacy-compat/dist/-private-Dlia0pw1.js","webpack://__ember_auto_import__/node_modules/@ember-data/model/dist/hooks-CNY5g4Ab.js","webpack://__ember_auto_import__/node_modules/@ember-data/model/dist/has-many-DT3JBYYG.js","webpack://__ember_auto_import__/node_modules/@ember-data/model/dist/model-rk3atPqV.js","webpack://__ember_auto_import__/node_modules/@ember-data/model/dist/schema-provider-Bvogtzx9.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__/node_modules/@ember-data/request-utils/dist/deprecation-support.js","webpack://__ember_auto_import__/node_modules/@ember-data/request-utils/dist/inflect-8aYUyMN7.js","webpack://__ember_auto_import__/node_modules/@ember-data/request/dist/debug-nHWzWIMX.js","webpack://__ember_auto_import__/node_modules/@ember-data/request/dist/index.js","webpack://__ember_auto_import__/node_modules/@ember-data/serializer/dist/index.js","webpack://__ember_auto_import__/node_modules/@ember-data/serializer/dist/json-BwMH6O_R.js","webpack://__ember_auto_import__/node_modules/@ember-data/serializer/dist/json-api.js","webpack://__ember_auto_import__/node_modules/@ember-data/serializer/dist/rest.js","webpack://__ember_auto_import__/node_modules/@ember-data/serializer/dist/transform.js","webpack://__ember_auto_import__/node_modules/@warp-drive/core-types/dist/identifier.js","webpack://__ember_auto_import__/node_modules/@ember-data/store/dist/many-array-BwVo-2vv.js","webpack://__ember_auto_import__/node_modules/@ember-data/tracking/dist/-private.js","webpack://__ember_auto_import__/node_modules/@ember-data/tracking/dist/index.js","webpack://__ember_auto_import__/src/-internal/deprecations.ts","webpack://__ember_auto_import__/src/-internal/warnings.ts","webpack://__ember_auto_import__/src/-internal/build-registry.ts","webpack://__ember_auto_import__/src/global.ts","webpack://__ember_auto_import__/src/has-ember-version.ts","webpack://__ember_auto_import__/node_modules/@glimmer/component/dist/index.js","webpack://__ember_auto_import__/node_modules/tslib/tslib.es6.js","webpack://__ember_auto_import__/node_modules/@lit/reactive-element/css-tag.js","webpack://__ember_auto_import__/node_modules/@lit/reactive-element/reactive-element.js","webpack://__ember_auto_import__/node_modules/lit-html/lit-html.js","webpack://__ember_auto_import__/node_modules/lit-element/lit-element.js","webpack://__ember_auto_import__/node_modules/@lit/reactive-element/decorators/custom-element.js","webpack://__ember_auto_import__/node_modules/@lit/reactive-element/decorators/property.js","webpack://__ember_auto_import__/node_modules/@lit/reactive-element/decorators/state.js","webpack://__ember_auto_import__/node_modules/@lit/reactive-element/decorators/base.js","webpack://__ember_auto_import__/node_modules/@lit/reactive-element/decorators/event-options.js","webpack://__ember_auto_import__/node_modules/@lit/reactive-element/decorators/query.js","webpack://__ember_auto_import__/node_modules/@lit/reactive-element/decorators/query-all.js","webpack://__ember_auto_import__/node_modules/@lit/reactive-element/decorators/query-async.js","webpack://__ember_auto_import__/node_modules/@lit/reactive-element/decorators/query-assigned-elements.js","webpack://__ember_auto_import__/node_modules/@lit/reactive-element/decorators/query-assigned-nodes.js","webpack://__ember_auto_import__/node_modules/lottie-web/build/player/lottie.js","webpack://__ember_auto_import__/src/lottie-player.styles.ts","webpack://__ember_auto_import__/src/versions.ts","webpack://__ember_auto_import__/src/lottie-player.ts","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__/src/debug-build.ts","webpack://__ember_auto_import__/src/getNativeImplementation.ts","webpack://__ember_auto_import__/src/htmlTreeAsString.ts","webpack://__ember_auto_import__/src/instrument/dom.ts","webpack://__ember_auto_import__/src/instrument/history.ts","webpack://__ember_auto_import__/src/instrument/location.ts","webpack://__ember_auto_import__/src/instrument/xhr.ts","webpack://__ember_auto_import__/src/is.ts","webpack://__ember_auto_import__/src/metrics/browserMetrics.ts","webpack://__ember_auto_import__/src/metrics/cls.ts","webpack://__ember_auto_import__/src/metrics/elementTiming.ts","webpack://__ember_auto_import__/src/metrics/inp.ts","webpack://__ember_auto_import__/src/metrics/instrument.ts","webpack://__ember_auto_import__/src/metrics/lcp.ts","webpack://__ember_auto_import__/src/metrics/resourceTiming.ts","webpack://__ember_auto_import__/src/metrics/utils.ts","webpack://__ember_auto_import__/src/metrics/web-vitals/getCLS.ts","webpack://__ember_auto_import__/src/metrics/web-vitals/getINP.ts","webpack://__ember_auto_import__/src/metrics/web-vitals/getLCP.ts","webpack://__ember_auto_import__/src/metrics/web-vitals/lib/InteractionManager.ts","webpack://__ember_auto_import__/src/metrics/web-vitals/lib/LCPEntryManager.ts","webpack://__ember_auto_import__/src/metrics/web-vitals/lib/LayoutShiftManager.ts","webpack://__ember_auto_import__/src/metrics/web-vitals/lib/bindReporter.ts","webpack://__ember_auto_import__/src/metrics/web-vitals/lib/generateUniqueID.ts","webpack://__ember_auto_import__/src/metrics/web-vitals/lib/getActivationStart.ts","webpack://__ember_auto_import__/src/metrics/web-vitals/lib/getNavigationEntry.ts","webpack://__ember_auto_import__/src/metrics/web-vitals/lib/getVisibilityWatcher.ts","webpack://__ember_auto_import__/src/metrics/web-vitals/lib/globalListeners.ts","webpack://__ember_auto_import__/src/metrics/web-vitals/lib/initMetric.ts","webpack://__ember_auto_import__/src/metrics/web-vitals/lib/initUnique.ts","webpack://__ember_auto_import__/src/metrics/web-vitals/lib/observe.ts","webpack://__ember_auto_import__/src/metrics/web-vitals/lib/onHidden.ts","webpack://__ember_auto_import__/src/metrics/web-vitals/lib/polyfills/interactionCountPolyfill.ts","webpack://__ember_auto_import__/src/metrics/web-vitals/lib/runOnce.ts","webpack://__ember_auto_import__/src/metrics/web-vitals/lib/whenActivated.ts","webpack://__ember_auto_import__/src/metrics/web-vitals/lib/whenIdleOrHidden.ts","webpack://__ember_auto_import__/src/metrics/web-vitals/onFCP.ts","webpack://__ember_auto_import__/src/metrics/web-vitals/onTTFB.ts","webpack://__ember_auto_import__/src/metrics/webVitalSpans.ts","webpack://__ember_auto_import__/src/networkUtils.ts","webpack://__ember_auto_import__/src/types.ts","webpack://__ember_auto_import__/src/client.ts","webpack://__ember_auto_import__/src/diagnose-sdk.ts","webpack://__ember_auto_import__/src/eventbuilder.ts","webpack://__ember_auto_import__/src/feedbackAsync.ts","webpack://__ember_auto_import__/src/feedbackSync.ts","webpack://__ember_auto_import__/src/helpers.ts","webpack://__ember_auto_import__/src/integrations/breadcrumbs.ts","webpack://__ember_auto_import__/src/integrations/browserapierrors.ts","webpack://__ember_auto_import__/src/integrations/browsersession.ts","webpack://__ember_auto_import__/src/integrations/contextlines.ts","webpack://__ember_auto_import__/src/integrations/culturecontext.ts","webpack://__ember_auto_import__/src/integrations/featureFlags/growthbook/integration.ts","webpack://__ember_auto_import__/src/integrations/featureFlags/launchdarkly/integration.ts","webpack://__ember_auto_import__/src/integrations/featureFlags/openfeature/integration.ts","webpack://__ember_auto_import__/src/integrations/featureFlags/statsig/integration.ts","webpack://__ember_auto_import__/src/integrations/featureFlags/unleash/integration.ts","webpack://__ember_auto_import__/src/integrations/fetchStreamPerformance.ts","webpack://__ember_auto_import__/src/integrations/globalhandlers.ts","webpack://__ember_auto_import__/src/integrations/graphqlClient.ts","webpack://__ember_auto_import__/src/integrations/httpclient.ts","webpack://__ember_auto_import__/src/integrations/httpcontext.ts","webpack://__ember_auto_import__/src/integrations/linkederrors.ts","webpack://__ember_auto_import__/src/integrations/reportingobserver.ts","webpack://__ember_auto_import__/src/integrations/spanstreaming.ts","webpack://__ember_auto_import__/src/integrations/spotlight.ts","webpack://__ember_auto_import__/src/integrations/view-hierarchy.ts","webpack://__ember_auto_import__/src/integrations/webVitals.ts","webpack://__ember_auto_import__/src/integrations/webWorker.ts","webpack://__ember_auto_import__/src/normalizeStringifyValue.ts","webpack://__ember_auto_import__/src/profiling/UIProfiler.ts","webpack://__ember_auto_import__/src/profiling/index.ts","webpack://__ember_auto_import__/src/profiling/integration.ts","webpack://__ember_auto_import__/src/profiling/startProfileForSpan.ts","webpack://__ember_auto_import__/src/profiling/utils.ts","webpack://__ember_auto_import__/src/report-dialog.ts","webpack://__ember_auto_import__/src/sdk.ts","webpack://__ember_auto_import__/src/stack-parsers.ts","webpack://__ember_auto_import__/src/tracing/backgroundtab.ts","webpack://__ember_auto_import__/src/tracing/browserTracingIntegration.ts","webpack://__ember_auto_import__/src/tracing/linkedTraces.ts","webpack://__ember_auto_import__/src/tracing/reportPageLoaded.ts","webpack://__ember_auto_import__/src/tracing/request.ts","webpack://__ember_auto_import__/src/tracing/setActiveSpan.ts","webpack://__ember_auto_import__/src/tracing/utils.ts","webpack://__ember_auto_import__/src/transports/fetch.ts","webpack://__ember_auto_import__/src/transports/offline.ts","webpack://__ember_auto_import__/src/userfeedback.ts","webpack://__ember_auto_import__/src/utils/detectBrowserExtension.ts","webpack://__ember_auto_import__/src/utils/lazyLoadIntegration.ts","webpack://__ember_auto_import__/src/api.ts","webpack://__ember_auto_import__/src/asyncContext/index.ts","webpack://__ember_auto_import__/src/asyncContext/stackStrategy.ts","webpack://__ember_auto_import__/src/asyncContext/tracing-channel-binding.ts","webpack://__ember_auto_import__/src/attributes.ts","webpack://__ember_auto_import__/src/breadcrumbs.ts","webpack://__ember_auto_import__/src/carrier.ts","webpack://__ember_auto_import__/src/checkin.ts","webpack://__ember_auto_import__/src/constants.ts","webpack://__ember_auto_import__/src/currentScopes.ts","webpack://__ember_auto_import__/src/defaultScopes.ts","webpack://__ember_auto_import__/src/envelope.ts","webpack://__ember_auto_import__/src/eventProcessors.ts","webpack://__ember_auto_import__/src/exports.ts","webpack://__ember_auto_import__/src/feedback.ts","webpack://__ember_auto_import__/src/fetch.ts","webpack://__ember_auto_import__/src/instrument/console.ts","webpack://__ember_auto_import__/src/instrument/fetch.ts","webpack://__ember_auto_import__/src/instrument/globalError.ts","webpack://__ember_auto_import__/src/instrument/globalUnhandledRejection.ts","webpack://__ember_auto_import__/src/instrument/handlers.ts","webpack://__ember_auto_import__/src/integration.ts","webpack://__ember_auto_import__/src/integrations/captureconsole.ts","webpack://__ember_auto_import__/src/integrations/consola.ts","webpack://__ember_auto_import__/src/integrations/console.ts","webpack://__ember_auto_import__/src/integrations/conversationId.ts","webpack://__ember_auto_import__/src/integrations/dedupe.ts","webpack://__ember_auto_import__/src/integrations/eventFilters.ts","webpack://__ember_auto_import__/src/integrations/express/index.ts","webpack://__ember_auto_import__/src/integrations/express/patch-layer.ts","webpack://__ember_auto_import__/src/integrations/express/request-layer-store.ts","webpack://__ember_auto_import__/src/integrations/express/set-sdk-processing-metadata.ts","webpack://__ember_auto_import__/src/integrations/express/types.ts","webpack://__ember_auto_import__/src/integrations/express/utils.ts","webpack://__ember_auto_import__/src/integrations/extraerrordata.ts","webpack://__ember_auto_import__/src/integrations/featureFlags/featureFlagsIntegration.ts","webpack://__ember_auto_import__/src/integrations/featureFlags/growthbook.ts","webpack://__ember_auto_import__/src/integrations/functiontostring.ts","webpack://__ember_auto_import__/src/integrations/http/add-outgoing-request-breadcrumb.ts","webpack://__ember_auto_import__/src/integrations/http/client-patch.ts","webpack://__ember_auto_import__/src/integrations/http/client-subscriptions.ts","webpack://__ember_auto_import__/src/integrations/http/constants.ts","webpack://__ember_auto_import__/src/integrations/http/double-wrap-warning.ts","webpack://__ember_auto_import__/src/integrations/http/get-outgoing-span-data.ts","webpack://__ember_auto_import__/src/integrations/http/get-request-url.ts","webpack://__ember_auto_import__/src/integrations/http/inject-trace-propagation-headers.ts","webpack://__ember_auto_import__/src/integrations/http/patch-request-to-capture-body.ts","webpack://__ember_auto_import__/src/integrations/http/record-request-session.ts","webpack://__ember_auto_import__/src/integrations/http/server-subscription.ts","webpack://__ember_auto_import__/src/integrations/mcp-server/attributeExtraction.ts","webpack://__ember_auto_import__/src/integrations/mcp-server/attributes.ts","webpack://__ember_auto_import__/src/integrations/mcp-server/correlation.ts","webpack://__ember_auto_import__/src/integrations/mcp-server/errorCapture.ts","webpack://__ember_auto_import__/src/integrations/mcp-server/handlers.ts","webpack://__ember_auto_import__/src/integrations/mcp-server/index.ts","webpack://__ember_auto_import__/src/integrations/mcp-server/methodConfig.ts","webpack://__ember_auto_import__/src/integrations/mcp-server/piiFiltering.ts","webpack://__ember_auto_import__/src/integrations/mcp-server/resultExtraction.ts","webpack://__ember_auto_import__/src/integrations/mcp-server/sessionExtraction.ts","webpack://__ember_auto_import__/src/integrations/mcp-server/sessionManagement.ts","webpack://__ember_auto_import__/src/integrations/mcp-server/spans.ts","webpack://__ember_auto_import__/src/integrations/mcp-server/transport.ts","webpack://__ember_auto_import__/src/integrations/mcp-server/validation.ts","webpack://__ember_auto_import__/src/integrations/moduleMetadata.ts","webpack://__ember_auto_import__/src/integrations/postgresjs.ts","webpack://__ember_auto_import__/src/integrations/requestdata.ts","webpack://__ember_auto_import__/src/integrations/rewriteframes.ts","webpack://__ember_auto_import__/src/integrations/spanStreaming.ts","webpack://__ember_auto_import__/src/integrations/supabase.ts","webpack://__ember_auto_import__/src/integrations/third-party-errors-filter.ts","webpack://__ember_auto_import__/src/integrations/zoderrors.ts","webpack://__ember_auto_import__/src/logs/console-integration.ts","webpack://__ember_auto_import__/src/logs/constants.ts","webpack://__ember_auto_import__/src/logs/envelope.ts","webpack://__ember_auto_import__/src/logs/internal.ts","webpack://__ember_auto_import__/src/logs/public-api.ts","webpack://__ember_auto_import__/src/logs/utils.ts","webpack://__ember_auto_import__/src/metadata.ts","webpack://__ember_auto_import__/src/metrics/envelope.ts","webpack://__ember_auto_import__/src/metrics/internal.ts","webpack://__ember_auto_import__/src/metrics/public-api.ts","webpack://__ember_auto_import__/src/monitor.ts","webpack://__ember_auto_import__/src/profiling.ts","webpack://__ember_auto_import__/src/scope.ts","webpack://__ember_auto_import__/src/semanticAttributes.ts","webpack://__ember_auto_import__/src/server-runtime-client.ts","webpack://__ember_auto_import__/src/session.ts","webpack://__ember_auto_import__/src/spanKind.ts","webpack://__ember_auto_import__/src/tracing/ai/gen-ai-attributes.ts","webpack://__ember_auto_import__/src/tracing/ai/mediaStripping.ts","webpack://__ember_auto_import__/src/tracing/ai/messageTruncation.ts","webpack://__ember_auto_import__/src/tracing/ai/utils.ts","webpack://__ember_auto_import__/src/tracing/anthropic-ai/constants.ts","webpack://__ember_auto_import__/src/tracing/anthropic-ai/index.ts","webpack://__ember_auto_import__/src/tracing/anthropic-ai/streaming.ts","webpack://__ember_auto_import__/src/tracing/anthropic-ai/utils.ts","webpack://__ember_auto_import__/src/tracing/bindScopeToEmitter.ts","webpack://__ember_auto_import__/src/tracing/deferSegmentSpanCapture.ts","webpack://__ember_auto_import__/src/tracing/dynamicSamplingContext.ts","webpack://__ember_auto_import__/src/tracing/errors.ts","webpack://__ember_auto_import__/src/tracing/google-genai/constants.ts","webpack://__ember_auto_import__/src/tracing/google-genai/index.ts","webpack://__ember_auto_import__/src/tracing/google-genai/streaming.ts","webpack://__ember_auto_import__/src/tracing/google-genai/utils.ts","webpack://__ember_auto_import__/src/tracing/idleSpan.ts","webpack://__ember_auto_import__/src/tracing/langchain/constants.ts","webpack://__ember_auto_import__/src/tracing/langchain/embeddings.ts","webpack://__ember_auto_import__/src/tracing/langchain/index.ts","webpack://__ember_auto_import__/src/tracing/langchain/utils.ts","webpack://__ember_auto_import__/src/tracing/langgraph/constants.ts","webpack://__ember_auto_import__/src/tracing/langgraph/index.ts","webpack://__ember_auto_import__/src/tracing/langgraph/utils.ts","webpack://__ember_auto_import__/src/tracing/logSpans.ts","webpack://__ember_auto_import__/src/tracing/measurement.ts","webpack://__ember_auto_import__/src/tracing/openai/constants.ts","webpack://__ember_auto_import__/src/tracing/openai/index.ts","webpack://__ember_auto_import__/src/tracing/openai/streaming.ts","webpack://__ember_auto_import__/src/tracing/openai/utils.ts","webpack://__ember_auto_import__/src/tracing/sampling.ts","webpack://__ember_auto_import__/src/tracing/segmentSpanCaptureStrategy.ts","webpack://__ember_auto_import__/src/tracing/sentryNonRecordingSpan.ts","webpack://__ember_auto_import__/src/tracing/sentrySpan.ts","webpack://__ember_auto_import__/src/tracing/spans/beforeSendSpan.ts","webpack://__ember_auto_import__/src/tracing/spans/captureSpan.ts","webpack://__ember_auto_import__/src/tracing/spans/envelope.ts","webpack://__ember_auto_import__/src/tracing/spans/estimateSize.ts","webpack://__ember_auto_import__/src/tracing/spans/extractGenAiSpans.ts","webpack://__ember_auto_import__/src/tracing/spans/hasSpanStreamingEnabled.ts","webpack://__ember_auto_import__/src/tracing/spans/scopeContextAttributes.ts","webpack://__ember_auto_import__/src/tracing/spans/spanBuffer.ts","webpack://__ember_auto_import__/src/tracing/spans/spanJsonToStreamedSpan.ts","webpack://__ember_auto_import__/src/tracing/spanstatus.ts","webpack://__ember_auto_import__/src/tracing/trace.ts","webpack://__ember_auto_import__/src/tracing/vercel-ai/constants.ts","webpack://__ember_auto_import__/src/tracing/vercel-ai/index.ts","webpack://__ember_auto_import__/src/tracing/vercel-ai/utils.ts","webpack://__ember_auto_import__/src/tracing/vercel-ai/vercel-ai-attributes.ts","webpack://__ember_auto_import__/src/tracing/workers-ai/constants.ts","webpack://__ember_auto_import__/src/tracing/workers-ai/index.ts","webpack://__ember_auto_import__/src/tracing/workers-ai/streaming.ts","webpack://__ember_auto_import__/src/tracing/workers-ai/utils.ts","webpack://__ember_auto_import__/src/transports/base.ts","webpack://__ember_auto_import__/src/transports/multiplexed.ts","webpack://__ember_auto_import__/src/transports/userAgent.ts","webpack://__ember_auto_import__/src/trpc.ts","webpack://__ember_auto_import__/src/utils/aggregate-errors.ts","webpack://__ember_auto_import__/src/utils/ai/providerSkip.ts","webpack://__ember_auto_import__/src/utils/anr.ts","webpack://__ember_auto_import__/src/utils/array.ts","webpack://__ember_auto_import__/src/utils/baggage.ts","webpack://__ember_auto_import__/src/utils/breadcrumb-log-level.ts","webpack://__ember_auto_import__/src/utils/browser.ts","webpack://__ember_auto_import__/src/utils/chain-and-copy-promiselike.ts","webpack://__ember_auto_import__/src/utils/clientreport.ts","webpack://__ember_auto_import__/src/utils/cookie.ts","webpack://__ember_auto_import__/src/utils/data-collection/defaultPiiToCollectionOptions.ts","webpack://__ember_auto_import__/src/utils/data-collection/filterCookies.ts","webpack://__ember_auto_import__/src/utils/data-collection/filterKeyValueData.ts","webpack://__ember_auto_import__/src/utils/data-collection/filterQueryParams.ts","webpack://__ember_auto_import__/src/utils/data-collection/filtering-snippets.ts","webpack://__ember_auto_import__/src/utils/data-collection/resolveDataCollectionOptions.ts","webpack://__ember_auto_import__/src/utils/debounce.ts","webpack://__ember_auto_import__/src/utils/debug-ids.ts","webpack://__ember_auto_import__/src/utils/debug-logger.ts","webpack://__ember_auto_import__/src/utils/dsn.ts","webpack://__ember_auto_import__/src/utils/env.ts","webpack://__ember_auto_import__/src/utils/envToBool.ts","webpack://__ember_auto_import__/src/utils/envelope.ts","webpack://__ember_auto_import__/src/utils/error.ts","webpack://__ember_auto_import__/src/utils/eventUtils.ts","webpack://__ember_auto_import__/src/utils/eventbuilder.ts","webpack://__ember_auto_import__/src/utils/exports.ts","webpack://__ember_auto_import__/src/utils/featureFlags.ts","webpack://__ember_auto_import__/src/utils/flushIfServerless.ts","webpack://__ember_auto_import__/src/utils/get-default-export.ts","webpack://__ember_auto_import__/src/utils/handleCallbackErrors.ts","webpack://__ember_auto_import__/src/utils/hasSpansEnabled.ts","webpack://__ember_auto_import__/src/utils/ipAddress.ts","webpack://__ember_auto_import__/src/utils/is.ts","webpack://__ember_auto_import__/src/utils/isBrowser.ts","webpack://__ember_auto_import__/src/utils/isSentryRequestUrl.ts","webpack://__ember_auto_import__/src/utils/lru.ts","webpack://__ember_auto_import__/src/utils/merge.ts","webpack://__ember_auto_import__/src/utils/meta.ts","webpack://__ember_auto_import__/src/utils/misc.ts","webpack://__ember_auto_import__/src/utils/node-stack-trace.ts","webpack://__ember_auto_import__/src/utils/node.ts","webpack://__ember_auto_import__/src/utils/normalizationHints.ts","webpack://__ember_auto_import__/src/utils/normalize.ts","webpack://__ember_auto_import__/src/utils/object.ts","webpack://__ember_auto_import__/src/utils/parameterize.ts","webpack://__ember_auto_import__/src/utils/parseSampleRate.ts","webpack://__ember_auto_import__/src/utils/path.ts","webpack://__ember_auto_import__/src/utils/prepareEvent.ts","webpack://__ember_auto_import__/src/utils/promisebuffer.ts","webpack://__ember_auto_import__/src/utils/propagationContext.ts","webpack://__ember_auto_import__/src/utils/randomSafeContext.ts","webpack://__ember_auto_import__/src/utils/ratelimit.ts","webpack://__ember_auto_import__/src/utils/request.ts","webpack://__ember_auto_import__/src/utils/scopeData.ts","webpack://__ember_auto_import__/src/utils/sdkMetadata.ts","webpack://__ember_auto_import__/src/utils/severity.ts","webpack://__ember_auto_import__/src/utils/should-ignore-span.ts","webpack://__ember_auto_import__/src/utils/spanOnScope.ts","webpack://__ember_auto_import__/src/utils/spanUtils.ts","webpack://__ember_auto_import__/src/utils/sql.ts","webpack://__ember_auto_import__/src/utils/stacktrace.ts","webpack://__ember_auto_import__/src/utils/string.ts","webpack://__ember_auto_import__/src/utils/supports.ts","webpack://__ember_auto_import__/src/utils/syncpromise.ts","webpack://__ember_auto_import__/src/utils/time.ts","webpack://__ember_auto_import__/src/utils/timer.ts","webpack://__ember_auto_import__/src/utils/timestampSequence.ts","webpack://__ember_auto_import__/src/utils/trace-info.ts","webpack://__ember_auto_import__/src/utils/traceData.ts","webpack://__ember_auto_import__/src/utils/tracePropagationTargets.ts","webpack://__ember_auto_import__/src/utils/tracing.ts","webpack://__ember_auto_import__/src/utils/transactionEvent.ts","webpack://__ember_auto_import__/src/utils/tunnel.ts","webpack://__ember_auto_import__/src/utils/url.ts","webpack://__ember_auto_import__/src/utils/vercelWaitUntil.ts","webpack://__ember_auto_import__/src/utils/version.ts","webpack://__ember_auto_import__/src/utils/weakRef.ts","webpack://__ember_auto_import__/src/utils/worldwide.ts","webpack://__ember_auto_import__/src/vendor/escapeStringForRegex.ts","webpack://__ember_auto_import__/src/vendor/getIpAddress.ts","webpack://__ember_auto_import__/src/constants/index.ts","webpack://__ember_auto_import__/src/util/createFeedbackError.ts","webpack://__ember_auto_import__/src/core/sendFeedback.ts","webpack://__ember_auto_import__/src/util/debug-build.ts","webpack://__ember_auto_import__/src/util/mergeOptions.ts","webpack://__ember_auto_import__/src/util/setAttributesNS.ts","webpack://__ember_auto_import__/src/core/createMainStyles.ts","webpack://__ember_auto_import__/node_modules/preact/dist/preact.mjs","webpack://__ember_auto_import__/node_modules/preact/hooks/dist/hooks.mjs","webpack://__ember_auto_import__/src/modal/components/SentryLogo.ts","webpack://__ember_auto_import__/src/modal/components/DialogHeader.tsx","webpack://__ember_auto_import__/src/modal/components/Form.tsx","webpack://__ember_auto_import__/src/util/validate.ts","webpack://__ember_auto_import__/src/modal/components/SuccessIcon.ts","webpack://__ember_auto_import__/src/modal/components/Dialog.tsx","webpack://__ember_auto_import__/src/screenshot/components/ScreenshotInput.css.ts","webpack://__ember_auto_import__/src/screenshot/components/ScreenshotEditor.tsx","webpack://__ember_auto_import__/src/screenshot/components/useTakeScreenshot.tsx","webpack://__ember_auto_import__/src/screenshot/components/Toolbar.tsx","webpack://__ember_auto_import__/src/screenshot/components/IconClose.tsx","webpack://__ember_auto_import__/src/core/integration.ts","webpack://__ember_auto_import__/src/util/isScreenshotSupported.ts","webpack://__ember_auto_import__/src/core/components/Actor.ts","webpack://__ember_auto_import__/src/core/components/FeedbackIcon.ts","webpack://__ember_auto_import__/src/core/components/Actor.css.ts","webpack://__ember_auto_import__/src/modal/integration.tsx","webpack://__ember_auto_import__/src/modal/components/Dialog.css.ts","webpack://__ember_auto_import__/src/screenshot/integration.ts","webpack://__ember_auto_import__/src/core/getFeedback.ts","webpack://__ember_auto_import__/node_modules/@sentry/rrweb/dist/canvas-manager-B7mHazUr.js","webpack://__ember_auto_import__/node_modules/@sentry/rrweb/dist/rrweb.js","webpack://__ember_auto_import__/src/canvas.ts","webpack://__ember_auto_import__/src/util/timestamp.ts","webpack://__ember_auto_import__/src/coreHandlers/util/addBreadcrumbEvent.ts","webpack://__ember_auto_import__/src/coreHandlers/util/domUtils.ts","webpack://__ember_auto_import__/src/coreHandlers/util/onWindowOpen.ts","webpack://__ember_auto_import__/src/coreHandlers/handleClick.ts","webpack://__ember_auto_import__/src/util/createBreadcrumb.ts","webpack://__ember_auto_import__/node_modules/@sentry/rrweb-snapshot/dist/rrweb-snapshot.js","webpack://__ember_auto_import__/src/coreHandlers/util/getAttributesToRecord.ts","webpack://__ember_auto_import__/src/coreHandlers/handleDom.ts","webpack://__ember_auto_import__/src/util/createPerformanceEntries.ts","webpack://__ember_auto_import__/src/util/logger.ts","webpack://__ember_auto_import__/src/eventBuffer/error.ts","webpack://__ember_auto_import__/src/eventBuffer/EventBufferArray.ts","webpack://__ember_auto_import__/src/eventBuffer/WorkerHandler.ts","webpack://__ember_auto_import__/src/eventBuffer/EventBufferCompressionWorker.ts","webpack://__ember_auto_import__/src/eventBuffer/EventBufferProxy.ts","webpack://__ember_auto_import__/src/util/hasSessionStorage.ts","webpack://__ember_auto_import__/src/util/isSampled.ts","webpack://__ember_auto_import__/src/session/saveSession.ts","webpack://__ember_auto_import__/src/session/Session.ts","webpack://__ember_auto_import__/src/session/createSession.ts","webpack://__ember_auto_import__/src/util/isExpired.ts","webpack://__ember_auto_import__/src/session/shouldRefreshSession.ts","webpack://__ember_auto_import__/src/util/isSessionExpired.ts","webpack://__ember_auto_import__/src/session/loadOrCreateSession.ts","webpack://__ember_auto_import__/src/session/fetchSession.ts","webpack://__ember_auto_import__/src/util/addEvent.ts","webpack://__ember_auto_import__/src/coreHandlers/util/addSegmentDetailsToContext.ts","webpack://__ember_auto_import__/src/util/eventUtils.ts","webpack://__ember_auto_import__/src/coreHandlers/handleBreadcrumbs.ts","webpack://__ember_auto_import__/src/util/resetReplayIdOnDynamicSamplingContext.ts","webpack://__ember_auto_import__/src/util/createPerformanceSpans.ts","webpack://__ember_auto_import__/src/coreHandlers/util/addNetworkBreadcrumb.ts","webpack://__ember_auto_import__/src/util/shouldFilterRequest.ts","webpack://__ember_auto_import__/src/coreHandlers/util/networkUtils.ts","webpack://__ember_auto_import__/src/coreHandlers/util/fetchUtils.ts","webpack://__ember_auto_import__/src/util/addGlobalListeners.ts","webpack://__ember_auto_import__/src/coreHandlers/handleHistory.ts","webpack://__ember_auto_import__/src/coreHandlers/handleNetworkBreadcrumbs.ts","webpack://__ember_auto_import__/src/coreHandlers/util/xhrUtils.ts","webpack://__ember_auto_import__/src/coreHandlers/handleGlobalEvent.ts","webpack://__ember_auto_import__/src/coreHandlers/util/addFeedbackBreadcrumb.ts","webpack://__ember_auto_import__/src/util/isRrwebError.ts","webpack://__ember_auto_import__/src/coreHandlers/util/shouldSampleForBufferEvent.ts","webpack://__ember_auto_import__/src/coreHandlers/handleBeforeSendEvent.ts","webpack://__ember_auto_import__/src/coreHandlers/handleAfterSendEvent.ts","webpack://__ember_auto_import__/src/coreHandlers/handleProcessSegmentSpan.ts","webpack://__ember_auto_import__/src/util/addMemoryEntry.ts","webpack://__ember_auto_import__/src/util/getRecordingSamplingOptions.ts","webpack://__ember_auto_import__/src/util/handleRecordingEmit.ts","webpack://__ember_auto_import__/src/types/rrweb.ts","webpack://__ember_auto_import__/src/util/sendReplayRequest.ts","webpack://__ember_auto_import__/src/util/sendReplay.ts","webpack://__ember_auto_import__/src/util/prepareRecordingData.ts","webpack://__ember_auto_import__/src/util/prepareReplayEvent.ts","webpack://__ember_auto_import__/src/util/createReplayEnvelope.ts","webpack://__ember_auto_import__/src/util/throttle.ts","webpack://__ember_auto_import__/src/replay.ts","webpack://__ember_auto_import__/src/util/debounce.ts","webpack://__ember_auto_import__/src/coreHandlers/handleKeyboardEvent.ts","webpack://__ember_auto_import__/src/session/clearSession.ts","webpack://__ember_auto_import__/src/eventBuffer/index.ts","webpack://__ember_auto_import__/replay-worker/build/esm/index.js","webpack://__ember_auto_import__/replay-worker/build/esm/worker.ts","webpack://__ember_auto_import__/src/coreHandlers/performanceObserver.ts","webpack://__ember_auto_import__/src/util/rrweb.ts","webpack://__ember_auto_import__/src/util/getPrivacyOptions.ts","webpack://__ember_auto_import__/src/util/maskAttribute.ts","webpack://__ember_auto_import__/src/util/getReplay.ts","webpack://__ember_auto_import__/node_modules/@warp-drive/core-types/dist/-private.js","webpack://__ember_auto_import__/node_modules/@warp-drive/core-types/dist/request.js","webpack://__ember_auto_import__/node_modules/@warp-drive/core-types/dist/runtime.js","webpack://__ember_auto_import__/node_modules/@warp-drive/core-types/dist/symbols.js","webpack://__ember_auto_import__/js/src/util.js","webpack://__ember_auto_import__/js/src/alert.js","webpack://__ember_auto_import__/js/src/button.js","webpack://__ember_auto_import__/js/src/carousel.js","webpack://__ember_auto_import__/js/src/collapse.js","webpack://__ember_auto_import__/js/src/dropdown.js","webpack://__ember_auto_import__/js/src/modal.js","webpack://__ember_auto_import__/js/src/tools/sanitizer.js","webpack://__ember_auto_import__/js/src/tooltip.js","webpack://__ember_auto_import__/js/src/popover.js","webpack://__ember_auto_import__/js/src/scrollspy.js","webpack://__ember_auto_import__/js/src/tab.js","webpack://__ember_auto_import__/js/src/toast.js","webpack://__ember_auto_import__/src/utils.ts","webpack://__ember_auto_import__/src/tags.ts","webpack://__ember_auto_import__/src/attrs.ts","webpack://__ember_auto_import__/src/regexp.ts","webpack://__ember_auto_import__/src/purify.ts","webpack://__ember_auto_import__/node_modules/ember-auto-import/node_modules/@embroider/macros/src/addon/es-compat2.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__/src/-private/helpers.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/external/environment.js","webpack://__ember_auto_import__/src/-private/ember-environment.js","webpack://__ember_auto_import__/src/-private/external/yieldables.js","webpack://__ember_auto_import__/src/-private/utils.js","webpack://__ember_auto_import__/src/-private/external/scheduler/policies/bounded-policy.js","webpack://__ember_auto_import__/src/-private/external/scheduler/policies/execution-states.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/keep-latest-policy.js","webpack://__ember_auto_import__/src/-private/external/scheduler/policies/restartable-policy.js","webpack://__ember_auto_import__/src/-private/task-properties.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/default-state.js","webpack://__ember_auto_import__/src/-private/external/task-instance/cancelation.js","webpack://__ember_auto_import__/src/-private/external/task/taskable.js","webpack://__ember_auto_import__/src/-private/external/generator-state.js","webpack://__ember_auto_import__/src/-private/external/task-instance/initial-state.js","webpack://__ember_auto_import__/src/-private/external/task-instance/executor.js","webpack://__ember_auto_import__/src/-private/external/task/task.js","webpack://__ember_auto_import__/src/-private/external/task/task-group.js","webpack://__ember_auto_import__/src/-private/external/task-factory.js","webpack://__ember_auto_import__/src/-private/external/task-decorators.js","webpack://__ember_auto_import__/src/-private/scheduler/ember-scheduler.js","webpack://__ember_auto_import__/src/-private/external/task-instance/base.js","webpack://__ember_auto_import__/src/-private/tracked-state.js","webpack://__ember_auto_import__/src/-private/task-instance.js","webpack://__ember_auto_import__/src/-private/taskable-mixin.js","webpack://__ember_auto_import__/src/-private/task.js","webpack://__ember_auto_import__/src/-private/task-group.js","webpack://__ember_auto_import__/src/-private/task-factory.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/ember-cli-deprecation-workflow/src/index.js","webpack://__ember_auto_import__/src/components/flash-message.gts","webpack://__ember_auto_import__/src/flash/object.ts","webpack://__ember_auto_import__/src/services/flash-messages.ts","webpack://__ember_auto_import__/src/-private/async-arrow-runtime.js","webpack://__ember_auto_import__/node_modules/@ember-data/json-api/dist/index.js","webpack://__ember_auto_import__/node_modules/@ember-data/legacy-compat/dist/index.js","webpack://__ember_auto_import__/node_modules/@ember-data/request/dist/fetch.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__/src/modifiers/focus-trap.ts","webpack://__ember_auto_import__/src/helpers/pluralize.js","webpack://__ember_auto_import__/src/helpers/singularize.js","webpack://__ember_auto_import__/src/lib/utils/make-helper.js","webpack://__ember_auto_import__/node_modules/ember-lifeline/dist/utils/get-task.js","webpack://__ember_auto_import__/node_modules/ember-lifeline/dist/cancel-task.js","webpack://__ember_auto_import__/node_modules/ember-lifeline/dist/run-task.js","webpack://__ember_auto_import__/node_modules/ember-lifeline/dist/schedule-task.js","webpack://__ember_auto_import__/node_modules/ember-lifeline/dist/throttle-task.js","webpack://__ember_auto_import__/node_modules/ember-lifeline/dist/poll-task.js","webpack://__ember_auto_import__/node_modules/ember-lifeline/dist/debounce-task.js","webpack://__ember_auto_import__/node_modules/ember-lifeline/dist/utils/get-timeout-or-test-fallback.js","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.gts","webpack://__ember_auto_import__/src/components/power-select/before-options.gts","webpack://__ember_auto_import__/src/components/power-select/input.gts","webpack://__ember_auto_import__/src/components/power-select/label.gts","webpack://__ember_auto_import__/src/components/power-select/no-matches-message.gts","webpack://__ember_auto_import__/src/components/power-select/options.gts","webpack://__ember_auto_import__/src/components/power-select/placeholder.gts","webpack://__ember_auto_import__/src/components/power-select/power-select-group.gts","webpack://__ember_auto_import__/src/components/power-select/search-message.gts","webpack://__ember_auto_import__/src/components/power-select/trigger.gts","webpack://__ember_auto_import__/src/helpers/ember-power-select-is-array.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/equal.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/base.ts","webpack://__ember_auto_import__/src/configuration.js","webpack://__ember_auto_import__/src/-internals/event-target.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/internal-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/adaptive.ts","webpack://__ember_auto_import__/src/session-stores/base.ts","webpack://__ember_auto_import__/src/session-stores/cookie.ts","webpack://__ember_auto_import__/src/session-stores/ephemeral.ts","webpack://__ember_auto_import__/src/session-stores/local-storage.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/jquery/dist/jquery.js","webpack://__ember_auto_import__/node_modules/json-to-ast/build.js","webpack://__ember_auto_import__/node_modules/moment-timezone/index.js","webpack://__ember_auto_import__/node_modules/moment-timezone/moment-timezone.js","webpack://__ember_auto_import__/node_modules/moment/locale/af.js","webpack://__ember_auto_import__/node_modules/moment/locale/ar-dz.js","webpack://__ember_auto_import__/node_modules/moment/locale/ar-kw.js","webpack://__ember_auto_import__/node_modules/moment/locale/ar-ly.js","webpack://__ember_auto_import__/node_modules/moment/locale/ar-ma.js","webpack://__ember_auto_import__/node_modules/moment/locale/ar-ps.js","webpack://__ember_auto_import__/node_modules/moment/locale/ar-sa.js","webpack://__ember_auto_import__/node_modules/moment/locale/ar-tn.js","webpack://__ember_auto_import__/node_modules/moment/locale/ar.js","webpack://__ember_auto_import__/node_modules/moment/locale/az.js","webpack://__ember_auto_import__/node_modules/moment/locale/be.js","webpack://__ember_auto_import__/node_modules/moment/locale/bg.js","webpack://__ember_auto_import__/node_modules/moment/locale/bm.js","webpack://__ember_auto_import__/node_modules/moment/locale/bn-bd.js","webpack://__ember_auto_import__/node_modules/moment/locale/bn.js","webpack://__ember_auto_import__/node_modules/moment/locale/bo.js","webpack://__ember_auto_import__/node_modules/moment/locale/br.js","webpack://__ember_auto_import__/node_modules/moment/locale/bs.js","webpack://__ember_auto_import__/node_modules/moment/locale/ca.js","webpack://__ember_auto_import__/node_modules/moment/locale/cs.js","webpack://__ember_auto_import__/node_modules/moment/locale/cv.js","webpack://__ember_auto_import__/node_modules/moment/locale/cy.js","webpack://__ember_auto_import__/node_modules/moment/locale/da.js","webpack://__ember_auto_import__/node_modules/moment/locale/de-at.js","webpack://__ember_auto_import__/node_modules/moment/locale/de-ch.js","webpack://__ember_auto_import__/node_modules/moment/locale/de.js","webpack://__ember_auto_import__/node_modules/moment/locale/dv.js","webpack://__ember_auto_import__/node_modules/moment/locale/el.js","webpack://__ember_auto_import__/node_modules/moment/locale/en-au.js","webpack://__ember_auto_import__/node_modules/moment/locale/en-ca.js","webpack://__ember_auto_import__/node_modules/moment/locale/en-gb.js","webpack://__ember_auto_import__/node_modules/moment/locale/en-ie.js","webpack://__ember_auto_import__/node_modules/moment/locale/en-il.js","webpack://__ember_auto_import__/node_modules/moment/locale/en-in.js","webpack://__ember_auto_import__/node_modules/moment/locale/en-nz.js","webpack://__ember_auto_import__/node_modules/moment/locale/en-sg.js","webpack://__ember_auto_import__/node_modules/moment/locale/eo.js","webpack://__ember_auto_import__/node_modules/moment/locale/es-do.js","webpack://__ember_auto_import__/node_modules/moment/locale/es-mx.js","webpack://__ember_auto_import__/node_modules/moment/locale/es-us.js","webpack://__ember_auto_import__/node_modules/moment/locale/es.js","webpack://__ember_auto_import__/node_modules/moment/locale/et.js","webpack://__ember_auto_import__/node_modules/moment/locale/eu.js","webpack://__ember_auto_import__/node_modules/moment/locale/fa.js","webpack://__ember_auto_import__/node_modules/moment/locale/fi.js","webpack://__ember_auto_import__/node_modules/moment/locale/fil.js","webpack://__ember_auto_import__/node_modules/moment/locale/fo.js","webpack://__ember_auto_import__/node_modules/moment/locale/fr-ca.js","webpack://__ember_auto_import__/node_modules/moment/locale/fr-ch.js","webpack://__ember_auto_import__/node_modules/moment/locale/fr.js","webpack://__ember_auto_import__/node_modules/moment/locale/fy.js","webpack://__ember_auto_import__/node_modules/moment/locale/ga.js","webpack://__ember_auto_import__/node_modules/moment/locale/gd.js","webpack://__ember_auto_import__/node_modules/moment/locale/gl.js","webpack://__ember_auto_import__/node_modules/moment/locale/gom-deva.js","webpack://__ember_auto_import__/node_modules/moment/locale/gom-latn.js","webpack://__ember_auto_import__/node_modules/moment/locale/gu.js","webpack://__ember_auto_import__/node_modules/moment/locale/he.js","webpack://__ember_auto_import__/node_modules/moment/locale/hi.js","webpack://__ember_auto_import__/node_modules/moment/locale/hr.js","webpack://__ember_auto_import__/node_modules/moment/locale/hu.js","webpack://__ember_auto_import__/node_modules/moment/locale/hy-am.js","webpack://__ember_auto_import__/node_modules/moment/locale/id.js","webpack://__ember_auto_import__/node_modules/moment/locale/is.js","webpack://__ember_auto_import__/node_modules/moment/locale/it-ch.js","webpack://__ember_auto_import__/node_modules/moment/locale/it.js","webpack://__ember_auto_import__/node_modules/moment/locale/ja.js","webpack://__ember_auto_import__/node_modules/moment/locale/jv.js","webpack://__ember_auto_import__/node_modules/moment/locale/ka.js","webpack://__ember_auto_import__/node_modules/moment/locale/kk.js","webpack://__ember_auto_import__/node_modules/moment/locale/km.js","webpack://__ember_auto_import__/node_modules/moment/locale/kn.js","webpack://__ember_auto_import__/node_modules/moment/locale/ko.js","webpack://__ember_auto_import__/node_modules/moment/locale/ku-kmr.js","webpack://__ember_auto_import__/node_modules/moment/locale/ku.js","webpack://__ember_auto_import__/node_modules/moment/locale/ky.js","webpack://__ember_auto_import__/node_modules/moment/locale/lb.js","webpack://__ember_auto_import__/node_modules/moment/locale/lo.js","webpack://__ember_auto_import__/node_modules/moment/locale/lt.js","webpack://__ember_auto_import__/node_modules/moment/locale/lv.js","webpack://__ember_auto_import__/node_modules/moment/locale/me.js","webpack://__ember_auto_import__/node_modules/moment/locale/mi.js","webpack://__ember_auto_import__/node_modules/moment/locale/mk.js","webpack://__ember_auto_import__/node_modules/moment/locale/ml.js","webpack://__ember_auto_import__/node_modules/moment/locale/mn.js","webpack://__ember_auto_import__/node_modules/moment/locale/mr.js","webpack://__ember_auto_import__/node_modules/moment/locale/ms-my.js","webpack://__ember_auto_import__/node_modules/moment/locale/ms.js","webpack://__ember_auto_import__/node_modules/moment/locale/mt.js","webpack://__ember_auto_import__/node_modules/moment/locale/my.js","webpack://__ember_auto_import__/node_modules/moment/locale/nb.js","webpack://__ember_auto_import__/node_modules/moment/locale/ne.js","webpack://__ember_auto_import__/node_modules/moment/locale/nl-be.js","webpack://__ember_auto_import__/node_modules/moment/locale/nl.js","webpack://__ember_auto_import__/node_modules/moment/locale/nn.js","webpack://__ember_auto_import__/node_modules/moment/locale/oc-lnc.js","webpack://__ember_auto_import__/node_modules/moment/locale/pa-in.js","webpack://__ember_auto_import__/node_modules/moment/locale/pl.js","webpack://__ember_auto_import__/node_modules/moment/locale/pt-br.js","webpack://__ember_auto_import__/node_modules/moment/locale/pt.js","webpack://__ember_auto_import__/node_modules/moment/locale/ro.js","webpack://__ember_auto_import__/node_modules/moment/locale/ru.js","webpack://__ember_auto_import__/node_modules/moment/locale/sd.js","webpack://__ember_auto_import__/node_modules/moment/locale/se.js","webpack://__ember_auto_import__/node_modules/moment/locale/si.js","webpack://__ember_auto_import__/node_modules/moment/locale/sk.js","webpack://__ember_auto_import__/node_modules/moment/locale/sl.js","webpack://__ember_auto_import__/node_modules/moment/locale/sq.js","webpack://__ember_auto_import__/node_modules/moment/locale/sr-cyrl.js","webpack://__ember_auto_import__/node_modules/moment/locale/sr.js","webpack://__ember_auto_import__/node_modules/moment/locale/ss.js","webpack://__ember_auto_import__/node_modules/moment/locale/sv.js","webpack://__ember_auto_import__/node_modules/moment/locale/sw.js","webpack://__ember_auto_import__/node_modules/moment/locale/ta.js","webpack://__ember_auto_import__/node_modules/moment/locale/te.js","webpack://__ember_auto_import__/node_modules/moment/locale/tet.js","webpack://__ember_auto_import__/node_modules/moment/locale/tg.js","webpack://__ember_auto_import__/node_modules/moment/locale/th.js","webpack://__ember_auto_import__/node_modules/moment/locale/tk.js","webpack://__ember_auto_import__/node_modules/moment/locale/tl-ph.js","webpack://__ember_auto_import__/node_modules/moment/locale/tlh.js","webpack://__ember_auto_import__/node_modules/moment/locale/tr.js","webpack://__ember_auto_import__/node_modules/moment/locale/tzl.js","webpack://__ember_auto_import__/node_modules/moment/locale/tzm-latn.js","webpack://__ember_auto_import__/node_modules/moment/locale/tzm.js","webpack://__ember_auto_import__/node_modules/moment/locale/ug-cn.js","webpack://__ember_auto_import__/node_modules/moment/locale/uk.js","webpack://__ember_auto_import__/node_modules/moment/locale/ur.js","webpack://__ember_auto_import__/node_modules/moment/locale/uz-latn.js","webpack://__ember_auto_import__/node_modules/moment/locale/uz.js","webpack://__ember_auto_import__/node_modules/moment/locale/vi.js","webpack://__ember_auto_import__/node_modules/moment/locale/x-pseudo.js","webpack://__ember_auto_import__/node_modules/moment/locale/yo.js","webpack://__ember_auto_import__/node_modules/moment/locale/zh-cn.js","webpack://__ember_auto_import__/node_modules/moment/locale/zh-hk.js","webpack://__ember_auto_import__/node_modules/moment/locale/zh-mo.js","webpack://__ember_auto_import__/node_modules/moment/locale/zh-tw.js","webpack://__ember_auto_import__/node_modules/moment/moment.js","webpack://__ember_auto_import__/src/utils/isBrowser.js","webpack://__ember_auto_import__/src/utils/debounce.js","webpack://__ember_auto_import__/src/utils/isFunction.js","webpack://__ember_auto_import__/src/utils/getStyleComputedProperty.js","webpack://__ember_auto_import__/src/utils/getParentNode.js","webpack://__ember_auto_import__/src/utils/getScrollParent.js","webpack://__ember_auto_import__/src/utils/getReferenceNode.js","webpack://__ember_auto_import__/src/utils/isIE.js","webpack://__ember_auto_import__/src/utils/getOffsetParent.js","webpack://__ember_auto_import__/src/utils/getRoot.js","webpack://__ember_auto_import__/src/utils/findCommonOffsetParent.js","webpack://__ember_auto_import__/src/utils/isOffsetContainer.js","webpack://__ember_auto_import__/src/utils/getScroll.js","webpack://__ember_auto_import__/src/utils/getBordersSize.js","webpack://__ember_auto_import__/src/utils/getWindowSizes.js","webpack://__ember_auto_import__/src/utils/getClientRect.js","webpack://__ember_auto_import__/src/utils/getBoundingClientRect.js","webpack://__ember_auto_import__/src/utils/getOffsetRectRelativeToArbitraryNode.js","webpack://__ember_auto_import__/src/utils/includeScroll.js","webpack://__ember_auto_import__/src/utils/isFixed.js","webpack://__ember_auto_import__/src/utils/getFixedPositionOffsetParent.js","webpack://__ember_auto_import__/src/utils/getBoundaries.js","webpack://__ember_auto_import__/src/utils/getViewportOffsetRectRelativeToArtbitraryNode.js","webpack://__ember_auto_import__/src/utils/computeAutoPlacement.js","webpack://__ember_auto_import__/src/utils/getReferenceOffsets.js","webpack://__ember_auto_import__/src/utils/getOuterSizes.js","webpack://__ember_auto_import__/src/utils/getOppositePlacement.js","webpack://__ember_auto_import__/src/utils/getPopperOffsets.js","webpack://__ember_auto_import__/src/utils/find.js","webpack://__ember_auto_import__/src/utils/runModifiers.js","webpack://__ember_auto_import__/src/utils/findIndex.js","webpack://__ember_auto_import__/src/methods/update.js","webpack://__ember_auto_import__/src/utils/isModifierEnabled.js","webpack://__ember_auto_import__/src/utils/getSupportedPropertyName.js","webpack://__ember_auto_import__/src/methods/destroy.js","webpack://__ember_auto_import__/src/utils/getWindow.js","webpack://__ember_auto_import__/src/utils/setupEventListeners.js","webpack://__ember_auto_import__/src/methods/enableEventListeners.js","webpack://__ember_auto_import__/src/methods/disableEventListeners.js","webpack://__ember_auto_import__/src/utils/removeEventListeners.js","webpack://__ember_auto_import__/src/utils/isNumeric.js","webpack://__ember_auto_import__/src/utils/setStyles.js","webpack://__ember_auto_import__/src/modifiers/computeStyle.js","webpack://__ember_auto_import__/src/utils/isModifierRequired.js","webpack://__ember_auto_import__/src/methods/placements.js","webpack://__ember_auto_import__/src/utils/clockwise.js","webpack://__ember_auto_import__/src/modifiers/index.js","webpack://__ember_auto_import__/src/methods/defaults.js","webpack://__ember_auto_import__/src/modifiers/shift.js","webpack://__ember_auto_import__/src/modifiers/offset.js","webpack://__ember_auto_import__/src/modifiers/preventOverflow.js","webpack://__ember_auto_import__/src/modifiers/keepTogether.js","webpack://__ember_auto_import__/src/modifiers/arrow.js","webpack://__ember_auto_import__/src/modifiers/flip.js","webpack://__ember_auto_import__/src/utils/getOppositeVariation.js","webpack://__ember_auto_import__/src/modifiers/inner.js","webpack://__ember_auto_import__/src/modifiers/hide.js","webpack://__ember_auto_import__/src/utils/getRoundedOffsets.js","webpack://__ember_auto_import__/src/modifiers/applyStyle.js","webpack://__ember_auto_import__/src/utils/setAttributes.js","webpack://__ember_auto_import__/popper/src/utils/isFunction.js","webpack://__ember_auto_import__/src/-private/map.ts","webpack://__ember_auto_import__/src/-private/set.ts","webpack://__ember_auto_import__/src/-private/array.ts","webpack://__ember_auto_import__/src/-private/object.ts","webpack://__ember_auto_import__/src/-private/decorator.ts","webpack://__ember_auto_import__/node_modules/@sentry/conventions/dist/attributes.cjs","webpack://__ember_auto_import__/src/cache.ts","webpack://__ember_auto_import__/src/index.ts","webpack://__ember_auto_import__/src/runtime.ts","webpack://__ember_auto_import__/node_modules/ember-load-initializers/dist/index.js","webpack://__ember_auto_import__/src/defaults.ts","webpack://__ember_auto_import__/src/rules.ts","webpack://__ember_auto_import__/src/Tokenizer.ts","webpack://__ember_auto_import__/src/Lexer.ts","webpack://__ember_auto_import__/src/Renderer.ts","webpack://__ember_auto_import__/src/TextRenderer.ts","webpack://__ember_auto_import__/src/Parser.ts","webpack://__ember_auto_import__/src/Hooks.ts","webpack://__ember_auto_import__/src/Instance.ts","webpack://__ember_auto_import__/src/marked.ts"],"sourcesContent":["import { getOrSetGlobal } from '@warp-drive/core-types/-private';\nimport { macroCondition, getGlobalConfig } from '@embroider/macros';\n\n/**\n  @module @ember-data/adapter/error\n */\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    this.description = error.description;\n    this.fileName = error.fileName;\n    this.lineNumber = error.lineNumber;\n    this.message = error.message;\n    this.name = error.name;\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  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 Ember Data to correctly map errors to their corresponding\n  properties on the model, Ember Data 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  ```app/models/post.js\n  import Model, { attr } from '@ember-data/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  ```app/adapters/post.js\n  import RSVP from 'RSVP';\n  import RESTAdapter from '@ember-data/adapter/rest';\n  import { InvalidError } from '@ember-data/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  @extends AdapterError\n*/\n// TODO @deprecate extractError documentation\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  ```app/routes/application.js\n  import { TimeoutError } from '@ember-data/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  @extends AdapterError\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  @extends AdapterError\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  ```app/routes/application.js\n  import { UnauthorizedError } from '@ember-data/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  @extends AdapterError\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  @extends AdapterError\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  ```app/routes/post.js\n  import { NotFoundError } from '@ember-data/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  @extends AdapterError\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  @extends AdapterError\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  @extends AdapterError\n*/\nconst ServerError = getOrSetGlobal('ServerError', extend(AdapterError, 'The adapter operation failed due to a server error'));\nServerError.prototype.code = 'ServerError';\nexport { AbortError, ConflictError, ForbiddenError, InvalidError, NotFoundError, ServerError, TimeoutError, UnauthorizedError, AdapterError as default };","import { warn } from '@ember/debug';\nimport { macroCondition, getGlobalConfig } from '@embroider/macros';\nimport { upgradeStore } from '@ember-data/legacy-compat/-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  upgradeStore(store);\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 Mixin from '@ember/object/mixin';\nimport { camelize, pluralize } from '@ember-data/request-utils/string';\n\n/**\n  @module @ember-data/adapter\n*/\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    @method buildURL\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    @method _buildURL\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   ```app/adapters/user.js\n   import JSONAPIAdapter from '@ember-data/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   @method urlForFindRecord\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   ```app/adapters/comment.js\n   import JSONAPIAdapter from '@ember-data/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   @method urlForFindAll\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   ```app/adapters/application.js\n   import RESTAdapter from '@ember-data/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   @method urlForQuery\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   ```app/adapters/application.js\n   import RESTAdapter from '@ember-data/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   @method urlForQueryRecord\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   ```app/adapters/application.js\n   import RESTAdapter from '@ember-data/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   @method urlForFindMany\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   ```app/adapters/application.js\n   import JSONAPIAdapter from '@ember-data/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   @method urlForFindHasMany\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   ```app/adapters/application.js\n   import JSONAPIAdapter from '@ember-data/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   @method urlForFindBelongsTo\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   ```app/adapters/application.js\n   import RESTAdapter from '@ember-data/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   @method urlForCreateRecord\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   ```app/adapters/application.js\n   import RESTAdapter from '@ember-data/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   @method urlForUpdateRecord\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   ```app/adapters/application.js\n   import RESTAdapter from '@ember-data/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   @method urlForDeleteRecord\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    @method urlPrefix\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    ```app/adapters/application.js\n    import RESTAdapter from '@ember-data/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    @method pathForType\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);\nexport { BuildURLMixin as B };","import EmberObject from '@ember/object';\nimport * as s from '@ember/service';\nimport { macroCondition, getGlobalConfig } from '@embroider/macros';\nimport '@ember/debug';\nimport \"./build-url-mixin-DWfVjH3O.js\";\nimport '@ember-data/legacy-compat/-private';\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 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}\n\n/**\n  ## Overview\n\n  <blockquote style=\"margin: 1em; padding: .1em 1em .1em 1em; border-left: solid 1em #E34C32; background: #e0e0e0;\">\n  <p>\n    ⚠️ <strong>This is LEGACY documentation</strong> 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    <a href=\"/ember-data/release/classes/%3CInterface%3E%20Handler\">Handler</a> instead to be used with the <a href=\"https://github.com/emberjs/data/tree/main/packages/request#readme\">RequestManager</a>\n  </p>\n  </blockquote>\n\n  In order to properly fetch and update data, EmberData\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\n  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  [<Interface> Adapter](/ember-data/release/classes/%3CInterface%3E%20Adapter) 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 EmberData 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 EmberData 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  ```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 @ember-data/adapter\n  @main @ember-data/adapter\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 [<Interface> Adapter](/ember-data/release/classes/%3CInterface%3E%20Adapter)\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  ```app/adapters/application.js\n  import Adapter from '@ember-data/adapter';\n\n  export default Adapter.extend({\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  ```app/adapters/post.js\n  import Adapter from '@ember-data/adapter';\n\n  export default Adapter.extend({\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  @class Adapter\n  @public\n  @extends Ember.EmberObject\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     ```app/adapters/application.js\n    import Adapter from '@ember-data/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     @method findRecord\n    @param {Store} store\n    @param {Model} type\n    @param {String} id\n    @param {Snapshot} snapshot\n    @return {Promise} promise\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     ```app/adapters/application.js\n    import Adapter from '@ember-data/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     @method findAll\n    @param {Store} store\n    @param {Model} type\n    @param {null} neverSet a value is never provided to this argument\n    @param {SnapshotRecordArray} snapshotRecordArray\n    @return {Promise} promise\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     ```app/adapters/application.js\n    import Adapter from '@ember-data/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     @method query\n    @param {Store} store\n    @param {Model} type\n    @param {Object} query\n    @param {Collection} recordArray\n    @param {Object} adapterOptions\n    @return {Promise} promise\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     ```app/adapters/application.js\n    import Adapter, { BuildURLMixin } from '@ember-data/adapter';\n    import RSVP from 'RSVP';\n    import $ from 'jquery';\n     export default class ApplicationAdapter extends Adapter.extend(BuildURLMixin) {\n      queryRecord(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     @method queryRecord\n    @param {Store} store\n    @param {subclass of Model} type\n    @param {Object} query\n    @param {Object} adapterOptions\n    @return {Promise} promise\n    @public\n  */\n  // @ts-expect-error\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 '@ember-data/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     @method generateIdForRecord\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     ```app/adapters/application.js\n    import Adapter from '@ember-data/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     @method serialize\n    @param {Snapshot} snapshot\n    @param {Object}   options\n    @return {Object} serialized snapshot\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     ```app/adapters/application.js\n    import Adapter from '@ember-data/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     @method createRecord\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  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 Ember Data 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    Ember Data store will assume all of the updates were successfully\n    applied on the backend.\n     Example\n     ```app/adapters/application.js\n    import Adapter from '@ember-data/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     @method updateRecord\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     ```app/adapters/application.js\n    import Adapter from '@ember-data/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     @method deleteRecord\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     ```app/adapters/application.js\n    import Adapter from '@ember-data/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     @method findMany\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     @method groupRecordsForFindMany\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    @method shouldReloadRecord\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    @method shouldReloadAll\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    @method shouldBackgroundReloadRecord\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    @method shouldBackgroundReloadAll\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 as A, decorateMethodV2 as d };","import { getOwner } from '@ember/application';\nimport { warn } from '@ember/debug';\nimport { computed } from '@ember/object';\nimport { b as serializeIntoHash, d as determineBodyPromise, g as getFetchFunction, s as serializeQueryParams, p as parseResponseHeaders } from \"./serialize-into-hash-DIFDGeuT.js\";\nimport { B as BuildURLMixin } from \"./build-url-mixin-DWfVjH3O.js\";\nimport AdapterError, { InvalidError, ServerError, ConflictError, NotFoundError, ForbiddenError, UnauthorizedError, TimeoutError, AbortError } from \"./error.js\";\nimport { A as Adapter, d as decorateMethodV2 } from \"./index-DokvKSvT.js\";\nimport { macroCondition, getGlobalConfig } from '@embroider/macros';\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/**\n  @module @ember-data/adapter/rest\n*/\n/**\n * <blockquote style=\"margin: 1em; padding: .1em 1em .1em 1em; border-left: solid 1em #E34C32; background: #e0e0e0;\">\n  <p>\n    ⚠️ <strong>This is LEGACY documentation</strong> 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    <a href=\"/ember-data/release/classes/%3CInterface%3E%20Handler\">Handler</a> instead to be used with the <a href=\"https://github.com/emberjs/data/tree/main/packages/request#readme\">RequestManager</a>\n  </p>\n  </blockquote>\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, Ember Data 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  ```app/models/person.js\n  import Model, { attr } from '@ember-data/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. Ember Data 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  ```app/adapters/application.js\n  import RESTAdapter from '@ember-data/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  ```app/adapters/application.js\n  import RESTAdapter from '@ember-data/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 EmberData will send them along with each ajax request.\n\n\n  ```app/adapters/application.js\n  import RESTAdapter from '@ember-data/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  @class RESTAdapter\n  @main @ember-data/adapter/rest\n  @public\n  @constructor\n  @extends Adapter\n  @uses BuildURLMixin\n*/\nclass RESTAdapter extends Adapter.extend(BuildURLMixin) {\n  /**\n    This property allows ajax to still be used instead when `false`.\n     @property useFetch\n    @type {Boolean}\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     ```app/adapters/application.js\n    import RESTAdapter from '@ember-data/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     @method sortQueryParams\n    @param {Object} obj\n    @return {Object}\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     @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 = 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     ```app/adapters/application.js\n    import RESTAdapter from '@ember-data/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     @property namespace\n    @public\n    @type {String}\n  */\n\n  /**\n    An adapter can target other hosts by setting the `host` property.\n     ```app/adapters/application.js\n    import RESTAdapter from '@ember-data/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     @property host\n    @public\n    @type {String}\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 Ember Data will send them\n    along with each ajax request. For dynamic headers see [headers\n    customization](/ember-data/release/classes/RESTAdapter).\n     ```app/adapters/application.js\n    import RESTAdapter from '@ember-data/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     @property headers\n    @public\n    @type {Object}\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    @method findRecord\n    @public\n    @param {Store} store\n    @param {Model} type\n    @param {String} id\n    @param {Snapshot} snapshot\n    @return {Promise} promise\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     @method findAll\n    @public\n    @param {Store} store\n    @param {Model} type\n    @param {undefined} neverSet a value is never provided to this argument\n    @param {SnapshotRecordArray} snapshotRecordArray\n    @return {Promise} promise\n  */\n  findAll(store, type, sinceToken, snapshotRecordArray) {\n    const query = this.buildQuery(snapshotRecordArray);\n    const url = this.buildURL(type.modelName, null, snapshotRecordArray, 'findAll');\n    if (sinceToken) {\n      query.since = sinceToken;\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 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     @method query\n    @public\n    @param {Store} store\n    @param {Model} type\n    @param {Object} query\n    @param {Collection} recordArray\n    @param {Object} adapterOptions\n    @return {Promise} promise\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    @method queryRecord\n    @public\n    @param {Store} store\n    @param {Model} type\n    @param {Object} query\n    @param {Object} adapterOptions\n    @return {Promise} promise\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     @method findMany\n    @public\n    @param {Store} store\n    @param {Model} type\n    @param {Array} ids\n    @param {Array} snapshots\n    @return {Promise} promise\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     @method findHasMany\n    @public\n    @param {Store} store\n    @param {Snapshot} snapshot\n    @param {String} url\n    @param {Object} relationship meta object describing the relationship\n    @return {Promise} promise\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     @method findBelongsTo\n    @public\n    @param {Store} store\n    @param {Snapshot} snapshot\n    @param {String} url\n    @param {Object} relationship meta object describing the relationship\n    @return {Promise} promise\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     @method createRecord\n    @public\n    @param {Store} store\n    @param {Model} type\n    @param {Snapshot} snapshot\n    @return {Promise} promise\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     @method updateRecord\n    @public\n    @param {Store} store\n    @param {Model} schema\n    @param {Snapshot} snapshot\n    @return {Promise} promise\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     @method deleteRecord\n    @public\n    @param {Store} store\n    @param {Model} type\n    @param {Snapshot} snapshot\n    @return {Promise} promise\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  _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     @method groupRecordsForFindMany\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    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    @method handleResponse\n    @public\n    @param  {Number} status\n    @param  {Object} headers\n    @param  {Object} payload\n    @param  {Object} requestData - the original request information\n    @return {Object | AdapterError} response\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      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    @method isSuccess\n    @public\n    @param  {Number} status\n    @param  {Object} headers\n    @param  {Object} payload\n    @return {Boolean}\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    @method isInvalid\n    @public\n    @param  {Number} status\n    @param  {Object} headers\n    @param  {Object} payload\n    @return {Boolean}\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, Ember Data 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     @method ajax\n    @private\n    @param {String} url\n    @param {String} type The request type GET, POST, PUT, DELETE etc.\n    @param {Object} options\n    @return {Promise} promise\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    @method _ajaxRequest\n    @private\n    @param {Object} 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  _fetchRequest(options) {\n    const fetchFunction = getFetchFunction();\n    return fetchFunction(options.url, options);\n  }\n  _ajax(options) {\n    if (this.useFetch) {\n      void this._fetchRequest(options);\n    } else {\n      this._ajaxRequest(options);\n    }\n  }\n\n  /**\n    @method ajaxOptions\n    @private\n    @param {String} url\n    @param {String} type The request type GET, POST, PUT, DELETE etc.\n    @param {Object} options\n    @return {Object}\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  _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 Ember Data 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    @method parseErrorResponse\n    @private\n    @param {String} responseText\n    @return {Object}\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    @method normalizeErrorResponse\n    @private\n    @param  {Number} status\n    @param  {Object} headers\n    @param  {Object} payload\n    @return {Array} 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     @method generatedDetailedMessage\n    @private\n    @param  {Number} status\n    @param  {Object} headers\n    @param  {Object} payload\n    @param  {Object} requestData\n    @return {String} 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     @method buildQuery\n    @since 2.5.0\n    @public\n    @param  {Snapshot} snapshot\n    @return {Object}\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 * @method fetchOptions\n * @for @ember-data/adapter/rest\n * @param {Object} _options\n * @param {Adapter} adapter\n * @private\n * @return {Object}\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, Ember Data 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 as default, 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 { capitalize, underscore } from '@ember-data/request-utils/string';\nimport { recordIdentifierFor } from '@ember-data/store';\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\n/**\n  # Overview\n\n  This package provides the `DataAdapter` which the [Ember Inspector](https://github.com/emberjs/ember-inspector)\n  uses to subscribe and retrieve information for the `data` tab in the inspector.\n\n  This package adds roughly .6 KB when minified and compressed to your application in production; however,\n  you can opt out of shipping this addon in production via options in `ember-cli-build.js`\n\n  ```js\n  let app = new EmberApp(defaults, {\n    emberData: {\n      includeDataAdapterInProduction: false\n    }\n  });\n  ```\n\n  When using `ember-data` as a dependency of your app, the default is to ship the inspector support to production.\n\n  When not using `ember-data` as a dependency but instead using EmberData via declaring specific `@ember-data/<package>`\n  dependencies the default is to not ship to production.\n\n  @module @ember-data/debug\n  @main @ember-data/debug\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    @internal\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  @class InspectorDataAdapter\n  @extends DataAdapter\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     @method getFilters\n    @private\n    @return {Array} 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     @method watchModelTypes\n    @private\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    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    Object.keys(store.identifierCache._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   * @method watchTypeIfUnseen\n   * @param {store} store\n   * @param {Map} discoveredTypes\n   * @param {String} type\n   * @param {Function} typesAdded\n   * @param {Function} typesUpdated\n   * @param {Array} releaseMethods\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     @method columnNameToDesc\n    @private\n    @param {String} name The attribute name\n    @return {String} 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     @method columnsForType\n    @private\n    @param {Model} typeClass\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(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     @method getRecords\n    @private\n    @param {Model} modelClass of the record\n    @param {String} modelName of the record\n    @return {Array} 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     @method getRecordColumnValues\n    @private\n    @param {Model} record to get values from\n    @return {Object} 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     @method getRecordKeywords\n    @private\n    @param {Model} record\n    @return {Array} 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     @method getRecordFilterValues\n    @private\n    @param {Model} record\n    @return {Object} 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     @method getRecordColor\n    @private\n    @param {Model} record\n    @return {String} 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     @method observeRecord\n    @private\n    @param {Model} record\n    @param {Function} recordUpdated Callback used to notify changes\n    @return {Function} 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 dataAdapter = macroCondition(getGlobalConfig().WarpDrive.includeDataAdapter) ? InspectorDataAdapter : null;\nexport { dataAdapter as default };","import { deprecate, warn, inspect } from '@ember/debug';\nimport { peekCache } from '@ember-data/store/-private';\nimport { macroCondition, getGlobalConfig } from '@embroider/macros';\nimport { getOrSetGlobal, peekTransient, setTransient } from '@warp-drive/core-types/-private';\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. EmberData 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 isNew(identifier) {\n  if (!identifier.id) {\n    return true;\n  }\n  const cache = peekCache(identifier);\n  return Boolean(cache?.isNew(identifier));\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 identifier = relationship.identifier;\n  const key = relationship.definition.key;\n  if (identifier === 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(identifier)} ${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(identifier)} ${key}`);\n    }\n  }\n  graph.store.notifyChange(identifier, 'relationships', key);\n}\nfunction assertRelationshipData(store, identifier, data, meta) {\n  macroCondition(getGlobalConfig().WarpDrive.env.DEBUG) ? (test => {\n    if (!test) {\n      throw new Error(`A ${identifier.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 <${identifier.type}:${String(identifier.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 <${identifier.type}:${String(identifier.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 '${identifier.type}.${meta.key}' ${meta.kind} relationship on <${identifier.type}:${String(identifier.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 <${identifier.type}:${String(identifier.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 *\n * @class UpgradedMeta\n * @internal\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.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.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.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 EmberData 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 EmberData 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, identifier, propertyName, isImplicit = false) {\n  const cache = graph._definitionCache;\n  const storeWrapper = graph.store;\n  const polymorphicLookup = graph._potentialPolymorphicTypes;\n  const {\n    type\n  } = identifier;\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(identifier);\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 = relationships.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), identifier, 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        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      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, 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 ${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      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      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 EmberData 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 identifiers = 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 = identifier => {\n    // Since we are diffing against the remote state, we check\n    // if our previous local state did not contain this identifier\n    const removalsHas = removals?.has(identifier);\n    if (removalsHas || !additions?.has(identifier)) {\n      if (type !== identifier.type) {\n        if (macroCondition(getGlobalConfig().WarpDrive.env.DEBUG)) {\n          assertPolymorphicType(relationship.identifier, relationship.definition, identifier, graph.store);\n        }\n        graph.registerPolymorphicType(type, identifier.type);\n      }\n\n      // we've added a record locally that wasn't in the local state before\n      localBecameDirty = true;\n      addToInverse(graph, identifier, inverseKey, op.record, isRemote);\n      if (removalsHas) {\n        removals.delete(identifier);\n      }\n    }\n  };\n  const onRemove = identifier => {\n    // Since we are diffing against the remote state, we check\n    // if our previous local state had contained this identifier\n    const additionsHas = additions?.has(identifier);\n    if (additionsHas || !removals?.has(identifier)) {\n      // we've removed a record locally that was in the local state before\n      localBecameDirty = true;\n      removeFromInverse(graph, identifier, inverseKey, record, isRemote);\n      if (additionsHas) {\n        additions.delete(identifier);\n      }\n    }\n  };\n  const diff = diffCollection(identifiers, 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(identifier => {\n      if (!diff.add.has(identifier)) {\n        localBecameDirty = true;\n        onRemove(identifier);\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(identifier => {\n      if (!diff.del.has(identifier)) {\n        localBecameDirty = true;\n        onAdd(identifier);\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 identifiers = 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(identifiers, relationship, identifier => {\n    if (type !== identifier.type) {\n      if (macroCondition(getGlobalConfig().WarpDrive.env.DEBUG)) {\n        assertPolymorphicType(relationship.identifier, relationship.definition, identifier, graph.store);\n      }\n      graph.registerPolymorphicType(type, identifier.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(identifier)) {\n      relationship.additions.delete(identifier);\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, identifier, definition.inverseKey, op.record, isRemote);\n  }, identifier => {\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(identifier)) {\n      relationship.removals.delete(identifier);\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, identifier, 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(identifier => {\n          deprecationInfo.triggered = true;\n          deprecationInfo.removals.push(identifier);\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, identifier, definition.inverseKey, op.record, false);\n        });\n        relationship.removals = null;\n      }\n      if (relationship.additions) {\n        relationship.additions.forEach(identifier => {\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 (!isNew(identifier)) {\n            deprecationInfo.triggered = true;\n            deprecationInfo.additions.push(identifier);\n            relationship.isDirty = true;\n            relationship.additions.delete(identifier);\n            removeFromInverse(graph, identifier, 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(`EmberData 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, identifier, key, value, isRemote) {\n  const relationship = graph.get(identifier, 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, identifier, 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, identifier, 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, identifier, 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, identifier, key, value, isRemote) {\n  const relationship = graph.get(identifier, key);\n  if (isHasMany(relationship) && isRemote && relationship.remoteMembers.has(value)) {\n    notifyChange(graph, relationship);\n  }\n}\nfunction removeFromInverse(graph, identifier, key, value, isRemote) {\n  const relationship = graph.get(identifier, 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 EmberData 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 && isNew(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(`EmberData 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 && isNew(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(`EmberData 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, identifier, field, relationship) {\n  if (isBelongsTo(relationship)) {\n    replaceRelatedRecord(graph, {\n      op: 'replaceRelatedRecord',\n      record: identifier,\n      field,\n      value: relationship.remoteState\n    }, false);\n  } else {\n    replaceRelatedRecords(graph, {\n      op: 'replaceRelatedRecords',\n      record: identifier,\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}\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 = source.links;\n  }\n  if (source.meta) {\n    payload.meta = source.meta;\n  }\n  return payload;\n}\nfunction createImplicitEdge(definition, identifier) {\n  return {\n    definition,\n    identifier,\n    localMembers: new Set(),\n    remoteMembers: new Set()\n  };\n}\n\n/*\n * @module @ember-data/graph\n *\n * Stores the data for one side of a \"single\" resource relationship.\n *\n * @class ResourceEdge\n * @internal\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.identifierCache;\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.identifierCache.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. EmberData 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.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(identifier, propertyName) {\n    const relationships = this.identifiers.get(identifier);\n    if (!relationships) {\n      return false;\n    }\n    return relationships[propertyName] !== undefined;\n  }\n  getDefinition(identifier, propertyName) {\n    let defs = this._metaCache[identifier.type];\n    let meta = defs?.[propertyName];\n    if (!meta) {\n      const info = /*#__NOINLINE__*/upgradeDefinition(this, identifier, propertyName);\n      macroCondition(getGlobalConfig().WarpDrive.env.DEBUG) ? (test => {\n        if (!test) {\n          throw new Error(`Could not determine relationship information for ${identifier.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, identifier.type, propertyName) ? info.lhs_definition : info.rhs_definition;\n      defs = this._metaCache[identifier.type] = defs || {};\n      defs[propertyName] = meta;\n    }\n    return meta;\n  }\n  get(identifier, 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(identifier);\n    if (!relationships) {\n      relationships = Object.create(null);\n      this.identifiers.set(identifier, relationships);\n    }\n    let relationship = relationships[propertyName];\n    if (!relationship) {\n      const meta = this.getDefinition(identifier, propertyName);\n      if (meta.kind === 'belongsTo') {\n        relationship = relationships[propertyName] = createResourceEdge(meta, identifier);\n      } else if (meta.kind === 'hasMany') {\n        relationship = relationships[propertyName] = createCollectionEdge(meta, identifier);\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, identifier);\n      }\n    }\n    return relationship;\n  }\n  getData(identifier, propertyName) {\n    const relationship = this.get(identifier, 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(identifier, propertyName) {\n    const relationship = this.get(identifier, 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\n  /*\n   TODO move this comment somewhere else\n   implicit relationships are relationships which have not been declared but the inverse side exists on\n   another record somewhere\n    For example if there was:\n    ```app/models/comment.js\n   import Model, { attr } from '@ember-data/model';\n    export default class Comment extends Model {\n     @attr text;\n   }\n   ```\n    and there is also:\n    ```app/models/post.js\n   import Model, { attr, hasMany } from '@ember-data/model';\n    export default class Post extends Model {\n     @attr title;\n     @hasMany('comment', { async: true, inverse: null }) comments;\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\n  isReleasable(identifier) {\n    const relationships = this.identifiers.get(identifier);\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(identifier)}`);\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 && !isNew(identifier)) {\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(identifier)}`);\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(identifier)}`);\n      }\n    }\n    return true;\n  }\n  unload(identifier, 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(identifier)}`);\n      }\n    }\n    const relationships = this.identifiers.get(identifier);\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(identifier, field) {\n    const relationships = this.identifiers.get(identifier);\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(identifier) {\n    const relationships = this.identifiers.get(identifier);\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(identifier) {\n    const relationships = this.identifiers.get(identifier);\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(identifier, keys[i])) {\n        return true;\n      }\n    }\n    return false;\n  }\n  rollback(identifier) {\n    const relationships = this.identifiers.get(identifier);\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(identifier, field)) {\n        rollbackRelationship(this, identifier, field, relationship);\n        changed.push(field);\n      }\n    }\n    return changed;\n  }\n  remove(identifier) {\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(identifier)}`);\n      }\n    }\n    macroCondition(getGlobalConfig().WarpDrive.env.DEBUG) ? (test => {\n      if (!test) {\n        throw new Error(`Cannot remove ${String(identifier)} while still removing ${String(this._removing)}`);\n      }\n    })(!this._removing) : {};\n    this._removing = identifier;\n    this.unload(identifier);\n    this.identifiers.delete(identifier);\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  ops.forEach(type => {\n    type.forEach(opList => {\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, identifier, 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 || identifier === relationship.localState) {\n    /*#__NOINLINE__*/removeDematerializedInverse(graph, relationship, identifier, 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 && isNew(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 && !isNew(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 && isNew(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/**\n * <p align=\"center\">\n  <img\n    class=\"project-logo\"\n    src=\"https://raw.githubusercontent.com/emberjs/data/4612c9354e4c54d53327ec2cf21955075ce21294/ember-data-logo-light.svg#gh-light-mode-only\"\n    alt=\"EmberData\"\n    width=\"240px\"\n    title=\"EmberData\"\n    />\n</p>\n\n<p align=\"center\">Provides a performance tuned normalized graph for intelligently managing relationships between resources based on identity</p>\n\nWhile this Graph is abstract, it currently is a private implementation required as a peer-dependency by the [JSON:API Cache Implementation](https://github.com/emberjs/data/tree/main/packages/json-api).\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## Installation\n\nInstall using your javascript package manager of choice. For instance with [pnpm](https://pnpm.io/)\n\n```no-highlight\npnpm add @ember-data/graph\n```\n\n  @module @ember-data/graph\n  @main @ember-data/graph\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 { SOURCE, coerceId } from '@ember-data/store/-private';\nimport { warn } from '@ember/debug';\nimport { macroCondition, getGlobalConfig, dependencySatisfies, importSync } from '@embroider/macros';\nimport { createDeferred } from '@ember-data/request';\nimport { getOrSetGlobal } from '@warp-drive/core-types/-private';\n\n/**\n  @module @ember-data/legacy-compat\n*/\n\n/**\n  SnapshotRecordArray is not directly instantiable.\n  Instances are provided to consuming application's\n  adapters for certain `findAll` requests.\n\n  @class SnapshotRecordArray\n  @public\n*/\nclass SnapshotRecordArray {\n  /**\n    SnapshotRecordArray is not directly instantiable.\n    Instances are provided to consuming application's\n    adapters and serializers for certain requests.\n     @method constructor\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    /**\n      An array of snapshots\n      @private\n      @property _snapshots\n      @type {Array}\n    */\n    this._snapshots = null;\n\n    /**\n    The modelName of the underlying records for the snapshots in the array, as a Model\n    @property modelName\n    @public\n    @type {Model}\n    */\n    this.modelName = type;\n\n    /**\n      A hash of adapter options passed into the store method for this request.\n       Example\n       ```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       @property adapterOptions\n      @public\n      @type {Object}\n    */\n    this.adapterOptions = options.adapterOptions;\n\n    /**\n      The relationships to include for this request.\n       Example\n       ```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       @property include\n      @public\n      @type {String|Array}\n    */\n    this.include = options.include;\n  }\n\n  /**\n    An array of records\n     @property _recordArray\n    @private\n    @type {Array}\n  */\n  get _recordArray() {\n    return this.__store.peekAll(this.modelName);\n  }\n\n  /**\n      Number of records in the array\n       Example\n       ```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       @property length\n      @public\n      @type {Number}\n    */\n  get length() {\n    return this._recordArray.length;\n  }\n\n  /**\n    Get snapshots of the underlying record array\n     Example\n     ```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     @method snapshots\n    @public\n    @return {Array} 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    this._snapshots = this._recordArray[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  @module @ember-data/store\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  @class Snapshot\n  @public\n*/\nclass Snapshot {\n  /**\n   * @method constructor\n   * @constructor\n   * @private\n   * @param options\n   * @param identifier\n   * @param _store\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    const hasRecord = !!store._instanceCache.peek(identifier);\n    this.modelName = identifier.type;\n\n    /**\n      The unique RecordIdentifier associated with this Snapshot.\n       @property identifier\n      @public\n      @type {StableRecordIdentifier}\n    */\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\n    /**\n     The id of the snapshot's underlying record\n      Example\n      ```javascript\n     // store.push('post', { id: 1, author: 'Tomster', title: 'Ember.js rocks' });\n     postSnapshot.id; // => '1'\n     ```\n      @property id\n     @type {String}\n     @public\n     */\n    this.id = identifier.id;\n\n    /**\n     A hash of adapter options\n     @property adapterOptions\n     @type {Object}\n     @public\n     */\n    this.adapterOptions = options.adapterOptions;\n\n    /**\n     If `include` was passed to the options hash for the request, the value\n     would be available here.\n      @property include\n     @type {String|Array}\n     @public\n     */\n    this.include = options.include;\n\n    /**\n     The name of the type of the underlying record for this snapshot, as a string.\n      @property modelName\n     @type {String}\n     @public\n     */\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    Example\n    ```javascript\n   let json = snapshot.record.toJSON();\n   ```\n    @property record\n   @type {Model}\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  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 attrs = this._store.schema.fields(identifier);\n    const cache = this._store.cache;\n    attrs.forEach((field, keyName) => {\n      if (field.kind === 'attribute') {\n        attributes[keyName] = cache.getAttr(identifier, keyName);\n      }\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    @method attr\n   @param {String} keyName\n   @return {Object} 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    Example\n    ```javascript\n   // store.push('post', { id: 1, author: 'Tomster', title: 'Ember.js rocks' });\n   postSnapshot.attributes(); // => { author: 'Tomster', title: 'Ember.js rocks' }\n   ```\n    @method attributes\n   @return {Object} 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    ```javascript\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    @method changedAttributes\n   @return {Object} 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    ```javascript\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    @method belongsTo\n   @param {String} keyName\n   @param {Object} [options]\n   @public\n   @return {(Snapshot|String|null|undefined)} A snapshot or ID of a known\n   relationship or null if the relationship is known but unset. undefined\n   will be returned if the contents of the relationship is 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 the package @ember-data/graph`);\n      }\n    })(dependencySatisfies('@ember-data/graph', '*')) : {};\n    const graphFor = importSync('@ember-data/graph/-private').graphFor;\n    const {\n      identifier\n    } = this;\n    if (macroCondition(getGlobalConfig().WarpDrive.env.DEBUG)) {\n      const relationship = graphFor(this._store).get(identifier, 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.definition.kind === 'belongsTo') : {};\n    }\n    const value = graphFor(this._store).getData(identifier, keyName);\n    const data = value && value.data;\n    const inverseIdentifier = data ? store.identifierCache.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    @method hasMany\n   @param {String} keyName\n   @param {Object} [options]\n   @public\n   @return {(Array|undefined)} 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 the package @ember-data/graph`);\n      }\n    })(dependencySatisfies('@ember-data/graph', '*')) : {};\n    const graphFor = importSync('@ember-data/graph/-private').graphFor;\n    const {\n      identifier\n    } = this;\n    if (macroCondition(getGlobalConfig().WarpDrive.env.DEBUG)) {\n      const relationship = graphFor(this._store).get(identifier, 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.definition.kind === 'hasMany') : {};\n    }\n    const value = graphFor(this._store).getData(identifier, keyName);\n    if (value.data) {\n      results = [];\n      value.data.forEach(member => {\n        const inverseIdentifier = store.identifierCache.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     @method eachAttribute\n    @param {Function} callback the callback to execute\n    @param {Object} [binding] the value to which the callback's `this` should be bound\n    @public\n  */\n  eachAttribute(callback, binding) {\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    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     @method eachRelationship\n    @param {Function} callback the callback to execute\n    @param {Object} [binding] the value to which the callback's `this` should be bound\n    @public\n  */\n  eachRelationship(callback, binding) {\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    Serializes the snapshot using the serializer for the model.\n     Example\n     ```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     @method serialize\n    @param {Object} options\n    @return {Object} 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'));\nclass FetchManager {\n  // fetches pending in the runloop, waiting to be coalesced\n\n  constructor(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     @internal\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 (macroCondition(dependencySatisfies('@ember-data/graph', '*'))) {\n          if (!cache) {\n            const graphFor = importSync('@ember-data/graph/-private').graphFor;\n            const graph = graphFor(store);\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        const {\n          waitForPromise\n        } = importSync('@ember/test-waiters');\n        promise = waitForPromise(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}\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 EmberData.\n *\n  @module @ember-data/legacy-compat\n  @main @ember-data/legacy-compat\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 { setOwner, getOwner } from '@ember/application';\nimport { setRecordIdentifier, StoreMap, setCacheFor } from '@ember-data/store/-private';\nimport { g as getModelFactory } from \"./schema-provider-Bvogtzx9.js\";\nimport { n as normalizeModelName } from \"./model-rk3atPqV.js\";\nimport { macroCondition, getGlobalConfig } from '@embroider/macros';\nfunction instantiateRecord(identifier, createRecordArgs) {\n  const type = identifier.type;\n  const cache = this.cache;\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      cache,\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  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, cache, identifier, store) {\n  setRecordIdentifier(record, identifier);\n  StoreMap.set(record, store);\n  setCacheFor(record, cache);\n}\nexport { instantiateRecord as i, modelFor as m, teardownRecord as t };","import { computed } from '@ember/object';\nimport { recordIdentifierFor } from '@ember-data/store';\nimport { peekCache } from '@ember-data/store/-private';\nimport { j as isElementDescriptor, n as normalizeModelName, l as lookupLegacySupport } from \"./model-rk3atPqV.js\";\nimport { macroCondition, getGlobalConfig } from '@embroider/macros';\nimport { warn, deprecate } from '@ember/debug';\nimport { RecordStore } from '@warp-drive/core-types/symbols';\nimport { singularize, dasherize } from '@ember-data/request-utils/string';\n\n/**\n  @module @ember-data/model\n*/\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      return peekCache(this).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 = peekCache(this);\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 * @typedoc\n */\n\n/**\n  `attr` defines an attribute on a [Model](/ember-data/release/classes/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  EmberData ships with four basic transform types: `string`, `number`,\n  `boolean` and `date`. You can define your own transforms by subclassing\n  [Transform](/ember-data/release/classes/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  ```app/models/user.js\n  import Model, { attr } from '@ember-data/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  ```app/models/user.js\n  import Model, { attr } from '@ember-data/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  ```app/models/post.js\n  import Model, { attr } from '@ember-data/model';\n\n  export default class PostModel extends Model {\n    @attr('text', {\n      uppercase: true\n    })\n    text;\n  }\n  ```\n\n  ```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  @method attr\n  @public\n  @static\n  @for @ember-data/model\n  @param {String|Object} type the attribute type\n  @param {Object} options a hash of options\n  @return {Attribute}\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      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      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 [Model](/ember-data/release/classes/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 '@ember-data/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 '@ember-data/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 '@ember-data/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 '@ember-data/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 '@ember-data/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 '@ember-data/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 '@ember-data/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  EmberData 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 '@ember-data/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 '@ember-data/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  @method belongsTo\n  @public\n  @static\n  @for @ember-data/model\n  @param {string} type (optional) the name of the related resource\n  @param {object} options (optional) a hash of options\n  @return {PropertyDescriptor} relationship\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}\n\n/**\n  @module @ember-data/model\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      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 [Model](/ember-data/release/classes/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 '@ember-data/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 '@ember-data/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 '@ember-data/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 '@ember-data/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 '@ember-data/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 '@ember-data/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 '@ember-data/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  EmberData 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 '@ember-data/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 '@ember-data/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  @method hasMany\n  @public\n  @static\n  @for @ember-data/model\n  @param {string} type (optional) the name of the related resource\n  @param {object} options (optional) a hash of options\n  @return {PropertyDescriptor} relationship\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 as a, belongsTo as b, hasMany as h };","import { deprecate } from '@ember/debug';\nimport { dasherize } from '@ember-data/request-utils/string';\nimport { macroCondition, getGlobalConfig, dependencySatisfies, importSync } from '@embroider/macros';\nimport EmberObject, { computed, get } from '@ember/object';\nimport { recordIdentifierFor as recordIdentifierFor$1, storeFor as storeFor$1 } from '@ember-data/store';\nimport { isStableIdentifier, recordIdentifierFor, storeFor, peekCache, SOURCE, fastPush, RelatedCollection, coerceId } from '@ember-data/store/-private';\nimport { cached, compat, notifySignal } from '@ember-data/tracking';\nimport { defineSignal, subscribed } from '@ember-data/tracking/-private';\nimport { RecordStore } from '@warp-drive/core-types/symbols';\nimport { A } from '@ember/array';\nimport ArrayProxy from '@ember/array/proxy';\nimport { mapBy, not } from '@ember/object/computed';\nimport { upgradeStore } from '@ember-data/legacy-compat/-private';\nimport { getOrSetGlobal } from '@warp-drive/core-types/-private';\nimport { EnableHydration } from '@warp-drive/core-types/request';\nimport PromiseProxyMixin from '@ember/object/promise-proxy-mixin';\nimport ObjectProxy from '@ember/object/proxy';\nimport { cacheFor } from '@ember/object/internals';\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}\nconst PromiseObject = ObjectProxy.extend(PromiseProxyMixin);\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 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}\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/**\n @module @ember-data/model\n */\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  @extends PromiseObject\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\", [cached]);\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  [LegacyPromiseProxy] = true;\n}\n\n/**\n @module @ember-data/model\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  @class PromiseManyArray\n  @public\n*/\nclass PromiseManyArray {\n  constructor(promise, content) {\n    this._update(promise, content);\n    this.isDestroyed = false;\n  }\n\n  /**\n   * Retrieve the length of the content\n   * @property length\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  /**\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   * @method forEach\n   * @param cb\n   * @return\n   * @private\n   */\n  static {\n    decorateMethodV2(this.prototype, \"length\", [compat]);\n  }\n  forEach(cb) {\n    if (this.content && this.length) {\n      this.content.forEach(cb);\n    }\n  }\n\n  /**\n   * Reload the relationship\n   * @method reload\n   * @public\n   * @param options\n   * @return\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   * @property {boolean} isPending\n   * @public\n   */\n\n  /**\n   * Whether the loading promise rejected\n   *\n   * @property {boolean} isRejected\n   * @public\n   */\n\n  /**\n   * Whether the loading promise succeeded\n   *\n   * @property {boolean} isFulfilled\n   * @public\n   */\n\n  /**\n   * Whether the loading promise completed (resolved or rejected)\n   *\n   * @property {boolean} isSettled\n   * @public\n   */\n\n  /**\n   * chain this promise\n   *\n   * @method then\n   * @public\n   * @param success\n   * @param fail\n   * @return Promise\n   */\n  then(s, f) {\n    return this.promise.then(s, f);\n  }\n\n  /**\n   * catch errors thrown by this promise\n   * @method catch\n   * @public\n   * @param callback\n   * @return Promise\n   */\n  catch(cb) {\n    return this.promise.catch(cb);\n  }\n\n  /**\n   * run cleanup after this promise completes\n   *\n   * @method finally\n   * @public\n   * @param callback\n   * @return Promise\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   * @property links\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   * @property meta\n   * @public\n   */\n  static {\n    decorateMethodV2(this.prototype, \"links\", [compat]);\n  }\n  get meta() {\n    return this.content ? this.content.meta : undefined;\n  }\n\n  //---- Our own stuff\n  static {\n    decorateMethodV2(this.prototype, \"meta\", [compat]);\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  [LegacyPromiseProxy] = true;\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);\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\nif (macroCondition(getGlobalConfig().WarpDrive.deprecations.DEPRECATE_COMPUTED_CHAINS)) {\n  const desc = {\n    enumerable: true,\n    configurable: false,\n    get: function () {\n      return this.content?.length && this.content;\n    }\n  };\n  compat(desc);\n\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 the '[]' tag from content\n\n  Object.defineProperty(PromiseManyArray.prototype, '[]', desc);\n}\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 `@ember-data/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 `@ember-data/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 {String} key\n   * @public\n   */\n\n  /**\n   * The type of resource this relationship will contain.\n   *\n   * @property {String} type\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 {StableRecordIdentifier[]} identifiers\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.identifierCache.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\", [compat, cached]);\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    ```app/models/post.js\n   import Model, { hasMany } from '@ember-data/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    @method remoteType\n   @public\n   @return {String} 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    ```app/models/post.js\n   import Model, { hasMany } from '@ember-data/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    @method ids\n    @public\n   @return {Array} The ids in this has-many relationship\n   */\n  ids() {\n    return this.identifiers.map(identifier => identifier.id);\n  }\n\n  /**\n   The link Ember Data 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 '@ember-data/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    @method link\n   @public\n   @return {String} The link Ember Data 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   * @method links\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 '@ember-data/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   @method meta\n  @public\n  @return {Object|null} 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 EmberData\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    ```app/models/post.js\n   import Model, { hasMany } from '@ember-data/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    @method push\n   @public\n   @param {Array|Object} doc a JSONAPI document object describing the new value of this relationship.\n   @param {Boolean} [skipFetch] if `true`, do not attempt to fetch unloaded records\n   @return {Promise<ManyArray | void>}\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.identifierCache.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    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?.every(identifier => {\n      return this.store._instanceCache.recordIsLoaded(identifier, true) === true;\n    });\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    ```app/models/post.js\n   import Model, { hasMany } from '@ember-data/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    @method value\n    @public\n   @return {ManyArray}\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    ```app/models/post.js\n   import Model, { hasMany } from '@ember-data/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    ```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    @method load\n   @public\n   @param {Object} options the options to pass in.\n   @return {Promise} 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    ```app/models/post.js\n   import Model, { hasMany } from '@ember-data/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    @method reload\n    @public\n   @param {Object} options the options to pass in.\n   @return {Promise} 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}\ndefineSignal(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 `@ember-data/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 `@ember-data/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 BelongsToReference\n @public\n */\nclass BelongsToReference {\n  /**\n   * The field name on the parent record for this has-many relationship.\n   *\n   * @property {String} key\n   * @public\n   */\n\n  /**\n   * The type of resource this relationship will contain.\n   *\n   * @property {String} type\n   * @public\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   * @property {StableRecordIdentifier | null} identifier\n   * @public\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.identifierCache.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 '@ember-data/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    @method id\n   @public\n   @return {String} The id of the record in this belongsTo relationship.\n   */\n  static {\n    decorateMethodV2(this.prototype, \"identifier\", [compat, cached]);\n  }\n  id() {\n    return this.identifier?.id || null;\n  }\n\n  /**\n   The link Ember Data 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 '@ember-data/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    @method link\n   @public\n   @return {String} The link Ember Data 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   * @method links\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 '@ember-data/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    @method meta\n    @public\n   @return {Object} 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    ```app/models/post.js\n   import Model, { hasMany } from '@ember-data/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    @method remoteType\n   @public\n   @return {String} 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 EmberData\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    ```app/models/blog.js\n   import Model, { belongsTo } from '@ember-data/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    @method push\n   @public\n   @param {Object} doc a JSONAPI document object describing the new value of this relationship.\n   @param {Boolean} [skipFetch] if `true`, do not attempt to fetch unloaded records\n   @return {Promise<OpaqueRecordInstance | null | void>}\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.identifierCache.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    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 '@ember-data/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    @method value\n    @public\n   @return {Model} 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 '@ember-data/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   ```app/adapters/user.js\n   import Adapter from '@ember-data/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    @method load\n    @public\n   @param {Object} options the options to pass in.\n   @return {Promise} 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\"` Ember Data 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 '@ember-data/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    @method reload\n    @public\n   @param {Object} options the options to pass in.\n   @return {Promise} 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}\ndefineSignal(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);\n    LEGACY_SUPPORT.set(identifier, support);\n    LEGACY_SUPPORT.set(record, support);\n  }\n  return support;\n}\nclass LegacySupport {\n  constructor(record) {\n    this.record = record;\n    this.store = storeFor(record);\n    this.identifier = recordIdentifierFor(record);\n    this.cache = peekCache(record);\n    if (macroCondition(dependencySatisfies('@ember-data/graph', '*'))) {\n      const graphFor = importSync('@ember-data/graph/-private').graphFor;\n      this.graph = graphFor(this.store);\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  _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[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    // 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, key, relationship, identifier), e => handleCompletedRelationshipRequest(this, key, relationship, null, e));\n  }\n  reloadBelongsTo(key, options) {\n    const loadingPromise = this._relationshipPromisesCache[key];\n    if (loadingPromise) {\n      return loadingPromise;\n    }\n    const relationship = this.graph.get(this.identifier, key);\n    macroCondition(getGlobalConfig().WarpDrive.env.DEBUG) ? (test => {\n      if (!test) {\n        throw new Error(`Expected ${key} to be a belongs-to relationship`);\n      }\n    })(isBelongsTo(relationship)) : {};\n    const resource = this.cache.getRelationship(this.identifier, key);\n    relationship.state.hasFailedLoadAttempt = false;\n    relationship.state.shouldForceReload = true;\n    const promise = this._findBelongsTo(key, resource, relationship, options);\n    if (this._relationshipProxyCache[key]) {\n      // @ts-expect-error\n      return this._updatePromiseProxyFor('belongsTo', key, {\n        promise\n      });\n    }\n    return promise;\n  }\n  getBelongsTo(key, options) {\n    const {\n      identifier,\n      cache\n    } = this;\n    const resource = cache.getRelationship(this.identifier, key);\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 || isStableIdentifier(relatedIdentifier)) : {};\n    const store = this.store;\n    const relationship = this.graph.get(this.identifier, key);\n    macroCondition(getGlobalConfig().WarpDrive.env.DEBUG) ? (test => {\n      if (!test) {\n        throw new Error(`Expected ${key} 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[key];\n      }\n      const promise = this._findBelongsTo(key, resource, relationship, options);\n      const isLoaded = relatedIdentifier && store._instanceCache.recordIsLoaded(relatedIdentifier);\n      return this._updatePromiseProxyFor('belongsTo', key, {\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}' 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    return this.cache.mutate({\n      op: 'replaceRelatedRecord',\n      record: this.identifier,\n      field: key,\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        })(isStableIdentifier(relatedIdentifier)) : {};\n        if (cache.recordIsLoaded(relatedIdentifier, true)) {\n          identifiers.push(relatedIdentifier);\n        }\n      }\n    }\n    return [identifiers, jsonApi];\n  }\n  getManyArray(key, definition) {\n    if (macroCondition(dependencySatisfies('@ember-data/graph', '*'))) {\n      let manyArray = this._manyArrayCache[key];\n      if (!definition) {\n        definition = this.graph.get(this.identifier, key).definition;\n      }\n      if (!manyArray) {\n        const [identifiers, doc] = this._getCurrentState(this.identifier, key);\n        manyArray = new RelatedCollection({\n          store: this.store,\n          type: definition.type,\n          identifier: this.identifier,\n          cache: this.cache,\n          identifiers,\n          key,\n          meta: doc.meta || null,\n          links: doc.links || null,\n          isPolymorphic: definition.isPolymorphic,\n          isAsync: definition.isAsync,\n          _inverseIsAsync: definition.inverseIsAsync,\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          isLoaded: !definition.isAsync,\n          allowMutation: true\n        });\n        this._manyArrayCache[key] = manyArray;\n      }\n      return manyArray;\n    }\n    macroCondition(getGlobalConfig().WarpDrive.env.DEBUG) ? (test => {\n      {\n        throw new Error('hasMany only works with the @ember-data/json-api package');\n      }\n    })() : {};\n  }\n  fetchAsyncHasMany(key, relationship, manyArray, options) {\n    if (macroCondition(dependencySatisfies('@ember-data/graph', '*'))) {\n      let loadingPromise = this._relationshipPromisesCache[key];\n      if (loadingPromise) {\n        return loadingPromise;\n      }\n      const jsonApi = this.cache.getRelationship(this.identifier, key);\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, key, relationship, manyArray), e => handleCompletedRelationshipRequest(this, key, relationship, manyArray, e));\n      this._relationshipPromisesCache[key] = loadingPromise;\n      return loadingPromise;\n    }\n    macroCondition(getGlobalConfig().WarpDrive.env.DEBUG) ? (test => {\n      {\n        throw new Error('hasMany only works with the @ember-data/json-api package');\n      }\n    })() : {};\n  }\n  reloadHasMany(key, options) {\n    if (macroCondition(dependencySatisfies('@ember-data/graph', '*'))) {\n      const loadingPromise = this._relationshipPromisesCache[key];\n      if (loadingPromise) {\n        return loadingPromise;\n      }\n      const relationship = this.graph.get(this.identifier, key);\n      const {\n        definition,\n        state\n      } = relationship;\n      state.hasFailedLoadAttempt = false;\n      state.shouldForceReload = true;\n      const manyArray = this.getManyArray(key, definition);\n      const promise = this.fetchAsyncHasMany(key, relationship, manyArray, options);\n      if (this._relationshipProxyCache[key]) {\n        return this._updatePromiseProxyFor('hasMany', key, {\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 @ember-data/json-api package`);\n      }\n    })() : {};\n  }\n  getHasMany(key, options) {\n    if (macroCondition(dependencySatisfies('@ember-data/graph', '*'))) {\n      const relationship = this.graph.get(this.identifier, key);\n      const {\n        definition,\n        state\n      } = relationship;\n      const manyArray = this.getManyArray(key, definition);\n      if (definition.isAsync) {\n        if (state.hasFailedLoadAttempt) {\n          return this._relationshipProxyCache[key];\n        }\n        const promise = this.fetchAsyncHasMany(key, relationship, manyArray, options);\n        return this._updatePromiseProxyFor('hasMany', key, {\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}' 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 @ember-data/json-api package`);\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, name) {\n    let reference = this.references[name];\n    if (!reference) {\n      if (macroCondition(!dependencySatisfies('@ember-data/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 for @ember-data/json-api`);\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 '${name}' relationship on a '${modelName}' via record.${kind}('${name}'), but the relationship is of kind '${actualRelationshipKind}'. Use record.${actualRelationshipKind}('${name}') 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, name);\n      } else if (relationshipKind === 'hasMany') {\n        reference = new HasManyReference(this.store, graph, identifier, relationship, name);\n      }\n      this.references[name] = reference;\n    }\n    return reference;\n  }\n  _findHasManyByJsonApiResource(resource, parentIdentifier, relationship, options = {}) {\n    if (macroCondition(dependencySatisfies('@ember-data/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(isStableIdentifier)) : {};\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(isStableIdentifier)) : {};\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 @ember-data/json-api package`);\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\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[key]) {\n      return this._pending[key];\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 || isStableIdentifier(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[key] = future.then(doc => field.options.linksMode ? doc.content.data : doc.content).finally(() => {\n        this._pending[key] = undefined;\n      });\n      return this._pending[key];\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[key] = 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[key] = undefined;\n      });\n      return this._pending[key];\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    value.notify();\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  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  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(isStableIdentifier)) : {};\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  })(isStableIdentifier(identifiers)) : {};\n  return instanceCache.recordIsLoaded(identifiers);\n}\nfunction isBelongsTo(relationship) {\n  return relationship.definition.kind === 'belongsTo';\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  ```app/models/user.js\n  import Model, { attr } from '@ember-data/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  @extends Ember.ArrayProxy\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     @method errorsFor\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    @method unknownProperty\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    @method add\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    @method _findOrCreateMessages\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   @method remove\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   @method clear\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     ```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     @method has\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}\nfunction rollbackAttributes() {\n  const {\n    currentState\n  } = this;\n  const {\n    isNew\n  } = currentState;\n  this[RecordStore]._join(() => {\n    peekCache(this).rollbackAttrs(recordIdentifierFor$1(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  options.isReloading = true;\n  options.reload = true;\n  const identifier = recordIdentifierFor$1(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 peekCache(this).changedAttrs(recordIdentifierFor$1(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  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  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  upgradeStore(store);\n  if (!store._fetchManager) {\n    const FetchManager = importSync('@ember-data/legacy-compat/-private').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$1(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      record.notifyPropertyChange('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      manyArray.notify();\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 EmberData 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  @internal\n*/\nclass RecordState {\n  constructor(record) {\n    const store = storeFor$1(record);\n    const identity = recordIdentifierFor(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  destroy() {\n    storeFor$1(this.record).notifications.unsubscribe(this.handler);\n  }\n  notify(key) {\n    notifySignal(this, key);\n  }\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  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\", [subscribed]);\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\", [subscribed]);\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\", [subscribed]);\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\", [subscribed]);\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\", [subscribed]);\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\", [subscribed]);\n  }\n  get isValid() {\n    return this.record.errors.length === 0;\n  }\n  static {\n    decorateMethodV2(this.prototype, \"isValid\", [subscribed]);\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\", [subscribed]);\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\", [subscribed]);\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\", [subscribed]);\n  }\n  get isPreloaded() {\n    return !this.isEmpty && this.isLoading;\n  }\n  static {\n    decorateMethodV2(this.prototype, \"isPreloaded\", [cached]);\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\", [cached]);\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\", [cached]);\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  @module @ember-data/model\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/**\n  Base class from which Models can be defined.\n\n  ```js\n  import Model, { attr } from '@ember-data/model';\n\n  export default class User extends Model {\n    @attr name;\n  }\n  ```\n\n  Models are used both to define the static schema for a\n  particular resource type as well as the class to instantiate\n  to present that data from cache.\n\n  @class Model\n  @public\n  @extends Ember.EmberObject\n*/\n\nclass Model extends EmberObject {\n  // set during create by the store\n\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, _secretInit.cache, 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  // @ts-expect-error destroy should not return a value, but ember's types force it to\n  destroy() {\n    const identifier = recordIdentifierFor$1(this);\n    this.___recordState?.destroy();\n    const store = storeFor$1(this);\n    store.notifications.unsubscribe(this.___private_notifications);\n    // Legacy behavior is to notify the relationships on destroy\n    // such that they \"clear\". It's uncertain this behavior would\n    // be good for a new model paradigm, likely cheaper and safer\n    // to simply not notify, for this reason the store does not itself\n    // notify individual changes once the delete has been signaled,\n    // this decision is left to model instances.\n\n    this.eachRelationship((name, meta) => {\n      if (meta.kind === 'belongsTo') {\n        this.notifyPropertyChange(name);\n      }\n    });\n    LEGACY_SUPPORT.get(this)?.destroy();\n    LEGACY_SUPPORT.delete(this);\n    LEGACY_SUPPORT.delete(identifier);\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     @property isEmpty\n    @public\n    @type {Boolean}\n    @readOnly\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     @property isLoading\n    @public\n    @type {Boolean}\n    @readOnly\n  */\n  static {\n    decorateMethodV2(this.prototype, \"isEmpty\", [compat]);\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     @property isLoaded\n    @public\n    @type {Boolean}\n    @readOnly\n  */\n  static {\n    decorateMethodV2(this.prototype, \"isLoading\", [compat]);\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    @property hasDirtyAttributes\n    @public\n    @type {Boolean}\n    @readOnly\n  */\n  static {\n    decorateMethodV2(this.prototype, \"isLoaded\", [compat]);\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     @property isSaving\n    @public\n    @type {Boolean}\n    @readOnly\n  */\n  static {\n    decorateMethodV2(this.prototype, \"hasDirtyAttributes\", [compat]);\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     @property isDeleted\n    @public\n    @type {Boolean}\n    @readOnly\n  */\n  static {\n    decorateMethodV2(this.prototype, \"isSaving\", [compat]);\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     @property isNew\n    @public\n    @type {Boolean}\n    @readOnly\n  */\n  static {\n    decorateMethodV2(this.prototype, \"isDeleted\", [compat]);\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     @property isValid\n    @public\n    @type {Boolean}\n    @readOnly\n  */\n  static {\n    decorateMethodV2(this.prototype, \"isNew\", [compat]);\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     @property dirtyType\n    @public\n    @type {String}\n    @readOnly\n  */\n  static {\n    decorateMethodV2(this.prototype, \"isValid\", [compat]);\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     @property isError\n    @public\n    @type {Boolean}\n    @readOnly\n  */\n  static {\n    decorateMethodV2(this.prototype, \"dirtyType\", [compat]);\n  }\n  get isError() {\n    return this.currentState.isError;\n  }\n  static {\n    decorateMethodV2(this.prototype, \"isError\", [compat]);\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     @property isReloading\n    @public\n    @type {Boolean}\n    @readOnly\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     @property id\n    @public\n    @type {String}\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$1(this).id;\n      } catch {\n        return null;\n      }\n    }\n    return recordIdentifierFor$1(this).id;\n  }\n  static {\n    decorateMethodV2(this.prototype, \"id\", [subscribed]);\n  }\n  set id(id) {\n    const normalizedId = coerceId(id);\n    const identifier = recordIdentifierFor$1(this);\n    const didChange = normalizedId !== identifier.id;\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');\n    }\n  }\n  toString() {\n    return `<model::${this.constructor.modelName}:${this.id}>`;\n  }\n\n  /**\n    @property currentState\n    @private\n    @type {Object}\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\", [subscribed]);\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    @property store\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     @property errors\n    @public\n    @type {Errors}\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     @property adapterError\n    @public\n    @type {AdapterError}\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\", [compat]);\n  }\n  set adapterError(v) {\n    throw new Error(`adapterError is not directly settable`);\n  }\n\n  /**\n    Create a JSON representation of the record, using the serialization\n    strategy of the store's adapter.\n    `serialize` takes an optional hash as a parameter, currently\n    supported options are:\n    - `includeId`: `true` if the record's ID should be included in the\n      JSON representation.\n     @method serialize\n    @public\n    @param {Object} options\n    @return {Object} an object whose values are primitive JSON values only\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    notifySignal(this, prop);\n    super.notifyPropertyChange(prop);\n  }\n\n  /**\n    Marks the record as deleted but does not save it. You must call\n    `save` afterwards if you want to persist it. You might use this\n    method if you want to allow the user to still `rollbackAttributes()`\n    after a delete was made.\n     Example\n     ```js\n    import Component from '@glimmer/component';\n     export default class extends Component {\n      softDelete = () => {\n        this.args.model.deleteRecord();\n      }\n       confirm = () => {\n        this.args.model.save();\n      }\n       undo = () => {\n        this.args.model.rollbackAttributes();\n      }\n    }\n    ```\n     @method deleteRecord\n    @public\n  */\n\n  /**\n    Same as `deleteRecord`, but saves the record immediately.\n     Example\n     ```js\n    import Component from '@glimmer/component';\n     export default class extends Component {\n      delete = () => {\n        this.args.model.destroyRecord().then(function() {\n          this.transitionToRoute('model.index');\n        });\n      }\n    }\n    ```\n     If you pass an object on the `adapterOptions` property of the options\n    argument it will be passed to your adapter via the snapshot\n     ```js\n    record.destroyRecord({ adapterOptions: { subscribe: false } });\n    ```\n     ```app/adapters/post.js\n    import MyCustomAdapter from './custom-adapter';\n     export default class PostAdapter extends MyCustomAdapter {\n      deleteRecord(store, type, snapshot) {\n        if (snapshot.adapterOptions.subscribe) {\n          // ...\n        }\n        // ...\n      }\n    }\n    ```\n     @method destroyRecord\n    @public\n    @param {Object} options\n    @return {Promise} a promise that will be resolved when the adapter returns\n    successfully or rejected if the adapter returns with an error.\n  */\n\n  /**\n    Unloads the record from the store. This will not send a delete request\n    to your server, it just unloads the record from memory.\n     @method unloadRecord\n    @public\n  */\n\n  /**\n    Returns an object, whose keys are changed properties, and value is\n    an [oldProp, newProp] array.\n     The array represents the diff of the canonical state with the local state\n    of the model. Note: if the model is created locally, the canonical state is\n    empty since the adapter hasn't acknowledged the attributes yet:\n     Example\n     ```app/models/mascot.js\n    import Model, { attr } from '@ember-data/model';\n     export default class MascotModel extends Model {\n      @attr('string') name;\n      @attr('boolean', {\n        defaultValue: false\n      })\n      isAdmin;\n    }\n    ```\n     ```javascript\n    let mascot = store.createRecord('mascot');\n     mascot.changedAttributes(); // {}\n     mascot.set('name', 'Tomster');\n    mascot.changedAttributes(); // { name: [undefined, 'Tomster'] }\n     mascot.set('isAdmin', true);\n    mascot.changedAttributes(); // { isAdmin: [undefined, true], name: [undefined, 'Tomster'] }\n     mascot.save().then(function() {\n      mascot.changedAttributes(); // {}\n       mascot.set('isAdmin', false);\n      mascot.changedAttributes(); // { isAdmin: [true, false] }\n    });\n    ```\n     @method changedAttributes\n    @public\n    @return {Object} an object, whose keys are changed properties,\n      and value is an [oldProp, newProp] array.\n  */\n\n  /**\n    If the model `hasDirtyAttributes` this function will discard any unsaved\n    changes. If the model `isNew` it will be removed from the store.\n     Example\n     ```javascript\n    record.name; // 'Untitled Document'\n    record.set('name', 'Doc 1');\n    record.name; // 'Doc 1'\n    record.rollbackAttributes();\n    record.name; // 'Untitled Document'\n    ```\n     @since 1.13.0\n    @method rollbackAttributes\n    @public\n  */\n\n  /**\n    @method _createSnapshot\n    @private\n  */\n  // TODO @deprecate in favor of a public API or examples of how to test successfully\n\n  /**\n    Save the record and persist any changes to the record to an\n    external source via the adapter.\n     Example\n     ```javascript\n    record.set('name', 'Tomster');\n    record.save().then(function() {\n      // Success callback\n    }, function() {\n      // Error callback\n    });\n    ```\n    If you pass an object using the `adapterOptions` property of the options\n   argument it will be passed to your adapter via the snapshot.\n     ```js\n    record.save({ adapterOptions: { subscribe: false } });\n    ```\n     ```app/adapters/post.js\n    import MyCustomAdapter from './custom-adapter';\n     export default class PostAdapter extends MyCustomAdapter {\n      updateRecord(store, type, snapshot) {\n        if (snapshot.adapterOptions.subscribe) {\n          // ...\n        }\n        // ...\n      }\n    }\n    ```\n     @method save\n    @public\n    @param {Object} options\n    @return {Promise} a promise that will be resolved when the adapter returns\n    successfully or rejected if the adapter returns with an error.\n  */\n\n  /**\n    Reload the record from the adapter.\n     This will only work if the record has already finished loading.\n     Example\n     ```js\n    import Component from '@glimmer/component';\n     export default class extends Component {\n      async reload = () => {\n        await this.args.model.reload();\n        // do something with the reloaded model\n      }\n    }\n    ```\n     @method reload\n    @public\n    @param {Object} options optional, may include `adapterOptions` hash which will be passed to adapter request\n    @return {Promise} a promise that will be resolved with the record when the\n    adapter returns successfully or rejected if the adapter returns\n    with an error.\n  */\n\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    Get the reference for the specified belongsTo relationship.\n     For instance, given the following model\n     ```app/models/blog-post.js\n    import Model, { belongsTo } from '@ember-data/model';\n     export default class BlogPost extends Model {\n      @belongsTo('user', { async: true, inverse: null }) author;\n    }\n    ```\n     Then the reference for the author relationship would be\n    retrieved from a record instance like so:\n     ```js\n    blogPost.belongsTo('author');\n    ```\n     A `BelongsToReference` is a low-level API that allows access\n    and manipulation of a belongsTo relationship.\n     It is especially useful when you're dealing with `async` relationships\n    as it allows synchronous access to the relationship data if loaded, as\n    well as APIs for loading, reloading the data or accessing available\n    information without triggering a load.\n     It may also be useful when using `sync` relationships that need to be\n    loaded/reloaded with more precise timing than marking the\n    relationship as `async` and relying on autofetch would have allowed.\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     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     References are \"stable\", meaning that multiple calls to retrieve the reference\n    for a given relationship will always return the same HasManyReference.\n     @method belongsTo\n    @public\n    @param {String} name of the relationship\n    @since 2.5.0\n    @return {BelongsToReference} reference for this relationship\n  */\n\n  /**\n    Get the reference for the specified hasMany relationship.\n     For instance, given the following model\n     ```app/models/blog-post.js\n    import Model, { hasMany } from '@ember-data/model';\n     export default class BlogPost extends Model {\n      @hasMany('comment', { async: true, inverse: null }) comments;\n    }\n    ```\n     Then the reference for the comments relationship would be\n    retrieved from a record instance like so:\n     ```js\n    blogPost.hasMany('comments');\n    ```\n     A `HasManyReference` is a low-level API that allows access\n    and manipulation of a hasMany relationship.\n     It is especially useful when you are dealing with `async` relationships\n    as it allows synchronous access to the relationship data if loaded, as\n    well as APIs for loading, reloading the data or accessing available\n    information without triggering a load.\n     It may also be useful when using `sync` relationships with `@ember-data/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     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     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     References are \"stable\", meaning that multiple calls to retrieve the reference\n    for a given relationship will always return the same HasManyReference.\n     @method hasMany\n    @public\n    @param {String} name of the relationship\n    @since 2.5.0\n    @return {HasManyReference} reference for this relationship\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    ```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    @method eachRelationship\n   @public\n   @param {Function} callback the callback to invoke\n   @param {any} 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$1(this));\n  }\n  eachAttribute(callback, binding) {\n    this.constructor.eachAttribute(callback, binding);\n  }\n  static isModel = true;\n\n  /**\n    Create should only ever be called by the store. To create an instance of a\n    `Model` in a dirty state use `store.createRecord`.\n    To create instances of `Model` in a clean state, use `store.push`\n     @method create\n    @private\n    @static\n  */\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 EmberData. 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   @property modelName\n    @public\n   @type String\n   @readonly\n   @static\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    ```app/models/post.js\n   import Model, { hasMany } from '@ember-data/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    @method typeForRelationship\n    @public\n   @static\n   @param {String} name the name of the relationship\n   @param {store} store an instance of Store\n   @return {Model} 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    ```app/models/post.js\n   import Model, { hasMany } from '@ember-data/model';\n    export default class PostModel extends Model {\n      @hasMany('message') comments;\n    }\n   ```\n    ```app/models/message.js\n   import Model, { belongsTo } from '@ember-data/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    @method inverseFor\n    @public\n   @static\n   @param {String} name the name of the relationship\n   @param {Store} store\n   @return {Object} 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    ```app/models/blog.js\n   import Model, { belongsTo, hasMany } from '@ember-data/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    @property relationships\n    @public\n   @static\n   @type Map\n   @readOnly\n   */\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    ```app/models/blog.js\n   import Model, { belongsTo, hasMany } from '@ember-data/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    @property relationshipNames\n    @public\n   @static\n   @type Object\n   @readOnly\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    ```app/models/blog.js\n   import Model, { belongsTo, hasMany } from '@ember-data/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    @property relatedTypes\n   @public\n   @static\n   @type Array\n   @readOnly\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    ```app/models/blog.js\n   import Model, { belongsTo, hasMany } from '@ember-data/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    @property relationshipsByName\n    @public\n   @static\n   @type Map\n   @readOnly\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    ```app/models/blog.js\n   import Model, { attr, belongsTo, hasMany } from '@ember-data/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    @property fields\n    @public\n   @static\n   @type Map\n   @readOnly\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    @method eachRelationship\n    @public\n   @static\n   @param {Function} callback the callback to invoke\n   @param {any} 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    @method eachRelatedType\n    @public\n   @static\n   @param {Function} callback the callback to invoke\n   @param {any} 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   * @method determineRelationshipType\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    ```app/models/person.js\n   import Model, { attr } from '@ember-data/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    @property attributes\n    @public\n   @static\n   @type {Map}\n   @readOnly\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    ```app/models/person.js\n   import Model, { attr } from '@ember-data/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    @property transformedAttributes\n    @public\n   @static\n   @type {Map}\n   @readOnly\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 '@ember-data/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    @method eachAttribute\n    @public\n   @param {Function} callback The callback to execute\n   @param {Object} [binding] the value to which the callback's `this` should be bound\n   @static\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 '@ember-data/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    @method eachTransformedAttribute\n    @public\n   @param {Function} callback The callback to execute\n   @param {Object} [binding] the value to which the callback's `this` should be bound\n   @static\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    @method toString\n    @public\n   @static\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;\ndefineSignal(Model.prototype, 'isReloading', false);\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}\nexport { Errors as E, LEGACY_SUPPORT as L, Model as M, PromiseBelongsTo as P, RecordState as R, PromiseManyArray as a, save as b, reload as c, destroyRecord as d, deleteRecord as e, changedAttributes as f, belongsTo as g, hasMany as h, createSnapshot as i, isElementDescriptor as j, lookupLegacySupport as l, normalizeModelName as n, rollbackAttributes as r, serialize as s, unloadRecord as u };","import { getOwner } from '@ember/application';\nimport { deprecate } from '@ember/debug';\nimport { M as Model, n as normalizeModelName } from \"./model-rk3atPqV.js\";\nimport { macroCondition, getGlobalConfig } from '@embroider/macros';\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  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 @ember-data/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 @ember-data/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 @ember-data/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 @ember-data/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 @ember-data/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 @ember-data/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 @ember-data/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 @ember-data/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 @ember-data/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 @ember-data/model's SchemaService`);\n      }\n    })() : {};\n  }\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    if (!this._schemas.has(type)) {\n      this._loadModelSchema(type);\n    }\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    if (!this._schemas.has(type)) {\n      this._loadModelSchema(type);\n    }\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 { ModelSchemaProvider as M, buildSchema as b, getModelFactory as g };","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 { deprecate } from '@ember/debug';\nimport { macroCondition, getGlobalConfig, dependencySatisfies, importSync } from '@embroider/macros';\nimport { m as defaultRules, b as plural, a as singular, i as irregular, u as uncountable } from \"./inflect-8aYUyMN7.js\";\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    defaultRules.plurals.forEach(([regex]) => {\n      defaultPluralKeys.add(regex.toString());\n    });\n    defaultRules.singular.forEach(([regex]) => {\n      defaultSingularKeys.add(regex.toString());\n    });\n    const {\n      defaultRules: defaultRules$1\n    } = Inflector;\n    const {\n      rules\n    } = inflector;\n    const irregularMap = new Map();\n    const toIgnore = new Set();\n    const uncountableSet = new Set(defaultRules$1.uncountable);\n    defaultRules$1.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}","import { macroCondition, getGlobalConfig } from '@embroider/macros';\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};\nconst DEFAULT_MAX_CACHE_SIZE = 10_000;\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// 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 '@ember-data/request-utils/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  @typedoc\n*/\nfunction dasherize(str) {\n  return STRING_DASHERIZE_CACHE.get(str);\n}\n\n/**\n  Returns the lowerCamelCase form of a string.\n\n  ```js\n  import { camelize } from '@ember-data/request-utils/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  @typedoc\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 '@ember-data/request-utils/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  @typedoc\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 '@ember-data/request-utils/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  @typedoc\n*/\nfunction capitalize(str) {\n  return CAPITALIZE_CACHE.get(str);\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());\nfunction uncountable(word) {\n  UNCOUNTABLE.add(word.toLowerCase());\n}\nfunction loadUncountable(uncountables) {\n  uncountables.forEach(word => {\n    uncountable(word);\n  });\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}\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);\nfunction clear() {\n  SINGULARS.clear();\n  PLURALS.clear();\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}\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}\nfunction singularize(word) {\n  macroCondition(getGlobalConfig().WarpDrive.env.DEBUG) ? (test => {\n    if (!test) {\n      throw new Error(`singularize expects to receive a non-empty string`);\n    }\n  })(typeof word === 'string' && word.length > 0) : {};\n  if (!word) return '';\n  return SINGULARS.get(word);\n}\nfunction pluralize(word) {\n  macroCondition(getGlobalConfig().WarpDrive.env.DEBUG) ? (test => {\n    if (!test) {\n      throw new Error(`pluralize expects to receive a non-empty string`);\n    }\n  })(typeof word === 'string' && word.length > 0) : {};\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}\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}\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}\nexport { singular as a, plural as b, loadUncountable as c, clear as d, clearRules as e, dasherize as f, camelize as g, capitalize as h, irregular as i, underscore as j, setMaxLRUCacheSize as k, loadIrregular as l, defaultRules as m, pluralize as p, resetToDefaults as r, singularize as s, uncountable as u };","import { getOrSetUniversal, getOrSetGlobal } from '@warp-drive/core-types/-private';\nimport { STRUCTURED, IS_FUTURE, SkipCache } from '@warp-drive/core-types/request';\nimport { macroCondition, getGlobalConfig } from '@embroider/macros';\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}\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  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  deferred.promise = promise;\n  return deferred;\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  #owner;\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  _finalize() {\n    this._finalized = true;\n  }\n}\nconst BODY_TYPES = {\n  type: 'string',\n  klass: ['Blob', 'ArrayBuffer', 'TypedArray', 'DataView', 'FormData', 'URLSearchParams', 'ReadableStream']\n};\nconst ValidKeys = new Map([['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}\nexport { IS_CACHE_HANDLER as I, assertValidRequest as a, createDeferred as b, clearRequestResult as c, getPromiseResult as d, executeNextHandler as e, cloneResponseProperties as f, getRequestResult as g, setPromiseResult as s, upgradePromise as u };","import { setLogging, getRuntimeConfig } from '@warp-drive/core-types/runtime';\nimport { macroCondition, getGlobalConfig, importSync } from '@embroider/macros';\nimport { peekUniversalTransient, setUniversalTransient } from '@warp-drive/core-types/-private';\nimport { I as IS_CACHE_HANDLER, a as assertValidRequest, e as executeNextHandler, g as getRequestResult, u as upgradePromise, s as setPromiseResult, c as clearRequestResult } from \"./debug-nHWzWIMX.js\";\nexport { b as createDeferred, d as getPromiseResult } from \"./debug-nHWzWIMX.js\";\n\n/* eslint-disable no-irregular-whitespace */\n/**\n *\n  <p align=\"center\">\n  <img\n    class=\"project-logo\"\n    src=\"https://raw.githubusercontent.com/emberjs/data/4612c9354e4c54d53327ec2cf21955075ce21294/ember-data-logo-light.svg#gh-light-mode-only\"\n    alt=\"EmberData RequestManager\"\n    width=\"240px\"\n    title=\"EmberData RequestManager\"\n    />\n</p>\n\n<p align=\"center\">⚡️ a simple abstraction over fetch to enable easy management of request/response flows</p>\n\nThis package provides [*Ember*‍**Data**](https://github.com/emberjs/data/)'s `RequestManager`, a framework agnostic library that can be integrated with any Javascript application to make [fetch](https://developer.mozilla.org/en-US/docs/Web/API/Fetch_API) happen.\n\n- [Installation](#installation)\n- [Basic Usage](#🚀-basic-usage)\n- [Architecture](#🪜-architecture)\n- [Usage](#usage)\n  - [Making Requests](#making-requests)\n    - [Using The Response](#using-the-response)\n  - [Request Handlers](#handling-requests)\n    - [Handling Errors](#handling-errors)\n    - [Handling Abort](#handling-abort)\n    - [Stream Currying](#stream-currying)\n    - [Automatic Currying](#automatic-currying-of-stream-and-response)\n  - [Using as a Service](#using-as-a-service)\n    - [Using with `@ember-data/store`](#using-with-ember-datastore)\n    - [Using with `ember-data`](#using-with-ember-data)\n\n---\n\n## Installation\n\nInstall using your javascript package manager of choice. For instance with [pnpm](https://pnpm.io/)\n\n```no-highlight\npnpm add @ember-data/request\n```\n\n---\n\n## 🚀 Basic Usage\n\nA `RequestManager` provides a request/response flow in which configured handlers are successively given the opportunity to handle, modify, or pass-along a request.\n\nThe RequestManager on its own does not know how to fulfill requests. For this we must register at least one handler. A basic `Fetch` handler is provided that will take the request options provided and execute `fetch`.\n\n```ts\nimport RequestManager from '@ember-data/request';\nimport Fetch from '@ember-data/request/fetch';\nimport { apiUrl } from './config';\n\n// ... create manager and add our Fetch handler\nconst manager = new RequestManager()\n  .use([Fetch]);\n\n// ... execute a request\nconst response = await manager.request({\n  url: `${apiUrl}/users`\n});\n```\n\n---\n\n## 🪜 Architecture\n\nA `RequestManager` receives a request and manages fulfillment via configured handlers. It may be used standalone from the rest of *Ember*‍**Data** and is not specific to any library or framework.\n\nEach handler may choose to fulfill the request using some source of data or to pass the request along to other handlers.\n\nThe same or a separate instance of a `RequestManager` may also be used to fulfill requests issued by [*Ember*‍**Data**{Store}](https://github.com/emberjs/data/tree/main/packages/store)\n\nWhen the same instance is used by both this allows for simple coordination throughout the application. Requests issued by the Store will use the in-memory cache\nand return hydrated responses, requests issued directly to the RequestManager\nwill skip the in-memory cache and return raw responses.\n\n---\n\n## Usage\n\n```ts\nconst userList = await manager.request({\n  url: `/api/v1/users.list`\n});\n\nconst users = userList.content;\n```\n\n---\n\n### Making Requests\n\n`RequestManager` has a single asyncronous method as it's API: `request`\n\n```ts\nclass RequestManager {\n  request<T>(req: RequestInfo): Future<T>;\n}\n```\n\n`manager.request(<RequestInfo>)` accepts an object containing the information\nnecessary for the request to be handled successfully.\n\nThese options extend the [options](https://developer.mozilla.org/en-US/docs/Web/API/fetch#parameters) provided to `fetch`, and can accept a [`Request`](https://developer.mozilla.org/en-US/docs/Web/API/Request/Request). All properties accepted by Request options and fetch options are valid.\n\n```ts\ninterface RequestInfo extends FetchOptions {\n  op?: string;\n  store?: Store;\n\n  url: string;\n   // data that a handler should convert into\n   // the query (GET) or body (POST)\n  data?: Record<string, unknown>;\n\n  // options specifically intended for handlers\n  // to utilize to process the request\n  options?: Record<string, unknown>;\n}\n```\n\n> **note**\n> providing a `signal` is unnecessary as an `AbortController` is automatically provided if none is present.\n\n---\n\n#### Using the Response\n\n`manager.request` returns a `Future`, which allows access to limited information about the request while it is still pending and fulfills with the final state when the request completes and the response has been read.\n\n```ts\nconst usersFuture = manager.request({\n  url: `/api/v1/users.list`\n});\n```\n\nA `Future` is cancellable via `abort`.\n\n```ts\nusersFuture.abort();\n```\n\nHandlers may *optionally* expose a ReadableStream to the `Future` for streaming data; however, when doing so the handler should not resolve until it has fully read the response stream itself.\n\n```ts\ninterface Future<T> extends Promise<StructuredDocument<T>> {\n  abort(): void;\n\n  async getStream(): ReadableStream | null;\n}\n```\n\nA Future resolves or rejects with a `StructuredDocument`.\n\n```ts\ninterface StructuredDocument<T> {\n  request: RequestInfo;\n  response: ResponseInfo | null;\n  content?: T;\n  error?: Error;\n}\n```\n\nThe `RequestInfo` specified by `document.request` is the same as originally provided to `manager.request`. If any handler fulfilled this request using different request info it is not represented here. This contract helps to ensure that `retry` and `caching` are possible since the original arguments are correctly preserved. This also allows handlers to \"fork\" the request or fulfill from multiple sources without the details of fulfillment muddying the original request.\n\nThe `ResponseInfo` is a serializable fulfilled subset of a [Response](https://developer.mozilla.org/en-US/docs/Web/API/Response) if set via `setResponse`. If no response was ever set this will be `null`.\n\n```ts\ninterface ResponseInfo {\n  headers?: Record<string, string>;\n  ok?: boolean;\n  redirected?: boolean;\n  status?: HTTPStatusCode;\n  statusText?: string;\n  type?: 'basic' | 'cors';\n  url?: string;\n}\n```\n\n---\n\n### Request Handlers\n\nRequests are fulfilled by handlers. A handler receives the request context\nas well as a `next` function with which to pass along a request to the next\nhandler if it so chooses.\n\nA handler may be any object with a `request` method. This allows both stateful and non-stateful\nhandlers to be utilized.\n\nIf a handler calls `next`, it receives a `Future` which resolves to a `StructuredDocument`\nthat it can then compose how it sees fit with its own response.\n\n```ts\n\ntype NextFn<P> = (req: RequestInfo) => Future<P>;\n\ninterface Handler {\n  async request<T>(context: RequestContext, next: NextFn<P>): T;\n}\n```\n\n`RequestContext` contains a readonly version of the RequestInfo as well as a few methods for building up the `StructuredDocument` and `Future` that will be part of the response.\n\n```ts\ninterface RequestContext<T> {\n  readonly request: RequestInfo;\n\n  setStream(stream: ReadableStream | Promise<ReadableStream>): void;\n  setResponse(response: Response | ResponseInfo): void;\n}\n```\n\nA basic `fetch` handler with support for streaming content updates while\nthe download is still underway might look like the following, where we use\n[`response.clone()`](https://developer.mozilla.org/en-US/docs/Web/API/Response/clone) to `tee` the `ReadableStream` into two streams.\n\nA more efficient handler might read from the response stream, building up the\nresponse content before passing along the chunk downstream.\n\n```ts\nconst FetchHandler = {\n  async request(context) {\n    const response = await fetch(context.request);\n    context.setResponse(reponse);\n    context.setStream(response.clone().body);\n\n    return response.json();\n  }\n}\n```\n\nRequest handlers are registered by configuring the manager via `use`\n\n```ts\nmanager.use([Handler1, Handler2])\n```\n\nHandlers will be invoked in the order they are registered (\"fifo\", first-in first-out), and may only be registered up until the first request is made. It is recommended but not required to register all handlers at one time in order to ensure explicitly visible handler ordering.\n\n---\n\n#### Handling Errors\n\nEach handler in the chain can catch errors from upstream and choose to\neither handle the error, re-throw the error, or throw a new error.\n\n```ts\nconst MAX_RETRIES = 5;\n\nconst Handler = {\n  async request(context, next) {\n    let attempts = 0;\n\n    while (attempts < MAX_RETRIES) {\n      attempts++;\n      try {\n        const response = await next(context.request);\n        return response;\n      } catch (e) {\n        if (isTimeoutError(e) && attempts < MAX_RETRIES) {\n          // retry request\n          continue;\n        }\n        // rethrow if it is not a timeout error\n        throw e;\n      }\n    }\n  }\n}\n```\n\n---\n\n#### Handling Abort\n\nAborting a request will reject the current handler in the chain. However,\nevery handler can potentially catch this error. If your handler needs to\nseparate AbortError from other Error types, it is recommended to check\n`context.request.signal.aborted` (or if a custom controller was supplied `controller.signal.aborted`).\n\nIn this manner it is possible for a request to recover from an abort and\nstill proceed; however, as a best practice this should be used for necessary\ncleanup only and the original AbortError rethrown if the abort signal comes\nfrom the root controller.\n\n**AbortControllers are Always Present and Always Entangled**\n\nIf the initial request does not supply an [AbortController](https://developer.mozilla.org/en-US/docs/Web/API/AbortController), one will be generated.\n\nThe [signal](https://developer.mozilla.org/en-US/docs/Web/API/AbortSignal) for this controller is automatically added to the request passed into the first handler.\n\nEach handler has the option to supply a new controller to the request when calling `next`. If a new controller is provided it will be automatically\nentangled with the root controller. If the root controller aborts, so will\nany entangled controllers.\n\nIf an entangled controller aborts, the root controller will not abort. This\nallows for advanced request-flow scenarios to abort subsections of the request tree without aborting the entire request.\n\n---\n\n#### Stream Currying\n\n`RequestManager.request` and `next` differ from `fetch` in one **crucial detail** in that the outer Promise resolves only once the response stream has been processed.\n\nFor context, it helps to understand a few of the use-cases that RequestManager\nis intended to allow.\n\n- to manage and return streaming content (such as video files)\n- to fulfill a request from multiple sources or by splitting one request into multiple requests\n  - for instance one API call for a user and another for the user's friends\n  - or e.g. fulfilling part of the request from one source (one API, in-memory, localStorage, IndexedDB\n   etc.) and the rest from another source (a different API, a WebWorker, etc.)\n- to coalesce multiple requests\n- to decorate a request with additional info\n  - e.g. an Auth handler that ensures the correct tokens or headers or cookies are attached.\n\n\n`await fetch(<req>)` resolves at the moment headers are received. This allows for the body of the request to be processed as a stream by application\ncode *while chunks are still being received by the browser*.\n\nWhen an app chooses to `await response.json()` what occurs is the browser reads the stream to completion and then returns the result. Additionally, this stream may only be read **once**.\n\nThe `RequestManager` preserves this ability to subscribe to and utilize the stream by either the application or the handler – thereby delivering the full power and flexibility of native APIs – without restricting developers in ways that lead to complicated workarounds.\n\nEach handler may call `setStream` only once, but may do so *at any time* until the promise that the handler returns has resolved. The associated promise returned by calling `future.getStream` will resolve with the stream set by `setStream` if that method is called, or `null` if that method\nhas not been called by the time that the handler's request method has resolved.\n\nHandlers that do not create a stream of their own, but which call `next`, should defensively pipe the stream forward. While this is not required (see automatic currying below) it is better to do so in most cases as otherwise the stream may not become available to downstream handlers or the application until the upstream handler has fully read it.\n\n```ts\ncontext.setStream(future.getStream());\n```\n\nHandlers that either call `next` multiple times or otherwise have reason to create multiple  fetch requests should either choose to return no stream, meaningfully combine the streams, or select a single prioritized stream.\n\nOf course, any handler may choose to read and handle the stream, and return either no stream or a different stream in the process.\n\n---\n\n#### Automatic Currying of Stream and Response\n\nIn order to simplify the common case for handlers which decorate a request, if `next` is called only a single time and `setResponse` was never called by the handler, the response set by the next handler in the chain will be applied to that handler's outcome. For instance, this makes the following pattern possible `return (await next(<req>)).content;`.\n\nSimilarly, if `next` is called only a single time and neither `setStream` nor `getStream` was called, we automatically curry the stream from the future returned by `next` onto the future returned by the handler.\n\nFinally, if the return value of a handler is a `Future`, we curry `content` and `errors` as well, thus enabling the simplest form `return next(<req>)`.\n\nIn the case of the `Future` being returned, `Stream` proxying is automatic and immediate and does not wait for the `Future` to resolve.\n\n---\n\n### Using as a Service\n\nMost applications will desire to have a single `RequestManager` instance, which can be achieved using module-state patterns for singletons, or for [Ember](https://emberjs.com) applications by exporting the manager as a [service](https://guides.emberjs.com/release/services/).\n\n*services/request.ts*\n```ts\nimport RequestManager from '@ember-data/request';\nimport Fetch from '@ember-data/request/fetch';\nimport Auth from 'ember-simple-auth/ember-data-handler';\n\nexport default class extends RequestManager {\n  constructor(createArgs) {\n    super(createArgs);\n    this.use([Auth, Fetch]);\n  }\n}\n```\n\n---\n\n#### Using with `@ember-data/store`\n\nTo have a request service unique to a Store:\n\n```ts\nimport Store, { CacheHandler } from '@ember-data/store';\nimport RequestManager from '@ember-data/request';\nimport Fetch from '@ember-data/request/fetch';\n\nclass extends Store {\n  requestManager = new RequestManager()\n    .use([Fetch])\n    .useCache(CacheHandler);\n}\n```\n\n---\n\n#### Using with `ember-data`\n\nIf using the package [ember-data](https://github.com/emberjs/data/tree/main/packages/-ember-data),\nthe following configuration will automatically be done in order to preserve the\nlegacy [Adapter](https://github.com/emberjs/data/tree/main/packages/adapter) and\n[Serializer](https://github.com/emberjs/data/tree/main/packages/serializer) behavior.\nAdditional handlers or a service injection like the above would need to be done by the\nconsuming application in order to make broader use of `RequestManager`.\n\n```ts\nimport Store from 'ember-data/store';\nimport { CacheHandler } from '@ember-data/store';\nimport RequestManager from '@ember-data/request';\nimport Fetch from '@ember-data/request/fetch';\nimport { LegacyNetworkHandler } from '@ember-data/legacy-compat';\n\nexport default class extends Store {\n  requestManager = new RequestManager()\n    .use([LegacyNetworkHandler, Fetch])\n    .useCache(CacheHandler);\n}\n```\n\nTo provide a different configuration, import and extend `ember-data/store`. The\ndefault configuration will be ignored if the `requestManager` property is set,\nthough the store will still register the CacheHandler.\n\nFor usage of the store's `requestManager` via `store.request(<req>)` see the\n[Store](https://api.emberjs.com/ember-data/release/modules/@ember-data%2Fstore) documentation.\n\n *\n * @module @ember-data/request\n * @main @ember-data/request\n */\n\n/**\n * ```js\n * import RequestManager from '@ember-data/request';\n * ```\n *\n * A RequestManager provides a request/response flow in which configured\n * handlers are successively given the opportunity to handle, modify, or\n * pass-along a request.\n *\n * ```ts\n * interface RequestManager {\n *   request<T>(req: RequestInfo): Future<T>;\n * }\n * ```\n *\n * For example:\n *\n * ```ts\n * import RequestManager from '@ember-data/request';\n * import Fetch from '@ember-data/request/fetch';\n * import Auth from 'ember-simple-auth/ember-data-handler';\n * import Config from './config';\n *\n * const { apiUrl } = Config;\n *\n * // ... create manager\n * const manager = new RequestManager().use([Auth, Fetch]);\n *\n * // ... execute a request\n * const response = await manager.request({\n *   url: `${apiUrl}/users`\n * });\n * ```\n *\n * ### Futures\n *\n * The return value of `manager.request` is a `Future`, which allows\n * access to limited information about the request while it is still\n * pending and fulfills with the final state when the request completes.\n *\n * A `Future` is cancellable via `abort`.\n *\n * Handlers may optionally expose a `ReadableStream` to the `Future` for\n * streaming data; however, when doing so the future should not resolve\n * until the response stream is fully read.\n *\n * ```ts\n * interface Future<T> extends Promise<StructuredDocument<T>> {\n *   abort(): void;\n *\n *   async getStream(): ReadableStream | null;\n * }\n * ```\n *\n * ### StructuredDocuments\n *\n * A Future resolves with a `StructuredDataDocument` or rejects with a `StructuredErrorDocument`.\n *\n * ```ts\n * interface StructuredDataDocument<T> {\n *   request: ImmutableRequestInfo;\n *   response: ImmutableResponseInfo;\n *   content: T;\n * }\n * interface StructuredErrorDocument extends Error {\n *   request: ImmutableRequestInfo;\n *   response: ImmutableResponseInfo;\n *   error: string | object;\n * }\n * type StructuredDocument<T> = StructuredDataDocument<T> | StructuredErrorDocument;\n * ```\n *\n * @class RequestManager\n * @public\n */\nclass RequestManager {\n  #handlers = [];\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  constructor(options) {\n    Object.assign(this, options);\n    this._pending = new Map();\n    this._deduped = new Map();\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   * @method useCache\n   * @public\n   * @param {Handler[]} cacheHandler\n   * @return {ThisType}\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   * @method use\n   * @public\n   * @param {Handler[]} newHandlers\n   * @return {ThisType}\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 !== '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   * @method request\n   * @public\n   * @param {RequestInfo} request\n   * @return {Future}\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    };\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 {\n          waitForPromise\n        } = importSync('@ember/test-waiters');\n        const newPromise = waitForPromise(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  static create(options) {\n    return new this(options);\n  }\n}\n\n// @ts-expect-error adding to globalThis\nglobalThis.setWarpDriveLogging = setLogging;\n\n// @ts-expect-error adding to globalThis\nglobalThis.getWarpDriveRuntimeConfig = getRuntimeConfig;\nexport { RequestManager as default, setPromiseResult };","import EmberObject from '@ember/object';\nimport * as s from '@ember/service';\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\n/**\n  ## Overview\n\n  <blockquote style=\"margin: 1em; padding: .1em 1em .1em 1em; border-left: solid 1em #E34C32; background: #e0e0e0;\">\n  <p>\n    ⚠️ <strong>This is LEGACY documentation</strong> 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    <a href=\"/ember-data/release/classes/%3CInterface%3E%20Handler\">Handler</a> instead to be used with the <a href=\"https://github.com/emberjs/data/tree/main/packages/request#readme\">RequestManager</a>\n  </p>\n  </blockquote>\n\n  In order to properly manage and present your data, EmberData\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 EmberData understands.\n\n  Data received from an API response is **normalized** into\n  [JSON:API](https://jsonapi.org/) (the format used internally\n  by EmberData), 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 [<Interface> Serializer](/ember-data/release/classes/%3CInterface%3E%20Serializer)\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 EmberData 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 `@ember-data/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 @ember-data/serializer\n  @main @ember-data/serializer\n*/\n\nconst service = s.service ?? s.inject;\n\n/**\n  > ⚠️ CAUTION you likely want the docs for [<Interface> Serializer](/ember-data/release/classes/%3CInterface%3E%20Serializer)\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\n  [JSONSerializer](JSONSerializer), the included JSON serializer.\n\n  @class Serializer\n  @public\n  @extends Ember.EmberObject\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    @method normalizeResponse\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     @method serialize\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     @method normalize\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 as default };","import { getOwner } from '@ember/application';\nimport { warn } from '@ember/debug';\nimport { dasherize, singularize } from '@ember-data/request-utils/string';\nimport Serializer from \"./index.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/**\n * @module @ember-data/serializer/json\n */\nconst SOURCE_POINTER_REGEXP = /^\\/?data\\/(attributes|relationships)\\/(.*)/;\nconst SOURCE_POINTER_PRIMARY_REGEXP = /^\\/?data/;\nconst PRIMARY_ATTRIBUTE_KEY = 'base';\n\n/**\n * <blockquote style=\"margin: 1em; padding: .1em 1em .1em 1em; border-left: solid 1em #E34C32; background: #e0e0e0;\">\n  <p>\n    ⚠️ <strong>This is LEGACY documentation</strong> 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    <a href=\"/ember-data/release/classes/%3CInterface%3E%20Handler\">Handler</a> instead to be used with the <a href=\"https://github.com/emberjs/data/tree/main/packages/request#readme\">RequestManager</a>\n  </p>\n  </blockquote>\n\n  In EmberData 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, EmberData 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  ```app/models/user.js\n  import Model, { attr, belongsTo, hasMany } from '@ember-data/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  Ember Data store expects.\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  @main @ember-data/serializer/json\n  @class JSONSerializer\n  @public\n  @extends Serializer\n*/\nconst JSONSerializer = Serializer.extend({\n  /**\n    The `primaryKey` is used when serializing and deserializing\n    data. Ember Data 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     ```app/serializers/application.js\n    import JSONSerializer from '@ember-data/serializer/json';\n     export default class ApplicationSerializer extends JSONSerializer {\n      primaryKey = '_id'\n    }\n    ```\n     @property primaryKey\n    @type {String}\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     ```app/models/person.js\n    import Model, { attr } from '@ember-data/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     ```app/serializers/person.js\n    import JSONSerializer from '@ember-data/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     ```app/serializers/person.js\n    import JSONSerializer from '@ember-data/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     ```javascript\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     @property attrs\n    @public\n    @type {Object}\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    @method applyTransforms\n   @private\n   @param {Model} typeClass\n   @param {Object} data The data to transform\n   @return {Object} data The transformed data object\n  */\n  applyTransforms(typeClass, data) {\n    const attributes = typeClass.attributes;\n    typeClass.eachTransformedAttribute((key, typeClass) => {\n      if (data[key] === undefined) {\n        return;\n      }\n      const transform = this.transformFor(typeClass);\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    @method normalizeResponse\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  normalizeResponse(store, primaryModelClass, payload, id, requestType) {\n    switch (requestType) {\n      case 'findRecord':\n        return this.normalizeFindRecordResponse(...arguments);\n      case 'queryRecord':\n        return this.normalizeQueryRecordResponse(...arguments);\n      case 'findAll':\n        return this.normalizeFindAllResponse(...arguments);\n      case 'findBelongsTo':\n        return this.normalizeFindBelongsToResponse(...arguments);\n      case 'findHasMany':\n        return this.normalizeFindHasManyResponse(...arguments);\n      case 'findMany':\n        return this.normalizeFindManyResponse(...arguments);\n      case 'query':\n        return this.normalizeQueryResponse(...arguments);\n      case 'createRecord':\n        return this.normalizeCreateRecordResponse(...arguments);\n      case 'deleteRecord':\n        return this.normalizeDeleteRecordResponse(...arguments);\n      case 'updateRecord':\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    @method normalizeFindRecordResponse\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  normalizeFindRecordResponse(store, primaryModelClass, payload, id, requestType) {\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    @method normalizeQueryRecordResponse\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  normalizeQueryRecordResponse(store, primaryModelClass, payload, id, requestType) {\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    @method normalizeFindAllResponse\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  normalizeFindAllResponse(store, primaryModelClass, payload, id, requestType) {\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    @method normalizeFindBelongsToResponse\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  normalizeFindBelongsToResponse(store, primaryModelClass, payload, id, requestType) {\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    @method normalizeFindHasManyResponse\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  normalizeFindHasManyResponse(store, primaryModelClass, payload, id, requestType) {\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    @method normalizeFindManyResponse\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  normalizeFindManyResponse(store, primaryModelClass, payload, id, requestType) {\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    @method normalizeQueryResponse\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  normalizeQueryResponse(store, primaryModelClass, payload, id, requestType) {\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    @method normalizeCreateRecordResponse\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  normalizeCreateRecordResponse(store, primaryModelClass, payload, id, requestType) {\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    @method normalizeDeleteRecordResponse\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  normalizeDeleteRecordResponse(store, primaryModelClass, payload, id, requestType) {\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    @method normalizeUpdateRecordResponse\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  normalizeUpdateRecordResponse(store, primaryModelClass, payload, id, requestType) {\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    @method normalizeSaveResponse\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  normalizeSaveResponse(store, primaryModelClass, payload, id, requestType) {\n    return this.normalizeSingleResponse(...arguments);\n  },\n  /**\n    normalizeQueryResponse and normalizeFindRecordResponse delegate to this\n    method by default.\n     @since 1.13.0\n    @method normalizeSingleResponse\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  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    @method normalizeArrayResponse\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  normalizeArrayResponse(store, primaryModelClass, payload, id, requestType) {\n    return this._normalizeResponse(store, primaryModelClass, payload, id, requestType, false);\n  },\n  /**\n    @method _normalizeResponse\n    @param {Store} store\n    @param {Model} primaryModelClass\n    @param {Object} payload\n    @param {String|Number} id\n    @param {String} requestType\n    @param {Boolean} isSingle\n    @return {Object} JSON-API Document\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      documentHash.meta = meta;\n    }\n    if (isSingle) {\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      const ret = new Array(payload.length);\n      for (let i = 0, l = payload.length; i < l; i++) {\n        const item = payload[i];\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      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     ```app/serializers/application.js\n    import JSONSerializer from '@ember-data/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     @method normalize\n    @public\n    @param {Model} typeClass\n    @param {Object} hash\n    @return {Object}\n  */\n  normalize(modelClass, resourceHash) {\n    let data = null;\n    if (resourceHash) {\n      this.normalizeUsingDeclaredMapping(modelClass, resourceHash);\n      if (typeof resourceHash.links === 'object') {\n        this.normalizeUsingDeclaredMapping(modelClass, resourceHash.links);\n      }\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      if (resourceHash.lid) {\n        data.lid = resourceHash.lid;\n      }\n      this.applyTransforms(modelClass, data.attributes);\n    }\n    return {\n      data\n    };\n  },\n  /**\n    Returns the resource's ID.\n     @method extractId\n    @public\n    @param {Object} modelClass\n    @param {Object} resourceHash\n    @return {String}\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     @method extractAttributes\n    @public\n    @param {Object} modelClass\n    @param {Object} resourceHash\n    @return {Object}\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     @method extractRelationship\n    @public\n    @param {Object} relationshipModelName\n    @param {Object} relationshipHash\n    @return {Object}\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      if (relationshipHash.id) {\n        relationshipHash.id = coerceId(relationshipHash.id);\n      }\n      const modelClass = this.store.modelFor(relationshipModelName);\n      if (relationshipHash.type && !modelClass.fields.has('type')) {\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     @method extractPolymorphicRelationship\n    @public\n    @param {Object} relationshipModelName\n    @param {Object} relationshipHash\n    @param {Object} relationshipOptions\n    @return {Object}\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     @method extractRelationships\n    @public\n    @param {Object} modelClass\n    @param {Object} resourceHash\n    @return {Object}\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            data = this.extractPolymorphicRelationship(relationshipMeta.type, relationshipHash, {\n              key,\n              resourceHash,\n              relationshipMeta\n            });\n          } else {\n            data = this.extractRelationship(relationshipMeta.type, relationshipHash);\n          }\n        } else if (relationshipMeta.kind === 'hasMany') {\n          if (relationshipHash) {\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                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                data[i] = this.extractRelationship(relationshipMeta.type, item);\n              }\n            }\n          }\n        }\n        relationship = {\n          data\n        };\n      }\n      const linkKey = this.keyForLink(key, relationshipMeta.kind);\n      if (resourceHash.links && resourceHash.links[linkKey] !== undefined) {\n        const related = resourceHash.links[linkKey];\n        relationship = relationship || {};\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     @method modelNameFromPayloadKey\n    @public\n    @param {String} key\n    @return {String} the model's modelName\n  */\n  modelNameFromPayloadKey(key) {\n    return dasherize(singularize(key));\n  },\n  /**\n    @method normalizeRelationships\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    @method normalizeUsingDeclaredMapping\n    @private\n  */\n  normalizeUsingDeclaredMapping(modelClass, hash) {\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     @method _getMappedKey\n    @private\n    @param {String} key\n    @return {String} key\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    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     @method _canSerialize\n    @private\n    @param {String} key\n    @return {boolean} true if the key can be serialized\n  */\n  _canSerialize(key) {\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     @method _mustSerialize\n    @private\n    @param {String} key\n    @return {boolean} true if the key must be serialized\n  */\n  _mustSerialize(key) {\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     @method shouldSerializeHasMany\n    @public\n    @param {Snapshot} snapshot\n    @param {String} key\n    @param {RelationshipSchema} relationship\n    @return {boolean} true if the hasMany relationship should be serialized\n  */\n  shouldSerializeHasMany(snapshot, key, relationship) {\n    const schema = this.store.modelFor(snapshot.modelName);\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     ```app/models/comment.js\n    import Model, { attr, belongsTo } from '@ember-data/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     ```app/serializers/post.js\n    import JSONSerializer from '@ember-data/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     ```app/serializers/application.js\n    import JSONSerializer from '@ember-data/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     ```app/serializers/post.js\n    import JSONSerializer from '@ember-data/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     @method serialize\n    @public\n    @param {Snapshot} snapshot\n    @param {Object} options\n    @return {Object} json\n  */\n  serialize(snapshot, options) {\n    const json = {};\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     ```app/serializers/application.js\n    import RESTSerializer from '@ember-data/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     @method serializeIntoHash\n    @public\n    @param {Object} hash\n    @param {Model} typeClass\n    @param {Snapshot} snapshot\n    @param {Object} options\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     ```app/serializers/application.js\n    import JSONSerializer from '@ember-data/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     @method serializeAttribute\n    @public\n    @param {Snapshot} snapshot\n    @param {Object} json\n    @param {String} key\n    @param {Object} attribute\n  */\n  serializeAttribute(snapshot, json, key, attribute) {\n    if (this._canSerialize(key)) {\n      const type = attribute.type;\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      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     ```app/serializers/post.js\n    import JSONSerializer from '@ember-data/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     @method serializeBelongsTo\n    @public\n    @param {Snapshot} snapshot\n    @param {Object} json\n    @param {Object} relationship\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      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    ```app/serializers/post.js\n   import JSONSerializer from '@ember-data/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    @method serializeHasMany\n    @public\n   @param {Snapshot} snapshot\n   @param {Object} json\n   @param {Object} relationship\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        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     ```app/serializers/comment.js\n    import JSONSerializer from '@ember-data/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     @method serializePolymorphicType\n    @public\n    @param {Snapshot} snapshot\n    @param {Object} json\n    @param {Object} relationship\n  */\n  serializePolymorphicType() {},\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     ```app/serializers/post.js\n    import JSONSerializer from '@ember-data/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     @method extractMeta\n    @public\n    @param {Store} store\n    @param {Model} modelClass\n    @param {Object} payload\n  */\n  extractMeta(store, modelClass, payload) {\n    if (payload && payload['meta'] !== undefined) {\n      const meta = payload.meta;\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     ```app/serializers/post.js\n    import JSONSerializer from '@ember-data/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     @method extractErrors\n    @public\n    @param {Store} store\n    @param {Model} typeClass\n    @param {Object} payload\n    @param {(String|Number)} id\n    @return {Object} json The deserialized errors\n  */\n  extractErrors(store, typeClass, payload, id) {\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      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     ```app/serializers/application.js\n    import JSONSerializer from '@ember-data/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     @method keyForAttribute\n    @public\n    @param {String} key\n    @param {String} method\n    @return {String} normalized key\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       ```app/serializers/post.js\n      import JSONSerializer from '@ember-data/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     @method keyForRelationship\n    @public\n    @param {String} key\n    @param {String} typeClass\n    @param {String} method\n    @return {String} normalized key\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    @method keyForLink\n    @public\n   @param {String} key\n   @param {String} kind `belongsTo` or `hasMany`\n   @return {String} normalized key\n  */\n  keyForLink(key, kind) {\n    return key;\n  },\n  // HELPERS\n\n  /**\n   @method transformFor\n   @private\n   @param {String} attributeType\n   @param {Boolean} skipAssertion\n   @return {Transform} transform\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 { dasherize, pluralize, singularize } from '@ember-data/request-utils/string';\nimport { J as JSONSerializer } from \"./json-BwMH6O_R.js\";\nimport { macroCondition, getGlobalConfig } from '@embroider/macros';\n\n/**\n * @module @ember-data/serializer/json-api\n */\nconst JSONAPISerializer = JSONSerializer.extend({\n  /**\n    @method _normalizeDocumentHelper\n    @param {Object} documentHash\n    @return {Object}\n    @private\n  */\n  _normalizeDocumentHelper(documentHash) {\n    if (Array.isArray(documentHash.data)) {\n      const ret = new Array(documentHash.data.length);\n      for (let i = 0; i < documentHash.data.length; i++) {\n        const data = documentHash.data[i];\n        ret[i] = this._normalizeResourceHelper(data);\n      }\n      documentHash.data = ret;\n    } else if (documentHash.data && typeof documentHash.data === 'object') {\n      documentHash.data = this._normalizeResourceHelper(documentHash.data);\n    }\n    if (Array.isArray(documentHash.included)) {\n      const ret = new Array();\n      for (let i = 0; i < documentHash.included.length; i++) {\n        const included = documentHash.included[i];\n        const normalized = this._normalizeResourceHelper(included);\n        if (normalized !== null) {\n          // can be null when unknown type is encountered\n          ret.push(normalized);\n        }\n      }\n      documentHash.included = ret;\n    }\n    return documentHash;\n  },\n  /**\n    @method _normalizeRelationshipDataHelper\n    @param {Object} relationshipDataHash\n    @return {Object}\n    @private\n  */\n  _normalizeRelationshipDataHelper(relationshipDataHash) {\n    relationshipDataHash.type = this.modelNameFromPayloadKey(relationshipDataHash.type);\n    return relationshipDataHash;\n  },\n  /**\n    @method _normalizeResourceHelper\n    @param {Object} resourceHash\n    @return {Object}\n    @private\n  */\n  _normalizeResourceHelper(resourceHash) {\n    macroCondition(getGlobalConfig().WarpDrive.env.DEBUG) ? (test => {\n      if (!test) {\n        throw new Error(this.warnMessageForUndefinedType());\n      }\n    })(resourceHash.type) : {};\n    const type = this.modelNameFromPayloadKey(resourceHash.type);\n    if (!this.store.schema.hasResource({\n      type\n    })) {\n      if (macroCondition(getGlobalConfig().WarpDrive.env.DEBUG)) {\n        warn(this.warnMessageNoModelForType(type, resourceHash.type, 'modelNameFromPayloadKey'), false, {\n          id: 'ds.serializer.model-for-type-missing'\n        });\n      }\n      return null;\n    }\n    const modelClass = this.store.modelFor(type);\n    const serializer = this.store.serializerFor(type);\n    const {\n      data\n    } = serializer.normalize(modelClass, resourceHash);\n    return data;\n  },\n  /**\n    Normalize some data and push it into the store.\n     @method pushPayload\n    @public\n    @param {Store} store\n    @param {Object} payload\n  */\n  pushPayload(store, payload) {\n    const normalizedPayload = this._normalizeDocumentHelper(payload);\n    store.push(normalizedPayload);\n  },\n  /**\n    @method _normalizeResponse\n    @param {Store} store\n    @param {Model} primaryModelClass\n    @param {Object} payload\n    @param {String|Number} id\n    @param {String} requestType\n    @param {Boolean} isSingle\n    @return {Object} JSON-API Document\n    @private\n  */\n  _normalizeResponse(store, primaryModelClass, payload, id, requestType, isSingle) {\n    const normalizedPayload = this._normalizeDocumentHelper(payload);\n    return normalizedPayload;\n  },\n  normalizeQueryRecordResponse() {\n    const normalized = this._super(...arguments);\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 but instead it was an array.');\n      }\n    })(!Array.isArray(normalized.data)) : {};\n    return normalized;\n  },\n  extractAttributes(modelClass, resourceHash) {\n    const attributes = {};\n    if (resourceHash.attributes) {\n      modelClass.eachAttribute(key => {\n        const attributeKey = this.keyForAttribute(key, 'deserialize');\n        if (resourceHash.attributes[attributeKey] !== undefined) {\n          attributes[key] = resourceHash.attributes[attributeKey];\n        }\n        if (macroCondition(getGlobalConfig().WarpDrive.env.DEBUG)) {\n          if (resourceHash.attributes[attributeKey] === undefined && resourceHash.attributes[key] !== undefined) {\n            macroCondition(getGlobalConfig().WarpDrive.env.DEBUG) ? (test => {\n              {\n                throw new Error(`Your payload for '${modelClass.modelName}' contains '${key}', but your serializer is setup to look for '${attributeKey}'. This is most likely because Ember Data's JSON API serializer dasherizes attribute keys by default. You should subclass JSONAPISerializer and implement 'keyForAttribute(key) { return key; }' to prevent Ember Data from customizing your attribute keys.`);\n              }\n            })() : {};\n          }\n        }\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      @method extractRelationship\n    @public\n     @param {Object} relationshipHash\n     @return {Object}\n  */\n  extractRelationship(relationshipHash) {\n    if (Array.isArray(relationshipHash.data)) {\n      const ret = new Array(relationshipHash.data.length);\n      for (let i = 0; i < relationshipHash.data.length; i++) {\n        const data = relationshipHash.data[i];\n        ret[i] = this._normalizeRelationshipDataHelper(data);\n      }\n      relationshipHash.data = ret;\n    } else if (relationshipHash.data && typeof relationshipHash.data === 'object') {\n      relationshipHash.data = this._normalizeRelationshipDataHelper(relationshipHash.data);\n    }\n    return 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      @method extractRelationships\n    @public\n     @param {Object} modelClass\n     @param {Object} resourceHash\n     @return {Object}\n  */\n  extractRelationships(modelClass, resourceHash) {\n    const relationships = {};\n    if (resourceHash.relationships) {\n      modelClass.eachRelationship((key, relationshipMeta) => {\n        const relationshipKey = this.keyForRelationship(key, relationshipMeta.kind, 'deserialize');\n        if (resourceHash.relationships[relationshipKey] !== undefined) {\n          const relationshipHash = resourceHash.relationships[relationshipKey];\n          relationships[key] = this.extractRelationship(relationshipHash);\n        }\n        if (macroCondition(getGlobalConfig().WarpDrive.env.DEBUG)) {\n          if (resourceHash.relationships[relationshipKey] === undefined && resourceHash.relationships[key] !== undefined) {\n            macroCondition(getGlobalConfig().WarpDrive.env.DEBUG) ? (test => {\n              {\n                throw new Error(`Your payload for '${modelClass.modelName}' contains '${key}', but your serializer is setup to look for '${relationshipKey}'. This is most likely because Ember Data's JSON API serializer dasherizes relationship keys by default. You should subclass JSONAPISerializer and implement 'keyForRelationship(key) { return key; }' to prevent Ember Data from customizing your relationship keys.`);\n              }\n            })() : {};\n          }\n        }\n      });\n    }\n    return relationships;\n  },\n  /**\n    @method _extractType\n    @param {Model} modelClass\n    @param {Object} resourceHash\n    @return {String}\n    @private\n  */\n  _extractType(modelClass, resourceHash) {\n    return this.modelNameFromPayloadKey(resourceHash.type);\n  },\n  /**\n    Dasherizes and singularizes the model name in the payload to match\n    the format Ember Data uses internally for the model name.\n     For example the key `posts` would be converted to `post` and the\n    key `studentAssesments` would be converted to `student-assesment`.\n     @method modelNameFromPayloadKey\n    @public\n    @param {String} key\n    @return {String} the model's modelName\n  */\n  modelNameFromPayloadKey(key) {\n    return dasherize(singularize(key));\n  },\n  /**\n    Converts the model name to a pluralized version of the model name.\n     For example `post` would be converted to `posts` and\n    `student-assesment` would be converted to `student-assesments`.\n     @method payloadKeyFromModelName\n    @public\n    @param {String} modelName\n    @return {String}\n  */\n  payloadKeyFromModelName(modelName) {\n    return pluralize(modelName);\n  },\n  normalize(modelClass, resourceHash) {\n    if (resourceHash.attributes) {\n      this.normalizeUsingDeclaredMapping(modelClass, resourceHash.attributes);\n    }\n    if (resourceHash.relationships) {\n      this.normalizeUsingDeclaredMapping(modelClass, resourceHash.relationships);\n    }\n    const data = {\n      id: this.extractId(modelClass, resourceHash),\n      type: this._extractType(modelClass, resourceHash),\n      attributes: this.extractAttributes(modelClass, resourceHash),\n      relationships: this.extractRelationships(modelClass, resourceHash)\n    };\n    if (resourceHash.lid) {\n      data.lid = resourceHash.lid;\n    }\n    this.applyTransforms(modelClass, data.attributes);\n    return {\n      data\n    };\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    By default `JSONAPISerializer` follows the format used on the examples of\n    http://jsonapi.org/format and uses dashes as the word separator in the JSON\n    attribute keys.\n     This behaviour can be easily customized by extending this method.\n     Example\n     ```app/serializers/application.js\n    import JSONAPISerializer from '@ember-data/serializer/json-api';\n    import { dasherize } from '<app-name>/utils/string-utils';\n     export default class ApplicationSerializer extends JSONAPISerializer {\n      keyForAttribute(attr, method) {\n        return dasherize(attr).toUpperCase();\n      }\n    }\n    ```\n     @method keyForAttribute\n    @public\n    @param {String} key\n    @param {String} method\n    @return {String} normalized key\n  */\n  keyForAttribute(key, method) {\n    return dasherize(key);\n  },\n  /**\n   `keyForRelationship` can be used to define a custom key when\n   serializing and deserializing relationship properties.\n   By default `JSONAPISerializer` follows the format used on the examples of\n   http://jsonapi.org/format and uses dashes as word separators in\n   relationship properties.\n    This behaviour can be easily customized by extending this method.\n    Example\n     ```app/serializers/post.js\n    import JSONAPISerializer from '@ember-data/serializer/json-api';\n    import { underscore } from '<app-name>/utils/string-utils';\n     export default class ApplicationSerializer extends JSONAPISerializer {\n      keyForRelationship(key, relationship, method) {\n        return underscore(key);\n      }\n    }\n    ```\n   @method keyForRelationship\n    @public\n   @param {String} key\n   @param {String} typeClass\n   @param {String} method\n   @return {String} normalized key\n  */\n  keyForRelationship(key, typeClass, method) {\n    return dasherize(key);\n  },\n  /**\n    Called when a record is saved in order to convert the\n    record into JSON.\n     For example, consider this model:\n     ```app/models/comment.js\n    import Model, { attr, belongsTo } from '@ember-data/model';\n     export default class CommentModel extends Model {\n      @attr title;\n      @attr body;\n       @belongsTo('user', { async: false, inverse: null })\n      author;\n    }\n    ```\n     The default serialization would create a JSON-API resource object like:\n     ```javascript\n    {\n      \"data\": {\n        \"type\": \"comments\",\n        \"attributes\": {\n          \"title\": \"Rails is unagi\",\n          \"body\": \"Rails? Omakase? O_O\",\n        },\n        \"relationships\": {\n          \"author\": {\n            \"data\": {\n              \"id\": \"12\",\n              \"type\": \"users\"\n            }\n          }\n        }\n      }\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 attributes hash.\n     Belongs-to relationships are converted into JSON-API\n    resource identifier objects.\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 JSONAPIAdapter passes in `includeId: true` when serializing a record\n    for `createRecord` or `updateRecord`.\n     ## Customization\n     Your server may expect data in a different format than the\n    built-in serialization format.\n     In that case, you can implement `serialize` yourself and\n    return data formatted to match your API's expectations, or override\n    the invoked adapter method and do the serialization in the adapter directly\n    by using the provided snapshot.\n     If your API's format differs greatly from the JSON:API spec, you should\n    consider authoring your own adapter and serializer instead of extending\n    this class.\n     ```app/serializers/post.js\n    import JSONAPISerializer from '@ember-data/serializer/json-api';\n     export default class PostSerializer extends JSONAPISerializer {\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     ```app/serializers/application.js\n    import JSONAPISerializer from '@ember-data/serializer/json-api';\n    import { underscore, singularize } from '<app-name>/utils/string-utils';\n     export default class ApplicationSerializer extends JSONAPISerializer {\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 underscore(attribute).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 Formatting\n     If you just want to do some small tweaks on the default JSON:API formatted response,\n    you can call `super.serialize` first and make the tweaks\n    on the returned object.\n     ```app/serializers/post.js\n    import JSONAPISerializer from '@ember-data/serializer/json-api';\n     export default class PostSerializer extends JSONAPISerializer {\n      serialize(snapshot, options) {\n        let json = super.serialize(...arguments);\n         json.data.attributes.subject = json.data.attributes.title;\n        delete json.data.attributes.title;\n         return json;\n      }\n    }\n    ```\n     @method serialize\n    @public\n    @param {Snapshot} snapshot\n    @param {Object} options\n    @return {Object} json\n  */\n  serialize(snapshot, options) {\n    const data = this._super(...arguments);\n    data.type = this.payloadKeyFromModelName(snapshot.modelName);\n    return {\n      data\n    };\n  },\n  serializeAttribute(snapshot, json, key, attribute) {\n    const type = attribute.type;\n    if (this._canSerialize(key)) {\n      json.attributes = json.attributes || {};\n      let value = snapshot.attr(key);\n      if (type) {\n        const transform = this.transformFor(type);\n        value = transform.serialize(value, attribute.options);\n      }\n      const schema = this.store.modelFor(snapshot.modelName);\n      let payloadKey = this._getMappedKey(key, schema);\n      if (payloadKey === key) {\n        payloadKey = this.keyForAttribute(key, 'serialize');\n      }\n      json.attributes[payloadKey] = value;\n    }\n  },\n  serializeBelongsTo(snapshot, json, relationship) {\n    const name = relationship.name;\n    if (this._canSerialize(name)) {\n      const belongsTo = snapshot.belongsTo(name);\n      const belongsToIsNotNew = belongsTo && !belongsTo.isNew;\n      if (belongsTo === null || belongsToIsNotNew) {\n        json.relationships = json.relationships || {};\n        const schema = this.store.modelFor(snapshot.modelName);\n        let payloadKey = this._getMappedKey(name, schema);\n        if (payloadKey === name) {\n          payloadKey = this.keyForRelationship(name, 'belongsTo', 'serialize');\n        }\n        let data = null;\n        if (belongsTo) {\n          const payloadType = this.payloadKeyFromModelName(belongsTo.modelName);\n          data = {\n            type: payloadType,\n            id: belongsTo.id\n          };\n        }\n        json.relationships[payloadKey] = {\n          data\n        };\n      }\n    }\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      if (hasMany !== undefined) {\n        json.relationships = json.relationships || {};\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\n        // only serialize has many relationships that are not new\n        const nonNewHasMany = hasMany.filter(item => !item.isNew);\n        const data = new Array(nonNewHasMany.length);\n        for (let i = 0; i < nonNewHasMany.length; i++) {\n          const item = hasMany[i];\n          const payloadType = this.payloadKeyFromModelName(item.modelName);\n          data[i] = {\n            type: payloadType,\n            id: item.id\n          };\n        }\n        json.relationships[payloadKey] = {\n          data\n        };\n      }\n    }\n  }\n});\nif (macroCondition(getGlobalConfig().WarpDrive.env.DEBUG)) {\n  JSONAPISerializer.reopen({\n    init(...args) {\n      this._super(...args);\n      macroCondition(getGlobalConfig().WarpDrive.env.DEBUG) ? (test => {\n        if (!test) {\n          throw new Error(`You've used the EmbeddedRecordsMixin in ${this.toString()} which is not fully compatible with the JSON:API specification. Please confirm that this works for your specific API and add \\`this.isEmbeddedRecordsMixinCompatible = true\\` to your serializer.`);\n        }\n      })(!this.isEmbeddedRecordsMixin || this.isEmbeddedRecordsMixinCompatible === true) : {};\n      const constructor = this.constructor;\n      warn(`You've defined 'extractMeta' in ${constructor.toString()} which is not used for serializers extending JSONAPISerializer. Read more at https://api.emberjs.com/ember-data/release/classes/JSONAPISerializer on how to customize meta when using JSON API.`, this.extractMeta === JSONSerializer.prototype.extractMeta, {\n        id: 'ds.serializer.json-api.extractMeta'\n      });\n    },\n    warnMessageForUndefinedType() {\n      return 'Encountered a resource object with an undefined type (resolved resource using ' + this.constructor.toString() + ')';\n    },\n    warnMessageNoModelForType(modelName, originalType, usedLookup) {\n      return `Encountered a resource object with type \"${originalType}\", but no model was found for model name \"${modelName}\" (resolved model name using '${this.constructor.toString()}.${usedLookup}(\"${originalType}\")').`;\n    }\n  });\n}\nexport { JSONAPISerializer as default };","import { warn } from '@ember/debug';\nimport { camelize, dasherize, singularize } from '@ember-data/request-utils/string';\nimport { J as JSONSerializer, c as coerceId } from \"./json-BwMH6O_R.js\";\nimport { macroCondition, getGlobalConfig } from '@embroider/macros';\nimport Mixin from '@ember/object/mixin';\n\n/**\n  @module @ember-data/serializer/rest\n*/\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  ```app/serializers/post.js\n  import RESTSerializer, { EmbeddedRecordsMixin } from '@ember-data/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  For example, review the docs for each method of this mixin:\n  * [normalize](/ember-data/release/classes/EmbeddedRecordsMixin/methods/normalize?anchor=normalize)\n  * [serializeBelongsTo](/ember-data/release/classes/EmbeddedRecordsMixin/methods/serializeBelongsTo?anchor=serializeBelongsTo)\n  * [serializeHasMany](/ember-data/release/classes/EmbeddedRecordsMixin/methods/serializeHasMany?anchor=serializeHasMany)\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   @method normalize\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 '@ember-data/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     ```app/serializers/post.js\n    import RESTSerializer, { EmbeddedRecordsMixin } from '@ember-data/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     @method serializeBelongsTo\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 '@ember-data/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     ```app/serializers/post.js\n    import RESTSerializer, { EmbeddedRecordsMixin } from '@ember-data/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     ```app/serializers/post.js\n    import RESTSerializer, { EmbeddedRecordsMixin } from '@ember-data/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     ```app/serializers/user.js\n    import RESTSerializer, { EmbeddedRecordsMixin } from '@ember-data/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     @method serializeHasMany\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     @method removeEmbeddedForeignKey\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   @method _extractEmbeddedRecords\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   @method _extractEmbeddedHasMany\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   @method _extractEmbeddedBelongsTo\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      belongsTo.lid = data.lid;\n    }\n    hash.data.relationships[key] = relationship;\n  },\n  /**\n   @method _normalizeEmbeddedRelationship\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/**\n * @module @ember-data/serializer/rest\n */\nfunction makeArray(value) {\n  return Array.isArray(value) ? value : [value];\n}\n\n/**\n * <blockquote style=\"margin: 1em; padding: .1em 1em .1em 1em; border-left: solid 1em #E34C32; background: #e0e0e0;\">\n  <p>\n    ⚠️ <strong>This is LEGACY documentation</strong> 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    <a href=\"/ember-data/release/classes/%3CInterface%3E%20Handler\">Handler</a> instead to be used with the <a href=\"https://github.com/emberjs/data/tree/main/packages/request#readme\">RequestManager</a>\n  </p>\n  </blockquote>\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  ```app/serializers/application.js\n  import RESTSerializer from '@ember-data/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  @main @ember-data/serializer/rest\n  @public\n  @extends JSONSerializer\n*/\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     ```app/serializers/post.js\n    import RESTSerializer from '@ember-data/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    @method keyForPolymorphicType\n    @public\n   @param {String} key\n   @param {String} typeClass\n   @param {String} method\n   @return {String} normalized key\n  */\n  keyForPolymorphicType(key, typeClass, method) {\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     ```app/serializers/post.js\n    import RESTSerializer from '@ember-data/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     @method normalize\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     @method _normalizeArray\n    @param {Store} store\n    @param {String} modelName\n    @param {Object} arrayHash\n    @param {String} prop\n    @return {Object}\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      const {\n        data,\n        included\n      } = this._normalizePolymorphicRecord(store, hash, prop, modelClass, serializer);\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    if (!primaryHasTypeAttribute && hash.type) {\n      // Support polymorphic records in async relationships\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    return serializer.normalize(modelClass, hash, prop);\n  },\n  /**\n    @method _normalizeResponse\n    @param {Store} store\n    @param {Model} primaryModelClass\n    @param {Object} payload\n    @param {String|Number} id\n    @param {String} requestType\n    @param {Boolean} isSingle\n    @return {Object} JSON-API Document\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      documentHash.meta = meta;\n    }\n    const keys = Object.keys(payload);\n    for (var i = 0, length = keys.length; i < length; i++) {\n      var prop = keys[i];\n      var modelName = prop;\n      var 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          warn(this.warnMessageNoModelForKey(modelName, type), false, {\n            id: 'ds.serializer.model-for-key-missing'\n          });\n        }\n        continue;\n      }\n      var isPrimary = !forcedSecondary && this.isPrimaryType(store, type, primaryModelClass);\n      var 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        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      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        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            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     @method pushPayload\n    @public\n    @param {Store} store\n    @param {Object} payload\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          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        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     ```app/models/post.js\n    import Model from '@ember-data/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     ```app/serializers/application.js\n    import RESTSerializer from '@ember-data/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     @method modelNameFromPayloadKey\n    @public\n    @param {String} key\n    @return {String} 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     ```app/models/comment.js\n    import Model, { attr, belongsTo } from '@ember-data/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     ```app/serializers/post.js\n    import RESTSerializer from '@ember-data/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     ```app/serializers/application.js\n    import RESTSerializer from '@ember-data/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     ```app/serializers/post.js\n    import RESTSerializer from '@ember-data/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     @method serialize\n    @public\n    @param {Snapshot} snapshot\n    @param {Object} options\n    @return {Object} json\n  */\n  serialize(snapshot, options) {\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     ```app/serializers/application.js\n    import RESTSerializer from '@ember-data/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     @method serializeIntoHash\n    @public\n    @param {Object} hash\n    @param {Model} typeClass\n    @param {Snapshot} snapshot\n    @param {Object} options\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     ```app/serializers/application.js\n    import RESTSerializer from '@ember-data/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     @method payloadKeyFromModelName\n    @public\n    @param {String} modelName\n    @return {String}\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     @method serializePolymorphicType\n    @public\n    @param {Snapshot} snapshot\n    @param {Object} json\n    @param {Object} relationship\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      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     @method extractPolymorphicRelationship\n    @public\n    @param {Object} relationshipType\n    @param {Object} relationshipHash\n    @param {Object} relationshipOptions\n    @return {Object}\n   */\n  extractPolymorphicRelationship(relationshipType, relationshipHash, relationshipOptions) {\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    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 as default };","import EmberObject from '@ember/object';\nimport { TransformName } from '@warp-drive/core-types/symbols';\n\n/**\n  @module @ember-data/serializer\n*/\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  ```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  ```app/models/requirement.js\n  import Model, { attr } from '@ember-data/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  ```app/models/post.js\n  import Model, { attr } from '@ember-data/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  ```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 */\n/**\n  When given a deserialized value from a record attribute this\n  method must return the serialized value.\n\n  Example\n\n  ```javascript\n  serialize(deserialized, options) {\n    return deserialized ? null : Number(deserialized);\n  }\n  ```\n\n  @method serialize\n  @public\n  @param deserialized The deserialized value\n  @param options hash of options passed to `attr`\n  @return The serialized value\n*/\n/**\n  When given a serialized value from a JSON object this method must\n  return the deserialized value for the record attribute.\n\n  Example\n\n  ```javascript\n  deserialize(serialized, options) {\n    return empty(serialized) ? null : Number(serialized);\n  }\n  ```\n\n  @method deserialize\n  @public\n  @param serialized The serialized value\n  @param options hash of options passed to `attr`\n  @return The deserialized value\n*/\n\nconst Transform = EmberObject;\n\n/**\n  @module @ember-data/serializer\n*/\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  [attr](/ember-data/release/functions/@ember-data%2Fmodel/attr) function.\n\n  Usage\n\n  ```app/models/user.js\n  import Model, { attr } 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  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  ```app/models/user.js\n  import Model, { attr } from '@ember-data/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  @class BooleanTransform\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/**\n  @module @ember-data/serializer\n*/\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 [attr](/ember-data/release/functions/@ember-data%2Fmodel/attr) function. It uses the [`ISO 8601`](https://en.wikipedia.org/wiki/ISO_8601)\n standard.\n\n ```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 @class DateTransform\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  [TransformName] = 'date';\n  static create() {\n    return new this();\n  }\n}\n\n/**\n  @module @ember-data/serializer\n*/\n\nfunction isNumber(value) {\n  return value === value && value !== Infinity && value !== -Infinity;\n}\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  [attr](/ember-data/release/functions/@ember-data%2Fmodel/attr) function.\n\n  Usage\n\n  ```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  @class NumberTransform\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  [TransformName] = 'number';\n  static create() {\n    return new this();\n  }\n}\n\n/**\n  @module @ember-data/serializer\n*/\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  [attr](/ember-data/release/functions/@ember-data%2Fmodel/attr) function.\n\n  Usage\n\n  ```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  @class StringTransform\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  [TransformName] = 'string';\n  static create() {\n    return new this();\n  }\n}\nexport { BooleanTransform, DateTransform, NumberTransform, StringTransform, Transform as default };","import { macroCondition, getGlobalConfig } from '@embroider/macros';\n\n/**\n  @module @ember-data/store\n*/\n// provided for additional debuggability\nconst DEBUG_CLIENT_ORIGINATED = Symbol('record-originated-on-client');\nconst DEBUG_IDENTIFIER_BUCKET = Symbol('identifier-bucket');\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 * An Identifier specific to a record which may or may not\n * be present in the cache.\n *\n * The absence of an `id` DOES NOT indicate that this\n * Identifier is for a new client-created record as it\n * may also indicate that it was generated for a secondary\n * index and the primary `id` index is not yet known.\n *\n * @internal\n */\n\n/**\n * Used when an Identifier is known to be the stable version\n *\n * @internal\n */\n\n/**\n * Used when a StableRecordIdentifier was not created locally as part\n * of a call to store.createRecord\n *\n * Distinguishing between this Identifier and one for a client created\n * record 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 * @internal\n */\n\n/**\n * Used when a StableRecordIdentifier was created locally\n * (by a call to store.createRecord).\n *\n * It is possible in rare circumstances to have a StableRecordIdentifier\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 * @internal\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 record instance has a unique identifier, and identifiers may refer\n * to data that has never been loaded (for instance, in an async relationship).\n *\n * @class StableRecordIdentifier\n * @public\n */\n\n/**\n * A string representing a unique identity.\n *\n * @property {string} lid\n * @public\n */\n/**\n * the primary resource `type` or `modelName` this identity belongs to.\n *\n * @property {string} type\n * @public\n */\n/**\n * the primary id for the record this identity belongs to. `null`\n * if not yet assigned an id.\n *\n * @property {string | null} id\n * @public\n */\n\nexport { CACHE_OWNER, DEBUG_CLIENT_ORIGINATED, DEBUG_IDENTIFIER_BUCKET, DEBUG_STALE_CACHE_OWNER };","import { deprecate, warn } from '@ember/debug';\nimport { macroCondition, getGlobalConfig, dependencySatisfies, importSync } from '@embroider/macros';\nimport { EnableHydration, SkipCache } from '@warp-drive/core-types/request';\nimport { setLogging, getRuntimeConfig } from '@warp-drive/core-types/runtime';\nimport { getOrSetGlobal, peekTransient, setTransient } from '@warp-drive/core-types/-private';\nimport { _backburner } from '@ember/runloop';\nimport { defineSubscription, notifySignal, defineSignal, createSignal, subscribe, createArrayTags, addToTransaction, addTransactionCB } from '@ember-data/tracking/-private';\nimport { CACHE_OWNER, DEBUG_STALE_CACHE_OWNER, DEBUG_IDENTIFIER_BUCKET, DEBUG_CLIENT_ORIGINATED } from '@warp-drive/core-types/identifier';\nimport { dasherize } from '@ember-data/request-utils/string';\nimport { compat } from '@ember-data/tracking';\n\n/**\n  @module @ember-data/store\n*/\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}\n\n/**\n  @module @ember-data/store\n*/\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 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}\n\n/**\n  @module @ember-data/store\n*/\nconst DOCUMENTS = getOrSetGlobal('DOCUMENTS', new Set());\nfunction isStableIdentifier(identifier) {\n  return identifier[CACHE_OWNER] !== undefined;\n}\nfunction isDocumentIdentifier(identifier) {\n  return DOCUMENTS.has(identifier);\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/emberjs/data#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<StableRecordIdentifier>; id: Map<string, StableRecordIdentifier> };\n// type IdentifiersByType = Map<string, IdentifierTypeLookup>;\n\nfunction setIdentifierGenerationMethod(method) {\n  setTransient('configuredGenerationMethod', method);\n}\nfunction setIdentifierUpdateMethod(method) {\n  setTransient('configuredUpdateMethod', method);\n}\nfunction setIdentifierForgetMethod(method) {\n  setTransient('configuredForgetMethod', method);\n}\nfunction setIdentifierResetMethod(method) {\n  setTransient('configuredResetMethod', method);\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 StableRecordIdentifier`);\n      }\n    })(isStableIdentifier(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 {Store} receives a unique instance of a IdentifierCache.\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 * @class IdentifierCache\n   @public\n */\nclass IdentifierCache {\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   * @method __configureMerge\n   * @private\n   */\n  __configureMerge(method) {\n    this._merge = method || defaultMergeMethod;\n  }\n  upgradeIdentifier(resource) {\n    return this._getRecordIdentifier(resource, 2);\n  }\n\n  /**\n   * @method _getRecordIdentifier\n   * @private\n   */\n\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 (isStableIdentifier(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__*/makeStableRecordIdentifier(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__*/makeStableRecordIdentifier(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   * @method peekRecordIdentifier\n   * @param resource\n   * @return {StableRecordIdentifier | undefined}\n   * @private\n   */\n  peekRecordIdentifier(resource) {\n    return this._getRecordIdentifier(resource, 0);\n  }\n\n  /**\n    Returns the DocumentIdentifier for the given Request, creates one if it does not yet exist.\n    Returns `null` if the request does not have a `cacheKey` or `url`.\n     @method getOrCreateDocumentIdentifier\n    @param request\n    @return {StableDocumentIdentifier | null}\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      };\n      if (macroCondition(getGlobalConfig().WarpDrive.env.DEBUG)) {\n        Object.freeze(identifier);\n      }\n      DOCUMENTS.add(identifier);\n      this._cache.documents.set(cacheKey, identifier);\n    }\n    return identifier;\n  }\n\n  /**\n    Returns the Identifier 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     @method getOrCreateRecordIdentifier\n    @param resource\n    @return {StableRecordIdentifier}\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    @method createIdentifierForNewRecord\n   @param data\n   @return {StableRecordIdentifier}\n   @public\n  */\n  createIdentifierForNewRecord(data) {\n    const newLid = this._generate(data, 'record');\n    const identifier = /*#__NOINLINE__*/makeStableRecordIdentifier({\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     @method updateRecordIdentifier\n    @param identifierObject\n    @param data\n    @return {StableRecordIdentifier}\n    @public\n  */\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   * @method _mergeRecordIdentifiers\n   * @private\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    @method forgetRecordIdentifier\n   @param identifierObject\n   @public\n  */\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  destroy() {\n    NEW_IDENTIFIERS.clear();\n    this._cache.documents.forEach(identifier => {\n      DOCUMENTS.delete(identifier);\n    });\n    this._reset();\n  }\n}\nfunction makeStableRecordIdentifier(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_IDENTIFIER_BUCKET]() {\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 RecordIdentifier 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 RecordIdentifier 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 RecordIdentifier 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}\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 === '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 '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}\n\n/**\n * @module @ember-data/store\n */\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 resource-identifiers into\n * record 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 * @class ReactiveDocument\n */\nclass ReactiveDocument {\n  /**\n   * The links object for this document, if any\n   *\n   * e.g.\n   *\n   * ```\n   * {\n   *   self: '/articles?page[number]=3',\n   * }\n   * ```\n   *\n   * @property links\n   * @type {object|undefined} - a links object\n   * @public\n   */\n\n  /**\n   * The primary data for this document, if any.\n   *\n   * If this document has no primary data (e.g. because it is an error document)\n   * this property will be `undefined`.\n   *\n   * For collections this will be an array of record instances,\n   * for single resource requests it will be a single record instance or null.\n   *\n   * @property data\n   * @public\n   * @type {object|Array<object>|null|undefined} - a data object\n   */\n\n  /**\n   * The errors returned by the API for this request, if any\n   *\n   * @property errors\n   * @public\n   * @type {object|undefined} - an errors object\n   */\n\n  /**\n   * The meta object for this document, if any\n   *\n   * @property meta\n   * @public\n   * @type {object|undefined} - a meta object\n   */\n\n  /**\n   * The identifier associated with this document, if any\n   *\n   * @property identifier\n   * @public\n   * @type {StableDocumentIdentifier|null}\n   */\n\n  constructor(store, identifier, localCache) {\n    this._store = store;\n    this._localCache = localCache;\n    this.identifier = identifier;\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 (identifier) {\n      store.notifications.subscribe(identifier, (_identifier, 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            notifySignal(this, 'data');\n            notifySignal(this, 'links');\n            notifySignal(this, 'meta');\n            notifySignal(this, 'errors');\n            break;\n        }\n      });\n    }\n  }\n  async #request(link, options) {\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\n  /**\n   * Fetches the related link for this document, returning a promise that resolves\n   * with the document when the request completes. If no related link is present,\n   * will fallback to the self link if present\n   *\n   * @method fetch\n   * @public\n   * @param {object} options\n   * @return Promise<Document>\n   */\n  fetch(options = {}) {\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\n  /**\n   * Fetches the next link for this document, returning a promise that resolves\n   * with the new document when the request completes, or null  if there is no\n   * next link.\n   *\n   * @method next\n   * @public\n   * @param {object} options\n   * @return Promise<Document | null>\n   */\n  next(options = {}) {\n    return this.#request('next', options);\n  }\n\n  /**\n   * Fetches the prev link for this document, returning a promise that resolves\n   * with the new document when the request completes, or null if there is no\n   * prev link.\n   *\n   * @method prev\n   * @public\n   * @param {object} options\n   * @return Promise<Document | null>\n   */\n  prev(options = {}) {\n    return this.#request('prev', options);\n  }\n\n  /**\n   * Fetches the first link for this document, returning a promise that resolves\n   * with the new document when the request completes, or null if there is no\n   * first link.\n   *\n   * @method first\n   * @public\n   * @param {object} options\n   * @return Promise<Document | null>\n   */\n  first(options = {}) {\n    return this.#request('first', options);\n  }\n\n  /**\n   * Fetches the last link for this document, returning a promise that resolves\n   * with the new document when the request completes, or null if there is no\n   * last link.\n   *\n   * @method last\n   * @public\n   * @param {object} options\n   * @return Promise<Document | null>\n   */\n  last(options = {}) {\n    return this.#request('last', options);\n  }\n\n  /**\n   * Implemented for `JSON.stringify` support.\n   *\n   * Returns the JSON representation of the document wrapper.\n   *\n   * This is a shallow serialization, it does not deeply serialize\n   * the document's contents, leaving that to the individual record\n   * instances to determine how to do, if at all.\n   *\n   * @method toJSON\n   * @public\n   * @return\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}\ndefineSubscription(ReactiveDocument.prototype, '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});\ndefineSubscription(ReactiveDocument.prototype, '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 this._store.recordArrayManager.getCollection({\n        type: identifier ? identifier.lid : _localCache.request.url,\n        identifiers: data.slice(),\n        doc: identifier ? undefined : doc,\n        identifier: identifier ?? null\n      });\n    } else if (data) {\n      return this._store.peekRecord(data);\n    } else {\n      return data;\n    }\n  }\n});\ndefineSubscription(ReactiveDocument.prototype, '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});\ndefineSubscription(ReactiveDocument.prototype, '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});\n\n/**\n  @module @ember-data/store\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   @class RecordReference\n   @public\n*/\nclass RecordReference {\n  // unsubscribe token given to us by the notification manager\n  ___token;\n  ___identifier;\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  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      @method id\n    @public\n     @return {String} 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      @method identifier\n    @public\n     @return {String} 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      @method remoteType\n     @public\n     @return {String} 'identity'\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`, Ember Data 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     @method push\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      @method value\n    @public\n     @return {Model} 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      @method load\n    @public\n     @return {Promise<record>} 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      @method reload\n    @public\n     @return {Promise<record>} 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/**\n  @module @ember-data/store\n*/\nclass CacheCapabilitiesManager {\n  constructor(_store) {\n    this._store = _store;\n    this._willNotify = false;\n    this._pendingNotifies = new Map();\n  }\n  get identifierCache() {\n    return this._store.identifierCache;\n  }\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  _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    })(isStableIdentifier(identifier) || isDocumentIdentifier(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    })(isStableIdentifier(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    })(isStableIdentifier(identifier)) : {};\n    this._store._instanceCache.disconnect(identifier);\n    this._pendingNotifies.delete(identifier);\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._store.schema;\n  };\n}\n\n/*\n * Returns the Cache instance associated with a given\n * Model or Identifier\n */\n\nconst CacheForIdentifierCache = getOrSetGlobal('CacheForIdentifierCache', new Map());\nfunction setCacheFor(identifier, cache) {\n  macroCondition(getGlobalConfig().WarpDrive.env.DEBUG) ? (test => {\n    if (!test) {\n      throw new Error(`Illegal set of identifier`);\n    }\n  })(!CacheForIdentifierCache.has(identifier) || CacheForIdentifierCache.get(identifier) === cache) : {};\n  CacheForIdentifierCache.set(identifier, cache);\n}\nfunction removeRecordDataFor(identifier) {\n  CacheForIdentifierCache.delete(identifier);\n}\nfunction peekCache(instance) {\n  if (CacheForIdentifierCache.has(instance)) {\n    return CacheForIdentifierCache.get(instance);\n  }\n  return null;\n}\nfunction isDestroyable(record) {\n  return Boolean(record && typeof record === 'object' && typeof record.destroy === 'function');\n}\n\n/**\n  @module @ember-data/store\n*/\n\nconst RecordCache = getOrSetGlobal('RecordCache', new Map());\nfunction peekRecordIdentifier(record) {\n  return RecordCache.get(record);\n}\n\n/**\n  Retrieves the unique referentially-stable [RecordIdentifier](/ember-data/release/classes/StableRecordIdentifier)\n  assigned to the given record instance.\n  ```js\n  import { recordIdentifierFor } from \"@ember-data/store\";\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 StableRecordIdentifier)\n  const identifier = recordIdentifierFor(record);\n  // access the identifier's properties.\n  const { id, type, lid } = identifier;\n  ```\n  @method recordIdentifierFor\n  @public\n  @static\n  @for @ember-data/store\n  @param {Object} record a record instance previously obstained from the store.\n  @return {StableRecordIdentifier}\n */\n\nfunction recordIdentifierFor(record) {\n  macroCondition(getGlobalConfig().WarpDrive.env.DEBUG) ? (test => {\n    if (!test) {\n      throw new Error(`${String(record)} is not a record instantiated by @ember-data/store`);\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}\nconst StoreMap = getOrSetGlobal('StoreMap', new Map());\nfunction storeFor(record) {\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  })(store) : {};\n  return store;\n}\nclass InstanceCache {\n  constructor(store) {\n    this.store = store;\n    this.__instances = {\n      record: new Map(),\n      reference: new WeakMap(),\n      document: new Map()\n    };\n    this._storeWrapper = new CacheCapabilitiesManager(this.store);\n    store.identifierCache.__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 RecordIdentifier '${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 RecordIdentifier '${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 = new ReactiveDocument(this.store, identifier, null);\n      this.__instances.document.set(identifier, doc);\n    }\n    return doc;\n  }\n  getRecord(identifier, properties) {\n    let record = this.__instances.record.get(identifier);\n    if (!record) {\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      })(!this.store.isDestroying && !this.store.isDestroyed) : {};\n      const cache = this.store.cache;\n      setCacheFor(identifier, cache);\n      record = this.store.instantiateRecord(identifier, properties || {});\n      setRecordIdentifier(record, identifier);\n      setCacheFor(record, cache);\n      StoreMap.set(record, this.store);\n      this.__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.log({\n            properties\n          });\n          // eslint-disable-next-line no-console\n          console.groupEnd();\n        }\n      }\n    }\n    return record;\n  }\n  getReference(identifier) {\n    const cache = this.__instances.reference;\n    let reference = cache.get(identifier);\n    if (!reference) {\n      reference = new RecordReference(this.store, identifier);\n      cache.set(identifier, reference);\n    }\n    return reference;\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.identifierCache.forgetRecordIdentifier(identifier);\n    removeRecordDataFor(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      const record = this.__instances.record.get(identifier);\n      const cache = this.cache;\n      if (record) {\n        this.store.teardownRecord(record);\n        this.__instances.record.delete(identifier);\n        StoreMap.delete(record);\n        RecordCache.delete(record);\n        removeRecordDataFor(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        removeRecordDataFor(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        this.disconnect(identifier);\n      }\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          // 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  clear(type) {\n    const cache = this.store.identifierCache._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.identifierCache.peekRecordIdentifier({\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.identifierCache.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');\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    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  */\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}\nfunction _clearCaches() {\n  RecordCache.clear();\n  StoreMap.clear();\n  CacheForIdentifierCache.clear();\n}\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 @ember-data/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}\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  #cache;\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   * @method put\n   * @param {StructuredDocument} doc\n   * @return {ResourceDocument}\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   * Note: currently the only valid operation is a MergeOperation\n   * which occurs when a collision of identifiers is detected.\n   *\n   * @method patch\n   * @public\n   * @param op the operation to perform\n   * @return {void}\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   * @method mutate\n   * @public\n   * @param mutation\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   * @method peek\n   * @public\n   * @param {StableRecordIdentifier | StableDocumentIdentifier} identifier\n   * @return {ResourceDocument | ResourceBlob | null} the known resource data\n   */\n\n  peek(identifier) {\n    return this.#cache.peek(identifier);\n  }\n  peekRemoteState(identifier) {\n    return this.#cache.peekRemoteState(identifier);\n  }\n  /**\n   * Peek the Cache for the existing request data associated with\n   * a cacheable request\n   *\n   * @method peekRequest\n   * @param {StableDocumentIdentifier}\n   * @return {StableDocumentIdentifier | null}\n   * @public\n   */\n  peekRequest(identifier) {\n    return this.#cache.peekRequest(identifier);\n  }\n\n  /**\n   * Push resource data from a remote source into the cache for this identifier\n   *\n   * @method upsert\n   * @public\n   * @param identifier\n   * @param data\n   * @param hasRecord\n   * @return {void | string[]} if `hasRecord` is true then calculated key changes should be returned\n   */\n  upsert(identifier, data, hasRecord) {\n    return this.#cache.upsert(identifier, 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   * @method fork\n   * @public\n   * @return Promise<Cache>\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   * @method merge\n   * @param {Cache} cache\n   * @public\n   * @return Promise<void>\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 `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: StableRecordIdentifier | StableDocumentIdentifier;\n   *  op: 'upsert' | 'remove';\n   *  patch?: unknown;\n   * }\n   * ```\n   *\n   * @method diff\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   * @method dump\n   * @return {Promise<ReadableStream>}\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   * @method hydrate\n   * @param {ReadableStream} stream\n   * @return {Promise<void>}\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   * @method clientDidCreate\n   * @public\n   * @param identifier\n   * @param options\n   */\n  clientDidCreate(identifier, options) {\n    return this.#cache.clientDidCreate(identifier, options);\n  }\n\n  /**\n   * [LIFECYCLE] Signals to the cache that a resource\n   * will be part of a save transaction.\n   *\n   * @method willCommit\n   * @public\n   * @param identifier\n   */\n  willCommit(identifier, context) {\n    this.#cache.willCommit(identifier, 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   * @method didCommit\n   * @public\n   * @param identifier\n   * @param data\n   */\n  didCommit(identifier, result) {\n    return this.#cache.didCommit(identifier, result);\n  }\n\n  /**\n   * [LIFECYCLE] Signals to the cache that a resource\n   * was update via a save transaction failed.\n   *\n   * @method commitWasRejected\n   * @public\n   * @param identifier\n   * @param errors\n   */\n  commitWasRejected(identifier, errors) {\n    this.#cache.commitWasRejected(identifier, errors);\n  }\n\n  /**\n   * [LIFECYCLE] Signals to the cache that all data for a resource\n   * should be cleared.\n   *\n   * @method unloadRecord\n   * @public\n   * @param identifier\n   */\n  unloadRecord(identifier) {\n    this.#cache.unloadRecord(identifier);\n  }\n\n  // Granular Resource Data APIs\n  // ===========================\n\n  /**\n   * Retrieve the data for an attribute from the cache\n   *\n   * @method getAttr\n   * @public\n   * @param identifier\n   * @param propertyName\n   * @return {unknown}\n   */\n  getAttr(identifier, propertyName) {\n    return this.#cache.getAttr(identifier, propertyName);\n  }\n\n  /**\n   * Retrieve the remote state for an attribute from the cache\n   *\n   * @method getRemoteAttr\n   * @public\n   * @param identifier\n   * @param propertyName\n   * @return {unknown}\n   */\n  getRemoteAttr(identifier, propertyName) {\n    return this.#cache.getRemoteAttr(identifier, propertyName);\n  }\n\n  /**\n   * Mutate the data for an attribute in the cache\n   *\n   * @method setAttr\n   * @public\n   * @param identifier\n   * @param propertyName\n   * @param value\n   */\n  setAttr(identifier, propertyName, value) {\n    this.#cache.setAttr(identifier, propertyName, value);\n  }\n\n  /**\n   * Query the cache for the changed attributes of a resource.\n   *\n   * @method changedAttrs\n   * @public\n   * @param identifier\n   * @return\n   */\n  changedAttrs(identifier) {\n    return this.#cache.changedAttrs(identifier);\n  }\n\n  /**\n   * Query the cache for whether any mutated attributes exist\n   *\n   * @method hasChangedAttrs\n   * @public\n   * @param identifier\n   * @return {boolean}\n   */\n  hasChangedAttrs(identifier) {\n    return this.#cache.hasChangedAttrs(identifier);\n  }\n\n  /**\n   * Tell the cache to discard any uncommitted mutations to attributes\n   *\n   * @method rollbackAttrs\n   * @public\n   * @param identifier\n   * @return the names of attributes that were restored\n   */\n  rollbackAttrs(identifier) {\n    return this.#cache.rollbackAttrs(identifier);\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: StableRecordIdentifier[];\n      additions: Set<StableRecordIdentifier>;\n      removals: Set<StableRecordIdentifier>;\n      localState: StableRecordIdentifier[];\n      reordered: boolean;\n    }\n  | {\n      kind: 'resource';\n      remoteState: StableRecordIdentifier | null;\n      localState: StableRecordIdentifier | null;\n    };\n    ```\n   *\n   * @method changedRelationships\n   * @public\n   * @param {StableRecordIdentifier} identifier\n   * @return {Map<string, RelationshipDiff>}\n   */\n  changedRelationships(identifier) {\n    return this.#cache.changedRelationships(identifier);\n  }\n\n  /**\n   * Query the cache for whether any mutated attributes exist\n   *\n   * @method hasChangedRelationships\n   * @public\n   * @param {StableRecordIdentifier} identifier\n   * @return {boolean}\n   */\n  hasChangedRelationships(identifier) {\n    return this.#cache.hasChangedRelationships(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   * @method rollbackRelationships\n   * @public\n   * @param {StableRecordIdentifier} identifier\n   * @return {string[]} the names of relationships that were restored\n   */\n  rollbackRelationships(identifier) {\n    return this.#cache.rollbackRelationships(identifier);\n  }\n\n  /**\n   * Query the cache for the current state of a relationship property\n   *\n   * @method getRelationship\n   * @public\n   * @param identifier\n   * @param propertyName\n   * @return resource relationship object\n   */\n  getRelationship(identifier, propertyName) {\n    return this.#cache.getRelationship(identifier, propertyName);\n  }\n\n  /**\n   * Query the cache for the remote state of a relationship property\n   *\n   * @method getRelationship\n   * @public\n   * @param identifier\n   * @param propertyName\n   * @return resource relationship object\n   */\n  getRemoteRelationship(identifier, propertyName) {\n    return this.#cache.getRemoteRelationship(identifier, 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   * @method setIsDeleted\n   * @public\n   * @param identifier\n   * @param isDeleted\n   */\n  setIsDeleted(identifier, isDeleted) {\n    this.#cache.setIsDeleted(identifier, isDeleted);\n  }\n\n  /**\n   * Query the cache for any validation errors applicable to the given resource.\n   *\n   * @method getErrors\n   * @public\n   * @param identifier\n   * @return\n   */\n  getErrors(identifier) {\n    return this.#cache.getErrors(identifier);\n  }\n\n  /**\n   * Query the cache for whether a given resource has any available data\n   *\n   * @method isEmpty\n   * @public\n   * @param identifier\n   * @return {boolean}\n   */\n  isEmpty(identifier) {\n    return this.#cache.isEmpty(identifier);\n  }\n\n  /**\n   * Query the cache for whether a given resource was created locally and not\n   * yet persisted.\n   *\n   * @method isNew\n   * @public\n   * @param identifier\n   * @return {boolean}\n   */\n  isNew(identifier) {\n    return this.#cache.isNew(identifier);\n  }\n\n  /**\n   * Query the cache for whether a given resource is marked as deleted (but not\n   * necessarily persisted yet).\n   *\n   * @method isDeleted\n   * @public\n   * @param identifier\n   * @return {boolean}\n   */\n  isDeleted(identifier) {\n    return this.#cache.isDeleted(identifier);\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   * @method isDeletionCommitted\n   * @public\n   * @param identifier\n   * @return {boolean}\n   */\n  isDeletionCommitted(identifier) {\n    return this.#cache.isDeletionCommitted(identifier);\n  }\n}\n\n/**\n * @module @ember-data/store\n */\n\nfunction isCacheOperationValue(value) {\n  return value === 'added' || value === 'state' || value === 'updated' || value === 'removed' || value === 'invalidated';\n}\nfunction runLoopIsFlushing() {\n  //@ts-expect-error\n  return !!_backburner.currentInstance && _backburner._autorun !== true;\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 identifier = token.for;\n  if (macroCondition(getGlobalConfig().WarpDrive.activeLogging.LOG_NOTIFICATIONS)) {\n    if (getGlobalConfig().WarpDrive.debug.LOG_NOTIFICATIONS || globalThis.getWarpDriveRuntimeConfig().debug.LOG_NOTIFICATIONS) {\n      if (!identifier) {\n        // eslint-disable-next-line no-console\n        console.log('Passed unknown unsubscribe token to unsubscribe', identifier);\n      }\n    }\n  }\n  if (identifier) {\n    const callbacks = cache.get(identifier);\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 EmberData to create subscriptions that\n * work with any framework or change-notification system.\n *\n * @class NotificationManager\n * @public\n */\nclass NotificationManager {\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 resource identifier, resource addition/removal, or document addition/removal.\n   *\n   * ```ts\n   * export type CacheOperation = 'added' | 'removed' | 'updated' | 'state';\n   *\n   * export interface NotificationCallback {\n   *   (identifier: StableRecordIdentifier, notificationType: 'attributes' | 'relationships', key?: string): void;\n   *   (identifier: StableRecordIdentifier, notificationType: 'errors' | 'meta' | 'identity' | 'state'): void;\n   *   (identifier: StableRecordIdentifier, notificationType: NotificationType, key?: string): void;\n   * }\n   * export interface ResourceOperationCallback {\n   *   // resource updates\n   *   (identifier: StableRecordIdentifier, notificationType: CacheOperation): void;\n   * }\n   * export interface DocumentOperationCallback {\n   *   // document updates\n   *   (identifier: StableDocumentIdentifier, notificationType: CacheOperation): void;\n   * }\n   * ```\n   *\n   * @method subscribe\n   * @public\n   * @param {StableDocumentIdentifier | StableRecordIdentifier | 'resource' | 'document'} identifier\n   * @param {NotificationCallback | ResourceOperationCallback | DocumentOperationCallback} callback\n   * @return {UnsubscribeToken} an opaque token to be used with unsubscribe\n   */\n\n  subscribe(identifier, callback) {\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    })(identifier === 'resource' || identifier === 'document' || isStableIdentifier(identifier) || isDocumentIdentifier(identifier)) : {};\n    let callbacks = this._cache.get(identifier);\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 = identifier;\n    if (!callbacks) {\n      callbacks = [];\n      this._cache.set(identifier, callbacks);\n    }\n    callbacks.push(callback);\n    return callback;\n  }\n\n  /**\n   * remove a previous subscription\n   *\n   * @method unsubscribe\n   * @public\n   * @param {UnsubscribeToken} token\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   * @method notify\n   * @param identifier\n   * @param value\n   * @param key\n   * @return {Boolean} whether a notification was delivered to any subscribers\n   * @private\n   */\n\n  notify(identifier, value, key) {\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 (!isStableIdentifier(identifier) && !isDocumentIdentifier(identifier)) {\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(identifier)} is not in the cache`, identifier);\n        }\n      }\n      return false;\n    }\n    const hasSubscribers = Boolean(this._cache.get(identifier)?.length);\n    if (isCacheOperationValue(value) || hasSubscribers) {\n      let buffer = this._buffered.get(identifier);\n      if (!buffer) {\n        buffer = [];\n        this._buffered.set(identifier, buffer);\n      }\n      buffer.push([value, key]);\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 identifier ? identifier.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 identifier ? identifier.type : 'document'}`, identifier.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 identifier ? identifier.type : 'document'}`, identifier.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 identifier ? identifier.type : '<document>'} ${value} ${key}`);\n        }\n      }\n    }\n    return hasSubscribers;\n  }\n  _onNextFlush(cb) {\n    this._onFlushCB = cb;\n  }\n  _scheduleNotify() {\n    const asyncFlush = this.store._enableAsyncFlush;\n    if (this._hasFlush) {\n      if (asyncFlush !== false && !runLoopIsFlushing()) {\n        return false;\n      }\n    }\n    if (asyncFlush && !runLoopIsFlushing()) {\n      this._hasFlush = true;\n      return false;\n    }\n    this._flush();\n    return true;\n  }\n  _flush() {\n    const buffered = this._buffered;\n    if (buffered.size) {\n      this._buffered = new Map();\n      buffered.forEach((states, identifier) => {\n        states.forEach(args => {\n          // @ts-expect-error\n          this._flushNotification(identifier, args[0], args[1]);\n        });\n      });\n    }\n    this._hasFlush = false;\n    this._onFlushCB?.();\n    this._onFlushCB = undefined;\n  }\n  _flushNotification(identifier, 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 identifier ? identifier.type : 'document'}`, identifier.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 = this._cache.get(isDocumentIdentifier(identifier) ? 'document' : 'resource');\n      if (callbackMap) {\n        callbackMap.forEach(cb => {\n          cb(identifier, value);\n        });\n      }\n    }\n    const callbacks = this._cache.get(identifier);\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(identifier, value, key);\n    });\n    return true;\n  }\n  destroy() {\n    this.isDestroyed = true;\n    this._cache.clear();\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;\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}\n\n/**\n  @module @ember-data/store\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']);\nconst ARRAY_SETTER_METHODS = new Set(['push', 'pop', 'unshift', 'shift', 'splice', 'sort']);\nconst SYNC_PROPS = new Set(['[]', 'length', 'links', 'meta']);\nfunction isArrayGetter(prop) {\n  return ARRAY_GETTER_METHODS.has(prop);\n}\nfunction isArraySetter(prop) {\n  return ARRAY_SETTER_METHODS.has(prop);\n}\nfunction isSelfProp(self, prop) {\n  return prop in self;\n}\nconst ARRAY_SIGNAL = getOrSetGlobal('#signal', Symbol('#signal'));\nconst SOURCE = getOrSetGlobal('#source', Symbol('#source'));\nconst MUTATE = getOrSetGlobal('#update', Symbol('#update'));\nconst NOTIFY = getOrSetGlobal('#notify', Symbol('#notify'));\nconst IS_COLLECTION = getOrSetGlobal('IS_COLLECTION', Symbol.for('Collection'));\nfunction notifyArray(arr) {\n  addToTransaction(arr[ARRAY_SIGNAL]);\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, store._instanceCache.getRecord(arr[index]), index, instance);\n  }\n  return instance;\n}\n\n/**\n  A record array is an array that contains records of a certain type (or modelName).\n  The record array materializes records as needed when they are retrieved for the first\n  time. You should not create record arrays yourself. Instead, an instance of\n  `RecordArray` or its subclasses will be returned by your application's store\n  in response to queries.\n\n  This class should not be imported and instantiated by consuming applications.\n\n  @class RecordArray\n  @public\n*/\n\nclass IdentifierArray {\n  /**\n    The flag to signal a `RecordArray` is currently loading data.\n    Example\n    ```javascript\n    let people = store.peekAll('person');\n    people.isUpdating; // false\n    people.update();\n    people.isUpdating; // true\n    ```\n    @property isUpdating\n    @public\n    @type Boolean\n  */\n\n  isLoaded = true;\n  isDestroying = false;\n  isDestroyed = false;\n  _updatingPromise = null;\n  identifier;\n  [IS_COLLECTION] = true;\n  [SOURCE];\n  [NOTIFY]() {\n    notifyArray(this);\n  }\n\n  /**\n    The store that created this record array.\n     @property store\n    @private\n    @type Store\n    */\n\n  destroy(clear) {\n    this.isDestroying = !clear;\n    // changing the reference breaks the Proxy\n    // this[SOURCE] = [];\n    this[SOURCE].length = 0;\n    this[NOTIFY]();\n    this.isDestroyed = !clear;\n  }\n\n  // length must be on self for proxied methods to work properly\n  get length() {\n    return this[SOURCE].length;\n  }\n  static {\n    decorateMethodV2(this.prototype, \"length\", [compat]);\n  }\n  set length(value) {\n    this[SOURCE].length = value;\n  }\n  constructor(options) {\n    // eslint-disable-next-line @typescript-eslint/no-this-alias\n    const self = this;\n    this.modelName = options.type;\n    this.store = options.store;\n    this._manager = options.manager;\n    this.identifier = options.identifier || null;\n    this[SOURCE] = options.identifiers;\n    this[ARRAY_SIGNAL] = createSignal(this, 'length');\n    const store = options.store;\n    const boundFns = new Map();\n    const _SIGNAL = this[ARRAY_SIGNAL];\n    const PrivateState = {\n      links: options.links || null,\n      meta: options.meta || null\n    };\n    let transaction = false;\n\n    // when a mutation occurs\n    // we track all mutations within the call\n    // and forward them as one\n\n    const proxy = new NativeProxy(this[SOURCE], {\n      get(target, prop, receiver) {\n        const index = convertToInt(prop);\n        if (_SIGNAL.shouldReset && (index !== null || SYNC_PROPS.has(prop) || isArrayGetter(prop))) {\n          options.manager._syncArray(receiver);\n          _SIGNAL.t = false;\n          _SIGNAL.shouldReset = false;\n        }\n        if (index !== null) {\n          const identifier = target[index];\n          if (!transaction) {\n            subscribe(_SIGNAL);\n          }\n          return identifier && store._instanceCache.getRecord(identifier);\n        }\n        if (prop === 'meta') return subscribe(_SIGNAL), PrivateState.meta;\n        if (prop === 'links') return subscribe(_SIGNAL), PrivateState.links;\n        if (prop === '[]') return subscribe(_SIGNAL), receiver;\n        if (isArrayGetter(prop)) {\n          let fn = boundFns.get(prop);\n          if (fn === undefined) {\n            if (prop === 'forEach') {\n              fn = function () {\n                subscribe(_SIGNAL);\n                transaction = true;\n                const result = safeForEach(receiver, target, store, arguments[0], arguments[1]);\n                transaction = false;\n                return result;\n              };\n            } else {\n              fn = function () {\n                subscribe(_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              // array functions must run through Reflect to work properly\n              // binding via other means will not work.\n              if (!options.allowMutation) {\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                })(options.allowMutation) : {};\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              })(!transaction) : {};\n              transaction = true;\n              const result = self[MUTATE](target, receiver, prop, args, _SIGNAL);\n              transaction = false;\n              return result;\n            };\n            boundFns.set(prop, fn);\n          }\n          return fn;\n        }\n        if (isSelfProp(self, prop)) {\n          if (prop === NOTIFY || prop === ARRAY_SIGNAL || prop === SOURCE) {\n            return self[prop];\n          }\n          let fn = boundFns.get(prop);\n          if (fn) return fn;\n          const outcome = self[prop];\n          if (typeof outcome === 'function') {\n            fn = function () {\n              subscribe(_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            boundFns.set(prop, fn);\n            return fn;\n          }\n          return subscribe(_SIGNAL), outcome;\n        }\n        return target[prop];\n      },\n      // FIXME: Should this get a generic like get above?\n      set(target, prop, value, receiver) {\n        if (prop === 'length') {\n          if (!transaction && value === 0) {\n            transaction = true;\n            self[MUTATE](target, receiver, 'length 0', [], _SIGNAL);\n            transaction = false;\n            return true;\n          } else if (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 (prop === 'links') {\n          PrivateState.links = value || null;\n          return true;\n        }\n        if (prop === 'meta') {\n          PrivateState.meta = value || null;\n          return true;\n        }\n        const index = convertToInt(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 && 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            })(isStableIdentifier(identifier)) : {};\n            target[index] = identifier;\n            return true;\n          } else if (isSelfProp(self, prop)) {\n            // @ts-expect-error not all properties are indeces and we can't safely cast\n            self[prop] = value;\n            return true;\n          }\n          return false;\n        }\n        if (!options.allowMutation) {\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          })(options.allowMutation) : {};\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        })(isStableIdentifier(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 (!transaction) {\n          self[MUTATE](target, receiver, 'replace cell', [index, original, newIdentifier], _SIGNAL);\n        } else {\n          target[index] = newIdentifier;\n        }\n        return true;\n      },\n      deleteProperty(target, prop) {\n        macroCondition(getGlobalConfig().WarpDrive.env.DEBUG) ? (test => {\n          if (!test) {\n            throw new Error(`Deleting keys on managed arrays is disallowed`);\n          }\n        })(transaction) : {};\n        if (!transaction) {\n          return false;\n        }\n        return Reflect.deleteProperty(target, prop);\n      },\n      getPrototypeOf() {\n        return Array.prototype;\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          return proxy.slice();\n        }\n      });\n    }\n    createArrayTags(proxy, _SIGNAL);\n    this[NOTIFY] = this[NOTIFY].bind(proxy);\n    return proxy;\n  }\n\n  /**\n    Used to get the latest version of all of the records in this array\n    from the adapter.\n     Example\n     ```javascript\n    let people = store.peekAll('person');\n    people.isUpdating; // false\n     people.update().then(function() {\n      people.isUpdating; // false\n    });\n     people.isUpdating; // true\n    ```\n     @method update\n    @public\n  */\n  update() {\n    if (this.isUpdating) {\n      return this._updatingPromise;\n    }\n    this.isUpdating = true;\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  }\n\n  /*\n    Update this Array and return a promise which resolves once the update\n    is finished.\n   */\n  _update() {\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 this.store.findAll(this.modelName, {\n      reload: true\n    });\n  }\n\n  // TODO deprecate\n  /**\n    Saves all of the records in the `RecordArray`.\n     Example\n     ```javascript\n    let messages = store.peekAll('message');\n    messages.forEach(function(message) {\n      message.hasBeenSeen = true;\n    });\n    messages.save();\n    ```\n     @method save\n    @public\n    @return {Promise<IdentifierArray>} promise\n  */\n  save() {\n    const promise = Promise.all(this.map(record => this.store.saveRecord(record))).then(() => this);\n    return promise;\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};\ncompat(desc);\nObject.defineProperty(IdentifierArray.prototype, '[]', desc);\ndefineSignal(IdentifierArray.prototype, 'isUpdating', false);\nclass Collection extends IdentifierArray {\n  query = null;\n  constructor(options) {\n    super(options);\n    this.query = options.query || null;\n    this.isLoaded = options.isLoaded || false;\n  }\n  _update() {\n    const {\n      store,\n      query\n    } = this;\n\n    // TODO save options from initial request?\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 = store.query(this.modelName, query, {\n      _recordArray: this\n    });\n    return promise;\n  }\n  destroy(clear) {\n    super.destroy(clear);\n    this._manager._managed.delete(this);\n    this._manager._pending.delete(this);\n  }\n}\n// trick the proxy \"in\" check\nCollection.prototype.query = null;\n\n// Ensure instanceof works correctly\n// Object.setPrototypeOf(IdentifierArray.prototype, Array.prototype);\n\nfunction assertRecordPassedToHasMany$1(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 extractIdentifierFromRecord$2(record) {\n  if (!record) {\n    return null;\n  }\n  assertRecordPassedToHasMany$1(record);\n  return recordIdentifierFor(record);\n}\n\n/**\n  @module @ember-data/store\n*/\nconst FAKE_ARR = getOrSetGlobal('FAKE_ARR', {});\nconst SLICE_BATCH_SIZE = 1200;\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 EmberData 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 * @function fastPush\n * @internal\n * @param target the array to push into\n * @param source the items to push into target\n */\nfunction fastPush(target, source) {\n  let startLength = 0;\n  const newLength = source.length;\n  while (newLength - startLength > SLICE_BATCH_SIZE) {\n    // eslint-disable-next-line prefer-spread\n    target.push.apply(target, source.slice(startLength, startLength + SLICE_BATCH_SIZE));\n    startLength += SLICE_BATCH_SIZE;\n  }\n  // eslint-disable-next-line prefer-spread\n  target.push.apply(target, source.slice(startLength));\n}\n/**\n  @class RecordArrayManager\n  @internal\n*/\nclass RecordArrayManager {\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._subscription = 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._subscription = this.store.notifications.subscribe('resource', (identifier, type) => {\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  _syncArray(array) {\n    const pending = this._pending.get(array);\n    const isRequestArray = isCollection(array);\n    if (!isRequestArray && !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 (isRequestArray) {\n      const tag = array[ARRAY_SIGNAL];\n      if (tag.reason === 'cache-sync') {\n        tag.reason = null;\n        const doc = this.store.cache.peek(array.identifier);\n        macroCondition(getGlobalConfig().WarpDrive.env.DEBUG) ? (test => {\n          if (!test) {\n            throw new Error(`Expected to find a document for ${array.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     @method liveArrayFor\n    @internal\n    @param {String} modelName\n    @return {RecordArray}\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 = new IdentifierArray({\n        type,\n        identifiers,\n        store: this.store,\n        allowMutation: false,\n        manager: this\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 (config.identifier && this._keyedArrays.has(config.identifier.lid)) {\n      return this._keyedArrays.get(config.identifier.lid);\n    }\n    const options = {\n      type: config.type,\n      identifier: config.identifier || null,\n      links: config.doc?.links || null,\n      meta: config.doc?.meta || null,\n      query: config.query || null,\n      identifiers: config.identifiers || [],\n      isLoaded: !!config.identifiers?.length,\n      allowMutation: false,\n      store: this.store,\n      manager: this\n    };\n    const array = new Collection(options);\n    this._managed.add(array);\n    this._set.set(array, new Set(options.identifiers || []));\n    if (config.identifier) {\n      this._keyedArrays.set(config.identifier.lid, array);\n    }\n    if (config.identifiers) {\n      associate(this._identifiers, array, config.identifiers);\n    }\n    return array;\n  }\n  dirtyArray(array, delta, shouldSyncFromCache) {\n    if (array === FAKE_ARR) {\n      return;\n    }\n    const tag = array[ARRAY_SIGNAL];\n    if (shouldSyncFromCache) {\n      tag.reason = 'cache-sync';\n    }\n    if (!tag.shouldReset) {\n      tag.shouldReset = true;\n      addTransactionCB(array[NOTIFY]);\n    } else if (delta > 0 && !tag.t) {\n      addTransactionCB(array[NOTIFY]);\n    }\n  }\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[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  populateManagedArray(array, identifiers, payload) {\n    this._pending.delete(array);\n    const source = array[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    notifyArray(array);\n    array.meta = payload?.meta || null;\n    array.links = payload?.links || null;\n    array.isLoaded = true;\n    disassociate(this._identifiers, array, old);\n    associate(this._identifiers, array, identifiers);\n  }\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  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  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  clear(isClear = true) {\n    this._live.forEach(array => array.destroy(isClear));\n    this._managed.forEach(array => array.destroy(isClear));\n    this._managed.clear();\n    this._identifiers.clear();\n    this._pending.clear();\n    this._set.forEach(set => set.clear());\n    this._visibilitySet.clear();\n  }\n  destroy() {\n    this.isDestroying = true;\n    this.clear(false);\n    this._live.clear();\n    this.isDestroyed = true;\n    this.store.notifications.unsubscribe(this._subscription);\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[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 isCollection(array) {\n  return array.identifier !== null;\n}\n\n/**\n * @module @ember-data/store\n */\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 * @class RequestStateService\n * @public\n */\nclass RequestStateService {\n  _pending = new Map();\n  _done = new Map();\n  _subscriptions = new Map();\n  _toFlush = [];\n  _store;\n  constructor(store) {\n    this._store = store;\n  }\n  _clearEntries(identifier) {\n    this._done.delete(identifier);\n  }\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  _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  _flush() {\n    this._toFlush.forEach(req => {\n      this._flushRequest(req);\n    });\n    this._toFlush = [];\n  }\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  _dequeue(identifier, request) {\n    const pending = this._pending.get(identifier);\n    this._pending.set(identifier, pending.filter(req => req !== request));\n  }\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   * @method subscribeForRecord\n   * @public\n   * @param {StableRecordIdentifier} identifier\n   * @param {(state: RequestState) => 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   * @method getPendingRequestsForRecord\n   * @public\n   * @param {StableRecordIdentifier} identifier\n   * @return {RequestState[]} 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   * @method getLastRequestForRecord\n   * @public\n   * @param {StableRecordIdentifier} identifier\n   * @return {RequestState | 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}\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 (isStableIdentifier(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  @module @ember-data/store\n */\n// this import location is deprecated but breaks in 4.8 and older\n\n// @ts-expect-error adding to globalThis\nglobalThis.setWarpDriveLogging = setLogging;\n\n// @ts-expect-error adding to globalThis\nglobalThis.getWarpDriveRuntimeConfig = getRuntimeConfig;\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 * @typedoc\n */\n\n/**\n * A Store coordinates interaction between your application, a [Cache](https://api.emberjs.com/ember-data/release/classes/%3CInterface%3E%20Cache),\n * and sources of data (such as your API or a local persistence layer)\n * accessed via a [RequestManager](https://github.com/emberjs/data/tree/main/packages/request).\n *\n * ```app/services/store.js\n * import Store from '@ember-data/store';\n *\n * export default class extends Store {}\n * ```\n *\n * Most Applications will only have a single `Store` configured as a Service\n * in this manner. However, setting up multiple stores is possible, including using\n * each as a unique service or within a specific context.\n *\n\n  @class Store\n  @public\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}\nclass Store extends BaseClass {\n  /**\n   * Provides access to the NotificationManager associated\n   * with this Store instance.\n   *\n   * The NotificationManager can be used to subscribe to\n   * changes to the cache.\n   *\n   * @property {NotificationManager} notifications\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   * @property {SchemaService} schema\n   * @public\n   */\n  get schema() {\n    if (!this._schema) {\n      this._schema = this.createSchemaService();\n    }\n    return this._schema;\n  }\n\n  /**\n   * Provides access to the IdentifierCache instance\n   * for this store.\n   *\n   * The IdentifierCache can be used to generate or\n   * retrieve a stable unique identifier for any resource.\n   *\n   * @property {IdentifierCache} identifierCache\n   * @public\n   */\n\n  /**\n   * Provides access to the requestManager instance associated\n   * with this Store instance.\n   *\n   * When using `ember-data` this property is automatically\n   * set to an instance of `RequestManager`. When not using `ember-data`\n   * you must configure this property yourself, either by declaring\n   * it as a service or by initializing it.\n   *\n   * ```ts\n   * import Store, { CacheHandler } from '@ember-data/store';\n   * import RequestManager from '@ember-data/request';\n   * import Fetch from '@ember-data/request/fetch';\n   *\n   * class extends Store {\n   *   requestManager = new RequestManager()\n   *    .use([Fetch])\n   *    .useCache(CacheHandler);\n   * }\n   * ```\n   *\n   * @public\n   * @property {RequestManager} requestManager\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 [IdentifierCache](/ember-data/release/classes/IdentifierCache)\n   * was able to generate a key for the request using the configured\n   * [generation method](/ember-data/release/functions/@ember-data%2Fstore/setIdentifierGenerationMethod).\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(identifier: StableDocumentIdentifier): boolean {\n   *     return false;\n   *   }\n   *\n   *   // make the request in the background if true, return cache state\n   *   isSoftExpired(identifier: StableDocumentIdentifier): boolean {\n   *     return false;\n   *   }\n   * }\n   * ```\n   *\n   * @public\n   * @property {CachePolicy|undefined} lifetimes\n   */\n\n  // Private\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  // DEBUG-only properties\n\n  get isDestroying() {\n    return this._isDestroying;\n  }\n  set isDestroying(value) {\n    this._isDestroying = value;\n  }\n  get isDestroyed() {\n    return this._isDestroyed;\n  }\n  set isDestroyed(value) {\n    this._isDestroyed = value;\n  }\n\n  /**\n    @method init\n    @private\n  */\n  constructor(createArgs) {\n    super(createArgs);\n    Object.assign(this, createArgs);\n    this.identifierCache = new IdentifierCache();\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  _run(cb) {\n    macroCondition(getGlobalConfig().WarpDrive.env.DEBUG) ? (test => {\n      if (!test) {\n        throw new Error(`EmberData 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  _schedule(name, cb) {\n    macroCondition(getGlobalConfig().WarpDrive.env.DEBUG) ? (test => {\n      if (!test) {\n        throw new Error(`EmberData 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(`EmberData 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   * @method getRequestStateService\n   * @return {RequestStateService}\n   * @public\n   */\n  getRequestStateService() {\n    return this._requestCache;\n  }\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   * Issue a request via the configured RequestManager,\n   * inserting the response into the cache and handing\n   * back a Future which resolves to a ResponseDocument\n   *\n   * ## Cache Keys\n   *\n   * Only GET requests with a url or requests with an explicit\n   * cache key (`cacheOptions.key`) will have the request result\n   * and document cached.\n   *\n   * The cache key used is `requestConfig.cacheOptions.key`\n   * if present, falling back to `requestConfig.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 `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 CachePolicy\n   * with priority given to the `cacheOptions.reload` and\n   * `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 `requestManager.request` and `store.request`\n   * is that `store.request` will attempt to hydrate the response content into\n   * a response Document containing RecordInstances.\n   *\n   * @method request\n   * @param {StoreRequestInput} requestConfig\n   * @return {Future}\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 identifierCache = this.identifierCache;\n      opts.records = requestConfig.records.map(r => identifierCache.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   * A hook which an app or addon may implement. Called when\n   * the Store is attempting to create a Record Instance for\n   * a resource.\n   *\n   * This hook can be used to select or instantiate any desired\n   * mechanism of presenting cache data to the ui for access\n   * mutation, and interaction.\n   *\n   * @method instantiateRecord (hook)\n   * @param identifier\n   * @param createRecordArgs\n   * @param recordDataFor deprecated use this.cache\n   * @param notificationManager deprecated use this.notifications\n   * @return A record instance\n   * @public\n   */\n\n  /**\n   * A hook which an app or addon may implement. Called when\n   * the Store is destroying a Record Instance. This hook should\n   * be used to teardown any custom record instances instantiated\n   * with `instantiateRecord`.\n   *\n   * @method teardownRecord (hook)\n   * @public\n   * @param record\n   */\n\n  /**\n    Returns the schema for a particular resource type (modelName).\n     When used with Model from @ember-data/model the return is the model class,\n    but this is not guaranteed.\n     If looking to query attribute or relationship information it is\n    recommended to use `getSchemaDefinitionService` instead. This method\n    should be considered legacy and exists primarily to continue to support\n    Adapter/Serializer APIs which expect it's return value in their method\n    signatures.\n     The class of a model might be useful if you want to get a list of all the\n    relationship names of the model, see\n    [`relationshipNames`](/ember-data/release/classes/Model?anchor=relationshipNames)\n    for example.\n     @method modelFor\n    @public\n    @deprecated\n    @param {string} type\n    @return {ModelSchema}\n    */\n\n  modelFor(type) {\n    // FIXME add deprecation and deprecation stripping\n    // FIXME/TODO update RFC to remove this method\n    if (macroCondition(getGlobalConfig().WarpDrive.env.DEBUG)) {\n      assertDestroyedStoreOnly(this, 'modelFor');\n    }\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\n  /**\n    Create a new record in the current store. The properties passed\n    to this method are set on the newly created record.\n     To create a new instance of a `Post`:\n     ```js\n    store.createRecord('post', {\n      title: 'Ember is awesome!'\n    });\n    ```\n     To create a new instance of a `Post` that has a relationship with a `User` record:\n     ```js\n    let user = this.store.peekRecord('user', '1');\n    store.createRecord('post', {\n      title: 'Ember is awesome!',\n      user: user\n    });\n    ```\n     @method createRecord\n    @public\n    @param {String} type the name of the resource\n    @param {Object} inputProperties a hash of properties to set on the\n      newly created record.\n    @return {Model} record\n  */\n\n  createRecord(type, inputProperties) {\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.identifierCache.peekRecordIdentifier(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      const identifier = this.identifierCache.createIdentifierForNewRecord(resource);\n      const cache = this.cache;\n      const createOptions = normalizeProperties(this, identifier, properties);\n      const resultProps = cache.clientDidCreate(identifier, createOptions);\n      record = this._instanceCache.getRecord(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     @method deleteRecord\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 = peekRecordIdentifier(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     @method unloadRecord\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 = peekRecordIdentifier(record);\n    if (identifier) {\n      this._instanceCache.unloadRecord(identifier);\n    }\n  }\n\n  /**\n    This method returns a record for a given identifier or type and id combination.\n     The `findRecord` method will always resolve its promise with the same\n    object for a given identifier or type and `id`.\n     The `findRecord` method will always return a **promise** that will be\n    resolved with the record.\n     **Example 1**\n     ```app/routes/post.js\n    export default class PostRoute extends Route {\n      model({ post_id }) {\n        return this.store.findRecord('post', post_id);\n      }\n    }\n    ```\n     **Example 2**\n     `findRecord` 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     ```app/routes/post.js\n    export default class PostRoute extends Route {\n      model({ post_id: id }) {\n        return this.store.findRecord({ type: 'post', id });\n      }\n    }\n    ```\n     **Example 3**\n     If you have previously received an lid via an Identifier for this record, and the record\n    has already been assigned an id, you can find the record again using just the lid.\n     ```app/routes/post.js\n    store.findRecord({ lid });\n    ```\n     If the record is not yet available, the store will ask the adapter's `findRecord`\n    method to retrieve and supply the necessary data. If the record is already present\n    in the store, it depends on the reload behavior _when_ the returned promise\n    resolves.\n     ### Preloading\n     You can optionally `preload` specific attributes and relationships that you know of\n    by passing them via the passed `options`.\n     For example, if your Ember route looks like `/posts/1/comments/2` and your API route\n    for the comment also looks like `/posts/1/comments/2` if you want to fetch the comment\n    without also fetching the post you can pass in the post to the `findRecord` call:\n     ```app/routes/post-comments.js\n    export default class PostRoute extends Route {\n      model({ post_id, comment_id: id }) {\n        return this.store.findRecord({ type: 'comment', id, { preload: { post: post_id }} });\n      }\n    }\n    ```\n     In your adapter you can then access this id without triggering a network request via the\n    snapshot:\n     ```app/adapters/application.js\n    export default class Adapter {\n       findRecord(store, schema, id, snapshot) {\n        let type = schema.modelName;\n         if (type === 'comment')\n          let postId = snapshot.belongsTo('post', { id: true });\n           return fetch(`./posts/${postId}/comments/${id}`)\n            .then(response => response.json())\n        }\n      }\n       static create() {\n        return new this();\n      }\n    }\n    ```\n     This could also be achieved by supplying the post id to the adapter via the adapterOptions\n    property on the options hash.\n     ```app/routes/post-comments.js\n    export default class PostRoute extends Route {\n      model({ post_id, comment_id: id }) {\n        return this.store.findRecord({ type: 'comment', id, { adapterOptions: { post: post_id }} });\n      }\n    }\n    ```\n     ```app/adapters/application.js\n    export default class Adapter {\n      findRecord(store, schema, id, snapshot) {\n        let type = schema.modelName;\n         if (type === 'comment')\n          let postId = snapshot.adapterOptions.post;\n           return fetch(`./posts/${postId}/comments/${id}`)\n            .then(response => response.json())\n        }\n      }\n       static create() {\n        return new this();\n      }\n    }\n    ```\n     If you have access to the post model you can also pass the model itself to preload:\n     ```javascript\n    let post = await store.findRecord('post', '1');\n    let comment = await store.findRecord('comment', '2', { post: myPostModel });\n    ```\n     ### Reloading\n     The reload behavior is configured either via the passed `options` hash or\n    the result of the adapter's `shouldReloadRecord`.\n     If `{ reload: true }` is passed or `adapter.shouldReloadRecord` evaluates\n    to `true`, then the returned promise resolves once the adapter returns\n    data, regardless if the requested record is already in the store:\n     ```js\n    store.push({\n      data: {\n        id: 1,\n        type: 'post',\n        revision: 1\n      }\n    });\n     // adapter#findRecord resolves with\n    // [\n    //   {\n    //     id: 1,\n    //     type: 'post',\n    //     revision: 2\n    //   }\n    // ]\n    store.findRecord('post', '1', { reload: true }).then(function(post) {\n      post.revision; // 2\n    });\n    ```\n     If no reload is indicated via the above mentioned ways, then the promise\n    immediately resolves with the cached version in the store.\n     ### Background Reloading\n     Optionally, if `adapter.shouldBackgroundReloadRecord` evaluates to `true`,\n    then a background reload is started, which updates the records' data, once\n    it is available:\n     ```js\n    // app/adapters/post.js\n    import ApplicationAdapter from \"./application\";\n     export default class PostAdapter extends ApplicationAdapter {\n      shouldReloadRecord(store, snapshot) {\n        return false;\n      },\n       shouldBackgroundReloadRecord(store, snapshot) {\n        return true;\n      }\n    });\n     // ...\n     store.push({\n      data: {\n        id: 1,\n        type: 'post',\n        revision: 1\n      }\n    });\n     let blogPost = store.findRecord('post', '1').then(function(post) {\n      post.revision; // 1\n    });\n     // later, once adapter#findRecord resolved with\n    // [\n    //   {\n    //     id: 1,\n    //     type: 'post',\n    //     revision: 2\n    //   }\n    // ]\n     blogPost.revision; // 2\n    ```\n     If you would like to force or prevent background reloading, you can set a\n    boolean value for `backgroundReload` in the options object for\n    `findRecord`.\n     ```app/routes/post/edit.js\n    export default class PostEditRoute extends Route {\n      model(params) {\n        return this.store.findRecord('post', params.post_id, { backgroundReload: false });\n      }\n    }\n    ```\n     If you pass an object on the `adapterOptions` property of the options\n    argument it will be passed to your adapter via the snapshot\n     ```app/routes/post/edit.js\n    export default class PostEditRoute extends Route {\n      model(params) {\n        return this.store.findRecord('post', params.post_id, {\n          adapterOptions: { subscribe: false }\n        });\n      }\n    }\n    ```\n     ```app/adapters/post.js\n    import MyCustomAdapter from './custom-adapter';\n     export default class PostAdapter extends MyCustomAdapter {\n      findRecord(store, type, id, snapshot) {\n        if (snapshot.adapterOptions.subscribe) {\n          // ...\n        }\n        // ...\n      }\n    }\n    ```\n     See [peekRecord](../methods/peekRecord?anchor=peekRecord) to get the cached version of a record.\n     ### Retrieving Related Model Records\n     If you use an adapter such as Ember's default\n    [`JSONAPIAdapter`](/ember-data/release/classes/JSONAPIAdapter)\n    that supports the [JSON API specification](http://jsonapi.org/) and if your server\n    endpoint supports the use of an\n    ['include' query parameter](http://jsonapi.org/format/#fetching-includes),\n    you can use `findRecord()` or `findAll()` to automatically retrieve additional records related to\n    the one you request by supplying an `include` parameter in the `options` object.\n     For example, given a `post` model that has a `hasMany` relationship with a `comment`\n    model, when we retrieve a specific post we can have the server also return that post's\n    comments in the same request:\n     ```app/routes/post.js\n    export default class PostRoute extends Route {\n      model(params) {\n        return this.store.findRecord('post', params.post_id, { include: ['comments'] });\n      }\n    }\n    ```\n     ```app/adapters/application.js\n    export default class Adapter {\n      findRecord(store, schema, id, snapshot) {\n        let type = schema.modelName;\n         if (type === 'post')\n          let includes = snapshot.adapterOptions.include;\n           return fetch(`./posts/${postId}?include=${includes}`)\n            .then(response => response.json())\n        }\n      }\n       static create() {\n        return new this();\n      }\n    }\n    ```\n     In this case, the post's comments would then be available in your template as\n    `model.comments`.\n     Multiple relationships can be requested using an `include` parameter consisting of a\n    list of relationship names, while nested relationships can be specified\n    using a dot-separated sequence of relationship names. So to request both the post's\n    comments and the authors of those comments the request would look like this:\n     ```app/routes/post.js\n    export default class PostRoute extends Route {\n      model(params) {\n        return this.store.findRecord('post', params.post_id, { include: ['comments','comments.author'] });\n      }\n    }\n    ```\n     ### Retrieving Specific Fields by Type\n     If your server endpoint supports the use of a ['fields' query parameter](https://jsonapi.org/format/#fetching-sparse-fieldsets),\n    you can use pass those fields through to your server.  At this point in time, this requires a few manual steps on your part.\n     1. Implement `buildQuery` in your adapter.\n     ```app/adapters/application.js\n    buildQuery(snapshot) {\n      let query = super.buildQuery(...arguments);\n       let { fields } = snapshot.adapterOptions;\n       if (fields) {\n        query.fields = fields;\n      }\n       return query;\n    }\n    ```\n     2. Then pass through the applicable fields to your `findRecord` request.\n     Given a `post` model with attributes body, title, publishDate and meta, you can retrieve a filtered list of attributes.\n     ```app/routes/post.js\n    export default class extends Route {\n      model(params) {\n        return this.store.findRecord('post', params.post_id, { adapterOptions: { fields: { post: 'body,title' } });\n      }\n    }\n    ```\n     Moreover, you can filter attributes on related models as well. If a `post` has a `belongsTo` relationship to a user,\n    just include the relationship key and attributes.\n     ```app/routes/post.js\n    export default class extends Route {\n      model(params) {\n        return this.store.findRecord('post', params.post_id, { adapterOptions: { fields: { post: 'body,title', user: 'name,email' } });\n      }\n    }\n    ```\n     @since 1.13.0\n    @method findRecord\n    @public\n    @param {String|object} type - either a string representing the name of the resource 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 {(String|Integer|Object)} id - optional object with options for the request only if the first param is a ResourceIdentifier, else the string id of the record to be retrieved\n    @param {Object} [options] - if the first param is a string this will be the optional options for the request. See examples for available options.\n    @return {Promise} promise\n  */\n\n  findRecord(resource, id, options) {\n    if (macroCondition(getGlobalConfig().WarpDrive.env.DEBUG)) {\n      assertDestroyingStore(this, 'findRecord');\n    }\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.identifierCache.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\n  /**\n    Get the reference for the specified record.\n     Example\n     ```javascript\n    let userRef = store.getReference('user', '1');\n     // check if the user is loaded\n    let isLoaded = userRef.value() !== null;\n     // get the record of the reference (null if not yet available)\n    let user = userRef.value();\n     // get the identifier of the reference\n    if (userRef.remoteType() === 'id') {\n    let id = userRef.id();\n    }\n     // load user (via store.find)\n    userRef.load().then(...)\n     // or trigger a reload\n    userRef.reload().then(...)\n     // provide data for reference\n    userRef.push({ id: 1, username: '@user' }).then(function(user) {\n      userRef.value() === user;\n    });\n    ```\n     @method getReference\n    @public\n    @param {String|object} resource - modelName (string) or Identifier (object)\n    @param {String|Integer} id\n    @since 2.5.0\n    @return {RecordReference}\n  */\n  // TODO @deprecate getReference (and references generally)\n  getReference(resource, id) {\n    if (macroCondition(getGlobalConfig().WarpDrive.env.DEBUG)) {\n      assertDestroyingStore(this, 'getReference');\n    }\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.identifierCache.getOrCreateRecordIdentifier(resourceIdentifier);\n    return this._instanceCache.getReference(identifier);\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     See [findRecord](../methods/findRecord?anchor=findRecord) if you would like to request this record from the backend.\n     _Note: This is a synchronous method and does not return a promise._\n     **Example 1**\n     ```js\n    let 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     ```js\n    let post = store.peekRecord({ type: 'post', id });\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    @method peekRecord\n    @public\n    @param {String|object} modelName - 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 {String|Integer} id - optional only if the first param is a ResourceIdentifier, else the string id of the record to be retrieved.\n    @return {Model|null} record\n  */\n\n  peekRecord(identifier, id) {\n    if (arguments.length === 1 && isMaybeIdentifier(identifier)) {\n      const stableIdentifier = this.identifierCache.peekRecordIdentifier(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.identifierCache.peekRecordIdentifier(resource);\n    const isLoaded = stableIdentifier && this._instanceCache.recordIsLoaded(stableIdentifier);\n    return isLoaded ? this._instanceCache.getRecord(stableIdentifier) : null;\n  }\n\n  /**\n    This method delegates a query to the adapter. This is the one place where\n    adapter-level semantics are exposed to the application.\n     Each time this method is called a new request is made through the adapter.\n     Exposing queries this way seems preferable to creating an abstract query\n    language for all server-side queries, and then require all adapters to\n    implement them.\n     ---\n     If you do something like this:\n     ```javascript\n    store.query('person', { page: 1 });\n    ```\n     The request made to the server will look something like this:\n     ```\n    GET \"/api/v1/person?page=1\"\n    ```\n     ---\n     If you do something like this:\n     ```javascript\n    store.query('person', { ids: ['1', '2', '3'] });\n    ```\n     The request made to the server will look something like this:\n     ```\n    GET \"/api/v1/person?ids%5B%5D=1&ids%5B%5D=2&ids%5B%5D=3\"\n    decoded: \"/api/v1/person?ids[]=1&ids[]=2&ids[]=3\"\n    ```\n     This method returns a promise, which is resolved with a\n    [`Collection`](/ember-data/release/classes/Collection)\n    once the server returns.\n     @since 1.13.0\n    @method query\n    @public\n    @param {String} type the name of the resource\n    @param {object} query a query to be used by the adapter\n    @param {Object} options optional, may include `adapterOptions` hash which will be passed to adapter.query\n    @return {Promise} promise\n  */\n\n  query(type, query, options = {}) {\n    if (macroCondition(getGlobalConfig().WarpDrive.env.DEBUG)) {\n      assertDestroyingStore(this, 'query');\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 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\n  /**\n    This method makes a request for one record, where the `id` is not known\n    beforehand (if the `id` is known, use [`findRecord`](../methods/findRecord?anchor=findRecord)\n    instead).\n     This method can be used when it is certain that the server will return a\n    single object for the primary data.\n     Each time this method is called a new request is made through the adapter.\n     Let's assume our API provides an endpoint for the currently logged in user\n    via:\n     ```\n    // GET /api/current_user\n    {\n      user: {\n        id: 1234,\n        username: 'admin'\n      }\n    }\n    ```\n     Since the specific `id` of the `user` is not known beforehand, we can use\n    `queryRecord` to get the user:\n     ```javascript\n    store.queryRecord('user', {}).then(function(user) {\n      let username = user.username;\n      // do thing\n    });\n    ```\n     The request is made through the adapters' `queryRecord`:\n     ```app/adapters/user.js\n    import Adapter from '@ember-data/adapter';\n    import $ from 'jquery';\n     export default class UserAdapter extends Adapter {\n      queryRecord(modelName, query) {\n        return $.getJSON('/api/current_user');\n      }\n    }\n    ```\n     Note: the primary use case for `store.queryRecord` is when a single record\n    is queried and the `id` is not known beforehand. In all other cases\n    `store.query` and using the first item of the array is likely the preferred\n    way:\n     ```\n    // GET /users?username=unique\n    {\n      data: [{\n        id: 1234,\n        type: 'user',\n        attributes: {\n          username: \"unique\"\n        }\n      }]\n    }\n    ```\n     ```javascript\n    store.query('user', { username: 'unique' }).then(function(users) {\n      return users.firstObject;\n    }).then(function(user) {\n      let id = user.id;\n    });\n    ```\n     This method returns a promise, which resolves with the found record.\n     If the adapter returns no data for the primary data of the payload, then\n    `queryRecord` resolves with `null`:\n     ```\n    // GET /users?username=unique\n    {\n      data: null\n    }\n    ```\n     ```javascript\n    store.queryRecord('user', { username: 'unique' }).then(function(user) {\n       // user is null\n    });\n    ```\n     @since 1.13.0\n    @method queryRecord\n    @public\n    @param {string} type\n    @param {object} query an opaque query to be used by the adapter\n    @param {object} options optional, may include `adapterOptions` hash which will be passed to adapter.queryRecord\n    @return {Promise} promise which resolves with the found record or `null`\n  */\n\n  queryRecord(type, query, options) {\n    if (macroCondition(getGlobalConfig().WarpDrive.env.DEBUG)) {\n      assertDestroyingStore(this, 'queryRecord');\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 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\n  /**\n    `findAll` asks the adapter's `findAll` method to find the records for the\n    given type, and returns a promise which will resolve with all records of\n    this type present in the store, even if the adapter only returns a subset\n    of them.\n     ```app/routes/authors.js\n    export default class AuthorsRoute extends Route {\n      model(params) {\n        return this.store.findAll('author');\n      }\n    }\n    ```\n     _When_ the returned promise resolves depends on the reload behavior,\n    configured via the passed `options` hash and the result of the adapter's\n    `shouldReloadAll` method.\n     ### Reloading\n     If `{ reload: true }` is passed or `adapter.shouldReloadAll` evaluates to\n    `true`, then the returned promise resolves once the adapter returns data,\n    regardless if there are already records in the store:\n     ```js\n    store.push({\n      data: {\n        id: 'first',\n        type: 'author'\n      }\n    });\n     // adapter#findAll resolves with\n    // [\n    //   {\n    //     id: 'second',\n    //     type: 'author'\n    //   }\n    // ]\n    store.findAll('author', { reload: true }).then(function(authors) {\n      authors.getEach('id'); // ['first', 'second']\n    });\n    ```\n     If no reload is indicated via the above mentioned ways, then the promise\n    immediately resolves with all the records currently loaded in the store.\n     ### Background Reloading\n     Optionally, if `adapter.shouldBackgroundReloadAll` evaluates to `true`,\n    then a background reload is started. Once this resolves, the array with\n    which the promise resolves, is updated automatically so it contains all the\n    records in the store:\n     ```app/adapters/application.js\n    import Adapter from '@ember-data/adapter';\n     export default class ApplicationAdapter extends Adapter {\n      shouldReloadAll(store, snapshotsArray) {\n        return false;\n      },\n       shouldBackgroundReloadAll(store, snapshotsArray) {\n        return true;\n      }\n    });\n     // ...\n     store.push({\n      data: {\n        id: 'first',\n        type: 'author'\n      }\n    });\n     let allAuthors;\n    store.findAll('author').then(function(authors) {\n      authors.getEach('id'); // ['first']\n       allAuthors = authors;\n    });\n     // later, once adapter#findAll resolved with\n    // [\n    //   {\n    //     id: 'second',\n    //     type: 'author'\n    //   }\n    // ]\n     allAuthors.getEach('id'); // ['first', 'second']\n    ```\n     If you would like to force or prevent background reloading, you can set a\n    boolean value for `backgroundReload` in the options object for\n    `findAll`.\n     ```app/routes/post/edit.js\n    export default class PostEditRoute extends Route {\n      model() {\n        return this.store.findAll('post', { backgroundReload: false });\n      }\n    }\n    ```\n     If you pass an object on the `adapterOptions` property of the options\n    argument it will be passed to you adapter via the `snapshotRecordArray`\n     ```app/routes/posts.js\n    export default class PostsRoute extends Route {\n      model(params) {\n        return this.store.findAll('post', {\n          adapterOptions: { subscribe: false }\n        });\n      }\n    }\n    ```\n     ```app/adapters/post.js\n    import MyCustomAdapter from './custom-adapter';\n     export default class UserAdapter extends MyCustomAdapter {\n      findAll(store, type, sinceToken, snapshotRecordArray) {\n        if (snapshotRecordArray.adapterOptions.subscribe) {\n          // ...\n        }\n        // ...\n      }\n    }\n    ```\n     See [peekAll](../methods/peekAll?anchor=peekAll) to get an array of current records in the\n    store, without waiting until a reload is finished.\n     ### Retrieving Related Model Records\n     If you use an adapter such as Ember's default\n    [`JSONAPIAdapter`](/ember-data/release/classes/JSONAPIAdapter)\n    that supports the [JSON API specification](http://jsonapi.org/) and if your server\n    endpoint supports the use of an\n    ['include' query parameter](http://jsonapi.org/format/#fetching-includes),\n    you can use `findAll()` to automatically retrieve additional records related to\n    those requested by supplying an `include` parameter in the `options` object.\n     For example, given a `post` model that has a `hasMany` relationship with a `comment`\n    model, when we retrieve all of the post records we can have the server also return\n    all of the posts' comments in the same request:\n     ```app/routes/posts.js\n    export default class PostsRoute extends Route {\n      model() {\n        return this.store.findAll('post', { include: ['comments'] });\n      }\n    }\n    ```\n    Multiple relationships can be requested using an `include` parameter consisting of a\n    list or relationship names, while nested relationships can be specified\n    using a dot-separated sequence of relationship names. So to request both the posts'\n    comments and the authors of those comments the request would look like this:\n     ```app/routes/posts.js\n    export default class PostsRoute extends Route {\n      model() {\n        return this.store.findAll('post', { include: ['comments','comments.author'] });\n      }\n    }\n    ```\n     See [query](../methods/query?anchor=query) to only get a subset of records from the server.\n     @since 1.13.0\n    @method findAll\n    @public\n    @param {string} type the name of the resource\n    @param {object} options\n    @return {Promise} promise\n  */\n\n  findAll(type, options = {}) {\n    if (macroCondition(getGlobalConfig().WarpDrive.env.DEBUG)) {\n      assertDestroyingStore(this, 'findAll');\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 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\n  /**\n    This method returns a filtered array that contains all of the\n    known records for a given type in the store.\n     Note that because it's just a filter, 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. If you\n    would like to request all the records from the backend please use\n    [store.findAll](../methods/findAll?anchor=findAll).\n     Also note that multiple calls to `peekAll` for a given type will always\n    return the same `RecordArray`.\n     Example\n     ```javascript\n    let localPosts = store.peekAll('post');\n    ```\n     @since 1.13.0\n    @method peekAll\n    @public\n    @param {string} type the name of the resource\n    @return {RecordArray}\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     @method unloadAll\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      if (type === undefined) {\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    });\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     ```app/models/person.js\n    import Model, { attr, hasMany } from '@ember-data/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 an adapter, make sure\n    that you have converted the incoming data into this form. The\n    store's [normalize](../methods/normalize?anchor=normalize) method is a convenience\n    helper for converting a json payload into the form Ember Data\n    expects.\n     ```js\n    store.push(store.normalize('person', data));\n    ```\n     This method can be used both to push in brand new\n    records, as well as to update existing records.\n     @method push\n    @public\n    @param {Object} data\n    @return the record(s) that was created or\n      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     @method _push\n    @private\n    @param {Object} jsonApiDoc\n    @return {StableRecordIdentifier|Array<StableRecordIdentifier>|null} 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   * Trigger a save for a Record.\n   *\n   * Returns a promise resolving with the same record when the save is complete.\n   *\n   * @method saveRecord\n   * @public\n   * @param {unknown} record\n   * @param options\n   * @return {Promise<record>}\n   */\n  saveRecord(record, options = {}) {\n    if (macroCondition(getGlobalConfig().WarpDrive.env.DEBUG)) {\n      assertDestroyingStore(this, 'saveRecord');\n    }\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)) : {};\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\n  /**\n   * Instantiation hook allowing applications or addons to configure the store\n   * to utilize a custom Cache implementation.\n   *\n   * This hook should not be called directly by consuming applications or libraries.\n   * Use `Store.cache` to access the Cache instance.\n   *\n   * @method createCache (hook)\n   * @public\n   * @param storeWrapper\n   * @return {Cache}\n   */\n\n  /**\n   * Returns the cache instance associated to this Store, instantiates the Cache\n   * if necessary via `Store.createCache`\n   *\n   * @property {Cache} cache\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 = new CacheManager(cache);\n      }\n    }\n    return cache;\n  }\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.identifierCache.destroy();\n    this.unloadAll();\n    this.isDestroyed = true;\n  }\n  static create(args) {\n    return new this(args);\n  }\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}\nconst MUTATION_OPS = new Set(['createRecord', 'updateRecord', 'deleteRecord']);\nfunction calcShouldFetch(store, request, hasCachedValue, identifier) {\n  const {\n    cacheOptions\n  } = request;\n  return request.op && MUTATION_OPS.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.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 * @module @ember-data/store\n */\n\n/**\n * A CacheHandler that adds support for using an EmberData 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 EmberData 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 * @typedoc\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.identifierCache.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        return activeRequest.promise;\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');\n        });\n        DEDUPE.set(identifier, {\n          priority: {\n            blocking: true\n          },\n          promise\n        });\n        store.notifications.notify(identifier, 'state');\n      }\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');\n        });\n        DEDUPE.set(identifier, {\n          priority: {\n            blocking: false\n          },\n          promise\n        });\n        store.notifications.notify(identifier, 'state');\n      }\n      store.requestManager._pending.set(context.id, promise);\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;\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 new ReactiveDocument(store, null, {\n    request,\n    document\n  });\n}\nfunction updateCacheForSuccess(store, request, options, document) {\n  let response = null;\n  if (isMutation(request)) {\n    const record = request.data?.record || request.records?.[0];\n    if (record) {\n      response = store.cache.didCommit(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    const record = context.request.data?.record || context.request.records?.[0];\n    store.cache.commitWasRejected(record, errors);\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    // TODO should we handle multiple records in request.records by iteratively calling willCommit for each\n    const record = context.request.data?.record || context.request.records?.[0];\n    macroCondition(getGlobalConfig().WarpDrive.env.DEBUG) ? (test => {\n      if (!test) {\n        throw new Error(`Expected to receive a list of records included in the ${context.request.op} request`);\n      }\n    })(record || !shouldHydrate) : {};\n    if (record) {\n      store.cache.willCommit(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}\n\n/**\n  @module @ember-data/store\n*/\n/**\n  A `ManyArray` is a `MutableArray` that represents the contents of a has-many\n  relationship.\n\n  The `ManyArray` is instantiated lazily the first time the relationship is\n  requested.\n\n  This class is not intended to be directly instantiated by consuming applications.\n\n  ### Inverses\n\n  Often, the relationships in Ember Data applications will have\n  an inverse. For example, imagine the following models are\n  defined:\n\n  ```app/models/post.js\n  import Model, { hasMany } from '@ember-data/model';\n\n  export default class PostModel extends Model {\n    @hasMany('comment') comments;\n  }\n  ```\n\n  ```app/models/comment.js\n  import Model, { belongsTo } from '@ember-data/model';\n\n  export default class CommentModel extends Model {\n    @belongsTo('post') post;\n  }\n  ```\n\n  If you created a new instance of `Post` and added\n  a `Comment` record to its `comments` has-many\n  relationship, you would expect the comment's `post`\n  property to be set to the post that contained\n  the has-many.\n\n  We call the record to which a relationship belongs-to the\n  relationship's _owner_.\n\n  @class ManyArray\n  @public\n*/\nclass RelatedCollection extends IdentifierArray {\n  /**\n    The loading state of this array\n     @property {Boolean} isLoaded\n    @public\n    */\n\n  /**\n    `true` if the relationship is polymorphic, `false` otherwise.\n     @property {Boolean} isPolymorphic\n    @private\n    */\n\n  /**\n    Metadata associated with the request for async hasMany relationships.\n     Example\n     Given that the server returns the following JSON payload when fetching a\n    hasMany relationship:\n     ```js\n    {\n      \"comments\": [{\n        \"id\": 1,\n        \"comment\": \"This is the first comment\",\n      }, {\n    // ...\n      }],\n       \"meta\": {\n        \"page\": 1,\n        \"total\": 5\n      }\n    }\n    ```\n     You can then access the meta data via the `meta` property:\n     ```js\n    let comments = await post.comments;\n    let meta = comments.meta;\n     // meta.page => 1\n    // meta.total => 5\n    ```\n     @property {Object | null} meta\n    @public\n    */\n\n  /**\n     * Retrieve the links for this relationship\n     *\n     @property {Object | null} links\n     @public\n     */\n\n  constructor(options) {\n    super(options);\n    this.isLoaded = options.isLoaded || false;\n    this.isAsync = options.isAsync || false;\n    this.isPolymorphic = options.isPolymorphic || false;\n    this.identifier = options.identifier;\n    this.key = options.key;\n  }\n  [MUTATE](target, receiver, prop, args, _SIGNAL) {\n    switch (prop) {\n      case 'length 0':\n        {\n          Reflect.set(target, 'length', 0);\n          mutateReplaceRelatedRecords(this, [], _SIGNAL);\n          return true;\n        }\n      case 'replace cell':\n        {\n          const [index, prior, value] = args;\n          target[index] = value;\n          mutateReplaceRelatedRecord(this, {\n            value,\n            prior,\n            index\n          }, _SIGNAL);\n          return true;\n        }\n      case 'push':\n        {\n          const newValues = extractIdentifiersFromRecords(args);\n          assertNoDuplicates(this, 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(this, {\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(this, {\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(this, {\n              value: recordIdentifierFor(result)\n            }, _SIGNAL);\n          }\n          return result;\n        }\n      case 'unshift':\n        {\n          const newValues = extractIdentifiersFromRecords(args);\n          assertNoDuplicates(this, 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(this, {\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(this, {\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(this, {\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(this, 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 === this[SOURCE].length) {\n            const newValues = extractIdentifiersFromRecords(adds);\n            assertNoDuplicates(this, 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(this, 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(this, newValues, _SIGNAL);\n            return result;\n          }\n          const newValues = extractIdentifiersFromRecords(adds);\n          assertNoDuplicates(this, 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(this, {\n                value: result.map(recordIdentifierFor),\n                index: start\n              }, _SIGNAL);\n            }\n            if (unique.length > 0) {\n              mutateAddToRelatedRecords(this, {\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(this, {\n              value: result.map(recordIdentifierFor),\n              index: start\n            }, _SIGNAL);\n          }\n          if (newValues.length > 0) {\n            mutateAddToRelatedRecords(this, {\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  }\n  notify() {\n    const signal = this[ARRAY_SIGNAL];\n    signal.shouldReset = true;\n    notifyArray(this);\n  }\n\n  /**\n    Reloads all of the records in the manyArray. If the manyArray\n    holds a relationship that was originally fetched using a links url\n    EmberData will revisit the original links url to repopulate the\n    relationship.\n     If the ManyArray holds the result of a `store.query()` reload will\n    re-run the original query.\n     Example\n     ```javascript\n    let user = store.peekRecord('user', '1')\n    await login(user);\n     let permissions = await user.permissions;\n    await permissions.reload();\n    ```\n     @method reload\n    @public\n  */\n  reload(options) {\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 this._manager.reloadHasMany === 'function') : {};\n    // TODO this is odd, we don't ask the store for anything else like this?\n    return this._manager.reloadHasMany(this.key, options);\n  }\n\n  /**\n    Saves all of the records in the `ManyArray`.\n     Note: this API can only be used in legacy mode with a configured Adapter.\n     Example\n     ```javascript\n    const { content: { data: inbox } } = await store.request(findRecord({ type: 'inbox', id: '1' }));\n     let messages = await inbox.messages;\n    messages.forEach((message) => {\n      message.isRead = true;\n    });\n    messages.save();\n    ```\n     @method save\n    @public\n    @return {PromiseArray} promise\n  */\n\n  /**\n    Create a child record within the owner\n     @method createRecord\n    @public\n    @param {Object} hash\n    @return {Model} record\n  */\n  createRecord(hash) {\n    const {\n      store\n    } = this;\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  }\n  destroy() {\n    super.destroy(false);\n  }\n}\nRelatedCollection.prototype.isAsync = false;\nRelatedCollection.prototype.isPolymorphic = false;\nRelatedCollection.prototype.identifier = null;\nRelatedCollection.prototype.cache = null;\nRelatedCollection.prototype._inverseIsAsync = false;\nRelatedCollection.prototype.key = '';\nRelatedCollection.prototype.DEPRECATED_CLASS_NAME = 'ManyArray';\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 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 \\`<${collection.identifier.type}:${collection.identifier.id || collection.identifier.lid}>.${collection.key}\\`\\n\\t- ${Array.from(new Set(duplicates)).map(r => isStableIdentifier(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 \\`<${collection.identifier.type}:${collection.identifier.id || collection.identifier.lid}>.${collection.key}\\`\\n\\t- ${Array.from(new Set(duplicates)).map(r => isStableIdentifier(r) ? r.lid : recordIdentifierFor(r).lid).sort((a, b) => a.localeCompare(b)).join('\\n\\t- ')}`);\n    }\n  }\n}\nfunction mutateAddToRelatedRecords(collection, operationInfo, _SIGNAL) {\n  mutate(collection, {\n    op: 'add',\n    record: collection.identifier,\n    field: collection.key,\n    ...operationInfo\n  }, _SIGNAL);\n}\nfunction mutateRemoveFromRelatedRecords(collection, operationInfo, _SIGNAL) {\n  mutate(collection, {\n    op: 'remove',\n    record: collection.identifier,\n    field: collection.key,\n    ...operationInfo\n  }, _SIGNAL);\n}\nfunction mutateReplaceRelatedRecord(collection, operationInfo, _SIGNAL) {\n  mutate(collection, {\n    op: 'replaceRelatedRecord',\n    record: collection.identifier,\n    field: collection.key,\n    ...operationInfo\n  }, _SIGNAL);\n}\nfunction mutateReplaceRelatedRecords(collection, value, _SIGNAL) {\n  mutate(collection, {\n    op: 'replaceRelatedRecords',\n    record: collection.identifier,\n    field: collection.key,\n    value\n  }, _SIGNAL);\n}\nfunction mutateSortRelatedRecords(collection, value, _SIGNAL) {\n  mutate(collection, {\n    op: 'sortRelatedRecords',\n    record: collection.identifier,\n    field: collection.key,\n    value\n  }, _SIGNAL);\n}\nfunction mutate(collection, mutation, _SIGNAL) {\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 collection._manager.mutate === 'function') : {};\n  collection._manager.mutate(mutation);\n  addToTransaction(_SIGNAL);\n}\nexport { ARRAY_SIGNAL as A, CacheHandler as C, IdentifierArray as I, MUTATE as M, RecordArrayManager as R, Store as S, _clearCaches as _, setIdentifierGenerationMethod as a, setIdentifierUpdateMethod as b, setIdentifierForgetMethod as c, setIdentifierResetMethod as d, setKeyInfoForResource as e, isDocumentIdentifier as f, constructResource as g, coerceId as h, isStableIdentifier as i, ensureStringId as j, Collection as k, SOURCE as l, fastPush as m, notifyArray as n, removeRecordDataFor as o, peekCache as p, setRecordIdentifier as q, recordIdentifierFor as r, storeFor as s, StoreMap as t, setCacheFor as u, normalizeModelName as v, RelatedCollection as w, log as x, logGroup as y };","import { tagForProperty } from '@ember/-internals/metal';\nimport { dependentKeyCompat } from '@ember/object/compat';\nexport { dependentKeyCompat as compat } from '@ember/object/compat';\nimport { consumeTag, dirtyTag } from '@glimmer/validator';\nimport { getOrSetGlobal, peekTransient, setTransient } from '@warp-drive/core-types/-private';\nimport { macroCondition, getGlobalConfig } from '@embroider/macros';\nfunction createTransaction() {\n  const transaction = {\n    cbs: new Set(),\n    props: new Set(),\n    sub: new Set(),\n    parent: null\n  };\n  const TRANSACTION = peekTransient('TRANSACTION');\n  if (TRANSACTION) {\n    transaction.parent = TRANSACTION;\n  }\n  setTransient('TRANSACTION', transaction);\n}\nfunction maybeConsume(tag) {\n  if (tag) {\n    consumeTag(tag);\n  }\n}\nfunction maybeDirty(tag) {\n  if (tag) {\n    // @ts-expect-error - we are using Ember's Tag not Glimmer's\n    dirtyTag(tag);\n  }\n}\n\n/**\n * If there is a current transaction, ensures that the relevant tag (and any\n * array computed chains symbols, if applicable) will be consumed during the\n * transaction.\n *\n * If there is no current transaction, will consume the tag(s) immediately.\n *\n * @internal\n * @param obj\n */\nfunction subscribe(obj) {\n  const TRANSACTION = peekTransient('TRANSACTION');\n  if (TRANSACTION) {\n    TRANSACTION.sub.add(obj);\n  } else if ('tag' in obj) {\n    if (macroCondition(getGlobalConfig().WarpDrive.deprecations.DEPRECATE_COMPUTED_CHAINS)) {\n      maybeConsume(obj['[]']);\n      maybeConsume(obj['@length']);\n    }\n    consumeTag(obj.tag);\n  } else {\n    // eslint-disable-next-line @typescript-eslint/no-unused-expressions\n    obj.ref;\n  }\n}\nfunction updateRef(obj) {\n  if (macroCondition(getGlobalConfig().WarpDrive.env.DEBUG)) {\n    try {\n      if ('tag' in obj) {\n        if (macroCondition(getGlobalConfig().WarpDrive.deprecations.DEPRECATE_COMPUTED_CHAINS)) {\n          maybeDirty(obj['[]']);\n          maybeDirty(obj['@length']);\n        }\n        // @ts-expect-error - we are using Ember's Tag not Glimmer's\n        dirtyTag(obj.tag);\n      } else {\n        obj.ref = null;\n      }\n    } catch (e) {\n      if (e instanceof Error) {\n        if (e.message.includes('You attempted to update `undefined`')) {\n          // @ts-expect-error\n          const key = `<${obj._debug_base}>.${obj.key}`;\n          e.message = e.message.replace('You attempted to update `undefined`', `You attempted to update ${key}`);\n          e.stack = e.stack?.replace('You attempted to update `undefined`', `You attempted to update ${key}`);\n          const lines = e.stack?.split(`\\n`);\n          const finalLines = [];\n          let lastFile = null;\n          lines?.forEach(line => {\n            if (line.trim().startsWith('at ')) {\n              // get the last string in the line which contains the code source location\n              const location = line.split(' ').at(-1);\n              // remove the line and char offset info\n\n              if (location.includes(':')) {\n                const parts = location.split(':');\n                parts.pop();\n                parts.pop();\n                const file = parts.join(':');\n                if (file !== lastFile) {\n                  lastFile = file;\n                  finalLines.push('');\n                }\n              }\n              finalLines.push(line);\n            }\n          });\n          const splitstr = '`undefined` was first used:';\n          const parts = e.message.split(splitstr);\n          parts.splice(1, 0, `Original Stack\\n=============\\n${finalLines.join(`\\n`)}\\n\\n\\`${key}\\` was first used:`);\n          e.message = parts.join('');\n        }\n      }\n      throw e;\n    }\n  } else {\n    if ('tag' in obj) {\n      if (macroCondition(getGlobalConfig().WarpDrive.deprecations.DEPRECATE_COMPUTED_CHAINS)) {\n        maybeDirty(obj['[]']);\n        maybeDirty(obj['@length']);\n      }\n      // @ts-expect-error - we are using Ember's Tag not Glimmer's\n      dirtyTag(obj.tag);\n    } else {\n      obj.ref = null;\n    }\n  }\n}\nfunction flushTransaction() {\n  const transaction = peekTransient('TRANSACTION');\n  setTransient('TRANSACTION', transaction.parent);\n  transaction.cbs.forEach(cb => {\n    cb();\n  });\n  transaction.props.forEach(obj => {\n    // mark this mutation as part of a transaction\n    obj.t = true;\n    updateRef(obj);\n  });\n  transaction.sub.forEach(obj => {\n    if ('tag' in obj) {\n      if (macroCondition(getGlobalConfig().WarpDrive.deprecations.DEPRECATE_COMPUTED_CHAINS)) {\n        maybeConsume(obj['[]']);\n        maybeConsume(obj['@length']);\n      }\n      consumeTag(obj.tag);\n    } else {\n      // eslint-disable-next-line @typescript-eslint/no-unused-expressions\n      obj.ref;\n    }\n  });\n}\nasync function untrack() {\n  const transaction = peekTransient('TRANSACTION');\n  setTransient('TRANSACTION', transaction.parent);\n\n  // defer writes\n  await Promise.resolve();\n  transaction.cbs.forEach(cb => {\n    cb();\n  });\n  transaction.props.forEach(obj => {\n    // mark this mutation as part of a transaction\n    obj.t = true;\n    updateRef(obj);\n  });\n}\nfunction addToTransaction(obj) {\n  const transaction = peekTransient('TRANSACTION');\n  if (transaction) {\n    transaction.props.add(obj);\n  } else {\n    updateRef(obj);\n  }\n}\nfunction addTransactionCB(method) {\n  const transaction = peekTransient('TRANSACTION');\n  if (transaction) {\n    transaction.cbs.add(method);\n  } else {\n    method();\n  }\n}\n\n/**\n * Run `method` without subscribing to any tracked properties\n * controlled by EmberData.\n *\n * This should rarely be used except by libraries that really\n * know what they are doing. It is most useful for wrapping\n * certain kinds of fetch/query logic from within a `Resource`\n * `hook` or other similar pattern.\n *\n * @function untracked\n * @public\n * @static\n * @for @ember-data/tracking\n * @param method\n * @return result of invoking method\n */\nfunction untracked(method) {\n  createTransaction();\n  const ret = method();\n  void untrack();\n  return ret;\n}\n\n/**\n * Run the method, subscribing to any tracked properties\n * managed by EmberData that were accessed or written during\n * the method's execution as per-normal but while allowing\n * interleaving of reads and writes.\n *\n * This is useful when for instance you want to perform\n * a mutation based on existing state that must be read first.\n *\n * @function transact\n * @public\n * @static\n * @for @ember-data/tracking\n * @param method\n * @return result of invoking method\n */\nfunction transact(method) {\n  createTransaction();\n  const ret = method();\n  flushTransaction();\n  return ret;\n}\n\n/**\n * A helpful utility for creating a new function that\n * always runs in a transaction. E.G. this \"memoizes\"\n * calling `transact(fn)`, currying args as necessary.\n *\n * @method memoTransact\n * @public\n * @static\n * @for @ember-data/tracking\n * @param method\n * @return a function that will invoke method in a transaction with any provided args and return its result\n */\nfunction memoTransact(method) {\n  return function (...args) {\n    createTransaction();\n    const ret = method(...args);\n    flushTransaction();\n    return ret;\n  };\n}\nconst Signals = getOrSetGlobal('Signals', Symbol('Signals'));\n\n/**\n *  use to add a signal property to the prototype of something.\n *\n *  First arg is the thing to define on\n *  Second arg is the property name\n *  Third agg is the initial value of the property if any.\n *\n *  for instance\n *\n *  ```ts\n *  class Model {}\n *  defineSignal(Model.prototype, 'isLoading', false);\n *  ```\n *\n *  This is sort of like using a stage-3 decorator but works today\n *  while we are still on legacy decorators.\n *\n *  e.g. it is equivalent to\n *\n *  ```ts\n *  class Model {\n *    @signal accessor isLoading = false;\n *  }\n *  ```\n *\n *  @internal\n */\nfunction defineSignal(obj, key, v) {\n  Object.defineProperty(obj, key, {\n    enumerable: true,\n    configurable: false,\n    get() {\n      const signals = this[Signals] = this[Signals] || new Map();\n      const existing = signals.has(key);\n      const _signal = entangleSignal(signals, this, key);\n      if (!existing && v !== undefined) {\n        _signal.lastValue = v;\n      }\n      return _signal.lastValue;\n    },\n    set(value) {\n      const signals = this[Signals] = this[Signals] || new Map();\n      let _signal = signals.get(key);\n      if (!_signal) {\n        _signal = createSignal(this, key);\n        signals.set(key, _signal);\n      }\n      if (_signal.lastValue !== value) {\n        _signal.lastValue = value;\n        addToTransaction(_signal);\n      }\n    }\n  });\n}\nfunction defineSubscription(obj, key, desc) {\n  const options = Object.assign({\n    enumerable: true,\n    configurable: false\n  }, subscribed(obj, key, desc));\n  Object.defineProperty(obj, key, options);\n}\nfunction createArrayTags(obj, signal) {\n  if (macroCondition(getGlobalConfig().WarpDrive.deprecations.DEPRECATE_COMPUTED_CHAINS)) {\n    signal['[]'] = tagForProperty(obj, '[]');\n    signal['@length'] = tagForProperty(obj, 'length');\n  }\n}\n\n/**\n * Create a signal for the key/object pairing.\n *\n * @internal\n * @param obj Object we're creating the signal on\n * @param key Key to create the signal for\n * @return the signal\n */\nfunction createSignal(obj, key) {\n  const _signal = {\n    key,\n    tag: tagForProperty(obj, key),\n    reason: null,\n    t: false,\n    shouldReset: false,\n    '[]': null,\n    '@length': null,\n    lastValue: undefined\n  };\n  if (macroCondition(getGlobalConfig().WarpDrive.env.DEBUG)) {\n    function tryGet(prop) {\n      try {\n        return obj[prop];\n      } catch {\n        return;\n      }\n    }\n    const modelName = tryGet('$type') ?? tryGet('modelName') ?? tryGet('constructor')?.modelName ?? '';\n    const className = obj.constructor?.name ?? obj.toString?.() ?? 'unknown';\n    _signal._debug_base = `${className}${modelName && !className.startsWith('SchemaRecord') ? `:${modelName}` : ''}`;\n  }\n  return _signal;\n}\n\n/**\n * Create a signal for the key/object pairing and subscribes to the signal.\n *\n * Use when you need to ensure a signal exists and is subscribed to.\n *\n * @internal\n * @param signals Map of signals\n * @param obj Object we're creating the signal on\n * @param key Key to create the signal for\n * @return the signal\n */\nfunction entangleSignal(signals, obj, key) {\n  let _signal = signals.get(key);\n  if (!_signal) {\n    _signal = createSignal(obj, key);\n    signals.set(key, _signal);\n  }\n  subscribe(_signal);\n  return _signal;\n}\nfunction getSignal(obj, key, initialState) {\n  let signals = obj[Signals];\n  if (!signals) {\n    signals = new Map();\n    obj[Signals] = signals;\n  }\n  let _signal = signals.get(key);\n  if (!_signal) {\n    _signal = createSignal(obj, key);\n    _signal.shouldReset = initialState;\n    signals.set(key, _signal);\n  }\n  return _signal;\n}\nfunction peekSignal(obj, key) {\n  const signals = obj[Signals];\n  if (signals) {\n    return signals.get(key);\n  }\n}\nfunction subscribed(_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  desc.get = function () {\n    const signal = getSignal(this, key, true);\n    subscribe(signal);\n    if (signal.shouldReset) {\n      signal.shouldReset = false;\n      signal.lastValue = getter.call(this);\n    }\n    return signal.lastValue;\n  };\n  desc.set = function (v) {\n    getSignal(this, key, true); // ensure signal is setup in case we want to use it.\n    // probably notify here but not yet.\n    setter.call(this, v);\n  };\n  dependentKeyCompat(desc);\n  return desc;\n}\nfunction notifySignal(obj, key) {\n  const signal = peekSignal(obj, key);\n  if (signal) {\n    signal.shouldReset = true;\n    addToTransaction(signal);\n  }\n}\nexport { Signals, addToTransaction, addTransactionCB, createArrayTags, createSignal, defineSignal, defineSubscription, entangleSignal, getSignal, memoTransact, notifySignal, peekSignal, subscribe, subscribed, transact, untracked };","import { createCache, getValue } from '@glimmer/tracking/primitives/cache';\nexport { createCache, getValue } from '@glimmer/tracking/primitives/cache';\nimport { macroCondition, getGlobalConfig } from '@embroider/macros';\nexport { memoTransact, notifySignal, transact, untracked } from \"./-private.js\";\nexport { dependentKeyCompat as compat } from '@ember/object/compat';\nfunction cached(target, key, descriptor) {\n  // Error on `@cached()`, `@cached(...args)`, and `@cached propName = value;`\n  macroCondition(getGlobalConfig().WarpDrive.env.DEBUG) ? (test => {\n    if (!test) {\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    }\n  })(target !== undefined) : {};\n  macroCondition(getGlobalConfig().WarpDrive.env.DEBUG) ? (test => {\n    if (!test) {\n      throw new Error(`You attempted to use @cached on with ${arguments.length > 1 ? 'arguments' : 'an argument'} ( @cached(${Array.from(arguments).map(d => `'${d}'`).join(', ')}), which is not supported. Dependencies are automatically tracked, so you can just use ${'`@cached`'}`);\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 @cached decorator must be applied to getters. '${key}' is not a getter.`);\n    }\n  })(typeof descriptor.get === 'function') : {};\n  const caches = new WeakMap();\n  // eslint-disable-next-line @typescript-eslint/unbound-method\n  const getter = descriptor.get;\n  descriptor.get = function () {\n    if (!caches.has(this)) caches.set(this, createCache(getter.bind(this)));\n    return getValue(caches.get(this));\n  };\n}\nexport { cached };","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","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","// @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","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","/*! *****************************************************************************\r\nCopyright (c) Microsoft Corporation.\r\n\r\nPermission to use, copy, modify, and/or distribute this software for any\r\npurpose with or without fee is hereby granted.\r\n\r\nTHE SOFTWARE IS PROVIDED \"AS IS\" AND THE AUTHOR DISCLAIMS ALL WARRANTIES WITH\r\nREGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY\r\nAND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY SPECIAL, DIRECT,\r\nINDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM\r\nLOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR\r\nOTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR\r\nPERFORMANCE OF THIS SOFTWARE.\r\n***************************************************************************** */\r\n/* global Reflect, Promise */\r\n\r\nvar extendStatics = function(d, b) {\r\n    extendStatics = Object.setPrototypeOf ||\r\n        ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||\r\n        function (d, b) { for (var p in b) if (Object.prototype.hasOwnProperty.call(b, p)) d[p] = b[p]; };\r\n    return extendStatics(d, b);\r\n};\r\n\r\nexport function __extends(d, b) {\r\n    if (typeof b !== \"function\" && b !== null)\r\n        throw new TypeError(\"Class extends value \" + String(b) + \" is not a constructor or null\");\r\n    extendStatics(d, b);\r\n    function __() { this.constructor = d; }\r\n    d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());\r\n}\r\n\r\nexport var __assign = function() {\r\n    __assign = Object.assign || function __assign(t) {\r\n        for (var s, i = 1, n = arguments.length; i < n; i++) {\r\n            s = arguments[i];\r\n            for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p)) t[p] = s[p];\r\n        }\r\n        return t;\r\n    }\r\n    return __assign.apply(this, arguments);\r\n}\r\n\r\nexport function __rest(s, e) {\r\n    var t = {};\r\n    for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p) && e.indexOf(p) < 0)\r\n        t[p] = s[p];\r\n    if (s != null && typeof Object.getOwnPropertySymbols === \"function\")\r\n        for (var i = 0, p = Object.getOwnPropertySymbols(s); i < p.length; i++) {\r\n            if (e.indexOf(p[i]) < 0 && Object.prototype.propertyIsEnumerable.call(s, p[i]))\r\n                t[p[i]] = s[p[i]];\r\n        }\r\n    return t;\r\n}\r\n\r\nexport function __decorate(decorators, target, key, desc) {\r\n    var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;\r\n    if (typeof Reflect === \"object\" && typeof Reflect.decorate === \"function\") r = Reflect.decorate(decorators, target, key, desc);\r\n    else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;\r\n    return c > 3 && r && Object.defineProperty(target, key, r), r;\r\n}\r\n\r\nexport function __param(paramIndex, decorator) {\r\n    return function (target, key) { decorator(target, key, paramIndex); }\r\n}\r\n\r\nexport function __metadata(metadataKey, metadataValue) {\r\n    if (typeof Reflect === \"object\" && typeof Reflect.metadata === \"function\") return Reflect.metadata(metadataKey, metadataValue);\r\n}\r\n\r\nexport function __awaiter(thisArg, _arguments, P, generator) {\r\n    function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }\r\n    return new (P || (P = Promise))(function (resolve, reject) {\r\n        function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }\r\n        function rejected(value) { try { step(generator[\"throw\"](value)); } catch (e) { reject(e); } }\r\n        function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }\r\n        step((generator = generator.apply(thisArg, _arguments || [])).next());\r\n    });\r\n}\r\n\r\nexport function __generator(thisArg, body) {\r\n    var _ = { label: 0, sent: function() { if (t[0] & 1) throw t[1]; return t[1]; }, trys: [], ops: [] }, f, y, t, g;\r\n    return g = { next: verb(0), \"throw\": verb(1), \"return\": verb(2) }, typeof Symbol === \"function\" && (g[Symbol.iterator] = function() { return this; }), g;\r\n    function verb(n) { return function (v) { return step([n, v]); }; }\r\n    function step(op) {\r\n        if (f) throw new TypeError(\"Generator is already executing.\");\r\n        while (_) try {\r\n            if (f = 1, y && (t = op[0] & 2 ? y[\"return\"] : op[0] ? y[\"throw\"] || ((t = y[\"return\"]) && t.call(y), 0) : y.next) && !(t = t.call(y, op[1])).done) return t;\r\n            if (y = 0, t) op = [op[0] & 2, t.value];\r\n            switch (op[0]) {\r\n                case 0: case 1: t = op; break;\r\n                case 4: _.label++; return { value: op[1], done: false };\r\n                case 5: _.label++; y = op[1]; op = [0]; continue;\r\n                case 7: op = _.ops.pop(); _.trys.pop(); continue;\r\n                default:\r\n                    if (!(t = _.trys, t = t.length > 0 && t[t.length - 1]) && (op[0] === 6 || op[0] === 2)) { _ = 0; continue; }\r\n                    if (op[0] === 3 && (!t || (op[1] > t[0] && op[1] < t[3]))) { _.label = op[1]; break; }\r\n                    if (op[0] === 6 && _.label < t[1]) { _.label = t[1]; t = op; break; }\r\n                    if (t && _.label < t[2]) { _.label = t[2]; _.ops.push(op); break; }\r\n                    if (t[2]) _.ops.pop();\r\n                    _.trys.pop(); continue;\r\n            }\r\n            op = body.call(thisArg, _);\r\n        } catch (e) { op = [6, e]; y = 0; } finally { f = t = 0; }\r\n        if (op[0] & 5) throw op[1]; return { value: op[0] ? op[1] : void 0, done: true };\r\n    }\r\n}\r\n\r\nexport var __createBinding = Object.create ? (function(o, m, k, k2) {\r\n    if (k2 === undefined) k2 = k;\r\n    Object.defineProperty(o, k2, { enumerable: true, get: function() { return m[k]; } });\r\n}) : (function(o, m, k, k2) {\r\n    if (k2 === undefined) k2 = k;\r\n    o[k2] = m[k];\r\n});\r\n\r\nexport function __exportStar(m, o) {\r\n    for (var p in m) if (p !== \"default\" && !Object.prototype.hasOwnProperty.call(o, p)) __createBinding(o, m, p);\r\n}\r\n\r\nexport function __values(o) {\r\n    var s = typeof Symbol === \"function\" && Symbol.iterator, m = s && o[s], i = 0;\r\n    if (m) return m.call(o);\r\n    if (o && typeof o.length === \"number\") return {\r\n        next: function () {\r\n            if (o && i >= o.length) o = void 0;\r\n            return { value: o && o[i++], done: !o };\r\n        }\r\n    };\r\n    throw new TypeError(s ? \"Object is not iterable.\" : \"Symbol.iterator is not defined.\");\r\n}\r\n\r\nexport function __read(o, n) {\r\n    var m = typeof Symbol === \"function\" && o[Symbol.iterator];\r\n    if (!m) return o;\r\n    var i = m.call(o), r, ar = [], e;\r\n    try {\r\n        while ((n === void 0 || n-- > 0) && !(r = i.next()).done) ar.push(r.value);\r\n    }\r\n    catch (error) { e = { error: error }; }\r\n    finally {\r\n        try {\r\n            if (r && !r.done && (m = i[\"return\"])) m.call(i);\r\n        }\r\n        finally { if (e) throw e.error; }\r\n    }\r\n    return ar;\r\n}\r\n\r\n/** @deprecated */\r\nexport function __spread() {\r\n    for (var ar = [], i = 0; i < arguments.length; i++)\r\n        ar = ar.concat(__read(arguments[i]));\r\n    return ar;\r\n}\r\n\r\n/** @deprecated */\r\nexport function __spreadArrays() {\r\n    for (var s = 0, i = 0, il = arguments.length; i < il; i++) s += arguments[i].length;\r\n    for (var r = Array(s), k = 0, i = 0; i < il; i++)\r\n        for (var a = arguments[i], j = 0, jl = a.length; j < jl; j++, k++)\r\n            r[k] = a[j];\r\n    return r;\r\n}\r\n\r\nexport function __spreadArray(to, from, pack) {\r\n    if (pack || arguments.length === 2) for (var i = 0, l = from.length, ar; i < l; i++) {\r\n        if (ar || !(i in from)) {\r\n            if (!ar) ar = Array.prototype.slice.call(from, 0, i);\r\n            ar[i] = from[i];\r\n        }\r\n    }\r\n    return to.concat(ar || Array.prototype.slice.call(from));\r\n}\r\n\r\nexport function __await(v) {\r\n    return this instanceof __await ? (this.v = v, this) : new __await(v);\r\n}\r\n\r\nexport function __asyncGenerator(thisArg, _arguments, generator) {\r\n    if (!Symbol.asyncIterator) throw new TypeError(\"Symbol.asyncIterator is not defined.\");\r\n    var g = generator.apply(thisArg, _arguments || []), i, q = [];\r\n    return i = {}, verb(\"next\"), verb(\"throw\"), verb(\"return\"), i[Symbol.asyncIterator] = function () { return this; }, i;\r\n    function verb(n) { if (g[n]) i[n] = function (v) { return new Promise(function (a, b) { q.push([n, v, a, b]) > 1 || resume(n, v); }); }; }\r\n    function resume(n, v) { try { step(g[n](v)); } catch (e) { settle(q[0][3], e); } }\r\n    function step(r) { r.value instanceof __await ? Promise.resolve(r.value.v).then(fulfill, reject) : settle(q[0][2], r); }\r\n    function fulfill(value) { resume(\"next\", value); }\r\n    function reject(value) { resume(\"throw\", value); }\r\n    function settle(f, v) { if (f(v), q.shift(), q.length) resume(q[0][0], q[0][1]); }\r\n}\r\n\r\nexport function __asyncDelegator(o) {\r\n    var i, p;\r\n    return i = {}, verb(\"next\"), verb(\"throw\", function (e) { throw e; }), verb(\"return\"), i[Symbol.iterator] = function () { return this; }, i;\r\n    function verb(n, f) { i[n] = o[n] ? function (v) { return (p = !p) ? { value: __await(o[n](v)), done: n === \"return\" } : f ? f(v) : v; } : f; }\r\n}\r\n\r\nexport function __asyncValues(o) {\r\n    if (!Symbol.asyncIterator) throw new TypeError(\"Symbol.asyncIterator is not defined.\");\r\n    var m = o[Symbol.asyncIterator], i;\r\n    return m ? m.call(o) : (o = typeof __values === \"function\" ? __values(o) : o[Symbol.iterator](), i = {}, verb(\"next\"), verb(\"throw\"), verb(\"return\"), i[Symbol.asyncIterator] = function () { return this; }, i);\r\n    function verb(n) { i[n] = o[n] && function (v) { return new Promise(function (resolve, reject) { v = o[n](v), settle(resolve, reject, v.done, v.value); }); }; }\r\n    function settle(resolve, reject, d, v) { Promise.resolve(v).then(function(v) { resolve({ value: v, done: d }); }, reject); }\r\n}\r\n\r\nexport function __makeTemplateObject(cooked, raw) {\r\n    if (Object.defineProperty) { Object.defineProperty(cooked, \"raw\", { value: raw }); } else { cooked.raw = raw; }\r\n    return cooked;\r\n};\r\n\r\nvar __setModuleDefault = Object.create ? (function(o, v) {\r\n    Object.defineProperty(o, \"default\", { enumerable: true, value: v });\r\n}) : function(o, v) {\r\n    o[\"default\"] = v;\r\n};\r\n\r\nexport function __importStar(mod) {\r\n    if (mod && mod.__esModule) return mod;\r\n    var result = {};\r\n    if (mod != null) for (var k in mod) if (k !== \"default\" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k);\r\n    __setModuleDefault(result, mod);\r\n    return result;\r\n}\r\n\r\nexport function __importDefault(mod) {\r\n    return (mod && mod.__esModule) ? mod : { default: mod };\r\n}\r\n\r\nexport function __classPrivateFieldGet(receiver, state, kind, f) {\r\n    if (kind === \"a\" && !f) throw new TypeError(\"Private accessor was defined without a getter\");\r\n    if (typeof state === \"function\" ? receiver !== state || !f : !state.has(receiver)) throw new TypeError(\"Cannot read private member from an object whose class did not declare it\");\r\n    return kind === \"m\" ? f : kind === \"a\" ? f.call(receiver) : f ? f.value : state.get(receiver);\r\n}\r\n\r\nexport function __classPrivateFieldSet(receiver, state, value, kind, f) {\r\n    if (kind === \"m\") throw new TypeError(\"Private method is not writable\");\r\n    if (kind === \"a\" && !f) throw new TypeError(\"Private accessor was defined without a setter\");\r\n    if (typeof state === \"function\" ? receiver !== state || !f : !state.has(receiver)) throw new TypeError(\"Cannot write private member to an object whose class did not declare it\");\r\n    return (kind === \"a\" ? f.call(receiver, value) : f ? f.value = value : state.set(receiver, value)), value;\r\n}\r\n","/**\n * @license\n * Copyright 2019 Google LLC\n * SPDX-License-Identifier: BSD-3-Clause\n */\nconst t=window.ShadowRoot&&(void 0===window.ShadyCSS||window.ShadyCSS.nativeShadow)&&\"adoptedStyleSheets\"in Document.prototype&&\"replace\"in CSSStyleSheet.prototype,e=Symbol(),n=new Map;class s{constructor(t,n){if(this._$cssResult$=!0,n!==e)throw Error(\"CSSResult is not constructable. Use `unsafeCSS` or `css` instead.\");this.cssText=t}get styleSheet(){let e=n.get(this.cssText);return t&&void 0===e&&(n.set(this.cssText,e=new CSSStyleSheet),e.replaceSync(this.cssText)),e}toString(){return this.cssText}}const o=t=>new s(\"string\"==typeof t?t:t+\"\",e),r=(t,...n)=>{const o=1===t.length?t[0]:n.reduce(((e,n,s)=>e+(t=>{if(!0===t._$cssResult$)return t.cssText;if(\"number\"==typeof t)return t;throw Error(\"Value passed to 'css' function must be a 'css' function result: \"+t+\". Use 'unsafeCSS' to pass non-literal values, but take care to ensure page security.\")})(n)+t[s+1]),t[0]);return new s(o,e)},i=(e,n)=>{t?e.adoptedStyleSheets=n.map((t=>t instanceof CSSStyleSheet?t:t.styleSheet)):n.forEach((t=>{const n=document.createElement(\"style\"),s=window.litNonce;void 0!==s&&n.setAttribute(\"nonce\",s),n.textContent=t.cssText,e.appendChild(n)}))},S=t?t=>t:t=>t instanceof CSSStyleSheet?(t=>{let e=\"\";for(const n of t.cssRules)e+=n.cssText;return o(e)})(t):t;export{s as CSSResult,i as adoptStyles,r as css,S as getCompatibleStyle,t as supportsAdoptingStyleSheets,o as unsafeCSS};\n//# sourceMappingURL=css-tag.js.map\n","import{getCompatibleStyle as t,adoptStyles as i}from\"./css-tag.js\";export{CSSResult,adoptStyles,css,getCompatibleStyle,supportsAdoptingStyleSheets,unsafeCSS}from\"./css-tag.js\";\n/**\n * @license\n * Copyright 2017 Google LLC\n * SPDX-License-Identifier: BSD-3-Clause\n */var s;const e=window.trustedTypes,r=e?e.emptyScript:\"\",h=window.reactiveElementPolyfillSupport,o={toAttribute(t,i){switch(i){case Boolean:t=t?r:null;break;case Object:case Array:t=null==t?t:JSON.stringify(t)}return t},fromAttribute(t,i){let s=t;switch(i){case Boolean:s=null!==t;break;case Number:s=null===t?null:Number(t);break;case Object:case Array:try{s=JSON.parse(t)}catch(t){s=null}}return s}},n=(t,i)=>i!==t&&(i==i||t==t),l={attribute:!0,type:String,converter:o,reflect:!1,hasChanged:n};class a extends HTMLElement{constructor(){super(),this._$Et=new Map,this.isUpdatePending=!1,this.hasUpdated=!1,this._$Ei=null,this.o()}static addInitializer(t){var i;null!==(i=this.l)&&void 0!==i||(this.l=[]),this.l.push(t)}static get observedAttributes(){this.finalize();const t=[];return this.elementProperties.forEach(((i,s)=>{const e=this._$Eh(s,i);void 0!==e&&(this._$Eu.set(e,s),t.push(e))})),t}static createProperty(t,i=l){if(i.state&&(i.attribute=!1),this.finalize(),this.elementProperties.set(t,i),!i.noAccessor&&!this.prototype.hasOwnProperty(t)){const s=\"symbol\"==typeof t?Symbol():\"__\"+t,e=this.getPropertyDescriptor(t,s,i);void 0!==e&&Object.defineProperty(this.prototype,t,e)}}static getPropertyDescriptor(t,i,s){return{get(){return this[i]},set(e){const r=this[t];this[i]=e,this.requestUpdate(t,r,s)},configurable:!0,enumerable:!0}}static getPropertyOptions(t){return this.elementProperties.get(t)||l}static finalize(){if(this.hasOwnProperty(\"finalized\"))return!1;this.finalized=!0;const t=Object.getPrototypeOf(this);if(t.finalize(),this.elementProperties=new Map(t.elementProperties),this._$Eu=new Map,this.hasOwnProperty(\"properties\")){const t=this.properties,i=[...Object.getOwnPropertyNames(t),...Object.getOwnPropertySymbols(t)];for(const s of i)this.createProperty(s,t[s])}return this.elementStyles=this.finalizeStyles(this.styles),!0}static finalizeStyles(i){const s=[];if(Array.isArray(i)){const e=new Set(i.flat(1/0).reverse());for(const i of e)s.unshift(t(i))}else void 0!==i&&s.push(t(i));return s}static _$Eh(t,i){const s=i.attribute;return!1===s?void 0:\"string\"==typeof s?s:\"string\"==typeof t?t.toLowerCase():void 0}o(){var t;this._$Ep=new Promise((t=>this.enableUpdating=t)),this._$AL=new Map,this._$Em(),this.requestUpdate(),null===(t=this.constructor.l)||void 0===t||t.forEach((t=>t(this)))}addController(t){var i,s;(null!==(i=this._$Eg)&&void 0!==i?i:this._$Eg=[]).push(t),void 0!==this.renderRoot&&this.isConnected&&(null===(s=t.hostConnected)||void 0===s||s.call(t))}removeController(t){var i;null===(i=this._$Eg)||void 0===i||i.splice(this._$Eg.indexOf(t)>>>0,1)}_$Em(){this.constructor.elementProperties.forEach(((t,i)=>{this.hasOwnProperty(i)&&(this._$Et.set(i,this[i]),delete this[i])}))}createRenderRoot(){var t;const s=null!==(t=this.shadowRoot)&&void 0!==t?t:this.attachShadow(this.constructor.shadowRootOptions);return i(s,this.constructor.elementStyles),s}connectedCallback(){var t;void 0===this.renderRoot&&(this.renderRoot=this.createRenderRoot()),this.enableUpdating(!0),null===(t=this._$Eg)||void 0===t||t.forEach((t=>{var i;return null===(i=t.hostConnected)||void 0===i?void 0:i.call(t)}))}enableUpdating(t){}disconnectedCallback(){var t;null===(t=this._$Eg)||void 0===t||t.forEach((t=>{var i;return null===(i=t.hostDisconnected)||void 0===i?void 0:i.call(t)}))}attributeChangedCallback(t,i,s){this._$AK(t,s)}_$ES(t,i,s=l){var e,r;const h=this.constructor._$Eh(t,s);if(void 0!==h&&!0===s.reflect){const n=(null!==(r=null===(e=s.converter)||void 0===e?void 0:e.toAttribute)&&void 0!==r?r:o.toAttribute)(i,s.type);this._$Ei=t,null==n?this.removeAttribute(h):this.setAttribute(h,n),this._$Ei=null}}_$AK(t,i){var s,e,r;const h=this.constructor,n=h._$Eu.get(t);if(void 0!==n&&this._$Ei!==n){const t=h.getPropertyOptions(n),l=t.converter,a=null!==(r=null!==(e=null===(s=l)||void 0===s?void 0:s.fromAttribute)&&void 0!==e?e:\"function\"==typeof l?l:null)&&void 0!==r?r:o.fromAttribute;this._$Ei=n,this[n]=a(i,t.type),this._$Ei=null}}requestUpdate(t,i,s){let e=!0;void 0!==t&&(((s=s||this.constructor.getPropertyOptions(t)).hasChanged||n)(this[t],i)?(this._$AL.has(t)||this._$AL.set(t,i),!0===s.reflect&&this._$Ei!==t&&(void 0===this._$E_&&(this._$E_=new Map),this._$E_.set(t,s))):e=!1),!this.isUpdatePending&&e&&(this._$Ep=this._$EC())}async _$EC(){this.isUpdatePending=!0;try{await this._$Ep}catch(t){Promise.reject(t)}const t=this.scheduleUpdate();return null!=t&&await t,!this.isUpdatePending}scheduleUpdate(){return this.performUpdate()}performUpdate(){var t;if(!this.isUpdatePending)return;this.hasUpdated,this._$Et&&(this._$Et.forEach(((t,i)=>this[i]=t)),this._$Et=void 0);let i=!1;const s=this._$AL;try{i=this.shouldUpdate(s),i?(this.willUpdate(s),null===(t=this._$Eg)||void 0===t||t.forEach((t=>{var i;return null===(i=t.hostUpdate)||void 0===i?void 0:i.call(t)})),this.update(s)):this._$EU()}catch(t){throw i=!1,this._$EU(),t}i&&this._$AE(s)}willUpdate(t){}_$AE(t){var i;null===(i=this._$Eg)||void 0===i||i.forEach((t=>{var i;return null===(i=t.hostUpdated)||void 0===i?void 0:i.call(t)})),this.hasUpdated||(this.hasUpdated=!0,this.firstUpdated(t)),this.updated(t)}_$EU(){this._$AL=new Map,this.isUpdatePending=!1}get updateComplete(){return this.getUpdateComplete()}getUpdateComplete(){return this._$Ep}shouldUpdate(t){return!0}update(t){void 0!==this._$E_&&(this._$E_.forEach(((t,i)=>this._$ES(i,this[i],t))),this._$E_=void 0),this._$EU()}updated(t){}firstUpdated(t){}}a.finalized=!0,a.elementProperties=new Map,a.elementStyles=[],a.shadowRootOptions={mode:\"open\"},null==h||h({ReactiveElement:a}),(null!==(s=globalThis.reactiveElementVersions)&&void 0!==s?s:globalThis.reactiveElementVersions=[]).push(\"1.2.1\");export{a as ReactiveElement,o as defaultConverter,n as notEqual};\n//# sourceMappingURL=reactive-element.js.map\n","/**\n * @license\n * Copyright 2017 Google LLC\n * SPDX-License-Identifier: BSD-3-Clause\n */\nvar t;const i=globalThis.trustedTypes,s=i?i.createPolicy(\"lit-html\",{createHTML:t=>t}):void 0,e=`lit$${(Math.random()+\"\").slice(9)}$`,o=\"?\"+e,n=`<${o}>`,l=document,h=(t=\"\")=>l.createComment(t),r=t=>null===t||\"object\"!=typeof t&&\"function\"!=typeof t,d=Array.isArray,u=t=>{var i;return d(t)||\"function\"==typeof(null===(i=t)||void 0===i?void 0:i[Symbol.iterator])},c=/<(?:(!--|\\/[^a-zA-Z])|(\\/?[a-zA-Z][^>\\s]*)|(\\/?$))/g,v=/-->/g,a=/>/g,f=/>|[ \t\\n\f\\r](?:([^\\s\"'>=/]+)([ \t\\n\f\\r]*=[ \t\\n\f\\r]*(?:[^ \t\\n\f\\r\"'`<>=]|(\"|')|))|$)/g,_=/'/g,m=/\"/g,g=/^(?:script|style|textarea)$/i,p=t=>(i,...s)=>({_$litType$:t,strings:i,values:s}),$=p(1),y=p(2),b=Symbol.for(\"lit-noChange\"),w=Symbol.for(\"lit-nothing\"),T=new WeakMap,x=(t,i,s)=>{var e,o;const n=null!==(e=null==s?void 0:s.renderBefore)&&void 0!==e?e:i;let l=n._$litPart$;if(void 0===l){const t=null!==(o=null==s?void 0:s.renderBefore)&&void 0!==o?o:null;n._$litPart$=l=new N(i.insertBefore(h(),t),t,void 0,null!=s?s:{})}return l._$AI(t),l},A=l.createTreeWalker(l,129,null,!1),C=(t,i)=>{const o=t.length-1,l=[];let h,r=2===i?\"<svg>\":\"\",d=c;for(let i=0;i<o;i++){const s=t[i];let o,u,p=-1,$=0;for(;$<s.length&&(d.lastIndex=$,u=d.exec(s),null!==u);)$=d.lastIndex,d===c?\"!--\"===u[1]?d=v:void 0!==u[1]?d=a:void 0!==u[2]?(g.test(u[2])&&(h=RegExp(\"</\"+u[2],\"g\")),d=f):void 0!==u[3]&&(d=f):d===f?\">\"===u[0]?(d=null!=h?h:c,p=-1):void 0===u[1]?p=-2:(p=d.lastIndex-u[2].length,o=u[1],d=void 0===u[3]?f:'\"'===u[3]?m:_):d===m||d===_?d=f:d===v||d===a?d=c:(d=f,h=void 0);const y=d===f&&t[i+1].startsWith(\"/>\")?\" \":\"\";r+=d===c?s+n:p>=0?(l.push(o),s.slice(0,p)+\"$lit$\"+s.slice(p)+e+y):s+e+(-2===p?(l.push(void 0),i):y)}const u=r+(t[o]||\"<?>\")+(2===i?\"</svg>\":\"\");if(!Array.isArray(t)||!t.hasOwnProperty(\"raw\"))throw Error(\"invalid template strings array\");return[void 0!==s?s.createHTML(u):u,l]};class E{constructor({strings:t,_$litType$:s},n){let l;this.parts=[];let r=0,d=0;const u=t.length-1,c=this.parts,[v,a]=C(t,s);if(this.el=E.createElement(v,n),A.currentNode=this.el.content,2===s){const t=this.el.content,i=t.firstChild;i.remove(),t.append(...i.childNodes)}for(;null!==(l=A.nextNode())&&c.length<u;){if(1===l.nodeType){if(l.hasAttributes()){const t=[];for(const i of l.getAttributeNames())if(i.endsWith(\"$lit$\")||i.startsWith(e)){const s=a[d++];if(t.push(i),void 0!==s){const t=l.getAttribute(s.toLowerCase()+\"$lit$\").split(e),i=/([.?@])?(.*)/.exec(s);c.push({type:1,index:r,name:i[2],strings:t,ctor:\".\"===i[1]?M:\"?\"===i[1]?H:\"@\"===i[1]?I:S})}else c.push({type:6,index:r})}for(const i of t)l.removeAttribute(i)}if(g.test(l.tagName)){const t=l.textContent.split(e),s=t.length-1;if(s>0){l.textContent=i?i.emptyScript:\"\";for(let i=0;i<s;i++)l.append(t[i],h()),A.nextNode(),c.push({type:2,index:++r});l.append(t[s],h())}}}else if(8===l.nodeType)if(l.data===o)c.push({type:2,index:r});else{let t=-1;for(;-1!==(t=l.data.indexOf(e,t+1));)c.push({type:7,index:r}),t+=e.length-1}r++}}static createElement(t,i){const s=l.createElement(\"template\");return s.innerHTML=t,s}}function P(t,i,s=t,e){var o,n,l,h;if(i===b)return i;let d=void 0!==e?null===(o=s._$Cl)||void 0===o?void 0:o[e]:s._$Cu;const u=r(i)?void 0:i._$litDirective$;return(null==d?void 0:d.constructor)!==u&&(null===(n=null==d?void 0:d._$AO)||void 0===n||n.call(d,!1),void 0===u?d=void 0:(d=new u(t),d._$AT(t,s,e)),void 0!==e?(null!==(l=(h=s)._$Cl)&&void 0!==l?l:h._$Cl=[])[e]=d:s._$Cu=d),void 0!==d&&(i=P(t,d._$AS(t,i.values),d,e)),i}class V{constructor(t,i){this.v=[],this._$AN=void 0,this._$AD=t,this._$AM=i}get parentNode(){return this._$AM.parentNode}get _$AU(){return this._$AM._$AU}p(t){var i;const{el:{content:s},parts:e}=this._$AD,o=(null!==(i=null==t?void 0:t.creationScope)&&void 0!==i?i:l).importNode(s,!0);A.currentNode=o;let n=A.nextNode(),h=0,r=0,d=e[0];for(;void 0!==d;){if(h===d.index){let i;2===d.type?i=new N(n,n.nextSibling,this,t):1===d.type?i=new d.ctor(n,d.name,d.strings,this,t):6===d.type&&(i=new L(n,this,t)),this.v.push(i),d=e[++r]}h!==(null==d?void 0:d.index)&&(n=A.nextNode(),h++)}return o}m(t){let i=0;for(const s of this.v)void 0!==s&&(void 0!==s.strings?(s._$AI(t,s,i),i+=s.strings.length-2):s._$AI(t[i])),i++}}class N{constructor(t,i,s,e){var o;this.type=2,this._$AH=w,this._$AN=void 0,this._$AA=t,this._$AB=i,this._$AM=s,this.options=e,this._$Cg=null===(o=null==e?void 0:e.isConnected)||void 0===o||o}get _$AU(){var t,i;return null!==(i=null===(t=this._$AM)||void 0===t?void 0:t._$AU)&&void 0!==i?i:this._$Cg}get parentNode(){let t=this._$AA.parentNode;const i=this._$AM;return void 0!==i&&11===t.nodeType&&(t=i.parentNode),t}get startNode(){return this._$AA}get endNode(){return this._$AB}_$AI(t,i=this){t=P(this,t,i),r(t)?t===w||null==t||\"\"===t?(this._$AH!==w&&this._$AR(),this._$AH=w):t!==this._$AH&&t!==b&&this.$(t):void 0!==t._$litType$?this.T(t):void 0!==t.nodeType?this.S(t):u(t)?this.A(t):this.$(t)}M(t,i=this._$AB){return this._$AA.parentNode.insertBefore(t,i)}S(t){this._$AH!==t&&(this._$AR(),this._$AH=this.M(t))}$(t){this._$AH!==w&&r(this._$AH)?this._$AA.nextSibling.data=t:this.S(l.createTextNode(t)),this._$AH=t}T(t){var i;const{values:s,_$litType$:e}=t,o=\"number\"==typeof e?this._$AC(t):(void 0===e.el&&(e.el=E.createElement(e.h,this.options)),e);if((null===(i=this._$AH)||void 0===i?void 0:i._$AD)===o)this._$AH.m(s);else{const t=new V(o,this),i=t.p(this.options);t.m(s),this.S(i),this._$AH=t}}_$AC(t){let i=T.get(t.strings);return void 0===i&&T.set(t.strings,i=new E(t)),i}A(t){d(this._$AH)||(this._$AH=[],this._$AR());const i=this._$AH;let s,e=0;for(const o of t)e===i.length?i.push(s=new N(this.M(h()),this.M(h()),this,this.options)):s=i[e],s._$AI(o),e++;e<i.length&&(this._$AR(s&&s._$AB.nextSibling,e),i.length=e)}_$AR(t=this._$AA.nextSibling,i){var s;for(null===(s=this._$AP)||void 0===s||s.call(this,!1,!0,i);t&&t!==this._$AB;){const i=t.nextSibling;t.remove(),t=i}}setConnected(t){var i;void 0===this._$AM&&(this._$Cg=t,null===(i=this._$AP)||void 0===i||i.call(this,t))}}class S{constructor(t,i,s,e,o){this.type=1,this._$AH=w,this._$AN=void 0,this.element=t,this.name=i,this._$AM=e,this.options=o,s.length>2||\"\"!==s[0]||\"\"!==s[1]?(this._$AH=Array(s.length-1).fill(new String),this.strings=s):this._$AH=w}get tagName(){return this.element.tagName}get _$AU(){return this._$AM._$AU}_$AI(t,i=this,s,e){const o=this.strings;let n=!1;if(void 0===o)t=P(this,t,i,0),n=!r(t)||t!==this._$AH&&t!==b,n&&(this._$AH=t);else{const e=t;let l,h;for(t=o[0],l=0;l<o.length-1;l++)h=P(this,e[s+l],i,l),h===b&&(h=this._$AH[l]),n||(n=!r(h)||h!==this._$AH[l]),h===w?t=w:t!==w&&(t+=(null!=h?h:\"\")+o[l+1]),this._$AH[l]=h}n&&!e&&this.k(t)}k(t){t===w?this.element.removeAttribute(this.name):this.element.setAttribute(this.name,null!=t?t:\"\")}}class M extends S{constructor(){super(...arguments),this.type=3}k(t){this.element[this.name]=t===w?void 0:t}}const k=i?i.emptyScript:\"\";class H extends S{constructor(){super(...arguments),this.type=4}k(t){t&&t!==w?this.element.setAttribute(this.name,k):this.element.removeAttribute(this.name)}}class I extends S{constructor(t,i,s,e,o){super(t,i,s,e,o),this.type=5}_$AI(t,i=this){var s;if((t=null!==(s=P(this,t,i,0))&&void 0!==s?s:w)===b)return;const e=this._$AH,o=t===w&&e!==w||t.capture!==e.capture||t.once!==e.once||t.passive!==e.passive,n=t!==w&&(e===w||o);o&&this.element.removeEventListener(this.name,this,e),n&&this.element.addEventListener(this.name,this,t),this._$AH=t}handleEvent(t){var i,s;\"function\"==typeof this._$AH?this._$AH.call(null!==(s=null===(i=this.options)||void 0===i?void 0:i.host)&&void 0!==s?s:this.element,t):this._$AH.handleEvent(t)}}class L{constructor(t,i,s){this.element=t,this.type=6,this._$AN=void 0,this._$AM=i,this.options=s}get _$AU(){return this._$AM._$AU}_$AI(t){P(this,t)}}const R={P:\"$lit$\",V:e,L:o,I:1,N:C,R:V,D:u,j:P,H:N,O:S,F:H,B:I,W:M,Z:L},z=window.litHtmlPolyfillSupport;null==z||z(E,N),(null!==(t=globalThis.litHtmlVersions)&&void 0!==t?t:globalThis.litHtmlVersions=[]).push(\"2.1.2\");export{R as _$LH,$ as html,b as noChange,w as nothing,x as render,y as svg};\n//# sourceMappingURL=lit-html.js.map\n","import{ReactiveElement as t}from\"@lit/reactive-element\";export*from\"@lit/reactive-element\";import{render as e,noChange as i}from\"lit-html\";export*from\"lit-html\";\n/**\n * @license\n * Copyright 2017 Google LLC\n * SPDX-License-Identifier: BSD-3-Clause\n */var l,o;const r=t;class s extends t{constructor(){super(...arguments),this.renderOptions={host:this},this._$Dt=void 0}createRenderRoot(){var t,e;const i=super.createRenderRoot();return null!==(t=(e=this.renderOptions).renderBefore)&&void 0!==t||(e.renderBefore=i.firstChild),i}update(t){const i=this.render();this.hasUpdated||(this.renderOptions.isConnected=this.isConnected),super.update(t),this._$Dt=e(i,this.renderRoot,this.renderOptions)}connectedCallback(){var t;super.connectedCallback(),null===(t=this._$Dt)||void 0===t||t.setConnected(!0)}disconnectedCallback(){var t;super.disconnectedCallback(),null===(t=this._$Dt)||void 0===t||t.setConnected(!1)}render(){return i}}s.finalized=!0,s._$litElement$=!0,null===(l=globalThis.litElementHydrateSupport)||void 0===l||l.call(globalThis,{LitElement:s});const n=globalThis.litElementPolyfillSupport;null==n||n({LitElement:s});const h={_$AK:(t,e,i)=>{t._$AK(e,i)},_$AL:t=>t._$AL};(null!==(o=globalThis.litElementVersions)&&void 0!==o?o:globalThis.litElementVersions=[]).push(\"3.1.2\");export{s as LitElement,r as UpdatingElement,h as _$LE};\n//# sourceMappingURL=lit-element.js.map\n","/**\n * @license\n * Copyright 2017 Google LLC\n * SPDX-License-Identifier: BSD-3-Clause\n */\nconst n=n=>e=>\"function\"==typeof e?((n,e)=>(window.customElements.define(n,e),e))(n,e):((n,e)=>{const{kind:t,elements:i}=e;return{kind:t,elements:i,finisher(e){window.customElements.define(n,e)}}})(n,e);export{n as customElement};\n//# sourceMappingURL=custom-element.js.map\n","/**\n * @license\n * Copyright 2017 Google LLC\n * SPDX-License-Identifier: BSD-3-Clause\n */\nconst i=(i,e)=>\"method\"===e.kind&&e.descriptor&&!(\"value\"in e.descriptor)?{...e,finisher(n){n.createProperty(e.key,i)}}:{kind:\"field\",key:Symbol(),placement:\"own\",descriptor:{},originalKey:e.key,initializer(){\"function\"==typeof e.initializer&&(this[e.key]=e.initializer.call(this))},finisher(n){n.createProperty(e.key,i)}};function e(e){return(n,t)=>void 0!==t?((i,e,n)=>{e.constructor.createProperty(n,i)})(e,n,t):i(e,n)}export{e as property};\n//# sourceMappingURL=property.js.map\n","import{property as r}from\"./property.js\";\n/**\n * @license\n * Copyright 2017 Google LLC\n * SPDX-License-Identifier: BSD-3-Clause\n */function t(t){return r({...t,state:!0})}export{t as state};\n//# sourceMappingURL=state.js.map\n","/**\n * @license\n * Copyright 2017 Google LLC\n * SPDX-License-Identifier: BSD-3-Clause\n */\nconst e=(e,t,o)=>{Object.defineProperty(t,o,e)},t=(e,t)=>({kind:\"method\",placement:\"prototype\",key:t.key,descriptor:e}),o=({finisher:e,descriptor:t})=>(o,n)=>{var r;if(void 0===n){const n=null!==(r=o.originalKey)&&void 0!==r?r:o.key,i=null!=t?{kind:\"method\",placement:\"prototype\",key:n,descriptor:t(o.key)}:{...o,key:n};return null!=e&&(i.finisher=function(t){e(t,n)}),i}{const r=o.constructor;void 0!==t&&Object.defineProperty(o,n,t(n)),null==e||e(r,n)}};export{o as decorateProperty,e as legacyPrototypeMethod,t as standardPrototypeMethod};\n//# sourceMappingURL=base.js.map\n","import{decorateProperty as r}from\"./base.js\";\n/**\n * @license\n * Copyright 2017 Google LLC\n * SPDX-License-Identifier: BSD-3-Clause\n */function e(e){return r({finisher:(r,t)=>{Object.assign(r.prototype[t],e)}})}export{e as eventOptions};\n//# sourceMappingURL=event-options.js.map\n","import{decorateProperty as o}from\"./base.js\";\n/**\n * @license\n * Copyright 2017 Google LLC\n * SPDX-License-Identifier: BSD-3-Clause\n */function i(i,n){return o({descriptor:o=>{const t={get(){var o,n;return null!==(n=null===(o=this.renderRoot)||void 0===o?void 0:o.querySelector(i))&&void 0!==n?n:null},enumerable:!0,configurable:!0};if(n){const n=\"symbol\"==typeof o?Symbol():\"__\"+o;t.get=function(){var o,t;return void 0===this[n]&&(this[n]=null!==(t=null===(o=this.renderRoot)||void 0===o?void 0:o.querySelector(i))&&void 0!==t?t:null),this[n]}}return t}})}export{i as query};\n//# sourceMappingURL=query.js.map\n","import{decorateProperty as r}from\"./base.js\";\n/**\n * @license\n * Copyright 2017 Google LLC\n * SPDX-License-Identifier: BSD-3-Clause\n */function e(e){return r({descriptor:r=>({get(){var r,o;return null!==(o=null===(r=this.renderRoot)||void 0===r?void 0:r.querySelectorAll(e))&&void 0!==o?o:[]},enumerable:!0,configurable:!0})})}export{e as queryAll};\n//# sourceMappingURL=query-all.js.map\n","import{decorateProperty as r}from\"./base.js\";\n/**\n * @license\n * Copyright 2017 Google LLC\n * SPDX-License-Identifier: BSD-3-Clause\n */\nfunction e(e){return r({descriptor:r=>({async get(){var r;return await this.updateComplete,null===(r=this.renderRoot)||void 0===r?void 0:r.querySelector(e)},enumerable:!0,configurable:!0})})}export{e as queryAsync};\n//# sourceMappingURL=query-async.js.map\n","import{decorateProperty as o}from\"./base.js\";\n/**\n * @license\n * Copyright 2021 Google LLC\n * SPDX-License-Identifier: BSD-3-Clause\n */var n;const e=null!=(null===(n=window.HTMLSlotElement)||void 0===n?void 0:n.prototype.assignedElements)?(o,n)=>o.assignedElements(n):(o,n)=>o.assignedNodes(n).filter((o=>o.nodeType===Node.ELEMENT_NODE));function l(n){const{slot:l,selector:t}=null!=n?n:{};return o({descriptor:o=>({get(){var o;const r=\"slot\"+(l?`[name=${l}]`:\":not([name])\"),i=null===(o=this.renderRoot)||void 0===o?void 0:o.querySelector(r),s=null!=i?e(i,n):[];return t?s.filter((o=>o.matches(t))):s},enumerable:!0,configurable:!0})})}export{l as queryAssignedElements};\n//# sourceMappingURL=query-assigned-elements.js.map\n","import{decorateProperty as e}from\"./base.js\";import{queryAssignedElements as t}from\"./query-assigned-elements.js\";\n/**\n * @license\n * Copyright 2017 Google LLC\n * SPDX-License-Identifier: BSD-3-Clause\n */function o(o,n,r){let l,s=o;return\"object\"==typeof o?(s=o.slot,l=o):l={flatten:n},r?t({slot:s,flatten:n,selector:r}):e({descriptor:e=>({get(){var e,t;const o=\"slot\"+(s?`[name=${s}]`:\":not([name])\"),n=null===(e=this.renderRoot)||void 0===e?void 0:e.querySelector(o);return null!==(t=null==n?void 0:n.assignedNodes(l))&&void 0!==t?t:[]},enumerable:!0,configurable:!0})})}export{o as queryAssignedNodes};\n//# sourceMappingURL=query-assigned-nodes.js.map\n","(typeof navigator !== \"undefined\") && (function (global, factory) {\r\n  typeof exports === 'object' && typeof module !== 'undefined' ? module.exports = factory() :\r\n  typeof define === 'function' && define.amd ? define(factory) :\r\n  (global = typeof globalThis !== 'undefined' ? globalThis : global || self, global.lottie = factory());\r\n})(this, (function () { 'use strict';\r\n\r\n  var svgNS = 'http://www.w3.org/2000/svg';\r\n  var locationHref = '';\r\n  var _useWebWorker = false;\r\n  var initialDefaultFrame = -999999;\r\n\r\n  var setWebWorker = function setWebWorker(flag) {\r\n    _useWebWorker = !!flag;\r\n  };\r\n\r\n  var getWebWorker = function getWebWorker() {\r\n    return _useWebWorker;\r\n  };\r\n\r\n  var setLocationHref = function setLocationHref(value) {\r\n    locationHref = value;\r\n  };\r\n\r\n  var getLocationHref = function getLocationHref() {\r\n    return locationHref;\r\n  };\r\n\r\n  function createTag(type) {\r\n    // return {appendChild:function(){},setAttribute:function(){},style:{}}\r\n    return document.createElement(type);\r\n  }\r\n\r\n  function extendPrototype(sources, destination) {\r\n    var i;\r\n    var len = sources.length;\r\n    var sourcePrototype;\r\n\r\n    for (i = 0; i < len; i += 1) {\r\n      sourcePrototype = sources[i].prototype;\r\n\r\n      for (var attr in sourcePrototype) {\r\n        if (Object.prototype.hasOwnProperty.call(sourcePrototype, attr)) destination.prototype[attr] = sourcePrototype[attr];\r\n      }\r\n    }\r\n  }\r\n\r\n  function getDescriptor(object, prop) {\r\n    return Object.getOwnPropertyDescriptor(object, prop);\r\n  }\r\n\r\n  function createProxyFunction(prototype) {\r\n    function ProxyFunction() {}\r\n\r\n    ProxyFunction.prototype = prototype;\r\n    return ProxyFunction;\r\n  }\r\n\r\n  // import Howl from '../../3rd_party/howler';\r\n  var audioControllerFactory = function () {\r\n    function AudioController(audioFactory) {\r\n      this.audios = [];\r\n      this.audioFactory = audioFactory;\r\n      this._volume = 1;\r\n      this._isMuted = false;\r\n    }\r\n\r\n    AudioController.prototype = {\r\n      addAudio: function addAudio(audio) {\r\n        this.audios.push(audio);\r\n      },\r\n      pause: function pause() {\r\n        var i;\r\n        var len = this.audios.length;\r\n\r\n        for (i = 0; i < len; i += 1) {\r\n          this.audios[i].pause();\r\n        }\r\n      },\r\n      resume: function resume() {\r\n        var i;\r\n        var len = this.audios.length;\r\n\r\n        for (i = 0; i < len; i += 1) {\r\n          this.audios[i].resume();\r\n        }\r\n      },\r\n      setRate: function setRate(rateValue) {\r\n        var i;\r\n        var len = this.audios.length;\r\n\r\n        for (i = 0; i < len; i += 1) {\r\n          this.audios[i].setRate(rateValue);\r\n        }\r\n      },\r\n      createAudio: function createAudio(assetPath) {\r\n        if (this.audioFactory) {\r\n          return this.audioFactory(assetPath);\r\n        }\r\n\r\n        if (window.Howl) {\r\n          return new window.Howl({\r\n            src: [assetPath]\r\n          });\r\n        }\r\n\r\n        return {\r\n          isPlaying: false,\r\n          play: function play() {\r\n            this.isPlaying = true;\r\n          },\r\n          seek: function seek() {\r\n            this.isPlaying = false;\r\n          },\r\n          playing: function playing() {},\r\n          rate: function rate() {},\r\n          setVolume: function setVolume() {}\r\n        };\r\n      },\r\n      setAudioFactory: function setAudioFactory(audioFactory) {\r\n        this.audioFactory = audioFactory;\r\n      },\r\n      setVolume: function setVolume(value) {\r\n        this._volume = value;\r\n\r\n        this._updateVolume();\r\n      },\r\n      mute: function mute() {\r\n        this._isMuted = true;\r\n\r\n        this._updateVolume();\r\n      },\r\n      unmute: function unmute() {\r\n        this._isMuted = false;\r\n\r\n        this._updateVolume();\r\n      },\r\n      getVolume: function getVolume() {\r\n        return this._volume;\r\n      },\r\n      _updateVolume: function _updateVolume() {\r\n        var i;\r\n        var len = this.audios.length;\r\n\r\n        for (i = 0; i < len; i += 1) {\r\n          this.audios[i].volume(this._volume * (this._isMuted ? 0 : 1));\r\n        }\r\n      }\r\n    };\r\n    return function () {\r\n      return new AudioController();\r\n    };\r\n  }();\r\n\r\n  var createTypedArray = function () {\r\n    function createRegularArray(type, len) {\r\n      var i = 0;\r\n      var arr = [];\r\n      var value;\r\n\r\n      switch (type) {\r\n        case 'int16':\r\n        case 'uint8c':\r\n          value = 1;\r\n          break;\r\n\r\n        default:\r\n          value = 1.1;\r\n          break;\r\n      }\r\n\r\n      for (i = 0; i < len; i += 1) {\r\n        arr.push(value);\r\n      }\r\n\r\n      return arr;\r\n    }\r\n\r\n    function createTypedArrayFactory(type, len) {\r\n      if (type === 'float32') {\r\n        return new Float32Array(len);\r\n      }\r\n\r\n      if (type === 'int16') {\r\n        return new Int16Array(len);\r\n      }\r\n\r\n      if (type === 'uint8c') {\r\n        return new Uint8ClampedArray(len);\r\n      }\r\n\r\n      return createRegularArray(type, len);\r\n    }\r\n\r\n    if (typeof Uint8ClampedArray === 'function' && typeof Float32Array === 'function') {\r\n      return createTypedArrayFactory;\r\n    }\r\n\r\n    return createRegularArray;\r\n  }();\r\n\r\n  function createSizedArray(len) {\r\n    return Array.apply(null, {\r\n      length: len\r\n    });\r\n  }\r\n\r\n  function _typeof$6(obj) { \"@babel/helpers - typeof\"; if (typeof Symbol === \"function\" && typeof Symbol.iterator === \"symbol\") { _typeof$6 = function _typeof(obj) { return typeof obj; }; } else { _typeof$6 = function _typeof(obj) { return obj && typeof Symbol === \"function\" && obj.constructor === Symbol && obj !== Symbol.prototype ? \"symbol\" : typeof obj; }; } return _typeof$6(obj); }\r\n  var subframeEnabled = true;\r\n  var expressionsPlugin = null;\r\n  var expressionsInterfaces = null;\r\n  var idPrefix$1 = '';\r\n  var isSafari = /^((?!chrome|android).)*safari/i.test(navigator.userAgent);\r\n  var _shouldRoundValues = false;\r\n  var bmPow = Math.pow;\r\n  var bmSqrt = Math.sqrt;\r\n  var bmFloor = Math.floor;\r\n  var bmMax = Math.max;\r\n  var bmMin = Math.min;\r\n  var BMMath = {};\r\n\r\n  (function () {\r\n    var propertyNames = ['abs', 'acos', 'acosh', 'asin', 'asinh', 'atan', 'atanh', 'atan2', 'ceil', 'cbrt', 'expm1', 'clz32', 'cos', 'cosh', 'exp', 'floor', 'fround', 'hypot', 'imul', 'log', 'log1p', 'log2', 'log10', 'max', 'min', 'pow', 'random', 'round', 'sign', 'sin', 'sinh', 'sqrt', 'tan', 'tanh', 'trunc', 'E', 'LN10', 'LN2', 'LOG10E', 'LOG2E', 'PI', 'SQRT1_2', 'SQRT2'];\r\n    var i;\r\n    var len = propertyNames.length;\r\n\r\n    for (i = 0; i < len; i += 1) {\r\n      BMMath[propertyNames[i]] = Math[propertyNames[i]];\r\n    }\r\n  })();\r\n\r\n  function ProjectInterface$1() {\r\n    return {};\r\n  }\r\n\r\n  BMMath.random = Math.random;\r\n\r\n  BMMath.abs = function (val) {\r\n    var tOfVal = _typeof$6(val);\r\n\r\n    if (tOfVal === 'object' && val.length) {\r\n      var absArr = createSizedArray(val.length);\r\n      var i;\r\n      var len = val.length;\r\n\r\n      for (i = 0; i < len; i += 1) {\r\n        absArr[i] = Math.abs(val[i]);\r\n      }\r\n\r\n      return absArr;\r\n    }\r\n\r\n    return Math.abs(val);\r\n  };\r\n\r\n  var defaultCurveSegments = 150;\r\n  var degToRads = Math.PI / 180;\r\n  var roundCorner = 0.5519;\r\n\r\n  function roundValues(flag) {\r\n    _shouldRoundValues = !!flag;\r\n  }\r\n\r\n  function bmRnd(value) {\r\n    if (_shouldRoundValues) {\r\n      return Math.round(value);\r\n    }\r\n\r\n    return value;\r\n  }\r\n\r\n  function styleDiv(element) {\r\n    element.style.position = 'absolute';\r\n    element.style.top = 0;\r\n    element.style.left = 0;\r\n    element.style.display = 'block';\r\n    element.style.transformOrigin = '0 0';\r\n    element.style.webkitTransformOrigin = '0 0';\r\n    element.style.backfaceVisibility = 'visible';\r\n    element.style.webkitBackfaceVisibility = 'visible';\r\n    element.style.transformStyle = 'preserve-3d';\r\n    element.style.webkitTransformStyle = 'preserve-3d';\r\n    element.style.mozTransformStyle = 'preserve-3d';\r\n  }\r\n\r\n  function BMEnterFrameEvent(type, currentTime, totalTime, frameMultiplier) {\r\n    this.type = type;\r\n    this.currentTime = currentTime;\r\n    this.totalTime = totalTime;\r\n    this.direction = frameMultiplier < 0 ? -1 : 1;\r\n  }\r\n\r\n  function BMCompleteEvent(type, frameMultiplier) {\r\n    this.type = type;\r\n    this.direction = frameMultiplier < 0 ? -1 : 1;\r\n  }\r\n\r\n  function BMCompleteLoopEvent(type, totalLoops, currentLoop, frameMultiplier) {\r\n    this.type = type;\r\n    this.currentLoop = currentLoop;\r\n    this.totalLoops = totalLoops;\r\n    this.direction = frameMultiplier < 0 ? -1 : 1;\r\n  }\r\n\r\n  function BMSegmentStartEvent(type, firstFrame, totalFrames) {\r\n    this.type = type;\r\n    this.firstFrame = firstFrame;\r\n    this.totalFrames = totalFrames;\r\n  }\r\n\r\n  function BMDestroyEvent(type, target) {\r\n    this.type = type;\r\n    this.target = target;\r\n  }\r\n\r\n  function BMRenderFrameErrorEvent(nativeError, currentTime) {\r\n    this.type = 'renderFrameError';\r\n    this.nativeError = nativeError;\r\n    this.currentTime = currentTime;\r\n  }\r\n\r\n  function BMConfigErrorEvent(nativeError) {\r\n    this.type = 'configError';\r\n    this.nativeError = nativeError;\r\n  }\r\n\r\n  function BMAnimationConfigErrorEvent(type, nativeError) {\r\n    this.type = type;\r\n    this.nativeError = nativeError;\r\n  }\r\n\r\n  var createElementID = function () {\r\n    var _count = 0;\r\n    return function createID() {\r\n      _count += 1;\r\n      return idPrefix$1 + '__lottie_element_' + _count;\r\n    };\r\n  }();\r\n\r\n  function HSVtoRGB(h, s, v) {\r\n    var r;\r\n    var g;\r\n    var b;\r\n    var i;\r\n    var f;\r\n    var p;\r\n    var q;\r\n    var t;\r\n    i = Math.floor(h * 6);\r\n    f = h * 6 - i;\r\n    p = v * (1 - s);\r\n    q = v * (1 - f * s);\r\n    t = v * (1 - (1 - f) * s);\r\n\r\n    switch (i % 6) {\r\n      case 0:\r\n        r = v;\r\n        g = t;\r\n        b = p;\r\n        break;\r\n\r\n      case 1:\r\n        r = q;\r\n        g = v;\r\n        b = p;\r\n        break;\r\n\r\n      case 2:\r\n        r = p;\r\n        g = v;\r\n        b = t;\r\n        break;\r\n\r\n      case 3:\r\n        r = p;\r\n        g = q;\r\n        b = v;\r\n        break;\r\n\r\n      case 4:\r\n        r = t;\r\n        g = p;\r\n        b = v;\r\n        break;\r\n\r\n      case 5:\r\n        r = v;\r\n        g = p;\r\n        b = q;\r\n        break;\r\n\r\n      default:\r\n        break;\r\n    }\r\n\r\n    return [r, g, b];\r\n  }\r\n\r\n  function RGBtoHSV(r, g, b) {\r\n    var max = Math.max(r, g, b);\r\n    var min = Math.min(r, g, b);\r\n    var d = max - min;\r\n    var h;\r\n    var s = max === 0 ? 0 : d / max;\r\n    var v = max / 255;\r\n\r\n    switch (max) {\r\n      case min:\r\n        h = 0;\r\n        break;\r\n\r\n      case r:\r\n        h = g - b + d * (g < b ? 6 : 0);\r\n        h /= 6 * d;\r\n        break;\r\n\r\n      case g:\r\n        h = b - r + d * 2;\r\n        h /= 6 * d;\r\n        break;\r\n\r\n      case b:\r\n        h = r - g + d * 4;\r\n        h /= 6 * d;\r\n        break;\r\n\r\n      default:\r\n        break;\r\n    }\r\n\r\n    return [h, s, v];\r\n  }\r\n\r\n  function addSaturationToRGB(color, offset) {\r\n    var hsv = RGBtoHSV(color[0] * 255, color[1] * 255, color[2] * 255);\r\n    hsv[1] += offset;\r\n\r\n    if (hsv[1] > 1) {\r\n      hsv[1] = 1;\r\n    } else if (hsv[1] <= 0) {\r\n      hsv[1] = 0;\r\n    }\r\n\r\n    return HSVtoRGB(hsv[0], hsv[1], hsv[2]);\r\n  }\r\n\r\n  function addBrightnessToRGB(color, offset) {\r\n    var hsv = RGBtoHSV(color[0] * 255, color[1] * 255, color[2] * 255);\r\n    hsv[2] += offset;\r\n\r\n    if (hsv[2] > 1) {\r\n      hsv[2] = 1;\r\n    } else if (hsv[2] < 0) {\r\n      hsv[2] = 0;\r\n    }\r\n\r\n    return HSVtoRGB(hsv[0], hsv[1], hsv[2]);\r\n  }\r\n\r\n  function addHueToRGB(color, offset) {\r\n    var hsv = RGBtoHSV(color[0] * 255, color[1] * 255, color[2] * 255);\r\n    hsv[0] += offset / 360;\r\n\r\n    if (hsv[0] > 1) {\r\n      hsv[0] -= 1;\r\n    } else if (hsv[0] < 0) {\r\n      hsv[0] += 1;\r\n    }\r\n\r\n    return HSVtoRGB(hsv[0], hsv[1], hsv[2]);\r\n  }\r\n\r\n  var rgbToHex = function () {\r\n    var colorMap = [];\r\n    var i;\r\n    var hex;\r\n\r\n    for (i = 0; i < 256; i += 1) {\r\n      hex = i.toString(16);\r\n      colorMap[i] = hex.length === 1 ? '0' + hex : hex;\r\n    }\r\n\r\n    return function (r, g, b) {\r\n      if (r < 0) {\r\n        r = 0;\r\n      }\r\n\r\n      if (g < 0) {\r\n        g = 0;\r\n      }\r\n\r\n      if (b < 0) {\r\n        b = 0;\r\n      }\r\n\r\n      return '#' + colorMap[r] + colorMap[g] + colorMap[b];\r\n    };\r\n  }();\r\n\r\n  var setSubframeEnabled = function setSubframeEnabled(flag) {\r\n    subframeEnabled = !!flag;\r\n  };\r\n\r\n  var getSubframeEnabled = function getSubframeEnabled() {\r\n    return subframeEnabled;\r\n  };\r\n\r\n  var setExpressionsPlugin = function setExpressionsPlugin(value) {\r\n    expressionsPlugin = value;\r\n  };\r\n\r\n  var getExpressionsPlugin = function getExpressionsPlugin() {\r\n    return expressionsPlugin;\r\n  };\r\n\r\n  var setExpressionInterfaces = function setExpressionInterfaces(value) {\r\n    expressionsInterfaces = value;\r\n  };\r\n\r\n  var getExpressionInterfaces = function getExpressionInterfaces() {\r\n    return expressionsInterfaces;\r\n  };\r\n\r\n  var setDefaultCurveSegments = function setDefaultCurveSegments(value) {\r\n    defaultCurveSegments = value;\r\n  };\r\n\r\n  var getDefaultCurveSegments = function getDefaultCurveSegments() {\r\n    return defaultCurveSegments;\r\n  };\r\n\r\n  var setIdPrefix = function setIdPrefix(value) {\r\n    idPrefix$1 = value;\r\n  };\r\n\r\n  var getIdPrefix = function getIdPrefix() {\r\n    return idPrefix$1;\r\n  };\r\n\r\n  function createNS(type) {\r\n    // return {appendChild:function(){},setAttribute:function(){},style:{}}\r\n    return document.createElementNS(svgNS, type);\r\n  }\r\n\r\n  function _typeof$5(obj) { \"@babel/helpers - typeof\"; if (typeof Symbol === \"function\" && typeof Symbol.iterator === \"symbol\") { _typeof$5 = function _typeof(obj) { return typeof obj; }; } else { _typeof$5 = function _typeof(obj) { return obj && typeof Symbol === \"function\" && obj.constructor === Symbol && obj !== Symbol.prototype ? \"symbol\" : typeof obj; }; } return _typeof$5(obj); }\r\n\r\n  var dataManager = function () {\r\n    var _counterId = 1;\r\n    var processes = [];\r\n    var workerFn;\r\n    var workerInstance;\r\n    var workerProxy = {\r\n      onmessage: function onmessage() {},\r\n      postMessage: function postMessage(path) {\r\n        workerFn({\r\n          data: path\r\n        });\r\n      }\r\n    };\r\n    var _workerSelf = {\r\n      postMessage: function postMessage(data) {\r\n        workerProxy.onmessage({\r\n          data: data\r\n        });\r\n      }\r\n    };\r\n\r\n    function createWorker(fn) {\r\n      if (window.Worker && window.Blob && getWebWorker()) {\r\n        var blob = new Blob(['var _workerSelf = self; self.onmessage = ', fn.toString()], {\r\n          type: 'text/javascript'\r\n        }); // var blob = new Blob(['self.onmessage = ', fn.toString()], { type: 'text/javascript' });\r\n\r\n        var url = URL.createObjectURL(blob);\r\n        return new Worker(url);\r\n      }\r\n\r\n      workerFn = fn;\r\n      return workerProxy;\r\n    }\r\n\r\n    function setupWorker() {\r\n      if (!workerInstance) {\r\n        workerInstance = createWorker(function workerStart(e) {\r\n          function dataFunctionManager() {\r\n            function completeLayers(layers, comps) {\r\n              var layerData;\r\n              var i;\r\n              var len = layers.length;\r\n              var j;\r\n              var jLen;\r\n              var k;\r\n              var kLen;\r\n\r\n              for (i = 0; i < len; i += 1) {\r\n                layerData = layers[i];\r\n\r\n                if ('ks' in layerData && !layerData.completed) {\r\n                  layerData.completed = true;\r\n\r\n                  if (layerData.hasMask) {\r\n                    var maskProps = layerData.masksProperties;\r\n                    jLen = maskProps.length;\r\n\r\n                    for (j = 0; j < jLen; j += 1) {\r\n                      if (maskProps[j].pt.k.i) {\r\n                        convertPathsToAbsoluteValues(maskProps[j].pt.k);\r\n                      } else {\r\n                        kLen = maskProps[j].pt.k.length;\r\n\r\n                        for (k = 0; k < kLen; k += 1) {\r\n                          if (maskProps[j].pt.k[k].s) {\r\n                            convertPathsToAbsoluteValues(maskProps[j].pt.k[k].s[0]);\r\n                          }\r\n\r\n                          if (maskProps[j].pt.k[k].e) {\r\n                            convertPathsToAbsoluteValues(maskProps[j].pt.k[k].e[0]);\r\n                          }\r\n                        }\r\n                      }\r\n                    }\r\n                  }\r\n\r\n                  if (layerData.ty === 0) {\r\n                    layerData.layers = findCompLayers(layerData.refId, comps);\r\n                    completeLayers(layerData.layers, comps);\r\n                  } else if (layerData.ty === 4) {\r\n                    completeShapes(layerData.shapes);\r\n                  } else if (layerData.ty === 5) {\r\n                    completeText(layerData);\r\n                  }\r\n                }\r\n              }\r\n            }\r\n\r\n            function completeChars(chars, assets) {\r\n              if (chars) {\r\n                var i = 0;\r\n                var len = chars.length;\r\n\r\n                for (i = 0; i < len; i += 1) {\r\n                  if (chars[i].t === 1) {\r\n                    // var compData = findComp(chars[i].data.refId, assets);\r\n                    chars[i].data.layers = findCompLayers(chars[i].data.refId, assets); // chars[i].data.ip = 0;\r\n                    // chars[i].data.op = 99999;\r\n                    // chars[i].data.st = 0;\r\n                    // chars[i].data.sr = 1;\r\n                    // chars[i].w = compData.w;\r\n                    // chars[i].data.ks = {\r\n                    //   a: { k: [0, 0, 0], a: 0 },\r\n                    //   p: { k: [0, -compData.h, 0], a: 0 },\r\n                    //   r: { k: 0, a: 0 },\r\n                    //   s: { k: [100, 100], a: 0 },\r\n                    //   o: { k: 100, a: 0 },\r\n                    // };\r\n\r\n                    completeLayers(chars[i].data.layers, assets);\r\n                  }\r\n                }\r\n              }\r\n            }\r\n\r\n            function findComp(id, comps) {\r\n              var i = 0;\r\n              var len = comps.length;\r\n\r\n              while (i < len) {\r\n                if (comps[i].id === id) {\r\n                  return comps[i];\r\n                }\r\n\r\n                i += 1;\r\n              }\r\n\r\n              return null;\r\n            }\r\n\r\n            function findCompLayers(id, comps) {\r\n              var comp = findComp(id, comps);\r\n\r\n              if (comp) {\r\n                if (!comp.layers.__used) {\r\n                  comp.layers.__used = true;\r\n                  return comp.layers;\r\n                }\r\n\r\n                return JSON.parse(JSON.stringify(comp.layers));\r\n              }\r\n\r\n              return null;\r\n            }\r\n\r\n            function completeShapes(arr) {\r\n              var i;\r\n              var len = arr.length;\r\n              var j;\r\n              var jLen;\r\n\r\n              for (i = len - 1; i >= 0; i -= 1) {\r\n                if (arr[i].ty === 'sh') {\r\n                  if (arr[i].ks.k.i) {\r\n                    convertPathsToAbsoluteValues(arr[i].ks.k);\r\n                  } else {\r\n                    jLen = arr[i].ks.k.length;\r\n\r\n                    for (j = 0; j < jLen; j += 1) {\r\n                      if (arr[i].ks.k[j].s) {\r\n                        convertPathsToAbsoluteValues(arr[i].ks.k[j].s[0]);\r\n                      }\r\n\r\n                      if (arr[i].ks.k[j].e) {\r\n                        convertPathsToAbsoluteValues(arr[i].ks.k[j].e[0]);\r\n                      }\r\n                    }\r\n                  }\r\n                } else if (arr[i].ty === 'gr') {\r\n                  completeShapes(arr[i].it);\r\n                }\r\n              }\r\n            }\r\n\r\n            function convertPathsToAbsoluteValues(path) {\r\n              var i;\r\n              var len = path.i.length;\r\n\r\n              for (i = 0; i < len; i += 1) {\r\n                path.i[i][0] += path.v[i][0];\r\n                path.i[i][1] += path.v[i][1];\r\n                path.o[i][0] += path.v[i][0];\r\n                path.o[i][1] += path.v[i][1];\r\n              }\r\n            }\r\n\r\n            function checkVersion(minimum, animVersionString) {\r\n              var animVersion = animVersionString ? animVersionString.split('.') : [100, 100, 100];\r\n\r\n              if (minimum[0] > animVersion[0]) {\r\n                return true;\r\n              }\r\n\r\n              if (animVersion[0] > minimum[0]) {\r\n                return false;\r\n              }\r\n\r\n              if (minimum[1] > animVersion[1]) {\r\n                return true;\r\n              }\r\n\r\n              if (animVersion[1] > minimum[1]) {\r\n                return false;\r\n              }\r\n\r\n              if (minimum[2] > animVersion[2]) {\r\n                return true;\r\n              }\r\n\r\n              if (animVersion[2] > minimum[2]) {\r\n                return false;\r\n              }\r\n\r\n              return null;\r\n            }\r\n\r\n            var checkText = function () {\r\n              var minimumVersion = [4, 4, 14];\r\n\r\n              function updateTextLayer(textLayer) {\r\n                var documentData = textLayer.t.d;\r\n                textLayer.t.d = {\r\n                  k: [{\r\n                    s: documentData,\r\n                    t: 0\r\n                  }]\r\n                };\r\n              }\r\n\r\n              function iterateLayers(layers) {\r\n                var i;\r\n                var len = layers.length;\r\n\r\n                for (i = 0; i < len; i += 1) {\r\n                  if (layers[i].ty === 5) {\r\n                    updateTextLayer(layers[i]);\r\n                  }\r\n                }\r\n              }\r\n\r\n              return function (animationData) {\r\n                if (checkVersion(minimumVersion, animationData.v)) {\r\n                  iterateLayers(animationData.layers);\r\n\r\n                  if (animationData.assets) {\r\n                    var i;\r\n                    var len = animationData.assets.length;\r\n\r\n                    for (i = 0; i < len; i += 1) {\r\n                      if (animationData.assets[i].layers) {\r\n                        iterateLayers(animationData.assets[i].layers);\r\n                      }\r\n                    }\r\n                  }\r\n                }\r\n              };\r\n            }();\r\n\r\n            var checkChars = function () {\r\n              var minimumVersion = [4, 7, 99];\r\n              return function (animationData) {\r\n                if (animationData.chars && !checkVersion(minimumVersion, animationData.v)) {\r\n                  var i;\r\n                  var len = animationData.chars.length;\r\n\r\n                  for (i = 0; i < len; i += 1) {\r\n                    var charData = animationData.chars[i];\r\n\r\n                    if (charData.data && charData.data.shapes) {\r\n                      completeShapes(charData.data.shapes);\r\n                      charData.data.ip = 0;\r\n                      charData.data.op = 99999;\r\n                      charData.data.st = 0;\r\n                      charData.data.sr = 1;\r\n                      charData.data.ks = {\r\n                        p: {\r\n                          k: [0, 0],\r\n                          a: 0\r\n                        },\r\n                        s: {\r\n                          k: [100, 100],\r\n                          a: 0\r\n                        },\r\n                        a: {\r\n                          k: [0, 0],\r\n                          a: 0\r\n                        },\r\n                        r: {\r\n                          k: 0,\r\n                          a: 0\r\n                        },\r\n                        o: {\r\n                          k: 100,\r\n                          a: 0\r\n                        }\r\n                      };\r\n\r\n                      if (!animationData.chars[i].t) {\r\n                        charData.data.shapes.push({\r\n                          ty: 'no'\r\n                        });\r\n                        charData.data.shapes[0].it.push({\r\n                          p: {\r\n                            k: [0, 0],\r\n                            a: 0\r\n                          },\r\n                          s: {\r\n                            k: [100, 100],\r\n                            a: 0\r\n                          },\r\n                          a: {\r\n                            k: [0, 0],\r\n                            a: 0\r\n                          },\r\n                          r: {\r\n                            k: 0,\r\n                            a: 0\r\n                          },\r\n                          o: {\r\n                            k: 100,\r\n                            a: 0\r\n                          },\r\n                          sk: {\r\n                            k: 0,\r\n                            a: 0\r\n                          },\r\n                          sa: {\r\n                            k: 0,\r\n                            a: 0\r\n                          },\r\n                          ty: 'tr'\r\n                        });\r\n                      }\r\n                    }\r\n                  }\r\n                }\r\n              };\r\n            }();\r\n\r\n            var checkPathProperties = function () {\r\n              var minimumVersion = [5, 7, 15];\r\n\r\n              function updateTextLayer(textLayer) {\r\n                var pathData = textLayer.t.p;\r\n\r\n                if (typeof pathData.a === 'number') {\r\n                  pathData.a = {\r\n                    a: 0,\r\n                    k: pathData.a\r\n                  };\r\n                }\r\n\r\n                if (typeof pathData.p === 'number') {\r\n                  pathData.p = {\r\n                    a: 0,\r\n                    k: pathData.p\r\n                  };\r\n                }\r\n\r\n                if (typeof pathData.r === 'number') {\r\n                  pathData.r = {\r\n                    a: 0,\r\n                    k: pathData.r\r\n                  };\r\n                }\r\n              }\r\n\r\n              function iterateLayers(layers) {\r\n                var i;\r\n                var len = layers.length;\r\n\r\n                for (i = 0; i < len; i += 1) {\r\n                  if (layers[i].ty === 5) {\r\n                    updateTextLayer(layers[i]);\r\n                  }\r\n                }\r\n              }\r\n\r\n              return function (animationData) {\r\n                if (checkVersion(minimumVersion, animationData.v)) {\r\n                  iterateLayers(animationData.layers);\r\n\r\n                  if (animationData.assets) {\r\n                    var i;\r\n                    var len = animationData.assets.length;\r\n\r\n                    for (i = 0; i < len; i += 1) {\r\n                      if (animationData.assets[i].layers) {\r\n                        iterateLayers(animationData.assets[i].layers);\r\n                      }\r\n                    }\r\n                  }\r\n                }\r\n              };\r\n            }();\r\n\r\n            var checkColors = function () {\r\n              var minimumVersion = [4, 1, 9];\r\n\r\n              function iterateShapes(shapes) {\r\n                var i;\r\n                var len = shapes.length;\r\n                var j;\r\n                var jLen;\r\n\r\n                for (i = 0; i < len; i += 1) {\r\n                  if (shapes[i].ty === 'gr') {\r\n                    iterateShapes(shapes[i].it);\r\n                  } else if (shapes[i].ty === 'fl' || shapes[i].ty === 'st') {\r\n                    if (shapes[i].c.k && shapes[i].c.k[0].i) {\r\n                      jLen = shapes[i].c.k.length;\r\n\r\n                      for (j = 0; j < jLen; j += 1) {\r\n                        if (shapes[i].c.k[j].s) {\r\n                          shapes[i].c.k[j].s[0] /= 255;\r\n                          shapes[i].c.k[j].s[1] /= 255;\r\n                          shapes[i].c.k[j].s[2] /= 255;\r\n                          shapes[i].c.k[j].s[3] /= 255;\r\n                        }\r\n\r\n                        if (shapes[i].c.k[j].e) {\r\n                          shapes[i].c.k[j].e[0] /= 255;\r\n                          shapes[i].c.k[j].e[1] /= 255;\r\n                          shapes[i].c.k[j].e[2] /= 255;\r\n                          shapes[i].c.k[j].e[3] /= 255;\r\n                        }\r\n                      }\r\n                    } else {\r\n                      shapes[i].c.k[0] /= 255;\r\n                      shapes[i].c.k[1] /= 255;\r\n                      shapes[i].c.k[2] /= 255;\r\n                      shapes[i].c.k[3] /= 255;\r\n                    }\r\n                  }\r\n                }\r\n              }\r\n\r\n              function iterateLayers(layers) {\r\n                var i;\r\n                var len = layers.length;\r\n\r\n                for (i = 0; i < len; i += 1) {\r\n                  if (layers[i].ty === 4) {\r\n                    iterateShapes(layers[i].shapes);\r\n                  }\r\n                }\r\n              }\r\n\r\n              return function (animationData) {\r\n                if (checkVersion(minimumVersion, animationData.v)) {\r\n                  iterateLayers(animationData.layers);\r\n\r\n                  if (animationData.assets) {\r\n                    var i;\r\n                    var len = animationData.assets.length;\r\n\r\n                    for (i = 0; i < len; i += 1) {\r\n                      if (animationData.assets[i].layers) {\r\n                        iterateLayers(animationData.assets[i].layers);\r\n                      }\r\n                    }\r\n                  }\r\n                }\r\n              };\r\n            }();\r\n\r\n            var checkShapes = function () {\r\n              var minimumVersion = [4, 4, 18];\r\n\r\n              function completeClosingShapes(arr) {\r\n                var i;\r\n                var len = arr.length;\r\n                var j;\r\n                var jLen;\r\n\r\n                for (i = len - 1; i >= 0; i -= 1) {\r\n                  if (arr[i].ty === 'sh') {\r\n                    if (arr[i].ks.k.i) {\r\n                      arr[i].ks.k.c = arr[i].closed;\r\n                    } else {\r\n                      jLen = arr[i].ks.k.length;\r\n\r\n                      for (j = 0; j < jLen; j += 1) {\r\n                        if (arr[i].ks.k[j].s) {\r\n                          arr[i].ks.k[j].s[0].c = arr[i].closed;\r\n                        }\r\n\r\n                        if (arr[i].ks.k[j].e) {\r\n                          arr[i].ks.k[j].e[0].c = arr[i].closed;\r\n                        }\r\n                      }\r\n                    }\r\n                  } else if (arr[i].ty === 'gr') {\r\n                    completeClosingShapes(arr[i].it);\r\n                  }\r\n                }\r\n              }\r\n\r\n              function iterateLayers(layers) {\r\n                var layerData;\r\n                var i;\r\n                var len = layers.length;\r\n                var j;\r\n                var jLen;\r\n                var k;\r\n                var kLen;\r\n\r\n                for (i = 0; i < len; i += 1) {\r\n                  layerData = layers[i];\r\n\r\n                  if (layerData.hasMask) {\r\n                    var maskProps = layerData.masksProperties;\r\n                    jLen = maskProps.length;\r\n\r\n                    for (j = 0; j < jLen; j += 1) {\r\n                      if (maskProps[j].pt.k.i) {\r\n                        maskProps[j].pt.k.c = maskProps[j].cl;\r\n                      } else {\r\n                        kLen = maskProps[j].pt.k.length;\r\n\r\n                        for (k = 0; k < kLen; k += 1) {\r\n                          if (maskProps[j].pt.k[k].s) {\r\n                            maskProps[j].pt.k[k].s[0].c = maskProps[j].cl;\r\n                          }\r\n\r\n                          if (maskProps[j].pt.k[k].e) {\r\n                            maskProps[j].pt.k[k].e[0].c = maskProps[j].cl;\r\n                          }\r\n                        }\r\n                      }\r\n                    }\r\n                  }\r\n\r\n                  if (layerData.ty === 4) {\r\n                    completeClosingShapes(layerData.shapes);\r\n                  }\r\n                }\r\n              }\r\n\r\n              return function (animationData) {\r\n                if (checkVersion(minimumVersion, animationData.v)) {\r\n                  iterateLayers(animationData.layers);\r\n\r\n                  if (animationData.assets) {\r\n                    var i;\r\n                    var len = animationData.assets.length;\r\n\r\n                    for (i = 0; i < len; i += 1) {\r\n                      if (animationData.assets[i].layers) {\r\n                        iterateLayers(animationData.assets[i].layers);\r\n                      }\r\n                    }\r\n                  }\r\n                }\r\n              };\r\n            }();\r\n\r\n            function completeData(animationData) {\r\n              if (animationData.__complete) {\r\n                return;\r\n              }\r\n\r\n              checkColors(animationData);\r\n              checkText(animationData);\r\n              checkChars(animationData);\r\n              checkPathProperties(animationData);\r\n              checkShapes(animationData);\r\n              completeLayers(animationData.layers, animationData.assets);\r\n              completeChars(animationData.chars, animationData.assets);\r\n              animationData.__complete = true;\r\n            }\r\n\r\n            function completeText(data) {\r\n              if (data.t.a.length === 0 && !('m' in data.t.p)) {// data.singleShape = true;\r\n              }\r\n            }\r\n\r\n            var moduleOb = {};\r\n            moduleOb.completeData = completeData;\r\n            moduleOb.checkColors = checkColors;\r\n            moduleOb.checkChars = checkChars;\r\n            moduleOb.checkPathProperties = checkPathProperties;\r\n            moduleOb.checkShapes = checkShapes;\r\n            moduleOb.completeLayers = completeLayers;\r\n            return moduleOb;\r\n          }\r\n\r\n          if (!_workerSelf.dataManager) {\r\n            _workerSelf.dataManager = dataFunctionManager();\r\n          }\r\n\r\n          if (!_workerSelf.assetLoader) {\r\n            _workerSelf.assetLoader = function () {\r\n              function formatResponse(xhr) {\r\n                // using typeof doubles the time of execution of this method,\r\n                // so if available, it's better to use the header to validate the type\r\n                var contentTypeHeader = xhr.getResponseHeader('content-type');\r\n\r\n                if (contentTypeHeader && xhr.responseType === 'json' && contentTypeHeader.indexOf('json') !== -1) {\r\n                  return xhr.response;\r\n                }\r\n\r\n                if (xhr.response && _typeof$5(xhr.response) === 'object') {\r\n                  return xhr.response;\r\n                }\r\n\r\n                if (xhr.response && typeof xhr.response === 'string') {\r\n                  return JSON.parse(xhr.response);\r\n                }\r\n\r\n                if (xhr.responseText) {\r\n                  return JSON.parse(xhr.responseText);\r\n                }\r\n\r\n                return null;\r\n              }\r\n\r\n              function loadAsset(path, fullPath, callback, errorCallback) {\r\n                var response;\r\n                var xhr = new XMLHttpRequest(); // set responseType after calling open or IE will break.\r\n\r\n                try {\r\n                  // This crashes on Android WebView prior to KitKat\r\n                  xhr.responseType = 'json';\r\n                } catch (err) {} // eslint-disable-line no-empty\r\n\r\n\r\n                xhr.onreadystatechange = function () {\r\n                  if (xhr.readyState === 4) {\r\n                    if (xhr.status === 200) {\r\n                      response = formatResponse(xhr);\r\n                      callback(response);\r\n                    } else {\r\n                      try {\r\n                        response = formatResponse(xhr);\r\n                        callback(response);\r\n                      } catch (err) {\r\n                        if (errorCallback) {\r\n                          errorCallback(err);\r\n                        }\r\n                      }\r\n                    }\r\n                  }\r\n                };\r\n\r\n                try {\r\n                  // Hack to workaround banner validation\r\n                  xhr.open(['G', 'E', 'T'].join(''), path, true);\r\n                } catch (error) {\r\n                  // Hack to workaround banner validation\r\n                  xhr.open(['G', 'E', 'T'].join(''), fullPath + '/' + path, true);\r\n                }\r\n\r\n                xhr.send();\r\n              }\r\n\r\n              return {\r\n                load: loadAsset\r\n              };\r\n            }();\r\n          }\r\n\r\n          if (e.data.type === 'loadAnimation') {\r\n            _workerSelf.assetLoader.load(e.data.path, e.data.fullPath, function (data) {\r\n              _workerSelf.dataManager.completeData(data);\r\n\r\n              _workerSelf.postMessage({\r\n                id: e.data.id,\r\n                payload: data,\r\n                status: 'success'\r\n              });\r\n            }, function () {\r\n              _workerSelf.postMessage({\r\n                id: e.data.id,\r\n                status: 'error'\r\n              });\r\n            });\r\n          } else if (e.data.type === 'complete') {\r\n            var animation = e.data.animation;\r\n\r\n            _workerSelf.dataManager.completeData(animation);\r\n\r\n            _workerSelf.postMessage({\r\n              id: e.data.id,\r\n              payload: animation,\r\n              status: 'success'\r\n            });\r\n          } else if (e.data.type === 'loadData') {\r\n            _workerSelf.assetLoader.load(e.data.path, e.data.fullPath, function (data) {\r\n              _workerSelf.postMessage({\r\n                id: e.data.id,\r\n                payload: data,\r\n                status: 'success'\r\n              });\r\n            }, function () {\r\n              _workerSelf.postMessage({\r\n                id: e.data.id,\r\n                status: 'error'\r\n              });\r\n            });\r\n          }\r\n        });\r\n\r\n        workerInstance.onmessage = function (event) {\r\n          var data = event.data;\r\n          var id = data.id;\r\n          var process = processes[id];\r\n          processes[id] = null;\r\n\r\n          if (data.status === 'success') {\r\n            process.onComplete(data.payload);\r\n          } else if (process.onError) {\r\n            process.onError();\r\n          }\r\n        };\r\n      }\r\n    }\r\n\r\n    function createProcess(onComplete, onError) {\r\n      _counterId += 1;\r\n      var id = 'processId_' + _counterId;\r\n      processes[id] = {\r\n        onComplete: onComplete,\r\n        onError: onError\r\n      };\r\n      return id;\r\n    }\r\n\r\n    function loadAnimation(path, onComplete, onError) {\r\n      setupWorker();\r\n      var processId = createProcess(onComplete, onError);\r\n      workerInstance.postMessage({\r\n        type: 'loadAnimation',\r\n        path: path,\r\n        fullPath: window.location.origin + window.location.pathname,\r\n        id: processId\r\n      });\r\n    }\r\n\r\n    function loadData(path, onComplete, onError) {\r\n      setupWorker();\r\n      var processId = createProcess(onComplete, onError);\r\n      workerInstance.postMessage({\r\n        type: 'loadData',\r\n        path: path,\r\n        fullPath: window.location.origin + window.location.pathname,\r\n        id: processId\r\n      });\r\n    }\r\n\r\n    function completeAnimation(anim, onComplete, onError) {\r\n      setupWorker();\r\n      var processId = createProcess(onComplete, onError);\r\n      workerInstance.postMessage({\r\n        type: 'complete',\r\n        animation: anim,\r\n        id: processId\r\n      });\r\n    }\r\n\r\n    return {\r\n      loadAnimation: loadAnimation,\r\n      loadData: loadData,\r\n      completeAnimation: completeAnimation\r\n    };\r\n  }();\r\n\r\n  var ImagePreloader = function () {\r\n    var proxyImage = function () {\r\n      var canvas = createTag('canvas');\r\n      canvas.width = 1;\r\n      canvas.height = 1;\r\n      var ctx = canvas.getContext('2d');\r\n      ctx.fillStyle = 'rgba(0,0,0,0)';\r\n      ctx.fillRect(0, 0, 1, 1);\r\n      return canvas;\r\n    }();\r\n\r\n    function imageLoaded() {\r\n      this.loadedAssets += 1;\r\n\r\n      if (this.loadedAssets === this.totalImages && this.loadedFootagesCount === this.totalFootages) {\r\n        if (this.imagesLoadedCb) {\r\n          this.imagesLoadedCb(null);\r\n        }\r\n      }\r\n    }\r\n\r\n    function footageLoaded() {\r\n      this.loadedFootagesCount += 1;\r\n\r\n      if (this.loadedAssets === this.totalImages && this.loadedFootagesCount === this.totalFootages) {\r\n        if (this.imagesLoadedCb) {\r\n          this.imagesLoadedCb(null);\r\n        }\r\n      }\r\n    }\r\n\r\n    function getAssetsPath(assetData, assetsPath, originalPath) {\r\n      var path = '';\r\n\r\n      if (assetData.e) {\r\n        path = assetData.p;\r\n      } else if (assetsPath) {\r\n        var imagePath = assetData.p;\r\n\r\n        if (imagePath.indexOf('images/') !== -1) {\r\n          imagePath = imagePath.split('/')[1];\r\n        }\r\n\r\n        path = assetsPath + imagePath;\r\n      } else {\r\n        path = originalPath;\r\n        path += assetData.u ? assetData.u : '';\r\n        path += assetData.p;\r\n      }\r\n\r\n      return path;\r\n    }\r\n\r\n    function testImageLoaded(img) {\r\n      var _count = 0;\r\n      var intervalId = setInterval(function () {\r\n        var box = img.getBBox();\r\n\r\n        if (box.width || _count > 500) {\r\n          this._imageLoaded();\r\n\r\n          clearInterval(intervalId);\r\n        }\r\n\r\n        _count += 1;\r\n      }.bind(this), 50);\r\n    }\r\n\r\n    function createImageData(assetData) {\r\n      var path = getAssetsPath(assetData, this.assetsPath, this.path);\r\n      var img = createNS('image');\r\n\r\n      if (isSafari) {\r\n        this.testImageLoaded(img);\r\n      } else {\r\n        img.addEventListener('load', this._imageLoaded, false);\r\n      }\r\n\r\n      img.addEventListener('error', function () {\r\n        ob.img = proxyImage;\r\n\r\n        this._imageLoaded();\r\n      }.bind(this), false);\r\n      img.setAttributeNS('http://www.w3.org/1999/xlink', 'href', path);\r\n\r\n      if (this._elementHelper.append) {\r\n        this._elementHelper.append(img);\r\n      } else {\r\n        this._elementHelper.appendChild(img);\r\n      }\r\n\r\n      var ob = {\r\n        img: img,\r\n        assetData: assetData\r\n      };\r\n      return ob;\r\n    }\r\n\r\n    function createImgData(assetData) {\r\n      var path = getAssetsPath(assetData, this.assetsPath, this.path);\r\n      var img = createTag('img');\r\n      img.crossOrigin = 'anonymous';\r\n      img.addEventListener('load', this._imageLoaded, false);\r\n      img.addEventListener('error', function () {\r\n        ob.img = proxyImage;\r\n\r\n        this._imageLoaded();\r\n      }.bind(this), false);\r\n      img.src = path;\r\n      var ob = {\r\n        img: img,\r\n        assetData: assetData\r\n      };\r\n      return ob;\r\n    }\r\n\r\n    function createFootageData(data) {\r\n      var ob = {\r\n        assetData: data\r\n      };\r\n      var path = getAssetsPath(data, this.assetsPath, this.path);\r\n      dataManager.loadData(path, function (footageData) {\r\n        ob.img = footageData;\r\n\r\n        this._footageLoaded();\r\n      }.bind(this), function () {\r\n        ob.img = {};\r\n\r\n        this._footageLoaded();\r\n      }.bind(this));\r\n      return ob;\r\n    }\r\n\r\n    function loadAssets(assets, cb) {\r\n      this.imagesLoadedCb = cb;\r\n      var i;\r\n      var len = assets.length;\r\n\r\n      for (i = 0; i < len; i += 1) {\r\n        if (!assets[i].layers) {\r\n          if (!assets[i].t || assets[i].t === 'seq') {\r\n            this.totalImages += 1;\r\n            this.images.push(this._createImageData(assets[i]));\r\n          } else if (assets[i].t === 3) {\r\n            this.totalFootages += 1;\r\n            this.images.push(this.createFootageData(assets[i]));\r\n          }\r\n        }\r\n      }\r\n    }\r\n\r\n    function setPath(path) {\r\n      this.path = path || '';\r\n    }\r\n\r\n    function setAssetsPath(path) {\r\n      this.assetsPath = path || '';\r\n    }\r\n\r\n    function getAsset(assetData) {\r\n      var i = 0;\r\n      var len = this.images.length;\r\n\r\n      while (i < len) {\r\n        if (this.images[i].assetData === assetData) {\r\n          return this.images[i].img;\r\n        }\r\n\r\n        i += 1;\r\n      }\r\n\r\n      return null;\r\n    }\r\n\r\n    function destroy() {\r\n      this.imagesLoadedCb = null;\r\n      this.images.length = 0;\r\n    }\r\n\r\n    function loadedImages() {\r\n      return this.totalImages === this.loadedAssets;\r\n    }\r\n\r\n    function loadedFootages() {\r\n      return this.totalFootages === this.loadedFootagesCount;\r\n    }\r\n\r\n    function setCacheType(type, elementHelper) {\r\n      if (type === 'svg') {\r\n        this._elementHelper = elementHelper;\r\n        this._createImageData = this.createImageData.bind(this);\r\n      } else {\r\n        this._createImageData = this.createImgData.bind(this);\r\n      }\r\n    }\r\n\r\n    function ImagePreloaderFactory() {\r\n      this._imageLoaded = imageLoaded.bind(this);\r\n      this._footageLoaded = footageLoaded.bind(this);\r\n      this.testImageLoaded = testImageLoaded.bind(this);\r\n      this.createFootageData = createFootageData.bind(this);\r\n      this.assetsPath = '';\r\n      this.path = '';\r\n      this.totalImages = 0;\r\n      this.totalFootages = 0;\r\n      this.loadedAssets = 0;\r\n      this.loadedFootagesCount = 0;\r\n      this.imagesLoadedCb = null;\r\n      this.images = [];\r\n    }\r\n\r\n    ImagePreloaderFactory.prototype = {\r\n      loadAssets: loadAssets,\r\n      setAssetsPath: setAssetsPath,\r\n      setPath: setPath,\r\n      loadedImages: loadedImages,\r\n      loadedFootages: loadedFootages,\r\n      destroy: destroy,\r\n      getAsset: getAsset,\r\n      createImgData: createImgData,\r\n      createImageData: createImageData,\r\n      imageLoaded: imageLoaded,\r\n      footageLoaded: footageLoaded,\r\n      setCacheType: setCacheType\r\n    };\r\n    return ImagePreloaderFactory;\r\n  }();\r\n\r\n  function BaseEvent() {}\r\n\r\n  BaseEvent.prototype = {\r\n    triggerEvent: function triggerEvent(eventName, args) {\r\n      if (this._cbs[eventName]) {\r\n        var callbacks = this._cbs[eventName];\r\n\r\n        for (var i = 0; i < callbacks.length; i += 1) {\r\n          callbacks[i](args);\r\n        }\r\n      }\r\n    },\r\n    addEventListener: function addEventListener(eventName, callback) {\r\n      if (!this._cbs[eventName]) {\r\n        this._cbs[eventName] = [];\r\n      }\r\n\r\n      this._cbs[eventName].push(callback);\r\n\r\n      return function () {\r\n        this.removeEventListener(eventName, callback);\r\n      }.bind(this);\r\n    },\r\n    removeEventListener: function removeEventListener(eventName, callback) {\r\n      if (!callback) {\r\n        this._cbs[eventName] = null;\r\n      } else if (this._cbs[eventName]) {\r\n        var i = 0;\r\n        var len = this._cbs[eventName].length;\r\n\r\n        while (i < len) {\r\n          if (this._cbs[eventName][i] === callback) {\r\n            this._cbs[eventName].splice(i, 1);\r\n\r\n            i -= 1;\r\n            len -= 1;\r\n          }\r\n\r\n          i += 1;\r\n        }\r\n\r\n        if (!this._cbs[eventName].length) {\r\n          this._cbs[eventName] = null;\r\n        }\r\n      }\r\n    }\r\n  };\r\n\r\n  var markerParser = function () {\r\n    function parsePayloadLines(payload) {\r\n      var lines = payload.split('\\r\\n');\r\n      var keys = {};\r\n      var line;\r\n      var keysCount = 0;\r\n\r\n      for (var i = 0; i < lines.length; i += 1) {\r\n        line = lines[i].split(':');\r\n\r\n        if (line.length === 2) {\r\n          keys[line[0]] = line[1].trim();\r\n          keysCount += 1;\r\n        }\r\n      }\r\n\r\n      if (keysCount === 0) {\r\n        throw new Error();\r\n      }\r\n\r\n      return keys;\r\n    }\r\n\r\n    return function (_markers) {\r\n      var markers = [];\r\n\r\n      for (var i = 0; i < _markers.length; i += 1) {\r\n        var _marker = _markers[i];\r\n        var markerData = {\r\n          time: _marker.tm,\r\n          duration: _marker.dr\r\n        };\r\n\r\n        try {\r\n          markerData.payload = JSON.parse(_markers[i].cm);\r\n        } catch (_) {\r\n          try {\r\n            markerData.payload = parsePayloadLines(_markers[i].cm);\r\n          } catch (__) {\r\n            markerData.payload = {\r\n              name: _markers[i].cm\r\n            };\r\n          }\r\n        }\r\n\r\n        markers.push(markerData);\r\n      }\r\n\r\n      return markers;\r\n    };\r\n  }();\r\n\r\n  var ProjectInterface = function () {\r\n    function registerComposition(comp) {\r\n      this.compositions.push(comp);\r\n    }\r\n\r\n    return function () {\r\n      function _thisProjectFunction(name) {\r\n        var i = 0;\r\n        var len = this.compositions.length;\r\n\r\n        while (i < len) {\r\n          if (this.compositions[i].data && this.compositions[i].data.nm === name) {\r\n            if (this.compositions[i].prepareFrame && this.compositions[i].data.xt) {\r\n              this.compositions[i].prepareFrame(this.currentFrame);\r\n            }\r\n\r\n            return this.compositions[i].compInterface;\r\n          }\r\n\r\n          i += 1;\r\n        }\r\n\r\n        return null;\r\n      }\r\n\r\n      _thisProjectFunction.compositions = [];\r\n      _thisProjectFunction.currentFrame = 0;\r\n      _thisProjectFunction.registerComposition = registerComposition;\r\n      return _thisProjectFunction;\r\n    };\r\n  }();\r\n\r\n  var renderers = {};\r\n\r\n  var registerRenderer = function registerRenderer(key, value) {\r\n    renderers[key] = value;\r\n  };\r\n\r\n  function getRenderer(key) {\r\n    return renderers[key];\r\n  }\r\n\r\n  function _typeof$4(obj) { \"@babel/helpers - typeof\"; if (typeof Symbol === \"function\" && typeof Symbol.iterator === \"symbol\") { _typeof$4 = function _typeof(obj) { return typeof obj; }; } else { _typeof$4 = function _typeof(obj) { return obj && typeof Symbol === \"function\" && obj.constructor === Symbol && obj !== Symbol.prototype ? \"symbol\" : typeof obj; }; } return _typeof$4(obj); }\r\n\r\n  var AnimationItem = function AnimationItem() {\r\n    this._cbs = [];\r\n    this.name = '';\r\n    this.path = '';\r\n    this.isLoaded = false;\r\n    this.currentFrame = 0;\r\n    this.currentRawFrame = 0;\r\n    this.firstFrame = 0;\r\n    this.totalFrames = 0;\r\n    this.frameRate = 0;\r\n    this.frameMult = 0;\r\n    this.playSpeed = 1;\r\n    this.playDirection = 1;\r\n    this.playCount = 0;\r\n    this.animationData = {};\r\n    this.assets = [];\r\n    this.isPaused = true;\r\n    this.autoplay = false;\r\n    this.loop = true;\r\n    this.renderer = null;\r\n    this.animationID = createElementID();\r\n    this.assetsPath = '';\r\n    this.timeCompleted = 0;\r\n    this.segmentPos = 0;\r\n    this.isSubframeEnabled = getSubframeEnabled();\r\n    this.segments = [];\r\n    this._idle = true;\r\n    this._completedLoop = false;\r\n    this.projectInterface = ProjectInterface();\r\n    this.imagePreloader = new ImagePreloader();\r\n    this.audioController = audioControllerFactory();\r\n    this.markers = [];\r\n    this.configAnimation = this.configAnimation.bind(this);\r\n    this.onSetupError = this.onSetupError.bind(this);\r\n    this.onSegmentComplete = this.onSegmentComplete.bind(this);\r\n    this.drawnFrameEvent = new BMEnterFrameEvent('drawnFrame', 0, 0, 0);\r\n  };\r\n\r\n  extendPrototype([BaseEvent], AnimationItem);\r\n\r\n  AnimationItem.prototype.setParams = function (params) {\r\n    if (params.wrapper || params.container) {\r\n      this.wrapper = params.wrapper || params.container;\r\n    }\r\n\r\n    var animType = 'svg';\r\n\r\n    if (params.animType) {\r\n      animType = params.animType;\r\n    } else if (params.renderer) {\r\n      animType = params.renderer;\r\n    }\r\n\r\n    var RendererClass = getRenderer(animType);\r\n    this.renderer = new RendererClass(this, params.rendererSettings);\r\n    this.imagePreloader.setCacheType(animType, this.renderer.globalData.defs);\r\n    this.renderer.setProjectInterface(this.projectInterface);\r\n    this.animType = animType;\r\n\r\n    if (params.loop === '' || params.loop === null || params.loop === undefined || params.loop === true) {\r\n      this.loop = true;\r\n    } else if (params.loop === false) {\r\n      this.loop = false;\r\n    } else {\r\n      this.loop = parseInt(params.loop, 10);\r\n    }\r\n\r\n    this.autoplay = 'autoplay' in params ? params.autoplay : true;\r\n    this.name = params.name ? params.name : '';\r\n    this.autoloadSegments = Object.prototype.hasOwnProperty.call(params, 'autoloadSegments') ? params.autoloadSegments : true;\r\n    this.assetsPath = params.assetsPath;\r\n    this.initialSegment = params.initialSegment;\r\n\r\n    if (params.audioFactory) {\r\n      this.audioController.setAudioFactory(params.audioFactory);\r\n    }\r\n\r\n    if (params.animationData) {\r\n      this.setupAnimation(params.animationData);\r\n    } else if (params.path) {\r\n      if (params.path.lastIndexOf('\\\\') !== -1) {\r\n        this.path = params.path.substr(0, params.path.lastIndexOf('\\\\') + 1);\r\n      } else {\r\n        this.path = params.path.substr(0, params.path.lastIndexOf('/') + 1);\r\n      }\r\n\r\n      this.fileName = params.path.substr(params.path.lastIndexOf('/') + 1);\r\n      this.fileName = this.fileName.substr(0, this.fileName.lastIndexOf('.json'));\r\n      dataManager.loadAnimation(params.path, this.configAnimation, this.onSetupError);\r\n    }\r\n  };\r\n\r\n  AnimationItem.prototype.onSetupError = function () {\r\n    this.trigger('data_failed');\r\n  };\r\n\r\n  AnimationItem.prototype.setupAnimation = function (data) {\r\n    dataManager.completeAnimation(data, this.configAnimation);\r\n  };\r\n\r\n  AnimationItem.prototype.setData = function (wrapper, animationData) {\r\n    if (animationData) {\r\n      if (_typeof$4(animationData) !== 'object') {\r\n        animationData = JSON.parse(animationData);\r\n      }\r\n    }\r\n\r\n    var params = {\r\n      wrapper: wrapper,\r\n      animationData: animationData\r\n    };\r\n    var wrapperAttributes = wrapper.attributes;\r\n    params.path = wrapperAttributes.getNamedItem('data-animation-path') // eslint-disable-line no-nested-ternary\r\n    ? wrapperAttributes.getNamedItem('data-animation-path').value : wrapperAttributes.getNamedItem('data-bm-path') // eslint-disable-line no-nested-ternary\r\n    ? wrapperAttributes.getNamedItem('data-bm-path').value : wrapperAttributes.getNamedItem('bm-path') ? wrapperAttributes.getNamedItem('bm-path').value : '';\r\n    params.animType = wrapperAttributes.getNamedItem('data-anim-type') // eslint-disable-line no-nested-ternary\r\n    ? wrapperAttributes.getNamedItem('data-anim-type').value : wrapperAttributes.getNamedItem('data-bm-type') // eslint-disable-line no-nested-ternary\r\n    ? wrapperAttributes.getNamedItem('data-bm-type').value : wrapperAttributes.getNamedItem('bm-type') // eslint-disable-line no-nested-ternary\r\n    ? wrapperAttributes.getNamedItem('bm-type').value : wrapperAttributes.getNamedItem('data-bm-renderer') // eslint-disable-line no-nested-ternary\r\n    ? wrapperAttributes.getNamedItem('data-bm-renderer').value : wrapperAttributes.getNamedItem('bm-renderer') ? wrapperAttributes.getNamedItem('bm-renderer').value : 'canvas';\r\n    var loop = wrapperAttributes.getNamedItem('data-anim-loop') // eslint-disable-line no-nested-ternary\r\n    ? wrapperAttributes.getNamedItem('data-anim-loop').value : wrapperAttributes.getNamedItem('data-bm-loop') // eslint-disable-line no-nested-ternary\r\n    ? wrapperAttributes.getNamedItem('data-bm-loop').value : wrapperAttributes.getNamedItem('bm-loop') ? wrapperAttributes.getNamedItem('bm-loop').value : '';\r\n\r\n    if (loop === 'false') {\r\n      params.loop = false;\r\n    } else if (loop === 'true') {\r\n      params.loop = true;\r\n    } else if (loop !== '') {\r\n      params.loop = parseInt(loop, 10);\r\n    }\r\n\r\n    var autoplay = wrapperAttributes.getNamedItem('data-anim-autoplay') // eslint-disable-line no-nested-ternary\r\n    ? wrapperAttributes.getNamedItem('data-anim-autoplay').value : wrapperAttributes.getNamedItem('data-bm-autoplay') // eslint-disable-line no-nested-ternary\r\n    ? wrapperAttributes.getNamedItem('data-bm-autoplay').value : wrapperAttributes.getNamedItem('bm-autoplay') ? wrapperAttributes.getNamedItem('bm-autoplay').value : true;\r\n    params.autoplay = autoplay !== 'false';\r\n    params.name = wrapperAttributes.getNamedItem('data-name') // eslint-disable-line no-nested-ternary\r\n    ? wrapperAttributes.getNamedItem('data-name').value : wrapperAttributes.getNamedItem('data-bm-name') // eslint-disable-line no-nested-ternary\r\n    ? wrapperAttributes.getNamedItem('data-bm-name').value : wrapperAttributes.getNamedItem('bm-name') ? wrapperAttributes.getNamedItem('bm-name').value : '';\r\n    var prerender = wrapperAttributes.getNamedItem('data-anim-prerender') // eslint-disable-line no-nested-ternary\r\n    ? wrapperAttributes.getNamedItem('data-anim-prerender').value : wrapperAttributes.getNamedItem('data-bm-prerender') // eslint-disable-line no-nested-ternary\r\n    ? wrapperAttributes.getNamedItem('data-bm-prerender').value : wrapperAttributes.getNamedItem('bm-prerender') ? wrapperAttributes.getNamedItem('bm-prerender').value : '';\r\n\r\n    if (prerender === 'false') {\r\n      params.prerender = false;\r\n    }\r\n\r\n    this.setParams(params);\r\n  };\r\n\r\n  AnimationItem.prototype.includeLayers = function (data) {\r\n    if (data.op > this.animationData.op) {\r\n      this.animationData.op = data.op;\r\n      this.totalFrames = Math.floor(data.op - this.animationData.ip);\r\n    }\r\n\r\n    var layers = this.animationData.layers;\r\n    var i;\r\n    var len = layers.length;\r\n    var newLayers = data.layers;\r\n    var j;\r\n    var jLen = newLayers.length;\r\n\r\n    for (j = 0; j < jLen; j += 1) {\r\n      i = 0;\r\n\r\n      while (i < len) {\r\n        if (layers[i].id === newLayers[j].id) {\r\n          layers[i] = newLayers[j];\r\n          break;\r\n        }\r\n\r\n        i += 1;\r\n      }\r\n    }\r\n\r\n    if (data.chars || data.fonts) {\r\n      this.renderer.globalData.fontManager.addChars(data.chars);\r\n      this.renderer.globalData.fontManager.addFonts(data.fonts, this.renderer.globalData.defs);\r\n    }\r\n\r\n    if (data.assets) {\r\n      len = data.assets.length;\r\n\r\n      for (i = 0; i < len; i += 1) {\r\n        this.animationData.assets.push(data.assets[i]);\r\n      }\r\n    }\r\n\r\n    this.animationData.__complete = false;\r\n    dataManager.completeAnimation(this.animationData, this.onSegmentComplete);\r\n  };\r\n\r\n  AnimationItem.prototype.onSegmentComplete = function (data) {\r\n    this.animationData = data;\r\n    var expressionsPlugin = getExpressionsPlugin();\r\n\r\n    if (expressionsPlugin) {\r\n      expressionsPlugin.initExpressions(this);\r\n    }\r\n\r\n    this.loadNextSegment();\r\n  };\r\n\r\n  AnimationItem.prototype.loadNextSegment = function () {\r\n    var segments = this.animationData.segments;\r\n\r\n    if (!segments || segments.length === 0 || !this.autoloadSegments) {\r\n      this.trigger('data_ready');\r\n      this.timeCompleted = this.totalFrames;\r\n      return;\r\n    }\r\n\r\n    var segment = segments.shift();\r\n    this.timeCompleted = segment.time * this.frameRate;\r\n    var segmentPath = this.path + this.fileName + '_' + this.segmentPos + '.json';\r\n    this.segmentPos += 1;\r\n    dataManager.loadData(segmentPath, this.includeLayers.bind(this), function () {\r\n      this.trigger('data_failed');\r\n    }.bind(this));\r\n  };\r\n\r\n  AnimationItem.prototype.loadSegments = function () {\r\n    var segments = this.animationData.segments;\r\n\r\n    if (!segments) {\r\n      this.timeCompleted = this.totalFrames;\r\n    }\r\n\r\n    this.loadNextSegment();\r\n  };\r\n\r\n  AnimationItem.prototype.imagesLoaded = function () {\r\n    this.trigger('loaded_images');\r\n    this.checkLoaded();\r\n  };\r\n\r\n  AnimationItem.prototype.preloadImages = function () {\r\n    this.imagePreloader.setAssetsPath(this.assetsPath);\r\n    this.imagePreloader.setPath(this.path);\r\n    this.imagePreloader.loadAssets(this.animationData.assets, this.imagesLoaded.bind(this));\r\n  };\r\n\r\n  AnimationItem.prototype.configAnimation = function (animData) {\r\n    if (!this.renderer) {\r\n      return;\r\n    }\r\n\r\n    try {\r\n      this.animationData = animData;\r\n\r\n      if (this.initialSegment) {\r\n        this.totalFrames = Math.floor(this.initialSegment[1] - this.initialSegment[0]);\r\n        this.firstFrame = Math.round(this.initialSegment[0]);\r\n      } else {\r\n        this.totalFrames = Math.floor(this.animationData.op - this.animationData.ip);\r\n        this.firstFrame = Math.round(this.animationData.ip);\r\n      }\r\n\r\n      this.renderer.configAnimation(animData);\r\n\r\n      if (!animData.assets) {\r\n        animData.assets = [];\r\n      }\r\n\r\n      this.assets = this.animationData.assets;\r\n      this.frameRate = this.animationData.fr;\r\n      this.frameMult = this.animationData.fr / 1000;\r\n      this.renderer.searchExtraCompositions(animData.assets);\r\n      this.markers = markerParser(animData.markers || []);\r\n      this.trigger('config_ready');\r\n      this.preloadImages();\r\n      this.loadSegments();\r\n      this.updaFrameModifier();\r\n      this.waitForFontsLoaded();\r\n\r\n      if (this.isPaused) {\r\n        this.audioController.pause();\r\n      }\r\n    } catch (error) {\r\n      this.triggerConfigError(error);\r\n    }\r\n  };\r\n\r\n  AnimationItem.prototype.waitForFontsLoaded = function () {\r\n    if (!this.renderer) {\r\n      return;\r\n    }\r\n\r\n    if (this.renderer.globalData.fontManager.isLoaded) {\r\n      this.checkLoaded();\r\n    } else {\r\n      setTimeout(this.waitForFontsLoaded.bind(this), 20);\r\n    }\r\n  };\r\n\r\n  AnimationItem.prototype.checkLoaded = function () {\r\n    if (!this.isLoaded && this.renderer.globalData.fontManager.isLoaded && (this.imagePreloader.loadedImages() || this.renderer.rendererType !== 'canvas') && this.imagePreloader.loadedFootages()) {\r\n      this.isLoaded = true;\r\n      var expressionsPlugin = getExpressionsPlugin();\r\n\r\n      if (expressionsPlugin) {\r\n        expressionsPlugin.initExpressions(this);\r\n      }\r\n\r\n      this.renderer.initItems();\r\n      setTimeout(function () {\r\n        this.trigger('DOMLoaded');\r\n      }.bind(this), 0);\r\n      this.gotoFrame();\r\n\r\n      if (this.autoplay) {\r\n        this.play();\r\n      }\r\n    }\r\n  };\r\n\r\n  AnimationItem.prototype.resize = function (width, height) {\r\n    // Adding this validation for backwards compatibility in case an event object was being passed down\r\n    var _width = typeof width === 'number' ? width : undefined;\r\n\r\n    var _height = typeof height === 'number' ? height : undefined;\r\n\r\n    this.renderer.updateContainerSize(_width, _height);\r\n  };\r\n\r\n  AnimationItem.prototype.setSubframe = function (flag) {\r\n    this.isSubframeEnabled = !!flag;\r\n  };\r\n\r\n  AnimationItem.prototype.gotoFrame = function () {\r\n    this.currentFrame = this.isSubframeEnabled ? this.currentRawFrame : ~~this.currentRawFrame; // eslint-disable-line no-bitwise\r\n\r\n    if (this.timeCompleted !== this.totalFrames && this.currentFrame > this.timeCompleted) {\r\n      this.currentFrame = this.timeCompleted;\r\n    }\r\n\r\n    this.trigger('enterFrame');\r\n    this.renderFrame();\r\n    this.trigger('drawnFrame');\r\n  };\r\n\r\n  AnimationItem.prototype.renderFrame = function () {\r\n    if (this.isLoaded === false || !this.renderer) {\r\n      return;\r\n    }\r\n\r\n    try {\r\n      this.renderer.renderFrame(this.currentFrame + this.firstFrame);\r\n    } catch (error) {\r\n      this.triggerRenderFrameError(error);\r\n    }\r\n  };\r\n\r\n  AnimationItem.prototype.play = function (name) {\r\n    if (name && this.name !== name) {\r\n      return;\r\n    }\r\n\r\n    if (this.isPaused === true) {\r\n      this.isPaused = false;\r\n      this.trigger('_pause');\r\n      this.audioController.resume();\r\n\r\n      if (this._idle) {\r\n        this._idle = false;\r\n        this.trigger('_active');\r\n      }\r\n    }\r\n  };\r\n\r\n  AnimationItem.prototype.pause = function (name) {\r\n    if (name && this.name !== name) {\r\n      return;\r\n    }\r\n\r\n    if (this.isPaused === false) {\r\n      this.isPaused = true;\r\n      this.trigger('_play');\r\n      this._idle = true;\r\n      this.trigger('_idle');\r\n      this.audioController.pause();\r\n    }\r\n  };\r\n\r\n  AnimationItem.prototype.togglePause = function (name) {\r\n    if (name && this.name !== name) {\r\n      return;\r\n    }\r\n\r\n    if (this.isPaused === true) {\r\n      this.play();\r\n    } else {\r\n      this.pause();\r\n    }\r\n  };\r\n\r\n  AnimationItem.prototype.stop = function (name) {\r\n    if (name && this.name !== name) {\r\n      return;\r\n    }\r\n\r\n    this.pause();\r\n    this.playCount = 0;\r\n    this._completedLoop = false;\r\n    this.setCurrentRawFrameValue(0);\r\n  };\r\n\r\n  AnimationItem.prototype.getMarkerData = function (markerName) {\r\n    var marker;\r\n\r\n    for (var i = 0; i < this.markers.length; i += 1) {\r\n      marker = this.markers[i];\r\n\r\n      if (marker.payload && marker.payload.name === markerName) {\r\n        return marker;\r\n      }\r\n    }\r\n\r\n    return null;\r\n  };\r\n\r\n  AnimationItem.prototype.goToAndStop = function (value, isFrame, name) {\r\n    if (name && this.name !== name) {\r\n      return;\r\n    }\r\n\r\n    var numValue = Number(value);\r\n\r\n    if (isNaN(numValue)) {\r\n      var marker = this.getMarkerData(value);\r\n\r\n      if (marker) {\r\n        this.goToAndStop(marker.time, true);\r\n      }\r\n    } else if (isFrame) {\r\n      this.setCurrentRawFrameValue(value);\r\n    } else {\r\n      this.setCurrentRawFrameValue(value * this.frameModifier);\r\n    }\r\n\r\n    this.pause();\r\n  };\r\n\r\n  AnimationItem.prototype.goToAndPlay = function (value, isFrame, name) {\r\n    if (name && this.name !== name) {\r\n      return;\r\n    }\r\n\r\n    var numValue = Number(value);\r\n\r\n    if (isNaN(numValue)) {\r\n      var marker = this.getMarkerData(value);\r\n\r\n      if (marker) {\r\n        if (!marker.duration) {\r\n          this.goToAndStop(marker.time, true);\r\n        } else {\r\n          this.playSegments([marker.time, marker.time + marker.duration], true);\r\n        }\r\n      }\r\n    } else {\r\n      this.goToAndStop(numValue, isFrame, name);\r\n    }\r\n\r\n    this.play();\r\n  };\r\n\r\n  AnimationItem.prototype.advanceTime = function (value) {\r\n    if (this.isPaused === true || this.isLoaded === false) {\r\n      return;\r\n    }\r\n\r\n    var nextValue = this.currentRawFrame + value * this.frameModifier;\r\n    var _isComplete = false; // Checking if nextValue > totalFrames - 1 for addressing non looping and looping animations.\r\n    // If animation won't loop, it should stop at totalFrames - 1. If it will loop it should complete the last frame and then loop.\r\n\r\n    if (nextValue >= this.totalFrames - 1 && this.frameModifier > 0) {\r\n      if (!this.loop || this.playCount === this.loop) {\r\n        if (!this.checkSegments(nextValue > this.totalFrames ? nextValue % this.totalFrames : 0)) {\r\n          _isComplete = true;\r\n          nextValue = this.totalFrames - 1;\r\n        }\r\n      } else if (nextValue >= this.totalFrames) {\r\n        this.playCount += 1;\r\n\r\n        if (!this.checkSegments(nextValue % this.totalFrames)) {\r\n          this.setCurrentRawFrameValue(nextValue % this.totalFrames);\r\n          this._completedLoop = true;\r\n          this.trigger('loopComplete');\r\n        }\r\n      } else {\r\n        this.setCurrentRawFrameValue(nextValue);\r\n      }\r\n    } else if (nextValue < 0) {\r\n      if (!this.checkSegments(nextValue % this.totalFrames)) {\r\n        if (this.loop && !(this.playCount-- <= 0 && this.loop !== true)) {\r\n          // eslint-disable-line no-plusplus\r\n          this.setCurrentRawFrameValue(this.totalFrames + nextValue % this.totalFrames);\r\n\r\n          if (!this._completedLoop) {\r\n            this._completedLoop = true;\r\n          } else {\r\n            this.trigger('loopComplete');\r\n          }\r\n        } else {\r\n          _isComplete = true;\r\n          nextValue = 0;\r\n        }\r\n      }\r\n    } else {\r\n      this.setCurrentRawFrameValue(nextValue);\r\n    }\r\n\r\n    if (_isComplete) {\r\n      this.setCurrentRawFrameValue(nextValue);\r\n      this.pause();\r\n      this.trigger('complete');\r\n    }\r\n  };\r\n\r\n  AnimationItem.prototype.adjustSegment = function (arr, offset) {\r\n    this.playCount = 0;\r\n\r\n    if (arr[1] < arr[0]) {\r\n      if (this.frameModifier > 0) {\r\n        if (this.playSpeed < 0) {\r\n          this.setSpeed(-this.playSpeed);\r\n        } else {\r\n          this.setDirection(-1);\r\n        }\r\n      }\r\n\r\n      this.totalFrames = arr[0] - arr[1];\r\n      this.timeCompleted = this.totalFrames;\r\n      this.firstFrame = arr[1];\r\n      this.setCurrentRawFrameValue(this.totalFrames - 0.001 - offset);\r\n    } else if (arr[1] > arr[0]) {\r\n      if (this.frameModifier < 0) {\r\n        if (this.playSpeed < 0) {\r\n          this.setSpeed(-this.playSpeed);\r\n        } else {\r\n          this.setDirection(1);\r\n        }\r\n      }\r\n\r\n      this.totalFrames = arr[1] - arr[0];\r\n      this.timeCompleted = this.totalFrames;\r\n      this.firstFrame = arr[0];\r\n      this.setCurrentRawFrameValue(0.001 + offset);\r\n    }\r\n\r\n    this.trigger('segmentStart');\r\n  };\r\n\r\n  AnimationItem.prototype.setSegment = function (init, end) {\r\n    var pendingFrame = -1;\r\n\r\n    if (this.isPaused) {\r\n      if (this.currentRawFrame + this.firstFrame < init) {\r\n        pendingFrame = init;\r\n      } else if (this.currentRawFrame + this.firstFrame > end) {\r\n        pendingFrame = end - init;\r\n      }\r\n    }\r\n\r\n    this.firstFrame = init;\r\n    this.totalFrames = end - init;\r\n    this.timeCompleted = this.totalFrames;\r\n\r\n    if (pendingFrame !== -1) {\r\n      this.goToAndStop(pendingFrame, true);\r\n    }\r\n  };\r\n\r\n  AnimationItem.prototype.playSegments = function (arr, forceFlag) {\r\n    if (forceFlag) {\r\n      this.segments.length = 0;\r\n    }\r\n\r\n    if (_typeof$4(arr[0]) === 'object') {\r\n      var i;\r\n      var len = arr.length;\r\n\r\n      for (i = 0; i < len; i += 1) {\r\n        this.segments.push(arr[i]);\r\n      }\r\n    } else {\r\n      this.segments.push(arr);\r\n    }\r\n\r\n    if (this.segments.length && forceFlag) {\r\n      this.adjustSegment(this.segments.shift(), 0);\r\n    }\r\n\r\n    if (this.isPaused) {\r\n      this.play();\r\n    }\r\n  };\r\n\r\n  AnimationItem.prototype.resetSegments = function (forceFlag) {\r\n    this.segments.length = 0;\r\n    this.segments.push([this.animationData.ip, this.animationData.op]);\r\n\r\n    if (forceFlag) {\r\n      this.checkSegments(0);\r\n    }\r\n  };\r\n\r\n  AnimationItem.prototype.checkSegments = function (offset) {\r\n    if (this.segments.length) {\r\n      this.adjustSegment(this.segments.shift(), offset);\r\n      return true;\r\n    }\r\n\r\n    return false;\r\n  };\r\n\r\n  AnimationItem.prototype.destroy = function (name) {\r\n    if (name && this.name !== name || !this.renderer) {\r\n      return;\r\n    }\r\n\r\n    this.renderer.destroy();\r\n    this.imagePreloader.destroy();\r\n    this.trigger('destroy');\r\n    this._cbs = null;\r\n    this.onEnterFrame = null;\r\n    this.onLoopComplete = null;\r\n    this.onComplete = null;\r\n    this.onSegmentStart = null;\r\n    this.onDestroy = null;\r\n    this.renderer = null;\r\n    this.renderer = null;\r\n    this.imagePreloader = null;\r\n    this.projectInterface = null;\r\n  };\r\n\r\n  AnimationItem.prototype.setCurrentRawFrameValue = function (value) {\r\n    this.currentRawFrame = value;\r\n    this.gotoFrame();\r\n  };\r\n\r\n  AnimationItem.prototype.setSpeed = function (val) {\r\n    this.playSpeed = val;\r\n    this.updaFrameModifier();\r\n  };\r\n\r\n  AnimationItem.prototype.setDirection = function (val) {\r\n    this.playDirection = val < 0 ? -1 : 1;\r\n    this.updaFrameModifier();\r\n  };\r\n\r\n  AnimationItem.prototype.setVolume = function (val, name) {\r\n    if (name && this.name !== name) {\r\n      return;\r\n    }\r\n\r\n    this.audioController.setVolume(val);\r\n  };\r\n\r\n  AnimationItem.prototype.getVolume = function () {\r\n    return this.audioController.getVolume();\r\n  };\r\n\r\n  AnimationItem.prototype.mute = function (name) {\r\n    if (name && this.name !== name) {\r\n      return;\r\n    }\r\n\r\n    this.audioController.mute();\r\n  };\r\n\r\n  AnimationItem.prototype.unmute = function (name) {\r\n    if (name && this.name !== name) {\r\n      return;\r\n    }\r\n\r\n    this.audioController.unmute();\r\n  };\r\n\r\n  AnimationItem.prototype.updaFrameModifier = function () {\r\n    this.frameModifier = this.frameMult * this.playSpeed * this.playDirection;\r\n    this.audioController.setRate(this.playSpeed * this.playDirection);\r\n  };\r\n\r\n  AnimationItem.prototype.getPath = function () {\r\n    return this.path;\r\n  };\r\n\r\n  AnimationItem.prototype.getAssetsPath = function (assetData) {\r\n    var path = '';\r\n\r\n    if (assetData.e) {\r\n      path = assetData.p;\r\n    } else if (this.assetsPath) {\r\n      var imagePath = assetData.p;\r\n\r\n      if (imagePath.indexOf('images/') !== -1) {\r\n        imagePath = imagePath.split('/')[1];\r\n      }\r\n\r\n      path = this.assetsPath + imagePath;\r\n    } else {\r\n      path = this.path;\r\n      path += assetData.u ? assetData.u : '';\r\n      path += assetData.p;\r\n    }\r\n\r\n    return path;\r\n  };\r\n\r\n  AnimationItem.prototype.getAssetData = function (id) {\r\n    var i = 0;\r\n    var len = this.assets.length;\r\n\r\n    while (i < len) {\r\n      if (id === this.assets[i].id) {\r\n        return this.assets[i];\r\n      }\r\n\r\n      i += 1;\r\n    }\r\n\r\n    return null;\r\n  };\r\n\r\n  AnimationItem.prototype.hide = function () {\r\n    this.renderer.hide();\r\n  };\r\n\r\n  AnimationItem.prototype.show = function () {\r\n    this.renderer.show();\r\n  };\r\n\r\n  AnimationItem.prototype.getDuration = function (isFrame) {\r\n    return isFrame ? this.totalFrames : this.totalFrames / this.frameRate;\r\n  };\r\n\r\n  AnimationItem.prototype.updateDocumentData = function (path, documentData, index) {\r\n    try {\r\n      var element = this.renderer.getElementByPath(path);\r\n      element.updateDocumentData(documentData, index);\r\n    } catch (error) {// TODO: decide how to handle catch case\r\n    }\r\n  };\r\n\r\n  AnimationItem.prototype.trigger = function (name) {\r\n    if (this._cbs && this._cbs[name]) {\r\n      switch (name) {\r\n        case 'enterFrame':\r\n          this.triggerEvent(name, new BMEnterFrameEvent(name, this.currentFrame, this.totalFrames, this.frameModifier));\r\n          break;\r\n\r\n        case 'drawnFrame':\r\n          this.drawnFrameEvent.currentTime = this.currentFrame;\r\n          this.drawnFrameEvent.totalTime = this.totalFrames;\r\n          this.drawnFrameEvent.direction = this.frameModifier;\r\n          this.triggerEvent(name, this.drawnFrameEvent);\r\n          break;\r\n\r\n        case 'loopComplete':\r\n          this.triggerEvent(name, new BMCompleteLoopEvent(name, this.loop, this.playCount, this.frameMult));\r\n          break;\r\n\r\n        case 'complete':\r\n          this.triggerEvent(name, new BMCompleteEvent(name, this.frameMult));\r\n          break;\r\n\r\n        case 'segmentStart':\r\n          this.triggerEvent(name, new BMSegmentStartEvent(name, this.firstFrame, this.totalFrames));\r\n          break;\r\n\r\n        case 'destroy':\r\n          this.triggerEvent(name, new BMDestroyEvent(name, this));\r\n          break;\r\n\r\n        default:\r\n          this.triggerEvent(name);\r\n      }\r\n    }\r\n\r\n    if (name === 'enterFrame' && this.onEnterFrame) {\r\n      this.onEnterFrame.call(this, new BMEnterFrameEvent(name, this.currentFrame, this.totalFrames, this.frameMult));\r\n    }\r\n\r\n    if (name === 'loopComplete' && this.onLoopComplete) {\r\n      this.onLoopComplete.call(this, new BMCompleteLoopEvent(name, this.loop, this.playCount, this.frameMult));\r\n    }\r\n\r\n    if (name === 'complete' && this.onComplete) {\r\n      this.onComplete.call(this, new BMCompleteEvent(name, this.frameMult));\r\n    }\r\n\r\n    if (name === 'segmentStart' && this.onSegmentStart) {\r\n      this.onSegmentStart.call(this, new BMSegmentStartEvent(name, this.firstFrame, this.totalFrames));\r\n    }\r\n\r\n    if (name === 'destroy' && this.onDestroy) {\r\n      this.onDestroy.call(this, new BMDestroyEvent(name, this));\r\n    }\r\n  };\r\n\r\n  AnimationItem.prototype.triggerRenderFrameError = function (nativeError) {\r\n    var error = new BMRenderFrameErrorEvent(nativeError, this.currentFrame);\r\n    this.triggerEvent('error', error);\r\n\r\n    if (this.onError) {\r\n      this.onError.call(this, error);\r\n    }\r\n  };\r\n\r\n  AnimationItem.prototype.triggerConfigError = function (nativeError) {\r\n    var error = new BMConfigErrorEvent(nativeError, this.currentFrame);\r\n    this.triggerEvent('error', error);\r\n\r\n    if (this.onError) {\r\n      this.onError.call(this, error);\r\n    }\r\n  };\r\n\r\n  var animationManager = function () {\r\n    var moduleOb = {};\r\n    var registeredAnimations = [];\r\n    var initTime = 0;\r\n    var len = 0;\r\n    var playingAnimationsNum = 0;\r\n    var _stopped = true;\r\n    var _isFrozen = false;\r\n\r\n    function removeElement(ev) {\r\n      var i = 0;\r\n      var animItem = ev.target;\r\n\r\n      while (i < len) {\r\n        if (registeredAnimations[i].animation === animItem) {\r\n          registeredAnimations.splice(i, 1);\r\n          i -= 1;\r\n          len -= 1;\r\n\r\n          if (!animItem.isPaused) {\r\n            subtractPlayingCount();\r\n          }\r\n        }\r\n\r\n        i += 1;\r\n      }\r\n    }\r\n\r\n    function registerAnimation(element, animationData) {\r\n      if (!element) {\r\n        return null;\r\n      }\r\n\r\n      var i = 0;\r\n\r\n      while (i < len) {\r\n        if (registeredAnimations[i].elem === element && registeredAnimations[i].elem !== null) {\r\n          return registeredAnimations[i].animation;\r\n        }\r\n\r\n        i += 1;\r\n      }\r\n\r\n      var animItem = new AnimationItem();\r\n      setupAnimation(animItem, element);\r\n      animItem.setData(element, animationData);\r\n      return animItem;\r\n    }\r\n\r\n    function getRegisteredAnimations() {\r\n      var i;\r\n      var lenAnims = registeredAnimations.length;\r\n      var animations = [];\r\n\r\n      for (i = 0; i < lenAnims; i += 1) {\r\n        animations.push(registeredAnimations[i].animation);\r\n      }\r\n\r\n      return animations;\r\n    }\r\n\r\n    function addPlayingCount() {\r\n      playingAnimationsNum += 1;\r\n      activate();\r\n    }\r\n\r\n    function subtractPlayingCount() {\r\n      playingAnimationsNum -= 1;\r\n    }\r\n\r\n    function setupAnimation(animItem, element) {\r\n      animItem.addEventListener('destroy', removeElement);\r\n      animItem.addEventListener('_active', addPlayingCount);\r\n      animItem.addEventListener('_idle', subtractPlayingCount);\r\n      registeredAnimations.push({\r\n        elem: element,\r\n        animation: animItem\r\n      });\r\n      len += 1;\r\n    }\r\n\r\n    function loadAnimation(params) {\r\n      var animItem = new AnimationItem();\r\n      setupAnimation(animItem, null);\r\n      animItem.setParams(params);\r\n      return animItem;\r\n    }\r\n\r\n    function setSpeed(val, animation) {\r\n      var i;\r\n\r\n      for (i = 0; i < len; i += 1) {\r\n        registeredAnimations[i].animation.setSpeed(val, animation);\r\n      }\r\n    }\r\n\r\n    function setDirection(val, animation) {\r\n      var i;\r\n\r\n      for (i = 0; i < len; i += 1) {\r\n        registeredAnimations[i].animation.setDirection(val, animation);\r\n      }\r\n    }\r\n\r\n    function play(animation) {\r\n      var i;\r\n\r\n      for (i = 0; i < len; i += 1) {\r\n        registeredAnimations[i].animation.play(animation);\r\n      }\r\n    }\r\n\r\n    function resume(nowTime) {\r\n      var elapsedTime = nowTime - initTime;\r\n      var i;\r\n\r\n      for (i = 0; i < len; i += 1) {\r\n        registeredAnimations[i].animation.advanceTime(elapsedTime);\r\n      }\r\n\r\n      initTime = nowTime;\r\n\r\n      if (playingAnimationsNum && !_isFrozen) {\r\n        window.requestAnimationFrame(resume);\r\n      } else {\r\n        _stopped = true;\r\n      }\r\n    }\r\n\r\n    function first(nowTime) {\r\n      initTime = nowTime;\r\n      window.requestAnimationFrame(resume);\r\n    }\r\n\r\n    function pause(animation) {\r\n      var i;\r\n\r\n      for (i = 0; i < len; i += 1) {\r\n        registeredAnimations[i].animation.pause(animation);\r\n      }\r\n    }\r\n\r\n    function goToAndStop(value, isFrame, animation) {\r\n      var i;\r\n\r\n      for (i = 0; i < len; i += 1) {\r\n        registeredAnimations[i].animation.goToAndStop(value, isFrame, animation);\r\n      }\r\n    }\r\n\r\n    function stop(animation) {\r\n      var i;\r\n\r\n      for (i = 0; i < len; i += 1) {\r\n        registeredAnimations[i].animation.stop(animation);\r\n      }\r\n    }\r\n\r\n    function togglePause(animation) {\r\n      var i;\r\n\r\n      for (i = 0; i < len; i += 1) {\r\n        registeredAnimations[i].animation.togglePause(animation);\r\n      }\r\n    }\r\n\r\n    function destroy(animation) {\r\n      var i;\r\n\r\n      for (i = len - 1; i >= 0; i -= 1) {\r\n        registeredAnimations[i].animation.destroy(animation);\r\n      }\r\n    }\r\n\r\n    function searchAnimations(animationData, standalone, renderer) {\r\n      var animElements = [].concat([].slice.call(document.getElementsByClassName('lottie')), [].slice.call(document.getElementsByClassName('bodymovin')));\r\n      var i;\r\n      var lenAnims = animElements.length;\r\n\r\n      for (i = 0; i < lenAnims; i += 1) {\r\n        if (renderer) {\r\n          animElements[i].setAttribute('data-bm-type', renderer);\r\n        }\r\n\r\n        registerAnimation(animElements[i], animationData);\r\n      }\r\n\r\n      if (standalone && lenAnims === 0) {\r\n        if (!renderer) {\r\n          renderer = 'svg';\r\n        }\r\n\r\n        var body = document.getElementsByTagName('body')[0];\r\n        body.innerText = '';\r\n        var div = createTag('div');\r\n        div.style.width = '100%';\r\n        div.style.height = '100%';\r\n        div.setAttribute('data-bm-type', renderer);\r\n        body.appendChild(div);\r\n        registerAnimation(div, animationData);\r\n      }\r\n    }\r\n\r\n    function resize() {\r\n      var i;\r\n\r\n      for (i = 0; i < len; i += 1) {\r\n        registeredAnimations[i].animation.resize();\r\n      }\r\n    }\r\n\r\n    function activate() {\r\n      if (!_isFrozen && playingAnimationsNum) {\r\n        if (_stopped) {\r\n          window.requestAnimationFrame(first);\r\n          _stopped = false;\r\n        }\r\n      }\r\n    }\r\n\r\n    function freeze() {\r\n      _isFrozen = true;\r\n    }\r\n\r\n    function unfreeze() {\r\n      _isFrozen = false;\r\n      activate();\r\n    }\r\n\r\n    function setVolume(val, animation) {\r\n      var i;\r\n\r\n      for (i = 0; i < len; i += 1) {\r\n        registeredAnimations[i].animation.setVolume(val, animation);\r\n      }\r\n    }\r\n\r\n    function mute(animation) {\r\n      var i;\r\n\r\n      for (i = 0; i < len; i += 1) {\r\n        registeredAnimations[i].animation.mute(animation);\r\n      }\r\n    }\r\n\r\n    function unmute(animation) {\r\n      var i;\r\n\r\n      for (i = 0; i < len; i += 1) {\r\n        registeredAnimations[i].animation.unmute(animation);\r\n      }\r\n    }\r\n\r\n    moduleOb.registerAnimation = registerAnimation;\r\n    moduleOb.loadAnimation = loadAnimation;\r\n    moduleOb.setSpeed = setSpeed;\r\n    moduleOb.setDirection = setDirection;\r\n    moduleOb.play = play;\r\n    moduleOb.pause = pause;\r\n    moduleOb.stop = stop;\r\n    moduleOb.togglePause = togglePause;\r\n    moduleOb.searchAnimations = searchAnimations;\r\n    moduleOb.resize = resize; // moduleOb.start = start;\r\n\r\n    moduleOb.goToAndStop = goToAndStop;\r\n    moduleOb.destroy = destroy;\r\n    moduleOb.freeze = freeze;\r\n    moduleOb.unfreeze = unfreeze;\r\n    moduleOb.setVolume = setVolume;\r\n    moduleOb.mute = mute;\r\n    moduleOb.unmute = unmute;\r\n    moduleOb.getRegisteredAnimations = getRegisteredAnimations;\r\n    return moduleOb;\r\n  }();\r\n\r\n  /* eslint-disable */\r\n  var BezierFactory = function () {\r\n    /**\r\n       * BezierEasing - use bezier curve for transition easing function\r\n       * by Gaëtan Renaudeau 2014 - 2015 – MIT License\r\n       *\r\n       * Credits: is based on Firefox's nsSMILKeySpline.cpp\r\n       * Usage:\r\n       * var spline = BezierEasing([ 0.25, 0.1, 0.25, 1.0 ])\r\n       * spline.get(x) => returns the easing value | x must be in [0, 1] range\r\n       *\r\n       */\r\n    var ob = {};\r\n    ob.getBezierEasing = getBezierEasing;\r\n    var beziers = {};\r\n\r\n    function getBezierEasing(a, b, c, d, nm) {\r\n      var str = nm || ('bez_' + a + '_' + b + '_' + c + '_' + d).replace(/\\./g, 'p');\r\n\r\n      if (beziers[str]) {\r\n        return beziers[str];\r\n      }\r\n\r\n      var bezEasing = new BezierEasing([a, b, c, d]);\r\n      beziers[str] = bezEasing;\r\n      return bezEasing;\r\n    } // These values are established by empiricism with tests (tradeoff: performance VS precision)\r\n\r\n\r\n    var NEWTON_ITERATIONS = 4;\r\n    var NEWTON_MIN_SLOPE = 0.001;\r\n    var SUBDIVISION_PRECISION = 0.0000001;\r\n    var SUBDIVISION_MAX_ITERATIONS = 10;\r\n    var kSplineTableSize = 11;\r\n    var kSampleStepSize = 1.0 / (kSplineTableSize - 1.0);\r\n    var float32ArraySupported = typeof Float32Array === 'function';\r\n\r\n    function A(aA1, aA2) {\r\n      return 1.0 - 3.0 * aA2 + 3.0 * aA1;\r\n    }\r\n\r\n    function B(aA1, aA2) {\r\n      return 3.0 * aA2 - 6.0 * aA1;\r\n    }\r\n\r\n    function C(aA1) {\r\n      return 3.0 * aA1;\r\n    } // Returns x(t) given t, x1, and x2, or y(t) given t, y1, and y2.\r\n\r\n\r\n    function calcBezier(aT, aA1, aA2) {\r\n      return ((A(aA1, aA2) * aT + B(aA1, aA2)) * aT + C(aA1)) * aT;\r\n    } // Returns dx/dt given t, x1, and x2, or dy/dt given t, y1, and y2.\r\n\r\n\r\n    function getSlope(aT, aA1, aA2) {\r\n      return 3.0 * A(aA1, aA2) * aT * aT + 2.0 * B(aA1, aA2) * aT + C(aA1);\r\n    }\r\n\r\n    function binarySubdivide(aX, aA, aB, mX1, mX2) {\r\n      var currentX,\r\n          currentT,\r\n          i = 0;\r\n\r\n      do {\r\n        currentT = aA + (aB - aA) / 2.0;\r\n        currentX = calcBezier(currentT, mX1, mX2) - aX;\r\n\r\n        if (currentX > 0.0) {\r\n          aB = currentT;\r\n        } else {\r\n          aA = currentT;\r\n        }\r\n      } while (Math.abs(currentX) > SUBDIVISION_PRECISION && ++i < SUBDIVISION_MAX_ITERATIONS);\r\n\r\n      return currentT;\r\n    }\r\n\r\n    function newtonRaphsonIterate(aX, aGuessT, mX1, mX2) {\r\n      for (var i = 0; i < NEWTON_ITERATIONS; ++i) {\r\n        var currentSlope = getSlope(aGuessT, mX1, mX2);\r\n        if (currentSlope === 0.0) return aGuessT;\r\n        var currentX = calcBezier(aGuessT, mX1, mX2) - aX;\r\n        aGuessT -= currentX / currentSlope;\r\n      }\r\n\r\n      return aGuessT;\r\n    }\r\n    /**\r\n       * points is an array of [ mX1, mY1, mX2, mY2 ]\r\n       */\r\n\r\n\r\n    function BezierEasing(points) {\r\n      this._p = points;\r\n      this._mSampleValues = float32ArraySupported ? new Float32Array(kSplineTableSize) : new Array(kSplineTableSize);\r\n      this._precomputed = false;\r\n      this.get = this.get.bind(this);\r\n    }\r\n\r\n    BezierEasing.prototype = {\r\n      get: function get(x) {\r\n        var mX1 = this._p[0],\r\n            mY1 = this._p[1],\r\n            mX2 = this._p[2],\r\n            mY2 = this._p[3];\r\n        if (!this._precomputed) this._precompute();\r\n        if (mX1 === mY1 && mX2 === mY2) return x; // linear\r\n        // Because JavaScript number are imprecise, we should guarantee the extremes are right.\r\n\r\n        if (x === 0) return 0;\r\n        if (x === 1) return 1;\r\n        return calcBezier(this._getTForX(x), mY1, mY2);\r\n      },\r\n      // Private part\r\n      _precompute: function _precompute() {\r\n        var mX1 = this._p[0],\r\n            mY1 = this._p[1],\r\n            mX2 = this._p[2],\r\n            mY2 = this._p[3];\r\n        this._precomputed = true;\r\n\r\n        if (mX1 !== mY1 || mX2 !== mY2) {\r\n          this._calcSampleValues();\r\n        }\r\n      },\r\n      _calcSampleValues: function _calcSampleValues() {\r\n        var mX1 = this._p[0],\r\n            mX2 = this._p[2];\r\n\r\n        for (var i = 0; i < kSplineTableSize; ++i) {\r\n          this._mSampleValues[i] = calcBezier(i * kSampleStepSize, mX1, mX2);\r\n        }\r\n      },\r\n\r\n      /**\r\n           * getTForX chose the fastest heuristic to determine the percentage value precisely from a given X projection.\r\n           */\r\n      _getTForX: function _getTForX(aX) {\r\n        var mX1 = this._p[0],\r\n            mX2 = this._p[2],\r\n            mSampleValues = this._mSampleValues;\r\n        var intervalStart = 0.0;\r\n        var currentSample = 1;\r\n        var lastSample = kSplineTableSize - 1;\r\n\r\n        for (; currentSample !== lastSample && mSampleValues[currentSample] <= aX; ++currentSample) {\r\n          intervalStart += kSampleStepSize;\r\n        }\r\n\r\n        --currentSample; // Interpolate to provide an initial guess for t\r\n\r\n        var dist = (aX - mSampleValues[currentSample]) / (mSampleValues[currentSample + 1] - mSampleValues[currentSample]);\r\n        var guessForT = intervalStart + dist * kSampleStepSize;\r\n        var initialSlope = getSlope(guessForT, mX1, mX2);\r\n\r\n        if (initialSlope >= NEWTON_MIN_SLOPE) {\r\n          return newtonRaphsonIterate(aX, guessForT, mX1, mX2);\r\n        }\r\n\r\n        if (initialSlope === 0.0) {\r\n          return guessForT;\r\n        }\r\n\r\n        return binarySubdivide(aX, intervalStart, intervalStart + kSampleStepSize, mX1, mX2);\r\n      }\r\n    };\r\n    return ob;\r\n  }();\r\n\r\n  var pooling = function () {\r\n    function _double(arr) {\r\n      return arr.concat(createSizedArray(arr.length));\r\n    }\r\n\r\n    return {\r\n      \"double\": _double\r\n    };\r\n  }();\r\n\r\n  var poolFactory = function () {\r\n    return function (initialLength, _create, _release) {\r\n      var _length = 0;\r\n      var _maxLength = initialLength;\r\n      var pool = createSizedArray(_maxLength);\r\n      var ob = {\r\n        newElement: newElement,\r\n        release: release\r\n      };\r\n\r\n      function newElement() {\r\n        var element;\r\n\r\n        if (_length) {\r\n          _length -= 1;\r\n          element = pool[_length];\r\n        } else {\r\n          element = _create();\r\n        }\r\n\r\n        return element;\r\n      }\r\n\r\n      function release(element) {\r\n        if (_length === _maxLength) {\r\n          pool = pooling[\"double\"](pool);\r\n          _maxLength *= 2;\r\n        }\r\n\r\n        if (_release) {\r\n          _release(element);\r\n        }\r\n\r\n        pool[_length] = element;\r\n        _length += 1;\r\n      }\r\n\r\n      return ob;\r\n    };\r\n  }();\r\n\r\n  var bezierLengthPool = function () {\r\n    function create() {\r\n      return {\r\n        addedLength: 0,\r\n        percents: createTypedArray('float32', getDefaultCurveSegments()),\r\n        lengths: createTypedArray('float32', getDefaultCurveSegments())\r\n      };\r\n    }\r\n\r\n    return poolFactory(8, create);\r\n  }();\r\n\r\n  var segmentsLengthPool = function () {\r\n    function create() {\r\n      return {\r\n        lengths: [],\r\n        totalLength: 0\r\n      };\r\n    }\r\n\r\n    function release(element) {\r\n      var i;\r\n      var len = element.lengths.length;\r\n\r\n      for (i = 0; i < len; i += 1) {\r\n        bezierLengthPool.release(element.lengths[i]);\r\n      }\r\n\r\n      element.lengths.length = 0;\r\n    }\r\n\r\n    return poolFactory(8, create, release);\r\n  }();\r\n\r\n  function bezFunction() {\r\n    var math = Math;\r\n\r\n    function pointOnLine2D(x1, y1, x2, y2, x3, y3) {\r\n      var det1 = x1 * y2 + y1 * x3 + x2 * y3 - x3 * y2 - y3 * x1 - x2 * y1;\r\n      return det1 > -0.001 && det1 < 0.001;\r\n    }\r\n\r\n    function pointOnLine3D(x1, y1, z1, x2, y2, z2, x3, y3, z3) {\r\n      if (z1 === 0 && z2 === 0 && z3 === 0) {\r\n        return pointOnLine2D(x1, y1, x2, y2, x3, y3);\r\n      }\r\n\r\n      var dist1 = math.sqrt(math.pow(x2 - x1, 2) + math.pow(y2 - y1, 2) + math.pow(z2 - z1, 2));\r\n      var dist2 = math.sqrt(math.pow(x3 - x1, 2) + math.pow(y3 - y1, 2) + math.pow(z3 - z1, 2));\r\n      var dist3 = math.sqrt(math.pow(x3 - x2, 2) + math.pow(y3 - y2, 2) + math.pow(z3 - z2, 2));\r\n      var diffDist;\r\n\r\n      if (dist1 > dist2) {\r\n        if (dist1 > dist3) {\r\n          diffDist = dist1 - dist2 - dist3;\r\n        } else {\r\n          diffDist = dist3 - dist2 - dist1;\r\n        }\r\n      } else if (dist3 > dist2) {\r\n        diffDist = dist3 - dist2 - dist1;\r\n      } else {\r\n        diffDist = dist2 - dist1 - dist3;\r\n      }\r\n\r\n      return diffDist > -0.0001 && diffDist < 0.0001;\r\n    }\r\n\r\n    var getBezierLength = function () {\r\n      return function (pt1, pt2, pt3, pt4) {\r\n        var curveSegments = getDefaultCurveSegments();\r\n        var k;\r\n        var i;\r\n        var len;\r\n        var ptCoord;\r\n        var perc;\r\n        var addedLength = 0;\r\n        var ptDistance;\r\n        var point = [];\r\n        var lastPoint = [];\r\n        var lengthData = bezierLengthPool.newElement();\r\n        len = pt3.length;\r\n\r\n        for (k = 0; k < curveSegments; k += 1) {\r\n          perc = k / (curveSegments - 1);\r\n          ptDistance = 0;\r\n\r\n          for (i = 0; i < len; i += 1) {\r\n            ptCoord = bmPow(1 - perc, 3) * pt1[i] + 3 * bmPow(1 - perc, 2) * perc * pt3[i] + 3 * (1 - perc) * bmPow(perc, 2) * pt4[i] + bmPow(perc, 3) * pt2[i];\r\n            point[i] = ptCoord;\r\n\r\n            if (lastPoint[i] !== null) {\r\n              ptDistance += bmPow(point[i] - lastPoint[i], 2);\r\n            }\r\n\r\n            lastPoint[i] = point[i];\r\n          }\r\n\r\n          if (ptDistance) {\r\n            ptDistance = bmSqrt(ptDistance);\r\n            addedLength += ptDistance;\r\n          }\r\n\r\n          lengthData.percents[k] = perc;\r\n          lengthData.lengths[k] = addedLength;\r\n        }\r\n\r\n        lengthData.addedLength = addedLength;\r\n        return lengthData;\r\n      };\r\n    }();\r\n\r\n    function getSegmentsLength(shapeData) {\r\n      var segmentsLength = segmentsLengthPool.newElement();\r\n      var closed = shapeData.c;\r\n      var pathV = shapeData.v;\r\n      var pathO = shapeData.o;\r\n      var pathI = shapeData.i;\r\n      var i;\r\n      var len = shapeData._length;\r\n      var lengths = segmentsLength.lengths;\r\n      var totalLength = 0;\r\n\r\n      for (i = 0; i < len - 1; i += 1) {\r\n        lengths[i] = getBezierLength(pathV[i], pathV[i + 1], pathO[i], pathI[i + 1]);\r\n        totalLength += lengths[i].addedLength;\r\n      }\r\n\r\n      if (closed && len) {\r\n        lengths[i] = getBezierLength(pathV[i], pathV[0], pathO[i], pathI[0]);\r\n        totalLength += lengths[i].addedLength;\r\n      }\r\n\r\n      segmentsLength.totalLength = totalLength;\r\n      return segmentsLength;\r\n    }\r\n\r\n    function BezierData(length) {\r\n      this.segmentLength = 0;\r\n      this.points = new Array(length);\r\n    }\r\n\r\n    function PointData(partial, point) {\r\n      this.partialLength = partial;\r\n      this.point = point;\r\n    }\r\n\r\n    var buildBezierData = function () {\r\n      var storedData = {};\r\n      return function (pt1, pt2, pt3, pt4) {\r\n        var bezierName = (pt1[0] + '_' + pt1[1] + '_' + pt2[0] + '_' + pt2[1] + '_' + pt3[0] + '_' + pt3[1] + '_' + pt4[0] + '_' + pt4[1]).replace(/\\./g, 'p');\r\n\r\n        if (!storedData[bezierName]) {\r\n          var curveSegments = getDefaultCurveSegments();\r\n          var k;\r\n          var i;\r\n          var len;\r\n          var ptCoord;\r\n          var perc;\r\n          var addedLength = 0;\r\n          var ptDistance;\r\n          var point;\r\n          var lastPoint = null;\r\n\r\n          if (pt1.length === 2 && (pt1[0] !== pt2[0] || pt1[1] !== pt2[1]) && pointOnLine2D(pt1[0], pt1[1], pt2[0], pt2[1], pt1[0] + pt3[0], pt1[1] + pt3[1]) && pointOnLine2D(pt1[0], pt1[1], pt2[0], pt2[1], pt2[0] + pt4[0], pt2[1] + pt4[1])) {\r\n            curveSegments = 2;\r\n          }\r\n\r\n          var bezierData = new BezierData(curveSegments);\r\n          len = pt3.length;\r\n\r\n          for (k = 0; k < curveSegments; k += 1) {\r\n            point = createSizedArray(len);\r\n            perc = k / (curveSegments - 1);\r\n            ptDistance = 0;\r\n\r\n            for (i = 0; i < len; i += 1) {\r\n              ptCoord = bmPow(1 - perc, 3) * pt1[i] + 3 * bmPow(1 - perc, 2) * perc * (pt1[i] + pt3[i]) + 3 * (1 - perc) * bmPow(perc, 2) * (pt2[i] + pt4[i]) + bmPow(perc, 3) * pt2[i];\r\n              point[i] = ptCoord;\r\n\r\n              if (lastPoint !== null) {\r\n                ptDistance += bmPow(point[i] - lastPoint[i], 2);\r\n              }\r\n            }\r\n\r\n            ptDistance = bmSqrt(ptDistance);\r\n            addedLength += ptDistance;\r\n            bezierData.points[k] = new PointData(ptDistance, point);\r\n            lastPoint = point;\r\n          }\r\n\r\n          bezierData.segmentLength = addedLength;\r\n          storedData[bezierName] = bezierData;\r\n        }\r\n\r\n        return storedData[bezierName];\r\n      };\r\n    }();\r\n\r\n    function getDistancePerc(perc, bezierData) {\r\n      var percents = bezierData.percents;\r\n      var lengths = bezierData.lengths;\r\n      var len = percents.length;\r\n      var initPos = bmFloor((len - 1) * perc);\r\n      var lengthPos = perc * bezierData.addedLength;\r\n      var lPerc = 0;\r\n\r\n      if (initPos === len - 1 || initPos === 0 || lengthPos === lengths[initPos]) {\r\n        return percents[initPos];\r\n      }\r\n\r\n      var dir = lengths[initPos] > lengthPos ? -1 : 1;\r\n      var flag = true;\r\n\r\n      while (flag) {\r\n        if (lengths[initPos] <= lengthPos && lengths[initPos + 1] > lengthPos) {\r\n          lPerc = (lengthPos - lengths[initPos]) / (lengths[initPos + 1] - lengths[initPos]);\r\n          flag = false;\r\n        } else {\r\n          initPos += dir;\r\n        }\r\n\r\n        if (initPos < 0 || initPos >= len - 1) {\r\n          // FIX for TypedArrays that don't store floating point values with enough accuracy\r\n          if (initPos === len - 1) {\r\n            return percents[initPos];\r\n          }\r\n\r\n          flag = false;\r\n        }\r\n      }\r\n\r\n      return percents[initPos] + (percents[initPos + 1] - percents[initPos]) * lPerc;\r\n    }\r\n\r\n    function getPointInSegment(pt1, pt2, pt3, pt4, percent, bezierData) {\r\n      var t1 = getDistancePerc(percent, bezierData);\r\n      var u1 = 1 - t1;\r\n      var ptX = math.round((u1 * u1 * u1 * pt1[0] + (t1 * u1 * u1 + u1 * t1 * u1 + u1 * u1 * t1) * pt3[0] + (t1 * t1 * u1 + u1 * t1 * t1 + t1 * u1 * t1) * pt4[0] + t1 * t1 * t1 * pt2[0]) * 1000) / 1000;\r\n      var ptY = math.round((u1 * u1 * u1 * pt1[1] + (t1 * u1 * u1 + u1 * t1 * u1 + u1 * u1 * t1) * pt3[1] + (t1 * t1 * u1 + u1 * t1 * t1 + t1 * u1 * t1) * pt4[1] + t1 * t1 * t1 * pt2[1]) * 1000) / 1000;\r\n      return [ptX, ptY];\r\n    }\r\n\r\n    var bezierSegmentPoints = createTypedArray('float32', 8);\r\n\r\n    function getNewSegment(pt1, pt2, pt3, pt4, startPerc, endPerc, bezierData) {\r\n      if (startPerc < 0) {\r\n        startPerc = 0;\r\n      } else if (startPerc > 1) {\r\n        startPerc = 1;\r\n      }\r\n\r\n      var t0 = getDistancePerc(startPerc, bezierData);\r\n      endPerc = endPerc > 1 ? 1 : endPerc;\r\n      var t1 = getDistancePerc(endPerc, bezierData);\r\n      var i;\r\n      var len = pt1.length;\r\n      var u0 = 1 - t0;\r\n      var u1 = 1 - t1;\r\n      var u0u0u0 = u0 * u0 * u0;\r\n      var t0u0u0_3 = t0 * u0 * u0 * 3; // eslint-disable-line camelcase\r\n\r\n      var t0t0u0_3 = t0 * t0 * u0 * 3; // eslint-disable-line camelcase\r\n\r\n      var t0t0t0 = t0 * t0 * t0; //\r\n\r\n      var u0u0u1 = u0 * u0 * u1;\r\n      var t0u0u1_3 = t0 * u0 * u1 + u0 * t0 * u1 + u0 * u0 * t1; // eslint-disable-line camelcase\r\n\r\n      var t0t0u1_3 = t0 * t0 * u1 + u0 * t0 * t1 + t0 * u0 * t1; // eslint-disable-line camelcase\r\n\r\n      var t0t0t1 = t0 * t0 * t1; //\r\n\r\n      var u0u1u1 = u0 * u1 * u1;\r\n      var t0u1u1_3 = t0 * u1 * u1 + u0 * t1 * u1 + u0 * u1 * t1; // eslint-disable-line camelcase\r\n\r\n      var t0t1u1_3 = t0 * t1 * u1 + u0 * t1 * t1 + t0 * u1 * t1; // eslint-disable-line camelcase\r\n\r\n      var t0t1t1 = t0 * t1 * t1; //\r\n\r\n      var u1u1u1 = u1 * u1 * u1;\r\n      var t1u1u1_3 = t1 * u1 * u1 + u1 * t1 * u1 + u1 * u1 * t1; // eslint-disable-line camelcase\r\n\r\n      var t1t1u1_3 = t1 * t1 * u1 + u1 * t1 * t1 + t1 * u1 * t1; // eslint-disable-line camelcase\r\n\r\n      var t1t1t1 = t1 * t1 * t1;\r\n\r\n      for (i = 0; i < len; i += 1) {\r\n        bezierSegmentPoints[i * 4] = math.round((u0u0u0 * pt1[i] + t0u0u0_3 * pt3[i] + t0t0u0_3 * pt4[i] + t0t0t0 * pt2[i]) * 1000) / 1000; // eslint-disable-line camelcase\r\n\r\n        bezierSegmentPoints[i * 4 + 1] = math.round((u0u0u1 * pt1[i] + t0u0u1_3 * pt3[i] + t0t0u1_3 * pt4[i] + t0t0t1 * pt2[i]) * 1000) / 1000; // eslint-disable-line camelcase\r\n\r\n        bezierSegmentPoints[i * 4 + 2] = math.round((u0u1u1 * pt1[i] + t0u1u1_3 * pt3[i] + t0t1u1_3 * pt4[i] + t0t1t1 * pt2[i]) * 1000) / 1000; // eslint-disable-line camelcase\r\n\r\n        bezierSegmentPoints[i * 4 + 3] = math.round((u1u1u1 * pt1[i] + t1u1u1_3 * pt3[i] + t1t1u1_3 * pt4[i] + t1t1t1 * pt2[i]) * 1000) / 1000; // eslint-disable-line camelcase\r\n      }\r\n\r\n      return bezierSegmentPoints;\r\n    }\r\n\r\n    return {\r\n      getSegmentsLength: getSegmentsLength,\r\n      getNewSegment: getNewSegment,\r\n      getPointInSegment: getPointInSegment,\r\n      buildBezierData: buildBezierData,\r\n      pointOnLine2D: pointOnLine2D,\r\n      pointOnLine3D: pointOnLine3D\r\n    };\r\n  }\r\n\r\n  var bez = bezFunction();\r\n\r\n  var PropertyFactory = function () {\r\n    var initFrame = initialDefaultFrame;\r\n    var mathAbs = Math.abs;\r\n\r\n    function interpolateValue(frameNum, caching) {\r\n      var offsetTime = this.offsetTime;\r\n      var newValue;\r\n\r\n      if (this.propType === 'multidimensional') {\r\n        newValue = createTypedArray('float32', this.pv.length);\r\n      }\r\n\r\n      var iterationIndex = caching.lastIndex;\r\n      var i = iterationIndex;\r\n      var len = this.keyframes.length - 1;\r\n      var flag = true;\r\n      var keyData;\r\n      var nextKeyData;\r\n      var keyframeMetadata;\r\n\r\n      while (flag) {\r\n        keyData = this.keyframes[i];\r\n        nextKeyData = this.keyframes[i + 1];\r\n\r\n        if (i === len - 1 && frameNum >= nextKeyData.t - offsetTime) {\r\n          if (keyData.h) {\r\n            keyData = nextKeyData;\r\n          }\r\n\r\n          iterationIndex = 0;\r\n          break;\r\n        }\r\n\r\n        if (nextKeyData.t - offsetTime > frameNum) {\r\n          iterationIndex = i;\r\n          break;\r\n        }\r\n\r\n        if (i < len - 1) {\r\n          i += 1;\r\n        } else {\r\n          iterationIndex = 0;\r\n          flag = false;\r\n        }\r\n      }\r\n\r\n      keyframeMetadata = this.keyframesMetadata[i] || {};\r\n      var k;\r\n      var kLen;\r\n      var perc;\r\n      var jLen;\r\n      var j;\r\n      var fnc;\r\n      var nextKeyTime = nextKeyData.t - offsetTime;\r\n      var keyTime = keyData.t - offsetTime;\r\n      var endValue;\r\n\r\n      if (keyData.to) {\r\n        if (!keyframeMetadata.bezierData) {\r\n          keyframeMetadata.bezierData = bez.buildBezierData(keyData.s, nextKeyData.s || keyData.e, keyData.to, keyData.ti);\r\n        }\r\n\r\n        var bezierData = keyframeMetadata.bezierData;\r\n\r\n        if (frameNum >= nextKeyTime || frameNum < keyTime) {\r\n          var ind = frameNum >= nextKeyTime ? bezierData.points.length - 1 : 0;\r\n          kLen = bezierData.points[ind].point.length;\r\n\r\n          for (k = 0; k < kLen; k += 1) {\r\n            newValue[k] = bezierData.points[ind].point[k];\r\n          } // caching._lastKeyframeIndex = -1;\r\n\r\n        } else {\r\n          if (keyframeMetadata.__fnct) {\r\n            fnc = keyframeMetadata.__fnct;\r\n          } else {\r\n            fnc = BezierFactory.getBezierEasing(keyData.o.x, keyData.o.y, keyData.i.x, keyData.i.y, keyData.n).get;\r\n            keyframeMetadata.__fnct = fnc;\r\n          }\r\n\r\n          perc = fnc((frameNum - keyTime) / (nextKeyTime - keyTime));\r\n          var distanceInLine = bezierData.segmentLength * perc;\r\n          var segmentPerc;\r\n          var addedLength = caching.lastFrame < frameNum && caching._lastKeyframeIndex === i ? caching._lastAddedLength : 0;\r\n          j = caching.lastFrame < frameNum && caching._lastKeyframeIndex === i ? caching._lastPoint : 0;\r\n          flag = true;\r\n          jLen = bezierData.points.length;\r\n\r\n          while (flag) {\r\n            addedLength += bezierData.points[j].partialLength;\r\n\r\n            if (distanceInLine === 0 || perc === 0 || j === bezierData.points.length - 1) {\r\n              kLen = bezierData.points[j].point.length;\r\n\r\n              for (k = 0; k < kLen; k += 1) {\r\n                newValue[k] = bezierData.points[j].point[k];\r\n              }\r\n\r\n              break;\r\n            } else if (distanceInLine >= addedLength && distanceInLine < addedLength + bezierData.points[j + 1].partialLength) {\r\n              segmentPerc = (distanceInLine - addedLength) / bezierData.points[j + 1].partialLength;\r\n              kLen = bezierData.points[j].point.length;\r\n\r\n              for (k = 0; k < kLen; k += 1) {\r\n                newValue[k] = bezierData.points[j].point[k] + (bezierData.points[j + 1].point[k] - bezierData.points[j].point[k]) * segmentPerc;\r\n              }\r\n\r\n              break;\r\n            }\r\n\r\n            if (j < jLen - 1) {\r\n              j += 1;\r\n            } else {\r\n              flag = false;\r\n            }\r\n          }\r\n\r\n          caching._lastPoint = j;\r\n          caching._lastAddedLength = addedLength - bezierData.points[j].partialLength;\r\n          caching._lastKeyframeIndex = i;\r\n        }\r\n      } else {\r\n        var outX;\r\n        var outY;\r\n        var inX;\r\n        var inY;\r\n        var keyValue;\r\n        len = keyData.s.length;\r\n        endValue = nextKeyData.s || keyData.e;\r\n\r\n        if (this.sh && keyData.h !== 1) {\r\n          if (frameNum >= nextKeyTime) {\r\n            newValue[0] = endValue[0];\r\n            newValue[1] = endValue[1];\r\n            newValue[2] = endValue[2];\r\n          } else if (frameNum <= keyTime) {\r\n            newValue[0] = keyData.s[0];\r\n            newValue[1] = keyData.s[1];\r\n            newValue[2] = keyData.s[2];\r\n          } else {\r\n            var quatStart = createQuaternion(keyData.s);\r\n            var quatEnd = createQuaternion(endValue);\r\n            var time = (frameNum - keyTime) / (nextKeyTime - keyTime);\r\n            quaternionToEuler(newValue, slerp(quatStart, quatEnd, time));\r\n          }\r\n        } else {\r\n          for (i = 0; i < len; i += 1) {\r\n            if (keyData.h !== 1) {\r\n              if (frameNum >= nextKeyTime) {\r\n                perc = 1;\r\n              } else if (frameNum < keyTime) {\r\n                perc = 0;\r\n              } else {\r\n                if (keyData.o.x.constructor === Array) {\r\n                  if (!keyframeMetadata.__fnct) {\r\n                    keyframeMetadata.__fnct = [];\r\n                  }\r\n\r\n                  if (!keyframeMetadata.__fnct[i]) {\r\n                    outX = keyData.o.x[i] === undefined ? keyData.o.x[0] : keyData.o.x[i];\r\n                    outY = keyData.o.y[i] === undefined ? keyData.o.y[0] : keyData.o.y[i];\r\n                    inX = keyData.i.x[i] === undefined ? keyData.i.x[0] : keyData.i.x[i];\r\n                    inY = keyData.i.y[i] === undefined ? keyData.i.y[0] : keyData.i.y[i];\r\n                    fnc = BezierFactory.getBezierEasing(outX, outY, inX, inY).get;\r\n                    keyframeMetadata.__fnct[i] = fnc;\r\n                  } else {\r\n                    fnc = keyframeMetadata.__fnct[i];\r\n                  }\r\n                } else if (!keyframeMetadata.__fnct) {\r\n                  outX = keyData.o.x;\r\n                  outY = keyData.o.y;\r\n                  inX = keyData.i.x;\r\n                  inY = keyData.i.y;\r\n                  fnc = BezierFactory.getBezierEasing(outX, outY, inX, inY).get;\r\n                  keyData.keyframeMetadata = fnc;\r\n                } else {\r\n                  fnc = keyframeMetadata.__fnct;\r\n                }\r\n\r\n                perc = fnc((frameNum - keyTime) / (nextKeyTime - keyTime));\r\n              }\r\n            }\r\n\r\n            endValue = nextKeyData.s || keyData.e;\r\n            keyValue = keyData.h === 1 ? keyData.s[i] : keyData.s[i] + (endValue[i] - keyData.s[i]) * perc;\r\n\r\n            if (this.propType === 'multidimensional') {\r\n              newValue[i] = keyValue;\r\n            } else {\r\n              newValue = keyValue;\r\n            }\r\n          }\r\n        }\r\n      }\r\n\r\n      caching.lastIndex = iterationIndex;\r\n      return newValue;\r\n    } // based on @Toji's https://github.com/toji/gl-matrix/\r\n\r\n\r\n    function slerp(a, b, t) {\r\n      var out = [];\r\n      var ax = a[0];\r\n      var ay = a[1];\r\n      var az = a[2];\r\n      var aw = a[3];\r\n      var bx = b[0];\r\n      var by = b[1];\r\n      var bz = b[2];\r\n      var bw = b[3];\r\n      var omega;\r\n      var cosom;\r\n      var sinom;\r\n      var scale0;\r\n      var scale1;\r\n      cosom = ax * bx + ay * by + az * bz + aw * bw;\r\n\r\n      if (cosom < 0.0) {\r\n        cosom = -cosom;\r\n        bx = -bx;\r\n        by = -by;\r\n        bz = -bz;\r\n        bw = -bw;\r\n      }\r\n\r\n      if (1.0 - cosom > 0.000001) {\r\n        omega = Math.acos(cosom);\r\n        sinom = Math.sin(omega);\r\n        scale0 = Math.sin((1.0 - t) * omega) / sinom;\r\n        scale1 = Math.sin(t * omega) / sinom;\r\n      } else {\r\n        scale0 = 1.0 - t;\r\n        scale1 = t;\r\n      }\r\n\r\n      out[0] = scale0 * ax + scale1 * bx;\r\n      out[1] = scale0 * ay + scale1 * by;\r\n      out[2] = scale0 * az + scale1 * bz;\r\n      out[3] = scale0 * aw + scale1 * bw;\r\n      return out;\r\n    }\r\n\r\n    function quaternionToEuler(out, quat) {\r\n      var qx = quat[0];\r\n      var qy = quat[1];\r\n      var qz = quat[2];\r\n      var qw = quat[3];\r\n      var heading = Math.atan2(2 * qy * qw - 2 * qx * qz, 1 - 2 * qy * qy - 2 * qz * qz);\r\n      var attitude = Math.asin(2 * qx * qy + 2 * qz * qw);\r\n      var bank = Math.atan2(2 * qx * qw - 2 * qy * qz, 1 - 2 * qx * qx - 2 * qz * qz);\r\n      out[0] = heading / degToRads;\r\n      out[1] = attitude / degToRads;\r\n      out[2] = bank / degToRads;\r\n    }\r\n\r\n    function createQuaternion(values) {\r\n      var heading = values[0] * degToRads;\r\n      var attitude = values[1] * degToRads;\r\n      var bank = values[2] * degToRads;\r\n      var c1 = Math.cos(heading / 2);\r\n      var c2 = Math.cos(attitude / 2);\r\n      var c3 = Math.cos(bank / 2);\r\n      var s1 = Math.sin(heading / 2);\r\n      var s2 = Math.sin(attitude / 2);\r\n      var s3 = Math.sin(bank / 2);\r\n      var w = c1 * c2 * c3 - s1 * s2 * s3;\r\n      var x = s1 * s2 * c3 + c1 * c2 * s3;\r\n      var y = s1 * c2 * c3 + c1 * s2 * s3;\r\n      var z = c1 * s2 * c3 - s1 * c2 * s3;\r\n      return [x, y, z, w];\r\n    }\r\n\r\n    function getValueAtCurrentTime() {\r\n      var frameNum = this.comp.renderedFrame - this.offsetTime;\r\n      var initTime = this.keyframes[0].t - this.offsetTime;\r\n      var endTime = this.keyframes[this.keyframes.length - 1].t - this.offsetTime;\r\n\r\n      if (!(frameNum === this._caching.lastFrame || this._caching.lastFrame !== initFrame && (this._caching.lastFrame >= endTime && frameNum >= endTime || this._caching.lastFrame < initTime && frameNum < initTime))) {\r\n        if (this._caching.lastFrame >= frameNum) {\r\n          this._caching._lastKeyframeIndex = -1;\r\n          this._caching.lastIndex = 0;\r\n        }\r\n\r\n        var renderResult = this.interpolateValue(frameNum, this._caching);\r\n        this.pv = renderResult;\r\n      }\r\n\r\n      this._caching.lastFrame = frameNum;\r\n      return this.pv;\r\n    }\r\n\r\n    function setVValue(val) {\r\n      var multipliedValue;\r\n\r\n      if (this.propType === 'unidimensional') {\r\n        multipliedValue = val * this.mult;\r\n\r\n        if (mathAbs(this.v - multipliedValue) > 0.00001) {\r\n          this.v = multipliedValue;\r\n          this._mdf = true;\r\n        }\r\n      } else {\r\n        var i = 0;\r\n        var len = this.v.length;\r\n\r\n        while (i < len) {\r\n          multipliedValue = val[i] * this.mult;\r\n\r\n          if (mathAbs(this.v[i] - multipliedValue) > 0.00001) {\r\n            this.v[i] = multipliedValue;\r\n            this._mdf = true;\r\n          }\r\n\r\n          i += 1;\r\n        }\r\n      }\r\n    }\r\n\r\n    function processEffectsSequence() {\r\n      if (this.elem.globalData.frameId === this.frameId || !this.effectsSequence.length) {\r\n        return;\r\n      }\r\n\r\n      if (this.lock) {\r\n        this.setVValue(this.pv);\r\n        return;\r\n      }\r\n\r\n      this.lock = true;\r\n      this._mdf = this._isFirstFrame;\r\n      var i;\r\n      var len = this.effectsSequence.length;\r\n      var finalValue = this.kf ? this.pv : this.data.k;\r\n\r\n      for (i = 0; i < len; i += 1) {\r\n        finalValue = this.effectsSequence[i](finalValue);\r\n      }\r\n\r\n      this.setVValue(finalValue);\r\n      this._isFirstFrame = false;\r\n      this.lock = false;\r\n      this.frameId = this.elem.globalData.frameId;\r\n    }\r\n\r\n    function addEffect(effectFunction) {\r\n      this.effectsSequence.push(effectFunction);\r\n      this.container.addDynamicProperty(this);\r\n    }\r\n\r\n    function ValueProperty(elem, data, mult, container) {\r\n      this.propType = 'unidimensional';\r\n      this.mult = mult || 1;\r\n      this.data = data;\r\n      this.v = mult ? data.k * mult : data.k;\r\n      this.pv = data.k;\r\n      this._mdf = false;\r\n      this.elem = elem;\r\n      this.container = container;\r\n      this.comp = elem.comp;\r\n      this.k = false;\r\n      this.kf = false;\r\n      this.vel = 0;\r\n      this.effectsSequence = [];\r\n      this._isFirstFrame = true;\r\n      this.getValue = processEffectsSequence;\r\n      this.setVValue = setVValue;\r\n      this.addEffect = addEffect;\r\n    }\r\n\r\n    function MultiDimensionalProperty(elem, data, mult, container) {\r\n      this.propType = 'multidimensional';\r\n      this.mult = mult || 1;\r\n      this.data = data;\r\n      this._mdf = false;\r\n      this.elem = elem;\r\n      this.container = container;\r\n      this.comp = elem.comp;\r\n      this.k = false;\r\n      this.kf = false;\r\n      this.frameId = -1;\r\n      var i;\r\n      var len = data.k.length;\r\n      this.v = createTypedArray('float32', len);\r\n      this.pv = createTypedArray('float32', len);\r\n      this.vel = createTypedArray('float32', len);\r\n\r\n      for (i = 0; i < len; i += 1) {\r\n        this.v[i] = data.k[i] * this.mult;\r\n        this.pv[i] = data.k[i];\r\n      }\r\n\r\n      this._isFirstFrame = true;\r\n      this.effectsSequence = [];\r\n      this.getValue = processEffectsSequence;\r\n      this.setVValue = setVValue;\r\n      this.addEffect = addEffect;\r\n    }\r\n\r\n    function KeyframedValueProperty(elem, data, mult, container) {\r\n      this.propType = 'unidimensional';\r\n      this.keyframes = data.k;\r\n      this.keyframesMetadata = [];\r\n      this.offsetTime = elem.data.st;\r\n      this.frameId = -1;\r\n      this._caching = {\r\n        lastFrame: initFrame,\r\n        lastIndex: 0,\r\n        value: 0,\r\n        _lastKeyframeIndex: -1\r\n      };\r\n      this.k = true;\r\n      this.kf = true;\r\n      this.data = data;\r\n      this.mult = mult || 1;\r\n      this.elem = elem;\r\n      this.container = container;\r\n      this.comp = elem.comp;\r\n      this.v = initFrame;\r\n      this.pv = initFrame;\r\n      this._isFirstFrame = true;\r\n      this.getValue = processEffectsSequence;\r\n      this.setVValue = setVValue;\r\n      this.interpolateValue = interpolateValue;\r\n      this.effectsSequence = [getValueAtCurrentTime.bind(this)];\r\n      this.addEffect = addEffect;\r\n    }\r\n\r\n    function KeyframedMultidimensionalProperty(elem, data, mult, container) {\r\n      this.propType = 'multidimensional';\r\n      var i;\r\n      var len = data.k.length;\r\n      var s;\r\n      var e;\r\n      var to;\r\n      var ti;\r\n\r\n      for (i = 0; i < len - 1; i += 1) {\r\n        if (data.k[i].to && data.k[i].s && data.k[i + 1] && data.k[i + 1].s) {\r\n          s = data.k[i].s;\r\n          e = data.k[i + 1].s;\r\n          to = data.k[i].to;\r\n          ti = data.k[i].ti;\r\n\r\n          if (s.length === 2 && !(s[0] === e[0] && s[1] === e[1]) && bez.pointOnLine2D(s[0], s[1], e[0], e[1], s[0] + to[0], s[1] + to[1]) && bez.pointOnLine2D(s[0], s[1], e[0], e[1], e[0] + ti[0], e[1] + ti[1]) || s.length === 3 && !(s[0] === e[0] && s[1] === e[1] && s[2] === e[2]) && bez.pointOnLine3D(s[0], s[1], s[2], e[0], e[1], e[2], s[0] + to[0], s[1] + to[1], s[2] + to[2]) && bez.pointOnLine3D(s[0], s[1], s[2], e[0], e[1], e[2], e[0] + ti[0], e[1] + ti[1], e[2] + ti[2])) {\r\n            data.k[i].to = null;\r\n            data.k[i].ti = null;\r\n          }\r\n\r\n          if (s[0] === e[0] && s[1] === e[1] && to[0] === 0 && to[1] === 0 && ti[0] === 0 && ti[1] === 0) {\r\n            if (s.length === 2 || s[2] === e[2] && to[2] === 0 && ti[2] === 0) {\r\n              data.k[i].to = null;\r\n              data.k[i].ti = null;\r\n            }\r\n          }\r\n        }\r\n      }\r\n\r\n      this.effectsSequence = [getValueAtCurrentTime.bind(this)];\r\n      this.data = data;\r\n      this.keyframes = data.k;\r\n      this.keyframesMetadata = [];\r\n      this.offsetTime = elem.data.st;\r\n      this.k = true;\r\n      this.kf = true;\r\n      this._isFirstFrame = true;\r\n      this.mult = mult || 1;\r\n      this.elem = elem;\r\n      this.container = container;\r\n      this.comp = elem.comp;\r\n      this.getValue = processEffectsSequence;\r\n      this.setVValue = setVValue;\r\n      this.interpolateValue = interpolateValue;\r\n      this.frameId = -1;\r\n      var arrLen = data.k[0].s.length;\r\n      this.v = createTypedArray('float32', arrLen);\r\n      this.pv = createTypedArray('float32', arrLen);\r\n\r\n      for (i = 0; i < arrLen; i += 1) {\r\n        this.v[i] = initFrame;\r\n        this.pv[i] = initFrame;\r\n      }\r\n\r\n      this._caching = {\r\n        lastFrame: initFrame,\r\n        lastIndex: 0,\r\n        value: createTypedArray('float32', arrLen)\r\n      };\r\n      this.addEffect = addEffect;\r\n    }\r\n\r\n    function getProp(elem, data, type, mult, container) {\r\n      var p;\r\n\r\n      if (!data.k.length) {\r\n        p = new ValueProperty(elem, data, mult, container);\r\n      } else if (typeof data.k[0] === 'number') {\r\n        p = new MultiDimensionalProperty(elem, data, mult, container);\r\n      } else {\r\n        switch (type) {\r\n          case 0:\r\n            p = new KeyframedValueProperty(elem, data, mult, container);\r\n            break;\r\n\r\n          case 1:\r\n            p = new KeyframedMultidimensionalProperty(elem, data, mult, container);\r\n            break;\r\n\r\n          default:\r\n            break;\r\n        }\r\n      }\r\n\r\n      if (p.effectsSequence.length) {\r\n        container.addDynamicProperty(p);\r\n      }\r\n\r\n      return p;\r\n    }\r\n\r\n    var ob = {\r\n      getProp: getProp\r\n    };\r\n    return ob;\r\n  }();\r\n\r\n  function DynamicPropertyContainer() {}\r\n\r\n  DynamicPropertyContainer.prototype = {\r\n    addDynamicProperty: function addDynamicProperty(prop) {\r\n      if (this.dynamicProperties.indexOf(prop) === -1) {\r\n        this.dynamicProperties.push(prop);\r\n        this.container.addDynamicProperty(this);\r\n        this._isAnimated = true;\r\n      }\r\n    },\r\n    iterateDynamicProperties: function iterateDynamicProperties() {\r\n      this._mdf = false;\r\n      var i;\r\n      var len = this.dynamicProperties.length;\r\n\r\n      for (i = 0; i < len; i += 1) {\r\n        this.dynamicProperties[i].getValue();\r\n\r\n        if (this.dynamicProperties[i]._mdf) {\r\n          this._mdf = true;\r\n        }\r\n      }\r\n    },\r\n    initDynamicPropertyContainer: function initDynamicPropertyContainer(container) {\r\n      this.container = container;\r\n      this.dynamicProperties = [];\r\n      this._mdf = false;\r\n      this._isAnimated = false;\r\n    }\r\n  };\r\n\r\n  var pointPool = function () {\r\n    function create() {\r\n      return createTypedArray('float32', 2);\r\n    }\r\n\r\n    return poolFactory(8, create);\r\n  }();\r\n\r\n  function ShapePath() {\r\n    this.c = false;\r\n    this._length = 0;\r\n    this._maxLength = 8;\r\n    this.v = createSizedArray(this._maxLength);\r\n    this.o = createSizedArray(this._maxLength);\r\n    this.i = createSizedArray(this._maxLength);\r\n  }\r\n\r\n  ShapePath.prototype.setPathData = function (closed, len) {\r\n    this.c = closed;\r\n    this.setLength(len);\r\n    var i = 0;\r\n\r\n    while (i < len) {\r\n      this.v[i] = pointPool.newElement();\r\n      this.o[i] = pointPool.newElement();\r\n      this.i[i] = pointPool.newElement();\r\n      i += 1;\r\n    }\r\n  };\r\n\r\n  ShapePath.prototype.setLength = function (len) {\r\n    while (this._maxLength < len) {\r\n      this.doubleArrayLength();\r\n    }\r\n\r\n    this._length = len;\r\n  };\r\n\r\n  ShapePath.prototype.doubleArrayLength = function () {\r\n    this.v = this.v.concat(createSizedArray(this._maxLength));\r\n    this.i = this.i.concat(createSizedArray(this._maxLength));\r\n    this.o = this.o.concat(createSizedArray(this._maxLength));\r\n    this._maxLength *= 2;\r\n  };\r\n\r\n  ShapePath.prototype.setXYAt = function (x, y, type, pos, replace) {\r\n    var arr;\r\n    this._length = Math.max(this._length, pos + 1);\r\n\r\n    if (this._length >= this._maxLength) {\r\n      this.doubleArrayLength();\r\n    }\r\n\r\n    switch (type) {\r\n      case 'v':\r\n        arr = this.v;\r\n        break;\r\n\r\n      case 'i':\r\n        arr = this.i;\r\n        break;\r\n\r\n      case 'o':\r\n        arr = this.o;\r\n        break;\r\n\r\n      default:\r\n        arr = [];\r\n        break;\r\n    }\r\n\r\n    if (!arr[pos] || arr[pos] && !replace) {\r\n      arr[pos] = pointPool.newElement();\r\n    }\r\n\r\n    arr[pos][0] = x;\r\n    arr[pos][1] = y;\r\n  };\r\n\r\n  ShapePath.prototype.setTripleAt = function (vX, vY, oX, oY, iX, iY, pos, replace) {\r\n    this.setXYAt(vX, vY, 'v', pos, replace);\r\n    this.setXYAt(oX, oY, 'o', pos, replace);\r\n    this.setXYAt(iX, iY, 'i', pos, replace);\r\n  };\r\n\r\n  ShapePath.prototype.reverse = function () {\r\n    var newPath = new ShapePath();\r\n    newPath.setPathData(this.c, this._length);\r\n    var vertices = this.v;\r\n    var outPoints = this.o;\r\n    var inPoints = this.i;\r\n    var init = 0;\r\n\r\n    if (this.c) {\r\n      newPath.setTripleAt(vertices[0][0], vertices[0][1], inPoints[0][0], inPoints[0][1], outPoints[0][0], outPoints[0][1], 0, false);\r\n      init = 1;\r\n    }\r\n\r\n    var cnt = this._length - 1;\r\n    var len = this._length;\r\n    var i;\r\n\r\n    for (i = init; i < len; i += 1) {\r\n      newPath.setTripleAt(vertices[cnt][0], vertices[cnt][1], inPoints[cnt][0], inPoints[cnt][1], outPoints[cnt][0], outPoints[cnt][1], i, false);\r\n      cnt -= 1;\r\n    }\r\n\r\n    return newPath;\r\n  };\r\n\r\n  ShapePath.prototype.length = function () {\r\n    return this._length;\r\n  };\r\n\r\n  var shapePool = function () {\r\n    function create() {\r\n      return new ShapePath();\r\n    }\r\n\r\n    function release(shapePath) {\r\n      var len = shapePath._length;\r\n      var i;\r\n\r\n      for (i = 0; i < len; i += 1) {\r\n        pointPool.release(shapePath.v[i]);\r\n        pointPool.release(shapePath.i[i]);\r\n        pointPool.release(shapePath.o[i]);\r\n        shapePath.v[i] = null;\r\n        shapePath.i[i] = null;\r\n        shapePath.o[i] = null;\r\n      }\r\n\r\n      shapePath._length = 0;\r\n      shapePath.c = false;\r\n    }\r\n\r\n    function clone(shape) {\r\n      var cloned = factory.newElement();\r\n      var i;\r\n      var len = shape._length === undefined ? shape.v.length : shape._length;\r\n      cloned.setLength(len);\r\n      cloned.c = shape.c;\r\n\r\n      for (i = 0; i < len; i += 1) {\r\n        cloned.setTripleAt(shape.v[i][0], shape.v[i][1], shape.o[i][0], shape.o[i][1], shape.i[i][0], shape.i[i][1], i);\r\n      }\r\n\r\n      return cloned;\r\n    }\r\n\r\n    var factory = poolFactory(4, create, release);\r\n    factory.clone = clone;\r\n    return factory;\r\n  }();\r\n\r\n  function ShapeCollection() {\r\n    this._length = 0;\r\n    this._maxLength = 4;\r\n    this.shapes = createSizedArray(this._maxLength);\r\n  }\r\n\r\n  ShapeCollection.prototype.addShape = function (shapeData) {\r\n    if (this._length === this._maxLength) {\r\n      this.shapes = this.shapes.concat(createSizedArray(this._maxLength));\r\n      this._maxLength *= 2;\r\n    }\r\n\r\n    this.shapes[this._length] = shapeData;\r\n    this._length += 1;\r\n  };\r\n\r\n  ShapeCollection.prototype.releaseShapes = function () {\r\n    var i;\r\n\r\n    for (i = 0; i < this._length; i += 1) {\r\n      shapePool.release(this.shapes[i]);\r\n    }\r\n\r\n    this._length = 0;\r\n  };\r\n\r\n  var shapeCollectionPool = function () {\r\n    var ob = {\r\n      newShapeCollection: newShapeCollection,\r\n      release: release\r\n    };\r\n    var _length = 0;\r\n    var _maxLength = 4;\r\n    var pool = createSizedArray(_maxLength);\r\n\r\n    function newShapeCollection() {\r\n      var shapeCollection;\r\n\r\n      if (_length) {\r\n        _length -= 1;\r\n        shapeCollection = pool[_length];\r\n      } else {\r\n        shapeCollection = new ShapeCollection();\r\n      }\r\n\r\n      return shapeCollection;\r\n    }\r\n\r\n    function release(shapeCollection) {\r\n      var i;\r\n      var len = shapeCollection._length;\r\n\r\n      for (i = 0; i < len; i += 1) {\r\n        shapePool.release(shapeCollection.shapes[i]);\r\n      }\r\n\r\n      shapeCollection._length = 0;\r\n\r\n      if (_length === _maxLength) {\r\n        pool = pooling[\"double\"](pool);\r\n        _maxLength *= 2;\r\n      }\r\n\r\n      pool[_length] = shapeCollection;\r\n      _length += 1;\r\n    }\r\n\r\n    return ob;\r\n  }();\r\n\r\n  var ShapePropertyFactory = function () {\r\n    var initFrame = -999999;\r\n\r\n    function interpolateShape(frameNum, previousValue, caching) {\r\n      var iterationIndex = caching.lastIndex;\r\n      var keyPropS;\r\n      var keyPropE;\r\n      var isHold;\r\n      var j;\r\n      var k;\r\n      var jLen;\r\n      var kLen;\r\n      var perc;\r\n      var vertexValue;\r\n      var kf = this.keyframes;\r\n\r\n      if (frameNum < kf[0].t - this.offsetTime) {\r\n        keyPropS = kf[0].s[0];\r\n        isHold = true;\r\n        iterationIndex = 0;\r\n      } else if (frameNum >= kf[kf.length - 1].t - this.offsetTime) {\r\n        keyPropS = kf[kf.length - 1].s ? kf[kf.length - 1].s[0] : kf[kf.length - 2].e[0];\r\n        /* if(kf[kf.length - 1].s){\r\n                  keyPropS = kf[kf.length - 1].s[0];\r\n              }else{\r\n                  keyPropS = kf[kf.length - 2].e[0];\r\n              } */\r\n\r\n        isHold = true;\r\n      } else {\r\n        var i = iterationIndex;\r\n        var len = kf.length - 1;\r\n        var flag = true;\r\n        var keyData;\r\n        var nextKeyData;\r\n        var keyframeMetadata;\r\n\r\n        while (flag) {\r\n          keyData = kf[i];\r\n          nextKeyData = kf[i + 1];\r\n\r\n          if (nextKeyData.t - this.offsetTime > frameNum) {\r\n            break;\r\n          }\r\n\r\n          if (i < len - 1) {\r\n            i += 1;\r\n          } else {\r\n            flag = false;\r\n          }\r\n        }\r\n\r\n        keyframeMetadata = this.keyframesMetadata[i] || {};\r\n        isHold = keyData.h === 1;\r\n        iterationIndex = i;\r\n\r\n        if (!isHold) {\r\n          if (frameNum >= nextKeyData.t - this.offsetTime) {\r\n            perc = 1;\r\n          } else if (frameNum < keyData.t - this.offsetTime) {\r\n            perc = 0;\r\n          } else {\r\n            var fnc;\r\n\r\n            if (keyframeMetadata.__fnct) {\r\n              fnc = keyframeMetadata.__fnct;\r\n            } else {\r\n              fnc = BezierFactory.getBezierEasing(keyData.o.x, keyData.o.y, keyData.i.x, keyData.i.y).get;\r\n              keyframeMetadata.__fnct = fnc;\r\n            }\r\n\r\n            perc = fnc((frameNum - (keyData.t - this.offsetTime)) / (nextKeyData.t - this.offsetTime - (keyData.t - this.offsetTime)));\r\n          }\r\n\r\n          keyPropE = nextKeyData.s ? nextKeyData.s[0] : keyData.e[0];\r\n        }\r\n\r\n        keyPropS = keyData.s[0];\r\n      }\r\n\r\n      jLen = previousValue._length;\r\n      kLen = keyPropS.i[0].length;\r\n      caching.lastIndex = iterationIndex;\r\n\r\n      for (j = 0; j < jLen; j += 1) {\r\n        for (k = 0; k < kLen; k += 1) {\r\n          vertexValue = isHold ? keyPropS.i[j][k] : keyPropS.i[j][k] + (keyPropE.i[j][k] - keyPropS.i[j][k]) * perc;\r\n          previousValue.i[j][k] = vertexValue;\r\n          vertexValue = isHold ? keyPropS.o[j][k] : keyPropS.o[j][k] + (keyPropE.o[j][k] - keyPropS.o[j][k]) * perc;\r\n          previousValue.o[j][k] = vertexValue;\r\n          vertexValue = isHold ? keyPropS.v[j][k] : keyPropS.v[j][k] + (keyPropE.v[j][k] - keyPropS.v[j][k]) * perc;\r\n          previousValue.v[j][k] = vertexValue;\r\n        }\r\n      }\r\n    }\r\n\r\n    function interpolateShapeCurrentTime() {\r\n      var frameNum = this.comp.renderedFrame - this.offsetTime;\r\n      var initTime = this.keyframes[0].t - this.offsetTime;\r\n      var endTime = this.keyframes[this.keyframes.length - 1].t - this.offsetTime;\r\n      var lastFrame = this._caching.lastFrame;\r\n\r\n      if (!(lastFrame !== initFrame && (lastFrame < initTime && frameNum < initTime || lastFrame > endTime && frameNum > endTime))) {\r\n        /// /\r\n        this._caching.lastIndex = lastFrame < frameNum ? this._caching.lastIndex : 0;\r\n        this.interpolateShape(frameNum, this.pv, this._caching); /// /\r\n      }\r\n\r\n      this._caching.lastFrame = frameNum;\r\n      return this.pv;\r\n    }\r\n\r\n    function resetShape() {\r\n      this.paths = this.localShapeCollection;\r\n    }\r\n\r\n    function shapesEqual(shape1, shape2) {\r\n      if (shape1._length !== shape2._length || shape1.c !== shape2.c) {\r\n        return false;\r\n      }\r\n\r\n      var i;\r\n      var len = shape1._length;\r\n\r\n      for (i = 0; i < len; i += 1) {\r\n        if (shape1.v[i][0] !== shape2.v[i][0] || shape1.v[i][1] !== shape2.v[i][1] || shape1.o[i][0] !== shape2.o[i][0] || shape1.o[i][1] !== shape2.o[i][1] || shape1.i[i][0] !== shape2.i[i][0] || shape1.i[i][1] !== shape2.i[i][1]) {\r\n          return false;\r\n        }\r\n      }\r\n\r\n      return true;\r\n    }\r\n\r\n    function setVValue(newPath) {\r\n      if (!shapesEqual(this.v, newPath)) {\r\n        this.v = shapePool.clone(newPath);\r\n        this.localShapeCollection.releaseShapes();\r\n        this.localShapeCollection.addShape(this.v);\r\n        this._mdf = true;\r\n        this.paths = this.localShapeCollection;\r\n      }\r\n    }\r\n\r\n    function processEffectsSequence() {\r\n      if (this.elem.globalData.frameId === this.frameId) {\r\n        return;\r\n      }\r\n\r\n      if (!this.effectsSequence.length) {\r\n        this._mdf = false;\r\n        return;\r\n      }\r\n\r\n      if (this.lock) {\r\n        this.setVValue(this.pv);\r\n        return;\r\n      }\r\n\r\n      this.lock = true;\r\n      this._mdf = false;\r\n      var finalValue;\r\n\r\n      if (this.kf) {\r\n        finalValue = this.pv;\r\n      } else if (this.data.ks) {\r\n        finalValue = this.data.ks.k;\r\n      } else {\r\n        finalValue = this.data.pt.k;\r\n      }\r\n\r\n      var i;\r\n      var len = this.effectsSequence.length;\r\n\r\n      for (i = 0; i < len; i += 1) {\r\n        finalValue = this.effectsSequence[i](finalValue);\r\n      }\r\n\r\n      this.setVValue(finalValue);\r\n      this.lock = false;\r\n      this.frameId = this.elem.globalData.frameId;\r\n    }\r\n\r\n    function ShapeProperty(elem, data, type) {\r\n      this.propType = 'shape';\r\n      this.comp = elem.comp;\r\n      this.container = elem;\r\n      this.elem = elem;\r\n      this.data = data;\r\n      this.k = false;\r\n      this.kf = false;\r\n      this._mdf = false;\r\n      var pathData = type === 3 ? data.pt.k : data.ks.k;\r\n      this.v = shapePool.clone(pathData);\r\n      this.pv = shapePool.clone(this.v);\r\n      this.localShapeCollection = shapeCollectionPool.newShapeCollection();\r\n      this.paths = this.localShapeCollection;\r\n      this.paths.addShape(this.v);\r\n      this.reset = resetShape;\r\n      this.effectsSequence = [];\r\n    }\r\n\r\n    function addEffect(effectFunction) {\r\n      this.effectsSequence.push(effectFunction);\r\n      this.container.addDynamicProperty(this);\r\n    }\r\n\r\n    ShapeProperty.prototype.interpolateShape = interpolateShape;\r\n    ShapeProperty.prototype.getValue = processEffectsSequence;\r\n    ShapeProperty.prototype.setVValue = setVValue;\r\n    ShapeProperty.prototype.addEffect = addEffect;\r\n\r\n    function KeyframedShapeProperty(elem, data, type) {\r\n      this.propType = 'shape';\r\n      this.comp = elem.comp;\r\n      this.elem = elem;\r\n      this.container = elem;\r\n      this.offsetTime = elem.data.st;\r\n      this.keyframes = type === 3 ? data.pt.k : data.ks.k;\r\n      this.keyframesMetadata = [];\r\n      this.k = true;\r\n      this.kf = true;\r\n      var len = this.keyframes[0].s[0].i.length;\r\n      this.v = shapePool.newElement();\r\n      this.v.setPathData(this.keyframes[0].s[0].c, len);\r\n      this.pv = shapePool.clone(this.v);\r\n      this.localShapeCollection = shapeCollectionPool.newShapeCollection();\r\n      this.paths = this.localShapeCollection;\r\n      this.paths.addShape(this.v);\r\n      this.lastFrame = initFrame;\r\n      this.reset = resetShape;\r\n      this._caching = {\r\n        lastFrame: initFrame,\r\n        lastIndex: 0\r\n      };\r\n      this.effectsSequence = [interpolateShapeCurrentTime.bind(this)];\r\n    }\r\n\r\n    KeyframedShapeProperty.prototype.getValue = processEffectsSequence;\r\n    KeyframedShapeProperty.prototype.interpolateShape = interpolateShape;\r\n    KeyframedShapeProperty.prototype.setVValue = setVValue;\r\n    KeyframedShapeProperty.prototype.addEffect = addEffect;\r\n\r\n    var EllShapeProperty = function () {\r\n      var cPoint = roundCorner;\r\n\r\n      function EllShapePropertyFactory(elem, data) {\r\n        this.v = shapePool.newElement();\r\n        this.v.setPathData(true, 4);\r\n        this.localShapeCollection = shapeCollectionPool.newShapeCollection();\r\n        this.paths = this.localShapeCollection;\r\n        this.localShapeCollection.addShape(this.v);\r\n        this.d = data.d;\r\n        this.elem = elem;\r\n        this.comp = elem.comp;\r\n        this.frameId = -1;\r\n        this.initDynamicPropertyContainer(elem);\r\n        this.p = PropertyFactory.getProp(elem, data.p, 1, 0, this);\r\n        this.s = PropertyFactory.getProp(elem, data.s, 1, 0, this);\r\n\r\n        if (this.dynamicProperties.length) {\r\n          this.k = true;\r\n        } else {\r\n          this.k = false;\r\n          this.convertEllToPath();\r\n        }\r\n      }\r\n\r\n      EllShapePropertyFactory.prototype = {\r\n        reset: resetShape,\r\n        getValue: function getValue() {\r\n          if (this.elem.globalData.frameId === this.frameId) {\r\n            return;\r\n          }\r\n\r\n          this.frameId = this.elem.globalData.frameId;\r\n          this.iterateDynamicProperties();\r\n\r\n          if (this._mdf) {\r\n            this.convertEllToPath();\r\n          }\r\n        },\r\n        convertEllToPath: function convertEllToPath() {\r\n          var p0 = this.p.v[0];\r\n          var p1 = this.p.v[1];\r\n          var s0 = this.s.v[0] / 2;\r\n          var s1 = this.s.v[1] / 2;\r\n\r\n          var _cw = this.d !== 3;\r\n\r\n          var _v = this.v;\r\n          _v.v[0][0] = p0;\r\n          _v.v[0][1] = p1 - s1;\r\n          _v.v[1][0] = _cw ? p0 + s0 : p0 - s0;\r\n          _v.v[1][1] = p1;\r\n          _v.v[2][0] = p0;\r\n          _v.v[2][1] = p1 + s1;\r\n          _v.v[3][0] = _cw ? p0 - s0 : p0 + s0;\r\n          _v.v[3][1] = p1;\r\n          _v.i[0][0] = _cw ? p0 - s0 * cPoint : p0 + s0 * cPoint;\r\n          _v.i[0][1] = p1 - s1;\r\n          _v.i[1][0] = _cw ? p0 + s0 : p0 - s0;\r\n          _v.i[1][1] = p1 - s1 * cPoint;\r\n          _v.i[2][0] = _cw ? p0 + s0 * cPoint : p0 - s0 * cPoint;\r\n          _v.i[2][1] = p1 + s1;\r\n          _v.i[3][0] = _cw ? p0 - s0 : p0 + s0;\r\n          _v.i[3][1] = p1 + s1 * cPoint;\r\n          _v.o[0][0] = _cw ? p0 + s0 * cPoint : p0 - s0 * cPoint;\r\n          _v.o[0][1] = p1 - s1;\r\n          _v.o[1][0] = _cw ? p0 + s0 : p0 - s0;\r\n          _v.o[1][1] = p1 + s1 * cPoint;\r\n          _v.o[2][0] = _cw ? p0 - s0 * cPoint : p0 + s0 * cPoint;\r\n          _v.o[2][1] = p1 + s1;\r\n          _v.o[3][0] = _cw ? p0 - s0 : p0 + s0;\r\n          _v.o[3][1] = p1 - s1 * cPoint;\r\n        }\r\n      };\r\n      extendPrototype([DynamicPropertyContainer], EllShapePropertyFactory);\r\n      return EllShapePropertyFactory;\r\n    }();\r\n\r\n    var StarShapeProperty = function () {\r\n      function StarShapePropertyFactory(elem, data) {\r\n        this.v = shapePool.newElement();\r\n        this.v.setPathData(true, 0);\r\n        this.elem = elem;\r\n        this.comp = elem.comp;\r\n        this.data = data;\r\n        this.frameId = -1;\r\n        this.d = data.d;\r\n        this.initDynamicPropertyContainer(elem);\r\n\r\n        if (data.sy === 1) {\r\n          this.ir = PropertyFactory.getProp(elem, data.ir, 0, 0, this);\r\n          this.is = PropertyFactory.getProp(elem, data.is, 0, 0.01, this);\r\n          this.convertToPath = this.convertStarToPath;\r\n        } else {\r\n          this.convertToPath = this.convertPolygonToPath;\r\n        }\r\n\r\n        this.pt = PropertyFactory.getProp(elem, data.pt, 0, 0, this);\r\n        this.p = PropertyFactory.getProp(elem, data.p, 1, 0, this);\r\n        this.r = PropertyFactory.getProp(elem, data.r, 0, degToRads, this);\r\n        this.or = PropertyFactory.getProp(elem, data.or, 0, 0, this);\r\n        this.os = PropertyFactory.getProp(elem, data.os, 0, 0.01, this);\r\n        this.localShapeCollection = shapeCollectionPool.newShapeCollection();\r\n        this.localShapeCollection.addShape(this.v);\r\n        this.paths = this.localShapeCollection;\r\n\r\n        if (this.dynamicProperties.length) {\r\n          this.k = true;\r\n        } else {\r\n          this.k = false;\r\n          this.convertToPath();\r\n        }\r\n      }\r\n\r\n      StarShapePropertyFactory.prototype = {\r\n        reset: resetShape,\r\n        getValue: function getValue() {\r\n          if (this.elem.globalData.frameId === this.frameId) {\r\n            return;\r\n          }\r\n\r\n          this.frameId = this.elem.globalData.frameId;\r\n          this.iterateDynamicProperties();\r\n\r\n          if (this._mdf) {\r\n            this.convertToPath();\r\n          }\r\n        },\r\n        convertStarToPath: function convertStarToPath() {\r\n          var numPts = Math.floor(this.pt.v) * 2;\r\n          var angle = Math.PI * 2 / numPts;\r\n          /* this.v.v.length = numPts;\r\n                  this.v.i.length = numPts;\r\n                  this.v.o.length = numPts; */\r\n\r\n          var longFlag = true;\r\n          var longRad = this.or.v;\r\n          var shortRad = this.ir.v;\r\n          var longRound = this.os.v;\r\n          var shortRound = this.is.v;\r\n          var longPerimSegment = 2 * Math.PI * longRad / (numPts * 2);\r\n          var shortPerimSegment = 2 * Math.PI * shortRad / (numPts * 2);\r\n          var i;\r\n          var rad;\r\n          var roundness;\r\n          var perimSegment;\r\n          var currentAng = -Math.PI / 2;\r\n          currentAng += this.r.v;\r\n          var dir = this.data.d === 3 ? -1 : 1;\r\n          this.v._length = 0;\r\n\r\n          for (i = 0; i < numPts; i += 1) {\r\n            rad = longFlag ? longRad : shortRad;\r\n            roundness = longFlag ? longRound : shortRound;\r\n            perimSegment = longFlag ? longPerimSegment : shortPerimSegment;\r\n            var x = rad * Math.cos(currentAng);\r\n            var y = rad * Math.sin(currentAng);\r\n            var ox = x === 0 && y === 0 ? 0 : y / Math.sqrt(x * x + y * y);\r\n            var oy = x === 0 && y === 0 ? 0 : -x / Math.sqrt(x * x + y * y);\r\n            x += +this.p.v[0];\r\n            y += +this.p.v[1];\r\n            this.v.setTripleAt(x, y, x - ox * perimSegment * roundness * dir, y - oy * perimSegment * roundness * dir, x + ox * perimSegment * roundness * dir, y + oy * perimSegment * roundness * dir, i, true);\r\n            /* this.v.v[i] = [x,y];\r\n                      this.v.i[i] = [x+ox*perimSegment*roundness*dir,y+oy*perimSegment*roundness*dir];\r\n                      this.v.o[i] = [x-ox*perimSegment*roundness*dir,y-oy*perimSegment*roundness*dir];\r\n                      this.v._length = numPts; */\r\n\r\n            longFlag = !longFlag;\r\n            currentAng += angle * dir;\r\n          }\r\n        },\r\n        convertPolygonToPath: function convertPolygonToPath() {\r\n          var numPts = Math.floor(this.pt.v);\r\n          var angle = Math.PI * 2 / numPts;\r\n          var rad = this.or.v;\r\n          var roundness = this.os.v;\r\n          var perimSegment = 2 * Math.PI * rad / (numPts * 4);\r\n          var i;\r\n          var currentAng = -Math.PI * 0.5;\r\n          var dir = this.data.d === 3 ? -1 : 1;\r\n          currentAng += this.r.v;\r\n          this.v._length = 0;\r\n\r\n          for (i = 0; i < numPts; i += 1) {\r\n            var x = rad * Math.cos(currentAng);\r\n            var y = rad * Math.sin(currentAng);\r\n            var ox = x === 0 && y === 0 ? 0 : y / Math.sqrt(x * x + y * y);\r\n            var oy = x === 0 && y === 0 ? 0 : -x / Math.sqrt(x * x + y * y);\r\n            x += +this.p.v[0];\r\n            y += +this.p.v[1];\r\n            this.v.setTripleAt(x, y, x - ox * perimSegment * roundness * dir, y - oy * perimSegment * roundness * dir, x + ox * perimSegment * roundness * dir, y + oy * perimSegment * roundness * dir, i, true);\r\n            currentAng += angle * dir;\r\n          }\r\n\r\n          this.paths.length = 0;\r\n          this.paths[0] = this.v;\r\n        }\r\n      };\r\n      extendPrototype([DynamicPropertyContainer], StarShapePropertyFactory);\r\n      return StarShapePropertyFactory;\r\n    }();\r\n\r\n    var RectShapeProperty = function () {\r\n      function RectShapePropertyFactory(elem, data) {\r\n        this.v = shapePool.newElement();\r\n        this.v.c = true;\r\n        this.localShapeCollection = shapeCollectionPool.newShapeCollection();\r\n        this.localShapeCollection.addShape(this.v);\r\n        this.paths = this.localShapeCollection;\r\n        this.elem = elem;\r\n        this.comp = elem.comp;\r\n        this.frameId = -1;\r\n        this.d = data.d;\r\n        this.initDynamicPropertyContainer(elem);\r\n        this.p = PropertyFactory.getProp(elem, data.p, 1, 0, this);\r\n        this.s = PropertyFactory.getProp(elem, data.s, 1, 0, this);\r\n        this.r = PropertyFactory.getProp(elem, data.r, 0, 0, this);\r\n\r\n        if (this.dynamicProperties.length) {\r\n          this.k = true;\r\n        } else {\r\n          this.k = false;\r\n          this.convertRectToPath();\r\n        }\r\n      }\r\n\r\n      RectShapePropertyFactory.prototype = {\r\n        convertRectToPath: function convertRectToPath() {\r\n          var p0 = this.p.v[0];\r\n          var p1 = this.p.v[1];\r\n          var v0 = this.s.v[0] / 2;\r\n          var v1 = this.s.v[1] / 2;\r\n          var round = bmMin(v0, v1, this.r.v);\r\n          var cPoint = round * (1 - roundCorner);\r\n          this.v._length = 0;\r\n\r\n          if (this.d === 2 || this.d === 1) {\r\n            this.v.setTripleAt(p0 + v0, p1 - v1 + round, p0 + v0, p1 - v1 + round, p0 + v0, p1 - v1 + cPoint, 0, true);\r\n            this.v.setTripleAt(p0 + v0, p1 + v1 - round, p0 + v0, p1 + v1 - cPoint, p0 + v0, p1 + v1 - round, 1, true);\r\n\r\n            if (round !== 0) {\r\n              this.v.setTripleAt(p0 + v0 - round, p1 + v1, p0 + v0 - round, p1 + v1, p0 + v0 - cPoint, p1 + v1, 2, true);\r\n              this.v.setTripleAt(p0 - v0 + round, p1 + v1, p0 - v0 + cPoint, p1 + v1, p0 - v0 + round, p1 + v1, 3, true);\r\n              this.v.setTripleAt(p0 - v0, p1 + v1 - round, p0 - v0, p1 + v1 - round, p0 - v0, p1 + v1 - cPoint, 4, true);\r\n              this.v.setTripleAt(p0 - v0, p1 - v1 + round, p0 - v0, p1 - v1 + cPoint, p0 - v0, p1 - v1 + round, 5, true);\r\n              this.v.setTripleAt(p0 - v0 + round, p1 - v1, p0 - v0 + round, p1 - v1, p0 - v0 + cPoint, p1 - v1, 6, true);\r\n              this.v.setTripleAt(p0 + v0 - round, p1 - v1, p0 + v0 - cPoint, p1 - v1, p0 + v0 - round, p1 - v1, 7, true);\r\n            } else {\r\n              this.v.setTripleAt(p0 - v0, p1 + v1, p0 - v0 + cPoint, p1 + v1, p0 - v0, p1 + v1, 2);\r\n              this.v.setTripleAt(p0 - v0, p1 - v1, p0 - v0, p1 - v1 + cPoint, p0 - v0, p1 - v1, 3);\r\n            }\r\n          } else {\r\n            this.v.setTripleAt(p0 + v0, p1 - v1 + round, p0 + v0, p1 - v1 + cPoint, p0 + v0, p1 - v1 + round, 0, true);\r\n\r\n            if (round !== 0) {\r\n              this.v.setTripleAt(p0 + v0 - round, p1 - v1, p0 + v0 - round, p1 - v1, p0 + v0 - cPoint, p1 - v1, 1, true);\r\n              this.v.setTripleAt(p0 - v0 + round, p1 - v1, p0 - v0 + cPoint, p1 - v1, p0 - v0 + round, p1 - v1, 2, true);\r\n              this.v.setTripleAt(p0 - v0, p1 - v1 + round, p0 - v0, p1 - v1 + round, p0 - v0, p1 - v1 + cPoint, 3, true);\r\n              this.v.setTripleAt(p0 - v0, p1 + v1 - round, p0 - v0, p1 + v1 - cPoint, p0 - v0, p1 + v1 - round, 4, true);\r\n              this.v.setTripleAt(p0 - v0 + round, p1 + v1, p0 - v0 + round, p1 + v1, p0 - v0 + cPoint, p1 + v1, 5, true);\r\n              this.v.setTripleAt(p0 + v0 - round, p1 + v1, p0 + v0 - cPoint, p1 + v1, p0 + v0 - round, p1 + v1, 6, true);\r\n              this.v.setTripleAt(p0 + v0, p1 + v1 - round, p0 + v0, p1 + v1 - round, p0 + v0, p1 + v1 - cPoint, 7, true);\r\n            } else {\r\n              this.v.setTripleAt(p0 - v0, p1 - v1, p0 - v0 + cPoint, p1 - v1, p0 - v0, p1 - v1, 1, true);\r\n              this.v.setTripleAt(p0 - v0, p1 + v1, p0 - v0, p1 + v1 - cPoint, p0 - v0, p1 + v1, 2, true);\r\n              this.v.setTripleAt(p0 + v0, p1 + v1, p0 + v0 - cPoint, p1 + v1, p0 + v0, p1 + v1, 3, true);\r\n            }\r\n          }\r\n        },\r\n        getValue: function getValue() {\r\n          if (this.elem.globalData.frameId === this.frameId) {\r\n            return;\r\n          }\r\n\r\n          this.frameId = this.elem.globalData.frameId;\r\n          this.iterateDynamicProperties();\r\n\r\n          if (this._mdf) {\r\n            this.convertRectToPath();\r\n          }\r\n        },\r\n        reset: resetShape\r\n      };\r\n      extendPrototype([DynamicPropertyContainer], RectShapePropertyFactory);\r\n      return RectShapePropertyFactory;\r\n    }();\r\n\r\n    function getShapeProp(elem, data, type) {\r\n      var prop;\r\n\r\n      if (type === 3 || type === 4) {\r\n        var dataProp = type === 3 ? data.pt : data.ks;\r\n        var keys = dataProp.k;\r\n\r\n        if (keys.length) {\r\n          prop = new KeyframedShapeProperty(elem, data, type);\r\n        } else {\r\n          prop = new ShapeProperty(elem, data, type);\r\n        }\r\n      } else if (type === 5) {\r\n        prop = new RectShapeProperty(elem, data);\r\n      } else if (type === 6) {\r\n        prop = new EllShapeProperty(elem, data);\r\n      } else if (type === 7) {\r\n        prop = new StarShapeProperty(elem, data);\r\n      }\r\n\r\n      if (prop.k) {\r\n        elem.addDynamicProperty(prop);\r\n      }\r\n\r\n      return prop;\r\n    }\r\n\r\n    function getConstructorFunction() {\r\n      return ShapeProperty;\r\n    }\r\n\r\n    function getKeyframedConstructorFunction() {\r\n      return KeyframedShapeProperty;\r\n    }\r\n\r\n    var ob = {};\r\n    ob.getShapeProp = getShapeProp;\r\n    ob.getConstructorFunction = getConstructorFunction;\r\n    ob.getKeyframedConstructorFunction = getKeyframedConstructorFunction;\r\n    return ob;\r\n  }();\r\n\r\n  /*!\r\n   Transformation Matrix v2.0\r\n   (c) Epistemex 2014-2015\r\n   www.epistemex.com\r\n   By Ken Fyrstenberg\r\n   Contributions by leeoniya.\r\n   License: MIT, header required.\r\n   */\r\n\r\n  /**\r\n   * 2D transformation matrix object initialized with identity matrix.\r\n   *\r\n   * The matrix can synchronize a canvas context by supplying the context\r\n   * as an argument, or later apply current absolute transform to an\r\n   * existing context.\r\n   *\r\n   * All values are handled as floating point values.\r\n   *\r\n   * @param {CanvasRenderingContext2D} [context] - Optional context to sync with Matrix\r\n   * @prop {number} a - scale x\r\n   * @prop {number} b - shear y\r\n   * @prop {number} c - shear x\r\n   * @prop {number} d - scale y\r\n   * @prop {number} e - translate x\r\n   * @prop {number} f - translate y\r\n   * @prop {CanvasRenderingContext2D|null} [context=null] - set or get current canvas context\r\n   * @constructor\r\n   */\r\n\r\n  var Matrix = function () {\r\n    var _cos = Math.cos;\r\n    var _sin = Math.sin;\r\n    var _tan = Math.tan;\r\n    var _rnd = Math.round;\r\n\r\n    function reset() {\r\n      this.props[0] = 1;\r\n      this.props[1] = 0;\r\n      this.props[2] = 0;\r\n      this.props[3] = 0;\r\n      this.props[4] = 0;\r\n      this.props[5] = 1;\r\n      this.props[6] = 0;\r\n      this.props[7] = 0;\r\n      this.props[8] = 0;\r\n      this.props[9] = 0;\r\n      this.props[10] = 1;\r\n      this.props[11] = 0;\r\n      this.props[12] = 0;\r\n      this.props[13] = 0;\r\n      this.props[14] = 0;\r\n      this.props[15] = 1;\r\n      return this;\r\n    }\r\n\r\n    function rotate(angle) {\r\n      if (angle === 0) {\r\n        return this;\r\n      }\r\n\r\n      var mCos = _cos(angle);\r\n\r\n      var mSin = _sin(angle);\r\n\r\n      return this._t(mCos, -mSin, 0, 0, mSin, mCos, 0, 0, 0, 0, 1, 0, 0, 0, 0, 1);\r\n    }\r\n\r\n    function rotateX(angle) {\r\n      if (angle === 0) {\r\n        return this;\r\n      }\r\n\r\n      var mCos = _cos(angle);\r\n\r\n      var mSin = _sin(angle);\r\n\r\n      return this._t(1, 0, 0, 0, 0, mCos, -mSin, 0, 0, mSin, mCos, 0, 0, 0, 0, 1);\r\n    }\r\n\r\n    function rotateY(angle) {\r\n      if (angle === 0) {\r\n        return this;\r\n      }\r\n\r\n      var mCos = _cos(angle);\r\n\r\n      var mSin = _sin(angle);\r\n\r\n      return this._t(mCos, 0, mSin, 0, 0, 1, 0, 0, -mSin, 0, mCos, 0, 0, 0, 0, 1);\r\n    }\r\n\r\n    function rotateZ(angle) {\r\n      if (angle === 0) {\r\n        return this;\r\n      }\r\n\r\n      var mCos = _cos(angle);\r\n\r\n      var mSin = _sin(angle);\r\n\r\n      return this._t(mCos, -mSin, 0, 0, mSin, mCos, 0, 0, 0, 0, 1, 0, 0, 0, 0, 1);\r\n    }\r\n\r\n    function shear(sx, sy) {\r\n      return this._t(1, sy, sx, 1, 0, 0);\r\n    }\r\n\r\n    function skew(ax, ay) {\r\n      return this.shear(_tan(ax), _tan(ay));\r\n    }\r\n\r\n    function skewFromAxis(ax, angle) {\r\n      var mCos = _cos(angle);\r\n\r\n      var mSin = _sin(angle);\r\n\r\n      return this._t(mCos, mSin, 0, 0, -mSin, mCos, 0, 0, 0, 0, 1, 0, 0, 0, 0, 1)._t(1, 0, 0, 0, _tan(ax), 1, 0, 0, 0, 0, 1, 0, 0, 0, 0, 1)._t(mCos, -mSin, 0, 0, mSin, mCos, 0, 0, 0, 0, 1, 0, 0, 0, 0, 1); // return this._t(mCos, mSin, -mSin, mCos, 0, 0)._t(1, 0, _tan(ax), 1, 0, 0)._t(mCos, -mSin, mSin, mCos, 0, 0);\r\n    }\r\n\r\n    function scale(sx, sy, sz) {\r\n      if (!sz && sz !== 0) {\r\n        sz = 1;\r\n      }\r\n\r\n      if (sx === 1 && sy === 1 && sz === 1) {\r\n        return this;\r\n      }\r\n\r\n      return this._t(sx, 0, 0, 0, 0, sy, 0, 0, 0, 0, sz, 0, 0, 0, 0, 1);\r\n    }\r\n\r\n    function setTransform(a, b, c, d, e, f, g, h, i, j, k, l, m, n, o, p) {\r\n      this.props[0] = a;\r\n      this.props[1] = b;\r\n      this.props[2] = c;\r\n      this.props[3] = d;\r\n      this.props[4] = e;\r\n      this.props[5] = f;\r\n      this.props[6] = g;\r\n      this.props[7] = h;\r\n      this.props[8] = i;\r\n      this.props[9] = j;\r\n      this.props[10] = k;\r\n      this.props[11] = l;\r\n      this.props[12] = m;\r\n      this.props[13] = n;\r\n      this.props[14] = o;\r\n      this.props[15] = p;\r\n      return this;\r\n    }\r\n\r\n    function translate(tx, ty, tz) {\r\n      tz = tz || 0;\r\n\r\n      if (tx !== 0 || ty !== 0 || tz !== 0) {\r\n        return this._t(1, 0, 0, 0, 0, 1, 0, 0, 0, 0, 1, 0, tx, ty, tz, 1);\r\n      }\r\n\r\n      return this;\r\n    }\r\n\r\n    function transform(a2, b2, c2, d2, e2, f2, g2, h2, i2, j2, k2, l2, m2, n2, o2, p2) {\r\n      var _p = this.props;\r\n\r\n      if (a2 === 1 && b2 === 0 && c2 === 0 && d2 === 0 && e2 === 0 && f2 === 1 && g2 === 0 && h2 === 0 && i2 === 0 && j2 === 0 && k2 === 1 && l2 === 0) {\r\n        // NOTE: commenting this condition because TurboFan deoptimizes code when present\r\n        // if(m2 !== 0 || n2 !== 0 || o2 !== 0){\r\n        _p[12] = _p[12] * a2 + _p[15] * m2;\r\n        _p[13] = _p[13] * f2 + _p[15] * n2;\r\n        _p[14] = _p[14] * k2 + _p[15] * o2;\r\n        _p[15] *= p2; // }\r\n\r\n        this._identityCalculated = false;\r\n        return this;\r\n      }\r\n\r\n      var a1 = _p[0];\r\n      var b1 = _p[1];\r\n      var c1 = _p[2];\r\n      var d1 = _p[3];\r\n      var e1 = _p[4];\r\n      var f1 = _p[5];\r\n      var g1 = _p[6];\r\n      var h1 = _p[7];\r\n      var i1 = _p[8];\r\n      var j1 = _p[9];\r\n      var k1 = _p[10];\r\n      var l1 = _p[11];\r\n      var m1 = _p[12];\r\n      var n1 = _p[13];\r\n      var o1 = _p[14];\r\n      var p1 = _p[15];\r\n      /* matrix order (canvas compatible):\r\n           * ace\r\n           * bdf\r\n           * 001\r\n           */\r\n\r\n      _p[0] = a1 * a2 + b1 * e2 + c1 * i2 + d1 * m2;\r\n      _p[1] = a1 * b2 + b1 * f2 + c1 * j2 + d1 * n2;\r\n      _p[2] = a1 * c2 + b1 * g2 + c1 * k2 + d1 * o2;\r\n      _p[3] = a1 * d2 + b1 * h2 + c1 * l2 + d1 * p2;\r\n      _p[4] = e1 * a2 + f1 * e2 + g1 * i2 + h1 * m2;\r\n      _p[5] = e1 * b2 + f1 * f2 + g1 * j2 + h1 * n2;\r\n      _p[6] = e1 * c2 + f1 * g2 + g1 * k2 + h1 * o2;\r\n      _p[7] = e1 * d2 + f1 * h2 + g1 * l2 + h1 * p2;\r\n      _p[8] = i1 * a2 + j1 * e2 + k1 * i2 + l1 * m2;\r\n      _p[9] = i1 * b2 + j1 * f2 + k1 * j2 + l1 * n2;\r\n      _p[10] = i1 * c2 + j1 * g2 + k1 * k2 + l1 * o2;\r\n      _p[11] = i1 * d2 + j1 * h2 + k1 * l2 + l1 * p2;\r\n      _p[12] = m1 * a2 + n1 * e2 + o1 * i2 + p1 * m2;\r\n      _p[13] = m1 * b2 + n1 * f2 + o1 * j2 + p1 * n2;\r\n      _p[14] = m1 * c2 + n1 * g2 + o1 * k2 + p1 * o2;\r\n      _p[15] = m1 * d2 + n1 * h2 + o1 * l2 + p1 * p2;\r\n      this._identityCalculated = false;\r\n      return this;\r\n    }\r\n\r\n    function isIdentity() {\r\n      if (!this._identityCalculated) {\r\n        this._identity = !(this.props[0] !== 1 || this.props[1] !== 0 || this.props[2] !== 0 || this.props[3] !== 0 || this.props[4] !== 0 || this.props[5] !== 1 || this.props[6] !== 0 || this.props[7] !== 0 || this.props[8] !== 0 || this.props[9] !== 0 || this.props[10] !== 1 || this.props[11] !== 0 || this.props[12] !== 0 || this.props[13] !== 0 || this.props[14] !== 0 || this.props[15] !== 1);\r\n        this._identityCalculated = true;\r\n      }\r\n\r\n      return this._identity;\r\n    }\r\n\r\n    function equals(matr) {\r\n      var i = 0;\r\n\r\n      while (i < 16) {\r\n        if (matr.props[i] !== this.props[i]) {\r\n          return false;\r\n        }\r\n\r\n        i += 1;\r\n      }\r\n\r\n      return true;\r\n    }\r\n\r\n    function clone(matr) {\r\n      var i;\r\n\r\n      for (i = 0; i < 16; i += 1) {\r\n        matr.props[i] = this.props[i];\r\n      }\r\n\r\n      return matr;\r\n    }\r\n\r\n    function cloneFromProps(props) {\r\n      var i;\r\n\r\n      for (i = 0; i < 16; i += 1) {\r\n        this.props[i] = props[i];\r\n      }\r\n    }\r\n\r\n    function applyToPoint(x, y, z) {\r\n      return {\r\n        x: x * this.props[0] + y * this.props[4] + z * this.props[8] + this.props[12],\r\n        y: x * this.props[1] + y * this.props[5] + z * this.props[9] + this.props[13],\r\n        z: x * this.props[2] + y * this.props[6] + z * this.props[10] + this.props[14]\r\n      };\r\n      /* return {\r\n           x: x * me.a + y * me.c + me.e,\r\n           y: x * me.b + y * me.d + me.f\r\n           }; */\r\n    }\r\n\r\n    function applyToX(x, y, z) {\r\n      return x * this.props[0] + y * this.props[4] + z * this.props[8] + this.props[12];\r\n    }\r\n\r\n    function applyToY(x, y, z) {\r\n      return x * this.props[1] + y * this.props[5] + z * this.props[9] + this.props[13];\r\n    }\r\n\r\n    function applyToZ(x, y, z) {\r\n      return x * this.props[2] + y * this.props[6] + z * this.props[10] + this.props[14];\r\n    }\r\n\r\n    function getInverseMatrix() {\r\n      var determinant = this.props[0] * this.props[5] - this.props[1] * this.props[4];\r\n      var a = this.props[5] / determinant;\r\n      var b = -this.props[1] / determinant;\r\n      var c = -this.props[4] / determinant;\r\n      var d = this.props[0] / determinant;\r\n      var e = (this.props[4] * this.props[13] - this.props[5] * this.props[12]) / determinant;\r\n      var f = -(this.props[0] * this.props[13] - this.props[1] * this.props[12]) / determinant;\r\n      var inverseMatrix = new Matrix();\r\n      inverseMatrix.props[0] = a;\r\n      inverseMatrix.props[1] = b;\r\n      inverseMatrix.props[4] = c;\r\n      inverseMatrix.props[5] = d;\r\n      inverseMatrix.props[12] = e;\r\n      inverseMatrix.props[13] = f;\r\n      return inverseMatrix;\r\n    }\r\n\r\n    function inversePoint(pt) {\r\n      var inverseMatrix = this.getInverseMatrix();\r\n      return inverseMatrix.applyToPointArray(pt[0], pt[1], pt[2] || 0);\r\n    }\r\n\r\n    function inversePoints(pts) {\r\n      var i;\r\n      var len = pts.length;\r\n      var retPts = [];\r\n\r\n      for (i = 0; i < len; i += 1) {\r\n        retPts[i] = inversePoint(pts[i]);\r\n      }\r\n\r\n      return retPts;\r\n    }\r\n\r\n    function applyToTriplePoints(pt1, pt2, pt3) {\r\n      var arr = createTypedArray('float32', 6);\r\n\r\n      if (this.isIdentity()) {\r\n        arr[0] = pt1[0];\r\n        arr[1] = pt1[1];\r\n        arr[2] = pt2[0];\r\n        arr[3] = pt2[1];\r\n        arr[4] = pt3[0];\r\n        arr[5] = pt3[1];\r\n      } else {\r\n        var p0 = this.props[0];\r\n        var p1 = this.props[1];\r\n        var p4 = this.props[4];\r\n        var p5 = this.props[5];\r\n        var p12 = this.props[12];\r\n        var p13 = this.props[13];\r\n        arr[0] = pt1[0] * p0 + pt1[1] * p4 + p12;\r\n        arr[1] = pt1[0] * p1 + pt1[1] * p5 + p13;\r\n        arr[2] = pt2[0] * p0 + pt2[1] * p4 + p12;\r\n        arr[3] = pt2[0] * p1 + pt2[1] * p5 + p13;\r\n        arr[4] = pt3[0] * p0 + pt3[1] * p4 + p12;\r\n        arr[5] = pt3[0] * p1 + pt3[1] * p5 + p13;\r\n      }\r\n\r\n      return arr;\r\n    }\r\n\r\n    function applyToPointArray(x, y, z) {\r\n      var arr;\r\n\r\n      if (this.isIdentity()) {\r\n        arr = [x, y, z];\r\n      } else {\r\n        arr = [x * this.props[0] + y * this.props[4] + z * this.props[8] + this.props[12], x * this.props[1] + y * this.props[5] + z * this.props[9] + this.props[13], x * this.props[2] + y * this.props[6] + z * this.props[10] + this.props[14]];\r\n      }\r\n\r\n      return arr;\r\n    }\r\n\r\n    function applyToPointStringified(x, y) {\r\n      if (this.isIdentity()) {\r\n        return x + ',' + y;\r\n      }\r\n\r\n      var _p = this.props;\r\n      return Math.round((x * _p[0] + y * _p[4] + _p[12]) * 100) / 100 + ',' + Math.round((x * _p[1] + y * _p[5] + _p[13]) * 100) / 100;\r\n    }\r\n\r\n    function toCSS() {\r\n      // Doesn't make much sense to add this optimization. If it is an identity matrix, it's very likely this will get called only once since it won't be keyframed.\r\n\r\n      /* if(this.isIdentity()) {\r\n              return '';\r\n          } */\r\n      var i = 0;\r\n      var props = this.props;\r\n      var cssValue = 'matrix3d(';\r\n      var v = 10000;\r\n\r\n      while (i < 16) {\r\n        cssValue += _rnd(props[i] * v) / v;\r\n        cssValue += i === 15 ? ')' : ',';\r\n        i += 1;\r\n      }\r\n\r\n      return cssValue;\r\n    }\r\n\r\n    function roundMatrixProperty(val) {\r\n      var v = 10000;\r\n\r\n      if (val < 0.000001 && val > 0 || val > -0.000001 && val < 0) {\r\n        return _rnd(val * v) / v;\r\n      }\r\n\r\n      return val;\r\n    }\r\n\r\n    function to2dCSS() {\r\n      // Doesn't make much sense to add this optimization. If it is an identity matrix, it's very likely this will get called only once since it won't be keyframed.\r\n\r\n      /* if(this.isIdentity()) {\r\n              return '';\r\n          } */\r\n      var props = this.props;\r\n\r\n      var _a = roundMatrixProperty(props[0]);\r\n\r\n      var _b = roundMatrixProperty(props[1]);\r\n\r\n      var _c = roundMatrixProperty(props[4]);\r\n\r\n      var _d = roundMatrixProperty(props[5]);\r\n\r\n      var _e = roundMatrixProperty(props[12]);\r\n\r\n      var _f = roundMatrixProperty(props[13]);\r\n\r\n      return 'matrix(' + _a + ',' + _b + ',' + _c + ',' + _d + ',' + _e + ',' + _f + ')';\r\n    }\r\n\r\n    return function () {\r\n      this.reset = reset;\r\n      this.rotate = rotate;\r\n      this.rotateX = rotateX;\r\n      this.rotateY = rotateY;\r\n      this.rotateZ = rotateZ;\r\n      this.skew = skew;\r\n      this.skewFromAxis = skewFromAxis;\r\n      this.shear = shear;\r\n      this.scale = scale;\r\n      this.setTransform = setTransform;\r\n      this.translate = translate;\r\n      this.transform = transform;\r\n      this.applyToPoint = applyToPoint;\r\n      this.applyToX = applyToX;\r\n      this.applyToY = applyToY;\r\n      this.applyToZ = applyToZ;\r\n      this.applyToPointArray = applyToPointArray;\r\n      this.applyToTriplePoints = applyToTriplePoints;\r\n      this.applyToPointStringified = applyToPointStringified;\r\n      this.toCSS = toCSS;\r\n      this.to2dCSS = to2dCSS;\r\n      this.clone = clone;\r\n      this.cloneFromProps = cloneFromProps;\r\n      this.equals = equals;\r\n      this.inversePoints = inversePoints;\r\n      this.inversePoint = inversePoint;\r\n      this.getInverseMatrix = getInverseMatrix;\r\n      this._t = this.transform;\r\n      this.isIdentity = isIdentity;\r\n      this._identity = true;\r\n      this._identityCalculated = false;\r\n      this.props = createTypedArray('float32', 16);\r\n      this.reset();\r\n    };\r\n  }();\r\n\r\n  function _typeof$3(obj) { \"@babel/helpers - typeof\"; if (typeof Symbol === \"function\" && typeof Symbol.iterator === \"symbol\") { _typeof$3 = function _typeof(obj) { return typeof obj; }; } else { _typeof$3 = function _typeof(obj) { return obj && typeof Symbol === \"function\" && obj.constructor === Symbol && obj !== Symbol.prototype ? \"symbol\" : typeof obj; }; } return _typeof$3(obj); }\r\n  var lottie = {};\r\n  var standalone = '__[STANDALONE]__';\r\n  var animationData = '__[ANIMATIONDATA]__';\r\n  var renderer = '';\r\n\r\n  function setLocation(href) {\r\n    setLocationHref(href);\r\n  }\r\n\r\n  function searchAnimations() {\r\n    if (standalone === true) {\r\n      animationManager.searchAnimations(animationData, standalone, renderer);\r\n    } else {\r\n      animationManager.searchAnimations();\r\n    }\r\n  }\r\n\r\n  function setSubframeRendering(flag) {\r\n    setSubframeEnabled(flag);\r\n  }\r\n\r\n  function setPrefix(prefix) {\r\n    setIdPrefix(prefix);\r\n  }\r\n\r\n  function loadAnimation(params) {\r\n    if (standalone === true) {\r\n      params.animationData = JSON.parse(animationData);\r\n    }\r\n\r\n    return animationManager.loadAnimation(params);\r\n  }\r\n\r\n  function setQuality(value) {\r\n    if (typeof value === 'string') {\r\n      switch (value) {\r\n        case 'high':\r\n          setDefaultCurveSegments(200);\r\n          break;\r\n\r\n        default:\r\n        case 'medium':\r\n          setDefaultCurveSegments(50);\r\n          break;\r\n\r\n        case 'low':\r\n          setDefaultCurveSegments(10);\r\n          break;\r\n      }\r\n    } else if (!isNaN(value) && value > 1) {\r\n      setDefaultCurveSegments(value);\r\n    }\r\n\r\n    if (getDefaultCurveSegments() >= 50) {\r\n      roundValues(false);\r\n    } else {\r\n      roundValues(true);\r\n    }\r\n  }\r\n\r\n  function inBrowser() {\r\n    return typeof navigator !== 'undefined';\r\n  }\r\n\r\n  function installPlugin(type, plugin) {\r\n    if (type === 'expressions') {\r\n      setExpressionsPlugin(plugin);\r\n    }\r\n  }\r\n\r\n  function getFactory(name) {\r\n    switch (name) {\r\n      case 'propertyFactory':\r\n        return PropertyFactory;\r\n\r\n      case 'shapePropertyFactory':\r\n        return ShapePropertyFactory;\r\n\r\n      case 'matrix':\r\n        return Matrix;\r\n\r\n      default:\r\n        return null;\r\n    }\r\n  }\r\n\r\n  lottie.play = animationManager.play;\r\n  lottie.pause = animationManager.pause;\r\n  lottie.setLocationHref = setLocation;\r\n  lottie.togglePause = animationManager.togglePause;\r\n  lottie.setSpeed = animationManager.setSpeed;\r\n  lottie.setDirection = animationManager.setDirection;\r\n  lottie.stop = animationManager.stop;\r\n  lottie.searchAnimations = searchAnimations;\r\n  lottie.registerAnimation = animationManager.registerAnimation;\r\n  lottie.loadAnimation = loadAnimation;\r\n  lottie.setSubframeRendering = setSubframeRendering;\r\n  lottie.resize = animationManager.resize; // lottie.start = start;\r\n\r\n  lottie.goToAndStop = animationManager.goToAndStop;\r\n  lottie.destroy = animationManager.destroy;\r\n  lottie.setQuality = setQuality;\r\n  lottie.inBrowser = inBrowser;\r\n  lottie.installPlugin = installPlugin;\r\n  lottie.freeze = animationManager.freeze;\r\n  lottie.unfreeze = animationManager.unfreeze;\r\n  lottie.setVolume = animationManager.setVolume;\r\n  lottie.mute = animationManager.mute;\r\n  lottie.unmute = animationManager.unmute;\r\n  lottie.getRegisteredAnimations = animationManager.getRegisteredAnimations;\r\n  lottie.useWebWorker = setWebWorker;\r\n  lottie.setIDPrefix = setPrefix;\r\n  lottie.__getFactory = getFactory;\r\n  lottie.version = '5.10.0';\r\n\r\n  function checkReady() {\r\n    if (document.readyState === 'complete') {\r\n      clearInterval(readyStateCheckInterval);\r\n      searchAnimations();\r\n    }\r\n  }\r\n\r\n  function getQueryVariable(variable) {\r\n    var vars = queryString.split('&');\r\n\r\n    for (var i = 0; i < vars.length; i += 1) {\r\n      var pair = vars[i].split('=');\r\n\r\n      if (decodeURIComponent(pair[0]) == variable) {\r\n        // eslint-disable-line eqeqeq\r\n        return decodeURIComponent(pair[1]);\r\n      }\r\n    }\r\n\r\n    return null;\r\n  }\r\n\r\n  var queryString = '';\r\n\r\n  if (standalone) {\r\n    var scripts = document.getElementsByTagName('script');\r\n    var index = scripts.length - 1;\r\n    var myScript = scripts[index] || {\r\n      src: ''\r\n    };\r\n    queryString = myScript.src ? myScript.src.replace(/^[^\\?]+\\??/, '') : ''; // eslint-disable-line no-useless-escape\r\n\r\n    renderer = getQueryVariable('renderer');\r\n  }\r\n\r\n  var readyStateCheckInterval = setInterval(checkReady, 100); // this adds bodymovin to the window object for backwards compatibility\r\n\r\n  try {\r\n    if (!((typeof exports === \"undefined\" ? \"undefined\" : _typeof$3(exports)) === 'object' && typeof module !== 'undefined') && !(typeof define === 'function' && define.amd) // eslint-disable-line no-undef\r\n    ) {\r\n      window.bodymovin = lottie;\r\n    }\r\n  } catch (err) {//\r\n  }\r\n\r\n  var ShapeModifiers = function () {\r\n    var ob = {};\r\n    var modifiers = {};\r\n    ob.registerModifier = registerModifier;\r\n    ob.getModifier = getModifier;\r\n\r\n    function registerModifier(nm, factory) {\r\n      if (!modifiers[nm]) {\r\n        modifiers[nm] = factory;\r\n      }\r\n    }\r\n\r\n    function getModifier(nm, elem, data) {\r\n      return new modifiers[nm](elem, data);\r\n    }\r\n\r\n    return ob;\r\n  }();\r\n\r\n  function ShapeModifier() {}\r\n\r\n  ShapeModifier.prototype.initModifierProperties = function () {};\r\n\r\n  ShapeModifier.prototype.addShapeToModifier = function () {};\r\n\r\n  ShapeModifier.prototype.addShape = function (data) {\r\n    if (!this.closed) {\r\n      // Adding shape to dynamic properties. It covers the case where a shape has no effects applied, to reset it's _mdf state on every tick.\r\n      data.sh.container.addDynamicProperty(data.sh);\r\n      var shapeData = {\r\n        shape: data.sh,\r\n        data: data,\r\n        localShapeCollection: shapeCollectionPool.newShapeCollection()\r\n      };\r\n      this.shapes.push(shapeData);\r\n      this.addShapeToModifier(shapeData);\r\n\r\n      if (this._isAnimated) {\r\n        data.setAsAnimated();\r\n      }\r\n    }\r\n  };\r\n\r\n  ShapeModifier.prototype.init = function (elem, data) {\r\n    this.shapes = [];\r\n    this.elem = elem;\r\n    this.initDynamicPropertyContainer(elem);\r\n    this.initModifierProperties(elem, data);\r\n    this.frameId = initialDefaultFrame;\r\n    this.closed = false;\r\n    this.k = false;\r\n\r\n    if (this.dynamicProperties.length) {\r\n      this.k = true;\r\n    } else {\r\n      this.getValue(true);\r\n    }\r\n  };\r\n\r\n  ShapeModifier.prototype.processKeys = function () {\r\n    if (this.elem.globalData.frameId === this.frameId) {\r\n      return;\r\n    }\r\n\r\n    this.frameId = this.elem.globalData.frameId;\r\n    this.iterateDynamicProperties();\r\n  };\r\n\r\n  extendPrototype([DynamicPropertyContainer], ShapeModifier);\r\n\r\n  function TrimModifier() {}\r\n\r\n  extendPrototype([ShapeModifier], TrimModifier);\r\n\r\n  TrimModifier.prototype.initModifierProperties = function (elem, data) {\r\n    this.s = PropertyFactory.getProp(elem, data.s, 0, 0.01, this);\r\n    this.e = PropertyFactory.getProp(elem, data.e, 0, 0.01, this);\r\n    this.o = PropertyFactory.getProp(elem, data.o, 0, 0, this);\r\n    this.sValue = 0;\r\n    this.eValue = 0;\r\n    this.getValue = this.processKeys;\r\n    this.m = data.m;\r\n    this._isAnimated = !!this.s.effectsSequence.length || !!this.e.effectsSequence.length || !!this.o.effectsSequence.length;\r\n  };\r\n\r\n  TrimModifier.prototype.addShapeToModifier = function (shapeData) {\r\n    shapeData.pathsData = [];\r\n  };\r\n\r\n  TrimModifier.prototype.calculateShapeEdges = function (s, e, shapeLength, addedLength, totalModifierLength) {\r\n    var segments = [];\r\n\r\n    if (e <= 1) {\r\n      segments.push({\r\n        s: s,\r\n        e: e\r\n      });\r\n    } else if (s >= 1) {\r\n      segments.push({\r\n        s: s - 1,\r\n        e: e - 1\r\n      });\r\n    } else {\r\n      segments.push({\r\n        s: s,\r\n        e: 1\r\n      });\r\n      segments.push({\r\n        s: 0,\r\n        e: e - 1\r\n      });\r\n    }\r\n\r\n    var shapeSegments = [];\r\n    var i;\r\n    var len = segments.length;\r\n    var segmentOb;\r\n\r\n    for (i = 0; i < len; i += 1) {\r\n      segmentOb = segments[i];\r\n\r\n      if (!(segmentOb.e * totalModifierLength < addedLength || segmentOb.s * totalModifierLength > addedLength + shapeLength)) {\r\n        var shapeS;\r\n        var shapeE;\r\n\r\n        if (segmentOb.s * totalModifierLength <= addedLength) {\r\n          shapeS = 0;\r\n        } else {\r\n          shapeS = (segmentOb.s * totalModifierLength - addedLength) / shapeLength;\r\n        }\r\n\r\n        if (segmentOb.e * totalModifierLength >= addedLength + shapeLength) {\r\n          shapeE = 1;\r\n        } else {\r\n          shapeE = (segmentOb.e * totalModifierLength - addedLength) / shapeLength;\r\n        }\r\n\r\n        shapeSegments.push([shapeS, shapeE]);\r\n      }\r\n    }\r\n\r\n    if (!shapeSegments.length) {\r\n      shapeSegments.push([0, 0]);\r\n    }\r\n\r\n    return shapeSegments;\r\n  };\r\n\r\n  TrimModifier.prototype.releasePathsData = function (pathsData) {\r\n    var i;\r\n    var len = pathsData.length;\r\n\r\n    for (i = 0; i < len; i += 1) {\r\n      segmentsLengthPool.release(pathsData[i]);\r\n    }\r\n\r\n    pathsData.length = 0;\r\n    return pathsData;\r\n  };\r\n\r\n  TrimModifier.prototype.processShapes = function (_isFirstFrame) {\r\n    var s;\r\n    var e;\r\n\r\n    if (this._mdf || _isFirstFrame) {\r\n      var o = this.o.v % 360 / 360;\r\n\r\n      if (o < 0) {\r\n        o += 1;\r\n      }\r\n\r\n      if (this.s.v > 1) {\r\n        s = 1 + o;\r\n      } else if (this.s.v < 0) {\r\n        s = 0 + o;\r\n      } else {\r\n        s = this.s.v + o;\r\n      }\r\n\r\n      if (this.e.v > 1) {\r\n        e = 1 + o;\r\n      } else if (this.e.v < 0) {\r\n        e = 0 + o;\r\n      } else {\r\n        e = this.e.v + o;\r\n      }\r\n\r\n      if (s > e) {\r\n        var _s = s;\r\n        s = e;\r\n        e = _s;\r\n      }\r\n\r\n      s = Math.round(s * 10000) * 0.0001;\r\n      e = Math.round(e * 10000) * 0.0001;\r\n      this.sValue = s;\r\n      this.eValue = e;\r\n    } else {\r\n      s = this.sValue;\r\n      e = this.eValue;\r\n    }\r\n\r\n    var shapePaths;\r\n    var i;\r\n    var len = this.shapes.length;\r\n    var j;\r\n    var jLen;\r\n    var pathsData;\r\n    var pathData;\r\n    var totalShapeLength;\r\n    var totalModifierLength = 0;\r\n\r\n    if (e === s) {\r\n      for (i = 0; i < len; i += 1) {\r\n        this.shapes[i].localShapeCollection.releaseShapes();\r\n        this.shapes[i].shape._mdf = true;\r\n        this.shapes[i].shape.paths = this.shapes[i].localShapeCollection;\r\n\r\n        if (this._mdf) {\r\n          this.shapes[i].pathsData.length = 0;\r\n        }\r\n      }\r\n    } else if (!(e === 1 && s === 0 || e === 0 && s === 1)) {\r\n      var segments = [];\r\n      var shapeData;\r\n      var localShapeCollection;\r\n\r\n      for (i = 0; i < len; i += 1) {\r\n        shapeData = this.shapes[i]; // if shape hasn't changed and trim properties haven't changed, cached previous path can be used\r\n\r\n        if (!shapeData.shape._mdf && !this._mdf && !_isFirstFrame && this.m !== 2) {\r\n          shapeData.shape.paths = shapeData.localShapeCollection;\r\n        } else {\r\n          shapePaths = shapeData.shape.paths;\r\n          jLen = shapePaths._length;\r\n          totalShapeLength = 0;\r\n\r\n          if (!shapeData.shape._mdf && shapeData.pathsData.length) {\r\n            totalShapeLength = shapeData.totalShapeLength;\r\n          } else {\r\n            pathsData = this.releasePathsData(shapeData.pathsData);\r\n\r\n            for (j = 0; j < jLen; j += 1) {\r\n              pathData = bez.getSegmentsLength(shapePaths.shapes[j]);\r\n              pathsData.push(pathData);\r\n              totalShapeLength += pathData.totalLength;\r\n            }\r\n\r\n            shapeData.totalShapeLength = totalShapeLength;\r\n            shapeData.pathsData = pathsData;\r\n          }\r\n\r\n          totalModifierLength += totalShapeLength;\r\n          shapeData.shape._mdf = true;\r\n        }\r\n      }\r\n\r\n      var shapeS = s;\r\n      var shapeE = e;\r\n      var addedLength = 0;\r\n      var edges;\r\n\r\n      for (i = len - 1; i >= 0; i -= 1) {\r\n        shapeData = this.shapes[i];\r\n\r\n        if (shapeData.shape._mdf) {\r\n          localShapeCollection = shapeData.localShapeCollection;\r\n          localShapeCollection.releaseShapes(); // if m === 2 means paths are trimmed individually so edges need to be found for this specific shape relative to whoel group\r\n\r\n          if (this.m === 2 && len > 1) {\r\n            edges = this.calculateShapeEdges(s, e, shapeData.totalShapeLength, addedLength, totalModifierLength);\r\n            addedLength += shapeData.totalShapeLength;\r\n          } else {\r\n            edges = [[shapeS, shapeE]];\r\n          }\r\n\r\n          jLen = edges.length;\r\n\r\n          for (j = 0; j < jLen; j += 1) {\r\n            shapeS = edges[j][0];\r\n            shapeE = edges[j][1];\r\n            segments.length = 0;\r\n\r\n            if (shapeE <= 1) {\r\n              segments.push({\r\n                s: shapeData.totalShapeLength * shapeS,\r\n                e: shapeData.totalShapeLength * shapeE\r\n              });\r\n            } else if (shapeS >= 1) {\r\n              segments.push({\r\n                s: shapeData.totalShapeLength * (shapeS - 1),\r\n                e: shapeData.totalShapeLength * (shapeE - 1)\r\n              });\r\n            } else {\r\n              segments.push({\r\n                s: shapeData.totalShapeLength * shapeS,\r\n                e: shapeData.totalShapeLength\r\n              });\r\n              segments.push({\r\n                s: 0,\r\n                e: shapeData.totalShapeLength * (shapeE - 1)\r\n              });\r\n            }\r\n\r\n            var newShapesData = this.addShapes(shapeData, segments[0]);\r\n\r\n            if (segments[0].s !== segments[0].e) {\r\n              if (segments.length > 1) {\r\n                var lastShapeInCollection = shapeData.shape.paths.shapes[shapeData.shape.paths._length - 1];\r\n\r\n                if (lastShapeInCollection.c) {\r\n                  var lastShape = newShapesData.pop();\r\n                  this.addPaths(newShapesData, localShapeCollection);\r\n                  newShapesData = this.addShapes(shapeData, segments[1], lastShape);\r\n                } else {\r\n                  this.addPaths(newShapesData, localShapeCollection);\r\n                  newShapesData = this.addShapes(shapeData, segments[1]);\r\n                }\r\n              }\r\n\r\n              this.addPaths(newShapesData, localShapeCollection);\r\n            }\r\n          }\r\n\r\n          shapeData.shape.paths = localShapeCollection;\r\n        }\r\n      }\r\n    } else if (this._mdf) {\r\n      for (i = 0; i < len; i += 1) {\r\n        // Releasign Trim Cached paths data when no trim applied in case shapes are modified inbetween.\r\n        // Don't remove this even if it's losing cached info.\r\n        this.shapes[i].pathsData.length = 0;\r\n        this.shapes[i].shape._mdf = true;\r\n      }\r\n    }\r\n  };\r\n\r\n  TrimModifier.prototype.addPaths = function (newPaths, localShapeCollection) {\r\n    var i;\r\n    var len = newPaths.length;\r\n\r\n    for (i = 0; i < len; i += 1) {\r\n      localShapeCollection.addShape(newPaths[i]);\r\n    }\r\n  };\r\n\r\n  TrimModifier.prototype.addSegment = function (pt1, pt2, pt3, pt4, shapePath, pos, newShape) {\r\n    shapePath.setXYAt(pt2[0], pt2[1], 'o', pos);\r\n    shapePath.setXYAt(pt3[0], pt3[1], 'i', pos + 1);\r\n\r\n    if (newShape) {\r\n      shapePath.setXYAt(pt1[0], pt1[1], 'v', pos);\r\n    }\r\n\r\n    shapePath.setXYAt(pt4[0], pt4[1], 'v', pos + 1);\r\n  };\r\n\r\n  TrimModifier.prototype.addSegmentFromArray = function (points, shapePath, pos, newShape) {\r\n    shapePath.setXYAt(points[1], points[5], 'o', pos);\r\n    shapePath.setXYAt(points[2], points[6], 'i', pos + 1);\r\n\r\n    if (newShape) {\r\n      shapePath.setXYAt(points[0], points[4], 'v', pos);\r\n    }\r\n\r\n    shapePath.setXYAt(points[3], points[7], 'v', pos + 1);\r\n  };\r\n\r\n  TrimModifier.prototype.addShapes = function (shapeData, shapeSegment, shapePath) {\r\n    var pathsData = shapeData.pathsData;\r\n    var shapePaths = shapeData.shape.paths.shapes;\r\n    var i;\r\n    var len = shapeData.shape.paths._length;\r\n    var j;\r\n    var jLen;\r\n    var addedLength = 0;\r\n    var currentLengthData;\r\n    var segmentCount;\r\n    var lengths;\r\n    var segment;\r\n    var shapes = [];\r\n    var initPos;\r\n    var newShape = true;\r\n\r\n    if (!shapePath) {\r\n      shapePath = shapePool.newElement();\r\n      segmentCount = 0;\r\n      initPos = 0;\r\n    } else {\r\n      segmentCount = shapePath._length;\r\n      initPos = shapePath._length;\r\n    }\r\n\r\n    shapes.push(shapePath);\r\n\r\n    for (i = 0; i < len; i += 1) {\r\n      lengths = pathsData[i].lengths;\r\n      shapePath.c = shapePaths[i].c;\r\n      jLen = shapePaths[i].c ? lengths.length : lengths.length + 1;\r\n\r\n      for (j = 1; j < jLen; j += 1) {\r\n        currentLengthData = lengths[j - 1];\r\n\r\n        if (addedLength + currentLengthData.addedLength < shapeSegment.s) {\r\n          addedLength += currentLengthData.addedLength;\r\n          shapePath.c = false;\r\n        } else if (addedLength > shapeSegment.e) {\r\n          shapePath.c = false;\r\n          break;\r\n        } else {\r\n          if (shapeSegment.s <= addedLength && shapeSegment.e >= addedLength + currentLengthData.addedLength) {\r\n            this.addSegment(shapePaths[i].v[j - 1], shapePaths[i].o[j - 1], shapePaths[i].i[j], shapePaths[i].v[j], shapePath, segmentCount, newShape);\r\n            newShape = false;\r\n          } else {\r\n            segment = bez.getNewSegment(shapePaths[i].v[j - 1], shapePaths[i].v[j], shapePaths[i].o[j - 1], shapePaths[i].i[j], (shapeSegment.s - addedLength) / currentLengthData.addedLength, (shapeSegment.e - addedLength) / currentLengthData.addedLength, lengths[j - 1]);\r\n            this.addSegmentFromArray(segment, shapePath, segmentCount, newShape); // this.addSegment(segment.pt1, segment.pt3, segment.pt4, segment.pt2, shapePath, segmentCount, newShape);\r\n\r\n            newShape = false;\r\n            shapePath.c = false;\r\n          }\r\n\r\n          addedLength += currentLengthData.addedLength;\r\n          segmentCount += 1;\r\n        }\r\n      }\r\n\r\n      if (shapePaths[i].c && lengths.length) {\r\n        currentLengthData = lengths[j - 1];\r\n\r\n        if (addedLength <= shapeSegment.e) {\r\n          var segmentLength = lengths[j - 1].addedLength;\r\n\r\n          if (shapeSegment.s <= addedLength && shapeSegment.e >= addedLength + segmentLength) {\r\n            this.addSegment(shapePaths[i].v[j - 1], shapePaths[i].o[j - 1], shapePaths[i].i[0], shapePaths[i].v[0], shapePath, segmentCount, newShape);\r\n            newShape = false;\r\n          } else {\r\n            segment = bez.getNewSegment(shapePaths[i].v[j - 1], shapePaths[i].v[0], shapePaths[i].o[j - 1], shapePaths[i].i[0], (shapeSegment.s - addedLength) / segmentLength, (shapeSegment.e - addedLength) / segmentLength, lengths[j - 1]);\r\n            this.addSegmentFromArray(segment, shapePath, segmentCount, newShape); // this.addSegment(segment.pt1, segment.pt3, segment.pt4, segment.pt2, shapePath, segmentCount, newShape);\r\n\r\n            newShape = false;\r\n            shapePath.c = false;\r\n          }\r\n        } else {\r\n          shapePath.c = false;\r\n        }\r\n\r\n        addedLength += currentLengthData.addedLength;\r\n        segmentCount += 1;\r\n      }\r\n\r\n      if (shapePath._length) {\r\n        shapePath.setXYAt(shapePath.v[initPos][0], shapePath.v[initPos][1], 'i', initPos);\r\n        shapePath.setXYAt(shapePath.v[shapePath._length - 1][0], shapePath.v[shapePath._length - 1][1], 'o', shapePath._length - 1);\r\n      }\r\n\r\n      if (addedLength > shapeSegment.e) {\r\n        break;\r\n      }\r\n\r\n      if (i < len - 1) {\r\n        shapePath = shapePool.newElement();\r\n        newShape = true;\r\n        shapes.push(shapePath);\r\n        segmentCount = 0;\r\n      }\r\n    }\r\n\r\n    return shapes;\r\n  };\r\n\r\n  function PuckerAndBloatModifier() {}\r\n\r\n  extendPrototype([ShapeModifier], PuckerAndBloatModifier);\r\n\r\n  PuckerAndBloatModifier.prototype.initModifierProperties = function (elem, data) {\r\n    this.getValue = this.processKeys;\r\n    this.amount = PropertyFactory.getProp(elem, data.a, 0, null, this);\r\n    this._isAnimated = !!this.amount.effectsSequence.length;\r\n  };\r\n\r\n  PuckerAndBloatModifier.prototype.processPath = function (path, amount) {\r\n    var percent = amount / 100;\r\n    var centerPoint = [0, 0];\r\n    var pathLength = path._length;\r\n    var i = 0;\r\n\r\n    for (i = 0; i < pathLength; i += 1) {\r\n      centerPoint[0] += path.v[i][0];\r\n      centerPoint[1] += path.v[i][1];\r\n    }\r\n\r\n    centerPoint[0] /= pathLength;\r\n    centerPoint[1] /= pathLength;\r\n    var clonedPath = shapePool.newElement();\r\n    clonedPath.c = path.c;\r\n    var vX;\r\n    var vY;\r\n    var oX;\r\n    var oY;\r\n    var iX;\r\n    var iY;\r\n\r\n    for (i = 0; i < pathLength; i += 1) {\r\n      vX = path.v[i][0] + (centerPoint[0] - path.v[i][0]) * percent;\r\n      vY = path.v[i][1] + (centerPoint[1] - path.v[i][1]) * percent;\r\n      oX = path.o[i][0] + (centerPoint[0] - path.o[i][0]) * -percent;\r\n      oY = path.o[i][1] + (centerPoint[1] - path.o[i][1]) * -percent;\r\n      iX = path.i[i][0] + (centerPoint[0] - path.i[i][0]) * -percent;\r\n      iY = path.i[i][1] + (centerPoint[1] - path.i[i][1]) * -percent;\r\n      clonedPath.setTripleAt(vX, vY, oX, oY, iX, iY, i);\r\n    }\r\n\r\n    return clonedPath;\r\n  };\r\n\r\n  PuckerAndBloatModifier.prototype.processShapes = function (_isFirstFrame) {\r\n    var shapePaths;\r\n    var i;\r\n    var len = this.shapes.length;\r\n    var j;\r\n    var jLen;\r\n    var amount = this.amount.v;\r\n\r\n    if (amount !== 0) {\r\n      var shapeData;\r\n      var localShapeCollection;\r\n\r\n      for (i = 0; i < len; i += 1) {\r\n        shapeData = this.shapes[i];\r\n        localShapeCollection = shapeData.localShapeCollection;\r\n\r\n        if (!(!shapeData.shape._mdf && !this._mdf && !_isFirstFrame)) {\r\n          localShapeCollection.releaseShapes();\r\n          shapeData.shape._mdf = true;\r\n          shapePaths = shapeData.shape.paths.shapes;\r\n          jLen = shapeData.shape.paths._length;\r\n\r\n          for (j = 0; j < jLen; j += 1) {\r\n            localShapeCollection.addShape(this.processPath(shapePaths[j], amount));\r\n          }\r\n        }\r\n\r\n        shapeData.shape.paths = shapeData.localShapeCollection;\r\n      }\r\n    }\r\n\r\n    if (!this.dynamicProperties.length) {\r\n      this._mdf = false;\r\n    }\r\n  };\r\n\r\n  var TransformPropertyFactory = function () {\r\n    var defaultVector = [0, 0];\r\n\r\n    function applyToMatrix(mat) {\r\n      var _mdf = this._mdf;\r\n      this.iterateDynamicProperties();\r\n      this._mdf = this._mdf || _mdf;\r\n\r\n      if (this.a) {\r\n        mat.translate(-this.a.v[0], -this.a.v[1], this.a.v[2]);\r\n      }\r\n\r\n      if (this.s) {\r\n        mat.scale(this.s.v[0], this.s.v[1], this.s.v[2]);\r\n      }\r\n\r\n      if (this.sk) {\r\n        mat.skewFromAxis(-this.sk.v, this.sa.v);\r\n      }\r\n\r\n      if (this.r) {\r\n        mat.rotate(-this.r.v);\r\n      } else {\r\n        mat.rotateZ(-this.rz.v).rotateY(this.ry.v).rotateX(this.rx.v).rotateZ(-this.or.v[2]).rotateY(this.or.v[1]).rotateX(this.or.v[0]);\r\n      }\r\n\r\n      if (this.data.p.s) {\r\n        if (this.data.p.z) {\r\n          mat.translate(this.px.v, this.py.v, -this.pz.v);\r\n        } else {\r\n          mat.translate(this.px.v, this.py.v, 0);\r\n        }\r\n      } else {\r\n        mat.translate(this.p.v[0], this.p.v[1], -this.p.v[2]);\r\n      }\r\n    }\r\n\r\n    function processKeys(forceRender) {\r\n      if (this.elem.globalData.frameId === this.frameId) {\r\n        return;\r\n      }\r\n\r\n      if (this._isDirty) {\r\n        this.precalculateMatrix();\r\n        this._isDirty = false;\r\n      }\r\n\r\n      this.iterateDynamicProperties();\r\n\r\n      if (this._mdf || forceRender) {\r\n        var frameRate;\r\n        this.v.cloneFromProps(this.pre.props);\r\n\r\n        if (this.appliedTransformations < 1) {\r\n          this.v.translate(-this.a.v[0], -this.a.v[1], this.a.v[2]);\r\n        }\r\n\r\n        if (this.appliedTransformations < 2) {\r\n          this.v.scale(this.s.v[0], this.s.v[1], this.s.v[2]);\r\n        }\r\n\r\n        if (this.sk && this.appliedTransformations < 3) {\r\n          this.v.skewFromAxis(-this.sk.v, this.sa.v);\r\n        }\r\n\r\n        if (this.r && this.appliedTransformations < 4) {\r\n          this.v.rotate(-this.r.v);\r\n        } else if (!this.r && this.appliedTransformations < 4) {\r\n          this.v.rotateZ(-this.rz.v).rotateY(this.ry.v).rotateX(this.rx.v).rotateZ(-this.or.v[2]).rotateY(this.or.v[1]).rotateX(this.or.v[0]);\r\n        }\r\n\r\n        if (this.autoOriented) {\r\n          var v1;\r\n          var v2;\r\n          frameRate = this.elem.globalData.frameRate;\r\n\r\n          if (this.p && this.p.keyframes && this.p.getValueAtTime) {\r\n            if (this.p._caching.lastFrame + this.p.offsetTime <= this.p.keyframes[0].t) {\r\n              v1 = this.p.getValueAtTime((this.p.keyframes[0].t + 0.01) / frameRate, 0);\r\n              v2 = this.p.getValueAtTime(this.p.keyframes[0].t / frameRate, 0);\r\n            } else if (this.p._caching.lastFrame + this.p.offsetTime >= this.p.keyframes[this.p.keyframes.length - 1].t) {\r\n              v1 = this.p.getValueAtTime(this.p.keyframes[this.p.keyframes.length - 1].t / frameRate, 0);\r\n              v2 = this.p.getValueAtTime((this.p.keyframes[this.p.keyframes.length - 1].t - 0.05) / frameRate, 0);\r\n            } else {\r\n              v1 = this.p.pv;\r\n              v2 = this.p.getValueAtTime((this.p._caching.lastFrame + this.p.offsetTime - 0.01) / frameRate, this.p.offsetTime);\r\n            }\r\n          } else if (this.px && this.px.keyframes && this.py.keyframes && this.px.getValueAtTime && this.py.getValueAtTime) {\r\n            v1 = [];\r\n            v2 = [];\r\n            var px = this.px;\r\n            var py = this.py;\r\n\r\n            if (px._caching.lastFrame + px.offsetTime <= px.keyframes[0].t) {\r\n              v1[0] = px.getValueAtTime((px.keyframes[0].t + 0.01) / frameRate, 0);\r\n              v1[1] = py.getValueAtTime((py.keyframes[0].t + 0.01) / frameRate, 0);\r\n              v2[0] = px.getValueAtTime(px.keyframes[0].t / frameRate, 0);\r\n              v2[1] = py.getValueAtTime(py.keyframes[0].t / frameRate, 0);\r\n            } else if (px._caching.lastFrame + px.offsetTime >= px.keyframes[px.keyframes.length - 1].t) {\r\n              v1[0] = px.getValueAtTime(px.keyframes[px.keyframes.length - 1].t / frameRate, 0);\r\n              v1[1] = py.getValueAtTime(py.keyframes[py.keyframes.length - 1].t / frameRate, 0);\r\n              v2[0] = px.getValueAtTime((px.keyframes[px.keyframes.length - 1].t - 0.01) / frameRate, 0);\r\n              v2[1] = py.getValueAtTime((py.keyframes[py.keyframes.length - 1].t - 0.01) / frameRate, 0);\r\n            } else {\r\n              v1 = [px.pv, py.pv];\r\n              v2[0] = px.getValueAtTime((px._caching.lastFrame + px.offsetTime - 0.01) / frameRate, px.offsetTime);\r\n              v2[1] = py.getValueAtTime((py._caching.lastFrame + py.offsetTime - 0.01) / frameRate, py.offsetTime);\r\n            }\r\n          } else {\r\n            v2 = defaultVector;\r\n            v1 = v2;\r\n          }\r\n\r\n          this.v.rotate(-Math.atan2(v1[1] - v2[1], v1[0] - v2[0]));\r\n        }\r\n\r\n        if (this.data.p && this.data.p.s) {\r\n          if (this.data.p.z) {\r\n            this.v.translate(this.px.v, this.py.v, -this.pz.v);\r\n          } else {\r\n            this.v.translate(this.px.v, this.py.v, 0);\r\n          }\r\n        } else {\r\n          this.v.translate(this.p.v[0], this.p.v[1], -this.p.v[2]);\r\n        }\r\n      }\r\n\r\n      this.frameId = this.elem.globalData.frameId;\r\n    }\r\n\r\n    function precalculateMatrix() {\r\n      if (!this.a.k) {\r\n        this.pre.translate(-this.a.v[0], -this.a.v[1], this.a.v[2]);\r\n        this.appliedTransformations = 1;\r\n      } else {\r\n        return;\r\n      }\r\n\r\n      if (!this.s.effectsSequence.length) {\r\n        this.pre.scale(this.s.v[0], this.s.v[1], this.s.v[2]);\r\n        this.appliedTransformations = 2;\r\n      } else {\r\n        return;\r\n      }\r\n\r\n      if (this.sk) {\r\n        if (!this.sk.effectsSequence.length && !this.sa.effectsSequence.length) {\r\n          this.pre.skewFromAxis(-this.sk.v, this.sa.v);\r\n          this.appliedTransformations = 3;\r\n        } else {\r\n          return;\r\n        }\r\n      }\r\n\r\n      if (this.r) {\r\n        if (!this.r.effectsSequence.length) {\r\n          this.pre.rotate(-this.r.v);\r\n          this.appliedTransformations = 4;\r\n        }\r\n      } else if (!this.rz.effectsSequence.length && !this.ry.effectsSequence.length && !this.rx.effectsSequence.length && !this.or.effectsSequence.length) {\r\n        this.pre.rotateZ(-this.rz.v).rotateY(this.ry.v).rotateX(this.rx.v).rotateZ(-this.or.v[2]).rotateY(this.or.v[1]).rotateX(this.or.v[0]);\r\n        this.appliedTransformations = 4;\r\n      }\r\n    }\r\n\r\n    function autoOrient() {//\r\n      // var prevP = this.getValueAtTime();\r\n    }\r\n\r\n    function addDynamicProperty(prop) {\r\n      this._addDynamicProperty(prop);\r\n\r\n      this.elem.addDynamicProperty(prop);\r\n      this._isDirty = true;\r\n    }\r\n\r\n    function TransformProperty(elem, data, container) {\r\n      this.elem = elem;\r\n      this.frameId = -1;\r\n      this.propType = 'transform';\r\n      this.data = data;\r\n      this.v = new Matrix(); // Precalculated matrix with non animated properties\r\n\r\n      this.pre = new Matrix();\r\n      this.appliedTransformations = 0;\r\n      this.initDynamicPropertyContainer(container || elem);\r\n\r\n      if (data.p && data.p.s) {\r\n        this.px = PropertyFactory.getProp(elem, data.p.x, 0, 0, this);\r\n        this.py = PropertyFactory.getProp(elem, data.p.y, 0, 0, this);\r\n\r\n        if (data.p.z) {\r\n          this.pz = PropertyFactory.getProp(elem, data.p.z, 0, 0, this);\r\n        }\r\n      } else {\r\n        this.p = PropertyFactory.getProp(elem, data.p || {\r\n          k: [0, 0, 0]\r\n        }, 1, 0, this);\r\n      }\r\n\r\n      if (data.rx) {\r\n        this.rx = PropertyFactory.getProp(elem, data.rx, 0, degToRads, this);\r\n        this.ry = PropertyFactory.getProp(elem, data.ry, 0, degToRads, this);\r\n        this.rz = PropertyFactory.getProp(elem, data.rz, 0, degToRads, this);\r\n\r\n        if (data.or.k[0].ti) {\r\n          var i;\r\n          var len = data.or.k.length;\r\n\r\n          for (i = 0; i < len; i += 1) {\r\n            data.or.k[i].to = null;\r\n            data.or.k[i].ti = null;\r\n          }\r\n        }\r\n\r\n        this.or = PropertyFactory.getProp(elem, data.or, 1, degToRads, this); // sh Indicates it needs to be capped between -180 and 180\r\n\r\n        this.or.sh = true;\r\n      } else {\r\n        this.r = PropertyFactory.getProp(elem, data.r || {\r\n          k: 0\r\n        }, 0, degToRads, this);\r\n      }\r\n\r\n      if (data.sk) {\r\n        this.sk = PropertyFactory.getProp(elem, data.sk, 0, degToRads, this);\r\n        this.sa = PropertyFactory.getProp(elem, data.sa, 0, degToRads, this);\r\n      }\r\n\r\n      this.a = PropertyFactory.getProp(elem, data.a || {\r\n        k: [0, 0, 0]\r\n      }, 1, 0, this);\r\n      this.s = PropertyFactory.getProp(elem, data.s || {\r\n        k: [100, 100, 100]\r\n      }, 1, 0.01, this); // Opacity is not part of the transform properties, that's why it won't use this.dynamicProperties. That way transforms won't get updated if opacity changes.\r\n\r\n      if (data.o) {\r\n        this.o = PropertyFactory.getProp(elem, data.o, 0, 0.01, elem);\r\n      } else {\r\n        this.o = {\r\n          _mdf: false,\r\n          v: 1\r\n        };\r\n      }\r\n\r\n      this._isDirty = true;\r\n\r\n      if (!this.dynamicProperties.length) {\r\n        this.getValue(true);\r\n      }\r\n    }\r\n\r\n    TransformProperty.prototype = {\r\n      applyToMatrix: applyToMatrix,\r\n      getValue: processKeys,\r\n      precalculateMatrix: precalculateMatrix,\r\n      autoOrient: autoOrient\r\n    };\r\n    extendPrototype([DynamicPropertyContainer], TransformProperty);\r\n    TransformProperty.prototype.addDynamicProperty = addDynamicProperty;\r\n    TransformProperty.prototype._addDynamicProperty = DynamicPropertyContainer.prototype.addDynamicProperty;\r\n\r\n    function getTransformProperty(elem, data, container) {\r\n      return new TransformProperty(elem, data, container);\r\n    }\r\n\r\n    return {\r\n      getTransformProperty: getTransformProperty\r\n    };\r\n  }();\r\n\r\n  function RepeaterModifier() {}\r\n\r\n  extendPrototype([ShapeModifier], RepeaterModifier);\r\n\r\n  RepeaterModifier.prototype.initModifierProperties = function (elem, data) {\r\n    this.getValue = this.processKeys;\r\n    this.c = PropertyFactory.getProp(elem, data.c, 0, null, this);\r\n    this.o = PropertyFactory.getProp(elem, data.o, 0, null, this);\r\n    this.tr = TransformPropertyFactory.getTransformProperty(elem, data.tr, this);\r\n    this.so = PropertyFactory.getProp(elem, data.tr.so, 0, 0.01, this);\r\n    this.eo = PropertyFactory.getProp(elem, data.tr.eo, 0, 0.01, this);\r\n    this.data = data;\r\n\r\n    if (!this.dynamicProperties.length) {\r\n      this.getValue(true);\r\n    }\r\n\r\n    this._isAnimated = !!this.dynamicProperties.length;\r\n    this.pMatrix = new Matrix();\r\n    this.rMatrix = new Matrix();\r\n    this.sMatrix = new Matrix();\r\n    this.tMatrix = new Matrix();\r\n    this.matrix = new Matrix();\r\n  };\r\n\r\n  RepeaterModifier.prototype.applyTransforms = function (pMatrix, rMatrix, sMatrix, transform, perc, inv) {\r\n    var dir = inv ? -1 : 1;\r\n    var scaleX = transform.s.v[0] + (1 - transform.s.v[0]) * (1 - perc);\r\n    var scaleY = transform.s.v[1] + (1 - transform.s.v[1]) * (1 - perc);\r\n    pMatrix.translate(transform.p.v[0] * dir * perc, transform.p.v[1] * dir * perc, transform.p.v[2]);\r\n    rMatrix.translate(-transform.a.v[0], -transform.a.v[1], transform.a.v[2]);\r\n    rMatrix.rotate(-transform.r.v * dir * perc);\r\n    rMatrix.translate(transform.a.v[0], transform.a.v[1], transform.a.v[2]);\r\n    sMatrix.translate(-transform.a.v[0], -transform.a.v[1], transform.a.v[2]);\r\n    sMatrix.scale(inv ? 1 / scaleX : scaleX, inv ? 1 / scaleY : scaleY);\r\n    sMatrix.translate(transform.a.v[0], transform.a.v[1], transform.a.v[2]);\r\n  };\r\n\r\n  RepeaterModifier.prototype.init = function (elem, arr, pos, elemsData) {\r\n    this.elem = elem;\r\n    this.arr = arr;\r\n    this.pos = pos;\r\n    this.elemsData = elemsData;\r\n    this._currentCopies = 0;\r\n    this._elements = [];\r\n    this._groups = [];\r\n    this.frameId = -1;\r\n    this.initDynamicPropertyContainer(elem);\r\n    this.initModifierProperties(elem, arr[pos]);\r\n\r\n    while (pos > 0) {\r\n      pos -= 1; // this._elements.unshift(arr.splice(pos,1)[0]);\r\n\r\n      this._elements.unshift(arr[pos]);\r\n    }\r\n\r\n    if (this.dynamicProperties.length) {\r\n      this.k = true;\r\n    } else {\r\n      this.getValue(true);\r\n    }\r\n  };\r\n\r\n  RepeaterModifier.prototype.resetElements = function (elements) {\r\n    var i;\r\n    var len = elements.length;\r\n\r\n    for (i = 0; i < len; i += 1) {\r\n      elements[i]._processed = false;\r\n\r\n      if (elements[i].ty === 'gr') {\r\n        this.resetElements(elements[i].it);\r\n      }\r\n    }\r\n  };\r\n\r\n  RepeaterModifier.prototype.cloneElements = function (elements) {\r\n    var newElements = JSON.parse(JSON.stringify(elements));\r\n    this.resetElements(newElements);\r\n    return newElements;\r\n  };\r\n\r\n  RepeaterModifier.prototype.changeGroupRender = function (elements, renderFlag) {\r\n    var i;\r\n    var len = elements.length;\r\n\r\n    for (i = 0; i < len; i += 1) {\r\n      elements[i]._render = renderFlag;\r\n\r\n      if (elements[i].ty === 'gr') {\r\n        this.changeGroupRender(elements[i].it, renderFlag);\r\n      }\r\n    }\r\n  };\r\n\r\n  RepeaterModifier.prototype.processShapes = function (_isFirstFrame) {\r\n    var items;\r\n    var itemsTransform;\r\n    var i;\r\n    var dir;\r\n    var cont;\r\n    var hasReloaded = false;\r\n\r\n    if (this._mdf || _isFirstFrame) {\r\n      var copies = Math.ceil(this.c.v);\r\n\r\n      if (this._groups.length < copies) {\r\n        while (this._groups.length < copies) {\r\n          var group = {\r\n            it: this.cloneElements(this._elements),\r\n            ty: 'gr'\r\n          };\r\n          group.it.push({\r\n            a: {\r\n              a: 0,\r\n              ix: 1,\r\n              k: [0, 0]\r\n            },\r\n            nm: 'Transform',\r\n            o: {\r\n              a: 0,\r\n              ix: 7,\r\n              k: 100\r\n            },\r\n            p: {\r\n              a: 0,\r\n              ix: 2,\r\n              k: [0, 0]\r\n            },\r\n            r: {\r\n              a: 1,\r\n              ix: 6,\r\n              k: [{\r\n                s: 0,\r\n                e: 0,\r\n                t: 0\r\n              }, {\r\n                s: 0,\r\n                e: 0,\r\n                t: 1\r\n              }]\r\n            },\r\n            s: {\r\n              a: 0,\r\n              ix: 3,\r\n              k: [100, 100]\r\n            },\r\n            sa: {\r\n              a: 0,\r\n              ix: 5,\r\n              k: 0\r\n            },\r\n            sk: {\r\n              a: 0,\r\n              ix: 4,\r\n              k: 0\r\n            },\r\n            ty: 'tr'\r\n          });\r\n          this.arr.splice(0, 0, group);\r\n\r\n          this._groups.splice(0, 0, group);\r\n\r\n          this._currentCopies += 1;\r\n        }\r\n\r\n        this.elem.reloadShapes();\r\n        hasReloaded = true;\r\n      }\r\n\r\n      cont = 0;\r\n      var renderFlag;\r\n\r\n      for (i = 0; i <= this._groups.length - 1; i += 1) {\r\n        renderFlag = cont < copies;\r\n        this._groups[i]._render = renderFlag;\r\n        this.changeGroupRender(this._groups[i].it, renderFlag);\r\n\r\n        if (!renderFlag) {\r\n          var elems = this.elemsData[i].it;\r\n          var transformData = elems[elems.length - 1];\r\n\r\n          if (transformData.transform.op.v !== 0) {\r\n            transformData.transform.op._mdf = true;\r\n            transformData.transform.op.v = 0;\r\n          } else {\r\n            transformData.transform.op._mdf = false;\r\n          }\r\n        }\r\n\r\n        cont += 1;\r\n      }\r\n\r\n      this._currentCopies = copies; /// /\r\n\r\n      var offset = this.o.v;\r\n      var offsetModulo = offset % 1;\r\n      var roundOffset = offset > 0 ? Math.floor(offset) : Math.ceil(offset);\r\n      var pProps = this.pMatrix.props;\r\n      var rProps = this.rMatrix.props;\r\n      var sProps = this.sMatrix.props;\r\n      this.pMatrix.reset();\r\n      this.rMatrix.reset();\r\n      this.sMatrix.reset();\r\n      this.tMatrix.reset();\r\n      this.matrix.reset();\r\n      var iteration = 0;\r\n\r\n      if (offset > 0) {\r\n        while (iteration < roundOffset) {\r\n          this.applyTransforms(this.pMatrix, this.rMatrix, this.sMatrix, this.tr, 1, false);\r\n          iteration += 1;\r\n        }\r\n\r\n        if (offsetModulo) {\r\n          this.applyTransforms(this.pMatrix, this.rMatrix, this.sMatrix, this.tr, offsetModulo, false);\r\n          iteration += offsetModulo;\r\n        }\r\n      } else if (offset < 0) {\r\n        while (iteration > roundOffset) {\r\n          this.applyTransforms(this.pMatrix, this.rMatrix, this.sMatrix, this.tr, 1, true);\r\n          iteration -= 1;\r\n        }\r\n\r\n        if (offsetModulo) {\r\n          this.applyTransforms(this.pMatrix, this.rMatrix, this.sMatrix, this.tr, -offsetModulo, true);\r\n          iteration -= offsetModulo;\r\n        }\r\n      }\r\n\r\n      i = this.data.m === 1 ? 0 : this._currentCopies - 1;\r\n      dir = this.data.m === 1 ? 1 : -1;\r\n      cont = this._currentCopies;\r\n      var j;\r\n      var jLen;\r\n\r\n      while (cont) {\r\n        items = this.elemsData[i].it;\r\n        itemsTransform = items[items.length - 1].transform.mProps.v.props;\r\n        jLen = itemsTransform.length;\r\n        items[items.length - 1].transform.mProps._mdf = true;\r\n        items[items.length - 1].transform.op._mdf = true;\r\n        items[items.length - 1].transform.op.v = this._currentCopies === 1 ? this.so.v : this.so.v + (this.eo.v - this.so.v) * (i / (this._currentCopies - 1));\r\n\r\n        if (iteration !== 0) {\r\n          if (i !== 0 && dir === 1 || i !== this._currentCopies - 1 && dir === -1) {\r\n            this.applyTransforms(this.pMatrix, this.rMatrix, this.sMatrix, this.tr, 1, false);\r\n          }\r\n\r\n          this.matrix.transform(rProps[0], rProps[1], rProps[2], rProps[3], rProps[4], rProps[5], rProps[6], rProps[7], rProps[8], rProps[9], rProps[10], rProps[11], rProps[12], rProps[13], rProps[14], rProps[15]);\r\n          this.matrix.transform(sProps[0], sProps[1], sProps[2], sProps[3], sProps[4], sProps[5], sProps[6], sProps[7], sProps[8], sProps[9], sProps[10], sProps[11], sProps[12], sProps[13], sProps[14], sProps[15]);\r\n          this.matrix.transform(pProps[0], pProps[1], pProps[2], pProps[3], pProps[4], pProps[5], pProps[6], pProps[7], pProps[8], pProps[9], pProps[10], pProps[11], pProps[12], pProps[13], pProps[14], pProps[15]);\r\n\r\n          for (j = 0; j < jLen; j += 1) {\r\n            itemsTransform[j] = this.matrix.props[j];\r\n          }\r\n\r\n          this.matrix.reset();\r\n        } else {\r\n          this.matrix.reset();\r\n\r\n          for (j = 0; j < jLen; j += 1) {\r\n            itemsTransform[j] = this.matrix.props[j];\r\n          }\r\n        }\r\n\r\n        iteration += 1;\r\n        cont -= 1;\r\n        i += dir;\r\n      }\r\n    } else {\r\n      cont = this._currentCopies;\r\n      i = 0;\r\n      dir = 1;\r\n\r\n      while (cont) {\r\n        items = this.elemsData[i].it;\r\n        itemsTransform = items[items.length - 1].transform.mProps.v.props;\r\n        items[items.length - 1].transform.mProps._mdf = false;\r\n        items[items.length - 1].transform.op._mdf = false;\r\n        cont -= 1;\r\n        i += dir;\r\n      }\r\n    }\r\n\r\n    return hasReloaded;\r\n  };\r\n\r\n  RepeaterModifier.prototype.addShape = function () {};\r\n\r\n  function RoundCornersModifier() {}\r\n\r\n  extendPrototype([ShapeModifier], RoundCornersModifier);\r\n\r\n  RoundCornersModifier.prototype.initModifierProperties = function (elem, data) {\r\n    this.getValue = this.processKeys;\r\n    this.rd = PropertyFactory.getProp(elem, data.r, 0, null, this);\r\n    this._isAnimated = !!this.rd.effectsSequence.length;\r\n  };\r\n\r\n  RoundCornersModifier.prototype.processPath = function (path, round) {\r\n    var clonedPath = shapePool.newElement();\r\n    clonedPath.c = path.c;\r\n    var i;\r\n    var len = path._length;\r\n    var currentV;\r\n    var currentI;\r\n    var currentO;\r\n    var closerV;\r\n    var distance;\r\n    var newPosPerc;\r\n    var index = 0;\r\n    var vX;\r\n    var vY;\r\n    var oX;\r\n    var oY;\r\n    var iX;\r\n    var iY;\r\n\r\n    for (i = 0; i < len; i += 1) {\r\n      currentV = path.v[i];\r\n      currentO = path.o[i];\r\n      currentI = path.i[i];\r\n\r\n      if (currentV[0] === currentO[0] && currentV[1] === currentO[1] && currentV[0] === currentI[0] && currentV[1] === currentI[1]) {\r\n        if ((i === 0 || i === len - 1) && !path.c) {\r\n          clonedPath.setTripleAt(currentV[0], currentV[1], currentO[0], currentO[1], currentI[0], currentI[1], index);\r\n          /* clonedPath.v[index] = currentV;\r\n                  clonedPath.o[index] = currentO;\r\n                  clonedPath.i[index] = currentI; */\r\n\r\n          index += 1;\r\n        } else {\r\n          if (i === 0) {\r\n            closerV = path.v[len - 1];\r\n          } else {\r\n            closerV = path.v[i - 1];\r\n          }\r\n\r\n          distance = Math.sqrt(Math.pow(currentV[0] - closerV[0], 2) + Math.pow(currentV[1] - closerV[1], 2));\r\n          newPosPerc = distance ? Math.min(distance / 2, round) / distance : 0;\r\n          iX = currentV[0] + (closerV[0] - currentV[0]) * newPosPerc;\r\n          vX = iX;\r\n          iY = currentV[1] - (currentV[1] - closerV[1]) * newPosPerc;\r\n          vY = iY;\r\n          oX = vX - (vX - currentV[0]) * roundCorner;\r\n          oY = vY - (vY - currentV[1]) * roundCorner;\r\n          clonedPath.setTripleAt(vX, vY, oX, oY, iX, iY, index);\r\n          index += 1;\r\n\r\n          if (i === len - 1) {\r\n            closerV = path.v[0];\r\n          } else {\r\n            closerV = path.v[i + 1];\r\n          }\r\n\r\n          distance = Math.sqrt(Math.pow(currentV[0] - closerV[0], 2) + Math.pow(currentV[1] - closerV[1], 2));\r\n          newPosPerc = distance ? Math.min(distance / 2, round) / distance : 0;\r\n          oX = currentV[0] + (closerV[0] - currentV[0]) * newPosPerc;\r\n          vX = oX;\r\n          oY = currentV[1] + (closerV[1] - currentV[1]) * newPosPerc;\r\n          vY = oY;\r\n          iX = vX - (vX - currentV[0]) * roundCorner;\r\n          iY = vY - (vY - currentV[1]) * roundCorner;\r\n          clonedPath.setTripleAt(vX, vY, oX, oY, iX, iY, index);\r\n          index += 1;\r\n        }\r\n      } else {\r\n        clonedPath.setTripleAt(path.v[i][0], path.v[i][1], path.o[i][0], path.o[i][1], path.i[i][0], path.i[i][1], index);\r\n        index += 1;\r\n      }\r\n    }\r\n\r\n    return clonedPath;\r\n  };\r\n\r\n  RoundCornersModifier.prototype.processShapes = function (_isFirstFrame) {\r\n    var shapePaths;\r\n    var i;\r\n    var len = this.shapes.length;\r\n    var j;\r\n    var jLen;\r\n    var rd = this.rd.v;\r\n\r\n    if (rd !== 0) {\r\n      var shapeData;\r\n      var localShapeCollection;\r\n\r\n      for (i = 0; i < len; i += 1) {\r\n        shapeData = this.shapes[i];\r\n        localShapeCollection = shapeData.localShapeCollection;\r\n\r\n        if (!(!shapeData.shape._mdf && !this._mdf && !_isFirstFrame)) {\r\n          localShapeCollection.releaseShapes();\r\n          shapeData.shape._mdf = true;\r\n          shapePaths = shapeData.shape.paths.shapes;\r\n          jLen = shapeData.shape.paths._length;\r\n\r\n          for (j = 0; j < jLen; j += 1) {\r\n            localShapeCollection.addShape(this.processPath(shapePaths[j], rd));\r\n          }\r\n        }\r\n\r\n        shapeData.shape.paths = shapeData.localShapeCollection;\r\n      }\r\n    }\r\n\r\n    if (!this.dynamicProperties.length) {\r\n      this._mdf = false;\r\n    }\r\n  };\r\n\r\n  function floatEqual(a, b) {\r\n    return Math.abs(a - b) * 100000 <= Math.min(Math.abs(a), Math.abs(b));\r\n  }\r\n\r\n  function floatZero(f) {\r\n    return Math.abs(f) <= 0.00001;\r\n  }\r\n\r\n  function lerp(p0, p1, amount) {\r\n    return p0 * (1 - amount) + p1 * amount;\r\n  }\r\n\r\n  function lerpPoint(p0, p1, amount) {\r\n    return [lerp(p0[0], p1[0], amount), lerp(p0[1], p1[1], amount)];\r\n  }\r\n\r\n  function quadRoots(a, b, c) {\r\n    // no root\r\n    if (a === 0) return [];\r\n    var s = b * b - 4 * a * c; // Complex roots\r\n\r\n    if (s < 0) return [];\r\n    var singleRoot = -b / (2 * a); // 1 root\r\n\r\n    if (s === 0) return [singleRoot];\r\n    var delta = Math.sqrt(s) / (2 * a); // 2 roots\r\n\r\n    return [singleRoot - delta, singleRoot + delta];\r\n  }\r\n\r\n  function polynomialCoefficients(p0, p1, p2, p3) {\r\n    return [-p0 + 3 * p1 - 3 * p2 + p3, 3 * p0 - 6 * p1 + 3 * p2, -3 * p0 + 3 * p1, p0];\r\n  }\r\n\r\n  function singlePoint(p) {\r\n    return new PolynomialBezier(p, p, p, p, false);\r\n  }\r\n\r\n  function PolynomialBezier(p0, p1, p2, p3, linearize) {\r\n    if (linearize && pointEqual(p0, p1)) {\r\n      p1 = lerpPoint(p0, p3, 1 / 3);\r\n    }\r\n\r\n    if (linearize && pointEqual(p2, p3)) {\r\n      p2 = lerpPoint(p0, p3, 2 / 3);\r\n    }\r\n\r\n    var coeffx = polynomialCoefficients(p0[0], p1[0], p2[0], p3[0]);\r\n    var coeffy = polynomialCoefficients(p0[1], p1[1], p2[1], p3[1]);\r\n    this.a = [coeffx[0], coeffy[0]];\r\n    this.b = [coeffx[1], coeffy[1]];\r\n    this.c = [coeffx[2], coeffy[2]];\r\n    this.d = [coeffx[3], coeffy[3]];\r\n    this.points = [p0, p1, p2, p3];\r\n  }\r\n\r\n  PolynomialBezier.prototype.point = function (t) {\r\n    return [((this.a[0] * t + this.b[0]) * t + this.c[0]) * t + this.d[0], ((this.a[1] * t + this.b[1]) * t + this.c[1]) * t + this.d[1]];\r\n  };\r\n\r\n  PolynomialBezier.prototype.derivative = function (t) {\r\n    return [(3 * t * this.a[0] + 2 * this.b[0]) * t + this.c[0], (3 * t * this.a[1] + 2 * this.b[1]) * t + this.c[1]];\r\n  };\r\n\r\n  PolynomialBezier.prototype.tangentAngle = function (t) {\r\n    var p = this.derivative(t);\r\n    return Math.atan2(p[1], p[0]);\r\n  };\r\n\r\n  PolynomialBezier.prototype.normalAngle = function (t) {\r\n    var p = this.derivative(t);\r\n    return Math.atan2(p[0], p[1]);\r\n  };\r\n\r\n  PolynomialBezier.prototype.inflectionPoints = function () {\r\n    var denom = this.a[1] * this.b[0] - this.a[0] * this.b[1];\r\n    if (floatZero(denom)) return [];\r\n    var tcusp = -0.5 * (this.a[1] * this.c[0] - this.a[0] * this.c[1]) / denom;\r\n    var square = tcusp * tcusp - 1 / 3 * (this.b[1] * this.c[0] - this.b[0] * this.c[1]) / denom;\r\n    if (square < 0) return [];\r\n    var root = Math.sqrt(square);\r\n\r\n    if (floatZero(root)) {\r\n      if (root > 0 && root < 1) return [tcusp];\r\n      return [];\r\n    }\r\n\r\n    return [tcusp - root, tcusp + root].filter(function (r) {\r\n      return r > 0 && r < 1;\r\n    });\r\n  };\r\n\r\n  PolynomialBezier.prototype.split = function (t) {\r\n    if (t <= 0) return [singlePoint(this.points[0]), this];\r\n    if (t >= 1) return [this, singlePoint(this.points[this.points.length - 1])];\r\n    var p10 = lerpPoint(this.points[0], this.points[1], t);\r\n    var p11 = lerpPoint(this.points[1], this.points[2], t);\r\n    var p12 = lerpPoint(this.points[2], this.points[3], t);\r\n    var p20 = lerpPoint(p10, p11, t);\r\n    var p21 = lerpPoint(p11, p12, t);\r\n    var p3 = lerpPoint(p20, p21, t);\r\n    return [new PolynomialBezier(this.points[0], p10, p20, p3, true), new PolynomialBezier(p3, p21, p12, this.points[3], true)];\r\n  };\r\n\r\n  function extrema(bez, comp) {\r\n    var min = bez.points[0][comp];\r\n    var max = bez.points[bez.points.length - 1][comp];\r\n\r\n    if (min > max) {\r\n      var e = max;\r\n      max = min;\r\n      min = e;\r\n    } // Derivative roots to find min/max\r\n\r\n\r\n    var f = quadRoots(3 * bez.a[comp], 2 * bez.b[comp], bez.c[comp]);\r\n\r\n    for (var i = 0; i < f.length; i += 1) {\r\n      if (f[i] > 0 && f[i] < 1) {\r\n        var val = bez.point(f[i])[comp];\r\n        if (val < min) min = val;else if (val > max) max = val;\r\n      }\r\n    }\r\n\r\n    return {\r\n      min: min,\r\n      max: max\r\n    };\r\n  }\r\n\r\n  PolynomialBezier.prototype.bounds = function () {\r\n    return {\r\n      x: extrema(this, 0),\r\n      y: extrema(this, 1)\r\n    };\r\n  };\r\n\r\n  PolynomialBezier.prototype.boundingBox = function () {\r\n    var bounds = this.bounds();\r\n    return {\r\n      left: bounds.x.min,\r\n      right: bounds.x.max,\r\n      top: bounds.y.min,\r\n      bottom: bounds.y.max,\r\n      width: bounds.x.max - bounds.x.min,\r\n      height: bounds.y.max - bounds.y.min,\r\n      cx: (bounds.x.max + bounds.x.min) / 2,\r\n      cy: (bounds.y.max + bounds.y.min) / 2\r\n    };\r\n  };\r\n\r\n  function intersectData(bez, t1, t2) {\r\n    var box = bez.boundingBox();\r\n    return {\r\n      cx: box.cx,\r\n      cy: box.cy,\r\n      width: box.width,\r\n      height: box.height,\r\n      bez: bez,\r\n      t: (t1 + t2) / 2,\r\n      t1: t1,\r\n      t2: t2\r\n    };\r\n  }\r\n\r\n  function splitData(data) {\r\n    var split = data.bez.split(0.5);\r\n    return [intersectData(split[0], data.t1, data.t), intersectData(split[1], data.t, data.t2)];\r\n  }\r\n\r\n  function boxIntersect(b1, b2) {\r\n    return Math.abs(b1.cx - b2.cx) * 2 < b1.width + b2.width && Math.abs(b1.cy - b2.cy) * 2 < b1.height + b2.height;\r\n  }\r\n\r\n  function intersectsImpl(d1, d2, depth, tolerance, intersections, maxRecursion) {\r\n    if (!boxIntersect(d1, d2)) return;\r\n\r\n    if (depth >= maxRecursion || d1.width <= tolerance && d1.height <= tolerance && d2.width <= tolerance && d2.height <= tolerance) {\r\n      intersections.push([d1.t, d2.t]);\r\n      return;\r\n    }\r\n\r\n    var d1s = splitData(d1);\r\n    var d2s = splitData(d2);\r\n    intersectsImpl(d1s[0], d2s[0], depth + 1, tolerance, intersections, maxRecursion);\r\n    intersectsImpl(d1s[0], d2s[1], depth + 1, tolerance, intersections, maxRecursion);\r\n    intersectsImpl(d1s[1], d2s[0], depth + 1, tolerance, intersections, maxRecursion);\r\n    intersectsImpl(d1s[1], d2s[1], depth + 1, tolerance, intersections, maxRecursion);\r\n  }\r\n\r\n  PolynomialBezier.prototype.intersections = function (other, tolerance, maxRecursion) {\r\n    if (tolerance === undefined) tolerance = 2;\r\n    if (maxRecursion === undefined) maxRecursion = 7;\r\n    var intersections = [];\r\n    intersectsImpl(intersectData(this, 0, 1), intersectData(other, 0, 1), 0, tolerance, intersections, maxRecursion);\r\n    return intersections;\r\n  };\r\n\r\n  PolynomialBezier.shapeSegment = function (shapePath, index) {\r\n    var nextIndex = (index + 1) % shapePath.length();\r\n    return new PolynomialBezier(shapePath.v[index], shapePath.o[index], shapePath.i[nextIndex], shapePath.v[nextIndex], true);\r\n  };\r\n\r\n  PolynomialBezier.shapeSegmentInverted = function (shapePath, index) {\r\n    var nextIndex = (index + 1) % shapePath.length();\r\n    return new PolynomialBezier(shapePath.v[nextIndex], shapePath.i[nextIndex], shapePath.o[index], shapePath.v[index], true);\r\n  };\r\n\r\n  function crossProduct(a, b) {\r\n    return [a[1] * b[2] - a[2] * b[1], a[2] * b[0] - a[0] * b[2], a[0] * b[1] - a[1] * b[0]];\r\n  }\r\n\r\n  function lineIntersection(start1, end1, start2, end2) {\r\n    var v1 = [start1[0], start1[1], 1];\r\n    var v2 = [end1[0], end1[1], 1];\r\n    var v3 = [start2[0], start2[1], 1];\r\n    var v4 = [end2[0], end2[1], 1];\r\n    var r = crossProduct(crossProduct(v1, v2), crossProduct(v3, v4));\r\n    if (floatZero(r[2])) return null;\r\n    return [r[0] / r[2], r[1] / r[2]];\r\n  }\r\n\r\n  function polarOffset(p, angle, length) {\r\n    return [p[0] + Math.cos(angle) * length, p[1] - Math.sin(angle) * length];\r\n  }\r\n\r\n  function pointDistance(p1, p2) {\r\n    return Math.hypot(p1[0] - p2[0], p1[1] - p2[1]);\r\n  }\r\n\r\n  function pointEqual(p1, p2) {\r\n    return floatEqual(p1[0], p2[0]) && floatEqual(p1[1], p2[1]);\r\n  }\r\n\r\n  function ZigZagModifier() {}\r\n\r\n  extendPrototype([ShapeModifier], ZigZagModifier);\r\n\r\n  ZigZagModifier.prototype.initModifierProperties = function (elem, data) {\r\n    this.getValue = this.processKeys;\r\n    this.amplitude = PropertyFactory.getProp(elem, data.s, 0, null, this);\r\n    this.frequency = PropertyFactory.getProp(elem, data.r, 0, null, this);\r\n    this.pointsType = PropertyFactory.getProp(elem, data.pt, 0, null, this);\r\n    this._isAnimated = this.amplitude.effectsSequence.length !== 0 || this.frequency.effectsSequence.length !== 0 || this.pointsType.effectsSequence.length !== 0;\r\n  };\r\n\r\n  function setPoint(outputBezier, point, angle, direction, amplitude, outAmplitude, inAmplitude) {\r\n    var angO = angle - Math.PI / 2;\r\n    var angI = angle + Math.PI / 2;\r\n    var px = point[0] + Math.cos(angle) * direction * amplitude;\r\n    var py = point[1] - Math.sin(angle) * direction * amplitude;\r\n    outputBezier.setTripleAt(px, py, px + Math.cos(angO) * outAmplitude, py - Math.sin(angO) * outAmplitude, px + Math.cos(angI) * inAmplitude, py - Math.sin(angI) * inAmplitude, outputBezier.length());\r\n  }\r\n\r\n  function getPerpendicularVector(pt1, pt2) {\r\n    var vector = [pt2[0] - pt1[0], pt2[1] - pt1[1]];\r\n    var rot = -Math.PI * 0.5;\r\n    var rotatedVector = [Math.cos(rot) * vector[0] - Math.sin(rot) * vector[1], Math.sin(rot) * vector[0] + Math.cos(rot) * vector[1]];\r\n    return rotatedVector;\r\n  }\r\n\r\n  function getProjectingAngle(path, cur) {\r\n    var prevIndex = cur === 0 ? path.length() - 1 : cur - 1;\r\n    var nextIndex = (cur + 1) % path.length();\r\n    var prevPoint = path.v[prevIndex];\r\n    var nextPoint = path.v[nextIndex];\r\n    var pVector = getPerpendicularVector(prevPoint, nextPoint);\r\n    return Math.atan2(0, 1) - Math.atan2(pVector[1], pVector[0]);\r\n  }\r\n\r\n  function zigZagCorner(outputBezier, path, cur, amplitude, frequency, pointType, direction) {\r\n    var angle = getProjectingAngle(path, cur);\r\n    var point = path.v[cur % path._length];\r\n    var prevPoint = path.v[cur === 0 ? path._length - 1 : cur - 1];\r\n    var nextPoint = path.v[(cur + 1) % path._length];\r\n    var prevDist = pointType === 2 ? Math.sqrt(Math.pow(point[0] - prevPoint[0], 2) + Math.pow(point[1] - prevPoint[1], 2)) : 0;\r\n    var nextDist = pointType === 2 ? Math.sqrt(Math.pow(point[0] - nextPoint[0], 2) + Math.pow(point[1] - nextPoint[1], 2)) : 0;\r\n    setPoint(outputBezier, path.v[cur % path._length], angle, direction, amplitude, nextDist / ((frequency + 1) * 2), prevDist / ((frequency + 1) * 2), pointType);\r\n  }\r\n\r\n  function zigZagSegment(outputBezier, segment, amplitude, frequency, pointType, direction) {\r\n    for (var i = 0; i < frequency; i += 1) {\r\n      var t = (i + 1) / (frequency + 1);\r\n      var dist = pointType === 2 ? Math.sqrt(Math.pow(segment.points[3][0] - segment.points[0][0], 2) + Math.pow(segment.points[3][1] - segment.points[0][1], 2)) : 0;\r\n      var angle = segment.normalAngle(t);\r\n      var point = segment.point(t);\r\n      setPoint(outputBezier, point, angle, direction, amplitude, dist / ((frequency + 1) * 2), dist / ((frequency + 1) * 2), pointType);\r\n      direction = -direction;\r\n    }\r\n\r\n    return direction;\r\n  }\r\n\r\n  ZigZagModifier.prototype.processPath = function (path, amplitude, frequency, pointType) {\r\n    var count = path._length;\r\n    var clonedPath = shapePool.newElement();\r\n    clonedPath.c = path.c;\r\n\r\n    if (!path.c) {\r\n      count -= 1;\r\n    }\r\n\r\n    if (count === 0) return clonedPath;\r\n    var direction = -1;\r\n    var segment = PolynomialBezier.shapeSegment(path, 0);\r\n    zigZagCorner(clonedPath, path, 0, amplitude, frequency, pointType, direction);\r\n\r\n    for (var i = 0; i < count; i += 1) {\r\n      direction = zigZagSegment(clonedPath, segment, amplitude, frequency, pointType, -direction);\r\n\r\n      if (i === count - 1 && !path.c) {\r\n        segment = null;\r\n      } else {\r\n        segment = PolynomialBezier.shapeSegment(path, (i + 1) % count);\r\n      }\r\n\r\n      zigZagCorner(clonedPath, path, i + 1, amplitude, frequency, pointType, direction);\r\n    }\r\n\r\n    return clonedPath;\r\n  };\r\n\r\n  ZigZagModifier.prototype.processShapes = function (_isFirstFrame) {\r\n    var shapePaths;\r\n    var i;\r\n    var len = this.shapes.length;\r\n    var j;\r\n    var jLen;\r\n    var amplitude = this.amplitude.v;\r\n    var frequency = Math.max(0, Math.round(this.frequency.v));\r\n    var pointType = this.pointsType.v;\r\n\r\n    if (amplitude !== 0) {\r\n      var shapeData;\r\n      var localShapeCollection;\r\n\r\n      for (i = 0; i < len; i += 1) {\r\n        shapeData = this.shapes[i];\r\n        localShapeCollection = shapeData.localShapeCollection;\r\n\r\n        if (!(!shapeData.shape._mdf && !this._mdf && !_isFirstFrame)) {\r\n          localShapeCollection.releaseShapes();\r\n          shapeData.shape._mdf = true;\r\n          shapePaths = shapeData.shape.paths.shapes;\r\n          jLen = shapeData.shape.paths._length;\r\n\r\n          for (j = 0; j < jLen; j += 1) {\r\n            localShapeCollection.addShape(this.processPath(shapePaths[j], amplitude, frequency, pointType));\r\n          }\r\n        }\r\n\r\n        shapeData.shape.paths = shapeData.localShapeCollection;\r\n      }\r\n    }\r\n\r\n    if (!this.dynamicProperties.length) {\r\n      this._mdf = false;\r\n    }\r\n  };\r\n\r\n  function linearOffset(p1, p2, amount) {\r\n    var angle = Math.atan2(p2[0] - p1[0], p2[1] - p1[1]);\r\n    return [polarOffset(p1, angle, amount), polarOffset(p2, angle, amount)];\r\n  }\r\n\r\n  function offsetSegment(segment, amount) {\r\n    var p0;\r\n    var p1a;\r\n    var p1b;\r\n    var p2b;\r\n    var p2a;\r\n    var p3;\r\n    var e;\r\n    e = linearOffset(segment.points[0], segment.points[1], amount);\r\n    p0 = e[0];\r\n    p1a = e[1];\r\n    e = linearOffset(segment.points[1], segment.points[2], amount);\r\n    p1b = e[0];\r\n    p2b = e[1];\r\n    e = linearOffset(segment.points[2], segment.points[3], amount);\r\n    p2a = e[0];\r\n    p3 = e[1];\r\n    var p1 = lineIntersection(p0, p1a, p1b, p2b);\r\n    if (p1 === null) p1 = p1a;\r\n    var p2 = lineIntersection(p2a, p3, p1b, p2b);\r\n    if (p2 === null) p2 = p2a;\r\n    return new PolynomialBezier(p0, p1, p2, p3);\r\n  }\r\n\r\n  function joinLines(outputBezier, seg1, seg2, lineJoin, miterLimit) {\r\n    var p0 = seg1.points[3];\r\n    var p1 = seg2.points[0]; // Bevel\r\n\r\n    if (lineJoin === 3) return p0; // Connected, they don't need a joint\r\n\r\n    if (pointEqual(p0, p1)) return p0; // Round\r\n\r\n    if (lineJoin === 2) {\r\n      var angleOut = -seg1.tangentAngle(1);\r\n      var angleIn = -seg2.tangentAngle(0) + Math.PI;\r\n      var center = lineIntersection(p0, polarOffset(p0, angleOut + Math.PI / 2, 100), p1, polarOffset(p1, angleOut + Math.PI / 2, 100));\r\n      var radius = center ? pointDistance(center, p0) : pointDistance(p0, p1) / 2;\r\n      var tan = polarOffset(p0, angleOut, 2 * radius * roundCorner);\r\n      outputBezier.setXYAt(tan[0], tan[1], 'o', outputBezier.length() - 1);\r\n      tan = polarOffset(p1, angleIn, 2 * radius * roundCorner);\r\n      outputBezier.setTripleAt(p1[0], p1[1], p1[0], p1[1], tan[0], tan[1], outputBezier.length());\r\n      return p1;\r\n    } // Miter\r\n\r\n\r\n    var t0 = pointEqual(p0, seg1.points[2]) ? seg1.points[0] : seg1.points[2];\r\n    var t1 = pointEqual(p1, seg2.points[1]) ? seg2.points[3] : seg2.points[1];\r\n    var intersection = lineIntersection(t0, p0, p1, t1);\r\n\r\n    if (intersection && pointDistance(intersection, p0) < miterLimit) {\r\n      outputBezier.setTripleAt(intersection[0], intersection[1], intersection[0], intersection[1], intersection[0], intersection[1], outputBezier.length());\r\n      return intersection;\r\n    }\r\n\r\n    return p0;\r\n  }\r\n\r\n  function getIntersection(a, b) {\r\n    var intersect = a.intersections(b);\r\n    if (intersect.length && floatEqual(intersect[0][0], 1)) intersect.shift();\r\n    if (intersect.length) return intersect[0];\r\n    return null;\r\n  }\r\n\r\n  function pruneSegmentIntersection(a, b) {\r\n    var outa = a.slice();\r\n    var outb = b.slice();\r\n    var intersect = getIntersection(a[a.length - 1], b[0]);\r\n\r\n    if (intersect) {\r\n      outa[a.length - 1] = a[a.length - 1].split(intersect[0])[0];\r\n      outb[0] = b[0].split(intersect[1])[1];\r\n    }\r\n\r\n    if (a.length > 1 && b.length > 1) {\r\n      intersect = getIntersection(a[0], b[b.length - 1]);\r\n\r\n      if (intersect) {\r\n        return [[a[0].split(intersect[0])[0]], [b[b.length - 1].split(intersect[1])[1]]];\r\n      }\r\n    }\r\n\r\n    return [outa, outb];\r\n  }\r\n\r\n  function pruneIntersections(segments) {\r\n    var e;\r\n\r\n    for (var i = 1; i < segments.length; i += 1) {\r\n      e = pruneSegmentIntersection(segments[i - 1], segments[i]);\r\n      segments[i - 1] = e[0];\r\n      segments[i] = e[1];\r\n    }\r\n\r\n    if (segments.length > 1) {\r\n      e = pruneSegmentIntersection(segments[segments.length - 1], segments[0]);\r\n      segments[segments.length - 1] = e[0];\r\n      segments[0] = e[1];\r\n    }\r\n\r\n    return segments;\r\n  }\r\n\r\n  function offsetSegmentSplit(segment, amount) {\r\n    /*\r\n      We split each bezier segment into smaller pieces based\r\n      on inflection points, this ensures the control point\r\n      polygon is convex.\r\n        (A cubic bezier can have none, one, or two inflection points)\r\n    */\r\n    var flex = segment.inflectionPoints();\r\n    var left;\r\n    var right;\r\n    var split;\r\n    var mid;\r\n\r\n    if (flex.length === 0) {\r\n      return [offsetSegment(segment, amount)];\r\n    }\r\n\r\n    if (flex.length === 1 || floatEqual(flex[1], 1)) {\r\n      split = segment.split(flex[0]);\r\n      left = split[0];\r\n      right = split[1];\r\n      return [offsetSegment(left, amount), offsetSegment(right, amount)];\r\n    }\r\n\r\n    split = segment.split(flex[0]);\r\n    left = split[0];\r\n    var t = (flex[1] - flex[0]) / (1 - flex[0]);\r\n    split = split[1].split(t);\r\n    mid = split[0];\r\n    right = split[1];\r\n    return [offsetSegment(left, amount), offsetSegment(mid, amount), offsetSegment(right, amount)];\r\n  }\r\n\r\n  function OffsetPathModifier() {}\r\n\r\n  extendPrototype([ShapeModifier], OffsetPathModifier);\r\n\r\n  OffsetPathModifier.prototype.initModifierProperties = function (elem, data) {\r\n    this.getValue = this.processKeys;\r\n    this.amount = PropertyFactory.getProp(elem, data.a, 0, null, this);\r\n    this.miterLimit = PropertyFactory.getProp(elem, data.ml, 0, null, this);\r\n    this.lineJoin = data.lj;\r\n    this._isAnimated = this.amount.effectsSequence.length !== 0;\r\n  };\r\n\r\n  OffsetPathModifier.prototype.processPath = function (inputBezier, amount, lineJoin, miterLimit) {\r\n    var outputBezier = shapePool.newElement();\r\n    outputBezier.c = inputBezier.c;\r\n    var count = inputBezier.length();\r\n\r\n    if (!inputBezier.c) {\r\n      count -= 1;\r\n    }\r\n\r\n    var i;\r\n    var j;\r\n    var segment;\r\n    var multiSegments = [];\r\n\r\n    for (i = 0; i < count; i += 1) {\r\n      segment = PolynomialBezier.shapeSegment(inputBezier, i);\r\n      multiSegments.push(offsetSegmentSplit(segment, amount));\r\n    }\r\n\r\n    if (!inputBezier.c) {\r\n      for (i = count - 1; i >= 0; i -= 1) {\r\n        segment = PolynomialBezier.shapeSegmentInverted(inputBezier, i);\r\n        multiSegments.push(offsetSegmentSplit(segment, amount));\r\n      }\r\n    }\r\n\r\n    multiSegments = pruneIntersections(multiSegments); // Add bezier segments to the output and apply line joints\r\n\r\n    var lastPoint = null;\r\n    var lastSeg = null;\r\n\r\n    for (i = 0; i < multiSegments.length; i += 1) {\r\n      var multiSegment = multiSegments[i];\r\n      if (lastSeg) lastPoint = joinLines(outputBezier, lastSeg, multiSegment[0], lineJoin, miterLimit);\r\n      lastSeg = multiSegment[multiSegment.length - 1];\r\n\r\n      for (j = 0; j < multiSegment.length; j += 1) {\r\n        segment = multiSegment[j];\r\n\r\n        if (lastPoint && pointEqual(segment.points[0], lastPoint)) {\r\n          outputBezier.setXYAt(segment.points[1][0], segment.points[1][1], 'o', outputBezier.length() - 1);\r\n        } else {\r\n          outputBezier.setTripleAt(segment.points[0][0], segment.points[0][1], segment.points[1][0], segment.points[1][1], segment.points[0][0], segment.points[0][1], outputBezier.length());\r\n        }\r\n\r\n        outputBezier.setTripleAt(segment.points[3][0], segment.points[3][1], segment.points[3][0], segment.points[3][1], segment.points[2][0], segment.points[2][1], outputBezier.length());\r\n        lastPoint = segment.points[3];\r\n      }\r\n    }\r\n\r\n    if (multiSegments.length) joinLines(outputBezier, lastSeg, multiSegments[0][0], lineJoin, miterLimit);\r\n    return outputBezier;\r\n  };\r\n\r\n  OffsetPathModifier.prototype.processShapes = function (_isFirstFrame) {\r\n    var shapePaths;\r\n    var i;\r\n    var len = this.shapes.length;\r\n    var j;\r\n    var jLen;\r\n    var amount = this.amount.v;\r\n    var miterLimit = this.miterLimit.v;\r\n    var lineJoin = this.lineJoin;\r\n\r\n    if (amount !== 0) {\r\n      var shapeData;\r\n      var localShapeCollection;\r\n\r\n      for (i = 0; i < len; i += 1) {\r\n        shapeData = this.shapes[i];\r\n        localShapeCollection = shapeData.localShapeCollection;\r\n\r\n        if (!(!shapeData.shape._mdf && !this._mdf && !_isFirstFrame)) {\r\n          localShapeCollection.releaseShapes();\r\n          shapeData.shape._mdf = true;\r\n          shapePaths = shapeData.shape.paths.shapes;\r\n          jLen = shapeData.shape.paths._length;\r\n\r\n          for (j = 0; j < jLen; j += 1) {\r\n            localShapeCollection.addShape(this.processPath(shapePaths[j], amount, lineJoin, miterLimit));\r\n          }\r\n        }\r\n\r\n        shapeData.shape.paths = shapeData.localShapeCollection;\r\n      }\r\n    }\r\n\r\n    if (!this.dynamicProperties.length) {\r\n      this._mdf = false;\r\n    }\r\n  };\r\n\r\n  function getFontProperties(fontData) {\r\n    var styles = fontData.fStyle ? fontData.fStyle.split(' ') : [];\r\n    var fWeight = 'normal';\r\n    var fStyle = 'normal';\r\n    var len = styles.length;\r\n    var styleName;\r\n\r\n    for (var i = 0; i < len; i += 1) {\r\n      styleName = styles[i].toLowerCase();\r\n\r\n      switch (styleName) {\r\n        case 'italic':\r\n          fStyle = 'italic';\r\n          break;\r\n\r\n        case 'bold':\r\n          fWeight = '700';\r\n          break;\r\n\r\n        case 'black':\r\n          fWeight = '900';\r\n          break;\r\n\r\n        case 'medium':\r\n          fWeight = '500';\r\n          break;\r\n\r\n        case 'regular':\r\n        case 'normal':\r\n          fWeight = '400';\r\n          break;\r\n\r\n        case 'light':\r\n        case 'thin':\r\n          fWeight = '200';\r\n          break;\r\n\r\n        default:\r\n          break;\r\n      }\r\n    }\r\n\r\n    return {\r\n      style: fStyle,\r\n      weight: fontData.fWeight || fWeight\r\n    };\r\n  }\r\n\r\n  var FontManager = function () {\r\n    var maxWaitingTime = 5000;\r\n    var emptyChar = {\r\n      w: 0,\r\n      size: 0,\r\n      shapes: [],\r\n      data: {\r\n        shapes: []\r\n      }\r\n    };\r\n    var combinedCharacters = []; // Hindi characters\r\n\r\n    combinedCharacters = combinedCharacters.concat([2304, 2305, 2306, 2307, 2362, 2363, 2364, 2364, 2366, 2367, 2368, 2369, 2370, 2371, 2372, 2373, 2374, 2375, 2376, 2377, 2378, 2379, 2380, 2381, 2382, 2383, 2387, 2388, 2389, 2390, 2391, 2402, 2403]);\r\n    var surrogateModifiers = ['d83cdffb', 'd83cdffc', 'd83cdffd', 'd83cdffe', 'd83cdfff'];\r\n    var zeroWidthJoiner = [65039, 8205];\r\n\r\n    function trimFontOptions(font) {\r\n      var familyArray = font.split(',');\r\n      var i;\r\n      var len = familyArray.length;\r\n      var enabledFamilies = [];\r\n\r\n      for (i = 0; i < len; i += 1) {\r\n        if (familyArray[i] !== 'sans-serif' && familyArray[i] !== 'monospace') {\r\n          enabledFamilies.push(familyArray[i]);\r\n        }\r\n      }\r\n\r\n      return enabledFamilies.join(',');\r\n    }\r\n\r\n    function setUpNode(font, family) {\r\n      var parentNode = createTag('span'); // Node is invisible to screen readers.\r\n\r\n      parentNode.setAttribute('aria-hidden', true);\r\n      parentNode.style.fontFamily = family;\r\n      var node = createTag('span'); // Characters that vary significantly among different fonts\r\n\r\n      node.innerText = 'giItT1WQy@!-/#'; // Visible - so we can measure it - but not on the screen\r\n\r\n      parentNode.style.position = 'absolute';\r\n      parentNode.style.left = '-10000px';\r\n      parentNode.style.top = '-10000px'; // Large font size makes even subtle changes obvious\r\n\r\n      parentNode.style.fontSize = '300px'; // Reset any font properties\r\n\r\n      parentNode.style.fontVariant = 'normal';\r\n      parentNode.style.fontStyle = 'normal';\r\n      parentNode.style.fontWeight = 'normal';\r\n      parentNode.style.letterSpacing = '0';\r\n      parentNode.appendChild(node);\r\n      document.body.appendChild(parentNode); // Remember width with no applied web font\r\n\r\n      var width = node.offsetWidth;\r\n      node.style.fontFamily = trimFontOptions(font) + ', ' + family;\r\n      return {\r\n        node: node,\r\n        w: width,\r\n        parent: parentNode\r\n      };\r\n    }\r\n\r\n    function checkLoadedFonts() {\r\n      var i;\r\n      var len = this.fonts.length;\r\n      var node;\r\n      var w;\r\n      var loadedCount = len;\r\n\r\n      for (i = 0; i < len; i += 1) {\r\n        if (this.fonts[i].loaded) {\r\n          loadedCount -= 1;\r\n        } else if (this.fonts[i].fOrigin === 'n' || this.fonts[i].origin === 0) {\r\n          this.fonts[i].loaded = true;\r\n        } else {\r\n          node = this.fonts[i].monoCase.node;\r\n          w = this.fonts[i].monoCase.w;\r\n\r\n          if (node.offsetWidth !== w) {\r\n            loadedCount -= 1;\r\n            this.fonts[i].loaded = true;\r\n          } else {\r\n            node = this.fonts[i].sansCase.node;\r\n            w = this.fonts[i].sansCase.w;\r\n\r\n            if (node.offsetWidth !== w) {\r\n              loadedCount -= 1;\r\n              this.fonts[i].loaded = true;\r\n            }\r\n          }\r\n\r\n          if (this.fonts[i].loaded) {\r\n            this.fonts[i].sansCase.parent.parentNode.removeChild(this.fonts[i].sansCase.parent);\r\n            this.fonts[i].monoCase.parent.parentNode.removeChild(this.fonts[i].monoCase.parent);\r\n          }\r\n        }\r\n      }\r\n\r\n      if (loadedCount !== 0 && Date.now() - this.initTime < maxWaitingTime) {\r\n        setTimeout(this.checkLoadedFontsBinded, 20);\r\n      } else {\r\n        setTimeout(this.setIsLoadedBinded, 10);\r\n      }\r\n    }\r\n\r\n    function createHelper(fontData, def) {\r\n      var engine = document.body && def ? 'svg' : 'canvas';\r\n      var helper;\r\n      var fontProps = getFontProperties(fontData);\r\n\r\n      if (engine === 'svg') {\r\n        var tHelper = createNS('text');\r\n        tHelper.style.fontSize = '100px'; // tHelper.style.fontFamily = fontData.fFamily;\r\n\r\n        tHelper.setAttribute('font-family', fontData.fFamily);\r\n        tHelper.setAttribute('font-style', fontProps.style);\r\n        tHelper.setAttribute('font-weight', fontProps.weight);\r\n        tHelper.textContent = '1';\r\n\r\n        if (fontData.fClass) {\r\n          tHelper.style.fontFamily = 'inherit';\r\n          tHelper.setAttribute('class', fontData.fClass);\r\n        } else {\r\n          tHelper.style.fontFamily = fontData.fFamily;\r\n        }\r\n\r\n        def.appendChild(tHelper);\r\n        helper = tHelper;\r\n      } else {\r\n        var tCanvasHelper = new OffscreenCanvas(500, 500).getContext('2d');\r\n        tCanvasHelper.font = fontProps.style + ' ' + fontProps.weight + ' 100px ' + fontData.fFamily;\r\n        helper = tCanvasHelper;\r\n      }\r\n\r\n      function measure(text) {\r\n        if (engine === 'svg') {\r\n          helper.textContent = text;\r\n          return helper.getComputedTextLength();\r\n        }\r\n\r\n        return helper.measureText(text).width;\r\n      }\r\n\r\n      return {\r\n        measureText: measure\r\n      };\r\n    }\r\n\r\n    function addFonts(fontData, defs) {\r\n      if (!fontData) {\r\n        this.isLoaded = true;\r\n        return;\r\n      }\r\n\r\n      if (this.chars) {\r\n        this.isLoaded = true;\r\n        this.fonts = fontData.list;\r\n        return;\r\n      }\r\n\r\n      if (!document.body) {\r\n        this.isLoaded = true;\r\n        fontData.list.forEach(function (data) {\r\n          data.helper = createHelper(data);\r\n          data.cache = {};\r\n        });\r\n        this.fonts = fontData.list;\r\n        return;\r\n      }\r\n\r\n      var fontArr = fontData.list;\r\n      var i;\r\n      var len = fontArr.length;\r\n      var _pendingFonts = len;\r\n\r\n      for (i = 0; i < len; i += 1) {\r\n        var shouldLoadFont = true;\r\n        var loadedSelector;\r\n        var j;\r\n        fontArr[i].loaded = false;\r\n        fontArr[i].monoCase = setUpNode(fontArr[i].fFamily, 'monospace');\r\n        fontArr[i].sansCase = setUpNode(fontArr[i].fFamily, 'sans-serif');\r\n\r\n        if (!fontArr[i].fPath) {\r\n          fontArr[i].loaded = true;\r\n          _pendingFonts -= 1;\r\n        } else if (fontArr[i].fOrigin === 'p' || fontArr[i].origin === 3) {\r\n          loadedSelector = document.querySelectorAll('style[f-forigin=\"p\"][f-family=\"' + fontArr[i].fFamily + '\"], style[f-origin=\"3\"][f-family=\"' + fontArr[i].fFamily + '\"]');\r\n\r\n          if (loadedSelector.length > 0) {\r\n            shouldLoadFont = false;\r\n          }\r\n\r\n          if (shouldLoadFont) {\r\n            var s = createTag('style');\r\n            s.setAttribute('f-forigin', fontArr[i].fOrigin);\r\n            s.setAttribute('f-origin', fontArr[i].origin);\r\n            s.setAttribute('f-family', fontArr[i].fFamily);\r\n            s.type = 'text/css';\r\n            s.innerText = '@font-face {font-family: ' + fontArr[i].fFamily + \"; font-style: normal; src: url('\" + fontArr[i].fPath + \"');}\";\r\n            defs.appendChild(s);\r\n          }\r\n        } else if (fontArr[i].fOrigin === 'g' || fontArr[i].origin === 1) {\r\n          loadedSelector = document.querySelectorAll('link[f-forigin=\"g\"], link[f-origin=\"1\"]');\r\n\r\n          for (j = 0; j < loadedSelector.length; j += 1) {\r\n            if (loadedSelector[j].href.indexOf(fontArr[i].fPath) !== -1) {\r\n              // Font is already loaded\r\n              shouldLoadFont = false;\r\n            }\r\n          }\r\n\r\n          if (shouldLoadFont) {\r\n            var l = createTag('link');\r\n            l.setAttribute('f-forigin', fontArr[i].fOrigin);\r\n            l.setAttribute('f-origin', fontArr[i].origin);\r\n            l.type = 'text/css';\r\n            l.rel = 'stylesheet';\r\n            l.href = fontArr[i].fPath;\r\n            document.body.appendChild(l);\r\n          }\r\n        } else if (fontArr[i].fOrigin === 't' || fontArr[i].origin === 2) {\r\n          loadedSelector = document.querySelectorAll('script[f-forigin=\"t\"], script[f-origin=\"2\"]');\r\n\r\n          for (j = 0; j < loadedSelector.length; j += 1) {\r\n            if (fontArr[i].fPath === loadedSelector[j].src) {\r\n              // Font is already loaded\r\n              shouldLoadFont = false;\r\n            }\r\n          }\r\n\r\n          if (shouldLoadFont) {\r\n            var sc = createTag('link');\r\n            sc.setAttribute('f-forigin', fontArr[i].fOrigin);\r\n            sc.setAttribute('f-origin', fontArr[i].origin);\r\n            sc.setAttribute('rel', 'stylesheet');\r\n            sc.setAttribute('href', fontArr[i].fPath);\r\n            defs.appendChild(sc);\r\n          }\r\n        }\r\n\r\n        fontArr[i].helper = createHelper(fontArr[i], defs);\r\n        fontArr[i].cache = {};\r\n        this.fonts.push(fontArr[i]);\r\n      }\r\n\r\n      if (_pendingFonts === 0) {\r\n        this.isLoaded = true;\r\n      } else {\r\n        // On some cases even if the font is loaded, it won't load correctly when measuring text on canvas.\r\n        // Adding this timeout seems to fix it\r\n        setTimeout(this.checkLoadedFonts.bind(this), 100);\r\n      }\r\n    }\r\n\r\n    function addChars(chars) {\r\n      if (!chars) {\r\n        return;\r\n      }\r\n\r\n      if (!this.chars) {\r\n        this.chars = [];\r\n      }\r\n\r\n      var i;\r\n      var len = chars.length;\r\n      var j;\r\n      var jLen = this.chars.length;\r\n      var found;\r\n\r\n      for (i = 0; i < len; i += 1) {\r\n        j = 0;\r\n        found = false;\r\n\r\n        while (j < jLen) {\r\n          if (this.chars[j].style === chars[i].style && this.chars[j].fFamily === chars[i].fFamily && this.chars[j].ch === chars[i].ch) {\r\n            found = true;\r\n          }\r\n\r\n          j += 1;\r\n        }\r\n\r\n        if (!found) {\r\n          this.chars.push(chars[i]);\r\n          jLen += 1;\r\n        }\r\n      }\r\n    }\r\n\r\n    function getCharData(_char, style, font) {\r\n      var i = 0;\r\n      var len = this.chars.length;\r\n\r\n      while (i < len) {\r\n        if (this.chars[i].ch === _char && this.chars[i].style === style && this.chars[i].fFamily === font) {\r\n          return this.chars[i];\r\n        }\r\n\r\n        i += 1;\r\n      }\r\n\r\n      if ((typeof _char === 'string' && _char.charCodeAt(0) !== 13 || !_char) && console && console.warn // eslint-disable-line no-console\r\n      && !this._warned) {\r\n        this._warned = true;\r\n        console.warn('Missing character from exported characters list: ', _char, style, font); // eslint-disable-line no-console\r\n      }\r\n\r\n      return emptyChar;\r\n    }\r\n\r\n    function measureText(_char2, fontName, size) {\r\n      var fontData = this.getFontByName(fontName);\r\n\r\n      var index = _char2.charCodeAt(0);\r\n\r\n      if (!fontData.cache[index + 1]) {\r\n        var tHelper = fontData.helper;\r\n\r\n        if (_char2 === ' ') {\r\n          var doubleSize = tHelper.measureText('|' + _char2 + '|');\r\n          var singleSize = tHelper.measureText('||');\r\n          fontData.cache[index + 1] = (doubleSize - singleSize) / 100;\r\n        } else {\r\n          fontData.cache[index + 1] = tHelper.measureText(_char2) / 100;\r\n        }\r\n      }\r\n\r\n      return fontData.cache[index + 1] * size;\r\n    }\r\n\r\n    function getFontByName(name) {\r\n      var i = 0;\r\n      var len = this.fonts.length;\r\n\r\n      while (i < len) {\r\n        if (this.fonts[i].fName === name) {\r\n          return this.fonts[i];\r\n        }\r\n\r\n        i += 1;\r\n      }\r\n\r\n      return this.fonts[0];\r\n    }\r\n\r\n    function isModifier(firstCharCode, secondCharCode) {\r\n      var sum = firstCharCode.toString(16) + secondCharCode.toString(16);\r\n      return surrogateModifiers.indexOf(sum) !== -1;\r\n    }\r\n\r\n    function isZeroWidthJoiner(firstCharCode, secondCharCode) {\r\n      if (!secondCharCode) {\r\n        return firstCharCode === zeroWidthJoiner[1];\r\n      }\r\n\r\n      return firstCharCode === zeroWidthJoiner[0] && secondCharCode === zeroWidthJoiner[1];\r\n    }\r\n\r\n    function isCombinedCharacter(_char3) {\r\n      return combinedCharacters.indexOf(_char3) !== -1;\r\n    }\r\n\r\n    function setIsLoaded() {\r\n      this.isLoaded = true;\r\n    }\r\n\r\n    var Font = function Font() {\r\n      this.fonts = [];\r\n      this.chars = null;\r\n      this.typekitLoaded = 0;\r\n      this.isLoaded = false;\r\n      this._warned = false;\r\n      this.initTime = Date.now();\r\n      this.setIsLoadedBinded = this.setIsLoaded.bind(this);\r\n      this.checkLoadedFontsBinded = this.checkLoadedFonts.bind(this);\r\n    };\r\n\r\n    Font.isModifier = isModifier;\r\n    Font.isZeroWidthJoiner = isZeroWidthJoiner;\r\n    Font.isCombinedCharacter = isCombinedCharacter;\r\n    var fontPrototype = {\r\n      addChars: addChars,\r\n      addFonts: addFonts,\r\n      getCharData: getCharData,\r\n      getFontByName: getFontByName,\r\n      measureText: measureText,\r\n      checkLoadedFonts: checkLoadedFonts,\r\n      setIsLoaded: setIsLoaded\r\n    };\r\n    Font.prototype = fontPrototype;\r\n    return Font;\r\n  }();\r\n\r\n  function RenderableElement() {}\r\n\r\n  RenderableElement.prototype = {\r\n    initRenderable: function initRenderable() {\r\n      // layer's visibility related to inpoint and outpoint. Rename isVisible to isInRange\r\n      this.isInRange = false; // layer's display state\r\n\r\n      this.hidden = false; // If layer's transparency equals 0, it can be hidden\r\n\r\n      this.isTransparent = false; // list of animated components\r\n\r\n      this.renderableComponents = [];\r\n    },\r\n    addRenderableComponent: function addRenderableComponent(component) {\r\n      if (this.renderableComponents.indexOf(component) === -1) {\r\n        this.renderableComponents.push(component);\r\n      }\r\n    },\r\n    removeRenderableComponent: function removeRenderableComponent(component) {\r\n      if (this.renderableComponents.indexOf(component) !== -1) {\r\n        this.renderableComponents.splice(this.renderableComponents.indexOf(component), 1);\r\n      }\r\n    },\r\n    prepareRenderableFrame: function prepareRenderableFrame(num) {\r\n      this.checkLayerLimits(num);\r\n    },\r\n    checkTransparency: function checkTransparency() {\r\n      if (this.finalTransform.mProp.o.v <= 0) {\r\n        if (!this.isTransparent && this.globalData.renderConfig.hideOnTransparent) {\r\n          this.isTransparent = true;\r\n          this.hide();\r\n        }\r\n      } else if (this.isTransparent) {\r\n        this.isTransparent = false;\r\n        this.show();\r\n      }\r\n    },\r\n\r\n    /**\r\n       * @function\r\n       * Initializes frame related properties.\r\n       *\r\n       * @param {number} num\r\n       * current frame number in Layer's time\r\n       *\r\n       */\r\n    checkLayerLimits: function checkLayerLimits(num) {\r\n      if (this.data.ip - this.data.st <= num && this.data.op - this.data.st > num) {\r\n        if (this.isInRange !== true) {\r\n          this.globalData._mdf = true;\r\n          this._mdf = true;\r\n          this.isInRange = true;\r\n          this.show();\r\n        }\r\n      } else if (this.isInRange !== false) {\r\n        this.globalData._mdf = true;\r\n        this.isInRange = false;\r\n        this.hide();\r\n      }\r\n    },\r\n    renderRenderable: function renderRenderable() {\r\n      var i;\r\n      var len = this.renderableComponents.length;\r\n\r\n      for (i = 0; i < len; i += 1) {\r\n        this.renderableComponents[i].renderFrame(this._isFirstFrame);\r\n      }\r\n      /* this.maskManager.renderFrame(this.finalTransform.mat);\r\n          this.renderableEffectsManager.renderFrame(this._isFirstFrame); */\r\n\r\n    },\r\n    sourceRectAtTime: function sourceRectAtTime() {\r\n      return {\r\n        top: 0,\r\n        left: 0,\r\n        width: 100,\r\n        height: 100\r\n      };\r\n    },\r\n    getLayerSize: function getLayerSize() {\r\n      if (this.data.ty === 5) {\r\n        return {\r\n          w: this.data.textData.width,\r\n          h: this.data.textData.height\r\n        };\r\n      }\r\n\r\n      return {\r\n        w: this.data.width,\r\n        h: this.data.height\r\n      };\r\n    }\r\n  };\r\n\r\n  var getBlendMode = function () {\r\n    var blendModeEnums = {\r\n      0: 'source-over',\r\n      1: 'multiply',\r\n      2: 'screen',\r\n      3: 'overlay',\r\n      4: 'darken',\r\n      5: 'lighten',\r\n      6: 'color-dodge',\r\n      7: 'color-burn',\r\n      8: 'hard-light',\r\n      9: 'soft-light',\r\n      10: 'difference',\r\n      11: 'exclusion',\r\n      12: 'hue',\r\n      13: 'saturation',\r\n      14: 'color',\r\n      15: 'luminosity'\r\n    };\r\n    return function (mode) {\r\n      return blendModeEnums[mode] || '';\r\n    };\r\n  }();\r\n\r\n  function SliderEffect(data, elem, container) {\r\n    this.p = PropertyFactory.getProp(elem, data.v, 0, 0, container);\r\n  }\r\n\r\n  function AngleEffect(data, elem, container) {\r\n    this.p = PropertyFactory.getProp(elem, data.v, 0, 0, container);\r\n  }\r\n\r\n  function ColorEffect(data, elem, container) {\r\n    this.p = PropertyFactory.getProp(elem, data.v, 1, 0, container);\r\n  }\r\n\r\n  function PointEffect(data, elem, container) {\r\n    this.p = PropertyFactory.getProp(elem, data.v, 1, 0, container);\r\n  }\r\n\r\n  function LayerIndexEffect(data, elem, container) {\r\n    this.p = PropertyFactory.getProp(elem, data.v, 0, 0, container);\r\n  }\r\n\r\n  function MaskIndexEffect(data, elem, container) {\r\n    this.p = PropertyFactory.getProp(elem, data.v, 0, 0, container);\r\n  }\r\n\r\n  function CheckboxEffect(data, elem, container) {\r\n    this.p = PropertyFactory.getProp(elem, data.v, 0, 0, container);\r\n  }\r\n\r\n  function NoValueEffect() {\r\n    this.p = {};\r\n  }\r\n\r\n  function EffectsManager(data, element) {\r\n    var effects = data.ef || [];\r\n    this.effectElements = [];\r\n    var i;\r\n    var len = effects.length;\r\n    var effectItem;\r\n\r\n    for (i = 0; i < len; i += 1) {\r\n      effectItem = new GroupEffect(effects[i], element);\r\n      this.effectElements.push(effectItem);\r\n    }\r\n  }\r\n\r\n  function GroupEffect(data, element) {\r\n    this.init(data, element);\r\n  }\r\n\r\n  extendPrototype([DynamicPropertyContainer], GroupEffect);\r\n  GroupEffect.prototype.getValue = GroupEffect.prototype.iterateDynamicProperties;\r\n\r\n  GroupEffect.prototype.init = function (data, element) {\r\n    this.data = data;\r\n    this.effectElements = [];\r\n    this.initDynamicPropertyContainer(element);\r\n    var i;\r\n    var len = this.data.ef.length;\r\n    var eff;\r\n    var effects = this.data.ef;\r\n\r\n    for (i = 0; i < len; i += 1) {\r\n      eff = null;\r\n\r\n      switch (effects[i].ty) {\r\n        case 0:\r\n          eff = new SliderEffect(effects[i], element, this);\r\n          break;\r\n\r\n        case 1:\r\n          eff = new AngleEffect(effects[i], element, this);\r\n          break;\r\n\r\n        case 2:\r\n          eff = new ColorEffect(effects[i], element, this);\r\n          break;\r\n\r\n        case 3:\r\n          eff = new PointEffect(effects[i], element, this);\r\n          break;\r\n\r\n        case 4:\r\n        case 7:\r\n          eff = new CheckboxEffect(effects[i], element, this);\r\n          break;\r\n\r\n        case 10:\r\n          eff = new LayerIndexEffect(effects[i], element, this);\r\n          break;\r\n\r\n        case 11:\r\n          eff = new MaskIndexEffect(effects[i], element, this);\r\n          break;\r\n\r\n        case 5:\r\n          eff = new EffectsManager(effects[i], element, this);\r\n          break;\r\n        // case 6:\r\n\r\n        default:\r\n          eff = new NoValueEffect(effects[i], element, this);\r\n          break;\r\n      }\r\n\r\n      if (eff) {\r\n        this.effectElements.push(eff);\r\n      }\r\n    }\r\n  };\r\n\r\n  function BaseElement() {}\r\n\r\n  BaseElement.prototype = {\r\n    checkMasks: function checkMasks() {\r\n      if (!this.data.hasMask) {\r\n        return false;\r\n      }\r\n\r\n      var i = 0;\r\n      var len = this.data.masksProperties.length;\r\n\r\n      while (i < len) {\r\n        if (this.data.masksProperties[i].mode !== 'n' && this.data.masksProperties[i].cl !== false) {\r\n          return true;\r\n        }\r\n\r\n        i += 1;\r\n      }\r\n\r\n      return false;\r\n    },\r\n    initExpressions: function initExpressions() {\r\n      var expressionsInterfaces = getExpressionInterfaces();\r\n\r\n      if (!expressionsInterfaces) {\r\n        return;\r\n      }\r\n\r\n      var LayerExpressionInterface = expressionsInterfaces('layer');\r\n      var EffectsExpressionInterface = expressionsInterfaces('effects');\r\n      var ShapeExpressionInterface = expressionsInterfaces('shape');\r\n      var TextExpressionInterface = expressionsInterfaces('text');\r\n      var CompExpressionInterface = expressionsInterfaces('comp');\r\n      this.layerInterface = LayerExpressionInterface(this);\r\n\r\n      if (this.data.hasMask && this.maskManager) {\r\n        this.layerInterface.registerMaskInterface(this.maskManager);\r\n      }\r\n\r\n      var effectsInterface = EffectsExpressionInterface.createEffectsInterface(this, this.layerInterface);\r\n      this.layerInterface.registerEffectsInterface(effectsInterface);\r\n\r\n      if (this.data.ty === 0 || this.data.xt) {\r\n        this.compInterface = CompExpressionInterface(this);\r\n      } else if (this.data.ty === 4) {\r\n        this.layerInterface.shapeInterface = ShapeExpressionInterface(this.shapesData, this.itemsData, this.layerInterface);\r\n        this.layerInterface.content = this.layerInterface.shapeInterface;\r\n      } else if (this.data.ty === 5) {\r\n        this.layerInterface.textInterface = TextExpressionInterface(this);\r\n        this.layerInterface.text = this.layerInterface.textInterface;\r\n      }\r\n    },\r\n    setBlendMode: function setBlendMode() {\r\n      var blendModeValue = getBlendMode(this.data.bm);\r\n      var elem = this.baseElement || this.layerElement;\r\n      elem.style['mix-blend-mode'] = blendModeValue;\r\n    },\r\n    initBaseData: function initBaseData(data, globalData, comp) {\r\n      this.globalData = globalData;\r\n      this.comp = comp;\r\n      this.data = data;\r\n      this.layerId = createElementID(); // Stretch factor for old animations missing this property.\r\n\r\n      if (!this.data.sr) {\r\n        this.data.sr = 1;\r\n      } // effects manager\r\n\r\n\r\n      this.effectsManager = new EffectsManager(this.data, this, this.dynamicProperties);\r\n    },\r\n    getType: function getType() {\r\n      return this.type;\r\n    },\r\n    sourceRectAtTime: function sourceRectAtTime() {}\r\n  };\r\n\r\n  /**\r\n   * @file\r\n   * Handles element's layer frame update.\r\n   * Checks layer in point and out point\r\n   *\r\n   */\r\n  function FrameElement() {}\r\n\r\n  FrameElement.prototype = {\r\n    /**\r\n       * @function\r\n       * Initializes frame related properties.\r\n       *\r\n       */\r\n    initFrame: function initFrame() {\r\n      // set to true when inpoint is rendered\r\n      this._isFirstFrame = false; // list of animated properties\r\n\r\n      this.dynamicProperties = []; // If layer has been modified in current tick this will be true\r\n\r\n      this._mdf = false;\r\n    },\r\n\r\n    /**\r\n       * @function\r\n       * Calculates all dynamic values\r\n       *\r\n       * @param {number} num\r\n       * current frame number in Layer's time\r\n       * @param {boolean} isVisible\r\n       * if layers is currently in range\r\n       *\r\n       */\r\n    prepareProperties: function prepareProperties(num, isVisible) {\r\n      var i;\r\n      var len = this.dynamicProperties.length;\r\n\r\n      for (i = 0; i < len; i += 1) {\r\n        if (isVisible || this._isParent && this.dynamicProperties[i].propType === 'transform') {\r\n          this.dynamicProperties[i].getValue();\r\n\r\n          if (this.dynamicProperties[i]._mdf) {\r\n            this.globalData._mdf = true;\r\n            this._mdf = true;\r\n          }\r\n        }\r\n      }\r\n    },\r\n    addDynamicProperty: function addDynamicProperty(prop) {\r\n      if (this.dynamicProperties.indexOf(prop) === -1) {\r\n        this.dynamicProperties.push(prop);\r\n      }\r\n    }\r\n  };\r\n\r\n  function FootageElement(data, globalData, comp) {\r\n    this.initFrame();\r\n    this.initRenderable();\r\n    this.assetData = globalData.getAssetData(data.refId);\r\n    this.footageData = globalData.imageLoader.getAsset(this.assetData);\r\n    this.initBaseData(data, globalData, comp);\r\n  }\r\n\r\n  FootageElement.prototype.prepareFrame = function () {};\r\n\r\n  extendPrototype([RenderableElement, BaseElement, FrameElement], FootageElement);\r\n\r\n  FootageElement.prototype.getBaseElement = function () {\r\n    return null;\r\n  };\r\n\r\n  FootageElement.prototype.renderFrame = function () {};\r\n\r\n  FootageElement.prototype.destroy = function () {};\r\n\r\n  FootageElement.prototype.initExpressions = function () {\r\n    var expressionsInterfaces = getExpressionInterfaces();\r\n\r\n    if (!expressionsInterfaces) {\r\n      return;\r\n    }\r\n\r\n    var FootageInterface = expressionsInterfaces('footage');\r\n    this.layerInterface = FootageInterface(this);\r\n  };\r\n\r\n  FootageElement.prototype.getFootageData = function () {\r\n    return this.footageData;\r\n  };\r\n\r\n  function AudioElement(data, globalData, comp) {\r\n    this.initFrame();\r\n    this.initRenderable();\r\n    this.assetData = globalData.getAssetData(data.refId);\r\n    this.initBaseData(data, globalData, comp);\r\n    this._isPlaying = false;\r\n    this._canPlay = false;\r\n    var assetPath = this.globalData.getAssetsPath(this.assetData);\r\n    this.audio = this.globalData.audioController.createAudio(assetPath);\r\n    this._currentTime = 0;\r\n    this.globalData.audioController.addAudio(this);\r\n    this._volumeMultiplier = 1;\r\n    this._volume = 1;\r\n    this._previousVolume = null;\r\n    this.tm = data.tm ? PropertyFactory.getProp(this, data.tm, 0, globalData.frameRate, this) : {\r\n      _placeholder: true\r\n    };\r\n    this.lv = PropertyFactory.getProp(this, data.au && data.au.lv ? data.au.lv : {\r\n      k: [100]\r\n    }, 1, 0.01, this);\r\n  }\r\n\r\n  AudioElement.prototype.prepareFrame = function (num) {\r\n    this.prepareRenderableFrame(num, true);\r\n    this.prepareProperties(num, true);\r\n\r\n    if (!this.tm._placeholder) {\r\n      var timeRemapped = this.tm.v;\r\n      this._currentTime = timeRemapped;\r\n    } else {\r\n      this._currentTime = num / this.data.sr;\r\n    }\r\n\r\n    this._volume = this.lv.v[0];\r\n    var totalVolume = this._volume * this._volumeMultiplier;\r\n\r\n    if (this._previousVolume !== totalVolume) {\r\n      this._previousVolume = totalVolume;\r\n      this.audio.volume(totalVolume);\r\n    }\r\n  };\r\n\r\n  extendPrototype([RenderableElement, BaseElement, FrameElement], AudioElement);\r\n\r\n  AudioElement.prototype.renderFrame = function () {\r\n    if (this.isInRange && this._canPlay) {\r\n      if (!this._isPlaying) {\r\n        this.audio.play();\r\n        this.audio.seek(this._currentTime / this.globalData.frameRate);\r\n        this._isPlaying = true;\r\n      } else if (!this.audio.playing() || Math.abs(this._currentTime / this.globalData.frameRate - this.audio.seek()) > 0.1) {\r\n        this.audio.seek(this._currentTime / this.globalData.frameRate);\r\n      }\r\n    }\r\n  };\r\n\r\n  AudioElement.prototype.show = function () {// this.audio.play()\r\n  };\r\n\r\n  AudioElement.prototype.hide = function () {\r\n    this.audio.pause();\r\n    this._isPlaying = false;\r\n  };\r\n\r\n  AudioElement.prototype.pause = function () {\r\n    this.audio.pause();\r\n    this._isPlaying = false;\r\n    this._canPlay = false;\r\n  };\r\n\r\n  AudioElement.prototype.resume = function () {\r\n    this._canPlay = true;\r\n  };\r\n\r\n  AudioElement.prototype.setRate = function (rateValue) {\r\n    this.audio.rate(rateValue);\r\n  };\r\n\r\n  AudioElement.prototype.volume = function (volumeValue) {\r\n    this._volumeMultiplier = volumeValue;\r\n    this._previousVolume = volumeValue * this._volume;\r\n    this.audio.volume(this._previousVolume);\r\n  };\r\n\r\n  AudioElement.prototype.getBaseElement = function () {\r\n    return null;\r\n  };\r\n\r\n  AudioElement.prototype.destroy = function () {};\r\n\r\n  AudioElement.prototype.sourceRectAtTime = function () {};\r\n\r\n  AudioElement.prototype.initExpressions = function () {};\r\n\r\n  function BaseRenderer() {}\r\n\r\n  BaseRenderer.prototype.checkLayers = function (num) {\r\n    var i;\r\n    var len = this.layers.length;\r\n    var data;\r\n    this.completeLayers = true;\r\n\r\n    for (i = len - 1; i >= 0; i -= 1) {\r\n      if (!this.elements[i]) {\r\n        data = this.layers[i];\r\n\r\n        if (data.ip - data.st <= num - this.layers[i].st && data.op - data.st > num - this.layers[i].st) {\r\n          this.buildItem(i);\r\n        }\r\n      }\r\n\r\n      this.completeLayers = this.elements[i] ? this.completeLayers : false;\r\n    }\r\n\r\n    this.checkPendingElements();\r\n  };\r\n\r\n  BaseRenderer.prototype.createItem = function (layer) {\r\n    switch (layer.ty) {\r\n      case 2:\r\n        return this.createImage(layer);\r\n\r\n      case 0:\r\n        return this.createComp(layer);\r\n\r\n      case 1:\r\n        return this.createSolid(layer);\r\n\r\n      case 3:\r\n        return this.createNull(layer);\r\n\r\n      case 4:\r\n        return this.createShape(layer);\r\n\r\n      case 5:\r\n        return this.createText(layer);\r\n\r\n      case 6:\r\n        return this.createAudio(layer);\r\n\r\n      case 13:\r\n        return this.createCamera(layer);\r\n\r\n      case 15:\r\n        return this.createFootage(layer);\r\n\r\n      default:\r\n        return this.createNull(layer);\r\n    }\r\n  };\r\n\r\n  BaseRenderer.prototype.createCamera = function () {\r\n    throw new Error('You\\'re using a 3d camera. Try the html renderer.');\r\n  };\r\n\r\n  BaseRenderer.prototype.createAudio = function (data) {\r\n    return new AudioElement(data, this.globalData, this);\r\n  };\r\n\r\n  BaseRenderer.prototype.createFootage = function (data) {\r\n    return new FootageElement(data, this.globalData, this);\r\n  };\r\n\r\n  BaseRenderer.prototype.buildAllItems = function () {\r\n    var i;\r\n    var len = this.layers.length;\r\n\r\n    for (i = 0; i < len; i += 1) {\r\n      this.buildItem(i);\r\n    }\r\n\r\n    this.checkPendingElements();\r\n  };\r\n\r\n  BaseRenderer.prototype.includeLayers = function (newLayers) {\r\n    this.completeLayers = false;\r\n    var i;\r\n    var len = newLayers.length;\r\n    var j;\r\n    var jLen = this.layers.length;\r\n\r\n    for (i = 0; i < len; i += 1) {\r\n      j = 0;\r\n\r\n      while (j < jLen) {\r\n        if (this.layers[j].id === newLayers[i].id) {\r\n          this.layers[j] = newLayers[i];\r\n          break;\r\n        }\r\n\r\n        j += 1;\r\n      }\r\n    }\r\n  };\r\n\r\n  BaseRenderer.prototype.setProjectInterface = function (pInterface) {\r\n    this.globalData.projectInterface = pInterface;\r\n  };\r\n\r\n  BaseRenderer.prototype.initItems = function () {\r\n    if (!this.globalData.progressiveLoad) {\r\n      this.buildAllItems();\r\n    }\r\n  };\r\n\r\n  BaseRenderer.prototype.buildElementParenting = function (element, parentName, hierarchy) {\r\n    var elements = this.elements;\r\n    var layers = this.layers;\r\n    var i = 0;\r\n    var len = layers.length;\r\n\r\n    while (i < len) {\r\n      if (layers[i].ind == parentName) {\r\n        // eslint-disable-line eqeqeq\r\n        if (!elements[i] || elements[i] === true) {\r\n          this.buildItem(i);\r\n          this.addPendingElement(element);\r\n        } else {\r\n          hierarchy.push(elements[i]);\r\n          elements[i].setAsParent();\r\n\r\n          if (layers[i].parent !== undefined) {\r\n            this.buildElementParenting(element, layers[i].parent, hierarchy);\r\n          } else {\r\n            element.setHierarchy(hierarchy);\r\n          }\r\n        }\r\n      }\r\n\r\n      i += 1;\r\n    }\r\n  };\r\n\r\n  BaseRenderer.prototype.addPendingElement = function (element) {\r\n    this.pendingElements.push(element);\r\n  };\r\n\r\n  BaseRenderer.prototype.searchExtraCompositions = function (assets) {\r\n    var i;\r\n    var len = assets.length;\r\n\r\n    for (i = 0; i < len; i += 1) {\r\n      if (assets[i].xt) {\r\n        var comp = this.createComp(assets[i]);\r\n        comp.initExpressions();\r\n        this.globalData.projectInterface.registerComposition(comp);\r\n      }\r\n    }\r\n  };\r\n\r\n  BaseRenderer.prototype.getElementByPath = function (path) {\r\n    var pathValue = path.shift();\r\n    var element;\r\n\r\n    if (typeof pathValue === 'number') {\r\n      element = this.elements[pathValue];\r\n    } else {\r\n      var i;\r\n      var len = this.elements.length;\r\n\r\n      for (i = 0; i < len; i += 1) {\r\n        if (this.elements[i].data.nm === pathValue) {\r\n          element = this.elements[i];\r\n          break;\r\n        }\r\n      }\r\n    }\r\n\r\n    if (path.length === 0) {\r\n      return element;\r\n    }\r\n\r\n    return element.getElementByPath(path);\r\n  };\r\n\r\n  BaseRenderer.prototype.setupGlobalData = function (animData, fontsContainer) {\r\n    this.globalData.fontManager = new FontManager();\r\n    this.globalData.fontManager.addChars(animData.chars);\r\n    this.globalData.fontManager.addFonts(animData.fonts, fontsContainer);\r\n    this.globalData.getAssetData = this.animationItem.getAssetData.bind(this.animationItem);\r\n    this.globalData.getAssetsPath = this.animationItem.getAssetsPath.bind(this.animationItem);\r\n    this.globalData.imageLoader = this.animationItem.imagePreloader;\r\n    this.globalData.audioController = this.animationItem.audioController;\r\n    this.globalData.frameId = 0;\r\n    this.globalData.frameRate = animData.fr;\r\n    this.globalData.nm = animData.nm;\r\n    this.globalData.compSize = {\r\n      w: animData.w,\r\n      h: animData.h\r\n    };\r\n  };\r\n\r\n  function TransformElement() {}\r\n\r\n  TransformElement.prototype = {\r\n    initTransform: function initTransform() {\r\n      this.finalTransform = {\r\n        mProp: this.data.ks ? TransformPropertyFactory.getTransformProperty(this, this.data.ks, this) : {\r\n          o: 0\r\n        },\r\n        _matMdf: false,\r\n        _opMdf: false,\r\n        mat: new Matrix()\r\n      };\r\n\r\n      if (this.data.ao) {\r\n        this.finalTransform.mProp.autoOriented = true;\r\n      } // TODO: check TYPE 11: Guided elements\r\n\r\n\r\n      if (this.data.ty !== 11) {// this.createElements();\r\n      }\r\n    },\r\n    renderTransform: function renderTransform() {\r\n      this.finalTransform._opMdf = this.finalTransform.mProp.o._mdf || this._isFirstFrame;\r\n      this.finalTransform._matMdf = this.finalTransform.mProp._mdf || this._isFirstFrame;\r\n\r\n      if (this.hierarchy) {\r\n        var mat;\r\n        var finalMat = this.finalTransform.mat;\r\n        var i = 0;\r\n        var len = this.hierarchy.length; // Checking if any of the transformation matrices in the hierarchy chain has changed.\r\n\r\n        if (!this.finalTransform._matMdf) {\r\n          while (i < len) {\r\n            if (this.hierarchy[i].finalTransform.mProp._mdf) {\r\n              this.finalTransform._matMdf = true;\r\n              break;\r\n            }\r\n\r\n            i += 1;\r\n          }\r\n        }\r\n\r\n        if (this.finalTransform._matMdf) {\r\n          mat = this.finalTransform.mProp.v.props;\r\n          finalMat.cloneFromProps(mat);\r\n\r\n          for (i = 0; i < len; i += 1) {\r\n            mat = this.hierarchy[i].finalTransform.mProp.v.props;\r\n            finalMat.transform(mat[0], mat[1], mat[2], mat[3], mat[4], mat[5], mat[6], mat[7], mat[8], mat[9], mat[10], mat[11], mat[12], mat[13], mat[14], mat[15]);\r\n          }\r\n        }\r\n      }\r\n    },\r\n    globalToLocal: function globalToLocal(pt) {\r\n      var transforms = [];\r\n      transforms.push(this.finalTransform);\r\n      var flag = true;\r\n      var comp = this.comp;\r\n\r\n      while (flag) {\r\n        if (comp.finalTransform) {\r\n          if (comp.data.hasMask) {\r\n            transforms.splice(0, 0, comp.finalTransform);\r\n          }\r\n\r\n          comp = comp.comp;\r\n        } else {\r\n          flag = false;\r\n        }\r\n      }\r\n\r\n      var i;\r\n      var len = transforms.length;\r\n      var ptNew;\r\n\r\n      for (i = 0; i < len; i += 1) {\r\n        ptNew = transforms[i].mat.applyToPointArray(0, 0, 0); // ptNew = transforms[i].mat.applyToPointArray(pt[0],pt[1],pt[2]);\r\n\r\n        pt = [pt[0] - ptNew[0], pt[1] - ptNew[1], 0];\r\n      }\r\n\r\n      return pt;\r\n    },\r\n    mHelper: new Matrix()\r\n  };\r\n\r\n  function MaskElement(data, element, globalData) {\r\n    this.data = data;\r\n    this.element = element;\r\n    this.globalData = globalData;\r\n    this.storedData = [];\r\n    this.masksProperties = this.data.masksProperties || [];\r\n    this.maskElement = null;\r\n    var defs = this.globalData.defs;\r\n    var i;\r\n    var len = this.masksProperties ? this.masksProperties.length : 0;\r\n    this.viewData = createSizedArray(len);\r\n    this.solidPath = '';\r\n    var path;\r\n    var properties = this.masksProperties;\r\n    var count = 0;\r\n    var currentMasks = [];\r\n    var j;\r\n    var jLen;\r\n    var layerId = createElementID();\r\n    var rect;\r\n    var expansor;\r\n    var feMorph;\r\n    var x;\r\n    var maskType = 'clipPath';\r\n    var maskRef = 'clip-path';\r\n\r\n    for (i = 0; i < len; i += 1) {\r\n      if (properties[i].mode !== 'a' && properties[i].mode !== 'n' || properties[i].inv || properties[i].o.k !== 100 || properties[i].o.x) {\r\n        maskType = 'mask';\r\n        maskRef = 'mask';\r\n      }\r\n\r\n      if ((properties[i].mode === 's' || properties[i].mode === 'i') && count === 0) {\r\n        rect = createNS('rect');\r\n        rect.setAttribute('fill', '#ffffff');\r\n        rect.setAttribute('width', this.element.comp.data.w || 0);\r\n        rect.setAttribute('height', this.element.comp.data.h || 0);\r\n        currentMasks.push(rect);\r\n      } else {\r\n        rect = null;\r\n      }\r\n\r\n      path = createNS('path');\r\n\r\n      if (properties[i].mode === 'n') {\r\n        // TODO move this to a factory or to a constructor\r\n        this.viewData[i] = {\r\n          op: PropertyFactory.getProp(this.element, properties[i].o, 0, 0.01, this.element),\r\n          prop: ShapePropertyFactory.getShapeProp(this.element, properties[i], 3),\r\n          elem: path,\r\n          lastPath: ''\r\n        };\r\n        defs.appendChild(path);\r\n      } else {\r\n        count += 1;\r\n        path.setAttribute('fill', properties[i].mode === 's' ? '#000000' : '#ffffff');\r\n        path.setAttribute('clip-rule', 'nonzero');\r\n        var filterID;\r\n\r\n        if (properties[i].x.k !== 0) {\r\n          maskType = 'mask';\r\n          maskRef = 'mask';\r\n          x = PropertyFactory.getProp(this.element, properties[i].x, 0, null, this.element);\r\n          filterID = createElementID();\r\n          expansor = createNS('filter');\r\n          expansor.setAttribute('id', filterID);\r\n          feMorph = createNS('feMorphology');\r\n          feMorph.setAttribute('operator', 'erode');\r\n          feMorph.setAttribute('in', 'SourceGraphic');\r\n          feMorph.setAttribute('radius', '0');\r\n          expansor.appendChild(feMorph);\r\n          defs.appendChild(expansor);\r\n          path.setAttribute('stroke', properties[i].mode === 's' ? '#000000' : '#ffffff');\r\n        } else {\r\n          feMorph = null;\r\n          x = null;\r\n        } // TODO move this to a factory or to a constructor\r\n\r\n\r\n        this.storedData[i] = {\r\n          elem: path,\r\n          x: x,\r\n          expan: feMorph,\r\n          lastPath: '',\r\n          lastOperator: '',\r\n          filterId: filterID,\r\n          lastRadius: 0\r\n        };\r\n\r\n        if (properties[i].mode === 'i') {\r\n          jLen = currentMasks.length;\r\n          var g = createNS('g');\r\n\r\n          for (j = 0; j < jLen; j += 1) {\r\n            g.appendChild(currentMasks[j]);\r\n          }\r\n\r\n          var mask = createNS('mask');\r\n          mask.setAttribute('mask-type', 'alpha');\r\n          mask.setAttribute('id', layerId + '_' + count);\r\n          mask.appendChild(path);\r\n          defs.appendChild(mask);\r\n          g.setAttribute('mask', 'url(' + getLocationHref() + '#' + layerId + '_' + count + ')');\r\n          currentMasks.length = 0;\r\n          currentMasks.push(g);\r\n        } else {\r\n          currentMasks.push(path);\r\n        }\r\n\r\n        if (properties[i].inv && !this.solidPath) {\r\n          this.solidPath = this.createLayerSolidPath();\r\n        } // TODO move this to a factory or to a constructor\r\n\r\n\r\n        this.viewData[i] = {\r\n          elem: path,\r\n          lastPath: '',\r\n          op: PropertyFactory.getProp(this.element, properties[i].o, 0, 0.01, this.element),\r\n          prop: ShapePropertyFactory.getShapeProp(this.element, properties[i], 3),\r\n          invRect: rect\r\n        };\r\n\r\n        if (!this.viewData[i].prop.k) {\r\n          this.drawPath(properties[i], this.viewData[i].prop.v, this.viewData[i]);\r\n        }\r\n      }\r\n    }\r\n\r\n    this.maskElement = createNS(maskType);\r\n    len = currentMasks.length;\r\n\r\n    for (i = 0; i < len; i += 1) {\r\n      this.maskElement.appendChild(currentMasks[i]);\r\n    }\r\n\r\n    if (count > 0) {\r\n      this.maskElement.setAttribute('id', layerId);\r\n      this.element.maskedElement.setAttribute(maskRef, 'url(' + getLocationHref() + '#' + layerId + ')');\r\n      defs.appendChild(this.maskElement);\r\n    }\r\n\r\n    if (this.viewData.length) {\r\n      this.element.addRenderableComponent(this);\r\n    }\r\n  }\r\n\r\n  MaskElement.prototype.getMaskProperty = function (pos) {\r\n    return this.viewData[pos].prop;\r\n  };\r\n\r\n  MaskElement.prototype.renderFrame = function (isFirstFrame) {\r\n    var finalMat = this.element.finalTransform.mat;\r\n    var i;\r\n    var len = this.masksProperties.length;\r\n\r\n    for (i = 0; i < len; i += 1) {\r\n      if (this.viewData[i].prop._mdf || isFirstFrame) {\r\n        this.drawPath(this.masksProperties[i], this.viewData[i].prop.v, this.viewData[i]);\r\n      }\r\n\r\n      if (this.viewData[i].op._mdf || isFirstFrame) {\r\n        this.viewData[i].elem.setAttribute('fill-opacity', this.viewData[i].op.v);\r\n      }\r\n\r\n      if (this.masksProperties[i].mode !== 'n') {\r\n        if (this.viewData[i].invRect && (this.element.finalTransform.mProp._mdf || isFirstFrame)) {\r\n          this.viewData[i].invRect.setAttribute('transform', finalMat.getInverseMatrix().to2dCSS());\r\n        }\r\n\r\n        if (this.storedData[i].x && (this.storedData[i].x._mdf || isFirstFrame)) {\r\n          var feMorph = this.storedData[i].expan;\r\n\r\n          if (this.storedData[i].x.v < 0) {\r\n            if (this.storedData[i].lastOperator !== 'erode') {\r\n              this.storedData[i].lastOperator = 'erode';\r\n              this.storedData[i].elem.setAttribute('filter', 'url(' + getLocationHref() + '#' + this.storedData[i].filterId + ')');\r\n            }\r\n\r\n            feMorph.setAttribute('radius', -this.storedData[i].x.v);\r\n          } else {\r\n            if (this.storedData[i].lastOperator !== 'dilate') {\r\n              this.storedData[i].lastOperator = 'dilate';\r\n              this.storedData[i].elem.setAttribute('filter', null);\r\n            }\r\n\r\n            this.storedData[i].elem.setAttribute('stroke-width', this.storedData[i].x.v * 2);\r\n          }\r\n        }\r\n      }\r\n    }\r\n  };\r\n\r\n  MaskElement.prototype.getMaskelement = function () {\r\n    return this.maskElement;\r\n  };\r\n\r\n  MaskElement.prototype.createLayerSolidPath = function () {\r\n    var path = 'M0,0 ';\r\n    path += ' h' + this.globalData.compSize.w;\r\n    path += ' v' + this.globalData.compSize.h;\r\n    path += ' h-' + this.globalData.compSize.w;\r\n    path += ' v-' + this.globalData.compSize.h + ' ';\r\n    return path;\r\n  };\r\n\r\n  MaskElement.prototype.drawPath = function (pathData, pathNodes, viewData) {\r\n    var pathString = ' M' + pathNodes.v[0][0] + ',' + pathNodes.v[0][1];\r\n    var i;\r\n    var len;\r\n    len = pathNodes._length;\r\n\r\n    for (i = 1; i < len; i += 1) {\r\n      // pathString += \" C\"+pathNodes.o[i-1][0]+','+pathNodes.o[i-1][1] + \" \"+pathNodes.i[i][0]+','+pathNodes.i[i][1] + \" \"+pathNodes.v[i][0]+','+pathNodes.v[i][1];\r\n      pathString += ' C' + pathNodes.o[i - 1][0] + ',' + pathNodes.o[i - 1][1] + ' ' + pathNodes.i[i][0] + ',' + pathNodes.i[i][1] + ' ' + pathNodes.v[i][0] + ',' + pathNodes.v[i][1];\r\n    } // pathString += \" C\"+pathNodes.o[i-1][0]+','+pathNodes.o[i-1][1] + \" \"+pathNodes.i[0][0]+','+pathNodes.i[0][1] + \" \"+pathNodes.v[0][0]+','+pathNodes.v[0][1];\r\n\r\n\r\n    if (pathNodes.c && len > 1) {\r\n      pathString += ' C' + pathNodes.o[i - 1][0] + ',' + pathNodes.o[i - 1][1] + ' ' + pathNodes.i[0][0] + ',' + pathNodes.i[0][1] + ' ' + pathNodes.v[0][0] + ',' + pathNodes.v[0][1];\r\n    } // pathNodes.__renderedString = pathString;\r\n\r\n\r\n    if (viewData.lastPath !== pathString) {\r\n      var pathShapeValue = '';\r\n\r\n      if (viewData.elem) {\r\n        if (pathNodes.c) {\r\n          pathShapeValue = pathData.inv ? this.solidPath + pathString : pathString;\r\n        }\r\n\r\n        viewData.elem.setAttribute('d', pathShapeValue);\r\n      }\r\n\r\n      viewData.lastPath = pathString;\r\n    }\r\n  };\r\n\r\n  MaskElement.prototype.destroy = function () {\r\n    this.element = null;\r\n    this.globalData = null;\r\n    this.maskElement = null;\r\n    this.data = null;\r\n    this.masksProperties = null;\r\n  };\r\n\r\n  var filtersFactory = function () {\r\n    var ob = {};\r\n    ob.createFilter = createFilter;\r\n    ob.createAlphaToLuminanceFilter = createAlphaToLuminanceFilter;\r\n\r\n    function createFilter(filId, skipCoordinates) {\r\n      var fil = createNS('filter');\r\n      fil.setAttribute('id', filId);\r\n\r\n      if (skipCoordinates !== true) {\r\n        fil.setAttribute('filterUnits', 'objectBoundingBox');\r\n        fil.setAttribute('x', '0%');\r\n        fil.setAttribute('y', '0%');\r\n        fil.setAttribute('width', '100%');\r\n        fil.setAttribute('height', '100%');\r\n      }\r\n\r\n      return fil;\r\n    }\r\n\r\n    function createAlphaToLuminanceFilter() {\r\n      var feColorMatrix = createNS('feColorMatrix');\r\n      feColorMatrix.setAttribute('type', 'matrix');\r\n      feColorMatrix.setAttribute('color-interpolation-filters', 'sRGB');\r\n      feColorMatrix.setAttribute('values', '0 0 0 1 0  0 0 0 1 0  0 0 0 1 0  0 0 0 1 1');\r\n      return feColorMatrix;\r\n    }\r\n\r\n    return ob;\r\n  }();\r\n\r\n  var featureSupport = function () {\r\n    var ob = {\r\n      maskType: true\r\n    };\r\n\r\n    if (/MSIE 10/i.test(navigator.userAgent) || /MSIE 9/i.test(navigator.userAgent) || /rv:11.0/i.test(navigator.userAgent) || /Edge\\/\\d./i.test(navigator.userAgent)) {\r\n      ob.maskType = false;\r\n    }\r\n\r\n    return ob;\r\n  }();\r\n\r\n  var registeredEffects = {};\r\n  var idPrefix = 'filter_result_';\r\n\r\n  function SVGEffects(elem) {\r\n    var i;\r\n    var source = 'SourceGraphic';\r\n    var len = elem.data.ef ? elem.data.ef.length : 0;\r\n    var filId = createElementID();\r\n    var fil = filtersFactory.createFilter(filId, true);\r\n    var count = 0;\r\n    this.filters = [];\r\n    var filterManager;\r\n\r\n    for (i = 0; i < len; i += 1) {\r\n      filterManager = null;\r\n      var type = elem.data.ef[i].ty;\r\n\r\n      if (registeredEffects[type]) {\r\n        var Effect = registeredEffects[type].effect;\r\n        filterManager = new Effect(fil, elem.effectsManager.effectElements[i], elem, idPrefix + count, source);\r\n        source = idPrefix + count;\r\n\r\n        if (registeredEffects[type].countsAsEffect) {\r\n          count += 1;\r\n        }\r\n      }\r\n\r\n      if (filterManager) {\r\n        this.filters.push(filterManager);\r\n      }\r\n    }\r\n\r\n    if (count) {\r\n      elem.globalData.defs.appendChild(fil);\r\n      elem.layerElement.setAttribute('filter', 'url(' + getLocationHref() + '#' + filId + ')');\r\n    }\r\n\r\n    if (this.filters.length) {\r\n      elem.addRenderableComponent(this);\r\n    }\r\n  }\r\n\r\n  SVGEffects.prototype.renderFrame = function (_isFirstFrame) {\r\n    var i;\r\n    var len = this.filters.length;\r\n\r\n    for (i = 0; i < len; i += 1) {\r\n      this.filters[i].renderFrame(_isFirstFrame);\r\n    }\r\n  };\r\n\r\n  function registerEffect(id, effect, countsAsEffect) {\r\n    registeredEffects[id] = {\r\n      effect: effect,\r\n      countsAsEffect: countsAsEffect\r\n    };\r\n  }\r\n\r\n  function SVGBaseElement() {}\r\n\r\n  SVGBaseElement.prototype = {\r\n    initRendererElement: function initRendererElement() {\r\n      this.layerElement = createNS('g');\r\n    },\r\n    createContainerElements: function createContainerElements() {\r\n      this.matteElement = createNS('g');\r\n      this.transformedElement = this.layerElement;\r\n      this.maskedElement = this.layerElement;\r\n      this._sizeChanged = false;\r\n      var layerElementParent = null; // If this layer acts as a mask for the following layer\r\n\r\n      if (this.data.td) {\r\n        this.matteMasks = {};\r\n        var symbolElement = createNS('symbol');\r\n        symbolElement.setAttribute('id', this.layerId);\r\n        var gg = createNS('g');\r\n        gg.appendChild(this.layerElement);\r\n        symbolElement.appendChild(gg);\r\n        layerElementParent = gg;\r\n        this.globalData.defs.appendChild(symbolElement);\r\n      } else if (this.data.tt) {\r\n        this.matteElement.appendChild(this.layerElement);\r\n        layerElementParent = this.matteElement;\r\n        this.baseElement = this.matteElement;\r\n      } else {\r\n        this.baseElement = this.layerElement;\r\n      }\r\n\r\n      if (this.data.ln) {\r\n        this.layerElement.setAttribute('id', this.data.ln);\r\n      }\r\n\r\n      if (this.data.cl) {\r\n        this.layerElement.setAttribute('class', this.data.cl);\r\n      } // Clipping compositions to hide content that exceeds boundaries. If collapsed transformations is on, component should not be clipped\r\n\r\n\r\n      if (this.data.ty === 0 && !this.data.hd) {\r\n        var cp = createNS('clipPath');\r\n        var pt = createNS('path');\r\n        pt.setAttribute('d', 'M0,0 L' + this.data.w + ',0 L' + this.data.w + ',' + this.data.h + ' L0,' + this.data.h + 'z');\r\n        var clipId = createElementID();\r\n        cp.setAttribute('id', clipId);\r\n        cp.appendChild(pt);\r\n        this.globalData.defs.appendChild(cp);\r\n\r\n        if (this.checkMasks()) {\r\n          var cpGroup = createNS('g');\r\n          cpGroup.setAttribute('clip-path', 'url(' + getLocationHref() + '#' + clipId + ')');\r\n          cpGroup.appendChild(this.layerElement);\r\n          this.transformedElement = cpGroup;\r\n\r\n          if (layerElementParent) {\r\n            layerElementParent.appendChild(this.transformedElement);\r\n          } else {\r\n            this.baseElement = this.transformedElement;\r\n          }\r\n        } else {\r\n          this.layerElement.setAttribute('clip-path', 'url(' + getLocationHref() + '#' + clipId + ')');\r\n        }\r\n      }\r\n\r\n      if (this.data.bm !== 0) {\r\n        this.setBlendMode();\r\n      }\r\n    },\r\n    renderElement: function renderElement() {\r\n      if (this.finalTransform._matMdf) {\r\n        this.transformedElement.setAttribute('transform', this.finalTransform.mat.to2dCSS());\r\n      }\r\n\r\n      if (this.finalTransform._opMdf) {\r\n        this.transformedElement.setAttribute('opacity', this.finalTransform.mProp.o.v);\r\n      }\r\n    },\r\n    destroyBaseElement: function destroyBaseElement() {\r\n      this.layerElement = null;\r\n      this.matteElement = null;\r\n      this.maskManager.destroy();\r\n    },\r\n    getBaseElement: function getBaseElement() {\r\n      if (this.data.hd) {\r\n        return null;\r\n      }\r\n\r\n      return this.baseElement;\r\n    },\r\n    createRenderableComponents: function createRenderableComponents() {\r\n      this.maskManager = new MaskElement(this.data, this, this.globalData);\r\n      this.renderableEffectsManager = new SVGEffects(this);\r\n    },\r\n    getMatte: function getMatte(matteType) {\r\n      if (!this.matteMasks[matteType]) {\r\n        var id = this.layerId + '_' + matteType;\r\n        var filId;\r\n        var fil;\r\n        var useElement;\r\n        var gg;\r\n\r\n        if (matteType === 1 || matteType === 3) {\r\n          var masker = createNS('mask');\r\n          masker.setAttribute('id', id);\r\n          masker.setAttribute('mask-type', matteType === 3 ? 'luminance' : 'alpha');\r\n          useElement = createNS('use');\r\n          useElement.setAttributeNS('http://www.w3.org/1999/xlink', 'href', '#' + this.layerId);\r\n          masker.appendChild(useElement);\r\n          this.globalData.defs.appendChild(masker);\r\n\r\n          if (!featureSupport.maskType && matteType === 1) {\r\n            masker.setAttribute('mask-type', 'luminance');\r\n            filId = createElementID();\r\n            fil = filtersFactory.createFilter(filId);\r\n            this.globalData.defs.appendChild(fil);\r\n            fil.appendChild(filtersFactory.createAlphaToLuminanceFilter());\r\n            gg = createNS('g');\r\n            gg.appendChild(useElement);\r\n            masker.appendChild(gg);\r\n            gg.setAttribute('filter', 'url(' + getLocationHref() + '#' + filId + ')');\r\n          }\r\n        } else if (matteType === 2) {\r\n          var maskGroup = createNS('mask');\r\n          maskGroup.setAttribute('id', id);\r\n          maskGroup.setAttribute('mask-type', 'alpha');\r\n          var maskGrouper = createNS('g');\r\n          maskGroup.appendChild(maskGrouper);\r\n          filId = createElementID();\r\n          fil = filtersFactory.createFilter(filId); /// /\r\n\r\n          var feCTr = createNS('feComponentTransfer');\r\n          feCTr.setAttribute('in', 'SourceGraphic');\r\n          fil.appendChild(feCTr);\r\n          var feFunc = createNS('feFuncA');\r\n          feFunc.setAttribute('type', 'table');\r\n          feFunc.setAttribute('tableValues', '1.0 0.0');\r\n          feCTr.appendChild(feFunc); /// /\r\n\r\n          this.globalData.defs.appendChild(fil);\r\n          var alphaRect = createNS('rect');\r\n          alphaRect.setAttribute('width', this.comp.data.w);\r\n          alphaRect.setAttribute('height', this.comp.data.h);\r\n          alphaRect.setAttribute('x', '0');\r\n          alphaRect.setAttribute('y', '0');\r\n          alphaRect.setAttribute('fill', '#ffffff');\r\n          alphaRect.setAttribute('opacity', '0');\r\n          maskGrouper.setAttribute('filter', 'url(' + getLocationHref() + '#' + filId + ')');\r\n          maskGrouper.appendChild(alphaRect);\r\n          useElement = createNS('use');\r\n          useElement.setAttributeNS('http://www.w3.org/1999/xlink', 'href', '#' + this.layerId);\r\n          maskGrouper.appendChild(useElement);\r\n\r\n          if (!featureSupport.maskType) {\r\n            maskGroup.setAttribute('mask-type', 'luminance');\r\n            fil.appendChild(filtersFactory.createAlphaToLuminanceFilter());\r\n            gg = createNS('g');\r\n            maskGrouper.appendChild(alphaRect);\r\n            gg.appendChild(this.layerElement);\r\n            maskGrouper.appendChild(gg);\r\n          }\r\n\r\n          this.globalData.defs.appendChild(maskGroup);\r\n        }\r\n\r\n        this.matteMasks[matteType] = id;\r\n      }\r\n\r\n      return this.matteMasks[matteType];\r\n    },\r\n    setMatte: function setMatte(id) {\r\n      if (!this.matteElement) {\r\n        return;\r\n      }\r\n\r\n      this.matteElement.setAttribute('mask', 'url(' + getLocationHref() + '#' + id + ')');\r\n    }\r\n  };\r\n\r\n  /**\r\n   * @file\r\n   * Handles AE's layer parenting property.\r\n   *\r\n   */\r\n  function HierarchyElement() {}\r\n\r\n  HierarchyElement.prototype = {\r\n    /**\r\n       * @function\r\n       * Initializes hierarchy properties\r\n       *\r\n       */\r\n    initHierarchy: function initHierarchy() {\r\n      // element's parent list\r\n      this.hierarchy = []; // if element is parent of another layer _isParent will be true\r\n\r\n      this._isParent = false;\r\n      this.checkParenting();\r\n    },\r\n\r\n    /**\r\n       * @function\r\n       * Sets layer's hierarchy.\r\n       * @param {array} hierarch\r\n       * layer's parent list\r\n       *\r\n       */\r\n    setHierarchy: function setHierarchy(hierarchy) {\r\n      this.hierarchy = hierarchy;\r\n    },\r\n\r\n    /**\r\n       * @function\r\n       * Sets layer as parent.\r\n       *\r\n       */\r\n    setAsParent: function setAsParent() {\r\n      this._isParent = true;\r\n    },\r\n\r\n    /**\r\n       * @function\r\n       * Searches layer's parenting chain\r\n       *\r\n       */\r\n    checkParenting: function checkParenting() {\r\n      if (this.data.parent !== undefined) {\r\n        this.comp.buildElementParenting(this, this.data.parent, []);\r\n      }\r\n    }\r\n  };\r\n\r\n  function RenderableDOMElement() {}\r\n\r\n  (function () {\r\n    var _prototype = {\r\n      initElement: function initElement(data, globalData, comp) {\r\n        this.initFrame();\r\n        this.initBaseData(data, globalData, comp);\r\n        this.initTransform(data, globalData, comp);\r\n        this.initHierarchy();\r\n        this.initRenderable();\r\n        this.initRendererElement();\r\n        this.createContainerElements();\r\n        this.createRenderableComponents();\r\n        this.createContent();\r\n        this.hide();\r\n      },\r\n      hide: function hide() {\r\n        // console.log('HIDE', this);\r\n        if (!this.hidden && (!this.isInRange || this.isTransparent)) {\r\n          var elem = this.baseElement || this.layerElement;\r\n          elem.style.display = 'none';\r\n          this.hidden = true;\r\n        }\r\n      },\r\n      show: function show() {\r\n        // console.log('SHOW', this);\r\n        if (this.isInRange && !this.isTransparent) {\r\n          if (!this.data.hd) {\r\n            var elem = this.baseElement || this.layerElement;\r\n            elem.style.display = 'block';\r\n          }\r\n\r\n          this.hidden = false;\r\n          this._isFirstFrame = true;\r\n        }\r\n      },\r\n      renderFrame: function renderFrame() {\r\n        // If it is exported as hidden (data.hd === true) no need to render\r\n        // If it is not visible no need to render\r\n        if (this.data.hd || this.hidden) {\r\n          return;\r\n        }\r\n\r\n        this.renderTransform();\r\n        this.renderRenderable();\r\n        this.renderElement();\r\n        this.renderInnerContent();\r\n\r\n        if (this._isFirstFrame) {\r\n          this._isFirstFrame = false;\r\n        }\r\n      },\r\n      renderInnerContent: function renderInnerContent() {},\r\n      prepareFrame: function prepareFrame(num) {\r\n        this._mdf = false;\r\n        this.prepareRenderableFrame(num);\r\n        this.prepareProperties(num, this.isInRange);\r\n        this.checkTransparency();\r\n      },\r\n      destroy: function destroy() {\r\n        this.innerElem = null;\r\n        this.destroyBaseElement();\r\n      }\r\n    };\r\n    extendPrototype([RenderableElement, createProxyFunction(_prototype)], RenderableDOMElement);\r\n  })();\r\n\r\n  function IImageElement(data, globalData, comp) {\r\n    this.assetData = globalData.getAssetData(data.refId);\r\n    this.initElement(data, globalData, comp);\r\n    this.sourceRect = {\r\n      top: 0,\r\n      left: 0,\r\n      width: this.assetData.w,\r\n      height: this.assetData.h\r\n    };\r\n  }\r\n\r\n  extendPrototype([BaseElement, TransformElement, SVGBaseElement, HierarchyElement, FrameElement, RenderableDOMElement], IImageElement);\r\n\r\n  IImageElement.prototype.createContent = function () {\r\n    var assetPath = this.globalData.getAssetsPath(this.assetData);\r\n    this.innerElem = createNS('image');\r\n    this.innerElem.setAttribute('width', this.assetData.w + 'px');\r\n    this.innerElem.setAttribute('height', this.assetData.h + 'px');\r\n    this.innerElem.setAttribute('preserveAspectRatio', this.assetData.pr || this.globalData.renderConfig.imagePreserveAspectRatio);\r\n    this.innerElem.setAttributeNS('http://www.w3.org/1999/xlink', 'href', assetPath);\r\n    this.layerElement.appendChild(this.innerElem);\r\n  };\r\n\r\n  IImageElement.prototype.sourceRectAtTime = function () {\r\n    return this.sourceRect;\r\n  };\r\n\r\n  function ProcessedElement(element, position) {\r\n    this.elem = element;\r\n    this.pos = position;\r\n  }\r\n\r\n  function IShapeElement() {}\r\n\r\n  IShapeElement.prototype = {\r\n    addShapeToModifiers: function addShapeToModifiers(data) {\r\n      var i;\r\n      var len = this.shapeModifiers.length;\r\n\r\n      for (i = 0; i < len; i += 1) {\r\n        this.shapeModifiers[i].addShape(data);\r\n      }\r\n    },\r\n    isShapeInAnimatedModifiers: function isShapeInAnimatedModifiers(data) {\r\n      var i = 0;\r\n      var len = this.shapeModifiers.length;\r\n\r\n      while (i < len) {\r\n        if (this.shapeModifiers[i].isAnimatedWithShape(data)) {\r\n          return true;\r\n        }\r\n      }\r\n\r\n      return false;\r\n    },\r\n    renderModifiers: function renderModifiers() {\r\n      if (!this.shapeModifiers.length) {\r\n        return;\r\n      }\r\n\r\n      var i;\r\n      var len = this.shapes.length;\r\n\r\n      for (i = 0; i < len; i += 1) {\r\n        this.shapes[i].sh.reset();\r\n      }\r\n\r\n      len = this.shapeModifiers.length;\r\n      var shouldBreakProcess;\r\n\r\n      for (i = len - 1; i >= 0; i -= 1) {\r\n        shouldBreakProcess = this.shapeModifiers[i].processShapes(this._isFirstFrame); // workaround to fix cases where a repeater resets the shape so the following processes get called twice\r\n        // TODO: find a better solution for this\r\n\r\n        if (shouldBreakProcess) {\r\n          break;\r\n        }\r\n      }\r\n    },\r\n    searchProcessedElement: function searchProcessedElement(elem) {\r\n      var elements = this.processedElements;\r\n      var i = 0;\r\n      var len = elements.length;\r\n\r\n      while (i < len) {\r\n        if (elements[i].elem === elem) {\r\n          return elements[i].pos;\r\n        }\r\n\r\n        i += 1;\r\n      }\r\n\r\n      return 0;\r\n    },\r\n    addProcessedElement: function addProcessedElement(elem, pos) {\r\n      var elements = this.processedElements;\r\n      var i = elements.length;\r\n\r\n      while (i) {\r\n        i -= 1;\r\n\r\n        if (elements[i].elem === elem) {\r\n          elements[i].pos = pos;\r\n          return;\r\n        }\r\n      }\r\n\r\n      elements.push(new ProcessedElement(elem, pos));\r\n    },\r\n    prepareFrame: function prepareFrame(num) {\r\n      this.prepareRenderableFrame(num);\r\n      this.prepareProperties(num, this.isInRange);\r\n    }\r\n  };\r\n\r\n  var lineCapEnum = {\r\n    1: 'butt',\r\n    2: 'round',\r\n    3: 'square'\r\n  };\r\n  var lineJoinEnum = {\r\n    1: 'miter',\r\n    2: 'round',\r\n    3: 'bevel'\r\n  };\r\n\r\n  function SVGShapeData(transformers, level, shape) {\r\n    this.caches = [];\r\n    this.styles = [];\r\n    this.transformers = transformers;\r\n    this.lStr = '';\r\n    this.sh = shape;\r\n    this.lvl = level; // TODO find if there are some cases where _isAnimated can be false.\r\n    // For now, since shapes add up with other shapes. They have to be calculated every time.\r\n    // One way of finding out is checking if all styles associated to this shape depend only of this shape\r\n\r\n    this._isAnimated = !!shape.k; // TODO: commenting this for now since all shapes are animated\r\n\r\n    var i = 0;\r\n    var len = transformers.length;\r\n\r\n    while (i < len) {\r\n      if (transformers[i].mProps.dynamicProperties.length) {\r\n        this._isAnimated = true;\r\n        break;\r\n      }\r\n\r\n      i += 1;\r\n    }\r\n  }\r\n\r\n  SVGShapeData.prototype.setAsAnimated = function () {\r\n    this._isAnimated = true;\r\n  };\r\n\r\n  function SVGStyleData(data, level) {\r\n    this.data = data;\r\n    this.type = data.ty;\r\n    this.d = '';\r\n    this.lvl = level;\r\n    this._mdf = false;\r\n    this.closed = data.hd === true;\r\n    this.pElem = createNS('path');\r\n    this.msElem = null;\r\n  }\r\n\r\n  SVGStyleData.prototype.reset = function () {\r\n    this.d = '';\r\n    this._mdf = false;\r\n  };\r\n\r\n  function DashProperty(elem, data, renderer, container) {\r\n    this.elem = elem;\r\n    this.frameId = -1;\r\n    this.dataProps = createSizedArray(data.length);\r\n    this.renderer = renderer;\r\n    this.k = false;\r\n    this.dashStr = '';\r\n    this.dashArray = createTypedArray('float32', data.length ? data.length - 1 : 0);\r\n    this.dashoffset = createTypedArray('float32', 1);\r\n    this.initDynamicPropertyContainer(container);\r\n    var i;\r\n    var len = data.length || 0;\r\n    var prop;\r\n\r\n    for (i = 0; i < len; i += 1) {\r\n      prop = PropertyFactory.getProp(elem, data[i].v, 0, 0, this);\r\n      this.k = prop.k || this.k;\r\n      this.dataProps[i] = {\r\n        n: data[i].n,\r\n        p: prop\r\n      };\r\n    }\r\n\r\n    if (!this.k) {\r\n      this.getValue(true);\r\n    }\r\n\r\n    this._isAnimated = this.k;\r\n  }\r\n\r\n  DashProperty.prototype.getValue = function (forceRender) {\r\n    if (this.elem.globalData.frameId === this.frameId && !forceRender) {\r\n      return;\r\n    }\r\n\r\n    this.frameId = this.elem.globalData.frameId;\r\n    this.iterateDynamicProperties();\r\n    this._mdf = this._mdf || forceRender;\r\n\r\n    if (this._mdf) {\r\n      var i = 0;\r\n      var len = this.dataProps.length;\r\n\r\n      if (this.renderer === 'svg') {\r\n        this.dashStr = '';\r\n      }\r\n\r\n      for (i = 0; i < len; i += 1) {\r\n        if (this.dataProps[i].n !== 'o') {\r\n          if (this.renderer === 'svg') {\r\n            this.dashStr += ' ' + this.dataProps[i].p.v;\r\n          } else {\r\n            this.dashArray[i] = this.dataProps[i].p.v;\r\n          }\r\n        } else {\r\n          this.dashoffset[0] = this.dataProps[i].p.v;\r\n        }\r\n      }\r\n    }\r\n  };\r\n\r\n  extendPrototype([DynamicPropertyContainer], DashProperty);\r\n\r\n  function SVGStrokeStyleData(elem, data, styleOb) {\r\n    this.initDynamicPropertyContainer(elem);\r\n    this.getValue = this.iterateDynamicProperties;\r\n    this.o = PropertyFactory.getProp(elem, data.o, 0, 0.01, this);\r\n    this.w = PropertyFactory.getProp(elem, data.w, 0, null, this);\r\n    this.d = new DashProperty(elem, data.d || {}, 'svg', this);\r\n    this.c = PropertyFactory.getProp(elem, data.c, 1, 255, this);\r\n    this.style = styleOb;\r\n    this._isAnimated = !!this._isAnimated;\r\n  }\r\n\r\n  extendPrototype([DynamicPropertyContainer], SVGStrokeStyleData);\r\n\r\n  function SVGFillStyleData(elem, data, styleOb) {\r\n    this.initDynamicPropertyContainer(elem);\r\n    this.getValue = this.iterateDynamicProperties;\r\n    this.o = PropertyFactory.getProp(elem, data.o, 0, 0.01, this);\r\n    this.c = PropertyFactory.getProp(elem, data.c, 1, 255, this);\r\n    this.style = styleOb;\r\n  }\r\n\r\n  extendPrototype([DynamicPropertyContainer], SVGFillStyleData);\r\n\r\n  function SVGNoStyleData(elem, data, styleOb) {\r\n    this.initDynamicPropertyContainer(elem);\r\n    this.getValue = this.iterateDynamicProperties;\r\n    this.style = styleOb;\r\n  }\r\n\r\n  extendPrototype([DynamicPropertyContainer], SVGNoStyleData);\r\n\r\n  function GradientProperty(elem, data, container) {\r\n    this.data = data;\r\n    this.c = createTypedArray('uint8c', data.p * 4);\r\n    var cLength = data.k.k[0].s ? data.k.k[0].s.length - data.p * 4 : data.k.k.length - data.p * 4;\r\n    this.o = createTypedArray('float32', cLength);\r\n    this._cmdf = false;\r\n    this._omdf = false;\r\n    this._collapsable = this.checkCollapsable();\r\n    this._hasOpacity = cLength;\r\n    this.initDynamicPropertyContainer(container);\r\n    this.prop = PropertyFactory.getProp(elem, data.k, 1, null, this);\r\n    this.k = this.prop.k;\r\n    this.getValue(true);\r\n  }\r\n\r\n  GradientProperty.prototype.comparePoints = function (values, points) {\r\n    var i = 0;\r\n    var len = this.o.length / 2;\r\n    var diff;\r\n\r\n    while (i < len) {\r\n      diff = Math.abs(values[i * 4] - values[points * 4 + i * 2]);\r\n\r\n      if (diff > 0.01) {\r\n        return false;\r\n      }\r\n\r\n      i += 1;\r\n    }\r\n\r\n    return true;\r\n  };\r\n\r\n  GradientProperty.prototype.checkCollapsable = function () {\r\n    if (this.o.length / 2 !== this.c.length / 4) {\r\n      return false;\r\n    }\r\n\r\n    if (this.data.k.k[0].s) {\r\n      var i = 0;\r\n      var len = this.data.k.k.length;\r\n\r\n      while (i < len) {\r\n        if (!this.comparePoints(this.data.k.k[i].s, this.data.p)) {\r\n          return false;\r\n        }\r\n\r\n        i += 1;\r\n      }\r\n    } else if (!this.comparePoints(this.data.k.k, this.data.p)) {\r\n      return false;\r\n    }\r\n\r\n    return true;\r\n  };\r\n\r\n  GradientProperty.prototype.getValue = function (forceRender) {\r\n    this.prop.getValue();\r\n    this._mdf = false;\r\n    this._cmdf = false;\r\n    this._omdf = false;\r\n\r\n    if (this.prop._mdf || forceRender) {\r\n      var i;\r\n      var len = this.data.p * 4;\r\n      var mult;\r\n      var val;\r\n\r\n      for (i = 0; i < len; i += 1) {\r\n        mult = i % 4 === 0 ? 100 : 255;\r\n        val = Math.round(this.prop.v[i] * mult);\r\n\r\n        if (this.c[i] !== val) {\r\n          this.c[i] = val;\r\n          this._cmdf = !forceRender;\r\n        }\r\n      }\r\n\r\n      if (this.o.length) {\r\n        len = this.prop.v.length;\r\n\r\n        for (i = this.data.p * 4; i < len; i += 1) {\r\n          mult = i % 2 === 0 ? 100 : 1;\r\n          val = i % 2 === 0 ? Math.round(this.prop.v[i] * 100) : this.prop.v[i];\r\n\r\n          if (this.o[i - this.data.p * 4] !== val) {\r\n            this.o[i - this.data.p * 4] = val;\r\n            this._omdf = !forceRender;\r\n          }\r\n        }\r\n      }\r\n\r\n      this._mdf = !forceRender;\r\n    }\r\n  };\r\n\r\n  extendPrototype([DynamicPropertyContainer], GradientProperty);\r\n\r\n  function SVGGradientFillStyleData(elem, data, styleOb) {\r\n    this.initDynamicPropertyContainer(elem);\r\n    this.getValue = this.iterateDynamicProperties;\r\n    this.initGradientData(elem, data, styleOb);\r\n  }\r\n\r\n  SVGGradientFillStyleData.prototype.initGradientData = function (elem, data, styleOb) {\r\n    this.o = PropertyFactory.getProp(elem, data.o, 0, 0.01, this);\r\n    this.s = PropertyFactory.getProp(elem, data.s, 1, null, this);\r\n    this.e = PropertyFactory.getProp(elem, data.e, 1, null, this);\r\n    this.h = PropertyFactory.getProp(elem, data.h || {\r\n      k: 0\r\n    }, 0, 0.01, this);\r\n    this.a = PropertyFactory.getProp(elem, data.a || {\r\n      k: 0\r\n    }, 0, degToRads, this);\r\n    this.g = new GradientProperty(elem, data.g, this);\r\n    this.style = styleOb;\r\n    this.stops = [];\r\n    this.setGradientData(styleOb.pElem, data);\r\n    this.setGradientOpacity(data, styleOb);\r\n    this._isAnimated = !!this._isAnimated;\r\n  };\r\n\r\n  SVGGradientFillStyleData.prototype.setGradientData = function (pathElement, data) {\r\n    var gradientId = createElementID();\r\n    var gfill = createNS(data.t === 1 ? 'linearGradient' : 'radialGradient');\r\n    gfill.setAttribute('id', gradientId);\r\n    gfill.setAttribute('spreadMethod', 'pad');\r\n    gfill.setAttribute('gradientUnits', 'userSpaceOnUse');\r\n    var stops = [];\r\n    var stop;\r\n    var j;\r\n    var jLen;\r\n    jLen = data.g.p * 4;\r\n\r\n    for (j = 0; j < jLen; j += 4) {\r\n      stop = createNS('stop');\r\n      gfill.appendChild(stop);\r\n      stops.push(stop);\r\n    }\r\n\r\n    pathElement.setAttribute(data.ty === 'gf' ? 'fill' : 'stroke', 'url(' + getLocationHref() + '#' + gradientId + ')');\r\n    this.gf = gfill;\r\n    this.cst = stops;\r\n  };\r\n\r\n  SVGGradientFillStyleData.prototype.setGradientOpacity = function (data, styleOb) {\r\n    if (this.g._hasOpacity && !this.g._collapsable) {\r\n      var stop;\r\n      var j;\r\n      var jLen;\r\n      var mask = createNS('mask');\r\n      var maskElement = createNS('path');\r\n      mask.appendChild(maskElement);\r\n      var opacityId = createElementID();\r\n      var maskId = createElementID();\r\n      mask.setAttribute('id', maskId);\r\n      var opFill = createNS(data.t === 1 ? 'linearGradient' : 'radialGradient');\r\n      opFill.setAttribute('id', opacityId);\r\n      opFill.setAttribute('spreadMethod', 'pad');\r\n      opFill.setAttribute('gradientUnits', 'userSpaceOnUse');\r\n      jLen = data.g.k.k[0].s ? data.g.k.k[0].s.length : data.g.k.k.length;\r\n      var stops = this.stops;\r\n\r\n      for (j = data.g.p * 4; j < jLen; j += 2) {\r\n        stop = createNS('stop');\r\n        stop.setAttribute('stop-color', 'rgb(255,255,255)');\r\n        opFill.appendChild(stop);\r\n        stops.push(stop);\r\n      }\r\n\r\n      maskElement.setAttribute(data.ty === 'gf' ? 'fill' : 'stroke', 'url(' + getLocationHref() + '#' + opacityId + ')');\r\n\r\n      if (data.ty === 'gs') {\r\n        maskElement.setAttribute('stroke-linecap', lineCapEnum[data.lc || 2]);\r\n        maskElement.setAttribute('stroke-linejoin', lineJoinEnum[data.lj || 2]);\r\n\r\n        if (data.lj === 1) {\r\n          maskElement.setAttribute('stroke-miterlimit', data.ml);\r\n        }\r\n      }\r\n\r\n      this.of = opFill;\r\n      this.ms = mask;\r\n      this.ost = stops;\r\n      this.maskId = maskId;\r\n      styleOb.msElem = maskElement;\r\n    }\r\n  };\r\n\r\n  extendPrototype([DynamicPropertyContainer], SVGGradientFillStyleData);\r\n\r\n  function SVGGradientStrokeStyleData(elem, data, styleOb) {\r\n    this.initDynamicPropertyContainer(elem);\r\n    this.getValue = this.iterateDynamicProperties;\r\n    this.w = PropertyFactory.getProp(elem, data.w, 0, null, this);\r\n    this.d = new DashProperty(elem, data.d || {}, 'svg', this);\r\n    this.initGradientData(elem, data, styleOb);\r\n    this._isAnimated = !!this._isAnimated;\r\n  }\r\n\r\n  extendPrototype([SVGGradientFillStyleData, DynamicPropertyContainer], SVGGradientStrokeStyleData);\r\n\r\n  function ShapeGroupData() {\r\n    this.it = [];\r\n    this.prevViewData = [];\r\n    this.gr = createNS('g');\r\n  }\r\n\r\n  function SVGTransformData(mProps, op, container) {\r\n    this.transform = {\r\n      mProps: mProps,\r\n      op: op,\r\n      container: container\r\n    };\r\n    this.elements = [];\r\n    this._isAnimated = this.transform.mProps.dynamicProperties.length || this.transform.op.effectsSequence.length;\r\n  }\r\n\r\n  var buildShapeString = function buildShapeString(pathNodes, length, closed, mat) {\r\n    if (length === 0) {\r\n      return '';\r\n    }\r\n\r\n    var _o = pathNodes.o;\r\n    var _i = pathNodes.i;\r\n    var _v = pathNodes.v;\r\n    var i;\r\n    var shapeString = ' M' + mat.applyToPointStringified(_v[0][0], _v[0][1]);\r\n\r\n    for (i = 1; i < length; i += 1) {\r\n      shapeString += ' C' + mat.applyToPointStringified(_o[i - 1][0], _o[i - 1][1]) + ' ' + mat.applyToPointStringified(_i[i][0], _i[i][1]) + ' ' + mat.applyToPointStringified(_v[i][0], _v[i][1]);\r\n    }\r\n\r\n    if (closed && length) {\r\n      shapeString += ' C' + mat.applyToPointStringified(_o[i - 1][0], _o[i - 1][1]) + ' ' + mat.applyToPointStringified(_i[0][0], _i[0][1]) + ' ' + mat.applyToPointStringified(_v[0][0], _v[0][1]);\r\n      shapeString += 'z';\r\n    }\r\n\r\n    return shapeString;\r\n  };\r\n\r\n  var SVGElementsRenderer = function () {\r\n    var _identityMatrix = new Matrix();\r\n\r\n    var _matrixHelper = new Matrix();\r\n\r\n    var ob = {\r\n      createRenderFunction: createRenderFunction\r\n    };\r\n\r\n    function createRenderFunction(data) {\r\n      switch (data.ty) {\r\n        case 'fl':\r\n          return renderFill;\r\n\r\n        case 'gf':\r\n          return renderGradient;\r\n\r\n        case 'gs':\r\n          return renderGradientStroke;\r\n\r\n        case 'st':\r\n          return renderStroke;\r\n\r\n        case 'sh':\r\n        case 'el':\r\n        case 'rc':\r\n        case 'sr':\r\n          return renderPath;\r\n\r\n        case 'tr':\r\n          return renderContentTransform;\r\n\r\n        case 'no':\r\n          return renderNoop;\r\n\r\n        default:\r\n          return null;\r\n      }\r\n    }\r\n\r\n    function renderContentTransform(styleData, itemData, isFirstFrame) {\r\n      if (isFirstFrame || itemData.transform.op._mdf) {\r\n        itemData.transform.container.setAttribute('opacity', itemData.transform.op.v);\r\n      }\r\n\r\n      if (isFirstFrame || itemData.transform.mProps._mdf) {\r\n        itemData.transform.container.setAttribute('transform', itemData.transform.mProps.v.to2dCSS());\r\n      }\r\n    }\r\n\r\n    function renderNoop() {}\r\n\r\n    function renderPath(styleData, itemData, isFirstFrame) {\r\n      var j;\r\n      var jLen;\r\n      var pathStringTransformed;\r\n      var redraw;\r\n      var pathNodes;\r\n      var l;\r\n      var lLen = itemData.styles.length;\r\n      var lvl = itemData.lvl;\r\n      var paths;\r\n      var mat;\r\n      var props;\r\n      var iterations;\r\n      var k;\r\n\r\n      for (l = 0; l < lLen; l += 1) {\r\n        redraw = itemData.sh._mdf || isFirstFrame;\r\n\r\n        if (itemData.styles[l].lvl < lvl) {\r\n          mat = _matrixHelper.reset();\r\n          iterations = lvl - itemData.styles[l].lvl;\r\n          k = itemData.transformers.length - 1;\r\n\r\n          while (!redraw && iterations > 0) {\r\n            redraw = itemData.transformers[k].mProps._mdf || redraw;\r\n            iterations -= 1;\r\n            k -= 1;\r\n          }\r\n\r\n          if (redraw) {\r\n            iterations = lvl - itemData.styles[l].lvl;\r\n            k = itemData.transformers.length - 1;\r\n\r\n            while (iterations > 0) {\r\n              props = itemData.transformers[k].mProps.v.props;\r\n              mat.transform(props[0], props[1], props[2], props[3], props[4], props[5], props[6], props[7], props[8], props[9], props[10], props[11], props[12], props[13], props[14], props[15]);\r\n              iterations -= 1;\r\n              k -= 1;\r\n            }\r\n          }\r\n        } else {\r\n          mat = _identityMatrix;\r\n        }\r\n\r\n        paths = itemData.sh.paths;\r\n        jLen = paths._length;\r\n\r\n        if (redraw) {\r\n          pathStringTransformed = '';\r\n\r\n          for (j = 0; j < jLen; j += 1) {\r\n            pathNodes = paths.shapes[j];\r\n\r\n            if (pathNodes && pathNodes._length) {\r\n              pathStringTransformed += buildShapeString(pathNodes, pathNodes._length, pathNodes.c, mat);\r\n            }\r\n          }\r\n\r\n          itemData.caches[l] = pathStringTransformed;\r\n        } else {\r\n          pathStringTransformed = itemData.caches[l];\r\n        }\r\n\r\n        itemData.styles[l].d += styleData.hd === true ? '' : pathStringTransformed;\r\n        itemData.styles[l]._mdf = redraw || itemData.styles[l]._mdf;\r\n      }\r\n    }\r\n\r\n    function renderFill(styleData, itemData, isFirstFrame) {\r\n      var styleElem = itemData.style;\r\n\r\n      if (itemData.c._mdf || isFirstFrame) {\r\n        styleElem.pElem.setAttribute('fill', 'rgb(' + bmFloor(itemData.c.v[0]) + ',' + bmFloor(itemData.c.v[1]) + ',' + bmFloor(itemData.c.v[2]) + ')');\r\n      }\r\n\r\n      if (itemData.o._mdf || isFirstFrame) {\r\n        styleElem.pElem.setAttribute('fill-opacity', itemData.o.v);\r\n      }\r\n    }\r\n\r\n    function renderGradientStroke(styleData, itemData, isFirstFrame) {\r\n      renderGradient(styleData, itemData, isFirstFrame);\r\n      renderStroke(styleData, itemData, isFirstFrame);\r\n    }\r\n\r\n    function renderGradient(styleData, itemData, isFirstFrame) {\r\n      var gfill = itemData.gf;\r\n      var hasOpacity = itemData.g._hasOpacity;\r\n      var pt1 = itemData.s.v;\r\n      var pt2 = itemData.e.v;\r\n\r\n      if (itemData.o._mdf || isFirstFrame) {\r\n        var attr = styleData.ty === 'gf' ? 'fill-opacity' : 'stroke-opacity';\r\n        itemData.style.pElem.setAttribute(attr, itemData.o.v);\r\n      }\r\n\r\n      if (itemData.s._mdf || isFirstFrame) {\r\n        var attr1 = styleData.t === 1 ? 'x1' : 'cx';\r\n        var attr2 = attr1 === 'x1' ? 'y1' : 'cy';\r\n        gfill.setAttribute(attr1, pt1[0]);\r\n        gfill.setAttribute(attr2, pt1[1]);\r\n\r\n        if (hasOpacity && !itemData.g._collapsable) {\r\n          itemData.of.setAttribute(attr1, pt1[0]);\r\n          itemData.of.setAttribute(attr2, pt1[1]);\r\n        }\r\n      }\r\n\r\n      var stops;\r\n      var i;\r\n      var len;\r\n      var stop;\r\n\r\n      if (itemData.g._cmdf || isFirstFrame) {\r\n        stops = itemData.cst;\r\n        var cValues = itemData.g.c;\r\n        len = stops.length;\r\n\r\n        for (i = 0; i < len; i += 1) {\r\n          stop = stops[i];\r\n          stop.setAttribute('offset', cValues[i * 4] + '%');\r\n          stop.setAttribute('stop-color', 'rgb(' + cValues[i * 4 + 1] + ',' + cValues[i * 4 + 2] + ',' + cValues[i * 4 + 3] + ')');\r\n        }\r\n      }\r\n\r\n      if (hasOpacity && (itemData.g._omdf || isFirstFrame)) {\r\n        var oValues = itemData.g.o;\r\n\r\n        if (itemData.g._collapsable) {\r\n          stops = itemData.cst;\r\n        } else {\r\n          stops = itemData.ost;\r\n        }\r\n\r\n        len = stops.length;\r\n\r\n        for (i = 0; i < len; i += 1) {\r\n          stop = stops[i];\r\n\r\n          if (!itemData.g._collapsable) {\r\n            stop.setAttribute('offset', oValues[i * 2] + '%');\r\n          }\r\n\r\n          stop.setAttribute('stop-opacity', oValues[i * 2 + 1]);\r\n        }\r\n      }\r\n\r\n      if (styleData.t === 1) {\r\n        if (itemData.e._mdf || isFirstFrame) {\r\n          gfill.setAttribute('x2', pt2[0]);\r\n          gfill.setAttribute('y2', pt2[1]);\r\n\r\n          if (hasOpacity && !itemData.g._collapsable) {\r\n            itemData.of.setAttribute('x2', pt2[0]);\r\n            itemData.of.setAttribute('y2', pt2[1]);\r\n          }\r\n        }\r\n      } else {\r\n        var rad;\r\n\r\n        if (itemData.s._mdf || itemData.e._mdf || isFirstFrame) {\r\n          rad = Math.sqrt(Math.pow(pt1[0] - pt2[0], 2) + Math.pow(pt1[1] - pt2[1], 2));\r\n          gfill.setAttribute('r', rad);\r\n\r\n          if (hasOpacity && !itemData.g._collapsable) {\r\n            itemData.of.setAttribute('r', rad);\r\n          }\r\n        }\r\n\r\n        if (itemData.e._mdf || itemData.h._mdf || itemData.a._mdf || isFirstFrame) {\r\n          if (!rad) {\r\n            rad = Math.sqrt(Math.pow(pt1[0] - pt2[0], 2) + Math.pow(pt1[1] - pt2[1], 2));\r\n          }\r\n\r\n          var ang = Math.atan2(pt2[1] - pt1[1], pt2[0] - pt1[0]);\r\n          var percent = itemData.h.v;\r\n\r\n          if (percent >= 1) {\r\n            percent = 0.99;\r\n          } else if (percent <= -1) {\r\n            percent = -0.99;\r\n          }\r\n\r\n          var dist = rad * percent;\r\n          var x = Math.cos(ang + itemData.a.v) * dist + pt1[0];\r\n          var y = Math.sin(ang + itemData.a.v) * dist + pt1[1];\r\n          gfill.setAttribute('fx', x);\r\n          gfill.setAttribute('fy', y);\r\n\r\n          if (hasOpacity && !itemData.g._collapsable) {\r\n            itemData.of.setAttribute('fx', x);\r\n            itemData.of.setAttribute('fy', y);\r\n          }\r\n        } // gfill.setAttribute('fy','200');\r\n\r\n      }\r\n    }\r\n\r\n    function renderStroke(styleData, itemData, isFirstFrame) {\r\n      var styleElem = itemData.style;\r\n      var d = itemData.d;\r\n\r\n      if (d && (d._mdf || isFirstFrame) && d.dashStr) {\r\n        styleElem.pElem.setAttribute('stroke-dasharray', d.dashStr);\r\n        styleElem.pElem.setAttribute('stroke-dashoffset', d.dashoffset[0]);\r\n      }\r\n\r\n      if (itemData.c && (itemData.c._mdf || isFirstFrame)) {\r\n        styleElem.pElem.setAttribute('stroke', 'rgb(' + bmFloor(itemData.c.v[0]) + ',' + bmFloor(itemData.c.v[1]) + ',' + bmFloor(itemData.c.v[2]) + ')');\r\n      }\r\n\r\n      if (itemData.o._mdf || isFirstFrame) {\r\n        styleElem.pElem.setAttribute('stroke-opacity', itemData.o.v);\r\n      }\r\n\r\n      if (itemData.w._mdf || isFirstFrame) {\r\n        styleElem.pElem.setAttribute('stroke-width', itemData.w.v);\r\n\r\n        if (styleElem.msElem) {\r\n          styleElem.msElem.setAttribute('stroke-width', itemData.w.v);\r\n        }\r\n      }\r\n    }\r\n\r\n    return ob;\r\n  }();\r\n\r\n  function SVGShapeElement(data, globalData, comp) {\r\n    // List of drawable elements\r\n    this.shapes = []; // Full shape data\r\n\r\n    this.shapesData = data.shapes; // List of styles that will be applied to shapes\r\n\r\n    this.stylesList = []; // List of modifiers that will be applied to shapes\r\n\r\n    this.shapeModifiers = []; // List of items in shape tree\r\n\r\n    this.itemsData = []; // List of items in previous shape tree\r\n\r\n    this.processedElements = []; // List of animated components\r\n\r\n    this.animatedContents = [];\r\n    this.initElement(data, globalData, comp); // Moving any property that doesn't get too much access after initialization because of v8 way of handling more than 10 properties.\r\n    // List of elements that have been created\r\n\r\n    this.prevViewData = []; // Moving any property that doesn't get too much access after initialization because of v8 way of handling more than 10 properties.\r\n  }\r\n\r\n  extendPrototype([BaseElement, TransformElement, SVGBaseElement, IShapeElement, HierarchyElement, FrameElement, RenderableDOMElement], SVGShapeElement);\r\n\r\n  SVGShapeElement.prototype.initSecondaryElement = function () {};\r\n\r\n  SVGShapeElement.prototype.identityMatrix = new Matrix();\r\n\r\n  SVGShapeElement.prototype.buildExpressionInterface = function () {};\r\n\r\n  SVGShapeElement.prototype.createContent = function () {\r\n    this.searchShapes(this.shapesData, this.itemsData, this.prevViewData, this.layerElement, 0, [], true);\r\n    this.filterUniqueShapes();\r\n  };\r\n  /*\r\n  This method searches for multiple shapes that affect a single element and one of them is animated\r\n  */\r\n\r\n\r\n  SVGShapeElement.prototype.filterUniqueShapes = function () {\r\n    var i;\r\n    var len = this.shapes.length;\r\n    var shape;\r\n    var j;\r\n    var jLen = this.stylesList.length;\r\n    var style;\r\n    var tempShapes = [];\r\n    var areAnimated = false;\r\n\r\n    for (j = 0; j < jLen; j += 1) {\r\n      style = this.stylesList[j];\r\n      areAnimated = false;\r\n      tempShapes.length = 0;\r\n\r\n      for (i = 0; i < len; i += 1) {\r\n        shape = this.shapes[i];\r\n\r\n        if (shape.styles.indexOf(style) !== -1) {\r\n          tempShapes.push(shape);\r\n          areAnimated = shape._isAnimated || areAnimated;\r\n        }\r\n      }\r\n\r\n      if (tempShapes.length > 1 && areAnimated) {\r\n        this.setShapesAsAnimated(tempShapes);\r\n      }\r\n    }\r\n  };\r\n\r\n  SVGShapeElement.prototype.setShapesAsAnimated = function (shapes) {\r\n    var i;\r\n    var len = shapes.length;\r\n\r\n    for (i = 0; i < len; i += 1) {\r\n      shapes[i].setAsAnimated();\r\n    }\r\n  };\r\n\r\n  SVGShapeElement.prototype.createStyleElement = function (data, level) {\r\n    // TODO: prevent drawing of hidden styles\r\n    var elementData;\r\n    var styleOb = new SVGStyleData(data, level);\r\n    var pathElement = styleOb.pElem;\r\n\r\n    if (data.ty === 'st') {\r\n      elementData = new SVGStrokeStyleData(this, data, styleOb);\r\n    } else if (data.ty === 'fl') {\r\n      elementData = new SVGFillStyleData(this, data, styleOb);\r\n    } else if (data.ty === 'gf' || data.ty === 'gs') {\r\n      var GradientConstructor = data.ty === 'gf' ? SVGGradientFillStyleData : SVGGradientStrokeStyleData;\r\n      elementData = new GradientConstructor(this, data, styleOb);\r\n      this.globalData.defs.appendChild(elementData.gf);\r\n\r\n      if (elementData.maskId) {\r\n        this.globalData.defs.appendChild(elementData.ms);\r\n        this.globalData.defs.appendChild(elementData.of);\r\n        pathElement.setAttribute('mask', 'url(' + getLocationHref() + '#' + elementData.maskId + ')');\r\n      }\r\n    } else if (data.ty === 'no') {\r\n      elementData = new SVGNoStyleData(this, data, styleOb);\r\n    }\r\n\r\n    if (data.ty === 'st' || data.ty === 'gs') {\r\n      pathElement.setAttribute('stroke-linecap', lineCapEnum[data.lc || 2]);\r\n      pathElement.setAttribute('stroke-linejoin', lineJoinEnum[data.lj || 2]);\r\n      pathElement.setAttribute('fill-opacity', '0');\r\n\r\n      if (data.lj === 1) {\r\n        pathElement.setAttribute('stroke-miterlimit', data.ml);\r\n      }\r\n    }\r\n\r\n    if (data.r === 2) {\r\n      pathElement.setAttribute('fill-rule', 'evenodd');\r\n    }\r\n\r\n    if (data.ln) {\r\n      pathElement.setAttribute('id', data.ln);\r\n    }\r\n\r\n    if (data.cl) {\r\n      pathElement.setAttribute('class', data.cl);\r\n    }\r\n\r\n    if (data.bm) {\r\n      pathElement.style['mix-blend-mode'] = getBlendMode(data.bm);\r\n    }\r\n\r\n    this.stylesList.push(styleOb);\r\n    this.addToAnimatedContents(data, elementData);\r\n    return elementData;\r\n  };\r\n\r\n  SVGShapeElement.prototype.createGroupElement = function (data) {\r\n    var elementData = new ShapeGroupData();\r\n\r\n    if (data.ln) {\r\n      elementData.gr.setAttribute('id', data.ln);\r\n    }\r\n\r\n    if (data.cl) {\r\n      elementData.gr.setAttribute('class', data.cl);\r\n    }\r\n\r\n    if (data.bm) {\r\n      elementData.gr.style['mix-blend-mode'] = getBlendMode(data.bm);\r\n    }\r\n\r\n    return elementData;\r\n  };\r\n\r\n  SVGShapeElement.prototype.createTransformElement = function (data, container) {\r\n    var transformProperty = TransformPropertyFactory.getTransformProperty(this, data, this);\r\n    var elementData = new SVGTransformData(transformProperty, transformProperty.o, container);\r\n    this.addToAnimatedContents(data, elementData);\r\n    return elementData;\r\n  };\r\n\r\n  SVGShapeElement.prototype.createShapeElement = function (data, ownTransformers, level) {\r\n    var ty = 4;\r\n\r\n    if (data.ty === 'rc') {\r\n      ty = 5;\r\n    } else if (data.ty === 'el') {\r\n      ty = 6;\r\n    } else if (data.ty === 'sr') {\r\n      ty = 7;\r\n    }\r\n\r\n    var shapeProperty = ShapePropertyFactory.getShapeProp(this, data, ty, this);\r\n    var elementData = new SVGShapeData(ownTransformers, level, shapeProperty);\r\n    this.shapes.push(elementData);\r\n    this.addShapeToModifiers(elementData);\r\n    this.addToAnimatedContents(data, elementData);\r\n    return elementData;\r\n  };\r\n\r\n  SVGShapeElement.prototype.addToAnimatedContents = function (data, element) {\r\n    var i = 0;\r\n    var len = this.animatedContents.length;\r\n\r\n    while (i < len) {\r\n      if (this.animatedContents[i].element === element) {\r\n        return;\r\n      }\r\n\r\n      i += 1;\r\n    }\r\n\r\n    this.animatedContents.push({\r\n      fn: SVGElementsRenderer.createRenderFunction(data),\r\n      element: element,\r\n      data: data\r\n    });\r\n  };\r\n\r\n  SVGShapeElement.prototype.setElementStyles = function (elementData) {\r\n    var arr = elementData.styles;\r\n    var j;\r\n    var jLen = this.stylesList.length;\r\n\r\n    for (j = 0; j < jLen; j += 1) {\r\n      if (!this.stylesList[j].closed) {\r\n        arr.push(this.stylesList[j]);\r\n      }\r\n    }\r\n  };\r\n\r\n  SVGShapeElement.prototype.reloadShapes = function () {\r\n    this._isFirstFrame = true;\r\n    var i;\r\n    var len = this.itemsData.length;\r\n\r\n    for (i = 0; i < len; i += 1) {\r\n      this.prevViewData[i] = this.itemsData[i];\r\n    }\r\n\r\n    this.searchShapes(this.shapesData, this.itemsData, this.prevViewData, this.layerElement, 0, [], true);\r\n    this.filterUniqueShapes();\r\n    len = this.dynamicProperties.length;\r\n\r\n    for (i = 0; i < len; i += 1) {\r\n      this.dynamicProperties[i].getValue();\r\n    }\r\n\r\n    this.renderModifiers();\r\n  };\r\n\r\n  SVGShapeElement.prototype.searchShapes = function (arr, itemsData, prevViewData, container, level, transformers, render) {\r\n    var ownTransformers = [].concat(transformers);\r\n    var i;\r\n    var len = arr.length - 1;\r\n    var j;\r\n    var jLen;\r\n    var ownStyles = [];\r\n    var ownModifiers = [];\r\n    var currentTransform;\r\n    var modifier;\r\n    var processedPos;\r\n\r\n    for (i = len; i >= 0; i -= 1) {\r\n      processedPos = this.searchProcessedElement(arr[i]);\r\n\r\n      if (!processedPos) {\r\n        arr[i]._render = render;\r\n      } else {\r\n        itemsData[i] = prevViewData[processedPos - 1];\r\n      }\r\n\r\n      if (arr[i].ty === 'fl' || arr[i].ty === 'st' || arr[i].ty === 'gf' || arr[i].ty === 'gs' || arr[i].ty === 'no') {\r\n        if (!processedPos) {\r\n          itemsData[i] = this.createStyleElement(arr[i], level);\r\n        } else {\r\n          itemsData[i].style.closed = false;\r\n        }\r\n\r\n        if (arr[i]._render) {\r\n          if (itemsData[i].style.pElem.parentNode !== container) {\r\n            container.appendChild(itemsData[i].style.pElem);\r\n          }\r\n        }\r\n\r\n        ownStyles.push(itemsData[i].style);\r\n      } else if (arr[i].ty === 'gr') {\r\n        if (!processedPos) {\r\n          itemsData[i] = this.createGroupElement(arr[i]);\r\n        } else {\r\n          jLen = itemsData[i].it.length;\r\n\r\n          for (j = 0; j < jLen; j += 1) {\r\n            itemsData[i].prevViewData[j] = itemsData[i].it[j];\r\n          }\r\n        }\r\n\r\n        this.searchShapes(arr[i].it, itemsData[i].it, itemsData[i].prevViewData, itemsData[i].gr, level + 1, ownTransformers, render);\r\n\r\n        if (arr[i]._render) {\r\n          if (itemsData[i].gr.parentNode !== container) {\r\n            container.appendChild(itemsData[i].gr);\r\n          }\r\n        }\r\n      } else if (arr[i].ty === 'tr') {\r\n        if (!processedPos) {\r\n          itemsData[i] = this.createTransformElement(arr[i], container);\r\n        }\r\n\r\n        currentTransform = itemsData[i].transform;\r\n        ownTransformers.push(currentTransform);\r\n      } else if (arr[i].ty === 'sh' || arr[i].ty === 'rc' || arr[i].ty === 'el' || arr[i].ty === 'sr') {\r\n        if (!processedPos) {\r\n          itemsData[i] = this.createShapeElement(arr[i], ownTransformers, level);\r\n        }\r\n\r\n        this.setElementStyles(itemsData[i]);\r\n      } else if (arr[i].ty === 'tm' || arr[i].ty === 'rd' || arr[i].ty === 'ms' || arr[i].ty === 'pb' || arr[i].ty === 'zz' || arr[i].ty === 'op') {\r\n        if (!processedPos) {\r\n          modifier = ShapeModifiers.getModifier(arr[i].ty);\r\n          modifier.init(this, arr[i]);\r\n          itemsData[i] = modifier;\r\n          this.shapeModifiers.push(modifier);\r\n        } else {\r\n          modifier = itemsData[i];\r\n          modifier.closed = false;\r\n        }\r\n\r\n        ownModifiers.push(modifier);\r\n      } else if (arr[i].ty === 'rp') {\r\n        if (!processedPos) {\r\n          modifier = ShapeModifiers.getModifier(arr[i].ty);\r\n          itemsData[i] = modifier;\r\n          modifier.init(this, arr, i, itemsData);\r\n          this.shapeModifiers.push(modifier);\r\n          render = false;\r\n        } else {\r\n          modifier = itemsData[i];\r\n          modifier.closed = true;\r\n        }\r\n\r\n        ownModifiers.push(modifier);\r\n      }\r\n\r\n      this.addProcessedElement(arr[i], i + 1);\r\n    }\r\n\r\n    len = ownStyles.length;\r\n\r\n    for (i = 0; i < len; i += 1) {\r\n      ownStyles[i].closed = true;\r\n    }\r\n\r\n    len = ownModifiers.length;\r\n\r\n    for (i = 0; i < len; i += 1) {\r\n      ownModifiers[i].closed = true;\r\n    }\r\n  };\r\n\r\n  SVGShapeElement.prototype.renderInnerContent = function () {\r\n    this.renderModifiers();\r\n    var i;\r\n    var len = this.stylesList.length;\r\n\r\n    for (i = 0; i < len; i += 1) {\r\n      this.stylesList[i].reset();\r\n    }\r\n\r\n    this.renderShape();\r\n\r\n    for (i = 0; i < len; i += 1) {\r\n      if (this.stylesList[i]._mdf || this._isFirstFrame) {\r\n        if (this.stylesList[i].msElem) {\r\n          this.stylesList[i].msElem.setAttribute('d', this.stylesList[i].d); // Adding M0 0 fixes same mask bug on all browsers\r\n\r\n          this.stylesList[i].d = 'M0 0' + this.stylesList[i].d;\r\n        }\r\n\r\n        this.stylesList[i].pElem.setAttribute('d', this.stylesList[i].d || 'M0 0');\r\n      }\r\n    }\r\n  };\r\n\r\n  SVGShapeElement.prototype.renderShape = function () {\r\n    var i;\r\n    var len = this.animatedContents.length;\r\n    var animatedContent;\r\n\r\n    for (i = 0; i < len; i += 1) {\r\n      animatedContent = this.animatedContents[i];\r\n\r\n      if ((this._isFirstFrame || animatedContent.element._isAnimated) && animatedContent.data !== true) {\r\n        animatedContent.fn(animatedContent.data, animatedContent.element, this._isFirstFrame);\r\n      }\r\n    }\r\n  };\r\n\r\n  SVGShapeElement.prototype.destroy = function () {\r\n    this.destroyBaseElement();\r\n    this.shapesData = null;\r\n    this.itemsData = null;\r\n  };\r\n\r\n  function LetterProps(o, sw, sc, fc, m, p) {\r\n    this.o = o;\r\n    this.sw = sw;\r\n    this.sc = sc;\r\n    this.fc = fc;\r\n    this.m = m;\r\n    this.p = p;\r\n    this._mdf = {\r\n      o: true,\r\n      sw: !!sw,\r\n      sc: !!sc,\r\n      fc: !!fc,\r\n      m: true,\r\n      p: true\r\n    };\r\n  }\r\n\r\n  LetterProps.prototype.update = function (o, sw, sc, fc, m, p) {\r\n    this._mdf.o = false;\r\n    this._mdf.sw = false;\r\n    this._mdf.sc = false;\r\n    this._mdf.fc = false;\r\n    this._mdf.m = false;\r\n    this._mdf.p = false;\r\n    var updated = false;\r\n\r\n    if (this.o !== o) {\r\n      this.o = o;\r\n      this._mdf.o = true;\r\n      updated = true;\r\n    }\r\n\r\n    if (this.sw !== sw) {\r\n      this.sw = sw;\r\n      this._mdf.sw = true;\r\n      updated = true;\r\n    }\r\n\r\n    if (this.sc !== sc) {\r\n      this.sc = sc;\r\n      this._mdf.sc = true;\r\n      updated = true;\r\n    }\r\n\r\n    if (this.fc !== fc) {\r\n      this.fc = fc;\r\n      this._mdf.fc = true;\r\n      updated = true;\r\n    }\r\n\r\n    if (this.m !== m) {\r\n      this.m = m;\r\n      this._mdf.m = true;\r\n      updated = true;\r\n    }\r\n\r\n    if (p.length && (this.p[0] !== p[0] || this.p[1] !== p[1] || this.p[4] !== p[4] || this.p[5] !== p[5] || this.p[12] !== p[12] || this.p[13] !== p[13])) {\r\n      this.p = p;\r\n      this._mdf.p = true;\r\n      updated = true;\r\n    }\r\n\r\n    return updated;\r\n  };\r\n\r\n  function TextProperty(elem, data) {\r\n    this._frameId = initialDefaultFrame;\r\n    this.pv = '';\r\n    this.v = '';\r\n    this.kf = false;\r\n    this._isFirstFrame = true;\r\n    this._mdf = false;\r\n    this.data = data;\r\n    this.elem = elem;\r\n    this.comp = this.elem.comp;\r\n    this.keysIndex = 0;\r\n    this.canResize = false;\r\n    this.minimumFontSize = 1;\r\n    this.effectsSequence = [];\r\n    this.currentData = {\r\n      ascent: 0,\r\n      boxWidth: this.defaultBoxWidth,\r\n      f: '',\r\n      fStyle: '',\r\n      fWeight: '',\r\n      fc: '',\r\n      j: '',\r\n      justifyOffset: '',\r\n      l: [],\r\n      lh: 0,\r\n      lineWidths: [],\r\n      ls: '',\r\n      of: '',\r\n      s: '',\r\n      sc: '',\r\n      sw: 0,\r\n      t: 0,\r\n      tr: 0,\r\n      sz: 0,\r\n      ps: null,\r\n      fillColorAnim: false,\r\n      strokeColorAnim: false,\r\n      strokeWidthAnim: false,\r\n      yOffset: 0,\r\n      finalSize: 0,\r\n      finalText: [],\r\n      finalLineHeight: 0,\r\n      __complete: false\r\n    };\r\n    this.copyData(this.currentData, this.data.d.k[0].s);\r\n\r\n    if (!this.searchProperty()) {\r\n      this.completeTextData(this.currentData);\r\n    }\r\n  }\r\n\r\n  TextProperty.prototype.defaultBoxWidth = [0, 0];\r\n\r\n  TextProperty.prototype.copyData = function (obj, data) {\r\n    for (var s in data) {\r\n      if (Object.prototype.hasOwnProperty.call(data, s)) {\r\n        obj[s] = data[s];\r\n      }\r\n    }\r\n\r\n    return obj;\r\n  };\r\n\r\n  TextProperty.prototype.setCurrentData = function (data) {\r\n    if (!data.__complete) {\r\n      this.completeTextData(data);\r\n    }\r\n\r\n    this.currentData = data;\r\n    this.currentData.boxWidth = this.currentData.boxWidth || this.defaultBoxWidth;\r\n    this._mdf = true;\r\n  };\r\n\r\n  TextProperty.prototype.searchProperty = function () {\r\n    return this.searchKeyframes();\r\n  };\r\n\r\n  TextProperty.prototype.searchKeyframes = function () {\r\n    this.kf = this.data.d.k.length > 1;\r\n\r\n    if (this.kf) {\r\n      this.addEffect(this.getKeyframeValue.bind(this));\r\n    }\r\n\r\n    return this.kf;\r\n  };\r\n\r\n  TextProperty.prototype.addEffect = function (effectFunction) {\r\n    this.effectsSequence.push(effectFunction);\r\n    this.elem.addDynamicProperty(this);\r\n  };\r\n\r\n  TextProperty.prototype.getValue = function (_finalValue) {\r\n    if ((this.elem.globalData.frameId === this.frameId || !this.effectsSequence.length) && !_finalValue) {\r\n      return;\r\n    }\r\n\r\n    this.currentData.t = this.data.d.k[this.keysIndex].s.t;\r\n    var currentValue = this.currentData;\r\n    var currentIndex = this.keysIndex;\r\n\r\n    if (this.lock) {\r\n      this.setCurrentData(this.currentData);\r\n      return;\r\n    }\r\n\r\n    this.lock = true;\r\n    this._mdf = false;\r\n    var i;\r\n    var len = this.effectsSequence.length;\r\n    var finalValue = _finalValue || this.data.d.k[this.keysIndex].s;\r\n\r\n    for (i = 0; i < len; i += 1) {\r\n      // Checking if index changed to prevent creating a new object every time the expression updates.\r\n      if (currentIndex !== this.keysIndex) {\r\n        finalValue = this.effectsSequence[i](finalValue, finalValue.t);\r\n      } else {\r\n        finalValue = this.effectsSequence[i](this.currentData, finalValue.t);\r\n      }\r\n    }\r\n\r\n    if (currentValue !== finalValue) {\r\n      this.setCurrentData(finalValue);\r\n    }\r\n\r\n    this.v = this.currentData;\r\n    this.pv = this.v;\r\n    this.lock = false;\r\n    this.frameId = this.elem.globalData.frameId;\r\n  };\r\n\r\n  TextProperty.prototype.getKeyframeValue = function () {\r\n    var textKeys = this.data.d.k;\r\n    var frameNum = this.elem.comp.renderedFrame;\r\n    var i = 0;\r\n    var len = textKeys.length;\r\n\r\n    while (i <= len - 1) {\r\n      if (i === len - 1 || textKeys[i + 1].t > frameNum) {\r\n        break;\r\n      }\r\n\r\n      i += 1;\r\n    }\r\n\r\n    if (this.keysIndex !== i) {\r\n      this.keysIndex = i;\r\n    }\r\n\r\n    return this.data.d.k[this.keysIndex].s;\r\n  };\r\n\r\n  TextProperty.prototype.buildFinalText = function (text) {\r\n    var charactersArray = [];\r\n    var i = 0;\r\n    var len = text.length;\r\n    var charCode;\r\n    var secondCharCode;\r\n    var shouldCombine = false;\r\n\r\n    while (i < len) {\r\n      charCode = text.charCodeAt(i);\r\n\r\n      if (FontManager.isCombinedCharacter(charCode)) {\r\n        charactersArray[charactersArray.length - 1] += text.charAt(i);\r\n      } else if (charCode >= 0xD800 && charCode <= 0xDBFF) {\r\n        secondCharCode = text.charCodeAt(i + 1);\r\n\r\n        if (secondCharCode >= 0xDC00 && secondCharCode <= 0xDFFF) {\r\n          if (shouldCombine || FontManager.isModifier(charCode, secondCharCode)) {\r\n            charactersArray[charactersArray.length - 1] += text.substr(i, 2);\r\n            shouldCombine = false;\r\n          } else {\r\n            charactersArray.push(text.substr(i, 2));\r\n          }\r\n\r\n          i += 1;\r\n        } else {\r\n          charactersArray.push(text.charAt(i));\r\n        }\r\n      } else if (charCode > 0xDBFF) {\r\n        secondCharCode = text.charCodeAt(i + 1);\r\n\r\n        if (FontManager.isZeroWidthJoiner(charCode, secondCharCode)) {\r\n          shouldCombine = true;\r\n          charactersArray[charactersArray.length - 1] += text.substr(i, 2);\r\n          i += 1;\r\n        } else {\r\n          charactersArray.push(text.charAt(i));\r\n        }\r\n      } else if (FontManager.isZeroWidthJoiner(charCode)) {\r\n        charactersArray[charactersArray.length - 1] += text.charAt(i);\r\n        shouldCombine = true;\r\n      } else {\r\n        charactersArray.push(text.charAt(i));\r\n      }\r\n\r\n      i += 1;\r\n    }\r\n\r\n    return charactersArray;\r\n  };\r\n\r\n  TextProperty.prototype.completeTextData = function (documentData) {\r\n    documentData.__complete = true;\r\n    var fontManager = this.elem.globalData.fontManager;\r\n    var data = this.data;\r\n    var letters = [];\r\n    var i;\r\n    var len;\r\n    var newLineFlag;\r\n    var index = 0;\r\n    var val;\r\n    var anchorGrouping = data.m.g;\r\n    var currentSize = 0;\r\n    var currentPos = 0;\r\n    var currentLine = 0;\r\n    var lineWidths = [];\r\n    var lineWidth = 0;\r\n    var maxLineWidth = 0;\r\n    var j;\r\n    var jLen;\r\n    var fontData = fontManager.getFontByName(documentData.f);\r\n    var charData;\r\n    var cLength = 0;\r\n    var fontProps = getFontProperties(fontData);\r\n    documentData.fWeight = fontProps.weight;\r\n    documentData.fStyle = fontProps.style;\r\n    documentData.finalSize = documentData.s;\r\n    documentData.finalText = this.buildFinalText(documentData.t);\r\n    len = documentData.finalText.length;\r\n    documentData.finalLineHeight = documentData.lh;\r\n    var trackingOffset = documentData.tr / 1000 * documentData.finalSize;\r\n    var charCode;\r\n\r\n    if (documentData.sz) {\r\n      var flag = true;\r\n      var boxWidth = documentData.sz[0];\r\n      var boxHeight = documentData.sz[1];\r\n      var currentHeight;\r\n      var finalText;\r\n\r\n      while (flag) {\r\n        finalText = this.buildFinalText(documentData.t);\r\n        currentHeight = 0;\r\n        lineWidth = 0;\r\n        len = finalText.length;\r\n        trackingOffset = documentData.tr / 1000 * documentData.finalSize;\r\n        var lastSpaceIndex = -1;\r\n\r\n        for (i = 0; i < len; i += 1) {\r\n          charCode = finalText[i].charCodeAt(0);\r\n          newLineFlag = false;\r\n\r\n          if (finalText[i] === ' ') {\r\n            lastSpaceIndex = i;\r\n          } else if (charCode === 13 || charCode === 3) {\r\n            lineWidth = 0;\r\n            newLineFlag = true;\r\n            currentHeight += documentData.finalLineHeight || documentData.finalSize * 1.2;\r\n          }\r\n\r\n          if (fontManager.chars) {\r\n            charData = fontManager.getCharData(finalText[i], fontData.fStyle, fontData.fFamily);\r\n            cLength = newLineFlag ? 0 : charData.w * documentData.finalSize / 100;\r\n          } else {\r\n            // tCanvasHelper.font = documentData.s + 'px '+ fontData.fFamily;\r\n            cLength = fontManager.measureText(finalText[i], documentData.f, documentData.finalSize);\r\n          }\r\n\r\n          if (lineWidth + cLength > boxWidth && finalText[i] !== ' ') {\r\n            if (lastSpaceIndex === -1) {\r\n              len += 1;\r\n            } else {\r\n              i = lastSpaceIndex;\r\n            }\r\n\r\n            currentHeight += documentData.finalLineHeight || documentData.finalSize * 1.2;\r\n            finalText.splice(i, lastSpaceIndex === i ? 1 : 0, '\\r'); // finalText = finalText.substr(0,i) + \"\\r\" + finalText.substr(i === lastSpaceIndex ? i + 1 : i);\r\n\r\n            lastSpaceIndex = -1;\r\n            lineWidth = 0;\r\n          } else {\r\n            lineWidth += cLength;\r\n            lineWidth += trackingOffset;\r\n          }\r\n        }\r\n\r\n        currentHeight += fontData.ascent * documentData.finalSize / 100;\r\n\r\n        if (this.canResize && documentData.finalSize > this.minimumFontSize && boxHeight < currentHeight) {\r\n          documentData.finalSize -= 1;\r\n          documentData.finalLineHeight = documentData.finalSize * documentData.lh / documentData.s;\r\n        } else {\r\n          documentData.finalText = finalText;\r\n          len = documentData.finalText.length;\r\n          flag = false;\r\n        }\r\n      }\r\n    }\r\n\r\n    lineWidth = -trackingOffset;\r\n    cLength = 0;\r\n    var uncollapsedSpaces = 0;\r\n    var currentChar;\r\n\r\n    for (i = 0; i < len; i += 1) {\r\n      newLineFlag = false;\r\n      currentChar = documentData.finalText[i];\r\n      charCode = currentChar.charCodeAt(0);\r\n\r\n      if (charCode === 13 || charCode === 3) {\r\n        uncollapsedSpaces = 0;\r\n        lineWidths.push(lineWidth);\r\n        maxLineWidth = lineWidth > maxLineWidth ? lineWidth : maxLineWidth;\r\n        lineWidth = -2 * trackingOffset;\r\n        val = '';\r\n        newLineFlag = true;\r\n        currentLine += 1;\r\n      } else {\r\n        val = currentChar;\r\n      }\r\n\r\n      if (fontManager.chars) {\r\n        charData = fontManager.getCharData(currentChar, fontData.fStyle, fontManager.getFontByName(documentData.f).fFamily);\r\n        cLength = newLineFlag ? 0 : charData.w * documentData.finalSize / 100;\r\n      } else {\r\n        // var charWidth = fontManager.measureText(val, documentData.f, documentData.finalSize);\r\n        // tCanvasHelper.font = documentData.finalSize + 'px '+ fontManager.getFontByName(documentData.f).fFamily;\r\n        cLength = fontManager.measureText(val, documentData.f, documentData.finalSize);\r\n      } //\r\n\r\n\r\n      if (currentChar === ' ') {\r\n        uncollapsedSpaces += cLength + trackingOffset;\r\n      } else {\r\n        lineWidth += cLength + trackingOffset + uncollapsedSpaces;\r\n        uncollapsedSpaces = 0;\r\n      }\r\n\r\n      letters.push({\r\n        l: cLength,\r\n        an: cLength,\r\n        add: currentSize,\r\n        n: newLineFlag,\r\n        anIndexes: [],\r\n        val: val,\r\n        line: currentLine,\r\n        animatorJustifyOffset: 0\r\n      });\r\n\r\n      if (anchorGrouping == 2) {\r\n        // eslint-disable-line eqeqeq\r\n        currentSize += cLength;\r\n\r\n        if (val === '' || val === ' ' || i === len - 1) {\r\n          if (val === '' || val === ' ') {\r\n            currentSize -= cLength;\r\n          }\r\n\r\n          while (currentPos <= i) {\r\n            letters[currentPos].an = currentSize;\r\n            letters[currentPos].ind = index;\r\n            letters[currentPos].extra = cLength;\r\n            currentPos += 1;\r\n          }\r\n\r\n          index += 1;\r\n          currentSize = 0;\r\n        }\r\n      } else if (anchorGrouping == 3) {\r\n        // eslint-disable-line eqeqeq\r\n        currentSize += cLength;\r\n\r\n        if (val === '' || i === len - 1) {\r\n          if (val === '') {\r\n            currentSize -= cLength;\r\n          }\r\n\r\n          while (currentPos <= i) {\r\n            letters[currentPos].an = currentSize;\r\n            letters[currentPos].ind = index;\r\n            letters[currentPos].extra = cLength;\r\n            currentPos += 1;\r\n          }\r\n\r\n          currentSize = 0;\r\n          index += 1;\r\n        }\r\n      } else {\r\n        letters[index].ind = index;\r\n        letters[index].extra = 0;\r\n        index += 1;\r\n      }\r\n    }\r\n\r\n    documentData.l = letters;\r\n    maxLineWidth = lineWidth > maxLineWidth ? lineWidth : maxLineWidth;\r\n    lineWidths.push(lineWidth);\r\n\r\n    if (documentData.sz) {\r\n      documentData.boxWidth = documentData.sz[0];\r\n      documentData.justifyOffset = 0;\r\n    } else {\r\n      documentData.boxWidth = maxLineWidth;\r\n\r\n      switch (documentData.j) {\r\n        case 1:\r\n          documentData.justifyOffset = -documentData.boxWidth;\r\n          break;\r\n\r\n        case 2:\r\n          documentData.justifyOffset = -documentData.boxWidth / 2;\r\n          break;\r\n\r\n        default:\r\n          documentData.justifyOffset = 0;\r\n      }\r\n    }\r\n\r\n    documentData.lineWidths = lineWidths;\r\n    var animators = data.a;\r\n    var animatorData;\r\n    var letterData;\r\n    jLen = animators.length;\r\n    var based;\r\n    var ind;\r\n    var indexes = [];\r\n\r\n    for (j = 0; j < jLen; j += 1) {\r\n      animatorData = animators[j];\r\n\r\n      if (animatorData.a.sc) {\r\n        documentData.strokeColorAnim = true;\r\n      }\r\n\r\n      if (animatorData.a.sw) {\r\n        documentData.strokeWidthAnim = true;\r\n      }\r\n\r\n      if (animatorData.a.fc || animatorData.a.fh || animatorData.a.fs || animatorData.a.fb) {\r\n        documentData.fillColorAnim = true;\r\n      }\r\n\r\n      ind = 0;\r\n      based = animatorData.s.b;\r\n\r\n      for (i = 0; i < len; i += 1) {\r\n        letterData = letters[i];\r\n        letterData.anIndexes[j] = ind;\r\n\r\n        if (based == 1 && letterData.val !== '' || based == 2 && letterData.val !== '' && letterData.val !== ' ' || based == 3 && (letterData.n || letterData.val == ' ' || i == len - 1) || based == 4 && (letterData.n || i == len - 1)) {\r\n          // eslint-disable-line eqeqeq\r\n          if (animatorData.s.rn === 1) {\r\n            indexes.push(ind);\r\n          }\r\n\r\n          ind += 1;\r\n        }\r\n      }\r\n\r\n      data.a[j].s.totalChars = ind;\r\n      var currentInd = -1;\r\n      var newInd;\r\n\r\n      if (animatorData.s.rn === 1) {\r\n        for (i = 0; i < len; i += 1) {\r\n          letterData = letters[i];\r\n\r\n          if (currentInd != letterData.anIndexes[j]) {\r\n            // eslint-disable-line eqeqeq\r\n            currentInd = letterData.anIndexes[j];\r\n            newInd = indexes.splice(Math.floor(Math.random() * indexes.length), 1)[0];\r\n          }\r\n\r\n          letterData.anIndexes[j] = newInd;\r\n        }\r\n      }\r\n    }\r\n\r\n    documentData.yOffset = documentData.finalLineHeight || documentData.finalSize * 1.2;\r\n    documentData.ls = documentData.ls || 0;\r\n    documentData.ascent = fontData.ascent * documentData.finalSize / 100;\r\n  };\r\n\r\n  TextProperty.prototype.updateDocumentData = function (newData, index) {\r\n    index = index === undefined ? this.keysIndex : index;\r\n    var dData = this.copyData({}, this.data.d.k[index].s);\r\n    dData = this.copyData(dData, newData);\r\n    this.data.d.k[index].s = dData;\r\n    this.recalculate(index);\r\n    this.elem.addDynamicProperty(this);\r\n  };\r\n\r\n  TextProperty.prototype.recalculate = function (index) {\r\n    var dData = this.data.d.k[index].s;\r\n    dData.__complete = false;\r\n    this.keysIndex = 0;\r\n    this._isFirstFrame = true;\r\n    this.getValue(dData);\r\n  };\r\n\r\n  TextProperty.prototype.canResizeFont = function (_canResize) {\r\n    this.canResize = _canResize;\r\n    this.recalculate(this.keysIndex);\r\n    this.elem.addDynamicProperty(this);\r\n  };\r\n\r\n  TextProperty.prototype.setMinimumFontSize = function (_fontValue) {\r\n    this.minimumFontSize = Math.floor(_fontValue) || 1;\r\n    this.recalculate(this.keysIndex);\r\n    this.elem.addDynamicProperty(this);\r\n  };\r\n\r\n  var TextSelectorProp = function () {\r\n    var max = Math.max;\r\n    var min = Math.min;\r\n    var floor = Math.floor;\r\n\r\n    function TextSelectorPropFactory(elem, data) {\r\n      this._currentTextLength = -1;\r\n      this.k = false;\r\n      this.data = data;\r\n      this.elem = elem;\r\n      this.comp = elem.comp;\r\n      this.finalS = 0;\r\n      this.finalE = 0;\r\n      this.initDynamicPropertyContainer(elem);\r\n      this.s = PropertyFactory.getProp(elem, data.s || {\r\n        k: 0\r\n      }, 0, 0, this);\r\n\r\n      if ('e' in data) {\r\n        this.e = PropertyFactory.getProp(elem, data.e, 0, 0, this);\r\n      } else {\r\n        this.e = {\r\n          v: 100\r\n        };\r\n      }\r\n\r\n      this.o = PropertyFactory.getProp(elem, data.o || {\r\n        k: 0\r\n      }, 0, 0, this);\r\n      this.xe = PropertyFactory.getProp(elem, data.xe || {\r\n        k: 0\r\n      }, 0, 0, this);\r\n      this.ne = PropertyFactory.getProp(elem, data.ne || {\r\n        k: 0\r\n      }, 0, 0, this);\r\n      this.sm = PropertyFactory.getProp(elem, data.sm || {\r\n        k: 100\r\n      }, 0, 0, this);\r\n      this.a = PropertyFactory.getProp(elem, data.a, 0, 0.01, this);\r\n\r\n      if (!this.dynamicProperties.length) {\r\n        this.getValue();\r\n      }\r\n    }\r\n\r\n    TextSelectorPropFactory.prototype = {\r\n      getMult: function getMult(ind) {\r\n        if (this._currentTextLength !== this.elem.textProperty.currentData.l.length) {\r\n          this.getValue();\r\n        }\r\n\r\n        var x1 = 0;\r\n        var y1 = 0;\r\n        var x2 = 1;\r\n        var y2 = 1;\r\n\r\n        if (this.ne.v > 0) {\r\n          x1 = this.ne.v / 100.0;\r\n        } else {\r\n          y1 = -this.ne.v / 100.0;\r\n        }\r\n\r\n        if (this.xe.v > 0) {\r\n          x2 = 1.0 - this.xe.v / 100.0;\r\n        } else {\r\n          y2 = 1.0 + this.xe.v / 100.0;\r\n        }\r\n\r\n        var easer = BezierFactory.getBezierEasing(x1, y1, x2, y2).get;\r\n        var mult = 0;\r\n        var s = this.finalS;\r\n        var e = this.finalE;\r\n        var type = this.data.sh;\r\n\r\n        if (type === 2) {\r\n          if (e === s) {\r\n            mult = ind >= e ? 1 : 0;\r\n          } else {\r\n            mult = max(0, min(0.5 / (e - s) + (ind - s) / (e - s), 1));\r\n          }\r\n\r\n          mult = easer(mult);\r\n        } else if (type === 3) {\r\n          if (e === s) {\r\n            mult = ind >= e ? 0 : 1;\r\n          } else {\r\n            mult = 1 - max(0, min(0.5 / (e - s) + (ind - s) / (e - s), 1));\r\n          }\r\n\r\n          mult = easer(mult);\r\n        } else if (type === 4) {\r\n          if (e === s) {\r\n            mult = 0;\r\n          } else {\r\n            mult = max(0, min(0.5 / (e - s) + (ind - s) / (e - s), 1));\r\n\r\n            if (mult < 0.5) {\r\n              mult *= 2;\r\n            } else {\r\n              mult = 1 - 2 * (mult - 0.5);\r\n            }\r\n          }\r\n\r\n          mult = easer(mult);\r\n        } else if (type === 5) {\r\n          if (e === s) {\r\n            mult = 0;\r\n          } else {\r\n            var tot = e - s;\r\n            /* ind += 0.5;\r\n                      mult = -4/(tot*tot)*(ind*ind)+(4/tot)*ind; */\r\n\r\n            ind = min(max(0, ind + 0.5 - s), e - s);\r\n            var x = -tot / 2 + ind;\r\n            var a = tot / 2;\r\n            mult = Math.sqrt(1 - x * x / (a * a));\r\n          }\r\n\r\n          mult = easer(mult);\r\n        } else if (type === 6) {\r\n          if (e === s) {\r\n            mult = 0;\r\n          } else {\r\n            ind = min(max(0, ind + 0.5 - s), e - s);\r\n            mult = (1 + Math.cos(Math.PI + Math.PI * 2 * ind / (e - s))) / 2; // eslint-disable-line\r\n          }\r\n\r\n          mult = easer(mult);\r\n        } else {\r\n          if (ind >= floor(s)) {\r\n            if (ind - s < 0) {\r\n              mult = max(0, min(min(e, 1) - (s - ind), 1));\r\n            } else {\r\n              mult = max(0, min(e - ind, 1));\r\n            }\r\n          }\r\n\r\n          mult = easer(mult);\r\n        } // Smoothness implementation.\r\n        // The smoothness represents a reduced range of the original [0; 1] range.\r\n        // if smoothness is 25%, the new range will be [0.375; 0.625]\r\n        // Steps are:\r\n        // - find the lower value of the new range (threshold)\r\n        // - if multiplier is smaller than that value, floor it to 0\r\n        // - if it is larger,\r\n        //     - subtract the threshold\r\n        //     - divide it by the smoothness (this will return the range to [0; 1])\r\n        // Note: If it doesn't work on some scenarios, consider applying it before the easer.\r\n\r\n\r\n        if (this.sm.v !== 100) {\r\n          var smoothness = this.sm.v * 0.01;\r\n\r\n          if (smoothness === 0) {\r\n            smoothness = 0.00000001;\r\n          }\r\n\r\n          var threshold = 0.5 - smoothness * 0.5;\r\n\r\n          if (mult < threshold) {\r\n            mult = 0;\r\n          } else {\r\n            mult = (mult - threshold) / smoothness;\r\n\r\n            if (mult > 1) {\r\n              mult = 1;\r\n            }\r\n          }\r\n        }\r\n\r\n        return mult * this.a.v;\r\n      },\r\n      getValue: function getValue(newCharsFlag) {\r\n        this.iterateDynamicProperties();\r\n        this._mdf = newCharsFlag || this._mdf;\r\n        this._currentTextLength = this.elem.textProperty.currentData.l.length || 0;\r\n\r\n        if (newCharsFlag && this.data.r === 2) {\r\n          this.e.v = this._currentTextLength;\r\n        }\r\n\r\n        var divisor = this.data.r === 2 ? 1 : 100 / this.data.totalChars;\r\n        var o = this.o.v / divisor;\r\n        var s = this.s.v / divisor + o;\r\n        var e = this.e.v / divisor + o;\r\n\r\n        if (s > e) {\r\n          var _s = s;\r\n          s = e;\r\n          e = _s;\r\n        }\r\n\r\n        this.finalS = s;\r\n        this.finalE = e;\r\n      }\r\n    };\r\n    extendPrototype([DynamicPropertyContainer], TextSelectorPropFactory);\r\n\r\n    function getTextSelectorProp(elem, data, arr) {\r\n      return new TextSelectorPropFactory(elem, data, arr);\r\n    }\r\n\r\n    return {\r\n      getTextSelectorProp: getTextSelectorProp\r\n    };\r\n  }();\r\n\r\n  function TextAnimatorDataProperty(elem, animatorProps, container) {\r\n    var defaultData = {\r\n      propType: false\r\n    };\r\n    var getProp = PropertyFactory.getProp;\r\n    var textAnimatorAnimatables = animatorProps.a;\r\n    this.a = {\r\n      r: textAnimatorAnimatables.r ? getProp(elem, textAnimatorAnimatables.r, 0, degToRads, container) : defaultData,\r\n      rx: textAnimatorAnimatables.rx ? getProp(elem, textAnimatorAnimatables.rx, 0, degToRads, container) : defaultData,\r\n      ry: textAnimatorAnimatables.ry ? getProp(elem, textAnimatorAnimatables.ry, 0, degToRads, container) : defaultData,\r\n      sk: textAnimatorAnimatables.sk ? getProp(elem, textAnimatorAnimatables.sk, 0, degToRads, container) : defaultData,\r\n      sa: textAnimatorAnimatables.sa ? getProp(elem, textAnimatorAnimatables.sa, 0, degToRads, container) : defaultData,\r\n      s: textAnimatorAnimatables.s ? getProp(elem, textAnimatorAnimatables.s, 1, 0.01, container) : defaultData,\r\n      a: textAnimatorAnimatables.a ? getProp(elem, textAnimatorAnimatables.a, 1, 0, container) : defaultData,\r\n      o: textAnimatorAnimatables.o ? getProp(elem, textAnimatorAnimatables.o, 0, 0.01, container) : defaultData,\r\n      p: textAnimatorAnimatables.p ? getProp(elem, textAnimatorAnimatables.p, 1, 0, container) : defaultData,\r\n      sw: textAnimatorAnimatables.sw ? getProp(elem, textAnimatorAnimatables.sw, 0, 0, container) : defaultData,\r\n      sc: textAnimatorAnimatables.sc ? getProp(elem, textAnimatorAnimatables.sc, 1, 0, container) : defaultData,\r\n      fc: textAnimatorAnimatables.fc ? getProp(elem, textAnimatorAnimatables.fc, 1, 0, container) : defaultData,\r\n      fh: textAnimatorAnimatables.fh ? getProp(elem, textAnimatorAnimatables.fh, 0, 0, container) : defaultData,\r\n      fs: textAnimatorAnimatables.fs ? getProp(elem, textAnimatorAnimatables.fs, 0, 0.01, container) : defaultData,\r\n      fb: textAnimatorAnimatables.fb ? getProp(elem, textAnimatorAnimatables.fb, 0, 0.01, container) : defaultData,\r\n      t: textAnimatorAnimatables.t ? getProp(elem, textAnimatorAnimatables.t, 0, 0, container) : defaultData\r\n    };\r\n    this.s = TextSelectorProp.getTextSelectorProp(elem, animatorProps.s, container);\r\n    this.s.t = animatorProps.s.t;\r\n  }\r\n\r\n  function TextAnimatorProperty(textData, renderType, elem) {\r\n    this._isFirstFrame = true;\r\n    this._hasMaskedPath = false;\r\n    this._frameId = -1;\r\n    this._textData = textData;\r\n    this._renderType = renderType;\r\n    this._elem = elem;\r\n    this._animatorsData = createSizedArray(this._textData.a.length);\r\n    this._pathData = {};\r\n    this._moreOptions = {\r\n      alignment: {}\r\n    };\r\n    this.renderedLetters = [];\r\n    this.lettersChangedFlag = false;\r\n    this.initDynamicPropertyContainer(elem);\r\n  }\r\n\r\n  TextAnimatorProperty.prototype.searchProperties = function () {\r\n    var i;\r\n    var len = this._textData.a.length;\r\n    var animatorProps;\r\n    var getProp = PropertyFactory.getProp;\r\n\r\n    for (i = 0; i < len; i += 1) {\r\n      animatorProps = this._textData.a[i];\r\n      this._animatorsData[i] = new TextAnimatorDataProperty(this._elem, animatorProps, this);\r\n    }\r\n\r\n    if (this._textData.p && 'm' in this._textData.p) {\r\n      this._pathData = {\r\n        a: getProp(this._elem, this._textData.p.a, 0, 0, this),\r\n        f: getProp(this._elem, this._textData.p.f, 0, 0, this),\r\n        l: getProp(this._elem, this._textData.p.l, 0, 0, this),\r\n        r: getProp(this._elem, this._textData.p.r, 0, 0, this),\r\n        p: getProp(this._elem, this._textData.p.p, 0, 0, this),\r\n        m: this._elem.maskManager.getMaskProperty(this._textData.p.m)\r\n      };\r\n      this._hasMaskedPath = true;\r\n    } else {\r\n      this._hasMaskedPath = false;\r\n    }\r\n\r\n    this._moreOptions.alignment = getProp(this._elem, this._textData.m.a, 1, 0, this);\r\n  };\r\n\r\n  TextAnimatorProperty.prototype.getMeasures = function (documentData, lettersChangedFlag) {\r\n    this.lettersChangedFlag = lettersChangedFlag;\r\n\r\n    if (!this._mdf && !this._isFirstFrame && !lettersChangedFlag && (!this._hasMaskedPath || !this._pathData.m._mdf)) {\r\n      return;\r\n    }\r\n\r\n    this._isFirstFrame = false;\r\n    var alignment = this._moreOptions.alignment.v;\r\n    var animators = this._animatorsData;\r\n    var textData = this._textData;\r\n    var matrixHelper = this.mHelper;\r\n    var renderType = this._renderType;\r\n    var renderedLettersCount = this.renderedLetters.length;\r\n    var xPos;\r\n    var yPos;\r\n    var i;\r\n    var len;\r\n    var letters = documentData.l;\r\n    var pathInfo;\r\n    var currentLength;\r\n    var currentPoint;\r\n    var segmentLength;\r\n    var flag;\r\n    var pointInd;\r\n    var segmentInd;\r\n    var prevPoint;\r\n    var points;\r\n    var segments;\r\n    var partialLength;\r\n    var totalLength;\r\n    var perc;\r\n    var tanAngle;\r\n    var mask;\r\n\r\n    if (this._hasMaskedPath) {\r\n      mask = this._pathData.m;\r\n\r\n      if (!this._pathData.n || this._pathData._mdf) {\r\n        var paths = mask.v;\r\n\r\n        if (this._pathData.r.v) {\r\n          paths = paths.reverse();\r\n        } // TODO: release bezier data cached from previous pathInfo: this._pathData.pi\r\n\r\n\r\n        pathInfo = {\r\n          tLength: 0,\r\n          segments: []\r\n        };\r\n        len = paths._length - 1;\r\n        var bezierData;\r\n        totalLength = 0;\r\n\r\n        for (i = 0; i < len; i += 1) {\r\n          bezierData = bez.buildBezierData(paths.v[i], paths.v[i + 1], [paths.o[i][0] - paths.v[i][0], paths.o[i][1] - paths.v[i][1]], [paths.i[i + 1][0] - paths.v[i + 1][0], paths.i[i + 1][1] - paths.v[i + 1][1]]);\r\n          pathInfo.tLength += bezierData.segmentLength;\r\n          pathInfo.segments.push(bezierData);\r\n          totalLength += bezierData.segmentLength;\r\n        }\r\n\r\n        i = len;\r\n\r\n        if (mask.v.c) {\r\n          bezierData = bez.buildBezierData(paths.v[i], paths.v[0], [paths.o[i][0] - paths.v[i][0], paths.o[i][1] - paths.v[i][1]], [paths.i[0][0] - paths.v[0][0], paths.i[0][1] - paths.v[0][1]]);\r\n          pathInfo.tLength += bezierData.segmentLength;\r\n          pathInfo.segments.push(bezierData);\r\n          totalLength += bezierData.segmentLength;\r\n        }\r\n\r\n        this._pathData.pi = pathInfo;\r\n      }\r\n\r\n      pathInfo = this._pathData.pi;\r\n      currentLength = this._pathData.f.v;\r\n      segmentInd = 0;\r\n      pointInd = 1;\r\n      segmentLength = 0;\r\n      flag = true;\r\n      segments = pathInfo.segments;\r\n\r\n      if (currentLength < 0 && mask.v.c) {\r\n        if (pathInfo.tLength < Math.abs(currentLength)) {\r\n          currentLength = -Math.abs(currentLength) % pathInfo.tLength;\r\n        }\r\n\r\n        segmentInd = segments.length - 1;\r\n        points = segments[segmentInd].points;\r\n        pointInd = points.length - 1;\r\n\r\n        while (currentLength < 0) {\r\n          currentLength += points[pointInd].partialLength;\r\n          pointInd -= 1;\r\n\r\n          if (pointInd < 0) {\r\n            segmentInd -= 1;\r\n            points = segments[segmentInd].points;\r\n            pointInd = points.length - 1;\r\n          }\r\n        }\r\n      }\r\n\r\n      points = segments[segmentInd].points;\r\n      prevPoint = points[pointInd - 1];\r\n      currentPoint = points[pointInd];\r\n      partialLength = currentPoint.partialLength;\r\n    }\r\n\r\n    len = letters.length;\r\n    xPos = 0;\r\n    yPos = 0;\r\n    var yOff = documentData.finalSize * 1.2 * 0.714;\r\n    var firstLine = true;\r\n    var animatorProps;\r\n    var animatorSelector;\r\n    var j;\r\n    var jLen;\r\n    var letterValue;\r\n    jLen = animators.length;\r\n    var mult;\r\n    var ind = -1;\r\n    var offf;\r\n    var xPathPos;\r\n    var yPathPos;\r\n    var initPathPos = currentLength;\r\n    var initSegmentInd = segmentInd;\r\n    var initPointInd = pointInd;\r\n    var currentLine = -1;\r\n    var elemOpacity;\r\n    var sc;\r\n    var sw;\r\n    var fc;\r\n    var k;\r\n    var letterSw;\r\n    var letterSc;\r\n    var letterFc;\r\n    var letterM = '';\r\n    var letterP = this.defaultPropsArray;\r\n    var letterO; //\r\n\r\n    if (documentData.j === 2 || documentData.j === 1) {\r\n      var animatorJustifyOffset = 0;\r\n      var animatorFirstCharOffset = 0;\r\n      var justifyOffsetMult = documentData.j === 2 ? -0.5 : -1;\r\n      var lastIndex = 0;\r\n      var isNewLine = true;\r\n\r\n      for (i = 0; i < len; i += 1) {\r\n        if (letters[i].n) {\r\n          if (animatorJustifyOffset) {\r\n            animatorJustifyOffset += animatorFirstCharOffset;\r\n          }\r\n\r\n          while (lastIndex < i) {\r\n            letters[lastIndex].animatorJustifyOffset = animatorJustifyOffset;\r\n            lastIndex += 1;\r\n          }\r\n\r\n          animatorJustifyOffset = 0;\r\n          isNewLine = true;\r\n        } else {\r\n          for (j = 0; j < jLen; j += 1) {\r\n            animatorProps = animators[j].a;\r\n\r\n            if (animatorProps.t.propType) {\r\n              if (isNewLine && documentData.j === 2) {\r\n                animatorFirstCharOffset += animatorProps.t.v * justifyOffsetMult;\r\n              }\r\n\r\n              animatorSelector = animators[j].s;\r\n              mult = animatorSelector.getMult(letters[i].anIndexes[j], textData.a[j].s.totalChars);\r\n\r\n              if (mult.length) {\r\n                animatorJustifyOffset += animatorProps.t.v * mult[0] * justifyOffsetMult;\r\n              } else {\r\n                animatorJustifyOffset += animatorProps.t.v * mult * justifyOffsetMult;\r\n              }\r\n            }\r\n          }\r\n\r\n          isNewLine = false;\r\n        }\r\n      }\r\n\r\n      if (animatorJustifyOffset) {\r\n        animatorJustifyOffset += animatorFirstCharOffset;\r\n      }\r\n\r\n      while (lastIndex < i) {\r\n        letters[lastIndex].animatorJustifyOffset = animatorJustifyOffset;\r\n        lastIndex += 1;\r\n      }\r\n    } //\r\n\r\n\r\n    for (i = 0; i < len; i += 1) {\r\n      matrixHelper.reset();\r\n      elemOpacity = 1;\r\n\r\n      if (letters[i].n) {\r\n        xPos = 0;\r\n        yPos += documentData.yOffset;\r\n        yPos += firstLine ? 1 : 0;\r\n        currentLength = initPathPos;\r\n        firstLine = false;\r\n\r\n        if (this._hasMaskedPath) {\r\n          segmentInd = initSegmentInd;\r\n          pointInd = initPointInd;\r\n          points = segments[segmentInd].points;\r\n          prevPoint = points[pointInd - 1];\r\n          currentPoint = points[pointInd];\r\n          partialLength = currentPoint.partialLength;\r\n          segmentLength = 0;\r\n        }\r\n\r\n        letterM = '';\r\n        letterFc = '';\r\n        letterSw = '';\r\n        letterO = '';\r\n        letterP = this.defaultPropsArray;\r\n      } else {\r\n        if (this._hasMaskedPath) {\r\n          if (currentLine !== letters[i].line) {\r\n            switch (documentData.j) {\r\n              case 1:\r\n                currentLength += totalLength - documentData.lineWidths[letters[i].line];\r\n                break;\r\n\r\n              case 2:\r\n                currentLength += (totalLength - documentData.lineWidths[letters[i].line]) / 2;\r\n                break;\r\n\r\n              default:\r\n                break;\r\n            }\r\n\r\n            currentLine = letters[i].line;\r\n          }\r\n\r\n          if (ind !== letters[i].ind) {\r\n            if (letters[ind]) {\r\n              currentLength += letters[ind].extra;\r\n            }\r\n\r\n            currentLength += letters[i].an / 2;\r\n            ind = letters[i].ind;\r\n          }\r\n\r\n          currentLength += alignment[0] * letters[i].an * 0.005;\r\n          var animatorOffset = 0;\r\n\r\n          for (j = 0; j < jLen; j += 1) {\r\n            animatorProps = animators[j].a;\r\n\r\n            if (animatorProps.p.propType) {\r\n              animatorSelector = animators[j].s;\r\n              mult = animatorSelector.getMult(letters[i].anIndexes[j], textData.a[j].s.totalChars);\r\n\r\n              if (mult.length) {\r\n                animatorOffset += animatorProps.p.v[0] * mult[0];\r\n              } else {\r\n                animatorOffset += animatorProps.p.v[0] * mult;\r\n              }\r\n            }\r\n\r\n            if (animatorProps.a.propType) {\r\n              animatorSelector = animators[j].s;\r\n              mult = animatorSelector.getMult(letters[i].anIndexes[j], textData.a[j].s.totalChars);\r\n\r\n              if (mult.length) {\r\n                animatorOffset += animatorProps.a.v[0] * mult[0];\r\n              } else {\r\n                animatorOffset += animatorProps.a.v[0] * mult;\r\n              }\r\n            }\r\n          }\r\n\r\n          flag = true; // Force alignment only works with a single line for now\r\n\r\n          if (this._pathData.a.v) {\r\n            currentLength = letters[0].an * 0.5 + (totalLength - this._pathData.f.v - letters[0].an * 0.5 - letters[letters.length - 1].an * 0.5) * ind / (len - 1);\r\n            currentLength += this._pathData.f.v;\r\n          }\r\n\r\n          while (flag) {\r\n            if (segmentLength + partialLength >= currentLength + animatorOffset || !points) {\r\n              perc = (currentLength + animatorOffset - segmentLength) / currentPoint.partialLength;\r\n              xPathPos = prevPoint.point[0] + (currentPoint.point[0] - prevPoint.point[0]) * perc;\r\n              yPathPos = prevPoint.point[1] + (currentPoint.point[1] - prevPoint.point[1]) * perc;\r\n              matrixHelper.translate(-alignment[0] * letters[i].an * 0.005, -(alignment[1] * yOff) * 0.01);\r\n              flag = false;\r\n            } else if (points) {\r\n              segmentLength += currentPoint.partialLength;\r\n              pointInd += 1;\r\n\r\n              if (pointInd >= points.length) {\r\n                pointInd = 0;\r\n                segmentInd += 1;\r\n\r\n                if (!segments[segmentInd]) {\r\n                  if (mask.v.c) {\r\n                    pointInd = 0;\r\n                    segmentInd = 0;\r\n                    points = segments[segmentInd].points;\r\n                  } else {\r\n                    segmentLength -= currentPoint.partialLength;\r\n                    points = null;\r\n                  }\r\n                } else {\r\n                  points = segments[segmentInd].points;\r\n                }\r\n              }\r\n\r\n              if (points) {\r\n                prevPoint = currentPoint;\r\n                currentPoint = points[pointInd];\r\n                partialLength = currentPoint.partialLength;\r\n              }\r\n            }\r\n          }\r\n\r\n          offf = letters[i].an / 2 - letters[i].add;\r\n          matrixHelper.translate(-offf, 0, 0);\r\n        } else {\r\n          offf = letters[i].an / 2 - letters[i].add;\r\n          matrixHelper.translate(-offf, 0, 0); // Grouping alignment\r\n\r\n          matrixHelper.translate(-alignment[0] * letters[i].an * 0.005, -alignment[1] * yOff * 0.01, 0);\r\n        }\r\n\r\n        for (j = 0; j < jLen; j += 1) {\r\n          animatorProps = animators[j].a;\r\n\r\n          if (animatorProps.t.propType) {\r\n            animatorSelector = animators[j].s;\r\n            mult = animatorSelector.getMult(letters[i].anIndexes[j], textData.a[j].s.totalChars); // This condition is to prevent applying tracking to first character in each line. Might be better to use a boolean \"isNewLine\"\r\n\r\n            if (xPos !== 0 || documentData.j !== 0) {\r\n              if (this._hasMaskedPath) {\r\n                if (mult.length) {\r\n                  currentLength += animatorProps.t.v * mult[0];\r\n                } else {\r\n                  currentLength += animatorProps.t.v * mult;\r\n                }\r\n              } else if (mult.length) {\r\n                xPos += animatorProps.t.v * mult[0];\r\n              } else {\r\n                xPos += animatorProps.t.v * mult;\r\n              }\r\n            }\r\n          }\r\n        }\r\n\r\n        if (documentData.strokeWidthAnim) {\r\n          sw = documentData.sw || 0;\r\n        }\r\n\r\n        if (documentData.strokeColorAnim) {\r\n          if (documentData.sc) {\r\n            sc = [documentData.sc[0], documentData.sc[1], documentData.sc[2]];\r\n          } else {\r\n            sc = [0, 0, 0];\r\n          }\r\n        }\r\n\r\n        if (documentData.fillColorAnim && documentData.fc) {\r\n          fc = [documentData.fc[0], documentData.fc[1], documentData.fc[2]];\r\n        }\r\n\r\n        for (j = 0; j < jLen; j += 1) {\r\n          animatorProps = animators[j].a;\r\n\r\n          if (animatorProps.a.propType) {\r\n            animatorSelector = animators[j].s;\r\n            mult = animatorSelector.getMult(letters[i].anIndexes[j], textData.a[j].s.totalChars);\r\n\r\n            if (mult.length) {\r\n              matrixHelper.translate(-animatorProps.a.v[0] * mult[0], -animatorProps.a.v[1] * mult[1], animatorProps.a.v[2] * mult[2]);\r\n            } else {\r\n              matrixHelper.translate(-animatorProps.a.v[0] * mult, -animatorProps.a.v[1] * mult, animatorProps.a.v[2] * mult);\r\n            }\r\n          }\r\n        }\r\n\r\n        for (j = 0; j < jLen; j += 1) {\r\n          animatorProps = animators[j].a;\r\n\r\n          if (animatorProps.s.propType) {\r\n            animatorSelector = animators[j].s;\r\n            mult = animatorSelector.getMult(letters[i].anIndexes[j], textData.a[j].s.totalChars);\r\n\r\n            if (mult.length) {\r\n              matrixHelper.scale(1 + (animatorProps.s.v[0] - 1) * mult[0], 1 + (animatorProps.s.v[1] - 1) * mult[1], 1);\r\n            } else {\r\n              matrixHelper.scale(1 + (animatorProps.s.v[0] - 1) * mult, 1 + (animatorProps.s.v[1] - 1) * mult, 1);\r\n            }\r\n          }\r\n        }\r\n\r\n        for (j = 0; j < jLen; j += 1) {\r\n          animatorProps = animators[j].a;\r\n          animatorSelector = animators[j].s;\r\n          mult = animatorSelector.getMult(letters[i].anIndexes[j], textData.a[j].s.totalChars);\r\n\r\n          if (animatorProps.sk.propType) {\r\n            if (mult.length) {\r\n              matrixHelper.skewFromAxis(-animatorProps.sk.v * mult[0], animatorProps.sa.v * mult[1]);\r\n            } else {\r\n              matrixHelper.skewFromAxis(-animatorProps.sk.v * mult, animatorProps.sa.v * mult);\r\n            }\r\n          }\r\n\r\n          if (animatorProps.r.propType) {\r\n            if (mult.length) {\r\n              matrixHelper.rotateZ(-animatorProps.r.v * mult[2]);\r\n            } else {\r\n              matrixHelper.rotateZ(-animatorProps.r.v * mult);\r\n            }\r\n          }\r\n\r\n          if (animatorProps.ry.propType) {\r\n            if (mult.length) {\r\n              matrixHelper.rotateY(animatorProps.ry.v * mult[1]);\r\n            } else {\r\n              matrixHelper.rotateY(animatorProps.ry.v * mult);\r\n            }\r\n          }\r\n\r\n          if (animatorProps.rx.propType) {\r\n            if (mult.length) {\r\n              matrixHelper.rotateX(animatorProps.rx.v * mult[0]);\r\n            } else {\r\n              matrixHelper.rotateX(animatorProps.rx.v * mult);\r\n            }\r\n          }\r\n\r\n          if (animatorProps.o.propType) {\r\n            if (mult.length) {\r\n              elemOpacity += (animatorProps.o.v * mult[0] - elemOpacity) * mult[0];\r\n            } else {\r\n              elemOpacity += (animatorProps.o.v * mult - elemOpacity) * mult;\r\n            }\r\n          }\r\n\r\n          if (documentData.strokeWidthAnim && animatorProps.sw.propType) {\r\n            if (mult.length) {\r\n              sw += animatorProps.sw.v * mult[0];\r\n            } else {\r\n              sw += animatorProps.sw.v * mult;\r\n            }\r\n          }\r\n\r\n          if (documentData.strokeColorAnim && animatorProps.sc.propType) {\r\n            for (k = 0; k < 3; k += 1) {\r\n              if (mult.length) {\r\n                sc[k] += (animatorProps.sc.v[k] - sc[k]) * mult[0];\r\n              } else {\r\n                sc[k] += (animatorProps.sc.v[k] - sc[k]) * mult;\r\n              }\r\n            }\r\n          }\r\n\r\n          if (documentData.fillColorAnim && documentData.fc) {\r\n            if (animatorProps.fc.propType) {\r\n              for (k = 0; k < 3; k += 1) {\r\n                if (mult.length) {\r\n                  fc[k] += (animatorProps.fc.v[k] - fc[k]) * mult[0];\r\n                } else {\r\n                  fc[k] += (animatorProps.fc.v[k] - fc[k]) * mult;\r\n                }\r\n              }\r\n            }\r\n\r\n            if (animatorProps.fh.propType) {\r\n              if (mult.length) {\r\n                fc = addHueToRGB(fc, animatorProps.fh.v * mult[0]);\r\n              } else {\r\n                fc = addHueToRGB(fc, animatorProps.fh.v * mult);\r\n              }\r\n            }\r\n\r\n            if (animatorProps.fs.propType) {\r\n              if (mult.length) {\r\n                fc = addSaturationToRGB(fc, animatorProps.fs.v * mult[0]);\r\n              } else {\r\n                fc = addSaturationToRGB(fc, animatorProps.fs.v * mult);\r\n              }\r\n            }\r\n\r\n            if (animatorProps.fb.propType) {\r\n              if (mult.length) {\r\n                fc = addBrightnessToRGB(fc, animatorProps.fb.v * mult[0]);\r\n              } else {\r\n                fc = addBrightnessToRGB(fc, animatorProps.fb.v * mult);\r\n              }\r\n            }\r\n          }\r\n        }\r\n\r\n        for (j = 0; j < jLen; j += 1) {\r\n          animatorProps = animators[j].a;\r\n\r\n          if (animatorProps.p.propType) {\r\n            animatorSelector = animators[j].s;\r\n            mult = animatorSelector.getMult(letters[i].anIndexes[j], textData.a[j].s.totalChars);\r\n\r\n            if (this._hasMaskedPath) {\r\n              if (mult.length) {\r\n                matrixHelper.translate(0, animatorProps.p.v[1] * mult[0], -animatorProps.p.v[2] * mult[1]);\r\n              } else {\r\n                matrixHelper.translate(0, animatorProps.p.v[1] * mult, -animatorProps.p.v[2] * mult);\r\n              }\r\n            } else if (mult.length) {\r\n              matrixHelper.translate(animatorProps.p.v[0] * mult[0], animatorProps.p.v[1] * mult[1], -animatorProps.p.v[2] * mult[2]);\r\n            } else {\r\n              matrixHelper.translate(animatorProps.p.v[0] * mult, animatorProps.p.v[1] * mult, -animatorProps.p.v[2] * mult);\r\n            }\r\n          }\r\n        }\r\n\r\n        if (documentData.strokeWidthAnim) {\r\n          letterSw = sw < 0 ? 0 : sw;\r\n        }\r\n\r\n        if (documentData.strokeColorAnim) {\r\n          letterSc = 'rgb(' + Math.round(sc[0] * 255) + ',' + Math.round(sc[1] * 255) + ',' + Math.round(sc[2] * 255) + ')';\r\n        }\r\n\r\n        if (documentData.fillColorAnim && documentData.fc) {\r\n          letterFc = 'rgb(' + Math.round(fc[0] * 255) + ',' + Math.round(fc[1] * 255) + ',' + Math.round(fc[2] * 255) + ')';\r\n        }\r\n\r\n        if (this._hasMaskedPath) {\r\n          matrixHelper.translate(0, -documentData.ls);\r\n          matrixHelper.translate(0, alignment[1] * yOff * 0.01 + yPos, 0);\r\n\r\n          if (this._pathData.p.v) {\r\n            tanAngle = (currentPoint.point[1] - prevPoint.point[1]) / (currentPoint.point[0] - prevPoint.point[0]);\r\n            var rot = Math.atan(tanAngle) * 180 / Math.PI;\r\n\r\n            if (currentPoint.point[0] < prevPoint.point[0]) {\r\n              rot += 180;\r\n            }\r\n\r\n            matrixHelper.rotate(-rot * Math.PI / 180);\r\n          }\r\n\r\n          matrixHelper.translate(xPathPos, yPathPos, 0);\r\n          currentLength -= alignment[0] * letters[i].an * 0.005;\r\n\r\n          if (letters[i + 1] && ind !== letters[i + 1].ind) {\r\n            currentLength += letters[i].an / 2;\r\n            currentLength += documentData.tr * 0.001 * documentData.finalSize;\r\n          }\r\n        } else {\r\n          matrixHelper.translate(xPos, yPos, 0);\r\n\r\n          if (documentData.ps) {\r\n            // matrixHelper.translate(documentData.ps[0],documentData.ps[1],0);\r\n            matrixHelper.translate(documentData.ps[0], documentData.ps[1] + documentData.ascent, 0);\r\n          }\r\n\r\n          switch (documentData.j) {\r\n            case 1:\r\n              matrixHelper.translate(letters[i].animatorJustifyOffset + documentData.justifyOffset + (documentData.boxWidth - documentData.lineWidths[letters[i].line]), 0, 0);\r\n              break;\r\n\r\n            case 2:\r\n              matrixHelper.translate(letters[i].animatorJustifyOffset + documentData.justifyOffset + (documentData.boxWidth - documentData.lineWidths[letters[i].line]) / 2, 0, 0);\r\n              break;\r\n\r\n            default:\r\n              break;\r\n          }\r\n\r\n          matrixHelper.translate(0, -documentData.ls);\r\n          matrixHelper.translate(offf, 0, 0);\r\n          matrixHelper.translate(alignment[0] * letters[i].an * 0.005, alignment[1] * yOff * 0.01, 0);\r\n          xPos += letters[i].l + documentData.tr * 0.001 * documentData.finalSize;\r\n        }\r\n\r\n        if (renderType === 'html') {\r\n          letterM = matrixHelper.toCSS();\r\n        } else if (renderType === 'svg') {\r\n          letterM = matrixHelper.to2dCSS();\r\n        } else {\r\n          letterP = [matrixHelper.props[0], matrixHelper.props[1], matrixHelper.props[2], matrixHelper.props[3], matrixHelper.props[4], matrixHelper.props[5], matrixHelper.props[6], matrixHelper.props[7], matrixHelper.props[8], matrixHelper.props[9], matrixHelper.props[10], matrixHelper.props[11], matrixHelper.props[12], matrixHelper.props[13], matrixHelper.props[14], matrixHelper.props[15]];\r\n        }\r\n\r\n        letterO = elemOpacity;\r\n      }\r\n\r\n      if (renderedLettersCount <= i) {\r\n        letterValue = new LetterProps(letterO, letterSw, letterSc, letterFc, letterM, letterP);\r\n        this.renderedLetters.push(letterValue);\r\n        renderedLettersCount += 1;\r\n        this.lettersChangedFlag = true;\r\n      } else {\r\n        letterValue = this.renderedLetters[i];\r\n        this.lettersChangedFlag = letterValue.update(letterO, letterSw, letterSc, letterFc, letterM, letterP) || this.lettersChangedFlag;\r\n      }\r\n    }\r\n  };\r\n\r\n  TextAnimatorProperty.prototype.getValue = function () {\r\n    if (this._elem.globalData.frameId === this._frameId) {\r\n      return;\r\n    }\r\n\r\n    this._frameId = this._elem.globalData.frameId;\r\n    this.iterateDynamicProperties();\r\n  };\r\n\r\n  TextAnimatorProperty.prototype.mHelper = new Matrix();\r\n  TextAnimatorProperty.prototype.defaultPropsArray = [];\r\n  extendPrototype([DynamicPropertyContainer], TextAnimatorProperty);\r\n\r\n  function ITextElement() {}\r\n\r\n  ITextElement.prototype.initElement = function (data, globalData, comp) {\r\n    this.lettersChangedFlag = true;\r\n    this.initFrame();\r\n    this.initBaseData(data, globalData, comp);\r\n    this.textProperty = new TextProperty(this, data.t, this.dynamicProperties);\r\n    this.textAnimator = new TextAnimatorProperty(data.t, this.renderType, this);\r\n    this.initTransform(data, globalData, comp);\r\n    this.initHierarchy();\r\n    this.initRenderable();\r\n    this.initRendererElement();\r\n    this.createContainerElements();\r\n    this.createRenderableComponents();\r\n    this.createContent();\r\n    this.hide();\r\n    this.textAnimator.searchProperties(this.dynamicProperties);\r\n  };\r\n\r\n  ITextElement.prototype.prepareFrame = function (num) {\r\n    this._mdf = false;\r\n    this.prepareRenderableFrame(num);\r\n    this.prepareProperties(num, this.isInRange);\r\n\r\n    if (this.textProperty._mdf || this.textProperty._isFirstFrame) {\r\n      this.buildNewText();\r\n      this.textProperty._isFirstFrame = false;\r\n      this.textProperty._mdf = false;\r\n    }\r\n  };\r\n\r\n  ITextElement.prototype.createPathShape = function (matrixHelper, shapes) {\r\n    var j;\r\n    var jLen = shapes.length;\r\n    var pathNodes;\r\n    var shapeStr = '';\r\n\r\n    for (j = 0; j < jLen; j += 1) {\r\n      if (shapes[j].ty === 'sh') {\r\n        pathNodes = shapes[j].ks.k;\r\n        shapeStr += buildShapeString(pathNodes, pathNodes.i.length, true, matrixHelper);\r\n      }\r\n    }\r\n\r\n    return shapeStr;\r\n  };\r\n\r\n  ITextElement.prototype.updateDocumentData = function (newData, index) {\r\n    this.textProperty.updateDocumentData(newData, index);\r\n  };\r\n\r\n  ITextElement.prototype.canResizeFont = function (_canResize) {\r\n    this.textProperty.canResizeFont(_canResize);\r\n  };\r\n\r\n  ITextElement.prototype.setMinimumFontSize = function (_fontSize) {\r\n    this.textProperty.setMinimumFontSize(_fontSize);\r\n  };\r\n\r\n  ITextElement.prototype.applyTextPropertiesToMatrix = function (documentData, matrixHelper, lineNumber, xPos, yPos) {\r\n    if (documentData.ps) {\r\n      matrixHelper.translate(documentData.ps[0], documentData.ps[1] + documentData.ascent, 0);\r\n    }\r\n\r\n    matrixHelper.translate(0, -documentData.ls, 0);\r\n\r\n    switch (documentData.j) {\r\n      case 1:\r\n        matrixHelper.translate(documentData.justifyOffset + (documentData.boxWidth - documentData.lineWidths[lineNumber]), 0, 0);\r\n        break;\r\n\r\n      case 2:\r\n        matrixHelper.translate(documentData.justifyOffset + (documentData.boxWidth - documentData.lineWidths[lineNumber]) / 2, 0, 0);\r\n        break;\r\n\r\n      default:\r\n        break;\r\n    }\r\n\r\n    matrixHelper.translate(xPos, yPos, 0);\r\n  };\r\n\r\n  ITextElement.prototype.buildColor = function (colorData) {\r\n    return 'rgb(' + Math.round(colorData[0] * 255) + ',' + Math.round(colorData[1] * 255) + ',' + Math.round(colorData[2] * 255) + ')';\r\n  };\r\n\r\n  ITextElement.prototype.emptyProp = new LetterProps();\r\n\r\n  ITextElement.prototype.destroy = function () {};\r\n\r\n  var emptyShapeData = {\r\n    shapes: []\r\n  };\r\n\r\n  function SVGTextLottieElement(data, globalData, comp) {\r\n    this.textSpans = [];\r\n    this.renderType = 'svg';\r\n    this.initElement(data, globalData, comp);\r\n  }\r\n\r\n  extendPrototype([BaseElement, TransformElement, SVGBaseElement, HierarchyElement, FrameElement, RenderableDOMElement, ITextElement], SVGTextLottieElement);\r\n\r\n  SVGTextLottieElement.prototype.createContent = function () {\r\n    if (this.data.singleShape && !this.globalData.fontManager.chars) {\r\n      this.textContainer = createNS('text');\r\n    }\r\n  };\r\n\r\n  SVGTextLottieElement.prototype.buildTextContents = function (textArray) {\r\n    var i = 0;\r\n    var len = textArray.length;\r\n    var textContents = [];\r\n    var currentTextContent = '';\r\n\r\n    while (i < len) {\r\n      if (textArray[i] === String.fromCharCode(13) || textArray[i] === String.fromCharCode(3)) {\r\n        textContents.push(currentTextContent);\r\n        currentTextContent = '';\r\n      } else {\r\n        currentTextContent += textArray[i];\r\n      }\r\n\r\n      i += 1;\r\n    }\r\n\r\n    textContents.push(currentTextContent);\r\n    return textContents;\r\n  };\r\n\r\n  SVGTextLottieElement.prototype.buildShapeData = function (data, scale) {\r\n    // data should probably be cloned to apply scale separately to each instance of a text on different layers\r\n    // but since text internal content gets only rendered once and then it's never rerendered,\r\n    // it's probably safe not to clone data and reuse always the same instance even if the object is mutated.\r\n    // Avoiding cloning is preferred since cloning each character shape data is expensive\r\n    if (data.shapes && data.shapes.length) {\r\n      var shape = data.shapes[0];\r\n\r\n      if (shape.it) {\r\n        var shapeItem = shape.it[shape.it.length - 1];\r\n\r\n        if (shapeItem.s) {\r\n          shapeItem.s.k[0] = scale;\r\n          shapeItem.s.k[1] = scale;\r\n        }\r\n      }\r\n    }\r\n\r\n    return data;\r\n  };\r\n\r\n  SVGTextLottieElement.prototype.buildNewText = function () {\r\n    this.addDynamicProperty(this);\r\n    var i;\r\n    var len;\r\n    var documentData = this.textProperty.currentData;\r\n    this.renderedLetters = createSizedArray(documentData ? documentData.l.length : 0);\r\n\r\n    if (documentData.fc) {\r\n      this.layerElement.setAttribute('fill', this.buildColor(documentData.fc));\r\n    } else {\r\n      this.layerElement.setAttribute('fill', 'rgba(0,0,0,0)');\r\n    }\r\n\r\n    if (documentData.sc) {\r\n      this.layerElement.setAttribute('stroke', this.buildColor(documentData.sc));\r\n      this.layerElement.setAttribute('stroke-width', documentData.sw);\r\n    }\r\n\r\n    this.layerElement.setAttribute('font-size', documentData.finalSize);\r\n    var fontData = this.globalData.fontManager.getFontByName(documentData.f);\r\n\r\n    if (fontData.fClass) {\r\n      this.layerElement.setAttribute('class', fontData.fClass);\r\n    } else {\r\n      this.layerElement.setAttribute('font-family', fontData.fFamily);\r\n      var fWeight = documentData.fWeight;\r\n      var fStyle = documentData.fStyle;\r\n      this.layerElement.setAttribute('font-style', fStyle);\r\n      this.layerElement.setAttribute('font-weight', fWeight);\r\n    }\r\n\r\n    this.layerElement.setAttribute('aria-label', documentData.t);\r\n    var letters = documentData.l || [];\r\n    var usesGlyphs = !!this.globalData.fontManager.chars;\r\n    len = letters.length;\r\n    var tSpan;\r\n    var matrixHelper = this.mHelper;\r\n    var shapeStr = '';\r\n    var singleShape = this.data.singleShape;\r\n    var xPos = 0;\r\n    var yPos = 0;\r\n    var firstLine = true;\r\n    var trackingOffset = documentData.tr * 0.001 * documentData.finalSize;\r\n\r\n    if (singleShape && !usesGlyphs && !documentData.sz) {\r\n      var tElement = this.textContainer;\r\n      var justify = 'start';\r\n\r\n      switch (documentData.j) {\r\n        case 1:\r\n          justify = 'end';\r\n          break;\r\n\r\n        case 2:\r\n          justify = 'middle';\r\n          break;\r\n\r\n        default:\r\n          justify = 'start';\r\n          break;\r\n      }\r\n\r\n      tElement.setAttribute('text-anchor', justify);\r\n      tElement.setAttribute('letter-spacing', trackingOffset);\r\n      var textContent = this.buildTextContents(documentData.finalText);\r\n      len = textContent.length;\r\n      yPos = documentData.ps ? documentData.ps[1] + documentData.ascent : 0;\r\n\r\n      for (i = 0; i < len; i += 1) {\r\n        tSpan = this.textSpans[i].span || createNS('tspan');\r\n        tSpan.textContent = textContent[i];\r\n        tSpan.setAttribute('x', 0);\r\n        tSpan.setAttribute('y', yPos);\r\n        tSpan.style.display = 'inherit';\r\n        tElement.appendChild(tSpan);\r\n\r\n        if (!this.textSpans[i]) {\r\n          this.textSpans[i] = {\r\n            span: null,\r\n            glyph: null\r\n          };\r\n        }\r\n\r\n        this.textSpans[i].span = tSpan;\r\n        yPos += documentData.finalLineHeight;\r\n      }\r\n\r\n      this.layerElement.appendChild(tElement);\r\n    } else {\r\n      var cachedSpansLength = this.textSpans.length;\r\n      var charData;\r\n\r\n      for (i = 0; i < len; i += 1) {\r\n        if (!this.textSpans[i]) {\r\n          this.textSpans[i] = {\r\n            span: null,\r\n            childSpan: null,\r\n            glyph: null\r\n          };\r\n        }\r\n\r\n        if (!usesGlyphs || !singleShape || i === 0) {\r\n          tSpan = cachedSpansLength > i ? this.textSpans[i].span : createNS(usesGlyphs ? 'g' : 'text');\r\n\r\n          if (cachedSpansLength <= i) {\r\n            tSpan.setAttribute('stroke-linecap', 'butt');\r\n            tSpan.setAttribute('stroke-linejoin', 'round');\r\n            tSpan.setAttribute('stroke-miterlimit', '4');\r\n            this.textSpans[i].span = tSpan;\r\n\r\n            if (usesGlyphs) {\r\n              var childSpan = createNS('g');\r\n              tSpan.appendChild(childSpan);\r\n              this.textSpans[i].childSpan = childSpan;\r\n            }\r\n\r\n            this.textSpans[i].span = tSpan;\r\n            this.layerElement.appendChild(tSpan);\r\n          }\r\n\r\n          tSpan.style.display = 'inherit';\r\n        }\r\n\r\n        matrixHelper.reset();\r\n\r\n        if (singleShape) {\r\n          if (letters[i].n) {\r\n            xPos = -trackingOffset;\r\n            yPos += documentData.yOffset;\r\n            yPos += firstLine ? 1 : 0;\r\n            firstLine = false;\r\n          }\r\n\r\n          this.applyTextPropertiesToMatrix(documentData, matrixHelper, letters[i].line, xPos, yPos);\r\n          xPos += letters[i].l || 0; // xPos += letters[i].val === ' ' ? 0 : trackingOffset;\r\n\r\n          xPos += trackingOffset;\r\n        }\r\n\r\n        if (usesGlyphs) {\r\n          charData = this.globalData.fontManager.getCharData(documentData.finalText[i], fontData.fStyle, this.globalData.fontManager.getFontByName(documentData.f).fFamily);\r\n          var glyphElement; // t === 1 means the character has been replaced with an animated shaped\r\n\r\n          if (charData.t === 1) {\r\n            glyphElement = new SVGCompElement(charData.data, this.globalData, this);\r\n          } else {\r\n            var data = emptyShapeData;\r\n\r\n            if (charData.data && charData.data.shapes) {\r\n              data = this.buildShapeData(charData.data, documentData.finalSize);\r\n            }\r\n\r\n            glyphElement = new SVGShapeElement(data, this.globalData, this);\r\n          }\r\n\r\n          if (this.textSpans[i].glyph) {\r\n            var glyph = this.textSpans[i].glyph;\r\n            this.textSpans[i].childSpan.removeChild(glyph.layerElement);\r\n            glyph.destroy();\r\n          }\r\n\r\n          this.textSpans[i].glyph = glyphElement;\r\n          glyphElement._debug = true;\r\n          glyphElement.prepareFrame(0);\r\n          glyphElement.renderFrame();\r\n          this.textSpans[i].childSpan.appendChild(glyphElement.layerElement); // when using animated shapes, the layer will be scaled instead of replacing the internal scale\r\n          // this might have issues with strokes and might need a different solution\r\n\r\n          if (charData.t === 1) {\r\n            this.textSpans[i].childSpan.setAttribute('transform', 'scale(' + documentData.finalSize / 100 + ',' + documentData.finalSize / 100 + ')');\r\n          }\r\n        } else {\r\n          if (singleShape) {\r\n            tSpan.setAttribute('transform', 'translate(' + matrixHelper.props[12] + ',' + matrixHelper.props[13] + ')');\r\n          }\r\n\r\n          tSpan.textContent = letters[i].val;\r\n          tSpan.setAttributeNS('http://www.w3.org/XML/1998/namespace', 'xml:space', 'preserve');\r\n        } //\r\n\r\n      }\r\n\r\n      if (singleShape && tSpan) {\r\n        tSpan.setAttribute('d', shapeStr);\r\n      }\r\n    }\r\n\r\n    while (i < this.textSpans.length) {\r\n      this.textSpans[i].span.style.display = 'none';\r\n      i += 1;\r\n    }\r\n\r\n    this._sizeChanged = true;\r\n  };\r\n\r\n  SVGTextLottieElement.prototype.sourceRectAtTime = function () {\r\n    this.prepareFrame(this.comp.renderedFrame - this.data.st);\r\n    this.renderInnerContent();\r\n\r\n    if (this._sizeChanged) {\r\n      this._sizeChanged = false;\r\n      var textBox = this.layerElement.getBBox();\r\n      this.bbox = {\r\n        top: textBox.y,\r\n        left: textBox.x,\r\n        width: textBox.width,\r\n        height: textBox.height\r\n      };\r\n    }\r\n\r\n    return this.bbox;\r\n  };\r\n\r\n  SVGTextLottieElement.prototype.getValue = function () {\r\n    var i;\r\n    var len = this.textSpans.length;\r\n    var glyphElement;\r\n    this.renderedFrame = this.comp.renderedFrame;\r\n\r\n    for (i = 0; i < len; i += 1) {\r\n      glyphElement = this.textSpans[i].glyph;\r\n\r\n      if (glyphElement) {\r\n        glyphElement.prepareFrame(this.comp.renderedFrame - this.data.st);\r\n\r\n        if (glyphElement._mdf) {\r\n          this._mdf = true;\r\n        }\r\n      }\r\n    }\r\n  };\r\n\r\n  SVGTextLottieElement.prototype.renderInnerContent = function () {\r\n    if (!this.data.singleShape || this._mdf) {\r\n      this.textAnimator.getMeasures(this.textProperty.currentData, this.lettersChangedFlag);\r\n\r\n      if (this.lettersChangedFlag || this.textAnimator.lettersChangedFlag) {\r\n        this._sizeChanged = true;\r\n        var i;\r\n        var len;\r\n        var renderedLetters = this.textAnimator.renderedLetters;\r\n        var letters = this.textProperty.currentData.l;\r\n        len = letters.length;\r\n        var renderedLetter;\r\n        var textSpan;\r\n        var glyphElement;\r\n\r\n        for (i = 0; i < len; i += 1) {\r\n          if (!letters[i].n) {\r\n            renderedLetter = renderedLetters[i];\r\n            textSpan = this.textSpans[i].span;\r\n            glyphElement = this.textSpans[i].glyph;\r\n\r\n            if (glyphElement) {\r\n              glyphElement.renderFrame();\r\n            }\r\n\r\n            if (renderedLetter._mdf.m) {\r\n              textSpan.setAttribute('transform', renderedLetter.m);\r\n            }\r\n\r\n            if (renderedLetter._mdf.o) {\r\n              textSpan.setAttribute('opacity', renderedLetter.o);\r\n            }\r\n\r\n            if (renderedLetter._mdf.sw) {\r\n              textSpan.setAttribute('stroke-width', renderedLetter.sw);\r\n            }\r\n\r\n            if (renderedLetter._mdf.sc) {\r\n              textSpan.setAttribute('stroke', renderedLetter.sc);\r\n            }\r\n\r\n            if (renderedLetter._mdf.fc) {\r\n              textSpan.setAttribute('fill', renderedLetter.fc);\r\n            }\r\n          }\r\n        }\r\n      }\r\n    }\r\n  };\r\n\r\n  function ISolidElement(data, globalData, comp) {\r\n    this.initElement(data, globalData, comp);\r\n  }\r\n\r\n  extendPrototype([IImageElement], ISolidElement);\r\n\r\n  ISolidElement.prototype.createContent = function () {\r\n    var rect = createNS('rect'); /// /rect.style.width = this.data.sw;\r\n    /// /rect.style.height = this.data.sh;\r\n    /// /rect.style.fill = this.data.sc;\r\n\r\n    rect.setAttribute('width', this.data.sw);\r\n    rect.setAttribute('height', this.data.sh);\r\n    rect.setAttribute('fill', this.data.sc);\r\n    this.layerElement.appendChild(rect);\r\n  };\r\n\r\n  function NullElement(data, globalData, comp) {\r\n    this.initFrame();\r\n    this.initBaseData(data, globalData, comp);\r\n    this.initFrame();\r\n    this.initTransform(data, globalData, comp);\r\n    this.initHierarchy();\r\n  }\r\n\r\n  NullElement.prototype.prepareFrame = function (num) {\r\n    this.prepareProperties(num, true);\r\n  };\r\n\r\n  NullElement.prototype.renderFrame = function () {};\r\n\r\n  NullElement.prototype.getBaseElement = function () {\r\n    return null;\r\n  };\r\n\r\n  NullElement.prototype.destroy = function () {};\r\n\r\n  NullElement.prototype.sourceRectAtTime = function () {};\r\n\r\n  NullElement.prototype.hide = function () {};\r\n\r\n  extendPrototype([BaseElement, TransformElement, HierarchyElement, FrameElement], NullElement);\r\n\r\n  function SVGRendererBase() {}\r\n\r\n  extendPrototype([BaseRenderer], SVGRendererBase);\r\n\r\n  SVGRendererBase.prototype.createNull = function (data) {\r\n    return new NullElement(data, this.globalData, this);\r\n  };\r\n\r\n  SVGRendererBase.prototype.createShape = function (data) {\r\n    return new SVGShapeElement(data, this.globalData, this);\r\n  };\r\n\r\n  SVGRendererBase.prototype.createText = function (data) {\r\n    return new SVGTextLottieElement(data, this.globalData, this);\r\n  };\r\n\r\n  SVGRendererBase.prototype.createImage = function (data) {\r\n    return new IImageElement(data, this.globalData, this);\r\n  };\r\n\r\n  SVGRendererBase.prototype.createSolid = function (data) {\r\n    return new ISolidElement(data, this.globalData, this);\r\n  };\r\n\r\n  SVGRendererBase.prototype.configAnimation = function (animData) {\r\n    this.svgElement.setAttribute('xmlns', 'http://www.w3.org/2000/svg');\r\n    this.svgElement.setAttribute('xmlns:xlink', 'http://www.w3.org/1999/xlink');\r\n\r\n    if (this.renderConfig.viewBoxSize) {\r\n      this.svgElement.setAttribute('viewBox', this.renderConfig.viewBoxSize);\r\n    } else {\r\n      this.svgElement.setAttribute('viewBox', '0 0 ' + animData.w + ' ' + animData.h);\r\n    }\r\n\r\n    if (!this.renderConfig.viewBoxOnly) {\r\n      this.svgElement.setAttribute('width', animData.w);\r\n      this.svgElement.setAttribute('height', animData.h);\r\n      this.svgElement.style.width = '100%';\r\n      this.svgElement.style.height = '100%';\r\n      this.svgElement.style.transform = 'translate3d(0,0,0)';\r\n      this.svgElement.style.contentVisibility = this.renderConfig.contentVisibility;\r\n    }\r\n\r\n    if (this.renderConfig.width) {\r\n      this.svgElement.setAttribute('width', this.renderConfig.width);\r\n    }\r\n\r\n    if (this.renderConfig.height) {\r\n      this.svgElement.setAttribute('height', this.renderConfig.height);\r\n    }\r\n\r\n    if (this.renderConfig.className) {\r\n      this.svgElement.setAttribute('class', this.renderConfig.className);\r\n    }\r\n\r\n    if (this.renderConfig.id) {\r\n      this.svgElement.setAttribute('id', this.renderConfig.id);\r\n    }\r\n\r\n    if (this.renderConfig.focusable !== undefined) {\r\n      this.svgElement.setAttribute('focusable', this.renderConfig.focusable);\r\n    }\r\n\r\n    this.svgElement.setAttribute('preserveAspectRatio', this.renderConfig.preserveAspectRatio); // this.layerElement.style.transform = 'translate3d(0,0,0)';\r\n    // this.layerElement.style.transformOrigin = this.layerElement.style.mozTransformOrigin = this.layerElement.style.webkitTransformOrigin = this.layerElement.style['-webkit-transform'] = \"0px 0px 0px\";\r\n\r\n    this.animationItem.wrapper.appendChild(this.svgElement); // Mask animation\r\n\r\n    var defs = this.globalData.defs;\r\n    this.setupGlobalData(animData, defs);\r\n    this.globalData.progressiveLoad = this.renderConfig.progressiveLoad;\r\n    this.data = animData;\r\n    var maskElement = createNS('clipPath');\r\n    var rect = createNS('rect');\r\n    rect.setAttribute('width', animData.w);\r\n    rect.setAttribute('height', animData.h);\r\n    rect.setAttribute('x', 0);\r\n    rect.setAttribute('y', 0);\r\n    var maskId = createElementID();\r\n    maskElement.setAttribute('id', maskId);\r\n    maskElement.appendChild(rect);\r\n    this.layerElement.setAttribute('clip-path', 'url(' + getLocationHref() + '#' + maskId + ')');\r\n    defs.appendChild(maskElement);\r\n    this.layers = animData.layers;\r\n    this.elements = createSizedArray(animData.layers.length);\r\n  };\r\n\r\n  SVGRendererBase.prototype.destroy = function () {\r\n    if (this.animationItem.wrapper) {\r\n      this.animationItem.wrapper.innerText = '';\r\n    }\r\n\r\n    this.layerElement = null;\r\n    this.globalData.defs = null;\r\n    var i;\r\n    var len = this.layers ? this.layers.length : 0;\r\n\r\n    for (i = 0; i < len; i += 1) {\r\n      if (this.elements[i]) {\r\n        this.elements[i].destroy();\r\n      }\r\n    }\r\n\r\n    this.elements.length = 0;\r\n    this.destroyed = true;\r\n    this.animationItem = null;\r\n  };\r\n\r\n  SVGRendererBase.prototype.updateContainerSize = function () {};\r\n\r\n  SVGRendererBase.prototype.findIndexByInd = function (ind) {\r\n    var i = 0;\r\n    var len = this.layers.length;\r\n\r\n    for (i = 0; i < len; i += 1) {\r\n      if (this.layers[i].ind === ind) {\r\n        return i;\r\n      }\r\n    }\r\n\r\n    return -1;\r\n  };\r\n\r\n  SVGRendererBase.prototype.buildItem = function (pos) {\r\n    var elements = this.elements;\r\n\r\n    if (elements[pos] || this.layers[pos].ty === 99) {\r\n      return;\r\n    }\r\n\r\n    elements[pos] = true;\r\n    var element = this.createItem(this.layers[pos]);\r\n    elements[pos] = element;\r\n\r\n    if (getExpressionsPlugin()) {\r\n      if (this.layers[pos].ty === 0) {\r\n        this.globalData.projectInterface.registerComposition(element);\r\n      }\r\n\r\n      element.initExpressions();\r\n    }\r\n\r\n    this.appendElementInPos(element, pos);\r\n\r\n    if (this.layers[pos].tt) {\r\n      var elementIndex = 'tp' in this.layers[pos] ? this.findIndexByInd(this.layers[pos].tp) : pos - 1;\r\n\r\n      if (elementIndex === -1) {\r\n        return;\r\n      }\r\n\r\n      if (!this.elements[elementIndex] || this.elements[elementIndex] === true) {\r\n        this.buildItem(elementIndex);\r\n        this.addPendingElement(element);\r\n      } else {\r\n        var matteElement = elements[elementIndex];\r\n        var matteMask = matteElement.getMatte(this.layers[pos].tt);\r\n        element.setMatte(matteMask);\r\n      }\r\n    }\r\n  };\r\n\r\n  SVGRendererBase.prototype.checkPendingElements = function () {\r\n    while (this.pendingElements.length) {\r\n      var element = this.pendingElements.pop();\r\n      element.checkParenting();\r\n\r\n      if (element.data.tt) {\r\n        var i = 0;\r\n        var len = this.elements.length;\r\n\r\n        while (i < len) {\r\n          if (this.elements[i] === element) {\r\n            var elementIndex = 'tp' in element.data ? this.findIndexByInd(element.data.tp) : i - 1;\r\n            var matteElement = this.elements[elementIndex];\r\n            var matteMask = matteElement.getMatte(this.layers[i].tt);\r\n            element.setMatte(matteMask);\r\n            break;\r\n          }\r\n\r\n          i += 1;\r\n        }\r\n      }\r\n    }\r\n  };\r\n\r\n  SVGRendererBase.prototype.renderFrame = function (num) {\r\n    if (this.renderedFrame === num || this.destroyed) {\r\n      return;\r\n    }\r\n\r\n    if (num === null) {\r\n      num = this.renderedFrame;\r\n    } else {\r\n      this.renderedFrame = num;\r\n    } // console.log('-------');\r\n    // console.log('FRAME ',num);\r\n\r\n\r\n    this.globalData.frameNum = num;\r\n    this.globalData.frameId += 1;\r\n    this.globalData.projectInterface.currentFrame = num;\r\n    this.globalData._mdf = false;\r\n    var i;\r\n    var len = this.layers.length;\r\n\r\n    if (!this.completeLayers) {\r\n      this.checkLayers(num);\r\n    }\r\n\r\n    for (i = len - 1; i >= 0; i -= 1) {\r\n      if (this.completeLayers || this.elements[i]) {\r\n        this.elements[i].prepareFrame(num - this.layers[i].st);\r\n      }\r\n    }\r\n\r\n    if (this.globalData._mdf) {\r\n      for (i = 0; i < len; i += 1) {\r\n        if (this.completeLayers || this.elements[i]) {\r\n          this.elements[i].renderFrame();\r\n        }\r\n      }\r\n    }\r\n  };\r\n\r\n  SVGRendererBase.prototype.appendElementInPos = function (element, pos) {\r\n    var newElement = element.getBaseElement();\r\n\r\n    if (!newElement) {\r\n      return;\r\n    }\r\n\r\n    var i = 0;\r\n    var nextElement;\r\n\r\n    while (i < pos) {\r\n      if (this.elements[i] && this.elements[i] !== true && this.elements[i].getBaseElement()) {\r\n        nextElement = this.elements[i].getBaseElement();\r\n      }\r\n\r\n      i += 1;\r\n    }\r\n\r\n    if (nextElement) {\r\n      this.layerElement.insertBefore(newElement, nextElement);\r\n    } else {\r\n      this.layerElement.appendChild(newElement);\r\n    }\r\n  };\r\n\r\n  SVGRendererBase.prototype.hide = function () {\r\n    this.layerElement.style.display = 'none';\r\n  };\r\n\r\n  SVGRendererBase.prototype.show = function () {\r\n    this.layerElement.style.display = 'block';\r\n  };\r\n\r\n  function ICompElement() {}\r\n\r\n  extendPrototype([BaseElement, TransformElement, HierarchyElement, FrameElement, RenderableDOMElement], ICompElement);\r\n\r\n  ICompElement.prototype.initElement = function (data, globalData, comp) {\r\n    this.initFrame();\r\n    this.initBaseData(data, globalData, comp);\r\n    this.initTransform(data, globalData, comp);\r\n    this.initRenderable();\r\n    this.initHierarchy();\r\n    this.initRendererElement();\r\n    this.createContainerElements();\r\n    this.createRenderableComponents();\r\n\r\n    if (this.data.xt || !globalData.progressiveLoad) {\r\n      this.buildAllItems();\r\n    }\r\n\r\n    this.hide();\r\n  };\r\n  /* ICompElement.prototype.hide = function(){\r\n      if(!this.hidden){\r\n          this.hideElement();\r\n          var i,len = this.elements.length;\r\n          for( i = 0; i < len; i+=1 ){\r\n              if(this.elements[i]){\r\n                  this.elements[i].hide();\r\n              }\r\n          }\r\n      }\r\n  }; */\r\n\r\n\r\n  ICompElement.prototype.prepareFrame = function (num) {\r\n    this._mdf = false;\r\n    this.prepareRenderableFrame(num);\r\n    this.prepareProperties(num, this.isInRange);\r\n\r\n    if (!this.isInRange && !this.data.xt) {\r\n      return;\r\n    }\r\n\r\n    if (!this.tm._placeholder) {\r\n      var timeRemapped = this.tm.v;\r\n\r\n      if (timeRemapped === this.data.op) {\r\n        timeRemapped = this.data.op - 1;\r\n      }\r\n\r\n      this.renderedFrame = timeRemapped;\r\n    } else {\r\n      this.renderedFrame = num / this.data.sr;\r\n    }\r\n\r\n    var i;\r\n    var len = this.elements.length;\r\n\r\n    if (!this.completeLayers) {\r\n      this.checkLayers(this.renderedFrame);\r\n    } // This iteration needs to be backwards because of how expressions connect between each other\r\n\r\n\r\n    for (i = len - 1; i >= 0; i -= 1) {\r\n      if (this.completeLayers || this.elements[i]) {\r\n        this.elements[i].prepareFrame(this.renderedFrame - this.layers[i].st);\r\n\r\n        if (this.elements[i]._mdf) {\r\n          this._mdf = true;\r\n        }\r\n      }\r\n    }\r\n  };\r\n\r\n  ICompElement.prototype.renderInnerContent = function () {\r\n    var i;\r\n    var len = this.layers.length;\r\n\r\n    for (i = 0; i < len; i += 1) {\r\n      if (this.completeLayers || this.elements[i]) {\r\n        this.elements[i].renderFrame();\r\n      }\r\n    }\r\n  };\r\n\r\n  ICompElement.prototype.setElements = function (elems) {\r\n    this.elements = elems;\r\n  };\r\n\r\n  ICompElement.prototype.getElements = function () {\r\n    return this.elements;\r\n  };\r\n\r\n  ICompElement.prototype.destroyElements = function () {\r\n    var i;\r\n    var len = this.layers.length;\r\n\r\n    for (i = 0; i < len; i += 1) {\r\n      if (this.elements[i]) {\r\n        this.elements[i].destroy();\r\n      }\r\n    }\r\n  };\r\n\r\n  ICompElement.prototype.destroy = function () {\r\n    this.destroyElements();\r\n    this.destroyBaseElement();\r\n  };\r\n\r\n  function SVGCompElement(data, globalData, comp) {\r\n    this.layers = data.layers;\r\n    this.supports3d = true;\r\n    this.completeLayers = false;\r\n    this.pendingElements = [];\r\n    this.elements = this.layers ? createSizedArray(this.layers.length) : [];\r\n    this.initElement(data, globalData, comp);\r\n    this.tm = data.tm ? PropertyFactory.getProp(this, data.tm, 0, globalData.frameRate, this) : {\r\n      _placeholder: true\r\n    };\r\n  }\r\n\r\n  extendPrototype([SVGRendererBase, ICompElement, SVGBaseElement], SVGCompElement);\r\n\r\n  SVGCompElement.prototype.createComp = function (data) {\r\n    return new SVGCompElement(data, this.globalData, this);\r\n  };\r\n\r\n  function SVGRenderer(animationItem, config) {\r\n    this.animationItem = animationItem;\r\n    this.layers = null;\r\n    this.renderedFrame = -1;\r\n    this.svgElement = createNS('svg');\r\n    var ariaLabel = '';\r\n\r\n    if (config && config.title) {\r\n      var titleElement = createNS('title');\r\n      var titleId = createElementID();\r\n      titleElement.setAttribute('id', titleId);\r\n      titleElement.textContent = config.title;\r\n      this.svgElement.appendChild(titleElement);\r\n      ariaLabel += titleId;\r\n    }\r\n\r\n    if (config && config.description) {\r\n      var descElement = createNS('desc');\r\n      var descId = createElementID();\r\n      descElement.setAttribute('id', descId);\r\n      descElement.textContent = config.description;\r\n      this.svgElement.appendChild(descElement);\r\n      ariaLabel += ' ' + descId;\r\n    }\r\n\r\n    if (ariaLabel) {\r\n      this.svgElement.setAttribute('aria-labelledby', ariaLabel);\r\n    }\r\n\r\n    var defs = createNS('defs');\r\n    this.svgElement.appendChild(defs);\r\n    var maskElement = createNS('g');\r\n    this.svgElement.appendChild(maskElement);\r\n    this.layerElement = maskElement;\r\n    this.renderConfig = {\r\n      preserveAspectRatio: config && config.preserveAspectRatio || 'xMidYMid meet',\r\n      imagePreserveAspectRatio: config && config.imagePreserveAspectRatio || 'xMidYMid slice',\r\n      contentVisibility: config && config.contentVisibility || 'visible',\r\n      progressiveLoad: config && config.progressiveLoad || false,\r\n      hideOnTransparent: !(config && config.hideOnTransparent === false),\r\n      viewBoxOnly: config && config.viewBoxOnly || false,\r\n      viewBoxSize: config && config.viewBoxSize || false,\r\n      className: config && config.className || '',\r\n      id: config && config.id || '',\r\n      focusable: config && config.focusable,\r\n      filterSize: {\r\n        width: config && config.filterSize && config.filterSize.width || '100%',\r\n        height: config && config.filterSize && config.filterSize.height || '100%',\r\n        x: config && config.filterSize && config.filterSize.x || '0%',\r\n        y: config && config.filterSize && config.filterSize.y || '0%'\r\n      },\r\n      width: config && config.width,\r\n      height: config && config.height,\r\n      runExpressions: !config || config.runExpressions === undefined || config.runExpressions\r\n    };\r\n    this.globalData = {\r\n      _mdf: false,\r\n      frameNum: -1,\r\n      defs: defs,\r\n      renderConfig: this.renderConfig\r\n    };\r\n    this.elements = [];\r\n    this.pendingElements = [];\r\n    this.destroyed = false;\r\n    this.rendererType = 'svg';\r\n  }\r\n\r\n  extendPrototype([SVGRendererBase], SVGRenderer);\r\n\r\n  SVGRenderer.prototype.createComp = function (data) {\r\n    return new SVGCompElement(data, this.globalData, this);\r\n  };\r\n\r\n  function CVContextData() {\r\n    this.saved = [];\r\n    this.cArrPos = 0;\r\n    this.cTr = new Matrix();\r\n    this.cO = 1;\r\n    var i;\r\n    var len = 15;\r\n    this.savedOp = createTypedArray('float32', len);\r\n\r\n    for (i = 0; i < len; i += 1) {\r\n      this.saved[i] = createTypedArray('float32', 16);\r\n    }\r\n\r\n    this._length = len;\r\n  }\r\n\r\n  CVContextData.prototype.duplicate = function () {\r\n    var newLength = this._length * 2;\r\n    var currentSavedOp = this.savedOp;\r\n    this.savedOp = createTypedArray('float32', newLength);\r\n    this.savedOp.set(currentSavedOp);\r\n    var i = 0;\r\n\r\n    for (i = this._length; i < newLength; i += 1) {\r\n      this.saved[i] = createTypedArray('float32', 16);\r\n    }\r\n\r\n    this._length = newLength;\r\n  };\r\n\r\n  CVContextData.prototype.reset = function () {\r\n    this.cArrPos = 0;\r\n    this.cTr.reset();\r\n    this.cO = 1;\r\n  };\r\n\r\n  function ShapeTransformManager() {\r\n    this.sequences = {};\r\n    this.sequenceList = [];\r\n    this.transform_key_count = 0;\r\n  }\r\n\r\n  ShapeTransformManager.prototype = {\r\n    addTransformSequence: function addTransformSequence(transforms) {\r\n      var i;\r\n      var len = transforms.length;\r\n      var key = '_';\r\n\r\n      for (i = 0; i < len; i += 1) {\r\n        key += transforms[i].transform.key + '_';\r\n      }\r\n\r\n      var sequence = this.sequences[key];\r\n\r\n      if (!sequence) {\r\n        sequence = {\r\n          transforms: [].concat(transforms),\r\n          finalTransform: new Matrix(),\r\n          _mdf: false\r\n        };\r\n        this.sequences[key] = sequence;\r\n        this.sequenceList.push(sequence);\r\n      }\r\n\r\n      return sequence;\r\n    },\r\n    processSequence: function processSequence(sequence, isFirstFrame) {\r\n      var i = 0;\r\n      var len = sequence.transforms.length;\r\n      var _mdf = isFirstFrame;\r\n\r\n      while (i < len && !isFirstFrame) {\r\n        if (sequence.transforms[i].transform.mProps._mdf) {\r\n          _mdf = true;\r\n          break;\r\n        }\r\n\r\n        i += 1;\r\n      }\r\n\r\n      if (_mdf) {\r\n        var props;\r\n        sequence.finalTransform.reset();\r\n\r\n        for (i = len - 1; i >= 0; i -= 1) {\r\n          props = sequence.transforms[i].transform.mProps.v.props;\r\n          sequence.finalTransform.transform(props[0], props[1], props[2], props[3], props[4], props[5], props[6], props[7], props[8], props[9], props[10], props[11], props[12], props[13], props[14], props[15]);\r\n        }\r\n      }\r\n\r\n      sequence._mdf = _mdf;\r\n    },\r\n    processSequences: function processSequences(isFirstFrame) {\r\n      var i;\r\n      var len = this.sequenceList.length;\r\n\r\n      for (i = 0; i < len; i += 1) {\r\n        this.processSequence(this.sequenceList[i], isFirstFrame);\r\n      }\r\n    },\r\n    getNewKey: function getNewKey() {\r\n      this.transform_key_count += 1;\r\n      return '_' + this.transform_key_count;\r\n    }\r\n  };\r\n\r\n  function CVEffects() {}\r\n\r\n  CVEffects.prototype.renderFrame = function () {};\r\n\r\n  function CVMaskElement(data, element) {\r\n    this.data = data;\r\n    this.element = element;\r\n    this.masksProperties = this.data.masksProperties || [];\r\n    this.viewData = createSizedArray(this.masksProperties.length);\r\n    var i;\r\n    var len = this.masksProperties.length;\r\n    var hasMasks = false;\r\n\r\n    for (i = 0; i < len; i += 1) {\r\n      if (this.masksProperties[i].mode !== 'n') {\r\n        hasMasks = true;\r\n      }\r\n\r\n      this.viewData[i] = ShapePropertyFactory.getShapeProp(this.element, this.masksProperties[i], 3);\r\n    }\r\n\r\n    this.hasMasks = hasMasks;\r\n\r\n    if (hasMasks) {\r\n      this.element.addRenderableComponent(this);\r\n    }\r\n  }\r\n\r\n  CVMaskElement.prototype.renderFrame = function () {\r\n    if (!this.hasMasks) {\r\n      return;\r\n    }\r\n\r\n    var transform = this.element.finalTransform.mat;\r\n    var ctx = this.element.canvasContext;\r\n    var i;\r\n    var len = this.masksProperties.length;\r\n    var pt;\r\n    var pts;\r\n    var data;\r\n    ctx.beginPath();\r\n\r\n    for (i = 0; i < len; i += 1) {\r\n      if (this.masksProperties[i].mode !== 'n') {\r\n        if (this.masksProperties[i].inv) {\r\n          ctx.moveTo(0, 0);\r\n          ctx.lineTo(this.element.globalData.compSize.w, 0);\r\n          ctx.lineTo(this.element.globalData.compSize.w, this.element.globalData.compSize.h);\r\n          ctx.lineTo(0, this.element.globalData.compSize.h);\r\n          ctx.lineTo(0, 0);\r\n        }\r\n\r\n        data = this.viewData[i].v;\r\n        pt = transform.applyToPointArray(data.v[0][0], data.v[0][1], 0);\r\n        ctx.moveTo(pt[0], pt[1]);\r\n        var j;\r\n        var jLen = data._length;\r\n\r\n        for (j = 1; j < jLen; j += 1) {\r\n          pts = transform.applyToTriplePoints(data.o[j - 1], data.i[j], data.v[j]);\r\n          ctx.bezierCurveTo(pts[0], pts[1], pts[2], pts[3], pts[4], pts[5]);\r\n        }\r\n\r\n        pts = transform.applyToTriplePoints(data.o[j - 1], data.i[0], data.v[0]);\r\n        ctx.bezierCurveTo(pts[0], pts[1], pts[2], pts[3], pts[4], pts[5]);\r\n      }\r\n    }\r\n\r\n    this.element.globalData.renderer.save(true);\r\n    ctx.clip();\r\n  };\r\n\r\n  CVMaskElement.prototype.getMaskProperty = MaskElement.prototype.getMaskProperty;\r\n\r\n  CVMaskElement.prototype.destroy = function () {\r\n    this.element = null;\r\n  };\r\n\r\n  function CVBaseElement() {}\r\n\r\n  CVBaseElement.prototype = {\r\n    createElements: function createElements() {},\r\n    initRendererElement: function initRendererElement() {},\r\n    createContainerElements: function createContainerElements() {\r\n      this.canvasContext = this.globalData.canvasContext;\r\n      this.renderableEffectsManager = new CVEffects(this);\r\n    },\r\n    createContent: function createContent() {},\r\n    setBlendMode: function setBlendMode() {\r\n      var globalData = this.globalData;\r\n\r\n      if (globalData.blendMode !== this.data.bm) {\r\n        globalData.blendMode = this.data.bm;\r\n        var blendModeValue = getBlendMode(this.data.bm);\r\n        globalData.canvasContext.globalCompositeOperation = blendModeValue;\r\n      }\r\n    },\r\n    createRenderableComponents: function createRenderableComponents() {\r\n      this.maskManager = new CVMaskElement(this.data, this);\r\n    },\r\n    hideElement: function hideElement() {\r\n      if (!this.hidden && (!this.isInRange || this.isTransparent)) {\r\n        this.hidden = true;\r\n      }\r\n    },\r\n    showElement: function showElement() {\r\n      if (this.isInRange && !this.isTransparent) {\r\n        this.hidden = false;\r\n        this._isFirstFrame = true;\r\n        this.maskManager._isFirstFrame = true;\r\n      }\r\n    },\r\n    renderFrame: function renderFrame() {\r\n      if (this.hidden || this.data.hd) {\r\n        return;\r\n      }\r\n\r\n      this.renderTransform();\r\n      this.renderRenderable();\r\n      this.setBlendMode();\r\n      var forceRealStack = this.data.ty === 0;\r\n      this.globalData.renderer.save(forceRealStack);\r\n      this.globalData.renderer.ctxTransform(this.finalTransform.mat.props);\r\n      this.globalData.renderer.ctxOpacity(this.finalTransform.mProp.o.v);\r\n      this.renderInnerContent();\r\n      this.globalData.renderer.restore(forceRealStack);\r\n\r\n      if (this.maskManager.hasMasks) {\r\n        this.globalData.renderer.restore(true);\r\n      }\r\n\r\n      if (this._isFirstFrame) {\r\n        this._isFirstFrame = false;\r\n      }\r\n    },\r\n    destroy: function destroy() {\r\n      this.canvasContext = null;\r\n      this.data = null;\r\n      this.globalData = null;\r\n      this.maskManager.destroy();\r\n    },\r\n    mHelper: new Matrix()\r\n  };\r\n  CVBaseElement.prototype.hide = CVBaseElement.prototype.hideElement;\r\n  CVBaseElement.prototype.show = CVBaseElement.prototype.showElement;\r\n\r\n  function CVShapeData(element, data, styles, transformsManager) {\r\n    this.styledShapes = [];\r\n    this.tr = [0, 0, 0, 0, 0, 0];\r\n    var ty = 4;\r\n\r\n    if (data.ty === 'rc') {\r\n      ty = 5;\r\n    } else if (data.ty === 'el') {\r\n      ty = 6;\r\n    } else if (data.ty === 'sr') {\r\n      ty = 7;\r\n    }\r\n\r\n    this.sh = ShapePropertyFactory.getShapeProp(element, data, ty, element);\r\n    var i;\r\n    var len = styles.length;\r\n    var styledShape;\r\n\r\n    for (i = 0; i < len; i += 1) {\r\n      if (!styles[i].closed) {\r\n        styledShape = {\r\n          transforms: transformsManager.addTransformSequence(styles[i].transforms),\r\n          trNodes: []\r\n        };\r\n        this.styledShapes.push(styledShape);\r\n        styles[i].elements.push(styledShape);\r\n      }\r\n    }\r\n  }\r\n\r\n  CVShapeData.prototype.setAsAnimated = SVGShapeData.prototype.setAsAnimated;\r\n\r\n  function CVShapeElement(data, globalData, comp) {\r\n    this.shapes = [];\r\n    this.shapesData = data.shapes;\r\n    this.stylesList = [];\r\n    this.itemsData = [];\r\n    this.prevViewData = [];\r\n    this.shapeModifiers = [];\r\n    this.processedElements = [];\r\n    this.transformsManager = new ShapeTransformManager();\r\n    this.initElement(data, globalData, comp);\r\n  }\r\n\r\n  extendPrototype([BaseElement, TransformElement, CVBaseElement, IShapeElement, HierarchyElement, FrameElement, RenderableElement], CVShapeElement);\r\n  CVShapeElement.prototype.initElement = RenderableDOMElement.prototype.initElement;\r\n  CVShapeElement.prototype.transformHelper = {\r\n    opacity: 1,\r\n    _opMdf: false\r\n  };\r\n  CVShapeElement.prototype.dashResetter = [];\r\n\r\n  CVShapeElement.prototype.createContent = function () {\r\n    this.searchShapes(this.shapesData, this.itemsData, this.prevViewData, true, []);\r\n  };\r\n\r\n  CVShapeElement.prototype.createStyleElement = function (data, transforms) {\r\n    var styleElem = {\r\n      data: data,\r\n      type: data.ty,\r\n      preTransforms: this.transformsManager.addTransformSequence(transforms),\r\n      transforms: [],\r\n      elements: [],\r\n      closed: data.hd === true\r\n    };\r\n    var elementData = {};\r\n\r\n    if (data.ty === 'fl' || data.ty === 'st') {\r\n      elementData.c = PropertyFactory.getProp(this, data.c, 1, 255, this);\r\n\r\n      if (!elementData.c.k) {\r\n        styleElem.co = 'rgb(' + bmFloor(elementData.c.v[0]) + ',' + bmFloor(elementData.c.v[1]) + ',' + bmFloor(elementData.c.v[2]) + ')';\r\n      }\r\n    } else if (data.ty === 'gf' || data.ty === 'gs') {\r\n      elementData.s = PropertyFactory.getProp(this, data.s, 1, null, this);\r\n      elementData.e = PropertyFactory.getProp(this, data.e, 1, null, this);\r\n      elementData.h = PropertyFactory.getProp(this, data.h || {\r\n        k: 0\r\n      }, 0, 0.01, this);\r\n      elementData.a = PropertyFactory.getProp(this, data.a || {\r\n        k: 0\r\n      }, 0, degToRads, this);\r\n      elementData.g = new GradientProperty(this, data.g, this);\r\n    }\r\n\r\n    elementData.o = PropertyFactory.getProp(this, data.o, 0, 0.01, this);\r\n\r\n    if (data.ty === 'st' || data.ty === 'gs') {\r\n      styleElem.lc = lineCapEnum[data.lc || 2];\r\n      styleElem.lj = lineJoinEnum[data.lj || 2];\r\n\r\n      if (data.lj == 1) {\r\n        // eslint-disable-line eqeqeq\r\n        styleElem.ml = data.ml;\r\n      }\r\n\r\n      elementData.w = PropertyFactory.getProp(this, data.w, 0, null, this);\r\n\r\n      if (!elementData.w.k) {\r\n        styleElem.wi = elementData.w.v;\r\n      }\r\n\r\n      if (data.d) {\r\n        var d = new DashProperty(this, data.d, 'canvas', this);\r\n        elementData.d = d;\r\n\r\n        if (!elementData.d.k) {\r\n          styleElem.da = elementData.d.dashArray;\r\n          styleElem[\"do\"] = elementData.d.dashoffset[0];\r\n        }\r\n      }\r\n    } else {\r\n      styleElem.r = data.r === 2 ? 'evenodd' : 'nonzero';\r\n    }\r\n\r\n    this.stylesList.push(styleElem);\r\n    elementData.style = styleElem;\r\n    return elementData;\r\n  };\r\n\r\n  CVShapeElement.prototype.createGroupElement = function () {\r\n    var elementData = {\r\n      it: [],\r\n      prevViewData: []\r\n    };\r\n    return elementData;\r\n  };\r\n\r\n  CVShapeElement.prototype.createTransformElement = function (data) {\r\n    var elementData = {\r\n      transform: {\r\n        opacity: 1,\r\n        _opMdf: false,\r\n        key: this.transformsManager.getNewKey(),\r\n        op: PropertyFactory.getProp(this, data.o, 0, 0.01, this),\r\n        mProps: TransformPropertyFactory.getTransformProperty(this, data, this)\r\n      }\r\n    };\r\n    return elementData;\r\n  };\r\n\r\n  CVShapeElement.prototype.createShapeElement = function (data) {\r\n    var elementData = new CVShapeData(this, data, this.stylesList, this.transformsManager);\r\n    this.shapes.push(elementData);\r\n    this.addShapeToModifiers(elementData);\r\n    return elementData;\r\n  };\r\n\r\n  CVShapeElement.prototype.reloadShapes = function () {\r\n    this._isFirstFrame = true;\r\n    var i;\r\n    var len = this.itemsData.length;\r\n\r\n    for (i = 0; i < len; i += 1) {\r\n      this.prevViewData[i] = this.itemsData[i];\r\n    }\r\n\r\n    this.searchShapes(this.shapesData, this.itemsData, this.prevViewData, true, []);\r\n    len = this.dynamicProperties.length;\r\n\r\n    for (i = 0; i < len; i += 1) {\r\n      this.dynamicProperties[i].getValue();\r\n    }\r\n\r\n    this.renderModifiers();\r\n    this.transformsManager.processSequences(this._isFirstFrame);\r\n  };\r\n\r\n  CVShapeElement.prototype.addTransformToStyleList = function (transform) {\r\n    var i;\r\n    var len = this.stylesList.length;\r\n\r\n    for (i = 0; i < len; i += 1) {\r\n      if (!this.stylesList[i].closed) {\r\n        this.stylesList[i].transforms.push(transform);\r\n      }\r\n    }\r\n  };\r\n\r\n  CVShapeElement.prototype.removeTransformFromStyleList = function () {\r\n    var i;\r\n    var len = this.stylesList.length;\r\n\r\n    for (i = 0; i < len; i += 1) {\r\n      if (!this.stylesList[i].closed) {\r\n        this.stylesList[i].transforms.pop();\r\n      }\r\n    }\r\n  };\r\n\r\n  CVShapeElement.prototype.closeStyles = function (styles) {\r\n    var i;\r\n    var len = styles.length;\r\n\r\n    for (i = 0; i < len; i += 1) {\r\n      styles[i].closed = true;\r\n    }\r\n  };\r\n\r\n  CVShapeElement.prototype.searchShapes = function (arr, itemsData, prevViewData, shouldRender, transforms) {\r\n    var i;\r\n    var len = arr.length - 1;\r\n    var j;\r\n    var jLen;\r\n    var ownStyles = [];\r\n    var ownModifiers = [];\r\n    var processedPos;\r\n    var modifier;\r\n    var currentTransform;\r\n    var ownTransforms = [].concat(transforms);\r\n\r\n    for (i = len; i >= 0; i -= 1) {\r\n      processedPos = this.searchProcessedElement(arr[i]);\r\n\r\n      if (!processedPos) {\r\n        arr[i]._shouldRender = shouldRender;\r\n      } else {\r\n        itemsData[i] = prevViewData[processedPos - 1];\r\n      }\r\n\r\n      if (arr[i].ty === 'fl' || arr[i].ty === 'st' || arr[i].ty === 'gf' || arr[i].ty === 'gs') {\r\n        if (!processedPos) {\r\n          itemsData[i] = this.createStyleElement(arr[i], ownTransforms);\r\n        } else {\r\n          itemsData[i].style.closed = false;\r\n        }\r\n\r\n        ownStyles.push(itemsData[i].style);\r\n      } else if (arr[i].ty === 'gr') {\r\n        if (!processedPos) {\r\n          itemsData[i] = this.createGroupElement(arr[i]);\r\n        } else {\r\n          jLen = itemsData[i].it.length;\r\n\r\n          for (j = 0; j < jLen; j += 1) {\r\n            itemsData[i].prevViewData[j] = itemsData[i].it[j];\r\n          }\r\n        }\r\n\r\n        this.searchShapes(arr[i].it, itemsData[i].it, itemsData[i].prevViewData, shouldRender, ownTransforms);\r\n      } else if (arr[i].ty === 'tr') {\r\n        if (!processedPos) {\r\n          currentTransform = this.createTransformElement(arr[i]);\r\n          itemsData[i] = currentTransform;\r\n        }\r\n\r\n        ownTransforms.push(itemsData[i]);\r\n        this.addTransformToStyleList(itemsData[i]);\r\n      } else if (arr[i].ty === 'sh' || arr[i].ty === 'rc' || arr[i].ty === 'el' || arr[i].ty === 'sr') {\r\n        if (!processedPos) {\r\n          itemsData[i] = this.createShapeElement(arr[i]);\r\n        }\r\n      } else if (arr[i].ty === 'tm' || arr[i].ty === 'rd' || arr[i].ty === 'pb' || arr[i].ty === 'zz' || arr[i].ty === 'op') {\r\n        if (!processedPos) {\r\n          modifier = ShapeModifiers.getModifier(arr[i].ty);\r\n          modifier.init(this, arr[i]);\r\n          itemsData[i] = modifier;\r\n          this.shapeModifiers.push(modifier);\r\n        } else {\r\n          modifier = itemsData[i];\r\n          modifier.closed = false;\r\n        }\r\n\r\n        ownModifiers.push(modifier);\r\n      } else if (arr[i].ty === 'rp') {\r\n        if (!processedPos) {\r\n          modifier = ShapeModifiers.getModifier(arr[i].ty);\r\n          itemsData[i] = modifier;\r\n          modifier.init(this, arr, i, itemsData);\r\n          this.shapeModifiers.push(modifier);\r\n          shouldRender = false;\r\n        } else {\r\n          modifier = itemsData[i];\r\n          modifier.closed = true;\r\n        }\r\n\r\n        ownModifiers.push(modifier);\r\n      }\r\n\r\n      this.addProcessedElement(arr[i], i + 1);\r\n    }\r\n\r\n    this.removeTransformFromStyleList();\r\n    this.closeStyles(ownStyles);\r\n    len = ownModifiers.length;\r\n\r\n    for (i = 0; i < len; i += 1) {\r\n      ownModifiers[i].closed = true;\r\n    }\r\n  };\r\n\r\n  CVShapeElement.prototype.renderInnerContent = function () {\r\n    this.transformHelper.opacity = 1;\r\n    this.transformHelper._opMdf = false;\r\n    this.renderModifiers();\r\n    this.transformsManager.processSequences(this._isFirstFrame);\r\n    this.renderShape(this.transformHelper, this.shapesData, this.itemsData, true);\r\n  };\r\n\r\n  CVShapeElement.prototype.renderShapeTransform = function (parentTransform, groupTransform) {\r\n    if (parentTransform._opMdf || groupTransform.op._mdf || this._isFirstFrame) {\r\n      groupTransform.opacity = parentTransform.opacity;\r\n      groupTransform.opacity *= groupTransform.op.v;\r\n      groupTransform._opMdf = true;\r\n    }\r\n  };\r\n\r\n  CVShapeElement.prototype.drawLayer = function () {\r\n    var i;\r\n    var len = this.stylesList.length;\r\n    var j;\r\n    var jLen;\r\n    var k;\r\n    var kLen;\r\n    var elems;\r\n    var nodes;\r\n    var renderer = this.globalData.renderer;\r\n    var ctx = this.globalData.canvasContext;\r\n    var type;\r\n    var currentStyle;\r\n\r\n    for (i = 0; i < len; i += 1) {\r\n      currentStyle = this.stylesList[i];\r\n      type = currentStyle.type; // Skipping style when\r\n      // Stroke width equals 0\r\n      // style should not be rendered (extra unused repeaters)\r\n      // current opacity equals 0\r\n      // global opacity equals 0\r\n\r\n      if (!((type === 'st' || type === 'gs') && currentStyle.wi === 0 || !currentStyle.data._shouldRender || currentStyle.coOp === 0 || this.globalData.currentGlobalAlpha === 0)) {\r\n        renderer.save();\r\n        elems = currentStyle.elements;\r\n\r\n        if (type === 'st' || type === 'gs') {\r\n          ctx.strokeStyle = type === 'st' ? currentStyle.co : currentStyle.grd;\r\n          ctx.lineWidth = currentStyle.wi;\r\n          ctx.lineCap = currentStyle.lc;\r\n          ctx.lineJoin = currentStyle.lj;\r\n          ctx.miterLimit = currentStyle.ml || 0;\r\n        } else {\r\n          ctx.fillStyle = type === 'fl' ? currentStyle.co : currentStyle.grd;\r\n        }\r\n\r\n        renderer.ctxOpacity(currentStyle.coOp);\r\n\r\n        if (type !== 'st' && type !== 'gs') {\r\n          ctx.beginPath();\r\n        }\r\n\r\n        renderer.ctxTransform(currentStyle.preTransforms.finalTransform.props);\r\n        jLen = elems.length;\r\n\r\n        for (j = 0; j < jLen; j += 1) {\r\n          if (type === 'st' || type === 'gs') {\r\n            ctx.beginPath();\r\n\r\n            if (currentStyle.da) {\r\n              ctx.setLineDash(currentStyle.da);\r\n              ctx.lineDashOffset = currentStyle[\"do\"];\r\n            }\r\n          }\r\n\r\n          nodes = elems[j].trNodes;\r\n          kLen = nodes.length;\r\n\r\n          for (k = 0; k < kLen; k += 1) {\r\n            if (nodes[k].t === 'm') {\r\n              ctx.moveTo(nodes[k].p[0], nodes[k].p[1]);\r\n            } else if (nodes[k].t === 'c') {\r\n              ctx.bezierCurveTo(nodes[k].pts[0], nodes[k].pts[1], nodes[k].pts[2], nodes[k].pts[3], nodes[k].pts[4], nodes[k].pts[5]);\r\n            } else {\r\n              ctx.closePath();\r\n            }\r\n          }\r\n\r\n          if (type === 'st' || type === 'gs') {\r\n            ctx.stroke();\r\n\r\n            if (currentStyle.da) {\r\n              ctx.setLineDash(this.dashResetter);\r\n            }\r\n          }\r\n        }\r\n\r\n        if (type !== 'st' && type !== 'gs') {\r\n          ctx.fill(currentStyle.r);\r\n        }\r\n\r\n        renderer.restore();\r\n      }\r\n    }\r\n  };\r\n\r\n  CVShapeElement.prototype.renderShape = function (parentTransform, items, data, isMain) {\r\n    var i;\r\n    var len = items.length - 1;\r\n    var groupTransform;\r\n    groupTransform = parentTransform;\r\n\r\n    for (i = len; i >= 0; i -= 1) {\r\n      if (items[i].ty === 'tr') {\r\n        groupTransform = data[i].transform;\r\n        this.renderShapeTransform(parentTransform, groupTransform);\r\n      } else if (items[i].ty === 'sh' || items[i].ty === 'el' || items[i].ty === 'rc' || items[i].ty === 'sr') {\r\n        this.renderPath(items[i], data[i]);\r\n      } else if (items[i].ty === 'fl') {\r\n        this.renderFill(items[i], data[i], groupTransform);\r\n      } else if (items[i].ty === 'st') {\r\n        this.renderStroke(items[i], data[i], groupTransform);\r\n      } else if (items[i].ty === 'gf' || items[i].ty === 'gs') {\r\n        this.renderGradientFill(items[i], data[i], groupTransform);\r\n      } else if (items[i].ty === 'gr') {\r\n        this.renderShape(groupTransform, items[i].it, data[i].it);\r\n      } else if (items[i].ty === 'tm') {//\r\n      }\r\n    }\r\n\r\n    if (isMain) {\r\n      this.drawLayer();\r\n    }\r\n  };\r\n\r\n  CVShapeElement.prototype.renderStyledShape = function (styledShape, shape) {\r\n    if (this._isFirstFrame || shape._mdf || styledShape.transforms._mdf) {\r\n      var shapeNodes = styledShape.trNodes;\r\n      var paths = shape.paths;\r\n      var i;\r\n      var len;\r\n      var j;\r\n      var jLen = paths._length;\r\n      shapeNodes.length = 0;\r\n      var groupTransformMat = styledShape.transforms.finalTransform;\r\n\r\n      for (j = 0; j < jLen; j += 1) {\r\n        var pathNodes = paths.shapes[j];\r\n\r\n        if (pathNodes && pathNodes.v) {\r\n          len = pathNodes._length;\r\n\r\n          for (i = 1; i < len; i += 1) {\r\n            if (i === 1) {\r\n              shapeNodes.push({\r\n                t: 'm',\r\n                p: groupTransformMat.applyToPointArray(pathNodes.v[0][0], pathNodes.v[0][1], 0)\r\n              });\r\n            }\r\n\r\n            shapeNodes.push({\r\n              t: 'c',\r\n              pts: groupTransformMat.applyToTriplePoints(pathNodes.o[i - 1], pathNodes.i[i], pathNodes.v[i])\r\n            });\r\n          }\r\n\r\n          if (len === 1) {\r\n            shapeNodes.push({\r\n              t: 'm',\r\n              p: groupTransformMat.applyToPointArray(pathNodes.v[0][0], pathNodes.v[0][1], 0)\r\n            });\r\n          }\r\n\r\n          if (pathNodes.c && len) {\r\n            shapeNodes.push({\r\n              t: 'c',\r\n              pts: groupTransformMat.applyToTriplePoints(pathNodes.o[i - 1], pathNodes.i[0], pathNodes.v[0])\r\n            });\r\n            shapeNodes.push({\r\n              t: 'z'\r\n            });\r\n          }\r\n        }\r\n      }\r\n\r\n      styledShape.trNodes = shapeNodes;\r\n    }\r\n  };\r\n\r\n  CVShapeElement.prototype.renderPath = function (pathData, itemData) {\r\n    if (pathData.hd !== true && pathData._shouldRender) {\r\n      var i;\r\n      var len = itemData.styledShapes.length;\r\n\r\n      for (i = 0; i < len; i += 1) {\r\n        this.renderStyledShape(itemData.styledShapes[i], itemData.sh);\r\n      }\r\n    }\r\n  };\r\n\r\n  CVShapeElement.prototype.renderFill = function (styleData, itemData, groupTransform) {\r\n    var styleElem = itemData.style;\r\n\r\n    if (itemData.c._mdf || this._isFirstFrame) {\r\n      styleElem.co = 'rgb(' + bmFloor(itemData.c.v[0]) + ',' + bmFloor(itemData.c.v[1]) + ',' + bmFloor(itemData.c.v[2]) + ')';\r\n    }\r\n\r\n    if (itemData.o._mdf || groupTransform._opMdf || this._isFirstFrame) {\r\n      styleElem.coOp = itemData.o.v * groupTransform.opacity;\r\n    }\r\n  };\r\n\r\n  CVShapeElement.prototype.renderGradientFill = function (styleData, itemData, groupTransform) {\r\n    var styleElem = itemData.style;\r\n    var grd;\r\n\r\n    if (!styleElem.grd || itemData.g._mdf || itemData.s._mdf || itemData.e._mdf || styleData.t !== 1 && (itemData.h._mdf || itemData.a._mdf)) {\r\n      var ctx = this.globalData.canvasContext;\r\n      var pt1 = itemData.s.v;\r\n      var pt2 = itemData.e.v;\r\n\r\n      if (styleData.t === 1) {\r\n        grd = ctx.createLinearGradient(pt1[0], pt1[1], pt2[0], pt2[1]);\r\n      } else {\r\n        var rad = Math.sqrt(Math.pow(pt1[0] - pt2[0], 2) + Math.pow(pt1[1] - pt2[1], 2));\r\n        var ang = Math.atan2(pt2[1] - pt1[1], pt2[0] - pt1[0]);\r\n        var percent = itemData.h.v;\r\n\r\n        if (percent >= 1) {\r\n          percent = 0.99;\r\n        } else if (percent <= -1) {\r\n          percent = -0.99;\r\n        }\r\n\r\n        var dist = rad * percent;\r\n        var x = Math.cos(ang + itemData.a.v) * dist + pt1[0];\r\n        var y = Math.sin(ang + itemData.a.v) * dist + pt1[1];\r\n        grd = ctx.createRadialGradient(x, y, 0, pt1[0], pt1[1], rad);\r\n      }\r\n\r\n      var i;\r\n      var len = styleData.g.p;\r\n      var cValues = itemData.g.c;\r\n      var opacity = 1;\r\n\r\n      for (i = 0; i < len; i += 1) {\r\n        if (itemData.g._hasOpacity && itemData.g._collapsable) {\r\n          opacity = itemData.g.o[i * 2 + 1];\r\n        }\r\n\r\n        grd.addColorStop(cValues[i * 4] / 100, 'rgba(' + cValues[i * 4 + 1] + ',' + cValues[i * 4 + 2] + ',' + cValues[i * 4 + 3] + ',' + opacity + ')');\r\n      }\r\n\r\n      styleElem.grd = grd;\r\n    }\r\n\r\n    styleElem.coOp = itemData.o.v * groupTransform.opacity;\r\n  };\r\n\r\n  CVShapeElement.prototype.renderStroke = function (styleData, itemData, groupTransform) {\r\n    var styleElem = itemData.style;\r\n    var d = itemData.d;\r\n\r\n    if (d && (d._mdf || this._isFirstFrame)) {\r\n      styleElem.da = d.dashArray;\r\n      styleElem[\"do\"] = d.dashoffset[0];\r\n    }\r\n\r\n    if (itemData.c._mdf || this._isFirstFrame) {\r\n      styleElem.co = 'rgb(' + bmFloor(itemData.c.v[0]) + ',' + bmFloor(itemData.c.v[1]) + ',' + bmFloor(itemData.c.v[2]) + ')';\r\n    }\r\n\r\n    if (itemData.o._mdf || groupTransform._opMdf || this._isFirstFrame) {\r\n      styleElem.coOp = itemData.o.v * groupTransform.opacity;\r\n    }\r\n\r\n    if (itemData.w._mdf || this._isFirstFrame) {\r\n      styleElem.wi = itemData.w.v;\r\n    }\r\n  };\r\n\r\n  CVShapeElement.prototype.destroy = function () {\r\n    this.shapesData = null;\r\n    this.globalData = null;\r\n    this.canvasContext = null;\r\n    this.stylesList.length = 0;\r\n    this.itemsData.length = 0;\r\n  };\r\n\r\n  function CVTextElement(data, globalData, comp) {\r\n    this.textSpans = [];\r\n    this.yOffset = 0;\r\n    this.fillColorAnim = false;\r\n    this.strokeColorAnim = false;\r\n    this.strokeWidthAnim = false;\r\n    this.stroke = false;\r\n    this.fill = false;\r\n    this.justifyOffset = 0;\r\n    this.currentRender = null;\r\n    this.renderType = 'canvas';\r\n    this.values = {\r\n      fill: 'rgba(0,0,0,0)',\r\n      stroke: 'rgba(0,0,0,0)',\r\n      sWidth: 0,\r\n      fValue: ''\r\n    };\r\n    this.initElement(data, globalData, comp);\r\n  }\r\n\r\n  extendPrototype([BaseElement, TransformElement, CVBaseElement, HierarchyElement, FrameElement, RenderableElement, ITextElement], CVTextElement);\r\n  CVTextElement.prototype.tHelper = createTag('canvas').getContext('2d');\r\n\r\n  CVTextElement.prototype.buildNewText = function () {\r\n    var documentData = this.textProperty.currentData;\r\n    this.renderedLetters = createSizedArray(documentData.l ? documentData.l.length : 0);\r\n    var hasFill = false;\r\n\r\n    if (documentData.fc) {\r\n      hasFill = true;\r\n      this.values.fill = this.buildColor(documentData.fc);\r\n    } else {\r\n      this.values.fill = 'rgba(0,0,0,0)';\r\n    }\r\n\r\n    this.fill = hasFill;\r\n    var hasStroke = false;\r\n\r\n    if (documentData.sc) {\r\n      hasStroke = true;\r\n      this.values.stroke = this.buildColor(documentData.sc);\r\n      this.values.sWidth = documentData.sw;\r\n    }\r\n\r\n    var fontData = this.globalData.fontManager.getFontByName(documentData.f);\r\n    var i;\r\n    var len;\r\n    var letters = documentData.l;\r\n    var matrixHelper = this.mHelper;\r\n    this.stroke = hasStroke;\r\n    this.values.fValue = documentData.finalSize + 'px ' + this.globalData.fontManager.getFontByName(documentData.f).fFamily;\r\n    len = documentData.finalText.length; // this.tHelper.font = this.values.fValue;\r\n\r\n    var charData;\r\n    var shapeData;\r\n    var k;\r\n    var kLen;\r\n    var shapes;\r\n    var j;\r\n    var jLen;\r\n    var pathNodes;\r\n    var commands;\r\n    var pathArr;\r\n    var singleShape = this.data.singleShape;\r\n    var trackingOffset = documentData.tr * 0.001 * documentData.finalSize;\r\n    var xPos = 0;\r\n    var yPos = 0;\r\n    var firstLine = true;\r\n    var cnt = 0;\r\n\r\n    for (i = 0; i < len; i += 1) {\r\n      charData = this.globalData.fontManager.getCharData(documentData.finalText[i], fontData.fStyle, this.globalData.fontManager.getFontByName(documentData.f).fFamily);\r\n      shapeData = charData && charData.data || {};\r\n      matrixHelper.reset();\r\n\r\n      if (singleShape && letters[i].n) {\r\n        xPos = -trackingOffset;\r\n        yPos += documentData.yOffset;\r\n        yPos += firstLine ? 1 : 0;\r\n        firstLine = false;\r\n      }\r\n\r\n      shapes = shapeData.shapes ? shapeData.shapes[0].it : [];\r\n      jLen = shapes.length;\r\n      matrixHelper.scale(documentData.finalSize / 100, documentData.finalSize / 100);\r\n\r\n      if (singleShape) {\r\n        this.applyTextPropertiesToMatrix(documentData, matrixHelper, letters[i].line, xPos, yPos);\r\n      }\r\n\r\n      commands = createSizedArray(jLen - 1);\r\n      var commandsCounter = 0;\r\n\r\n      for (j = 0; j < jLen; j += 1) {\r\n        if (shapes[j].ty === 'sh') {\r\n          kLen = shapes[j].ks.k.i.length;\r\n          pathNodes = shapes[j].ks.k;\r\n          pathArr = [];\r\n\r\n          for (k = 1; k < kLen; k += 1) {\r\n            if (k === 1) {\r\n              pathArr.push(matrixHelper.applyToX(pathNodes.v[0][0], pathNodes.v[0][1], 0), matrixHelper.applyToY(pathNodes.v[0][0], pathNodes.v[0][1], 0));\r\n            }\r\n\r\n            pathArr.push(matrixHelper.applyToX(pathNodes.o[k - 1][0], pathNodes.o[k - 1][1], 0), matrixHelper.applyToY(pathNodes.o[k - 1][0], pathNodes.o[k - 1][1], 0), matrixHelper.applyToX(pathNodes.i[k][0], pathNodes.i[k][1], 0), matrixHelper.applyToY(pathNodes.i[k][0], pathNodes.i[k][1], 0), matrixHelper.applyToX(pathNodes.v[k][0], pathNodes.v[k][1], 0), matrixHelper.applyToY(pathNodes.v[k][0], pathNodes.v[k][1], 0));\r\n          }\r\n\r\n          pathArr.push(matrixHelper.applyToX(pathNodes.o[k - 1][0], pathNodes.o[k - 1][1], 0), matrixHelper.applyToY(pathNodes.o[k - 1][0], pathNodes.o[k - 1][1], 0), matrixHelper.applyToX(pathNodes.i[0][0], pathNodes.i[0][1], 0), matrixHelper.applyToY(pathNodes.i[0][0], pathNodes.i[0][1], 0), matrixHelper.applyToX(pathNodes.v[0][0], pathNodes.v[0][1], 0), matrixHelper.applyToY(pathNodes.v[0][0], pathNodes.v[0][1], 0));\r\n          commands[commandsCounter] = pathArr;\r\n          commandsCounter += 1;\r\n        }\r\n      }\r\n\r\n      if (singleShape) {\r\n        xPos += letters[i].l;\r\n        xPos += trackingOffset;\r\n      }\r\n\r\n      if (this.textSpans[cnt]) {\r\n        this.textSpans[cnt].elem = commands;\r\n      } else {\r\n        this.textSpans[cnt] = {\r\n          elem: commands\r\n        };\r\n      }\r\n\r\n      cnt += 1;\r\n    }\r\n  };\r\n\r\n  CVTextElement.prototype.renderInnerContent = function () {\r\n    var ctx = this.canvasContext;\r\n    ctx.font = this.values.fValue;\r\n    ctx.lineCap = 'butt';\r\n    ctx.lineJoin = 'miter';\r\n    ctx.miterLimit = 4;\r\n\r\n    if (!this.data.singleShape) {\r\n      this.textAnimator.getMeasures(this.textProperty.currentData, this.lettersChangedFlag);\r\n    }\r\n\r\n    var i;\r\n    var len;\r\n    var j;\r\n    var jLen;\r\n    var k;\r\n    var kLen;\r\n    var renderedLetters = this.textAnimator.renderedLetters;\r\n    var letters = this.textProperty.currentData.l;\r\n    len = letters.length;\r\n    var renderedLetter;\r\n    var lastFill = null;\r\n    var lastStroke = null;\r\n    var lastStrokeW = null;\r\n    var commands;\r\n    var pathArr;\r\n\r\n    for (i = 0; i < len; i += 1) {\r\n      if (!letters[i].n) {\r\n        renderedLetter = renderedLetters[i];\r\n\r\n        if (renderedLetter) {\r\n          this.globalData.renderer.save();\r\n          this.globalData.renderer.ctxTransform(renderedLetter.p);\r\n          this.globalData.renderer.ctxOpacity(renderedLetter.o);\r\n        }\r\n\r\n        if (this.fill) {\r\n          if (renderedLetter && renderedLetter.fc) {\r\n            if (lastFill !== renderedLetter.fc) {\r\n              lastFill = renderedLetter.fc;\r\n              ctx.fillStyle = renderedLetter.fc;\r\n            }\r\n          } else if (lastFill !== this.values.fill) {\r\n            lastFill = this.values.fill;\r\n            ctx.fillStyle = this.values.fill;\r\n          }\r\n\r\n          commands = this.textSpans[i].elem;\r\n          jLen = commands.length;\r\n          this.globalData.canvasContext.beginPath();\r\n\r\n          for (j = 0; j < jLen; j += 1) {\r\n            pathArr = commands[j];\r\n            kLen = pathArr.length;\r\n            this.globalData.canvasContext.moveTo(pathArr[0], pathArr[1]);\r\n\r\n            for (k = 2; k < kLen; k += 6) {\r\n              this.globalData.canvasContext.bezierCurveTo(pathArr[k], pathArr[k + 1], pathArr[k + 2], pathArr[k + 3], pathArr[k + 4], pathArr[k + 5]);\r\n            }\r\n          }\r\n\r\n          this.globalData.canvasContext.closePath();\r\n          this.globalData.canvasContext.fill(); /// ctx.fillText(this.textSpans[i].val,0,0);\r\n        }\r\n\r\n        if (this.stroke) {\r\n          if (renderedLetter && renderedLetter.sw) {\r\n            if (lastStrokeW !== renderedLetter.sw) {\r\n              lastStrokeW = renderedLetter.sw;\r\n              ctx.lineWidth = renderedLetter.sw;\r\n            }\r\n          } else if (lastStrokeW !== this.values.sWidth) {\r\n            lastStrokeW = this.values.sWidth;\r\n            ctx.lineWidth = this.values.sWidth;\r\n          }\r\n\r\n          if (renderedLetter && renderedLetter.sc) {\r\n            if (lastStroke !== renderedLetter.sc) {\r\n              lastStroke = renderedLetter.sc;\r\n              ctx.strokeStyle = renderedLetter.sc;\r\n            }\r\n          } else if (lastStroke !== this.values.stroke) {\r\n            lastStroke = this.values.stroke;\r\n            ctx.strokeStyle = this.values.stroke;\r\n          }\r\n\r\n          commands = this.textSpans[i].elem;\r\n          jLen = commands.length;\r\n          this.globalData.canvasContext.beginPath();\r\n\r\n          for (j = 0; j < jLen; j += 1) {\r\n            pathArr = commands[j];\r\n            kLen = pathArr.length;\r\n            this.globalData.canvasContext.moveTo(pathArr[0], pathArr[1]);\r\n\r\n            for (k = 2; k < kLen; k += 6) {\r\n              this.globalData.canvasContext.bezierCurveTo(pathArr[k], pathArr[k + 1], pathArr[k + 2], pathArr[k + 3], pathArr[k + 4], pathArr[k + 5]);\r\n            }\r\n          }\r\n\r\n          this.globalData.canvasContext.closePath();\r\n          this.globalData.canvasContext.stroke(); /// ctx.strokeText(letters[i].val,0,0);\r\n        }\r\n\r\n        if (renderedLetter) {\r\n          this.globalData.renderer.restore();\r\n        }\r\n      }\r\n    }\r\n  };\r\n\r\n  function CVImageElement(data, globalData, comp) {\r\n    this.assetData = globalData.getAssetData(data.refId);\r\n    this.img = globalData.imageLoader.getAsset(this.assetData);\r\n    this.initElement(data, globalData, comp);\r\n  }\r\n\r\n  extendPrototype([BaseElement, TransformElement, CVBaseElement, HierarchyElement, FrameElement, RenderableElement], CVImageElement);\r\n  CVImageElement.prototype.initElement = SVGShapeElement.prototype.initElement;\r\n  CVImageElement.prototype.prepareFrame = IImageElement.prototype.prepareFrame;\r\n\r\n  CVImageElement.prototype.createContent = function () {\r\n    if (this.img.width && (this.assetData.w !== this.img.width || this.assetData.h !== this.img.height)) {\r\n      var canvas = createTag('canvas');\r\n      canvas.width = this.assetData.w;\r\n      canvas.height = this.assetData.h;\r\n      var ctx = canvas.getContext('2d');\r\n      var imgW = this.img.width;\r\n      var imgH = this.img.height;\r\n      var imgRel = imgW / imgH;\r\n      var canvasRel = this.assetData.w / this.assetData.h;\r\n      var widthCrop;\r\n      var heightCrop;\r\n      var par = this.assetData.pr || this.globalData.renderConfig.imagePreserveAspectRatio;\r\n\r\n      if (imgRel > canvasRel && par === 'xMidYMid slice' || imgRel < canvasRel && par !== 'xMidYMid slice') {\r\n        heightCrop = imgH;\r\n        widthCrop = heightCrop * canvasRel;\r\n      } else {\r\n        widthCrop = imgW;\r\n        heightCrop = widthCrop / canvasRel;\r\n      }\r\n\r\n      ctx.drawImage(this.img, (imgW - widthCrop) / 2, (imgH - heightCrop) / 2, widthCrop, heightCrop, 0, 0, this.assetData.w, this.assetData.h);\r\n      this.img = canvas;\r\n    }\r\n  };\r\n\r\n  CVImageElement.prototype.renderInnerContent = function () {\r\n    this.canvasContext.drawImage(this.img, 0, 0);\r\n  };\r\n\r\n  CVImageElement.prototype.destroy = function () {\r\n    this.img = null;\r\n  };\r\n\r\n  function CVSolidElement(data, globalData, comp) {\r\n    this.initElement(data, globalData, comp);\r\n  }\r\n\r\n  extendPrototype([BaseElement, TransformElement, CVBaseElement, HierarchyElement, FrameElement, RenderableElement], CVSolidElement);\r\n  CVSolidElement.prototype.initElement = SVGShapeElement.prototype.initElement;\r\n  CVSolidElement.prototype.prepareFrame = IImageElement.prototype.prepareFrame;\r\n\r\n  CVSolidElement.prototype.renderInnerContent = function () {\r\n    var ctx = this.canvasContext;\r\n    ctx.fillStyle = this.data.sc;\r\n    ctx.fillRect(0, 0, this.data.sw, this.data.sh); //\r\n  };\r\n\r\n  function CanvasRendererBase(animationItem, config) {\r\n    this.animationItem = animationItem;\r\n    this.renderConfig = {\r\n      clearCanvas: config && config.clearCanvas !== undefined ? config.clearCanvas : true,\r\n      context: config && config.context || null,\r\n      progressiveLoad: config && config.progressiveLoad || false,\r\n      preserveAspectRatio: config && config.preserveAspectRatio || 'xMidYMid meet',\r\n      imagePreserveAspectRatio: config && config.imagePreserveAspectRatio || 'xMidYMid slice',\r\n      contentVisibility: config && config.contentVisibility || 'visible',\r\n      className: config && config.className || '',\r\n      id: config && config.id || ''\r\n    };\r\n    this.renderConfig.dpr = config && config.dpr || 1;\r\n\r\n    if (this.animationItem.wrapper) {\r\n      this.renderConfig.dpr = config && config.dpr || window.devicePixelRatio || 1;\r\n    }\r\n\r\n    this.renderedFrame = -1;\r\n    this.globalData = {\r\n      frameNum: -1,\r\n      _mdf: false,\r\n      renderConfig: this.renderConfig,\r\n      currentGlobalAlpha: -1\r\n    };\r\n    this.contextData = new CVContextData();\r\n    this.elements = [];\r\n    this.pendingElements = [];\r\n    this.transformMat = new Matrix();\r\n    this.completeLayers = false;\r\n    this.rendererType = 'canvas';\r\n  }\r\n\r\n  extendPrototype([BaseRenderer], CanvasRendererBase);\r\n\r\n  CanvasRendererBase.prototype.createShape = function (data) {\r\n    return new CVShapeElement(data, this.globalData, this);\r\n  };\r\n\r\n  CanvasRendererBase.prototype.createText = function (data) {\r\n    return new CVTextElement(data, this.globalData, this);\r\n  };\r\n\r\n  CanvasRendererBase.prototype.createImage = function (data) {\r\n    return new CVImageElement(data, this.globalData, this);\r\n  };\r\n\r\n  CanvasRendererBase.prototype.createSolid = function (data) {\r\n    return new CVSolidElement(data, this.globalData, this);\r\n  };\r\n\r\n  CanvasRendererBase.prototype.createNull = SVGRenderer.prototype.createNull;\r\n\r\n  CanvasRendererBase.prototype.ctxTransform = function (props) {\r\n    if (props[0] === 1 && props[1] === 0 && props[4] === 0 && props[5] === 1 && props[12] === 0 && props[13] === 0) {\r\n      return;\r\n    }\r\n\r\n    if (!this.renderConfig.clearCanvas) {\r\n      this.canvasContext.transform(props[0], props[1], props[4], props[5], props[12], props[13]);\r\n      return;\r\n    }\r\n\r\n    this.transformMat.cloneFromProps(props);\r\n    var cProps = this.contextData.cTr.props;\r\n    this.transformMat.transform(cProps[0], cProps[1], cProps[2], cProps[3], cProps[4], cProps[5], cProps[6], cProps[7], cProps[8], cProps[9], cProps[10], cProps[11], cProps[12], cProps[13], cProps[14], cProps[15]); // this.contextData.cTr.transform(props[0],props[1],props[2],props[3],props[4],props[5],props[6],props[7],props[8],props[9],props[10],props[11],props[12],props[13],props[14],props[15]);\r\n\r\n    this.contextData.cTr.cloneFromProps(this.transformMat.props);\r\n    var trProps = this.contextData.cTr.props;\r\n    this.canvasContext.setTransform(trProps[0], trProps[1], trProps[4], trProps[5], trProps[12], trProps[13]);\r\n  };\r\n\r\n  CanvasRendererBase.prototype.ctxOpacity = function (op) {\r\n    /* if(op === 1){\r\n          return;\r\n      } */\r\n    if (!this.renderConfig.clearCanvas) {\r\n      this.canvasContext.globalAlpha *= op < 0 ? 0 : op;\r\n      this.globalData.currentGlobalAlpha = this.contextData.cO;\r\n      return;\r\n    }\r\n\r\n    this.contextData.cO *= op < 0 ? 0 : op;\r\n\r\n    if (this.globalData.currentGlobalAlpha !== this.contextData.cO) {\r\n      this.canvasContext.globalAlpha = this.contextData.cO;\r\n      this.globalData.currentGlobalAlpha = this.contextData.cO;\r\n    }\r\n  };\r\n\r\n  CanvasRendererBase.prototype.reset = function () {\r\n    if (!this.renderConfig.clearCanvas) {\r\n      this.canvasContext.restore();\r\n      return;\r\n    }\r\n\r\n    this.contextData.reset();\r\n  };\r\n\r\n  CanvasRendererBase.prototype.save = function (actionFlag) {\r\n    if (!this.renderConfig.clearCanvas) {\r\n      this.canvasContext.save();\r\n      return;\r\n    }\r\n\r\n    if (actionFlag) {\r\n      this.canvasContext.save();\r\n    }\r\n\r\n    var props = this.contextData.cTr.props;\r\n\r\n    if (this.contextData._length <= this.contextData.cArrPos) {\r\n      this.contextData.duplicate();\r\n    }\r\n\r\n    var i;\r\n    var arr = this.contextData.saved[this.contextData.cArrPos];\r\n\r\n    for (i = 0; i < 16; i += 1) {\r\n      arr[i] = props[i];\r\n    }\r\n\r\n    this.contextData.savedOp[this.contextData.cArrPos] = this.contextData.cO;\r\n    this.contextData.cArrPos += 1;\r\n  };\r\n\r\n  CanvasRendererBase.prototype.restore = function (actionFlag) {\r\n    if (!this.renderConfig.clearCanvas) {\r\n      this.canvasContext.restore();\r\n      return;\r\n    }\r\n\r\n    if (actionFlag) {\r\n      this.canvasContext.restore();\r\n      this.globalData.blendMode = 'source-over';\r\n    }\r\n\r\n    this.contextData.cArrPos -= 1;\r\n    var popped = this.contextData.saved[this.contextData.cArrPos];\r\n    var i;\r\n    var arr = this.contextData.cTr.props;\r\n\r\n    for (i = 0; i < 16; i += 1) {\r\n      arr[i] = popped[i];\r\n    }\r\n\r\n    this.canvasContext.setTransform(popped[0], popped[1], popped[4], popped[5], popped[12], popped[13]);\r\n    popped = this.contextData.savedOp[this.contextData.cArrPos];\r\n    this.contextData.cO = popped;\r\n\r\n    if (this.globalData.currentGlobalAlpha !== popped) {\r\n      this.canvasContext.globalAlpha = popped;\r\n      this.globalData.currentGlobalAlpha = popped;\r\n    }\r\n  };\r\n\r\n  CanvasRendererBase.prototype.configAnimation = function (animData) {\r\n    if (this.animationItem.wrapper) {\r\n      this.animationItem.container = createTag('canvas');\r\n      var containerStyle = this.animationItem.container.style;\r\n      containerStyle.width = '100%';\r\n      containerStyle.height = '100%';\r\n      var origin = '0px 0px 0px';\r\n      containerStyle.transformOrigin = origin;\r\n      containerStyle.mozTransformOrigin = origin;\r\n      containerStyle.webkitTransformOrigin = origin;\r\n      containerStyle['-webkit-transform'] = origin;\r\n      containerStyle.contentVisibility = this.renderConfig.contentVisibility;\r\n      this.animationItem.wrapper.appendChild(this.animationItem.container);\r\n      this.canvasContext = this.animationItem.container.getContext('2d');\r\n\r\n      if (this.renderConfig.className) {\r\n        this.animationItem.container.setAttribute('class', this.renderConfig.className);\r\n      }\r\n\r\n      if (this.renderConfig.id) {\r\n        this.animationItem.container.setAttribute('id', this.renderConfig.id);\r\n      }\r\n    } else {\r\n      this.canvasContext = this.renderConfig.context;\r\n    }\r\n\r\n    this.data = animData;\r\n    this.layers = animData.layers;\r\n    this.transformCanvas = {\r\n      w: animData.w,\r\n      h: animData.h,\r\n      sx: 0,\r\n      sy: 0,\r\n      tx: 0,\r\n      ty: 0\r\n    };\r\n    this.setupGlobalData(animData, document.body);\r\n    this.globalData.canvasContext = this.canvasContext;\r\n    this.globalData.renderer = this;\r\n    this.globalData.isDashed = false;\r\n    this.globalData.progressiveLoad = this.renderConfig.progressiveLoad;\r\n    this.globalData.transformCanvas = this.transformCanvas;\r\n    this.elements = createSizedArray(animData.layers.length);\r\n    this.updateContainerSize();\r\n  };\r\n\r\n  CanvasRendererBase.prototype.updateContainerSize = function (width, height) {\r\n    this.reset();\r\n    var elementWidth;\r\n    var elementHeight;\r\n\r\n    if (width) {\r\n      elementWidth = width;\r\n      elementHeight = height;\r\n      this.canvasContext.canvas.width = elementWidth;\r\n      this.canvasContext.canvas.height = elementHeight;\r\n    } else {\r\n      if (this.animationItem.wrapper && this.animationItem.container) {\r\n        elementWidth = this.animationItem.wrapper.offsetWidth;\r\n        elementHeight = this.animationItem.wrapper.offsetHeight;\r\n      } else {\r\n        elementWidth = this.canvasContext.canvas.width;\r\n        elementHeight = this.canvasContext.canvas.height;\r\n      }\r\n\r\n      this.canvasContext.canvas.width = elementWidth * this.renderConfig.dpr;\r\n      this.canvasContext.canvas.height = elementHeight * this.renderConfig.dpr;\r\n    }\r\n\r\n    var elementRel;\r\n    var animationRel;\r\n\r\n    if (this.renderConfig.preserveAspectRatio.indexOf('meet') !== -1 || this.renderConfig.preserveAspectRatio.indexOf('slice') !== -1) {\r\n      var par = this.renderConfig.preserveAspectRatio.split(' ');\r\n      var fillType = par[1] || 'meet';\r\n      var pos = par[0] || 'xMidYMid';\r\n      var xPos = pos.substr(0, 4);\r\n      var yPos = pos.substr(4);\r\n      elementRel = elementWidth / elementHeight;\r\n      animationRel = this.transformCanvas.w / this.transformCanvas.h;\r\n\r\n      if (animationRel > elementRel && fillType === 'meet' || animationRel < elementRel && fillType === 'slice') {\r\n        this.transformCanvas.sx = elementWidth / (this.transformCanvas.w / this.renderConfig.dpr);\r\n        this.transformCanvas.sy = elementWidth / (this.transformCanvas.w / this.renderConfig.dpr);\r\n      } else {\r\n        this.transformCanvas.sx = elementHeight / (this.transformCanvas.h / this.renderConfig.dpr);\r\n        this.transformCanvas.sy = elementHeight / (this.transformCanvas.h / this.renderConfig.dpr);\r\n      }\r\n\r\n      if (xPos === 'xMid' && (animationRel < elementRel && fillType === 'meet' || animationRel > elementRel && fillType === 'slice')) {\r\n        this.transformCanvas.tx = (elementWidth - this.transformCanvas.w * (elementHeight / this.transformCanvas.h)) / 2 * this.renderConfig.dpr;\r\n      } else if (xPos === 'xMax' && (animationRel < elementRel && fillType === 'meet' || animationRel > elementRel && fillType === 'slice')) {\r\n        this.transformCanvas.tx = (elementWidth - this.transformCanvas.w * (elementHeight / this.transformCanvas.h)) * this.renderConfig.dpr;\r\n      } else {\r\n        this.transformCanvas.tx = 0;\r\n      }\r\n\r\n      if (yPos === 'YMid' && (animationRel > elementRel && fillType === 'meet' || animationRel < elementRel && fillType === 'slice')) {\r\n        this.transformCanvas.ty = (elementHeight - this.transformCanvas.h * (elementWidth / this.transformCanvas.w)) / 2 * this.renderConfig.dpr;\r\n      } else if (yPos === 'YMax' && (animationRel > elementRel && fillType === 'meet' || animationRel < elementRel && fillType === 'slice')) {\r\n        this.transformCanvas.ty = (elementHeight - this.transformCanvas.h * (elementWidth / this.transformCanvas.w)) * this.renderConfig.dpr;\r\n      } else {\r\n        this.transformCanvas.ty = 0;\r\n      }\r\n    } else if (this.renderConfig.preserveAspectRatio === 'none') {\r\n      this.transformCanvas.sx = elementWidth / (this.transformCanvas.w / this.renderConfig.dpr);\r\n      this.transformCanvas.sy = elementHeight / (this.transformCanvas.h / this.renderConfig.dpr);\r\n      this.transformCanvas.tx = 0;\r\n      this.transformCanvas.ty = 0;\r\n    } else {\r\n      this.transformCanvas.sx = this.renderConfig.dpr;\r\n      this.transformCanvas.sy = this.renderConfig.dpr;\r\n      this.transformCanvas.tx = 0;\r\n      this.transformCanvas.ty = 0;\r\n    }\r\n\r\n    this.transformCanvas.props = [this.transformCanvas.sx, 0, 0, 0, 0, this.transformCanvas.sy, 0, 0, 0, 0, 1, 0, this.transformCanvas.tx, this.transformCanvas.ty, 0, 1];\r\n    /* var i, len = this.elements.length;\r\n      for(i=0;i<len;i+=1){\r\n          if(this.elements[i] && this.elements[i].data.ty === 0){\r\n              this.elements[i].resize(this.globalData.transformCanvas);\r\n          }\r\n      } */\r\n\r\n    this.ctxTransform(this.transformCanvas.props);\r\n    this.canvasContext.beginPath();\r\n    this.canvasContext.rect(0, 0, this.transformCanvas.w, this.transformCanvas.h);\r\n    this.canvasContext.closePath();\r\n    this.canvasContext.clip();\r\n    this.renderFrame(this.renderedFrame, true);\r\n  };\r\n\r\n  CanvasRendererBase.prototype.destroy = function () {\r\n    if (this.renderConfig.clearCanvas && this.animationItem.wrapper) {\r\n      this.animationItem.wrapper.innerText = '';\r\n    }\r\n\r\n    var i;\r\n    var len = this.layers ? this.layers.length : 0;\r\n\r\n    for (i = len - 1; i >= 0; i -= 1) {\r\n      if (this.elements[i]) {\r\n        this.elements[i].destroy();\r\n      }\r\n    }\r\n\r\n    this.elements.length = 0;\r\n    this.globalData.canvasContext = null;\r\n    this.animationItem.container = null;\r\n    this.destroyed = true;\r\n  };\r\n\r\n  CanvasRendererBase.prototype.renderFrame = function (num, forceRender) {\r\n    if (this.renderedFrame === num && this.renderConfig.clearCanvas === true && !forceRender || this.destroyed || num === -1) {\r\n      return;\r\n    }\r\n\r\n    this.renderedFrame = num;\r\n    this.globalData.frameNum = num - this.animationItem._isFirstFrame;\r\n    this.globalData.frameId += 1;\r\n    this.globalData._mdf = !this.renderConfig.clearCanvas || forceRender;\r\n    this.globalData.projectInterface.currentFrame = num; // console.log('--------');\r\n    // console.log('NEW: ',num);\r\n\r\n    var i;\r\n    var len = this.layers.length;\r\n\r\n    if (!this.completeLayers) {\r\n      this.checkLayers(num);\r\n    }\r\n\r\n    for (i = 0; i < len; i += 1) {\r\n      if (this.completeLayers || this.elements[i]) {\r\n        this.elements[i].prepareFrame(num - this.layers[i].st);\r\n      }\r\n    }\r\n\r\n    if (this.globalData._mdf) {\r\n      if (this.renderConfig.clearCanvas === true) {\r\n        this.canvasContext.clearRect(0, 0, this.transformCanvas.w, this.transformCanvas.h);\r\n      } else {\r\n        this.save();\r\n      }\r\n\r\n      for (i = len - 1; i >= 0; i -= 1) {\r\n        if (this.completeLayers || this.elements[i]) {\r\n          this.elements[i].renderFrame();\r\n        }\r\n      }\r\n\r\n      if (this.renderConfig.clearCanvas !== true) {\r\n        this.restore();\r\n      }\r\n    }\r\n  };\r\n\r\n  CanvasRendererBase.prototype.buildItem = function (pos) {\r\n    var elements = this.elements;\r\n\r\n    if (elements[pos] || this.layers[pos].ty === 99) {\r\n      return;\r\n    }\r\n\r\n    var element = this.createItem(this.layers[pos], this, this.globalData);\r\n    elements[pos] = element;\r\n    element.initExpressions();\r\n    /* if(this.layers[pos].ty === 0){\r\n          element.resize(this.globalData.transformCanvas);\r\n      } */\r\n  };\r\n\r\n  CanvasRendererBase.prototype.checkPendingElements = function () {\r\n    while (this.pendingElements.length) {\r\n      var element = this.pendingElements.pop();\r\n      element.checkParenting();\r\n    }\r\n  };\r\n\r\n  CanvasRendererBase.prototype.hide = function () {\r\n    this.animationItem.container.style.display = 'none';\r\n  };\r\n\r\n  CanvasRendererBase.prototype.show = function () {\r\n    this.animationItem.container.style.display = 'block';\r\n  };\r\n\r\n  function CVCompElement(data, globalData, comp) {\r\n    this.completeLayers = false;\r\n    this.layers = data.layers;\r\n    this.pendingElements = [];\r\n    this.elements = createSizedArray(this.layers.length);\r\n    this.initElement(data, globalData, comp);\r\n    this.tm = data.tm ? PropertyFactory.getProp(this, data.tm, 0, globalData.frameRate, this) : {\r\n      _placeholder: true\r\n    };\r\n  }\r\n\r\n  extendPrototype([CanvasRendererBase, ICompElement, CVBaseElement], CVCompElement);\r\n\r\n  CVCompElement.prototype.renderInnerContent = function () {\r\n    var ctx = this.canvasContext;\r\n    ctx.beginPath();\r\n    ctx.moveTo(0, 0);\r\n    ctx.lineTo(this.data.w, 0);\r\n    ctx.lineTo(this.data.w, this.data.h);\r\n    ctx.lineTo(0, this.data.h);\r\n    ctx.lineTo(0, 0);\r\n    ctx.clip();\r\n    var i;\r\n    var len = this.layers.length;\r\n\r\n    for (i = len - 1; i >= 0; i -= 1) {\r\n      if (this.completeLayers || this.elements[i]) {\r\n        this.elements[i].renderFrame();\r\n      }\r\n    }\r\n  };\r\n\r\n  CVCompElement.prototype.destroy = function () {\r\n    var i;\r\n    var len = this.layers.length;\r\n\r\n    for (i = len - 1; i >= 0; i -= 1) {\r\n      if (this.elements[i]) {\r\n        this.elements[i].destroy();\r\n      }\r\n    }\r\n\r\n    this.layers = null;\r\n    this.elements = null;\r\n  };\r\n\r\n  CVCompElement.prototype.createComp = function (data) {\r\n    return new CVCompElement(data, this.globalData, this);\r\n  };\r\n\r\n  function CanvasRenderer(animationItem, config) {\r\n    this.animationItem = animationItem;\r\n    this.renderConfig = {\r\n      clearCanvas: config && config.clearCanvas !== undefined ? config.clearCanvas : true,\r\n      context: config && config.context || null,\r\n      progressiveLoad: config && config.progressiveLoad || false,\r\n      preserveAspectRatio: config && config.preserveAspectRatio || 'xMidYMid meet',\r\n      imagePreserveAspectRatio: config && config.imagePreserveAspectRatio || 'xMidYMid slice',\r\n      contentVisibility: config && config.contentVisibility || 'visible',\r\n      className: config && config.className || '',\r\n      id: config && config.id || '',\r\n      runExpressions: !config || config.runExpressions === undefined || config.runExpressions\r\n    };\r\n    this.renderConfig.dpr = config && config.dpr || 1;\r\n\r\n    if (this.animationItem.wrapper) {\r\n      this.renderConfig.dpr = config && config.dpr || window.devicePixelRatio || 1;\r\n    }\r\n\r\n    this.renderedFrame = -1;\r\n    this.globalData = {\r\n      frameNum: -1,\r\n      _mdf: false,\r\n      renderConfig: this.renderConfig,\r\n      currentGlobalAlpha: -1\r\n    };\r\n    this.contextData = new CVContextData();\r\n    this.elements = [];\r\n    this.pendingElements = [];\r\n    this.transformMat = new Matrix();\r\n    this.completeLayers = false;\r\n    this.rendererType = 'canvas';\r\n  }\r\n\r\n  extendPrototype([CanvasRendererBase], CanvasRenderer);\r\n\r\n  CanvasRenderer.prototype.createComp = function (data) {\r\n    return new CVCompElement(data, this.globalData, this);\r\n  };\r\n\r\n  function HBaseElement() {}\r\n\r\n  HBaseElement.prototype = {\r\n    checkBlendMode: function checkBlendMode() {},\r\n    initRendererElement: function initRendererElement() {\r\n      this.baseElement = createTag(this.data.tg || 'div');\r\n\r\n      if (this.data.hasMask) {\r\n        this.svgElement = createNS('svg');\r\n        this.layerElement = createNS('g');\r\n        this.maskedElement = this.layerElement;\r\n        this.svgElement.appendChild(this.layerElement);\r\n        this.baseElement.appendChild(this.svgElement);\r\n      } else {\r\n        this.layerElement = this.baseElement;\r\n      }\r\n\r\n      styleDiv(this.baseElement);\r\n    },\r\n    createContainerElements: function createContainerElements() {\r\n      this.renderableEffectsManager = new CVEffects(this);\r\n      this.transformedElement = this.baseElement;\r\n      this.maskedElement = this.layerElement;\r\n\r\n      if (this.data.ln) {\r\n        this.layerElement.setAttribute('id', this.data.ln);\r\n      }\r\n\r\n      if (this.data.cl) {\r\n        this.layerElement.setAttribute('class', this.data.cl);\r\n      }\r\n\r\n      if (this.data.bm !== 0) {\r\n        this.setBlendMode();\r\n      }\r\n    },\r\n    renderElement: function renderElement() {\r\n      var transformedElementStyle = this.transformedElement ? this.transformedElement.style : {};\r\n\r\n      if (this.finalTransform._matMdf) {\r\n        var matrixValue = this.finalTransform.mat.toCSS();\r\n        transformedElementStyle.transform = matrixValue;\r\n        transformedElementStyle.webkitTransform = matrixValue;\r\n      }\r\n\r\n      if (this.finalTransform._opMdf) {\r\n        transformedElementStyle.opacity = this.finalTransform.mProp.o.v;\r\n      }\r\n    },\r\n    renderFrame: function renderFrame() {\r\n      // If it is exported as hidden (data.hd === true) no need to render\r\n      // If it is not visible no need to render\r\n      if (this.data.hd || this.hidden) {\r\n        return;\r\n      }\r\n\r\n      this.renderTransform();\r\n      this.renderRenderable();\r\n      this.renderElement();\r\n      this.renderInnerContent();\r\n\r\n      if (this._isFirstFrame) {\r\n        this._isFirstFrame = false;\r\n      }\r\n    },\r\n    destroy: function destroy() {\r\n      this.layerElement = null;\r\n      this.transformedElement = null;\r\n\r\n      if (this.matteElement) {\r\n        this.matteElement = null;\r\n      }\r\n\r\n      if (this.maskManager) {\r\n        this.maskManager.destroy();\r\n        this.maskManager = null;\r\n      }\r\n    },\r\n    createRenderableComponents: function createRenderableComponents() {\r\n      this.maskManager = new MaskElement(this.data, this, this.globalData);\r\n    },\r\n    addEffects: function addEffects() {},\r\n    setMatte: function setMatte() {}\r\n  };\r\n  HBaseElement.prototype.getBaseElement = SVGBaseElement.prototype.getBaseElement;\r\n  HBaseElement.prototype.destroyBaseElement = HBaseElement.prototype.destroy;\r\n  HBaseElement.prototype.buildElementParenting = BaseRenderer.prototype.buildElementParenting;\r\n\r\n  function HSolidElement(data, globalData, comp) {\r\n    this.initElement(data, globalData, comp);\r\n  }\r\n\r\n  extendPrototype([BaseElement, TransformElement, HBaseElement, HierarchyElement, FrameElement, RenderableDOMElement], HSolidElement);\r\n\r\n  HSolidElement.prototype.createContent = function () {\r\n    var rect;\r\n\r\n    if (this.data.hasMask) {\r\n      rect = createNS('rect');\r\n      rect.setAttribute('width', this.data.sw);\r\n      rect.setAttribute('height', this.data.sh);\r\n      rect.setAttribute('fill', this.data.sc);\r\n      this.svgElement.setAttribute('width', this.data.sw);\r\n      this.svgElement.setAttribute('height', this.data.sh);\r\n    } else {\r\n      rect = createTag('div');\r\n      rect.style.width = this.data.sw + 'px';\r\n      rect.style.height = this.data.sh + 'px';\r\n      rect.style.backgroundColor = this.data.sc;\r\n    }\r\n\r\n    this.layerElement.appendChild(rect);\r\n  };\r\n\r\n  function HShapeElement(data, globalData, comp) {\r\n    // List of drawable elements\r\n    this.shapes = []; // Full shape data\r\n\r\n    this.shapesData = data.shapes; // List of styles that will be applied to shapes\r\n\r\n    this.stylesList = []; // List of modifiers that will be applied to shapes\r\n\r\n    this.shapeModifiers = []; // List of items in shape tree\r\n\r\n    this.itemsData = []; // List of items in previous shape tree\r\n\r\n    this.processedElements = []; // List of animated components\r\n\r\n    this.animatedContents = [];\r\n    this.shapesContainer = createNS('g');\r\n    this.initElement(data, globalData, comp); // Moving any property that doesn't get too much access after initialization because of v8 way of handling more than 10 properties.\r\n    // List of elements that have been created\r\n\r\n    this.prevViewData = [];\r\n    this.currentBBox = {\r\n      x: 999999,\r\n      y: -999999,\r\n      h: 0,\r\n      w: 0\r\n    };\r\n  }\r\n\r\n  extendPrototype([BaseElement, TransformElement, HSolidElement, SVGShapeElement, HBaseElement, HierarchyElement, FrameElement, RenderableElement], HShapeElement);\r\n  HShapeElement.prototype._renderShapeFrame = HShapeElement.prototype.renderInnerContent;\r\n\r\n  HShapeElement.prototype.createContent = function () {\r\n    var cont;\r\n    this.baseElement.style.fontSize = 0;\r\n\r\n    if (this.data.hasMask) {\r\n      this.layerElement.appendChild(this.shapesContainer);\r\n      cont = this.svgElement;\r\n    } else {\r\n      cont = createNS('svg');\r\n      var size = this.comp.data ? this.comp.data : this.globalData.compSize;\r\n      cont.setAttribute('width', size.w);\r\n      cont.setAttribute('height', size.h);\r\n      cont.appendChild(this.shapesContainer);\r\n      this.layerElement.appendChild(cont);\r\n    }\r\n\r\n    this.searchShapes(this.shapesData, this.itemsData, this.prevViewData, this.shapesContainer, 0, [], true);\r\n    this.filterUniqueShapes();\r\n    this.shapeCont = cont;\r\n  };\r\n\r\n  HShapeElement.prototype.getTransformedPoint = function (transformers, point) {\r\n    var i;\r\n    var len = transformers.length;\r\n\r\n    for (i = 0; i < len; i += 1) {\r\n      point = transformers[i].mProps.v.applyToPointArray(point[0], point[1], 0);\r\n    }\r\n\r\n    return point;\r\n  };\r\n\r\n  HShapeElement.prototype.calculateShapeBoundingBox = function (item, boundingBox) {\r\n    var shape = item.sh.v;\r\n    var transformers = item.transformers;\r\n    var i;\r\n    var len = shape._length;\r\n    var vPoint;\r\n    var oPoint;\r\n    var nextIPoint;\r\n    var nextVPoint;\r\n\r\n    if (len <= 1) {\r\n      return;\r\n    }\r\n\r\n    for (i = 0; i < len - 1; i += 1) {\r\n      vPoint = this.getTransformedPoint(transformers, shape.v[i]);\r\n      oPoint = this.getTransformedPoint(transformers, shape.o[i]);\r\n      nextIPoint = this.getTransformedPoint(transformers, shape.i[i + 1]);\r\n      nextVPoint = this.getTransformedPoint(transformers, shape.v[i + 1]);\r\n      this.checkBounds(vPoint, oPoint, nextIPoint, nextVPoint, boundingBox);\r\n    }\r\n\r\n    if (shape.c) {\r\n      vPoint = this.getTransformedPoint(transformers, shape.v[i]);\r\n      oPoint = this.getTransformedPoint(transformers, shape.o[i]);\r\n      nextIPoint = this.getTransformedPoint(transformers, shape.i[0]);\r\n      nextVPoint = this.getTransformedPoint(transformers, shape.v[0]);\r\n      this.checkBounds(vPoint, oPoint, nextIPoint, nextVPoint, boundingBox);\r\n    }\r\n  };\r\n\r\n  HShapeElement.prototype.checkBounds = function (vPoint, oPoint, nextIPoint, nextVPoint, boundingBox) {\r\n    this.getBoundsOfCurve(vPoint, oPoint, nextIPoint, nextVPoint);\r\n    var bounds = this.shapeBoundingBox;\r\n    boundingBox.x = bmMin(bounds.left, boundingBox.x);\r\n    boundingBox.xMax = bmMax(bounds.right, boundingBox.xMax);\r\n    boundingBox.y = bmMin(bounds.top, boundingBox.y);\r\n    boundingBox.yMax = bmMax(bounds.bottom, boundingBox.yMax);\r\n  };\r\n\r\n  HShapeElement.prototype.shapeBoundingBox = {\r\n    left: 0,\r\n    right: 0,\r\n    top: 0,\r\n    bottom: 0\r\n  };\r\n  HShapeElement.prototype.tempBoundingBox = {\r\n    x: 0,\r\n    xMax: 0,\r\n    y: 0,\r\n    yMax: 0,\r\n    width: 0,\r\n    height: 0\r\n  };\r\n\r\n  HShapeElement.prototype.getBoundsOfCurve = function (p0, p1, p2, p3) {\r\n    var bounds = [[p0[0], p3[0]], [p0[1], p3[1]]];\r\n\r\n    for (var a, b, c, t, b2ac, t1, t2, i = 0; i < 2; ++i) {\r\n      // eslint-disable-line no-plusplus\r\n      b = 6 * p0[i] - 12 * p1[i] + 6 * p2[i];\r\n      a = -3 * p0[i] + 9 * p1[i] - 9 * p2[i] + 3 * p3[i];\r\n      c = 3 * p1[i] - 3 * p0[i];\r\n      b |= 0; // eslint-disable-line no-bitwise\r\n\r\n      a |= 0; // eslint-disable-line no-bitwise\r\n\r\n      c |= 0; // eslint-disable-line no-bitwise\r\n\r\n      if (a === 0 && b === 0) {//\r\n      } else if (a === 0) {\r\n        t = -c / b;\r\n\r\n        if (t > 0 && t < 1) {\r\n          bounds[i].push(this.calculateF(t, p0, p1, p2, p3, i));\r\n        }\r\n      } else {\r\n        b2ac = b * b - 4 * c * a;\r\n\r\n        if (b2ac >= 0) {\r\n          t1 = (-b + bmSqrt(b2ac)) / (2 * a);\r\n          if (t1 > 0 && t1 < 1) bounds[i].push(this.calculateF(t1, p0, p1, p2, p3, i));\r\n          t2 = (-b - bmSqrt(b2ac)) / (2 * a);\r\n          if (t2 > 0 && t2 < 1) bounds[i].push(this.calculateF(t2, p0, p1, p2, p3, i));\r\n        }\r\n      }\r\n    }\r\n\r\n    this.shapeBoundingBox.left = bmMin.apply(null, bounds[0]);\r\n    this.shapeBoundingBox.top = bmMin.apply(null, bounds[1]);\r\n    this.shapeBoundingBox.right = bmMax.apply(null, bounds[0]);\r\n    this.shapeBoundingBox.bottom = bmMax.apply(null, bounds[1]);\r\n  };\r\n\r\n  HShapeElement.prototype.calculateF = function (t, p0, p1, p2, p3, i) {\r\n    return bmPow(1 - t, 3) * p0[i] + 3 * bmPow(1 - t, 2) * t * p1[i] + 3 * (1 - t) * bmPow(t, 2) * p2[i] + bmPow(t, 3) * p3[i];\r\n  };\r\n\r\n  HShapeElement.prototype.calculateBoundingBox = function (itemsData, boundingBox) {\r\n    var i;\r\n    var len = itemsData.length;\r\n\r\n    for (i = 0; i < len; i += 1) {\r\n      if (itemsData[i] && itemsData[i].sh) {\r\n        this.calculateShapeBoundingBox(itemsData[i], boundingBox);\r\n      } else if (itemsData[i] && itemsData[i].it) {\r\n        this.calculateBoundingBox(itemsData[i].it, boundingBox);\r\n      } else if (itemsData[i] && itemsData[i].style && itemsData[i].w) {\r\n        this.expandStrokeBoundingBox(itemsData[i].w, boundingBox);\r\n      }\r\n    }\r\n  };\r\n\r\n  HShapeElement.prototype.expandStrokeBoundingBox = function (widthProperty, boundingBox) {\r\n    var width = 0;\r\n\r\n    if (widthProperty.keyframes) {\r\n      for (var i = 0; i < widthProperty.keyframes.length; i += 1) {\r\n        var kfw = widthProperty.keyframes[i].s;\r\n\r\n        if (kfw > width) {\r\n          width = kfw;\r\n        }\r\n      }\r\n\r\n      width *= widthProperty.mult;\r\n    } else {\r\n      width = widthProperty.v * widthProperty.mult;\r\n    }\r\n\r\n    boundingBox.x -= width;\r\n    boundingBox.xMax += width;\r\n    boundingBox.y -= width;\r\n    boundingBox.yMax += width;\r\n  };\r\n\r\n  HShapeElement.prototype.currentBoxContains = function (box) {\r\n    return this.currentBBox.x <= box.x && this.currentBBox.y <= box.y && this.currentBBox.width + this.currentBBox.x >= box.x + box.width && this.currentBBox.height + this.currentBBox.y >= box.y + box.height;\r\n  };\r\n\r\n  HShapeElement.prototype.renderInnerContent = function () {\r\n    this._renderShapeFrame();\r\n\r\n    if (!this.hidden && (this._isFirstFrame || this._mdf)) {\r\n      var tempBoundingBox = this.tempBoundingBox;\r\n      var max = 999999;\r\n      tempBoundingBox.x = max;\r\n      tempBoundingBox.xMax = -max;\r\n      tempBoundingBox.y = max;\r\n      tempBoundingBox.yMax = -max;\r\n      this.calculateBoundingBox(this.itemsData, tempBoundingBox);\r\n      tempBoundingBox.width = tempBoundingBox.xMax < tempBoundingBox.x ? 0 : tempBoundingBox.xMax - tempBoundingBox.x;\r\n      tempBoundingBox.height = tempBoundingBox.yMax < tempBoundingBox.y ? 0 : tempBoundingBox.yMax - tempBoundingBox.y; // var tempBoundingBox = this.shapeCont.getBBox();\r\n\r\n      if (this.currentBoxContains(tempBoundingBox)) {\r\n        return;\r\n      }\r\n\r\n      var changed = false;\r\n\r\n      if (this.currentBBox.w !== tempBoundingBox.width) {\r\n        this.currentBBox.w = tempBoundingBox.width;\r\n        this.shapeCont.setAttribute('width', tempBoundingBox.width);\r\n        changed = true;\r\n      }\r\n\r\n      if (this.currentBBox.h !== tempBoundingBox.height) {\r\n        this.currentBBox.h = tempBoundingBox.height;\r\n        this.shapeCont.setAttribute('height', tempBoundingBox.height);\r\n        changed = true;\r\n      }\r\n\r\n      if (changed || this.currentBBox.x !== tempBoundingBox.x || this.currentBBox.y !== tempBoundingBox.y) {\r\n        this.currentBBox.w = tempBoundingBox.width;\r\n        this.currentBBox.h = tempBoundingBox.height;\r\n        this.currentBBox.x = tempBoundingBox.x;\r\n        this.currentBBox.y = tempBoundingBox.y;\r\n        this.shapeCont.setAttribute('viewBox', this.currentBBox.x + ' ' + this.currentBBox.y + ' ' + this.currentBBox.w + ' ' + this.currentBBox.h);\r\n        var shapeStyle = this.shapeCont.style;\r\n        var shapeTransform = 'translate(' + this.currentBBox.x + 'px,' + this.currentBBox.y + 'px)';\r\n        shapeStyle.transform = shapeTransform;\r\n        shapeStyle.webkitTransform = shapeTransform;\r\n      }\r\n    }\r\n  };\r\n\r\n  function HTextElement(data, globalData, comp) {\r\n    this.textSpans = [];\r\n    this.textPaths = [];\r\n    this.currentBBox = {\r\n      x: 999999,\r\n      y: -999999,\r\n      h: 0,\r\n      w: 0\r\n    };\r\n    this.renderType = 'svg';\r\n    this.isMasked = false;\r\n    this.initElement(data, globalData, comp);\r\n  }\r\n\r\n  extendPrototype([BaseElement, TransformElement, HBaseElement, HierarchyElement, FrameElement, RenderableDOMElement, ITextElement], HTextElement);\r\n\r\n  HTextElement.prototype.createContent = function () {\r\n    this.isMasked = this.checkMasks();\r\n\r\n    if (this.isMasked) {\r\n      this.renderType = 'svg';\r\n      this.compW = this.comp.data.w;\r\n      this.compH = this.comp.data.h;\r\n      this.svgElement.setAttribute('width', this.compW);\r\n      this.svgElement.setAttribute('height', this.compH);\r\n      var g = createNS('g');\r\n      this.maskedElement.appendChild(g);\r\n      this.innerElem = g;\r\n    } else {\r\n      this.renderType = 'html';\r\n      this.innerElem = this.layerElement;\r\n    }\r\n\r\n    this.checkParenting();\r\n  };\r\n\r\n  HTextElement.prototype.buildNewText = function () {\r\n    var documentData = this.textProperty.currentData;\r\n    this.renderedLetters = createSizedArray(documentData.l ? documentData.l.length : 0);\r\n    var innerElemStyle = this.innerElem.style;\r\n    var textColor = documentData.fc ? this.buildColor(documentData.fc) : 'rgba(0,0,0,0)';\r\n    innerElemStyle.fill = textColor;\r\n    innerElemStyle.color = textColor;\r\n\r\n    if (documentData.sc) {\r\n      innerElemStyle.stroke = this.buildColor(documentData.sc);\r\n      innerElemStyle.strokeWidth = documentData.sw + 'px';\r\n    }\r\n\r\n    var fontData = this.globalData.fontManager.getFontByName(documentData.f);\r\n\r\n    if (!this.globalData.fontManager.chars) {\r\n      innerElemStyle.fontSize = documentData.finalSize + 'px';\r\n      innerElemStyle.lineHeight = documentData.finalSize + 'px';\r\n\r\n      if (fontData.fClass) {\r\n        this.innerElem.className = fontData.fClass;\r\n      } else {\r\n        innerElemStyle.fontFamily = fontData.fFamily;\r\n        var fWeight = documentData.fWeight;\r\n        var fStyle = documentData.fStyle;\r\n        innerElemStyle.fontStyle = fStyle;\r\n        innerElemStyle.fontWeight = fWeight;\r\n      }\r\n    }\r\n\r\n    var i;\r\n    var len;\r\n    var letters = documentData.l;\r\n    len = letters.length;\r\n    var tSpan;\r\n    var tParent;\r\n    var tCont;\r\n    var matrixHelper = this.mHelper;\r\n    var shapes;\r\n    var shapeStr = '';\r\n    var cnt = 0;\r\n\r\n    for (i = 0; i < len; i += 1) {\r\n      if (this.globalData.fontManager.chars) {\r\n        if (!this.textPaths[cnt]) {\r\n          tSpan = createNS('path');\r\n          tSpan.setAttribute('stroke-linecap', lineCapEnum[1]);\r\n          tSpan.setAttribute('stroke-linejoin', lineJoinEnum[2]);\r\n          tSpan.setAttribute('stroke-miterlimit', '4');\r\n        } else {\r\n          tSpan = this.textPaths[cnt];\r\n        }\r\n\r\n        if (!this.isMasked) {\r\n          if (this.textSpans[cnt]) {\r\n            tParent = this.textSpans[cnt];\r\n            tCont = tParent.children[0];\r\n          } else {\r\n            tParent = createTag('div');\r\n            tParent.style.lineHeight = 0;\r\n            tCont = createNS('svg');\r\n            tCont.appendChild(tSpan);\r\n            styleDiv(tParent);\r\n          }\r\n        }\r\n      } else if (!this.isMasked) {\r\n        if (this.textSpans[cnt]) {\r\n          tParent = this.textSpans[cnt];\r\n          tSpan = this.textPaths[cnt];\r\n        } else {\r\n          tParent = createTag('span');\r\n          styleDiv(tParent);\r\n          tSpan = createTag('span');\r\n          styleDiv(tSpan);\r\n          tParent.appendChild(tSpan);\r\n        }\r\n      } else {\r\n        tSpan = this.textPaths[cnt] ? this.textPaths[cnt] : createNS('text');\r\n      } // tSpan.setAttribute('visibility', 'hidden');\r\n\r\n\r\n      if (this.globalData.fontManager.chars) {\r\n        var charData = this.globalData.fontManager.getCharData(documentData.finalText[i], fontData.fStyle, this.globalData.fontManager.getFontByName(documentData.f).fFamily);\r\n        var shapeData;\r\n\r\n        if (charData) {\r\n          shapeData = charData.data;\r\n        } else {\r\n          shapeData = null;\r\n        }\r\n\r\n        matrixHelper.reset();\r\n\r\n        if (shapeData && shapeData.shapes && shapeData.shapes.length) {\r\n          shapes = shapeData.shapes[0].it;\r\n          matrixHelper.scale(documentData.finalSize / 100, documentData.finalSize / 100);\r\n          shapeStr = this.createPathShape(matrixHelper, shapes);\r\n          tSpan.setAttribute('d', shapeStr);\r\n        }\r\n\r\n        if (!this.isMasked) {\r\n          this.innerElem.appendChild(tParent);\r\n\r\n          if (shapeData && shapeData.shapes) {\r\n            // document.body.appendChild is needed to get exact measure of shape\r\n            document.body.appendChild(tCont);\r\n            var boundingBox = tCont.getBBox();\r\n            tCont.setAttribute('width', boundingBox.width + 2);\r\n            tCont.setAttribute('height', boundingBox.height + 2);\r\n            tCont.setAttribute('viewBox', boundingBox.x - 1 + ' ' + (boundingBox.y - 1) + ' ' + (boundingBox.width + 2) + ' ' + (boundingBox.height + 2));\r\n            var tContStyle = tCont.style;\r\n            var tContTranslation = 'translate(' + (boundingBox.x - 1) + 'px,' + (boundingBox.y - 1) + 'px)';\r\n            tContStyle.transform = tContTranslation;\r\n            tContStyle.webkitTransform = tContTranslation;\r\n            letters[i].yOffset = boundingBox.y - 1;\r\n          } else {\r\n            tCont.setAttribute('width', 1);\r\n            tCont.setAttribute('height', 1);\r\n          }\r\n\r\n          tParent.appendChild(tCont);\r\n        } else {\r\n          this.innerElem.appendChild(tSpan);\r\n        }\r\n      } else {\r\n        tSpan.textContent = letters[i].val;\r\n        tSpan.setAttributeNS('http://www.w3.org/XML/1998/namespace', 'xml:space', 'preserve');\r\n\r\n        if (!this.isMasked) {\r\n          this.innerElem.appendChild(tParent); //\r\n\r\n          var tStyle = tSpan.style;\r\n          var tSpanTranslation = 'translate3d(0,' + -documentData.finalSize / 1.2 + 'px,0)';\r\n          tStyle.transform = tSpanTranslation;\r\n          tStyle.webkitTransform = tSpanTranslation;\r\n        } else {\r\n          this.innerElem.appendChild(tSpan);\r\n        }\r\n      } //\r\n\r\n\r\n      if (!this.isMasked) {\r\n        this.textSpans[cnt] = tParent;\r\n      } else {\r\n        this.textSpans[cnt] = tSpan;\r\n      }\r\n\r\n      this.textSpans[cnt].style.display = 'block';\r\n      this.textPaths[cnt] = tSpan;\r\n      cnt += 1;\r\n    }\r\n\r\n    while (cnt < this.textSpans.length) {\r\n      this.textSpans[cnt].style.display = 'none';\r\n      cnt += 1;\r\n    }\r\n  };\r\n\r\n  HTextElement.prototype.renderInnerContent = function () {\r\n    var svgStyle;\r\n\r\n    if (this.data.singleShape) {\r\n      if (!this._isFirstFrame && !this.lettersChangedFlag) {\r\n        return;\r\n      }\r\n\r\n      if (this.isMasked && this.finalTransform._matMdf) {\r\n        // Todo Benchmark if using this is better than getBBox\r\n        this.svgElement.setAttribute('viewBox', -this.finalTransform.mProp.p.v[0] + ' ' + -this.finalTransform.mProp.p.v[1] + ' ' + this.compW + ' ' + this.compH);\r\n        svgStyle = this.svgElement.style;\r\n        var translation = 'translate(' + -this.finalTransform.mProp.p.v[0] + 'px,' + -this.finalTransform.mProp.p.v[1] + 'px)';\r\n        svgStyle.transform = translation;\r\n        svgStyle.webkitTransform = translation;\r\n      }\r\n    }\r\n\r\n    this.textAnimator.getMeasures(this.textProperty.currentData, this.lettersChangedFlag);\r\n\r\n    if (!this.lettersChangedFlag && !this.textAnimator.lettersChangedFlag) {\r\n      return;\r\n    }\r\n\r\n    var i;\r\n    var len;\r\n    var count = 0;\r\n    var renderedLetters = this.textAnimator.renderedLetters;\r\n    var letters = this.textProperty.currentData.l;\r\n    len = letters.length;\r\n    var renderedLetter;\r\n    var textSpan;\r\n    var textPath;\r\n\r\n    for (i = 0; i < len; i += 1) {\r\n      if (letters[i].n) {\r\n        count += 1;\r\n      } else {\r\n        textSpan = this.textSpans[i];\r\n        textPath = this.textPaths[i];\r\n        renderedLetter = renderedLetters[count];\r\n        count += 1;\r\n\r\n        if (renderedLetter._mdf.m) {\r\n          if (!this.isMasked) {\r\n            textSpan.style.webkitTransform = renderedLetter.m;\r\n            textSpan.style.transform = renderedLetter.m;\r\n          } else {\r\n            textSpan.setAttribute('transform', renderedLetter.m);\r\n          }\r\n        } /// /textSpan.setAttribute('opacity',renderedLetter.o);\r\n\r\n\r\n        textSpan.style.opacity = renderedLetter.o;\r\n\r\n        if (renderedLetter.sw && renderedLetter._mdf.sw) {\r\n          textPath.setAttribute('stroke-width', renderedLetter.sw);\r\n        }\r\n\r\n        if (renderedLetter.sc && renderedLetter._mdf.sc) {\r\n          textPath.setAttribute('stroke', renderedLetter.sc);\r\n        }\r\n\r\n        if (renderedLetter.fc && renderedLetter._mdf.fc) {\r\n          textPath.setAttribute('fill', renderedLetter.fc);\r\n          textPath.style.color = renderedLetter.fc;\r\n        }\r\n      }\r\n    }\r\n\r\n    if (this.innerElem.getBBox && !this.hidden && (this._isFirstFrame || this._mdf)) {\r\n      var boundingBox = this.innerElem.getBBox();\r\n\r\n      if (this.currentBBox.w !== boundingBox.width) {\r\n        this.currentBBox.w = boundingBox.width;\r\n        this.svgElement.setAttribute('width', boundingBox.width);\r\n      }\r\n\r\n      if (this.currentBBox.h !== boundingBox.height) {\r\n        this.currentBBox.h = boundingBox.height;\r\n        this.svgElement.setAttribute('height', boundingBox.height);\r\n      }\r\n\r\n      var margin = 1;\r\n\r\n      if (this.currentBBox.w !== boundingBox.width + margin * 2 || this.currentBBox.h !== boundingBox.height + margin * 2 || this.currentBBox.x !== boundingBox.x - margin || this.currentBBox.y !== boundingBox.y - margin) {\r\n        this.currentBBox.w = boundingBox.width + margin * 2;\r\n        this.currentBBox.h = boundingBox.height + margin * 2;\r\n        this.currentBBox.x = boundingBox.x - margin;\r\n        this.currentBBox.y = boundingBox.y - margin;\r\n        this.svgElement.setAttribute('viewBox', this.currentBBox.x + ' ' + this.currentBBox.y + ' ' + this.currentBBox.w + ' ' + this.currentBBox.h);\r\n        svgStyle = this.svgElement.style;\r\n        var svgTransform = 'translate(' + this.currentBBox.x + 'px,' + this.currentBBox.y + 'px)';\r\n        svgStyle.transform = svgTransform;\r\n        svgStyle.webkitTransform = svgTransform;\r\n      }\r\n    }\r\n  };\r\n\r\n  function HCameraElement(data, globalData, comp) {\r\n    this.initFrame();\r\n    this.initBaseData(data, globalData, comp);\r\n    this.initHierarchy();\r\n    var getProp = PropertyFactory.getProp;\r\n    this.pe = getProp(this, data.pe, 0, 0, this);\r\n\r\n    if (data.ks.p.s) {\r\n      this.px = getProp(this, data.ks.p.x, 1, 0, this);\r\n      this.py = getProp(this, data.ks.p.y, 1, 0, this);\r\n      this.pz = getProp(this, data.ks.p.z, 1, 0, this);\r\n    } else {\r\n      this.p = getProp(this, data.ks.p, 1, 0, this);\r\n    }\r\n\r\n    if (data.ks.a) {\r\n      this.a = getProp(this, data.ks.a, 1, 0, this);\r\n    }\r\n\r\n    if (data.ks.or.k.length && data.ks.or.k[0].to) {\r\n      var i;\r\n      var len = data.ks.or.k.length;\r\n\r\n      for (i = 0; i < len; i += 1) {\r\n        data.ks.or.k[i].to = null;\r\n        data.ks.or.k[i].ti = null;\r\n      }\r\n    }\r\n\r\n    this.or = getProp(this, data.ks.or, 1, degToRads, this);\r\n    this.or.sh = true;\r\n    this.rx = getProp(this, data.ks.rx, 0, degToRads, this);\r\n    this.ry = getProp(this, data.ks.ry, 0, degToRads, this);\r\n    this.rz = getProp(this, data.ks.rz, 0, degToRads, this);\r\n    this.mat = new Matrix();\r\n    this._prevMat = new Matrix();\r\n    this._isFirstFrame = true; // TODO: find a better way to make the HCamera element to be compatible with the LayerInterface and TransformInterface.\r\n\r\n    this.finalTransform = {\r\n      mProp: this\r\n    };\r\n  }\r\n\r\n  extendPrototype([BaseElement, FrameElement, HierarchyElement], HCameraElement);\r\n\r\n  HCameraElement.prototype.setup = function () {\r\n    var i;\r\n    var len = this.comp.threeDElements.length;\r\n    var comp;\r\n    var perspectiveStyle;\r\n    var containerStyle;\r\n\r\n    for (i = 0; i < len; i += 1) {\r\n      // [perspectiveElem,container]\r\n      comp = this.comp.threeDElements[i];\r\n\r\n      if (comp.type === '3d') {\r\n        perspectiveStyle = comp.perspectiveElem.style;\r\n        containerStyle = comp.container.style;\r\n        var perspective = this.pe.v + 'px';\r\n        var origin = '0px 0px 0px';\r\n        var matrix = 'matrix3d(1,0,0,0,0,1,0,0,0,0,1,0,0,0,0,1)';\r\n        perspectiveStyle.perspective = perspective;\r\n        perspectiveStyle.webkitPerspective = perspective;\r\n        containerStyle.transformOrigin = origin;\r\n        containerStyle.mozTransformOrigin = origin;\r\n        containerStyle.webkitTransformOrigin = origin;\r\n        perspectiveStyle.transform = matrix;\r\n        perspectiveStyle.webkitTransform = matrix;\r\n      }\r\n    }\r\n  };\r\n\r\n  HCameraElement.prototype.createElements = function () {};\r\n\r\n  HCameraElement.prototype.hide = function () {};\r\n\r\n  HCameraElement.prototype.renderFrame = function () {\r\n    var _mdf = this._isFirstFrame;\r\n    var i;\r\n    var len;\r\n\r\n    if (this.hierarchy) {\r\n      len = this.hierarchy.length;\r\n\r\n      for (i = 0; i < len; i += 1) {\r\n        _mdf = this.hierarchy[i].finalTransform.mProp._mdf || _mdf;\r\n      }\r\n    }\r\n\r\n    if (_mdf || this.pe._mdf || this.p && this.p._mdf || this.px && (this.px._mdf || this.py._mdf || this.pz._mdf) || this.rx._mdf || this.ry._mdf || this.rz._mdf || this.or._mdf || this.a && this.a._mdf) {\r\n      this.mat.reset();\r\n\r\n      if (this.hierarchy) {\r\n        len = this.hierarchy.length - 1;\r\n\r\n        for (i = len; i >= 0; i -= 1) {\r\n          var mTransf = this.hierarchy[i].finalTransform.mProp;\r\n          this.mat.translate(-mTransf.p.v[0], -mTransf.p.v[1], mTransf.p.v[2]);\r\n          this.mat.rotateX(-mTransf.or.v[0]).rotateY(-mTransf.or.v[1]).rotateZ(mTransf.or.v[2]);\r\n          this.mat.rotateX(-mTransf.rx.v).rotateY(-mTransf.ry.v).rotateZ(mTransf.rz.v);\r\n          this.mat.scale(1 / mTransf.s.v[0], 1 / mTransf.s.v[1], 1 / mTransf.s.v[2]);\r\n          this.mat.translate(mTransf.a.v[0], mTransf.a.v[1], mTransf.a.v[2]);\r\n        }\r\n      }\r\n\r\n      if (this.p) {\r\n        this.mat.translate(-this.p.v[0], -this.p.v[1], this.p.v[2]);\r\n      } else {\r\n        this.mat.translate(-this.px.v, -this.py.v, this.pz.v);\r\n      }\r\n\r\n      if (this.a) {\r\n        var diffVector;\r\n\r\n        if (this.p) {\r\n          diffVector = [this.p.v[0] - this.a.v[0], this.p.v[1] - this.a.v[1], this.p.v[2] - this.a.v[2]];\r\n        } else {\r\n          diffVector = [this.px.v - this.a.v[0], this.py.v - this.a.v[1], this.pz.v - this.a.v[2]];\r\n        }\r\n\r\n        var mag = Math.sqrt(Math.pow(diffVector[0], 2) + Math.pow(diffVector[1], 2) + Math.pow(diffVector[2], 2)); // var lookDir = getNormalizedPoint(getDiffVector(this.a.v,this.p.v));\r\n\r\n        var lookDir = [diffVector[0] / mag, diffVector[1] / mag, diffVector[2] / mag];\r\n        var lookLengthOnXZ = Math.sqrt(lookDir[2] * lookDir[2] + lookDir[0] * lookDir[0]);\r\n        var mRotationX = Math.atan2(lookDir[1], lookLengthOnXZ);\r\n        var mRotationY = Math.atan2(lookDir[0], -lookDir[2]);\r\n        this.mat.rotateY(mRotationY).rotateX(-mRotationX);\r\n      }\r\n\r\n      this.mat.rotateX(-this.rx.v).rotateY(-this.ry.v).rotateZ(this.rz.v);\r\n      this.mat.rotateX(-this.or.v[0]).rotateY(-this.or.v[1]).rotateZ(this.or.v[2]);\r\n      this.mat.translate(this.globalData.compSize.w / 2, this.globalData.compSize.h / 2, 0);\r\n      this.mat.translate(0, 0, this.pe.v);\r\n      var hasMatrixChanged = !this._prevMat.equals(this.mat);\r\n\r\n      if ((hasMatrixChanged || this.pe._mdf) && this.comp.threeDElements) {\r\n        len = this.comp.threeDElements.length;\r\n        var comp;\r\n        var perspectiveStyle;\r\n        var containerStyle;\r\n\r\n        for (i = 0; i < len; i += 1) {\r\n          comp = this.comp.threeDElements[i];\r\n\r\n          if (comp.type === '3d') {\r\n            if (hasMatrixChanged) {\r\n              var matValue = this.mat.toCSS();\r\n              containerStyle = comp.container.style;\r\n              containerStyle.transform = matValue;\r\n              containerStyle.webkitTransform = matValue;\r\n            }\r\n\r\n            if (this.pe._mdf) {\r\n              perspectiveStyle = comp.perspectiveElem.style;\r\n              perspectiveStyle.perspective = this.pe.v + 'px';\r\n              perspectiveStyle.webkitPerspective = this.pe.v + 'px';\r\n            }\r\n          }\r\n        }\r\n\r\n        this.mat.clone(this._prevMat);\r\n      }\r\n    }\r\n\r\n    this._isFirstFrame = false;\r\n  };\r\n\r\n  HCameraElement.prototype.prepareFrame = function (num) {\r\n    this.prepareProperties(num, true);\r\n  };\r\n\r\n  HCameraElement.prototype.destroy = function () {};\r\n\r\n  HCameraElement.prototype.getBaseElement = function () {\r\n    return null;\r\n  };\r\n\r\n  function HImageElement(data, globalData, comp) {\r\n    this.assetData = globalData.getAssetData(data.refId);\r\n    this.initElement(data, globalData, comp);\r\n  }\r\n\r\n  extendPrototype([BaseElement, TransformElement, HBaseElement, HSolidElement, HierarchyElement, FrameElement, RenderableElement], HImageElement);\r\n\r\n  HImageElement.prototype.createContent = function () {\r\n    var assetPath = this.globalData.getAssetsPath(this.assetData);\r\n    var img = new Image();\r\n\r\n    if (this.data.hasMask) {\r\n      this.imageElem = createNS('image');\r\n      this.imageElem.setAttribute('width', this.assetData.w + 'px');\r\n      this.imageElem.setAttribute('height', this.assetData.h + 'px');\r\n      this.imageElem.setAttributeNS('http://www.w3.org/1999/xlink', 'href', assetPath);\r\n      this.layerElement.appendChild(this.imageElem);\r\n      this.baseElement.setAttribute('width', this.assetData.w);\r\n      this.baseElement.setAttribute('height', this.assetData.h);\r\n    } else {\r\n      this.layerElement.appendChild(img);\r\n    }\r\n\r\n    img.crossOrigin = 'anonymous';\r\n    img.src = assetPath;\r\n\r\n    if (this.data.ln) {\r\n      this.baseElement.setAttribute('id', this.data.ln);\r\n    }\r\n  };\r\n\r\n  function HybridRendererBase(animationItem, config) {\r\n    this.animationItem = animationItem;\r\n    this.layers = null;\r\n    this.renderedFrame = -1;\r\n    this.renderConfig = {\r\n      className: config && config.className || '',\r\n      imagePreserveAspectRatio: config && config.imagePreserveAspectRatio || 'xMidYMid slice',\r\n      hideOnTransparent: !(config && config.hideOnTransparent === false),\r\n      filterSize: {\r\n        width: config && config.filterSize && config.filterSize.width || '400%',\r\n        height: config && config.filterSize && config.filterSize.height || '400%',\r\n        x: config && config.filterSize && config.filterSize.x || '-100%',\r\n        y: config && config.filterSize && config.filterSize.y || '-100%'\r\n      }\r\n    };\r\n    this.globalData = {\r\n      _mdf: false,\r\n      frameNum: -1,\r\n      renderConfig: this.renderConfig\r\n    };\r\n    this.pendingElements = [];\r\n    this.elements = [];\r\n    this.threeDElements = [];\r\n    this.destroyed = false;\r\n    this.camera = null;\r\n    this.supports3d = true;\r\n    this.rendererType = 'html';\r\n  }\r\n\r\n  extendPrototype([BaseRenderer], HybridRendererBase);\r\n  HybridRendererBase.prototype.buildItem = SVGRenderer.prototype.buildItem;\r\n\r\n  HybridRendererBase.prototype.checkPendingElements = function () {\r\n    while (this.pendingElements.length) {\r\n      var element = this.pendingElements.pop();\r\n      element.checkParenting();\r\n    }\r\n  };\r\n\r\n  HybridRendererBase.prototype.appendElementInPos = function (element, pos) {\r\n    var newDOMElement = element.getBaseElement();\r\n\r\n    if (!newDOMElement) {\r\n      return;\r\n    }\r\n\r\n    var layer = this.layers[pos];\r\n\r\n    if (!layer.ddd || !this.supports3d) {\r\n      if (this.threeDElements) {\r\n        this.addTo3dContainer(newDOMElement, pos);\r\n      } else {\r\n        var i = 0;\r\n        var nextDOMElement;\r\n        var nextLayer;\r\n        var tmpDOMElement;\r\n\r\n        while (i < pos) {\r\n          if (this.elements[i] && this.elements[i] !== true && this.elements[i].getBaseElement) {\r\n            nextLayer = this.elements[i];\r\n            tmpDOMElement = this.layers[i].ddd ? this.getThreeDContainerByPos(i) : nextLayer.getBaseElement();\r\n            nextDOMElement = tmpDOMElement || nextDOMElement;\r\n          }\r\n\r\n          i += 1;\r\n        }\r\n\r\n        if (nextDOMElement) {\r\n          if (!layer.ddd || !this.supports3d) {\r\n            this.layerElement.insertBefore(newDOMElement, nextDOMElement);\r\n          }\r\n        } else if (!layer.ddd || !this.supports3d) {\r\n          this.layerElement.appendChild(newDOMElement);\r\n        }\r\n      }\r\n    } else {\r\n      this.addTo3dContainer(newDOMElement, pos);\r\n    }\r\n  };\r\n\r\n  HybridRendererBase.prototype.createShape = function (data) {\r\n    if (!this.supports3d) {\r\n      return new SVGShapeElement(data, this.globalData, this);\r\n    }\r\n\r\n    return new HShapeElement(data, this.globalData, this);\r\n  };\r\n\r\n  HybridRendererBase.prototype.createText = function (data) {\r\n    if (!this.supports3d) {\r\n      return new SVGTextLottieElement(data, this.globalData, this);\r\n    }\r\n\r\n    return new HTextElement(data, this.globalData, this);\r\n  };\r\n\r\n  HybridRendererBase.prototype.createCamera = function (data) {\r\n    this.camera = new HCameraElement(data, this.globalData, this);\r\n    return this.camera;\r\n  };\r\n\r\n  HybridRendererBase.prototype.createImage = function (data) {\r\n    if (!this.supports3d) {\r\n      return new IImageElement(data, this.globalData, this);\r\n    }\r\n\r\n    return new HImageElement(data, this.globalData, this);\r\n  };\r\n\r\n  HybridRendererBase.prototype.createSolid = function (data) {\r\n    if (!this.supports3d) {\r\n      return new ISolidElement(data, this.globalData, this);\r\n    }\r\n\r\n    return new HSolidElement(data, this.globalData, this);\r\n  };\r\n\r\n  HybridRendererBase.prototype.createNull = SVGRenderer.prototype.createNull;\r\n\r\n  HybridRendererBase.prototype.getThreeDContainerByPos = function (pos) {\r\n    var i = 0;\r\n    var len = this.threeDElements.length;\r\n\r\n    while (i < len) {\r\n      if (this.threeDElements[i].startPos <= pos && this.threeDElements[i].endPos >= pos) {\r\n        return this.threeDElements[i].perspectiveElem;\r\n      }\r\n\r\n      i += 1;\r\n    }\r\n\r\n    return null;\r\n  };\r\n\r\n  HybridRendererBase.prototype.createThreeDContainer = function (pos, type) {\r\n    var perspectiveElem = createTag('div');\r\n    var style;\r\n    var containerStyle;\r\n    styleDiv(perspectiveElem);\r\n    var container = createTag('div');\r\n    styleDiv(container);\r\n\r\n    if (type === '3d') {\r\n      style = perspectiveElem.style;\r\n      style.width = this.globalData.compSize.w + 'px';\r\n      style.height = this.globalData.compSize.h + 'px';\r\n      var center = '50% 50%';\r\n      style.webkitTransformOrigin = center;\r\n      style.mozTransformOrigin = center;\r\n      style.transformOrigin = center;\r\n      containerStyle = container.style;\r\n      var matrix = 'matrix3d(1,0,0,0,0,1,0,0,0,0,1,0,0,0,0,1)';\r\n      containerStyle.transform = matrix;\r\n      containerStyle.webkitTransform = matrix;\r\n    }\r\n\r\n    perspectiveElem.appendChild(container); // this.resizerElem.appendChild(perspectiveElem);\r\n\r\n    var threeDContainerData = {\r\n      container: container,\r\n      perspectiveElem: perspectiveElem,\r\n      startPos: pos,\r\n      endPos: pos,\r\n      type: type\r\n    };\r\n    this.threeDElements.push(threeDContainerData);\r\n    return threeDContainerData;\r\n  };\r\n\r\n  HybridRendererBase.prototype.build3dContainers = function () {\r\n    var i;\r\n    var len = this.layers.length;\r\n    var lastThreeDContainerData;\r\n    var currentContainer = '';\r\n\r\n    for (i = 0; i < len; i += 1) {\r\n      if (this.layers[i].ddd && this.layers[i].ty !== 3) {\r\n        if (currentContainer !== '3d') {\r\n          currentContainer = '3d';\r\n          lastThreeDContainerData = this.createThreeDContainer(i, '3d');\r\n        }\r\n\r\n        lastThreeDContainerData.endPos = Math.max(lastThreeDContainerData.endPos, i);\r\n      } else {\r\n        if (currentContainer !== '2d') {\r\n          currentContainer = '2d';\r\n          lastThreeDContainerData = this.createThreeDContainer(i, '2d');\r\n        }\r\n\r\n        lastThreeDContainerData.endPos = Math.max(lastThreeDContainerData.endPos, i);\r\n      }\r\n    }\r\n\r\n    len = this.threeDElements.length;\r\n\r\n    for (i = len - 1; i >= 0; i -= 1) {\r\n      this.resizerElem.appendChild(this.threeDElements[i].perspectiveElem);\r\n    }\r\n  };\r\n\r\n  HybridRendererBase.prototype.addTo3dContainer = function (elem, pos) {\r\n    var i = 0;\r\n    var len = this.threeDElements.length;\r\n\r\n    while (i < len) {\r\n      if (pos <= this.threeDElements[i].endPos) {\r\n        var j = this.threeDElements[i].startPos;\r\n        var nextElement;\r\n\r\n        while (j < pos) {\r\n          if (this.elements[j] && this.elements[j].getBaseElement) {\r\n            nextElement = this.elements[j].getBaseElement();\r\n          }\r\n\r\n          j += 1;\r\n        }\r\n\r\n        if (nextElement) {\r\n          this.threeDElements[i].container.insertBefore(elem, nextElement);\r\n        } else {\r\n          this.threeDElements[i].container.appendChild(elem);\r\n        }\r\n\r\n        break;\r\n      }\r\n\r\n      i += 1;\r\n    }\r\n  };\r\n\r\n  HybridRendererBase.prototype.configAnimation = function (animData) {\r\n    var resizerElem = createTag('div');\r\n    var wrapper = this.animationItem.wrapper;\r\n    var style = resizerElem.style;\r\n    style.width = animData.w + 'px';\r\n    style.height = animData.h + 'px';\r\n    this.resizerElem = resizerElem;\r\n    styleDiv(resizerElem);\r\n    style.transformStyle = 'flat';\r\n    style.mozTransformStyle = 'flat';\r\n    style.webkitTransformStyle = 'flat';\r\n\r\n    if (this.renderConfig.className) {\r\n      resizerElem.setAttribute('class', this.renderConfig.className);\r\n    }\r\n\r\n    wrapper.appendChild(resizerElem);\r\n    style.overflow = 'hidden';\r\n    var svg = createNS('svg');\r\n    svg.setAttribute('width', '1');\r\n    svg.setAttribute('height', '1');\r\n    styleDiv(svg);\r\n    this.resizerElem.appendChild(svg);\r\n    var defs = createNS('defs');\r\n    svg.appendChild(defs);\r\n    this.data = animData; // Mask animation\r\n\r\n    this.setupGlobalData(animData, svg);\r\n    this.globalData.defs = defs;\r\n    this.layers = animData.layers;\r\n    this.layerElement = this.resizerElem;\r\n    this.build3dContainers();\r\n    this.updateContainerSize();\r\n  };\r\n\r\n  HybridRendererBase.prototype.destroy = function () {\r\n    if (this.animationItem.wrapper) {\r\n      this.animationItem.wrapper.innerText = '';\r\n    }\r\n\r\n    this.animationItem.container = null;\r\n    this.globalData.defs = null;\r\n    var i;\r\n    var len = this.layers ? this.layers.length : 0;\r\n\r\n    for (i = 0; i < len; i += 1) {\r\n      this.elements[i].destroy();\r\n    }\r\n\r\n    this.elements.length = 0;\r\n    this.destroyed = true;\r\n    this.animationItem = null;\r\n  };\r\n\r\n  HybridRendererBase.prototype.updateContainerSize = function () {\r\n    var elementWidth = this.animationItem.wrapper.offsetWidth;\r\n    var elementHeight = this.animationItem.wrapper.offsetHeight;\r\n    var elementRel = elementWidth / elementHeight;\r\n    var animationRel = this.globalData.compSize.w / this.globalData.compSize.h;\r\n    var sx;\r\n    var sy;\r\n    var tx;\r\n    var ty;\r\n\r\n    if (animationRel > elementRel) {\r\n      sx = elementWidth / this.globalData.compSize.w;\r\n      sy = elementWidth / this.globalData.compSize.w;\r\n      tx = 0;\r\n      ty = (elementHeight - this.globalData.compSize.h * (elementWidth / this.globalData.compSize.w)) / 2;\r\n    } else {\r\n      sx = elementHeight / this.globalData.compSize.h;\r\n      sy = elementHeight / this.globalData.compSize.h;\r\n      tx = (elementWidth - this.globalData.compSize.w * (elementHeight / this.globalData.compSize.h)) / 2;\r\n      ty = 0;\r\n    }\r\n\r\n    var style = this.resizerElem.style;\r\n    style.webkitTransform = 'matrix3d(' + sx + ',0,0,0,0,' + sy + ',0,0,0,0,1,0,' + tx + ',' + ty + ',0,1)';\r\n    style.transform = style.webkitTransform;\r\n  };\r\n\r\n  HybridRendererBase.prototype.renderFrame = SVGRenderer.prototype.renderFrame;\r\n\r\n  HybridRendererBase.prototype.hide = function () {\r\n    this.resizerElem.style.display = 'none';\r\n  };\r\n\r\n  HybridRendererBase.prototype.show = function () {\r\n    this.resizerElem.style.display = 'block';\r\n  };\r\n\r\n  HybridRendererBase.prototype.initItems = function () {\r\n    this.buildAllItems();\r\n\r\n    if (this.camera) {\r\n      this.camera.setup();\r\n    } else {\r\n      var cWidth = this.globalData.compSize.w;\r\n      var cHeight = this.globalData.compSize.h;\r\n      var i;\r\n      var len = this.threeDElements.length;\r\n\r\n      for (i = 0; i < len; i += 1) {\r\n        var style = this.threeDElements[i].perspectiveElem.style;\r\n        style.webkitPerspective = Math.sqrt(Math.pow(cWidth, 2) + Math.pow(cHeight, 2)) + 'px';\r\n        style.perspective = style.webkitPerspective;\r\n      }\r\n    }\r\n  };\r\n\r\n  HybridRendererBase.prototype.searchExtraCompositions = function (assets) {\r\n    var i;\r\n    var len = assets.length;\r\n    var floatingContainer = createTag('div');\r\n\r\n    for (i = 0; i < len; i += 1) {\r\n      if (assets[i].xt) {\r\n        var comp = this.createComp(assets[i], floatingContainer, this.globalData.comp, null);\r\n        comp.initExpressions();\r\n        this.globalData.projectInterface.registerComposition(comp);\r\n      }\r\n    }\r\n  };\r\n\r\n  function HCompElement(data, globalData, comp) {\r\n    this.layers = data.layers;\r\n    this.supports3d = !data.hasMask;\r\n    this.completeLayers = false;\r\n    this.pendingElements = [];\r\n    this.elements = this.layers ? createSizedArray(this.layers.length) : [];\r\n    this.initElement(data, globalData, comp);\r\n    this.tm = data.tm ? PropertyFactory.getProp(this, data.tm, 0, globalData.frameRate, this) : {\r\n      _placeholder: true\r\n    };\r\n  }\r\n\r\n  extendPrototype([HybridRendererBase, ICompElement, HBaseElement], HCompElement);\r\n  HCompElement.prototype._createBaseContainerElements = HCompElement.prototype.createContainerElements;\r\n\r\n  HCompElement.prototype.createContainerElements = function () {\r\n    this._createBaseContainerElements(); // divElement.style.clip = 'rect(0px, '+this.data.w+'px, '+this.data.h+'px, 0px)';\r\n\r\n\r\n    if (this.data.hasMask) {\r\n      this.svgElement.setAttribute('width', this.data.w);\r\n      this.svgElement.setAttribute('height', this.data.h);\r\n      this.transformedElement = this.baseElement;\r\n    } else {\r\n      this.transformedElement = this.layerElement;\r\n    }\r\n  };\r\n\r\n  HCompElement.prototype.addTo3dContainer = function (elem, pos) {\r\n    var j = 0;\r\n    var nextElement;\r\n\r\n    while (j < pos) {\r\n      if (this.elements[j] && this.elements[j].getBaseElement) {\r\n        nextElement = this.elements[j].getBaseElement();\r\n      }\r\n\r\n      j += 1;\r\n    }\r\n\r\n    if (nextElement) {\r\n      this.layerElement.insertBefore(elem, nextElement);\r\n    } else {\r\n      this.layerElement.appendChild(elem);\r\n    }\r\n  };\r\n\r\n  HCompElement.prototype.createComp = function (data) {\r\n    if (!this.supports3d) {\r\n      return new SVGCompElement(data, this.globalData, this);\r\n    }\r\n\r\n    return new HCompElement(data, this.globalData, this);\r\n  };\r\n\r\n  function HybridRenderer(animationItem, config) {\r\n    this.animationItem = animationItem;\r\n    this.layers = null;\r\n    this.renderedFrame = -1;\r\n    this.renderConfig = {\r\n      className: config && config.className || '',\r\n      imagePreserveAspectRatio: config && config.imagePreserveAspectRatio || 'xMidYMid slice',\r\n      hideOnTransparent: !(config && config.hideOnTransparent === false),\r\n      filterSize: {\r\n        width: config && config.filterSize && config.filterSize.width || '400%',\r\n        height: config && config.filterSize && config.filterSize.height || '400%',\r\n        x: config && config.filterSize && config.filterSize.x || '-100%',\r\n        y: config && config.filterSize && config.filterSize.y || '-100%'\r\n      },\r\n      runExpressions: !config || config.runExpressions === undefined || config.runExpressions\r\n    };\r\n    this.globalData = {\r\n      _mdf: false,\r\n      frameNum: -1,\r\n      renderConfig: this.renderConfig\r\n    };\r\n    this.pendingElements = [];\r\n    this.elements = [];\r\n    this.threeDElements = [];\r\n    this.destroyed = false;\r\n    this.camera = null;\r\n    this.supports3d = true;\r\n    this.rendererType = 'html';\r\n  }\r\n\r\n  extendPrototype([HybridRendererBase], HybridRenderer);\r\n\r\n  HybridRenderer.prototype.createComp = function (data) {\r\n    if (!this.supports3d) {\r\n      return new SVGCompElement(data, this.globalData, this);\r\n    }\r\n\r\n    return new HCompElement(data, this.globalData, this);\r\n  };\r\n\r\n  var CompExpressionInterface = function () {\r\n    return function (comp) {\r\n      function _thisLayerFunction(name) {\r\n        var i = 0;\r\n        var len = comp.layers.length;\r\n\r\n        while (i < len) {\r\n          if (comp.layers[i].nm === name || comp.layers[i].ind === name) {\r\n            return comp.elements[i].layerInterface;\r\n          }\r\n\r\n          i += 1;\r\n        }\r\n\r\n        return null; // return {active:false};\r\n      }\r\n\r\n      Object.defineProperty(_thisLayerFunction, '_name', {\r\n        value: comp.data.nm\r\n      });\r\n      _thisLayerFunction.layer = _thisLayerFunction;\r\n      _thisLayerFunction.pixelAspect = 1;\r\n      _thisLayerFunction.height = comp.data.h || comp.globalData.compSize.h;\r\n      _thisLayerFunction.width = comp.data.w || comp.globalData.compSize.w;\r\n      _thisLayerFunction.pixelAspect = 1;\r\n      _thisLayerFunction.frameDuration = 1 / comp.globalData.frameRate;\r\n      _thisLayerFunction.displayStartTime = 0;\r\n      _thisLayerFunction.numLayers = comp.layers.length;\r\n      return _thisLayerFunction;\r\n    };\r\n  }();\r\n\r\n  var Expressions = function () {\r\n    var ob = {};\r\n    ob.initExpressions = initExpressions;\r\n\r\n    function initExpressions(animation) {\r\n      var stackCount = 0;\r\n      var registers = [];\r\n\r\n      function pushExpression() {\r\n        stackCount += 1;\r\n      }\r\n\r\n      function popExpression() {\r\n        stackCount -= 1;\r\n\r\n        if (stackCount === 0) {\r\n          releaseInstances();\r\n        }\r\n      }\r\n\r\n      function registerExpressionProperty(expression) {\r\n        if (registers.indexOf(expression) === -1) {\r\n          registers.push(expression);\r\n        }\r\n      }\r\n\r\n      function releaseInstances() {\r\n        var i;\r\n        var len = registers.length;\r\n\r\n        for (i = 0; i < len; i += 1) {\r\n          registers[i].release();\r\n        }\r\n\r\n        registers.length = 0;\r\n      }\r\n\r\n      animation.renderer.compInterface = CompExpressionInterface(animation.renderer);\r\n      animation.renderer.globalData.projectInterface.registerComposition(animation.renderer);\r\n      animation.renderer.globalData.pushExpression = pushExpression;\r\n      animation.renderer.globalData.popExpression = popExpression;\r\n      animation.renderer.globalData.registerExpressionProperty = registerExpressionProperty;\r\n    }\r\n\r\n    return ob;\r\n  }();\r\n\r\n  var MaskManagerInterface = function () {\r\n    function MaskInterface(mask, data) {\r\n      this._mask = mask;\r\n      this._data = data;\r\n    }\r\n\r\n    Object.defineProperty(MaskInterface.prototype, 'maskPath', {\r\n      get: function get() {\r\n        if (this._mask.prop.k) {\r\n          this._mask.prop.getValue();\r\n        }\r\n\r\n        return this._mask.prop;\r\n      }\r\n    });\r\n    Object.defineProperty(MaskInterface.prototype, 'maskOpacity', {\r\n      get: function get() {\r\n        if (this._mask.op.k) {\r\n          this._mask.op.getValue();\r\n        }\r\n\r\n        return this._mask.op.v * 100;\r\n      }\r\n    });\r\n\r\n    var MaskManager = function MaskManager(maskManager) {\r\n      var _masksInterfaces = createSizedArray(maskManager.viewData.length);\r\n\r\n      var i;\r\n      var len = maskManager.viewData.length;\r\n\r\n      for (i = 0; i < len; i += 1) {\r\n        _masksInterfaces[i] = new MaskInterface(maskManager.viewData[i], maskManager.masksProperties[i]);\r\n      }\r\n\r\n      var maskFunction = function maskFunction(name) {\r\n        i = 0;\r\n\r\n        while (i < len) {\r\n          if (maskManager.masksProperties[i].nm === name) {\r\n            return _masksInterfaces[i];\r\n          }\r\n\r\n          i += 1;\r\n        }\r\n\r\n        return null;\r\n      };\r\n\r\n      return maskFunction;\r\n    };\r\n\r\n    return MaskManager;\r\n  }();\r\n\r\n  var ExpressionPropertyInterface = function () {\r\n    var defaultUnidimensionalValue = {\r\n      pv: 0,\r\n      v: 0,\r\n      mult: 1\r\n    };\r\n    var defaultMultidimensionalValue = {\r\n      pv: [0, 0, 0],\r\n      v: [0, 0, 0],\r\n      mult: 1\r\n    };\r\n\r\n    function completeProperty(expressionValue, property, type) {\r\n      Object.defineProperty(expressionValue, 'velocity', {\r\n        get: function get() {\r\n          return property.getVelocityAtTime(property.comp.currentFrame);\r\n        }\r\n      });\r\n      expressionValue.numKeys = property.keyframes ? property.keyframes.length : 0;\r\n\r\n      expressionValue.key = function (pos) {\r\n        if (!expressionValue.numKeys) {\r\n          return 0;\r\n        }\r\n\r\n        var value = '';\r\n\r\n        if ('s' in property.keyframes[pos - 1]) {\r\n          value = property.keyframes[pos - 1].s;\r\n        } else if ('e' in property.keyframes[pos - 2]) {\r\n          value = property.keyframes[pos - 2].e;\r\n        } else {\r\n          value = property.keyframes[pos - 2].s;\r\n        }\r\n\r\n        var valueProp = type === 'unidimensional' ? new Number(value) : Object.assign({}, value); // eslint-disable-line no-new-wrappers\r\n\r\n        valueProp.time = property.keyframes[pos - 1].t / property.elem.comp.globalData.frameRate;\r\n        valueProp.value = type === 'unidimensional' ? value[0] : value;\r\n        return valueProp;\r\n      };\r\n\r\n      expressionValue.valueAtTime = property.getValueAtTime;\r\n      expressionValue.speedAtTime = property.getSpeedAtTime;\r\n      expressionValue.velocityAtTime = property.getVelocityAtTime;\r\n      expressionValue.propertyGroup = property.propertyGroup;\r\n    }\r\n\r\n    function UnidimensionalPropertyInterface(property) {\r\n      if (!property || !('pv' in property)) {\r\n        property = defaultUnidimensionalValue;\r\n      }\r\n\r\n      var mult = 1 / property.mult;\r\n      var val = property.pv * mult;\r\n      var expressionValue = new Number(val); // eslint-disable-line no-new-wrappers\r\n\r\n      expressionValue.value = val;\r\n      completeProperty(expressionValue, property, 'unidimensional');\r\n      return function () {\r\n        if (property.k) {\r\n          property.getValue();\r\n        }\r\n\r\n        val = property.v * mult;\r\n\r\n        if (expressionValue.value !== val) {\r\n          expressionValue = new Number(val); // eslint-disable-line no-new-wrappers\r\n\r\n          expressionValue.value = val;\r\n          completeProperty(expressionValue, property, 'unidimensional');\r\n        }\r\n\r\n        return expressionValue;\r\n      };\r\n    }\r\n\r\n    function MultidimensionalPropertyInterface(property) {\r\n      if (!property || !('pv' in property)) {\r\n        property = defaultMultidimensionalValue;\r\n      }\r\n\r\n      var mult = 1 / property.mult;\r\n      var len = property.data && property.data.l || property.pv.length;\r\n      var expressionValue = createTypedArray('float32', len);\r\n      var arrValue = createTypedArray('float32', len);\r\n      expressionValue.value = arrValue;\r\n      completeProperty(expressionValue, property, 'multidimensional');\r\n      return function () {\r\n        if (property.k) {\r\n          property.getValue();\r\n        }\r\n\r\n        for (var i = 0; i < len; i += 1) {\r\n          arrValue[i] = property.v[i] * mult;\r\n          expressionValue[i] = arrValue[i];\r\n        }\r\n\r\n        return expressionValue;\r\n      };\r\n    } // TODO: try to avoid using this getter\r\n\r\n\r\n    function defaultGetter() {\r\n      return defaultUnidimensionalValue;\r\n    }\r\n\r\n    return function (property) {\r\n      if (!property) {\r\n        return defaultGetter;\r\n      }\r\n\r\n      if (property.propType === 'unidimensional') {\r\n        return UnidimensionalPropertyInterface(property);\r\n      }\r\n\r\n      return MultidimensionalPropertyInterface(property);\r\n    };\r\n  }();\r\n\r\n  var TransformExpressionInterface = function () {\r\n    return function (transform) {\r\n      function _thisFunction(name) {\r\n        switch (name) {\r\n          case 'scale':\r\n          case 'Scale':\r\n          case 'ADBE Scale':\r\n          case 6:\r\n            return _thisFunction.scale;\r\n\r\n          case 'rotation':\r\n          case 'Rotation':\r\n          case 'ADBE Rotation':\r\n          case 'ADBE Rotate Z':\r\n          case 10:\r\n            return _thisFunction.rotation;\r\n\r\n          case 'ADBE Rotate X':\r\n            return _thisFunction.xRotation;\r\n\r\n          case 'ADBE Rotate Y':\r\n            return _thisFunction.yRotation;\r\n\r\n          case 'position':\r\n          case 'Position':\r\n          case 'ADBE Position':\r\n          case 2:\r\n            return _thisFunction.position;\r\n\r\n          case 'ADBE Position_0':\r\n            return _thisFunction.xPosition;\r\n\r\n          case 'ADBE Position_1':\r\n            return _thisFunction.yPosition;\r\n\r\n          case 'ADBE Position_2':\r\n            return _thisFunction.zPosition;\r\n\r\n          case 'anchorPoint':\r\n          case 'AnchorPoint':\r\n          case 'Anchor Point':\r\n          case 'ADBE AnchorPoint':\r\n          case 1:\r\n            return _thisFunction.anchorPoint;\r\n\r\n          case 'opacity':\r\n          case 'Opacity':\r\n          case 11:\r\n            return _thisFunction.opacity;\r\n\r\n          default:\r\n            return null;\r\n        }\r\n      }\r\n\r\n      Object.defineProperty(_thisFunction, 'rotation', {\r\n        get: ExpressionPropertyInterface(transform.r || transform.rz)\r\n      });\r\n      Object.defineProperty(_thisFunction, 'zRotation', {\r\n        get: ExpressionPropertyInterface(transform.rz || transform.r)\r\n      });\r\n      Object.defineProperty(_thisFunction, 'xRotation', {\r\n        get: ExpressionPropertyInterface(transform.rx)\r\n      });\r\n      Object.defineProperty(_thisFunction, 'yRotation', {\r\n        get: ExpressionPropertyInterface(transform.ry)\r\n      });\r\n      Object.defineProperty(_thisFunction, 'scale', {\r\n        get: ExpressionPropertyInterface(transform.s)\r\n      });\r\n\r\n      var _px;\r\n\r\n      var _py;\r\n\r\n      var _pz;\r\n\r\n      var _transformFactory;\r\n\r\n      if (transform.p) {\r\n        _transformFactory = ExpressionPropertyInterface(transform.p);\r\n      } else {\r\n        _px = ExpressionPropertyInterface(transform.px);\r\n        _py = ExpressionPropertyInterface(transform.py);\r\n\r\n        if (transform.pz) {\r\n          _pz = ExpressionPropertyInterface(transform.pz);\r\n        }\r\n      }\r\n\r\n      Object.defineProperty(_thisFunction, 'position', {\r\n        get: function get() {\r\n          if (transform.p) {\r\n            return _transformFactory();\r\n          }\r\n\r\n          return [_px(), _py(), _pz ? _pz() : 0];\r\n        }\r\n      });\r\n      Object.defineProperty(_thisFunction, 'xPosition', {\r\n        get: ExpressionPropertyInterface(transform.px)\r\n      });\r\n      Object.defineProperty(_thisFunction, 'yPosition', {\r\n        get: ExpressionPropertyInterface(transform.py)\r\n      });\r\n      Object.defineProperty(_thisFunction, 'zPosition', {\r\n        get: ExpressionPropertyInterface(transform.pz)\r\n      });\r\n      Object.defineProperty(_thisFunction, 'anchorPoint', {\r\n        get: ExpressionPropertyInterface(transform.a)\r\n      });\r\n      Object.defineProperty(_thisFunction, 'opacity', {\r\n        get: ExpressionPropertyInterface(transform.o)\r\n      });\r\n      Object.defineProperty(_thisFunction, 'skew', {\r\n        get: ExpressionPropertyInterface(transform.sk)\r\n      });\r\n      Object.defineProperty(_thisFunction, 'skewAxis', {\r\n        get: ExpressionPropertyInterface(transform.sa)\r\n      });\r\n      Object.defineProperty(_thisFunction, 'orientation', {\r\n        get: ExpressionPropertyInterface(transform.or)\r\n      });\r\n      return _thisFunction;\r\n    };\r\n  }();\r\n\r\n  var LayerExpressionInterface = function () {\r\n    function getMatrix(time) {\r\n      var toWorldMat = new Matrix();\r\n\r\n      if (time !== undefined) {\r\n        var propMatrix = this._elem.finalTransform.mProp.getValueAtTime(time);\r\n\r\n        propMatrix.clone(toWorldMat);\r\n      } else {\r\n        var transformMat = this._elem.finalTransform.mProp;\r\n        transformMat.applyToMatrix(toWorldMat);\r\n      }\r\n\r\n      return toWorldMat;\r\n    }\r\n\r\n    function toWorldVec(arr, time) {\r\n      var toWorldMat = this.getMatrix(time);\r\n      toWorldMat.props[12] = 0;\r\n      toWorldMat.props[13] = 0;\r\n      toWorldMat.props[14] = 0;\r\n      return this.applyPoint(toWorldMat, arr);\r\n    }\r\n\r\n    function toWorld(arr, time) {\r\n      var toWorldMat = this.getMatrix(time);\r\n      return this.applyPoint(toWorldMat, arr);\r\n    }\r\n\r\n    function fromWorldVec(arr, time) {\r\n      var toWorldMat = this.getMatrix(time);\r\n      toWorldMat.props[12] = 0;\r\n      toWorldMat.props[13] = 0;\r\n      toWorldMat.props[14] = 0;\r\n      return this.invertPoint(toWorldMat, arr);\r\n    }\r\n\r\n    function fromWorld(arr, time) {\r\n      var toWorldMat = this.getMatrix(time);\r\n      return this.invertPoint(toWorldMat, arr);\r\n    }\r\n\r\n    function applyPoint(matrix, arr) {\r\n      if (this._elem.hierarchy && this._elem.hierarchy.length) {\r\n        var i;\r\n        var len = this._elem.hierarchy.length;\r\n\r\n        for (i = 0; i < len; i += 1) {\r\n          this._elem.hierarchy[i].finalTransform.mProp.applyToMatrix(matrix);\r\n        }\r\n      }\r\n\r\n      return matrix.applyToPointArray(arr[0], arr[1], arr[2] || 0);\r\n    }\r\n\r\n    function invertPoint(matrix, arr) {\r\n      if (this._elem.hierarchy && this._elem.hierarchy.length) {\r\n        var i;\r\n        var len = this._elem.hierarchy.length;\r\n\r\n        for (i = 0; i < len; i += 1) {\r\n          this._elem.hierarchy[i].finalTransform.mProp.applyToMatrix(matrix);\r\n        }\r\n      }\r\n\r\n      return matrix.inversePoint(arr);\r\n    }\r\n\r\n    function fromComp(arr) {\r\n      var toWorldMat = new Matrix();\r\n      toWorldMat.reset();\r\n\r\n      this._elem.finalTransform.mProp.applyToMatrix(toWorldMat);\r\n\r\n      if (this._elem.hierarchy && this._elem.hierarchy.length) {\r\n        var i;\r\n        var len = this._elem.hierarchy.length;\r\n\r\n        for (i = 0; i < len; i += 1) {\r\n          this._elem.hierarchy[i].finalTransform.mProp.applyToMatrix(toWorldMat);\r\n        }\r\n\r\n        return toWorldMat.inversePoint(arr);\r\n      }\r\n\r\n      return toWorldMat.inversePoint(arr);\r\n    }\r\n\r\n    function sampleImage() {\r\n      return [1, 1, 1, 1];\r\n    }\r\n\r\n    return function (elem) {\r\n      var transformInterface;\r\n\r\n      function _registerMaskInterface(maskManager) {\r\n        _thisLayerFunction.mask = new MaskManagerInterface(maskManager, elem);\r\n      }\r\n\r\n      function _registerEffectsInterface(effects) {\r\n        _thisLayerFunction.effect = effects;\r\n      }\r\n\r\n      function _thisLayerFunction(name) {\r\n        switch (name) {\r\n          case 'ADBE Root Vectors Group':\r\n          case 'Contents':\r\n          case 2:\r\n            return _thisLayerFunction.shapeInterface;\r\n\r\n          case 1:\r\n          case 6:\r\n          case 'Transform':\r\n          case 'transform':\r\n          case 'ADBE Transform Group':\r\n            return transformInterface;\r\n\r\n          case 4:\r\n          case 'ADBE Effect Parade':\r\n          case 'effects':\r\n          case 'Effects':\r\n            return _thisLayerFunction.effect;\r\n\r\n          case 'ADBE Text Properties':\r\n            return _thisLayerFunction.textInterface;\r\n\r\n          default:\r\n            return null;\r\n        }\r\n      }\r\n\r\n      _thisLayerFunction.getMatrix = getMatrix;\r\n      _thisLayerFunction.invertPoint = invertPoint;\r\n      _thisLayerFunction.applyPoint = applyPoint;\r\n      _thisLayerFunction.toWorld = toWorld;\r\n      _thisLayerFunction.toWorldVec = toWorldVec;\r\n      _thisLayerFunction.fromWorld = fromWorld;\r\n      _thisLayerFunction.fromWorldVec = fromWorldVec;\r\n      _thisLayerFunction.toComp = toWorld;\r\n      _thisLayerFunction.fromComp = fromComp;\r\n      _thisLayerFunction.sampleImage = sampleImage;\r\n      _thisLayerFunction.sourceRectAtTime = elem.sourceRectAtTime.bind(elem);\r\n      _thisLayerFunction._elem = elem;\r\n      transformInterface = TransformExpressionInterface(elem.finalTransform.mProp);\r\n      var anchorPointDescriptor = getDescriptor(transformInterface, 'anchorPoint');\r\n      Object.defineProperties(_thisLayerFunction, {\r\n        hasParent: {\r\n          get: function get() {\r\n            return elem.hierarchy.length;\r\n          }\r\n        },\r\n        parent: {\r\n          get: function get() {\r\n            return elem.hierarchy[0].layerInterface;\r\n          }\r\n        },\r\n        rotation: getDescriptor(transformInterface, 'rotation'),\r\n        scale: getDescriptor(transformInterface, 'scale'),\r\n        position: getDescriptor(transformInterface, 'position'),\r\n        opacity: getDescriptor(transformInterface, 'opacity'),\r\n        anchorPoint: anchorPointDescriptor,\r\n        anchor_point: anchorPointDescriptor,\r\n        transform: {\r\n          get: function get() {\r\n            return transformInterface;\r\n          }\r\n        },\r\n        active: {\r\n          get: function get() {\r\n            return elem.isInRange;\r\n          }\r\n        }\r\n      });\r\n      _thisLayerFunction.startTime = elem.data.st;\r\n      _thisLayerFunction.index = elem.data.ind;\r\n      _thisLayerFunction.source = elem.data.refId;\r\n      _thisLayerFunction.height = elem.data.ty === 0 ? elem.data.h : 100;\r\n      _thisLayerFunction.width = elem.data.ty === 0 ? elem.data.w : 100;\r\n      _thisLayerFunction.inPoint = elem.data.ip / elem.comp.globalData.frameRate;\r\n      _thisLayerFunction.outPoint = elem.data.op / elem.comp.globalData.frameRate;\r\n      _thisLayerFunction._name = elem.data.nm;\r\n      _thisLayerFunction.registerMaskInterface = _registerMaskInterface;\r\n      _thisLayerFunction.registerEffectsInterface = _registerEffectsInterface;\r\n      return _thisLayerFunction;\r\n    };\r\n  }();\r\n\r\n  var propertyGroupFactory = function () {\r\n    return function (interfaceFunction, parentPropertyGroup) {\r\n      return function (val) {\r\n        val = val === undefined ? 1 : val;\r\n\r\n        if (val <= 0) {\r\n          return interfaceFunction;\r\n        }\r\n\r\n        return parentPropertyGroup(val - 1);\r\n      };\r\n    };\r\n  }();\r\n\r\n  var PropertyInterface = function () {\r\n    return function (propertyName, propertyGroup) {\r\n      var interfaceFunction = {\r\n        _name: propertyName\r\n      };\r\n\r\n      function _propertyGroup(val) {\r\n        val = val === undefined ? 1 : val;\r\n\r\n        if (val <= 0) {\r\n          return interfaceFunction;\r\n        }\r\n\r\n        return propertyGroup(val - 1);\r\n      }\r\n\r\n      return _propertyGroup;\r\n    };\r\n  }();\r\n\r\n  var EffectsExpressionInterface = function () {\r\n    var ob = {\r\n      createEffectsInterface: createEffectsInterface\r\n    };\r\n\r\n    function createEffectsInterface(elem, propertyGroup) {\r\n      if (elem.effectsManager) {\r\n        var effectElements = [];\r\n        var effectsData = elem.data.ef;\r\n        var i;\r\n        var len = elem.effectsManager.effectElements.length;\r\n\r\n        for (i = 0; i < len; i += 1) {\r\n          effectElements.push(createGroupInterface(effectsData[i], elem.effectsManager.effectElements[i], propertyGroup, elem));\r\n        }\r\n\r\n        var effects = elem.data.ef || [];\r\n\r\n        var groupInterface = function groupInterface(name) {\r\n          i = 0;\r\n          len = effects.length;\r\n\r\n          while (i < len) {\r\n            if (name === effects[i].nm || name === effects[i].mn || name === effects[i].ix) {\r\n              return effectElements[i];\r\n            }\r\n\r\n            i += 1;\r\n          }\r\n\r\n          return null;\r\n        };\r\n\r\n        Object.defineProperty(groupInterface, 'numProperties', {\r\n          get: function get() {\r\n            return effects.length;\r\n          }\r\n        });\r\n        return groupInterface;\r\n      }\r\n\r\n      return null;\r\n    }\r\n\r\n    function createGroupInterface(data, elements, propertyGroup, elem) {\r\n      function groupInterface(name) {\r\n        var effects = data.ef;\r\n        var i = 0;\r\n        var len = effects.length;\r\n\r\n        while (i < len) {\r\n          if (name === effects[i].nm || name === effects[i].mn || name === effects[i].ix) {\r\n            if (effects[i].ty === 5) {\r\n              return effectElements[i];\r\n            }\r\n\r\n            return effectElements[i]();\r\n          }\r\n\r\n          i += 1;\r\n        }\r\n\r\n        throw new Error();\r\n      }\r\n\r\n      var _propertyGroup = propertyGroupFactory(groupInterface, propertyGroup);\r\n\r\n      var effectElements = [];\r\n      var i;\r\n      var len = data.ef.length;\r\n\r\n      for (i = 0; i < len; i += 1) {\r\n        if (data.ef[i].ty === 5) {\r\n          effectElements.push(createGroupInterface(data.ef[i], elements.effectElements[i], elements.effectElements[i].propertyGroup, elem));\r\n        } else {\r\n          effectElements.push(createValueInterface(elements.effectElements[i], data.ef[i].ty, elem, _propertyGroup));\r\n        }\r\n      }\r\n\r\n      if (data.mn === 'ADBE Color Control') {\r\n        Object.defineProperty(groupInterface, 'color', {\r\n          get: function get() {\r\n            return effectElements[0]();\r\n          }\r\n        });\r\n      }\r\n\r\n      Object.defineProperties(groupInterface, {\r\n        numProperties: {\r\n          get: function get() {\r\n            return data.np;\r\n          }\r\n        },\r\n        _name: {\r\n          value: data.nm\r\n        },\r\n        propertyGroup: {\r\n          value: _propertyGroup\r\n        }\r\n      });\r\n      groupInterface.enabled = data.en !== 0;\r\n      groupInterface.active = groupInterface.enabled;\r\n      return groupInterface;\r\n    }\r\n\r\n    function createValueInterface(element, type, elem, propertyGroup) {\r\n      var expressionProperty = ExpressionPropertyInterface(element.p);\r\n\r\n      function interfaceFunction() {\r\n        if (type === 10) {\r\n          return elem.comp.compInterface(element.p.v);\r\n        }\r\n\r\n        return expressionProperty();\r\n      }\r\n\r\n      if (element.p.setGroupProperty) {\r\n        element.p.setGroupProperty(PropertyInterface('', propertyGroup));\r\n      }\r\n\r\n      return interfaceFunction;\r\n    }\r\n\r\n    return ob;\r\n  }();\r\n\r\n  var ShapePathInterface = function () {\r\n    return function pathInterfaceFactory(shape, view, propertyGroup) {\r\n      var prop = view.sh;\r\n\r\n      function interfaceFunction(val) {\r\n        if (val === 'Shape' || val === 'shape' || val === 'Path' || val === 'path' || val === 'ADBE Vector Shape' || val === 2) {\r\n          return interfaceFunction.path;\r\n        }\r\n\r\n        return null;\r\n      }\r\n\r\n      var _propertyGroup = propertyGroupFactory(interfaceFunction, propertyGroup);\r\n\r\n      prop.setGroupProperty(PropertyInterface('Path', _propertyGroup));\r\n      Object.defineProperties(interfaceFunction, {\r\n        path: {\r\n          get: function get() {\r\n            if (prop.k) {\r\n              prop.getValue();\r\n            }\r\n\r\n            return prop;\r\n          }\r\n        },\r\n        shape: {\r\n          get: function get() {\r\n            if (prop.k) {\r\n              prop.getValue();\r\n            }\r\n\r\n            return prop;\r\n          }\r\n        },\r\n        _name: {\r\n          value: shape.nm\r\n        },\r\n        ix: {\r\n          value: shape.ix\r\n        },\r\n        propertyIndex: {\r\n          value: shape.ix\r\n        },\r\n        mn: {\r\n          value: shape.mn\r\n        },\r\n        propertyGroup: {\r\n          value: propertyGroup\r\n        }\r\n      });\r\n      return interfaceFunction;\r\n    };\r\n  }();\r\n\r\n  var ShapeExpressionInterface = function () {\r\n    function iterateElements(shapes, view, propertyGroup) {\r\n      var arr = [];\r\n      var i;\r\n      var len = shapes ? shapes.length : 0;\r\n\r\n      for (i = 0; i < len; i += 1) {\r\n        if (shapes[i].ty === 'gr') {\r\n          arr.push(groupInterfaceFactory(shapes[i], view[i], propertyGroup));\r\n        } else if (shapes[i].ty === 'fl') {\r\n          arr.push(fillInterfaceFactory(shapes[i], view[i], propertyGroup));\r\n        } else if (shapes[i].ty === 'st') {\r\n          arr.push(strokeInterfaceFactory(shapes[i], view[i], propertyGroup));\r\n        } else if (shapes[i].ty === 'tm') {\r\n          arr.push(trimInterfaceFactory(shapes[i], view[i], propertyGroup));\r\n        } else if (shapes[i].ty === 'tr') {// arr.push(transformInterfaceFactory(shapes[i],view[i],propertyGroup));\r\n        } else if (shapes[i].ty === 'el') {\r\n          arr.push(ellipseInterfaceFactory(shapes[i], view[i], propertyGroup));\r\n        } else if (shapes[i].ty === 'sr') {\r\n          arr.push(starInterfaceFactory(shapes[i], view[i], propertyGroup));\r\n        } else if (shapes[i].ty === 'sh') {\r\n          arr.push(ShapePathInterface(shapes[i], view[i], propertyGroup));\r\n        } else if (shapes[i].ty === 'rc') {\r\n          arr.push(rectInterfaceFactory(shapes[i], view[i], propertyGroup));\r\n        } else if (shapes[i].ty === 'rd') {\r\n          arr.push(roundedInterfaceFactory(shapes[i], view[i], propertyGroup));\r\n        } else if (shapes[i].ty === 'rp') {\r\n          arr.push(repeaterInterfaceFactory(shapes[i], view[i], propertyGroup));\r\n        } else if (shapes[i].ty === 'gf') {\r\n          arr.push(gradientFillInterfaceFactory(shapes[i], view[i], propertyGroup));\r\n        } else {\r\n          arr.push(defaultInterfaceFactory(shapes[i], view[i], propertyGroup));\r\n        }\r\n      }\r\n\r\n      return arr;\r\n    }\r\n\r\n    function contentsInterfaceFactory(shape, view, propertyGroup) {\r\n      var interfaces;\r\n\r\n      var interfaceFunction = function _interfaceFunction(value) {\r\n        var i = 0;\r\n        var len = interfaces.length;\r\n\r\n        while (i < len) {\r\n          if (interfaces[i]._name === value || interfaces[i].mn === value || interfaces[i].propertyIndex === value || interfaces[i].ix === value || interfaces[i].ind === value) {\r\n            return interfaces[i];\r\n          }\r\n\r\n          i += 1;\r\n        }\r\n\r\n        if (typeof value === 'number') {\r\n          return interfaces[value - 1];\r\n        }\r\n\r\n        return null;\r\n      };\r\n\r\n      interfaceFunction.propertyGroup = propertyGroupFactory(interfaceFunction, propertyGroup);\r\n      interfaces = iterateElements(shape.it, view.it, interfaceFunction.propertyGroup);\r\n      interfaceFunction.numProperties = interfaces.length;\r\n      var transformInterface = transformInterfaceFactory(shape.it[shape.it.length - 1], view.it[view.it.length - 1], interfaceFunction.propertyGroup);\r\n      interfaceFunction.transform = transformInterface;\r\n      interfaceFunction.propertyIndex = shape.cix;\r\n      interfaceFunction._name = shape.nm;\r\n      return interfaceFunction;\r\n    }\r\n\r\n    function groupInterfaceFactory(shape, view, propertyGroup) {\r\n      var interfaceFunction = function _interfaceFunction(value) {\r\n        switch (value) {\r\n          case 'ADBE Vectors Group':\r\n          case 'Contents':\r\n          case 2:\r\n            return interfaceFunction.content;\r\n          // Not necessary for now. Keeping them here in case a new case appears\r\n          // case 'ADBE Vector Transform Group':\r\n          // case 3:\r\n\r\n          default:\r\n            return interfaceFunction.transform;\r\n        }\r\n      };\r\n\r\n      interfaceFunction.propertyGroup = propertyGroupFactory(interfaceFunction, propertyGroup);\r\n      var content = contentsInterfaceFactory(shape, view, interfaceFunction.propertyGroup);\r\n      var transformInterface = transformInterfaceFactory(shape.it[shape.it.length - 1], view.it[view.it.length - 1], interfaceFunction.propertyGroup);\r\n      interfaceFunction.content = content;\r\n      interfaceFunction.transform = transformInterface;\r\n      Object.defineProperty(interfaceFunction, '_name', {\r\n        get: function get() {\r\n          return shape.nm;\r\n        }\r\n      }); // interfaceFunction.content = interfaceFunction;\r\n\r\n      interfaceFunction.numProperties = shape.np;\r\n      interfaceFunction.propertyIndex = shape.ix;\r\n      interfaceFunction.nm = shape.nm;\r\n      interfaceFunction.mn = shape.mn;\r\n      return interfaceFunction;\r\n    }\r\n\r\n    function fillInterfaceFactory(shape, view, propertyGroup) {\r\n      function interfaceFunction(val) {\r\n        if (val === 'Color' || val === 'color') {\r\n          return interfaceFunction.color;\r\n        }\r\n\r\n        if (val === 'Opacity' || val === 'opacity') {\r\n          return interfaceFunction.opacity;\r\n        }\r\n\r\n        return null;\r\n      }\r\n\r\n      Object.defineProperties(interfaceFunction, {\r\n        color: {\r\n          get: ExpressionPropertyInterface(view.c)\r\n        },\r\n        opacity: {\r\n          get: ExpressionPropertyInterface(view.o)\r\n        },\r\n        _name: {\r\n          value: shape.nm\r\n        },\r\n        mn: {\r\n          value: shape.mn\r\n        }\r\n      });\r\n      view.c.setGroupProperty(PropertyInterface('Color', propertyGroup));\r\n      view.o.setGroupProperty(PropertyInterface('Opacity', propertyGroup));\r\n      return interfaceFunction;\r\n    }\r\n\r\n    function gradientFillInterfaceFactory(shape, view, propertyGroup) {\r\n      function interfaceFunction(val) {\r\n        if (val === 'Start Point' || val === 'start point') {\r\n          return interfaceFunction.startPoint;\r\n        }\r\n\r\n        if (val === 'End Point' || val === 'end point') {\r\n          return interfaceFunction.endPoint;\r\n        }\r\n\r\n        if (val === 'Opacity' || val === 'opacity') {\r\n          return interfaceFunction.opacity;\r\n        }\r\n\r\n        return null;\r\n      }\r\n\r\n      Object.defineProperties(interfaceFunction, {\r\n        startPoint: {\r\n          get: ExpressionPropertyInterface(view.s)\r\n        },\r\n        endPoint: {\r\n          get: ExpressionPropertyInterface(view.e)\r\n        },\r\n        opacity: {\r\n          get: ExpressionPropertyInterface(view.o)\r\n        },\r\n        type: {\r\n          get: function get() {\r\n            return 'a';\r\n          }\r\n        },\r\n        _name: {\r\n          value: shape.nm\r\n        },\r\n        mn: {\r\n          value: shape.mn\r\n        }\r\n      });\r\n      view.s.setGroupProperty(PropertyInterface('Start Point', propertyGroup));\r\n      view.e.setGroupProperty(PropertyInterface('End Point', propertyGroup));\r\n      view.o.setGroupProperty(PropertyInterface('Opacity', propertyGroup));\r\n      return interfaceFunction;\r\n    }\r\n\r\n    function defaultInterfaceFactory() {\r\n      function interfaceFunction() {\r\n        return null;\r\n      }\r\n\r\n      return interfaceFunction;\r\n    }\r\n\r\n    function strokeInterfaceFactory(shape, view, propertyGroup) {\r\n      var _propertyGroup = propertyGroupFactory(interfaceFunction, propertyGroup);\r\n\r\n      var _dashPropertyGroup = propertyGroupFactory(dashOb, _propertyGroup);\r\n\r\n      function addPropertyToDashOb(i) {\r\n        Object.defineProperty(dashOb, shape.d[i].nm, {\r\n          get: ExpressionPropertyInterface(view.d.dataProps[i].p)\r\n        });\r\n      }\r\n\r\n      var i;\r\n      var len = shape.d ? shape.d.length : 0;\r\n      var dashOb = {};\r\n\r\n      for (i = 0; i < len; i += 1) {\r\n        addPropertyToDashOb(i);\r\n        view.d.dataProps[i].p.setGroupProperty(_dashPropertyGroup);\r\n      }\r\n\r\n      function interfaceFunction(val) {\r\n        if (val === 'Color' || val === 'color') {\r\n          return interfaceFunction.color;\r\n        }\r\n\r\n        if (val === 'Opacity' || val === 'opacity') {\r\n          return interfaceFunction.opacity;\r\n        }\r\n\r\n        if (val === 'Stroke Width' || val === 'stroke width') {\r\n          return interfaceFunction.strokeWidth;\r\n        }\r\n\r\n        return null;\r\n      }\r\n\r\n      Object.defineProperties(interfaceFunction, {\r\n        color: {\r\n          get: ExpressionPropertyInterface(view.c)\r\n        },\r\n        opacity: {\r\n          get: ExpressionPropertyInterface(view.o)\r\n        },\r\n        strokeWidth: {\r\n          get: ExpressionPropertyInterface(view.w)\r\n        },\r\n        dash: {\r\n          get: function get() {\r\n            return dashOb;\r\n          }\r\n        },\r\n        _name: {\r\n          value: shape.nm\r\n        },\r\n        mn: {\r\n          value: shape.mn\r\n        }\r\n      });\r\n      view.c.setGroupProperty(PropertyInterface('Color', _propertyGroup));\r\n      view.o.setGroupProperty(PropertyInterface('Opacity', _propertyGroup));\r\n      view.w.setGroupProperty(PropertyInterface('Stroke Width', _propertyGroup));\r\n      return interfaceFunction;\r\n    }\r\n\r\n    function trimInterfaceFactory(shape, view, propertyGroup) {\r\n      function interfaceFunction(val) {\r\n        if (val === shape.e.ix || val === 'End' || val === 'end') {\r\n          return interfaceFunction.end;\r\n        }\r\n\r\n        if (val === shape.s.ix) {\r\n          return interfaceFunction.start;\r\n        }\r\n\r\n        if (val === shape.o.ix) {\r\n          return interfaceFunction.offset;\r\n        }\r\n\r\n        return null;\r\n      }\r\n\r\n      var _propertyGroup = propertyGroupFactory(interfaceFunction, propertyGroup);\r\n\r\n      interfaceFunction.propertyIndex = shape.ix;\r\n      view.s.setGroupProperty(PropertyInterface('Start', _propertyGroup));\r\n      view.e.setGroupProperty(PropertyInterface('End', _propertyGroup));\r\n      view.o.setGroupProperty(PropertyInterface('Offset', _propertyGroup));\r\n      interfaceFunction.propertyIndex = shape.ix;\r\n      interfaceFunction.propertyGroup = propertyGroup;\r\n      Object.defineProperties(interfaceFunction, {\r\n        start: {\r\n          get: ExpressionPropertyInterface(view.s)\r\n        },\r\n        end: {\r\n          get: ExpressionPropertyInterface(view.e)\r\n        },\r\n        offset: {\r\n          get: ExpressionPropertyInterface(view.o)\r\n        },\r\n        _name: {\r\n          value: shape.nm\r\n        }\r\n      });\r\n      interfaceFunction.mn = shape.mn;\r\n      return interfaceFunction;\r\n    }\r\n\r\n    function transformInterfaceFactory(shape, view, propertyGroup) {\r\n      function interfaceFunction(value) {\r\n        if (shape.a.ix === value || value === 'Anchor Point') {\r\n          return interfaceFunction.anchorPoint;\r\n        }\r\n\r\n        if (shape.o.ix === value || value === 'Opacity') {\r\n          return interfaceFunction.opacity;\r\n        }\r\n\r\n        if (shape.p.ix === value || value === 'Position') {\r\n          return interfaceFunction.position;\r\n        }\r\n\r\n        if (shape.r.ix === value || value === 'Rotation' || value === 'ADBE Vector Rotation') {\r\n          return interfaceFunction.rotation;\r\n        }\r\n\r\n        if (shape.s.ix === value || value === 'Scale') {\r\n          return interfaceFunction.scale;\r\n        }\r\n\r\n        if (shape.sk && shape.sk.ix === value || value === 'Skew') {\r\n          return interfaceFunction.skew;\r\n        }\r\n\r\n        if (shape.sa && shape.sa.ix === value || value === 'Skew Axis') {\r\n          return interfaceFunction.skewAxis;\r\n        }\r\n\r\n        return null;\r\n      }\r\n\r\n      var _propertyGroup = propertyGroupFactory(interfaceFunction, propertyGroup);\r\n\r\n      view.transform.mProps.o.setGroupProperty(PropertyInterface('Opacity', _propertyGroup));\r\n      view.transform.mProps.p.setGroupProperty(PropertyInterface('Position', _propertyGroup));\r\n      view.transform.mProps.a.setGroupProperty(PropertyInterface('Anchor Point', _propertyGroup));\r\n      view.transform.mProps.s.setGroupProperty(PropertyInterface('Scale', _propertyGroup));\r\n      view.transform.mProps.r.setGroupProperty(PropertyInterface('Rotation', _propertyGroup));\r\n\r\n      if (view.transform.mProps.sk) {\r\n        view.transform.mProps.sk.setGroupProperty(PropertyInterface('Skew', _propertyGroup));\r\n        view.transform.mProps.sa.setGroupProperty(PropertyInterface('Skew Angle', _propertyGroup));\r\n      }\r\n\r\n      view.transform.op.setGroupProperty(PropertyInterface('Opacity', _propertyGroup));\r\n      Object.defineProperties(interfaceFunction, {\r\n        opacity: {\r\n          get: ExpressionPropertyInterface(view.transform.mProps.o)\r\n        },\r\n        position: {\r\n          get: ExpressionPropertyInterface(view.transform.mProps.p)\r\n        },\r\n        anchorPoint: {\r\n          get: ExpressionPropertyInterface(view.transform.mProps.a)\r\n        },\r\n        scale: {\r\n          get: ExpressionPropertyInterface(view.transform.mProps.s)\r\n        },\r\n        rotation: {\r\n          get: ExpressionPropertyInterface(view.transform.mProps.r)\r\n        },\r\n        skew: {\r\n          get: ExpressionPropertyInterface(view.transform.mProps.sk)\r\n        },\r\n        skewAxis: {\r\n          get: ExpressionPropertyInterface(view.transform.mProps.sa)\r\n        },\r\n        _name: {\r\n          value: shape.nm\r\n        }\r\n      });\r\n      interfaceFunction.ty = 'tr';\r\n      interfaceFunction.mn = shape.mn;\r\n      interfaceFunction.propertyGroup = propertyGroup;\r\n      return interfaceFunction;\r\n    }\r\n\r\n    function ellipseInterfaceFactory(shape, view, propertyGroup) {\r\n      function interfaceFunction(value) {\r\n        if (shape.p.ix === value) {\r\n          return interfaceFunction.position;\r\n        }\r\n\r\n        if (shape.s.ix === value) {\r\n          return interfaceFunction.size;\r\n        }\r\n\r\n        return null;\r\n      }\r\n\r\n      var _propertyGroup = propertyGroupFactory(interfaceFunction, propertyGroup);\r\n\r\n      interfaceFunction.propertyIndex = shape.ix;\r\n      var prop = view.sh.ty === 'tm' ? view.sh.prop : view.sh;\r\n      prop.s.setGroupProperty(PropertyInterface('Size', _propertyGroup));\r\n      prop.p.setGroupProperty(PropertyInterface('Position', _propertyGroup));\r\n      Object.defineProperties(interfaceFunction, {\r\n        size: {\r\n          get: ExpressionPropertyInterface(prop.s)\r\n        },\r\n        position: {\r\n          get: ExpressionPropertyInterface(prop.p)\r\n        },\r\n        _name: {\r\n          value: shape.nm\r\n        }\r\n      });\r\n      interfaceFunction.mn = shape.mn;\r\n      return interfaceFunction;\r\n    }\r\n\r\n    function starInterfaceFactory(shape, view, propertyGroup) {\r\n      function interfaceFunction(value) {\r\n        if (shape.p.ix === value) {\r\n          return interfaceFunction.position;\r\n        }\r\n\r\n        if (shape.r.ix === value) {\r\n          return interfaceFunction.rotation;\r\n        }\r\n\r\n        if (shape.pt.ix === value) {\r\n          return interfaceFunction.points;\r\n        }\r\n\r\n        if (shape.or.ix === value || value === 'ADBE Vector Star Outer Radius') {\r\n          return interfaceFunction.outerRadius;\r\n        }\r\n\r\n        if (shape.os.ix === value) {\r\n          return interfaceFunction.outerRoundness;\r\n        }\r\n\r\n        if (shape.ir && (shape.ir.ix === value || value === 'ADBE Vector Star Inner Radius')) {\r\n          return interfaceFunction.innerRadius;\r\n        }\r\n\r\n        if (shape.is && shape.is.ix === value) {\r\n          return interfaceFunction.innerRoundness;\r\n        }\r\n\r\n        return null;\r\n      }\r\n\r\n      var _propertyGroup = propertyGroupFactory(interfaceFunction, propertyGroup);\r\n\r\n      var prop = view.sh.ty === 'tm' ? view.sh.prop : view.sh;\r\n      interfaceFunction.propertyIndex = shape.ix;\r\n      prop.or.setGroupProperty(PropertyInterface('Outer Radius', _propertyGroup));\r\n      prop.os.setGroupProperty(PropertyInterface('Outer Roundness', _propertyGroup));\r\n      prop.pt.setGroupProperty(PropertyInterface('Points', _propertyGroup));\r\n      prop.p.setGroupProperty(PropertyInterface('Position', _propertyGroup));\r\n      prop.r.setGroupProperty(PropertyInterface('Rotation', _propertyGroup));\r\n\r\n      if (shape.ir) {\r\n        prop.ir.setGroupProperty(PropertyInterface('Inner Radius', _propertyGroup));\r\n        prop.is.setGroupProperty(PropertyInterface('Inner Roundness', _propertyGroup));\r\n      }\r\n\r\n      Object.defineProperties(interfaceFunction, {\r\n        position: {\r\n          get: ExpressionPropertyInterface(prop.p)\r\n        },\r\n        rotation: {\r\n          get: ExpressionPropertyInterface(prop.r)\r\n        },\r\n        points: {\r\n          get: ExpressionPropertyInterface(prop.pt)\r\n        },\r\n        outerRadius: {\r\n          get: ExpressionPropertyInterface(prop.or)\r\n        },\r\n        outerRoundness: {\r\n          get: ExpressionPropertyInterface(prop.os)\r\n        },\r\n        innerRadius: {\r\n          get: ExpressionPropertyInterface(prop.ir)\r\n        },\r\n        innerRoundness: {\r\n          get: ExpressionPropertyInterface(prop.is)\r\n        },\r\n        _name: {\r\n          value: shape.nm\r\n        }\r\n      });\r\n      interfaceFunction.mn = shape.mn;\r\n      return interfaceFunction;\r\n    }\r\n\r\n    function rectInterfaceFactory(shape, view, propertyGroup) {\r\n      function interfaceFunction(value) {\r\n        if (shape.p.ix === value) {\r\n          return interfaceFunction.position;\r\n        }\r\n\r\n        if (shape.r.ix === value) {\r\n          return interfaceFunction.roundness;\r\n        }\r\n\r\n        if (shape.s.ix === value || value === 'Size' || value === 'ADBE Vector Rect Size') {\r\n          return interfaceFunction.size;\r\n        }\r\n\r\n        return null;\r\n      }\r\n\r\n      var _propertyGroup = propertyGroupFactory(interfaceFunction, propertyGroup);\r\n\r\n      var prop = view.sh.ty === 'tm' ? view.sh.prop : view.sh;\r\n      interfaceFunction.propertyIndex = shape.ix;\r\n      prop.p.setGroupProperty(PropertyInterface('Position', _propertyGroup));\r\n      prop.s.setGroupProperty(PropertyInterface('Size', _propertyGroup));\r\n      prop.r.setGroupProperty(PropertyInterface('Rotation', _propertyGroup));\r\n      Object.defineProperties(interfaceFunction, {\r\n        position: {\r\n          get: ExpressionPropertyInterface(prop.p)\r\n        },\r\n        roundness: {\r\n          get: ExpressionPropertyInterface(prop.r)\r\n        },\r\n        size: {\r\n          get: ExpressionPropertyInterface(prop.s)\r\n        },\r\n        _name: {\r\n          value: shape.nm\r\n        }\r\n      });\r\n      interfaceFunction.mn = shape.mn;\r\n      return interfaceFunction;\r\n    }\r\n\r\n    function roundedInterfaceFactory(shape, view, propertyGroup) {\r\n      function interfaceFunction(value) {\r\n        if (shape.r.ix === value || value === 'Round Corners 1') {\r\n          return interfaceFunction.radius;\r\n        }\r\n\r\n        return null;\r\n      }\r\n\r\n      var _propertyGroup = propertyGroupFactory(interfaceFunction, propertyGroup);\r\n\r\n      var prop = view;\r\n      interfaceFunction.propertyIndex = shape.ix;\r\n      prop.rd.setGroupProperty(PropertyInterface('Radius', _propertyGroup));\r\n      Object.defineProperties(interfaceFunction, {\r\n        radius: {\r\n          get: ExpressionPropertyInterface(prop.rd)\r\n        },\r\n        _name: {\r\n          value: shape.nm\r\n        }\r\n      });\r\n      interfaceFunction.mn = shape.mn;\r\n      return interfaceFunction;\r\n    }\r\n\r\n    function repeaterInterfaceFactory(shape, view, propertyGroup) {\r\n      function interfaceFunction(value) {\r\n        if (shape.c.ix === value || value === 'Copies') {\r\n          return interfaceFunction.copies;\r\n        }\r\n\r\n        if (shape.o.ix === value || value === 'Offset') {\r\n          return interfaceFunction.offset;\r\n        }\r\n\r\n        return null;\r\n      }\r\n\r\n      var _propertyGroup = propertyGroupFactory(interfaceFunction, propertyGroup);\r\n\r\n      var prop = view;\r\n      interfaceFunction.propertyIndex = shape.ix;\r\n      prop.c.setGroupProperty(PropertyInterface('Copies', _propertyGroup));\r\n      prop.o.setGroupProperty(PropertyInterface('Offset', _propertyGroup));\r\n      Object.defineProperties(interfaceFunction, {\r\n        copies: {\r\n          get: ExpressionPropertyInterface(prop.c)\r\n        },\r\n        offset: {\r\n          get: ExpressionPropertyInterface(prop.o)\r\n        },\r\n        _name: {\r\n          value: shape.nm\r\n        }\r\n      });\r\n      interfaceFunction.mn = shape.mn;\r\n      return interfaceFunction;\r\n    }\r\n\r\n    return function (shapes, view, propertyGroup) {\r\n      var interfaces;\r\n\r\n      function _interfaceFunction(value) {\r\n        if (typeof value === 'number') {\r\n          value = value === undefined ? 1 : value;\r\n\r\n          if (value === 0) {\r\n            return propertyGroup;\r\n          }\r\n\r\n          return interfaces[value - 1];\r\n        }\r\n\r\n        var i = 0;\r\n        var len = interfaces.length;\r\n\r\n        while (i < len) {\r\n          if (interfaces[i]._name === value) {\r\n            return interfaces[i];\r\n          }\r\n\r\n          i += 1;\r\n        }\r\n\r\n        return null;\r\n      }\r\n\r\n      function parentGroupWrapper() {\r\n        return propertyGroup;\r\n      }\r\n\r\n      _interfaceFunction.propertyGroup = propertyGroupFactory(_interfaceFunction, parentGroupWrapper);\r\n      interfaces = iterateElements(shapes, view, _interfaceFunction.propertyGroup);\r\n      _interfaceFunction.numProperties = interfaces.length;\r\n      _interfaceFunction._name = 'Contents';\r\n      return _interfaceFunction;\r\n    };\r\n  }();\r\n\r\n  var TextExpressionInterface = function () {\r\n    return function (elem) {\r\n      var _prevValue;\r\n\r\n      var _sourceText;\r\n\r\n      function _thisLayerFunction(name) {\r\n        switch (name) {\r\n          case 'ADBE Text Document':\r\n            return _thisLayerFunction.sourceText;\r\n\r\n          default:\r\n            return null;\r\n        }\r\n      }\r\n\r\n      Object.defineProperty(_thisLayerFunction, 'sourceText', {\r\n        get: function get() {\r\n          elem.textProperty.getValue();\r\n          var stringValue = elem.textProperty.currentData.t;\r\n\r\n          if (stringValue !== _prevValue) {\r\n            elem.textProperty.currentData.t = _prevValue;\r\n            _sourceText = new String(stringValue); // eslint-disable-line no-new-wrappers\r\n            // If stringValue is an empty string, eval returns undefined, so it has to be returned as a String primitive\r\n\r\n            _sourceText.value = stringValue || new String(stringValue); // eslint-disable-line no-new-wrappers\r\n          }\r\n\r\n          return _sourceText;\r\n        }\r\n      });\r\n      return _thisLayerFunction;\r\n    };\r\n  }();\r\n\r\n  function _typeof$2(obj) { \"@babel/helpers - typeof\"; if (typeof Symbol === \"function\" && typeof Symbol.iterator === \"symbol\") { _typeof$2 = function _typeof(obj) { return typeof obj; }; } else { _typeof$2 = function _typeof(obj) { return obj && typeof Symbol === \"function\" && obj.constructor === Symbol && obj !== Symbol.prototype ? \"symbol\" : typeof obj; }; } return _typeof$2(obj); }\r\n\r\n  var FootageInterface = function () {\r\n    var outlineInterfaceFactory = function outlineInterfaceFactory(elem) {\r\n      var currentPropertyName = '';\r\n      var currentProperty = elem.getFootageData();\r\n\r\n      function init() {\r\n        currentPropertyName = '';\r\n        currentProperty = elem.getFootageData();\r\n        return searchProperty;\r\n      }\r\n\r\n      function searchProperty(value) {\r\n        if (currentProperty[value]) {\r\n          currentPropertyName = value;\r\n          currentProperty = currentProperty[value];\r\n\r\n          if (_typeof$2(currentProperty) === 'object') {\r\n            return searchProperty;\r\n          }\r\n\r\n          return currentProperty;\r\n        }\r\n\r\n        var propertyNameIndex = value.indexOf(currentPropertyName);\r\n\r\n        if (propertyNameIndex !== -1) {\r\n          var index = parseInt(value.substr(propertyNameIndex + currentPropertyName.length), 10);\r\n          currentProperty = currentProperty[index];\r\n\r\n          if (_typeof$2(currentProperty) === 'object') {\r\n            return searchProperty;\r\n          }\r\n\r\n          return currentProperty;\r\n        }\r\n\r\n        return '';\r\n      }\r\n\r\n      return init;\r\n    };\r\n\r\n    var dataInterfaceFactory = function dataInterfaceFactory(elem) {\r\n      function interfaceFunction(value) {\r\n        if (value === 'Outline') {\r\n          return interfaceFunction.outlineInterface();\r\n        }\r\n\r\n        return null;\r\n      }\r\n\r\n      interfaceFunction._name = 'Outline';\r\n      interfaceFunction.outlineInterface = outlineInterfaceFactory(elem);\r\n      return interfaceFunction;\r\n    };\r\n\r\n    return function (elem) {\r\n      function _interfaceFunction(value) {\r\n        if (value === 'Data') {\r\n          return _interfaceFunction.dataInterface;\r\n        }\r\n\r\n        return null;\r\n      }\r\n\r\n      _interfaceFunction._name = 'Data';\r\n      _interfaceFunction.dataInterface = dataInterfaceFactory(elem);\r\n      return _interfaceFunction;\r\n    };\r\n  }();\r\n\r\n  var interfaces = {\r\n    layer: LayerExpressionInterface,\r\n    effects: EffectsExpressionInterface,\r\n    comp: CompExpressionInterface,\r\n    shape: ShapeExpressionInterface,\r\n    text: TextExpressionInterface,\r\n    footage: FootageInterface\r\n  };\r\n\r\n  function getInterface(type) {\r\n    return interfaces[type] || null;\r\n  }\r\n\r\n  function _typeof$1(obj) { \"@babel/helpers - typeof\"; if (typeof Symbol === \"function\" && typeof Symbol.iterator === \"symbol\") { _typeof$1 = function _typeof(obj) { return typeof obj; }; } else { _typeof$1 = function _typeof(obj) { return obj && typeof Symbol === \"function\" && obj.constructor === Symbol && obj !== Symbol.prototype ? \"symbol\" : typeof obj; }; } return _typeof$1(obj); }\r\n\r\n  /* eslint-disable */\r\n\r\n  /*\r\n   Copyright 2014 David Bau.\r\n\r\n   Permission is hereby granted, free of charge, to any person obtaining\r\n   a copy of this software and associated documentation files (the\r\n   \"Software\"), to deal in the Software without restriction, including\r\n   without limitation the rights to use, copy, modify, merge, publish,\r\n   distribute, sublicense, and/or sell copies of the Software, and to\r\n   permit persons to whom the Software is furnished to do so, subject to\r\n   the following conditions:\r\n\r\n   The above copyright notice and this permission notice shall be\r\n   included in all copies or substantial portions of the Software.\r\n\r\n   THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND,\r\n   EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF\r\n   MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.\r\n   IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY\r\n   CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,\r\n   TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE\r\n   SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.\r\n\r\n   */\r\n  function seedRandom(pool, math) {\r\n    //\r\n    // The following constants are related to IEEE 754 limits.\r\n    //\r\n    var global = this,\r\n        width = 256,\r\n        // each RC4 output is 0 <= x < 256\r\n    chunks = 6,\r\n        // at least six RC4 outputs for each double\r\n    digits = 52,\r\n        // there are 52 significant digits in a double\r\n    rngname = 'random',\r\n        // rngname: name for Math.random and Math.seedrandom\r\n    startdenom = math.pow(width, chunks),\r\n        significance = math.pow(2, digits),\r\n        overflow = significance * 2,\r\n        mask = width - 1,\r\n        nodecrypto; // node.js crypto module, initialized at the bottom.\r\n    //\r\n    // seedrandom()\r\n    // This is the seedrandom function described above.\r\n    //\r\n\r\n    function seedrandom(seed, options, callback) {\r\n      var key = [];\r\n      options = options === true ? {\r\n        entropy: true\r\n      } : options || {}; // Flatten the seed string or build one from local entropy if needed.\r\n\r\n      var shortseed = mixkey(flatten(options.entropy ? [seed, tostring(pool)] : seed === null ? autoseed() : seed, 3), key); // Use the seed to initialize an ARC4 generator.\r\n\r\n      var arc4 = new ARC4(key); // This function returns a random double in [0, 1) that contains\r\n      // randomness in every bit of the mantissa of the IEEE 754 value.\r\n\r\n      var prng = function prng() {\r\n        var n = arc4.g(chunks),\r\n            // Start with a numerator n < 2 ^ 48\r\n        d = startdenom,\r\n            //   and denominator d = 2 ^ 48.\r\n        x = 0; //   and no 'extra last byte'.\r\n\r\n        while (n < significance) {\r\n          // Fill up all significant digits by\r\n          n = (n + x) * width; //   shifting numerator and\r\n\r\n          d *= width; //   denominator and generating a\r\n\r\n          x = arc4.g(1); //   new least-significant-byte.\r\n        }\r\n\r\n        while (n >= overflow) {\r\n          // To avoid rounding up, before adding\r\n          n /= 2; //   last byte, shift everything\r\n\r\n          d /= 2; //   right using integer math until\r\n\r\n          x >>>= 1; //   we have exactly the desired bits.\r\n        }\r\n\r\n        return (n + x) / d; // Form the number within [0, 1).\r\n      };\r\n\r\n      prng.int32 = function () {\r\n        return arc4.g(4) | 0;\r\n      };\r\n\r\n      prng.quick = function () {\r\n        return arc4.g(4) / 0x100000000;\r\n      };\r\n\r\n      prng[\"double\"] = prng; // Mix the randomness into accumulated entropy.\r\n\r\n      mixkey(tostring(arc4.S), pool); // Calling convention: what to return as a function of prng, seed, is_math.\r\n\r\n      return (options.pass || callback || function (prng, seed, is_math_call, state) {\r\n        if (state) {\r\n          // Load the arc4 state from the given state if it has an S array.\r\n          if (state.S) {\r\n            copy(state, arc4);\r\n          } // Only provide the .state method if requested via options.state.\r\n\r\n\r\n          prng.state = function () {\r\n            return copy(arc4, {});\r\n          };\r\n        } // If called as a method of Math (Math.seedrandom()), mutate\r\n        // Math.random because that is how seedrandom.js has worked since v1.0.\r\n\r\n\r\n        if (is_math_call) {\r\n          math[rngname] = prng;\r\n          return seed;\r\n        } // Otherwise, it is a newer calling convention, so return the\r\n        // prng directly.\r\n        else return prng;\r\n      })(prng, shortseed, 'global' in options ? options.global : this == math, options.state);\r\n    }\r\n\r\n    math['seed' + rngname] = seedrandom; //\r\n    // ARC4\r\n    //\r\n    // An ARC4 implementation.  The constructor takes a key in the form of\r\n    // an array of at most (width) integers that should be 0 <= x < (width).\r\n    //\r\n    // The g(count) method returns a pseudorandom integer that concatenates\r\n    // the next (count) outputs from ARC4.  Its return value is a number x\r\n    // that is in the range 0 <= x < (width ^ count).\r\n    //\r\n\r\n    function ARC4(key) {\r\n      var t,\r\n          keylen = key.length,\r\n          me = this,\r\n          i = 0,\r\n          j = me.i = me.j = 0,\r\n          s = me.S = []; // The empty key [] is treated as [0].\r\n\r\n      if (!keylen) {\r\n        key = [keylen++];\r\n      } // Set up S using the standard key scheduling algorithm.\r\n\r\n\r\n      while (i < width) {\r\n        s[i] = i++;\r\n      }\r\n\r\n      for (i = 0; i < width; i++) {\r\n        s[i] = s[j = mask & j + key[i % keylen] + (t = s[i])];\r\n        s[j] = t;\r\n      } // The \"g\" method returns the next (count) outputs as one number.\r\n\r\n\r\n      me.g = function (count) {\r\n        // Using instance members instead of closure state nearly doubles speed.\r\n        var t,\r\n            r = 0,\r\n            i = me.i,\r\n            j = me.j,\r\n            s = me.S;\r\n\r\n        while (count--) {\r\n          t = s[i = mask & i + 1];\r\n          r = r * width + s[mask & (s[i] = s[j = mask & j + t]) + (s[j] = t)];\r\n        }\r\n\r\n        me.i = i;\r\n        me.j = j;\r\n        return r; // For robust unpredictability, the function call below automatically\r\n        // discards an initial batch of values.  This is called RC4-drop[256].\r\n        // See http://google.com/search?q=rsa+fluhrer+response&btnI\r\n      };\r\n    } //\r\n    // copy()\r\n    // Copies internal state of ARC4 to or from a plain object.\r\n    //\r\n\r\n\r\n    function copy(f, t) {\r\n      t.i = f.i;\r\n      t.j = f.j;\r\n      t.S = f.S.slice();\r\n      return t;\r\n    } //\r\n    // flatten()\r\n    // Converts an object tree to nested arrays of strings.\r\n    //\r\n\r\n\r\n    function flatten(obj, depth) {\r\n      var result = [],\r\n          typ = _typeof$1(obj),\r\n          prop;\r\n\r\n      if (depth && typ == 'object') {\r\n        for (prop in obj) {\r\n          try {\r\n            result.push(flatten(obj[prop], depth - 1));\r\n          } catch (e) {}\r\n        }\r\n      }\r\n\r\n      return result.length ? result : typ == 'string' ? obj : obj + '\\0';\r\n    } //\r\n    // mixkey()\r\n    // Mixes a string seed into a key that is an array of integers, and\r\n    // returns a shortened string seed that is equivalent to the result key.\r\n    //\r\n\r\n\r\n    function mixkey(seed, key) {\r\n      var stringseed = seed + '',\r\n          smear,\r\n          j = 0;\r\n\r\n      while (j < stringseed.length) {\r\n        key[mask & j] = mask & (smear ^= key[mask & j] * 19) + stringseed.charCodeAt(j++);\r\n      }\r\n\r\n      return tostring(key);\r\n    } //\r\n    // autoseed()\r\n    // Returns an object for autoseeding, using window.crypto and Node crypto\r\n    // module if available.\r\n    //\r\n\r\n\r\n    function autoseed() {\r\n      try {\r\n        if (nodecrypto) {\r\n          return tostring(nodecrypto.randomBytes(width));\r\n        }\r\n\r\n        var out = new Uint8Array(width);\r\n        (global.crypto || global.msCrypto).getRandomValues(out);\r\n        return tostring(out);\r\n      } catch (e) {\r\n        var browser = global.navigator,\r\n            plugins = browser && browser.plugins;\r\n        return [+new Date(), global, plugins, global.screen, tostring(pool)];\r\n      }\r\n    } //\r\n    // tostring()\r\n    // Converts an array of charcodes to a string\r\n    //\r\n\r\n\r\n    function tostring(a) {\r\n      return String.fromCharCode.apply(0, a);\r\n    } //\r\n    // When seedrandom.js is loaded, we immediately mix a few bits\r\n    // from the built-in RNG into the entropy pool.  Because we do\r\n    // not want to interfere with deterministic PRNG state later,\r\n    // seedrandom will not call math.random on its own again after\r\n    // initialization.\r\n    //\r\n\r\n\r\n    mixkey(math.random(), pool); //\r\n    // Nodejs and AMD support: export the implementation as a module using\r\n    // either convention.\r\n    //\r\n    // End anonymous scope, and pass initial values.\r\n  }\r\n\r\n  ;\r\n\r\n  function initialize$2(BMMath) {\r\n    seedRandom([], BMMath);\r\n  }\r\n\r\n  var propTypes = {\r\n    SHAPE: 'shape'\r\n  };\r\n\r\n  function _typeof(obj) { \"@babel/helpers - typeof\"; if (typeof Symbol === \"function\" && typeof Symbol.iterator === \"symbol\") { _typeof = function _typeof(obj) { return typeof obj; }; } else { _typeof = function _typeof(obj) { return obj && typeof Symbol === \"function\" && obj.constructor === Symbol && obj !== Symbol.prototype ? \"symbol\" : typeof obj; }; } return _typeof(obj); }\r\n\r\n  var ExpressionManager = function () {\r\n    'use strict';\r\n\r\n    var ob = {};\r\n    var Math = BMMath;\r\n    var window = null;\r\n    var document = null;\r\n    var XMLHttpRequest = null;\r\n    var fetch = null;\r\n    var frames = null;\r\n    initialize$2(BMMath);\r\n\r\n    function $bm_isInstanceOfArray(arr) {\r\n      return arr.constructor === Array || arr.constructor === Float32Array;\r\n    }\r\n\r\n    function isNumerable(tOfV, v) {\r\n      return tOfV === 'number' || tOfV === 'boolean' || tOfV === 'string' || v instanceof Number;\r\n    }\r\n\r\n    function $bm_neg(a) {\r\n      var tOfA = _typeof(a);\r\n\r\n      if (tOfA === 'number' || tOfA === 'boolean' || a instanceof Number) {\r\n        return -a;\r\n      }\r\n\r\n      if ($bm_isInstanceOfArray(a)) {\r\n        var i;\r\n        var lenA = a.length;\r\n        var retArr = [];\r\n\r\n        for (i = 0; i < lenA; i += 1) {\r\n          retArr[i] = -a[i];\r\n        }\r\n\r\n        return retArr;\r\n      }\r\n\r\n      if (a.propType) {\r\n        return a.v;\r\n      }\r\n\r\n      return -a;\r\n    }\r\n\r\n    var easeInBez = BezierFactory.getBezierEasing(0.333, 0, 0.833, 0.833, 'easeIn').get;\r\n    var easeOutBez = BezierFactory.getBezierEasing(0.167, 0.167, 0.667, 1, 'easeOut').get;\r\n    var easeInOutBez = BezierFactory.getBezierEasing(0.33, 0, 0.667, 1, 'easeInOut').get;\r\n\r\n    function sum(a, b) {\r\n      var tOfA = _typeof(a);\r\n\r\n      var tOfB = _typeof(b);\r\n\r\n      if (tOfA === 'string' || tOfB === 'string') {\r\n        return a + b;\r\n      }\r\n\r\n      if (isNumerable(tOfA, a) && isNumerable(tOfB, b)) {\r\n        return a + b;\r\n      }\r\n\r\n      if ($bm_isInstanceOfArray(a) && isNumerable(tOfB, b)) {\r\n        a = a.slice(0);\r\n        a[0] += b;\r\n        return a;\r\n      }\r\n\r\n      if (isNumerable(tOfA, a) && $bm_isInstanceOfArray(b)) {\r\n        b = b.slice(0);\r\n        b[0] = a + b[0];\r\n        return b;\r\n      }\r\n\r\n      if ($bm_isInstanceOfArray(a) && $bm_isInstanceOfArray(b)) {\r\n        var i = 0;\r\n        var lenA = a.length;\r\n        var lenB = b.length;\r\n        var retArr = [];\r\n\r\n        while (i < lenA || i < lenB) {\r\n          if ((typeof a[i] === 'number' || a[i] instanceof Number) && (typeof b[i] === 'number' || b[i] instanceof Number)) {\r\n            retArr[i] = a[i] + b[i];\r\n          } else {\r\n            retArr[i] = b[i] === undefined ? a[i] : a[i] || b[i];\r\n          }\r\n\r\n          i += 1;\r\n        }\r\n\r\n        return retArr;\r\n      }\r\n\r\n      return 0;\r\n    }\r\n\r\n    var add = sum;\r\n\r\n    function sub(a, b) {\r\n      var tOfA = _typeof(a);\r\n\r\n      var tOfB = _typeof(b);\r\n\r\n      if (isNumerable(tOfA, a) && isNumerable(tOfB, b)) {\r\n        if (tOfA === 'string') {\r\n          a = parseInt(a, 10);\r\n        }\r\n\r\n        if (tOfB === 'string') {\r\n          b = parseInt(b, 10);\r\n        }\r\n\r\n        return a - b;\r\n      }\r\n\r\n      if ($bm_isInstanceOfArray(a) && isNumerable(tOfB, b)) {\r\n        a = a.slice(0);\r\n        a[0] -= b;\r\n        return a;\r\n      }\r\n\r\n      if (isNumerable(tOfA, a) && $bm_isInstanceOfArray(b)) {\r\n        b = b.slice(0);\r\n        b[0] = a - b[0];\r\n        return b;\r\n      }\r\n\r\n      if ($bm_isInstanceOfArray(a) && $bm_isInstanceOfArray(b)) {\r\n        var i = 0;\r\n        var lenA = a.length;\r\n        var lenB = b.length;\r\n        var retArr = [];\r\n\r\n        while (i < lenA || i < lenB) {\r\n          if ((typeof a[i] === 'number' || a[i] instanceof Number) && (typeof b[i] === 'number' || b[i] instanceof Number)) {\r\n            retArr[i] = a[i] - b[i];\r\n          } else {\r\n            retArr[i] = b[i] === undefined ? a[i] : a[i] || b[i];\r\n          }\r\n\r\n          i += 1;\r\n        }\r\n\r\n        return retArr;\r\n      }\r\n\r\n      return 0;\r\n    }\r\n\r\n    function mul(a, b) {\r\n      var tOfA = _typeof(a);\r\n\r\n      var tOfB = _typeof(b);\r\n\r\n      var arr;\r\n\r\n      if (isNumerable(tOfA, a) && isNumerable(tOfB, b)) {\r\n        return a * b;\r\n      }\r\n\r\n      var i;\r\n      var len;\r\n\r\n      if ($bm_isInstanceOfArray(a) && isNumerable(tOfB, b)) {\r\n        len = a.length;\r\n        arr = createTypedArray('float32', len);\r\n\r\n        for (i = 0; i < len; i += 1) {\r\n          arr[i] = a[i] * b;\r\n        }\r\n\r\n        return arr;\r\n      }\r\n\r\n      if (isNumerable(tOfA, a) && $bm_isInstanceOfArray(b)) {\r\n        len = b.length;\r\n        arr = createTypedArray('float32', len);\r\n\r\n        for (i = 0; i < len; i += 1) {\r\n          arr[i] = a * b[i];\r\n        }\r\n\r\n        return arr;\r\n      }\r\n\r\n      return 0;\r\n    }\r\n\r\n    function div(a, b) {\r\n      var tOfA = _typeof(a);\r\n\r\n      var tOfB = _typeof(b);\r\n\r\n      var arr;\r\n\r\n      if (isNumerable(tOfA, a) && isNumerable(tOfB, b)) {\r\n        return a / b;\r\n      }\r\n\r\n      var i;\r\n      var len;\r\n\r\n      if ($bm_isInstanceOfArray(a) && isNumerable(tOfB, b)) {\r\n        len = a.length;\r\n        arr = createTypedArray('float32', len);\r\n\r\n        for (i = 0; i < len; i += 1) {\r\n          arr[i] = a[i] / b;\r\n        }\r\n\r\n        return arr;\r\n      }\r\n\r\n      if (isNumerable(tOfA, a) && $bm_isInstanceOfArray(b)) {\r\n        len = b.length;\r\n        arr = createTypedArray('float32', len);\r\n\r\n        for (i = 0; i < len; i += 1) {\r\n          arr[i] = a / b[i];\r\n        }\r\n\r\n        return arr;\r\n      }\r\n\r\n      return 0;\r\n    }\r\n\r\n    function mod(a, b) {\r\n      if (typeof a === 'string') {\r\n        a = parseInt(a, 10);\r\n      }\r\n\r\n      if (typeof b === 'string') {\r\n        b = parseInt(b, 10);\r\n      }\r\n\r\n      return a % b;\r\n    }\r\n\r\n    var $bm_sum = sum;\r\n    var $bm_sub = sub;\r\n    var $bm_mul = mul;\r\n    var $bm_div = div;\r\n    var $bm_mod = mod;\r\n\r\n    function clamp(num, min, max) {\r\n      if (min > max) {\r\n        var mm = max;\r\n        max = min;\r\n        min = mm;\r\n      }\r\n\r\n      return Math.min(Math.max(num, min), max);\r\n    }\r\n\r\n    function radiansToDegrees(val) {\r\n      return val / degToRads;\r\n    }\r\n\r\n    var radians_to_degrees = radiansToDegrees;\r\n\r\n    function degreesToRadians(val) {\r\n      return val * degToRads;\r\n    }\r\n\r\n    var degrees_to_radians = radiansToDegrees;\r\n    var helperLengthArray = [0, 0, 0, 0, 0, 0];\r\n\r\n    function length(arr1, arr2) {\r\n      if (typeof arr1 === 'number' || arr1 instanceof Number) {\r\n        arr2 = arr2 || 0;\r\n        return Math.abs(arr1 - arr2);\r\n      }\r\n\r\n      if (!arr2) {\r\n        arr2 = helperLengthArray;\r\n      }\r\n\r\n      var i;\r\n      var len = Math.min(arr1.length, arr2.length);\r\n      var addedLength = 0;\r\n\r\n      for (i = 0; i < len; i += 1) {\r\n        addedLength += Math.pow(arr2[i] - arr1[i], 2);\r\n      }\r\n\r\n      return Math.sqrt(addedLength);\r\n    }\r\n\r\n    function normalize(vec) {\r\n      return div(vec, length(vec));\r\n    }\r\n\r\n    function rgbToHsl(val) {\r\n      var r = val[0];\r\n      var g = val[1];\r\n      var b = val[2];\r\n      var max = Math.max(r, g, b);\r\n      var min = Math.min(r, g, b);\r\n      var h;\r\n      var s;\r\n      var l = (max + min) / 2;\r\n\r\n      if (max === min) {\r\n        h = 0; // achromatic\r\n\r\n        s = 0; // achromatic\r\n      } else {\r\n        var d = max - min;\r\n        s = l > 0.5 ? d / (2 - max - min) : d / (max + min);\r\n\r\n        switch (max) {\r\n          case r:\r\n            h = (g - b) / d + (g < b ? 6 : 0);\r\n            break;\r\n\r\n          case g:\r\n            h = (b - r) / d + 2;\r\n            break;\r\n\r\n          case b:\r\n            h = (r - g) / d + 4;\r\n            break;\r\n\r\n          default:\r\n            break;\r\n        }\r\n\r\n        h /= 6;\r\n      }\r\n\r\n      return [h, s, l, val[3]];\r\n    }\r\n\r\n    function hue2rgb(p, q, t) {\r\n      if (t < 0) t += 1;\r\n      if (t > 1) t -= 1;\r\n      if (t < 1 / 6) return p + (q - p) * 6 * t;\r\n      if (t < 1 / 2) return q;\r\n      if (t < 2 / 3) return p + (q - p) * (2 / 3 - t) * 6;\r\n      return p;\r\n    }\r\n\r\n    function hslToRgb(val) {\r\n      var h = val[0];\r\n      var s = val[1];\r\n      var l = val[2];\r\n      var r;\r\n      var g;\r\n      var b;\r\n\r\n      if (s === 0) {\r\n        r = l; // achromatic\r\n\r\n        b = l; // achromatic\r\n\r\n        g = l; // achromatic\r\n      } else {\r\n        var q = l < 0.5 ? l * (1 + s) : l + s - l * s;\r\n        var p = 2 * l - q;\r\n        r = hue2rgb(p, q, h + 1 / 3);\r\n        g = hue2rgb(p, q, h);\r\n        b = hue2rgb(p, q, h - 1 / 3);\r\n      }\r\n\r\n      return [r, g, b, val[3]];\r\n    }\r\n\r\n    function linear(t, tMin, tMax, value1, value2) {\r\n      if (value1 === undefined || value2 === undefined) {\r\n        value1 = tMin;\r\n        value2 = tMax;\r\n        tMin = 0;\r\n        tMax = 1;\r\n      }\r\n\r\n      if (tMax < tMin) {\r\n        var _tMin = tMax;\r\n        tMax = tMin;\r\n        tMin = _tMin;\r\n      }\r\n\r\n      if (t <= tMin) {\r\n        return value1;\r\n      }\r\n\r\n      if (t >= tMax) {\r\n        return value2;\r\n      }\r\n\r\n      var perc = tMax === tMin ? 0 : (t - tMin) / (tMax - tMin);\r\n\r\n      if (!value1.length) {\r\n        return value1 + (value2 - value1) * perc;\r\n      }\r\n\r\n      var i;\r\n      var len = value1.length;\r\n      var arr = createTypedArray('float32', len);\r\n\r\n      for (i = 0; i < len; i += 1) {\r\n        arr[i] = value1[i] + (value2[i] - value1[i]) * perc;\r\n      }\r\n\r\n      return arr;\r\n    }\r\n\r\n    function random(min, max) {\r\n      if (max === undefined) {\r\n        if (min === undefined) {\r\n          min = 0;\r\n          max = 1;\r\n        } else {\r\n          max = min;\r\n          min = undefined;\r\n        }\r\n      }\r\n\r\n      if (max.length) {\r\n        var i;\r\n        var len = max.length;\r\n\r\n        if (!min) {\r\n          min = createTypedArray('float32', len);\r\n        }\r\n\r\n        var arr = createTypedArray('float32', len);\r\n        var rnd = BMMath.random();\r\n\r\n        for (i = 0; i < len; i += 1) {\r\n          arr[i] = min[i] + rnd * (max[i] - min[i]);\r\n        }\r\n\r\n        return arr;\r\n      }\r\n\r\n      if (min === undefined) {\r\n        min = 0;\r\n      }\r\n\r\n      var rndm = BMMath.random();\r\n      return min + rndm * (max - min);\r\n    }\r\n\r\n    function createPath(points, inTangents, outTangents, closed) {\r\n      var i;\r\n      var len = points.length;\r\n      var path = shapePool.newElement();\r\n      path.setPathData(!!closed, len);\r\n      var arrPlaceholder = [0, 0];\r\n      var inVertexPoint;\r\n      var outVertexPoint;\r\n\r\n      for (i = 0; i < len; i += 1) {\r\n        inVertexPoint = inTangents && inTangents[i] ? inTangents[i] : arrPlaceholder;\r\n        outVertexPoint = outTangents && outTangents[i] ? outTangents[i] : arrPlaceholder;\r\n        path.setTripleAt(points[i][0], points[i][1], outVertexPoint[0] + points[i][0], outVertexPoint[1] + points[i][1], inVertexPoint[0] + points[i][0], inVertexPoint[1] + points[i][1], i, true);\r\n      }\r\n\r\n      return path;\r\n    }\r\n\r\n    function initiateExpression(elem, data, property) {\r\n      // Bail out if we don't want expressions\r\n      function noOp(_value) {\r\n        return _value;\r\n      }\r\n\r\n      if (!elem.globalData.renderConfig.runExpressions) {\r\n        return noOp;\r\n      }\r\n\r\n      var val = data.x;\r\n      var needsVelocity = /velocity(?![\\w\\d])/.test(val);\r\n\r\n      var _needsRandom = val.indexOf('random') !== -1;\r\n\r\n      var elemType = elem.data.ty;\r\n      var transform;\r\n      var $bm_transform;\r\n      var content;\r\n      var effect;\r\n      var thisProperty = property;\r\n      thisProperty.valueAtTime = thisProperty.getValueAtTime;\r\n      Object.defineProperty(thisProperty, 'value', {\r\n        get: function get() {\r\n          return thisProperty.v;\r\n        }\r\n      });\r\n      elem.comp.frameDuration = 1 / elem.comp.globalData.frameRate;\r\n      elem.comp.displayStartTime = 0;\r\n      var inPoint = elem.data.ip / elem.comp.globalData.frameRate;\r\n      var outPoint = elem.data.op / elem.comp.globalData.frameRate;\r\n      var width = elem.data.sw ? elem.data.sw : 0;\r\n      var height = elem.data.sh ? elem.data.sh : 0;\r\n      var name = elem.data.nm;\r\n      var loopIn;\r\n      var loop_in;\r\n      var loopOut;\r\n      var loop_out;\r\n      var smooth;\r\n      var toWorld;\r\n      var fromWorld;\r\n      var fromComp;\r\n      var toComp;\r\n      var fromCompToSurface;\r\n      var position;\r\n      var rotation;\r\n      var anchorPoint;\r\n      var scale;\r\n      var thisLayer;\r\n      var thisComp;\r\n      var mask;\r\n      var valueAtTime;\r\n      var velocityAtTime;\r\n      var scoped_bm_rt; // val = val.replace(/(\\\\?\"|')((http)(s)?(:\\/))?\\/.*?(\\\\?\"|')/g, \"\\\"\\\"\"); // deter potential network calls\r\n\r\n      var expression_function = eval('[function _expression_function(){' + val + ';scoped_bm_rt=$bm_rt}]')[0]; // eslint-disable-line no-eval\r\n\r\n      var numKeys = property.kf ? data.k.length : 0;\r\n      var active = !this.data || this.data.hd !== true;\r\n\r\n      var wiggle = function wiggle(freq, amp) {\r\n        var iWiggle;\r\n        var j;\r\n        var lenWiggle = this.pv.length ? this.pv.length : 1;\r\n        var addedAmps = createTypedArray('float32', lenWiggle);\r\n        freq = 5;\r\n        var iterations = Math.floor(time * freq);\r\n        iWiggle = 0;\r\n        j = 0;\r\n\r\n        while (iWiggle < iterations) {\r\n          // var rnd = BMMath.random();\r\n          for (j = 0; j < lenWiggle; j += 1) {\r\n            addedAmps[j] += -amp + amp * 2 * BMMath.random(); // addedAmps[j] += -amp + amp*2*rnd;\r\n          }\r\n\r\n          iWiggle += 1;\r\n        } // var rnd2 = BMMath.random();\r\n\r\n\r\n        var periods = time * freq;\r\n        var perc = periods - Math.floor(periods);\r\n        var arr = createTypedArray('float32', lenWiggle);\r\n\r\n        if (lenWiggle > 1) {\r\n          for (j = 0; j < lenWiggle; j += 1) {\r\n            arr[j] = this.pv[j] + addedAmps[j] + (-amp + amp * 2 * BMMath.random()) * perc; // arr[j] = this.pv[j] + addedAmps[j] + (-amp + amp*2*rnd)*perc;\r\n            // arr[i] = this.pv[i] + addedAmp + amp1*perc + amp2*(1-perc);\r\n          }\r\n\r\n          return arr;\r\n        }\r\n\r\n        return this.pv + addedAmps[0] + (-amp + amp * 2 * BMMath.random()) * perc;\r\n      }.bind(this);\r\n\r\n      if (thisProperty.loopIn) {\r\n        loopIn = thisProperty.loopIn.bind(thisProperty);\r\n        loop_in = loopIn;\r\n      }\r\n\r\n      if (thisProperty.loopOut) {\r\n        loopOut = thisProperty.loopOut.bind(thisProperty);\r\n        loop_out = loopOut;\r\n      }\r\n\r\n      if (thisProperty.smooth) {\r\n        smooth = thisProperty.smooth.bind(thisProperty);\r\n      }\r\n\r\n      function loopInDuration(type, duration) {\r\n        return loopIn(type, duration, true);\r\n      }\r\n\r\n      function loopOutDuration(type, duration) {\r\n        return loopOut(type, duration, true);\r\n      }\r\n\r\n      if (this.getValueAtTime) {\r\n        valueAtTime = this.getValueAtTime.bind(this);\r\n      }\r\n\r\n      if (this.getVelocityAtTime) {\r\n        velocityAtTime = this.getVelocityAtTime.bind(this);\r\n      }\r\n\r\n      var comp = elem.comp.globalData.projectInterface.bind(elem.comp.globalData.projectInterface);\r\n\r\n      function lookAt(elem1, elem2) {\r\n        var fVec = [elem2[0] - elem1[0], elem2[1] - elem1[1], elem2[2] - elem1[2]];\r\n        var pitch = Math.atan2(fVec[0], Math.sqrt(fVec[1] * fVec[1] + fVec[2] * fVec[2])) / degToRads;\r\n        var yaw = -Math.atan2(fVec[1], fVec[2]) / degToRads;\r\n        return [yaw, pitch, 0];\r\n      }\r\n\r\n      function easeOut(t, tMin, tMax, val1, val2) {\r\n        return applyEase(easeOutBez, t, tMin, tMax, val1, val2);\r\n      }\r\n\r\n      function easeIn(t, tMin, tMax, val1, val2) {\r\n        return applyEase(easeInBez, t, tMin, tMax, val1, val2);\r\n      }\r\n\r\n      function ease(t, tMin, tMax, val1, val2) {\r\n        return applyEase(easeInOutBez, t, tMin, tMax, val1, val2);\r\n      }\r\n\r\n      function applyEase(fn, t, tMin, tMax, val1, val2) {\r\n        if (val1 === undefined) {\r\n          val1 = tMin;\r\n          val2 = tMax;\r\n        } else {\r\n          t = (t - tMin) / (tMax - tMin);\r\n        }\r\n\r\n        if (t > 1) {\r\n          t = 1;\r\n        } else if (t < 0) {\r\n          t = 0;\r\n        }\r\n\r\n        var mult = fn(t);\r\n\r\n        if ($bm_isInstanceOfArray(val1)) {\r\n          var iKey;\r\n          var lenKey = val1.length;\r\n          var arr = createTypedArray('float32', lenKey);\r\n\r\n          for (iKey = 0; iKey < lenKey; iKey += 1) {\r\n            arr[iKey] = (val2[iKey] - val1[iKey]) * mult + val1[iKey];\r\n          }\r\n\r\n          return arr;\r\n        }\r\n\r\n        return (val2 - val1) * mult + val1;\r\n      }\r\n\r\n      function nearestKey(time) {\r\n        var iKey;\r\n        var lenKey = data.k.length;\r\n        var index;\r\n        var keyTime;\r\n\r\n        if (!data.k.length || typeof data.k[0] === 'number') {\r\n          index = 0;\r\n          keyTime = 0;\r\n        } else {\r\n          index = -1;\r\n          time *= elem.comp.globalData.frameRate;\r\n\r\n          if (time < data.k[0].t) {\r\n            index = 1;\r\n            keyTime = data.k[0].t;\r\n          } else {\r\n            for (iKey = 0; iKey < lenKey - 1; iKey += 1) {\r\n              if (time === data.k[iKey].t) {\r\n                index = iKey + 1;\r\n                keyTime = data.k[iKey].t;\r\n                break;\r\n              } else if (time > data.k[iKey].t && time < data.k[iKey + 1].t) {\r\n                if (time - data.k[iKey].t > data.k[iKey + 1].t - time) {\r\n                  index = iKey + 2;\r\n                  keyTime = data.k[iKey + 1].t;\r\n                } else {\r\n                  index = iKey + 1;\r\n                  keyTime = data.k[iKey].t;\r\n                }\r\n\r\n                break;\r\n              }\r\n            }\r\n\r\n            if (index === -1) {\r\n              index = iKey + 1;\r\n              keyTime = data.k[iKey].t;\r\n            }\r\n          }\r\n        }\r\n\r\n        var obKey = {};\r\n        obKey.index = index;\r\n        obKey.time = keyTime / elem.comp.globalData.frameRate;\r\n        return obKey;\r\n      }\r\n\r\n      function key(ind) {\r\n        var obKey;\r\n        var iKey;\r\n        var lenKey;\r\n\r\n        if (!data.k.length || typeof data.k[0] === 'number') {\r\n          throw new Error('The property has no keyframe at index ' + ind);\r\n        }\r\n\r\n        ind -= 1;\r\n        obKey = {\r\n          time: data.k[ind].t / elem.comp.globalData.frameRate,\r\n          value: []\r\n        };\r\n        var arr = Object.prototype.hasOwnProperty.call(data.k[ind], 's') ? data.k[ind].s : data.k[ind - 1].e;\r\n        lenKey = arr.length;\r\n\r\n        for (iKey = 0; iKey < lenKey; iKey += 1) {\r\n          obKey[iKey] = arr[iKey];\r\n          obKey.value[iKey] = arr[iKey];\r\n        }\r\n\r\n        return obKey;\r\n      }\r\n\r\n      function framesToTime(fr, fps) {\r\n        if (!fps) {\r\n          fps = elem.comp.globalData.frameRate;\r\n        }\r\n\r\n        return fr / fps;\r\n      }\r\n\r\n      function timeToFrames(t, fps) {\r\n        if (!t && t !== 0) {\r\n          t = time;\r\n        }\r\n\r\n        if (!fps) {\r\n          fps = elem.comp.globalData.frameRate;\r\n        }\r\n\r\n        return t * fps;\r\n      }\r\n\r\n      function seedRandom(seed) {\r\n        BMMath.seedrandom(randSeed + seed);\r\n      }\r\n\r\n      function sourceRectAtTime() {\r\n        return elem.sourceRectAtTime();\r\n      }\r\n\r\n      function substring(init, end) {\r\n        if (typeof value === 'string') {\r\n          if (end === undefined) {\r\n            return value.substring(init);\r\n          }\r\n\r\n          return value.substring(init, end);\r\n        }\r\n\r\n        return '';\r\n      }\r\n\r\n      function substr(init, end) {\r\n        if (typeof value === 'string') {\r\n          if (end === undefined) {\r\n            return value.substr(init);\r\n          }\r\n\r\n          return value.substr(init, end);\r\n        }\r\n\r\n        return '';\r\n      }\r\n\r\n      function posterizeTime(framesPerSecond) {\r\n        time = framesPerSecond === 0 ? 0 : Math.floor(time * framesPerSecond) / framesPerSecond;\r\n        value = valueAtTime(time);\r\n      }\r\n\r\n      var time;\r\n      var velocity;\r\n      var value;\r\n      var text;\r\n      var textIndex;\r\n      var textTotal;\r\n      var selectorValue;\r\n      var index = elem.data.ind;\r\n      var hasParent = !!(elem.hierarchy && elem.hierarchy.length);\r\n      var parent;\r\n      var randSeed = Math.floor(Math.random() * 1000000);\r\n      var globalData = elem.globalData;\r\n\r\n      function executeExpression(_value) {\r\n        // globalData.pushExpression();\r\n        value = _value;\r\n\r\n        if (this.frameExpressionId === elem.globalData.frameId && this.propType !== 'textSelector') {\r\n          return value;\r\n        }\r\n\r\n        if (this.propType === 'textSelector') {\r\n          textIndex = this.textIndex;\r\n          textTotal = this.textTotal;\r\n          selectorValue = this.selectorValue;\r\n        }\r\n\r\n        if (!thisLayer) {\r\n          text = elem.layerInterface.text;\r\n          thisLayer = elem.layerInterface;\r\n          thisComp = elem.comp.compInterface;\r\n          toWorld = thisLayer.toWorld.bind(thisLayer);\r\n          fromWorld = thisLayer.fromWorld.bind(thisLayer);\r\n          fromComp = thisLayer.fromComp.bind(thisLayer);\r\n          toComp = thisLayer.toComp.bind(thisLayer);\r\n          mask = thisLayer.mask ? thisLayer.mask.bind(thisLayer) : null;\r\n          fromCompToSurface = fromComp;\r\n        }\r\n\r\n        if (!transform) {\r\n          transform = elem.layerInterface('ADBE Transform Group');\r\n          $bm_transform = transform;\r\n\r\n          if (transform) {\r\n            anchorPoint = transform.anchorPoint;\r\n            /* position = transform.position;\r\n                      rotation = transform.rotation;\r\n                      scale = transform.scale; */\r\n          }\r\n        }\r\n\r\n        if (elemType === 4 && !content) {\r\n          content = thisLayer('ADBE Root Vectors Group');\r\n        }\r\n\r\n        if (!effect) {\r\n          effect = thisLayer(4);\r\n        }\r\n\r\n        hasParent = !!(elem.hierarchy && elem.hierarchy.length);\r\n\r\n        if (hasParent && !parent) {\r\n          parent = elem.hierarchy[0].layerInterface;\r\n        }\r\n\r\n        time = this.comp.renderedFrame / this.comp.globalData.frameRate;\r\n\r\n        if (_needsRandom) {\r\n          seedRandom(randSeed + time);\r\n        }\r\n\r\n        if (needsVelocity) {\r\n          velocity = velocityAtTime(time);\r\n        }\r\n\r\n        expression_function();\r\n        this.frameExpressionId = elem.globalData.frameId; // TODO: Check if it's possible to return on ShapeInterface the .v value\r\n        // Changed this to a ternary operation because Rollup failed compiling it correctly\r\n\r\n        scoped_bm_rt = scoped_bm_rt.propType === propTypes.SHAPE ? scoped_bm_rt.v : scoped_bm_rt;\r\n        return scoped_bm_rt;\r\n      } // Bundlers will see these as dead code and unless we reference them\r\n\r\n\r\n      executeExpression.__preventDeadCodeRemoval = [$bm_transform, anchorPoint, time, velocity, inPoint, outPoint, width, height, name, loop_in, loop_out, smooth, toComp, fromCompToSurface, toWorld, fromWorld, mask, position, rotation, scale, thisComp, numKeys, active, wiggle, loopInDuration, loopOutDuration, comp, lookAt, easeOut, easeIn, ease, nearestKey, key, text, textIndex, textTotal, selectorValue, framesToTime, timeToFrames, sourceRectAtTime, substring, substr, posterizeTime, index, globalData];\r\n      return executeExpression;\r\n    }\r\n\r\n    ob.initiateExpression = initiateExpression;\r\n    ob.__preventDeadCodeRemoval = [window, document, XMLHttpRequest, fetch, frames, $bm_neg, add, $bm_sum, $bm_sub, $bm_mul, $bm_div, $bm_mod, clamp, radians_to_degrees, degreesToRadians, degrees_to_radians, normalize, rgbToHsl, hslToRgb, linear, random, createPath];\r\n    return ob;\r\n  }();\r\n\r\n  var expressionHelpers = function () {\r\n    function searchExpressions(elem, data, prop) {\r\n      if (data.x) {\r\n        prop.k = true;\r\n        prop.x = true;\r\n        prop.initiateExpression = ExpressionManager.initiateExpression;\r\n        prop.effectsSequence.push(prop.initiateExpression(elem, data, prop).bind(prop));\r\n      }\r\n    }\r\n\r\n    function getValueAtTime(frameNum) {\r\n      frameNum *= this.elem.globalData.frameRate;\r\n      frameNum -= this.offsetTime;\r\n\r\n      if (frameNum !== this._cachingAtTime.lastFrame) {\r\n        this._cachingAtTime.lastIndex = this._cachingAtTime.lastFrame < frameNum ? this._cachingAtTime.lastIndex : 0;\r\n        this._cachingAtTime.value = this.interpolateValue(frameNum, this._cachingAtTime);\r\n        this._cachingAtTime.lastFrame = frameNum;\r\n      }\r\n\r\n      return this._cachingAtTime.value;\r\n    }\r\n\r\n    function getSpeedAtTime(frameNum) {\r\n      var delta = -0.01;\r\n      var v1 = this.getValueAtTime(frameNum);\r\n      var v2 = this.getValueAtTime(frameNum + delta);\r\n      var speed = 0;\r\n\r\n      if (v1.length) {\r\n        var i;\r\n\r\n        for (i = 0; i < v1.length; i += 1) {\r\n          speed += Math.pow(v2[i] - v1[i], 2);\r\n        }\r\n\r\n        speed = Math.sqrt(speed) * 100;\r\n      } else {\r\n        speed = 0;\r\n      }\r\n\r\n      return speed;\r\n    }\r\n\r\n    function getVelocityAtTime(frameNum) {\r\n      if (this.vel !== undefined) {\r\n        return this.vel;\r\n      }\r\n\r\n      var delta = -0.001; // frameNum += this.elem.data.st;\r\n\r\n      var v1 = this.getValueAtTime(frameNum);\r\n      var v2 = this.getValueAtTime(frameNum + delta);\r\n      var velocity;\r\n\r\n      if (v1.length) {\r\n        velocity = createTypedArray('float32', v1.length);\r\n        var i;\r\n\r\n        for (i = 0; i < v1.length; i += 1) {\r\n          // removing frameRate\r\n          // if needed, don't add it here\r\n          // velocity[i] = this.elem.globalData.frameRate*((v2[i] - v1[i])/delta);\r\n          velocity[i] = (v2[i] - v1[i]) / delta;\r\n        }\r\n      } else {\r\n        velocity = (v2 - v1) / delta;\r\n      }\r\n\r\n      return velocity;\r\n    }\r\n\r\n    function getStaticValueAtTime() {\r\n      return this.pv;\r\n    }\r\n\r\n    function setGroupProperty(propertyGroup) {\r\n      this.propertyGroup = propertyGroup;\r\n    }\r\n\r\n    return {\r\n      searchExpressions: searchExpressions,\r\n      getSpeedAtTime: getSpeedAtTime,\r\n      getVelocityAtTime: getVelocityAtTime,\r\n      getValueAtTime: getValueAtTime,\r\n      getStaticValueAtTime: getStaticValueAtTime,\r\n      setGroupProperty: setGroupProperty\r\n    };\r\n  }();\r\n\r\n  function addPropertyDecorator() {\r\n    function loopOut(type, duration, durationFlag) {\r\n      if (!this.k || !this.keyframes) {\r\n        return this.pv;\r\n      }\r\n\r\n      type = type ? type.toLowerCase() : '';\r\n      var currentFrame = this.comp.renderedFrame;\r\n      var keyframes = this.keyframes;\r\n      var lastKeyFrame = keyframes[keyframes.length - 1].t;\r\n\r\n      if (currentFrame <= lastKeyFrame) {\r\n        return this.pv;\r\n      }\r\n\r\n      var cycleDuration;\r\n      var firstKeyFrame;\r\n\r\n      if (!durationFlag) {\r\n        if (!duration || duration > keyframes.length - 1) {\r\n          duration = keyframes.length - 1;\r\n        }\r\n\r\n        firstKeyFrame = keyframes[keyframes.length - 1 - duration].t;\r\n        cycleDuration = lastKeyFrame - firstKeyFrame;\r\n      } else {\r\n        if (!duration) {\r\n          cycleDuration = Math.max(0, lastKeyFrame - this.elem.data.ip);\r\n        } else {\r\n          cycleDuration = Math.abs(lastKeyFrame - this.elem.comp.globalData.frameRate * duration);\r\n        }\r\n\r\n        firstKeyFrame = lastKeyFrame - cycleDuration;\r\n      }\r\n\r\n      var i;\r\n      var len;\r\n      var ret;\r\n\r\n      if (type === 'pingpong') {\r\n        var iterations = Math.floor((currentFrame - firstKeyFrame) / cycleDuration);\r\n\r\n        if (iterations % 2 !== 0) {\r\n          return this.getValueAtTime((cycleDuration - (currentFrame - firstKeyFrame) % cycleDuration + firstKeyFrame) / this.comp.globalData.frameRate, 0); // eslint-disable-line\r\n        }\r\n      } else if (type === 'offset') {\r\n        var initV = this.getValueAtTime(firstKeyFrame / this.comp.globalData.frameRate, 0);\r\n        var endV = this.getValueAtTime(lastKeyFrame / this.comp.globalData.frameRate, 0);\r\n        var current = this.getValueAtTime(((currentFrame - firstKeyFrame) % cycleDuration + firstKeyFrame) / this.comp.globalData.frameRate, 0); // eslint-disable-line\r\n\r\n        var repeats = Math.floor((currentFrame - firstKeyFrame) / cycleDuration);\r\n\r\n        if (this.pv.length) {\r\n          ret = new Array(initV.length);\r\n          len = ret.length;\r\n\r\n          for (i = 0; i < len; i += 1) {\r\n            ret[i] = (endV[i] - initV[i]) * repeats + current[i];\r\n          }\r\n\r\n          return ret;\r\n        }\r\n\r\n        return (endV - initV) * repeats + current;\r\n      } else if (type === 'continue') {\r\n        var lastValue = this.getValueAtTime(lastKeyFrame / this.comp.globalData.frameRate, 0);\r\n        var nextLastValue = this.getValueAtTime((lastKeyFrame - 0.001) / this.comp.globalData.frameRate, 0);\r\n\r\n        if (this.pv.length) {\r\n          ret = new Array(lastValue.length);\r\n          len = ret.length;\r\n\r\n          for (i = 0; i < len; i += 1) {\r\n            ret[i] = lastValue[i] + (lastValue[i] - nextLastValue[i]) * ((currentFrame - lastKeyFrame) / this.comp.globalData.frameRate) / 0.0005; // eslint-disable-line\r\n          }\r\n\r\n          return ret;\r\n        }\r\n\r\n        return lastValue + (lastValue - nextLastValue) * ((currentFrame - lastKeyFrame) / 0.001);\r\n      }\r\n\r\n      return this.getValueAtTime(((currentFrame - firstKeyFrame) % cycleDuration + firstKeyFrame) / this.comp.globalData.frameRate, 0); // eslint-disable-line\r\n    }\r\n\r\n    function loopIn(type, duration, durationFlag) {\r\n      if (!this.k) {\r\n        return this.pv;\r\n      }\r\n\r\n      type = type ? type.toLowerCase() : '';\r\n      var currentFrame = this.comp.renderedFrame;\r\n      var keyframes = this.keyframes;\r\n      var firstKeyFrame = keyframes[0].t;\r\n\r\n      if (currentFrame >= firstKeyFrame) {\r\n        return this.pv;\r\n      }\r\n\r\n      var cycleDuration;\r\n      var lastKeyFrame;\r\n\r\n      if (!durationFlag) {\r\n        if (!duration || duration > keyframes.length - 1) {\r\n          duration = keyframes.length - 1;\r\n        }\r\n\r\n        lastKeyFrame = keyframes[duration].t;\r\n        cycleDuration = lastKeyFrame - firstKeyFrame;\r\n      } else {\r\n        if (!duration) {\r\n          cycleDuration = Math.max(0, this.elem.data.op - firstKeyFrame);\r\n        } else {\r\n          cycleDuration = Math.abs(this.elem.comp.globalData.frameRate * duration);\r\n        }\r\n\r\n        lastKeyFrame = firstKeyFrame + cycleDuration;\r\n      }\r\n\r\n      var i;\r\n      var len;\r\n      var ret;\r\n\r\n      if (type === 'pingpong') {\r\n        var iterations = Math.floor((firstKeyFrame - currentFrame) / cycleDuration);\r\n\r\n        if (iterations % 2 === 0) {\r\n          return this.getValueAtTime(((firstKeyFrame - currentFrame) % cycleDuration + firstKeyFrame) / this.comp.globalData.frameRate, 0); // eslint-disable-line\r\n        }\r\n      } else if (type === 'offset') {\r\n        var initV = this.getValueAtTime(firstKeyFrame / this.comp.globalData.frameRate, 0);\r\n        var endV = this.getValueAtTime(lastKeyFrame / this.comp.globalData.frameRate, 0);\r\n        var current = this.getValueAtTime((cycleDuration - (firstKeyFrame - currentFrame) % cycleDuration + firstKeyFrame) / this.comp.globalData.frameRate, 0);\r\n        var repeats = Math.floor((firstKeyFrame - currentFrame) / cycleDuration) + 1;\r\n\r\n        if (this.pv.length) {\r\n          ret = new Array(initV.length);\r\n          len = ret.length;\r\n\r\n          for (i = 0; i < len; i += 1) {\r\n            ret[i] = current[i] - (endV[i] - initV[i]) * repeats;\r\n          }\r\n\r\n          return ret;\r\n        }\r\n\r\n        return current - (endV - initV) * repeats;\r\n      } else if (type === 'continue') {\r\n        var firstValue = this.getValueAtTime(firstKeyFrame / this.comp.globalData.frameRate, 0);\r\n        var nextFirstValue = this.getValueAtTime((firstKeyFrame + 0.001) / this.comp.globalData.frameRate, 0);\r\n\r\n        if (this.pv.length) {\r\n          ret = new Array(firstValue.length);\r\n          len = ret.length;\r\n\r\n          for (i = 0; i < len; i += 1) {\r\n            ret[i] = firstValue[i] + (firstValue[i] - nextFirstValue[i]) * (firstKeyFrame - currentFrame) / 0.001;\r\n          }\r\n\r\n          return ret;\r\n        }\r\n\r\n        return firstValue + (firstValue - nextFirstValue) * (firstKeyFrame - currentFrame) / 0.001;\r\n      }\r\n\r\n      return this.getValueAtTime((cycleDuration - ((firstKeyFrame - currentFrame) % cycleDuration + firstKeyFrame)) / this.comp.globalData.frameRate, 0); // eslint-disable-line\r\n    }\r\n\r\n    function smooth(width, samples) {\r\n      if (!this.k) {\r\n        return this.pv;\r\n      }\r\n\r\n      width = (width || 0.4) * 0.5;\r\n      samples = Math.floor(samples || 5);\r\n\r\n      if (samples <= 1) {\r\n        return this.pv;\r\n      }\r\n\r\n      var currentTime = this.comp.renderedFrame / this.comp.globalData.frameRate;\r\n      var initFrame = currentTime - width;\r\n      var endFrame = currentTime + width;\r\n      var sampleFrequency = samples > 1 ? (endFrame - initFrame) / (samples - 1) : 1;\r\n      var i = 0;\r\n      var j = 0;\r\n      var value;\r\n\r\n      if (this.pv.length) {\r\n        value = createTypedArray('float32', this.pv.length);\r\n      } else {\r\n        value = 0;\r\n      }\r\n\r\n      var sampleValue;\r\n\r\n      while (i < samples) {\r\n        sampleValue = this.getValueAtTime(initFrame + i * sampleFrequency);\r\n\r\n        if (this.pv.length) {\r\n          for (j = 0; j < this.pv.length; j += 1) {\r\n            value[j] += sampleValue[j];\r\n          }\r\n        } else {\r\n          value += sampleValue;\r\n        }\r\n\r\n        i += 1;\r\n      }\r\n\r\n      if (this.pv.length) {\r\n        for (j = 0; j < this.pv.length; j += 1) {\r\n          value[j] /= samples;\r\n        }\r\n      } else {\r\n        value /= samples;\r\n      }\r\n\r\n      return value;\r\n    }\r\n\r\n    function getTransformValueAtTime(time) {\r\n      if (!this._transformCachingAtTime) {\r\n        this._transformCachingAtTime = {\r\n          v: new Matrix()\r\n        };\r\n      } /// /\r\n\r\n\r\n      var matrix = this._transformCachingAtTime.v;\r\n      matrix.cloneFromProps(this.pre.props);\r\n\r\n      if (this.appliedTransformations < 1) {\r\n        var anchor = this.a.getValueAtTime(time);\r\n        matrix.translate(-anchor[0] * this.a.mult, -anchor[1] * this.a.mult, anchor[2] * this.a.mult);\r\n      }\r\n\r\n      if (this.appliedTransformations < 2) {\r\n        var scale = this.s.getValueAtTime(time);\r\n        matrix.scale(scale[0] * this.s.mult, scale[1] * this.s.mult, scale[2] * this.s.mult);\r\n      }\r\n\r\n      if (this.sk && this.appliedTransformations < 3) {\r\n        var skew = this.sk.getValueAtTime(time);\r\n        var skewAxis = this.sa.getValueAtTime(time);\r\n        matrix.skewFromAxis(-skew * this.sk.mult, skewAxis * this.sa.mult);\r\n      }\r\n\r\n      if (this.r && this.appliedTransformations < 4) {\r\n        var rotation = this.r.getValueAtTime(time);\r\n        matrix.rotate(-rotation * this.r.mult);\r\n      } else if (!this.r && this.appliedTransformations < 4) {\r\n        var rotationZ = this.rz.getValueAtTime(time);\r\n        var rotationY = this.ry.getValueAtTime(time);\r\n        var rotationX = this.rx.getValueAtTime(time);\r\n        var orientation = this.or.getValueAtTime(time);\r\n        matrix.rotateZ(-rotationZ * this.rz.mult).rotateY(rotationY * this.ry.mult).rotateX(rotationX * this.rx.mult).rotateZ(-orientation[2] * this.or.mult).rotateY(orientation[1] * this.or.mult).rotateX(orientation[0] * this.or.mult);\r\n      }\r\n\r\n      if (this.data.p && this.data.p.s) {\r\n        var positionX = this.px.getValueAtTime(time);\r\n        var positionY = this.py.getValueAtTime(time);\r\n\r\n        if (this.data.p.z) {\r\n          var positionZ = this.pz.getValueAtTime(time);\r\n          matrix.translate(positionX * this.px.mult, positionY * this.py.mult, -positionZ * this.pz.mult);\r\n        } else {\r\n          matrix.translate(positionX * this.px.mult, positionY * this.py.mult, 0);\r\n        }\r\n      } else {\r\n        var position = this.p.getValueAtTime(time);\r\n        matrix.translate(position[0] * this.p.mult, position[1] * this.p.mult, -position[2] * this.p.mult);\r\n      }\r\n\r\n      return matrix; /// /\r\n    }\r\n\r\n    function getTransformStaticValueAtTime() {\r\n      return this.v.clone(new Matrix());\r\n    }\r\n\r\n    var getTransformProperty = TransformPropertyFactory.getTransformProperty;\r\n\r\n    TransformPropertyFactory.getTransformProperty = function (elem, data, container) {\r\n      var prop = getTransformProperty(elem, data, container);\r\n\r\n      if (prop.dynamicProperties.length) {\r\n        prop.getValueAtTime = getTransformValueAtTime.bind(prop);\r\n      } else {\r\n        prop.getValueAtTime = getTransformStaticValueAtTime.bind(prop);\r\n      }\r\n\r\n      prop.setGroupProperty = expressionHelpers.setGroupProperty;\r\n      return prop;\r\n    };\r\n\r\n    var propertyGetProp = PropertyFactory.getProp;\r\n\r\n    PropertyFactory.getProp = function (elem, data, type, mult, container) {\r\n      var prop = propertyGetProp(elem, data, type, mult, container); // prop.getVelocityAtTime = getVelocityAtTime;\r\n      // prop.loopOut = loopOut;\r\n      // prop.loopIn = loopIn;\r\n\r\n      if (prop.kf) {\r\n        prop.getValueAtTime = expressionHelpers.getValueAtTime.bind(prop);\r\n      } else {\r\n        prop.getValueAtTime = expressionHelpers.getStaticValueAtTime.bind(prop);\r\n      }\r\n\r\n      prop.setGroupProperty = expressionHelpers.setGroupProperty;\r\n      prop.loopOut = loopOut;\r\n      prop.loopIn = loopIn;\r\n      prop.smooth = smooth;\r\n      prop.getVelocityAtTime = expressionHelpers.getVelocityAtTime.bind(prop);\r\n      prop.getSpeedAtTime = expressionHelpers.getSpeedAtTime.bind(prop);\r\n      prop.numKeys = data.a === 1 ? data.k.length : 0;\r\n      prop.propertyIndex = data.ix;\r\n      var value = 0;\r\n\r\n      if (type !== 0) {\r\n        value = createTypedArray('float32', data.a === 1 ? data.k[0].s.length : data.k.length);\r\n      }\r\n\r\n      prop._cachingAtTime = {\r\n        lastFrame: initialDefaultFrame,\r\n        lastIndex: 0,\r\n        value: value\r\n      };\r\n      expressionHelpers.searchExpressions(elem, data, prop);\r\n\r\n      if (prop.k) {\r\n        container.addDynamicProperty(prop);\r\n      }\r\n\r\n      return prop;\r\n    };\r\n\r\n    function getShapeValueAtTime(frameNum) {\r\n      // For now this caching object is created only when needed instead of creating it when the shape is initialized.\r\n      if (!this._cachingAtTime) {\r\n        this._cachingAtTime = {\r\n          shapeValue: shapePool.clone(this.pv),\r\n          lastIndex: 0,\r\n          lastTime: initialDefaultFrame\r\n        };\r\n      }\r\n\r\n      frameNum *= this.elem.globalData.frameRate;\r\n      frameNum -= this.offsetTime;\r\n\r\n      if (frameNum !== this._cachingAtTime.lastTime) {\r\n        this._cachingAtTime.lastIndex = this._cachingAtTime.lastTime < frameNum ? this._caching.lastIndex : 0;\r\n        this._cachingAtTime.lastTime = frameNum;\r\n        this.interpolateShape(frameNum, this._cachingAtTime.shapeValue, this._cachingAtTime);\r\n      }\r\n\r\n      return this._cachingAtTime.shapeValue;\r\n    }\r\n\r\n    var ShapePropertyConstructorFunction = ShapePropertyFactory.getConstructorFunction();\r\n    var KeyframedShapePropertyConstructorFunction = ShapePropertyFactory.getKeyframedConstructorFunction();\r\n\r\n    function ShapeExpressions() {}\r\n\r\n    ShapeExpressions.prototype = {\r\n      vertices: function vertices(prop, time) {\r\n        if (this.k) {\r\n          this.getValue();\r\n        }\r\n\r\n        var shapePath = this.v;\r\n\r\n        if (time !== undefined) {\r\n          shapePath = this.getValueAtTime(time, 0);\r\n        }\r\n\r\n        var i;\r\n        var len = shapePath._length;\r\n        var vertices = shapePath[prop];\r\n        var points = shapePath.v;\r\n        var arr = createSizedArray(len);\r\n\r\n        for (i = 0; i < len; i += 1) {\r\n          if (prop === 'i' || prop === 'o') {\r\n            arr[i] = [vertices[i][0] - points[i][0], vertices[i][1] - points[i][1]];\r\n          } else {\r\n            arr[i] = [vertices[i][0], vertices[i][1]];\r\n          }\r\n        }\r\n\r\n        return arr;\r\n      },\r\n      points: function points(time) {\r\n        return this.vertices('v', time);\r\n      },\r\n      inTangents: function inTangents(time) {\r\n        return this.vertices('i', time);\r\n      },\r\n      outTangents: function outTangents(time) {\r\n        return this.vertices('o', time);\r\n      },\r\n      isClosed: function isClosed() {\r\n        return this.v.c;\r\n      },\r\n      pointOnPath: function pointOnPath(perc, time) {\r\n        var shapePath = this.v;\r\n\r\n        if (time !== undefined) {\r\n          shapePath = this.getValueAtTime(time, 0);\r\n        }\r\n\r\n        if (!this._segmentsLength) {\r\n          this._segmentsLength = bez.getSegmentsLength(shapePath);\r\n        }\r\n\r\n        var segmentsLength = this._segmentsLength;\r\n        var lengths = segmentsLength.lengths;\r\n        var lengthPos = segmentsLength.totalLength * perc;\r\n        var i = 0;\r\n        var len = lengths.length;\r\n        var accumulatedLength = 0;\r\n        var pt;\r\n\r\n        while (i < len) {\r\n          if (accumulatedLength + lengths[i].addedLength > lengthPos) {\r\n            var initIndex = i;\r\n            var endIndex = shapePath.c && i === len - 1 ? 0 : i + 1;\r\n            var segmentPerc = (lengthPos - accumulatedLength) / lengths[i].addedLength;\r\n            pt = bez.getPointInSegment(shapePath.v[initIndex], shapePath.v[endIndex], shapePath.o[initIndex], shapePath.i[endIndex], segmentPerc, lengths[i]);\r\n            break;\r\n          } else {\r\n            accumulatedLength += lengths[i].addedLength;\r\n          }\r\n\r\n          i += 1;\r\n        }\r\n\r\n        if (!pt) {\r\n          pt = shapePath.c ? [shapePath.v[0][0], shapePath.v[0][1]] : [shapePath.v[shapePath._length - 1][0], shapePath.v[shapePath._length - 1][1]];\r\n        }\r\n\r\n        return pt;\r\n      },\r\n      vectorOnPath: function vectorOnPath(perc, time, vectorType) {\r\n        // perc doesn't use triple equality because it can be a Number object as well as a primitive.\r\n        if (perc == 1) {\r\n          // eslint-disable-line eqeqeq\r\n          perc = this.v.c;\r\n        } else if (perc == 0) {\r\n          // eslint-disable-line eqeqeq\r\n          perc = 0.999;\r\n        }\r\n\r\n        var pt1 = this.pointOnPath(perc, time);\r\n        var pt2 = this.pointOnPath(perc + 0.001, time);\r\n        var xLength = pt2[0] - pt1[0];\r\n        var yLength = pt2[1] - pt1[1];\r\n        var magnitude = Math.sqrt(Math.pow(xLength, 2) + Math.pow(yLength, 2));\r\n\r\n        if (magnitude === 0) {\r\n          return [0, 0];\r\n        }\r\n\r\n        var unitVector = vectorType === 'tangent' ? [xLength / magnitude, yLength / magnitude] : [-yLength / magnitude, xLength / magnitude];\r\n        return unitVector;\r\n      },\r\n      tangentOnPath: function tangentOnPath(perc, time) {\r\n        return this.vectorOnPath(perc, time, 'tangent');\r\n      },\r\n      normalOnPath: function normalOnPath(perc, time) {\r\n        return this.vectorOnPath(perc, time, 'normal');\r\n      },\r\n      setGroupProperty: expressionHelpers.setGroupProperty,\r\n      getValueAtTime: expressionHelpers.getStaticValueAtTime\r\n    };\r\n    extendPrototype([ShapeExpressions], ShapePropertyConstructorFunction);\r\n    extendPrototype([ShapeExpressions], KeyframedShapePropertyConstructorFunction);\r\n    KeyframedShapePropertyConstructorFunction.prototype.getValueAtTime = getShapeValueAtTime;\r\n    KeyframedShapePropertyConstructorFunction.prototype.initiateExpression = ExpressionManager.initiateExpression;\r\n    var propertyGetShapeProp = ShapePropertyFactory.getShapeProp;\r\n\r\n    ShapePropertyFactory.getShapeProp = function (elem, data, type, arr, trims) {\r\n      var prop = propertyGetShapeProp(elem, data, type, arr, trims);\r\n      prop.propertyIndex = data.ix;\r\n      prop.lock = false;\r\n\r\n      if (type === 3) {\r\n        expressionHelpers.searchExpressions(elem, data.pt, prop);\r\n      } else if (type === 4) {\r\n        expressionHelpers.searchExpressions(elem, data.ks, prop);\r\n      }\r\n\r\n      if (prop.k) {\r\n        elem.addDynamicProperty(prop);\r\n      }\r\n\r\n      return prop;\r\n    };\r\n  }\r\n\r\n  function initialize$1() {\r\n    addPropertyDecorator();\r\n  }\r\n\r\n  function addDecorator() {\r\n    function searchExpressions() {\r\n      if (this.data.d.x) {\r\n        this.calculateExpression = ExpressionManager.initiateExpression.bind(this)(this.elem, this.data.d, this);\r\n        this.addEffect(this.getExpressionValue.bind(this));\r\n        return true;\r\n      }\r\n\r\n      return null;\r\n    }\r\n\r\n    TextProperty.prototype.getExpressionValue = function (currentValue, text) {\r\n      var newValue = this.calculateExpression(text);\r\n\r\n      if (currentValue.t !== newValue) {\r\n        var newData = {};\r\n        this.copyData(newData, currentValue);\r\n        newData.t = newValue.toString();\r\n        newData.__complete = false;\r\n        return newData;\r\n      }\r\n\r\n      return currentValue;\r\n    };\r\n\r\n    TextProperty.prototype.searchProperty = function () {\r\n      var isKeyframed = this.searchKeyframes();\r\n      var hasExpressions = this.searchExpressions();\r\n      this.kf = isKeyframed || hasExpressions;\r\n      return this.kf;\r\n    };\r\n\r\n    TextProperty.prototype.searchExpressions = searchExpressions;\r\n  }\r\n\r\n  function initialize() {\r\n    addDecorator();\r\n  }\r\n\r\n  function SVGComposableEffect() {}\r\n\r\n  SVGComposableEffect.prototype = {\r\n    createMergeNode: function createMergeNode(resultId, ins) {\r\n      var feMerge = createNS('feMerge');\r\n      feMerge.setAttribute('result', resultId);\r\n      var feMergeNode;\r\n      var i;\r\n\r\n      for (i = 0; i < ins.length; i += 1) {\r\n        feMergeNode = createNS('feMergeNode');\r\n        feMergeNode.setAttribute('in', ins[i]);\r\n        feMerge.appendChild(feMergeNode);\r\n        feMerge.appendChild(feMergeNode);\r\n      }\r\n\r\n      return feMerge;\r\n    }\r\n  };\r\n\r\n  function SVGTintFilter(filter, filterManager, elem, id, source) {\r\n    this.filterManager = filterManager;\r\n    var feColorMatrix = createNS('feColorMatrix');\r\n    feColorMatrix.setAttribute('type', 'matrix');\r\n    feColorMatrix.setAttribute('color-interpolation-filters', 'linearRGB');\r\n    feColorMatrix.setAttribute('values', '0.3333 0.3333 0.3333 0 0 0.3333 0.3333 0.3333 0 0 0.3333 0.3333 0.3333 0 0 0 0 0 1 0');\r\n    feColorMatrix.setAttribute('result', id + '_tint_1');\r\n    filter.appendChild(feColorMatrix);\r\n    feColorMatrix = createNS('feColorMatrix');\r\n    feColorMatrix.setAttribute('type', 'matrix');\r\n    feColorMatrix.setAttribute('color-interpolation-filters', 'sRGB');\r\n    feColorMatrix.setAttribute('values', '1 0 0 0 0 0 1 0 0 0 0 0 1 0 0 0 0 0 1 0');\r\n    feColorMatrix.setAttribute('result', id + '_tint_2');\r\n    filter.appendChild(feColorMatrix);\r\n    this.matrixFilter = feColorMatrix;\r\n    var feMerge = this.createMergeNode(id, [source, id + '_tint_1', id + '_tint_2']);\r\n    filter.appendChild(feMerge);\r\n  }\r\n\r\n  extendPrototype([SVGComposableEffect], SVGTintFilter);\r\n\r\n  SVGTintFilter.prototype.renderFrame = function (forceRender) {\r\n    if (forceRender || this.filterManager._mdf) {\r\n      var colorBlack = this.filterManager.effectElements[0].p.v;\r\n      var colorWhite = this.filterManager.effectElements[1].p.v;\r\n      var opacity = this.filterManager.effectElements[2].p.v / 100;\r\n      this.matrixFilter.setAttribute('values', colorWhite[0] - colorBlack[0] + ' 0 0 0 ' + colorBlack[0] + ' ' + (colorWhite[1] - colorBlack[1]) + ' 0 0 0 ' + colorBlack[1] + ' ' + (colorWhite[2] - colorBlack[2]) + ' 0 0 0 ' + colorBlack[2] + ' 0 0 0 ' + opacity + ' 0');\r\n    }\r\n  };\r\n\r\n  function SVGFillFilter(filter, filterManager, elem, id) {\r\n    this.filterManager = filterManager;\r\n    var feColorMatrix = createNS('feColorMatrix');\r\n    feColorMatrix.setAttribute('type', 'matrix');\r\n    feColorMatrix.setAttribute('color-interpolation-filters', 'sRGB');\r\n    feColorMatrix.setAttribute('values', '1 0 0 0 0 0 1 0 0 0 0 0 1 0 0 0 0 0 1 0');\r\n    feColorMatrix.setAttribute('result', id);\r\n    filter.appendChild(feColorMatrix);\r\n    this.matrixFilter = feColorMatrix;\r\n  }\r\n\r\n  SVGFillFilter.prototype.renderFrame = function (forceRender) {\r\n    if (forceRender || this.filterManager._mdf) {\r\n      var color = this.filterManager.effectElements[2].p.v;\r\n      var opacity = this.filterManager.effectElements[6].p.v;\r\n      this.matrixFilter.setAttribute('values', '0 0 0 0 ' + color[0] + ' 0 0 0 0 ' + color[1] + ' 0 0 0 0 ' + color[2] + ' 0 0 0 ' + opacity + ' 0');\r\n    }\r\n  };\r\n\r\n  function SVGStrokeEffect(fil, filterManager, elem) {\r\n    this.initialized = false;\r\n    this.filterManager = filterManager;\r\n    this.elem = elem;\r\n    this.paths = [];\r\n  }\r\n\r\n  SVGStrokeEffect.prototype.initialize = function () {\r\n    var elemChildren = this.elem.layerElement.children || this.elem.layerElement.childNodes;\r\n    var path;\r\n    var groupPath;\r\n    var i;\r\n    var len;\r\n\r\n    if (this.filterManager.effectElements[1].p.v === 1) {\r\n      len = this.elem.maskManager.masksProperties.length;\r\n      i = 0;\r\n    } else {\r\n      i = this.filterManager.effectElements[0].p.v - 1;\r\n      len = i + 1;\r\n    }\r\n\r\n    groupPath = createNS('g');\r\n    groupPath.setAttribute('fill', 'none');\r\n    groupPath.setAttribute('stroke-linecap', 'round');\r\n    groupPath.setAttribute('stroke-dashoffset', 1);\r\n\r\n    for (i; i < len; i += 1) {\r\n      path = createNS('path');\r\n      groupPath.appendChild(path);\r\n      this.paths.push({\r\n        p: path,\r\n        m: i\r\n      });\r\n    }\r\n\r\n    if (this.filterManager.effectElements[10].p.v === 3) {\r\n      var mask = createNS('mask');\r\n      var id = createElementID();\r\n      mask.setAttribute('id', id);\r\n      mask.setAttribute('mask-type', 'alpha');\r\n      mask.appendChild(groupPath);\r\n      this.elem.globalData.defs.appendChild(mask);\r\n      var g = createNS('g');\r\n      g.setAttribute('mask', 'url(' + getLocationHref() + '#' + id + ')');\r\n\r\n      while (elemChildren[0]) {\r\n        g.appendChild(elemChildren[0]);\r\n      }\r\n\r\n      this.elem.layerElement.appendChild(g);\r\n      this.masker = mask;\r\n      groupPath.setAttribute('stroke', '#fff');\r\n    } else if (this.filterManager.effectElements[10].p.v === 1 || this.filterManager.effectElements[10].p.v === 2) {\r\n      if (this.filterManager.effectElements[10].p.v === 2) {\r\n        elemChildren = this.elem.layerElement.children || this.elem.layerElement.childNodes;\r\n\r\n        while (elemChildren.length) {\r\n          this.elem.layerElement.removeChild(elemChildren[0]);\r\n        }\r\n      }\r\n\r\n      this.elem.layerElement.appendChild(groupPath);\r\n      this.elem.layerElement.removeAttribute('mask');\r\n      groupPath.setAttribute('stroke', '#fff');\r\n    }\r\n\r\n    this.initialized = true;\r\n    this.pathMasker = groupPath;\r\n  };\r\n\r\n  SVGStrokeEffect.prototype.renderFrame = function (forceRender) {\r\n    if (!this.initialized) {\r\n      this.initialize();\r\n    }\r\n\r\n    var i;\r\n    var len = this.paths.length;\r\n    var mask;\r\n    var path;\r\n\r\n    for (i = 0; i < len; i += 1) {\r\n      if (this.paths[i].m !== -1) {\r\n        mask = this.elem.maskManager.viewData[this.paths[i].m];\r\n        path = this.paths[i].p;\r\n\r\n        if (forceRender || this.filterManager._mdf || mask.prop._mdf) {\r\n          path.setAttribute('d', mask.lastPath);\r\n        }\r\n\r\n        if (forceRender || this.filterManager.effectElements[9].p._mdf || this.filterManager.effectElements[4].p._mdf || this.filterManager.effectElements[7].p._mdf || this.filterManager.effectElements[8].p._mdf || mask.prop._mdf) {\r\n          var dasharrayValue;\r\n\r\n          if (this.filterManager.effectElements[7].p.v !== 0 || this.filterManager.effectElements[8].p.v !== 100) {\r\n            var s = Math.min(this.filterManager.effectElements[7].p.v, this.filterManager.effectElements[8].p.v) * 0.01;\r\n            var e = Math.max(this.filterManager.effectElements[7].p.v, this.filterManager.effectElements[8].p.v) * 0.01;\r\n            var l = path.getTotalLength();\r\n            dasharrayValue = '0 0 0 ' + l * s + ' ';\r\n            var lineLength = l * (e - s);\r\n            var segment = 1 + this.filterManager.effectElements[4].p.v * 2 * this.filterManager.effectElements[9].p.v * 0.01;\r\n            var units = Math.floor(lineLength / segment);\r\n            var j;\r\n\r\n            for (j = 0; j < units; j += 1) {\r\n              dasharrayValue += '1 ' + this.filterManager.effectElements[4].p.v * 2 * this.filterManager.effectElements[9].p.v * 0.01 + ' ';\r\n            }\r\n\r\n            dasharrayValue += '0 ' + l * 10 + ' 0 0';\r\n          } else {\r\n            dasharrayValue = '1 ' + this.filterManager.effectElements[4].p.v * 2 * this.filterManager.effectElements[9].p.v * 0.01;\r\n          }\r\n\r\n          path.setAttribute('stroke-dasharray', dasharrayValue);\r\n        }\r\n      }\r\n    }\r\n\r\n    if (forceRender || this.filterManager.effectElements[4].p._mdf) {\r\n      this.pathMasker.setAttribute('stroke-width', this.filterManager.effectElements[4].p.v * 2);\r\n    }\r\n\r\n    if (forceRender || this.filterManager.effectElements[6].p._mdf) {\r\n      this.pathMasker.setAttribute('opacity', this.filterManager.effectElements[6].p.v);\r\n    }\r\n\r\n    if (this.filterManager.effectElements[10].p.v === 1 || this.filterManager.effectElements[10].p.v === 2) {\r\n      if (forceRender || this.filterManager.effectElements[3].p._mdf) {\r\n        var color = this.filterManager.effectElements[3].p.v;\r\n        this.pathMasker.setAttribute('stroke', 'rgb(' + bmFloor(color[0] * 255) + ',' + bmFloor(color[1] * 255) + ',' + bmFloor(color[2] * 255) + ')');\r\n      }\r\n    }\r\n  };\r\n\r\n  function SVGTritoneFilter(filter, filterManager, elem, id) {\r\n    this.filterManager = filterManager;\r\n    var feColorMatrix = createNS('feColorMatrix');\r\n    feColorMatrix.setAttribute('type', 'matrix');\r\n    feColorMatrix.setAttribute('color-interpolation-filters', 'linearRGB');\r\n    feColorMatrix.setAttribute('values', '0.3333 0.3333 0.3333 0 0 0.3333 0.3333 0.3333 0 0 0.3333 0.3333 0.3333 0 0 0 0 0 1 0');\r\n    filter.appendChild(feColorMatrix);\r\n    var feComponentTransfer = createNS('feComponentTransfer');\r\n    feComponentTransfer.setAttribute('color-interpolation-filters', 'sRGB');\r\n    feComponentTransfer.setAttribute('result', id);\r\n    this.matrixFilter = feComponentTransfer;\r\n    var feFuncR = createNS('feFuncR');\r\n    feFuncR.setAttribute('type', 'table');\r\n    feComponentTransfer.appendChild(feFuncR);\r\n    this.feFuncR = feFuncR;\r\n    var feFuncG = createNS('feFuncG');\r\n    feFuncG.setAttribute('type', 'table');\r\n    feComponentTransfer.appendChild(feFuncG);\r\n    this.feFuncG = feFuncG;\r\n    var feFuncB = createNS('feFuncB');\r\n    feFuncB.setAttribute('type', 'table');\r\n    feComponentTransfer.appendChild(feFuncB);\r\n    this.feFuncB = feFuncB;\r\n    filter.appendChild(feComponentTransfer);\r\n  }\r\n\r\n  SVGTritoneFilter.prototype.renderFrame = function (forceRender) {\r\n    if (forceRender || this.filterManager._mdf) {\r\n      var color1 = this.filterManager.effectElements[0].p.v;\r\n      var color2 = this.filterManager.effectElements[1].p.v;\r\n      var color3 = this.filterManager.effectElements[2].p.v;\r\n      var tableR = color3[0] + ' ' + color2[0] + ' ' + color1[0];\r\n      var tableG = color3[1] + ' ' + color2[1] + ' ' + color1[1];\r\n      var tableB = color3[2] + ' ' + color2[2] + ' ' + color1[2];\r\n      this.feFuncR.setAttribute('tableValues', tableR);\r\n      this.feFuncG.setAttribute('tableValues', tableG);\r\n      this.feFuncB.setAttribute('tableValues', tableB);\r\n    }\r\n  };\r\n\r\n  function SVGProLevelsFilter(filter, filterManager, elem, id) {\r\n    this.filterManager = filterManager;\r\n    var effectElements = this.filterManager.effectElements;\r\n    var feComponentTransfer = createNS('feComponentTransfer'); // Red\r\n\r\n    if (effectElements[10].p.k || effectElements[10].p.v !== 0 || effectElements[11].p.k || effectElements[11].p.v !== 1 || effectElements[12].p.k || effectElements[12].p.v !== 1 || effectElements[13].p.k || effectElements[13].p.v !== 0 || effectElements[14].p.k || effectElements[14].p.v !== 1) {\r\n      this.feFuncR = this.createFeFunc('feFuncR', feComponentTransfer);\r\n    } // Green\r\n\r\n\r\n    if (effectElements[17].p.k || effectElements[17].p.v !== 0 || effectElements[18].p.k || effectElements[18].p.v !== 1 || effectElements[19].p.k || effectElements[19].p.v !== 1 || effectElements[20].p.k || effectElements[20].p.v !== 0 || effectElements[21].p.k || effectElements[21].p.v !== 1) {\r\n      this.feFuncG = this.createFeFunc('feFuncG', feComponentTransfer);\r\n    } // Blue\r\n\r\n\r\n    if (effectElements[24].p.k || effectElements[24].p.v !== 0 || effectElements[25].p.k || effectElements[25].p.v !== 1 || effectElements[26].p.k || effectElements[26].p.v !== 1 || effectElements[27].p.k || effectElements[27].p.v !== 0 || effectElements[28].p.k || effectElements[28].p.v !== 1) {\r\n      this.feFuncB = this.createFeFunc('feFuncB', feComponentTransfer);\r\n    } // Alpha\r\n\r\n\r\n    if (effectElements[31].p.k || effectElements[31].p.v !== 0 || effectElements[32].p.k || effectElements[32].p.v !== 1 || effectElements[33].p.k || effectElements[33].p.v !== 1 || effectElements[34].p.k || effectElements[34].p.v !== 0 || effectElements[35].p.k || effectElements[35].p.v !== 1) {\r\n      this.feFuncA = this.createFeFunc('feFuncA', feComponentTransfer);\r\n    } // RGB\r\n\r\n\r\n    if (this.feFuncR || this.feFuncG || this.feFuncB || this.feFuncA) {\r\n      feComponentTransfer.setAttribute('color-interpolation-filters', 'sRGB');\r\n      filter.appendChild(feComponentTransfer);\r\n    }\r\n\r\n    if (effectElements[3].p.k || effectElements[3].p.v !== 0 || effectElements[4].p.k || effectElements[4].p.v !== 1 || effectElements[5].p.k || effectElements[5].p.v !== 1 || effectElements[6].p.k || effectElements[6].p.v !== 0 || effectElements[7].p.k || effectElements[7].p.v !== 1) {\r\n      feComponentTransfer = createNS('feComponentTransfer');\r\n      feComponentTransfer.setAttribute('color-interpolation-filters', 'sRGB');\r\n      feComponentTransfer.setAttribute('result', id);\r\n      filter.appendChild(feComponentTransfer);\r\n      this.feFuncRComposed = this.createFeFunc('feFuncR', feComponentTransfer);\r\n      this.feFuncGComposed = this.createFeFunc('feFuncG', feComponentTransfer);\r\n      this.feFuncBComposed = this.createFeFunc('feFuncB', feComponentTransfer);\r\n    }\r\n  }\r\n\r\n  SVGProLevelsFilter.prototype.createFeFunc = function (type, feComponentTransfer) {\r\n    var feFunc = createNS(type);\r\n    feFunc.setAttribute('type', 'table');\r\n    feComponentTransfer.appendChild(feFunc);\r\n    return feFunc;\r\n  };\r\n\r\n  SVGProLevelsFilter.prototype.getTableValue = function (inputBlack, inputWhite, gamma, outputBlack, outputWhite) {\r\n    var cnt = 0;\r\n    var segments = 256;\r\n    var perc;\r\n    var min = Math.min(inputBlack, inputWhite);\r\n    var max = Math.max(inputBlack, inputWhite);\r\n    var table = Array.call(null, {\r\n      length: segments\r\n    });\r\n    var colorValue;\r\n    var pos = 0;\r\n    var outputDelta = outputWhite - outputBlack;\r\n    var inputDelta = inputWhite - inputBlack;\r\n\r\n    while (cnt <= 256) {\r\n      perc = cnt / 256;\r\n\r\n      if (perc <= min) {\r\n        colorValue = inputDelta < 0 ? outputWhite : outputBlack;\r\n      } else if (perc >= max) {\r\n        colorValue = inputDelta < 0 ? outputBlack : outputWhite;\r\n      } else {\r\n        colorValue = outputBlack + outputDelta * Math.pow((perc - inputBlack) / inputDelta, 1 / gamma);\r\n      }\r\n\r\n      table[pos] = colorValue;\r\n      pos += 1;\r\n      cnt += 256 / (segments - 1);\r\n    }\r\n\r\n    return table.join(' ');\r\n  };\r\n\r\n  SVGProLevelsFilter.prototype.renderFrame = function (forceRender) {\r\n    if (forceRender || this.filterManager._mdf) {\r\n      var val;\r\n      var effectElements = this.filterManager.effectElements;\r\n\r\n      if (this.feFuncRComposed && (forceRender || effectElements[3].p._mdf || effectElements[4].p._mdf || effectElements[5].p._mdf || effectElements[6].p._mdf || effectElements[7].p._mdf)) {\r\n        val = this.getTableValue(effectElements[3].p.v, effectElements[4].p.v, effectElements[5].p.v, effectElements[6].p.v, effectElements[7].p.v);\r\n        this.feFuncRComposed.setAttribute('tableValues', val);\r\n        this.feFuncGComposed.setAttribute('tableValues', val);\r\n        this.feFuncBComposed.setAttribute('tableValues', val);\r\n      }\r\n\r\n      if (this.feFuncR && (forceRender || effectElements[10].p._mdf || effectElements[11].p._mdf || effectElements[12].p._mdf || effectElements[13].p._mdf || effectElements[14].p._mdf)) {\r\n        val = this.getTableValue(effectElements[10].p.v, effectElements[11].p.v, effectElements[12].p.v, effectElements[13].p.v, effectElements[14].p.v);\r\n        this.feFuncR.setAttribute('tableValues', val);\r\n      }\r\n\r\n      if (this.feFuncG && (forceRender || effectElements[17].p._mdf || effectElements[18].p._mdf || effectElements[19].p._mdf || effectElements[20].p._mdf || effectElements[21].p._mdf)) {\r\n        val = this.getTableValue(effectElements[17].p.v, effectElements[18].p.v, effectElements[19].p.v, effectElements[20].p.v, effectElements[21].p.v);\r\n        this.feFuncG.setAttribute('tableValues', val);\r\n      }\r\n\r\n      if (this.feFuncB && (forceRender || effectElements[24].p._mdf || effectElements[25].p._mdf || effectElements[26].p._mdf || effectElements[27].p._mdf || effectElements[28].p._mdf)) {\r\n        val = this.getTableValue(effectElements[24].p.v, effectElements[25].p.v, effectElements[26].p.v, effectElements[27].p.v, effectElements[28].p.v);\r\n        this.feFuncB.setAttribute('tableValues', val);\r\n      }\r\n\r\n      if (this.feFuncA && (forceRender || effectElements[31].p._mdf || effectElements[32].p._mdf || effectElements[33].p._mdf || effectElements[34].p._mdf || effectElements[35].p._mdf)) {\r\n        val = this.getTableValue(effectElements[31].p.v, effectElements[32].p.v, effectElements[33].p.v, effectElements[34].p.v, effectElements[35].p.v);\r\n        this.feFuncA.setAttribute('tableValues', val);\r\n      }\r\n    }\r\n  };\r\n\r\n  function SVGDropShadowEffect(filter, filterManager, elem, id, source) {\r\n    var globalFilterSize = filterManager.container.globalData.renderConfig.filterSize;\r\n    var filterSize = filterManager.data.fs || globalFilterSize;\r\n    filter.setAttribute('x', filterSize.x || globalFilterSize.x);\r\n    filter.setAttribute('y', filterSize.y || globalFilterSize.y);\r\n    filter.setAttribute('width', filterSize.width || globalFilterSize.width);\r\n    filter.setAttribute('height', filterSize.height || globalFilterSize.height);\r\n    this.filterManager = filterManager;\r\n    var feGaussianBlur = createNS('feGaussianBlur');\r\n    feGaussianBlur.setAttribute('in', 'SourceAlpha');\r\n    feGaussianBlur.setAttribute('result', id + '_drop_shadow_1');\r\n    feGaussianBlur.setAttribute('stdDeviation', '0');\r\n    this.feGaussianBlur = feGaussianBlur;\r\n    filter.appendChild(feGaussianBlur);\r\n    var feOffset = createNS('feOffset');\r\n    feOffset.setAttribute('dx', '25');\r\n    feOffset.setAttribute('dy', '0');\r\n    feOffset.setAttribute('in', id + '_drop_shadow_1');\r\n    feOffset.setAttribute('result', id + '_drop_shadow_2');\r\n    this.feOffset = feOffset;\r\n    filter.appendChild(feOffset);\r\n    var feFlood = createNS('feFlood');\r\n    feFlood.setAttribute('flood-color', '#00ff00');\r\n    feFlood.setAttribute('flood-opacity', '1');\r\n    feFlood.setAttribute('result', id + '_drop_shadow_3');\r\n    this.feFlood = feFlood;\r\n    filter.appendChild(feFlood);\r\n    var feComposite = createNS('feComposite');\r\n    feComposite.setAttribute('in', id + '_drop_shadow_3');\r\n    feComposite.setAttribute('in2', id + '_drop_shadow_2');\r\n    feComposite.setAttribute('operator', 'in');\r\n    feComposite.setAttribute('result', id + '_drop_shadow_4');\r\n    filter.appendChild(feComposite);\r\n    var feMerge = this.createMergeNode(id, [id + '_drop_shadow_4', source]);\r\n    filter.appendChild(feMerge); //\r\n  }\r\n\r\n  extendPrototype([SVGComposableEffect], SVGDropShadowEffect);\r\n\r\n  SVGDropShadowEffect.prototype.renderFrame = function (forceRender) {\r\n    if (forceRender || this.filterManager._mdf) {\r\n      if (forceRender || this.filterManager.effectElements[4].p._mdf) {\r\n        this.feGaussianBlur.setAttribute('stdDeviation', this.filterManager.effectElements[4].p.v / 4);\r\n      }\r\n\r\n      if (forceRender || this.filterManager.effectElements[0].p._mdf) {\r\n        var col = this.filterManager.effectElements[0].p.v;\r\n        this.feFlood.setAttribute('flood-color', rgbToHex(Math.round(col[0] * 255), Math.round(col[1] * 255), Math.round(col[2] * 255)));\r\n      }\r\n\r\n      if (forceRender || this.filterManager.effectElements[1].p._mdf) {\r\n        this.feFlood.setAttribute('flood-opacity', this.filterManager.effectElements[1].p.v / 255);\r\n      }\r\n\r\n      if (forceRender || this.filterManager.effectElements[2].p._mdf || this.filterManager.effectElements[3].p._mdf) {\r\n        var distance = this.filterManager.effectElements[3].p.v;\r\n        var angle = (this.filterManager.effectElements[2].p.v - 90) * degToRads;\r\n        var x = distance * Math.cos(angle);\r\n        var y = distance * Math.sin(angle);\r\n        this.feOffset.setAttribute('dx', x);\r\n        this.feOffset.setAttribute('dy', y);\r\n      }\r\n    }\r\n  };\r\n\r\n  var _svgMatteSymbols = [];\r\n\r\n  function SVGMatte3Effect(filterElem, filterManager, elem) {\r\n    this.initialized = false;\r\n    this.filterManager = filterManager;\r\n    this.filterElem = filterElem;\r\n    this.elem = elem;\r\n    elem.matteElement = createNS('g');\r\n    elem.matteElement.appendChild(elem.layerElement);\r\n    elem.matteElement.appendChild(elem.transformedElement);\r\n    elem.baseElement = elem.matteElement;\r\n  }\r\n\r\n  SVGMatte3Effect.prototype.findSymbol = function (mask) {\r\n    var i = 0;\r\n    var len = _svgMatteSymbols.length;\r\n\r\n    while (i < len) {\r\n      if (_svgMatteSymbols[i] === mask) {\r\n        return _svgMatteSymbols[i];\r\n      }\r\n\r\n      i += 1;\r\n    }\r\n\r\n    return null;\r\n  };\r\n\r\n  SVGMatte3Effect.prototype.replaceInParent = function (mask, symbolId) {\r\n    var parentNode = mask.layerElement.parentNode;\r\n\r\n    if (!parentNode) {\r\n      return;\r\n    }\r\n\r\n    var children = parentNode.children;\r\n    var i = 0;\r\n    var len = children.length;\r\n\r\n    while (i < len) {\r\n      if (children[i] === mask.layerElement) {\r\n        break;\r\n      }\r\n\r\n      i += 1;\r\n    }\r\n\r\n    var nextChild;\r\n\r\n    if (i <= len - 2) {\r\n      nextChild = children[i + 1];\r\n    }\r\n\r\n    var useElem = createNS('use');\r\n    useElem.setAttribute('href', '#' + symbolId);\r\n\r\n    if (nextChild) {\r\n      parentNode.insertBefore(useElem, nextChild);\r\n    } else {\r\n      parentNode.appendChild(useElem);\r\n    }\r\n  };\r\n\r\n  SVGMatte3Effect.prototype.setElementAsMask = function (elem, mask) {\r\n    if (!this.findSymbol(mask)) {\r\n      var symbolId = createElementID();\r\n      var masker = createNS('mask');\r\n      masker.setAttribute('id', mask.layerId);\r\n      masker.setAttribute('mask-type', 'alpha');\r\n\r\n      _svgMatteSymbols.push(mask);\r\n\r\n      var defs = elem.globalData.defs;\r\n      defs.appendChild(masker);\r\n      var symbol = createNS('symbol');\r\n      symbol.setAttribute('id', symbolId);\r\n      this.replaceInParent(mask, symbolId);\r\n      symbol.appendChild(mask.layerElement);\r\n      defs.appendChild(symbol);\r\n      var useElem = createNS('use');\r\n      useElem.setAttribute('href', '#' + symbolId);\r\n      masker.appendChild(useElem);\r\n      mask.data.hd = false;\r\n      mask.show();\r\n    }\r\n\r\n    elem.setMatte(mask.layerId);\r\n  };\r\n\r\n  SVGMatte3Effect.prototype.initialize = function () {\r\n    var ind = this.filterManager.effectElements[0].p.v;\r\n    var elements = this.elem.comp.elements;\r\n    var i = 0;\r\n    var len = elements.length;\r\n\r\n    while (i < len) {\r\n      if (elements[i] && elements[i].data.ind === ind) {\r\n        this.setElementAsMask(this.elem, elements[i]);\r\n      }\r\n\r\n      i += 1;\r\n    }\r\n\r\n    this.initialized = true;\r\n  };\r\n\r\n  SVGMatte3Effect.prototype.renderFrame = function () {\r\n    if (!this.initialized) {\r\n      this.initialize();\r\n    }\r\n  };\r\n\r\n  function SVGGaussianBlurEffect(filter, filterManager, elem, id) {\r\n    // Outset the filter region by 100% on all sides to accommodate blur expansion.\r\n    filter.setAttribute('x', '-100%');\r\n    filter.setAttribute('y', '-100%');\r\n    filter.setAttribute('width', '300%');\r\n    filter.setAttribute('height', '300%');\r\n    this.filterManager = filterManager;\r\n    var feGaussianBlur = createNS('feGaussianBlur');\r\n    feGaussianBlur.setAttribute('result', id);\r\n    filter.appendChild(feGaussianBlur);\r\n    this.feGaussianBlur = feGaussianBlur;\r\n  }\r\n\r\n  SVGGaussianBlurEffect.prototype.renderFrame = function (forceRender) {\r\n    if (forceRender || this.filterManager._mdf) {\r\n      // Empirical value, matching AE's blur appearance.\r\n      var kBlurrinessToSigma = 0.3;\r\n      var sigma = this.filterManager.effectElements[0].p.v * kBlurrinessToSigma; // Dimensions mapping:\r\n      //\r\n      //   1 -> horizontal & vertical\r\n      //   2 -> horizontal only\r\n      //   3 -> vertical only\r\n      //\r\n\r\n      var dimensions = this.filterManager.effectElements[1].p.v;\r\n      var sigmaX = dimensions == 3 ? 0 : sigma; // eslint-disable-line eqeqeq\r\n\r\n      var sigmaY = dimensions == 2 ? 0 : sigma; // eslint-disable-line eqeqeq\r\n\r\n      this.feGaussianBlur.setAttribute('stdDeviation', sigmaX + ' ' + sigmaY); // Repeat edges mapping:\r\n      //\r\n      //   0 -> off -> duplicate\r\n      //   1 -> on  -> wrap\r\n\r\n      var edgeMode = this.filterManager.effectElements[2].p.v == 1 ? 'wrap' : 'duplicate'; // eslint-disable-line eqeqeq\r\n\r\n      this.feGaussianBlur.setAttribute('edgeMode', edgeMode);\r\n    }\r\n  };\r\n\r\n  registerRenderer('canvas', CanvasRenderer);\r\n  registerRenderer('html', HybridRenderer);\r\n  registerRenderer('svg', SVGRenderer); // Registering shape modifiers\r\n\r\n  ShapeModifiers.registerModifier('tm', TrimModifier);\r\n  ShapeModifiers.registerModifier('pb', PuckerAndBloatModifier);\r\n  ShapeModifiers.registerModifier('rp', RepeaterModifier);\r\n  ShapeModifiers.registerModifier('rd', RoundCornersModifier);\r\n  ShapeModifiers.registerModifier('zz', ZigZagModifier);\r\n  ShapeModifiers.registerModifier('op', OffsetPathModifier); // Registering expression plugin\r\n\r\n  setExpressionsPlugin(Expressions);\r\n  setExpressionInterfaces(getInterface);\r\n  initialize$1();\r\n  initialize(); // Registering svg effects\r\n\r\n  registerEffect(20, SVGTintFilter, true);\r\n  registerEffect(21, SVGFillFilter, true);\r\n  registerEffect(22, SVGStrokeEffect, false);\r\n  registerEffect(23, SVGTritoneFilter, true);\r\n  registerEffect(24, SVGProLevelsFilter, true);\r\n  registerEffect(25, SVGDropShadowEffect, true);\r\n  registerEffect(28, SVGMatte3Effect, false);\r\n  registerEffect(29, SVGGaussianBlurEffect, true);\r\n\r\n  return lottie;\r\n\r\n}));\r\n","/**\n * Copyright 2021 Design Barn Inc.\n */\n\nimport { css } from \"lit\";\n\nexport default css`\n  * {\n    box-sizing: border-box;\n  }\n\n  :host {\n    --lottie-player-toolbar-height: 35px;\n    --lottie-player-toolbar-background-color: transparent;\n    --lottie-player-toolbar-icon-color: #999;\n    --lottie-player-toolbar-icon-hover-color: #222;\n    --lottie-player-toolbar-icon-active-color: #555;\n    --lottie-player-seeker-track-color: #ccc;\n    --lottie-player-seeker-thumb-color: rgba(0, 107, 120, 0.8);\n    --lottie-player-seeker-display: block;\n\n    display: block;\n    width: 100%;\n    height: 100%;\n  }\n\n  .main {\n    display: flex;\n    flex-direction: column;\n    height: 100%;\n    width: 100%;\n  }\n\n  .animation {\n    width: 100%;\n    height: 100%;\n    display: flex;\n  }\n  .animation.controls {\n    height: calc(100% - 35px);\n  }\n\n  .toolbar {\n    display: flex;\n    align-items: center;\n    justify-items: center;\n    background-color: var(--lottie-player-toolbar-background-color);\n    margin: 0 5px;\n    height: 35px;\n  }\n\n  .toolbar button {\n    cursor: pointer;\n    fill: var(--lottie-player-toolbar-icon-color);\n    display: flex;\n    background: none;\n    border: 0;\n    padding: 0;\n    outline: none;\n    height: 100%;\n  }\n\n  .toolbar button:hover {\n    fill: var(--lottie-player-toolbar-icon-hover-color);\n  }\n\n  .toolbar button.active {\n    fill: var(--lottie-player-toolbar-icon-active-color);\n  }\n\n  .toolbar button.active:hover {\n    fill: var(--lottie-player-toolbar-icon-hover-color);\n  }\n\n  .toolbar button:focus {\n    outline: 1px dotted var(--lottie-player-toolbar-icon-active-color);\n  }\n\n  .toolbar button svg {\n  }\n\n  .toolbar button.disabled svg {\n    display: none;\n  }\n\n  .seeker {\n    -webkit-appearance: none;\n    width: 95%;\n    outline: none;\n    background-color: var(--lottie-player-toolbar-background-color);\n    display: var(--lottie-player-seeker-display);\n  }\n\n  .seeker::-webkit-slider-runnable-track {\n    width: 100%;\n    height: 5px;\n    cursor: pointer;\n    background: var(--lottie-player-seeker-track-color);\n    border-radius: 3px;\n  }\n  .seeker::-webkit-slider-thumb {\n    height: 15px;\n    width: 15px;\n    border-radius: 50%;\n    background: var(--lottie-player-seeker-thumb-color);\n    cursor: pointer;\n    -webkit-appearance: none;\n    margin-top: -5px;\n  }\n  .seeker:focus::-webkit-slider-runnable-track {\n    background: #999;\n  }\n  .seeker::-moz-range-track {\n    width: 100%;\n    height: 5px;\n    cursor: pointer;\n    background: var(--lottie-player-seeker-track-color);\n    border-radius: 3px;\n  }\n  .seeker::-moz-range-thumb {\n    height: 15px;\n    width: 15px;\n    border-radius: 50%;\n    background: var(--lottie-player-seeker-thumb-color);\n    cursor: pointer;\n  }\n  .seeker::-ms-track {\n    width: 100%;\n    height: 5px;\n    cursor: pointer;\n    background: transparent;\n    border-color: transparent;\n    color: transparent;\n  }\n  .seeker::-ms-fill-lower {\n    background: var(--lottie-player-seeker-track-color);\n    border-radius: 3px;\n  }\n  .seeker::-ms-fill-upper {\n    background: var(--lottie-player-seeker-track-color);\n    border-radius: 3px;\n  }\n  .seeker::-ms-thumb {\n    border: 0;\n    height: 15px;\n    width: 15px;\n    border-radius: 50%;\n    background: var(--lottie-player-seeker-thumb-color);\n    cursor: pointer;\n  }\n  .seeker:focus::-ms-fill-lower {\n    background: var(--lottie-player-seeker-track-color);\n  }\n  .seeker:focus::-ms-fill-upper {\n    background: var(--lottie-player-seeker-track-color);\n  }\n\n  .error {\n    display: flex;\n    justify-content: center;\n    height: 100%;\n    align-items: center;\n  }\n`;\n","export const LOTTIE_PLAYER_VERSION = \"1.7.1\"; \nexport const LOTTIE_WEB_VERSION = \"^5.10.0\";\n","// eslint-disable-next-line header/header\nimport { LitElement, html } from \"lit\";\nimport { customElement, property, query } from \"lit/decorators.js\";\nimport { TemplateResult } from \"lit/html.js\";\nimport * as lottie from \"lottie-web/build/player/lottie\";\n\nimport styles from \"./lottie-player.styles\";\nimport { LOTTIE_PLAYER_VERSION, LOTTIE_WEB_VERSION } from \"./versions\";\n\n// import ResizeObserver from \"resize-observer-polyfill\";\n\n// Define valid player states\nexport enum PlayerState {\n  Destroyed = \"destroyed\",\n  Error = \"error\",\n  Frozen = \"frozen\",\n  Loading = \"loading\",\n  Paused = \"paused\",\n  Playing = \"playing\",\n  Stopped = \"stopped\",\n}\n\n// Define play modes\nexport enum PlayMode {\n  Bounce = \"bounce\",\n  Normal = \"normal\",\n}\n\n// Define player events\nexport enum PlayerEvents {\n  Complete = \"complete\",\n  Destroyed = \"destroyed\",\n  Error = \"error\",\n  Frame = \"frame\",\n  Freeze = \"freeze\",\n  Load = \"load\",\n  Loop = \"loop\",\n  Pause = \"pause\",\n  Play = \"play\",\n  Ready = \"ready\",\n  Rendered = \"rendered\",\n  Stop = \"stop\",\n}\n\nexport interface Versions {\n  lottiePlayerVersion: string;\n  lottieWebVersion: string;\n}\n\n/**\n * Parse a resource into a JSON object or a URL string\n */\nexport function parseSrc(src: string | object): string | object {\n  if (typeof src === \"object\") {\n    return src;\n  }\n\n  try {\n    return JSON.parse(src);\n  } catch (e) {\n    // Try construct an absolute URL from the src URL\n    const srcUrl: URL = new URL(src, window.location.href);\n\n    return srcUrl.toString();\n  }\n}\n\nfunction isLottie(json: Record<string, any>): boolean {\n  const mandatory: string[] = [\"v\", \"ip\", \"op\", \"layers\", \"fr\", \"w\", \"h\"];\n\n  return mandatory.every((field: string) =>\n    Object.prototype.hasOwnProperty.call(json, field)\n  );\n}\n\nasync function fromURL(url: string): Promise<Record<string, any>> {\n  if (typeof url !== \"string\") {\n    throw new Error(`The url value must be a string`);\n  }\n\n  let json;\n\n  try {\n    // Try construct an absolute URL from the src URL\n    const srcUrl: URL = new URL(url);\n\n    // Fetch the JSON file from the URL\n    const result: any = await fetch(srcUrl.toString());\n\n    json = await result.json();\n  } catch (err) {\n    throw new Error(\n      `An error occurred while trying to load the Lottie file from URL`\n    );\n  }\n\n  return json;\n}\n/**\n * LottiePlayer web component class\n *\n * @export\n * @class LottiePlayer\n * @extends {LitElement}\n */\n@customElement(\"lottie-player\")\nexport class LottiePlayer extends LitElement {\n  /**\n   * Autoplay animation on load.\n   */\n  @property({ type: Boolean })\n  public autoplay: boolean = false;\n\n  /**\n   * Background color.\n   */\n  @property({ type: String, reflect: true })\n  public background?: string = \"transparent\";\n\n  /**\n   * Show controls.\n   */\n  @property({ type: Boolean })\n  public controls: boolean = false;\n\n  /**\n   * Number of times to loop animation.\n   */\n  @property({ type: Number })\n  public count?: number;\n\n  /**\n   * Player state.\n   */\n  @property({ type: String })\n  public currentState: PlayerState = PlayerState.Loading;\n\n  /**\n   * Animation description for screen readers.\n   */\n  @property({ type: String })\n  public description: string = \"Lottie animation\";\n\n  /**\n   * Direction of animation.\n   */\n  @property({ type: Number })\n  public direction: number = 1;\n\n  /**\n   * Disable checking if the Lottie is valid before loading\n   */\n  @property({ type: Boolean })\n  public disableCheck?: boolean = false;\n\n  /**\n   * Disable using shadow dom as the root\n   */\n  @property({ type: Boolean })\n  public disableShadowDOM: boolean = false;\n\n  /**\n   * Whether to play on mouse hover\n   */\n  @property({ type: Boolean })\n  public hover: boolean = false;\n\n  /**\n   * Intermission\n   */\n  @property()\n  public intermission: number = 1;\n\n  /**\n   * Whether to loop animation.\n   */\n  @property({ type: Boolean, reflect: true })\n  public loop: boolean = false;\n\n  /**\n   * Play mode.\n   */\n  @property()\n  public mode: PlayMode = PlayMode.Normal;\n\n  /**\n   * Aspect ratio to pass to lottie-web.\n   */\n  @property({ type: String })\n  public preserveAspectRatio: string = \"xMidYMid meet\";\n\n  /**\n   * Renderer to use.\n   */\n  @property({ type: String })\n  public renderer: \"svg\" = \"svg\";\n\n  /**\n   * Viewbox size for renderer settings\n   */\n  @property({ type: String })\n  public viewBoxSize?: string;\n\n  /**\n   * seeker\n   */\n\n  @property()\n  public seeker: any;\n\n  /**\n   * Animation speed.\n   */\n  @property({ type: Number })\n  public speed: number = 1;\n\n  /**\n   * Bodymovin JSON data or URL to JSON.\n   */\n  @property({ type: String })\n  public src?: string;\n\n  /**\n   * Enable web workers\n   */\n  @property({ type: Boolean })\n  public webworkers?: boolean;\n\n  /**\n   * Animation container.\n   */\n  @query(\".animation\")\n  protected container!: HTMLElement;\n\n  private _io: IntersectionObserver | undefined = undefined;\n\n  // private _ro: ResizeObserver | undefined = undefined;\n  private _lottie?: any;\n\n  private _prevState?: any;\n\n  private _counter: number = 1;\n\n  /**\n   * Configure and initialize lottie-web player instance.\n   */\n  public async load(src: string | object) {\n    const options: any = {\n      container: this.container,\n      loop: false,\n      autoplay: false,\n      renderer: this.renderer,\n      rendererSettings: {\n        preserveAspectRatio: this.preserveAspectRatio,\n        clearCanvas: false,\n        progressiveLoad: true,\n        hideOnTransparent: true,\n        ...(this.viewBoxSize && { viewBoxSize: this.viewBoxSize }),\n      },\n    };\n\n    // Load the resource information\n    try {\n      const srcParsed = parseSrc(src);\n      let jsonData = {};\n      let srcAttrib = typeof srcParsed === \"string\" ? \"path\" : \"animationData\";\n\n      // Clear previous animation, if any\n      if (this._lottie) {\n        this._lottie.destroy();\n      }\n\n      if (this.webworkers) {\n        lottie.useWebWorker(true);\n      }\n\n      // Initialize lottie player and load animation\n      this._lottie = lottie.loadAnimation({\n        ...options,\n\n        [srcAttrib]: srcParsed,\n      });\n\n      // Attach the event listeners before we check the requested json file for errors\n      this._attachEventListeners();\n\n      if (!this.disableCheck) {\n        // Fetch resource if src is a remote URL\n        if (srcAttrib === \"path\") {\n          jsonData = await fromURL(srcParsed as string);\n          srcAttrib = \"animationData\";\n        } else {\n          jsonData = srcParsed;\n        }\n\n        if (!isLottie(jsonData)) {\n          this.currentState = PlayerState.Error;\n          this.dispatchEvent(new CustomEvent(PlayerEvents.Error));\n        }\n      }\n    } catch (err) {\n      this.currentState = PlayerState.Error;\n      this.dispatchEvent(new CustomEvent(PlayerEvents.Error));\n    }\n  }\n\n  /**\n   * Returns the lottie-web instance used in the component.\n   */\n  public getLottie(): any {\n    return this._lottie;\n  }\n\n  /**\n   * Returns the lottie-web version and this player's version\n   */\n  public getVersions(): Versions {\n    return {\n      lottieWebVersion: LOTTIE_WEB_VERSION,\n      lottiePlayerVersion: LOTTIE_PLAYER_VERSION,\n    };\n  }\n\n  /**\n   * Start playing animation.\n   */\n  public play() {\n    if (!this._lottie) {\n      return;\n    }\n\n    this._lottie.play();\n    this.currentState = PlayerState.Playing;\n\n    this.dispatchEvent(new CustomEvent(PlayerEvents.Play));\n  }\n\n  /**\n   * Pause animation play.\n   */\n  public pause(): void {\n    if (!this._lottie) {\n      return;\n    }\n\n    this._lottie.pause();\n    this.currentState = PlayerState.Paused;\n\n    this.dispatchEvent(new CustomEvent(PlayerEvents.Pause));\n  }\n\n  /**\n   * Stops animation play.\n   */\n  public stop(): void {\n    if (!this._lottie) {\n      return;\n    }\n\n    this._counter = 1;\n    this._lottie.stop();\n    this.currentState = PlayerState.Stopped;\n\n    this.dispatchEvent(new CustomEvent(PlayerEvents.Stop));\n  }\n\n  /**\n   * Destroy animation and lottie-player element.\n   */\n  public destroy(): void {\n    if (!this._lottie) {\n      return;\n    }\n\n    this._lottie.destroy();\n    this._lottie = null;\n    this.currentState = PlayerState.Destroyed;\n    this.dispatchEvent(new CustomEvent(PlayerEvents.Destroyed));\n    this.remove();\n  }\n\n  /**\n   * Seek to a given frame.\n   */\n  public seek(value: number | string): void {\n    if (!this._lottie) {\n      return;\n    }\n\n    // Extract frame number from either number or percentage value\n    const matches = /^(\\d+)(%?)$/.exec(value.toString());\n\n    if (!matches) {\n      return;\n    }\n\n    // Calculate and set the frame number\n    const frame =\n      matches[2] === \"%\"\n        ? (this._lottie.totalFrames * Number(matches[1])) / 100\n        : Number(matches[1]);\n\n    // Set seeker to new frame number\n    this.seeker = frame;\n\n    // Send lottie player to the new frame\n    if (this.currentState === PlayerState.Playing) {\n      this._lottie.goToAndPlay(frame, true);\n    } else {\n      this._lottie.goToAndStop(frame, true);\n      this._lottie.pause();\n    }\n  }\n\n  /**\n   * Snapshot the current frame as SVG.\n   *\n   * If 'download' argument is boolean true, then a download is triggered in browser.\n   */\n  public snapshot(download: boolean = true): string | void {\n    if (!this.shadowRoot) return;\n\n    // Get SVG element and serialize markup\n    const svgElement = this.shadowRoot.querySelector(\".animation svg\") as Node;\n    const data = new XMLSerializer().serializeToString(svgElement);\n\n    // Trigger file download\n    if (download) {\n      const element = document.createElement(\"a\");\n\n      element.href = `data:image/svg+xml;charset=utf-8,${encodeURIComponent(\n        data\n      )}`;\n      element.download = `download_${this.seeker}.svg`;\n      document.body.appendChild(element);\n\n      element.click();\n\n      document.body.removeChild(element);\n    }\n\n    return data;\n  }\n\n  /**\n   * Sets animation play speed.\n   *\n   * @param value Playback speed.\n   */\n  public setSpeed(value = 1): void {\n    if (!this._lottie) {\n      return;\n    }\n\n    this._lottie.setSpeed(value);\n  }\n\n  /**\n   * Animation play direction.\n   *\n   * @param value Direction values.\n   */\n  public setDirection(value: number): void {\n    if (!this._lottie) {\n      return;\n    }\n\n    this._lottie.setDirection(value);\n  }\n\n  /**\n   * Sets the looping of the animation.\n   *\n   * @param value Whether to enable looping. Boolean true enables looping.\n   */\n  public setLooping(value: boolean): void {\n    if (this._lottie) {\n      this.loop = value;\n      this._lottie.loop = value;\n    }\n  }\n\n  /**\n   * Toggle playing state.\n   */\n  public togglePlay(): void {\n    return this.currentState === PlayerState.Playing\n      ? this.pause()\n      : this.play();\n  }\n\n  /**\n   * Toggles animation looping.\n   */\n  public toggleLooping(): void {\n    this.setLooping(!this.loop);\n  }\n\n  /**\n   * Resize animation.\n   */\n  public resize() {\n    if (!this._lottie) {\n      return;\n    }\n\n    this._lottie.resize();\n  }\n\n  /**\n   * Returns the styles for the component.\n   */\n  static get styles() {\n    return styles;\n  }\n\n  /**\n   * Cleanup on component destroy.\n   */\n  public disconnectedCallback(): void {\n    // Don't clean up if node is still connected to the context (i.e. this is a move).\n    if (this.isConnected) return;\n\n    // Remove intersection observer for detecting component being out-of-view.\n    if (this._io) {\n      this._io.disconnect();\n      this._io = undefined;\n    }\n\n    // Remove resize observer for detecting resize/reflow events affecting element.\n    // if (this._ro) {\n    //   this._ro.disconnect();\n    //   this._ro = undefined;\n    // }\n\n    // Remove the attached Visibility API's change event listener.\n    document.removeEventListener(\"visibilitychange\", () =>\n      this._onVisibilityChange()\n    );\n\n    // Destroy the animation instance and element\n    this.destroy();\n  }\n\n  public render(): TemplateResult | void {\n    const className: string = this.controls ? \"main controls\" : \"main\";\n    const animationClass: string = this.controls\n      ? \"animation controls\"\n      : \"animation\";\n\n    return html` <div\n      id=\"animation-container\"\n      class=${className}\n      lang=\"en\"\n      aria-label=${this.description}\n      role=\"img\"\n    >\n      <div\n        id=\"animation\"\n        class=${animationClass}\n        style=\"background:${this.background};\"\n      >\n        ${this.currentState === PlayerState.Error\n          ? html`<div class=\"error\">⚠️</div>`\n          : undefined}\n      </div>\n      ${this.controls && !this.disableShadowDOM\n        ? this.renderControls()\n        : undefined}\n    </div>`;\n  }\n\n  protected createRenderRoot(): Element | ShadowRoot {\n    if (this.disableShadowDOM) this.style.display = \"block\";\n\n    return this.disableShadowDOM ? this : super.createRenderRoot();\n  }\n\n  /**\n   * Initialize everything on component first render.\n   */\n  protected firstUpdated(): void {\n    // Add intersection observer for detecting component being out-of-view.\n    if (\"IntersectionObserver\" in window) {\n      this._io = new IntersectionObserver(\n        (entries: IntersectionObserverEntry[]) => {\n          if (entries[0].isIntersecting) {\n            if (this.currentState === PlayerState.Frozen) {\n              this.play();\n            }\n          } else if (this.currentState === PlayerState.Playing) {\n            this.freeze();\n          }\n        }\n      );\n\n      this._io.observe(this.container);\n    }\n\n    // Add listener for Visibility API's change event.\n    if (typeof document.hidden !== \"undefined\") {\n      document.addEventListener(\"visibilitychange\", () =>\n        this._onVisibilityChange()\n      );\n    }\n\n    // Setup lottie player\n    if (this.src) {\n      this.load(this.src);\n    }\n    this.dispatchEvent(new CustomEvent(PlayerEvents.Rendered));\n  }\n\n  protected renderControls(): TemplateResult {\n    const isPlaying: boolean = this.currentState === PlayerState.Playing;\n    const isPaused: boolean = this.currentState === PlayerState.Paused;\n    const isStopped: boolean = this.currentState === PlayerState.Stopped;\n\n    return html`\n      <div\n        id=\"lottie-controls\"\n        aria-label=\"lottie-animation-controls\"\n        class=\"toolbar\"\n      >\n        <button\n          id=\"lottie-play-button\"\n          @click=${this.togglePlay}\n          class=${isPlaying || isPaused ? \"active\" : \"\"}\n          style=\"align-items:center;\"\n          tabindex=\"0\"\n          aria-label=\"play-pause\"\n        >\n          ${isPlaying\n            ? html`<svg\n                width=\"24\"\n                height=\"24\"\n                aria-hidden=\"true\"\n                focusable=\"false\"\n              >\n                <path\n                  d=\"M14.016 5.016H18v13.969h-3.984V5.016zM6 18.984V5.015h3.984v13.969H6z\"\n                />\n              </svg>`\n            : html`<svg\n                width=\"24\"\n                height=\"24\"\n                aria-hidden=\"true\"\n                focusable=\"false\"\n              >\n                <path d=\"M8.016 5.016L18.985 12 8.016 18.984V5.015z\" />\n              </svg>`}\n        </button>\n        <button\n          id=\"lottie-stop-button\"\n          @click=${this.stop}\n          class=${isStopped ? \"active\" : \"\"}\n          style=\"align-items:center;\"\n          tabindex=\"0\"\n          aria-label=\"stop\"\n        >\n          <svg width=\"24\" height=\"24\" aria-hidden=\"true\" focusable=\"false\">\n            <path d=\"M6 6h12v12H6V6z\" />\n          </svg>\n        </button>\n        <input\n          id=\"lottie-seeker-input\"\n          class=\"seeker\"\n          type=\"range\"\n          min=\"0\"\n          step=\"1\"\n          max=\"100\"\n          .value=${this.seeker}\n          @input=${this._handleSeekChange}\n          @mousedown=${() => {\n            this._prevState = this.currentState;\n            this.freeze();\n          }}\n          @mouseup=${() => {\n            this._prevState === PlayerState.Playing && this.play();\n          }}\n          aria-valuemin=\"1\"\n          aria-valuemax=\"100\"\n          role=\"slider\"\n          aria-valuenow=${this.seeker}\n          tabindex=\"0\"\n          aria-label=\"lottie-seek-input\"\n        />\n        <button\n          id=\"lottie-loop-toggle\"\n          @click=${this.toggleLooping}\n          class=${this.loop ? \"active\" : \"\"}\n          style=\"align-items:center;\"\n          tabindex=\"0\"\n          aria-label=\"loop-toggle\"\n        >\n          <svg width=\"24\" height=\"24\" aria-hidden=\"true\" focusable=\"false\">\n            <path\n              d=\"M17.016 17.016v-4.031h1.969v6h-12v3l-3.984-3.984 3.984-3.984v3h10.031zM6.984 6.984v4.031H5.015v-6h12v-3l3.984 3.984-3.984 3.984v-3H6.984z\"\n            />\n          </svg>\n        </button>\n      </div>\n    `;\n  }\n\n  /**\n   * Handle visibility change events.\n   */\n  private _onVisibilityChange(): void {\n    if (document.hidden === true && this.currentState === PlayerState.Playing) {\n      this.freeze();\n    } else if (this.currentState === PlayerState.Frozen) {\n      this.play();\n    }\n  }\n\n  /**\n   * Handles click and drag actions on the progress track.\n   */\n  private _handleSeekChange(e: any): void {\n    if (!this._lottie || isNaN(e.target.value)) {\n      return;\n    }\n\n    const frame: number = (e.target.value / 100) * this._lottie.totalFrames;\n\n    this.seek(frame);\n  }\n\n  private _attachEventListeners(): void {\n    this._lottie.addEventListener(\"enterFrame\", () => {\n      this.seeker =\n        (this._lottie.currentFrame / this._lottie.totalFrames) * 100;\n\n      this.dispatchEvent(\n        new CustomEvent(PlayerEvents.Frame, {\n          detail: {\n            frame: this._lottie.currentFrame,\n            seeker: this.seeker,\n          },\n        })\n      );\n    });\n\n    // Handle animation play complete\n    this._lottie.addEventListener(\"complete\", () => {\n      if (this.currentState !== PlayerState.Playing) {\n        this.dispatchEvent(new CustomEvent(PlayerEvents.Complete));\n\n        return;\n      }\n\n      if (!this.loop || (this.count && this._counter >= this.count)) {\n        this.dispatchEvent(new CustomEvent(PlayerEvents.Complete));\n\n        if (this.mode === PlayMode.Bounce) {\n          if (this._lottie.currentFrame === 0) {\n            return;\n          }\n        } else {\n          return;\n        }\n      }\n\n      if (this.mode === PlayMode.Bounce) {\n        if (this.count) {\n          this._counter += 0.5;\n        }\n\n        setTimeout(() => {\n          this.dispatchEvent(new CustomEvent(PlayerEvents.Loop));\n\n          if (this.currentState === PlayerState.Playing) {\n            this._lottie.setDirection(this._lottie.playDirection * -1);\n            this._lottie.play();\n          }\n        }, this.intermission);\n      } else {\n        if (this.count) {\n          this._counter += 1;\n        }\n\n        window.setTimeout(() => {\n          this.dispatchEvent(new CustomEvent(PlayerEvents.Loop));\n\n          if (this.currentState === PlayerState.Playing) {\n            if (this.direction === -1) {\n              // Prevents flickering\n              this.seek(\"99%\");\n              this.play();\n            } else {\n              this._lottie.stop();\n              this._lottie.play();\n            }\n          }\n        }, this.intermission);\n      }\n    });\n\n    // Handle lottie-web ready event\n    this._lottie.addEventListener(\"DOMLoaded\", () => {\n      // Set initial playback speed and direction\n      this.setSpeed(this.speed);\n      this.setDirection(this.direction);\n\n      // Start playing if autoplay is enabled\n      if (this.autoplay) {\n        if (this.direction === -1) this.seek(\"100%\");\n        this.play();\n      }\n\n      this.dispatchEvent(new CustomEvent(PlayerEvents.Ready));\n    });\n\n    // Handle animation data load complete\n    this._lottie.addEventListener(\"data_ready\", () => {\n      this.dispatchEvent(new CustomEvent(PlayerEvents.Load));\n    });\n\n    // Set error state when animation load fail event triggers\n    this._lottie.addEventListener(\"data_failed\", () => {\n      this.currentState = PlayerState.Error;\n\n      this.dispatchEvent(new CustomEvent(PlayerEvents.Error));\n    });\n\n    // Set handlers to auto play animation on hover if enabled\n    this.container.addEventListener(\"mouseenter\", () => {\n      if (this.hover && this.currentState !== PlayerState.Playing) {\n        this.play();\n      }\n    });\n    this.container.addEventListener(\"mouseleave\", () => {\n      if (this.hover && this.currentState === PlayerState.Playing) {\n        this.stop();\n      }\n    });\n  }\n\n  /**\n   * Freeze animation play.\n   * This internal state pauses animation and is used to differentiate between\n   * user requested pauses and component instigated pauses.\n   */\n  private freeze(): void {\n    if (!this._lottie) {\n      return;\n    }\n\n    this._lottie.pause();\n    this.currentState = PlayerState.Frozen;\n\n    this.dispatchEvent(new CustomEvent(PlayerEvents.Freeze));\n  }\n}\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 };","declare const __DEBUG_BUILD__: boolean;\n\n/**\n * This serves as a build time flag that will be true by default, but false in non-debug builds or if users replace `__SENTRY_DEBUG__` in their generated code.\n *\n * ATTENTION: This constant must never cross package boundaries (i.e. be exported) to guarantee that it can be used for tree shaking.\n */\nexport const DEBUG_BUILD = __DEBUG_BUILD__;\n","import { debug, isNativeFunction } from '@sentry/core';\nimport { DEBUG_BUILD } from './debug-build';\nimport { WINDOW } from './types';\n\n/**\n * We generally want to use window.fetch / window.setTimeout.\n * However, in some cases this may be wrapped (e.g. by Zone.js for Angular),\n * so we try to get an unpatched version of this from a sandboxed iframe.\n */\n\ninterface CacheableImplementations {\n  setTimeout: typeof WINDOW.setTimeout;\n  fetch: typeof WINDOW.fetch;\n}\n\nconst cachedImplementations: Partial<CacheableImplementations> = {};\n\n/**\n * Get the native implementation of a browser function.\n *\n * This can be used to ensure we get an unwrapped version of a function, in cases where a wrapped function can lead to problems.\n *\n * The following methods can be retrieved:\n * - `setTimeout`: This can be wrapped by e.g. Angular, causing change detection to be triggered.\n * - `fetch`: This can be wrapped by e.g. ad-blockers, causing an infinite loop when a request is blocked.\n */\nexport function getNativeImplementation<T extends keyof CacheableImplementations>(\n  name: T,\n): CacheableImplementations[T] {\n  const cached = cachedImplementations[name];\n  if (cached) {\n    return cached;\n  }\n\n  let impl = WINDOW[name] as CacheableImplementations[T];\n\n  // Fast path to avoid DOM I/O\n  if (isNativeFunction(impl)) {\n    return (cachedImplementations[name] = impl.bind(WINDOW) as CacheableImplementations[T]);\n  }\n\n  const document = WINDOW.document;\n  // eslint-disable-next-line typescript/no-deprecated\n  if (document && typeof document.createElement === 'function') {\n    try {\n      const sandbox = document.createElement('iframe');\n      sandbox.hidden = true;\n      document.head.appendChild(sandbox);\n      const contentWindow = sandbox.contentWindow;\n      if (contentWindow?.[name]) {\n        impl = contentWindow[name] as CacheableImplementations[T];\n      }\n      document.head.removeChild(sandbox);\n    } catch (e) {\n      // Could not create sandbox iframe, just use window.xxx\n      DEBUG_BUILD && debug.warn(`Could not create sandbox iframe for ${name} check, bailing to window.${name}: `, e);\n    }\n  }\n\n  // Sanity check: This _should_ not happen, but if it does, we just skip caching...\n  // This can happen e.g. in tests where fetch may not be available in the env, or similar.\n  if (!impl) {\n    return impl;\n  }\n\n  return (cachedImplementations[name] = impl.bind(WINDOW) as CacheableImplementations[T]);\n}\n\n/** Clear a cached implementation. */\nexport function clearCachedImplementation(name: keyof CacheableImplementations): void {\n  cachedImplementations[name] = undefined;\n}\n\n/**\n * A special usecase for incorrectly wrapped Fetch APIs in conjunction with ad-blockers.\n * Whenever someone wraps the Fetch API and returns the wrong promise chain,\n * this chain becomes orphaned and there is no possible way to capture it's rejections\n * other than allowing it bubble up to this very handler. eg.\n *\n * const f = window.fetch;\n * window.fetch = function () {\n *   const p = f.apply(this, arguments);\n *\n *   p.then(function() {\n *     console.log('hi.');\n *   });\n *\n *   return p;\n * }\n *\n * `p.then(function () { ... })` is producing a completely separate promise chain,\n * however, what's returned is `p` - the result of original `fetch` call.\n *\n * This mean, that whenever we use the Fetch API to send our own requests, _and_\n * some ad-blocker blocks it, this orphaned chain will _always_ reject,\n * effectively causing another event to be captured.\n * This makes a whole process become an infinite loop, which we need to somehow\n * deal with, and break it in one way or another.\n *\n * To deal with this issue, we are making sure that we _always_ use the real\n * browser Fetch API, instead of relying on what `window.fetch` exposes.\n * The only downside to this would be missing our own requests as breadcrumbs,\n * but because we are already not doing this, it should be just fine.\n *\n * Possible failed fetch error messages per-browser:\n *\n * Chrome:  Failed to fetch\n * Edge:    Failed to Fetch\n * Firefox: NetworkError when attempting to fetch resource\n * Safari:  resource blocked by content blocker\n */\nexport function fetch(...rest: Parameters<typeof WINDOW.fetch>): ReturnType<typeof WINDOW.fetch> {\n  return getNativeImplementation('fetch')(...rest);\n}\n\n/**\n * Get an unwrapped `setTimeout` method.\n * This ensures that even if e.g. Angular wraps `setTimeout`, we get the native implementation,\n * avoiding triggering change detection.\n */\nexport function setTimeout(...rest: Parameters<typeof WINDOW.setTimeout>): ReturnType<typeof WINDOW.setTimeout> {\n  return getNativeImplementation('setTimeout')(...rest);\n}\n","import { isString } from '@sentry/core';\n\nconst DEFAULT_MAX_STRING_LENGTH = 80;\n\ntype SimpleNode = {\n  parentNode: SimpleNode;\n} | null;\n\n// Native DOM accessors cached at module load. Calling these instead of reading\n// instance properties bypasses user-defined getters that shadow the prototypes.\n// Stored unbound and rebound via .call(el) — the unbound-method lint is expected.\n// See https://github.com/getsentry/sentry-javascript/issues/21353\ntype AccessorKey = 'parentNode' | 'tagName' | 'id' | 'className' | 'getAttribute' | 'dataset';\nconst accessors: Partial<Record<AccessorKey, Function>> = {};\n\n// oxlint-disable typescript-eslint(unbound-method)\ntry {\n  if (typeof Node !== 'undefined') {\n    accessors.parentNode = Object.getOwnPropertyDescriptor(Node.prototype, 'parentNode')!.get!;\n  }\n  if (typeof Element !== 'undefined') {\n    accessors.tagName = Object.getOwnPropertyDescriptor(Element.prototype, 'tagName')!.get!;\n    accessors.id = Object.getOwnPropertyDescriptor(Element.prototype, 'id')!.get!;\n    accessors.className = Object.getOwnPropertyDescriptor(Element.prototype, 'className')!.get!;\n    accessors.getAttribute = Element.prototype.getAttribute;\n  }\n  if (typeof HTMLElement !== 'undefined') {\n    accessors.dataset = Object.getOwnPropertyDescriptor(HTMLElement.prototype, 'dataset')!.get!;\n  }\n} catch {\n  // Polyfilled or stubbed prototypes may not have the expected descriptors.\n  // _safeRead falls back to direct property access.\n}\n// oxlint-enable typescript-eslint(unbound-method)\n\nfunction _safeRead<T>(el: unknown, prop: AccessorKey, arg?: string): T {\n  const fn = accessors[prop];\n  if (fn) {\n    try {\n      return fn.call(el, arg) as T;\n    } catch {\n      // Fall through to direct access\n    }\n  }\n  const val = (el as Record<string, unknown>)[prop];\n  return typeof val === 'function' ? val.call(el, arg) : (val as T);\n}\n\n/**\n * Given a child DOM element, returns a query-selector statement describing that\n * and its ancestors\n * e.g. [HTMLElement] => body > div > input#foo.btn[name=baz]\n * @returns generated DOM path\n */\nexport function htmlTreeAsString(\n  elem: unknown,\n  options: string[] | { keyAttrs?: string[]; maxStringLength?: number } = {},\n): string {\n  if (!elem) {\n    return '<unknown>';\n  }\n\n  // try/catch both:\n  // - accessing event.target (see getsentry/raven-js#838, #768)\n  // - `htmlTreeAsString` because it's complex, and just accessing the DOM incorrectly\n  // - can throw an exception in some circumstances.\n  try {\n    let currentElem = elem as SimpleNode;\n    const MAX_TRAVERSE_HEIGHT = 5;\n    const out = [];\n    let height = 0;\n    let len = 0;\n    const separator = ' > ';\n    const sepLength = separator.length;\n    let nextStr;\n    const keyAttrs = Array.isArray(options) ? options : options.keyAttrs;\n    const maxStringLength = (!Array.isArray(options) && options.maxStringLength) || DEFAULT_MAX_STRING_LENGTH;\n\n    while (currentElem && height++ < MAX_TRAVERSE_HEIGHT) {\n      nextStr = _htmlElementAsString(currentElem, keyAttrs);\n      // bail out if\n      // - nextStr is the 'html' element\n      // - the length of the string that would be created exceeds maxStringLength\n      //   (ignore this limit if we are on the first iteration)\n      if (nextStr === 'html' || (height > 1 && len + out.length * sepLength + nextStr.length >= maxStringLength)) {\n        break;\n      }\n\n      out.push(nextStr);\n\n      len += nextStr.length;\n      currentElem = _safeRead<SimpleNode>(currentElem, 'parentNode');\n    }\n\n    return out.reverse().join(separator);\n  } catch {\n    return '<unknown>';\n  }\n}\n\n/**\n * Returns a simple, query-selector representation of a DOM element\n * e.g. [HTMLElement] => input#foo.btn[name=baz]\n * @returns generated DOM path\n */\nfunction _htmlElementAsString(el: unknown, keyAttrs?: string[]): string {\n  const out = [];\n\n  const tagName = _safeRead<string | undefined>(el, 'tagName');\n  if (!tagName) {\n    return '';\n  }\n\n  if (typeof HTMLElement !== 'undefined') {\n    // If using the component name annotation plugin, this value may be available on the DOM node\n    if (el instanceof HTMLElement) {\n      const dataset = _safeRead<DOMStringMap | undefined>(el, 'dataset');\n      if (dataset) {\n        if (dataset['sentryComponent']) {\n          return dataset['sentryComponent'];\n        }\n        if (dataset['sentryElement']) {\n          return dataset['sentryElement'];\n        }\n      }\n    }\n  }\n\n  out.push(tagName.toLowerCase());\n\n  // Pairs of attribute keys defined in `serializeAttribute` and their values on element.\n  const keyAttrPairs = keyAttrs?.length\n    ? keyAttrs\n        .filter(keyAttr => _safeRead<string | null>(el, 'getAttribute', keyAttr))\n        .map(keyAttr => [keyAttr, _safeRead<string | null>(el, 'getAttribute', keyAttr)])\n    : null;\n\n  if (keyAttrPairs?.length) {\n    keyAttrPairs.forEach(keyAttrPair => {\n      out.push(`[${keyAttrPair[0]}=\"${keyAttrPair[1]}\"]`);\n    });\n  } else {\n    const id = _safeRead<string | undefined>(el, 'id');\n    if (id) {\n      out.push(`#${id}`);\n    }\n\n    const className = _safeRead<string | undefined>(el, 'className');\n    if (className && isString(className)) {\n      const classes = className.split(/\\s+/);\n      for (const c of classes) {\n        out.push(`.${c}`);\n      }\n    }\n  }\n  for (const k of ['aria-label', 'type', 'name', 'title', 'alt']) {\n    const attr = _safeRead<string | null>(el, 'getAttribute', k);\n    if (attr) {\n      out.push(`[${k}=\"${attr}\"]`);\n    }\n  }\n\n  return out.join('');\n}\n","import type { HandlerDataDom } from '@sentry/core';\nimport { addHandler, addNonEnumerableProperty, fill, maybeInstrument, triggerHandlers, uuid4 } from '@sentry/core';\nimport { WINDOW } from '../types';\n\ntype SentryWrappedTarget = HTMLElement & { _sentryId?: string };\n\ntype AddEventListener = (\n  type: string,\n  listener: EventListenerOrEventListenerObject,\n  options?: boolean | AddEventListenerOptions,\n) => void;\ntype RemoveEventListener = (\n  type: string,\n  listener: EventListenerOrEventListenerObject,\n  options?: boolean | EventListenerOptions,\n) => void;\n\ntype InstrumentedElement = Element & {\n  __sentry_instrumentation_handlers__?: {\n    [key in 'click' | 'keypress']?: {\n      handler?: unknown;\n      /** The number of custom listeners attached to this element */\n      refCount: number;\n    };\n  };\n};\n\nconst DEBOUNCE_DURATION = 1000;\n\nlet debounceTimerID: number | undefined;\nlet lastCapturedEventType: string | undefined;\nlet lastCapturedEventTargetId: string | undefined;\n\n/**\n * Add an instrumentation handler for when a click or a keypress happens.\n *\n * Use at your own risk, this might break without changelog notice, only used internally.\n * @hidden\n */\nexport function addClickKeypressInstrumentationHandler(handler: (data: HandlerDataDom) => void): void {\n  const type = 'dom';\n  addHandler(type, handler);\n  maybeInstrument(type, instrumentDOM);\n}\n\n/** Exported for tests only. */\nexport function instrumentDOM(): void {\n  if (!WINDOW.document) {\n    return;\n  }\n\n  // Make it so that any click or keypress that is unhandled / bubbled up all the way to the document triggers our dom\n  // handlers. (Normally we have only one, which captures a breadcrumb for each click or keypress.) Do this before\n  // we instrument `addEventListener` so that we don't end up attaching this handler twice.\n  const triggerDOMHandler = triggerHandlers.bind(null, 'dom');\n  const globalDOMEventHandler = makeDOMEventHandler(triggerDOMHandler, true);\n  WINDOW.document.addEventListener('click', globalDOMEventHandler, false);\n  WINDOW.document.addEventListener('keypress', globalDOMEventHandler, false);\n\n  // After hooking into click and keypress events bubbled up to `document`, we also hook into user-handled\n  // clicks & keypresses, by adding an event listener of our own to any element to which they add a listener. That\n  // way, whenever one of their handlers is triggered, ours will be, too. (This is needed because their handler\n  // could potentially prevent the event from bubbling up to our global listeners. This way, our handler are still\n  // guaranteed to fire at least once.)\n  ['EventTarget', 'Node'].forEach((target: string) => {\n    const globalObject = WINDOW as unknown as Record<string, { prototype?: object }>;\n    const proto = globalObject[target]?.prototype;\n\n    // eslint-disable-next-line no-prototype-builtins\n    if (!proto?.hasOwnProperty?.('addEventListener')) {\n      return;\n    }\n\n    fill(proto, 'addEventListener', function (originalAddEventListener: AddEventListener): AddEventListener {\n      return function (this: InstrumentedElement, type, listener, options): AddEventListener {\n        if (type === 'click' || type == 'keypress') {\n          try {\n            const handlers = (this.__sentry_instrumentation_handlers__ =\n              this.__sentry_instrumentation_handlers__ || {});\n            const handlerForType = (handlers[type] = handlers[type] || { refCount: 0 });\n\n            if (!handlerForType.handler) {\n              const handler = makeDOMEventHandler(triggerDOMHandler);\n              handlerForType.handler = handler;\n              originalAddEventListener.call(this, type, handler, options);\n            }\n\n            handlerForType.refCount++;\n          } catch {\n            // Accessing dom properties is always fragile.\n            // Also allows us to skip `addEventListeners` calls with no proper `this` context.\n          }\n        }\n\n        return originalAddEventListener.call(this, type, listener, options);\n      };\n    });\n\n    fill(\n      proto,\n      'removeEventListener',\n      function (originalRemoveEventListener: RemoveEventListener): RemoveEventListener {\n        return function (this: InstrumentedElement, type, listener, options): () => void {\n          if (type === 'click' || type == 'keypress') {\n            try {\n              const handlers = this.__sentry_instrumentation_handlers__ || {};\n              const handlerForType = handlers[type];\n\n              if (handlerForType) {\n                handlerForType.refCount--;\n                // If there are no longer any custom handlers of the current type on this element, we can remove ours, too.\n                if (handlerForType.refCount <= 0) {\n                  originalRemoveEventListener.call(this, type, handlerForType.handler, options);\n                  handlerForType.handler = undefined;\n                  delete handlers[type]; // eslint-disable-line @typescript-eslint/no-dynamic-delete\n                }\n\n                // If there are no longer any custom handlers of any type on this element, cleanup everything.\n                if (Object.keys(handlers).length === 0) {\n                  delete this.__sentry_instrumentation_handlers__;\n                }\n              }\n            } catch {\n              // Accessing dom properties is always fragile.\n              // Also allows us to skip `addEventListeners` calls with no proper `this` context.\n            }\n          }\n\n          return originalRemoveEventListener.call(this, type, listener, options);\n        };\n      },\n    );\n  });\n}\n\n/**\n * Check whether the event is similar to the last captured one. For example, two click events on the same button.\n */\nfunction isSimilarToLastCapturedEvent(event: Event): boolean {\n  // If both events have different type, then user definitely performed two separate actions. e.g. click + keypress.\n  if (event.type !== lastCapturedEventType) {\n    return false;\n  }\n\n  try {\n    // If both events have the same type, it's still possible that actions were performed on different targets.\n    // e.g. 2 clicks on different buttons.\n    if (!event.target || (event.target as SentryWrappedTarget)._sentryId !== lastCapturedEventTargetId) {\n      return false;\n    }\n  } catch {\n    // just accessing `target` property can throw an exception in some rare circumstances\n    // see: https://github.com/getsentry/sentry-javascript/issues/838\n  }\n\n  // If both events have the same type _and_ same `target` (an element which triggered an event, _not necessarily_\n  // to which an event listener was attached), we treat them as the same action, as we want to capture\n  // only one breadcrumb. e.g. multiple clicks on the same button, or typing inside a user input box.\n  return true;\n}\n\n/**\n * Decide whether an event should be captured.\n * @param event event to be captured\n */\nfunction shouldSkipDOMEvent(eventType: string, target: SentryWrappedTarget | null): boolean {\n  // We are only interested in filtering `keypress` events for now.\n  if (eventType !== 'keypress') {\n    return false;\n  }\n\n  if (!target?.tagName) {\n    return true;\n  }\n\n  // Only consider keypress events on actual input elements. This will disregard keypresses targeting body\n  // e.g.tabbing through elements, hotkeys, etc.\n  if (target.tagName === 'INPUT' || target.tagName === 'TEXTAREA' || target.isContentEditable) {\n    return false;\n  }\n\n  return true;\n}\n\n/**\n * Wraps addEventListener to capture UI breadcrumbs\n */\nfunction makeDOMEventHandler(\n  handler: (data: HandlerDataDom) => void,\n  globalListener: boolean = false,\n): (event: Event) => void {\n  return (event: Event & { _sentryCaptured?: true }): void => {\n    // It's possible this handler might trigger multiple times for the same\n    // event (e.g. event propagation through node ancestors).\n    // Ignore if we've already captured that event.\n    if (!event || event['_sentryCaptured']) {\n      return;\n    }\n\n    const target = getEventTarget(event);\n\n    // We always want to skip _some_ events.\n    if (shouldSkipDOMEvent(event.type, target)) {\n      return;\n    }\n\n    // Mark event as \"seen\"\n    addNonEnumerableProperty(event, '_sentryCaptured', true);\n\n    if (target && !target._sentryId) {\n      // Add UUID to event target so we can identify if\n      addNonEnumerableProperty(target, '_sentryId', uuid4());\n    }\n\n    const name = event.type === 'keypress' ? 'input' : event.type;\n\n    // If there is no last captured event, it means that we can safely capture the new event and store it for future comparisons.\n    // If there is a last captured event, see if the new event is different enough to treat it as a unique one.\n    // If that's the case, emit the previous event and store locally the newly-captured DOM event.\n    if (!isSimilarToLastCapturedEvent(event)) {\n      const handlerData: HandlerDataDom = { event, name, global: globalListener };\n      handler(handlerData);\n      lastCapturedEventType = event.type;\n      lastCapturedEventTargetId = target ? target._sentryId : undefined;\n    }\n\n    // Start a new debounce timer that will prevent us from capturing multiple events that should be grouped together.\n    clearTimeout(debounceTimerID);\n    debounceTimerID = WINDOW.setTimeout(() => {\n      lastCapturedEventTargetId = undefined;\n      lastCapturedEventType = undefined;\n    }, DEBOUNCE_DURATION);\n  };\n}\n\nfunction getEventTarget(event: Event): SentryWrappedTarget | null {\n  try {\n    return event.target as SentryWrappedTarget | null;\n  } catch {\n    // just accessing `target` property can throw an exception in some rare circumstances\n    // see: https://github.com/getsentry/sentry-javascript/issues/838\n    return null;\n  }\n}\n","import type { HandlerDataHistory } from '@sentry/core';\nimport { addHandler, fill, maybeInstrument, supportsHistory, triggerHandlers } from '@sentry/core';\nimport { WINDOW } from '../types';\n\nlet lastHref: string | undefined;\n\n/**\n * Add an instrumentation handler for when a fetch request happens.\n * The handler function is called once when the request starts and once when it ends,\n * which can be identified by checking if it has an `endTimestamp`.\n *\n * Use at your own risk, this might break without changelog notice, only used internally.\n * @hidden\n */\nexport function addHistoryInstrumentationHandler(handler: (data: HandlerDataHistory) => void): void {\n  const type = 'history';\n  addHandler(type, handler);\n  maybeInstrument(type, instrumentHistory);\n}\n\n/**\n * Exported just for testing\n */\nexport function instrumentHistory(): void {\n  // The `popstate` event may also be triggered on `pushState`, but it may not always reliably be emitted by the browser\n  // Which is why we also monkey-patch methods below, in addition to this\n  WINDOW.addEventListener('popstate', () => {\n    const to = WINDOW.location.href;\n    // keep track of the current URL state, as we always receive only the updated state\n    const from = lastHref;\n    lastHref = to;\n\n    if (from === to) {\n      return;\n    }\n\n    const handlerData = { from, to } satisfies HandlerDataHistory;\n    triggerHandlers('history', handlerData);\n  });\n\n  // Just guard against this not being available, in weird environments\n  if (!supportsHistory()) {\n    return;\n  }\n\n  function historyReplacementFunction(originalHistoryFunction: () => void): () => void {\n    return function (this: History, ...args: unknown[]): void {\n      const url = args.length > 2 ? args[2] : undefined;\n      if (url) {\n        const from = lastHref;\n\n        // Ensure the URL is absolute\n        // this can be either a path, then it is relative to the current origin\n        // or a full URL of the current origin - other origins are not allowed\n        // See: https://developer.mozilla.org/en-US/docs/Web/API/History/pushState#url\n        // coerce to string (this is what pushState does)\n        const to = getAbsoluteUrl(String(url));\n\n        // keep track of the current URL state, as we always receive only the updated state\n        lastHref = to;\n\n        if (from === to) {\n          return originalHistoryFunction.apply(this, args);\n        }\n\n        const handlerData = { from, to } satisfies HandlerDataHistory;\n        triggerHandlers('history', handlerData);\n      }\n      return originalHistoryFunction.apply(this, args);\n    };\n  }\n\n  fill(WINDOW.history, 'pushState', historyReplacementFunction);\n  fill(WINDOW.history, 'replaceState', historyReplacementFunction);\n}\n\nfunction getAbsoluteUrl(urlOrPath: string): string {\n  try {\n    const url = new URL(urlOrPath, WINDOW.location.origin);\n    return url.toString();\n  } catch {\n    // fallback, just do nothing\n    return urlOrPath;\n  }\n}\n","import { WINDOW } from '../types';\n\n/**\n *\n * @param urlOrPath - The URL or path to convert to an absolute URL.\n *\n * @return the absolute URL when handed a relative URL path, by\n * combining the current `window.location.origin` with param urlOrPath.\n *\n * If param urlOrPath is already a full or an invalid URL,\n * or URL determination fails, the original param urlOrPath is returned unchanged.\n *\n */\nexport function getAbsoluteUrl(urlOrPath: string): string {\n  try {\n    const url = new URL(urlOrPath, WINDOW.location.origin);\n    return url.toString();\n  } catch {\n    // fallback, just do nothing\n    return urlOrPath;\n  }\n}\n","import type { HandlerDataXhr, SentryWrappedXMLHttpRequest } from '@sentry/core';\nimport { addHandler, isString, maybeInstrument, timestampInSeconds, triggerHandlers } from '@sentry/core';\nimport { WINDOW } from '../types';\n\nexport const SENTRY_XHR_DATA_KEY = '__sentry_xhr_v3__';\n\ntype WindowWithXhr = Window & { XMLHttpRequest?: typeof XMLHttpRequest };\n\n/**\n * Add an instrumentation handler for when an XHR request happens.\n * The handler function is called once when the request starts and once when it ends,\n * which can be identified by checking if it has an `endTimestamp`.\n *\n * Use at your own risk, this might break without changelog notice, only used internally.\n * @hidden\n */\nexport function addXhrInstrumentationHandler(handler: (data: HandlerDataXhr) => void): void {\n  const type = 'xhr';\n  addHandler(type, handler);\n  maybeInstrument(type, instrumentXHR);\n}\n\n/** Exported only for tests. */\nexport function instrumentXHR(): void {\n  if (!(WINDOW as WindowWithXhr).XMLHttpRequest) {\n    return;\n  }\n\n  const xhrproto = XMLHttpRequest.prototype;\n\n  // eslint-disable-next-line @typescript-eslint/unbound-method\n  xhrproto.open = new Proxy(xhrproto.open, {\n    apply(\n      originalOpen,\n      xhrOpenThisArg: XMLHttpRequest & SentryWrappedXMLHttpRequest,\n      xhrOpenArgArray:\n        | [method: string, url: string | URL]\n        | [method: string, url: string | URL, async: boolean, username?: string | null, password?: string | null],\n    ) {\n      // NOTE: If you are a Sentry user, and you are seeing this stack frame,\n      //       it means the error, that was caused by your XHR call did not\n      //       have a stack trace. If you are using HttpClient integration,\n      //       this is the expected behavior, as we are using this virtual error to capture\n      //       the location of your XHR call, and group your HttpClient events accordingly.\n      const virtualError = new Error();\n\n      const startTimestamp = timestampInSeconds() * 1000;\n\n      // open() should always be called with two or more arguments\n      // But to be on the safe side, we actually validate this and bail out if we don't have a method & url\n      const method = isString(xhrOpenArgArray[0]) ? xhrOpenArgArray[0].toUpperCase() : undefined;\n      const url = parseXhrUrlArg(xhrOpenArgArray[1]);\n\n      if (!method || !url) {\n        return originalOpen.apply(xhrOpenThisArg, xhrOpenArgArray);\n      }\n\n      xhrOpenThisArg[SENTRY_XHR_DATA_KEY] = {\n        method,\n        url,\n        request_headers: {},\n      };\n\n      // if Sentry key appears in URL, don't capture it as a request\n      if (method === 'POST' && url.match(/sentry_key/)) {\n        xhrOpenThisArg.__sentry_own_request__ = true;\n      }\n\n      const onreadystatechangeHandler: () => void = () => {\n        // For whatever reason, this is not the same instance here as from the outer method\n        const xhrInfo = xhrOpenThisArg[SENTRY_XHR_DATA_KEY];\n\n        if (!xhrInfo) {\n          return;\n        }\n\n        if (xhrOpenThisArg.readyState === 4) {\n          try {\n            // touching statusCode in some platforms throws\n            // an exception\n            xhrInfo.status_code = xhrOpenThisArg.status;\n          } catch {\n            /* do nothing */\n          }\n\n          const handlerData: HandlerDataXhr = {\n            endTimestamp: timestampInSeconds() * 1000,\n            startTimestamp,\n            xhr: xhrOpenThisArg,\n            virtualError,\n          };\n          triggerHandlers('xhr', handlerData);\n\n          // In the `addEventListener` branch below, this handler is the only\n          // `readystatechange` listener we add, so detach it once the request is\n          // done to avoid pinning the XMLHttpRequest and its captured\n          // `virtualError` per HTTP call on long-lived pages. In the\n          // `onreadystatechange` proxy branch the handler isn't registered via\n          // `addEventListener`, so this is a harmless no-op there.\n          xhrOpenThisArg.removeEventListener('readystatechange', onreadystatechangeHandler);\n        }\n      };\n\n      if ('onreadystatechange' in xhrOpenThisArg && typeof xhrOpenThisArg.onreadystatechange === 'function') {\n        xhrOpenThisArg.onreadystatechange = new Proxy(xhrOpenThisArg.onreadystatechange, {\n          apply(originalOnreadystatechange, onreadystatechangeThisArg, onreadystatechangeArgArray: unknown[]) {\n            onreadystatechangeHandler();\n            return originalOnreadystatechange.apply(onreadystatechangeThisArg, onreadystatechangeArgArray);\n          },\n        });\n      } else {\n        xhrOpenThisArg.addEventListener('readystatechange', onreadystatechangeHandler);\n      }\n\n      // Intercepting `setRequestHeader` to access the request headers of XHR instance.\n      // This will only work for user/library defined headers, not for the default/browser-assigned headers.\n      // Request cookies are also unavailable for XHR, as `Cookie` header can't be defined by `setRequestHeader`.\n      xhrOpenThisArg.setRequestHeader = new Proxy(xhrOpenThisArg.setRequestHeader, {\n        apply(\n          originalSetRequestHeader,\n          setRequestHeaderThisArg: SentryWrappedXMLHttpRequest,\n          setRequestHeaderArgArray: unknown[],\n        ) {\n          const [header, value] = setRequestHeaderArgArray;\n\n          const xhrInfo = setRequestHeaderThisArg[SENTRY_XHR_DATA_KEY];\n\n          if (xhrInfo && isString(header) && isString(value)) {\n            xhrInfo.request_headers[header.toLowerCase()] = value;\n          }\n\n          return originalSetRequestHeader.apply(setRequestHeaderThisArg, setRequestHeaderArgArray);\n        },\n      });\n\n      return originalOpen.apply(xhrOpenThisArg, xhrOpenArgArray);\n    },\n  });\n\n  // eslint-disable-next-line @typescript-eslint/unbound-method\n  xhrproto.send = new Proxy(xhrproto.send, {\n    apply(originalSend, sendThisArg: XMLHttpRequest & SentryWrappedXMLHttpRequest, sendArgArray: unknown[]) {\n      const sentryXhrData = sendThisArg[SENTRY_XHR_DATA_KEY];\n\n      if (!sentryXhrData) {\n        return originalSend.apply(sendThisArg, sendArgArray);\n      }\n\n      if (sendArgArray[0] !== undefined) {\n        sentryXhrData.body = sendArgArray[0];\n      }\n\n      const handlerData: HandlerDataXhr = {\n        startTimestamp: timestampInSeconds() * 1000,\n        xhr: sendThisArg,\n      };\n      triggerHandlers('xhr', handlerData);\n\n      return originalSend.apply(sendThisArg, sendArgArray);\n    },\n  });\n}\n\n/**\n * Parses the URL argument of a XHR method to a string.\n *\n * See: https://developer.mozilla.org/en-US/docs/Web/API/XMLHttpRequest/open#url\n * url: A string or any other object with a stringifier — including a URL object — that provides the URL of the resource to send the request to.\n *\n * @param url - The URL argument of an XHR method\n * @returns The parsed URL string or undefined if the URL is invalid\n */\nfunction parseXhrUrlArg(url: unknown): string | undefined {\n  if (isString(url)) {\n    return url;\n  }\n\n  try {\n    // If the passed in argument is not a string, it should have a `toString` method as a stringifier.\n    // If that fails, we just return undefined (like in IE11 where URL is not available)\n    return (url as URL).toString();\n  } catch {} // eslint-disable-line no-empty\n\n  return undefined;\n}\n","/**\n * Checks whether given value's type is an Element instance.\n *\n * Returns false if `Element` is not available in the current runtime.\n */\nexport function isElement(wat: unknown): boolean {\n  if (typeof Element === 'undefined') {\n    return false;\n  }\n  try {\n    return wat instanceof Element;\n  } catch {\n    return false;\n  }\n}\n","/* eslint-disable max-lines */\nimport type { Client, Measurements, Span, SpanAttributes, SpanAttributeValue, StartSpanOptions } from '@sentry/core';\nimport {\n  browserPerformanceTimeOrigin,\n  debug,\n  getActiveSpan,\n  getComponentName,\n  isPrimitive,\n  parseUrl,\n  SEMANTIC_ATTRIBUTE_SENTRY_ORIGIN,\n  setMeasurement,\n  spanToJSON,\n  stringMatchesSomePattern,\n} from '@sentry/core';\nimport { htmlTreeAsString } from '../htmlTreeAsString';\nimport { WINDOW } from '../types';\nimport { trackClsAsStandaloneSpan } from './cls';\nimport {\n  addClsInstrumentationHandler,\n  addLcpInstrumentationHandler,\n  addPerformanceInstrumentationHandler,\n  addTtfbInstrumentationHandler,\n  type PerformanceLongAnimationFrameTiming,\n} from './instrument';\nimport { isValidLcpMetric, trackLcpAsStandaloneSpan } from './lcp';\nimport { resourceTimingToSpanAttributes } from './resourceTiming';\nimport { getBrowserPerformanceAPI, isMeasurementValue, msToSec, startAndEndSpan } from './utils';\nimport { getActivationStart } from './web-vitals/lib/getActivationStart';\nimport { getNavigationEntry } from './web-vitals/lib/getNavigationEntry';\nimport { getVisibilityWatcher } from './web-vitals/lib/getVisibilityWatcher';\nimport { DEBUG_BUILD } from '../debug-build';\nimport { URL_FULL } from '@sentry/conventions/attributes';\ninterface NavigatorNetworkInformation {\n  readonly connection?: NetworkInformation;\n}\n\n// http://wicg.github.io/netinfo/#connection-types\ntype ConnectionType = 'bluetooth' | 'cellular' | 'ethernet' | 'mixed' | 'none' | 'other' | 'unknown' | 'wifi' | 'wimax';\n\n// http://wicg.github.io/netinfo/#effectiveconnectiontype-enum\ntype EffectiveConnectionType = '2g' | '3g' | '4g' | 'slow-2g';\n\n// http://wicg.github.io/netinfo/#dom-megabit\ntype Megabit = number;\n// http://wicg.github.io/netinfo/#dom-millisecond\ntype Millisecond = number;\n\n// http://wicg.github.io/netinfo/#networkinformation-interface\ninterface NetworkInformation extends EventTarget {\n  // http://wicg.github.io/netinfo/#type-attribute\n  readonly type?: ConnectionType;\n  // http://wicg.github.io/netinfo/#effectivetype-attribute\n  readonly effectiveType?: EffectiveConnectionType;\n  // http://wicg.github.io/netinfo/#downlinkmax-attribute\n  readonly downlinkMax?: Megabit;\n  // http://wicg.github.io/netinfo/#downlink-attribute\n  readonly downlink?: Megabit;\n  // http://wicg.github.io/netinfo/#rtt-attribute\n  readonly rtt?: Millisecond;\n  // http://wicg.github.io/netinfo/#savedata-attribute\n  readonly saveData?: boolean;\n  // http://wicg.github.io/netinfo/#handling-changes-to-the-underlying-connection\n  onchange?: EventListener;\n}\n\n// https://w3c.github.io/device-memory/#sec-device-memory-js-api\ninterface NavigatorDeviceMemory {\n  readonly deviceMemory?: number;\n}\n\nconst MAX_INT_AS_BYTES = 2147483647;\n\nlet _performanceCursor: number = 0;\n\nlet _measurements: Measurements = {};\nlet _lcpEntry: LargestContentfulPaint | undefined;\nlet _clsEntry: LayoutShift | undefined;\n\ninterface StartTrackingWebVitalsOptions {\n  /**\n   * When `true`, CLS is tracked as a standalone span. When `false`, CLS is\n   * recorded as a measurement on the pageload span. When `undefined`, CLS\n   * tracking is skipped entirely (e.g. because span streaming handles it).\n   */\n  recordClsStandaloneSpans: boolean | undefined;\n  /**\n   * When `true`, LCP is tracked as a standalone span. When `false`, LCP is\n   * recorded as a measurement on the pageload span. When `undefined`, LCP\n   * tracking is skipped entirely (e.g. because span streaming handles it).\n   */\n  recordLcpStandaloneSpans: boolean | undefined;\n  client: Client;\n}\n\n/**\n * Start tracking web vitals.\n * The callback returned by this function can be used to stop tracking & ensure all measurements are final & captured.\n *\n * @deprecated this function will be removed and streamlined once we stop supporting standalone v1\n * @returns A function that forces web vitals collection\n */\nexport function startTrackingWebVitals({\n  recordClsStandaloneSpans,\n  recordLcpStandaloneSpans,\n  client,\n}: StartTrackingWebVitalsOptions): () => void {\n  const performance = getBrowserPerformanceAPI();\n  if (performance && browserPerformanceTimeOrigin()) {\n    // @ts-expect-error we want to make sure all of these are available, even if TS is sure they are\n    if (performance.mark) {\n      WINDOW.performance.mark('sentry-tracing-init');\n    }\n\n    const lcpCleanupCallback = recordLcpStandaloneSpans\n      ? trackLcpAsStandaloneSpan(client)\n      : recordLcpStandaloneSpans === false\n        ? _trackLCP()\n        : undefined;\n\n    const clsCleanupCallback = recordClsStandaloneSpans\n      ? trackClsAsStandaloneSpan(client)\n      : recordClsStandaloneSpans === false\n        ? _trackCLS()\n        : undefined;\n\n    const ttfbCleanupCallback = _trackTtfb();\n    const fpFcpCleanupCallback = _trackFpFcp();\n\n    return (): void => {\n      ttfbCleanupCallback();\n      fpFcpCleanupCallback();\n      lcpCleanupCallback?.();\n      clsCleanupCallback?.();\n    };\n  }\n\n  return () => undefined;\n}\n\n/**\n * Start tracking long tasks.\n */\nexport function startTrackingLongTasks(): void {\n  addPerformanceInstrumentationHandler('longtask', ({ entries }) => {\n    const parent = getActiveSpan();\n    if (!parent) {\n      return;\n    }\n\n    const { op: parentOp, start_timestamp: parentStartTimestamp } = spanToJSON(parent);\n\n    for (const entry of entries) {\n      const startTime = msToSec((browserPerformanceTimeOrigin() as number) + entry.startTime);\n      const duration = msToSec(entry.duration);\n\n      if (parentOp === 'navigation' && parentStartTimestamp && startTime < parentStartTimestamp) {\n        // Skip adding a span if the long task started before the navigation started.\n        // `startAndEndSpan` will otherwise adjust the parent's start time to the span's start\n        // time, potentially skewing the duration of the actual navigation as reported via our\n        // routing instrumentations\n        continue;\n      }\n\n      startAndEndSpan(parent, startTime, startTime + duration, {\n        name: 'Main UI thread blocked',\n        op: 'ui.long-task',\n        attributes: {\n          [SEMANTIC_ATTRIBUTE_SENTRY_ORIGIN]: 'auto.ui.browser.metrics',\n        },\n      });\n    }\n  });\n}\n\n/**\n * Start tracking long animation frames.\n */\nexport function startTrackingLongAnimationFrames(): void {\n  // NOTE: the current web-vitals version (3.5.2) does not support long-animation-frame, so\n  // we directly observe `long-animation-frame` events instead of through the web-vitals\n  // `observe` helper function.\n  const observer = new PerformanceObserver(list => {\n    const parent = getActiveSpan();\n    if (!parent) {\n      return;\n    }\n    for (const entry of list.getEntries() as PerformanceLongAnimationFrameTiming[]) {\n      if (!entry.scripts[0]) {\n        continue;\n      }\n\n      const startTime = msToSec((browserPerformanceTimeOrigin() as number) + entry.startTime);\n\n      const { start_timestamp: parentStartTimestamp, op: parentOp } = spanToJSON(parent);\n\n      if (parentOp === 'navigation' && parentStartTimestamp && startTime < parentStartTimestamp) {\n        // Skip adding the span if the long animation frame started before the navigation started.\n        // `startAndEndSpan` will otherwise adjust the parent's start time to the span's start\n        // time, potentially skewing the duration of the actual navigation as reported via our\n        // routing instrumentations\n        continue;\n      }\n      const duration = msToSec(entry.duration);\n\n      const attributes: SpanAttributes = {\n        [SEMANTIC_ATTRIBUTE_SENTRY_ORIGIN]: 'auto.ui.browser.metrics',\n      };\n\n      const initialScript = entry.scripts[0];\n      const { invoker, invokerType, sourceURL, sourceFunctionName, sourceCharPosition } = initialScript;\n      attributes['browser.script.invoker'] = invoker;\n      attributes['browser.script.invoker_type'] = invokerType;\n      if (sourceURL) {\n        attributes['code.filepath'] = sourceURL;\n      }\n      if (sourceFunctionName) {\n        attributes['code.function'] = sourceFunctionName;\n      }\n      if (sourceCharPosition !== -1) {\n        attributes['browser.script.source_char_position'] = sourceCharPosition;\n      }\n\n      startAndEndSpan(parent, startTime, startTime + duration, {\n        name: 'Main UI thread blocked',\n        op: 'ui.long-animation-frame',\n        attributes,\n      });\n    }\n  });\n\n  observer.observe({ type: 'long-animation-frame', buffered: true });\n}\n\n/**\n * Start tracking interaction events.\n */\nexport function startTrackingInteractions(): void {\n  addPerformanceInstrumentationHandler('event', ({ entries }) => {\n    const parent = getActiveSpan();\n    if (!parent) {\n      return;\n    }\n    for (const entry of entries) {\n      if (entry.name === 'click') {\n        const startTime = msToSec((browserPerformanceTimeOrigin() as number) + entry.startTime);\n        const duration = msToSec(entry.duration);\n\n        const spanOptions: StartSpanOptions & Required<Pick<StartSpanOptions, 'attributes'>> = {\n          name: htmlTreeAsString(entry.target),\n          op: `ui.interaction.${entry.name}`,\n          startTime: startTime,\n          attributes: {\n            [SEMANTIC_ATTRIBUTE_SENTRY_ORIGIN]: 'auto.ui.browser.metrics',\n          },\n        };\n\n        const componentName = getComponentName(entry.target);\n        if (componentName) {\n          spanOptions.attributes['ui.component_name'] = componentName;\n        }\n\n        startAndEndSpan(parent, startTime, startTime + duration, spanOptions);\n      }\n    }\n  });\n}\n\nexport { registerInpInteractionListener, startTrackingINP } from './inp';\n\n/**\n * Starts tracking the Cumulative Layout Shift on the current page and collects the value and last entry\n * to the `_measurements` object which ultimately is applied to the pageload span's measurements.\n */\nfunction _trackCLS(): () => void {\n  return addClsInstrumentationHandler(({ metric }) => {\n    const entry = metric.entries[metric.entries.length - 1] as LayoutShift | undefined;\n    if (!entry) {\n      return;\n    }\n    _measurements['cls'] = { value: metric.value, unit: '' };\n    _clsEntry = entry;\n  }, true);\n}\n\n/** Starts tracking the Largest Contentful Paint on the current page. */\nfunction _trackLCP(): () => void {\n  return addLcpInstrumentationHandler(({ metric }) => {\n    const entry = metric.entries[metric.entries.length - 1];\n    if (!entry || !isValidLcpMetric(metric.value)) {\n      return;\n    }\n\n    _measurements['lcp'] = { value: metric.value, unit: 'millisecond' };\n    _lcpEntry = entry as LargestContentfulPaint;\n  }, true);\n}\n\nfunction _trackTtfb(): () => void {\n  return addTtfbInstrumentationHandler(({ metric }) => {\n    const entry = metric.entries[metric.entries.length - 1];\n    if (!entry) {\n      return;\n    }\n\n    _measurements['ttfb'] = { value: metric.value, unit: 'millisecond' };\n  });\n}\n\n/** Starts tracking First Paint and First Contentful Paint on the current page. */\nfunction _trackFpFcp(): () => void {\n  return addPerformanceInstrumentationHandler('paint', ({ entries }) => {\n    const firstHidden = getVisibilityWatcher();\n    for (const entry of entries) {\n      // Only report if the page wasn't hidden prior to the web vital.\n      const shouldRecord = entry.startTime < firstHidden.firstHiddenTime;\n      if (entry.name === 'first-paint' && shouldRecord) {\n        _measurements['fp'] = { value: entry.startTime, unit: 'millisecond' };\n      }\n      if (entry.name === 'first-contentful-paint' && shouldRecord) {\n        _measurements['fcp'] = { value: entry.startTime, unit: 'millisecond' };\n      }\n    }\n  });\n}\n\ninterface AddPerformanceEntriesOptions {\n  /**\n   * Resource spans with `op`s matching strings in the array will not be emitted.\n   *\n   * Default: []\n   */\n  ignoreResourceSpans: Array<'resouce.script' | 'resource.css' | 'resource.img' | 'resource.other' | string>;\n\n  /**\n   * Performance spans created from browser Performance APIs,\n   * `performance.mark(...)` nand `performance.measure(...)`\n   * with `name`s matching strings in the array will not be emitted.\n   *\n   * Default: []\n   */\n  ignorePerformanceApiSpans: Array<string | RegExp>;\n\n  /**\n   * Whether span streaming is enabled.\n   */\n  spanStreamingEnabled?: boolean;\n}\n\ninterface AddWebVitalsToSpanOptions {\n  /**\n   * Flag to determine if CLS should be recorded as a measurement on the pageload span or\n   * sent as a standalone span instead.\n   * Sending it as a standalone span will yield more accurate LCP values.\n   *\n   * Default: `false` for backwards compatibility.\n   */\n  recordClsOnPageloadSpan: boolean;\n\n  /**\n   * Flag to determine if LCP should be recorded as a measurement on the pageload span or\n   * sent as a standalone span instead.\n   * Sending it as a standalone span will yield more accurate LCP values.\n   *\n   * Default: `false` for backwards compatibility.\n   */\n  recordLcpOnPageloadSpan: boolean;\n\n  /**\n   * Whether span streaming is enabled.\n   */\n  spanStreamingEnabled?: boolean;\n}\n\n/** Add performance related spans to a transaction */\nexport function addPerformanceEntries(span: Span, options: AddPerformanceEntriesOptions): void {\n  const performance = getBrowserPerformanceAPI();\n  const origin = browserPerformanceTimeOrigin();\n  if (!performance?.getEntries || !origin) {\n    // Gatekeeper if performance API not available\n    return;\n  }\n\n  const { spanStreamingEnabled, ignorePerformanceApiSpans, ignoreResourceSpans } = options;\n\n  const timeOrigin = msToSec(origin);\n\n  const performanceEntries = performance.getEntries();\n\n  const { op, start_timestamp: transactionStartTime } = spanToJSON(span);\n\n  performanceEntries.slice(_performanceCursor).forEach(entry => {\n    const startTime = msToSec(entry.startTime);\n    const duration = msToSec(\n      // Inexplicably, Chrome sometimes emits a negative duration. We need to work around this.\n      // There is a SO post attempting to explain this, but it leaves one with open questions: https://stackoverflow.com/questions/23191918/peformance-getentries-and-negative-duration-display\n      // The way we clamp the value is probably not accurate, since we have observed this happen for things that may take a while to load, like for example the replay worker.\n      // TODO: Investigate why this happens and how to properly mitigate. For now, this is a workaround to prevent transactions being dropped due to negative duration spans.\n      Math.max(0, entry.duration),\n    );\n\n    if (op === 'navigation' && transactionStartTime && timeOrigin + startTime < transactionStartTime) {\n      return;\n    }\n\n    switch (entry.entryType) {\n      case 'navigation': {\n        _addNavigationSpans(span, entry as PerformanceNavigationTiming, timeOrigin);\n        break;\n      }\n      case 'mark':\n      case 'paint':\n      case 'measure': {\n        _addMeasureSpans(span, entry, startTime, duration, timeOrigin, ignorePerformanceApiSpans);\n        break;\n      }\n      case 'resource': {\n        _addResourceSpans(\n          span,\n          entry as PerformanceResourceTiming,\n          entry.name,\n          startTime,\n          duration,\n          timeOrigin,\n          ignoreResourceSpans,\n        );\n        break;\n      }\n      // Ignore other entry types.\n    }\n  });\n\n  _performanceCursor = Math.max(performanceEntries.length - 1, 0);\n\n  _trackNavigator(span, spanStreamingEnabled);\n}\n\n/**\n * Writes the collected web vitals (LCP, CLS, INP, TTFB, FP, FCP) onto the pageload span,\n * either as measurements/attributes (v1) or as web vital attributes (span streaming).\n *\n * This should be called when the pageload span ends, after the web vitals have been finalized.\n * It is a no-op for non-pageload spans, but always resets the collected web vital state so it\n * doesn't leak into a subsequent navigation.\n */\nexport function addWebVitalsToSpan(span: Span, options: AddWebVitalsToSpanOptions): void {\n  const origin = browserPerformanceTimeOrigin();\n  if (!getBrowserPerformanceAPI()?.getEntries || !origin) {\n    // Gatekeeper if performance API not available\n    resetWebVitalState();\n    return;\n  }\n\n  const { spanStreamingEnabled, recordClsOnPageloadSpan, recordLcpOnPageloadSpan } = options;\n  const timeOrigin = msToSec(origin);\n\n  // Measurements are only available for pageload transactions\n  if (spanToJSON(span).op === 'pageload') {\n    _addTtfbRequestTimeToMeasurements(_measurements);\n\n    if (spanStreamingEnabled) {\n      const setAttr = (shortWebVitalName: string, value: number, customAttrName?: string) => {\n        const attrKey = customAttrName ?? `browser.web_vital.${shortWebVitalName}.value`;\n        span.setAttribute(attrKey, value);\n        DEBUG_BUILD && debug.log('Setting web vital attribute', { [attrKey]: value }, 'on pageload span');\n      };\n      // for streamed pageload spans, we add the web vital measurements as attributes.\n      // We omit LCP, CLS and INP because they're tracked separately as spans\n      ['ttfb', 'fp', 'fcp'].forEach(measurementName => {\n        if (_measurements[measurementName]) {\n          setAttr(measurementName, _measurements[measurementName].value);\n        }\n      });\n      if (_measurements['ttfb.requestTime']) {\n        setAttr('ttfb.requestTime', _measurements['ttfb.requestTime'].value, 'browser.web_vital.ttfb.request_time');\n      }\n    } else {\n      // TODO (V11): Remove this else branch once we remove v1 standalone spans and transactions\n\n      // If CLS standalone spans are enabled, don't record CLS as a measurement\n      if (!recordClsOnPageloadSpan) {\n        delete _measurements.cls;\n      }\n\n      // If LCP standalone spans are enabled, don't record LCP as a measurement\n      if (!recordLcpOnPageloadSpan) {\n        delete _measurements.lcp;\n      }\n\n      Object.entries(_measurements).forEach(([measurementName, measurement]) => {\n        setMeasurement(measurementName, measurement.value, measurement.unit, span);\n      });\n\n      _setWebVitalAttributes(span, options);\n    }\n\n    // Set timeOrigin which denotes the timestamp which to base the LCP/FCP/FP/TTFB measurements on\n    span.setAttribute(spanStreamingEnabled ? 'browser.performance.time_origin' : 'performance.timeOrigin', timeOrigin);\n\n    // In prerendering scenarios, where a page might be prefetched and pre-rendered before the user clicks the link,\n    // the navigation starts earlier than when the user clicks it. Web Vitals should always be based on the\n    // user-perceived time, so they are not reported from the actual start of the navigation, but rather from the\n    // time where the user actively started the navigation, for example by clicking a link.\n    // This is user action is called \"activation\" and the time between navigation and activation is stored in\n    // the `activationStart` attribute of the \"navigation\" PerformanceEntry.\n    span.setAttribute(\n      spanStreamingEnabled ? 'browser.performance.navigation.activation_start' : 'performance.activationStart',\n      getActivationStart(),\n    );\n  }\n\n  resetWebVitalState();\n}\n\nfunction resetWebVitalState(): void {\n  _lcpEntry = undefined;\n  _clsEntry = undefined;\n  _measurements = {};\n}\n\n/**\n * React 19.2+ creates performance.measure entries for component renders.\n * We can identify them by the `detail.devtools.track` property being set to 'Components ⚛'.\n * see: https://react.dev/reference/dev-tools/react-performance-tracks\n * see: https://github.com/facebook/react/blob/06fcc8f380c6a905c7bc18d94453f623cf8cbc81/packages/react-reconciler/src/ReactFiberPerformanceTrack.js#L454-L473\n */\nfunction isReact19MeasureEntry(entry: PerformanceEntry | null): boolean | void {\n  if (entry?.entryType !== 'measure') {\n    return;\n  }\n  try {\n    // eslint-disable-next-line @typescript-eslint/no-unsafe-member-access\n    return (entry as PerformanceMeasure).detail.devtools.track === 'Components ⚛';\n  } catch {\n    return;\n  }\n}\n\n/**\n * Create measure related spans.\n * Exported only for tests.\n */\nexport function _addMeasureSpans(\n  span: Span,\n  entry: PerformanceEntry,\n  startTime: number,\n  duration: number,\n  timeOrigin: number,\n  ignorePerformanceApiSpans: AddPerformanceEntriesOptions['ignorePerformanceApiSpans'],\n): void {\n  if (isReact19MeasureEntry(entry)) {\n    return;\n  }\n\n  if (\n    ['mark', 'measure'].includes(entry.entryType) &&\n    stringMatchesSomePattern(entry.name, ignorePerformanceApiSpans)\n  ) {\n    return;\n  }\n\n  const navEntry = getNavigationEntry(false);\n\n  const requestTime = msToSec(navEntry ? navEntry.requestStart : 0);\n  // Because performance.measure accepts arbitrary timestamps it can produce\n  // spans that happen before the browser even makes a request for the page.\n  //\n  // An example of this is the automatically generated Next.js-before-hydration\n  // spans created by the Next.js framework.\n  //\n  // To prevent this we will pin the start timestamp to the request start time\n  // This does make duration inaccurate, so if this does happen, we will add\n  // an attribute to the span\n  const measureStartTimestamp = timeOrigin + Math.max(startTime, requestTime);\n  const startTimeStamp = timeOrigin + startTime;\n  const measureEndTimestamp = startTimeStamp + duration;\n\n  const attributes: SpanAttributes = {\n    [SEMANTIC_ATTRIBUTE_SENTRY_ORIGIN]: 'auto.resource.browser.metrics',\n  };\n\n  if (measureStartTimestamp !== startTimeStamp) {\n    attributes['sentry.browser.measure_happened_before_request'] = true;\n    attributes['sentry.browser.measure_start_time'] = measureStartTimestamp;\n  }\n\n  _addDetailToSpanAttributes(attributes, entry as PerformanceMeasure);\n\n  // Measurements from third parties can be off, which would create invalid spans, dropping transactions in the process.\n  if (measureStartTimestamp <= measureEndTimestamp) {\n    startAndEndSpan(span, measureStartTimestamp, measureEndTimestamp, {\n      name: entry.name,\n      op: entry.entryType,\n      attributes,\n    });\n  }\n}\n\nfunction _addDetailToSpanAttributes(attributes: SpanAttributes, performanceMeasure: PerformanceMeasure): void {\n  try {\n    // Accessing detail might throw in some browsers (e.g., Firefox) due to security restrictions\n    const detail = performanceMeasure.detail;\n\n    if (!detail) {\n      return;\n    }\n\n    // Process detail based on its type\n    if (typeof detail === 'object') {\n      // Handle object details\n      for (const [key, value] of Object.entries(detail)) {\n        if (value && isPrimitive(value)) {\n          attributes[`sentry.browser.measure.detail.${key}`] = value as SpanAttributeValue;\n        } else if (value !== undefined) {\n          try {\n            // This is user defined so we can't guarantee it's serializable\n            attributes[`sentry.browser.measure.detail.${key}`] = JSON.stringify(value);\n          } catch {\n            // Skip values that can't be stringified\n          }\n        }\n      }\n      return;\n    }\n\n    if (isPrimitive(detail)) {\n      // Handle primitive details\n      attributes['sentry.browser.measure.detail'] = detail as SpanAttributeValue;\n      return;\n    }\n\n    try {\n      attributes['sentry.browser.measure.detail'] = JSON.stringify(detail);\n    } catch {\n      // Skip if stringification fails\n    }\n  } catch {\n    // Silently ignore any errors when accessing detail\n    // This handles the Firefox \"Permission denied to access object\" error\n  }\n}\n\n/**\n * Instrument navigation entries\n * exported only for tests\n */\nexport function _addNavigationSpans(span: Span, entry: PerformanceNavigationTiming, timeOrigin: number): void {\n  (['unloadEvent', 'redirect', 'domContentLoadedEvent', 'loadEvent', 'connect'] as const).forEach(event => {\n    _addPerformanceNavigationTiming(span, entry, event, timeOrigin);\n  });\n  _addPerformanceNavigationTiming(span, entry, 'secureConnection', timeOrigin, 'TLS/SSL');\n  _addPerformanceNavigationTiming(span, entry, 'fetch', timeOrigin, 'cache');\n  _addPerformanceNavigationTiming(span, entry, 'domainLookup', timeOrigin, 'DNS');\n\n  _addRequest(span, entry, timeOrigin);\n}\n\ntype StartEventName =\n  | 'secureConnection'\n  | 'fetch'\n  | 'domainLookup'\n  | 'unloadEvent'\n  | 'redirect'\n  | 'connect'\n  | 'domContentLoadedEvent'\n  | 'loadEvent';\n\ntype EndEventName =\n  | 'domainLookupStart'\n  | 'domainLookupEnd'\n  | 'unloadEventEnd'\n  | 'redirectEnd'\n  | 'connectEnd'\n  | 'domContentLoadedEventEnd'\n  | 'loadEventEnd';\n\n/** Create performance navigation related spans */\nfunction _addPerformanceNavigationTiming(\n  span: Span,\n  entry: PerformanceNavigationTiming,\n  event: StartEventName,\n  timeOrigin: number,\n  name: string = event,\n): void {\n  const eventEnd = _getEndPropertyNameForNavigationTiming(event) satisfies keyof PerformanceNavigationTiming;\n  const end = entry[eventEnd];\n  const start = entry[`${event}Start`];\n  if (!start || !end) {\n    return;\n  }\n  startAndEndSpan(span, timeOrigin + msToSec(start), timeOrigin + msToSec(end), {\n    op: `browser.${name}`,\n    name: entry.name,\n    attributes: {\n      [SEMANTIC_ATTRIBUTE_SENTRY_ORIGIN]: 'auto.ui.browser.metrics',\n      ...(event === 'redirect' && entry.redirectCount != null ? { 'http.redirect_count': entry.redirectCount } : {}),\n    },\n  });\n}\n\nfunction _getEndPropertyNameForNavigationTiming(event: StartEventName): EndEventName {\n  if (event === 'secureConnection') {\n    return 'connectEnd';\n  }\n  if (event === 'fetch') {\n    return 'domainLookupStart';\n  }\n  return `${event}End`;\n}\n\n/** Create request and response related spans */\nfunction _addRequest(span: Span, entry: PerformanceNavigationTiming, timeOrigin: number): void {\n  const requestStartTimestamp = timeOrigin + msToSec(entry.requestStart);\n  const responseEndTimestamp = timeOrigin + msToSec(entry.responseEnd);\n  const responseStartTimestamp = timeOrigin + msToSec(entry.responseStart);\n  if (entry.responseEnd) {\n    // It is possible that we are collecting these metrics when the page hasn't finished loading yet, for example when the HTML slowly streams in.\n    // In this case, ie. when the document request hasn't finished yet, `entry.responseEnd` will be 0.\n    // In order not to produce faulty spans, where the end timestamp is before the start timestamp, we will only collect\n    // these spans when the responseEnd value is available. The backend (Relay) would drop the entire span if it contained faulty spans.\n    startAndEndSpan(span, requestStartTimestamp, responseEndTimestamp, {\n      op: 'browser.request',\n      name: entry.name,\n      attributes: {\n        [SEMANTIC_ATTRIBUTE_SENTRY_ORIGIN]: 'auto.ui.browser.metrics',\n      },\n    });\n\n    startAndEndSpan(span, responseStartTimestamp, responseEndTimestamp, {\n      op: 'browser.response',\n      name: entry.name,\n      attributes: {\n        [SEMANTIC_ATTRIBUTE_SENTRY_ORIGIN]: 'auto.ui.browser.metrics',\n      },\n    });\n  }\n}\n\n/**\n * Create resource-related spans.\n * Exported only for tests.\n */\nexport function _addResourceSpans(\n  span: Span,\n  entry: PerformanceResourceTiming,\n  resourceUrl: string,\n  startTime: number,\n  duration: number,\n  timeOrigin: number,\n  ignoredResourceSpanOps?: Array<string>,\n): void {\n  // we already instrument based on fetch and xhr, so we don't need to\n  // duplicate spans here.\n  if (entry.initiatorType === 'xmlhttprequest' || entry.initiatorType === 'fetch') {\n    return;\n  }\n\n  const op = entry.initiatorType ? `resource.${entry.initiatorType}` : 'resource.other';\n  if (ignoredResourceSpanOps?.includes(op)) {\n    return;\n  }\n\n  const attributes: SpanAttributes = {\n    [SEMANTIC_ATTRIBUTE_SENTRY_ORIGIN]: 'auto.resource.browser.metrics',\n  };\n\n  const parsedUrl = parseUrl(resourceUrl);\n\n  if (parsedUrl.protocol) {\n    attributes['url.scheme'] = parsedUrl.protocol.split(':').pop(); // the protocol returned by parseUrl includes a :, but OTEL spec does not, so we remove it.\n  }\n\n  if (parsedUrl.host) {\n    attributes['server.address'] = parsedUrl.host;\n  }\n\n  attributes['url.same_origin'] = resourceUrl.includes(WINDOW.location.origin);\n\n  attributes[URL_FULL] = resourceUrl;\n\n  _setResourceRequestAttributes(entry, attributes, [\n    // https://developer.mozilla.org/en-US/docs/Web/API/PerformanceResourceTiming/responseStatus\n    ['responseStatus', 'http.response.status_code'],\n\n    ['transferSize', 'http.response_transfer_size'],\n    ['encodedBodySize', 'http.response_content_length'],\n    ['decodedBodySize', 'http.decoded_response_content_length'],\n\n    // https://developer.mozilla.org/en-US/docs/Web/API/PerformanceResourceTiming/renderBlockingStatus\n    ['renderBlockingStatus', 'resource.render_blocking_status'],\n\n    // https://developer.mozilla.org/en-US/docs/Web/API/PerformanceResourceTiming/deliveryType\n    ['deliveryType', 'http.response_delivery_type'],\n  ]);\n\n  const attributesWithResourceTiming: SpanAttributes = { ...attributes, ...resourceTimingToSpanAttributes(entry) };\n\n  const startTimestamp = timeOrigin + startTime;\n  const endTimestamp = startTimestamp + duration;\n\n  startAndEndSpan(span, startTimestamp, endTimestamp, {\n    name: resourceUrl.replace(WINDOW.location.origin, ''),\n    op,\n    attributes: attributesWithResourceTiming,\n  });\n}\n\n/**\n * Capture the information of the user agent.\n * TODO v11: Remove non-span-streaming attributes and measurements once we removed transactions\n */\nfunction _trackNavigator(span: Span, spanStreamingEnabled: boolean | undefined): void {\n  const navigator = WINDOW.navigator as null | (Navigator & NavigatorNetworkInformation & NavigatorDeviceMemory);\n  if (!navigator) {\n    return;\n  }\n\n  // track network connectivity\n  const connection = navigator.connection;\n  if (connection) {\n    if (connection.effectiveType) {\n      span.setAttribute(\n        spanStreamingEnabled ? 'network.connection.effective_type' : 'effectiveConnectionType',\n        connection.effectiveType,\n      );\n    }\n\n    if (connection.type) {\n      span.setAttribute(spanStreamingEnabled ? 'network.connection.type' : 'connectionType', connection.type);\n    }\n\n    if (isMeasurementValue(connection.rtt)) {\n      if (spanStreamingEnabled) {\n        span.setAttribute('network.connection.rtt', connection.rtt);\n      } else if (spanToJSON(span).op === 'pageload') {\n        // Measurements are only recorded on the pageload span, matching the historical\n        // behavior where `connection.rtt` was only flushed for pageload transactions.\n        setMeasurement('connection.rtt', connection.rtt, 'millisecond');\n      }\n    }\n  }\n\n  if (isMeasurementValue(navigator.deviceMemory)) {\n    if (spanStreamingEnabled) {\n      span.setAttribute('device.memory.estimated_capacity', navigator.deviceMemory);\n    } else {\n      span.setAttribute('deviceMemory', `${navigator.deviceMemory} GB`);\n    }\n  }\n\n  if (isMeasurementValue(navigator.hardwareConcurrency)) {\n    if (spanStreamingEnabled) {\n      span.setAttribute('device.processor_count', navigator.hardwareConcurrency);\n    } else {\n      span.setAttribute('hardwareConcurrency', String(navigator.hardwareConcurrency));\n    }\n  }\n}\n\n/** Add LCP / CLS data to span to allow debugging */\nfunction _setWebVitalAttributes(span: Span, options: AddWebVitalsToSpanOptions): void {\n  // Only add LCP attributes if LCP is being recorded on the pageload span\n  if (_lcpEntry && options.recordLcpOnPageloadSpan) {\n    // Capture Properties of the LCP element that contributes to the LCP.\n\n    if (_lcpEntry.element) {\n      span.setAttribute('lcp.element', htmlTreeAsString(_lcpEntry.element));\n    }\n\n    if (_lcpEntry.id) {\n      span.setAttribute('lcp.id', _lcpEntry.id);\n    }\n\n    if (_lcpEntry.url) {\n      // Trim URL to the first 200 characters.\n      span.setAttribute('lcp.url', _lcpEntry.url.trim().slice(0, 200));\n    }\n\n    if (_lcpEntry.loadTime != null) {\n      // loadTime is the time of LCP that's related to receiving the LCP element response..\n      span.setAttribute('lcp.loadTime', _lcpEntry.loadTime);\n    }\n\n    if (_lcpEntry.renderTime != null) {\n      // renderTime is loadTime + rendering time\n      // it's 0 if the LCP element is loaded from a 3rd party origin that doesn't send the\n      // `Timing-Allow-Origin` header.\n      span.setAttribute('lcp.renderTime', _lcpEntry.renderTime);\n    }\n\n    span.setAttribute('lcp.size', _lcpEntry.size);\n  }\n\n  // Only add CLS attributes if CLS is being recorded on the pageload span\n  if (_clsEntry?.sources && options.recordClsOnPageloadSpan) {\n    _clsEntry.sources.forEach((source, index) =>\n      span.setAttribute(`cls.source.${index + 1}`, htmlTreeAsString(source.node)),\n    );\n  }\n}\n\ntype ExperimentalResourceTimingProperty =\n  | 'renderBlockingStatus'\n  | 'deliveryType'\n  // For some reason, TS during build, errors on `responseStatus` not being a property of\n  // PerformanceResourceTiming while it actually is. Hence, we're adding it here.\n  // Perhaps because response status is not yet available in Webkit/Safari.\n  // https://developer.mozilla.org/en-US/docs/Web/API/PerformanceResourceTiming/responseStatus\n  | 'responseStatus';\n\n/**\n * Use this to set any attributes we can take directly form the PerformanceResourceTiming entry.\n *\n * This is just a mapping function for entry->attribute to keep bundle-size minimal.\n * Experimental properties are also accepted (see {@link ExperimentalResourceTimingProperty}).\n * Assumes that all entry properties might be undefined for browser-specific differences.\n * Only accepts string and number values for now and also sets 0-values.\n */\nexport function _setResourceRequestAttributes(\n  entry: Partial<PerformanceResourceTiming> & Partial<Record<ExperimentalResourceTimingProperty, number | string>>,\n  attributes: SpanAttributes,\n  properties: [keyof PerformanceResourceTiming | ExperimentalResourceTimingProperty, string][],\n): void {\n  properties.forEach(([entryKey, attributeKey]) => {\n    const entryVal = entry[entryKey];\n    if (\n      entryVal != null &&\n      ((typeof entryVal === 'number' && entryVal < MAX_INT_AS_BYTES) || typeof entryVal === 'string')\n    ) {\n      attributes[attributeKey] = entryVal;\n    }\n  });\n}\n\n/**\n * Add ttfb request time information to measurements.\n *\n * ttfb information is added via vendored web vitals library.\n */\nfunction _addTtfbRequestTimeToMeasurements(_measurements: Measurements): void {\n  const navEntry = getNavigationEntry(false);\n  if (!navEntry) {\n    return;\n  }\n\n  const { responseStart, requestStart } = navEntry;\n\n  if (requestStart <= responseStart) {\n    _measurements['ttfb.requestTime'] = {\n      value: responseStart - requestStart,\n      unit: 'millisecond',\n    };\n  }\n}\n","import type { Client, SpanAttributes } from '@sentry/core';\nimport {\n  browserPerformanceTimeOrigin,\n  debug,\n  getCurrentScope,\n  SEMANTIC_ATTRIBUTE_EXCLUSIVE_TIME,\n  SEMANTIC_ATTRIBUTE_SENTRY_MEASUREMENT_UNIT,\n  SEMANTIC_ATTRIBUTE_SENTRY_MEASUREMENT_VALUE,\n  SEMANTIC_ATTRIBUTE_SENTRY_OP,\n  SEMANTIC_ATTRIBUTE_SENTRY_ORIGIN,\n  timestampInSeconds,\n} from '@sentry/core';\nimport { DEBUG_BUILD } from '../debug-build';\nimport { htmlTreeAsString } from '../htmlTreeAsString';\nimport { addClsInstrumentationHandler } from './instrument';\nimport type { WebVitalReportEvent } from './utils';\nimport { listenForWebVitalReportEvents, msToSec, startStandaloneWebVitalSpan, supportsWebVital } from './utils';\n\n/**\n * Starts tracking the Cumulative Layout Shift on the current page and collects the value once\n *\n * - the page visibility is hidden\n * - a navigation span is started (to stop CLS measurement for SPA soft navigations)\n *\n * Once either of these events triggers, the CLS value is sent as a standalone span and we stop\n * measuring CLS.\n */\nexport function trackClsAsStandaloneSpan(client: Client): void {\n  let standaloneCLsValue = 0;\n  let standaloneClsEntry: LayoutShift | undefined;\n\n  if (!supportsWebVital('layout-shift')) {\n    return;\n  }\n\n  const cleanupClsHandler = addClsInstrumentationHandler(({ metric }) => {\n    const entry = metric.entries[metric.entries.length - 1] as LayoutShift | undefined;\n    if (!entry) {\n      return;\n    }\n    standaloneCLsValue = metric.value;\n    standaloneClsEntry = entry;\n  }, true);\n\n  listenForWebVitalReportEvents(client, (reportEvent, pageloadSpanId) => {\n    _sendStandaloneClsSpan(standaloneCLsValue, standaloneClsEntry, pageloadSpanId, reportEvent);\n    cleanupClsHandler();\n  });\n}\n\n/**\n * Exported only for testing!\n */\nexport function _sendStandaloneClsSpan(\n  clsValue: number,\n  entry: LayoutShift | undefined,\n  pageloadSpanId: string,\n  reportEvent: WebVitalReportEvent,\n) {\n  DEBUG_BUILD && debug.log(`Sending CLS span (${clsValue})`);\n\n  const startTime = entry ? msToSec((browserPerformanceTimeOrigin() || 0) + entry.startTime) : timestampInSeconds();\n  const routeName = getCurrentScope().getScopeData().transactionName;\n\n  const name = entry ? htmlTreeAsString(entry.sources[0]?.node) : 'Layout shift';\n\n  const attributes: SpanAttributes = {\n    [SEMANTIC_ATTRIBUTE_SENTRY_ORIGIN]: 'auto.http.browser.cls',\n    [SEMANTIC_ATTRIBUTE_SENTRY_OP]: 'ui.webvital.cls',\n    [SEMANTIC_ATTRIBUTE_EXCLUSIVE_TIME]: 0,\n    // attach the pageload span id to the CLS span so that we can link them in the UI\n    'sentry.pageload.span_id': pageloadSpanId,\n    // describes what triggered the web vital to be reported\n    'sentry.report_event': reportEvent,\n  };\n\n  // Add CLS sources as span attributes to help with debugging layout shifts\n  // See: https://developer.mozilla.org/en-US/docs/Web/API/LayoutShift/sources\n  if (entry?.sources) {\n    entry.sources.forEach((source, index) => {\n      attributes[`cls.source.${index + 1}`] = htmlTreeAsString(source.node);\n    });\n  }\n\n  const span = startStandaloneWebVitalSpan({\n    name,\n    transaction: routeName,\n    attributes,\n    startTime,\n  });\n\n  if (span) {\n    span.addEvent('cls', {\n      [SEMANTIC_ATTRIBUTE_SENTRY_MEASUREMENT_UNIT]: '',\n      [SEMANTIC_ATTRIBUTE_SENTRY_MEASUREMENT_VALUE]: clsValue,\n    });\n\n    // LayoutShift performance entries always have a duration of 0, so we don't need to add `entry.duration` here\n    // see: https://developer.mozilla.org/en-US/docs/Web/API/PerformanceEntry/duration\n    span.end(startTime);\n  }\n}\n","import type { IntegrationFn } from '@sentry/core';\nimport { browserPerformanceTimeOrigin, defineIntegration, metrics } from '@sentry/core';\nimport { addPerformanceInstrumentationHandler } from './instrument';\nimport { getBrowserPerformanceAPI } from './utils';\n\n// ElementTiming interface based on the W3C spec\ninterface PerformanceElementTiming extends PerformanceEntry {\n  renderTime: number;\n  loadTime: number;\n  intersectionRect: DOMRectReadOnly;\n  identifier: string;\n  naturalWidth: number;\n  naturalHeight: number;\n  id: string;\n  element: Element | null;\n  url?: string;\n}\n\nconst INTEGRATION_NAME = 'ElementTiming';\n\nconst _elementTimingIntegration = (() => {\n  return {\n    name: INTEGRATION_NAME,\n    setup() {\n      const performance = getBrowserPerformanceAPI();\n      if (!performance || !browserPerformanceTimeOrigin()) {\n        return;\n      }\n\n      addPerformanceInstrumentationHandler('element', ({ entries }) => {\n        for (const entry of entries) {\n          const elementEntry = entry as PerformanceElementTiming;\n\n          if (!elementEntry.identifier) {\n            continue;\n          }\n\n          const identifier = elementEntry.identifier;\n          const paintType = elementEntry.name as 'image-paint' | 'text-paint' | undefined;\n          const renderTime = elementEntry.renderTime;\n          const loadTime = elementEntry.loadTime;\n\n          const metricAttributes: Record<string, string | number> = {\n            'sentry.origin': 'auto.ui.browser.element_timing',\n            'ui.element.identifier': identifier,\n          };\n\n          if (paintType) {\n            metricAttributes['ui.element.paint_type'] = paintType;\n          }\n\n          if (elementEntry.id) {\n            metricAttributes['ui.element.id'] = elementEntry.id;\n          }\n\n          if (elementEntry.element) {\n            metricAttributes['ui.element.type'] = elementEntry.element.tagName.toLowerCase();\n          }\n\n          if (elementEntry.url) {\n            metricAttributes['ui.element.url'] = elementEntry.url;\n          }\n\n          if (elementEntry.naturalWidth) {\n            metricAttributes['ui.element.width'] = elementEntry.naturalWidth;\n          }\n\n          if (elementEntry.naturalHeight) {\n            metricAttributes['ui.element.height'] = elementEntry.naturalHeight;\n          }\n\n          if (renderTime > 0) {\n            metrics.distribution(`ui.element.render_time`, renderTime, {\n              unit: 'millisecond',\n              attributes: metricAttributes,\n            });\n          }\n\n          if (loadTime > 0) {\n            metrics.distribution(`ui.element.load_time`, loadTime, {\n              unit: 'millisecond',\n              attributes: metricAttributes,\n            });\n          }\n        }\n      });\n    },\n  };\n}) satisfies IntegrationFn;\n\n/**\n * Captures [Element Timing API](https://developer.mozilla.org/en-US/docs/Web/API/PerformanceElementTiming)\n * data as Sentry metrics.\n *\n * To mark an element for tracking, add the `elementtiming` HTML attribute:\n * ```html\n * <img src=\"hero.jpg\" elementtiming=\"hero-image\" />\n * <p elementtiming=\"hero-text\">Welcome!</p>\n * ```\n *\n * This emits `ui.element.render_time` and `ui.element.load_time` (for images)\n * as distribution metrics, tagged with the element's identifier and paint type.\n */\nexport const elementTimingIntegration = defineIntegration(_elementTimingIntegration);\n\n/**\n * @deprecated Use `elementTimingIntegration` instead. This function is a no-op and will be removed in a future version.\n */\nexport function startTrackingElementTiming(): () => void {\n  return () => undefined;\n}\n","import type { Span, SpanAttributes } from '@sentry/core';\nimport {\n  browserPerformanceTimeOrigin,\n  getActiveSpan,\n  getCurrentScope,\n  getRootSpan,\n  isBrowser,\n  SEMANTIC_ATTRIBUTE_EXCLUSIVE_TIME,\n  SEMANTIC_ATTRIBUTE_SENTRY_MEASUREMENT_UNIT,\n  SEMANTIC_ATTRIBUTE_SENTRY_MEASUREMENT_VALUE,\n  SEMANTIC_ATTRIBUTE_SENTRY_OP,\n  SEMANTIC_ATTRIBUTE_SENTRY_ORIGIN,\n  spanToJSON,\n} from '@sentry/core';\nimport { htmlTreeAsString } from '../htmlTreeAsString';\nimport { WINDOW } from '../types';\nimport type { InstrumentationHandlerCallback } from './instrument';\nimport {\n  addInpInstrumentationHandler,\n  addPerformanceInstrumentationHandler,\n  isPerformanceEventTiming,\n} from './instrument';\nimport { getBrowserPerformanceAPI, msToSec, startStandaloneWebVitalSpan } from './utils';\n\ninterface InteractionContext {\n  span: Span | undefined;\n  elementName: string;\n}\n\nconst LAST_INTERACTIONS: number[] = [];\nconst INTERACTIONS_SPAN_MAP = new Map<number, InteractionContext>();\n\n// Map to store element names by timestamp, since we get the DOM event before the PerformanceObserver entry\nconst ELEMENT_NAME_TIMESTAMP_MAP = new Map<number, string>();\n\n/**\n * 60 seconds is the maximum for a plausible INP value\n * (source: Me)\n */\nexport const MAX_PLAUSIBLE_INP_DURATION = 60;\n/**\n * Start tracking INP webvital events.\n */\nexport function startTrackingINP(): () => void {\n  const performance = getBrowserPerformanceAPI();\n  if (performance && browserPerformanceTimeOrigin()) {\n    const inpCallback = _trackINP();\n\n    return (): void => {\n      inpCallback();\n    };\n  }\n\n  return () => undefined;\n}\n\nexport const INP_ENTRY_MAP: Record<string, 'click' | 'hover' | 'drag' | 'press'> = {\n  click: 'click',\n  pointerdown: 'click',\n  pointerup: 'click',\n  mousedown: 'click',\n  mouseup: 'click',\n  touchstart: 'click',\n  touchend: 'click',\n  mouseover: 'hover',\n  mouseout: 'hover',\n  mouseenter: 'hover',\n  mouseleave: 'hover',\n  pointerover: 'hover',\n  pointerout: 'hover',\n  pointerenter: 'hover',\n  pointerleave: 'hover',\n  dragstart: 'drag',\n  dragend: 'drag',\n  drag: 'drag',\n  dragenter: 'drag',\n  dragleave: 'drag',\n  dragover: 'drag',\n  drop: 'drag',\n  keydown: 'press',\n  keyup: 'press',\n  keypress: 'press',\n  input: 'press',\n};\n\n/** Starts tracking the Interaction to Next Paint on the current page. #\n * exported only for testing\n */\nexport function _trackINP(): () => void {\n  return addInpInstrumentationHandler(_onInp);\n}\n\n/**\n * exported only for testing\n */\nexport const _onInp: InstrumentationHandlerCallback = ({ metric }) => {\n  if (metric.value == undefined) {\n    return;\n  }\n\n  const duration = msToSec(metric.value);\n\n  // We received occasional reports of hour-long INP values.\n  // Therefore, we add a sanity check to avoid creating spans for\n  // unrealistically long INP durations.\n  if (duration > MAX_PLAUSIBLE_INP_DURATION) {\n    return;\n  }\n\n  const entry = metric.entries.find(entry => entry.duration === metric.value && INP_ENTRY_MAP[entry.name]);\n\n  if (!entry) {\n    return;\n  }\n\n  const { interactionId } = entry;\n  const interactionType = INP_ENTRY_MAP[entry.name];\n\n  /** Build the INP span, create an envelope from the span, and then send the envelope */\n  const startTime = msToSec((browserPerformanceTimeOrigin() as number) + entry.startTime);\n  const activeSpan = getActiveSpan();\n  const rootSpan = activeSpan ? getRootSpan(activeSpan) : undefined;\n\n  // We first try to lookup the interaction context from our INTERACTIONS_SPAN_MAP,\n  // where we cache the route and element name per interactionId\n  const cachedInteractionContext = interactionId != null ? INTERACTIONS_SPAN_MAP.get(interactionId) : undefined;\n\n  const spanToUse = cachedInteractionContext?.span || rootSpan;\n\n  // Else, we try to use the active span.\n  // Finally, we fall back to look at the transactionName on the scope\n  const routeName = spanToUse ? spanToJSON(spanToUse).description : getCurrentScope().getScopeData().transactionName;\n\n  const name = cachedInteractionContext?.elementName || htmlTreeAsString(entry.target);\n  const attributes: SpanAttributes = {\n    [SEMANTIC_ATTRIBUTE_SENTRY_ORIGIN]: 'auto.http.browser.inp',\n    [SEMANTIC_ATTRIBUTE_SENTRY_OP]: `ui.interaction.${interactionType}`,\n    [SEMANTIC_ATTRIBUTE_EXCLUSIVE_TIME]: entry.duration,\n  };\n\n  const span = startStandaloneWebVitalSpan({\n    name,\n    transaction: routeName,\n    attributes,\n    startTime,\n  });\n\n  if (span) {\n    span.addEvent('inp', {\n      [SEMANTIC_ATTRIBUTE_SENTRY_MEASUREMENT_UNIT]: 'millisecond',\n      [SEMANTIC_ATTRIBUTE_SENTRY_MEASUREMENT_VALUE]: metric.value,\n    });\n\n    span.end(startTime + duration);\n  }\n};\n\n/**\n * Look up a cached interaction context (element name + root span) by interactionId.\n * Returns undefined if no context was cached for this interaction.\n */\nexport function getCachedInteractionContext(interactionId: number | undefined): InteractionContext | undefined {\n  return interactionId != null ? INTERACTIONS_SPAN_MAP.get(interactionId) : undefined;\n}\n\n/**\n * Register a listener to cache route information for INP interactions.\n */\nexport function registerInpInteractionListener(): void {\n  // Listen for all interaction events that could contribute to INP\n  const interactionEvents = Object.keys(INP_ENTRY_MAP);\n  if (isBrowser()) {\n    interactionEvents.forEach(eventType => {\n      WINDOW.addEventListener(eventType, captureElementFromEvent, { capture: true, passive: true });\n    });\n  }\n\n  /**\n   * Captures the element name from a DOM event and stores it in the ELEMENT_NAME_TIMESTAMP_MAP.\n   */\n  function captureElementFromEvent(event: Event): void {\n    const target = event.target as HTMLElement | null;\n    if (!target) {\n      return;\n    }\n\n    const elementName = htmlTreeAsString(target);\n    const timestamp = Math.round(event.timeStamp);\n\n    // Store the element name by timestamp so we can match it with the PerformanceEntry\n    ELEMENT_NAME_TIMESTAMP_MAP.set(timestamp, elementName);\n\n    // Clean up old\n    if (ELEMENT_NAME_TIMESTAMP_MAP.size > 50) {\n      const firstKey = ELEMENT_NAME_TIMESTAMP_MAP.keys().next().value;\n      if (firstKey !== undefined) {\n        ELEMENT_NAME_TIMESTAMP_MAP.delete(firstKey);\n      }\n    }\n  }\n\n  /**\n   * Tries to get the element name from the timestamp map.\n   */\n  function resolveElementNameFromEntry(entry: PerformanceEntry): string {\n    const timestamp = Math.round(entry.startTime);\n    let elementName = ELEMENT_NAME_TIMESTAMP_MAP.get(timestamp);\n\n    // try nearby timestamps (±5ms)\n    if (!elementName) {\n      for (let offset = -5; offset <= 5; offset++) {\n        const nearbyName = ELEMENT_NAME_TIMESTAMP_MAP.get(timestamp + offset);\n        if (nearbyName) {\n          elementName = nearbyName;\n          break;\n        }\n      }\n    }\n\n    return elementName || '<unknown>';\n  }\n\n  const handleEntries = ({ entries }: { entries: PerformanceEntry[] }): void => {\n    const activeSpan = getActiveSpan();\n    const activeRootSpan = activeSpan && getRootSpan(activeSpan);\n\n    entries.forEach(entry => {\n      if (!isPerformanceEventTiming(entry)) {\n        return;\n      }\n\n      const interactionId = entry.interactionId;\n      if (interactionId == null) {\n        return;\n      }\n\n      // If the interaction was already recorded before, nothing more to do\n      if (INTERACTIONS_SPAN_MAP.has(interactionId)) {\n        return;\n      }\n\n      const elementName = entry.target ? htmlTreeAsString(entry.target) : resolveElementNameFromEntry(entry);\n\n      // We keep max. 10 interactions in the list, then remove the oldest one & clean up\n      if (LAST_INTERACTIONS.length > 10) {\n        const last = LAST_INTERACTIONS.shift() as number;\n        INTERACTIONS_SPAN_MAP.delete(last);\n      }\n\n      // We add the interaction to the list of recorded interactions\n      // and store both the span and element name for this interaction\n      LAST_INTERACTIONS.push(interactionId);\n      INTERACTIONS_SPAN_MAP.set(interactionId, {\n        span: activeRootSpan,\n        elementName,\n      });\n    });\n  };\n\n  addPerformanceInstrumentationHandler('event', handleEntries);\n  addPerformanceInstrumentationHandler('first-input', handleEntries);\n}\n","import { debug, getFunctionName } from '@sentry/core';\nimport { DEBUG_BUILD } from '../debug-build';\nimport { onCLS } from './web-vitals/getCLS';\nimport { onINP } from './web-vitals/getINP';\nimport { onLCP } from './web-vitals/getLCP';\nimport { observe } from './web-vitals/lib/observe';\nimport { onTTFB } from './web-vitals/onTTFB';\n\ntype InstrumentHandlerTypePerformanceObserver =\n  | 'longtask'\n  | 'event'\n  | 'navigation'\n  | 'paint'\n  | 'resource'\n  | 'element'\n  // fist-input is still needed for INP\n  | 'first-input';\n\ntype InstrumentHandlerTypeMetric = 'cls' | 'lcp' | 'ttfb' | 'inp';\n\n// We provide this here manually instead of relying on a global, as this is not available in non-browser environements\n// And we do not want to expose such types\ninterface PerformanceEntry {\n  readonly duration: number;\n  readonly entryType: string;\n  readonly name: string;\n  readonly startTime: number;\n  toJSON(): Record<string, unknown>;\n}\nexport interface PerformanceEventTiming extends PerformanceEntry {\n  processingStart: number;\n  processingEnd: number;\n  duration: number;\n  cancelable?: boolean;\n  target?: unknown | null;\n  interactionId?: number;\n}\n\ninterface PerformanceScriptTiming extends PerformanceEntry {\n  sourceURL: string;\n  sourceFunctionName: string;\n  sourceCharPosition: number;\n  invoker: string;\n  invokerType: string;\n}\nexport interface PerformanceLongAnimationFrameTiming extends PerformanceEntry {\n  scripts: PerformanceScriptTiming[];\n}\n\ninterface Metric {\n  /**\n   * The name of the metric (in acronym form).\n   */\n  name: 'CLS' | 'FCP' | 'INP' | 'LCP' | 'TTFB';\n\n  /**\n   * The current value of the metric.\n   */\n  value: number;\n\n  /**\n   * The rating as to whether the metric value is within the \"good\",\n   * \"needs improvement\", or \"poor\" thresholds of the metric.\n   */\n  rating: 'good' | 'needs-improvement' | 'poor';\n\n  /**\n   * The delta between the current value and the last-reported value.\n   * On the first report, `delta` and `value` will always be the same.\n   */\n  delta: number;\n\n  /**\n   * A unique ID representing this particular metric instance. This ID can\n   * be used by an analytics tool to dedupe multiple values sent for the same\n   * metric instance, or to group multiple deltas together and calculate a\n   * total. It can also be used to differentiate multiple different metric\n   * instances sent from the same page, which can happen if the page is\n   * restored from the back/forward cache (in that case new metrics object\n   * get created).\n   */\n  id: string;\n\n  /**\n   * Any performance entries relevant to the metric value calculation.\n   * The array may also be empty if the metric value was not based on any\n   * entries (e.g. a CLS value of 0 given no layout shifts).\n   */\n  entries: PerformanceEntry[];\n\n  /**\n   * The type of navigation\n   *\n   * Navigation Timing API (or `undefined` if the browser doesn't\n   * support that API). For pages that are restored from the bfcache, this\n   * value will be 'back-forward-cache'.\n   */\n  navigationType: 'navigate' | 'reload' | 'back-forward' | 'back-forward-cache' | 'prerender' | 'restore';\n}\n\ntype InstrumentHandlerType = InstrumentHandlerTypeMetric | InstrumentHandlerTypePerformanceObserver;\n\ntype StopListening = undefined | void | (() => void);\n\n// eslint-disable-next-line @typescript-eslint/no-explicit-any\ntype InstrumentHandlerCallback = (data: any) => void;\n\ntype CleanupHandlerCallback = () => void;\n\nconst handlers: { [key in InstrumentHandlerType]?: InstrumentHandlerCallback[] } = {};\nconst instrumented: { [key in InstrumentHandlerType]?: boolean } = {};\n\nlet _previousCls: Metric | undefined;\nlet _previousLcp: Metric | undefined;\nlet _previousTtfb: Metric | undefined;\nlet _previousInp: Metric | undefined;\n\n/**\n * Add a callback that will be triggered when a CLS metric is available.\n * Returns a cleanup callback which can be called to remove the instrumentation handler.\n *\n * Pass `stopOnCallback = true` to stop listening for CLS when the cleanup callback is called.\n * This will lead to the CLS being finalized and frozen.\n */\nexport function addClsInstrumentationHandler(\n  callback: (data: { metric: Metric }) => void,\n  stopOnCallback = false,\n): CleanupHandlerCallback {\n  return addMetricObserver('cls', callback, instrumentCls, _previousCls, stopOnCallback);\n}\n\n/**\n * Add a callback that will be triggered when a LCP metric is available.\n * Returns a cleanup callback which can be called to remove the instrumentation handler.\n *\n * Pass `stopOnCallback = true` to stop listening for LCP when the cleanup callback is called.\n * This will lead to the LCP being finalized and frozen.\n */\nexport function addLcpInstrumentationHandler(\n  callback: (data: { metric: Metric }) => void,\n  stopOnCallback = false,\n): CleanupHandlerCallback {\n  return addMetricObserver('lcp', callback, instrumentLcp, _previousLcp, stopOnCallback);\n}\n\n/**\n * Add a callback that will be triggered when a TTFD metric is available.\n */\nexport function addTtfbInstrumentationHandler(callback: (data: { metric: Metric }) => void): CleanupHandlerCallback {\n  return addMetricObserver('ttfb', callback, instrumentTtfb, _previousTtfb);\n}\n\nexport type InstrumentationHandlerCallback = (data: {\n  metric: Omit<Metric, 'entries'> & {\n    entries: PerformanceEventTiming[];\n  };\n}) => void;\n\n/**\n * Add a callback that will be triggered when a INP metric is available.\n * Returns a cleanup callback which can be called to remove the instrumentation handler.\n */\nexport function addInpInstrumentationHandler(callback: InstrumentationHandlerCallback): CleanupHandlerCallback {\n  return addMetricObserver('inp', callback, instrumentInp, _previousInp);\n}\n\nexport function addPerformanceInstrumentationHandler(\n  type: 'event',\n  callback: (data: { entries: ((PerformanceEntry & { target?: unknown | null }) | PerformanceEventTiming)[] }) => void,\n): CleanupHandlerCallback;\nexport function addPerformanceInstrumentationHandler(\n  type: InstrumentHandlerTypePerformanceObserver,\n  callback: (data: { entries: PerformanceEntry[] }) => void,\n): CleanupHandlerCallback;\n\n/**\n * Add a callback that will be triggered when a performance observer is triggered,\n * and receives the entries of the observer.\n * Returns a cleanup callback which can be called to remove the instrumentation handler.\n */\nexport function addPerformanceInstrumentationHandler(\n  type: InstrumentHandlerTypePerformanceObserver,\n  callback: (data: { entries: PerformanceEntry[] }) => void,\n): CleanupHandlerCallback {\n  addHandler(type, callback);\n\n  if (!instrumented[type]) {\n    instrumentPerformanceObserver(type);\n    instrumented[type] = true;\n  }\n\n  return getCleanupCallback(type, callback);\n}\n\n/** Trigger all handlers of a given type. */\nfunction triggerHandlers(type: InstrumentHandlerType, data: unknown): void {\n  const typeHandlers = handlers[type];\n\n  if (!typeHandlers?.length) {\n    return;\n  }\n\n  for (const handler of typeHandlers) {\n    try {\n      handler(data);\n    } catch (e) {\n      DEBUG_BUILD &&\n        debug.error(\n          `Error while triggering instrumentation handler.\\nType: ${type}\\nName: ${getFunctionName(handler)}\\nError:`,\n          e,\n        );\n    }\n  }\n}\n\nfunction instrumentCls(): StopListening {\n  return onCLS(\n    metric => {\n      triggerHandlers('cls', {\n        metric,\n      });\n      _previousCls = metric;\n    },\n    // We want the callback to be called whenever the CLS value updates.\n    // By default, the callback is only called when the tab goes to the background.\n    { reportAllChanges: true },\n  );\n}\n\nfunction instrumentLcp(): StopListening {\n  return onLCP(\n    metric => {\n      triggerHandlers('lcp', {\n        metric,\n      });\n      _previousLcp = metric;\n    },\n    // We want the callback to be called whenever the LCP value updates.\n    // By default, the callback is only called when the tab goes to the background.\n    { reportAllChanges: true },\n  );\n}\n\nfunction instrumentTtfb(): StopListening {\n  return onTTFB(metric => {\n    triggerHandlers('ttfb', {\n      metric,\n    });\n    _previousTtfb = metric;\n  });\n}\n\nfunction instrumentInp(): void {\n  return onINP(metric => {\n    triggerHandlers('inp', {\n      metric,\n    });\n    _previousInp = metric;\n  });\n}\n\nfunction addMetricObserver(\n  type: InstrumentHandlerTypeMetric,\n  callback: InstrumentHandlerCallback,\n  instrumentFn: () => StopListening,\n  previousValue: Metric | undefined,\n  stopOnCallback = false,\n): CleanupHandlerCallback {\n  addHandler(type, callback);\n\n  let stopListening: StopListening | undefined;\n\n  if (!instrumented[type]) {\n    stopListening = instrumentFn();\n    instrumented[type] = true;\n  }\n\n  if (previousValue) {\n    callback({ metric: previousValue });\n  }\n\n  return getCleanupCallback(type, callback, stopOnCallback ? stopListening : undefined);\n}\n\nfunction instrumentPerformanceObserver(type: InstrumentHandlerTypePerformanceObserver): void {\n  const options: PerformanceObserverInit = {};\n\n  // Special per-type options we want to use\n  if (type === 'event') {\n    options.durationThreshold = 0;\n  }\n\n  observe(\n    type,\n    entries => {\n      triggerHandlers(type, { entries });\n    },\n    options,\n  );\n}\n\nfunction addHandler(type: InstrumentHandlerType, handler: InstrumentHandlerCallback): void {\n  handlers[type] = handlers[type] || [];\n  handlers[type].push(handler);\n}\n\n// Get a callback which can be called to remove the instrumentation handler\nfunction getCleanupCallback(\n  type: InstrumentHandlerType,\n  callback: InstrumentHandlerCallback,\n  stopListening: StopListening,\n): CleanupHandlerCallback {\n  return () => {\n    if (stopListening) {\n      stopListening();\n    }\n\n    const typeHandlers = handlers[type];\n\n    if (!typeHandlers) {\n      return;\n    }\n\n    const index = typeHandlers.indexOf(callback);\n    if (index !== -1) {\n      typeHandlers.splice(index, 1);\n    }\n  };\n}\n\n/**\n * Check if a PerformanceEntry is a PerformanceEventTiming by checking for the `duration` property.\n */\nexport function isPerformanceEventTiming(entry: PerformanceEntry): entry is PerformanceEventTiming {\n  return 'duration' in entry;\n}\n","import type { Client, SpanAttributes } from '@sentry/core';\nimport {\n  browserPerformanceTimeOrigin,\n  debug,\n  getCurrentScope,\n  SEMANTIC_ATTRIBUTE_EXCLUSIVE_TIME,\n  SEMANTIC_ATTRIBUTE_SENTRY_MEASUREMENT_UNIT,\n  SEMANTIC_ATTRIBUTE_SENTRY_MEASUREMENT_VALUE,\n  SEMANTIC_ATTRIBUTE_SENTRY_OP,\n  SEMANTIC_ATTRIBUTE_SENTRY_ORIGIN,\n} from '@sentry/core';\nimport { DEBUG_BUILD } from '../debug-build';\nimport { htmlTreeAsString } from '../htmlTreeAsString';\nimport { addLcpInstrumentationHandler } from './instrument';\nimport type { WebVitalReportEvent } from './utils';\nimport { listenForWebVitalReportEvents, msToSec, startStandaloneWebVitalSpan, supportsWebVital } from './utils';\n\n/**\n * 60 seconds is the maximum for a plausible LCP value.\n */\nexport const MAX_PLAUSIBLE_LCP_DURATION = 60_000;\n\nexport function isValidLcpMetric(lcpValue: number | undefined): lcpValue is number {\n  return lcpValue != null && lcpValue > 0 && lcpValue <= MAX_PLAUSIBLE_LCP_DURATION;\n}\n\n/**\n * Starts tracking the Largest Contentful Paint on the current page and collects the value once\n *\n * - the page visibility is hidden\n * - a navigation span is started (to stop LCP measurement for SPA soft navigations)\n *\n * Once either of these events triggers, the LCP value is sent as a standalone span and we stop\n * measuring LCP for subsequent routes.\n */\nexport function trackLcpAsStandaloneSpan(client: Client): void {\n  let standaloneLcpValue = 0;\n  let standaloneLcpEntry: LargestContentfulPaint | undefined;\n\n  if (!supportsWebVital('largest-contentful-paint')) {\n    return;\n  }\n\n  const cleanupLcpHandler = addLcpInstrumentationHandler(({ metric }) => {\n    const entry = metric.entries[metric.entries.length - 1] as LargestContentfulPaint | undefined;\n    if (!entry || !isValidLcpMetric(metric.value)) {\n      return;\n    }\n    standaloneLcpValue = metric.value;\n    standaloneLcpEntry = entry;\n  }, true);\n\n  listenForWebVitalReportEvents(client, (reportEvent, pageloadSpanId) => {\n    _sendStandaloneLcpSpan(standaloneLcpValue, standaloneLcpEntry, pageloadSpanId, reportEvent);\n    cleanupLcpHandler();\n  });\n}\n\n/**\n * Exported only for testing!\n */\nexport function _sendStandaloneLcpSpan(\n  lcpValue: number,\n  entry: LargestContentfulPaint | undefined,\n  pageloadSpanId: string,\n  reportEvent: WebVitalReportEvent,\n) {\n  if (!isValidLcpMetric(lcpValue)) {\n    return;\n  }\n\n  DEBUG_BUILD && debug.log(`Sending LCP span (${lcpValue})`);\n\n  const startTime = msToSec((browserPerformanceTimeOrigin() || 0) + (entry?.startTime || 0));\n  const routeName = getCurrentScope().getScopeData().transactionName;\n\n  const name = entry ? htmlTreeAsString(entry.element) : 'Largest contentful paint';\n\n  const attributes: SpanAttributes = {\n    [SEMANTIC_ATTRIBUTE_SENTRY_ORIGIN]: 'auto.http.browser.lcp',\n    [SEMANTIC_ATTRIBUTE_SENTRY_OP]: 'ui.webvital.lcp',\n    [SEMANTIC_ATTRIBUTE_EXCLUSIVE_TIME]: 0, // LCP is a point-in-time metric\n    // attach the pageload span id to the LCP span so that we can link them in the UI\n    'sentry.pageload.span_id': pageloadSpanId,\n    // describes what triggered the web vital to be reported\n    'sentry.report_event': reportEvent,\n  };\n\n  if (entry) {\n    entry.element && (attributes['lcp.element'] = htmlTreeAsString(entry.element));\n    entry.id && (attributes['lcp.id'] = entry.id);\n\n    entry.url && (attributes['lcp.url'] = entry.url);\n\n    // loadTime is the time of LCP that's related to receiving the LCP element response..\n    entry.loadTime != null && (attributes['lcp.loadTime'] = entry.loadTime);\n\n    // renderTime is loadTime + rendering time\n    // it's 0 if the LCP element is loaded from a 3rd party origin that doesn't send the\n    // `Timing-Allow-Origin` header.\n    entry.renderTime != null && (attributes['lcp.renderTime'] = entry.renderTime);\n\n    entry.size != null && (attributes['lcp.size'] = entry.size);\n  }\n\n  const span = startStandaloneWebVitalSpan({\n    name,\n    transaction: routeName,\n    attributes,\n    startTime,\n  });\n\n  if (span) {\n    span.addEvent('lcp', {\n      [SEMANTIC_ATTRIBUTE_SENTRY_MEASUREMENT_UNIT]: 'millisecond',\n      [SEMANTIC_ATTRIBUTE_SENTRY_MEASUREMENT_VALUE]: lcpValue,\n    });\n\n    // LCP is a point-in-time metric, so we end the span immediately\n    span.end(startTime);\n  }\n}\n","import type { SpanAttributes } from '@sentry/core';\nimport { browserPerformanceTimeOrigin } from '@sentry/core';\nimport { extractNetworkProtocol, getBrowserPerformanceAPI } from './utils';\n\nfunction getAbsoluteTime(time: number | undefined): number | undefined {\n  // falsy values should be preserved so that we can later on drop undefined values and\n  // preserve 0 vals for cross-origin resources without proper `Timing-Allow-Origin` header.\n  return time ? ((browserPerformanceTimeOrigin() || performance.timeOrigin) + time) / 1000 : time;\n}\n\n/**\n * Converts a PerformanceResourceTiming entry to span data for the resource span. Most importantly,\n * it converts the timing values from timestamps relative to the `performance.timeOrigin` to absolute timestamps\n * in seconds.\n *\n * @see https://developer.mozilla.org/en-US/docs/Web/API/PerformanceResourceTiming#timestamps\n *\n * @param resourceTiming\n * @returns An array where the first element is the attribute name and the second element is the attribute value.\n */\nexport function resourceTimingToSpanAttributes(resourceTiming: PerformanceResourceTiming): SpanAttributes {\n  const timingSpanData: SpanAttributes = {};\n  // Checking for only `undefined` and `null` is intentional because it's\n  // valid for `nextHopProtocol` to be an empty string.\n  if (resourceTiming.nextHopProtocol != undefined) {\n    const { name, version } = extractNetworkProtocol(resourceTiming.nextHopProtocol);\n    timingSpanData['network.protocol.version'] = version;\n    timingSpanData['network.protocol.name'] = name;\n  }\n\n  if (!(browserPerformanceTimeOrigin() || getBrowserPerformanceAPI()?.timeOrigin)) {\n    return timingSpanData;\n  }\n\n  return dropUndefinedKeysFromObject({\n    ...timingSpanData,\n\n    'http.request.redirect_start': getAbsoluteTime(resourceTiming.redirectStart),\n    'http.request.redirect_end': getAbsoluteTime(resourceTiming.redirectEnd),\n\n    'http.request.worker_start': getAbsoluteTime(resourceTiming.workerStart),\n\n    'http.request.fetch_start': getAbsoluteTime(resourceTiming.fetchStart),\n\n    'http.request.domain_lookup_start': getAbsoluteTime(resourceTiming.domainLookupStart),\n    'http.request.domain_lookup_end': getAbsoluteTime(resourceTiming.domainLookupEnd),\n\n    'http.request.connect_start': getAbsoluteTime(resourceTiming.connectStart),\n    'http.request.secure_connection_start': getAbsoluteTime(resourceTiming.secureConnectionStart),\n    'http.request.connection_end': getAbsoluteTime(resourceTiming.connectEnd),\n\n    'http.request.request_start': getAbsoluteTime(resourceTiming.requestStart),\n\n    'http.request.response_start': getAbsoluteTime(resourceTiming.responseStart),\n    'http.request.response_end': getAbsoluteTime(resourceTiming.responseEnd),\n\n    // For TTFB we actually want the relative time from timeOrigin to responseStart\n    // This way, TTFB always measures the \"first page load\" experience.\n    // see: https://web.dev/articles/ttfb#measure-resource-requests\n    'http.request.time_to_first_byte':\n      resourceTiming.responseStart != null ? resourceTiming.responseStart / 1000 : undefined,\n  });\n}\n\n/**\n * Remove properties with `undefined` as value from an object.\n * In contrast to `dropUndefinedKeys` in core this funciton only works on first-level\n * key-value objects and does not recursively go into object properties or arrays.\n */\nfunction dropUndefinedKeysFromObject<T extends object>(attrs: T): Partial<T> {\n  return Object.fromEntries(Object.entries(attrs).filter(([, value]) => value != null)) as Partial<T>;\n}\n","import type {\n  Client,\n  Integration,\n  SentrySpan,\n  Span,\n  SpanAttributes,\n  SpanTimeInput,\n  StartSpanOptions,\n} from '@sentry/core';\nimport { getClient, getCurrentScope, spanToJSON, startInactiveSpan, withActiveSpan } from '@sentry/core';\nimport { WINDOW } from '../types';\nimport { onHidden } from './web-vitals/lib/onHidden';\n\nexport type WebVitalReportEvent = 'pagehide' | 'navigation';\n\n/**\n * Checks if a given value is a valid measurement value.\n */\nexport function isMeasurementValue(value: unknown): value is number {\n  return typeof value === 'number' && isFinite(value);\n}\n\n/**\n * Helper function to start child on transactions. This function will make sure that the transaction will\n * use the start timestamp of the created child span if it is earlier than the transactions actual\n * start timestamp.\n */\nexport function startAndEndSpan(\n  parentSpan: Span,\n  startTimeInSeconds: number,\n  endTime: SpanTimeInput,\n  { ...ctx }: StartSpanOptions,\n): Span | undefined {\n  const parentStartTime = spanToJSON(parentSpan).start_timestamp;\n  if (parentStartTime && parentStartTime > startTimeInSeconds) {\n    // We can only do this for SentrySpans...\n    if (typeof (parentSpan as Partial<SentrySpan>).updateStartTime === 'function') {\n      (parentSpan as SentrySpan).updateStartTime(startTimeInSeconds);\n    }\n  }\n\n  // The return value only exists for tests\n  return withActiveSpan(parentSpan, () => {\n    const span = startInactiveSpan({\n      startTime: startTimeInSeconds,\n      ...ctx,\n    });\n\n    if (span) {\n      span.end(endTime);\n    }\n\n    return span;\n  });\n}\n\ninterface StandaloneWebVitalSpanOptions {\n  name: string;\n  transaction?: string;\n  attributes: SpanAttributes;\n  startTime: number;\n}\n\n/**\n * Starts an inactive, standalone span used to send web vital values to Sentry.\n * DO NOT use this for arbitrary spans, as these spans require special handling\n * during ingestion to extract metrics.\n *\n * This function adds a bunch of attributes and data to the span that's shared\n * by all web vital standalone spans. However, you need to take care of adding\n * the actual web vital value as an event to the span. Also, you need to assign\n * a transaction name and some other values that are specific to the web vital.\n *\n * Ultimately, you also need to take care of ending the span to send it off.\n *\n * @param options\n *\n * @returns an inactive, standalone and NOT YET ended span\n */\nexport function startStandaloneWebVitalSpan(options: StandaloneWebVitalSpanOptions): Span | undefined {\n  const client = getClient();\n  if (!client) {\n    return;\n  }\n\n  const { name, transaction, attributes: passedAttributes, startTime } = options;\n\n  const { release, environment } = client.getOptions();\n  const { userInfo } = client.getDataCollectionOptions();\n  // We need to get the replay, user, and activeTransaction from the current scope\n  // so that we can associate replay id, profile id, and a user display to the span\n  const replay = client.getIntegrationByName<Integration & { getReplayId: () => string }>('Replay');\n  const replayId = replay?.getReplayId();\n\n  const scope = getCurrentScope();\n\n  const user = scope.getUser();\n  const userDisplay = user !== undefined ? user.email || user.id || user.ip_address : undefined;\n\n  let profileId: string | undefined;\n  try {\n    // @ts-expect-error skip optional chaining to save bundle size with try catch\n    profileId = scope.getScopeData().contexts.profile.profile_id;\n  } catch {\n    // do nothing\n  }\n\n  const attributes: SpanAttributes = {\n    release,\n    environment,\n\n    user: userDisplay || undefined,\n    profile_id: profileId || undefined,\n    replay_id: replayId || undefined,\n\n    transaction,\n\n    // Web vital score calculation relies on the user agent to account for different\n    // browsers setting different thresholds for what is considered a good/meh/bad value.\n    // For example: Chrome vs. Chrome Mobile\n    'user_agent.original': WINDOW.navigator?.userAgent,\n\n    // This tells Sentry to infer the IP address from the request\n    'client.address': userInfo ? '{{auto}}' : undefined,\n\n    ...passedAttributes,\n  };\n\n  return startInactiveSpan({\n    name,\n    attributes,\n    startTime,\n    experimental: {\n      standalone: true,\n    },\n  });\n}\n\n/** Get the browser performance API. */\nexport function getBrowserPerformanceAPI(): Performance | undefined {\n  // @ts-expect-error we want to make sure all of these are available, even if TS is sure they are\n  return WINDOW.addEventListener && WINDOW.performance;\n}\n\n/**\n * Converts from milliseconds to seconds\n * @param time time in ms\n */\nexport function msToSec(time: number): number {\n  return time / 1000;\n}\n\n/**\n * Converts ALPN protocol ids to name and version.\n *\n * (https://www.iana.org/assignments/tls-extensiontype-values/tls-extensiontype-values.xhtml#alpn-protocol-ids)\n * @param nextHopProtocol PerformanceResourceTiming.nextHopProtocol\n */\nexport function extractNetworkProtocol(nextHopProtocol: string): { name: string; version: string } {\n  let name = 'unknown';\n  let version = 'unknown';\n  let _name = '';\n  for (const char of nextHopProtocol) {\n    // http/1.1 etc.\n    if (char === '/') {\n      [name, version] = nextHopProtocol.split('/') as [string, string];\n      break;\n    }\n    // h2, h3 etc.\n    if (!isNaN(Number(char))) {\n      name = _name === 'h' ? 'http' : _name;\n      version = nextHopProtocol.split(_name)[1] as string;\n      break;\n    }\n    _name += char;\n  }\n  if (_name === nextHopProtocol) {\n    // webrtc, ftp, etc.\n    name = _name;\n  }\n  return { name, version };\n}\n\n/**\n * Generic support check for web vitals\n */\nexport function supportsWebVital(entryType: 'layout-shift' | 'largest-contentful-paint'): boolean {\n  try {\n    return PerformanceObserver.supportedEntryTypes.includes(entryType);\n  } catch {\n    return false;\n  }\n}\n\n/**\n * Listens for events on which we want to collect a previously accumulated web vital value.\n * Currently, this includes:\n *\n * - pagehide (i.e. user minimizes browser window, hides tab, etc)\n * - soft navigation (we only care about the vital of the initially loaded route)\n *\n * As a \"side-effect\", this function will also collect the span id of the pageload span.\n *\n * @param collectorCallback the callback to be called when the first of these events is triggered. Parameters:\n * - event: the event that triggered the reporting of the web vital value.\n * - pageloadSpanId: the span id of the pageload span. This is used to link the web vital span to the pageload span.\n * - pageloadSpan: the pageload span instance. This is used for full access to the pageload span for span streaming.\n */\nexport function listenForWebVitalReportEvents(\n  client: Client,\n  collectorCallback: (event: WebVitalReportEvent, pageloadSpanId: string, pageloadSpan?: Span) => void,\n) {\n  let pageloadSpan: Span | undefined;\n\n  let collected = false;\n  function _runCollectorCallbackOnce(event: WebVitalReportEvent) {\n    if (!collected && pageloadSpan) {\n      collectorCallback(event, pageloadSpan.spanContext().spanId, pageloadSpan);\n    }\n    collected = true;\n  }\n\n  // eslint-disable-next-line typescript/no-deprecated\n  onHidden(() => {\n    _runCollectorCallbackOnce('pagehide');\n  });\n\n  const unsubscribeStartNavigation = client.on('beforeStartNavigationSpan', (_, options) => {\n    // we only want to collect LCP if we actually navigate. Redirects should be ignored.\n    if (!options?.isRedirect) {\n      _runCollectorCallbackOnce('navigation');\n      unsubscribeStartNavigation();\n      unsubscribeAfterStartPageLoadSpan();\n    }\n  });\n\n  const unsubscribeAfterStartPageLoadSpan = client.on('afterStartPageLoadSpan', span => {\n    pageloadSpan = span;\n    unsubscribeAfterStartPageLoadSpan();\n  });\n}\n","/*\n * Copyright 2020 Google LLC\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n *     https://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\nimport { WINDOW } from '../../types';\nimport { bindReporter } from './lib/bindReporter';\nimport { getVisibilityWatcher } from './lib/getVisibilityWatcher';\nimport { initMetric } from './lib/initMetric';\nimport { initUnique } from './lib/initUnique';\nimport { LayoutShiftManager } from './lib/LayoutShiftManager';\nimport { observe } from './lib/observe';\nimport { runOnce } from './lib/runOnce';\nimport { onFCP } from './onFCP';\nimport type { CLSMetric, MetricRatingThresholds, ReportOpts } from './types';\n\n/** Thresholds for CLS. See https://web.dev/articles/cls#what_is_a_good_cls_score */\nexport const CLSThresholds: MetricRatingThresholds = [0.1, 0.25];\n\n/**\n * Calculates the [CLS](https://web.dev/articles/cls) value for the current page and\n * calls the `callback` function once the value is ready to be reported, along\n * with all `layout-shift` performance entries that were used in the metric\n * value calculation. The reported value is a `double` (corresponding to a\n * [layout shift score](https://web.dev/articles/cls#layout_shift_score)).\n *\n * If the `reportAllChanges` configuration option is set to `true`, the\n * `callback` function will be called as soon as the value is initially\n * determined as well as any time the value changes throughout the page\n * lifespan.\n *\n * _**Important:** CLS should be continually monitored for changes throughout\n * the entire lifespan of a page—including if the user returns to the page after\n * it's been hidden/backgrounded. However, since browsers often [will not fire\n * additional callbacks once the user has backgrounded a\n * page](https://developer.chrome.com/blog/page-lifecycle-api/#advice-hidden),\n * `callback` is always called when the page's visibility state changes to\n * hidden. As a result, the `callback` function might be called multiple times\n * during the same page load._\n */\nexport const onCLS = (onReport: (metric: CLSMetric) => void, opts: ReportOpts = {}) => {\n  // Start monitoring FCP so we can only report CLS if FCP is also reported.\n  // Note: this is done to match the current behavior of CrUX.\n  onFCP(\n    runOnce(() => {\n      const metric = initMetric('CLS', 0);\n      let report: ReturnType<typeof bindReporter>;\n      const visibilityWatcher = getVisibilityWatcher();\n\n      const layoutShiftManager = initUnique(opts, LayoutShiftManager);\n\n      const handleEntries = (entries: LayoutShift[]) => {\n        for (const entry of entries) {\n          layoutShiftManager._processEntry(entry);\n        }\n\n        // If the current session value is larger than the current CLS value,\n        // update CLS and the entries contributing to it.\n        if (layoutShiftManager._sessionValue > metric.value) {\n          metric.value = layoutShiftManager._sessionValue;\n          metric.entries = layoutShiftManager._sessionEntries;\n          report();\n        }\n      };\n\n      const po = observe('layout-shift', handleEntries);\n      if (po) {\n        report = bindReporter(onReport, metric, CLSThresholds, opts.reportAllChanges);\n\n        visibilityWatcher.onHidden(() => {\n          handleEntries(po.takeRecords() as CLSMetric['entries']);\n          report(true);\n        });\n\n        // Queue a task to report (if nothing else triggers a report first).\n        // This allows CLS to be reported as soon as FCP fires when\n        // `reportAllChanges` is true.\n        WINDOW?.setTimeout?.(report);\n      }\n    }),\n  );\n};\n","/*\n * Copyright 2022 Google LLC\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n *     https://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\nimport { bindReporter } from './lib/bindReporter';\nimport { getVisibilityWatcher } from './lib/getVisibilityWatcher';\nimport { initMetric } from './lib/initMetric';\nimport { initUnique } from './lib/initUnique';\nimport { InteractionManager } from './lib/InteractionManager';\nimport { observe } from './lib/observe';\nimport { initInteractionCountPolyfill } from './lib/polyfills/interactionCountPolyfill';\nimport { whenActivated } from './lib/whenActivated';\nimport { whenIdleOrHidden } from './lib/whenIdleOrHidden';\nimport type { INPMetric, INPReportOpts, MetricRatingThresholds } from './types';\n\n/** Thresholds for INP. See https://web.dev/articles/inp#what_is_a_good_inp_score */\nexport const INPThresholds: MetricRatingThresholds = [200, 500];\n\n// The default `durationThreshold` used across this library for observing\n// `event` entries via PerformanceObserver.\nconst DEFAULT_DURATION_THRESHOLD = 40;\n\n/**\n * Calculates the [INP](https://web.dev/articles/inp) value for the current\n * page and calls the `callback` function once the value is ready, along with\n * the `event` performance entries reported for that interaction. The reported\n * value is a `DOMHighResTimeStamp`.\n *\n * A custom `durationThreshold` configuration option can optionally be passed\n * to control what `event-timing` entries are considered for INP reporting. The\n * default threshold is `40`, which means INP scores of less than 40 will not\n * be reported. To avoid reporting no interactions in these cases, the library\n * will fall back to the input delay of the first interaction. Note that this\n * will not affect your 75th percentile INP value unless that value is also\n * less than 40 (well below the recommended\n * [good](https://web.dev/articles/inp#what_is_a_good_inp_score) threshold).\n *\n * If the `reportAllChanges` configuration option is set to `true`, the\n * `callback` function will be called as soon as the value is initially\n * determined as well as any time the value changes throughout the page\n * lifespan.\n *\n * _**Important:** INP should be continually monitored for changes throughout\n * the entire lifespan of a page—including if the user returns to the page after\n * it's been hidden/backgrounded. However, since browsers often [will not fire\n * additional callbacks once the user has backgrounded a\n * page](https://developer.chrome.com/blog/page-lifecycle-api/#advice-hidden),\n * `callback` is always called when the page's visibility state changes to\n * hidden. As a result, the `callback` function might be called multiple times\n * during the same page load._\n */\nexport const onINP = (onReport: (metric: INPMetric) => void, opts: INPReportOpts = {}) => {\n  // Return if the browser doesn't support all APIs needed to measure INP.\n  if (!(globalThis.PerformanceEventTiming && 'interactionId' in PerformanceEventTiming.prototype)) {\n    return;\n  }\n\n  const visibilityWatcher = getVisibilityWatcher();\n\n  whenActivated(() => {\n    // TODO(philipwalton): remove once the polyfill is no longer needed.\n    initInteractionCountPolyfill();\n\n    const metric = initMetric('INP');\n    // eslint-disable-next-line prefer-const\n    let report: ReturnType<typeof bindReporter>;\n\n    const interactionManager = initUnique(opts, InteractionManager);\n\n    const handleEntries = (entries: INPMetric['entries']) => {\n      // Queue the `handleEntries()` callback in the next idle task.\n      // This is needed to increase the chances that all event entries that\n      // occurred between the user interaction and the next paint\n      // have been dispatched. Note: there is currently an experiment\n      // running in Chrome (EventTimingKeypressAndCompositionInteractionId)\n      // 123+ that if rolled out fully may make this no longer necessary.\n      whenIdleOrHidden(() => {\n        for (const entry of entries) {\n          interactionManager._processEntry(entry);\n        }\n\n        const inp = interactionManager._estimateP98LongestInteraction();\n\n        if (inp && inp._latency !== metric.value) {\n          metric.value = inp._latency;\n          metric.entries = inp.entries;\n          report();\n        }\n      });\n    };\n\n    const po = observe('event', handleEntries, {\n      // Event Timing entries have their durations rounded to the nearest 8ms,\n      // so a duration of 40ms would be any event that spans 2.5 or more frames\n      // at 60Hz. This threshold is chosen to strike a balance between usefulness\n      // and performance. Running this callback for any interaction that spans\n      // just one or two frames is likely not worth the insight that could be\n      // gained.\n      durationThreshold: opts.durationThreshold ?? DEFAULT_DURATION_THRESHOLD,\n    });\n\n    report = bindReporter(onReport, metric, INPThresholds, opts.reportAllChanges);\n\n    if (po) {\n      // Also observe entries of type `first-input`. This is useful in cases\n      // where the first interaction is less than the `durationThreshold`.\n      po.observe({ type: 'first-input', buffered: true });\n\n      visibilityWatcher.onHidden(() => {\n        handleEntries(po.takeRecords() as INPMetric['entries']);\n        report(true);\n      });\n    }\n  });\n};\n","/*\n * Copyright 2020 Google LLC\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n *     https://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\nimport { bindReporter } from './lib/bindReporter';\nimport { getActivationStart } from './lib/getActivationStart';\nimport { getVisibilityWatcher } from './lib/getVisibilityWatcher';\nimport { addPageListener, removePageListener } from './lib/globalListeners';\nimport { initMetric } from './lib/initMetric';\nimport { initUnique } from './lib/initUnique';\nimport { LCPEntryManager } from './lib/LCPEntryManager';\nimport { observe } from './lib/observe';\nimport { runOnce } from './lib/runOnce';\nimport { whenActivated } from './lib/whenActivated';\nimport { whenIdleOrHidden } from './lib/whenIdleOrHidden';\nimport type { LCPMetric, MetricRatingThresholds, ReportOpts } from './types';\n\n/** Thresholds for LCP. See https://web.dev/articles/lcp#what_is_a_good_lcp_score */\nexport const LCPThresholds: MetricRatingThresholds = [2500, 4000];\n\n/**\n * Calculates the [LCP](https://web.dev/articles/lcp) value for the current page and\n * calls the `callback` function once the value is ready (along with the\n * relevant `largest-contentful-paint` performance entry used to determine the\n * value). The reported value is a `DOMHighResTimeStamp`.\n *\n * If the `reportAllChanges` configuration option is set to `true`, the\n * `callback` function will be called any time a new `largest-contentful-paint`\n * performance entry is dispatched, or once the final value of the metric has\n * been determined.\n */\nexport const onLCP = (onReport: (metric: LCPMetric) => void, opts: ReportOpts = {}) => {\n  whenActivated(() => {\n    const visibilityWatcher = getVisibilityWatcher();\n    const metric = initMetric('LCP');\n    let report: ReturnType<typeof bindReporter>;\n\n    const lcpEntryManager = initUnique(opts, LCPEntryManager);\n\n    const handleEntries = (entries: LCPMetric['entries']) => {\n      // If reportAllChanges is set then call this function for each entry,\n      // otherwise only consider the last one.\n      if (!opts.reportAllChanges) {\n        // eslint-disable-next-line no-param-reassign\n        entries = entries.slice(-1);\n      }\n\n      for (const entry of entries) {\n        lcpEntryManager._processEntry(entry);\n\n        // Only report if the page wasn't hidden prior to LCP.\n        if (entry.startTime < visibilityWatcher.firstHiddenTime) {\n          // The startTime attribute returns the value of the renderTime if it is\n          // not 0, and the value of the loadTime otherwise. The activationStart\n          // reference is used because LCP should be relative to page activation\n          // rather than navigation start if the page was prerendered. But in cases\n          // where `activationStart` occurs after the LCP, this time should be\n          // clamped at 0.\n          metric.value = Math.max(entry.startTime - getActivationStart(), 0);\n          metric.entries = [entry];\n          report();\n        }\n      }\n    };\n\n    const po = observe('largest-contentful-paint', handleEntries);\n\n    if (po) {\n      report = bindReporter(onReport, metric, LCPThresholds, opts.reportAllChanges);\n\n      // Ensure this logic only runs once, since it can be triggered from\n      // any of three different event listeners below.\n      const stopListening = runOnce(() => {\n        handleEntries(po.takeRecords() as LCPMetric['entries']);\n        po.disconnect();\n        report(true);\n      });\n\n      // Need a separate wrapper to ensure the `runOnce` function above is\n      // common for all three functions\n      const stopListeningWrapper = (event: Event) => {\n        if (event.isTrusted) {\n          // Wrap the listener in an idle callback so it's run in a separate\n          // task to reduce potential INP impact.\n          // https://github.com/GoogleChrome/web-vitals/issues/383\n          whenIdleOrHidden(stopListening);\n          removePageListener(event.type, stopListeningWrapper, {\n            capture: true,\n          });\n        }\n      };\n\n      // Stop listening after input or visibilitychange.\n      // Note: while scrolling is an input that stops LCP observation, it's\n      // unreliable since it can be programmatically generated.\n      // See: https://github.com/GoogleChrome/web-vitals/issues/75\n      for (const type of ['keydown', 'click', 'visibilitychange']) {\n        addPageListener(type, stopListeningWrapper, {\n          capture: true,\n        });\n      }\n    }\n  });\n};\n","/*\n * Copyright 2024 Google LLC\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n *     https://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\nimport { getInteractionCount } from './polyfills/interactionCountPolyfill.js';\n\nexport interface Interaction {\n  _latency: number;\n  // While the `id` and `entries` properties are also internal and could be\n  // mangled by prefixing with an underscore, since they correspond to public\n  // symbols there is no need to mangle them as the library will compress\n  // better if we reuse the existing names.\n  id: number;\n  entries: PerformanceEventTiming[];\n}\n\n// To prevent unnecessary memory usage on pages with lots of interactions,\n// store at most 10 of the longest interactions to consider as INP candidates.\nconst MAX_INTERACTIONS_TO_CONSIDER = 10;\n\n// Used to store the interaction count after a bfcache restore, since p98\n// interaction latencies should only consider the current navigation.\nlet prevInteractionCount = 0;\n\n/**\n * Returns the interaction count since the last bfcache restore (or for the\n * full page lifecycle if there were no bfcache restores).\n */\nconst getInteractionCountForNavigation = () => {\n  return getInteractionCount() - prevInteractionCount;\n};\n\n/**\n *\n */\nexport class InteractionManager {\n  /**\n   * A list of longest interactions on the page (by latency) sorted so the\n   * longest one is first. The list is at most MAX_INTERACTIONS_TO_CONSIDER\n   * long.\n   */\n  // oxlint-disable-next-line sdk/no-class-field-initializers\n  _longestInteractionList: Interaction[] = [];\n\n  /**\n   * A mapping of longest interactions by their interaction ID.\n   * This is used for faster lookup.\n   */\n  // oxlint-disable-next-line sdk/no-class-field-initializers\n  _longestInteractionMap: Map<number, Interaction> = new Map();\n\n  // eslint-disable-next-line @typescript-eslint/explicit-member-accessibility\n  _onBeforeProcessingEntry?: (entry: PerformanceEventTiming) => void;\n\n  // eslint-disable-next-line @typescript-eslint/explicit-member-accessibility\n  _onAfterProcessingINPCandidate?: (interaction: Interaction) => void;\n\n  // eslint-disable-next-line @typescript-eslint/explicit-member-accessibility, jsdoc/require-jsdoc\n  _resetInteractions() {\n    prevInteractionCount = getInteractionCount();\n    this._longestInteractionList.length = 0;\n    this._longestInteractionMap.clear();\n  }\n\n  /**\n   * Returns the estimated p98 longest interaction based on the stored\n   * interaction candidates and the interaction count for the current page.\n   */\n  // eslint-disable-next-line @typescript-eslint/explicit-member-accessibility\n  _estimateP98LongestInteraction() {\n    const candidateInteractionIndex = Math.min(\n      this._longestInteractionList.length - 1,\n      Math.floor(getInteractionCountForNavigation() / 50),\n    );\n\n    return this._longestInteractionList[candidateInteractionIndex];\n  }\n\n  /**\n   * Takes a performance entry and adds it to the list of worst interactions\n   * if its duration is long enough to make it among the worst. If the\n   * entry is part of an existing interaction, it is merged and the latency\n   * and entries list is updated as needed.\n   */\n  // eslint-disable-next-line @typescript-eslint/explicit-member-accessibility\n  _processEntry(entry: PerformanceEventTiming) {\n    this._onBeforeProcessingEntry?.(entry);\n\n    // Skip further processing for entries that cannot be INP candidates.\n    if (!(entry.interactionId || entry.entryType === 'first-input')) return;\n\n    // The least-long of the 10 longest interactions.\n    const minLongestInteraction = this._longestInteractionList.at(-1);\n\n    let interaction = this._longestInteractionMap.get(entry.interactionId);\n\n    // Only process the entry if it's possibly one of the ten longest,\n    // or if it's part of an existing interaction.\n    if (\n      interaction ||\n      this._longestInteractionList.length < MAX_INTERACTIONS_TO_CONSIDER ||\n      // If the above conditions are false, `minLongestInteraction` will be set.\n      entry.duration > minLongestInteraction!._latency\n    ) {\n      // If the interaction already exists, update it. Otherwise create one.\n      if (interaction) {\n        // If the new entry has a longer duration, replace the old entries,\n        // otherwise add to the array.\n        if (entry.duration > interaction._latency) {\n          interaction.entries = [entry];\n          interaction._latency = entry.duration;\n        } else if (entry.duration === interaction._latency && entry.startTime === interaction.entries[0]!.startTime) {\n          interaction.entries.push(entry);\n        }\n      } else {\n        interaction = {\n          id: entry.interactionId,\n          entries: [entry],\n          _latency: entry.duration,\n        };\n        this._longestInteractionMap.set(interaction.id, interaction);\n        this._longestInteractionList.push(interaction);\n      }\n\n      // Sort the entries by latency (descending) and keep only the top ten.\n      this._longestInteractionList.sort((a, b) => b._latency - a._latency);\n      if (this._longestInteractionList.length > MAX_INTERACTIONS_TO_CONSIDER) {\n        const removedInteractions = this._longestInteractionList.splice(MAX_INTERACTIONS_TO_CONSIDER);\n\n        for (const interaction of removedInteractions) {\n          this._longestInteractionMap.delete(interaction.id);\n        }\n      }\n\n      // Call any post-processing on the interaction\n      this._onAfterProcessingINPCandidate?.(interaction);\n    }\n  }\n}\n","/*\n * Copyright 2024 Google LLC\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n *     https://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\n// eslint-disable-next-line jsdoc/require-jsdoc\nexport class LCPEntryManager {\n  // eslint-disable-next-line @typescript-eslint/explicit-member-accessibility\n  _onBeforeProcessingEntry?: (entry: LargestContentfulPaint) => void;\n\n  // eslint-disable-next-line @typescript-eslint/explicit-member-accessibility, jsdoc/require-jsdoc\n  _processEntry(entry: LargestContentfulPaint) {\n    this._onBeforeProcessingEntry?.(entry);\n  }\n}\n","/* eslint-disable jsdoc/require-jsdoc */\n/*\n * Copyright 2024 Google LLC\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n *     https://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\nexport class LayoutShiftManager {\n  // eslint-disable-next-line @typescript-eslint/explicit-member-accessibility\n  _onAfterProcessingUnexpectedShift?: (entry: LayoutShift) => void;\n\n  // oxlint-disable-next-line sdk/no-class-field-initializers\n  _sessionValue = 0;\n  // oxlint-disable-next-line sdk/no-class-field-initializers\n  _sessionEntries: LayoutShift[] = [];\n\n  // eslint-disable-next-line @typescript-eslint/explicit-member-accessibility\n  _processEntry(entry: LayoutShift) {\n    // Only count layout shifts without recent user input.\n    if (entry.hadRecentInput) return;\n\n    const firstSessionEntry = this._sessionEntries[0];\n    // This previously used `this._sessionEntries.at(-1)` but that is ES2022. We support ES2021 and earlier.\n    const lastSessionEntry = this._sessionEntries[this._sessionEntries.length - 1];\n\n    // If the entry occurred less than 1 second after the previous entry\n    // and less than 5 seconds after the first entry in the session,\n    // include the entry in the current session. Otherwise, start a new\n    // session.\n    if (\n      this._sessionValue &&\n      firstSessionEntry &&\n      lastSessionEntry &&\n      entry.startTime - lastSessionEntry.startTime < 1000 &&\n      entry.startTime - firstSessionEntry.startTime < 5000\n    ) {\n      this._sessionValue += entry.value;\n      this._sessionEntries.push(entry);\n    } else {\n      this._sessionValue = entry.value;\n      this._sessionEntries = [entry];\n    }\n\n    this._onAfterProcessingUnexpectedShift?.(entry);\n  }\n}\n","/*\n * Copyright 2020 Google LLC\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n *     https://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\nimport type { MetricRatingThresholds, MetricType } from '../types';\n\nconst getRating = (value: number, thresholds: MetricRatingThresholds): MetricType['rating'] => {\n  if (value > thresholds[1]) {\n    return 'poor';\n  }\n  if (value > thresholds[0]) {\n    return 'needs-improvement';\n  }\n  return 'good';\n};\n\nexport const bindReporter = <MetricName extends MetricType['name']>(\n  callback: (metric: Extract<MetricType, { name: MetricName }>) => void,\n  metric: Extract<MetricType, { name: MetricName }>,\n  thresholds: MetricRatingThresholds,\n  reportAllChanges?: boolean,\n) => {\n  let prevValue: number;\n  let delta: number;\n  return (forceReport?: boolean) => {\n    if (metric.value >= 0) {\n      if (forceReport || reportAllChanges) {\n        delta = metric.value - (prevValue ?? 0);\n\n        // Report the metric if there's a non-zero delta or if no previous\n        // value exists (which can happen in the case of the document becoming\n        // hidden when the metric value is 0).\n        // See: https://github.com/GoogleChrome/web-vitals/issues/14\n        if (delta || prevValue === undefined) {\n          prevValue = metric.value;\n          metric.delta = delta;\n          metric.rating = getRating(metric.value, thresholds);\n          callback(metric);\n        }\n      }\n    }\n  };\n};\n","/*\n * Copyright 2020 Google LLC\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n *     https://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\n/**\n * Performantly generate a unique, 30-char string by combining a version\n * number, the current timestamp with a 13-digit number integer.\n * @return {string}\n */\nexport const generateUniqueID = () => {\n  return `v5-${Date.now()}-${Math.floor(Math.random() * (9e12 - 1)) + 1e12}`;\n};\n","/*\n * Copyright 2022 Google LLC\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n *     https://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\nimport { getNavigationEntry } from './getNavigationEntry';\n\nexport const getActivationStart = (): number => {\n  const navEntry = getNavigationEntry();\n  return navEntry?.activationStart ?? 0;\n};\n","/*\n * Copyright 2022 Google LLC\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n *     https://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\nimport { WINDOW } from '../../../types';\n\n// sentry-specific change:\n// add optional param to not check for responseStart (see comment below)\nexport const getNavigationEntry = (checkResponseStart = true): PerformanceNavigationTiming | void => {\n  const navigationEntry = WINDOW.performance?.getEntriesByType?.('navigation')[0];\n  // Check to ensure the `responseStart` property is present and valid.\n  // In some cases a zero value is reported by the browser (for\n  // privacy/security reasons), and in other cases (bugs) the value is\n  // negative or is larger than the current page time. Ignore these cases:\n  // - https://github.com/GoogleChrome/web-vitals/issues/137\n  // - https://github.com/GoogleChrome/web-vitals/issues/162\n  // - https://github.com/GoogleChrome/web-vitals/issues/275\n  if (\n    // sentry-specific change:\n    // We don't want to check for responseStart for our own use of `getNavigationEntry`\n    !checkResponseStart ||\n    (navigationEntry && navigationEntry.responseStart > 0 && navigationEntry.responseStart < performance.now())\n  ) {\n    return navigationEntry;\n  }\n};\n","/*\n * Copyright 2020 Google LLC\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n *     https://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\nimport { WINDOW } from '../../../types';\nimport { getActivationStart } from './getActivationStart';\nimport { addPageListener, removePageListener } from './globalListeners';\n\nlet firstHiddenTime = -1;\nconst onHiddenFunctions: Set<() => void> = new Set();\n\nconst initHiddenTime = () => {\n  // If the document is hidden when this code runs, assume it was always\n  // hidden and the page was loaded in the background, with the one exception\n  // that visibility state is always 'hidden' during prerendering, so we have\n  // to ignore that case until prerendering finishes (see: `prerenderingchange`\n  // event logic below).\n  return WINDOW.document?.visibilityState === 'hidden' && !WINDOW.document?.prerendering ? 0 : Infinity;\n};\n\nconst onVisibilityUpdate = (event: Event) => {\n  // Handle changes to hidden state\n  if (isPageHidden(event) && firstHiddenTime > -1) {\n    // Sentry-specific change: Also call onHidden callbacks for pagehide events\n    // to support older browsers (Safari <14.4) that don't properly fire visibilitychange\n    if (event.type === 'visibilitychange' || event.type === 'pagehide') {\n      for (const onHiddenFunction of onHiddenFunctions) {\n        onHiddenFunction();\n      }\n    }\n\n    // If the document is 'hidden' and no previous hidden timestamp has been\n    // set (so is infinity), update it based on the current event data.\n    if (!isFinite(firstHiddenTime)) {\n      // If the event is a 'visibilitychange' event, it means the page was\n      // visible prior to this change, so the event timestamp is the first\n      // hidden time.\n      // However, if the event is not a 'visibilitychange' event, then it must\n      // be a 'prerenderingchange' or 'pagehide' event, and the fact that the document is\n      // still 'hidden' from the above check means the tab was activated\n      // in a background state and so has always been hidden.\n      firstHiddenTime = event.type === 'visibilitychange' ? event.timeStamp : 0;\n\n      // We no longer need the `prerenderingchange` event listener now we've\n      // set an initial init time so remove that\n      // (we'll keep the visibilitychange and pagehide ones for onHiddenFunction above)\n      removePageListener('prerenderingchange', onVisibilityUpdate, true);\n    }\n  }\n};\n\nexport const getVisibilityWatcher = () => {\n  if (WINDOW.document && firstHiddenTime < 0) {\n    // Check if we have a previous hidden `visibility-state` performance entry.\n    const activationStart = getActivationStart();\n    const firstVisibilityStateHiddenTime = !WINDOW.document.prerendering\n      ? globalThis.performance\n          .getEntriesByType('visibility-state')\n          .filter(e => e.name === 'hidden' && e.startTime > activationStart)[0]?.startTime\n      : undefined;\n\n    // Prefer that, but if it's not available and the document is hidden when\n    // this code runs, assume it was hidden since navigation start. This isn't\n    // a perfect heuristic, but it's the best we can do until the\n    // `visibility-state` performance entry becomes available in all browsers.\n    firstHiddenTime = firstVisibilityStateHiddenTime ?? initHiddenTime();\n    // Listen for visibility changes so we can handle things like bfcache\n    // restores and/or prerender without having to examine individual\n    // timestamps in detail and also for onHidden function calls.\n    addPageListener('visibilitychange', onVisibilityUpdate, true);\n\n    // Sentry-specific change: Some browsers have buggy implementations of visibilitychange,\n    // so we use pagehide in addition, just to be safe. This is also required for older\n    // Safari versions (<14.4) that we still support.\n    addPageListener('pagehide', onVisibilityUpdate, true);\n\n    // IMPORTANT: when a page is prerendering, its `visibilityState` is\n    // 'hidden', so in order to account for cases where this module checks for\n    // visibility during prerendering, an additional check after prerendering\n    // completes is also required.\n    addPageListener('prerenderingchange', onVisibilityUpdate, true);\n  }\n\n  return {\n    get firstHiddenTime() {\n      return firstHiddenTime;\n    },\n    onHidden(cb: () => void) {\n      onHiddenFunctions.add(cb);\n    },\n  };\n};\n\n/**\n * Check if the page is hidden, uses the `pagehide` event for older browsers support that we used to have in `onHidden` function.\n * Some browsers we still support (Safari <14.4) don't fully support `visibilitychange`\n * or have known bugs w.r.t the `visibilitychange` event.\n * // TODO (v11): If we decide to drop support for Safari 14.4, we can use the logic from web-vitals 4.2.4\n */\nfunction isPageHidden(event: Event) {\n  return event.type === 'pagehide' || WINDOW.document?.visibilityState === 'hidden';\n}\n","import { WINDOW } from '../../../types';\n\n/**\n * web-vitals 5.1.0 switched listeners to be added on the window rather than the document.\n * Instead of having to check for window/document every time we add a listener, we can use this function.\n */\nexport function addPageListener(type: string, listener: EventListener, options?: boolean | AddEventListenerOptions) {\n  if (WINDOW.document) {\n    WINDOW.addEventListener(type, listener, options);\n  }\n}\n/**\n * web-vitals 5.1.0 switched listeners to be removed from the window rather than the document.\n * Instead of having to check for window/document every time we remove a listener, we can use this function.\n */\nexport function removePageListener(type: string, listener: EventListener, options?: boolean | AddEventListenerOptions) {\n  if (WINDOW.document) {\n    WINDOW.removeEventListener(type, listener, options);\n  }\n}\n","/*\n * Copyright 2020 Google LLC\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n *     https://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\nimport { WINDOW } from '../../../types';\nimport type { MetricType } from '../types';\nimport { generateUniqueID } from './generateUniqueID';\nimport { getActivationStart } from './getActivationStart';\nimport { getNavigationEntry } from './getNavigationEntry';\n\nexport const initMetric = <MetricName extends MetricType['name']>(name: MetricName, value: number = -1) => {\n  const navEntry = getNavigationEntry();\n  let navigationType: MetricType['navigationType'] = 'navigate';\n\n  if (navEntry) {\n    if (WINDOW.document?.prerendering || getActivationStart() > 0) {\n      navigationType = 'prerender';\n    } else if (WINDOW.document?.wasDiscarded) {\n      navigationType = 'restore';\n    } else if (navEntry.type) {\n      navigationType = navEntry.type.replace(/_/g, '-') as MetricType['navigationType'];\n    }\n  }\n\n  // Use `entries` type specific for the metric.\n  const entries: Extract<MetricType, { name: MetricName }>['entries'] = [];\n\n  return {\n    name,\n    value,\n    rating: 'good' as const, // If needed, will be updated when reported. `const` to keep the type from widening to `string`.\n    delta: 0,\n    entries,\n    id: generateUniqueID(),\n    navigationType,\n  };\n};\n","/*\n * Copyright 2024 Google LLC\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n *     https://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\nconst instanceMap: WeakMap<object, unknown> = new WeakMap();\n\n/**\n * A function that accepts and identity object and a class object and returns\n * either a new instance of that class or an existing instance, if the\n * identity object was previously used.\n */\nexport function initUnique<T>(identityObj: object, ClassObj: new () => T): T {\n  try {\n    if (!instanceMap.get(identityObj)) {\n      instanceMap.set(identityObj, new ClassObj());\n    }\n    return instanceMap.get(identityObj)! as T;\n  } catch (_e) {\n    // --- START Sentry-custom code (try/catch wrapping) ---\n    // Fix for cases where identityObj is not a valid key for WeakMap (sometimes a problem in Safari)\n    // Just return a new instance without caching it in instanceMap\n    return new ClassObj();\n  }\n  // --- END Sentry-custom code ---\n}\n","/*\n * Copyright 2020 Google LLC\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n *     https://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\ninterface PerformanceEntryMap {\n  event: PerformanceEventTiming[];\n  'first-input': PerformanceEventTiming[];\n  'layout-shift': LayoutShift[];\n  'largest-contentful-paint': LargestContentfulPaint[];\n  'long-animation-frame': PerformanceLongAnimationFrameTiming[];\n  paint: PerformancePaintTiming[];\n  navigation: PerformanceNavigationTiming[];\n  resource: PerformanceResourceTiming[];\n  // Sentry-specific change:\n  // We add longtask as a supported entry type as we use this in\n  // our `instrumentPerformanceObserver` function also observes 'longtask'\n  // entries.\n  longtask: PerformanceEntry[];\n  // Sentry-specific change:\n  // We add element as a supported entry type for ElementTiming API\n  element: PerformanceEntry[];\n}\n\n/**\n * Takes a performance entry type and a callback function, and creates a\n * `PerformanceObserver` instance that will observe the specified entry type\n * with buffering enabled and call the callback _for each entry_.\n *\n * This function also feature-detects entry support and wraps the logic in a\n * try/catch to avoid errors in unsupporting browsers.\n */\nexport const observe = <K extends keyof PerformanceEntryMap>(\n  type: K,\n  callback: (entries: PerformanceEntryMap[K]) => void,\n  opts: PerformanceObserverInit = {},\n): PerformanceObserver | undefined => {\n  try {\n    if (PerformanceObserver.supportedEntryTypes.includes(type)) {\n      const po = new PerformanceObserver(list => {\n        // Delay by a microtask to workaround a bug in Safari where the\n        // callback is invoked immediately, rather than in a separate task.\n        // See: https://github.com/GoogleChrome/web-vitals/issues/277\n        // eslint-disable-next-line @typescript-eslint/no-floating-promises\n        Promise.resolve().then(() => {\n          callback(list.getEntries() as PerformanceEntryMap[K]);\n        });\n      });\n      po.observe({ type, buffered: true, ...opts });\n      return po;\n    }\n  } catch {\n    // Do nothing.\n  }\n  return;\n};\n","/*\n * Copyright 2020 Google LLC\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n *     https://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\nimport { WINDOW } from '../../../types';\nimport { addPageListener } from './globalListeners';\n\nexport interface OnHiddenCallback {\n  (event: Event): void;\n}\n\n/**\n * Sentry-specific change:\n *\n * This function's logic was NOT updated to web-vitals 4.2.4 or 5.x but we continue\n * to use the web-vitals 3.5.2 version due to having stricter browser support.\n *\n * PR with context that made the changes:\n * https://github.com/GoogleChrome/web-vitals/pull/442/files#r1530492402\n *\n * The PR removed listening to the `pagehide` event, in favour of only listening to\n * the `visibilitychange` event. This is \"more correct\" but some browsers we still\n * support (Safari <14.4) don't fully support `visibilitychange` or have known bugs\n * with respect to the `visibilitychange` event.\n *\n * TODO (v11): If we decide to drop support for Safari 14.4, we can use the logic\n * from web-vitals 4.2.4. In this case, we also need to update the integration tests\n * that currently trigger the `pagehide` event to simulate the page being hidden.\n *\n * @param {OnHiddenCallback} cb - Callback to be executed when the page is hidden or unloaded.\n *\n * @deprecated use `whenIdleOrHidden` or `addPageListener('visibilitychange')` instead\n */\nexport const onHidden = (cb: OnHiddenCallback) => {\n  const onHiddenOrPageHide = (event: Event) => {\n    if (event.type === 'pagehide' || WINDOW.document?.visibilityState === 'hidden') {\n      cb(event);\n    }\n  };\n\n  addPageListener('visibilitychange', onHiddenOrPageHide, { capture: true, once: true });\n  // Some browsers have buggy implementations of visibilitychange,\n  // so we use pagehide in addition, just to be safe.\n  addPageListener('pagehide', onHiddenOrPageHide, { capture: true, once: true });\n};\n","/*\n * Copyright 2022 Google LLC\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n *     https://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\nimport { observe } from '../observe';\n\ndeclare global {\n  interface Performance {\n    interactionCount: number;\n  }\n}\n\nlet interactionCountEstimate = 0;\nlet minKnownInteractionId = Infinity;\nlet maxKnownInteractionId = 0;\n\nconst updateEstimate = (entries: PerformanceEventTiming[]) => {\n  entries.forEach(e => {\n    if (e.interactionId) {\n      minKnownInteractionId = Math.min(minKnownInteractionId, e.interactionId);\n      maxKnownInteractionId = Math.max(maxKnownInteractionId, e.interactionId);\n\n      interactionCountEstimate = maxKnownInteractionId ? (maxKnownInteractionId - minKnownInteractionId) / 7 + 1 : 0;\n    }\n  });\n};\n\nlet po: PerformanceObserver | undefined;\n\n/**\n * Returns the `interactionCount` value using the native API (if available)\n * or the polyfill estimate in this module.\n */\nexport const getInteractionCount = (): number => {\n  return po ? interactionCountEstimate : performance.interactionCount || 0;\n};\n\n/**\n * Feature detects native support or initializes the polyfill if needed.\n */\nexport const initInteractionCountPolyfill = (): void => {\n  if ('interactionCount' in performance || po) return;\n\n  po = observe('event', updateEstimate, {\n    type: 'event',\n    buffered: true,\n    durationThreshold: 0,\n  } as PerformanceObserverInit);\n};\n","/*\n * Copyright 2022 Google LLC\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n *     https://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\nexport const runOnce = (cb: () => void) => {\n  let called = false;\n  return () => {\n    if (!called) {\n      cb();\n      called = true;\n    }\n  };\n};\n","/*\n * Copyright 2022 Google LLC\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n *     https://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\nimport { WINDOW } from '../../../types';\n\nexport const whenActivated = (callback: () => void) => {\n  if (WINDOW.document?.prerendering) {\n    addEventListener('prerenderingchange', () => callback(), true);\n  } else {\n    callback();\n  }\n};\n","/*\n * Copyright 2024 Google LLC\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n *     https://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\nimport { WINDOW } from '../../../types.js';\nimport { addPageListener, removePageListener } from './globalListeners.js';\nimport { runOnce } from './runOnce.js';\n\n/**\n * Runs the passed callback during the next idle period, or immediately\n * if the browser's visibility state is (or becomes) hidden.\n */\nexport const whenIdleOrHidden = (cb: () => void) => {\n  const rIC = WINDOW.requestIdleCallback || WINDOW.setTimeout;\n\n  // If the document is hidden, run the callback immediately, otherwise\n  // race an idle callback with the next `visibilitychange` event.\n  if (WINDOW.document?.visibilityState === 'hidden') {\n    cb();\n  } else {\n    // eslint-disable-next-line no-param-reassign\n    cb = runOnce(cb);\n    addPageListener('visibilitychange', cb, { once: true, capture: true });\n    // sentry: we use pagehide instead of directly listening to visibilitychange\n    // because some browsers we still support (Safari <14.4) don't fully support\n    // `visibilitychange` or have known bugs w.r.t the `visibilitychange` event.\n    // TODO(v11): remove this once we drop support for Safari <14.4\n    addPageListener('pagehide', cb, { once: true, capture: true });\n    rIC(() => {\n      cb();\n      // Remove the above event listener since no longer required.\n      // See: https://github.com/GoogleChrome/web-vitals/issues/622\n      removePageListener('visibilitychange', cb, { capture: true });\n      // TODO(v11): remove this once we drop support for Safari <14.4\n      removePageListener('pagehide', cb, { capture: true });\n    });\n  }\n};\n","/*\n * Copyright 2020 Google LLC\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n *     https://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\nimport { bindReporter } from './lib/bindReporter';\nimport { getActivationStart } from './lib/getActivationStart';\nimport { getVisibilityWatcher } from './lib/getVisibilityWatcher';\nimport { initMetric } from './lib/initMetric';\nimport { observe } from './lib/observe';\nimport { whenActivated } from './lib/whenActivated';\nimport type { FCPMetric, MetricRatingThresholds, ReportOpts } from './types';\n\n/** Thresholds for FCP. See https://web.dev/articles/fcp#what_is_a_good_fcp_score */\nexport const FCPThresholds: MetricRatingThresholds = [1800, 3000];\n\n/**\n * Calculates the [FCP](https://web.dev/articles/fcp) value for the current page and\n * calls the `callback` function once the value is ready, along with the\n * relevant `paint` performance entry used to determine the value. The reported\n * value is a `DOMHighResTimeStamp`.\n */\nexport const onFCP = (onReport: (metric: FCPMetric) => void, opts: ReportOpts = {}) => {\n  whenActivated(() => {\n    const visibilityWatcher = getVisibilityWatcher();\n    const metric = initMetric('FCP');\n    let report: ReturnType<typeof bindReporter>;\n\n    const handleEntries = (entries: FCPMetric['entries']) => {\n      for (const entry of entries) {\n        if (entry.name === 'first-contentful-paint') {\n          po!.disconnect();\n\n          // Only report if the page wasn't hidden prior to the first paint.\n          if (entry.startTime < visibilityWatcher.firstHiddenTime) {\n            // The activationStart reference is used because FCP should be\n            // relative to page activation rather than navigation start if the\n            // page was prerendered. But in cases where `activationStart` occurs\n            // after the FCP, this time should be clamped at 0.\n            metric.value = Math.max(entry.startTime - getActivationStart(), 0);\n            metric.entries.push(entry);\n            report(true);\n          }\n        }\n      }\n    };\n\n    const po = observe('paint', handleEntries);\n\n    if (po) {\n      report = bindReporter(onReport, metric, FCPThresholds, opts.reportAllChanges);\n    }\n  });\n};\n","/*\n * Copyright 2020 Google LLC\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n *     https://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\nimport { WINDOW } from '../../types';\nimport { bindReporter } from './lib/bindReporter';\nimport { getActivationStart } from './lib/getActivationStart';\nimport { getNavigationEntry } from './lib/getNavigationEntry';\nimport { initMetric } from './lib/initMetric';\nimport { whenActivated } from './lib/whenActivated';\nimport type { MetricRatingThresholds, ReportOpts, TTFBMetric } from './types';\n\n/** Thresholds for TTFB. See https://web.dev/articles/ttfb#what_is_a_good_ttfb_score */\nexport const TTFBThresholds: MetricRatingThresholds = [800, 1800];\n\n/**\n * Runs in the next task after the page is done loading and/or prerendering.\n * @param callback\n */\nconst whenReady = (callback: () => void) => {\n  if (WINDOW.document?.prerendering) {\n    whenActivated(() => whenReady(callback));\n  } else if (WINDOW.document?.readyState !== 'complete') {\n    addEventListener('load', () => whenReady(callback), true);\n  } else {\n    // Queue a task so the callback runs after `loadEventEnd`.\n    setTimeout(callback);\n  }\n};\n\n/**\n * Calculates the [TTFB](https://web.dev/articles/ttfb) value for the\n * current page and calls the `callback` function once the page has loaded,\n * along with the relevant `navigation` performance entry used to determine the\n * value. The reported value is a `DOMHighResTimeStamp`.\n *\n * Note, this function waits until after the page is loaded to call `callback`\n * in order to ensure all properties of the `navigation` entry are populated.\n * This is useful if you want to report on other metrics exposed by the\n * [Navigation Timing API](https://w3c.github.io/navigation-timing/). For\n * example, the TTFB metric starts from the page's [time\n * origin](https://www.w3.org/TR/hr-time-2/#sec-time-origin), which means it\n * includes time spent on DNS lookup, connection negotiation, network latency,\n * and server processing time.\n */\nexport const onTTFB = (onReport: (metric: TTFBMetric) => void, opts: ReportOpts = {}) => {\n  const metric = initMetric('TTFB');\n  const report = bindReporter(onReport, metric, TTFBThresholds, opts.reportAllChanges);\n\n  whenReady(() => {\n    const navigationEntry = getNavigationEntry();\n\n    if (navigationEntry) {\n      // The activationStart reference is used because TTFB should be\n      // relative to page activation rather than navigation start if the\n      // page was prerendered. But in cases where `activationStart` occurs\n      // after the first byte is received, this time should be clamped at 0.\n      metric.value = Math.max(navigationEntry.responseStart - getActivationStart(), 0);\n\n      metric.entries = [navigationEntry];\n      report(true);\n    }\n  });\n};\n","import type { Client, Span, SpanAttributes } from '@sentry/core';\nimport {\n  browserPerformanceTimeOrigin,\n  debug,\n  getActiveSpan,\n  getCurrentScope,\n  getRootSpan,\n  SEMANTIC_ATTRIBUTE_EXCLUSIVE_TIME,\n  SEMANTIC_ATTRIBUTE_SENTRY_OP,\n  SEMANTIC_ATTRIBUTE_SENTRY_ORIGIN,\n  spanToStreamedSpanJSON,\n  startInactiveSpan,\n  timestampInSeconds,\n} from '@sentry/core';\nimport { DEBUG_BUILD } from '../debug-build';\nimport { htmlTreeAsString } from '../htmlTreeAsString';\nimport { WINDOW } from '../types';\nimport { getCachedInteractionContext, INP_ENTRY_MAP, MAX_PLAUSIBLE_INP_DURATION } from './inp';\nimport type { InstrumentationHandlerCallback } from './instrument';\nimport { addClsInstrumentationHandler, addInpInstrumentationHandler, addLcpInstrumentationHandler } from './instrument';\nimport { isValidLcpMetric } from './lcp';\nimport type { WebVitalReportEvent } from './utils';\nimport { getBrowserPerformanceAPI, listenForWebVitalReportEvents, msToSec, supportsWebVital } from './utils';\nimport type { PerformanceEventTiming } from './instrument';\nimport { SENTRY_SEGMENT_NAME, SENTRY_TRANSACTION } from '@sentry/conventions/attributes';\n\n// Locally-defined interfaces to avoid leaking bare global type references into the\n// generated .d.ts. The `declare global` augmentations in web-vitals/types.ts make these\n// available during this package's compilation but are NOT carried to consumers.\n// This mirrors the pattern used for PerformanceEventTiming in instrument.ts.\nexport interface LayoutShift extends PerformanceEntry {\n  value: number;\n  sources: Array<{ node: Node | null }>;\n  hadRecentInput: boolean;\n}\n\nexport interface LargestContentfulPaint extends PerformanceEntry {\n  readonly renderTime: DOMHighResTimeStamp;\n  readonly loadTime: DOMHighResTimeStamp;\n  readonly size: number;\n  readonly id: string;\n  readonly url: string;\n  readonly element: Element | null;\n}\n\ninterface WebVitalSpanOptions {\n  name: string;\n  op: string;\n  origin: string;\n  metricName: 'lcp' | 'cls' | 'inp';\n  value: number;\n  attributes?: SpanAttributes;\n  parentSpan?: Span;\n  reportEvent?: WebVitalReportEvent;\n  startTime: number;\n  endTime?: number;\n}\n\n/**\n * Emits a web vital span that flows through the span streaming pipeline.\n */\nexport function _emitWebVitalSpan(options: WebVitalSpanOptions): void {\n  const {\n    name,\n    op,\n    origin,\n    metricName,\n    value,\n    attributes: passedAttributes,\n    parentSpan,\n    reportEvent,\n    startTime,\n    endTime,\n  } = options;\n\n  const routeName = getCurrentScope().getScopeData().transactionName;\n\n  const attributes: SpanAttributes = {\n    [SEMANTIC_ATTRIBUTE_SENTRY_ORIGIN]: origin,\n    [SEMANTIC_ATTRIBUTE_SENTRY_OP]: op,\n    [SEMANTIC_ATTRIBUTE_EXCLUSIVE_TIME]: 0,\n    [`browser.web_vital.${metricName}.value`]: value,\n    // oxlint-disable-next-line typescript-eslint/no-deprecated\n    [SENTRY_TRANSACTION]: routeName,\n    [SENTRY_SEGMENT_NAME]: routeName,\n    // Web vital score calculation relies on the user agent\n    'user_agent.original': WINDOW.navigator?.userAgent,\n    ...passedAttributes,\n  };\n\n  if (parentSpan && spanToStreamedSpanJSON(parentSpan).attributes?.[SEMANTIC_ATTRIBUTE_SENTRY_OP] === 'pageload') {\n    // for LCP and CLS, we collect the pageload span id as an attribute\n    attributes['sentry.pageload.span_id'] = parentSpan.spanContext().spanId;\n  }\n\n  if (reportEvent) {\n    attributes[`browser.web_vital.${metricName}.report_event`] = reportEvent;\n  }\n\n  const span = startInactiveSpan({\n    name,\n    attributes,\n    startTime,\n    // if we have a pageload span, we let the web vital span start as its parent. This ensures that\n    // it is not started as a segment span, without having to manually set it to a \"standalone\" v2 span\n    // that has `segment: false` but no actual parent span.\n    parentSpan: parentSpan,\n  });\n\n  if (span) {\n    span.end(endTime ?? startTime);\n  }\n}\n\n/**\n * Tracks LCP as a streamed span.\n */\nexport function trackLcpAsSpan(client: Client): void {\n  let lcpValue = 0;\n  let lcpEntry: LargestContentfulPaint | undefined;\n\n  if (!supportsWebVital('largest-contentful-paint')) {\n    return;\n  }\n\n  const cleanupLcpHandler = addLcpInstrumentationHandler(({ metric }) => {\n    const entry = metric.entries[metric.entries.length - 1] as LargestContentfulPaint | undefined;\n    if (!entry || !isValidLcpMetric(metric.value)) {\n      return;\n    }\n    lcpValue = metric.value;\n    lcpEntry = entry;\n  }, true);\n\n  listenForWebVitalReportEvents(client, (reportEvent, _, pageloadSpan) => {\n    _sendLcpSpan(lcpValue, lcpEntry, pageloadSpan, reportEvent);\n    cleanupLcpHandler();\n  });\n}\n\n/**\n * Exported only for testing.\n */\nexport function _sendLcpSpan(\n  lcpValue: number,\n  entry: LargestContentfulPaint | undefined,\n  pageloadSpan?: Span,\n  reportEvent?: WebVitalReportEvent,\n): void {\n  if (!isValidLcpMetric(lcpValue)) {\n    return;\n  }\n\n  DEBUG_BUILD && debug.log(`Sending LCP span (${lcpValue})`);\n\n  const performanceTimeOrigin = browserPerformanceTimeOrigin() || 0;\n  const timeOrigin = msToSec(performanceTimeOrigin);\n  const endTime = msToSec(performanceTimeOrigin + (entry?.startTime || 0));\n  const name = entry ? htmlTreeAsString(entry.element) : 'Largest contentful paint';\n\n  const attributes: SpanAttributes = {};\n\n  entry?.element && (attributes['browser.web_vital.lcp.element'] = htmlTreeAsString(entry.element));\n  entry?.id && (attributes['browser.web_vital.lcp.id'] = entry.id);\n  entry?.url && (attributes['browser.web_vital.lcp.url'] = entry.url);\n  entry?.loadTime != null && (attributes['browser.web_vital.lcp.load_time'] = entry.loadTime);\n  entry?.renderTime != null && (attributes['browser.web_vital.lcp.render_time'] = entry.renderTime);\n  entry?.size != null && (attributes['browser.web_vital.lcp.size'] = entry.size);\n\n  _emitWebVitalSpan({\n    name,\n    op: 'ui.webvital.lcp',\n    origin: 'auto.http.browser.lcp',\n    metricName: 'lcp',\n    value: lcpValue,\n    attributes,\n    parentSpan: pageloadSpan,\n    reportEvent,\n    startTime: timeOrigin,\n    endTime,\n  });\n}\n\n/**\n * Tracks CLS as a streamed span.\n */\nexport function trackClsAsSpan(client: Client): void {\n  let clsValue = 0;\n  let clsEntry: LayoutShift | undefined;\n\n  if (!supportsWebVital('layout-shift')) {\n    return;\n  }\n\n  const cleanupClsHandler = addClsInstrumentationHandler(({ metric }) => {\n    const entry = metric.entries[metric.entries.length - 1] as LayoutShift | undefined;\n    if (!entry) {\n      return;\n    }\n    clsValue = metric.value;\n    clsEntry = entry;\n  }, true);\n\n  listenForWebVitalReportEvents(client, (reportEvent, _, pageloadSpan) => {\n    _sendClsSpan(clsValue, clsEntry, pageloadSpan, reportEvent);\n    cleanupClsHandler();\n  });\n}\n\n/**\n * Exported only for testing.\n */\nexport function _sendClsSpan(\n  clsValue: number,\n  entry: LayoutShift | undefined,\n  pageloadSpan?: Span,\n  reportEvent?: WebVitalReportEvent,\n): void {\n  DEBUG_BUILD && debug.log(`Sending CLS span (${clsValue})`);\n\n  const startTime = entry ? msToSec((browserPerformanceTimeOrigin() || 0) + entry.startTime) : timestampInSeconds();\n  const name = entry ? htmlTreeAsString(entry.sources[0]?.node) : 'Layout shift';\n\n  const attributes: SpanAttributes = {};\n\n  if (entry?.sources) {\n    entry.sources.forEach((source, index) => {\n      attributes[`browser.web_vital.cls.source.${index + 1}`] = htmlTreeAsString(source.node);\n    });\n  }\n\n  _emitWebVitalSpan({\n    name,\n    op: 'ui.webvital.cls',\n    origin: 'auto.http.browser.cls',\n    metricName: 'cls',\n    value: clsValue,\n    attributes,\n    parentSpan: pageloadSpan,\n    reportEvent,\n    startTime,\n  });\n}\n\n/**\n * Tracks INP as a streamed span.\n *\n * This mirrors the standalone INP tracking logic (`startTrackingINP`) but emits\n * spans through the streaming pipeline instead of as standalone spans.\n * Requires `registerInpInteractionListener()` to be called separately for\n * cached element names and root spans per interaction.\n */\nexport function trackInpAsSpan(): void {\n  const performance = getBrowserPerformanceAPI();\n  if (!performance || !browserPerformanceTimeOrigin()) {\n    return;\n  }\n\n  const onInp: InstrumentationHandlerCallback = ({ metric }) => {\n    if (metric.value == null) {\n      return;\n    }\n\n    const duration = msToSec(metric.value);\n\n    if (duration > MAX_PLAUSIBLE_INP_DURATION) {\n      return;\n    }\n\n    const entry = metric.entries.find(e => e.duration === metric.value && INP_ENTRY_MAP[e.name]);\n\n    if (!entry) {\n      return;\n    }\n\n    _sendInpSpan(metric.value, entry);\n  };\n\n  addInpInstrumentationHandler(onInp);\n}\n\n/**\n * Exported only for testing.\n */\nexport function _sendInpSpan(inpValue: number, entry: PerformanceEventTiming): void {\n  DEBUG_BUILD && debug.log(`Sending INP span (${inpValue})`);\n\n  const startTime = msToSec((browserPerformanceTimeOrigin() as number) + entry.startTime);\n  const duration = msToSec(inpValue);\n  const interactionType = INP_ENTRY_MAP[entry.name];\n\n  const cachedContext = getCachedInteractionContext(entry.interactionId);\n  const activeSpan = getActiveSpan();\n  const rootSpan = activeSpan ? getRootSpan(activeSpan) : undefined;\n\n  const spanToUse = cachedContext?.span || rootSpan;\n  const routeName = spanToUse\n    ? spanToStreamedSpanJSON(spanToUse).name\n    : getCurrentScope().getScopeData().transactionName;\n  const name = cachedContext?.elementName || htmlTreeAsString(entry.target);\n\n  _emitWebVitalSpan({\n    name,\n    op: `ui.interaction.${interactionType}`,\n    origin: 'auto.http.browser.inp',\n    metricName: 'inp',\n    value: inpValue,\n    attributes: {\n      [SEMANTIC_ATTRIBUTE_EXCLUSIVE_TIME]: entry.duration,\n      // oxlint-disable-next-line typescript-eslint/no-deprecated\n      [SENTRY_TRANSACTION]: routeName,\n      [SENTRY_SEGMENT_NAME]: routeName,\n    },\n    startTime,\n    endTime: startTime + duration,\n    parentSpan: spanToUse,\n  });\n}\n","import { debug } from '@sentry/core';\nimport { DEBUG_BUILD } from './debug-build';\nimport type { NetworkMetaWarning } from './types';\n\n// Symbol used by e.g. the Replay integration to store original body on Request objects\nexport const ORIGINAL_REQ_BODY = Symbol.for('sentry__originalRequestBody');\n\n/**\n * Serializes FormData.\n *\n * This is a bit simplified, but gives us a decent estimate.\n * This converts e.g. { name: 'Anne Smith', age: 13 } to 'name=Anne+Smith&age=13'.\n *\n */\nexport function serializeFormData(formData: FormData): string {\n  // @ts-expect-error passing FormData to URLSearchParams actually works\n  return new URLSearchParams(formData).toString();\n}\n\n/** Get the string representation of a body. */\nexport function getBodyString(body: unknown, _debug: typeof debug = debug): [string | undefined, NetworkMetaWarning?] {\n  try {\n    if (typeof body === 'string') {\n      return [body];\n    }\n\n    if (body instanceof URLSearchParams) {\n      return [body.toString()];\n    }\n\n    if (body instanceof FormData) {\n      return [serializeFormData(body)];\n    }\n\n    if (!body) {\n      return [undefined];\n    }\n  } catch (error) {\n    DEBUG_BUILD && _debug.error(error, 'Failed to serialize body', body);\n    return [undefined, 'BODY_PARSE_ERROR'];\n  }\n\n  DEBUG_BUILD && _debug.log('Skipping network body because of body type', body);\n\n  return [undefined, 'UNPARSEABLE_BODY_TYPE'];\n}\n\n/**\n * Parses the fetch arguments to extract the request payload.\n *\n * In case of a Request object, this function attempts to retrieve the original body by looking for a Sentry-patched symbol.\n */\nexport function getFetchRequestArgBody(fetchArgs: unknown[] = []): RequestInit['body'] | undefined {\n  // Second argument with body options takes precedence\n  if (fetchArgs.length >= 2 && fetchArgs[1] && typeof fetchArgs[1] === 'object' && 'body' in fetchArgs[1]) {\n    return (fetchArgs[1] as RequestInit).body;\n  }\n\n  if (fetchArgs.length >= 1 && fetchArgs[0] instanceof Request) {\n    const request = fetchArgs[0];\n    /* The Request interface's body is a ReadableStream, which we cannot directly access.\n       Some integrations (e.g. Replay) patch the Request object to store the original body. */\n    // eslint-disable-next-line @typescript-eslint/no-explicit-any, @typescript-eslint/no-unsafe-member-access\n    const originalBody = (request as any)[ORIGINAL_REQ_BODY];\n    if (originalBody !== undefined) {\n      return originalBody;\n    }\n\n    return undefined; // Fall back to returning undefined (as we don't want to return a ReadableStream)\n  }\n\n  return undefined;\n}\n\n/**\n * Parses XMLHttpRequest response headers into a Record.\n * Extracted from replay internals to be reusable.\n */\nexport function parseXhrResponseHeaders(xhr: XMLHttpRequest): Record<string, string> {\n  let headers: string | undefined;\n  try {\n    headers = xhr.getAllResponseHeaders();\n  } catch (error) {\n    DEBUG_BUILD && debug.error(error, 'Failed to get xhr response headers', xhr);\n    return {};\n  }\n\n  if (!headers) {\n    return {};\n  }\n\n  return headers.split('\\r\\n').reduce((acc: Record<string, string>, line: string) => {\n    const [key, value] = line.split(': ') as [string, string | undefined];\n    if (value) {\n      acc[key.toLowerCase()] = value;\n    }\n    return acc;\n  }, {});\n}\n","import type {\n  FetchBreadcrumbHint,\n  HandlerDataFetch,\n  SentryWrappedXMLHttpRequest,\n  XhrBreadcrumbHint,\n} from '@sentry/core';\nimport { GLOBAL_OBJ } from '@sentry/core';\n\nexport const WINDOW = GLOBAL_OBJ as typeof GLOBAL_OBJ &\n  // document is not available in all browser environments (webworkers). We make it optional so you have to explicitly check for it\n  Omit<Window, 'document'> &\n  Partial<Pick<Window, 'document'>>;\n\nexport type NetworkMetaWarning =\n  | 'MAYBE_JSON_TRUNCATED'\n  | 'TEXT_TRUNCATED'\n  | 'URL_SKIPPED'\n  | 'BODY_PARSE_ERROR'\n  | 'BODY_PARSE_TIMEOUT'\n  | 'UNPARSEABLE_BODY_TYPE';\n\ntype RequestBody = null | Blob | BufferSource | FormData | URLSearchParams | string;\n\nexport type XhrHint = XhrBreadcrumbHint & {\n  xhr: XMLHttpRequest & SentryWrappedXMLHttpRequest;\n  input?: RequestBody;\n};\nexport type FetchHint = FetchBreadcrumbHint & {\n  input: HandlerDataFetch['args'];\n  response: Response;\n};\n","import type {\n  BrowserClientProfilingOptions,\n  BrowserClientReplayOptions,\n  ClientOptions,\n  Event,\n  EventHint,\n  Options as CoreOptions,\n  ParameterizedString,\n  Scope,\n  SeverityLevel,\n} from '@sentry/core/browser';\nimport { addAutoIpAddressToSession, applySdkMetadata, Client, getSDKSource } from '@sentry/core/browser';\nimport { eventFromException, eventFromMessage } from './eventbuilder';\nimport { WINDOW } from './helpers';\nimport type { BrowserTransportOptions } from './transports/types';\n\n/**\n * A magic string that build tooling can leverage in order to inject a release value into the SDK.\n */\ndeclare const __SENTRY_RELEASE__: string | undefined;\n\ntype BrowserSpecificOptions = BrowserClientReplayOptions &\n  BrowserClientProfilingOptions & {\n    /** If configured, this URL will be used as base URL for lazy loading integration. */\n    cdnBaseUrl?: string;\n\n    /**\n     * Important: Only set this option if you know what you are doing!\n     *\n     * By default, the SDK will check if `Sentry.init` is called in a browser extension.\n     * In case it is, it will stop initialization and log a warning\n     * because browser extensions require a different Sentry initialization process:\n     * https://docs.sentry.io/platforms/javascript/best-practices/shared-environments/\n     *\n     * Setting up the SDK in a browser extension with global error monitoring is not recommended\n     * and will likely flood you with errors from other web sites or extensions. This can heavily\n     * impact your quota and cause interference with your and other Sentry SDKs in shared environments.\n     *\n     * If this check wrongfully flags your setup as a browser extension, you can set this\n     * option to `true` to skip the check.\n     *\n     * @default false\n     */\n    skipBrowserExtensionCheck?: boolean;\n\n    /**\n     * If you use Spotlight by Sentry during development, use\n     * this option to forward captured Sentry events to Spotlight.\n     *\n     * Either set it to true, or provide a specific Spotlight Sidecar URL.\n     *\n     * More details: https://spotlightjs.com/\n     *\n     * IMPORTANT: Only set this option to `true` while developing, not in production!\n     */\n    spotlight?: boolean | string;\n  };\n/**\n * Configuration options for the Sentry Browser SDK.\n * @see @sentry/core Options for more information.\n */\nexport type BrowserOptions = CoreOptions<BrowserTransportOptions> & BrowserSpecificOptions;\n\n/**\n * Configuration options for the Sentry Browser SDK Client class\n * @see BrowserClient for more information.\n */\nexport type BrowserClientOptions = ClientOptions<BrowserTransportOptions> & BrowserSpecificOptions;\n\n/**\n * The Sentry Browser SDK Client.\n *\n * @see BrowserOptions for documentation on configuration options.\n * @see SentryClient for usage documentation.\n */\nexport class BrowserClient extends Client<BrowserClientOptions> {\n  /**\n   * Creates a new Browser SDK instance.\n   *\n   * @param options Configuration options for this SDK.\n   */\n  public constructor(options: BrowserClientOptions) {\n    const opts = applyDefaultOptions(options);\n    const sdkSource = WINDOW.SENTRY_SDK_SOURCE || getSDKSource();\n    applySdkMetadata(opts, 'browser', ['browser'], sdkSource);\n\n    super(opts);\n\n    const { userInfo } = this.getDataCollectionOptions();\n\n    if (opts._metadata?.sdk) {\n      opts._metadata.sdk.settings = {\n        // Only allow IP inferral by Relay if the user opted in via dataCollection\n        infer_ip: userInfo ? 'auto' : 'never',\n        // purposefully allowing already passed settings to override the default\n        ...opts._metadata.sdk.settings,\n      };\n    }\n\n    const { sendClientReports } = this._options;\n\n    // Flush buffered data when the page becomes hidden (e.g. tab switch, navigation, or the page\n    // being discarded). `flush()` emits the `flush` hook, which drains the span (streaming), log and\n    // metric buffers and hands the resulting envelopes to the transport (which uses `keepalive`).\n    // Client report outcomes don't listen to the `flush` hook, so we flush them separately.\n    if (WINDOW.document) {\n      WINDOW.document.addEventListener('visibilitychange', () => {\n        if (WINDOW.document.visibilityState === 'hidden') {\n          if (sendClientReports) {\n            this._flushOutcomes();\n          }\n          // Defer the flush to a microtask so that visibilitychange listeners registered after this\n          // one have already run. In particular, browser tracing's background-tab detection ends the\n          // active pageload/navigation (segment) span when the page is hidden. Deferring ensures that\n          // segment span has been added to the streaming buffer before we flush, so it is sent\n          // together with its child spans instead of being orphaned.\n          queueMicrotask(() => {\n            void this.flush();\n          });\n        }\n      });\n    }\n\n    if (userInfo) {\n      this.on('beforeSendSession', addAutoIpAddressToSession);\n    }\n  }\n\n  /**\n   * @inheritDoc\n   */\n  public eventFromException(exception: unknown, hint?: EventHint): PromiseLike<Event> {\n    return eventFromException(this._options.stackParser, exception, hint, this._options.attachStacktrace);\n  }\n\n  /**\n   * @inheritDoc\n   */\n  public eventFromMessage(\n    message: ParameterizedString,\n    level: SeverityLevel = 'info',\n    hint?: EventHint,\n  ): PromiseLike<Event> {\n    return eventFromMessage(this._options.stackParser, message, level, hint, this._options.attachStacktrace);\n  }\n\n  /**\n   * @inheritDoc\n   */\n  protected _prepareEvent(\n    event: Event,\n    hint: EventHint,\n    currentScope: Scope,\n    isolationScope: Scope,\n  ): PromiseLike<Event | null> {\n    event.platform = event.platform || 'javascript';\n\n    return super._prepareEvent(event, hint, currentScope, isolationScope);\n  }\n}\n\n/** Exported only for tests. */\nexport function applyDefaultOptions<T extends Partial<BrowserClientOptions>>(optionsArg: T): T {\n  return {\n    release:\n      typeof __SENTRY_RELEASE__ === 'string' // This allows build tooling to find-and-replace __SENTRY_RELEASE__ to inject a release value\n        ? __SENTRY_RELEASE__\n        : WINDOW.SENTRY_RELEASE?.id, // This supports the variable that sentry-webpack-plugin injects\n    sendClientReports: true,\n    // We default this to true, as it is the safer scenario\n    parentSpanIsAlwaysRootSpan: true,\n    ...optionsArg,\n  };\n}\n","import { getClient, suppressTracing } from '@sentry/core/browser';\n\n/**\n * A function to diagnose why the SDK might not be successfully sending data.\n *\n * Possible return values wrapped in a Promise:\n * - `\"no-client-active\"` - There was no active client when the function was called. This possibly means that the SDK was not initialized yet.\n * - `\"sentry-unreachable\"` - The Sentry SaaS servers were not reachable. This likely means that there is an ad blocker active on the page or that there are other connection issues.\n *\n * If the function doesn't detect an issue it resolves to `undefined`.\n */\nexport async function diagnoseSdkConnectivity(): Promise<\n  'no-client-active' | 'sentry-unreachable' | 'no-dsn-configured' | void\n> {\n  const client = getClient();\n\n  if (!client) {\n    return 'no-client-active';\n  }\n\n  if (!client.getDsn()) {\n    return 'no-dsn-configured';\n  }\n\n  // Check if a tunnel is configured and use it if available\n  const tunnel = client.getOptions().tunnel;\n\n  // We are using the\n  // - \"sentry-sdks\" org with id 447951 not to pollute any actual organizations.\n  // - \"diagnose-sdk-connectivity\" project with id 4509632503087104\n  // - the public key of said org/project, which is disabled in the project settings\n  // => this DSN: https://c1dfb07d783ad5325c245c1fd3725390@o447951.ingest.us.sentry.io/4509632503087104 (i.e. disabled)\n  const defaultUrl =\n    'https://o447951.ingest.sentry.io/api/4509632503087104/envelope/?sentry_version=7&sentry_key=c1dfb07d783ad5325c245c1fd3725390&sentry_client=sentry.javascript.browser%2F1.33.7';\n\n  const url = tunnel || defaultUrl;\n\n  try {\n    await suppressTracing(() =>\n      // If fetch throws, there is likely an ad blocker active or there are other connective issues.\n      fetch(url, {\n        body: '{}',\n        method: 'POST',\n        mode: 'cors',\n        credentials: 'omit',\n      }),\n    );\n  } catch {\n    return 'sentry-unreachable';\n  }\n}\n","import type {\n  Event,\n  EventHint,\n  Exception,\n  ParameterizedString,\n  SeverityLevel,\n  StackFrame,\n  StackParser,\n} from '@sentry/core/browser';\nimport {\n  _INTERNAL_enhanceErrorWithSentryInfo,\n  addExceptionMechanism,\n  addExceptionTypeValue,\n  extractExceptionKeysForMessage,\n  getClient,\n  isDOMError,\n  isDOMException,\n  isError,\n  isErrorEvent,\n  isEvent,\n  isParameterizedString,\n  isPlainObject,\n  normalizeToSize,\n  resolvedSyncPromise,\n} from '@sentry/core/browser';\n\ntype Prototype = { constructor: (...args: unknown[]) => unknown };\n\n/**\n * This function creates an exception from a JavaScript Error\n */\nexport function exceptionFromError(stackParser: StackParser, ex: Error): Exception {\n  // Get the frames first since Opera can lose the stack if we touch anything else first\n  const frames = parseStackFrames(stackParser, ex);\n\n  const exception: Exception = {\n    type: extractType(ex),\n    value: extractMessage(ex),\n  };\n\n  if (frames.length) {\n    exception.stacktrace = { frames };\n  }\n\n  if (exception.type === undefined && exception.value === '') {\n    exception.value = 'Unrecoverable error caught';\n  }\n\n  return exception;\n}\n\nfunction eventFromPlainObject(\n  stackParser: StackParser,\n  exception: Record<string, unknown>,\n  syntheticException?: Error,\n  isUnhandledRejection?: boolean,\n): Event {\n  const client = getClient();\n  const normalizeDepth = client?.getOptions().normalizeDepth;\n\n  // If we can, we extract an exception from the object properties\n  const errorFromProp = getErrorPropertyFromObject(exception);\n\n  const extra = {\n    __serialized__: normalizeToSize(exception, normalizeDepth),\n  };\n\n  if (errorFromProp) {\n    return {\n      exception: {\n        values: [exceptionFromError(stackParser, errorFromProp)],\n      },\n      extra,\n    };\n  }\n\n  const event = {\n    exception: {\n      values: [\n        {\n          type: isEvent(exception) ? exception.constructor.name : isUnhandledRejection ? 'UnhandledRejection' : 'Error',\n          value: getNonErrorObjectExceptionValue(exception, { isUnhandledRejection }),\n        } as Exception,\n      ],\n    },\n    extra,\n  } satisfies Event;\n\n  if (syntheticException) {\n    const frames = parseStackFrames(stackParser, syntheticException);\n    if (frames.length) {\n      // event.exception.values[0] has been set above\n      // eslint-disable-next-line @typescript-eslint/no-non-null-assertion\n      event.exception.values[0]!.stacktrace = { frames };\n    }\n  }\n\n  return event;\n}\n\nfunction eventFromError(stackParser: StackParser, ex: Error): Event {\n  return {\n    exception: {\n      values: [exceptionFromError(stackParser, ex)],\n    },\n  };\n}\n\n/** Parses stack frames from an error */\nfunction parseStackFrames(\n  stackParser: StackParser,\n  ex: Error & { framesToPop?: number; stacktrace?: string },\n): StackFrame[] {\n  // Access and store the stacktrace property before doing ANYTHING\n  // else to it because Opera is not very good at providing it\n  // reliably in other circumstances.\n  const stacktrace = ex.stacktrace || ex.stack || '';\n\n  const skipLines = getSkipFirstStackStringLines(ex);\n  const framesToPop = getPopFirstTopFrames(ex);\n\n  try {\n    return stackParser(stacktrace, skipLines, framesToPop);\n  } catch {\n    // no-empty\n  }\n\n  return [];\n}\n\n// Based on our own mapping pattern - https://github.com/getsentry/sentry/blob/9f08305e09866c8bd6d0c24f5b0aabdd7dd6c59c/src/sentry/lang/javascript/errormapping.py#L83-L108\nconst reactMinifiedRegexp = /Minified React error #\\d+;/i;\n\n/**\n * Certain known React errors contain links that would be falsely\n * parsed as frames. This function check for these errors and\n * returns number of the stack string lines to skip.\n */\nfunction getSkipFirstStackStringLines(ex: Error): number {\n  if (ex && reactMinifiedRegexp.test(ex.message)) {\n    return 1;\n  }\n\n  return 0;\n}\n\n/**\n * If error has `framesToPop` property, it means that the\n * creator tells us the first x frames will be useless\n * and should be discarded. Typically error from wrapper function\n * which don't point to the actual location in the developer's code.\n *\n * Example: https://github.com/zertosh/invariant/blob/master/invariant.js#L46\n */\nfunction getPopFirstTopFrames(ex: Error & { framesToPop?: unknown }): number {\n  if (typeof ex.framesToPop === 'number') {\n    return ex.framesToPop;\n  }\n\n  return 0;\n}\n\n// https://developer.mozilla.org/en-US/docs/WebAssembly/JavaScript_interface/Exception\n// @ts-expect-error - WebAssembly.Exception is a valid class\nfunction isWebAssemblyException(exception: unknown): exception is WebAssembly.Exception {\n  // Check for support\n  // @ts-expect-error - WebAssembly.Exception is a valid class\n  // oxlint-disable-next-line typescript/prefer-optional-chain\n  if (typeof WebAssembly !== 'undefined' && typeof WebAssembly.Exception !== 'undefined') {\n    // @ts-expect-error - WebAssembly.Exception is a valid class\n    return exception instanceof WebAssembly.Exception;\n  } else {\n    return false;\n  }\n}\n\n/**\n * Extracts from errors what we use as the exception `type` in error events.\n *\n * Usually, this is the `name` property on Error objects but WASM errors need to be treated differently.\n */\nexport function extractType(ex: Error & { message: { error?: Error } }): string | undefined {\n  const name = ex?.name;\n\n  // The name for WebAssembly.Exception Errors needs to be extracted differently.\n  // Context: https://github.com/getsentry/sentry-javascript/issues/13787\n  if (!name && isWebAssemblyException(ex)) {\n    // Emscripten sets array[type, message] to the \"message\" property on the WebAssembly.Exception object\n    const hasTypeInMessage = ex.message && Array.isArray(ex.message) && ex.message.length == 2;\n    return hasTypeInMessage ? ex.message[0] : 'WebAssembly.Exception';\n  }\n\n  return name;\n}\n\n/**\n * There are cases where stacktrace.message is an Event object\n * https://github.com/getsentry/sentry-javascript/issues/1949\n * In this specific case we try to extract stacktrace.message.error.message\n */\nexport function extractMessage(ex: Error & { message: { error?: Error } }): string {\n  const message = ex?.message;\n\n  if (isWebAssemblyException(ex)) {\n    // For Node 18, Emscripten sets array[type, message] to the \"message\" property on the WebAssembly.Exception object\n    if (Array.isArray(ex.message) && ex.message.length == 2) {\n      return ex.message[1];\n    }\n    return 'wasm exception';\n  }\n\n  if (!message) {\n    return 'No error message';\n  }\n\n  if (message.error && typeof message.error.message === 'string') {\n    return _INTERNAL_enhanceErrorWithSentryInfo(message.error);\n  }\n\n  return _INTERNAL_enhanceErrorWithSentryInfo(ex);\n}\n\n/**\n * Creates an {@link Event} from all inputs to `captureException` and non-primitive inputs to `captureMessage`.\n * @hidden\n */\nexport function eventFromException(\n  stackParser: StackParser,\n  exception: unknown,\n  hint?: EventHint,\n  attachStacktrace?: boolean,\n): PromiseLike<Event> {\n  const syntheticException = hint?.syntheticException || undefined;\n  const event = eventFromUnknownInput(stackParser, exception, syntheticException, attachStacktrace);\n  addExceptionMechanism(event); // defaults to { type: 'generic', handled: true }\n  event.level = 'error';\n  if (hint?.event_id) {\n    event.event_id = hint.event_id;\n  }\n  return resolvedSyncPromise(event);\n}\n\n/**\n * Builds and Event from a Message\n * @hidden\n */\nexport function eventFromMessage(\n  stackParser: StackParser,\n  message: ParameterizedString,\n  level: SeverityLevel = 'info',\n  hint?: EventHint,\n  attachStacktrace?: boolean,\n): PromiseLike<Event> {\n  const syntheticException = hint?.syntheticException || undefined;\n  const event = eventFromString(stackParser, message, syntheticException, attachStacktrace);\n  event.level = level;\n  if (hint?.event_id) {\n    event.event_id = hint.event_id;\n  }\n  return resolvedSyncPromise(event);\n}\n\n/**\n * @hidden\n */\nexport function eventFromUnknownInput(\n  stackParser: StackParser,\n  exception: unknown,\n  syntheticException?: Error,\n  attachStacktrace?: boolean,\n  isUnhandledRejection?: boolean,\n): Event {\n  let event: Event;\n\n  if (isErrorEvent(exception as ErrorEvent) && (exception as ErrorEvent).error) {\n    // If it is an ErrorEvent with `error` property, extract it to get actual Error\n    const errorEvent = exception as ErrorEvent;\n    return eventFromError(stackParser, errorEvent.error as Error);\n  }\n\n  // If it is a `DOMError` (which is a legacy API, but still supported in some browsers) then we just extract the name\n  // and message, as it doesn't provide anything else. According to the spec, all `DOMExceptions` should also be\n  // `Error`s, but that's not the case in IE11, so in that case we treat it the same as we do a `DOMError`.\n  //\n  // https://developer.mozilla.org/en-US/docs/Web/API/DOMError\n  // https://developer.mozilla.org/en-US/docs/Web/API/DOMException\n  // https://webidl.spec.whatwg.org/#es-DOMException-specialness\n  if (isDOMError(exception) || isDOMException(exception as DOMException)) {\n    const domException = exception as DOMException;\n\n    if ('stack' in (exception as Error)) {\n      event = eventFromError(stackParser, exception as Error);\n\n      const firstException = event.exception?.values?.[0];\n      if (attachStacktrace && syntheticException && firstException && !firstException.stacktrace) {\n        const frames = parseStackFrames(stackParser, syntheticException);\n        if (frames.length) {\n          firstException.stacktrace = { frames };\n          addExceptionMechanism(event, { synthetic: true });\n        }\n      }\n    } else {\n      const name = domException.name || (isDOMError(domException) ? 'DOMError' : 'DOMException');\n      const message = domException.message ? `${name}: ${domException.message}` : name;\n      event = eventFromString(stackParser, message, syntheticException, attachStacktrace);\n      addExceptionTypeValue(event, message);\n    }\n    if ('code' in domException) {\n      // eslint-disable-next-line typescript/no-deprecated\n      event.tags = { ...event.tags, 'DOMException.code': `${domException.code}` };\n    }\n\n    return event;\n  }\n  if (isError(exception)) {\n    // we have a real Error object, do nothing\n    return eventFromError(stackParser, exception);\n  }\n  if (isPlainObject(exception) || isEvent(exception)) {\n    // If it's a plain object or an instance of `Event` (the built-in JS kind, not this SDK's `Event` type), serialize\n    // it manually. This will allow us to group events based on top-level keys which is much better than creating a new\n    // group on any key/value change.\n    const objectException = exception;\n    event = eventFromPlainObject(stackParser, objectException, syntheticException, isUnhandledRejection);\n    addExceptionMechanism(event, {\n      synthetic: true,\n    });\n    return event;\n  }\n\n  // If none of previous checks were valid, then it means that it's not:\n  // - an instance of DOMError\n  // - an instance of DOMException\n  // - an instance of Event\n  // - an instance of Error\n  // - a valid ErrorEvent (one with an error property)\n  // - a plain Object\n  //\n  // So bail out and capture it as a simple message:\n  event = eventFromString(stackParser, exception as string, syntheticException, attachStacktrace);\n  addExceptionTypeValue(event, `${exception}`, undefined);\n  addExceptionMechanism(event, {\n    synthetic: true,\n  });\n\n  return event;\n}\n\nfunction eventFromString(\n  stackParser: StackParser,\n  message: ParameterizedString,\n  syntheticException?: Error,\n  attachStacktrace?: boolean,\n): Event {\n  const event: Event = {};\n\n  if (attachStacktrace && syntheticException) {\n    const frames = parseStackFrames(stackParser, syntheticException);\n    if (frames.length) {\n      event.exception = {\n        values: [{ value: message, stacktrace: { frames } }],\n      };\n    }\n    addExceptionMechanism(event, { synthetic: true });\n  }\n\n  if (isParameterizedString(message)) {\n    const { __sentry_template_string__, __sentry_template_values__ } = message;\n\n    event.logentry = {\n      message: __sentry_template_string__,\n      params: __sentry_template_values__,\n    };\n    return event;\n  }\n\n  event.message = message;\n  return event;\n}\n\nfunction getNonErrorObjectExceptionValue(\n  exception: Record<string, unknown>,\n  { isUnhandledRejection }: { isUnhandledRejection?: boolean },\n): string {\n  const keys = extractExceptionKeysForMessage(exception);\n  const captureType = isUnhandledRejection ? 'promise rejection' : 'exception';\n\n  // Some ErrorEvent instances do not have an `error` property, which is why they are not handled before\n  // We still want to try to get a decent message for these cases\n  if (isErrorEvent(exception)) {\n    return `Event \\`ErrorEvent\\` captured as ${captureType} with message \\`${exception.message}\\``;\n  }\n\n  if (isEvent(exception)) {\n    const className = getObjectClassName(exception);\n    return `Event \\`${className}\\` (type=${exception.type}) captured as ${captureType}`;\n  }\n\n  return `Object captured as ${captureType} with keys: ${keys}`;\n}\n\nfunction getObjectClassName(obj: unknown): string | undefined | void {\n  try {\n    const prototype: Prototype | null = Object.getPrototypeOf(obj);\n    return prototype ? prototype.constructor.name : undefined;\n  } catch {\n    // ignore errors here\n  }\n}\n\n/** If a plain object has a property that is an `Error`, return this error. */\nfunction getErrorPropertyFromObject(obj: Record<string, unknown>): Error | undefined {\n  return Object.values(obj).find(isError);\n}\n","import { buildFeedbackIntegration } from '@sentry/feedback';\nimport { lazyLoadIntegration } from './utils/lazyLoadIntegration';\n\n/**\n * An integration to add user feedback to your application,\n * while loading most of the code lazily only when it's needed.\n */\nexport const feedbackAsyncIntegration: ReturnType<typeof buildFeedbackIntegration> = buildFeedbackIntegration({\n  lazyLoadIntegration,\n});\n","import { buildFeedbackIntegration, feedbackModalIntegration, feedbackScreenshotIntegration } from '@sentry/feedback';\n\n/** Add a widget to capture user feedback to your application. */\nexport const feedbackSyncIntegration: ReturnType<typeof buildFeedbackIntegration> = buildFeedbackIntegration({\n  getModalIntegration: () => feedbackModalIntegration,\n  getScreenshotIntegration: () => feedbackScreenshotIntegration,\n});\n","import { other } from './rules.ts';\n\n/**\n * Helpers\n */\nconst escapeReplacements: { [index: string]: string } = {\n  '&': '&amp;',\n  '<': '&lt;',\n  '>': '&gt;',\n  '\"': '&quot;',\n  \"'\": '&#39;',\n};\nconst getEscapeReplacement = (ch: string) => escapeReplacements[ch];\n\nexport function escapeHtmlEntities(html: string, encode?: boolean) {\n  if (encode) {\n    if (other.escapeTest.test(html)) {\n      return html.replace(other.escapeReplace, getEscapeReplacement);\n    }\n  } else {\n    if (other.escapeTestNoEncode.test(html)) {\n      return html.replace(other.escapeReplaceNoEncode, getEscapeReplacement);\n    }\n  }\n\n  return html;\n}\n\nexport function cleanUrl(href: string) {\n  try {\n    href = encodeURI(href).replace(other.percentDecode, '%');\n  } catch {\n    return null;\n  }\n  return href;\n}\n\nexport function splitCells(tableRow: string, count?: number) {\n  // ensure that every cell-delimiting pipe has a space\n  // before it to distinguish it from an escaped pipe\n  const row = tableRow.replace(other.findPipe, (match, offset, str) => {\n      let escaped = false;\n      let curr = offset;\n      while (--curr >= 0 && str[curr] === '\\\\') escaped = !escaped;\n      if (escaped) {\n        // odd number of slashes means | is escaped\n        // so we leave it alone\n        return '|';\n      } else {\n        // add space before unescaped |\n        return ' |';\n      }\n    }),\n    cells = row.split(other.splitPipe);\n  let i = 0;\n\n  // First/last cell in a row cannot be empty if it has no leading/trailing pipe\n  if (!cells[0].trim()) {\n    cells.shift();\n  }\n  if (cells.length > 0 && !cells.at(-1)?.trim()) {\n    cells.pop();\n  }\n\n  if (count) {\n    if (cells.length > count) {\n      cells.splice(count);\n    } else {\n      while (cells.length < count) cells.push('');\n    }\n  }\n\n  for (; i < cells.length; i++) {\n    // leading or trailing whitespace is ignored per the gfm spec\n    cells[i] = cells[i].trim().replace(other.slashPipe, '|');\n  }\n  return cells;\n}\n\n/**\n * Remove trailing 'c's. Equivalent to str.replace(/c*$/, '').\n * /c*$/ is vulnerable to REDOS.\n *\n * @param str\n * @param c\n * @param invert Remove suffix of non-c chars instead. Default falsey.\n */\nexport function rtrim(str: string, c: string, invert?: boolean) {\n  const l = str.length;\n  if (l === 0) {\n    return '';\n  }\n\n  // Length of suffix matching the invert condition.\n  let suffLen = 0;\n\n  // Step left until we fail to match the invert condition.\n  while (suffLen < l) {\n    const currChar = str.charAt(l - suffLen - 1);\n    if (currChar === c && !invert) {\n      suffLen++;\n    } else if (currChar !== c && invert) {\n      suffLen++;\n    } else {\n      break;\n    }\n  }\n\n  return str.slice(0, l - suffLen);\n}\n\nexport function trimTrailingBlankLines(str: string) {\n  const lines = str.split('\\n');\n  let end = lines.length - 1;\n  while (end >= 0 && other.blankLine.test(lines[end])) {\n    end--;\n  }\n  if (lines.length - end <= 2) {\n    // we want to keep single trailing blank lines\n    return str;\n  }\n\n  return lines.slice(0, end + 1).join('\\n');\n}\n\nexport function findClosingBracket(str: string, b: string) {\n  if (str.indexOf(b[1]) === -1) {\n    return -1;\n  }\n\n  let level = 0;\n  for (let i = 0; i < str.length; i++) {\n    if (str[i] === '\\\\') {\n      i++;\n    } else if (str[i] === b[0]) {\n      level++;\n    } else if (str[i] === b[1]) {\n      level--;\n      if (level < 0) {\n        return i;\n      }\n    }\n  }\n  if (level > 0) {\n    return -2;\n  }\n\n  return -1;\n}\n\nexport function expandTabs(line: string, indent = 0) {\n  let col = indent;\n  let expanded = '';\n  for (const char of line) {\n    if (char === '\\t') {\n      const added = 4 - (col % 4);\n      expanded += ' '.repeat(added);\n      col += added;\n    } else {\n      expanded += char;\n      col++;\n    }\n  }\n\n  return expanded;\n}\n","/* eslint-disable max-lines */\n\nimport type {\n  Breadcrumb,\n  Client,\n  Event as SentryEvent,\n  FetchBreadcrumbData,\n  FetchBreadcrumbHint,\n  HandlerDataConsole,\n  HandlerDataDom,\n  HandlerDataFetch,\n  HandlerDataHistory,\n  HandlerDataXhr,\n  IntegrationFn,\n  XhrBreadcrumbData,\n  XhrBreadcrumbHint,\n} from '@sentry/core/browser';\nimport {\n  addBreadcrumb,\n  addConsoleInstrumentationHandler,\n  addFetchInstrumentationHandler,\n  debug,\n  defineIntegration,\n  getBreadcrumbLogLevelFromHttpStatusCode,\n  getClient,\n  getComponentName,\n  getEventDescription,\n  parseUrl,\n  safeJoin,\n  severityLevelFromString,\n} from '@sentry/core/browser';\nimport type { FetchHint, XhrHint } from '@sentry/browser-utils';\nimport {\n  addClickKeypressInstrumentationHandler,\n  addHistoryInstrumentationHandler,\n  addXhrInstrumentationHandler,\n  htmlTreeAsString,\n  SENTRY_XHR_DATA_KEY,\n} from '@sentry/browser-utils';\nimport { DEBUG_BUILD } from '../debug-build';\nimport { WINDOW } from '../helpers';\n\ninterface BreadcrumbsOptions {\n  console: boolean;\n  dom:\n    | boolean\n    | {\n        serializeAttribute?: string | string[];\n        maxStringLength?: number;\n      };\n  fetch: boolean;\n  history: boolean;\n  sentry: boolean;\n  xhr: boolean;\n}\n\n/** maxStringLength gets capped to prevent 100 breadcrumbs exceeding 1MB event payload size */\nconst MAX_ALLOWED_STRING_LENGTH = 1024;\n\nconst INTEGRATION_NAME = 'Breadcrumbs' as const;\n\nconst _breadcrumbsIntegration = ((options: Partial<BreadcrumbsOptions> = {}) => {\n  const _options = {\n    console: true,\n    dom: true,\n    fetch: true,\n    history: true,\n    sentry: true,\n    xhr: true,\n    ...options,\n  };\n\n  return {\n    name: INTEGRATION_NAME,\n    setup(client) {\n      // TODO(v11): Remove this functionality and use `consoleIntegration` from @sentry/core instead.\n      if (_options.console) {\n        addConsoleInstrumentationHandler(_getConsoleBreadcrumbHandler(client));\n      }\n      if (_options.dom) {\n        addClickKeypressInstrumentationHandler(_getDomBreadcrumbHandler(client, _options.dom));\n      }\n      if (_options.xhr) {\n        addXhrInstrumentationHandler(_getXhrBreadcrumbHandler(client));\n      }\n      if (_options.fetch) {\n        addFetchInstrumentationHandler(_getFetchBreadcrumbHandler(client));\n      }\n      if (_options.history) {\n        addHistoryInstrumentationHandler(_getHistoryBreadcrumbHandler(client));\n      }\n      if (_options.sentry) {\n        client.on('beforeSendEvent', _getSentryBreadcrumbHandler(client));\n      }\n    },\n  };\n}) satisfies IntegrationFn;\n\nexport const breadcrumbsIntegration = defineIntegration(_breadcrumbsIntegration);\n\n/**\n * Adds a breadcrumb for Sentry events or transactions if this option is enabled.\n */\nfunction _getSentryBreadcrumbHandler(client: Client): (event: SentryEvent) => void {\n  return function addSentryBreadcrumb(event: SentryEvent): void {\n    if (getClient() !== client) {\n      return;\n    }\n\n    addBreadcrumb(\n      {\n        category: `sentry.${event.type === 'transaction' ? 'transaction' : 'event'}`,\n        event_id: event.event_id,\n        level: event.level,\n        message: getEventDescription(event),\n      },\n      {\n        event,\n      },\n    );\n  };\n}\n\n/**\n * A HOC that creates a function that creates breadcrumbs from DOM API calls.\n * This is a HOC so that we get access to dom options in the closure.\n */\nfunction _getDomBreadcrumbHandler(\n  client: Client,\n  dom: BreadcrumbsOptions['dom'],\n): (handlerData: HandlerDataDom) => void {\n  return function _innerDomBreadcrumb(handlerData: HandlerDataDom): void {\n    if (getClient() !== client) {\n      return;\n    }\n\n    let target;\n    let componentName;\n    let keyAttrs = typeof dom === 'object' ? dom.serializeAttribute : undefined;\n\n    let maxStringLength =\n      typeof dom === 'object' && typeof dom.maxStringLength === 'number' ? dom.maxStringLength : undefined;\n    if (maxStringLength && maxStringLength > MAX_ALLOWED_STRING_LENGTH) {\n      DEBUG_BUILD &&\n        debug.warn(\n          `\\`dom.maxStringLength\\` cannot exceed ${MAX_ALLOWED_STRING_LENGTH}, but a value of ${maxStringLength} was configured. Sentry will use ${MAX_ALLOWED_STRING_LENGTH} instead.`,\n        );\n      maxStringLength = MAX_ALLOWED_STRING_LENGTH;\n    }\n\n    if (typeof keyAttrs === 'string') {\n      keyAttrs = [keyAttrs];\n    }\n\n    // Accessing event.target can throw (see getsentry/raven-js#838, #768)\n    try {\n      const event = handlerData.event as Event | Node;\n      const element = _isEvent(event) ? event.target : event;\n\n      target = htmlTreeAsString(element, { keyAttrs, maxStringLength });\n      componentName = getComponentName(element);\n    } catch {\n      target = '<unknown>';\n    }\n\n    if (target.length === 0) {\n      return;\n    }\n\n    const breadcrumb: Breadcrumb = {\n      category: `ui.${handlerData.name}`,\n      message: target,\n    };\n\n    if (componentName) {\n      breadcrumb.data = { 'ui.component_name': componentName };\n    }\n\n    addBreadcrumb(breadcrumb, {\n      event: handlerData.event,\n      name: handlerData.name,\n      global: handlerData.global,\n    });\n  };\n}\n\n/**\n * Creates breadcrumbs from console API calls\n */\nfunction _getConsoleBreadcrumbHandler(client: Client): (handlerData: HandlerDataConsole) => void {\n  return function _consoleBreadcrumb(handlerData: HandlerDataConsole): void {\n    if (getClient() !== client) {\n      return;\n    }\n\n    const breadcrumb = {\n      category: 'console',\n      data: {\n        arguments: handlerData.args,\n        logger: 'console',\n      },\n      level: severityLevelFromString(handlerData.level),\n      message: safeJoin(handlerData.args, ' '),\n    };\n\n    if (handlerData.level === 'assert') {\n      if (handlerData.args[0] === false) {\n        breadcrumb.message = `Assertion failed: ${safeJoin(handlerData.args.slice(1), ' ') || 'console.assert'}`;\n        breadcrumb.data.arguments = handlerData.args.slice(1);\n      } else {\n        // Don't capture a breadcrumb for passed assertions\n        return;\n      }\n    }\n\n    addBreadcrumb(breadcrumb, {\n      input: handlerData.args,\n      level: handlerData.level,\n    });\n  };\n}\n\n/**\n * Creates breadcrumbs from XHR API calls\n */\nfunction _getXhrBreadcrumbHandler(client: Client): (handlerData: HandlerDataXhr) => void {\n  return function _xhrBreadcrumb(handlerData: HandlerDataXhr): void {\n    if (getClient() !== client) {\n      return;\n    }\n\n    const { startTimestamp, endTimestamp } = handlerData;\n\n    const sentryXhrData = handlerData.xhr[SENTRY_XHR_DATA_KEY];\n\n    // We only capture complete, non-sentry requests\n    if (!startTimestamp || !endTimestamp || !sentryXhrData) {\n      return;\n    }\n\n    const { method, url, status_code, body } = sentryXhrData;\n\n    const data: XhrBreadcrumbData = {\n      method,\n      url,\n      status_code,\n    };\n\n    const hint: XhrBreadcrumbHint = {\n      xhr: handlerData.xhr,\n      input: body,\n      startTimestamp,\n      endTimestamp,\n    };\n\n    const breadcrumb = {\n      category: 'xhr',\n      data,\n      type: 'http',\n      level: getBreadcrumbLogLevelFromHttpStatusCode(status_code),\n    };\n\n    client.emit('beforeOutgoingRequestBreadcrumb', breadcrumb, hint as XhrHint);\n\n    addBreadcrumb(breadcrumb, hint);\n  };\n}\n\n/**\n * Creates breadcrumbs from fetch API calls\n */\nfunction _getFetchBreadcrumbHandler(client: Client): (handlerData: HandlerDataFetch) => void {\n  return function _fetchBreadcrumb(handlerData: HandlerDataFetch): void {\n    if (getClient() !== client) {\n      return;\n    }\n\n    const { startTimestamp, endTimestamp } = handlerData;\n\n    // We only capture complete fetch requests\n    if (!endTimestamp) {\n      return;\n    }\n\n    if (handlerData.fetchData.url.match(/sentry_key/) && handlerData.fetchData.method === 'POST') {\n      // We will not create breadcrumbs for fetch requests that contain `sentry_key` (internal sentry requests)\n      return;\n    }\n\n    if (handlerData.error) {\n      const hint: FetchBreadcrumbHint = {\n        data: handlerData.error,\n        input: handlerData.args,\n        startTimestamp,\n        endTimestamp,\n      };\n\n      const breadcrumb = {\n        category: 'fetch',\n        data: handlerData.fetchData,\n        level: 'error',\n        type: 'http',\n      } satisfies Breadcrumb;\n\n      client.emit('beforeOutgoingRequestBreadcrumb', breadcrumb, hint as FetchHint);\n\n      addBreadcrumb(breadcrumb, hint);\n    } else {\n      const response = handlerData.response as Response | undefined;\n      const data: FetchBreadcrumbData = {\n        ...handlerData.fetchData,\n        status_code: response?.status,\n      };\n\n      const hint: FetchBreadcrumbHint = {\n        input: handlerData.args,\n        response,\n        startTimestamp,\n        endTimestamp,\n      };\n\n      const breadcrumb = {\n        category: 'fetch',\n        data,\n        type: 'http',\n        level: getBreadcrumbLogLevelFromHttpStatusCode(data.status_code),\n      };\n\n      client.emit('beforeOutgoingRequestBreadcrumb', breadcrumb, hint as FetchHint);\n\n      addBreadcrumb(breadcrumb, hint);\n    }\n  };\n}\n\n/**\n * Creates breadcrumbs from history API calls\n */\nfunction _getHistoryBreadcrumbHandler(client: Client): (handlerData: HandlerDataHistory) => void {\n  return function _historyBreadcrumb(handlerData: HandlerDataHistory): void {\n    if (getClient() !== client) {\n      return;\n    }\n\n    let from: string | undefined = handlerData.from;\n    let to: string | undefined = handlerData.to;\n    const parsedLoc = parseUrl(WINDOW.location.href);\n    let parsedFrom = from ? parseUrl(from) : undefined;\n    const parsedTo = parseUrl(to);\n\n    // Initial pushState doesn't provide `from` information\n    if (!parsedFrom?.path) {\n      parsedFrom = parsedLoc;\n    }\n\n    // Use only the path component of the URL if the URL matches the current\n    // document (almost all the time when using pushState)\n    if (parsedLoc.protocol === parsedTo.protocol && parsedLoc.host === parsedTo.host) {\n      to = parsedTo.relative;\n    }\n    if (parsedLoc.protocol === parsedFrom.protocol && parsedLoc.host === parsedFrom.host) {\n      from = parsedFrom.relative;\n    }\n\n    addBreadcrumb({\n      category: 'navigation',\n      data: {\n        from,\n        to,\n      },\n    });\n  };\n}\n\nfunction _isEvent(event: unknown): event is Event {\n  return !!event && !!(event as Record<string, unknown>).target;\n}\n","import type { IntegrationFn, WrappedFunction } from '@sentry/core/browser';\nimport { defineIntegration, fill, getFunctionName, getOriginalFunction } from '@sentry/core/browser';\nimport { WINDOW, wrap } from '../helpers';\n\n// Using a comma-separated string and split for smaller bundle size vs an array literal\nconst DEFAULT_EVENT_TARGET =\n  'EventTarget,Window,Node,ApplicationCache,AudioTrackList,BroadcastChannel,ChannelMergerNode,CryptoOperation,EventSource,FileReader,HTMLUnknownElement,IDBDatabase,IDBRequest,IDBTransaction,KeyOperation,MediaController,MessagePort,ModalWindow,Notification,SVGElementInstance,Screen,SharedWorker,TextTrack,TextTrackCue,TextTrackList,WebSocket,WebSocketWorker,Worker,XMLHttpRequest,XMLHttpRequestEventTarget,XMLHttpRequestUpload'.split(\n    ',',\n  );\n\nconst INTEGRATION_NAME = 'BrowserApiErrors' as const;\n\ntype XMLHttpRequestProp = 'onload' | 'onerror' | 'onprogress' | 'onreadystatechange';\n\ninterface BrowserApiErrorsOptions {\n  setTimeout: boolean;\n  setInterval: boolean;\n  requestAnimationFrame: boolean;\n  XMLHttpRequest: boolean;\n  eventTarget: boolean | string[];\n\n  /**\n   * If you experience issues with this integration causing double-invocations of event listeners,\n   * try setting this option to `true`. It will unregister the original callbacks from the event targets\n   * before adding the instrumented callback.\n   *\n   * @default false\n   */\n  unregisterOriginalCallbacks: boolean;\n}\n\nconst _browserApiErrorsIntegration = ((options: Partial<BrowserApiErrorsOptions> = {}) => {\n  const _options = {\n    XMLHttpRequest: true,\n    eventTarget: true,\n    requestAnimationFrame: true,\n    setInterval: true,\n    setTimeout: true,\n    unregisterOriginalCallbacks: false,\n    ...options,\n  };\n\n  return {\n    name: INTEGRATION_NAME,\n    // TODO: This currently only works for the first client this is setup\n    // We may want to adjust this to check for client etc.\n    setupOnce() {\n      if (_options.setTimeout) {\n        fill(WINDOW, 'setTimeout', _wrapTimeFunction);\n      }\n\n      if (_options.setInterval) {\n        fill(WINDOW, 'setInterval', _wrapTimeFunction);\n      }\n\n      if (_options.requestAnimationFrame) {\n        fill(WINDOW, 'requestAnimationFrame', _wrapRAF);\n      }\n\n      if (_options.XMLHttpRequest && 'XMLHttpRequest' in WINDOW) {\n        fill(XMLHttpRequest.prototype, 'send', _wrapXHR);\n      }\n\n      const eventTargetOption = _options.eventTarget;\n      if (eventTargetOption) {\n        const eventTarget = Array.isArray(eventTargetOption) ? eventTargetOption : DEFAULT_EVENT_TARGET;\n        eventTarget.forEach(target => _wrapEventTarget(target, _options));\n      }\n    },\n  };\n}) satisfies IntegrationFn;\n\n/**\n * Wrap timer functions and event targets to catch errors and provide better meta data.\n */\nexport const browserApiErrorsIntegration = defineIntegration(_browserApiErrorsIntegration);\n\nfunction _wrapTimeFunction(original: () => void): () => number {\n  return function (this: unknown, ...args: unknown[]): number {\n    const originalCallback = args[0];\n    args[0] = wrap(originalCallback, {\n      mechanism: {\n        handled: false,\n        type: `auto.browser.browserapierrors.${getFunctionName(original)}`,\n      },\n    });\n    return original.apply(this, args);\n  };\n}\n\nfunction _wrapRAF(original: () => void): (callback: () => void) => unknown {\n  return function (this: unknown, callback: () => void): () => void {\n    return original.apply(this, [\n      wrap(callback, {\n        mechanism: {\n          data: {\n            handler: getFunctionName(original),\n          },\n          handled: false,\n          type: 'auto.browser.browserapierrors.requestAnimationFrame',\n        },\n      }),\n    ]);\n  };\n}\n\nfunction _wrapXHR(originalSend: () => void): () => void {\n  return function (this: XMLHttpRequest, ...args: unknown[]): void {\n    // eslint-disable-next-line @typescript-eslint/no-this-alias\n    const xhr = this;\n    const xmlHttpRequestProps: XMLHttpRequestProp[] = ['onload', 'onerror', 'onprogress', 'onreadystatechange'];\n\n    xmlHttpRequestProps.forEach(prop => {\n      if (prop in xhr && typeof xhr[prop] === 'function') {\n        fill(xhr, prop, function (original) {\n          const wrapOptions = {\n            mechanism: {\n              data: {\n                handler: getFunctionName(original),\n              },\n              handled: false,\n              type: `auto.browser.browserapierrors.xhr.${prop}`,\n            },\n          };\n\n          // If Instrument integration has been called before BrowserApiErrors, get the name of original function\n          const originalFunction = getOriginalFunction(original);\n          if (originalFunction) {\n            wrapOptions.mechanism.data.handler = getFunctionName(originalFunction);\n          }\n\n          // Otherwise wrap directly\n          return wrap(original, wrapOptions);\n        });\n      }\n    });\n\n    return originalSend.apply(this, args);\n  };\n}\n\nfunction _wrapEventTarget(target: string, integrationOptions: BrowserApiErrorsOptions): void {\n  const globalObject = WINDOW as unknown as Record<string, { prototype?: object }>;\n  const proto = globalObject[target]?.prototype;\n\n  // eslint-disable-next-line no-prototype-builtins\n  if (!proto?.hasOwnProperty?.('addEventListener')) {\n    return;\n  }\n\n  fill(proto, 'addEventListener', function (original: VoidFunction): (\n    ...args: Parameters<typeof WINDOW.addEventListener>\n  ) => ReturnType<typeof WINDOW.addEventListener> {\n    return function (this: unknown, eventName, fn, options): VoidFunction {\n      try {\n        if (isEventListenerObject(fn)) {\n          // ESlint disable explanation:\n          //  First, it is generally safe to call `wrap` with an unbound function. Furthermore, using `.bind()` would\n          //  introduce a bug here, because bind returns a new function that doesn't have our\n          //  flags(like __sentry_original__) attached. `wrap` checks for those flags to avoid unnecessary wrapping.\n          //  Without those flags, every call to addEventListener wraps the function again, causing a memory leak.\n          // eslint-disable-next-line @typescript-eslint/unbound-method\n          fn.handleEvent = wrap(fn.handleEvent, {\n            mechanism: {\n              data: {\n                handler: getFunctionName(fn),\n                target,\n              },\n              handled: false,\n              type: 'auto.browser.browserapierrors.handleEvent',\n            },\n          });\n        }\n      } catch {\n        // can sometimes get 'Permission denied to access property \"handle Event'\n      }\n\n      if (integrationOptions.unregisterOriginalCallbacks) {\n        unregisterOriginalCallback(this, eventName, fn);\n      }\n\n      return original.apply(this, [\n        eventName,\n        wrap(fn, {\n          mechanism: {\n            data: {\n              handler: getFunctionName(fn),\n              target,\n            },\n            handled: false,\n            type: 'auto.browser.browserapierrors.addEventListener',\n          },\n        }),\n        options,\n      ]);\n    };\n  });\n\n  fill(proto, 'removeEventListener', function (originalRemoveEventListener: VoidFunction): (\n    this: unknown,\n    ...args: Parameters<typeof WINDOW.removeEventListener>\n  ) => ReturnType<typeof WINDOW.removeEventListener> {\n    return function (this: unknown, eventName, fn, options): VoidFunction {\n      /**\n       * There are 2 possible scenarios here:\n       *\n       * 1. Someone passes a callback, which was attached prior to Sentry initialization, or by using unmodified\n       * method, eg. `document.addEventListener.call(el, name, handler). In this case, we treat this function\n       * as a pass-through, and call original `removeEventListener` with it.\n       *\n       * 2. Someone passes a callback, which was attached after Sentry was initialized, which means that it was using\n       * our wrapped version of `addEventListener`, which internally calls `wrap` helper.\n       * This helper \"wraps\" whole callback inside a try/catch statement, and attached appropriate metadata to it,\n       * in order for us to make a distinction between wrapped/non-wrapped functions possible.\n       * If a function was wrapped, it has additional property of `__sentry_wrapped__`, holding the handler.\n       *\n       * When someone adds a handler prior to initialization, and then do it again, but after,\n       * then we have to detach both of them. Otherwise, if we'd detach only wrapped one, it'd be impossible\n       * to get rid of the initial handler and it'd stick there forever.\n       */\n      try {\n        // Check via hasOwnProperty so a `__sentry_wrapped__` inherited from a wrapped\n        // `Function.prototype` doesn't cause removal of the wrong handler.\n        if (Object.prototype.hasOwnProperty.call(fn, '__sentry_wrapped__')) {\n          const originalEventHandler = (fn as WrappedFunction).__sentry_wrapped__;\n          if (originalEventHandler) {\n            originalRemoveEventListener.call(this, eventName, originalEventHandler, options);\n          }\n        }\n      } catch {\n        // ignore, accessing __sentry_wrapped__ will throw in some Selenium environments\n      }\n      return originalRemoveEventListener.call(this, eventName, fn, options);\n    };\n  });\n}\n\nfunction isEventListenerObject(obj: unknown): obj is EventListenerObject {\n  return typeof (obj as EventListenerObject).handleEvent === 'function';\n}\n\nfunction unregisterOriginalCallback(target: unknown, eventName: string, fn: EventListenerOrEventListenerObject): void {\n  if (\n    target &&\n    typeof target === 'object' &&\n    'removeEventListener' in target &&\n    typeof target.removeEventListener === 'function'\n  ) {\n    target.removeEventListener(eventName, fn);\n  }\n}\n","import { captureSession, debug, defineIntegration, getIsolationScope, startSession } from '@sentry/core/browser';\nimport { addHistoryInstrumentationHandler, whenIdleOrHidden } from '@sentry/browser-utils';\nimport { DEBUG_BUILD } from '../debug-build';\nimport { WINDOW } from '../helpers';\n\ninterface BrowserSessionOptions {\n  /**\n   * Controls the session lifecycle - when new sessions are created.\n   *\n   * - `'route'`: A session is created on page load and on every navigation.\n   *   This is the default behavior.\n   * - `'page'`: A session is created once when the page is loaded. Session is not\n   *   updated on navigation. This is useful for webviews or single-page apps where\n   *   URL changes should not trigger new sessions.\n   *\n   * @default 'route'\n   */\n  lifecycle?: 'route' | 'page';\n}\n\n/**\n * When added, automatically creates sessions which allow you to track adoption and crashes (crash free rate) in your Releases in Sentry.\n * More information: https://docs.sentry.io/product/releases/health/\n *\n * Note: In order for session tracking to work, you need to set up Releases: https://docs.sentry.io/product/releases/\n */\nexport const browserSessionIntegration = defineIntegration((options: BrowserSessionOptions = {}) => {\n  const lifecycle = options.lifecycle ?? 'route';\n\n  return {\n    name: 'BrowserSession' as const,\n    setupOnce() {\n      if (typeof WINDOW.document === 'undefined') {\n        DEBUG_BUILD &&\n          debug.warn('Using the `browserSessionIntegration` in non-browser environments is not supported.');\n        return;\n      }\n\n      // The session duration for browser sessions does not track a meaningful\n      // concept that can be used as a metric.\n      // Automatically captured sessions are akin to page views, and thus we\n      // discard their duration.\n      startSession({ ignoreDuration: true });\n\n      // Sending the session envelope synchronously in `init()` runs the full send\n      // pipeline during page load, competing with critical resources for the network and\n      // adding overhead that measurably hurts LCP. We defer the initial send until the\n      // browser is idle; `whenIdleOrHidden` flushes it on page-hide so we don't lose short\n      // (page-view-like) sessions.\n      let initialSessionSent = false;\n      whenIdleOrHidden(() => {\n        // A navigation (in `'route'` lifecycle) may start and send a new session before this\n        // deferred callback fires. In that case the current session was already sent, so\n        // re-capturing here would send it a second time - guard against that.\n        if (!initialSessionSent) {\n          captureSession();\n          initialSessionSent = true;\n        }\n      });\n\n      // User data can be set at any time, for example async after Sentry.init has run and the initial session\n      // envelope was already sent, but still on the initial page.\n      // Therefore, we have to update the ongoing session with the new user data if it exists, to send the `did`.\n      // In theory, sessions, as well as user data is always put onto the isolation scope. So we listen to the\n      // isolation scope for changes and update the session with the new user data if it exists.\n      // This will not catch users set onto other scopes, like the current scope. For now, we'll accept this limitation.\n      // The alternative is to update and capture the session from within the scope. This could be too costly or would not\n      // play well with session aggregates on the server side. Since this happens in the scope class, we'd need change\n      // scope behaviour in the browser.\n      const isolationScope = getIsolationScope();\n      let previousUser = isolationScope.getUser();\n      isolationScope.addScopeListener(scope => {\n        const maybeNewUser = scope.getUser();\n        // sessions only care about user id and ip address, so we only need to capture the session if the user has changed\n        if (previousUser?.id !== maybeNewUser?.id || previousUser?.ip_address !== maybeNewUser?.ip_address) {\n          previousUser = maybeNewUser;\n          // Only emit a dedicated update envelope for user data that arrives _after_ the\n          // deferred initial session was sent. User data set during page load is already\n          // reflected in that session (the scope writes it onto the session), so capturing\n          // here would send a redundant envelope - and do so during page load, which is\n          // exactly the overhead we're deferring away from.\n          if (initialSessionSent) {\n            captureSession();\n          }\n        }\n      });\n\n      if (lifecycle === 'route') {\n        // We want to create a session for every navigation as well\n        addHistoryInstrumentationHandler(({ from, to }) => {\n          // Don't create an additional session for the initial route or if the location did not change\n          if (from !== to) {\n            startSession({ ignoreDuration: true });\n            captureSession();\n            // A session has now been sent, so the deferred initial capture (if still pending)\n            // must not re-send this navigation session.\n            initialSessionSent = true;\n          }\n        });\n      }\n    },\n  };\n});\n","import type { Event, IntegrationFn, StackFrame } from '@sentry/core/browser';\nimport { addContextToFrame, defineIntegration, GLOBAL_OBJ, stripUrlQueryAndFragment } from '@sentry/core/browser';\n\nconst WINDOW = GLOBAL_OBJ as typeof GLOBAL_OBJ & Window;\n\nconst DEFAULT_LINES_OF_CONTEXT = 7;\n\nconst INTEGRATION_NAME = 'ContextLines' as const;\n\n// TODO(v11): Use `dataCollection.frameContextLines` default (5)\ninterface ContextLinesOptions {\n  /**\n   * Sets the number of context lines for each frame when loading a file.\n   * Defaults to 7.\n   *\n   * Set to 0 to disable loading and inclusion of source files.\n   *\n   * When set, this option takes precedence over `dataCollection.frameContextLines`.\n   **/\n  frameContextLines?: number;\n}\n\nconst _contextLinesIntegration = ((options: ContextLinesOptions = {}) => {\n  return {\n    name: INTEGRATION_NAME,\n    processEvent(event, _hint, client) {\n      const contextLines =\n        options.frameContextLines ?? client?.getDataCollectionOptions().frameContextLines ?? DEFAULT_LINES_OF_CONTEXT;\n      return addSourceContext(event, contextLines);\n    },\n  };\n}) satisfies IntegrationFn;\n\n/**\n * Collects source context lines around the lines of stackframes pointing to JS embedded in\n * the current page's HTML.\n *\n * This integration DOES NOT work for stack frames pointing to JS files that are loaded by the browser.\n * For frames pointing to files, context lines are added during ingestion and symbolication\n * by attempting to download the JS files to the Sentry backend.\n *\n * Use this integration if you have inline JS code in HTML pages that can't be accessed\n * by our backend (e.g. due to a login-protected page).\n */\nexport const contextLinesIntegration = defineIntegration(_contextLinesIntegration);\n\n/**\n * Processes an event and adds context lines.\n */\nfunction addSourceContext(event: Event, contextLines: number): Event {\n  const doc = WINDOW.document;\n  const htmlFilename = WINDOW.location && stripUrlQueryAndFragment(WINDOW.location.href);\n  if (!doc || !htmlFilename) {\n    return event;\n  }\n\n  const exceptions = event.exception?.values;\n  if (!exceptions?.length) {\n    return event;\n  }\n\n  const html = doc.documentElement.innerHTML;\n  if (!html) {\n    return event;\n  }\n\n  const htmlLines = ['<!DOCTYPE html>', '<html>', ...html.split('\\n'), '</html>'];\n\n  exceptions.forEach(exception => {\n    const stacktrace = exception.stacktrace;\n    if (stacktrace?.frames) {\n      stacktrace.frames = stacktrace.frames.map(frame =>\n        applySourceContextToFrame(frame, htmlLines, htmlFilename, contextLines),\n      );\n    }\n  });\n\n  return event;\n}\n\n/**\n * Only exported for testing\n */\nexport function applySourceContextToFrame(\n  frame: StackFrame,\n  htmlLines: string[],\n  htmlFilename: string,\n  linesOfContext: number,\n): StackFrame {\n  if (frame.filename !== htmlFilename || !frame.lineno || !htmlLines.length) {\n    return frame;\n  }\n\n  addContextToFrame(htmlLines, frame, linesOfContext);\n\n  return frame;\n}\n","import type { CultureContext, IntegrationFn } from '@sentry/core/browser';\nimport { defineIntegration, safeSetSpanJSONAttributes } from '@sentry/core/browser';\nimport { WINDOW } from '../helpers';\n\nconst INTEGRATION_NAME = 'CultureContext' as const;\n\nconst _cultureContextIntegration = (() => {\n  return {\n    name: INTEGRATION_NAME,\n    preprocessEvent(event) {\n      const culture = getCultureContext();\n\n      if (culture) {\n        event.contexts = {\n          ...event.contexts,\n          culture: { ...culture, ...event.contexts?.culture },\n        };\n      }\n    },\n    processSegmentSpan(span) {\n      const culture = getCultureContext();\n\n      if (culture) {\n        safeSetSpanJSONAttributes(span, {\n          'culture.locale': culture.locale,\n          'culture.timezone': culture.timezone,\n          'culture.calendar': culture.calendar,\n        });\n      }\n    },\n  };\n}) satisfies IntegrationFn;\n\n/**\n * Captures culture context from the browser.\n *\n * Enabled by default.\n *\n * @example\n * ```js\n * import * as Sentry from '@sentry/browser';\n *\n * Sentry.init({\n *   integrations: [Sentry.cultureContextIntegration()],\n * });\n * ```\n */\nexport const cultureContextIntegration = defineIntegration(_cultureContextIntegration);\n\n/**\n * Returns the culture context from the browser's Intl API.\n */\nfunction getCultureContext(): CultureContext | undefined {\n  try {\n    const intl = (WINDOW as { Intl?: typeof Intl }).Intl;\n    if (!intl) {\n      return undefined;\n    }\n\n    const options = intl.DateTimeFormat().resolvedOptions();\n\n    return {\n      locale: options.locale,\n      timezone: options.timeZone,\n      calendar: options.calendar,\n    };\n  } catch {\n    // Ignore errors\n    return undefined;\n  }\n}\n","import type { IntegrationFn } from '@sentry/core/browser';\nimport { growthbookIntegration as coreGrowthbookIntegration } from '@sentry/core/browser';\nimport type { GrowthBookClass } from './types';\n\n/**\n * Sentry integration for capturing feature flag evaluations from GrowthBook.\n *\n * See the feature flag documentation: https://develop.sentry.dev/sdk/expected-features/#feature-flags\n *\n * @example\n * ```\n * import { GrowthBook } from '@growthbook/growthbook';\n * import * as Sentry from '@sentry/browser';\n *\n * Sentry.init({\n *   dsn: '___PUBLIC_DSN___',\n *   integrations: [Sentry.growthbookIntegration({ growthbookClass: GrowthBook })],\n * });\n *\n * const gb = new GrowthBook();\n * gb.isOn('my-feature');\n * Sentry.captureException(new Error('something went wrong'));\n * ```\n */\nexport const growthbookIntegration = (({ growthbookClass }: { growthbookClass: GrowthBookClass }) =>\n  coreGrowthbookIntegration({ growthbookClass })) satisfies IntegrationFn;\n","import type { Client, Event, EventHint, IntegrationFn } from '@sentry/core/browser';\nimport {\n  _INTERNAL_addFeatureFlagToActiveSpan,\n  _INTERNAL_copyFlagsFromScopeToEvent,\n  _INTERNAL_insertFlagToScope,\n  defineIntegration,\n} from '@sentry/core/browser';\nimport type { LDContext, LDEvaluationDetail, LDInspectionFlagUsedHandler } from './types';\n\n/**\n * Sentry integration for capturing feature flag evaluations from LaunchDarkly.\n *\n * See the [feature flag documentation](https://develop.sentry.dev/sdk/expected-features/#feature-flags) for more information.\n *\n * @example\n * ```\n * import * as Sentry from '@sentry/browser';\n * import {launchDarklyIntegration, buildLaunchDarklyFlagUsedInspector} from '@sentry/browser';\n * import * as LaunchDarkly from 'launchdarkly-js-client-sdk';\n *\n * Sentry.init(..., integrations: [launchDarklyIntegration()])\n * const ldClient = LaunchDarkly.initialize(..., {inspectors: [buildLaunchDarklyFlagUsedHandler()]});\n * ```\n */\nexport const launchDarklyIntegration = defineIntegration(() => {\n  return {\n    name: 'LaunchDarkly' as const,\n\n    processEvent(event: Event, _hint: EventHint, _client: Client): Event {\n      return _INTERNAL_copyFlagsFromScopeToEvent(event);\n    },\n  };\n}) satisfies IntegrationFn;\n\n/**\n * LaunchDarkly hook to listen for and buffer flag evaluations. This needs to\n * be registered as an 'inspector' in LaunchDarkly initialize() options,\n * separately from `launchDarklyIntegration`. Both the hook and the integration\n * are needed to capture LaunchDarkly flags.\n */\nexport function buildLaunchDarklyFlagUsedHandler(): LDInspectionFlagUsedHandler {\n  return {\n    name: 'sentry-flag-auditor',\n    type: 'flag-used',\n\n    synchronous: true,\n\n    /**\n     * Handle a flag evaluation by storing its name and value on the current scope.\n     */\n    method: (flagKey: string, flagDetail: LDEvaluationDetail, _context: LDContext) => {\n      _INTERNAL_insertFlagToScope(flagKey, flagDetail.value);\n      _INTERNAL_addFeatureFlagToActiveSpan(flagKey, flagDetail.value);\n    },\n  };\n}\n","/**\n * Sentry integration for capturing OpenFeature feature flag evaluations.\n *\n * See the [feature flag documentation](https://develop.sentry.dev/sdk/expected-features/#feature-flags) for more information.\n *\n * @example\n * ```\n * import * as Sentry from \"@sentry/browser\";\n * import { OpenFeature } from \"@openfeature/web-sdk\";\n *\n * Sentry.init(..., integrations: [Sentry.openFeatureIntegration()]);\n * OpenFeature.setProvider(new MyProviderOfChoice());\n * OpenFeature.addHooks(new Sentry.OpenFeatureIntegrationHook());\n * ```\n */\nimport type { Client, Event, EventHint, IntegrationFn } from '@sentry/core/browser';\nimport {\n  _INTERNAL_addFeatureFlagToActiveSpan,\n  _INTERNAL_copyFlagsFromScopeToEvent,\n  _INTERNAL_insertFlagToScope,\n  defineIntegration,\n} from '@sentry/core/browser';\nimport type { EvaluationDetails, HookContext, HookHints, JsonValue, OpenFeatureHook } from './types';\n\nexport const openFeatureIntegration = defineIntegration(() => {\n  return {\n    name: 'OpenFeature' as const,\n\n    processEvent(event: Event, _hint: EventHint, _client: Client): Event {\n      return _INTERNAL_copyFlagsFromScopeToEvent(event);\n    },\n  };\n}) satisfies IntegrationFn;\n\n/**\n * OpenFeature Hook class implementation.\n */\nexport class OpenFeatureIntegrationHook implements OpenFeatureHook {\n  /**\n   * Successful evaluation result.\n   */\n  public after(_hookContext: Readonly<HookContext<JsonValue>>, evaluationDetails: EvaluationDetails<JsonValue>): void {\n    _INTERNAL_insertFlagToScope(evaluationDetails.flagKey, evaluationDetails.value);\n    _INTERNAL_addFeatureFlagToActiveSpan(evaluationDetails.flagKey, evaluationDetails.value);\n  }\n\n  /**\n   * On error evaluation result.\n   */\n  public error(hookContext: Readonly<HookContext<JsonValue>>, _error: unknown, _hookHints?: HookHints): void {\n    _INTERNAL_insertFlagToScope(hookContext.flagKey, hookContext.defaultValue);\n    _INTERNAL_addFeatureFlagToActiveSpan(hookContext.flagKey, hookContext.defaultValue);\n  }\n}\n","import type { Client, Event, EventHint, IntegrationFn } from '@sentry/core/browser';\nimport {\n  _INTERNAL_addFeatureFlagToActiveSpan,\n  _INTERNAL_copyFlagsFromScopeToEvent,\n  _INTERNAL_insertFlagToScope,\n  defineIntegration,\n} from '@sentry/core/browser';\nimport type { FeatureGate, StatsigClient } from './types';\n\n/**\n * Sentry integration for capturing feature flag evaluations from the Statsig js-client SDK.\n *\n * See the [feature flag documentation](https://develop.sentry.dev/sdk/expected-features/#feature-flags) for more information.\n *\n * @example\n * ```\n * import { StatsigClient } from '@statsig/js-client';\n * import * as Sentry from '@sentry/browser';\n *\n * const statsigClient = new StatsigClient();\n *\n * Sentry.init({\n *   dsn: '___PUBLIC_DSN___',\n *   integrations: [Sentry.statsigIntegration({featureFlagClient: statsigClient})],\n * });\n *\n * await statsigClient.initializeAsync();  // or statsigClient.initializeSync();\n *\n * const result = statsigClient.checkGate('my-feature-gate');\n * Sentry.captureException(new Error('something went wrong'));\n * ```\n */\nexport const statsigIntegration = defineIntegration(\n  ({ featureFlagClient: statsigClient }: { featureFlagClient: StatsigClient }) => {\n    return {\n      name: 'Statsig' as const,\n\n      setup(_client: Client) {\n        statsigClient.on('gate_evaluation', (event: { gate: FeatureGate }) => {\n          _INTERNAL_insertFlagToScope(event.gate.name, event.gate.value);\n          _INTERNAL_addFeatureFlagToActiveSpan(event.gate.name, event.gate.value);\n        });\n      },\n\n      processEvent(event: Event, _hint: EventHint, _client: Client): Event {\n        return _INTERNAL_copyFlagsFromScopeToEvent(event);\n      },\n    };\n  },\n) satisfies IntegrationFn;\n","import type { Client, Event, EventHint, IntegrationFn } from '@sentry/core/browser';\nimport {\n  _INTERNAL_addFeatureFlagToActiveSpan,\n  _INTERNAL_copyFlagsFromScopeToEvent,\n  _INTERNAL_insertFlagToScope,\n  debug,\n  defineIntegration,\n  fill,\n} from '@sentry/core/browser';\nimport { DEBUG_BUILD } from '../../../debug-build';\nimport type { UnleashClient, UnleashClientClass } from './types';\n\ntype UnleashIntegrationOptions = {\n  featureFlagClientClass: UnleashClientClass;\n};\n\n/**\n * Sentry integration for capturing feature flag evaluations from the Unleash SDK.\n *\n * See the [feature flag documentation](https://develop.sentry.dev/sdk/expected-features/#feature-flags) for more information.\n *\n * @example\n * ```\n * import { UnleashClient } from 'unleash-proxy-client';\n * import * as Sentry from '@sentry/browser';\n *\n * Sentry.init({\n *   dsn: '___PUBLIC_DSN___',\n *   integrations: [Sentry.unleashIntegration({featureFlagClientClass: UnleashClient})],\n * });\n *\n * const unleash = new UnleashClient(...);\n * unleash.start();\n *\n * unleash.isEnabled('my-feature');\n * Sentry.captureException(new Error('something went wrong'));\n * ```\n */\nexport const unleashIntegration = defineIntegration(\n  ({ featureFlagClientClass: unleashClientClass }: UnleashIntegrationOptions) => {\n    return {\n      name: 'Unleash' as const,\n\n      setupOnce() {\n        const unleashClientPrototype = unleashClientClass.prototype as UnleashClient;\n        fill(unleashClientPrototype, 'isEnabled', _wrappedIsEnabled);\n      },\n\n      processEvent(event: Event, _hint: EventHint, _client: Client): Event {\n        return _INTERNAL_copyFlagsFromScopeToEvent(event);\n      },\n    };\n  },\n) satisfies IntegrationFn;\n\n/**\n * Wraps the UnleashClient.isEnabled method to capture feature flag evaluations. Its only side effect is writing to Sentry scope.\n *\n * This wrapper is safe for all isEnabled signatures. If the signature does not match (this: UnleashClient, toggleName: string, ...args: unknown[]) => boolean,\n * we log an error and return the original result.\n *\n * @param original - The original method.\n * @returns Wrapped method. Results should match the original.\n */\nfunction _wrappedIsEnabled(\n  original: (this: UnleashClient, ...args: unknown[]) => unknown,\n): (this: UnleashClient, ...args: unknown[]) => unknown {\n  return function (this: UnleashClient, ...args: unknown[]): unknown {\n    const toggleName = args[0];\n    const result = original.apply(this, args);\n\n    if (typeof toggleName === 'string' && typeof result === 'boolean') {\n      _INTERNAL_insertFlagToScope(toggleName, result);\n      _INTERNAL_addFeatureFlagToActiveSpan(toggleName, result);\n    } else if (DEBUG_BUILD) {\n      debug.error(\n        `[Feature Flags] UnleashClient.isEnabled does not match expected signature. arg0: ${toggleName} (${typeof toggleName}), result: ${result} (${typeof result})`,\n      );\n    }\n    return result;\n  };\n}\n","import type { IntegrationFn, Span } from '@sentry/core';\nimport {\n  addFetchEndInstrumentationHandler,\n  addFetchInstrumentationHandler,\n  defineIntegration,\n  getSanitizedUrlStringFromUrlObject,\n  parseStringToURLObject,\n  SEMANTIC_ATTRIBUTE_SENTRY_OP,\n  SEMANTIC_ATTRIBUTE_SENTRY_ORIGIN,\n  startInactiveSpan,\n  stripDataUrlContent,\n} from '@sentry/core';\n\nconst responseToStreamSpan = new WeakMap<object, Span>();\nconst responseToFallbackTimeout = new WeakMap<object, ReturnType<typeof setTimeout>>();\n\n// Matches the max timeout in `resolveResponse` in packages/core/src/instrument/fetch.ts\nconst STREAM_RESOLVE_FALLBACK_MS = 90_000;\n\nconst STREAMING_CONTENT_TYPES = ['text/event-stream', 'application/x-ndjson', 'application/stream+json'];\n\n/**\n * Tracks streamed fetch response bodies by creating an `http.client.stream` sibling span.\n *\n * The regular `http.client` span ends when response headers arrive. This integration adds\n * a span that starts at header arrival and ends when the body fully resolves:\n *\n * ```\n * --------- pageload --------------------------------\n *     -- http.client --\n *                       -- http.client.stream -------\n * ```\n */\nexport const fetchStreamPerformanceIntegration = defineIntegration(() => {\n  return {\n    name: 'FetchStreamPerformance' as const,\n\n    setup() {\n      // End the stream span when the response body finishes resolving\n      addFetchEndInstrumentationHandler(handlerData => {\n        if (handlerData.response) {\n          const streamSpan = responseToStreamSpan.get(handlerData.response);\n          if (streamSpan && handlerData.endTimestamp) {\n            streamSpan.end(handlerData.endTimestamp);\n\n            const fallbackTimeout = responseToFallbackTimeout.get(handlerData.response);\n            if (fallbackTimeout) {\n              clearTimeout(fallbackTimeout);\n            }\n          }\n        }\n      });\n\n      addFetchInstrumentationHandler(handlerData => {\n        // Only create the stream span once headers have arrived\n        if (handlerData.endTimestamp && handlerData.response) {\n          // Only create stream spans for responses that are likely streamed:\n          // 1. No content-length header (streamed responses don't know the size upfront)\n          // 2. Content-type is a known streaming type (avoids false positives on HTTP/2\n          //    where content-length is often omitted even for regular responses)\n          const contentType = handlerData.response.headers?.get('content-type') || '';\n          if (\n            handlerData.response.headers?.get('content-length') ||\n            !STREAMING_CONTENT_TYPES.some(t => contentType.startsWith(t))\n          ) {\n            return;\n          }\n\n          const url = handlerData.fetchData?.url || '';\n          const method = handlerData.fetchData?.method || 'GET';\n\n          const parsedUrl = parseStringToURLObject(url);\n          const sanitizedUrl = url.startsWith('data:')\n            ? stripDataUrlContent(url)\n            : parsedUrl\n              ? getSanitizedUrlStringFromUrlObject(parsedUrl)\n              : url;\n\n          const streamSpan = startInactiveSpan({\n            name: `${method} ${sanitizedUrl}`,\n            startTime: handlerData.endTimestamp,\n            attributes: {\n              url: stripDataUrlContent(url),\n              'http.method': method,\n              type: 'fetch',\n              [SEMANTIC_ATTRIBUTE_SENTRY_OP]: 'http.client.stream',\n              [SEMANTIC_ATTRIBUTE_SENTRY_ORIGIN]: 'auto.http.browser.stream',\n            },\n          });\n\n          responseToStreamSpan.set(handlerData.response, streamSpan);\n\n          // prevent the span from leaking indefinitely if the body never resolves\n          const fallbackTimeout = setTimeout(() => {\n            if (streamSpan.isRecording()) {\n              streamSpan.end();\n            }\n          }, STREAM_RESOLVE_FALLBACK_MS);\n\n          responseToFallbackTimeout.set(handlerData.response, fallbackTimeout);\n        }\n      });\n    },\n  };\n}) satisfies IntegrationFn;\n","import type { Client, Event, IntegrationFn, Primitive, StackParser } from '@sentry/core/browser';\nimport {\n  addGlobalErrorInstrumentationHandler,\n  addGlobalUnhandledRejectionInstrumentationHandler,\n  captureEvent,\n  debug,\n  defineIntegration,\n  getClient,\n  getLocationHref,\n  isPrimitive,\n  isString,\n  stripDataUrlContent,\n  UNKNOWN_FUNCTION,\n} from '@sentry/core/browser';\nimport type { BrowserClient } from '../client';\nimport { DEBUG_BUILD } from '../debug-build';\nimport { eventFromUnknownInput } from '../eventbuilder';\nimport { shouldIgnoreOnError } from '../helpers';\n\ntype GlobalHandlersIntegrationsOptionKeys = 'onerror' | 'onunhandledrejection';\n\ntype GlobalHandlersIntegrations = Record<GlobalHandlersIntegrationsOptionKeys, boolean>;\n\nconst INTEGRATION_NAME = 'GlobalHandlers' as const;\n\nconst _globalHandlersIntegration = ((options: Partial<GlobalHandlersIntegrations> = {}) => {\n  const _options = {\n    onerror: true,\n    onunhandledrejection: true,\n    ...options,\n  };\n\n  return {\n    name: INTEGRATION_NAME,\n    setupOnce() {\n      Error.stackTraceLimit = 50;\n    },\n    setup(client) {\n      if (_options.onerror) {\n        _installGlobalOnErrorHandler(client);\n        globalHandlerLog('onerror');\n      }\n      if (_options.onunhandledrejection) {\n        _installGlobalOnUnhandledRejectionHandler(client);\n        globalHandlerLog('onunhandledrejection');\n      }\n    },\n  };\n}) satisfies IntegrationFn;\n\nexport const globalHandlersIntegration = defineIntegration(_globalHandlersIntegration);\n\nfunction _installGlobalOnErrorHandler(client: Client): void {\n  addGlobalErrorInstrumentationHandler(data => {\n    const { stackParser, attachStacktrace } = getOptions();\n\n    if (getClient() !== client || shouldIgnoreOnError()) {\n      return;\n    }\n\n    const { msg, url, line, column, error } = data;\n\n    const event = _enhanceEventWithInitialFrame(\n      eventFromUnknownInput(stackParser, error || msg, undefined, attachStacktrace, false),\n      url,\n      line,\n      column,\n    );\n\n    event.level = 'error';\n\n    captureEvent(event, {\n      originalException: error,\n      mechanism: {\n        handled: false,\n        type: 'auto.browser.global_handlers.onerror',\n      },\n    });\n  });\n}\n\nfunction _installGlobalOnUnhandledRejectionHandler(client: Client): void {\n  addGlobalUnhandledRejectionInstrumentationHandler(e => {\n    const { stackParser, attachStacktrace } = getOptions();\n\n    if (getClient() !== client || shouldIgnoreOnError()) {\n      return;\n    }\n\n    const error = _getUnhandledRejectionError(e);\n\n    const event = isPrimitive(error)\n      ? _eventFromRejectionWithPrimitive(error)\n      : eventFromUnknownInput(stackParser, error, undefined, attachStacktrace, true);\n\n    event.level = 'error';\n\n    captureEvent(event, {\n      originalException: error,\n      mechanism: {\n        handled: false,\n        type: 'auto.browser.global_handlers.onunhandledrejection',\n      },\n    });\n  });\n}\n\n/**\n *\n */\nexport function _getUnhandledRejectionError(error: unknown): unknown {\n  if (isPrimitive(error)) {\n    return error;\n  }\n\n  // dig the object of the rejection out of known event types\n  try {\n    type ErrorWithReason = { reason: unknown };\n    // PromiseRejectionEvents store the object of the rejection under 'reason'\n    // see https://developer.mozilla.org/en-US/docs/Web/API/PromiseRejectionEvent\n    if ('reason' in (error as ErrorWithReason)) {\n      return (error as ErrorWithReason).reason;\n    }\n\n    type CustomEventWithDetail = { detail: { reason: unknown } };\n    // something, somewhere, (likely a browser extension) effectively casts PromiseRejectionEvents\n    // to CustomEvents, moving the `promise` and `reason` attributes of the PRE into\n    // the CustomEvent's `detail` attribute, since they're not part of CustomEvent's spec\n    // see https://developer.mozilla.org/en-US/docs/Web/API/CustomEvent and\n    // https://github.com/getsentry/sentry-javascript/issues/2380\n    if ('detail' in (error as CustomEventWithDetail) && 'reason' in (error as CustomEventWithDetail).detail) {\n      return (error as CustomEventWithDetail).detail.reason;\n    }\n  } catch {} // eslint-disable-line no-empty\n\n  return error;\n}\n\n/**\n * Create an event from a promise rejection where the `reason` is a primitive.\n *\n * @param reason: The `reason` property of the promise rejection\n * @returns An Event object with an appropriate `exception` value\n */\nexport function _eventFromRejectionWithPrimitive(reason: Primitive): Event {\n  return {\n    exception: {\n      values: [\n        {\n          type: 'UnhandledRejection',\n          // String() is needed because the Primitive type includes symbols (which can't be automatically stringified)\n          value: `Non-Error promise rejection captured with value: ${String(reason)}`,\n        },\n      ],\n    },\n  };\n}\n\nfunction _enhanceEventWithInitialFrame(\n  event: Event,\n  url: string | undefined,\n  lineno: number | undefined,\n  colno: number | undefined,\n): Event {\n  // event.exception\n  const e = (event.exception = event.exception || {});\n  // event.exception.values\n  const ev = (e.values = e.values || []);\n  // event.exception.values[0]\n  const ev0 = (ev[0] = ev[0] || {});\n  // event.exception.values[0].stacktrace\n  const ev0s = (ev0.stacktrace = ev0.stacktrace || {});\n  // event.exception.values[0].stacktrace.frames\n  const ev0sf = (ev0s.frames = ev0s.frames || []);\n\n  if (ev0sf.length === 0) {\n    ev0sf.push({\n      colno,\n      lineno,\n      filename: getFilenameFromUrl(url) ?? getLocationHref(),\n      function: UNKNOWN_FUNCTION,\n      in_app: true,\n    });\n  }\n\n  return event;\n}\n\nfunction globalHandlerLog(type: string): void {\n  DEBUG_BUILD && debug.log(`Global Handler attached: ${type}`);\n}\n\nfunction getOptions(): { stackParser: StackParser; attachStacktrace?: boolean } {\n  const client = getClient<BrowserClient>();\n  const options = client?.getOptions() || {\n    stackParser: () => [],\n    attachStacktrace: false,\n  };\n  return options;\n}\n\nfunction getFilenameFromUrl(url: string | undefined): string | undefined {\n  if (!isString(url) || url.length === 0) {\n    return undefined;\n  }\n\n  // Strip data URL content to avoid long base64 strings in stack frames\n  // (e.g. when initializing a Worker with a base64 encoded script)\n  // Don't include data prefix for filenames as it's not useful for stack traces\n  // Wrap with < > to indicate it's a placeholder\n  if (url.startsWith('data:')) {\n    return `<${stripDataUrlContent(url, false)}>`;\n  }\n\n  return url;\n}\n","import type { Client, IntegrationFn } from '@sentry/core/browser';\nimport {\n  defineIntegration,\n  isObjectLike,\n  isString,\n  SEMANTIC_ATTRIBUTE_HTTP_REQUEST_METHOD,\n  SEMANTIC_ATTRIBUTE_SENTRY_OP,\n  spanToJSON,\n  stringMatchesSomePattern,\n} from '@sentry/core/browser';\nimport type { FetchHint, XhrHint } from '@sentry/browser-utils';\nimport { getBodyString, getFetchRequestArgBody, SENTRY_XHR_DATA_KEY } from '@sentry/browser-utils';\nimport { GRAPHQL_DOCUMENT, URL_FULL } from '@sentry/conventions/attributes';\n\ninterface GraphQLClientOptions {\n  endpoints: Array<string | RegExp>;\n}\n\n/** Standard graphql request shape: https://graphql.org/learn/serving-over-http/#post-request-and-body */\ninterface GraphQLStandardRequest {\n  query: string;\n  operationName?: string;\n  variables?: Record<string, unknown>;\n  extensions?: Record<string, unknown>;\n}\n\n/** Persisted operation request */\ninterface GraphQLPersistedRequest {\n  operationName: string;\n  variables?: Record<string, unknown>;\n  extensions: {\n    persistedQuery: {\n      version: number;\n      sha256Hash: string;\n    };\n  } & Record<string, unknown>;\n}\n\ntype GraphQLRequestPayload = GraphQLStandardRequest | GraphQLPersistedRequest;\n\ninterface GraphQLOperation {\n  operationType?: string;\n  operationName?: string;\n}\n\nconst INTEGRATION_NAME = 'GraphQLClient' as const;\n\nconst _graphqlClientIntegration = ((options: GraphQLClientOptions) => {\n  return {\n    name: INTEGRATION_NAME,\n    setup(client: Client) {\n      _updateSpanWithGraphQLData(client, options);\n      _updateBreadcrumbWithGraphQLData(client, options);\n    },\n  };\n}) satisfies IntegrationFn;\n\nfunction _updateSpanWithGraphQLData(client: Client, options: GraphQLClientOptions): void {\n  client.on('beforeOutgoingRequestSpan', (span, hint) => {\n    const spanJSON = spanToJSON(span);\n\n    const spanAttributes = spanJSON.data || {};\n    const spanOp = spanAttributes[SEMANTIC_ATTRIBUTE_SENTRY_OP];\n\n    const isHttpClientSpan = spanOp === 'http.client';\n\n    if (!isHttpClientSpan) {\n      return;\n    }\n\n    // Fall back to `url` because fetch instrumentation only sets `http.url` for absolute URLs;\n    // relative URLs end up only in `url` (see `getFetchSpanAttributes` in packages/core/src/fetch.ts).\n    const httpUrl = spanAttributes[URL_FULL] || spanAttributes['http.url'] || spanAttributes['url'];\n    const httpMethod = spanAttributes[SEMANTIC_ATTRIBUTE_HTTP_REQUEST_METHOD] || spanAttributes['http.method'];\n\n    if (!isString(httpUrl) || !isString(httpMethod)) {\n      return;\n    }\n\n    const { endpoints } = options;\n    const isTracedGraphqlEndpoint = stringMatchesSomePattern(httpUrl, endpoints);\n    const payload = getRequestPayloadXhrOrFetch(hint as XhrHint | FetchHint);\n\n    if (isTracedGraphqlEndpoint && payload) {\n      const graphqlBody = getGraphQLRequestPayload(payload);\n\n      if (graphqlBody) {\n        const operationInfo = _getGraphQLOperation(graphqlBody);\n        span.updateName(`${httpMethod} ${httpUrl} (${operationInfo})`);\n\n        // Handle standard requests - capture the query document when enabled via dataCollection (default true)\n        if (isStandardRequest(graphqlBody) && client.getDataCollectionOptions().graphQL.document === true) {\n          span.setAttribute(GRAPHQL_DOCUMENT, graphqlBody.query);\n        }\n\n        // Handle persisted operations - capture hash for debugging\n        if (isPersistedRequest(graphqlBody)) {\n          span.setAttribute('graphql.persisted_query.hash.sha256', graphqlBody.extensions.persistedQuery.sha256Hash);\n          span.setAttribute('graphql.persisted_query.version', graphqlBody.extensions.persistedQuery.version);\n        }\n      }\n    }\n  });\n}\n\nfunction _updateBreadcrumbWithGraphQLData(client: Client, options: GraphQLClientOptions): void {\n  client.on('beforeOutgoingRequestBreadcrumb', (breadcrumb, handlerData) => {\n    const { category, type, data } = breadcrumb;\n\n    const isFetch = category === 'fetch';\n    const isXhr = category === 'xhr';\n    const isHttpBreadcrumb = type === 'http';\n\n    if (isHttpBreadcrumb && (isFetch || isXhr)) {\n      const httpUrl = data?.url;\n      const { endpoints } = options;\n\n      const isTracedGraphqlEndpoint = stringMatchesSomePattern(httpUrl, endpoints);\n      const payload = getRequestPayloadXhrOrFetch(handlerData as XhrHint | FetchHint);\n\n      if (isTracedGraphqlEndpoint && data && payload) {\n        const graphqlBody = getGraphQLRequestPayload(payload);\n\n        if (!data.graphql && graphqlBody) {\n          const operationInfo = _getGraphQLOperation(graphqlBody);\n\n          data['graphql.operation'] = operationInfo;\n\n          if (isStandardRequest(graphqlBody) && client.getDataCollectionOptions().graphQL.document === true) {\n            data[GRAPHQL_DOCUMENT] = graphqlBody.query;\n          }\n\n          if (isPersistedRequest(graphqlBody)) {\n            data['graphql.persisted_query.hash.sha256'] = graphqlBody.extensions.persistedQuery.sha256Hash;\n            data['graphql.persisted_query.version'] = graphqlBody.extensions.persistedQuery.version;\n          }\n        }\n      }\n    }\n  });\n}\n\n/**\n * @param requestBody - GraphQL request\n * @returns A formatted version of the request: 'TYPE NAME' or 'TYPE' or 'persisted NAME'\n */\nexport function _getGraphQLOperation(requestBody: GraphQLRequestPayload): string {\n  // Handle persisted operations\n  if (isPersistedRequest(requestBody)) {\n    return `persisted ${requestBody.operationName}`;\n  }\n\n  // Handle standard GraphQL requests\n  if (isStandardRequest(requestBody)) {\n    const { query: graphqlQuery, operationName: graphqlOperationName } = requestBody;\n    const { operationName = graphqlOperationName, operationType } = parseGraphQLQuery(graphqlQuery);\n    const operationInfo = operationName ? `${operationType} ${operationName}` : `${operationType}`;\n    return operationInfo;\n  }\n\n  // Fallback for unknown request types\n  return 'unknown';\n}\n\n/**\n * Get the request body/payload based on the shape of the hint.\n *\n * Exported for tests only.\n */\nexport function getRequestPayloadXhrOrFetch(hint: XhrHint | FetchHint): string | undefined {\n  const isXhr = 'xhr' in hint;\n\n  let body: string | undefined;\n\n  if (isXhr) {\n    const sentryXhrData = hint.xhr[SENTRY_XHR_DATA_KEY];\n    body = sentryXhrData && getBodyString(sentryXhrData.body)[0];\n  } else {\n    const sentryFetchData = getFetchRequestArgBody(hint.input);\n    body = getBodyString(sentryFetchData)[0];\n  }\n\n  return body;\n}\n\n/**\n * Extract the name and type of the operation from the GraphQL query.\n *\n * Exported for tests only.\n */\nexport function parseGraphQLQuery(query: string): GraphQLOperation {\n  const namedQueryRe = /^(?:\\s*)(query|mutation|subscription)(?:\\s*)(\\w+)(?:\\s*)[{(]/;\n  const unnamedQueryRe = /^(?:\\s*)(query|mutation|subscription)(?:\\s*)[{(]/;\n\n  const namedMatch = query.match(namedQueryRe);\n  if (namedMatch) {\n    return {\n      operationType: namedMatch[1],\n      operationName: namedMatch[2],\n    };\n  }\n\n  const unnamedMatch = query.match(unnamedQueryRe);\n  if (unnamedMatch) {\n    return {\n      operationType: unnamedMatch[1],\n      operationName: undefined,\n    };\n  }\n  return {\n    operationType: undefined,\n    operationName: undefined,\n  };\n}\n\n/**\n * Helper to safely check if a value is a non-null object\n */\n\n/**\n * Type guard to check if a request is a standard GraphQL request\n */\nfunction isStandardRequest(payload: unknown): payload is GraphQLStandardRequest {\n  return isObjectLike(payload) && typeof payload.query === 'string';\n}\n\n/**\n * Type guard to check if a request is a persisted operation request\n */\nfunction isPersistedRequest(payload: unknown): payload is GraphQLPersistedRequest {\n  return (\n    isObjectLike(payload) &&\n    typeof payload.operationName === 'string' &&\n    isObjectLike(payload.extensions) &&\n    isObjectLike(payload.extensions.persistedQuery) &&\n    typeof payload.extensions.persistedQuery.sha256Hash === 'string' &&\n    typeof payload.extensions.persistedQuery.version === 'number'\n  );\n}\n\n/**\n * Extract the payload of a request if it's GraphQL.\n * Exported for tests only.\n * @param payload - A valid JSON string\n * @returns A POJO or undefined\n */\nexport function getGraphQLRequestPayload(payload: string): GraphQLRequestPayload | undefined {\n  try {\n    const requestBody = JSON.parse(payload);\n\n    // Return any valid GraphQL request (standard, persisted, or APQ retry with both)\n    if (isStandardRequest(requestBody) || isPersistedRequest(requestBody)) {\n      return requestBody;\n    }\n\n    // Not a GraphQL request\n    return undefined;\n  } catch {\n    // Invalid JSON\n    return undefined;\n  }\n}\n\n/**\n * This integration ensures that GraphQL requests made in the browser\n * have their GraphQL-specific data captured and attached to spans and breadcrumbs.\n */\nexport const graphqlClientIntegration = defineIntegration(_graphqlClientIntegration);\n","import type { Client, Event as SentryEvent, IntegrationFn, SentryWrappedXMLHttpRequest } from '@sentry/core/browser';\nimport {\n  _INTERNAL_filterCookies,\n  _INTERNAL_filterKeyValueData,\n  addExceptionMechanism,\n  addFetchInstrumentationHandler,\n  captureEvent,\n  debug,\n  defineIntegration,\n  getClient,\n  GLOBAL_OBJ,\n  isSentryRequestUrl,\n  supportsNativeFetch,\n} from '@sentry/core/browser';\nimport { addXhrInstrumentationHandler, SENTRY_XHR_DATA_KEY } from '@sentry/browser-utils';\nimport { DEBUG_BUILD } from '../debug-build';\n\nexport type HttpStatusCodeRange = [number, number] | number;\nexport type HttpRequestTarget = string | RegExp;\n\nconst INTEGRATION_NAME = 'HttpClient' as const;\n\ninterface HttpClientOptions {\n  /**\n   * HTTP status codes that should be considered failed.\n   * This array can contain tuples of `[begin, end]` (both inclusive),\n   * single status codes, or a combinations of both\n   *\n   * Example: [[500, 505], 507]\n   * Default: [[500, 599]]\n   */\n  failedRequestStatusCodes: HttpStatusCodeRange[];\n\n  /**\n   * Targets to track for failed requests.\n   * This array can contain strings or regular expressions.\n   *\n   * Example: ['http://localhost', /api\\/.*\\/]\n   * Default: [/.*\\/]\n   */\n  failedRequestTargets: HttpRequestTarget[];\n}\n\nconst _httpClientIntegration = ((options: Partial<HttpClientOptions> = {}) => {\n  const _options: HttpClientOptions = {\n    failedRequestStatusCodes: [[500, 599]],\n    failedRequestTargets: [/.*/],\n    ...options,\n  };\n\n  return {\n    name: INTEGRATION_NAME,\n    setup(client): void {\n      _wrapFetch(client, _options);\n      _wrapXHR(client, _options);\n    },\n  };\n}) satisfies IntegrationFn;\n\n/**\n * Create events for failed client side HTTP requests.\n */\nexport const httpClientIntegration = defineIntegration(_httpClientIntegration);\n\n/**\n * Interceptor function for fetch requests\n *\n * @param requestInfo The Fetch API request info\n * @param response The Fetch API response\n * @param requestInit The request init object\n */\nfunction _fetchResponseHandler(\n  options: HttpClientOptions,\n  requestInfo: RequestInfo,\n  response: Response,\n  requestInit?: RequestInit,\n  error?: unknown,\n): void {\n  if (_shouldCaptureResponse(options, response.status, response.url)) {\n    const request = _getRequest(requestInfo, requestInit);\n\n    let requestHeaders, responseHeaders, requestCookies, responseCookies;\n\n    const dc = _getDataCollectionSettings();\n\n    if (dc.requestHeaders !== false) {\n      requestHeaders = _INTERNAL_filterKeyValueData(_extractFetchHeaders(request.headers), dc.requestHeaders);\n    }\n    if (dc.responseHeaders !== false) {\n      responseHeaders = _INTERNAL_filterKeyValueData(_extractFetchHeaders(response.headers), dc.responseHeaders);\n    }\n    if (dc.cookies !== false) {\n      const reqCookieStr = request.headers.get('Cookie') || undefined;\n      if (reqCookieStr) {\n        const filtered = _INTERNAL_filterCookies(reqCookieStr, dc.cookies);\n        if (typeof filtered === 'object') {\n          requestCookies = filtered;\n        }\n      }\n      const resCookieStr = response.headers.get('Set-Cookie') || undefined;\n      if (resCookieStr) {\n        const filtered = _INTERNAL_filterCookies(resCookieStr, dc.cookies);\n        if (typeof filtered === 'object') {\n          responseCookies = filtered;\n        }\n      }\n    }\n\n    const event = _createEvent({\n      url: request.url,\n      method: request.method,\n      status: response.status,\n      requestHeaders,\n      responseHeaders,\n      requestCookies,\n      responseCookies,\n      error,\n      type: 'fetch',\n    });\n\n    captureEvent(event);\n  }\n}\n\n/**\n * Interceptor function for XHR requests\n *\n * @param xhr The XHR request\n * @param method The HTTP method\n * @param headers The HTTP headers\n */\nfunction _xhrResponseHandler(\n  options: HttpClientOptions,\n  xhr: XMLHttpRequest,\n  method: string,\n  headers: Record<string, string>,\n  error?: unknown,\n): void {\n  if (_shouldCaptureResponse(options, xhr.status, xhr.responseURL)) {\n    let requestHeaders, responseCookies, responseHeaders;\n\n    const dc = _getDataCollectionSettings();\n\n    if (dc.cookies !== false) {\n      try {\n        const cookieString = xhr.getResponseHeader('Set-Cookie') || xhr.getResponseHeader('set-cookie') || undefined;\n        if (cookieString) {\n          const filtered = _INTERNAL_filterCookies(cookieString, dc.cookies);\n          if (typeof filtered === 'object') {\n            responseCookies = filtered;\n          }\n        }\n      } catch {\n        // ignore it if parsing fails\n      }\n    }\n\n    if (dc.responseHeaders !== false) {\n      try {\n        responseHeaders = _INTERNAL_filterKeyValueData(_getXHRResponseHeaders(xhr), dc.responseHeaders);\n      } catch {\n        // ignore it if parsing fails\n      }\n    }\n\n    if (dc.requestHeaders !== false) {\n      requestHeaders = _INTERNAL_filterKeyValueData(headers, dc.requestHeaders);\n    }\n\n    const event = _createEvent({\n      url: xhr.responseURL,\n      method,\n      status: xhr.status,\n      requestHeaders,\n      // Can't access request cookies from XHR\n      responseHeaders,\n      responseCookies,\n      error,\n      type: 'xhr',\n    });\n\n    captureEvent(event);\n  }\n}\n\n/**\n * Extracts response size from `Content-Length` header when possible\n *\n * @param headers\n * @returns The response size in bytes or undefined\n */\nfunction _getResponseSizeFromHeaders(headers?: Record<string, string>): number | undefined {\n  if (headers) {\n    const contentLength = headers['Content-Length'] || headers['content-length'];\n\n    if (contentLength) {\n      return parseInt(contentLength, 10);\n    }\n  }\n\n  return undefined;\n}\n\n/**\n * Extracts the headers as an object from the given Fetch API request or response object\n *\n * @param headers The headers to extract\n * @returns The extracted headers as an object\n */\nfunction _extractFetchHeaders(headers: Headers): Record<string, string> {\n  const result: Record<string, string> = {};\n\n  headers.forEach((value, key) => {\n    result[key] = value;\n  });\n\n  return result;\n}\n\n/**\n * Extracts the response headers as an object from the given XHR object\n *\n * @param xhr The XHR object to extract the response headers from\n * @returns The response headers as an object\n */\nfunction _getXHRResponseHeaders(xhr: XMLHttpRequest): Record<string, string> {\n  const headers = xhr.getAllResponseHeaders();\n\n  if (!headers) {\n    return {};\n  }\n\n  return headers.split('\\r\\n').reduce((acc: Record<string, string>, line: string) => {\n    const [key, value] = line.split(': ');\n    if (key && value) {\n      acc[key] = value;\n    }\n    return acc;\n  }, {});\n}\n\n/**\n * Checks if the given target url is in the given list of targets\n *\n * @param target The target url to check\n * @returns true if the target url is in the given list of targets, false otherwise\n */\nfunction _isInGivenRequestTargets(\n  failedRequestTargets: HttpClientOptions['failedRequestTargets'],\n  target: string,\n): boolean {\n  return failedRequestTargets.some((givenRequestTarget: HttpRequestTarget) => {\n    if (typeof givenRequestTarget === 'string') {\n      return target.includes(givenRequestTarget);\n    }\n\n    return givenRequestTarget.test(target);\n  });\n}\n\n/**\n * Checks if the given status code is in the given range\n *\n * @param status The status code to check\n * @returns true if the status code is in the given range, false otherwise\n */\nfunction _isInGivenStatusRanges(\n  failedRequestStatusCodes: HttpClientOptions['failedRequestStatusCodes'],\n  status: number,\n): boolean {\n  return failedRequestStatusCodes.some((range: HttpStatusCodeRange) => {\n    if (typeof range === 'number') {\n      return range === status;\n    }\n\n    return status >= range[0] && status <= range[1];\n  });\n}\n\n/**\n * Wraps `fetch` function to capture request and response data\n */\nfunction _wrapFetch(client: Client, options: HttpClientOptions): void {\n  if (!supportsNativeFetch()) {\n    return;\n  }\n\n  addFetchInstrumentationHandler(handlerData => {\n    if (getClient() !== client) {\n      return;\n    }\n\n    const { response, args, error, virtualError } = handlerData;\n    const [requestInfo, requestInit] = args as [RequestInfo, RequestInit | undefined];\n\n    if (!response) {\n      return;\n    }\n\n    _fetchResponseHandler(options, requestInfo, response as Response, requestInit, error || virtualError);\n  }, false);\n}\n\n/**\n * Wraps XMLHttpRequest to capture request and response data\n */\nfunction _wrapXHR(client: Client, options: HttpClientOptions): void {\n  if (!('XMLHttpRequest' in GLOBAL_OBJ)) {\n    return;\n  }\n\n  addXhrInstrumentationHandler(handlerData => {\n    if (getClient() !== client) {\n      return;\n    }\n\n    const { error, virtualError } = handlerData;\n\n    const xhr = handlerData.xhr as SentryWrappedXMLHttpRequest & XMLHttpRequest;\n\n    const sentryXhrData = xhr[SENTRY_XHR_DATA_KEY];\n\n    if (!sentryXhrData) {\n      return;\n    }\n\n    const { method, request_headers: headers } = sentryXhrData;\n\n    try {\n      _xhrResponseHandler(options, xhr, method, headers, error || virtualError);\n    } catch (e) {\n      DEBUG_BUILD && debug.warn('Error while extracting response event form XHR response', e);\n    }\n  });\n}\n\n/**\n * Checks whether to capture given response as an event\n *\n * @param status response status code\n * @param url response url\n */\nfunction _shouldCaptureResponse(options: HttpClientOptions, status: number, url: string): boolean {\n  return (\n    _isInGivenStatusRanges(options.failedRequestStatusCodes, status) &&\n    _isInGivenRequestTargets(options.failedRequestTargets, url) &&\n    !isSentryRequestUrl(url, getClient())\n  );\n}\n\n/**\n * Creates a synthetic Sentry event from given response data\n *\n * @param data response data\n * @returns event\n */\nfunction _createEvent(data: {\n  url: string;\n  method: string;\n  status: number;\n  type: 'fetch' | 'xhr';\n  responseHeaders?: Record<string, string>;\n  responseCookies?: Record<string, string>;\n  requestHeaders?: Record<string, string>;\n  requestCookies?: Record<string, string>;\n  error?: unknown;\n}): SentryEvent {\n  const client = getClient();\n  const virtualStackTrace = client && data.error && data.error instanceof Error ? data.error.stack : undefined;\n  // Remove the first frame from the stack as it's the HttpClient call\n  const stack = virtualStackTrace && client ? client.getOptions().stackParser(virtualStackTrace, 0, 1) : undefined;\n  const message = `HTTP Client Error with status code: ${data.status}`;\n\n  const event: SentryEvent = {\n    message,\n    exception: {\n      values: [\n        {\n          type: 'Error',\n          value: message,\n          stacktrace: stack ? { frames: stack } : undefined,\n        },\n      ],\n    },\n    request: {\n      url: data.url,\n      method: data.method,\n      headers: data.requestHeaders,\n      cookies: data.requestCookies,\n    },\n    contexts: {\n      response: {\n        status_code: data.status,\n        headers: data.responseHeaders,\n        cookies: data.responseCookies,\n        body_size: _getResponseSizeFromHeaders(data.responseHeaders),\n      },\n    },\n  };\n\n  addExceptionMechanism(event, {\n    type: `auto.http.client.${data.type}`,\n    handled: false,\n  });\n\n  return event;\n}\n\nfunction _getRequest(requestInfo: RequestInfo, requestInit?: RequestInit): Request {\n  if (!requestInit && requestInfo instanceof Request) {\n    return requestInfo;\n  }\n\n  // If both are set, we try to construct a new Request with the given arguments\n  // However, if e.g. the original request has a `body`, this will throw an error because it was already accessed\n  // In this case, as a fallback, we just use the original request - using both is rather an edge case\n  if (requestInfo instanceof Request && requestInfo.bodyUsed) {\n    return requestInfo;\n  }\n\n  return new Request(requestInfo, requestInit);\n}\n\nfunction _getDataCollectionSettings() {\n  const client = getClient();\n  if (!client) {\n    return { cookies: false, requestHeaders: false, responseHeaders: false };\n  }\n\n  // todo(v11): Always use granular dataCollection settings and remove this legacy guard.\n  // Currently, when dataCollection is not explicitly set, we gate all collection on\n  // sendDefaultPii to avoid sending more data than before (the spec defaults would\n  // collect headers/cookies with deny-list filtering even without sendDefaultPii).\n  const options = client.getOptions();\n  if (options.dataCollection == null) {\n    // eslint-disable-next-line typescript/no-deprecated\n    const enabled = Boolean(options.sendDefaultPii);\n    return { cookies: enabled, requestHeaders: enabled, responseHeaders: enabled };\n  }\n\n  const { cookies, httpHeaders } = client.getDataCollectionOptions();\n  return { cookies, requestHeaders: httpHeaders.request, responseHeaders: httpHeaders.response };\n}\n","import { defineIntegration, safeSetSpanJSONAttributes } from '@sentry/core/browser';\nimport { getHttpRequestData, WINDOW } from '../helpers';\nimport { HTTP_REQUEST_HEADER_KEY_BASE, SENTRY_OP, URL_FULL, USER_AGENT_ORIGINAL } from '@sentry/conventions/attributes';\n\n/**\n * Collects information about HTTP request headers and\n * attaches them to the event.\n */\nexport const httpContextIntegration = defineIntegration(() => {\n  return {\n    name: 'HttpContext' as const,\n    preprocessEvent(event) {\n      // if none of the information we want exists, don't bother\n      if (!WINDOW.navigator && !WINDOW.location && !WINDOW.document) {\n        return;\n      }\n\n      const reqData = getHttpRequestData();\n      const headers = {\n        ...reqData.headers,\n        ...event.request?.headers,\n      };\n\n      event.request = {\n        ...reqData,\n        ...event.request,\n        headers,\n      };\n    },\n\n    processSpan(span) {\n      // if none of the information we want exists, don't bother\n      if (!WINDOW.navigator && !WINDOW.location && !WINDOW.document) {\n        return;\n      }\n\n      const reqData = getHttpRequestData();\n\n      safeSetSpanJSONAttributes(span, {\n        // This attribute is used by the \"Filter out events from legacy browsers and crawlers\" features on the Sentry backend.\n        // Therefore, it's set on every span.\n        [USER_AGENT_ORIGINAL]: reqData.headers['User-Agent'],\n\n        // These attributes, we only need on the segment span (analogous to the `request` context for events)\n        ...(span.is_segment && {\n          // Coerce empty string to undefined so the helper's nullish check drops it,\n          // rather than writing an empty `url.full` attribute onto the span.\n          [URL_FULL]: span.attributes?.[SENTRY_OP] !== 'http.client' ? reqData.url : undefined,\n          [`${HTTP_REQUEST_HEADER_KEY_BASE}.referer`]: reqData.headers['Referer'],\n        }),\n      });\n    },\n  };\n});\n","import type { IntegrationFn } from '@sentry/core/browser';\nimport { applyAggregateErrorsToEvent, defineIntegration } from '@sentry/core/browser';\nimport { exceptionFromError } from '../eventbuilder';\n\ninterface LinkedErrorsOptions {\n  key?: string;\n  limit?: number;\n}\n\nconst DEFAULT_KEY = 'cause';\nconst DEFAULT_LIMIT = 5;\n\nconst INTEGRATION_NAME = 'LinkedErrors' as const;\n\nconst _linkedErrorsIntegration = ((options: LinkedErrorsOptions = {}) => {\n  const limit = options.limit || DEFAULT_LIMIT;\n  const key = options.key || DEFAULT_KEY;\n\n  return {\n    name: INTEGRATION_NAME,\n    preprocessEvent(event, hint, client) {\n      const options = client.getOptions();\n\n      applyAggregateErrorsToEvent(\n        // This differs from the LinkedErrors integration in core by using a different exceptionFromError function\n        exceptionFromError,\n        options.stackParser,\n        key,\n        limit,\n        event,\n        hint,\n      );\n    },\n  };\n}) satisfies IntegrationFn;\n\n/**\n * Aggregrate linked errors in an event.\n */\nexport const linkedErrorsIntegration = defineIntegration(_linkedErrorsIntegration);\n","import type { Client, IntegrationFn } from '@sentry/core/browser';\nimport {\n  captureMessage,\n  defineIntegration,\n  getClient,\n  GLOBAL_OBJ,\n  supportsReportingObserver,\n  withScope,\n} from '@sentry/core/browser';\n\nconst WINDOW = GLOBAL_OBJ as typeof GLOBAL_OBJ & Window;\n\nconst INTEGRATION_NAME = 'ReportingObserver' as const;\n\ninterface Report {\n  [key: string]: unknown;\n  type: ReportTypes;\n  url: string;\n  body?: ReportBody;\n}\n\ntype ReportTypes = 'crash' | 'deprecation' | 'intervention';\n\ntype ReportBody = CrashReportBody | DeprecationReportBody | InterventionReportBody;\n\ninterface CrashReportBody {\n  [key: string]: unknown;\n  crashId: string;\n  reason?: string;\n}\n\ninterface DeprecationReportBody {\n  [key: string]: unknown;\n  id: string;\n  anticipatedRemoval?: Date;\n  message: string;\n  sourceFile?: string;\n  lineNumber?: number;\n  columnNumber?: number;\n}\n\ninterface InterventionReportBody {\n  [key: string]: unknown;\n  id: string;\n  message: string;\n  sourceFile?: string;\n  lineNumber?: number;\n  columnNumber?: number;\n}\n\ninterface ReportingObserverOptions {\n  types?: ReportTypes[];\n}\n\n/** This is experimental and the types are not included with TypeScript, sadly. */\ninterface ReportingObserverClass {\n  new (\n    handler: (reports: Report[]) => void,\n    options: { buffered?: boolean; types?: ReportTypes[] },\n  ): {\n    observe: () => void;\n  };\n}\n\nconst SETUP_CLIENTS = new WeakMap<Client, boolean>();\n\nconst _reportingObserverIntegration = ((options: ReportingObserverOptions = {}) => {\n  const types = options.types || ['crash', 'deprecation', 'intervention'];\n\n  /** Handler for the reporting observer. */\n  function handler(reports: Report[]): void {\n    if (!SETUP_CLIENTS.has(getClient() as Client)) {\n      return;\n    }\n\n    for (const report of reports) {\n      withScope(scope => {\n        scope.setExtra('url', report.url);\n\n        const label = `ReportingObserver [${report.type}]`;\n        let details = 'No details available';\n\n        if (report.body) {\n          // Object.keys doesn't work on ReportBody, as all properties are inherited\n          const plainBody: {\n            [key: string]: unknown;\n          } = {};\n\n          // eslint-disable-next-line guard-for-in\n          for (const prop in report.body) {\n            plainBody[prop] = report.body[prop];\n          }\n\n          scope.setExtra('body', plainBody);\n\n          if (report.type === 'crash') {\n            const body = report.body as CrashReportBody;\n            // A fancy way to create a message out of crashId OR reason OR both OR fallback\n            details = [body.crashId || '', body.reason || ''].join(' ').trim() || details;\n          } else {\n            const body = report.body as DeprecationReportBody | InterventionReportBody;\n            details = body.message || details;\n          }\n        }\n\n        captureMessage(`${label}: ${details}`);\n      });\n    }\n  }\n\n  return {\n    name: INTEGRATION_NAME,\n    setupOnce() {\n      if (!supportsReportingObserver()) {\n        return;\n      }\n\n      const observer = new (WINDOW as typeof WINDOW & { ReportingObserver: ReportingObserverClass }).ReportingObserver(\n        handler,\n        {\n          buffered: true,\n          types,\n        },\n      );\n\n      observer.observe();\n    },\n\n    setup(client): void {\n      SETUP_CLIENTS.set(client, true);\n    },\n  };\n}) satisfies IntegrationFn;\n\n/**\n * Reporting API integration - https://w3c.github.io/reporting/\n */\nexport const reportingObserverIntegration = defineIntegration(_reportingObserverIntegration);\n","import type { IntegrationFn } from '@sentry/core/browser';\nimport {\n  captureSpan,\n  debug,\n  defineIntegration,\n  hasSpanStreamingEnabled,\n  isStreamedBeforeSendSpanCallback,\n  SpanBuffer,\n  spanIsSampled,\n} from '@sentry/core/browser';\nimport { DEBUG_BUILD } from '../debug-build';\n\nexport const spanStreamingIntegration = defineIntegration(() => {\n  return {\n    name: 'SpanStreaming' as const,\n\n    beforeSetup(client) {\n      // If users only set spanStreamingIntegration, without traceLifecycle, we set it to \"stream\" for them.\n      // This avoids the classic double-opt-in problem we'd otherwise have in the browser SDK.\n      const clientOptions = client.getOptions();\n      if (!clientOptions.traceLifecycle) {\n        DEBUG_BUILD && debug.log('[SpanStreaming] setting `traceLifecycle` to \"stream\"');\n        clientOptions.traceLifecycle = 'stream';\n      }\n    },\n\n    setup(client) {\n      const initialMessage = 'SpanStreaming integration requires';\n      const fallbackMsg = 'Falling back to static trace lifecycle.';\n      const clientOptions = client.getOptions();\n\n      if (!hasSpanStreamingEnabled(client)) {\n        clientOptions.traceLifecycle = 'static';\n        DEBUG_BUILD && debug.warn(`${initialMessage} \\`traceLifecycle\\` to be set to \"stream\"! ${fallbackMsg}`);\n        return;\n      }\n\n      const beforeSendSpan = clientOptions.beforeSendSpan;\n      // If users misconfigure their SDK by opting into span streaming but\n      // using an incompatible beforeSendSpan callback, we fall back to the static trace lifecycle.\n      if (beforeSendSpan && !isStreamedBeforeSendSpanCallback(beforeSendSpan)) {\n        clientOptions.traceLifecycle = 'static';\n        DEBUG_BUILD &&\n          debug.warn(`${initialMessage} a beforeSendSpan callback using \\`withStreamedSpan\\`! ${fallbackMsg}`);\n        return;\n      }\n\n      const buffer = new SpanBuffer(client);\n\n      client.on('afterSpanEnd', span => {\n        // Negatively sampled spans must not be captured.\n        // This happens because OTel and we create non-recording spans for negatively sampled spans\n        // that go through the same life cycle as recording spans.\n        if (!spanIsSampled(span)) {\n          return;\n        }\n        buffer.add(captureSpan(span, client));\n      });\n\n      // In addition to capturing the span, we also flush the trace when the segment\n      // span ends to ensure things are sent timely. We never know when the browser\n      // is closed, users navigate away, etc.\n      client.on('afterSegmentSpanEnd', segmentSpan => {\n        const traceId = segmentSpan.spanContext().traceId;\n        setTimeout(() => {\n          buffer.flush(traceId);\n        }, 500);\n      });\n    },\n  };\n}) satisfies IntegrationFn;\n","import type { Client, Envelope, IntegrationFn } from '@sentry/core/browser';\nimport { debug, defineIntegration, serializeEnvelope } from '@sentry/core/browser';\nimport { getNativeImplementation } from '@sentry/browser-utils';\nimport { DEBUG_BUILD } from '../debug-build';\nimport type { WINDOW } from '../helpers';\n\nexport type SpotlightConnectionOptions = {\n  /**\n   * Set this if the Spotlight Sidecar is not running on localhost:8969\n   * By default, the Url is set to http://localhost:8969/stream\n   */\n  sidecarUrl?: string;\n};\n\nexport const INTEGRATION_NAME = 'SpotlightBrowser' as const;\n\nexport const SPOTLIGHT_IGNORE_SPANS = [{ op: 'ui.interaction.click', name: '#sentry-spotlight' }];\n\nconst _spotlightIntegration = ((options: Partial<SpotlightConnectionOptions> = {}) => {\n  const sidecarUrl = options.sidecarUrl || 'http://localhost:8969/stream';\n\n  return {\n    name: INTEGRATION_NAME,\n    setup: () => {\n      DEBUG_BUILD && debug.log('Using Sidecar URL', sidecarUrl);\n    },\n    beforeSetup(client: Client) {\n      const opts = client.getOptions();\n      opts.ignoreSpans = [...(opts.ignoreSpans || []), ...SPOTLIGHT_IGNORE_SPANS];\n    },\n    afterAllSetup: (client: Client) => {\n      setupSidecarForwarding(client, sidecarUrl);\n    },\n  };\n}) satisfies IntegrationFn;\n\nfunction setupSidecarForwarding(client: Client, sidecarUrl: string): void {\n  const makeFetch: typeof WINDOW.fetch | undefined = getNativeImplementation('fetch');\n  let failCount = 0;\n\n  client.on('beforeEnvelope', (envelope: Envelope) => {\n    if (failCount > 3) {\n      debug.warn('[Spotlight] Disabled Sentry -> Spotlight integration due to too many failed requests:', failCount);\n      return;\n    }\n\n    makeFetch(sidecarUrl, {\n      method: 'POST',\n      body: serializeEnvelope(envelope),\n      headers: {\n        'Content-Type': 'application/x-sentry-envelope',\n      },\n      mode: 'cors',\n    }).then(\n      res => {\n        if (res.status >= 200 && res.status < 400) {\n          // Reset failed requests counter on success\n          failCount = 0;\n        }\n      },\n      err => {\n        failCount++;\n        debug.error(\n          \"Sentry SDK can't connect to Sidecar is it running? See: https://spotlightjs.com/sidecar/npx/\",\n          err,\n        );\n      },\n    );\n  });\n}\n\n/**\n * Use this integration to send errors and transactions to Spotlight.\n *\n * Learn more about spotlight at https://spotlightjs.com\n */\nexport const spotlightBrowserIntegration = defineIntegration(_spotlightIntegration);\n","import type { Attachment, Event, EventHint, ViewHierarchyData, ViewHierarchyWindow } from '@sentry/core/browser';\nimport { defineIntegration, getComponentName } from '@sentry/core/browser';\nimport { WINDOW } from '../helpers';\n\ninterface OnElementArgs {\n  /**\n   * The element being processed.\n   */\n  element: HTMLElement;\n  /**\n   * Lowercase tag name of the element.\n   */\n  tagName: string;\n  /**\n   * The component name of the element.\n   */\n  componentName?: string;\n\n  /**\n   * The current depth of the element in the view hierarchy. The root element will have a depth of 0.\n   *\n   * This allows you to limit the traversal depth for large DOM trees.\n   */\n  depth?: number;\n}\n\ninterface Options {\n  /**\n   * Whether to attach the view hierarchy to the event.\n   *\n   * Default: Always attach.\n   */\n  shouldAttach?: (event: Event, hint: EventHint) => boolean;\n\n  /**\n   * A function that returns the root element to start walking the DOM from.\n   *\n   * Default: `window.document.body`\n   */\n  rootElement?: () => HTMLElement | undefined;\n\n  /**\n   * Called for each HTMLElement as we walk the DOM.\n   *\n   * Return an object to include the element with any additional properties.\n   * Return `skip` to exclude the element and its children.\n   * Return `children` to skip the element but include its children.\n   */\n  onElement?: (prop: OnElementArgs) => Record<string, string | number | boolean> | 'skip' | 'children';\n}\n\n/**\n * An integration to include a view hierarchy attachment which contains the DOM.\n */\nexport const viewHierarchyIntegration = defineIntegration((options: Options = {}) => {\n  const skipHtmlTags = ['script'];\n\n  /** Walk an element */\n  function walk(element: HTMLElement, windows: ViewHierarchyWindow[], depth = 0): void {\n    if (!element) {\n      return;\n    }\n\n    // With Web Components, we need to walk into shadow DOMs\n    const children = 'shadowRoot' in element && element.shadowRoot ? element.shadowRoot.children : element.children;\n\n    for (const child of children) {\n      if (!(child instanceof HTMLElement)) {\n        continue;\n      }\n\n      const componentName = getComponentName(child, 1) || undefined;\n      const tagName = child.tagName.toLowerCase();\n\n      if (skipHtmlTags.includes(tagName)) {\n        continue;\n      }\n\n      const result = options.onElement?.({ element: child, componentName, tagName, depth }) || {};\n\n      if (result === 'skip') {\n        continue;\n      }\n\n      // Skip this element but include its children\n      if (result === 'children') {\n        walk(child, windows, depth + 1);\n        continue;\n      }\n\n      const { x, y, width, height } = child.getBoundingClientRect();\n\n      const window: ViewHierarchyWindow = {\n        identifier: (child.id || undefined) as string,\n        type: componentName || tagName,\n        visible: true,\n        alpha: 1,\n        height,\n        width,\n        x,\n        y,\n        ...result,\n      };\n\n      const children: ViewHierarchyWindow[] = [];\n      window.children = children;\n\n      // Recursively walk the children\n      walk(child, window.children, depth + 1);\n\n      windows.push(window);\n    }\n  }\n\n  return {\n    name: 'ViewHierarchy' as const,\n    processEvent: (event, hint) => {\n      // only capture for error events\n      if (event.type !== undefined || options.shouldAttach?.(event, hint) === false) {\n        return event;\n      }\n\n      const root: ViewHierarchyData = {\n        rendering_system: 'DOM',\n        positioning: 'absolute',\n        windows: [],\n      };\n\n      walk(options.rootElement?.() || WINDOW.document.body, root.windows);\n\n      const attachment: Attachment = {\n        filename: 'view-hierarchy.json',\n        attachmentType: 'event.view_hierarchy',\n        contentType: 'application/json',\n        data: JSON.stringify(root),\n      };\n\n      hint.attachments = hint.attachments || [];\n      hint.attachments.push(attachment);\n\n      return event;\n    },\n  };\n});\n","import type { IntegrationFn, Span } from '@sentry/core/browser';\nimport { defineIntegration, hasSpanStreamingEnabled } from '@sentry/core/browser';\nimport {\n  addWebVitalsToSpan,\n  registerInpInteractionListener,\n  startTrackingINP,\n  startTrackingWebVitals,\n  trackClsAsSpan,\n  trackInpAsSpan,\n  trackLcpAsSpan,\n} from '@sentry/browser-utils';\n\nexport const WEB_VITALS_INTEGRATION_NAME = 'WebVitals' as const;\n\nexport type WebVitalName = 'cls' | 'inp' | 'lcp';\n\nexport interface WebVitalsOptions {\n  /**\n   * Web vitals to skip.\n   */\n  ignore?: WebVitalName[];\n\n  /**\n   * @experimental\n   */\n  _experiments?: Partial<{\n    enableStandaloneClsSpans: boolean;\n    enableStandaloneLcpSpans: boolean;\n  }>;\n}\n\n/**\n * Captures Core Web Vitals (LCP, CLS, INP) and related pageload vitals.\n *\n * `browserTracingIntegration` auto-registers this integration if no\n * `webVitalsIntegration` is already present, so explicit registration is only\n * needed to customize options or to use it without `browserTracingIntegration`.\n */\nexport const webVitalsIntegration = defineIntegration((options: WebVitalsOptions = {}) => {\n  const ignored = new Set(options.ignore ?? []);\n\n  return {\n    name: WEB_VITALS_INTEGRATION_NAME,\n    setup(client) {\n      const spanStreamingEnabled = hasSpanStreamingEnabled(client);\n      const { enableStandaloneClsSpans, enableStandaloneLcpSpans } = options._experiments ?? {};\n\n      const recordClsStandaloneSpans =\n        spanStreamingEnabled || ignored.has('cls') ? undefined : enableStandaloneClsSpans || false;\n      const recordLcpStandaloneSpans =\n        spanStreamingEnabled || ignored.has('lcp') ? undefined : enableStandaloneLcpSpans || false;\n\n      // eslint-disable-next-line typescript/no-deprecated\n      const finalizeWebVitals = startTrackingWebVitals({\n        recordClsStandaloneSpans,\n        recordLcpStandaloneSpans,\n        client,\n      });\n\n      const pageloadSpans = new WeakSet<Span>();\n\n      client.on('afterStartPageLoadSpan', span => {\n        pageloadSpans.add(span);\n      });\n\n      client.on('spanEnd', span => {\n        if (!pageloadSpans.delete(span)) {\n          return;\n        }\n\n        finalizeWebVitals();\n        addWebVitalsToSpan(span, {\n          // CLS/LCP are recorded as pageload span measurements only when they're neither\n          // tracked as standalone spans nor handled by span streaming (and not ignored).\n          recordClsOnPageloadSpan: recordClsStandaloneSpans === false,\n          recordLcpOnPageloadSpan: recordLcpStandaloneSpans === false,\n          spanStreamingEnabled,\n        });\n      });\n\n      if (spanStreamingEnabled) {\n        if (!ignored.has('lcp')) {\n          trackLcpAsSpan(client);\n        }\n        if (!ignored.has('cls')) {\n          trackClsAsSpan(client);\n        }\n        if (!ignored.has('inp')) {\n          trackInpAsSpan();\n        }\n      } else if (!ignored.has('inp')) {\n        startTrackingINP();\n      }\n    },\n    afterAllSetup() {\n      if (!ignored.has('inp')) {\n        registerInpInteractionListener();\n      }\n    },\n  };\n}) satisfies IntegrationFn;\n","import type { DebugImage, Integration, IntegrationFn } from '@sentry/core/browser';\nimport { captureEvent, debug, defineIntegration, getClient, isPlainObject, isPrimitive } from '@sentry/core/browser';\nimport { DEBUG_BUILD } from '../debug-build';\nimport { eventFromUnknownInput } from '../eventbuilder';\nimport { WINDOW } from '../helpers';\nimport { _eventFromRejectionWithPrimitive, _getUnhandledRejectionError } from './globalhandlers';\n\nexport const INTEGRATION_NAME = 'WebWorker' as const;\n\ninterface WebWorkerMessage {\n  _sentryMessage: boolean;\n  _sentryDebugIds?: Record<string, string>;\n  _sentryModuleMetadata?: Record<string, any>; // eslint-disable-line @typescript-eslint/no-explicit-any\n  _sentryWorkerError?: SerializedWorkerError;\n  _sentryWasmImages?: Array<DebugImage>;\n}\n\ninterface SerializedWorkerError {\n  reason: unknown;\n  filename?: string;\n}\n\ninterface WebWorkerIntegrationOptions {\n  worker: Worker | Array<Worker>;\n}\n\ninterface WebWorkerIntegration extends Integration {\n  addWorker: (worker: Worker) => void;\n}\n\n/**\n * Use this integration to set up Sentry with web workers.\n *\n * IMPORTANT: This integration must be added **before** you start listening to\n * any messages from the worker. Otherwise, your message handlers will receive\n * messages from the Sentry SDK which you need to ignore.\n *\n * This integration only has an effect, if you call `Sentry.registerWebWorker(self)`\n * from within the worker(s) you're adding to the integration.\n *\n * Given that you want to initialize the SDK as early as possible, you most likely\n * want to add this integration **after** initializing the SDK:\n *\n * @example:\n * ```ts filename={main.js}\n * import * as Sentry from '@sentry/<your-sdk>';\n *\n * // some time earlier:\n * Sentry.init(...)\n *\n * // 1. Initialize the worker\n * const worker = new Worker(new URL('./worker.ts', import.meta.url));\n *\n * // 2. Add the integration\n * const webWorkerIntegration = Sentry.webWorkerIntegration({ worker });\n * Sentry.addIntegration(webWorkerIntegration);\n *\n * // 3. Register message listeners on the worker\n * worker.addEventListener('message', event => {\n *  // ...\n * });\n * ```\n *\n * If you initialize multiple workers at the same time, you can also pass an array of workers\n * to the integration:\n *\n * ```ts filename={main.js}\n * const webWorkerIntegration = Sentry.webWorkerIntegration({ worker: [worker1, worker2] });\n * Sentry.addIntegration(webWorkerIntegration);\n * ```\n *\n * If you have any additional workers that you initialize at a later point,\n * you can add them to the integration as follows:\n *\n * ```ts filename={main.js}\n * const webWorkerIntegration = Sentry.webWorkerIntegration({ worker: worker1 });\n * Sentry.addIntegration(webWorkerIntegration);\n *\n * // sometime later:\n * webWorkerIntegration.addWorker(worker2);\n * ```\n *\n * Of course, you can also directly add the integration in Sentry.init:\n * ```ts filename={main.js}\n * import * as Sentry from '@sentry/<your-sdk>';\n *\n * // 1. Initialize the worker\n * const worker = new Worker(new URL('./worker.ts', import.meta.url));\n *\n * // 2. Initialize the SDK\n * Sentry.init({\n *  integrations: [Sentry.webWorkerIntegration({ worker })]\n * });\n *\n * // 3. Register message listeners on the worker\n * worker.addEventListener('message', event => {\n *  // ...\n * });\n * ```\n *\n * @param options {WebWorkerIntegrationOptions} Integration options:\n *   - `worker`: The worker instance.\n */\nexport const webWorkerIntegration = defineIntegration(({ worker }: WebWorkerIntegrationOptions) => ({\n  name: INTEGRATION_NAME,\n  setupOnce: () => {\n    (Array.isArray(worker) ? worker : [worker]).forEach(w => listenForSentryMessages(w));\n  },\n  addWorker: (worker: Worker) => listenForSentryMessages(worker),\n})) as IntegrationFn<WebWorkerIntegration>;\n\nfunction listenForSentryMessages(worker: Worker): void {\n  worker.addEventListener('message', event => {\n    if (isSentryMessage(event.data)) {\n      event.stopImmediatePropagation(); // other listeners should not receive this message\n\n      // Handle debug IDs\n      if (event.data._sentryDebugIds) {\n        DEBUG_BUILD && debug.log('Sentry debugId web worker message received', event.data);\n        WINDOW._sentryDebugIds = {\n          ...event.data._sentryDebugIds,\n          // debugIds of the main thread have precedence over the worker's in case of a collision.\n          ...WINDOW._sentryDebugIds,\n        };\n      }\n\n      // Handle module metadata\n      if (event.data._sentryModuleMetadata) {\n        DEBUG_BUILD && debug.log('Sentry module metadata web worker message received', event.data);\n        // Merge worker's raw metadata into the global object\n        // It will be parsed lazily when needed by getMetadataForUrl\n        WINDOW._sentryModuleMetadata = {\n          ...event.data._sentryModuleMetadata,\n          // Module metadata of the main thread have precedence over the worker's in case of a collision.\n          ...WINDOW._sentryModuleMetadata,\n        };\n      }\n\n      // Handle WASM images from worker\n      if (event.data._sentryWasmImages) {\n        DEBUG_BUILD && debug.log('Sentry WASM images web worker message received', event.data);\n        const existingImages =\n          (WINDOW as typeof WINDOW & { _sentryWasmImages?: Array<DebugImage> })._sentryWasmImages || [];\n        const newImages = event.data._sentryWasmImages.filter(\n          (newImg: unknown) =>\n            isPlainObject(newImg) &&\n            typeof newImg.code_file === 'string' &&\n            !existingImages.some(existing => existing.code_file === newImg.code_file),\n        );\n        (WINDOW as typeof WINDOW & { _sentryWasmImages?: Array<DebugImage> })._sentryWasmImages = [\n          ...existingImages,\n          ...newImages,\n        ];\n      }\n\n      // Handle unhandled rejections forwarded from worker\n      if (event.data._sentryWorkerError) {\n        DEBUG_BUILD && debug.log('Sentry worker rejection message received', event.data._sentryWorkerError);\n        handleForwardedWorkerRejection(event.data._sentryWorkerError);\n      }\n    }\n  });\n}\n\nfunction handleForwardedWorkerRejection(workerError: SerializedWorkerError): void {\n  const client = getClient();\n  if (!client) {\n    return;\n  }\n\n  const stackParser = client.getOptions().stackParser;\n  const attachStacktrace = client.getOptions().attachStacktrace;\n\n  const error = workerError.reason;\n\n  // Follow same pattern as globalHandlers for unhandledrejection\n  // Handle both primitives and errors the same way\n  const event = isPrimitive(error)\n    ? _eventFromRejectionWithPrimitive(error)\n    : eventFromUnknownInput(stackParser, error, undefined, attachStacktrace, true);\n\n  event.level = 'error';\n\n  // Add worker-specific context\n  if (workerError.filename) {\n    event.contexts = {\n      ...event.contexts,\n      worker: {\n        filename: workerError.filename,\n      },\n    };\n  }\n\n  captureEvent(event, {\n    originalException: error,\n    mechanism: {\n      handled: false,\n      type: 'auto.browser.web_worker.onunhandledrejection',\n    },\n  });\n\n  DEBUG_BUILD && debug.log('Captured worker unhandled rejection', error);\n}\n\n/**\n * Minimal interface for DedicatedWorkerGlobalScope, only requiring the postMessage method.\n * (which is the only thing we need from the worker's global object)\n *\n * @see https://developer.mozilla.org/en-US/docs/Web/API/DedicatedWorkerGlobalScope\n *\n * We can't use the actual type because it breaks everyone who doesn't have {\"lib\": [\"WebWorker\"]}\n * but uses {\"skipLibCheck\": true} in their tsconfig.json.\n */\ninterface MinimalDedicatedWorkerGlobalScope {\n  postMessage: (message: unknown) => void;\n  addEventListener: (type: string, listener: (event: unknown) => void) => void;\n  location?: { href?: string };\n}\n\ninterface RegisterWebWorkerOptions {\n  self: MinimalDedicatedWorkerGlobalScope & {\n    _sentryDebugIds?: Record<string, string>;\n    _sentryModuleMetadata?: Record<string, any>; // eslint-disable-line @typescript-eslint/no-explicit-any\n  };\n}\n\n/**\n * Use this function to register the worker with the Sentry SDK.\n *\n * This function will:\n * - Send debug IDs to the parent thread\n * - Send module metadata to the parent thread (for thirdPartyErrorFilterIntegration)\n * - Set up a handler for unhandled rejections in the worker\n * - Forward unhandled rejections to the parent thread for capture\n *\n * Note: Synchronous errors in workers are already captured by globalHandlers.\n * This only handles unhandled promise rejections which don't bubble to the parent.\n *\n * @example\n * ```ts filename={worker.js}\n * import * as Sentry from '@sentry/<your-sdk>';\n *\n * // Do this as early as possible in your worker.\n * Sentry.registerWebWorker({ self });\n *\n * // continue setting up your worker\n * self.postMessage(...)\n * ```\n * @param options {RegisterWebWorkerOptions} Integration options:\n *   - `self`: The worker instance you're calling this function from (self).\n */\nexport function registerWebWorker({ self }: RegisterWebWorkerOptions): void {\n  // Send debug IDs and raw module metadata to parent thread\n  // The metadata will be parsed lazily on the main thread when needed\n  self.postMessage({\n    _sentryMessage: true,\n    _sentryDebugIds: self._sentryDebugIds ?? undefined,\n    _sentryModuleMetadata: self._sentryModuleMetadata ?? undefined,\n  });\n\n  // Set up unhandledrejection handler inside the worker\n  // Following the same pattern as globalHandlers\n  // unhandled rejections don't bubble to the parent thread, so we need to handle them here\n  self.addEventListener('unhandledrejection', (event: unknown) => {\n    const reason = _getUnhandledRejectionError(event);\n\n    // Forward the raw reason to parent thread\n    // The parent will handle primitives vs errors the same way globalHandlers does\n    const serializedError: SerializedWorkerError = {\n      reason: reason,\n      filename: self.location?.href,\n    };\n\n    // Forward to parent thread\n    self.postMessage({\n      _sentryMessage: true,\n      _sentryWorkerError: serializedError,\n    });\n\n    DEBUG_BUILD && debug.log('[Sentry Worker] Forwarding unhandled rejection to parent', serializedError);\n  });\n\n  DEBUG_BUILD && debug.log('[Sentry Worker] Registered worker with unhandled rejection handling');\n}\n\nfunction isSentryMessage(eventData: unknown): eventData is WebWorkerMessage {\n  if (!isPlainObject(eventData) || eventData._sentryMessage !== true) {\n    return false;\n  }\n\n  // Must have at least one of: debug IDs, module metadata, worker error, or WASM images\n  const hasDebugIds = '_sentryDebugIds' in eventData;\n  const hasModuleMetadata = '_sentryModuleMetadata' in eventData;\n  const hasWorkerError = '_sentryWorkerError' in eventData;\n  const hasWasmImages = '_sentryWasmImages' in eventData;\n\n  if (!hasDebugIds && !hasModuleMetadata && !hasWorkerError && !hasWasmImages) {\n    return false;\n  }\n\n  // Validate debug IDs if present\n  if (hasDebugIds && !(isPlainObject(eventData._sentryDebugIds) || eventData._sentryDebugIds === undefined)) {\n    return false;\n  }\n\n  // Validate module metadata if present\n  if (\n    hasModuleMetadata &&\n    !(isPlainObject(eventData._sentryModuleMetadata) || eventData._sentryModuleMetadata === undefined)\n  ) {\n    return false;\n  }\n\n  // Validate worker error if present\n  if (hasWorkerError && !isPlainObject(eventData._sentryWorkerError)) {\n    return false;\n  }\n\n  // Validate WASM images if present\n  if (\n    hasWasmImages &&\n    (!Array.isArray(eventData._sentryWasmImages) ||\n      !eventData._sentryWasmImages.every(\n        (img: unknown) => isPlainObject(img) && typeof (img as { code_file?: unknown }).code_file === 'string',\n      ))\n  ) {\n    return false;\n  }\n\n  return true;\n}\n","import { htmlTreeAsString, isElement } from '@sentry/browser-utils';\n\ntype Prototype = { constructor?: (...args: unknown[]) => unknown };\n\nconst HTML_ELEMENT_CONSTRUCTOR_NAME_REGEX = /^HTML(\\w*)Element$/;\n\n/**\n * Browser-specific contributions to `normalize()`'s `stringifyValue`. Plug into\n * `setNormalizeStringifier` from the browser SDK so DOM values get a useful string\n * representation without forcing core to carry the DOM-specific code.\n *\n * Handles:\n * - `window` → `[Window]`\n * - `document` → `[Document]`\n * - `HTMLElement` subclasses → `[HTMLElement: <css-selector-path>]` (via `htmlTreeAsString`)\n *\n * Vue ViewModels and React SyntheticEvents are not handled here — the Vue and React\n * SDKs wrap this function in their `init` and add their own checks on top.\n */\nexport function normalizeStringifyValue(value: Exclude<unknown, string | number | boolean | null>): string | undefined {\n  // oxlint-disable-next-line no-restricted-globals\n  if (typeof window !== 'undefined' && value === window) {\n    return '[Window]';\n  }\n  // oxlint-disable-next-line no-restricted-globals\n  if (typeof document !== 'undefined' && value === document) {\n    return '[Document]';\n  }\n\n  if (isElement(value)) {\n    const objName = getConstructorName(value);\n    if (HTML_ELEMENT_CONSTRUCTOR_NAME_REGEX.test(objName)) {\n      return `[HTMLElement: ${htmlTreeAsString(value)}]`;\n    }\n  }\n\n  return undefined;\n}\n\nfunction getConstructorName(value: unknown): string {\n  const prototype: Prototype | null = Object.getPrototypeOf(value);\n\n  return prototype?.constructor ? prototype.constructor.name : 'null prototype';\n}\n","import type { Client, ContinuousProfiler, ProfileChunk, ProfileChunkEnvelope, Span } from '@sentry/core/browser';\nimport {\n  createEnvelope,\n  debug,\n  dsnToString,\n  getGlobalScope,\n  getRootSpan,\n  getSdkMetadataForEnvelopeHeader,\n  uuid4,\n} from '@sentry/core/browser';\nimport type { BrowserOptions } from '../client';\nimport { DEBUG_BUILD } from './../debug-build';\nimport type { JSSelfProfiler } from './jsSelfProfiling';\nimport {\n  createProfileChunkPayload,\n  setThreadAttributes,\n  shouldProfileSession,\n  startJSSelfProfile,\n  validateProfileChunk,\n} from './utils';\n\nconst CHUNK_INTERVAL_MS = 60_000; // 1 minute\n// Maximum length for trace lifecycle profiling per root span (e.g. if spanEnd never fires)\nconst MAX_ROOT_SPAN_PROFILE_MS = 300_000; // 5 minutes max per root span in trace mode\n\n/**\n * UIProfiler (Profiling V2):\n * Supports two lifecycle modes:\n *  - 'manual': controlled explicitly via start()/stop()\n *  - 'trace': automatically runs while there are active sampled root spans\n *\n * Profiles are emitted as standalone `profile_chunk` envelopes either when:\n * - there are no more sampled root spans, or\n * - the 60s chunk timer elapses while profiling is running.\n */\nexport class UIProfiler implements ContinuousProfiler<Client> {\n  private _client: Client | undefined;\n  private _profiler: JSSelfProfiler | undefined;\n  private _chunkTimer: ReturnType<typeof setTimeout> | undefined;\n\n  // Manual + Trace\n  private _profilerId: string | undefined; // one per Profiler session\n  private _isRunning: boolean; // current profiler instance active flag\n  private _sessionSampled: boolean; // sampling decision for entire session\n  private _lifecycleMode: 'manual' | 'trace' | undefined;\n\n  // Trace-only\n  private _activeRootSpanIds: Set<string>;\n  private _rootSpanTimeouts: Map<string, ReturnType<typeof setTimeout>>;\n\n  public constructor() {\n    this._client = undefined;\n    this._profiler = undefined;\n    this._chunkTimer = undefined;\n\n    this._profilerId = undefined;\n    this._isRunning = false;\n    this._sessionSampled = false;\n    this._lifecycleMode = undefined;\n\n    this._activeRootSpanIds = new Set();\n    this._rootSpanTimeouts = new Map();\n  }\n\n  /**\n   * Initialize the profiler with client, session sampling and lifecycle mode.\n   */\n  public initialize(client: Client): void {\n    const lifecycleMode = (client.getOptions() as BrowserOptions).profileLifecycle;\n    const sessionSampled = shouldProfileSession(client.getOptions());\n\n    DEBUG_BUILD && debug.log(`[Profiling] Initializing profiler (lifecycle='${lifecycleMode}').`);\n\n    if (!sessionSampled) {\n      DEBUG_BUILD && debug.log('[Profiling] Session not sampled. Skipping lifecycle profiler initialization.');\n    }\n\n    // One Profiler ID per profiling session (user session)\n    this._profilerId = uuid4();\n    this._client = client;\n    this._sessionSampled = sessionSampled;\n    this._lifecycleMode = lifecycleMode;\n\n    if (lifecycleMode === 'trace') {\n      this._setupTraceLifecycleListeners(client);\n    }\n\n    client.on('spanStart', span => {\n      if (this._isRunning) {\n        setThreadAttributes(span);\n      }\n    });\n  }\n\n  /** Starts UI profiling (only effective in 'manual' mode and when sampled). */\n  public start(): void {\n    if (this._lifecycleMode === 'trace') {\n      DEBUG_BUILD &&\n        debug.warn(\n          '[Profiling] `profileLifecycle` is set to \"trace\". Calls to `uiProfiler.start()` are ignored in trace mode.',\n        );\n      return;\n    }\n\n    if (this._isRunning) {\n      DEBUG_BUILD && debug.warn('[Profiling] Profile session is already running, `uiProfiler.start()` is a no-op.');\n      return;\n    }\n\n    if (!this._sessionSampled) {\n      DEBUG_BUILD && debug.warn('[Profiling] Session is not sampled, `uiProfiler.start()` is a no-op.');\n      return;\n    }\n\n    this._beginProfiling();\n  }\n\n  /** Stops UI profiling (only effective in 'manual' mode). */\n  public stop(): void {\n    if (this._lifecycleMode === 'trace') {\n      DEBUG_BUILD &&\n        debug.warn(\n          '[Profiling] `profileLifecycle` is set to \"trace\". Calls to `uiProfiler.stop()` are ignored in trace mode.',\n        );\n      return;\n    }\n\n    if (!this._isRunning) {\n      DEBUG_BUILD && debug.warn('[Profiling] Profiler is not running, `uiProfiler.stop()` is a no-op.');\n      return;\n    }\n\n    this._endProfiling();\n  }\n\n  /** Handle an already-active root span at integration setup time (used only in trace mode). */\n  public notifyRootSpanActive(rootSpan: Span): void {\n    if (this._lifecycleMode !== 'trace' || !this._sessionSampled) {\n      return;\n    }\n\n    const spanId = rootSpan.spanContext().spanId;\n    if (!spanId || this._activeRootSpanIds.has(spanId)) {\n      return;\n    }\n\n    this._registerTraceRootSpan(spanId);\n\n    const rootSpanCount = this._activeRootSpanIds.size;\n\n    if (rootSpanCount === 1) {\n      DEBUG_BUILD &&\n        debug.log('[Profiling] Detected already active root span during setup. Active root spans now:', rootSpanCount);\n\n      this._beginProfiling();\n    }\n\n    if (this._isRunning) {\n      setThreadAttributes(rootSpan);\n    }\n  }\n\n  /**\n   * Begin profiling if not already running.\n   */\n  private _beginProfiling(): void {\n    if (this._isRunning) {\n      return;\n    }\n    this._isRunning = true;\n\n    DEBUG_BUILD && debug.log('[Profiling] Started profiling with profiler ID:', this._profilerId);\n\n    // Expose profiler_id to match root spans with profiles\n    getGlobalScope().setContext('profile', { profiler_id: this._profilerId });\n\n    this._startProfilerInstance();\n\n    if (!this._profiler) {\n      DEBUG_BUILD && debug.log('[Profiling] Failed to start JS Profiler; stopping.');\n      this._resetProfilerInfo();\n      return;\n    }\n\n    this._startPeriodicChunking();\n  }\n\n  /** End profiling session; final chunk will be collected and sent. */\n  private _endProfiling(): void {\n    if (!this._isRunning) {\n      return;\n    }\n    this._isRunning = false;\n\n    if (this._chunkTimer) {\n      clearTimeout(this._chunkTimer);\n      this._chunkTimer = undefined;\n    }\n\n    this._clearAllRootSpanTimeouts();\n\n    // Collect whatever was currently recording\n    this._collectCurrentChunk().catch(e => {\n      DEBUG_BUILD && debug.error('[Profiling] Failed to collect current profile chunk on `stop()`:', e);\n    });\n\n    // Manual: Clear profiling context so spans outside start()/stop() aren't marked as profiled\n    // Trace: Profile context is kept for the whole session duration\n    if (this._lifecycleMode === 'manual') {\n      getGlobalScope().setContext('profile', {});\n    }\n  }\n\n  /** Trace-mode: attach spanStart/spanEnd listeners. */\n  private _setupTraceLifecycleListeners(client: Client): void {\n    client.on('spanStart', span => {\n      if (!this._sessionSampled) {\n        DEBUG_BUILD &&\n          debug.log('[Profiling] Span not profiled because of negative sampling decision for user session.');\n        return;\n      }\n      if (span !== getRootSpan(span)) {\n        return; // only care about root spans\n      }\n      // Only count sampled root spans\n      if (!span.isRecording()) {\n        DEBUG_BUILD && debug.log('[Profiling] Discarding profile because root span was not sampled.');\n        return;\n      }\n\n      const spanId = span.spanContext().spanId;\n      if (!spanId || this._activeRootSpanIds.has(spanId)) {\n        return;\n      }\n\n      this._registerTraceRootSpan(spanId);\n\n      const rootSpanCount = this._activeRootSpanIds.size;\n      if (rootSpanCount === 1) {\n        DEBUG_BUILD &&\n          debug.log(\n            `[Profiling] Root span ${spanId} started. Profiling active while there are active root spans (count=${rootSpanCount}).`,\n          );\n        this._beginProfiling();\n      }\n    });\n\n    client.on('spanEnd', span => {\n      if (!this._sessionSampled) {\n        return;\n      }\n      const spanId = span.spanContext().spanId;\n      if (!spanId || !this._activeRootSpanIds.has(spanId)) {\n        return;\n      }\n      this._activeRootSpanIds.delete(spanId);\n      const rootSpanCount = this._activeRootSpanIds.size;\n\n      DEBUG_BUILD &&\n        debug.log(\n          `[Profiling] Root span with ID ${spanId} ended. Will continue profiling for as long as there are active root spans (currently: ${rootSpanCount}).`,\n        );\n      if (rootSpanCount === 0) {\n        this._collectCurrentChunk().catch(e => {\n          DEBUG_BUILD && debug.error('[Profiling] Failed to collect current profile chunk on last `spanEnd`:', e);\n        });\n        this._endProfiling();\n      }\n    });\n  }\n\n  /**\n   * Resets profiling information from scope and resets running state (used on failure)\n   */\n  private _resetProfilerInfo(): void {\n    this._isRunning = false;\n    getGlobalScope().setContext('profile', {});\n  }\n\n  /**\n   * Clear and reset all per-root-span timeouts.\n   */\n  private _clearAllRootSpanTimeouts(): void {\n    this._rootSpanTimeouts.forEach(timeout => clearTimeout(timeout));\n    this._rootSpanTimeouts.clear();\n  }\n\n  /** Keep track of root spans and schedule safeguard timeout (trace mode). */\n  private _registerTraceRootSpan(spanId: string): void {\n    this._activeRootSpanIds.add(spanId);\n    const timeout = setTimeout(() => this._onRootSpanTimeout(spanId), MAX_ROOT_SPAN_PROFILE_MS);\n    this._rootSpanTimeouts.set(spanId, timeout);\n  }\n\n  /**\n   * Start a profiler instance if needed.\n   */\n  private _startProfilerInstance(): void {\n    if (this._profiler?.stopped === false) {\n      return; // already running\n    }\n    const profiler = startJSSelfProfile();\n    if (!profiler) {\n      DEBUG_BUILD && debug.log('[Profiling] Failed to start JS Profiler.');\n      return;\n    }\n    this._profiler = profiler;\n  }\n\n  /**\n   * Schedule the next 60s chunk while running.\n   * Each tick collects a chunk and restarts the profiler.\n   * A chunk should be closed when there are no active root spans anymore OR when the maximum chunk interval is reached.\n   */\n  private _startPeriodicChunking(): void {\n    if (!this._isRunning) {\n      return;\n    }\n\n    this._chunkTimer = setTimeout(() => {\n      this._collectCurrentChunk().catch(e => {\n        DEBUG_BUILD && debug.error('[Profiling] Failed to collect current profile chunk during periodic chunking:', e);\n      });\n\n      if (this._isRunning) {\n        this._startProfilerInstance();\n\n        if (!this._profiler) {\n          // If restart failed, stop scheduling further chunks and reset context.\n          this._resetProfilerInfo();\n          return;\n        }\n\n        this._startPeriodicChunking();\n      }\n    }, CHUNK_INTERVAL_MS);\n  }\n\n  /**\n   * Handle timeout for a specific root span ID to avoid indefinitely running profiler if `spanEnd` never fires.\n   * If this was the last active root span, collect the current chunk and stop profiling.\n   */\n  private _onRootSpanTimeout(rootSpanId: string): void {\n    // If span already ended, ignore\n    if (!this._rootSpanTimeouts.has(rootSpanId)) {\n      return;\n    }\n    this._rootSpanTimeouts.delete(rootSpanId);\n\n    if (!this._activeRootSpanIds.has(rootSpanId)) {\n      return;\n    }\n\n    DEBUG_BUILD &&\n      debug.log(\n        `[Profiling] Reached 5-minute timeout for root span ${rootSpanId}. You likely started a manual root span that never called \\`.end()\\`.`,\n      );\n\n    this._activeRootSpanIds.delete(rootSpanId);\n\n    if (this._activeRootSpanIds.size === 0) {\n      this._endProfiling();\n    }\n  }\n\n  /**\n   * Stop current profiler instance, convert profile to chunk & send.\n   */\n  private async _collectCurrentChunk(): Promise<void> {\n    const prevProfiler = this._profiler;\n    this._profiler = undefined;\n\n    if (!prevProfiler) {\n      return;\n    }\n\n    try {\n      const profile = await prevProfiler.stop();\n\n      // eslint-disable-next-line @typescript-eslint/no-non-null-assertion\n      const chunk = createProfileChunkPayload(profile, this._client!, this._profilerId);\n\n      // Validate chunk before sending\n      const validationReturn = validateProfileChunk(chunk);\n      if ('reason' in validationReturn) {\n        DEBUG_BUILD &&\n          debug.log(\n            '[Profiling] Discarding invalid profile chunk (this is probably a bug in the SDK):',\n            validationReturn.reason,\n          );\n        return;\n      }\n\n      this._sendProfileChunk(chunk);\n\n      DEBUG_BUILD && debug.log('[Profiling] Collected browser profile chunk.');\n    } catch (e) {\n      DEBUG_BUILD && debug.log('[Profiling] Error while stopping JS Profiler for chunk:', e);\n    }\n  }\n\n  /**\n   * Send a profile chunk as a standalone envelope.\n   */\n  private _sendProfileChunk(chunk: ProfileChunk): void {\n    // eslint-disable-next-line @typescript-eslint/no-non-null-assertion\n    const client = this._client!;\n\n    const sdkInfo = getSdkMetadataForEnvelopeHeader(client.getSdkMetadata?.());\n    const dsn = client.getDsn();\n    const tunnel = client.getOptions().tunnel;\n\n    const envelope = createEnvelope<ProfileChunkEnvelope>(\n      {\n        event_id: uuid4(),\n        sent_at: new Date().toISOString(),\n        ...(sdkInfo && { sdk: sdkInfo }),\n        ...(!!tunnel && dsn && { dsn: dsnToString(dsn) }),\n      },\n      [[{ type: 'profile_chunk', platform: 'javascript' }, chunk]],\n    );\n\n    client.sendEnvelope(envelope).then(null, reason => {\n      DEBUG_BUILD && debug.error('Error while sending profile chunk envelope:', reason);\n    });\n  }\n}\n","import type { Profiler } from '@sentry/core/browser';\nimport { debug, getClient } from '@sentry/core/browser';\nimport { DEBUG_BUILD } from '../debug-build';\n\n/**\n * Starts the Sentry UI profiler.\n * This mode is exclusive with the transaction profiler and will only work if the profilesSampleRate is set to a falsy value.\n * In UI profiling mode, the profiler will keep reporting profile chunks to Sentry until it is stopped, which allows for continuous profiling of the application.\n */\nfunction startProfiler(): void {\n  const client = getClient();\n  if (!client) {\n    DEBUG_BUILD && debug.warn('No Sentry client available, profiling is not started');\n    return;\n  }\n\n  const integration = client.getIntegrationByName('BrowserProfiling');\n\n  if (!integration) {\n    DEBUG_BUILD && debug.warn('BrowserProfiling integration is not available');\n    return;\n  }\n\n  client.emit('startUIProfiler');\n}\n\n/**\n * Stops the Sentry UI profiler.\n * Calls to stop will stop the profiler and flush the currently collected profile data to Sentry.\n */\nfunction stopProfiler(): void {\n  const client = getClient();\n  if (!client) {\n    DEBUG_BUILD && debug.warn('No Sentry client available, profiling is not started');\n    return;\n  }\n\n  const integration = client.getIntegrationByName('BrowserProfiling');\n  if (!integration) {\n    DEBUG_BUILD && debug.warn('ProfilingIntegration is not available');\n    return;\n  }\n\n  client.emit('stopUIProfiler');\n}\n\n/**\n * Profiler namespace for controlling the JS profiler in 'manual' mode.\n *\n * Requires the `browserProfilingIntegration` from the `@sentry/browser` package.\n */\nexport const uiProfiler: Profiler = {\n  startProfiler,\n  stopProfiler,\n};\n","import type { EventEnvelope, IntegrationFn, Profile, Span } from '@sentry/core/browser';\nimport { debug, defineIntegration, getActiveSpan, getRootSpan, hasSpansEnabled } from '@sentry/core/browser';\nimport type { BrowserOptions } from '../client';\nimport { DEBUG_BUILD } from '../debug-build';\nimport { WINDOW } from '../helpers';\nimport { startProfileForSpan } from './startProfileForSpan';\nimport { UIProfiler } from './UIProfiler';\nimport type { ProfiledEvent } from './utils';\nimport {\n  addProfilesToEnvelope,\n  createProfilingEvent,\n  findProfiledTransactionsFromEnvelope,\n  getActiveProfilesCount,\n  hasLegacyProfiling,\n  isAutomatedPageLoadSpan,\n  PROFILED_ROOT_SPANS,\n  setThreadAttributes,\n  shouldProfileSpanLegacy,\n  takeProfileFromGlobalCache,\n} from './utils';\n\nconst INTEGRATION_NAME = 'BrowserProfiling' as const;\n\nconst _browserProfilingIntegration = (() => {\n  return {\n    name: INTEGRATION_NAME,\n    setup(client) {\n      const options = client.getOptions() as BrowserOptions;\n      const profiler = new UIProfiler();\n\n      if (!hasLegacyProfiling(options) && !options.profileLifecycle) {\n        // Set default lifecycle mode\n        options.profileLifecycle = 'manual';\n      }\n\n      // eslint-disable-next-line typescript/no-deprecated\n      if (hasLegacyProfiling(options) && !options.profilesSampleRate) {\n        DEBUG_BUILD && debug.log('[Profiling] Profiling disabled, no profiling options found.');\n        return;\n      }\n\n      const activeSpan = getActiveSpan();\n      const rootSpan = activeSpan && getRootSpan(activeSpan);\n\n      if (hasLegacyProfiling(options) && options.profileSessionSampleRate !== undefined) {\n        DEBUG_BUILD &&\n          debug.warn(\n            '[Profiling] Both legacy profiling (`profilesSampleRate`) and UI profiling settings are defined. `profileSessionSampleRate` has no effect when legacy profiling is enabled.',\n          );\n      }\n\n      // UI PROFILING (Profiling V2)\n      if (!hasLegacyProfiling(options)) {\n        const lifecycleMode = options.profileLifecycle;\n\n        // Registering hooks in all lifecycle modes to be able to notify users in case they want to start/stop the profiler manually in `trace` mode\n        client.on('startUIProfiler', () => profiler.start());\n        client.on('stopUIProfiler', () => profiler.stop());\n\n        if (lifecycleMode === 'manual') {\n          profiler.initialize(client);\n        } else if (lifecycleMode === 'trace') {\n          if (!hasSpansEnabled(options)) {\n            DEBUG_BUILD &&\n              debug.warn(\n                \"[Profiling] `profileLifecycle` is 'trace' but tracing is disabled. Set a `tracesSampleRate` or `tracesSampler` to enable span tracing.\",\n              );\n            return;\n          }\n\n          profiler.initialize(client);\n\n          // If there is an active, sampled root span already, notify the profiler\n          if (rootSpan) {\n            profiler.notifyRootSpanActive(rootSpan);\n          }\n\n          // In case rootSpan is created slightly after setup -> schedule microtask to re-check and notify.\n          WINDOW.setTimeout(() => {\n            const laterActiveSpan = getActiveSpan();\n            const laterRootSpan = laterActiveSpan && getRootSpan(laterActiveSpan);\n            if (laterRootSpan) {\n              profiler.notifyRootSpanActive(laterRootSpan);\n            }\n          }, 0);\n        }\n      } else {\n        // LEGACY PROFILING (v1)\n        if (rootSpan && isAutomatedPageLoadSpan(rootSpan)) {\n          if (shouldProfileSpanLegacy(rootSpan)) {\n            startProfileForSpan(rootSpan);\n          }\n        }\n\n        client.on('spanStart', (span: Span) => {\n          const rootSpan = getRootSpan(span);\n          if (span === rootSpan) {\n            if (shouldProfileSpanLegacy(span)) {\n              startProfileForSpan(span);\n            }\n          } else if (PROFILED_ROOT_SPANS.has(rootSpan)) {\n            setThreadAttributes(span);\n          }\n        });\n\n        client.on('beforeEnvelope', (envelope): void => {\n          // if not profiles are in queue, there is nothing to add to the envelope.\n          if (!getActiveProfilesCount()) {\n            return;\n          }\n\n          const profiledTransactionEvents = findProfiledTransactionsFromEnvelope(envelope);\n          if (!profiledTransactionEvents.length) {\n            return;\n          }\n\n          const profilesToAddToEnvelope: Profile[] = [];\n\n          for (const profiledTransaction of profiledTransactionEvents) {\n            const context = profiledTransaction?.contexts;\n            const profile_id = context?.profile?.['profile_id'];\n            const start_timestamp = context?.profile?.['start_timestamp'];\n\n            if (typeof profile_id !== 'string') {\n              DEBUG_BUILD && debug.log('[Profiling] cannot find profile for a span without a profile context');\n              continue;\n            }\n\n            if (!profile_id) {\n              DEBUG_BUILD && debug.log('[Profiling] cannot find profile for a span without a profile context');\n              continue;\n            }\n\n            // Remove the profile from the span context before sending, relay will take care of the rest.\n            if (context?.profile) {\n              delete context.profile;\n            }\n\n            const profile = takeProfileFromGlobalCache(profile_id);\n            if (!profile) {\n              DEBUG_BUILD && debug.log(`[Profiling] Could not retrieve profile for span: ${profile_id}`);\n              continue;\n            }\n\n            const profileEvent = createProfilingEvent(\n              profile_id,\n              start_timestamp as number | undefined,\n              profile,\n              profiledTransaction as ProfiledEvent,\n            );\n            if (profileEvent) {\n              profilesToAddToEnvelope.push(profileEvent);\n            }\n          }\n\n          addProfilesToEnvelope(envelope as EventEnvelope, profilesToAddToEnvelope);\n        });\n      }\n    },\n  };\n}) satisfies IntegrationFn;\n\nexport const browserProfilingIntegration = defineIntegration(_browserProfilingIntegration);\n","import type { Span } from '@sentry/core/browser';\nimport { debug, getCurrentScope, spanToJSON, timestampInSeconds, uuid4 } from '@sentry/core/browser';\nimport { DEBUG_BUILD } from '../debug-build';\nimport { WINDOW } from '../helpers';\nimport type { JSSelfProfile } from './jsSelfProfiling';\nimport {\n  addProfileToGlobalCache,\n  isAutomatedPageLoadSpan,\n  MAX_PROFILE_DURATION_MS,\n  PROFILED_ROOT_SPANS,\n  setThreadAttributes,\n  startJSSelfProfile,\n} from './utils';\n\n/**\n * Wraps startTransaction and stopTransaction with profiling related logic.\n * startProfileForTransaction is called after the call to startTransaction in order to avoid our own code from\n * being profiled. Because of that same reason, stopProfiling is called before the call to stopTransaction.\n */\nexport function startProfileForSpan(span: Span): void {\n  // Start the profiler and get the profiler instance.\n  let startTimestamp: number | undefined;\n  if (isAutomatedPageLoadSpan(span)) {\n    startTimestamp = timestampInSeconds() * 1000;\n  }\n\n  const profiler = startJSSelfProfile();\n\n  // We failed to construct the profiler, so we skip.\n  // No need to log anything as this has already been logged in startProfile.\n  if (!profiler) {\n    return;\n  }\n\n  if (DEBUG_BUILD) {\n    debug.log(`[Profiling] started profiling span: ${spanToJSON(span).description}`);\n  }\n\n  // We create \"unique\" span names to avoid concurrent spans with same names\n  // from being ignored by the profiler. From here on, only this span name should be used when\n  // calling the profiler methods. Note: we log the original name to the user to avoid confusion.\n  const profileId = uuid4();\n\n  // A couple of important things to note here:\n  // `CpuProfilerBindings.stopProfiling` will be scheduled to run in 30seconds in order to exceed max profile duration.\n  // Whichever of the two (span.finish/timeout) is first to run, the profiling will be stopped and the gathered profile\n  // will be processed when the original span is finished. Since onProfileHandler can be invoked multiple times in the\n  // event of an error or user mistake (calling span.finish multiple times), it is important that the behavior of onProfileHandler\n  // is idempotent as we do not want any timings or profiles to be overridden by the last call to onProfileHandler.\n  // After the original finish method is called, the event will be reported through the integration and delegated to transport.\n  let processedProfile: JSSelfProfile | null = null;\n\n  getCurrentScope().setContext('profile', {\n    profile_id: profileId,\n    start_timestamp: startTimestamp,\n  });\n\n  PROFILED_ROOT_SPANS.add(span);\n  setThreadAttributes(span);\n\n  /**\n   * Idempotent handler for profile stop\n   */\n  async function onProfileHandler(): Promise<void> {\n    // Check if the profile exists and return it the behavior has to be idempotent as users may call span.finish multiple times.\n    if (!span) {\n      return;\n    }\n    // Satisfy the type checker, but profiler will always be defined here.\n    if (!profiler) {\n      return;\n    }\n    if (processedProfile) {\n      if (DEBUG_BUILD) {\n        debug.log('[Profiling] profile for:', spanToJSON(span).description, 'already exists, returning early');\n      }\n      return;\n    }\n\n    return profiler\n      .stop()\n      .then((profile: JSSelfProfile): void => {\n        if (maxDurationTimeoutID) {\n          WINDOW.clearTimeout(maxDurationTimeoutID);\n          maxDurationTimeoutID = undefined;\n        }\n\n        if (DEBUG_BUILD) {\n          debug.log(`[Profiling] stopped profiling of span: ${spanToJSON(span).description}`);\n        }\n\n        // In case of an overlapping span, stopProfiling may return null and silently ignore the overlapping profile.\n        if (!profile) {\n          if (DEBUG_BUILD) {\n            debug.log(\n              `[Profiling] profiler returned null profile for: ${spanToJSON(span).description}`,\n              'this may indicate an overlapping span or a call to stopProfiling with a profile title that was never started',\n            );\n          }\n          return;\n        }\n\n        processedProfile = profile;\n        addProfileToGlobalCache(profileId, profile);\n      })\n      .catch(error => {\n        if (DEBUG_BUILD) {\n          debug.log('[Profiling] error while stopping profiler:', error);\n        }\n      });\n  }\n\n  // Enqueue a timeout to prevent profiles from running over max duration.\n  let maxDurationTimeoutID: number | undefined = WINDOW.setTimeout(() => {\n    if (DEBUG_BUILD) {\n      debug.log('[Profiling] max profile duration elapsed, stopping profiling for:', spanToJSON(span).description);\n    }\n    // If the timeout exceeds, we want to stop profiling, but not finish the span\n    // eslint-disable-next-line @typescript-eslint/no-floating-promises\n    onProfileHandler();\n  }, MAX_PROFILE_DURATION_MS);\n\n  // We need to reference the original end call to avoid creating an infinite loop\n  const originalEnd = span.end.bind(span);\n\n  /**\n   * Wraps span `end()` with profiling related logic.\n   * startProfiling is called after the call to spanStart in order to avoid our own code from\n   * being profiled. Because of that same reason, stopProfiling is called before the call to spanEnd.\n   */\n  function profilingWrappedSpanEnd(): Span {\n    if (!span) {\n      return originalEnd();\n    }\n    // onProfileHandler should always return the same profile even if this is called multiple times.\n    // Always call onProfileHandler to ensure stopProfiling is called and the timeout is cleared.\n    void onProfileHandler().then(\n      () => {\n        originalEnd();\n      },\n      () => {\n        // If onProfileHandler fails, we still want to call the original finish method.\n        originalEnd();\n      },\n    );\n\n    return span;\n  }\n\n  span.end = profilingWrappedSpanEnd;\n}\n","/* eslint-disable max-lines */\nimport type {\n  Client,\n  ContinuousThreadCpuProfile,\n  DebugImage,\n  Envelope,\n  Event,\n  EventEnvelope,\n  Profile,\n  ProfileChunk,\n  Span,\n  ThreadCpuProfile,\n} from '@sentry/core/browser';\nimport {\n  browserPerformanceTimeOrigin,\n  debug,\n  DEFAULT_ENVIRONMENT,\n  forEachEnvelopeItem,\n  getClient,\n  getDebugImagesForResources,\n  GLOBAL_OBJ,\n  spanToJSON,\n  timestampInSeconds,\n  uuid4,\n} from '@sentry/core/browser';\nimport type { BrowserOptions } from '../client';\nimport { DEBUG_BUILD } from '../debug-build';\nimport { WINDOW } from '../helpers';\nimport type { JSSelfProfile, JSSelfProfiler, JSSelfProfilerConstructor, JSSelfProfileStack } from './jsSelfProfiling';\n\nconst MS_TO_NS = 1e6;\n\n// Checking if we are in Main or Worker thread: `self` (not `window`) is the `globalThis` in Web Workers and `importScripts` are only available in Web Workers\nconst isMainThread = 'window' in GLOBAL_OBJ && GLOBAL_OBJ.window === GLOBAL_OBJ && typeof importScripts === 'undefined';\n\n// Setting ID to 0 as we cannot get an ID from Web Workers\nexport const PROFILER_THREAD_ID_STRING = String(0);\nexport const PROFILER_THREAD_NAME = isMainThread ? 'main' : 'worker';\n\n// We force make this optional to be on the safe side...\nconst navigator = WINDOW.navigator as typeof WINDOW.navigator | undefined;\n\n// Machine properties (eval only once)\nlet OS_PLATFORM = '';\nlet OS_PLATFORM_VERSION = '';\nlet OS_ARCH = '';\nlet OS_BROWSER = navigator?.userAgent || '';\nlet OS_MODEL = '';\nconst OS_LOCALE = navigator?.language || navigator?.languages?.[0] || '';\n\ntype UAData = {\n  platform?: string;\n  architecture?: string;\n  model?: string;\n  platformVersion?: string;\n  fullVersionList?: {\n    brand: string;\n    version: string;\n  }[];\n};\n\ninterface UserAgentData {\n  getHighEntropyValues: (keys: string[]) => Promise<UAData>;\n}\n\nfunction isUserAgentData(data: unknown): data is UserAgentData {\n  return typeof data === 'object' && data !== null && 'getHighEntropyValues' in data;\n}\n\n// @ts-expect-error userAgentData is not part of the navigator interface yet\nconst userAgentData = navigator?.userAgentData;\n\nif (isUserAgentData(userAgentData)) {\n  userAgentData\n    .getHighEntropyValues(['architecture', 'model', 'platform', 'platformVersion', 'fullVersionList'])\n    .then((ua: UAData) => {\n      OS_PLATFORM = ua.platform || '';\n      OS_ARCH = ua.architecture || '';\n      OS_MODEL = ua.model || '';\n      OS_PLATFORM_VERSION = ua.platformVersion || '';\n\n      if (ua.fullVersionList?.length) {\n        // eslint-disable-next-line @typescript-eslint/no-non-null-assertion\n        const firstUa = ua.fullVersionList[ua.fullVersionList.length - 1]!;\n        OS_BROWSER = `${firstUa.brand} ${firstUa.version}`;\n      }\n    })\n    .catch(e => void e);\n}\n\nfunction isProcessedJSSelfProfile(profile: ThreadCpuProfile | JSSelfProfile): profile is JSSelfProfile {\n  return !('thread_metadata' in profile);\n}\n\n// Enriches the profile with threadId of the current thread.\n// This is done in node as we seem to not be able to get the info from C native code.\n/**\n *\n */\nexport function enrichWithThreadInformation(profile: ThreadCpuProfile | JSSelfProfile): ThreadCpuProfile {\n  if (!isProcessedJSSelfProfile(profile)) {\n    return profile;\n  }\n\n  return convertJSSelfProfileToSampledFormat(profile);\n}\n\n// Profile is marked as optional because it is deleted from the metadata\n// by the integration before the event is processed by other integrations.\nexport interface ProfiledEvent extends Event {\n  sdkProcessingMetadata: {\n    profile?: JSSelfProfile;\n  };\n}\n\nfunction getTraceId(event: Event): string {\n  const traceId: unknown = event.contexts?.trace?.trace_id;\n  // Log a warning if the profile has an invalid traceId (should be uuidv4).\n  // All profiles and transactions are rejected if this is the case and we want to\n  // warn users that this is happening if they enable debug flag\n  if (typeof traceId === 'string' && traceId.length !== 32) {\n    if (DEBUG_BUILD) {\n      debug.log(`[Profiling] Invalid traceId: ${traceId} on profiled event`);\n    }\n  }\n  if (typeof traceId !== 'string') {\n    return '';\n  }\n\n  return traceId;\n}\n/**\n * Creates a profiling event envelope from a Sentry event. If profile does not pass\n * validation, returns null.\n * @param event\n * @param dsn\n * @param metadata\n * @param tunnel\n * @returns {EventEnvelope | null}\n */\n\n/**\n * Creates a profiling event envelope from a Sentry event.\n */\nexport function createProfilePayload(\n  profile_id: string,\n  start_timestamp: number | undefined,\n  processed_profile: JSSelfProfile,\n  event: ProfiledEvent,\n): Profile {\n  if (event.type !== 'transaction') {\n    // createProfilingEventEnvelope should only be called for transactions,\n    // we type guard this behavior with isProfiledTransactionEvent.\n    throw new TypeError('Profiling events may only be attached to transactions, this should never occur.');\n  }\n\n  if (processed_profile === undefined || processed_profile === null) {\n    throw new TypeError(\n      `Cannot construct profiling event envelope without a valid profile. Got ${processed_profile} instead.`,\n    );\n  }\n\n  const traceId = getTraceId(event);\n  const enrichedThreadProfile = enrichWithThreadInformation(processed_profile);\n  const transactionStartMs = start_timestamp\n    ? start_timestamp\n    : typeof event.start_timestamp === 'number'\n      ? event.start_timestamp * 1000\n      : timestampInSeconds() * 1000;\n  const transactionEndMs = typeof event.timestamp === 'number' ? event.timestamp * 1000 : timestampInSeconds() * 1000;\n\n  const profile: Profile = {\n    event_id: profile_id,\n    timestamp: new Date(transactionStartMs).toISOString(),\n    platform: 'javascript',\n    version: '1',\n    release: event.release || '',\n    environment: event.environment || DEFAULT_ENVIRONMENT,\n    runtime: {\n      name: 'javascript',\n      version: WINDOW.navigator.userAgent,\n    },\n    os: {\n      name: OS_PLATFORM,\n      version: OS_PLATFORM_VERSION,\n      build_number: OS_BROWSER,\n    },\n    device: {\n      locale: OS_LOCALE,\n      model: OS_MODEL,\n      manufacturer: OS_BROWSER,\n      architecture: OS_ARCH,\n      is_emulator: false,\n    },\n    debug_meta: {\n      images: applyDebugMetadata(processed_profile.resources),\n    },\n    profile: enrichedThreadProfile,\n    transactions: [\n      {\n        name: event.transaction || '',\n        id: event.event_id || uuid4(),\n        trace_id: traceId,\n        active_thread_id: PROFILER_THREAD_ID_STRING,\n        relative_start_ns: '0',\n        relative_end_ns: ((transactionEndMs - transactionStartMs) * 1e6).toFixed(0),\n      },\n    ],\n  };\n\n  return profile;\n}\n\n/**\n * Create a profile chunk envelope item\n */\nexport function createProfileChunkPayload(\n  jsSelfProfile: JSSelfProfile,\n  client: Client,\n  profilerId?: string,\n): ProfileChunk {\n  // only == to catch null and undefined\n  if (jsSelfProfile == null) {\n    throw new TypeError(\n      `Cannot construct profiling event envelope without a valid profile. Got ${jsSelfProfile} instead.`,\n    );\n  }\n\n  const continuousProfile = convertToContinuousProfile(jsSelfProfile);\n\n  const options = client.getOptions();\n  const sdk = client.getSdkMetadata?.()?.sdk;\n\n  return {\n    chunk_id: uuid4(),\n    client_sdk: {\n      name: sdk?.name ?? 'sentry.javascript.browser',\n      version: sdk?.version ?? '0.0.0',\n    },\n    profiler_id: profilerId || uuid4(),\n    platform: 'javascript',\n    version: '2',\n    release: options.release ?? '',\n    environment: options.environment ?? 'production',\n    debug_meta: {\n      // function name obfuscation\n      images: applyDebugMetadata(jsSelfProfile.resources),\n    },\n    profile: continuousProfile,\n  };\n}\n\n/**\n * Validate a profile chunk against the Sample Format V2 requirements.\n * https://develop.sentry.dev/sdk/telemetry/profiles/sample-format-v2/\n * - Presence of samples, stacks, frames\n * - Required metadata fields\n */\nexport function validateProfileChunk(chunk: ProfileChunk): { valid: true } | { reason: string } {\n  try {\n    // Required metadata\n    if (!chunk || typeof chunk !== 'object') {\n      return { reason: 'chunk is not an object' };\n    }\n\n    // profiler_id and chunk_id must be 32 lowercase hex chars\n    const isHex32 = (val: unknown): boolean => typeof val === 'string' && /^[a-f0-9]{32}$/.test(val);\n    if (!isHex32(chunk.profiler_id)) {\n      return { reason: 'missing or invalid profiler_id' };\n    }\n    if (!isHex32(chunk.chunk_id)) {\n      return { reason: 'missing or invalid chunk_id' };\n    }\n\n    if (!chunk.client_sdk) {\n      return { reason: 'missing client_sdk metadata' };\n    }\n\n    // Profile data must have frames, stacks, samples\n    const profile = chunk.profile as { frames?: unknown[]; stacks?: unknown[]; samples?: unknown[] } | undefined;\n    if (!profile) {\n      return { reason: 'missing profile data' };\n    }\n\n    if (!Array.isArray(profile.frames) || !profile.frames.length) {\n      return { reason: 'profile has no frames' };\n    }\n    if (!Array.isArray(profile.stacks) || !profile.stacks.length) {\n      return { reason: 'profile has no stacks' };\n    }\n    if (!Array.isArray(profile.samples) || !profile.samples.length) {\n      return { reason: 'profile has no samples' };\n    }\n\n    return { valid: true };\n  } catch (e) {\n    return { reason: `unknown validation error: ${e}` };\n  }\n}\n\n/**\n * Convert from JSSelfProfile format to ContinuousThreadCpuProfile format.\n */\nfunction convertToContinuousProfile(input: {\n  frames: { name: string; resourceId?: number; line?: number; column?: number }[];\n  stacks: { frameId: number; parentId?: number }[];\n  samples: { timestamp: number; stackId?: number }[];\n  resources: string[];\n}): ContinuousThreadCpuProfile {\n  // Frames map 1:1 by index; fill only when present to avoid sparse writes\n  const frames: ContinuousThreadCpuProfile['frames'] = [];\n  for (let i = 0; i < input.frames.length; i++) {\n    const frame = input.frames[i];\n    if (!frame) {\n      continue;\n    }\n    frames[i] = {\n      function: frame.name,\n      abs_path: typeof frame.resourceId === 'number' ? input.resources[frame.resourceId] : undefined,\n      lineno: frame.line,\n      colno: frame.column,\n    };\n  }\n\n  // Build stacks by following parent links, top->down order (root last)\n  const stacks: ContinuousThreadCpuProfile['stacks'] = [];\n  for (let i = 0; i < input.stacks.length; i++) {\n    const stackHead = input.stacks[i];\n    if (!stackHead) {\n      continue;\n    }\n    const list: number[] = [];\n    let current: { frameId: number; parentId?: number } | undefined = stackHead;\n    while (current) {\n      list.push(current.frameId);\n      current = current.parentId === undefined ? undefined : input.stacks[current.parentId];\n    }\n    stacks[i] = list;\n  }\n\n  // Align timestamps to SDK time origin to match span/event timelines\n  const perfOrigin = browserPerformanceTimeOrigin();\n  const origin = typeof performance.timeOrigin === 'number' ? performance.timeOrigin : perfOrigin || 0;\n  const adjustForOriginChange = origin - (perfOrigin || origin);\n\n  const samples: ContinuousThreadCpuProfile['samples'] = [];\n  for (let i = 0; i < input.samples.length; i++) {\n    const sample = input.samples[i];\n    if (!sample) {\n      continue;\n    }\n    // Convert ms to seconds epoch-based timestamp\n    const timestampSeconds = (origin + (sample.timestamp - adjustForOriginChange)) / 1000;\n    samples[i] = {\n      stack_id: sample.stackId ?? 0,\n      thread_id: PROFILER_THREAD_ID_STRING,\n      timestamp: timestampSeconds,\n    };\n  }\n\n  return {\n    frames,\n    stacks,\n    samples,\n    thread_metadata: { [PROFILER_THREAD_ID_STRING]: { name: PROFILER_THREAD_NAME } },\n  };\n}\n\n/**\n *\n */\nexport function isProfiledTransactionEvent(event: Event): event is ProfiledEvent {\n  return !!event.sdkProcessingMetadata?.profile;\n}\n\n/*\n  See packages/browser-utils/src/browser/router.ts\n*/\n/**\n *\n */\nexport function isAutomatedPageLoadSpan(span: Span): boolean {\n  return spanToJSON(span).op === 'pageload';\n}\n\n/**\n * Converts a JSSelfProfile to a our sampled format.\n * Does not currently perform stack indexing.\n */\nexport function convertJSSelfProfileToSampledFormat(input: JSSelfProfile): Profile['profile'] {\n  let EMPTY_STACK_ID: undefined | number = undefined;\n  let STACK_ID = 0;\n\n  // Initialize the profile that we will fill with data\n  const profile: Profile['profile'] = {\n    samples: [],\n    stacks: [],\n    frames: [],\n    thread_metadata: {\n      [PROFILER_THREAD_ID_STRING]: { name: PROFILER_THREAD_NAME },\n    },\n  };\n\n  const firstSample = input.samples[0];\n  if (!firstSample) {\n    return profile;\n  }\n\n  // We assert samples.length > 0 above and timestamp should always be present\n  const start = firstSample.timestamp;\n  // The JS SDK might change it's time origin based on some heuristic (see See packages/utils/src/time.ts)\n  // when that happens, we need to ensure we are correcting the profile timings so the two timelines stay in sync.\n  // Since JS self profiling time origin is always initialized to performance.timeOrigin, we need to adjust for\n  // the drift between the SDK selected value and our profile time origin.\n  const perfOrigin = browserPerformanceTimeOrigin();\n  const origin = typeof performance.timeOrigin === 'number' ? performance.timeOrigin : perfOrigin || 0;\n  const adjustForOriginChange = origin - (perfOrigin || origin);\n\n  input.samples.forEach((jsSample, i) => {\n    // If sample has no stack, add an empty sample\n    if (jsSample.stackId === undefined) {\n      if (EMPTY_STACK_ID === undefined) {\n        EMPTY_STACK_ID = STACK_ID;\n        profile.stacks[EMPTY_STACK_ID] = [];\n        STACK_ID++;\n      }\n\n      profile['samples'][i] = {\n        // convert ms timestamp to ns\n        elapsed_since_start_ns: ((jsSample.timestamp + adjustForOriginChange - start) * MS_TO_NS).toFixed(0),\n        stack_id: EMPTY_STACK_ID,\n        thread_id: PROFILER_THREAD_ID_STRING,\n      };\n      return;\n    }\n\n    let stackTop: JSSelfProfileStack | undefined = input.stacks[jsSample.stackId];\n\n    // Functions in top->down order (root is last)\n    // We follow the stackTop.parentId trail and collect each visited frameId\n    const stack: number[] = [];\n\n    while (stackTop) {\n      stack.push(stackTop.frameId);\n\n      const frame = input.frames[stackTop.frameId];\n\n      // If our frame has not been indexed yet, index it\n      if (frame && profile.frames[stackTop.frameId] === undefined) {\n        profile.frames[stackTop.frameId] = {\n          function: frame.name,\n          abs_path: typeof frame.resourceId === 'number' ? input.resources[frame.resourceId] : undefined,\n          lineno: frame.line,\n          colno: frame.column,\n        };\n      }\n\n      stackTop = stackTop.parentId === undefined ? undefined : input.stacks[stackTop.parentId];\n    }\n\n    const sample: Profile['profile']['samples'][0] = {\n      // convert ms timestamp to ns\n      elapsed_since_start_ns: ((jsSample.timestamp + adjustForOriginChange - start) * MS_TO_NS).toFixed(0),\n      stack_id: STACK_ID,\n      thread_id: PROFILER_THREAD_ID_STRING,\n    };\n\n    profile['stacks'][STACK_ID] = stack;\n    profile['samples'][i] = sample;\n    STACK_ID++;\n  });\n\n  return profile;\n}\n\n/**\n * Adds items to envelope if they are not already present - mutates the envelope.\n * @param envelope\n */\nexport function addProfilesToEnvelope(envelope: EventEnvelope, profiles: Profile[]): Envelope {\n  if (!profiles.length) {\n    return envelope;\n  }\n\n  for (const profile of profiles) {\n    envelope[1].push([{ type: 'profile' }, profile]);\n  }\n  return envelope;\n}\n\n/**\n * Finds transactions with profile_id context in the envelope\n * @param envelope\n * @returns\n */\nexport function findProfiledTransactionsFromEnvelope(envelope: Envelope): Event[] {\n  const events: Event[] = [];\n\n  forEachEnvelopeItem(envelope, (item, type) => {\n    if (type !== 'transaction') {\n      return;\n    }\n\n    for (let j = 1; j < item.length; j++) {\n      const event = item[j] as Event;\n\n      if (event?.contexts?.profile?.profile_id) {\n        events.push(item[j] as Event);\n      }\n    }\n  });\n\n  return events;\n}\n\n/**\n * Applies debug meta data to an event from a list of paths to resources (sourcemaps)\n */\nexport function applyDebugMetadata(resource_paths: ReadonlyArray<string>): DebugImage[] {\n  const client = getClient();\n  const options = client?.getOptions();\n  const stackParser = options?.stackParser;\n\n  if (!stackParser) {\n    return [];\n  }\n\n  return getDebugImagesForResources(stackParser, resource_paths);\n}\n\n/**\n * Checks the given sample rate to make sure it is valid type and value (a boolean, or a number between 0 and 1).\n */\nexport function isValidSampleRate(rate: unknown): boolean {\n  // we need to check NaN explicitly because it's of type 'number' and therefore wouldn't get caught by this typecheck\n  if ((typeof rate !== 'number' && typeof rate !== 'boolean') || (typeof rate === 'number' && isNaN(rate))) {\n    DEBUG_BUILD &&\n      debug.warn(\n        `[Profiling] Invalid sample rate. Sample rate must be a boolean or a number between 0 and 1. Got ${JSON.stringify(\n          rate,\n        )} of type ${JSON.stringify(typeof rate)}.`,\n      );\n    return false;\n  }\n\n  // Boolean sample rates are always valid\n  if (rate === true || rate === false) {\n    return true;\n  }\n\n  // in case sampleRate is a boolean, it will get automatically cast to 1 if it's true and 0 if it's false\n  if (rate < 0 || rate > 1) {\n    DEBUG_BUILD && debug.warn(`[Profiling] Invalid sample rate. Sample rate must be between 0 and 1. Got ${rate}.`);\n    return false;\n  }\n  return true;\n}\n\nfunction isValidProfile(profile: JSSelfProfile): profile is JSSelfProfile & { profile_id: string } {\n  if (profile.samples.length < 2) {\n    if (DEBUG_BUILD) {\n      // Log a warning if the profile has less than 2 samples so users can know why\n      // they are not seeing any profiling data and we cant avoid the back and forth\n      // of asking them to provide us with a dump of the profile data.\n      debug.log('[Profiling] Discarding profile because it contains less than 2 samples');\n    }\n    return false;\n  }\n\n  if (!profile.frames.length) {\n    if (DEBUG_BUILD) {\n      debug.log('[Profiling] Discarding profile because it contains no frames');\n    }\n    return false;\n  }\n\n  return true;\n}\n\n// Keep a flag value to avoid re-initializing the profiler constructor. If it fails\n// once, it will always fail and this allows us to early return.\nlet PROFILING_CONSTRUCTOR_FAILED: boolean = false;\nexport const MAX_PROFILE_DURATION_MS = 30_000;\n\n/**\n * Check if profiler constructor is available.\n * @param maybeProfiler\n */\nfunction isJSProfilerSupported(maybeProfiler: unknown): maybeProfiler is typeof JSSelfProfilerConstructor {\n  return typeof maybeProfiler === 'function';\n}\n\n/**\n * Starts the profiler and returns the profiler instance.\n */\nexport function startJSSelfProfile(): JSSelfProfiler | undefined {\n  // Feature support check first\n  const JSProfilerConstructor = WINDOW.Profiler;\n\n  if (!isJSProfilerSupported(JSProfilerConstructor)) {\n    if (DEBUG_BUILD) {\n      debug.log('[Profiling] Profiling is not supported by this browser, Profiler interface missing on window object.');\n    }\n    return;\n  }\n\n  // From initial testing, it seems that the minimum value for sampleInterval is 10ms.\n  const samplingIntervalMS = 10;\n  // Start the profiler\n  const maxSamples = Math.floor(MAX_PROFILE_DURATION_MS / samplingIntervalMS);\n\n  // Attempt to initialize the profiler constructor, if it fails, we disable profiling for the current user session.\n  // This is likely due to a missing 'Document-Policy': 'js-profiling' header. We do not want to throw an error if this happens\n  // as we risk breaking the user's application, so just disable profiling and log an error.\n  try {\n    return new JSProfilerConstructor({ sampleInterval: samplingIntervalMS, maxBufferSize: maxSamples });\n  } catch (_e) {\n    if (DEBUG_BUILD) {\n      debug.log(\n        \"[Profiling] Failed to initialize the Profiling constructor, this is likely due to a missing 'Document-Policy': 'js-profiling' header.\",\n      );\n      debug.log('[Profiling] Disabling profiling for current user session.');\n    }\n    PROFILING_CONSTRUCTOR_FAILED = true;\n  }\n\n  return;\n}\n\n/**\n * Determine if a profile should be profiled.\n */\nexport function shouldProfileSpanLegacy(span: Span): boolean {\n  // If constructor failed once, it will always fail, so we can early return.\n  if (PROFILING_CONSTRUCTOR_FAILED) {\n    if (DEBUG_BUILD) {\n      debug.log('[Profiling] Profiling has been disabled for the duration of the current user session.');\n    }\n    return false;\n  }\n\n  if (!span.isRecording()) {\n    DEBUG_BUILD && debug.log('[Profiling] Discarding profile because root span was not sampled.');\n    return false;\n  }\n\n  const client = getClient();\n  const options = client?.getOptions();\n  if (!options) {\n    DEBUG_BUILD && debug.log('[Profiling] Profiling disabled, no options found.');\n    return false;\n  }\n\n  // eslint-disable-next-line typescript/no-deprecated\n  const profilesSampleRate = (options as BrowserOptions).profilesSampleRate as\n    | BrowserOptions['profilesSampleRate']\n    | boolean;\n\n  // Since this is coming from the user (or from a function provided by the user), who knows what we might get. (The\n  // only valid values are booleans or numbers between 0 and 1.)\n  if (!isValidSampleRate(profilesSampleRate)) {\n    DEBUG_BUILD && debug.warn('[Profiling] Discarding profile because of invalid sample rate.');\n    return false;\n  }\n\n  // if the function returned 0 (or false), or if `profileSampleRate` is 0, it's a sign the profile should be dropped\n  if (!profilesSampleRate) {\n    DEBUG_BUILD &&\n      debug.log(\n        '[Profiling] Discarding profile because a negative sampling decision was inherited or profileSampleRate is set to 0',\n      );\n    return false;\n  }\n\n  // Now we roll the dice. Math.random is inclusive of 0, but not of 1, so strict < is safe here. In case sampleRate is\n  // a boolean, the < comparison will cause it to be automatically cast to 1 if it's true and 0 if it's false.\n  const sampled = profilesSampleRate === true ? true : Math.random() < profilesSampleRate;\n  // Check if we should sample this profile\n  if (!sampled) {\n    DEBUG_BUILD &&\n      debug.log(\n        `[Profiling] Discarding profile because it's not included in the random sample (sampling rate = ${Number(\n          profilesSampleRate,\n        )})`,\n      );\n    return false;\n  }\n\n  return true;\n}\n\n/**\n * Determine if a profile should be created for the current session.\n */\nexport function shouldProfileSession(options: BrowserOptions): boolean {\n  // If constructor failed once, it will always fail, so we can early return.\n  if (PROFILING_CONSTRUCTOR_FAILED) {\n    if (DEBUG_BUILD) {\n      debug.log(\n        '[Profiling] Profiling has been disabled for the duration of the current user session as the JS Profiler could not be started.',\n      );\n    }\n    return false;\n  }\n\n  if (options.profileLifecycle !== 'trace' && options.profileLifecycle !== 'manual') {\n    DEBUG_BUILD && debug.warn('[Profiling] Session not sampled. Invalid `profileLifecycle` option.');\n    return false;\n  }\n\n  //  Session sampling: profileSessionSampleRate gates whether profiling is enabled for this session\n  const profileSessionSampleRate = options.profileSessionSampleRate;\n\n  if (!isValidSampleRate(profileSessionSampleRate)) {\n    DEBUG_BUILD && debug.warn('[Profiling] Discarding profile because of invalid profileSessionSampleRate.');\n    return false;\n  }\n\n  if (!profileSessionSampleRate) {\n    DEBUG_BUILD &&\n      debug.log('[Profiling] Discarding profile because profileSessionSampleRate is not defined or set to 0');\n    return false;\n  }\n\n  return Math.random() <= profileSessionSampleRate;\n}\n\n/**\n * Checks if legacy profiling is configured.\n */\nexport function hasLegacyProfiling(options: BrowserOptions): boolean {\n  // eslint-disable-next-line typescript/no-deprecated\n  return typeof options.profilesSampleRate !== 'undefined';\n}\n\n/**\n * Creates a profiling envelope item, if the profile does not pass validation, returns null.\n * @param event\n * @returns {Profile | null}\n */\nexport function createProfilingEvent(\n  profile_id: string,\n  start_timestamp: number | undefined,\n  profile: JSSelfProfile,\n  event: ProfiledEvent,\n): Profile | null {\n  if (!isValidProfile(profile)) {\n    return null;\n  }\n\n  return createProfilePayload(profile_id, start_timestamp, profile, event);\n}\n\n// TODO (v8): We need to obtain profile ids in @sentry-internal/tracing,\n// but we don't have access to this map because importing this map would\n// cause a circular dependency. We need to resolve this in v8.\nconst PROFILE_MAP: Map<string, JSSelfProfile> = new Map();\n/**\n *\n */\nexport function getActiveProfilesCount(): number {\n  return PROFILE_MAP.size;\n}\n\n/**\n * Retrieves profile from global cache and removes it.\n */\nexport function takeProfileFromGlobalCache(profile_id: string): JSSelfProfile | undefined {\n  const profile = PROFILE_MAP.get(profile_id);\n  if (profile) {\n    PROFILE_MAP.delete(profile_id);\n  }\n  return profile;\n}\n/**\n * Adds profile to global cache and evicts the oldest profile if the cache is full.\n */\nexport function addProfileToGlobalCache(profile_id: string, profile: JSSelfProfile): void {\n  PROFILE_MAP.set(profile_id, profile);\n\n  if (PROFILE_MAP.size > 30) {\n    const last = PROFILE_MAP.keys().next().value;\n    if (last !== undefined) {\n      PROFILE_MAP.delete(last);\n    }\n  }\n}\n\nexport const PROFILED_ROOT_SPANS = new WeakSet<Span>();\n\nexport function setThreadAttributes(span: Span): void {\n  span.setAttribute('thread.id', PROFILER_THREAD_ID_STRING);\n  span.setAttribute('thread.name', PROFILER_THREAD_NAME);\n}\n","import type { ReportDialogOptions } from '@sentry/core/browser';\nimport { debug, getClient, getCurrentScope, getReportDialogEndpoint, lastEventId } from '@sentry/core/browser';\nimport { DEBUG_BUILD } from './debug-build';\nimport { WINDOW } from './helpers';\n\n/**\n * Present the user with a report dialog.\n *\n * @param options Everything is optional, we try to fetch all info need from the current scope.\n */\nexport function showReportDialog(options: ReportDialogOptions = {}): void {\n  const optionalDocument = WINDOW.document as Document | undefined;\n  const injectionPoint = optionalDocument?.head || optionalDocument?.body;\n\n  // doesn't work without a document (React Native)\n  if (!injectionPoint) {\n    DEBUG_BUILD && debug.error('[showReportDialog] Global document not defined');\n    return;\n  }\n\n  const scope = getCurrentScope();\n  const client = getClient();\n  const dsn = client?.getDsn();\n\n  if (!dsn) {\n    DEBUG_BUILD && debug.error('[showReportDialog] DSN not configured');\n    return;\n  }\n\n  const mergedOptions = {\n    ...options,\n    user: {\n      ...scope.getUser(),\n      ...options.user,\n    },\n    eventId: options.eventId || lastEventId(),\n  };\n\n  const script = WINDOW.document.createElement('script');\n  script.async = true;\n  script.crossOrigin = 'anonymous';\n  script.src = getReportDialogEndpoint(dsn, mergedOptions);\n\n  const { onLoad, onClose } = mergedOptions;\n\n  if (onLoad) {\n    script.onload = onLoad;\n  }\n\n  if (onClose) {\n    const reportDialogClosedMessageHandler = (event: MessageEvent): void => {\n      if (event.data === '__sentry_reportdialog_closed__') {\n        try {\n          onClose();\n        } finally {\n          WINDOW.removeEventListener('message', reportDialogClosedMessageHandler);\n        }\n      }\n    };\n    WINDOW.addEventListener('message', reportDialogClosedMessageHandler);\n  }\n\n  injectionPoint.appendChild(script);\n}\n","import type { Client, Integration, Options } from '@sentry/core/browser';\nimport {\n  conversationIdIntegration,\n  dedupeIntegration,\n  functionToStringIntegration,\n  getIntegrationsToSetup,\n  inboundFiltersIntegration,\n  initAndBind,\n  setNormalizeStringifier,\n  stackParserFromStackParserOptions,\n} from '@sentry/core/browser';\nimport type { BrowserClientOptions, BrowserOptions } from './client';\nimport { BrowserClient } from './client';\nimport { breadcrumbsIntegration } from './integrations/breadcrumbs';\nimport { browserApiErrorsIntegration } from './integrations/browserapierrors';\nimport { browserSessionIntegration } from './integrations/browsersession';\nimport { cultureContextIntegration } from './integrations/culturecontext';\nimport { globalHandlersIntegration } from './integrations/globalhandlers';\nimport { httpContextIntegration } from './integrations/httpcontext';\nimport { linkedErrorsIntegration } from './integrations/linkederrors';\nimport { spotlightBrowserIntegration } from './integrations/spotlight';\nimport { defaultStackParser } from './stack-parsers';\nimport { makeFetchTransport } from './transports/fetch';\nimport { normalizeStringifyValue } from './normalizeStringifyValue';\nimport { checkAndWarnIfIsEmbeddedBrowserExtension } from './utils/detectBrowserExtension';\n\n/** Get the default integrations for the browser SDK. */\nexport function getDefaultIntegrations(_options: Options): Integration[] {\n  /**\n   * Note: Please make sure this stays in sync with Angular SDK, which re-exports\n   * `getDefaultIntegrations` but with an adjusted set of integrations.\n   */\n  return [\n    // TODO(v11): Replace with `eventFiltersIntegration` once we remove the deprecated `inboundFiltersIntegration`\n    // eslint-disable-next-line typescript/no-deprecated\n    inboundFiltersIntegration(),\n    functionToStringIntegration(),\n    conversationIdIntegration(),\n    browserApiErrorsIntegration(),\n    breadcrumbsIntegration(),\n    globalHandlersIntegration(),\n    linkedErrorsIntegration(),\n    dedupeIntegration(),\n    httpContextIntegration(),\n    cultureContextIntegration(),\n    browserSessionIntegration(),\n  ];\n}\n\n/**\n * The Sentry Browser SDK Client.\n *\n * To use this SDK, call the {@link init} function as early as possible when\n * loading the web page. To set context information or send manual events, use\n * the provided methods.\n *\n * @example\n *\n * ```\n *\n * import { init } from '@sentry/browser';\n *\n * init({\n *   dsn: '__DSN__',\n *   // ...\n * });\n * ```\n *\n * @example\n * ```\n *\n * import { addBreadcrumb } from '@sentry/browser';\n * addBreadcrumb({\n *   message: 'My Breadcrumb',\n *   // ...\n * });\n * ```\n *\n * @example\n *\n * ```\n *\n * import * as Sentry from '@sentry/browser';\n * Sentry.captureMessage('Hello, world!');\n * Sentry.captureException(new Error('Good bye'));\n * Sentry.captureEvent({\n *   message: 'Manual',\n *   stacktrace: [\n *     // ...\n *   ],\n * });\n * ```\n *\n * @see {@link BrowserOptions} for documentation on configuration options.\n */\nexport function init(options: BrowserOptions = {}): Client | undefined {\n  const shouldDisableBecauseIsBrowserExtenstion =\n    !options.skipBrowserExtensionCheck && checkAndWarnIfIsEmbeddedBrowserExtension();\n\n  let defaultIntegrations =\n    options.defaultIntegrations == null ? getDefaultIntegrations(options) : options.defaultIntegrations;\n\n  /*! rollup-include-development-only */\n  if (options.spotlight) {\n    if (!defaultIntegrations) {\n      defaultIntegrations = [];\n    }\n    const args = typeof options.spotlight === 'string' ? { sidecarUrl: options.spotlight } : undefined;\n    defaultIntegrations.push(spotlightBrowserIntegration(args));\n  }\n  /*! rollup-include-development-only-end */\n\n  const clientOptions: BrowserClientOptions = {\n    ...options,\n    enabled: shouldDisableBecauseIsBrowserExtenstion ? false : options.enabled,\n    stackParser: stackParserFromStackParserOptions(options.stackParser || defaultStackParser),\n    integrations: getIntegrationsToSetup({\n      integrations: options.integrations,\n      defaultIntegrations,\n    }),\n    transport: options.transport || makeFetchTransport,\n  };\n\n  setNormalizeStringifier(normalizeStringifyValue);\n\n  return initAndBind(BrowserClient, clientOptions);\n}\n\n/**\n * This function is here to be API compatible with the loader.\n * @hidden\n */\nexport function forceLoad(): void {\n  // Noop\n}\n\n/**\n * This function is here to be API compatible with the loader.\n * @hidden\n */\nexport function onLoad(callback: () => void): void {\n  callback();\n}\n","// This was originally forked from https://github.com/csnover/TraceKit, and was largely\n// re - written as part of raven - js.\n//\n// This code was later copied to the JavaScript mono - repo and further modified and\n// refactored over the years.\n\n// Copyright (c) 2013 Onur Can Cakmak onur.cakmak@gmail.com and all TraceKit contributors.\n//\n// Permission is hereby granted, free of charge, to any person obtaining a copy of this\n// software and associated documentation files(the 'Software'), to deal in the Software\n// without restriction, including without limitation the rights to use, copy, modify,\n// merge, publish, 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 the following\n// conditions:\n//\n// The above copyright notice and this permission notice shall be included in all copies\n// or substantial portions of the Software.\n//\n// THE SOFTWARE IS PROVIDED 'AS IS', WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED,\n// INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A\n// PARTICULAR PURPOSE AND NONINFRINGEMENT.IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT\n// HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF\n// CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE\n// OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.\n\nimport type { StackFrame, StackLineParser, StackLineParserFn } from '@sentry/core/browser';\nimport { createStackParser, UNKNOWN_FUNCTION } from '@sentry/core/browser';\n\nconst OPERA10_PRIORITY = 10;\nconst OPERA11_PRIORITY = 20;\nconst CHROME_PRIORITY = 30;\nconst WINJS_PRIORITY = 40;\nconst GECKO_PRIORITY = 50;\n\nfunction createFrame(filename: string, func: string, lineno?: number, colno?: number): StackFrame {\n  const frame: StackFrame = {\n    filename,\n    function: func === '<anonymous>' ? UNKNOWN_FUNCTION : func,\n    in_app: true, // All browser frames are considered in_app\n  };\n\n  if (lineno !== undefined) {\n    frame.lineno = lineno;\n  }\n\n  if (colno !== undefined) {\n    frame.colno = colno;\n  }\n\n  return frame;\n}\n\n// This regex matches frames that have no function name (ie. are at the top level of a module).\n// For example \"at http://localhost:5000//script.js:1:126\"\n// Frames _with_ function names usually look as follows: \"at commitLayoutEffects (react-dom.development.js:23426:1)\"\nconst chromeRegexNoFnName = /^\\s*at (\\S+?)(?::(\\d+))(?::(\\d+))\\s*$/i;\n\n// This regex matches all the frames that have a function name.\nconst chromeRegex =\n  /^\\s*at (?:(.+?\\)(?: \\[.+\\])?|.*?) ?\\((?:address at )?)?(?:async )?((?:<anonymous>|[-a-z]+:|.*bundle|\\/)?.*?)(?::(\\d+))?(?::(\\d+))?\\)?\\s*$/i;\n\nconst chromeEvalRegex = /\\((\\S*)(?::(\\d+))(?::(\\d+))\\)/;\n\n// Matches stack frames with data URIs instead of filename so we can still get the function name\n// Example: \"at dynamicFn (data:application/javascript,export function dynamicFn() {...\"\nconst chromeDataUriRegex = /at (.+?) ?\\(data:(.+?),/;\n\n// Chromium based browsers: Chrome, Brave, new Opera, new Edge\n// We cannot call this variable `chrome` because it can conflict with global `chrome` variable in certain environments\n// See: https://github.com/getsentry/sentry-javascript/issues/6880\nconst chromeStackParserFn: StackLineParserFn = line => {\n  const dataUriMatch = line.match(chromeDataUriRegex);\n  if (dataUriMatch) {\n    return {\n      filename: `<data:${dataUriMatch[2]}>`,\n      function: dataUriMatch[1],\n    };\n  }\n\n  // If the stack line has no function name, we need to parse it differently\n  const noFnParts = chromeRegexNoFnName.exec(line) as null | [string, string, string, string];\n\n  if (noFnParts) {\n    const [, filename, line, col] = noFnParts;\n    return createFrame(filename, UNKNOWN_FUNCTION, +line, +col);\n  }\n\n  const parts = chromeRegex.exec(line) as null | [string, string, string, string, string];\n\n  if (parts) {\n    const isEval = parts[2]?.indexOf('eval') === 0; // start of line\n\n    if (isEval) {\n      const subMatch = chromeEvalRegex.exec(parts[2]) as null | [string, string, string, string];\n\n      if (subMatch) {\n        // throw out eval line/column and use top-most line/column number\n        parts[2] = subMatch[1]; // url\n        parts[3] = subMatch[2]; // line\n        parts[4] = subMatch[3]; // column\n      }\n    }\n\n    // Kamil: One more hack won't hurt us right? Understanding and adding more rules on top of these regexps right now\n    // would be way too time consuming. (TODO: Rewrite whole RegExp to be more readable)\n    const [func, filename] = extractSafariExtensionDetails(parts[1] || UNKNOWN_FUNCTION, parts[2]);\n\n    return createFrame(filename, func, parts[3] ? +parts[3] : undefined, parts[4] ? +parts[4] : undefined);\n  }\n\n  return;\n};\n\nexport const chromeStackLineParser: StackLineParser = [CHROME_PRIORITY, chromeStackParserFn];\n\n// gecko regex: `(?:bundle|\\d+\\.js)`: `bundle` is for react native, `\\d+\\.js` also but specifically for ram bundles because it\n// generates filenames without a prefix like `file://` the filenames in the stacktrace are just 42.js\n// We need this specific case for now because we want no other regex to match.\nconst geckoREgex =\n  /^\\s*(.*?)(?:\\((.*?)\\))?(?:^|@)?((?:[-a-z]+)?:\\/.*?|\\[native code\\]|[^@]*(?:bundle|\\d+\\.js)|\\/[\\w\\-. /=]+)(?::(\\d+))?(?::(\\d+))?\\s*$/i;\nconst geckoEvalRegex = /(\\S+) line (\\d+)(?: > eval line \\d+)* > eval/i;\n\nconst gecko: StackLineParserFn = line => {\n  const parts = geckoREgex.exec(line) as null | [string, string, string, string, string, string];\n\n  if (parts) {\n    const isEval = parts[3] && parts[3].indexOf(' > eval') > -1;\n    if (isEval) {\n      const subMatch = geckoEvalRegex.exec(parts[3]) as null | [string, string, string];\n\n      if (subMatch) {\n        // throw out eval line/column and use top-most line number\n        parts[1] = parts[1] || 'eval';\n        parts[3] = subMatch[1];\n        parts[4] = subMatch[2];\n        parts[5] = ''; // no column when eval\n      }\n    }\n\n    let filename = parts[3];\n    let func = parts[1] || UNKNOWN_FUNCTION;\n    [func, filename] = extractSafariExtensionDetails(func, filename);\n\n    return createFrame(filename, func, parts[4] ? +parts[4] : undefined, parts[5] ? +parts[5] : undefined);\n  }\n\n  return;\n};\n\nexport const geckoStackLineParser: StackLineParser = [GECKO_PRIORITY, gecko];\n\nconst winjsRegex = /^\\s*at (?:((?:\\[object object\\])?.+) )?\\(?((?:[-a-z]+):.*?):(\\d+)(?::(\\d+))?\\)?\\s*$/i;\n\nconst winjs: StackLineParserFn = line => {\n  const parts = winjsRegex.exec(line) as null | [string, string, string, string, string];\n\n  return parts\n    ? createFrame(parts[2], parts[1] || UNKNOWN_FUNCTION, +parts[3], parts[4] ? +parts[4] : undefined)\n    : undefined;\n};\n\nexport const winjsStackLineParser: StackLineParser = [WINJS_PRIORITY, winjs];\n\nconst opera10Regex = / line (\\d+).*script (?:in )?(\\S+)(?:: in function (\\S+))?$/i;\n\nconst opera10: StackLineParserFn = line => {\n  const parts = opera10Regex.exec(line) as null | [string, string, string, string];\n  return parts ? createFrame(parts[2], parts[3] || UNKNOWN_FUNCTION, +parts[1]) : undefined;\n};\n\nexport const opera10StackLineParser: StackLineParser = [OPERA10_PRIORITY, opera10];\n\nconst opera11Regex =\n  / line (\\d+), column (\\d+)\\s*(?:in (?:<anonymous function: ([^>]+)>|([^)]+))\\(.*\\))? in (.*):\\s*$/i;\n\nconst opera11: StackLineParserFn = line => {\n  const parts = opera11Regex.exec(line) as null | [string, string, string, string, string, string];\n  return parts ? createFrame(parts[5], parts[3] || parts[4] || UNKNOWN_FUNCTION, +parts[1], +parts[2]) : undefined;\n};\n\nexport const opera11StackLineParser: StackLineParser = [OPERA11_PRIORITY, opera11];\n\nexport const defaultStackLineParsers = [chromeStackLineParser, geckoStackLineParser];\n\nexport const defaultStackParser = createStackParser(...defaultStackLineParsers);\n\n/**\n * Safari web extensions, starting version unknown, can produce \"frames-only\" stacktraces.\n * What it means, is that instead of format like:\n *\n * Error: wat\n *   at function@url:row:col\n *   at function@url:row:col\n *   at function@url:row:col\n *\n * it produces something like:\n *\n *   function@url:row:col\n *   function@url:row:col\n *   function@url:row:col\n *\n * Because of that, it won't be captured by `chrome` RegExp and will fall into `Gecko` branch.\n * This function is extracted so that we can use it in both places without duplicating the logic.\n * Unfortunately \"just\" changing RegExp is too complicated now and making it pass all tests\n * and fix this case seems like an impossible, or at least way too time-consuming task.\n */\nconst extractSafariExtensionDetails = (func: string, filename: string): [string, string] => {\n  const isSafariExtension = func.indexOf('safari-extension') !== -1;\n  const isSafariWebExtension = func.indexOf('safari-web-extension') !== -1;\n\n  return isSafariExtension || isSafariWebExtension\n    ? [\n        func.indexOf('@') !== -1 ? (func.split('@')[0] as string) : UNKNOWN_FUNCTION,\n        isSafariExtension ? `safari-extension:${filename}` : `safari-web-extension:${filename}`,\n      ]\n    : [func, filename];\n};\n","import { debug, getActiveSpan, getRootSpan, SPAN_STATUS_ERROR, spanToJSON } from '@sentry/core/browser';\nimport { DEBUG_BUILD } from '../debug-build';\nimport { WINDOW } from '../helpers';\n\n/**\n * Add a listener that cancels and finishes a transaction when the global\n * document is hidden.\n */\nexport function registerBackgroundTabDetection(): void {\n  if (WINDOW.document) {\n    WINDOW.document.addEventListener('visibilitychange', () => {\n      const activeSpan = getActiveSpan();\n      if (!activeSpan) {\n        return;\n      }\n\n      const rootSpan = getRootSpan(activeSpan);\n\n      if (WINDOW.document.hidden && rootSpan) {\n        const cancelledStatus = 'cancelled';\n\n        const { op, status } = spanToJSON(rootSpan);\n\n        if (DEBUG_BUILD) {\n          debug.log(`[Tracing] Transaction: ${cancelledStatus} -> since tab moved to the background, op: ${op}`);\n        }\n\n        // We should not set status if it is already set, this prevent important statuses like\n        // error or data loss from being overwritten on transaction.\n        if (!status) {\n          rootSpan.setStatus({ code: SPAN_STATUS_ERROR, message: cancelledStatus });\n        }\n\n        rootSpan.setAttribute('sentry.cancellation_reason', 'document.hidden');\n        rootSpan.end();\n      }\n    });\n  } else {\n    DEBUG_BUILD && debug.warn('[Tracing] Could not set up background tab detection due to lack of global document');\n  }\n}\n","/* eslint-disable max-lines */\nimport type {\n  Client,\n  IntegrationFn,\n  RequestHookInfo,\n  ResponseHookInfo,\n  Span,\n  StartSpanOptions,\n  TransactionSource,\n} from '@sentry/core/browser';\nimport {\n  addNonEnumerableProperty,\n  browserPerformanceTimeOrigin,\n  consoleSandbox,\n  dateTimestampInSeconds,\n  debug,\n  generateSpanId,\n  generateTraceId,\n  getClient,\n  getCurrentScope,\n  getDynamicSamplingContextFromSpan,\n  getLocationHref,\n  GLOBAL_OBJ,\n  hasSpansEnabled,\n  hasSpanStreamingEnabled,\n  isURLObjectRelative,\n  parseStringToURLObject,\n  propagationContextFromHeaders,\n  registerSpanErrorInstrumentation,\n  SEMANTIC_ATTRIBUTE_SENTRY_IDLE_SPAN_FINISH_REASON,\n  SEMANTIC_ATTRIBUTE_SENTRY_ORIGIN,\n  SEMANTIC_ATTRIBUTE_SENTRY_SOURCE,\n  spanIsSampled,\n  spanToJSON,\n  startIdleSpan,\n  startInactiveSpan,\n  timestampInSeconds,\n  TRACING_DEFAULTS,\n} from '@sentry/core/browser';\nimport {\n  addHistoryInstrumentationHandler,\n  addPerformanceEntries,\n  startTrackingInteractions,\n  startTrackingLongAnimationFrames,\n  startTrackingLongTasks,\n} from '@sentry/browser-utils';\nimport { DEBUG_BUILD } from '../debug-build';\nimport { getHttpRequestData, WINDOW } from '../helpers';\nimport { fetchStreamPerformanceIntegration } from '../integrations/fetchStreamPerformance';\nimport { WEB_VITALS_INTEGRATION_NAME, webVitalsIntegration } from '../integrations/webVitals';\nimport { registerBackgroundTabDetection } from './backgroundtab';\nimport { linkTraces } from './linkedTraces';\nimport { defaultRequestInstrumentationOptions, instrumentOutgoingRequests } from './request';\nimport { URL_FULL, URL_PATH } from '@sentry/conventions/attributes';\n\nexport const BROWSER_TRACING_INTEGRATION_ID = 'BrowserTracing';\n\n/**\n * We don't want to start a bunch of idle timers and PerformanceObservers\n * for web crawlers, as they may prevent the page from being seen as \"idle\"\n * by the crawler's rendering engine (e.g. Googlebot's headless Chromium).\n */\nconst BOT_USER_AGENT_RE =\n  /Googlebot|Google-InspectionTool|Storebot-Google|Bingbot|Slurp|DuckDuckBot|Baiduspider|YandexBot|Facebot|facebookexternalhit|LinkedInBot|Twitterbot|Applebot/i;\n\nexport function isBotUserAgent(): boolean {\n  const nav = WINDOW.navigator as Navigator | undefined;\n  if (!nav?.userAgent) {\n    return false;\n  }\n  return BOT_USER_AGENT_RE.test(nav.userAgent);\n}\n\ninterface RouteInfo {\n  name: string | undefined;\n  source: TransactionSource | undefined;\n}\n\n/** Options for Browser Tracing integration */\nexport interface BrowserTracingOptions {\n  /**\n   * The time that has to pass without any span being created.\n   * If this time is exceeded, the idle span will finish.\n   *\n   * Default: 1000 (ms)\n   */\n  idleTimeout: number;\n\n  /**\n   * The max. time an idle span may run.\n   * If this time is exceeded, the idle span will finish no matter what.\n   *\n   * Default: 30000 (ms)\n   */\n  finalTimeout: number;\n\n  /**\n   The max. time an idle span may run.\n   * If this time is exceeded, the idle span will finish no matter what.\n   *\n   * Default: 15000 (ms)\n   */\n  childSpanTimeout: number;\n\n  /**\n   * If a span should be created on page load.\n   * If this is set to `false`, this integration will not start the default page load span.\n   * Default: true\n   */\n  instrumentPageLoad: boolean;\n\n  /**\n   * If a span should be created on navigation (history change).\n   * If this is set to `false`, this integration will not start the default navigation spans.\n   * Default: true\n   */\n  instrumentNavigation: boolean;\n\n  /**\n   * Flag spans where tabs moved to background with \"cancelled\". Browser background tab timing is\n   * not suited towards doing precise measurements of operations. By default, we recommend that this option\n   * be enabled as background transactions can mess up your statistics in nondeterministic ways.\n   *\n   * Default: true\n   */\n  markBackgroundSpan: boolean;\n\n  /**\n   * If true, Sentry will capture long tasks and add them to the corresponding transaction.\n   *\n   * Default: true\n   */\n  enableLongTask: boolean;\n\n  /**\n   * If true, Sentry will capture long animation frames and add them to the corresponding transaction.\n   *\n   * Default: false\n   */\n  enableLongAnimationFrame: boolean;\n\n  /**\n   * If true, Sentry will capture first input delay and add it to the corresponding transaction.\n   *\n   * Default: true\n   */\n  enableInp: boolean;\n\n  /**\n   * @deprecated This option is no longer used. Element timing is now tracked via the standalone\n   * `elementTimingIntegration`. Add it to your `integrations` array to collect element timing metrics.\n   */\n  enableElementTiming?: boolean;\n\n  /**\n   * Flag to disable patching all together for fetch requests.\n   *\n   * Default: true\n   */\n  traceFetch: boolean;\n\n  /**\n   * Flag to disable patching all together for xhr requests.\n   *\n   * Default: true\n   */\n  traceXHR: boolean;\n\n  /**\n   * Flag to disable tracking of long-lived streams, like server-sent events (SSE) via fetch.\n   * Do not enable this in case you have live streams or very long running streams.\n   *\n   * Default: false\n   *\n   * @deprecated Use `fetchStreamPerformanceIntegration()` instead. Add it to your `integrations` array\n   * to track the duration of streamed fetch response bodies.\n   */\n  trackFetchStreamPerformance: boolean;\n\n  /**\n   * If true, Sentry will capture http timings and add them to the corresponding http spans.\n   *\n   * Default: true\n   */\n  enableHTTPTimings: boolean;\n\n  /**\n   * Resource spans with `op`s matching strings in the array will not be emitted.\n   *\n   * Default: []\n   */\n  ignoreResourceSpans: Array<'resouce.script' | 'resource.css' | 'resource.img' | 'resource.other' | string>;\n\n  /**\n   * Spans created from the following browser Performance APIs,\n   *\n   * - [`performance.mark(...)`](https://developer.mozilla.org/en-US/docs/Web/API/Performance/mark)\n   * - [`performance.measure(...)`](https://developer.mozilla.org/en-US/docs/Web/API/Performance/measure)\n   *\n   * will not be emitted if their names match strings in this array.\n   *\n   * This is useful, if you come across `mark` or `measure` spans in your Sentry traces\n   * that you want to ignore. For example, sometimes, browser extensions or libraries\n   * emit these entries on their own, which might not be relevant to your application.\n   *\n   * * @example\n   * ```ts\n   * Sentry.init({\n   *   integrations: [\n   *     Sentry.browserTracingIntegration({\n   *      ignorePerformanceApiSpans: ['myMeasurement', /myMark/],\n   *     }),\n   *   ],\n   * });\n   *\n   * // no spans will be created for these:\n   * performance.mark('myMark');\n   * performance.measure('myMeasurement');\n   *\n   * // spans will be created for these:\n   * performance.mark('authenticated');\n   * performance.measure('input-duration', ...);\n   * ```\n   *\n   * Default: [] - By default, all `mark` and `measure` entries are sent as spans.\n   */\n  ignorePerformanceApiSpans: Array<string | RegExp>;\n\n  /**\n   * By default, the SDK will try to detect redirects and avoid creating separate spans for them.\n   * If you want to opt-out of this behavior, you can set this option to `false`.\n   *\n   * Default: true\n   */\n  detectRedirects: boolean;\n\n  /**\n   * Link the currently started trace to a previous trace (e.g. a prior pageload, navigation or\n   * manually started span). When enabled, this option will allow you to navigate between traces\n   * in the Sentry UI.\n   *\n   * You can set this option to the following values:\n   *\n   * - `'in-memory'`: The previous trace data will be stored in memory.\n   *   This is useful for single-page applications and enabled by default.\n   *\n   * - `'session-storage'`: The previous trace data will be stored in the `sessionStorage`.\n   *   This is useful for multi-page applications or static sites but it means that the\n   *   Sentry SDK writes to the browser's `sessionStorage`.\n   *\n   * - `'off'`: The previous trace data will not be stored or linked.\n   *\n   * You can also use {@link BrowserTracingOptions.consistentTraceSampling} to get\n   * consistent trace sampling of subsequent traces. Otherwise, by default, your\n   * `tracesSampleRate` or `tracesSampler` config significantly influences how often\n   * traces will be linked.\n   *\n   * @default 'in-memory' - see explanation above\n   */\n  linkPreviousTrace: 'in-memory' | 'session-storage' | 'off';\n\n  /**\n   * If true, Sentry will consistently sample subsequent traces based on the\n   * sampling decision of the initial trace. For example, if the initial page\n   * load trace was sampled positively, all subsequent traces (e.g. navigations)\n   * are also sampled positively. In case the initial trace was sampled negatively,\n   * all subsequent traces are also sampled negatively.\n   *\n   * This option allows you to get consistent, linked traces within a user journey\n   * while maintaining an overall quota based on your trace sampling settings.\n   *\n   * This option is only effective if {@link BrowserTracingOptions.linkPreviousTrace}\n   * is enabled (i.e. not set to `'off'`).\n   *\n   * @default `false` - this is an opt-in feature.\n   */\n  consistentTraceSampling: boolean;\n\n  /**\n   * If set to `true`, the pageload span will not end itself automatically, unless it\n   * runs until the {@link BrowserTracingOptions.finalTimeout} (30 seconds by default) is reached.\n   *\n   * Set this option to `true`, if you want full control over the pageload span duration.\n   * You can use `Sentry.reportPageLoaded()` to manually end the pageload span whenever convenient.\n   * Be aware that you have to ensure that this is always called, regardless of the chosen route\n   * or path in the application.\n   *\n   * @default `false`. By default, the pageload span will end itself automatically, based on\n   * the {@link BrowserTracingOptions.finalTimeout}, {@link BrowserTracingOptions.idleTimeout}\n   * and {@link BrowserTracingOptions.childSpanTimeout}. This is more convenient to use but means\n   * that the pageload duration can be arbitrary and might not be fully representative of a perceived\n   * page load time.\n   */\n  enableReportPageLoaded: boolean;\n\n  /**\n   * _experiments allows the user to send options to define how this integration works.\n   *\n   * Default: undefined\n   */\n  _experiments: Partial<{\n    enableInteractions: boolean;\n    enableStandaloneClsSpans: boolean;\n    enableStandaloneLcpSpans: boolean;\n  }>;\n\n  /**\n   * A callback which is called before a span for a pageload or navigation is started.\n   * It receives the options passed to `startSpan`, and expects to return an updated options object.\n   */\n  beforeStartSpan?: (options: StartSpanOptions) => StartSpanOptions;\n\n  /**\n   * This function will be called before creating a span for a request with the given url.\n   * Return false if you don't want a span for the given url.\n   *\n   * Default: (url: string) => true\n   */\n  shouldCreateSpanForRequest?(this: void, url: string): boolean;\n\n  /**\n   * This callback is invoked directly after a span is started for an outgoing fetch or XHR request.\n   * You can use it to annotate the span with additional data or attributes, for example by setting\n   * attributes based on the passed request headers.\n   */\n  onRequestSpanStart?(span: Span, requestInformation: RequestHookInfo): void;\n\n  /**\n   * Is called when spans end for outgoing requests, providing access to response headers.\n   */\n  onRequestSpanEnd?(span: Span, responseInformation: ResponseHookInfo): void;\n}\n\nconst DEFAULT_BROWSER_TRACING_OPTIONS: BrowserTracingOptions = {\n  ...TRACING_DEFAULTS,\n  instrumentNavigation: true,\n  instrumentPageLoad: true,\n  markBackgroundSpan: true,\n  enableLongTask: true,\n  enableLongAnimationFrame: true,\n  enableInp: true,\n  ignoreResourceSpans: [],\n  ignorePerformanceApiSpans: [],\n  detectRedirects: true,\n  linkPreviousTrace: 'in-memory',\n  consistentTraceSampling: false,\n  enableReportPageLoaded: false,\n  _experiments: {},\n  ...defaultRequestInstrumentationOptions,\n};\n\n/**\n * The Browser Tracing integration automatically instruments browser pageload/navigation\n * actions as transactions, and captures requests, metrics and errors as spans.\n *\n * The integration can be configured with a variety of options, and can be extended to use\n * any routing library.\n *\n * We explicitly export the proper type here, as this has to be extended in some cases.\n */\nexport const browserTracingIntegration = ((options: Partial<BrowserTracingOptions> = {}) => {\n  if ('enableElementTiming' in options) {\n    consoleSandbox(() => {\n      // oxlint-disable-next-line no-console\n      console.warn(\n        '[Sentry] `enableElementTiming` is deprecated and no longer has any effect. Use the standalone `elementTimingIntegration` instead.',\n      );\n    });\n  }\n\n  const latestRoute: RouteInfo = {\n    name: undefined,\n    source: undefined,\n  };\n\n  /**\n   * This is just a small wrapper that makes `document` optional.\n   * We want to be extra-safe and always check that this exists, to ensure weird environments do not blow up.\n   */\n  const optionalWindowDocument = WINDOW.document as (typeof WINDOW)['document'] | undefined;\n\n  const {\n    enableInp,\n    enableLongTask,\n    enableLongAnimationFrame,\n    _experiments: { enableInteractions, enableStandaloneClsSpans, enableStandaloneLcpSpans },\n    beforeStartSpan,\n    idleTimeout,\n    finalTimeout,\n    childSpanTimeout,\n    markBackgroundSpan,\n    traceFetch,\n    traceXHR,\n    // eslint-disable-next-line typescript/no-deprecated\n    trackFetchStreamPerformance,\n    shouldCreateSpanForRequest,\n    enableHTTPTimings,\n    ignoreResourceSpans,\n    ignorePerformanceApiSpans,\n    instrumentPageLoad,\n    instrumentNavigation,\n    detectRedirects,\n    linkPreviousTrace,\n    consistentTraceSampling,\n    enableReportPageLoaded,\n    onRequestSpanStart,\n    onRequestSpanEnd,\n  } = {\n    ...DEFAULT_BROWSER_TRACING_OPTIONS,\n    ...options,\n  };\n\n  const _isBot = isBotUserAgent();\n\n  let lastInteractionTimestamp: number | undefined;\n\n  let _pageloadSpan: Span | undefined;\n\n  /** Create routing idle transaction. */\n  function _createRouteSpan(client: Client, startSpanOptions: StartSpanOptions, makeActive = true, url?: string): void {\n    const isPageloadSpan = startSpanOptions.op === 'pageload';\n\n    const initialSpanName = startSpanOptions.name;\n    const finalStartSpanOptions: StartSpanOptions = beforeStartSpan\n      ? beforeStartSpan(startSpanOptions)\n      : startSpanOptions;\n\n    // For navigations, `url` is the destination URL, so we use it to reflect the post-navigation location.\n    // For pageloads (and manual navigation spans without a URL) we fall back to the current location.\n    const urlObject = parseStringToURLObject(url || getLocationHref());\n\n    const attributes = {\n      ...(urlObject?.pathname && { [URL_PATH]: urlObject.pathname }),\n      ...(urlObject && !isURLObjectRelative(urlObject) && { [URL_FULL]: urlObject.href }),\n      ...finalStartSpanOptions.attributes,\n    };\n\n    // If `finalStartSpanOptions.name` is different than `startSpanOptions.name`\n    // it is because `beforeStartSpan` set a custom name. Therefore we set the source to 'custom'.\n    if (initialSpanName !== finalStartSpanOptions.name) {\n      attributes[SEMANTIC_ATTRIBUTE_SENTRY_SOURCE] = 'custom';\n    }\n\n    finalStartSpanOptions.attributes = attributes;\n\n    if (!makeActive) {\n      // We want to ensure this has 0s duration\n      const now = dateTimestampInSeconds();\n      startInactiveSpan({\n        ...finalStartSpanOptions,\n        startTime: now,\n      }).end(now);\n      return;\n    }\n\n    latestRoute.name = finalStartSpanOptions.name;\n    latestRoute.source = attributes[SEMANTIC_ATTRIBUTE_SENTRY_SOURCE];\n\n    const idleSpan = startIdleSpan(finalStartSpanOptions, {\n      idleTimeout,\n      finalTimeout,\n      childSpanTimeout,\n      // should wait for finish signal if it's a pageload transaction\n      disableAutoFinish: isPageloadSpan,\n      beforeSpanEnd: span => {\n        addPerformanceEntries(span, {\n          ignoreResourceSpans,\n          ignorePerformanceApiSpans,\n          spanStreamingEnabled: hasSpanStreamingEnabled(client),\n        });\n        setActiveIdleSpan(client, undefined);\n\n        // A trace should stay consistent over the entire timespan of one route - even after the pageload/navigation ended.\n        // Only when another navigation happens, we want to create a new trace.\n        // This way, e.g. errors that occur after the pageload span ended are still associated to the pageload trace.\n        const scope = getCurrentScope();\n        const oldPropagationContext = scope.getPropagationContext();\n\n        scope.setPropagationContext({\n          ...oldPropagationContext,\n          traceId: idleSpan.spanContext().traceId,\n          sampled: spanIsSampled(idleSpan),\n          dsc: getDynamicSamplingContextFromSpan(span),\n        });\n\n        if (isPageloadSpan) {\n          // clean up the stored pageload span on the intergration.\n          _pageloadSpan = undefined;\n        }\n      },\n      trimIdleSpanEndTimestamp: !enableReportPageLoaded,\n    });\n\n    if (isPageloadSpan && enableReportPageLoaded) {\n      _pageloadSpan = idleSpan;\n    }\n\n    setActiveIdleSpan(client, idleSpan);\n\n    function emitFinish(): void {\n      if (optionalWindowDocument && ['interactive', 'complete'].includes(optionalWindowDocument.readyState)) {\n        client.emit('idleSpanEnableAutoFinish', idleSpan);\n        // Once the finish signal has been emitted, the listener is no longer needed. Removing it here (rather than\n        // relying on `{ once: true }`) also covers the common case where the document is already loaded when the span\n        // starts, so the listener never fires and would otherwise leak together with the `idleSpan` it closes over.\n        optionalWindowDocument.removeEventListener('readystatechange', emitFinish);\n      }\n    }\n\n    // Enable auto finish of the pageload span if users are not explicitly ending it\n    if (isPageloadSpan && !enableReportPageLoaded && optionalWindowDocument) {\n      optionalWindowDocument.addEventListener('readystatechange', emitFinish);\n\n      emitFinish();\n    }\n  }\n\n  return {\n    name: BROWSER_TRACING_INTEGRATION_ID,\n    setup(client) {\n      if (_isBot) {\n        DEBUG_BUILD && debug.log('[Tracing] Skipping browserTracingIntegration setup for bot user agent.');\n        return;\n      }\n\n      registerSpanErrorInstrumentation();\n\n      if (\n        enableLongAnimationFrame &&\n        GLOBAL_OBJ.PerformanceObserver &&\n        PerformanceObserver.supportedEntryTypes?.includes('long-animation-frame')\n      ) {\n        startTrackingLongAnimationFrames();\n      } else if (enableLongTask) {\n        startTrackingLongTasks();\n      }\n\n      if (enableInteractions) {\n        startTrackingInteractions();\n      }\n\n      if (detectRedirects && optionalWindowDocument) {\n        const interactionHandler = (): void => {\n          lastInteractionTimestamp = timestampInSeconds();\n        };\n        addEventListener('click', interactionHandler, { capture: true });\n        addEventListener('keydown', interactionHandler, { capture: true, passive: true });\n      }\n\n      function maybeEndActiveSpan(): void {\n        const activeSpan = getActiveIdleSpan(client);\n\n        if (activeSpan && !spanToJSON(activeSpan).timestamp) {\n          DEBUG_BUILD && debug.log(`[Tracing] Finishing current active span with op: ${spanToJSON(activeSpan).op}`);\n          // If there's an open active span, we need to finish it before creating an new one.\n          activeSpan.setAttribute(SEMANTIC_ATTRIBUTE_SENTRY_IDLE_SPAN_FINISH_REASON, 'cancelled');\n          activeSpan.end();\n        }\n      }\n\n      client.on('startNavigationSpan', (startSpanOptions, navigationOptions) => {\n        if (getClient() !== client) {\n          return;\n        }\n\n        if (navigationOptions?.isRedirect) {\n          DEBUG_BUILD &&\n            debug.warn('[Tracing] Detected redirect, navigation span will not be the root span, but a child span.');\n          _createRouteSpan(\n            client,\n            {\n              op: 'navigation.redirect',\n              ...startSpanOptions,\n            },\n            false,\n            navigationOptions.url,\n          );\n          return;\n        }\n\n        // Reset the last interaction timestamp since we now start a new navigation.\n        // Any subsequent navigation span starts could again be a redirect, so we\n        // should reset our heuristic detectors.\n        lastInteractionTimestamp = undefined;\n\n        maybeEndActiveSpan();\n\n        const scope = getCurrentScope();\n        scope.setPropagationContext({\n          traceId: generateTraceId(),\n          sampleRand: Math.random(),\n          propagationSpanId: hasSpansEnabled() ? undefined : generateSpanId(),\n        });\n\n        // We reset this to ensure we do not have lingering incorrect data here\n        // places that call this hook may set this where appropriate - else, the URL at span sending time is used\n        scope.setSDKProcessingMetadata({\n          normalizedRequest: undefined,\n        });\n\n        _createRouteSpan(\n          client,\n          {\n            op: 'navigation',\n            ...startSpanOptions,\n            // Navigation starts a new trace and is NOT parented under any active interaction (e.g. ui.action.click)\n            parentSpan: null,\n            forceTransaction: true,\n          },\n          true,\n          navigationOptions?.url,\n        );\n      });\n\n      client.on('startPageLoadSpan', (startSpanOptions, traceOptions = {}) => {\n        if (getClient() !== client) {\n          return;\n        }\n        maybeEndActiveSpan();\n\n        const sentryTrace =\n          traceOptions.sentryTrace || getMetaContent('sentry-trace') || getServerTiming('sentry-trace');\n        const baggage = traceOptions.baggage || getMetaContent('baggage') || getServerTiming('baggage');\n\n        const propagationContext = propagationContextFromHeaders(sentryTrace, baggage);\n\n        const scope = getCurrentScope();\n        scope.setPropagationContext(propagationContext);\n        if (!hasSpansEnabled()) {\n          // for browser, we wanna keep the spanIds consistent during the entire lifetime of the trace\n          // this works by setting the propagationSpanId to a random spanId so that we have a consistent\n          // span id to propagate in TwP mode (!hasSpansEnabled())\n          scope.getPropagationContext().propagationSpanId = generateSpanId();\n        }\n\n        // We store the normalized request data on the scope, so we get the request data at time of span creation\n        // otherwise, the URL etc. may already be of the following navigation, and we'd report the wrong URL\n        scope.setSDKProcessingMetadata({\n          normalizedRequest: getHttpRequestData(),\n        });\n\n        _createRouteSpan(client, {\n          op: 'pageload',\n          ...startSpanOptions,\n        });\n      });\n\n      client.on('endPageloadSpan', () => {\n        if (enableReportPageLoaded && _pageloadSpan) {\n          _pageloadSpan.setAttribute(SEMANTIC_ATTRIBUTE_SENTRY_IDLE_SPAN_FINISH_REASON, 'reportPageLoaded');\n          _pageloadSpan.end();\n        }\n      });\n    },\n\n    afterAllSetup(client) {\n      if (_isBot) {\n        return;\n      }\n\n      // Auto-register webVitalsIntegration if the user hasn't added one. We do this in\n      // afterAllSetup so that a user-provided webVitalsIntegration - which may be ordered after\n      // browserTracingIntegration in the integrations array - has already been installed.\n      if (client.addIntegration && !client.getIntegrationByName?.(WEB_VITALS_INTEGRATION_NAME)) {\n        client.addIntegration(\n          webVitalsIntegration({\n            ignore: enableInp ? [] : ['inp'],\n            _experiments: {\n              enableStandaloneClsSpans,\n              enableStandaloneLcpSpans,\n            },\n          }),\n        );\n      }\n\n      let startingUrl: string | undefined = getLocationHref();\n\n      if (linkPreviousTrace !== 'off') {\n        linkTraces(client, { linkPreviousTrace, consistentTraceSampling });\n      }\n\n      if (WINDOW.location) {\n        if (instrumentPageLoad) {\n          const origin = browserPerformanceTimeOrigin();\n          startBrowserTracingPageLoadSpan(client, {\n            name: WINDOW.location.pathname,\n            // pageload should always start at timeOrigin (and needs to be in s, not ms)\n            startTime: origin ? origin / 1000 : undefined,\n            attributes: {\n              [SEMANTIC_ATTRIBUTE_SENTRY_SOURCE]: 'url',\n              [SEMANTIC_ATTRIBUTE_SENTRY_ORIGIN]: 'auto.pageload.browser',\n            },\n          });\n        }\n\n        if (instrumentNavigation) {\n          addHistoryInstrumentationHandler(({ to, from }) => {\n            /**\n             * This early return is there to account for some cases where a navigation transaction starts right after\n             * long-running pageload. We make sure that if `from` is undefined and a valid `startingURL` exists, we don't\n             * create an uneccessary navigation transaction.\n             *\n             * This was hard to duplicate, but this behavior stopped as soon as this fix was applied. This issue might also\n             * only be caused in certain development environments where the usage of a hot module reloader is causing\n             * errors.\n             */\n            if (from === undefined && startingUrl?.indexOf(to) !== -1) {\n              startingUrl = undefined;\n              return;\n            }\n\n            startingUrl = undefined;\n            const parsed = parseStringToURLObject(to);\n            const activeSpan = getActiveIdleSpan(client);\n            const navigationIsRedirect =\n              activeSpan && detectRedirects && isRedirect(activeSpan, lastInteractionTimestamp);\n\n            startBrowserTracingNavigationSpan(\n              client,\n              {\n                name: parsed?.pathname || WINDOW.location.pathname,\n                attributes: {\n                  [SEMANTIC_ATTRIBUTE_SENTRY_SOURCE]: 'url',\n                  [SEMANTIC_ATTRIBUTE_SENTRY_ORIGIN]: 'auto.navigation.browser',\n                },\n              },\n              { url: to, isRedirect: navigationIsRedirect },\n            );\n          });\n        }\n      }\n\n      if (markBackgroundSpan) {\n        registerBackgroundTabDetection();\n      }\n\n      if (enableInteractions) {\n        registerInteractionListener(client, idleTimeout, finalTimeout, childSpanTimeout, latestRoute);\n      }\n\n      instrumentOutgoingRequests(client, {\n        traceFetch,\n        traceXHR,\n        tracePropagationTargets: client.getOptions().tracePropagationTargets,\n        shouldCreateSpanForRequest,\n        enableHTTPTimings,\n        onRequestSpanStart,\n        onRequestSpanEnd,\n      });\n\n      if (trackFetchStreamPerformance) {\n        client.addIntegration(fetchStreamPerformanceIntegration());\n      }\n    },\n  };\n}) satisfies IntegrationFn;\n\n/**\n * Manually start a page load span.\n * This will only do something if a browser tracing integration integration has been setup.\n *\n * If you provide a custom `traceOptions` object, it will be used to continue the trace\n * instead of the default behavior, which is to look it up on the <meta> tags.\n */\nexport function startBrowserTracingPageLoadSpan(\n  client: Client,\n  spanOptions: StartSpanOptions,\n  traceOptions?: { sentryTrace?: string | undefined; baggage?: string | undefined },\n): Span | undefined {\n  client.emit('startPageLoadSpan', spanOptions, traceOptions);\n  getCurrentScope().setTransactionName(spanOptions.name);\n\n  const pageloadSpan = getActiveIdleSpan(client);\n\n  if (pageloadSpan) {\n    client.emit('afterStartPageLoadSpan', pageloadSpan);\n  }\n\n  return pageloadSpan;\n}\n\n/**\n * Manually start a navigation span.\n * This will only do something if a browser tracing integration has been setup.\n */\nexport function startBrowserTracingNavigationSpan(\n  client: Client,\n  spanOptions: StartSpanOptions,\n  options?: { url?: string; isRedirect?: boolean },\n): Span | undefined {\n  const { url, isRedirect } = options || {};\n  client.emit('beforeStartNavigationSpan', spanOptions, { isRedirect, url });\n  client.emit('startNavigationSpan', spanOptions, { isRedirect, url });\n\n  const scope = getCurrentScope();\n  scope.setTransactionName(spanOptions.name);\n\n  // We store the normalized request data on the scope, so we get the request data at time of span creation\n  // otherwise, the URL etc. may already be of the following navigation, and we'd report the wrong URL\n  if (url && !isRedirect) {\n    scope.setSDKProcessingMetadata({\n      normalizedRequest: {\n        ...getHttpRequestData(),\n        url,\n      },\n    });\n  }\n\n  return getActiveIdleSpan(client);\n}\n\n/** Returns the value of a meta tag */\nexport function getMetaContent(metaName: string): string | undefined {\n  /**\n   * This is just a small wrapper that makes `document` optional.\n   * We want to be extra-safe and always check that this exists, to ensure weird environments do not blow up.\n   */\n  const optionalWindowDocument = WINDOW.document as (typeof WINDOW)['document'] | undefined;\n\n  const metaTag = optionalWindowDocument?.querySelector(`meta[name=${metaName}]`);\n  return metaTag?.getAttribute('content') || undefined;\n}\n\n/** Returns the description of a server timing entry */\nexport function getServerTiming(name: string): string | undefined {\n  const navigation = WINDOW.performance?.getEntriesByType?.('navigation')[0] as PerformanceNavigationTiming | undefined;\n  const entry = navigation?.serverTiming?.find(entry => entry.name === name);\n  return entry?.description;\n}\n\n/** Start listener for interaction transactions */\nfunction registerInteractionListener(\n  client: Client,\n  idleTimeout: BrowserTracingOptions['idleTimeout'],\n  finalTimeout: BrowserTracingOptions['finalTimeout'],\n  childSpanTimeout: BrowserTracingOptions['childSpanTimeout'],\n  latestRoute: RouteInfo,\n): void {\n  /**\n   * This is just a small wrapper that makes `document` optional.\n   * We want to be extra-safe and always check that this exists, to ensure weird environments do not blow up.\n   */\n  const optionalWindowDocument = WINDOW.document as (typeof WINDOW)['document'] | undefined;\n\n  let inflightInteractionSpan: Span | undefined;\n  const registerInteractionTransaction = (): void => {\n    const op = 'ui.action.click';\n\n    const activeIdleSpan = getActiveIdleSpan(client);\n    if (activeIdleSpan) {\n      const currentRootSpanOp = spanToJSON(activeIdleSpan).op;\n      if (['navigation', 'pageload'].includes(currentRootSpanOp as string)) {\n        DEBUG_BUILD &&\n          debug.warn(`[Tracing] Did not create ${op} span because a pageload or navigation span is in progress.`);\n        return undefined;\n      }\n    }\n\n    if (inflightInteractionSpan) {\n      inflightInteractionSpan.setAttribute(SEMANTIC_ATTRIBUTE_SENTRY_IDLE_SPAN_FINISH_REASON, 'interactionInterrupted');\n      inflightInteractionSpan.end();\n      inflightInteractionSpan = undefined;\n    }\n\n    if (!latestRoute.name) {\n      DEBUG_BUILD && debug.warn(`[Tracing] Did not create ${op} transaction because _latestRouteName is missing.`);\n      return undefined;\n    }\n\n    inflightInteractionSpan = startIdleSpan(\n      {\n        name: latestRoute.name,\n        op,\n        attributes: {\n          [SEMANTIC_ATTRIBUTE_SENTRY_SOURCE]: latestRoute.source || 'url',\n        },\n      },\n      {\n        idleTimeout,\n        finalTimeout,\n        childSpanTimeout,\n      },\n    );\n  };\n\n  if (optionalWindowDocument) {\n    addEventListener('click', registerInteractionTransaction, { capture: true });\n  }\n}\n\n// We store the active idle span on the client object, so we can access it from exported functions\nconst ACTIVE_IDLE_SPAN_PROPERTY = '_sentry_idleSpan';\nfunction getActiveIdleSpan(client: Client): Span | undefined {\n  return (client as { [ACTIVE_IDLE_SPAN_PROPERTY]?: Span })[ACTIVE_IDLE_SPAN_PROPERTY];\n}\n\nfunction setActiveIdleSpan(client: Client, span: Span | undefined): void {\n  addNonEnumerableProperty(client, ACTIVE_IDLE_SPAN_PROPERTY, span);\n}\n\n// The max. time in seconds between two pageload/navigation spans that makes us consider the second one a redirect\nconst REDIRECT_THRESHOLD = 1.5;\n\nfunction isRedirect(activeSpan: Span, lastInteractionTimestamp: number | undefined): boolean {\n  const spanData = spanToJSON(activeSpan);\n\n  const now = dateTimestampInSeconds();\n\n  // More than REDIRECT_THRESHOLD seconds since last navigation/pageload span?\n  // --> never consider this a redirect\n  const startTimestamp = spanData.start_timestamp;\n  if (now - startTimestamp > REDIRECT_THRESHOLD) {\n    return false;\n  }\n\n  // A click happened in the last REDIRECT_THRESHOLD seconds?\n  // --> never consider this a redirect\n  if (lastInteractionTimestamp && now - lastInteractionTimestamp <= REDIRECT_THRESHOLD) {\n    return false;\n  }\n\n  return true;\n}\n","import type { Client, PropagationContext, Span, SpanContextData } from '@sentry/core/browser';\nimport {\n  debug,\n  getCurrentScope,\n  getRootSpan,\n  SEMANTIC_ATTRIBUTE_SENTRY_PREVIOUS_TRACE_SAMPLE_RATE,\n  SEMANTIC_ATTRIBUTE_SENTRY_SAMPLE_RATE,\n  SEMANTIC_LINK_ATTRIBUTE_LINK_TYPE,\n  spanToJSON,\n} from '@sentry/core/browser';\nimport { DEBUG_BUILD } from '../debug-build';\nimport { WINDOW } from '../exports';\n\nexport interface PreviousTraceInfo {\n  /**\n   * Span context of the previous trace's local root span\n   */\n  spanContext: SpanContextData;\n\n  /**\n   * Timestamp in seconds when the previous trace was started\n   */\n  startTimestamp: number;\n\n  /**\n   * sample rate of the previous trace\n   */\n  sampleRate: number;\n\n  /**\n   * The sample rand of the previous trace\n   */\n  sampleRand: number;\n}\n\n// 1h in seconds\nexport const PREVIOUS_TRACE_MAX_DURATION = 3600;\n\n// session storage key\nexport const PREVIOUS_TRACE_KEY = 'sentry_previous_trace';\n\nexport const PREVIOUS_TRACE_TMP_SPAN_ATTRIBUTE = 'sentry.previous_trace';\n\n/**\n * Takes care of linking traces and applying the (consistent) sampling behavoiour based on the passed options\n * @param options - options for linking traces and consistent trace sampling (@see BrowserTracingOptions)\n * @param client - Sentry client\n */\nexport function linkTraces(\n  client: Client,\n  {\n    linkPreviousTrace,\n    consistentTraceSampling,\n  }: {\n    linkPreviousTrace: 'session-storage' | 'in-memory';\n    consistentTraceSampling: boolean;\n  },\n): void {\n  const useSessionStorage = linkPreviousTrace === 'session-storage';\n\n  let inMemoryPreviousTraceInfo = useSessionStorage ? getPreviousTraceFromSessionStorage() : undefined;\n\n  client.on('spanStart', span => {\n    if (getRootSpan(span) !== span) {\n      return;\n    }\n\n    const oldPropagationContext = getCurrentScope().getPropagationContext();\n    inMemoryPreviousTraceInfo = addPreviousTraceSpanLink(inMemoryPreviousTraceInfo, span, oldPropagationContext);\n\n    if (useSessionStorage) {\n      storePreviousTraceInSessionStorage(inMemoryPreviousTraceInfo);\n    }\n  });\n\n  let isFirstTraceOnPageload = true;\n  if (consistentTraceSampling) {\n    /*\n    When users opt into `consistentTraceSampling`, we need to ensure that we propagate\n    the previous trace's sample rate and rand to the current trace. This is necessary because otherwise, span\n    metric extrapolation is inaccurate, as we'd propagate too high of a sample rate for the subsequent traces.\n\n    So therefore, we pretend that the previous trace was the parent trace of the newly started trace. To do that,\n    we mutate the propagation context of the current trace and set the sample rate and sample rand of the previous trace.\n    Timing-wise, it is fine because it happens before we even sample the root span.\n\n    @see https://github.com/getsentry/sentry-javascript/issues/15754\n    */\n    client.on('beforeSampling', mutableSamplingContextData => {\n      if (!inMemoryPreviousTraceInfo) {\n        return;\n      }\n\n      const scope = getCurrentScope();\n      const currentPropagationContext = scope.getPropagationContext();\n\n      // We do not want to force-continue the sampling decision if we continue a trace\n      // that was started on the backend. Most prominently, this will happen in MPAs where\n      // users hard-navigate between pages. In this case, the sampling decision of a potentially\n      // started trace on the server takes precedence.\n      // Why? We want to prioritize inter-trace consistency over intra-trace consistency.\n      if (isFirstTraceOnPageload && currentPropagationContext.parentSpanId) {\n        isFirstTraceOnPageload = false;\n        return;\n      }\n\n      scope.setPropagationContext({\n        ...currentPropagationContext,\n        dsc: {\n          ...currentPropagationContext.dsc,\n          sample_rate: String(inMemoryPreviousTraceInfo.sampleRate),\n          sampled: String(spanContextSampled(inMemoryPreviousTraceInfo.spanContext)),\n        },\n        sampleRand: inMemoryPreviousTraceInfo.sampleRand,\n      });\n\n      mutableSamplingContextData.parentSampled = spanContextSampled(inMemoryPreviousTraceInfo.spanContext);\n      mutableSamplingContextData.parentSampleRate = inMemoryPreviousTraceInfo.sampleRate;\n\n      mutableSamplingContextData.spanAttributes = {\n        ...mutableSamplingContextData.spanAttributes,\n        [SEMANTIC_ATTRIBUTE_SENTRY_PREVIOUS_TRACE_SAMPLE_RATE]: inMemoryPreviousTraceInfo.sampleRate,\n      };\n    });\n  }\n}\n\n/**\n * Adds a previous_trace span link to the passed span if the passed\n * previousTraceInfo is still valid.\n *\n * @returns the updated previous trace info (based on the current span/trace) to\n * be used on the next call\n */\nexport function addPreviousTraceSpanLink(\n  previousTraceInfo: PreviousTraceInfo | undefined,\n  span: Span,\n  oldPropagationContext: PropagationContext,\n): PreviousTraceInfo {\n  const spanJson = spanToJSON(span);\n\n  function getSampleRate(): number {\n    try {\n      const oldSampleRate = Number(\n        spanJson.data?.[SEMANTIC_ATTRIBUTE_SENTRY_SAMPLE_RATE] ?? oldPropagationContext.dsc?.sample_rate,\n      );\n      return Number.isNaN(oldSampleRate) ? 0 : oldSampleRate;\n    } catch {\n      return 0;\n    }\n  }\n\n  const updatedPreviousTraceInfo = {\n    spanContext: span.spanContext(),\n    startTimestamp: spanJson.start_timestamp,\n    sampleRate: getSampleRate(),\n    sampleRand: oldPropagationContext.sampleRand,\n  };\n\n  if (!previousTraceInfo) {\n    return updatedPreviousTraceInfo;\n  }\n\n  const previousTraceSpanCtx = previousTraceInfo.spanContext;\n  if (previousTraceSpanCtx.traceId === spanJson.trace_id) {\n    // This means, we're still in the same trace so let's not update the previous trace info\n    // or add a link to the current span.\n    // Once we move away from the long-lived, route-based trace model, we can remove this cases\n    return previousTraceInfo;\n  }\n\n  // Only add the link if the startTimeStamp of the previous trace's root span is within\n  // PREVIOUS_TRACE_MAX_DURATION (1h) of the current root span's startTimestamp\n  // This is done to\n  // - avoid adding links to \"stale\" traces\n  // - enable more efficient querying for previous/next traces in Sentry\n  if (Date.now() / 1000 - previousTraceInfo.startTimestamp <= PREVIOUS_TRACE_MAX_DURATION) {\n    if (DEBUG_BUILD) {\n      debug.log(\n        `Adding previous_trace \\`${JSON.stringify(previousTraceSpanCtx)}\\` link to span \\`${JSON.stringify({\n          op: spanJson.op,\n          ...span.spanContext(),\n        })}\\``,\n      );\n    }\n\n    span.addLink({\n      context: previousTraceSpanCtx,\n      attributes: {\n        [SEMANTIC_LINK_ATTRIBUTE_LINK_TYPE]: 'previous_trace',\n      },\n    });\n\n    // TODO: Remove this once EAP can store span links. We currently only set this attribute so that we\n    // can obtain the previous trace information from the EAP store. Long-term, EAP will handle\n    // span links and then we should remove this again. Also throwing in a TODO(v11), to remind us\n    // to check this at v11 time :)\n    span.setAttribute(\n      PREVIOUS_TRACE_TMP_SPAN_ATTRIBUTE,\n      `${previousTraceSpanCtx.traceId}-${previousTraceSpanCtx.spanId}-${\n        spanContextSampled(previousTraceSpanCtx) ? 1 : 0\n      }`,\n    );\n  }\n\n  return updatedPreviousTraceInfo;\n}\n\n/**\n * Stores @param previousTraceInfo in sessionStorage.\n */\nexport function storePreviousTraceInSessionStorage(previousTraceInfo: PreviousTraceInfo): void {\n  try {\n    WINDOW.sessionStorage.setItem(PREVIOUS_TRACE_KEY, JSON.stringify(previousTraceInfo));\n  } catch (e) {\n    // Ignore potential errors (e.g. if sessionStorage is not available)\n    DEBUG_BUILD && debug.warn('Could not store previous trace in sessionStorage', e);\n  }\n}\n\n/**\n * Retrieves the previous trace from sessionStorage if available.\n */\nexport function getPreviousTraceFromSessionStorage(): PreviousTraceInfo | undefined {\n  try {\n    const previousTraceInfo = WINDOW.sessionStorage?.getItem(PREVIOUS_TRACE_KEY);\n    // @ts-expect-error - intentionally risking JSON.parse throwing when previousTraceInfo is null to save bundle size\n    return JSON.parse(previousTraceInfo);\n  } catch {\n    return undefined;\n  }\n}\n\n/**\n * see {@link import('@sentry/core/browser').spanIsSampled}\n */\nexport function spanContextSampled(ctx: SpanContextData): boolean {\n  return ctx.traceFlags === 0x1;\n}\n","import type { Client } from '@sentry/core/browser';\nimport { getClient } from '@sentry/core/browser';\n\n/**\n * Manually report the end of the page load, resulting in the SDK ending the pageload span.\n * This only works if {@link BrowserTracingOptions.enableReportPageLoaded} is set to `true`.\n * Otherwise, the pageload span will end itself based on the {@link BrowserTracingOptions.finalTimeout},\n * {@link BrowserTracingOptions.idleTimeout} and {@link BrowserTracingOptions.childSpanTimeout}.\n *\n * @param client - The client to use. If not provided, the global client will be used.\n */\nexport function reportPageLoaded(client: Client | undefined = getClient()): void {\n  client?.emit('endPageloadSpan');\n}\n","/* eslint-disable max-lines */\nimport type {\n  Client,\n  HandlerDataXhr,\n  RequestHookInfo,\n  ResponseHookInfo,\n  SentryWrappedXMLHttpRequest,\n  Span,\n  SpanTimeInput,\n} from '@sentry/core/browser';\nimport {\n  addFetchInstrumentationHandler,\n  getActiveSpan,\n  getClient,\n  getLocationHref,\n  getTraceData,\n  hasSpansEnabled,\n  hasSpanStreamingEnabled,\n  instrumentFetchRequest,\n  parseUrl,\n  SEMANTIC_ATTRIBUTE_SENTRY_OP,\n  SEMANTIC_ATTRIBUTE_SENTRY_ORIGIN,\n  SentryNonRecordingSpan,\n  setHttpStatus,\n  spanIsIgnored,\n  spanToJSON,\n  startInactiveSpan,\n  stringMatchesSomePattern,\n  stripDataUrlContent,\n  stripUrlQueryAndFragment,\n  timestampInSeconds,\n} from '@sentry/core/browser';\nimport type { XhrHint } from '@sentry/browser-utils';\nimport {\n  addPerformanceInstrumentationHandler,\n  addXhrInstrumentationHandler,\n  parseXhrResponseHeaders,\n  resourceTimingToSpanAttributes,\n  SENTRY_XHR_DATA_KEY,\n} from '@sentry/browser-utils';\nimport type { BrowserClient } from '../client';\nimport { baggageHeaderHasSentryValues, createHeadersSafely, getFullURL, isPerformanceResourceTiming } from './utils';\nimport { HTTP_URL, URL_FULL } from '@sentry/conventions/attributes';\n\n/** Options for Request Instrumentation */\nexport interface RequestInstrumentationOptions {\n  /**\n   * List of strings and/or Regular Expressions used to determine which outgoing requests will have `sentry-trace` and `baggage`\n   * headers attached.\n   *\n   * **Default:** If this option is not provided, tracing headers will be attached to all outgoing requests.\n   * If you are using a browser SDK, by default, tracing headers will only be attached to outgoing requests to the same origin.\n   *\n   * **Disclaimer:** Carelessly setting this option in browser environments may result into CORS errors!\n   * Only attach tracing headers to requests to the same origin, or to requests to services you can control CORS headers of.\n   * Cross-origin requests, meaning requests to a different domain, for example a request to `https://api.example.com/` while you're on `https://example.com/`, take special care.\n   * If you are attaching headers to cross-origin requests, make sure the backend handling the request returns a `\"Access-Control-Allow-Headers: sentry-trace, baggage\"` header to ensure your requests aren't blocked.\n   *\n   * If you provide a `tracePropagationTargets` array, the entries you provide will be matched against the entire URL of the outgoing request.\n   * If you are using a browser SDK, the entries will also be matched against the pathname of the outgoing requests.\n   * This is so you can have matchers for relative requests, for example, `/^\\/api/` if you want to trace requests to your `/api` routes on the same domain.\n   *\n   * If any of the two match any of the provided values, tracing headers will be attached to the outgoing request.\n   * Both, the string values, and the RegExes you provide in the array will match if they partially match the URL or pathname.\n   *\n   * Examples:\n   * - `tracePropagationTargets: [/^\\/api/]` and request to `https://same-origin.com/api/posts`:\n   *   - Tracing headers will be attached because the request is sent to the same origin and the regex matches the pathname \"/api/posts\".\n   * - `tracePropagationTargets: [/^\\/api/]` and request to `https://different-origin.com/api/posts`:\n   *   - Tracing headers will not be attached because the pathname will only be compared when the request target lives on the same origin.\n   * - `tracePropagationTargets: [/^\\/api/, 'https://external-api.com']` and request to `https://external-api.com/v1/data`:\n   *   - Tracing headers will be attached because the request URL matches the string `'https://external-api.com'`.\n   */\n  tracePropagationTargets?: Array<string | RegExp>;\n\n  /**\n   * Flag to disable patching all together for fetch requests.\n   *\n   * Default: true\n   */\n  traceFetch: boolean;\n\n  /**\n   * Flag to disable patching all together for xhr requests.\n   *\n   * Default: true\n   */\n  traceXHR: boolean;\n\n  /**\n   * Flag to disable tracking of long-lived streams, like server-sent events (SSE) via fetch.\n   * Do not enable this in case you have live streams or very long running streams.\n   *\n   * Disabled by default since it can lead to issues with streams using the `cancel()` api\n   * (https://github.com/getsentry/sentry-javascript/issues/13950)\n   *\n   * Default: false\n   *\n   * @deprecated Use `fetchStreamPerformanceIntegration()` instead. Add it to your `integrations` array\n   * to track the duration of streamed fetch response bodies.\n   */\n  trackFetchStreamPerformance: boolean;\n\n  /**\n   * If true, Sentry will capture http timings and add them to the corresponding http spans.\n   *\n   * Default: true\n   */\n  enableHTTPTimings: boolean;\n\n  /**\n   * This function will be called before creating a span for a request with the given url.\n   * Return false if you don't want a span for the given url.\n   *\n   * Default: (url: string) => true\n   */\n  shouldCreateSpanForRequest?(this: void, url: string): boolean;\n\n  /**\n   * Is called when spans are started for outgoing requests.\n   */\n  onRequestSpanStart?(span: Span, requestInformation: RequestHookInfo): void;\n\n  /**\n   * Is called when spans end for outgoing requests, providing access to response headers.\n   */\n  onRequestSpanEnd?(span: Span, responseInformation: ResponseHookInfo): void;\n}\n\nexport const defaultRequestInstrumentationOptions: RequestInstrumentationOptions = {\n  traceFetch: true,\n  traceXHR: true,\n  enableHTTPTimings: true,\n  trackFetchStreamPerformance: false,\n};\n\n/** Registers span creators for xhr and fetch requests  */\nexport function instrumentOutgoingRequests(client: Client, _options?: Partial<RequestInstrumentationOptions>): void {\n  const {\n    traceFetch,\n    traceXHR,\n    shouldCreateSpanForRequest,\n    enableHTTPTimings,\n    tracePropagationTargets,\n    onRequestSpanStart,\n    onRequestSpanEnd,\n  } = {\n    ...defaultRequestInstrumentationOptions,\n    ..._options,\n  };\n\n  const shouldCreateSpan =\n    typeof shouldCreateSpanForRequest === 'function' ? shouldCreateSpanForRequest : (_: string) => true;\n\n  const shouldAttachHeadersWithTargets = (url: string): boolean => shouldAttachHeaders(url, tracePropagationTargets);\n\n  const spans: Record<string, Span> = {};\n\n  const propagateTraceparent = (client as BrowserClient).getOptions().propagateTraceparent;\n\n  if (traceFetch) {\n    addFetchInstrumentationHandler(handlerData => {\n      const createdSpan = instrumentFetchRequest(handlerData, shouldCreateSpan, shouldAttachHeadersWithTargets, spans, {\n        propagateTraceparent,\n        onRequestSpanEnd,\n      });\n\n      // We cannot use `window.location` in the generic fetch instrumentation,\n      // but we need it for reliable `server.address` attribute.\n      // so we extend this in here\n      if (createdSpan) {\n        const fullUrl = getFullURL(handlerData.fetchData.url);\n        const host = fullUrl ? parseUrl(fullUrl).host : undefined;\n        const sanitizedFullUrl = fullUrl ? stripDataUrlContent(fullUrl) : undefined;\n        createdSpan.setAttributes({\n          // oxlint-disable-next-line typescript/no-deprecated\n          [HTTP_URL]: sanitizedFullUrl,\n          // `url.full` must match `http.url`. Setting it here ensures parentless `http.client`\n          // segment spans don't get `url.full` backfilled with the host page URL (see httpContextIntegration).\n          [URL_FULL]: sanitizedFullUrl,\n          'server.address': host,\n        });\n\n        if (enableHTTPTimings) {\n          addHTTPTimings(createdSpan, client);\n        }\n\n        onRequestSpanStart?.(createdSpan, { headers: handlerData.headers });\n      }\n    });\n  }\n\n  if (traceXHR) {\n    addXhrInstrumentationHandler(handlerData => {\n      const createdSpan = xhrCallback(\n        handlerData,\n        shouldCreateSpan,\n        shouldAttachHeadersWithTargets,\n        spans,\n        propagateTraceparent,\n        onRequestSpanEnd,\n      );\n\n      if (createdSpan) {\n        if (enableHTTPTimings) {\n          addHTTPTimings(createdSpan, client);\n        }\n\n        onRequestSpanStart?.(createdSpan, {\n          headers: createHeadersSafely(handlerData.xhr.__sentry_xhr_v3__?.request_headers),\n        });\n      }\n    });\n  }\n}\n\n/**\n * The maximum time (ms) to wait for PerformanceResourceTiming data before ending the span.\n * Same approach is used by OTel's browser fetch instrumentation:\n * See {@link https://github.com/open-telemetry/opentelemetry-js/blob/30f94fe99339287b1e4d3c8bb90172c2523f06f4/experimental/packages/opentelemetry-instrumentation-fetch/src/fetch.ts#L352-L372}\n */\nconst HTTP_TIMING_WAIT_MS = 300;\n\n/**\n * Creates a temporary observer to listen to the next fetch/xhr resourcing timings,\n * so that when timings hit their per-browser limit they don't need to be removed.\n *\n * @param span A span that has yet to be finished, must contain `url` on data.\n */\nfunction addHTTPTimings(span: Span, client: Client): void {\n  const { url } = spanToJSON(span).data;\n\n  if (!url || typeof url !== 'string') {\n    return;\n  }\n\n  // Clean up the performance observer and other resources\n  // We have to wait here because otherwise this cleans itself up before it is fully done.\n  // Default (non-streaming): just deregister the observer.\n  let onEntryFound = (): void => void setTimeout(unsubscribePerformanceObsever);\n\n  // For streamed spans, we have to artificially delay the ending of the span until we\n  // either receive the timing data, or HTTP_TIMING_WAIT_MS elapses.\n  if (hasSpanStreamingEnabled(client)) {\n    const originalEnd = span.end.bind(span);\n\n    span.end = (endTimestamp?: SpanTimeInput) => {\n      const capturedEndTimestamp = endTimestamp ?? timestampInSeconds();\n      let isEnded = false;\n\n      const endSpanAndCleanup = (): void => {\n        if (isEnded) {\n          return;\n        }\n        isEnded = true;\n        setTimeout(unsubscribePerformanceObsever);\n        originalEnd(capturedEndTimestamp);\n        clearTimeout(fallbackTimeout);\n      };\n\n      onEntryFound = endSpanAndCleanup;\n\n      // Fallback: always end the span after HTTP_TIMING_WAIT_MS even if no\n      // PerformanceResourceTiming entry arrives (e.g. cross-origin without\n      // Timing-Allow-Origin, or the browser didn't fire the observer in time).\n      const fallbackTimeout = setTimeout(endSpanAndCleanup, HTTP_TIMING_WAIT_MS);\n    };\n  }\n\n  const unsubscribePerformanceObsever = addPerformanceInstrumentationHandler('resource', ({ entries }) => {\n    entries.forEach(entry => {\n      if (isPerformanceResourceTiming(entry) && entry.name.endsWith(url)) {\n        span.setAttributes(resourceTimingToSpanAttributes(entry));\n        onEntryFound();\n      }\n    });\n  });\n}\n\n/**\n * A function that determines whether to attach tracing headers to a request.\n * We only export this function for testing purposes.\n */\nexport function shouldAttachHeaders(\n  targetUrl: string,\n  tracePropagationTargets: (string | RegExp)[] | undefined,\n): boolean {\n  // window.location.href not being defined is an edge case in the browser but we need to handle it.\n  // Potentially dangerous situations where it may not be defined: Browser Extensions, Web Workers, patching of the location obj\n  const href = getLocationHref();\n\n  if (!href) {\n    // If there is no window.location.origin, we default to only attaching tracing headers to relative requests, i.e. ones that start with `/`\n    // BIG DISCLAIMER: Users can call URLs with a double slash (fetch(\"//example.com/api\")), this is a shorthand for \"send to the same protocol\",\n    // so we need a to exclude those requests, because they might be cross origin.\n    const isRelativeSameOriginRequest = !!targetUrl.match(/^\\/(?!\\/)/);\n    if (!tracePropagationTargets) {\n      return isRelativeSameOriginRequest;\n    } else {\n      return stringMatchesSomePattern(targetUrl, tracePropagationTargets);\n    }\n  } else {\n    let resolvedUrl;\n    let currentOrigin;\n\n    // URL parsing may fail, we default to not attaching trace headers in that case.\n    try {\n      resolvedUrl = new URL(targetUrl, href);\n      currentOrigin = new URL(href).origin;\n    } catch {\n      return false;\n    }\n\n    const isSameOriginRequest = resolvedUrl.origin === currentOrigin;\n    if (!tracePropagationTargets) {\n      return isSameOriginRequest;\n    } else {\n      return (\n        stringMatchesSomePattern(resolvedUrl.toString(), tracePropagationTargets) ||\n        (isSameOriginRequest && stringMatchesSomePattern(resolvedUrl.pathname, tracePropagationTargets))\n      );\n    }\n  }\n}\n\n/**\n * Create and track xhr request spans\n *\n * @returns Span if a span was created, otherwise void.\n */\n// oxlint-disable-next-line complexity\nfunction xhrCallback(\n  handlerData: HandlerDataXhr,\n  shouldCreateSpan: (url: string) => boolean,\n  shouldAttachHeaders: (url: string) => boolean,\n  spans: Record<string, Span>,\n  propagateTraceparent?: boolean,\n  onRequestSpanEnd?: RequestInstrumentationOptions['onRequestSpanEnd'],\n): Span | undefined {\n  const xhr = handlerData.xhr;\n  const sentryXhrData = xhr?.[SENTRY_XHR_DATA_KEY];\n\n  if (!xhr || xhr.__sentry_own_request__ || !sentryXhrData) {\n    return undefined;\n  }\n\n  const { url, method } = sentryXhrData;\n\n  const shouldCreateSpanResult = hasSpansEnabled() && shouldCreateSpan(url);\n\n  // Handle XHR completion - clean up spans from the record\n  if (handlerData.endTimestamp) {\n    const spanId = xhr.__sentry_xhr_span_id__;\n    if (!spanId) return;\n\n    const span = spans[spanId];\n\n    if (span) {\n      if (shouldCreateSpanResult && sentryXhrData.status_code !== undefined) {\n        setHttpStatus(span, sentryXhrData.status_code);\n        span.end();\n\n        onRequestSpanEnd?.(span, {\n          headers: createHeadersSafely(parseXhrResponseHeaders(xhr as XMLHttpRequest & SentryWrappedXMLHttpRequest)),\n          error: handlerData.error,\n        });\n      }\n\n      // eslint-disable-next-line @typescript-eslint/no-dynamic-delete\n      delete spans[spanId];\n    }\n\n    return undefined;\n  }\n\n  const fullUrl = getFullURL(url);\n  const parsedUrl = fullUrl ? parseUrl(fullUrl) : parseUrl(url);\n  const sanitizedFullUrl = fullUrl ? stripDataUrlContent(fullUrl) : undefined;\n\n  const urlForSpanName = stripDataUrlContent(stripUrlQueryAndFragment(url));\n\n  const client = getClient();\n  const hasParent = !!getActiveSpan();\n  // With span streaming, we always emit http.client spans, even without a parent span\n  const shouldEmitSpan = hasParent || (!!client && hasSpanStreamingEnabled(client));\n\n  const span =\n    shouldCreateSpanResult && shouldEmitSpan\n      ? startInactiveSpan({\n          name: `${method} ${urlForSpanName}`,\n          attributes: {\n            url: stripDataUrlContent(url),\n            type: 'xhr',\n            'http.method': method,\n            'http.url': sanitizedFullUrl,\n            // `url.full` must match `http.url`. Setting it here ensures parentless `http.client`\n            // segment spans don't get `url.full` backfilled with the host page URL (see httpContextIntegration).\n            [URL_FULL]: sanitizedFullUrl,\n            'server.address': parsedUrl?.host,\n            [SEMANTIC_ATTRIBUTE_SENTRY_ORIGIN]: 'auto.http.browser',\n            [SEMANTIC_ATTRIBUTE_SENTRY_OP]: 'http.client',\n            ...(parsedUrl?.search && { 'http.query': parsedUrl?.search }),\n            ...(parsedUrl?.hash && { 'http.fragment': parsedUrl?.hash }),\n          },\n        })\n      : new SentryNonRecordingSpan();\n\n  // If the span is ignored, we don't want to continue the trace from it (NonRecordingSpan) but rather\n  // from the active span. Passing `undefined` here will make `getTraceData` use the active span instead.\n  const spanForTraceHeaders = spanIsIgnored(span) && hasParent ? undefined : span;\n\n  if (shouldCreateSpanResult && !shouldEmitSpan) {\n    client?.recordDroppedEvent('no_parent_span', 'span');\n  }\n\n  xhr.__sentry_xhr_span_id__ = span.spanContext().spanId;\n  spans[xhr.__sentry_xhr_span_id__] = span;\n\n  if (shouldAttachHeaders(url)) {\n    addTracingHeadersToXhrRequest(\n      xhr,\n      // If performance is disabled (TWP) or there's no active root span (pageload/navigation/interaction),\n      // we do not want to use the span as base for the trace headers,\n      // which means that the headers will be generated from the scope and the sampling decision is deferred\n      hasSpansEnabled() && shouldEmitSpan ? spanForTraceHeaders : undefined,\n      propagateTraceparent,\n    );\n  }\n\n  if (client) {\n    client.emit('beforeOutgoingRequestSpan', span, handlerData as XhrHint);\n  }\n\n  return span;\n}\n\nfunction addTracingHeadersToXhrRequest(\n  xhr: SentryWrappedXMLHttpRequest,\n  span?: Span,\n  propagateTraceparent?: boolean,\n): void {\n  const { 'sentry-trace': sentryTrace, baggage, traceparent } = getTraceData({ span, propagateTraceparent });\n\n  if (sentryTrace) {\n    setHeaderOnXhr(xhr, sentryTrace, baggage, traceparent);\n  }\n}\n\nfunction setHeaderOnXhr(\n  xhr: SentryWrappedXMLHttpRequest,\n  sentryTraceHeader: string,\n  sentryBaggageHeader: string | undefined,\n  traceparentHeader: string | undefined,\n): void {\n  const originalHeaders = xhr.__sentry_xhr_v3__?.request_headers;\n\n  if (originalHeaders?.['sentry-trace'] || !xhr.setRequestHeader) {\n    // bail if a sentry-trace header is already set\n    return;\n  }\n\n  try {\n    xhr.setRequestHeader('sentry-trace', sentryTraceHeader);\n\n    if (traceparentHeader && !originalHeaders?.['traceparent']) {\n      xhr.setRequestHeader('traceparent', traceparentHeader);\n    }\n\n    if (sentryBaggageHeader) {\n      // only add our headers if\n      // - no pre-existing baggage header exists\n      // - or it is set and doesn't yet contain sentry values\n      const originalBaggageHeader = originalHeaders?.['baggage'];\n      if (!originalBaggageHeader || !baggageHeaderHasSentryValues(originalBaggageHeader)) {\n        // From MDN: \"If this method is called several times with the same header, the values are merged into one single request header.\"\n        // We can therefore simply set a baggage header without checking what was there before\n        // https://developer.mozilla.org/en-US/docs/Web/API/XMLHttpRequest/setRequestHeader\n        xhr.setRequestHeader('baggage', sentryBaggageHeader);\n      }\n    }\n  } catch {\n    // Error: InvalidStateError: Failed to execute 'setRequestHeader' on 'XMLHttpRequest': The object's state must be OPENED.\n  }\n}\n","import type { Span } from '@sentry/core/browser';\nimport { _INTERNAL_setSpanForScope, getActiveSpan, getCurrentScope } from '@sentry/core/browser';\n\n/**\n * Sets an inactive span active on the current scope.\n *\n * This is useful in browser applications, if you want to create a span that cannot be finished\n * within its callback. Any spans started while the given span is active, will be children of the span.\n *\n * If there already was an active span on the scope prior to calling this function, it is replaced\n * with the given span and restored after the span ended. Otherwise, the span will simply be\n * removed, resulting in no active span on the scope.\n *\n * IMPORTANT: This function can ONLY be used in the browser! Calling this function in a server\n * environment (for example in a server-side rendered component) will result in undefined behaviour\n * and is not supported.\n * You MUST call `span.end()` manually, otherwise the span will never be finished.\n *\n * @example\n * ```js\n * let checkoutSpan;\n *\n * on('checkoutStarted', () => {\n *  checkoutSpan = Sentry.startInactiveSpan({ name: 'checkout-flow' });\n *  Sentry.setActiveSpanInBrowser(checkoutSpan);\n * })\n *\n * // during this time, any spans started will be children of `checkoutSpan`:\n * Sentry.startSpan({ name: 'checkout-step-1' }, () => {\n *  // ... `\n * })\n *\n * on('checkoutCompleted', () => {\n *  checkoutSpan?.end();\n * })\n * ```\n *\n * @param span - the span to set active\n */\nexport function setActiveSpanInBrowser(span: Span): void {\n  const maybePreviousActiveSpan = getActiveSpan();\n\n  // If the span is already active, there's no need to double-patch or set it again.\n  // This also guards against users (for whatever reason) calling setActiveSpanInBrowser on SDK-started\n  // idle spans like pageload or navigation spans. These will already be handled correctly by the SDK.\n  // For nested situations, we have to double-patch to ensure we restore the correct previous span (see tests)\n  if (maybePreviousActiveSpan === span) {\n    return;\n  }\n\n  const scope = getCurrentScope();\n\n  // Putting a small patch onto the span.end method to ensure we\n  // remove the span from the scope when it ends.\n  // eslint-disable-next-line @typescript-eslint/unbound-method\n  span.end = new Proxy(span.end, {\n    apply(target, thisArg, args: Parameters<Span['end']>) {\n      _INTERNAL_setSpanForScope(scope, maybePreviousActiveSpan);\n      return Reflect.apply(target, thisArg, args);\n    },\n  });\n\n  _INTERNAL_setSpanForScope(scope, span);\n}\n","import { WINDOW } from '../helpers';\n\n/**\n * Checks if the baggage header has Sentry values.\n */\nexport function baggageHeaderHasSentryValues(baggageHeader: string): boolean {\n  return baggageHeader.split(',').some(value => value.trim().startsWith('sentry-'));\n}\n\n/**\n * Gets the full URL from a given URL string.\n */\nexport function getFullURL(url: string): string | undefined {\n  try {\n    // By adding a base URL to new URL(), this will also work for relative urls\n    // If `url` is a full URL, the base URL is ignored anyhow\n    const parsed = new URL(url, WINDOW.location.origin);\n    return parsed.href;\n  } catch {\n    return undefined;\n  }\n}\n\n/**\n * Checks if the entry is a PerformanceResourceTiming.\n */\nexport function isPerformanceResourceTiming(entry: PerformanceEntry): entry is PerformanceResourceTiming {\n  return (\n    entry.entryType === 'resource' &&\n    'initiatorType' in entry &&\n    typeof (entry as PerformanceResourceTiming).nextHopProtocol === 'string' &&\n    (entry.initiatorType === 'fetch' || entry.initiatorType === 'xmlhttprequest')\n  );\n}\n\n/**\n * Creates a Headers object from a record of string key-value pairs, and returns undefined if it fails.\n */\nexport function createHeadersSafely(headers: Record<string, string> | undefined): Headers | undefined {\n  try {\n    return new Headers(headers);\n  } catch {\n    // noop\n    return undefined;\n  }\n}\n","import type { Transport, TransportMakeRequestResponse, TransportRequest } from '@sentry/core/browser';\nimport { createTransport, makePromiseBuffer } from '@sentry/core/browser';\nimport { clearCachedImplementation, getNativeImplementation } from '@sentry/browser-utils';\nimport type { WINDOW } from '../helpers';\nimport type { BrowserTransportOptions } from './types';\n\nconst DEFAULT_BROWSER_TRANSPORT_BUFFER_SIZE = 40;\n\n/**\n * Creates a Transport that uses the Fetch API to send events to Sentry.\n */\nexport function makeFetchTransport(\n  options: BrowserTransportOptions,\n  nativeFetch: typeof WINDOW.fetch = getNativeImplementation('fetch'),\n): Transport {\n  let pendingBodySize = 0;\n  let pendingCount = 0;\n\n  async function makeRequest(request: TransportRequest): Promise<TransportMakeRequestResponse> {\n    const requestSize = request.body.length;\n    pendingBodySize += requestSize;\n    pendingCount++;\n\n    const requestOptions: RequestInit = {\n      body: request.body,\n      method: 'POST',\n      referrerPolicy: 'strict-origin',\n      headers: options.headers,\n      // Outgoing requests are usually cancelled when navigating to a different page, causing a \"TypeError: Failed to\n      // fetch\" error and sending a \"network_error\" client-outcome - in Chrome, the request status shows \"(cancelled)\".\n      // The `keepalive` flag keeps outgoing requests alive, even when switching pages. We want this since we're\n      // frequently sending events right before the user is switching pages (eg. when finishing navigation transactions).\n      // Gotchas:\n      // - `keepalive` isn't supported by Firefox\n      // - As per spec (https://fetch.spec.whatwg.org/#http-network-or-cache-fetch):\n      //   If the sum of contentLength and inflightKeepaliveBytes is greater than 64 kibibytes, then return a network error.\n      //   We will therefore only activate the flag when we're below that limit.\n      // There is also a limit of requests that can be open at the same time, so we also limit this to 15\n      // See https://github.com/getsentry/sentry-javascript/pull/7553 for details\n      keepalive: pendingBodySize <= 60_000 && pendingCount < 15,\n      ...options.fetchOptions,\n    };\n\n    try {\n      // Note: We do not need to suppress tracing here, because we are using the native fetch, instead of our wrapped one.\n      const response = await nativeFetch(options.url, requestOptions);\n\n      return {\n        statusCode: response.status,\n        headers: {\n          'x-sentry-rate-limits': response.headers.get('X-Sentry-Rate-Limits'),\n          'retry-after': response.headers.get('Retry-After'),\n        },\n      };\n    } catch (e) {\n      clearCachedImplementation('fetch');\n      throw e;\n    } finally {\n      pendingBodySize -= requestSize;\n      pendingCount--;\n    }\n  }\n\n  return createTransport(\n    options,\n    makeRequest,\n    makePromiseBuffer(options.bufferSize || DEFAULT_BROWSER_TRANSPORT_BUFFER_SIZE),\n  );\n}\n","import type {\n  BaseTransportOptions,\n  Envelope,\n  OfflineStore,\n  OfflineTransportOptions,\n  Transport,\n} from '@sentry/core/browser';\nimport { makeOfflineTransport, parseEnvelope, serializeEnvelope } from '@sentry/core/browser';\nimport { WINDOW } from '../helpers';\nimport { makeFetchTransport } from './fetch';\n\n// 'Store', 'promisifyRequest' and 'createStore' were originally copied from the 'idb-keyval' package before being\n// modified and simplified: https://github.com/jakearchibald/idb-keyval\n//\n// At commit: 0420a704fd6cbb4225429c536b1f61112d012fca\n// Original license:\n\n// Copyright 2016, Jake Archibald\n//\n// Licensed under the Apache License, Version 2.0 (the \"License\");\n// you may not use this file except in compliance with the License.\n// You may obtain a copy of the License at\n//\n//   http://www.apache.org/licenses/LICENSE-2.0\n//\n// Unless required by applicable law or agreed to in writing, software\n// distributed under the License is distributed on an \"AS IS\" BASIS,\n// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n// See the License for the specific language governing permissions and\n// limitations under the License.\n\ntype Store = <T>(callback: (store: IDBObjectStore) => T | PromiseLike<T>) => Promise<T>;\n\nfunction promisifyRequest<T = undefined>(request: IDBRequest<T> | IDBTransaction): Promise<T> {\n  return new Promise<T>((resolve, reject) => {\n    // @ts-expect-error - file size hacks\n    request.oncomplete = request.onsuccess = () => resolve(request.result);\n    // @ts-expect-error - file size hacks\n    request.onabort = request.onerror = () => reject(request.error);\n  });\n}\n\n/** Create or open an IndexedDb store */\nexport function createStore(dbName: string, storeName: string): Store {\n  const request = indexedDB.open(dbName);\n  request.onupgradeneeded = () => request.result.createObjectStore(storeName);\n  const dbp = promisifyRequest(request);\n\n  return callback => dbp.then(db => callback(db.transaction(storeName, 'readwrite').objectStore(storeName)));\n}\n\nfunction keys(store: IDBObjectStore): Promise<number[]> {\n  return promisifyRequest(store.getAllKeys() as IDBRequest<number[]>);\n}\n\n/** Insert into the end of the store */\nexport function push(store: Store, value: Uint8Array | string, maxQueueSize: number): Promise<void> {\n  return store(store => {\n    return keys(store).then(keys => {\n      if (keys.length >= maxQueueSize) {\n        return;\n      }\n\n      // We insert with an incremented key so that the entries are popped in order\n      store.put(value, Math.max(...keys, 0) + 1);\n      return promisifyRequest(store.transaction);\n    });\n  });\n}\n\n/** Insert into the front of the store */\nexport function unshift(store: Store, value: Uint8Array | string, maxQueueSize: number): Promise<void> {\n  return store(store => {\n    return keys(store).then(keys => {\n      if (keys.length >= maxQueueSize) {\n        return;\n      }\n\n      // We insert with an decremented key so that the entries are popped in order\n      store.put(value, Math.min(...keys, 0) - 1);\n      return promisifyRequest(store.transaction);\n    });\n  });\n}\n\n/** Pop the oldest value from the store */\nexport function shift(store: Store): Promise<Uint8Array | string | undefined> {\n  return store(store => {\n    return keys(store).then(keys => {\n      const firstKey = keys[0];\n      if (firstKey == null) {\n        return undefined;\n      }\n\n      return promisifyRequest(store.get(firstKey)).then(value => {\n        store.delete(firstKey);\n        return promisifyRequest(store.transaction).then(() => value);\n      });\n    });\n  });\n}\n\nexport interface BrowserOfflineTransportOptions extends Omit<OfflineTransportOptions, 'createStore'> {\n  /**\n   * Name of indexedDb database to store envelopes in\n   * Default: 'sentry-offline'\n   */\n  dbName?: string;\n  /**\n   * Name of indexedDb object store to store envelopes in\n   * Default: 'queue'\n   */\n  storeName?: string;\n  /**\n   * Maximum number of envelopes to store\n   * Default: 30\n   */\n  maxQueueSize?: number;\n}\n\nfunction createIndexedDbStore(options: BrowserOfflineTransportOptions): OfflineStore {\n  let store: Store | undefined;\n\n  // Lazily create the store only when it's needed\n  function getStore(): Store {\n    if (store == undefined) {\n      store = createStore(options.dbName || 'sentry-offline', options.storeName || 'queue');\n    }\n\n    return store;\n  }\n\n  return {\n    push: async (env: Envelope) => {\n      try {\n        const serialized = serializeEnvelope(env);\n        await push(getStore(), serialized, options.maxQueueSize || 30);\n      } catch {\n        //\n      }\n    },\n    unshift: async (env: Envelope) => {\n      try {\n        const serialized = serializeEnvelope(env);\n        await unshift(getStore(), serialized, options.maxQueueSize || 30);\n      } catch {\n        //\n      }\n    },\n    shift: async () => {\n      try {\n        const deserialized = await shift(getStore());\n        if (deserialized) {\n          return parseEnvelope(deserialized);\n        }\n      } catch {\n        //\n      }\n\n      return undefined;\n    },\n  };\n}\n\nfunction makeIndexedDbOfflineTransport<T>(\n  createTransport: (options: T) => Transport,\n): (options: T & BrowserOfflineTransportOptions) => Transport {\n  return options => {\n    const transport = createTransport({ ...options, createStore: createIndexedDbStore });\n\n    WINDOW.addEventListener('online', async _ => {\n      await transport.flush();\n    });\n\n    return transport;\n  };\n}\n\n/**\n * Creates a transport that uses IndexedDb to store events when offline.\n */\nexport function makeBrowserOfflineTransport<T extends BaseTransportOptions>(\n  createTransport: (options: T) => Transport = makeFetchTransport,\n): (options: T & BrowserOfflineTransportOptions) => Transport {\n  return makeIndexedDbOfflineTransport<T>(makeOfflineTransport(createTransport));\n}\n","import type { DsnComponents, EventEnvelope, SdkMetadata, UserFeedback, UserFeedbackItem } from '@sentry/core/browser';\nimport { createEnvelope, dsnToString } from '@sentry/core/browser';\n\n/**\n * Creates an envelope from a user feedback.\n */\nexport function createUserFeedbackEnvelope(\n  feedback: UserFeedback,\n  {\n    metadata,\n    tunnel,\n    dsn,\n  }: {\n    metadata: SdkMetadata | undefined;\n    tunnel: string | undefined;\n    dsn: DsnComponents | undefined;\n  },\n): EventEnvelope {\n  const headers: EventEnvelope[0] = {\n    event_id: feedback.event_id,\n    sent_at: new Date().toISOString(),\n    ...(metadata?.sdk && {\n      sdk: {\n        name: metadata.sdk.name,\n        version: metadata.sdk.version,\n      },\n    }),\n    ...(!!tunnel && !!dsn && { dsn: dsnToString(dsn) }),\n  };\n  const item = createUserFeedbackEnvelopeItem(feedback);\n\n  return createEnvelope(headers, [item]);\n}\n\nfunction createUserFeedbackEnvelopeItem(feedback: UserFeedback): UserFeedbackItem {\n  const feedbackHeaders: UserFeedbackItem[0] = {\n    type: 'user_report',\n  };\n  return [feedbackHeaders, feedback];\n}\n","import { consoleSandbox, getLocationHref } from '@sentry/core/browser';\nimport { DEBUG_BUILD } from '../debug-build';\nimport { WINDOW } from '../helpers';\n\ntype ExtensionRuntime = {\n  runtime?: {\n    id?: string;\n  };\n};\ntype ExtensionProperties = {\n  chrome?: ExtensionRuntime;\n  browser?: ExtensionRuntime;\n  nw?: unknown;\n};\n\n/**\n * Returns true if the SDK is running in an embedded browser extension.\n * Stand-alone browser extensions (which do not share the same data as the main browser page) are fine.\n */\nexport function checkAndWarnIfIsEmbeddedBrowserExtension(): boolean {\n  if (_isEmbeddedBrowserExtension()) {\n    if (DEBUG_BUILD) {\n      consoleSandbox(() => {\n        // eslint-disable-next-line no-console\n        console.error(\n          '[Sentry] You cannot use Sentry.init() in a browser extension, see: https://docs.sentry.io/platforms/javascript/best-practices/browser-extensions/',\n        );\n      });\n    }\n\n    return true;\n  }\n\n  return false;\n}\n\nfunction _isEmbeddedBrowserExtension(): boolean {\n  if (typeof WINDOW.window === 'undefined') {\n    // No need to show the error if we're not in a browser window environment (e.g. service workers)\n    return false;\n  }\n\n  const _window = WINDOW as typeof WINDOW & ExtensionProperties;\n\n  // Running the SDK in NW.js, which appears like a browser extension but isn't, is also fine\n  // see: https://github.com/getsentry/sentry-javascript/issues/12668\n  if (_window.nw) {\n    return false;\n  }\n\n  const extensionObject = _window['chrome'] || _window['browser'];\n\n  if (!extensionObject?.runtime?.id) {\n    return false;\n  }\n\n  const href = getLocationHref();\n\n  // Running the SDK in a dedicated extension page and calling Sentry.init is fine; no risk of data leakage\n  const isDedicatedExtensionPage =\n    WINDOW === WINDOW.top &&\n    /^(?:chrome-extension|moz-extension|ms-browser-extension|safari-web-extension):\\/\\//.test(href);\n\n  return !isDedicatedExtensionPage;\n}\n","import type { IntegrationFn } from '@sentry/core/browser';\nimport { getClient, SDK_VERSION } from '@sentry/core/browser';\nimport type { BrowserClient } from '../client';\nimport { WINDOW } from '../helpers';\n\n// Single source of truth: as const array provides both the runtime list and the type.\n// Bundle file names are derived: strip 'Integration' suffix, lowercase.\n// Exceptions (hyphenated bundle names) are listed in HYPHENATED_BUNDLES.\nconst LAZY_LOADABLE_NAMES = [\n  'replayIntegration',\n  'replayCanvasIntegration',\n  'feedbackIntegration',\n  'feedbackModalIntegration',\n  'feedbackScreenshotIntegration',\n  'captureConsoleIntegration',\n  'contextLinesIntegration',\n  'linkedErrorsIntegration',\n  'dedupeIntegration',\n  'extraErrorDataIntegration',\n  'graphqlClientIntegration',\n  'httpClientIntegration',\n  'reportingObserverIntegration',\n  'rewriteFramesIntegration',\n  'browserProfilingIntegration',\n  'moduleMetadataIntegration',\n  'instrumentAnthropicAiClient',\n  'instrumentOpenAiClient',\n  'instrumentGoogleGenAIClient',\n  'instrumentStateGraph',\n  'instrumentLangGraph',\n  'createLangChainCallbackHandler',\n  'instrumentLangChainEmbeddings',\n] as const;\n\ntype ElementOf<T extends readonly unknown[]> = T[number];\ntype LazyLoadableIntegrationName = ElementOf<typeof LAZY_LOADABLE_NAMES>;\n\nconst HYPHENATED_BUNDLES: Partial<Record<LazyLoadableIntegrationName, string>> = {\n  replayCanvasIntegration: 'replay-canvas',\n  feedbackModalIntegration: 'feedback-modal',\n  feedbackScreenshotIntegration: 'feedback-screenshot',\n};\n\nfunction getBundleName(name: string): string {\n  return HYPHENATED_BUNDLES[name as LazyLoadableIntegrationName] || name.replace('Integration', '').toLowerCase();\n}\n\nconst WindowWithMaybeIntegration = WINDOW as {\n  Sentry?: Partial<Record<LazyLoadableIntegrationName, IntegrationFn>>;\n};\n\n/**\n * Lazy load an integration from the CDN.\n * Rejects if the integration cannot be loaded.\n */\nexport async function lazyLoadIntegration(\n  name: LazyLoadableIntegrationName,\n  scriptNonce?: string,\n): Promise<IntegrationFn> {\n  const bundle = LAZY_LOADABLE_NAMES.includes(name) ? getBundleName(name) : undefined;\n\n  // `window.Sentry` is only set when using a CDN bundle, but this method can also be used via the NPM package\n  const sentryOnWindow = (WindowWithMaybeIntegration.Sentry = WindowWithMaybeIntegration.Sentry || {});\n\n  if (!bundle) {\n    throw new Error(`Cannot lazy load integration: ${name}`);\n  }\n\n  // Bail if the integration already exists\n  const existing = sentryOnWindow[name];\n  // The `feedbackIntegration` is loaded by default in the CDN bundles,\n  // so we need to differentiate between the real integration and the shim.\n  // if only the shim exists, we still want to lazy load the real integration.\n  if (typeof existing === 'function' && !('_isShim' in existing)) {\n    return existing;\n  }\n\n  const url = getScriptURL(bundle);\n  const script = WINDOW.document.createElement('script');\n  script.src = url;\n  script.crossOrigin = 'anonymous';\n  script.referrerPolicy = 'strict-origin';\n\n  if (scriptNonce) {\n    script.setAttribute('nonce', scriptNonce);\n  }\n\n  const waitForLoad = new Promise<void>((resolve, reject) => {\n    script.addEventListener('load', () => resolve());\n    script.addEventListener('error', reject);\n  });\n\n  const currentScript = WINDOW.document.currentScript;\n  const parent = WINDOW.document.body || WINDOW.document.head || currentScript?.parentElement;\n\n  if (parent) {\n    parent.appendChild(script);\n  } else {\n    throw new Error(`Could not find parent element to insert lazy-loaded ${name} script`);\n  }\n\n  try {\n    await waitForLoad;\n  } catch {\n    throw new Error(`Error when loading integration: ${name}`);\n  }\n\n  const integrationFn = sentryOnWindow[name];\n\n  if (typeof integrationFn !== 'function') {\n    throw new Error(`Could not load integration: ${name}`);\n  }\n\n  return integrationFn;\n}\n\nfunction getScriptURL(bundle: string): string {\n  const client = getClient<BrowserClient>();\n  const baseURL = client?.getOptions()?.cdnBaseUrl || 'https://browser.sentry-cdn.com';\n\n  return new URL(`/${SDK_VERSION}/${bundle}.min.js`, baseURL).toString();\n}\n","import type { ReportDialogOptions } from './report-dialog';\nimport type { DsnComponents, DsnLike } from './types/dsn';\nimport type { SdkInfo } from './types/sdkinfo';\nimport { dsnToString, makeDsn } from './utils/dsn';\n\nexport const SENTRY_API_VERSION = '7';\n\n/** Returns the prefix to construct Sentry ingestion API endpoints. */\nfunction getBaseApiEndpoint(dsn: DsnComponents): string {\n  const protocol = dsn.protocol ? `${dsn.protocol}:` : '';\n  const port = dsn.port ? `:${dsn.port}` : '';\n  return `${protocol}//${dsn.host}${port}${dsn.path ? `/${dsn.path}` : ''}/api/`;\n}\n\n/** Returns the ingest API endpoint for target. */\nfunction _getIngestEndpoint(dsn: DsnComponents): string {\n  return `${getBaseApiEndpoint(dsn)}${dsn.projectId}/envelope/`;\n}\n\n/** Returns a URL-encoded string with auth config suitable for a query string. */\nfunction _encodedAuth(dsn: DsnComponents, sdkInfo: SdkInfo | undefined): string {\n  const params: Record<string, string> = {\n    sentry_version: SENTRY_API_VERSION,\n  };\n\n  if (dsn.publicKey) {\n    // We send only the minimum set of required information. See\n    // https://github.com/getsentry/sentry-javascript/issues/2572.\n    params.sentry_key = dsn.publicKey;\n  }\n\n  if (sdkInfo) {\n    params.sentry_client = `${sdkInfo.name}/${sdkInfo.version}`;\n  }\n\n  return new URLSearchParams(params).toString();\n}\n\n/**\n * Returns the envelope endpoint URL with auth in the query string.\n *\n * Sending auth as part of the query string and not as custom HTTP headers avoids CORS preflight requests.\n */\nexport function getEnvelopeEndpointWithUrlEncodedAuth(dsn: DsnComponents, tunnel?: string, sdkInfo?: SdkInfo): string {\n  return tunnel ? tunnel : `${_getIngestEndpoint(dsn)}?${_encodedAuth(dsn, sdkInfo)}`;\n}\n\n/** Returns the url to the report dialog endpoint. */\nexport function getReportDialogEndpoint(dsnLike: DsnLike, dialogOptions: ReportDialogOptions): string {\n  const dsn = makeDsn(dsnLike);\n  if (!dsn) {\n    return '';\n  }\n\n  const endpoint = `${getBaseApiEndpoint(dsn)}embed/error-page/`;\n\n  let encodedOptions = `dsn=${dsnToString(dsn)}`;\n  for (const key in dialogOptions) {\n    if (key === 'dsn') {\n      continue;\n    }\n\n    if (key === 'onClose') {\n      continue;\n    }\n\n    if (key === 'user') {\n      const user = dialogOptions.user;\n      if (!user) {\n        continue;\n      }\n      if (user.name) {\n        encodedOptions += `&name=${encodeURIComponent(user.name)}`;\n      }\n      if (user.email) {\n        encodedOptions += `&email=${encodeURIComponent(user.email)}`;\n      }\n    } else {\n      encodedOptions += `&${encodeURIComponent(key)}=${encodeURIComponent(dialogOptions[key] as string)}`;\n    }\n  }\n\n  return `${endpoint}?${encodedOptions}`;\n}\n","import type { Carrier } from './../carrier';\nimport { getMainCarrier, getSentryCarrier } from './../carrier';\nimport { getStackAsyncContextStrategy } from './stackStrategy';\nimport type { AsyncContextStrategy } from './types';\n\n/**\n * @private Private API with no semver guarantees!\n *\n * Sets the global async context strategy\n */\nexport function setAsyncContextStrategy(strategy: AsyncContextStrategy | undefined): void {\n  // Get main carrier (global for every environment)\n  const registry = getMainCarrier();\n  const sentry = getSentryCarrier(registry);\n  sentry.acs = strategy;\n}\n\n/**\n * Get the current async context strategy.\n * If none has been setup, the default will be used.\n */\nexport function getAsyncContextStrategy(carrier: Carrier): AsyncContextStrategy {\n  const sentry = getSentryCarrier(carrier);\n\n  if (sentry.acs) {\n    return sentry.acs;\n  }\n\n  // Otherwise, use the default one (stack)\n  return getStackAsyncContextStrategy();\n}\n","import type { Client } from '../client';\nimport { getDefaultCurrentScope, getDefaultIsolationScope } from '../defaultScopes';\nimport { Scope } from '../scope';\nimport { chainAndCopyPromiseLike } from '../utils/chain-and-copy-promiselike';\nimport { isThenable } from '../utils/is';\nimport { getMainCarrier, getSentryCarrier } from './../carrier';\nimport type { AsyncContextStrategy } from './types';\n\ninterface Layer {\n  client?: Client;\n  scope: Scope;\n}\n\n/**\n * This is an object that holds a stack of scopes.\n */\nexport class AsyncContextStack {\n  private readonly _stack: [Layer, ...Layer[]];\n  private _isolationScope: Scope;\n\n  public constructor(scope?: Scope, isolationScope?: Scope) {\n    let assignedScope;\n    if (!scope) {\n      assignedScope = new Scope();\n    } else {\n      assignedScope = scope;\n    }\n\n    let assignedIsolationScope;\n    if (!isolationScope) {\n      assignedIsolationScope = new Scope();\n    } else {\n      assignedIsolationScope = isolationScope;\n    }\n\n    // scope stack for domains or the process\n    this._stack = [{ scope: assignedScope }];\n    this._isolationScope = assignedIsolationScope;\n  }\n\n  /**\n   * Fork a scope for the stack.\n   */\n  public withScope<T>(callback: (scope: Scope) => T): T {\n    const scope = this._pushScope();\n\n    let maybePromiseResult: T;\n    try {\n      maybePromiseResult = callback(scope);\n    } catch (e) {\n      this._popScope();\n      throw e;\n    }\n\n    if (isThenable(maybePromiseResult)) {\n      return chainAndCopyPromiseLike(\n        maybePromiseResult as PromiseLike<Awaited<typeof maybePromiseResult>> & Record<string, unknown>,\n        () => this._popScope(),\n        () => this._popScope(),\n      ) as T;\n    }\n\n    this._popScope();\n    return maybePromiseResult;\n  }\n\n  /**\n   * Get the client of the stack.\n   */\n  public getClient<C extends Client>(): C | undefined {\n    return this.getStackTop().client as C;\n  }\n\n  /**\n   * Returns the scope of the top stack.\n   */\n  public getScope(): Scope {\n    return this.getStackTop().scope;\n  }\n\n  /**\n   * Get the isolation scope for the stack.\n   */\n  public getIsolationScope(): Scope {\n    return this._isolationScope;\n  }\n\n  /**\n   * Returns the topmost scope layer in the order domain > local > process.\n   */\n  public getStackTop(): Layer {\n    return this._stack[this._stack.length - 1] as Layer;\n  }\n\n  /**\n   * Push a scope to the stack.\n   */\n  private _pushScope(): Scope {\n    // We want to clone the content of prev scope\n    const scope = this.getScope().clone();\n    this._stack.push({\n      client: this.getClient(),\n      scope,\n    });\n    return scope;\n  }\n\n  /**\n   * Pop a scope from the stack.\n   */\n  private _popScope(): boolean {\n    if (this._stack.length <= 1) return false;\n    return !!this._stack.pop();\n  }\n}\n\n/**\n * Get the global async context stack.\n * This will be removed during the v8 cycle and is only here to make migration easier.\n */\nfunction getAsyncContextStack(): AsyncContextStack {\n  const registry = getMainCarrier();\n  const sentry = getSentryCarrier(registry);\n\n  return (sentry.stack = sentry.stack || new AsyncContextStack(getDefaultCurrentScope(), getDefaultIsolationScope()));\n}\n\nfunction withScope<T>(callback: (scope: Scope) => T): T {\n  return getAsyncContextStack().withScope(callback);\n}\n\nfunction withSetScope<T>(scope: Scope, callback: (scope: Scope) => T): T {\n  const stack = getAsyncContextStack();\n  return stack.withScope(() => {\n    stack.getStackTop().scope = scope;\n    return callback(scope);\n  });\n}\n\nfunction withIsolationScope<T>(callback: (isolationScope: Scope) => T): T {\n  return getAsyncContextStack().withScope(() => {\n    return callback(getAsyncContextStack().getIsolationScope());\n  });\n}\n\n/**\n * Get the stack-based async context strategy.\n */\nexport function getStackAsyncContextStrategy(): AsyncContextStrategy {\n  return {\n    withIsolationScope,\n    withScope,\n    withSetScope,\n    withSetIsolationScope: <T>(_isolationScope: Scope, callback: (isolationScope: Scope) => T) => {\n      return withIsolationScope(callback);\n    },\n    getCurrentScope: () => getAsyncContextStack().getScope(),\n    getIsolationScope: () => getAsyncContextStack().getIsolationScope(),\n  };\n}\n","import { getMainCarrier } from '../carrier';\nimport type { Scope } from '../scope';\nimport { _setSpanForScope } from '../utils/spanOnScope';\nimport { safeUnref } from '../utils/timer';\nimport { getAsyncContextStrategy } from './index';\nimport type { TracingChannelBinding } from './types';\n\n/**\n * Execute a callback whenever the tracing channel binding is available.\n * If it is not available after retry, the callback is not executed.\n */\nexport function waitForTracingChannelBinding(callback: () => void, retries = 1): void {\n  const binding = getAsyncContextStrategy(getMainCarrier()).getTracingChannelBinding?.();\n\n  if (binding) {\n    callback();\n    return;\n  }\n\n  if (!retries) {\n    return;\n  }\n\n  // It is possible that the binding is not available yet when this is initially called\n  // This happens when users use a custom OTEL setup\n  // In this case, we wait for a tick and try again afterwards\n  // If it still fails, we bail and do nothing\n  // `safeUnref` so this retry timer never keeps the process alive on its own (Node server runtimes).\n  safeUnref(\n    setTimeout(() => {\n      waitForTracingChannelBinding(callback, retries - 1);\n    }, 1),\n  );\n}\n\n/**\n * Build the default {@link TracingChannelBinding} shared by AsyncLocalStorage-based strategies.\n *\n * The ALS instance is supplied by the caller (kept as `unknown`).\n * The binding clones the current scope, plants the span on it, and reuses the existing isolation scope.\n *\n * The OpenTelemetry strategy does not use this: its store value is an OTel context, not a\n * `{ scope, isolationScope }` pair.\n */\nexport function _INTERNAL_createTracingChannelBinding(\n  asyncLocalStorage: NonNullable<unknown>,\n  getScopes: () => { scope: Scope; isolationScope: Scope },\n): TracingChannelBinding {\n  return {\n    asyncLocalStorage,\n    getStoreWithActiveSpan: span => {\n      const { scope, isolationScope } = getScopes();\n      const activeScope = scope.clone();\n      _setSpanForScope(activeScope, span);\n\n      return { scope: activeScope, isolationScope };\n    },\n  };\n}\n","import type { DurationUnit, FractionUnit, InformationUnit } from './types/measurement';\nimport type { Primitive } from './types/misc';\nimport { isPrimitive } from './utils/is';\n\nexport type RawAttributes<T> = T & ValidatedAttributes<T>;\n// eslint-disable-next-line @typescript-eslint/no-explicit-any\nexport type RawAttribute<T> = T extends { value: any } | { unit: any } ? AttributeObject : T;\n\nexport type Attributes = Record<string, TypedAttributeValue>;\n\nexport type AttributeValueType = string | number | boolean | Array<string> | Array<number> | Array<boolean>;\n\ntype AttributeTypeMap = {\n  string: string;\n  integer: number;\n  double: number;\n  boolean: boolean;\n  array: Array<string> | Array<number> | Array<boolean>;\n};\n\n/* Generates a type from the AttributeTypeMap like:\n  | { value: string; type: 'string' }\n  | { value: number; type: 'integer' }\n  | { value: number; type: 'double' }\n */\ntype AttributeUnion = {\n  [K in keyof AttributeTypeMap]: {\n    value: AttributeTypeMap[K];\n    type: K;\n  };\n}[keyof AttributeTypeMap];\n\nexport type TypedAttributeValue = AttributeUnion & { unit?: AttributeUnit };\n\nexport type AttributeObject = {\n  value: unknown;\n  unit?: AttributeUnit;\n};\n\n// Unfortunately, we loose type safety if we did something like Exclude<MeasurementUnit, string>\n// so therefore we unionize between the three supported unit categories.\ntype AttributeUnit = DurationUnit | InformationUnit | FractionUnit;\n\n/* If an attribute has either a 'value' or 'unit' property, we use the ValidAttributeObject type. */\nexport type ValidatedAttributes<T> = {\n  // eslint-disable-next-line @typescript-eslint/no-explicit-any\n  [K in keyof T]: T[K] extends { value: any } | { unit: any } ? AttributeObject : unknown;\n};\n\n/**\n * Type-guard: The attribute object has the shape the official attribute object (value, type, unit).\n * https://develop.sentry.dev/sdk/telemetry/scopes/#setting-attributes\n */\nexport function isAttributeObject(maybeObj: unknown): maybeObj is AttributeObject {\n  return (\n    typeof maybeObj === 'object' &&\n    maybeObj != null &&\n    !Array.isArray(maybeObj) &&\n    Object.keys(maybeObj).includes('value')\n  );\n}\n\n/**\n * Converts an attribute value to a typed attribute value.\n *\n * For now, we support primitive values and arrays, either raw or inside attribute objects.\n * If @param useFallback is true, we stringify other non-primitive values to a string attribute\n * value. Otherwise we return `undefined` for unsupported values.\n *\n * @param value - The value of the passed attribute.\n * @param useFallback - If true, unsupported values will be stringified to a string attribute value.\n *                      Defaults to false. In this case, `undefined` is returned for unsupported values.\n * @returns The typed attribute.\n */\nexport function attributeValueToTypedAttributeValue(\n  rawValue: unknown,\n  useFallback?: boolean | 'skip-undefined',\n): TypedAttributeValue | void {\n  const { value, unit } = isAttributeObject(rawValue) ? rawValue : { value: rawValue, unit: undefined };\n  const attributeValue = getTypedAttributeValue(value);\n  const checkedUnit = unit && typeof unit === 'string' ? { unit } : {};\n  if (attributeValue) {\n    return { ...attributeValue, ...checkedUnit };\n  }\n\n  if (!useFallback || (useFallback === 'skip-undefined' && value === undefined)) {\n    return;\n  }\n\n  // Fallback: stringify the value\n  // TODO(v11): be smarter here and use String constructor if stringify fails\n  // (this is a breaking change for already existing attribute values)\n  let stringValue = '';\n  try {\n    stringValue = JSON.stringify(value) ?? '';\n  } catch {\n    // Do nothing\n  }\n  return {\n    value: stringValue,\n    type: 'string',\n    ...checkedUnit,\n  };\n}\n\n/**\n * Serializes raw attributes to typed attributes as expected in our envelopes.\n *\n * @param attributes The raw attributes to serialize.\n * @param fallback   If true, unsupported values will be stringified to a string attribute value.\n *                   Defaults to false. In this case, `undefined` is returned for unsupported values.\n *\n * @returns The serialized attributes.\n */\nexport function serializeAttributes<T>(\n  attributes: RawAttributes<T> | undefined,\n  fallback: boolean | 'skip-undefined' = false,\n): Attributes {\n  const serializedAttributes: Attributes = {};\n  for (const [key, value] of Object.entries(attributes ?? {})) {\n    const typedValue = attributeValueToTypedAttributeValue(value, fallback);\n    if (typedValue) {\n      serializedAttributes[key] = typedValue;\n    }\n  }\n  return serializedAttributes;\n}\n\n/**\n * Estimates the serialized byte size of {@link Attributes},\n * with a couple of heuristics for performance.\n */\nexport function estimateTypedAttributesSizeInBytes(attributes: Attributes | undefined): number {\n  if (!attributes) {\n    return 0;\n  }\n  let weight = 0;\n  for (const [key, attr] of Object.entries(attributes)) {\n    weight += key.length * 2;\n    weight += attr.type.length * 2;\n    weight += (attr.unit?.length ?? 0) * 2;\n    const val = attr.value;\n\n    if (Array.isArray(val)) {\n      // Assumption: Individual array items have the same type and roughly the same size\n      // probably not always true but allows us to cut down on runtime\n      weight += estimatePrimitiveSizeInBytes(val[0]) * val.length;\n    } else if (isPrimitive(val)) {\n      weight += estimatePrimitiveSizeInBytes(val);\n    } else {\n      // default fallback for anything else (objects)\n      weight += 100;\n    }\n  }\n  return weight;\n}\n\nfunction estimatePrimitiveSizeInBytes(value: Primitive): number {\n  if (typeof value === 'string') {\n    return value.length * 2;\n  } else if (typeof value === 'boolean') {\n    return 4;\n  } else if (typeof value === 'number') {\n    return 8;\n  }\n  return 0;\n}\n\n/**\n * NOTE: We return typed attributes for primitives and arrays:\n *  - Relay currently only supports arrays consisting of primitive values. Attributes with non-conforming arrays are dropped by Relay, so runtime type validation in the SDK is unnecessary.\n *  - Objects are not supported yet and product support is still TBD.\n */\nfunction getTypedAttributeValue(value: unknown): TypedAttributeValue | void {\n  if (Array.isArray(value)) {\n    return { value, type: 'array' };\n  }\n\n  const primitiveType =\n    typeof value === 'string'\n      ? 'string'\n      : typeof value === 'boolean'\n        ? 'boolean'\n        : typeof value === 'number' && !Number.isNaN(value)\n          ? Number.isInteger(value)\n            ? 'integer'\n            : 'double'\n          : null;\n  if (primitiveType) {\n    // @ts-expect-error - TS complains because {@link TypedAttributeValue} is strictly typed to\n    // avoid setting the wrong `type` on the attribute value.\n    // In this case, getPrimitiveType already does the check but TS doesn't know that.\n    // The \"clean\" alternative is to return an object per `typeof value` case\n    // but that would require more bundle size\n    // Therefore, we ignore it.\n    return { value, type: primitiveType };\n  }\n}\n","import { getClient, getIsolationScope } from './currentScopes';\nimport type { Breadcrumb, BreadcrumbHint } from './types/breadcrumb';\nimport { consoleSandbox } from './utils/debug-logger';\nimport { dateTimestampInSeconds } from './utils/time';\n\n/**\n * Default maximum number of breadcrumbs added to an event. Can be overwritten\n * with {@link Options.maxBreadcrumbs}.\n */\nconst DEFAULT_BREADCRUMBS = 100;\n\n/**\n * Records a new breadcrumb which will be attached to future events.\n *\n * Breadcrumbs will be added to subsequent events to provide more context on\n * user's actions prior to an error or crash.\n */\nexport function addBreadcrumb(breadcrumb: Breadcrumb, hint?: BreadcrumbHint): void {\n  const client = getClient();\n  const isolationScope = getIsolationScope();\n\n  if (!client) return;\n\n  const { beforeBreadcrumb = null, maxBreadcrumbs = DEFAULT_BREADCRUMBS } = client.getOptions();\n\n  if (maxBreadcrumbs <= 0) return;\n\n  const timestamp = dateTimestampInSeconds();\n  const mergedBreadcrumb = { timestamp, ...breadcrumb };\n  const finalBreadcrumb = beforeBreadcrumb\n    ? consoleSandbox(() => beforeBreadcrumb(mergedBreadcrumb, hint))\n    : mergedBreadcrumb;\n\n  if (finalBreadcrumb === null) return;\n\n  if (client.emit) {\n    client.emit('beforeAddBreadcrumb', finalBreadcrumb, hint);\n  }\n\n  isolationScope.addBreadcrumb(finalBreadcrumb, maxBreadcrumbs);\n}\n","import type { AsyncContextStack } from './asyncContext/stackStrategy';\nimport type { AsyncContextStrategy } from './asyncContext/types';\nimport type { Client } from './client';\nimport type { Scope } from './scope';\nimport type { SegmentSpanCaptureStrategy } from './tracing/segmentSpanCaptureStrategy';\nimport type { SerializedLog } from './types/log';\nimport type { SerializedMetric } from './types/metric';\nimport { SDK_VERSION } from './utils/version';\nimport { GLOBAL_OBJ } from './utils/worldwide';\n\n/**\n * An object that contains globally accessible properties and maintains a scope stack.\n * @hidden\n */\nexport interface Carrier {\n  __SENTRY__?: VersionedCarrier;\n}\n\ntype VersionedCarrier = {\n  version?: string;\n} & Record<Exclude<string, 'version'>, SentryCarrier>;\n\nexport interface SentryCarrier {\n  acs?: AsyncContextStrategy;\n  stack?: AsyncContextStack;\n\n  globalScope?: Scope;\n  defaultIsolationScope?: Scope;\n  defaultCurrentScope?: Scope;\n  loggerSettings?: { enabled: boolean };\n  /**\n   * A map of Sentry clients to their log buffers.\n   * This is used to store logs that are sent to Sentry.\n   */\n  clientToLogBufferMap?: WeakMap<Client, Array<SerializedLog>>;\n\n  /**\n   * A map of Sentry clients to their metric buffers.\n   * This is used to store metrics that are sent to Sentry.\n   */\n  clientToMetricBufferMap?: WeakMap<Client, Array<SerializedMetric>>;\n\n  /** Strategy for assembling segment spans into transactions; set by SDKs that defer capture. */\n  segmentSpanCaptureStrategy?: SegmentSpanCaptureStrategy;\n\n  /** Overwrites TextEncoder used in `@sentry/core`, need for `react-native@0.73` and older */\n  encodePolyfill?: (input: string) => Uint8Array;\n  /** Overwrites TextDecoder used in `@sentry/core`, need for `react-native@0.73` and older */\n  decodePolyfill?: (input: Uint8Array) => string;\n}\n\n/**\n * Returns the global shim registry.\n *\n * FIXME: This function is problematic, because despite always returning a valid Carrier,\n * it has an optional `__SENTRY__` property, which then in turn requires us to always perform an unnecessary check\n * at the call-site. We always access the carrier through this function, so we can guarantee that `__SENTRY__` is there.\n **/\nexport function getMainCarrier(): Carrier {\n  // This ensures a Sentry carrier exists\n  getSentryCarrier(GLOBAL_OBJ);\n  return GLOBAL_OBJ;\n}\n\n/** Will either get the existing sentry carrier, or create a new one. */\nexport function getSentryCarrier(carrier: Carrier): SentryCarrier {\n  const __SENTRY__ = (carrier.__SENTRY__ = carrier.__SENTRY__ || {});\n\n  // For now: First SDK that sets the .version property wins\n  __SENTRY__.version = __SENTRY__.version || SDK_VERSION;\n\n  // Intentionally populating and returning the version of \"this\" SDK instance\n  // rather than what's set in .version so that \"this\" SDK always gets its carrier\n  return (__SENTRY__[SDK_VERSION] = __SENTRY__[SDK_VERSION] || {});\n}\n\n/**\n * Returns a global singleton contained in the global `__SENTRY__[]` object.\n *\n * If the singleton doesn't already exist in `__SENTRY__`, it will be created using the given factory\n * function and added to the `__SENTRY__` object.\n *\n * @param name name of the global singleton on __SENTRY__\n * @param creator creator Factory function to create the singleton if it doesn't already exist on `__SENTRY__`\n * @param obj (Optional) The global object on which to look for `__SENTRY__`, if not `GLOBAL_OBJ`'s return value\n * @returns the singleton\n */\nexport function getGlobalSingleton<Prop extends keyof SentryCarrier>(\n  name: Prop,\n  creator: () => NonNullable<SentryCarrier[Prop]>,\n  obj = GLOBAL_OBJ,\n): NonNullable<SentryCarrier[Prop]> {\n  const __SENTRY__ = (obj.__SENTRY__ = obj.__SENTRY__ || {});\n  const carrier = (__SENTRY__[SDK_VERSION] = __SENTRY__[SDK_VERSION] || {});\n  // Note: We do not want to set `carrier.version` here, as this may be called before any `init` is called, e.g. for the default scopes\n  return carrier[name] || (carrier[name] = creator());\n}\n","import type { SerializedCheckIn } from './types/checkin';\nimport type { DsnComponents } from './types/dsn';\nimport type { CheckInEnvelope, CheckInItem, DynamicSamplingContext } from './types/envelope';\nimport type { SdkMetadata } from './types/sdkmetadata';\nimport { dsnToString } from './utils/dsn';\nimport { createEnvelope } from './utils/envelope';\nimport { safeDateNow } from './utils/randomSafeContext';\n\n/**\n * Create envelope from check in item.\n */\nexport function createCheckInEnvelope(\n  checkIn: SerializedCheckIn,\n  dynamicSamplingContext?: Partial<DynamicSamplingContext>,\n  metadata?: SdkMetadata,\n  tunnel?: string,\n  dsn?: DsnComponents,\n): CheckInEnvelope {\n  const headers: CheckInEnvelope[0] = {\n    sent_at: new Date(safeDateNow()).toISOString(),\n  };\n\n  if (metadata?.sdk) {\n    headers.sdk = {\n      name: metadata.sdk.name,\n      version: metadata.sdk.version,\n    };\n  }\n\n  if (!!tunnel && !!dsn) {\n    headers.dsn = dsnToString(dsn);\n  }\n\n  if (dynamicSamplingContext) {\n    headers.trace = dynamicSamplingContext as DynamicSamplingContext;\n  }\n\n  const item = createCheckInEnvelopeItem(checkIn);\n  return createEnvelope<CheckInEnvelope>(headers, [item]);\n}\n\nfunction createCheckInEnvelopeItem(checkIn: SerializedCheckIn): CheckInItem {\n  const checkInHeaders: CheckInItem[0] = {\n    type: 'check_in',\n  };\n  return [checkInHeaders, checkIn];\n}\n","export const DEFAULT_ENVIRONMENT = 'production';\nexport const DEV_ENVIRONMENT = 'development';\n","import { getAsyncContextStrategy } from './asyncContext';\nimport { getGlobalSingleton, getMainCarrier } from './carrier';\nimport type { Client } from './client';\nimport { Scope } from './scope';\nimport type { TraceContext } from './types/context';\nimport { generateSpanId } from './utils/propagationContext';\n\nlet _externalPropagationContextProvider: (() => { traceId: string; spanId: string } | undefined) | undefined;\n\n/**\n * Register an external propagation context provider function.\n * When registered, trace context will be read from the external source (e.g. OpenTelemetry)\n * instead of from the Sentry scope's propagation context.\n */\nexport function registerExternalPropagationContext(fn: () => { traceId: string; spanId: string } | undefined): void {\n  _externalPropagationContextProvider = fn;\n}\n\n/**\n * Get the external propagation context, if a provider has been registered.\n */\nexport function getExternalPropagationContext(): { traceId: string; spanId: string } | undefined {\n  return _externalPropagationContextProvider?.();\n}\n\n/**\n * Check if an external propagation context provider has been registered.\n */\nexport function hasExternalPropagationContext(): boolean {\n  return _externalPropagationContextProvider !== undefined;\n}\n\n/**\n * Get the currently active scope.\n */\nexport function getCurrentScope(): Scope {\n  const carrier = getMainCarrier();\n  const acs = getAsyncContextStrategy(carrier);\n  return acs.getCurrentScope();\n}\n\n/**\n * Get the currently active isolation scope.\n * The isolation scope is active for the current execution context.\n */\nexport function getIsolationScope(): Scope {\n  const carrier = getMainCarrier();\n  const acs = getAsyncContextStrategy(carrier);\n  return acs.getIsolationScope();\n}\n\n/**\n * Get the global scope.\n * This scope is applied to _all_ events.\n */\nexport function getGlobalScope(): Scope {\n  return getGlobalSingleton('globalScope', () => new Scope());\n}\n\n/**\n * Creates a new scope with and executes the given operation within.\n * The scope is automatically removed once the operation\n * finishes or throws.\n */\nexport function withScope<T>(callback: (scope: Scope) => T): T;\n/**\n * Set the given scope as the active scope in the callback.\n */\nexport function withScope<T>(scope: Scope | undefined, callback: (scope: Scope) => T): T;\n/**\n * Either creates a new active scope, or sets the given scope as active scope in the given callback.\n */\nexport function withScope<T>(\n  ...rest: [callback: (scope: Scope) => T] | [scope: Scope | undefined, callback: (scope: Scope) => T]\n): T {\n  const carrier = getMainCarrier();\n  const acs = getAsyncContextStrategy(carrier);\n\n  // If a scope is defined, we want to make this the active scope instead of the default one\n  if (rest.length === 2) {\n    const [scope, callback] = rest;\n\n    if (!scope) {\n      return acs.withScope(callback);\n    }\n\n    return acs.withSetScope(scope, callback);\n  }\n\n  return acs.withScope(rest[0]);\n}\n\n/**\n * Attempts to fork the current isolation scope and the current scope based on the current async context strategy. If no\n * async context strategy is set, the isolation scope and the current scope will not be forked (this is currently the\n * case, for example, in the browser).\n *\n * Usage of this function in environments without async context strategy is discouraged and may lead to unexpected behaviour.\n *\n * This function is intended for Sentry SDK and SDK integration development. It is not recommended to be used in \"normal\"\n * applications directly because it comes with pitfalls. Use at your own risk!\n */\nexport function withIsolationScope<T>(callback: (isolationScope: Scope) => T): T;\n/**\n * Set the provided isolation scope as active in the given callback. If no\n * async context strategy is set, the isolation scope and the current scope will not be forked (this is currently the\n * case, for example, in the browser).\n *\n * Usage of this function in environments without async context strategy is discouraged and may lead to unexpected behaviour.\n *\n * This function is intended for Sentry SDK and SDK integration development. It is not recommended to be used in \"normal\"\n * applications directly because it comes with pitfalls. Use at your own risk!\n *\n * If you pass in `undefined` as a scope, it will fork a new isolation scope, the same as if no scope is passed.\n */\nexport function withIsolationScope<T>(isolationScope: Scope | undefined, callback: (isolationScope: Scope) => T): T;\n/**\n * Either creates a new active isolation scope, or sets the given isolation scope as active scope in the given callback.\n */\nexport function withIsolationScope<T>(\n  ...rest:\n    | [callback: (isolationScope: Scope) => T]\n    | [isolationScope: Scope | undefined, callback: (isolationScope: Scope) => T]\n): T {\n  const carrier = getMainCarrier();\n  const acs = getAsyncContextStrategy(carrier);\n\n  // If a scope is defined, we want to make this the active scope instead of the default one\n  if (rest.length === 2) {\n    const [isolationScope, callback] = rest;\n\n    if (!isolationScope) {\n      return acs.withIsolationScope(callback);\n    }\n\n    return acs.withSetIsolationScope(isolationScope, callback);\n  }\n\n  return acs.withIsolationScope(rest[0]);\n}\n\n/**\n * Get the currently active client.\n */\nexport function getClient<C extends Client>(): C | undefined {\n  return getCurrentScope().getClient<C>();\n}\n\n/**\n * Get a trace context for the given scope.\n */\nexport function getTraceContextFromScope(scope: Scope): TraceContext {\n  const externalContext = getExternalPropagationContext();\n  if (externalContext) {\n    return { trace_id: externalContext.traceId, span_id: externalContext.spanId };\n  }\n\n  const propagationContext = scope.getPropagationContext();\n\n  const { traceId, parentSpanId, propagationSpanId } = propagationContext;\n\n  const traceContext: TraceContext = {\n    trace_id: traceId,\n    span_id: propagationSpanId || generateSpanId(),\n  };\n\n  if (parentSpanId) {\n    traceContext.parent_span_id = parentSpanId;\n  }\n\n  return traceContext;\n}\n","import { getGlobalSingleton } from './carrier';\nimport { Scope } from './scope';\n\n/** Get the default current scope. */\nexport function getDefaultCurrentScope(): Scope {\n  return getGlobalSingleton('defaultCurrentScope', () => new Scope());\n}\n\n/** Get the default isolation scope. */\nexport function getDefaultIsolationScope(): Scope {\n  return getGlobalSingleton('defaultIsolationScope', () => new Scope());\n}\n","import type { Client } from './client';\nimport { getDynamicSamplingContextFromSpan } from './tracing/dynamicSamplingContext';\nimport type { SentrySpan } from './tracing/sentrySpan';\nimport { isStreamedBeforeSendSpanCallback } from './tracing/spans/beforeSendSpan';\nimport type { LegacyCSPReport } from './types/csp';\nimport type { DsnComponents } from './types/dsn';\nimport type {\n  DynamicSamplingContext,\n  EventEnvelope,\n  EventItem,\n  RawSecurityEnvelope,\n  RawSecurityItem,\n  SessionEnvelope,\n  SessionItem,\n  SpanEnvelope,\n  SpanItem,\n} from './types/envelope';\nimport type { Event } from './types/event';\nimport type { SdkInfo } from './types/sdkinfo';\nimport type { SdkMetadata } from './types/sdkmetadata';\nimport type { Session, SessionAggregates } from './types/session';\nimport { dsnToString } from './utils/dsn';\nimport {\n  createEnvelope,\n  createEventEnvelopeHeaders,\n  createSpanEnvelopeItem,\n  getSdkMetadataForEnvelopeHeader,\n} from './utils/envelope';\nimport { uuid4 } from './utils/misc';\nimport { safeDateNow } from './utils/randomSafeContext';\nimport { shouldIgnoreSpan } from './utils/should-ignore-span';\nimport { showSpanDropWarning, spanToJSON } from './utils/spanUtils';\n\n/**\n * Apply SdkInfo (name, version, packages, integrations) to the corresponding event key.\n * Merge with existing data if any.\n *\n * @internal, exported only for testing\n **/\nexport function _enhanceEventWithSdkInfo(event: Event, newSdkInfo?: SdkInfo): Event {\n  if (!newSdkInfo) {\n    return event;\n  }\n\n  const eventSdkInfo = event.sdk || {};\n\n  event.sdk = {\n    ...eventSdkInfo,\n    name: eventSdkInfo.name || newSdkInfo.name,\n    version: eventSdkInfo.version || newSdkInfo.version,\n    integrations: [...(event.sdk?.integrations || []), ...(newSdkInfo.integrations || [])],\n    packages: [...(event.sdk?.packages || []), ...(newSdkInfo.packages || [])],\n    settings:\n      event.sdk?.settings || newSdkInfo.settings\n        ? {\n            ...event.sdk?.settings,\n            ...newSdkInfo.settings,\n          }\n        : undefined,\n  };\n\n  return event;\n}\n\n/** Creates an envelope from a Session */\nexport function createSessionEnvelope(\n  session: Session | SessionAggregates,\n  dsn?: DsnComponents,\n  metadata?: SdkMetadata,\n  tunnel?: string,\n): SessionEnvelope {\n  const sdkInfo = getSdkMetadataForEnvelopeHeader(metadata);\n  const envelopeHeaders = {\n    sent_at: new Date(safeDateNow()).toISOString(),\n    ...(sdkInfo && { sdk: sdkInfo }),\n    ...(!!tunnel && dsn && { dsn: dsnToString(dsn) }),\n  };\n\n  const envelopeItem: SessionItem =\n    'aggregates' in session ? [{ type: 'sessions' }, session] : [{ type: 'session' }, session.toJSON()];\n\n  return createEnvelope<SessionEnvelope>(envelopeHeaders, [envelopeItem]);\n}\n\n/**\n * Create an Envelope from an event.\n */\nexport function createEventEnvelope(\n  event: Event,\n  dsn?: DsnComponents,\n  metadata?: SdkMetadata,\n  tunnel?: string,\n): EventEnvelope {\n  const sdkInfo = getSdkMetadataForEnvelopeHeader(metadata);\n\n  /*\n    Note: Due to TS, event.type may be `replay_event`, theoretically.\n    In practice, we never call `createEventEnvelope` with `replay_event` type,\n    and we'd have to adjust a looot of types to make this work properly.\n    We want to avoid casting this around, as that could lead to bugs (e.g. when we add another type)\n    So the safe choice is to really guard against the replay_event type here.\n  */\n  const eventType = event.type && event.type !== 'replay_event' ? event.type : 'event';\n\n  _enhanceEventWithSdkInfo(event, metadata?.sdk);\n\n  const envelopeHeaders = createEventEnvelopeHeaders(event, sdkInfo, tunnel, dsn);\n\n  // Prevent this data (which, if it exists, was used in earlier steps in the processing pipeline) from being sent to\n  // sentry. (Note: Our use of this property comes and goes with whatever we might be debugging, whatever hacks we may\n  // have temporarily added, etc. Even if we don't happen to be using it at some point in the future, let's not get rid\n  // of this `delete`, lest we miss putting it back in the next time the property is in use.)\n  delete event.sdkProcessingMetadata;\n\n  const eventItem: EventItem = [{ type: eventType }, event];\n  return createEnvelope<EventEnvelope>(envelopeHeaders, [eventItem]);\n}\n\n/**\n * Create envelope from Span item.\n *\n * Takes an optional client and runs spans through `beforeSendSpan` if available.\n */\nexport function createSpanEnvelope(spans: [SentrySpan, ...SentrySpan[]], client?: Client): SpanEnvelope {\n  function dscHasRequiredProps(dsc: Partial<DynamicSamplingContext>): dsc is DynamicSamplingContext {\n    return !!dsc.trace_id && !!dsc.public_key;\n  }\n\n  // For the moment we'll obtain the DSC from the first span in the array\n  // This might need to be changed if we permit sending multiple spans from\n  // different segments in one envelope\n  const dsc = getDynamicSamplingContextFromSpan(spans[0]);\n\n  const dsn = client?.getDsn();\n  const tunnel = client?.getOptions().tunnel;\n\n  const headers: SpanEnvelope[0] = {\n    sent_at: new Date(safeDateNow()).toISOString(),\n    ...(dscHasRequiredProps(dsc) && { trace: dsc }),\n    ...(!!tunnel && dsn && { dsn: dsnToString(dsn) }),\n  };\n\n  const { beforeSendSpan, ignoreSpans } = client?.getOptions() || {};\n\n  const filteredSpans = ignoreSpans?.length\n    ? spans.filter(span => {\n        const json = spanToJSON(span);\n        return !shouldIgnoreSpan({ description: json.description, op: json.op, attributes: json.data }, ignoreSpans);\n      })\n    : spans;\n  const droppedSpans = spans.length - filteredSpans.length;\n\n  if (droppedSpans) {\n    client?.recordDroppedEvent('before_send', 'span', droppedSpans);\n  }\n\n  const convertToSpanJSON = beforeSendSpan\n    ? (span: SentrySpan) => {\n        const spanJson = spanToJSON(span);\n        const processedSpan = !isStreamedBeforeSendSpanCallback(beforeSendSpan) ? beforeSendSpan(spanJson) : spanJson;\n\n        if (!processedSpan) {\n          showSpanDropWarning();\n          return spanJson;\n        }\n\n        return processedSpan;\n      }\n    : spanToJSON;\n\n  const items: SpanItem[] = [];\n  for (const span of filteredSpans) {\n    const spanJson = convertToSpanJSON(span);\n    if (spanJson) {\n      items.push(createSpanEnvelopeItem(spanJson));\n    }\n  }\n\n  return createEnvelope<SpanEnvelope>(headers, items);\n}\n\n/**\n * Create an Envelope from a CSP report.\n */\nexport function createRawSecurityEnvelope(\n  report: LegacyCSPReport,\n  dsn: DsnComponents,\n  tunnel?: string,\n  release?: string,\n  environment?: string,\n): RawSecurityEnvelope {\n  const envelopeHeaders = {\n    event_id: uuid4(),\n    ...(!!tunnel && dsn && { dsn: dsnToString(dsn) }),\n  };\n\n  const eventItem: RawSecurityItem = [\n    { type: 'raw_security', sentry_release: release, sentry_environment: environment },\n    report,\n  ];\n\n  return createEnvelope<RawSecurityEnvelope>(envelopeHeaders, [eventItem]);\n}\n","import { DEBUG_BUILD } from './debug-build';\nimport type { Event, EventHint } from './types/event';\nimport type { EventProcessor } from './types/eventprocessor';\nimport { debug } from './utils/debug-logger';\nimport { isThenable } from './utils/is';\nimport { rejectedSyncPromise, resolvedSyncPromise } from './utils/syncpromise';\n\n/**\n * Process an array of event processors, returning the processed event (or `null` if the event was dropped).\n */\nexport function notifyEventProcessors(\n  processors: EventProcessor[],\n  event: Event | null,\n  hint: EventHint,\n  index: number = 0,\n): PromiseLike<Event | null> {\n  try {\n    const result = _notifyEventProcessors(event, hint, processors, index);\n    return isThenable(result) ? result : resolvedSyncPromise(result);\n  } catch (error) {\n    return rejectedSyncPromise(error);\n  }\n}\n\nfunction _notifyEventProcessors(\n  event: Event | null,\n  hint: EventHint,\n  processors: EventProcessor[],\n  index: number,\n): Event | null | PromiseLike<Event | null> {\n  const processor = processors[index];\n\n  if (!event || !processor) {\n    return event;\n  }\n\n  const result = processor({ ...event }, hint);\n\n  DEBUG_BUILD && result === null && debug.log(`Event processor \"${processor.id || '?'}\" dropped event`);\n\n  if (isThenable(result)) {\n    return result.then(final => _notifyEventProcessors(final, hint, processors, index + 1));\n  }\n\n  return _notifyEventProcessors(result, hint, processors, index + 1);\n}\n","import type { AttributeObject, RawAttribute, RawAttributes } from './attributes';\nimport { getClient, getCurrentScope, getIsolationScope } from './currentScopes';\nimport { DEBUG_BUILD } from './debug-build';\nimport type { CaptureContext } from './scope';\nimport { closeSession, makeSession, updateSession } from './session';\nimport type { Event, EventHint } from './types/event';\nimport type { EventProcessor } from './types/eventprocessor';\nimport type { Extra, Extras } from './types/extra';\nimport type { Primitive } from './types/misc';\nimport type { Session, SessionContext } from './types/session';\nimport type { SeverityLevel } from './types/severity';\nimport type { User } from './types/user';\nimport { debug } from './utils/debug-logger';\nimport type { ExclusiveEventHintOrCaptureContext } from './utils/prepareEvent';\nimport { parseEventHintOrCaptureContext } from './utils/prepareEvent';\nimport { getCombinedScopeData } from './utils/scopeData';\nimport { GLOBAL_OBJ } from './utils/worldwide';\n\n/**\n * Captures an exception event and sends it to Sentry.\n *\n * @param exception The exception to capture.\n * @param hint Optional additional data to attach to the Sentry event.\n * @returns the id of the captured Sentry event.\n */\nexport function captureException(exception: unknown, hint?: ExclusiveEventHintOrCaptureContext): string {\n  return getCurrentScope().captureException(exception, parseEventHintOrCaptureContext(hint));\n}\n\n/**\n * Captures a message event and sends it to Sentry.\n *\n * @param message The message to send to Sentry.\n * @param captureContext Define the level of the message or pass in additional data to attach to the message.\n * @returns the id of the captured message.\n */\nexport function captureMessage(message: string, captureContext?: CaptureContext | SeverityLevel): string {\n  // This is necessary to provide explicit scopes upgrade, without changing the original\n  // arity of the `captureMessage(message, level)` method.\n  const level = typeof captureContext === 'string' ? captureContext : undefined;\n  const hint = typeof captureContext !== 'string' ? { captureContext } : undefined;\n  return getCurrentScope().captureMessage(message, level, hint);\n}\n\n/**\n * Captures a manually created event and sends it to Sentry.\n *\n * @param event The event to send to Sentry.\n * @param hint Optional additional data to attach to the Sentry event.\n * @returns the id of the captured event.\n */\nexport function captureEvent(event: Event, hint?: EventHint): string {\n  return getCurrentScope().captureEvent(event, hint);\n}\n\n/**\n * Sets context data with the given name.\n * @param name of the context\n * @param context Any kind of data. This data will be normalized.\n */\nexport function setContext(name: string, context: { [key: string]: unknown } | null): void {\n  getIsolationScope().setContext(name, context);\n}\n\n/**\n * Set an object that will be merged sent as extra data with the event.\n * @param extras Extras object to merge into current context.\n */\nexport function setExtras(extras: Extras): void {\n  getIsolationScope().setExtras(extras);\n}\n\n/**\n * Set key:value that will be sent as extra data with the event.\n * @param key String of extra\n * @param extra Any kind of data. This data will be normalized.\n */\nexport function setExtra(key: string, extra: Extra): void {\n  getIsolationScope().setExtra(key, extra);\n}\n\n/**\n * Set an object that will be merged sent as tags data with the event.\n * @param tags Tags context object to merge into current context.\n */\nexport function setTags(tags: { [key: string]: Primitive }): void {\n  getIsolationScope().setTags(tags);\n}\n\n/**\n * Set key:value that will be sent as tags data with the event.\n *\n * Can also be used to unset a tag, by passing `undefined`.\n *\n * @param key String key of tag\n * @param value Value of tag\n */\nexport function setTag(key: string, value: Primitive): void {\n  getIsolationScope().setTag(key, value);\n}\n\n/**\n * Sets attributes on the isolation scope.\n *\n * These attributes are applied to logs, metrics and streamed spans.\n *\n * Supported attribute value types are `string`, `number`, `boolean`, `string[]`, `number[]` and `boolean[]`.\n *\n * @param attributes - The attributes to set on the scope, as key-value pairs.\n *\n * @example\n * ```typescript\n * Sentry.setAttributes({\n *   is_admin: true,\n *   payment_selection: 'credit_card',\n *   render_duration: 150,\n * });\n * ```\n */\nexport function setAttributes<T extends Record<string, unknown>>(attributes: RawAttributes<T>): void {\n  getIsolationScope().setAttributes(attributes);\n}\n\n/**\n * Sets an attribute on the isolation scope.\n *\n * These attributes are applied to logs, metrics and streamed spans.\n *\n * Supported attribute value types are `string`, `number`, `boolean`, `string[]`, `number[]` and `boolean[]`.\n *\n * @param key - The attribute key.\n * @param value - The attribute value.\n *\n * @example\n * ```typescript\n * Sentry.setAttribute('is_admin', true);\n * Sentry.setAttribute('render_duration', 150);\n * ```\n */\nexport function setAttribute<\n  // oxlint-disable-next-line typescript-eslint/no-explicit-any\n  T extends RawAttribute<T> extends { value: any } | { unit: any } ? AttributeObject : unknown,\n>(key: string, value: RawAttribute<T>): void {\n  getIsolationScope().setAttribute(key, value);\n}\n\n/**\n * Updates user context information for future events.\n *\n * @param user User context object to be set in the current context. Pass `null` to unset the user.\n */\nexport function setUser(user: User | null): void {\n  getIsolationScope().setUser(user);\n}\n\n/**\n * Sets the conversation ID for the current isolation scope.\n *\n * @param conversationId The conversation ID to set. Pass `null` or `undefined` to unset the conversation ID.\n */\nexport function setConversationId(conversationId: string | null | undefined): void {\n  getIsolationScope().setConversationId(conversationId);\n}\n\n/**\n * The last error event id of the isolation scope.\n *\n * Warning: This function really returns the last recorded error event id on the current\n * isolation scope. If you call this function after handling a certain error and another error\n * is captured in between, the last one is returned instead of the one you might expect.\n * Also, ids of events that were never sent to Sentry (for example because\n * they were dropped by sampling or `beforeSend`) could be returned.\n *\n * @returns The last event id of the isolation scope.\n */\nexport function lastEventId(): string | undefined {\n  return getIsolationScope().lastEventId();\n}\n\n/**\n * Call `flush()` on the current client, if there is one. See {@link Client.flush}.\n *\n * @param timeout Maximum time in ms the client should wait to flush its event queue. Omitting this parameter will cause\n * the client to wait until all events are sent before resolving the promise.\n * @returns A promise which resolves to `true` if the queue successfully drains before the timeout, or `false` if it\n * doesn't (or if there's no client defined).\n */\nexport async function flush(timeout?: number): Promise<boolean> {\n  const client = getClient();\n  if (client) {\n    return client.flush(timeout);\n  }\n  DEBUG_BUILD && debug.warn('Cannot flush events. No client defined.');\n  return Promise.resolve(false);\n}\n\n/**\n * Call `close()` on the current client, if there is one. See {@link Client.close}.\n *\n * @param timeout Maximum time in ms the client should wait to flush its event queue before shutting down. Omitting this\n * parameter will cause the client to wait until all events are sent before disabling itself.\n * @returns A promise which resolves to `true` if the queue successfully drains before the timeout, or `false` if it\n * doesn't (or if there's no client defined).\n */\nexport async function close(timeout?: number): Promise<boolean> {\n  const client = getClient();\n  if (client) {\n    return client.close(timeout);\n  }\n  DEBUG_BUILD && debug.warn('Cannot flush events and disable SDK. No client defined.');\n  return Promise.resolve(false);\n}\n\n/**\n * Returns true if Sentry has been properly initialized.\n */\nexport function isInitialized(): boolean {\n  return !!getClient();\n}\n\n/** If the SDK is initialized & enabled. */\nexport function isEnabled(): boolean {\n  const client = getClient();\n  return client?.getOptions().enabled !== false && !!client?.getTransport();\n}\n\n/**\n * Add an event processor.\n * This will be added to the current isolation scope, ensuring any event that is processed in the current execution\n * context will have the processor applied.\n */\nexport function addEventProcessor(callback: EventProcessor): void {\n  getIsolationScope().addEventProcessor(callback);\n}\n\n/**\n * Start a session on the current isolation scope.\n *\n * @param context (optional) additional properties to be applied to the returned session object\n *\n * @returns the new active session\n */\nexport function startSession(context?: SessionContext): Session {\n  const isolationScope = getIsolationScope();\n\n  const { user } = getCombinedScopeData(isolationScope, getCurrentScope());\n\n  // Will fetch userAgent if called from browser sdk\n  const { userAgent } = GLOBAL_OBJ.navigator || {};\n\n  const session = makeSession({\n    user,\n    ...(userAgent && { userAgent }),\n    ...context,\n  });\n\n  // End existing session if there's one\n  const currentSession = isolationScope.getSession();\n  if (currentSession?.status === 'ok') {\n    updateSession(currentSession, { status: 'exited' });\n  }\n\n  endSession();\n\n  // Afterwards we set the new session on the scope\n  isolationScope.setSession(session);\n\n  return session;\n}\n\n/**\n * End the session on the current isolation scope.\n */\nexport function endSession(): void {\n  const isolationScope = getIsolationScope();\n  const currentScope = getCurrentScope();\n\n  const session = currentScope.getSession() || isolationScope.getSession();\n  if (session) {\n    closeSession(session);\n  }\n  _sendSessionUpdate();\n\n  // the session is over; take it off of the scope\n  isolationScope.setSession();\n}\n\n/**\n * Sends the current Session on the scope\n */\nfunction _sendSessionUpdate(): void {\n  const isolationScope = getIsolationScope();\n  const client = getClient();\n  const session = isolationScope.getSession();\n  if (session && client) {\n    client.captureSession(session);\n  }\n}\n\n/**\n * Sends the current session on the scope to Sentry\n *\n * @param end If set the session will be marked as exited and removed from the scope.\n *            Defaults to `false`.\n */\nexport function captureSession(end: boolean = false): void {\n  // both send the update and pull the session from the scope\n  if (end) {\n    endSession();\n    return;\n  }\n\n  // only send the update\n  _sendSessionUpdate();\n}\n","import { getClient, getCurrentScope } from './currentScopes';\nimport type { EventHint } from './types/event';\nimport type { FeedbackEvent, SendFeedbackParams } from './types/feedback';\n\n/**\n * Send user feedback to Sentry.\n */\nexport function captureFeedback(\n  params: SendFeedbackParams,\n  hint: EventHint & { includeReplay?: boolean } = {},\n  scope = getCurrentScope(),\n): string {\n  const { message, name, email, url, source, associatedEventId, tags } = params;\n\n  const feedbackEvent: FeedbackEvent = {\n    contexts: {\n      feedback: {\n        contact_email: email,\n        name,\n        message,\n        url,\n        source,\n        associated_event_id: associatedEventId,\n      },\n    },\n    type: 'feedback',\n    level: 'info',\n    tags,\n  };\n\n  const client = scope?.getClient() || getClient();\n\n  if (client) {\n    client.emit('beforeSendFeedback', feedbackEvent, hint);\n  }\n\n  const eventId = scope.captureEvent(feedbackEvent, hint);\n\n  return eventId;\n}\n","import { HTTP_URL, URL_FULL } from '@sentry/conventions/attributes';\nimport { getClient } from './currentScopes';\nimport { SEMANTIC_ATTRIBUTE_SENTRY_OP, SEMANTIC_ATTRIBUTE_SENTRY_ORIGIN } from './semanticAttributes';\nimport { setHttpStatus, SPAN_STATUS_ERROR, spanIsIgnored, startInactiveSpan } from './tracing';\nimport { SentryNonRecordingSpan } from './tracing/sentryNonRecordingSpan';\nimport { hasSpanStreamingEnabled } from './tracing/spans/hasSpanStreamingEnabled';\nimport type { FetchBreadcrumbHint } from './types/breadcrumb';\nimport type { HandlerDataFetch } from './types/instrument';\nimport type { ResponseHookInfo } from './types/request';\nimport type { Span, SpanAttributes, SpanOrigin } from './types/span';\nimport { SENTRY_BAGGAGE_KEY_PREFIX } from './utils/baggage';\nimport { hasSpansEnabled } from './utils/hasSpansEnabled';\nimport { isInstanceOf, isRequest } from './utils/is';\nimport { getActiveSpan } from './utils/spanUtils';\nimport { getTraceData } from './utils/traceData';\nimport {\n  getSanitizedUrlStringFromUrlObject,\n  isURLObjectRelative,\n  parseStringToURLObject,\n  stripDataUrlContent,\n} from './utils/url';\n\ntype PolymorphicRequestHeaders =\n  | Record<string, unknown>\n  | Array<[string, unknown]>\n  | Iterable<Iterable<unknown>>\n  // the below is not precisely the Header type used in Request, but it'll pass duck-typing\n  | {\n      append: (key: string, value: string) => void;\n      get: (key: string) => string | null | undefined;\n    };\n\ninterface InstrumentFetchRequestOptions {\n  spanOrigin?: SpanOrigin;\n  propagateTraceparent?: boolean;\n  onRequestSpanEnd?: (span: Span, responseInformation: ResponseHookInfo) => void;\n}\n\n/**\n * Create and track fetch request spans for usage in combination with `addFetchInstrumentationHandler`.\n *\n * @deprecated pass an options object instead of the spanOrigin parameter\n *\n * @returns Span if a span was created, otherwise void.\n */\nexport function instrumentFetchRequest(\n  handlerData: HandlerDataFetch,\n  shouldCreateSpan: (url: string) => boolean,\n  shouldAttachHeaders: (url: string) => boolean,\n  spans: Record<string, Span>,\n  spanOrigin: SpanOrigin,\n): Span | undefined;\n/**\n * Create and track fetch request spans for usage in combination with `addFetchInstrumentationHandler`.\n *\n * @returns Span if a span was created, otherwise void.\n */\nexport function instrumentFetchRequest(\n  handlerData: HandlerDataFetch,\n  shouldCreateSpan: (url: string) => boolean,\n  shouldAttachHeaders: (url: string) => boolean,\n  spans: Record<string, Span>,\n  // eslint-disable-next-line @typescript-eslint/unified-signatures -- needed because the other overload is deprecated\n  instrumentFetchRequestOptions: InstrumentFetchRequestOptions,\n): Span | undefined;\n\n/**\n * Create and track fetch request spans for usage in combination with `addFetchInstrumentationHandler`.\n *\n * @returns Span if a span was created, otherwise void.\n */\nexport function instrumentFetchRequest(\n  handlerData: HandlerDataFetch,\n  shouldCreateSpan: (url: string) => boolean,\n  shouldAttachHeaders: (url: string) => boolean,\n  spans: Record<string, Span>,\n  spanOriginOrOptions?: SpanOrigin | InstrumentFetchRequestOptions,\n): Span | undefined {\n  if (!handlerData.fetchData) {\n    return undefined;\n  }\n\n  const { method, url } = handlerData.fetchData;\n\n  const shouldCreateSpanResult = hasSpansEnabled() && shouldCreateSpan(url);\n\n  if (handlerData.endTimestamp) {\n    const spanId = handlerData.fetchData.__span;\n    if (!spanId) return;\n\n    const span = spans[spanId];\n\n    if (span) {\n      // Only end the span and call hooks if we're actually recording\n      if (shouldCreateSpanResult) {\n        endSpan(span, handlerData);\n        _callOnRequestSpanEnd(span, handlerData, spanOriginOrOptions);\n      }\n\n      // eslint-disable-next-line @typescript-eslint/no-dynamic-delete\n      delete spans[spanId];\n    }\n\n    return undefined;\n  }\n\n  // Backwards-compatible with the old signature. Needed to introduce the combined optional parameter\n  // to avoid API breakage for anyone calling this function with the optional spanOrigin parameter\n  // TODO (v11): remove this backwards-compatible code and only accept the options parameter\n  const { spanOrigin = 'auto.http.browser', propagateTraceparent = false } =\n    typeof spanOriginOrOptions === 'object' ? spanOriginOrOptions : { spanOrigin: spanOriginOrOptions };\n\n  const client = getClient();\n  const hasParent = !!getActiveSpan();\n  // With span streaming, we always emit http.client spans, even without a parent span\n  const shouldEmitSpan = hasParent || (!!client && hasSpanStreamingEnabled(client));\n\n  const span =\n    shouldCreateSpanResult && shouldEmitSpan\n      ? startInactiveSpan(getSpanStartOptions(url, method, spanOrigin))\n      : new SentryNonRecordingSpan();\n  const spanForTraceHeaders = spanIsIgnored(span) && hasParent ? undefined : span;\n\n  if (shouldCreateSpanResult && !shouldEmitSpan) {\n    client?.recordDroppedEvent('no_parent_span', 'span');\n  }\n\n  handlerData.fetchData.__span = span.spanContext().spanId;\n  spans[span.spanContext().spanId] = span;\n\n  if (shouldAttachHeaders(handlerData.fetchData.url)) {\n    const request: string | Request = handlerData.args[0];\n\n    // Shallow clone the options object to avoid mutating the original user-provided object\n    // Examples: users re-using same options object for multiple fetch calls, frozen objects\n    const options: { [key: string]: unknown } = { ...(handlerData.args[1] || {}) };\n\n    const headers = _INTERNAL_getTracingHeadersForFetchRequest(\n      request,\n      options,\n      // If performance is disabled (TWP) or there's no active root span (pageload/navigation/interaction),\n      // we do not want to use the span as base for the trace headers,\n      // which means that the headers will be generated from the scope and the sampling decision is deferred\n      hasSpansEnabled() && shouldEmitSpan ? spanForTraceHeaders : undefined,\n      propagateTraceparent,\n    );\n    if (headers) {\n      // Ensure this is actually set, if no options have been passed previously\n      handlerData.args[1] = options;\n      options.headers = headers;\n    }\n  }\n\n  if (client) {\n    const fetchHint = {\n      input: handlerData.args,\n      response: handlerData.response,\n      startTimestamp: handlerData.startTimestamp,\n      endTimestamp: handlerData.endTimestamp,\n    } satisfies FetchBreadcrumbHint;\n\n    client.emit('beforeOutgoingRequestSpan', span, fetchHint);\n  }\n\n  return span;\n}\n\n/**\n * Calls the onRequestSpanEnd callback if it is defined.\n */\nexport function _callOnRequestSpanEnd(\n  span: Span,\n  handlerData: HandlerDataFetch,\n  spanOriginOrOptions?: SpanOrigin | InstrumentFetchRequestOptions,\n): void {\n  const onRequestSpanEnd =\n    typeof spanOriginOrOptions === 'object' && spanOriginOrOptions !== null\n      ? spanOriginOrOptions.onRequestSpanEnd\n      : undefined;\n\n  onRequestSpanEnd?.(span, {\n    headers: handlerData.response?.headers,\n    error: handlerData.error,\n  });\n}\n\n/**\n * Builds merged fetch headers that include `sentry-trace` and `baggage` (and optionally `traceparent`)\n * for the given request and init, without mutating the original request or options.\n * Returns `undefined` when there is no `sentry-trace` value to attach.\n *\n * @internal Exported for cross-package instrumentation (for example Cloudflare Workers fetcher bindings)\n * and unit tests\n *\n * Baggage handling:\n * 1. No previous baggage header → include Sentry baggage\n * 2. Previous baggage has no Sentry entries → merge Sentry baggage in\n * 3. Previous baggage already has Sentry entries → leave as-is (may be user-defined)\n */\n// eslint-disable-next-line complexity -- yup it's this complicated :(\nexport function _INTERNAL_getTracingHeadersForFetchRequest(\n  request: string | URL | Request,\n  fetchOptionsObj: {\n    headers?:\n      | {\n          [key: string]: string[] | string | undefined;\n        }\n      | PolymorphicRequestHeaders;\n  },\n  span?: Span,\n  propagateTraceparent?: boolean,\n): PolymorphicRequestHeaders | undefined {\n  const traceHeaders = getTraceData({ span, propagateTraceparent });\n  const sentryTrace = traceHeaders['sentry-trace'];\n  const baggage = traceHeaders.baggage;\n  const traceparent = traceHeaders.traceparent;\n\n  // Nothing to do, when we return undefined here, the original headers will be used\n  if (!sentryTrace) {\n    return undefined;\n  }\n\n  const originalHeaders = fetchOptionsObj.headers || (isRequest(request) ? request.headers : undefined);\n\n  if (!originalHeaders) {\n    return {\n      'sentry-trace': sentryTrace,\n      ...(baggage && { baggage }),\n      ...(traceparent && { traceparent }),\n    };\n  } else if (isHeaders(originalHeaders)) {\n    const newHeaders = new Headers(originalHeaders);\n\n    // We don't want to override manually added sentry headers\n    if (!newHeaders.get('sentry-trace')) {\n      newHeaders.set('sentry-trace', sentryTrace);\n    }\n\n    if (propagateTraceparent && traceparent && !newHeaders.get('traceparent')) {\n      newHeaders.set('traceparent', traceparent);\n    }\n\n    if (baggage) {\n      const prevBaggageHeader = newHeaders.get('baggage');\n\n      if (!prevBaggageHeader) {\n        newHeaders.set('baggage', baggage);\n      } else if (!baggageHeaderHasSentryBaggageValues(prevBaggageHeader)) {\n        newHeaders.set('baggage', `${prevBaggageHeader},${baggage}`);\n      }\n    }\n\n    return newHeaders;\n  } else if (isHeadersInitTupleArray(originalHeaders)) {\n    const newHeaders = [...originalHeaders];\n\n    if (!newHeaders.find(header => header[0] === 'sentry-trace')) {\n      newHeaders.push(['sentry-trace', sentryTrace]);\n    }\n\n    if (propagateTraceparent && traceparent && !newHeaders.find(header => header[0] === 'traceparent')) {\n      newHeaders.push(['traceparent', traceparent]);\n    }\n\n    const prevBaggageHeaderWithSentryValues = originalHeaders.find(\n      header =>\n        header[0] === 'baggage' && typeof header[1] === 'string' && baggageHeaderHasSentryBaggageValues(header[1]),\n    );\n\n    if (baggage && !prevBaggageHeaderWithSentryValues) {\n      // If there are multiple entries with the same key, the browser will merge the values into a single request header.\n      // Its therefore safe to simply push a \"baggage\" entry, even though there might already be another baggage header.\n      newHeaders.push(['baggage', baggage]);\n    }\n\n    return newHeaders;\n  } else {\n    const existingSentryTraceHeader = 'sentry-trace' in originalHeaders ? originalHeaders['sentry-trace'] : undefined;\n    const existingTraceparentHeader = 'traceparent' in originalHeaders ? originalHeaders.traceparent : undefined;\n    const existingBaggageHeader = 'baggage' in originalHeaders ? originalHeaders.baggage : undefined;\n\n    const newBaggageHeaders: string[] = existingBaggageHeader\n      ? Array.isArray(existingBaggageHeader)\n        ? [...existingBaggageHeader]\n        : [existingBaggageHeader]\n      : [];\n\n    const prevBaggageHeaderWithSentryValues =\n      existingBaggageHeader &&\n      (Array.isArray(existingBaggageHeader)\n        ? existingBaggageHeader.find(headerItem => baggageHeaderHasSentryBaggageValues(headerItem))\n        : baggageHeaderHasSentryBaggageValues(existingBaggageHeader));\n\n    if (baggage && !prevBaggageHeaderWithSentryValues) {\n      newBaggageHeaders.push(baggage);\n    }\n\n    const newHeaders: {\n      'sentry-trace': string;\n      baggage?: string;\n      traceparent?: string;\n    } = Object.assign({}, originalHeaders, {\n      'sentry-trace': (existingSentryTraceHeader as string | undefined) ?? sentryTrace,\n      ...(newBaggageHeaders.length > 0 && { baggage: newBaggageHeaders.join(',') }),\n    });\n\n    if (propagateTraceparent && traceparent && !existingTraceparentHeader) {\n      newHeaders.traceparent = traceparent;\n    }\n\n    return newHeaders;\n  }\n}\n\nfunction endSpan(span: Span, handlerData: HandlerDataFetch): void {\n  if (handlerData.response) {\n    setHttpStatus(span, handlerData.response.status);\n\n    const contentLength = handlerData.response?.headers?.get('content-length');\n\n    if (contentLength) {\n      const contentLengthNum = parseInt(contentLength);\n      if (contentLengthNum > 0) {\n        span.setAttribute('http.response_content_length', contentLengthNum);\n      }\n    }\n  } else if (handlerData.error) {\n    span.setStatus({ code: SPAN_STATUS_ERROR, message: 'internal_error' });\n  }\n  span.end();\n}\n\nfunction baggageHeaderHasSentryBaggageValues(baggageHeader: unknown): boolean {\n  if (typeof baggageHeader !== 'string') {\n    return false;\n  }\n\n  return baggageHeader.split(',').some(baggageEntry => baggageEntry.trim().startsWith(SENTRY_BAGGAGE_KEY_PREFIX));\n}\n\nfunction isHeaders(headers: unknown): headers is Headers {\n  return typeof Headers !== 'undefined' && isInstanceOf(headers, Headers);\n}\n\n/** `HeadersInit` array form: each entry is a [name, value] pair of strings. */\nfunction isHeadersInitTupleArray(headers: unknown): headers is [string, unknown][] {\n  if (!Array.isArray(headers)) {\n    return false;\n  }\n\n  return headers.every(\n    (item): item is [string, unknown] => Array.isArray(item) && item.length === 2 && typeof item[0] === 'string',\n  );\n}\n\nfunction getSpanStartOptions(\n  url: string,\n  method: string,\n  spanOrigin: SpanOrigin,\n): Parameters<typeof startInactiveSpan>[0] {\n  // Data URLs need special handling because parseStringToURLObject treats them as \"relative\"\n  // (no \"://\"), causing getSanitizedUrlStringFromUrlObject to return just the pathname\n  // without the \"data:\" prefix, making later stripDataUrlContent calls ineffective.\n  // So for data URLs, we strip the content first and use that directly.\n  if (url.startsWith('data:')) {\n    const sanitizedUrl = stripDataUrlContent(url);\n    return {\n      name: `${method} ${sanitizedUrl}`,\n      attributes: getFetchSpanAttributes(url, undefined, method, spanOrigin),\n    };\n  }\n\n  const parsedUrl = parseStringToURLObject(url);\n  const sanitizedUrl = parsedUrl ? getSanitizedUrlStringFromUrlObject(parsedUrl) : url;\n  return {\n    name: `${method} ${sanitizedUrl}`,\n    attributes: getFetchSpanAttributes(url, parsedUrl, method, spanOrigin),\n  };\n}\n\nfunction getFetchSpanAttributes(\n  url: string,\n  parsedUrl: ReturnType<typeof parseStringToURLObject>,\n  method: string,\n  spanOrigin: SpanOrigin,\n): SpanAttributes {\n  const attributes: SpanAttributes = {\n    url: stripDataUrlContent(url),\n    type: 'fetch',\n    'http.method': method,\n    [SEMANTIC_ATTRIBUTE_SENTRY_ORIGIN]: spanOrigin,\n    [SEMANTIC_ATTRIBUTE_SENTRY_OP]: 'http.client',\n  };\n  if (parsedUrl) {\n    if (!isURLObjectRelative(parsedUrl)) {\n      // oxlint-disable-next-line typescript/no-deprecated\n      attributes[HTTP_URL] = stripDataUrlContent(parsedUrl.href);\n      attributes[URL_FULL] = stripDataUrlContent(parsedUrl.href);\n      attributes['server.address'] = parsedUrl.host;\n    }\n    if (parsedUrl.search) {\n      attributes['http.query'] = parsedUrl.search;\n    }\n    if (parsedUrl.hash) {\n      attributes['http.fragment'] = parsedUrl.hash;\n    }\n  }\n  return attributes;\n}\n","/* eslint-disable @typescript-eslint/no-explicit-any */\n/* eslint-disable @typescript-eslint/ban-types */\nimport { DEBUG_BUILD } from '../debug-build';\nimport type { ConsoleLevel, HandlerDataConsole } from '../types/instrument';\nimport { CONSOLE_LEVELS, originalConsoleMethods } from '../utils/debug-logger';\nimport { fill } from '../utils/object';\nimport { stringMatchesSomePattern } from '../utils/string';\nimport { GLOBAL_OBJ } from '../utils/worldwide';\nimport { addHandler, maybeInstrument, triggerHandlers } from './handlers';\nimport { debug } from '../utils/debug-logger';\n\n/**\n * Filter out console messages that match the given strings or regular expressions.\n * These will neither be passed to the handler, and they will also not be logged to the user, unless they have debug enabled.\n * This is a set to avoid duplicate integration setups to add the same filter multiple times.\n */\nconst _filter = new Set<string | RegExp>([]);\n\n/**\n * Add an instrumentation handler for when a console.xxx method is called.\n * Returns a function to remove the handler.\n *\n * Use at your own risk, this might break without changelog notice, only used internally.\n * @hidden\n */\nexport function addConsoleInstrumentationHandler(handler: (data: HandlerDataConsole) => void): () => void {\n  const type = 'console';\n  const removeHandler = addHandler(type, handler);\n  maybeInstrument(type, instrumentConsole);\n  return removeHandler;\n}\n\n/**\n * Add a filter to the console instrumentation to filter out console messages that match the given strings or regular expressions.\n * Returns a function to remove the filter.\n */\nexport function addConsoleInstrumentationFilter(filter: (string | RegExp)[]): () => void {\n  for (const f of filter) {\n    _filter.add(f);\n  }\n\n  return () => {\n    for (const f of filter) {\n      _filter.delete(f);\n    }\n  };\n}\n\n/** Only exported for tests. */\nexport function _INTERNAL_resetConsoleInstrumentationOptions(): void {\n  _filter.clear();\n}\n\n// The console levels *this* copy of the SDK has already wrapped. A copy must wrap each level at\n// most once: re-wrapping overwrites `originalConsoleMethods[level]` with a function that itself\n// reads `originalConsoleMethods[level]`, so calling through to the \"original\" (here and in\n// `consoleSandbox`) re-enters a wrapper indefinitely, ending in a `RangeError: Maximum call stack\n// size exceeded`. This can happen e.g. in React Native when instrumentation state is re-initialized\n// while the console stays wrapped. See getsentry/sentry-react-native SDK-CRASHES-REACT-NATIVE-5HZ.\n// We intentionally track this per copy rather than checking for the shared `__sentry_original__`\n// marker: a *different* SDK copy's wrapper (e.g. separate CDN bundles that each inline\n// `@sentry/core`) is safe to wrap since its call chain resolves down to the native method, and\n// skipping it would silently drop that copy's console handlers (breadcrumbs, `captureConsole`).\nconst instrumentedLevels = new Set<ConsoleLevel>();\n\n/** Only exported for tests. */\nexport function instrumentConsole(): void {\n  if (!('console' in GLOBAL_OBJ)) {\n    return;\n  }\n\n  CONSOLE_LEVELS.forEach(function (level: ConsoleLevel): void {\n    if (instrumentedLevels.has(level) || !(level in GLOBAL_OBJ.console)) {\n      return;\n    }\n\n    instrumentedLevels.add(level);\n\n    fill(GLOBAL_OBJ.console, level, function (originalConsoleMethod: () => any): Function {\n      originalConsoleMethods[level] = originalConsoleMethod;\n\n      return function (...args: any[]): void {\n        const firstArg = args[0];\n        const log = originalConsoleMethods[level];\n\n        const isFiltered = _filter.size && typeof firstArg === 'string' && stringMatchesSomePattern(firstArg, _filter);\n\n        // Only trigger handlers for non-filtered messages\n        if (!isFiltered) {\n          triggerHandlers('console', { args, level } as HandlerDataConsole);\n        }\n\n        // Only log filtered messages in debug mode\n        if (!isFiltered || (DEBUG_BUILD && debug.isEnabled())) {\n          // Call original console method\n          log?.apply(GLOBAL_OBJ.console, args);\n        }\n      };\n    });\n  });\n}\n","/* eslint-disable @typescript-eslint/no-explicit-any */\nimport { getClient } from '../currentScopes';\nimport type { HandlerDataFetch } from '../types/instrument';\nimport type { WebFetchHeaders } from '../types/webfetchapi';\nimport { isError, isObjectLike, isRequest } from '../utils/is';\nimport { addNonEnumerableProperty, fill } from '../utils/object';\nimport { supportsNativeFetch } from '../utils/supports';\nimport { timestampInSeconds } from '../utils/time';\nimport { GLOBAL_OBJ } from '../utils/worldwide';\nimport { addHandler, maybeInstrument, triggerHandlers } from './handlers';\n\ntype FetchResource = string | { toString(): string } | { url: string };\n\n/**\n * Add an instrumentation handler for when a fetch request happens.\n * The handler function is called once when the request starts and once when it ends,\n * which can be identified by checking if it has an `endTimestamp`.\n * Returns a function to remove the handler.\n *\n * Use at your own risk, this might break without changelog notice, only used internally.\n * @hidden\n */\nexport function addFetchInstrumentationHandler(\n  handler: (data: HandlerDataFetch) => void,\n  skipNativeFetchCheck?: boolean,\n): () => void {\n  const type = 'fetch';\n  const removeHandler = addHandler(type, handler);\n  maybeInstrument(type, () => instrumentFetch(undefined, skipNativeFetchCheck));\n  return removeHandler;\n}\n\n/**\n * Add an instrumentation handler for long-lived fetch requests, like consuming server-sent events (SSE) via fetch.\n * The handler will resolve the request body and emit the actual `endTimestamp`, so that the\n * span can be updated accordingly.\n * Returns a function to remove the handler.\n *\n * Only used internally\n * @hidden\n */\nexport function addFetchEndInstrumentationHandler(handler: (data: HandlerDataFetch) => void): () => void {\n  const type = 'fetch-body-resolved';\n  const removeHandler = addHandler(type, handler);\n  maybeInstrument(type, () => instrumentFetch(streamHandler));\n  return removeHandler;\n}\n\nfunction instrumentFetch(onFetchResolved?: (response: Response) => void, skipNativeFetchCheck: boolean = false): void {\n  if (skipNativeFetchCheck && !supportsNativeFetch()) {\n    return;\n  }\n\n  fill(GLOBAL_OBJ, 'fetch', function (originalFetch: () => void): () => void {\n    return function (...args: any[]): void {\n      // We capture the error right here and not in the Promise error callback because Safari (and probably other\n      // browsers too) will wipe the stack trace up to this point, only leaving us with this file which is useless.\n\n      // NOTE: If you are a Sentry user, and you are seeing this stack frame,\n      //       it means the error, that was caused by your fetch call did not\n      //       have a stack trace, so the SDK backfilled the stack trace so\n      //       you can see which fetch call failed.\n      const virtualError = new Error();\n\n      const { method, url } = parseFetchArgs(args);\n      const handlerData: HandlerDataFetch = {\n        args,\n        fetchData: {\n          method,\n          url,\n        },\n        startTimestamp: timestampInSeconds() * 1000,\n        // // Adding the error to be able to fingerprint the failed fetch event in HttpClient instrumentation\n        virtualError,\n        headers: getHeadersFromFetchArgs(args),\n      };\n\n      // if there is no callback, fetch is instrumented directly\n      if (!onFetchResolved) {\n        triggerHandlers('fetch', {\n          ...handlerData,\n        });\n      }\n\n      // eslint-disable-next-line @typescript-eslint/no-unsafe-member-access\n      return originalFetch.apply(GLOBAL_OBJ, args).then(\n        async (response: Response) => {\n          if (onFetchResolved) {\n            onFetchResolved(response);\n          } else {\n            triggerHandlers('fetch', {\n              ...handlerData,\n              endTimestamp: timestampInSeconds() * 1000,\n              response,\n            });\n          }\n\n          return response;\n        },\n        (error: Error) => {\n          triggerHandlers('fetch', {\n            ...handlerData,\n            endTimestamp: timestampInSeconds() * 1000,\n            error,\n          });\n\n          if (isError(error) && error.stack === undefined) {\n            // NOTE: If you are a Sentry user, and you are seeing this stack frame,\n            //       it means the error, that was caused by your fetch call did not\n            //       have a stack trace, so the SDK backfilled the stack trace so\n            //       you can see which fetch call failed.\n            error.stack = virtualError.stack;\n            addNonEnumerableProperty(error, 'framesToPop', 1);\n          }\n\n          // We enhance fetch error messages with hostname information based on the configuration.\n          // Possible messages we handle here:\n          // * \"Failed to fetch\" (chromium)\n          // * \"Load failed\" (webkit)\n          // * \"NetworkError when attempting to fetch resource.\" (firefox)\n          const client = getClient();\n          const enhanceOption = client?.getOptions().enhanceFetchErrorMessages ?? 'always';\n          const shouldEnhance = enhanceOption !== false;\n\n          if (\n            shouldEnhance &&\n            isError(error) &&\n            error.name === 'TypeError' &&\n            (error.message === 'Failed to fetch' ||\n              error.message === 'Load failed' ||\n              error.message === 'NetworkError when attempting to fetch resource.')\n          ) {\n            try {\n              const url = new URL(handlerData.fetchData.url);\n              const hostname = url.host;\n\n              if (enhanceOption === 'always') {\n                // Modify the error message directly\n                error.message = `${error.message} (${hostname})`;\n              } else {\n                // Store hostname as non-enumerable property for Sentry-only enhancement\n                // This preserves the original error message for third-party packages\n                addNonEnumerableProperty(error, '__sentry_fetch_url_host__', hostname);\n              }\n            } catch {\n              // ignore it if errors happen here\n            }\n          }\n\n          // NOTE: If you are a Sentry user, and you are seeing this stack frame,\n          //       it means the sentry.javascript SDK caught an error invoking your application code.\n          //       This is expected behavior and NOT indicative of a bug with sentry.javascript.\n          throw error;\n        },\n      );\n    };\n  });\n}\n\nasync function resolveResponse(res: Response | undefined, onFinishedResolving: () => void): Promise<void> {\n  if (res?.body) {\n    const body = res.body;\n    const responseReader = body.getReader();\n\n    // Define a maximum duration after which we just cancel\n    const maxFetchDurationTimeout = setTimeout(\n      () => {\n        body.cancel().then(null, () => {\n          // noop\n        });\n      },\n      90 * 1000, // 90s\n    );\n\n    let readingActive = true;\n    while (readingActive) {\n      let chunkTimeout;\n      try {\n        // abort reading if read op takes more than 5s\n        chunkTimeout = setTimeout(() => {\n          body.cancel().then(null, () => {\n            // noop on error\n          });\n        }, 5000);\n\n        // This .read() call will reject/throw when we abort due to timeouts through `body.cancel()`\n        const { done } = await responseReader.read();\n\n        clearTimeout(chunkTimeout);\n\n        if (done) {\n          onFinishedResolving();\n          readingActive = false;\n        }\n      } catch {\n        readingActive = false;\n      } finally {\n        clearTimeout(chunkTimeout);\n      }\n    }\n\n    clearTimeout(maxFetchDurationTimeout);\n\n    responseReader.releaseLock();\n    body.cancel().then(null, () => {\n      // noop on error\n    });\n  }\n}\n\nfunction streamHandler(response: Response): void {\n  // clone response for awaiting stream\n  let clonedResponseForResolving: Response;\n  try {\n    clonedResponseForResolving = response.clone();\n  } catch {\n    return;\n  }\n\n  // eslint-disable-next-line @typescript-eslint/no-floating-promises\n  resolveResponse(clonedResponseForResolving, () => {\n    triggerHandlers('fetch-body-resolved', {\n      endTimestamp: timestampInSeconds() * 1000,\n      response,\n    });\n  });\n}\n\nfunction hasProp<T extends string>(obj: unknown, prop: T): obj is Record<string, string> {\n  return isObjectLike(obj) && !!(obj as Record<string, string>)[prop];\n}\n\nfunction getUrlFromResource(resource: FetchResource): string {\n  if (typeof resource === 'string') {\n    return resource;\n  }\n\n  if (!resource) {\n    return '';\n  }\n\n  if (hasProp(resource, 'url')) {\n    return resource.url;\n  }\n\n  if (resource.toString) {\n    return resource.toString();\n  }\n\n  return '';\n}\n\n/**\n * Parses the fetch arguments to find the used Http method and the url of the request.\n * Exported for tests only.\n */\nexport function parseFetchArgs(fetchArgs: unknown[]): { method: string; url: string } {\n  if (fetchArgs.length === 0) {\n    return { method: 'GET', url: '' };\n  }\n\n  if (fetchArgs.length === 2) {\n    const [resource, options] = fetchArgs as [FetchResource, object];\n\n    return {\n      url: getUrlFromResource(resource),\n      method: hasProp(options, 'method')\n        ? String(options.method).toUpperCase()\n        : // Request object as first argument\n          isRequest(resource) && hasProp(resource, 'method')\n          ? String(resource.method).toUpperCase()\n          : 'GET',\n    };\n  }\n\n  const arg = fetchArgs[0];\n  return {\n    url: getUrlFromResource(arg as FetchResource),\n    method: hasProp(arg, 'method') ? String(arg.method).toUpperCase() : 'GET',\n  };\n}\n\nfunction getHeadersFromFetchArgs(fetchArgs: unknown[]): WebFetchHeaders | undefined {\n  const [requestArgument, optionsArgument] = fetchArgs;\n\n  try {\n    if (\n      typeof optionsArgument === 'object' &&\n      optionsArgument !== null &&\n      'headers' in optionsArgument &&\n      optionsArgument.headers\n    ) {\n      return new Headers(optionsArgument.headers as any);\n    }\n\n    if (isRequest(requestArgument)) {\n      return new Headers(requestArgument.headers);\n    }\n  } catch {\n    // noop\n  }\n\n  return;\n}\n","import type { HandlerDataError } from '../types/instrument';\nimport { GLOBAL_OBJ } from '../utils/worldwide';\nimport { addHandler, maybeInstrument, triggerHandlers } from './handlers';\n\nlet _oldOnErrorHandler: (typeof GLOBAL_OBJ)['onerror'] | null = null;\n\n/**\n * Add an instrumentation handler for when an error is captured by the global error handler.\n *\n * Use at your own risk, this might break without changelog notice, only used internally.\n * @hidden\n */\nexport function addGlobalErrorInstrumentationHandler(handler: (data: HandlerDataError) => void): void {\n  const type = 'error';\n  addHandler(type, handler);\n  maybeInstrument(type, instrumentError);\n}\n\nfunction instrumentError(): void {\n  _oldOnErrorHandler = GLOBAL_OBJ.onerror;\n\n  // Note: The reason we are doing window.onerror instead of window.addEventListener('error')\n  // is that we are using this handler in the Loader Script, to handle buffered errors consistently\n  GLOBAL_OBJ.onerror = function (\n    msg: string | object,\n    url?: string,\n    line?: number,\n    column?: number,\n    error?: Error,\n  ): boolean {\n    const handlerData: HandlerDataError = {\n      column,\n      error,\n      line,\n      msg,\n      url,\n    };\n    triggerHandlers('error', handlerData);\n\n    if (_oldOnErrorHandler) {\n      // eslint-disable-next-line prefer-rest-params\n      return _oldOnErrorHandler.apply(this, arguments);\n    }\n\n    return false;\n  };\n\n  GLOBAL_OBJ.onerror.__SENTRY_INSTRUMENTED__ = true;\n}\n","import type { HandlerDataUnhandledRejection } from '../types/instrument';\nimport { GLOBAL_OBJ } from '../utils/worldwide';\nimport { addHandler, maybeInstrument, triggerHandlers } from './handlers';\n\nlet _oldOnUnhandledRejectionHandler: (typeof GLOBAL_OBJ)['onunhandledrejection'] | null = null;\n\n/**\n * Add an instrumentation handler for when an unhandled promise rejection is captured.\n *\n * Use at your own risk, this might break without changelog notice, only used internally.\n * @hidden\n */\nexport function addGlobalUnhandledRejectionInstrumentationHandler(\n  handler: (data: HandlerDataUnhandledRejection) => void,\n): void {\n  const type = 'unhandledrejection';\n  addHandler(type, handler);\n  maybeInstrument(type, instrumentUnhandledRejection);\n}\n\nfunction instrumentUnhandledRejection(): void {\n  _oldOnUnhandledRejectionHandler = GLOBAL_OBJ.onunhandledrejection;\n\n  // Note: The reason we are doing window.onunhandledrejection instead of window.addEventListener('unhandledrejection')\n  // is that we are using this handler in the Loader Script, to handle buffered rejections consistently\n  GLOBAL_OBJ.onunhandledrejection = function (e: unknown): boolean {\n    const handlerData: HandlerDataUnhandledRejection = e;\n    triggerHandlers('unhandledrejection', handlerData);\n\n    if (_oldOnUnhandledRejectionHandler) {\n      // eslint-disable-next-line prefer-rest-params\n      return _oldOnUnhandledRejectionHandler.apply(this, arguments);\n    }\n\n    return true;\n  };\n\n  GLOBAL_OBJ.onunhandledrejection.__SENTRY_INSTRUMENTED__ = true;\n}\n","import { DEBUG_BUILD } from '../debug-build';\nimport { debug } from '../utils/debug-logger';\nimport { getFunctionName } from '../utils/stacktrace';\n\nexport type InstrumentHandlerType =\n  | 'console'\n  | 'dom'\n  | 'fetch'\n  | 'fetch-body-resolved'\n  | 'history'\n  | 'xhr'\n  | 'error'\n  | 'unhandledrejection';\n// eslint-disable-next-line @typescript-eslint/no-explicit-any\nexport type InstrumentHandlerCallback = (data: any) => void;\n\n// We keep the handlers globally\nconst handlers: { [key in InstrumentHandlerType]?: InstrumentHandlerCallback[] } = {};\nconst instrumented: { [key in InstrumentHandlerType]?: boolean } = {};\n\n/** Add a handler function. Returns a function to remove the handler. */\nexport function addHandler(type: InstrumentHandlerType, handler: InstrumentHandlerCallback): () => void {\n  handlers[type] = handlers[type] || [];\n  handlers[type].push(handler);\n\n  return () => {\n    const typeHandlers = handlers[type];\n    if (typeHandlers) {\n      const index = typeHandlers.indexOf(handler);\n      if (index !== -1) {\n        typeHandlers.splice(index, 1);\n      }\n    }\n  };\n}\n\n/**\n * Reset all instrumentation handlers.\n * This can be used by tests to ensure we have a clean slate of instrumentation handlers.\n */\nexport function resetInstrumentationHandlers(): void {\n  Object.keys(handlers).forEach(key => {\n    handlers[key as InstrumentHandlerType] = undefined;\n  });\n}\n\n/** Maybe run an instrumentation function, unless it was already called. */\nexport function maybeInstrument(type: InstrumentHandlerType, instrumentFn: () => void): void {\n  if (!instrumented[type]) {\n    instrumented[type] = true;\n    try {\n      instrumentFn();\n    } catch (e) {\n      DEBUG_BUILD && debug.error(`Error while instrumenting ${type}`, e);\n    }\n  }\n}\n\n/** Trigger handlers for a given instrumentation type. */\nexport function triggerHandlers(type: InstrumentHandlerType, data: unknown): void {\n  const typeHandlers = type && handlers[type];\n  if (!typeHandlers) {\n    return;\n  }\n\n  for (const handler of typeHandlers) {\n    try {\n      handler(data);\n    } catch (e) {\n      DEBUG_BUILD &&\n        debug.error(\n          `Error while triggering instrumentation handler.\\nType: ${type}\\nName: ${getFunctionName(handler)}\\nError:`,\n          e,\n        );\n    }\n  }\n}\n","import type { Client } from './client';\nimport { getClient } from './currentScopes';\nimport { DEBUG_BUILD } from './debug-build';\nimport type { Event, EventHint } from './types/event';\nimport type { Integration, IntegrationFn } from './types/integration';\nimport type { CoreOptions } from './types/options';\nimport type { StreamedSpanJSON } from './types/span';\nimport { debug } from './utils/debug-logger';\n\nexport const installedIntegrations: string[] = [];\n\n/** Map of integrations assigned to a client */\nexport type IntegrationIndex = {\n  [key: string]: Integration;\n};\n\ntype IntegrationWithDefaultInstance = Integration & { isDefaultInstance?: true };\n\n/**\n * Remove duplicates from the given array, preferring the last instance of any duplicate. Not guaranteed to\n * preserve the order of integrations in the array.\n *\n * @private\n */\nfunction filterDuplicates(integrations: Integration[]): Integration[] {\n  const integrationsByName: { [key: string]: Integration } = {};\n\n  integrations.forEach((currentInstance: IntegrationWithDefaultInstance) => {\n    const { name } = currentInstance;\n\n    const existingInstance: IntegrationWithDefaultInstance | undefined = integrationsByName[name];\n\n    // We want integrations later in the array to overwrite earlier ones of the same type, except that we never want a\n    // default instance to overwrite an existing user instance\n    if (existingInstance && !existingInstance.isDefaultInstance && currentInstance.isDefaultInstance) {\n      return;\n    }\n\n    integrationsByName[name] = currentInstance;\n  });\n\n  return Object.values(integrationsByName);\n}\n\n/** Gets integrations to install */\nexport function getIntegrationsToSetup(\n  options: Pick<CoreOptions, 'defaultIntegrations' | 'integrations'>,\n): Integration[] {\n  const defaultIntegrations = options.defaultIntegrations || [];\n  const userIntegrations = options.integrations;\n\n  // We flag default instances, so that later we can tell them apart from any user-created instances of the same class\n  defaultIntegrations.forEach((integration: IntegrationWithDefaultInstance) => {\n    integration.isDefaultInstance = true;\n  });\n\n  let integrations: Integration[];\n\n  if (Array.isArray(userIntegrations)) {\n    integrations = [...defaultIntegrations, ...userIntegrations];\n  } else if (typeof userIntegrations === 'function') {\n    const resolvedUserIntegrations = userIntegrations(defaultIntegrations);\n    integrations = Array.isArray(resolvedUserIntegrations) ? resolvedUserIntegrations : [resolvedUserIntegrations];\n  } else {\n    integrations = defaultIntegrations;\n  }\n\n  return filterDuplicates(integrations);\n}\n\n/**\n * Given a list of integration instances this installs them all. When `withDefaults` is set to `true` then all default\n * integrations are added unless they were already provided before.\n * @param integrations array of integration instances\n * @param withDefault should enable default integrations\n */\nexport function setupIntegrations(client: Client, integrations: Integration[]): IntegrationIndex {\n  const integrationIndex: IntegrationIndex = {};\n\n  integrations.forEach((integration: Integration | undefined) => {\n    if (integration?.beforeSetup) {\n      integration.beforeSetup(client);\n    }\n  });\n\n  integrations.forEach((integration: Integration | undefined) => {\n    // guard against empty provided integrations\n    if (integration) {\n      setupIntegration(client, integration, integrationIndex);\n    }\n  });\n\n  return integrationIndex;\n}\n\n/**\n * Execute the `afterAllSetup` hooks of the given integrations.\n */\nexport function afterSetupIntegrations(client: Client, integrations: Integration[]): void {\n  for (const integration of integrations) {\n    // guard against empty provided integrations\n    if (integration?.afterAllSetup) {\n      integration.afterAllSetup(client);\n    }\n  }\n}\n\n/** Setup a single integration.  */\nexport function setupIntegration(client: Client, integration: Integration, integrationIndex: IntegrationIndex): void {\n  if (integrationIndex[integration.name]) {\n    DEBUG_BUILD && debug.log(`Integration skipped because it was already installed: ${integration.name}`);\n    return;\n  }\n  integrationIndex[integration.name] = integration;\n\n  // `setupOnce` is only called the first time\n  if (!installedIntegrations.includes(integration.name) && typeof integration.setupOnce === 'function') {\n    integration.setupOnce();\n    installedIntegrations.push(integration.name);\n  }\n\n  // `setup` is run for each client\n  if (integration.setup && typeof integration.setup === 'function') {\n    integration.setup(client);\n  }\n\n  if (typeof integration.preprocessEvent === 'function') {\n    const callback = integration.preprocessEvent.bind(integration) as typeof integration.preprocessEvent;\n    client.on('preprocessEvent', (event, hint) => callback(event, hint, client));\n  }\n\n  if (typeof integration.processEvent === 'function') {\n    const callback = integration.processEvent.bind(integration) as typeof integration.processEvent;\n\n    const processor = Object.assign((event: Event, hint: EventHint) => callback(event, hint, client), {\n      id: integration.name,\n    });\n\n    client.addEventProcessor(processor);\n  }\n\n  (['processSpan', 'processSegmentSpan'] as const).forEach(hook => {\n    const callback = integration[hook];\n    if (typeof callback === 'function') {\n      // The cast is needed because TS can't resolve overloads when the discriminant is a union type.\n      // Both overloads have the same callback signature so this is safe.\n      client.on(hook as 'processSpan', (span: StreamedSpanJSON) => callback.call(integration, span, client));\n    }\n  });\n\n  DEBUG_BUILD && debug.log(`Integration installed: ${integration.name}`);\n}\n\n/** Add an integration to the current scope's client. */\nexport function addIntegration(integration: Integration): void {\n  const client = getClient();\n\n  if (!client) {\n    DEBUG_BUILD && debug.warn(`Cannot add integration \"${integration.name}\" because no SDK Client is available.`);\n    return;\n  }\n\n  client.addIntegration(integration);\n}\n\n/**\n * Define an integration function that can be used to create an integration instance.\n * Note that this by design hides the implementation details of the integration, as they are considered internal.\n */\nexport function defineIntegration<Fn extends IntegrationFn>(\n  fn: Fn,\n): (...args: Parameters<Fn>) => Integration & { name: ReturnType<Fn>['name'] } {\n  return fn;\n}\n\n// When  extending an integration, we allow other properties to be passed-through\ntype IntegrationWithOtherProperties = Record<string, unknown> & Integration;\ntype ExtendedIntegration<Base extends Integration, Extended extends Partial<IntegrationWithOtherProperties>> = Omit<\n  Base,\n  keyof Extended\n> &\n  Extended;\n\n/**\n * Wrap a parent integration with an extended integration.\n * Any passed integration function will call the parent integration function first, if it exists.\n *\n * Example usage:\n *\n * @example\n * ```typescript\n * const parentIntegration = defineIntegration(() => ({\n *   name: 'ParentIntegration',\n *   setupOnce: () => {\n *     console.log('ParentIntegration setupOnce');\n *   },\n * }));\n *\n * const extendedIntegration = extendIntegration(parentIntegration, {\n *   setupOnce: () => {\n *     console.log('ExtendedIntegration setupOnce');\n *   },\n * });\n * ```\n */\nexport function extendIntegration<Base extends Integration, Extended extends Partial<IntegrationWithOtherProperties>>(\n  integration: Base,\n  extendedIntegration: Extended,\n): ExtendedIntegration<Base, Extended> {\n  // The extension overrides the base for any shared key (object spread + the wrapping below), so the\n  // result type drops the overridden base keys rather than intersecting them — `Base & Extended` would\n  // wrongly intersect shared keys (e.g. a re-typed property collapses to `never`).\n  const wrappedIntegration = {\n    ...integration,\n    ...extendedIntegration,\n  } as ExtendedIntegration<Base, Extended>;\n\n  // Make sure that functions that are extended also call the base functions, if defined\n  // oxlint-disable-next-line guard-for-in\n  for (const key in extendedIntegration) {\n    const baseValue = integration[key as keyof Base];\n    const extendedValue = extendedIntegration[key];\n\n    type ValueType = typeof extendedValue;\n\n    if (typeof baseValue === 'function' && typeof extendedValue === 'function') {\n      const wrappedFunction = new Proxy(baseValue, {\n        apply: (target, thisArg, args) => {\n          Reflect.apply(target, thisArg, args);\n          return Reflect.apply(extendedValue, thisArg, args);\n        },\n      }) as ValueType;\n\n      // We know this is OK, but typescript does not properly narrow/infer types here\n      // so instead of casting the wrappedFunction to some complicated type, we just make clear that we simply overwrite this\n      (wrappedIntegration as Record<string, unknown>)[key] = wrappedFunction;\n    }\n  }\n\n  return wrappedIntegration;\n}\n","import { getClient, withScope } from '../currentScopes';\nimport { captureException } from '../exports';\nimport { addConsoleInstrumentationHandler } from '../instrument/console';\nimport { defineIntegration } from '../integration';\nimport type { CaptureContext } from '../scope';\nimport type { IntegrationFn } from '../types/integration';\nimport { CONSOLE_LEVELS } from '../utils/debug-logger';\nimport { addExceptionMechanism } from '../utils/misc';\nimport { severityLevelFromString } from '../utils/severity';\nimport { safeJoin } from '../utils/string';\nimport { GLOBAL_OBJ } from '../utils/worldwide';\n\ninterface CaptureConsoleOptions {\n  levels?: string[];\n\n  /**\n   * By default, Sentry will mark captured console messages as handled.\n   * Set this to `false` if you want to mark them as unhandled instead.\n   *\n   * @default true\n   */\n  handled?: boolean;\n}\n\nconst INTEGRATION_NAME = 'CaptureConsole' as const;\n\nconst _captureConsoleIntegration = ((options: CaptureConsoleOptions = {}) => {\n  const levels = options.levels || CONSOLE_LEVELS;\n  const handled = options.handled ?? true;\n\n  return {\n    name: INTEGRATION_NAME,\n    setup(client) {\n      if (!('console' in GLOBAL_OBJ)) {\n        return;\n      }\n\n      addConsoleInstrumentationHandler(({ args, level }) => {\n        if (getClient() !== client || !levels.includes(level)) {\n          return;\n        }\n\n        consoleHandler(args, level, handled);\n      });\n    },\n  };\n}) satisfies IntegrationFn;\n\n/**\n * Send Console API calls as Sentry Events.\n */\nexport const captureConsoleIntegration = defineIntegration(_captureConsoleIntegration);\n\nfunction consoleHandler(args: unknown[], level: string, handled: boolean): void {\n  const severityLevel = severityLevelFromString(level);\n\n  /*\n    We create this error here already to attach a stack trace to captured messages,\n    if users set `attachStackTrace` to `true` in Sentry.init.\n    We do this here already because we want to minimize the number of Sentry SDK stack frames\n    within the error. Technically, Client.captureMessage will also do it but this happens several\n    stack frames deeper.\n  */\n  const syntheticException = new Error();\n\n  const captureContext: CaptureContext = {\n    level: severityLevelFromString(level),\n    extra: {\n      arguments: args,\n    },\n  };\n\n  withScope(scope => {\n    scope.addEventProcessor(event => {\n      event.logger = 'console';\n\n      addExceptionMechanism(event, {\n        handled,\n        type: 'auto.core.capture_console',\n      });\n\n      return event;\n    });\n\n    if (level === 'assert') {\n      if (!args[0]) {\n        const message = `Assertion failed: ${safeJoin(args.slice(1), ' ') || 'console.assert'}`;\n        scope.setExtra('arguments', args.slice(1));\n        scope.captureMessage(message, severityLevel, { captureContext, syntheticException });\n      }\n      return;\n    }\n\n    const error = args.find(arg => arg instanceof Error);\n    if (error) {\n      captureException(error, captureContext);\n      return;\n    }\n\n    const message = safeJoin(args, ' ');\n    scope.captureMessage(message, severityLevel, { captureContext, syntheticException });\n  });\n}\n","import type { Client } from '../client';\nimport { getClient } from '../currentScopes';\nimport { _INTERNAL_captureLog } from '../logs/internal';\nimport { createConsoleTemplateAttributes, formatConsoleArgs, hasConsoleSubstitutions } from '../logs/utils';\nimport type { LogSeverityLevel } from '../types/log';\nimport { isPlainObject } from '../utils/is';\nimport { normalize } from '../utils/normalize';\n\n/**\n * Result of extracting structured attributes from console arguments.\n */\ninterface ExtractAttributesResult {\n  /**\n   * The log message to use for the log entry, typically constructed from the console arguments.\n   */\n  message?: string;\n\n  /**\n   * The parameterized template string which is added as `sentry.message.template` attribute if applicable.\n   */\n  messageTemplate?: string;\n\n  /**\n   * Remaining arguments to process as attributes with keys like `sentry.message.parameter.0`, `sentry.message.parameter.1`, etc.\n   */\n  messageParameters?: unknown[];\n\n  /**\n   * Additional attributes to add to the log.\n   */\n  attributes?: Record<string, unknown>;\n}\n\n/**\n * Options for the Sentry Consola reporter.\n */\ninterface ConsolaReporterOptions {\n  /**\n   * Use this option to filter which levels should be captured. By default, all levels are captured.\n   *\n   * @example\n   * ```ts\n   * const sentryReporter = Sentry.createConsolaReporter({\n   *   // Only capture error and warn logs\n   *   levels: ['error', 'warn'],\n   * });\n   * consola.addReporter(sentryReporter);\n   * ```\n   */\n  levels?: Array<LogSeverityLevel>;\n\n  /**\n   * Optionally provide a specific Sentry client instance to use for capturing logs.\n   * If not provided, the current client will be retrieved using `getClient()`.\n   *\n   * This is useful when you want to use specific client options for log normalization\n   * or when working with multiple client instances.\n   *\n   * @example\n   * ```ts\n   * const sentryReporter = Sentry.createConsolaReporter({\n   *   client: myCustomClient,\n   * });\n   * ```\n   */\n  client?: Client;\n}\n\nexport interface ConsolaReporter {\n  log: (logObj: ConsolaLogObject) => void;\n}\n\n/**\n * Represents a log object that Consola reporters receive.\n *\n * This interface matches the structure of log objects passed to Consola reporters.\n * See: https://github.com/unjs/consola#custom-reporters\n *\n * @example\n * ```ts\n * const reporter = {\n *   log(logObj: ConsolaLogObject) {\n *     console.log(`[${logObj.type}] ${logObj.message || logObj.args?.join(' ')}`);\n *   }\n * };\n * consola.addReporter(reporter);\n * ```\n */\nexport interface ConsolaLogObject {\n  /**\n   * Allows additional custom properties to be set on the log object. These properties will be captured as log attributes.\n   *\n   * Additional properties are set when passing a single object with a `message` (`consola.[type]({ message: '', ... })`) or if the reporter is called directly\n   *\n   * @example\n   * ```ts\n   * const reporter = Sentry.createConsolaReporter();\n   * reporter.log({\n   *   type: 'info',\n   *   message: 'User action',\n   *   userId: 123,\n   *   sessionId: 'abc-123'\n   * });\n   * // Will create attributes: `userId` and `sessionId`\n   * ```\n   */\n  [key: string]: unknown;\n\n  /**\n   * The numeric log level (0-5) or null.\n   *\n   * Consola log levels:\n   * - 0: Fatal and Error\n   * - 1: Warnings\n   * - 2: Normal logs\n   * - 3: Informational logs, success, fail, ready, start, box, ...\n   * - 4: Debug logs\n   * - 5: Trace logs\n   * - null: Some special types like 'verbose'\n   *\n   * See: https://github.com/unjs/consola/blob/main/README.md#log-level\n   */\n  level?: number | null;\n\n  /**\n   * The log type/method name (e.g., 'error', 'warn', 'info', 'debug', 'trace', 'success', 'fail', etc.).\n   *\n   * Consola built-in types include:\n   * - Standard: silent, fatal, error, warn, log, info, success, fail, ready, start, box, debug, trace, verbose\n   * - Custom types can also be defined\n   *\n   * See: https://github.com/unjs/consola/blob/main/README.md#log-types\n   */\n  type?: string;\n\n  /**\n   * An optional tag/scope for the log entry.\n   *\n   * Tags are created using `consola.withTag('scope')` and help categorize logs.\n   *\n   * @example\n   * ```ts\n   * const scopedLogger = consola.withTag('auth');\n   * scopedLogger.info('User logged in'); // tag will be 'auth'\n   * ```\n   *\n   * See: https://github.com/unjs/consola/blob/main/README.md#withtagtag\n   */\n  tag?: string;\n\n  /**\n   * The raw arguments passed to the log method.\n   *\n   * These args are typically formatted into the final `message`. In Consola reporters, `message` is not provided. See: https://github.com/unjs/consola/issues/406#issuecomment-3684792551\n   *\n   * @example\n   * ```ts\n   * consola.info('Hello', 'world', { user: 'john' });\n   * // args = ['Hello', 'world', { user: 'john' }]\n   * ```\n   *\n   * @example\n   * ```ts\n   * // `message` is a reserved property in Consola\n   * consola.log({ message: 'Hello' });\n   * // args = ['Hello']\n   * ```\n   */\n  args?: unknown[];\n\n  /**\n   * The timestamp when the log was created.\n   *\n   * This is automatically set by Consola when the log is created.\n   */\n  date?: Date;\n\n  /**\n   * The formatted log message.\n   *\n   * When provided, this is the final formatted message. When not provided,\n   * the message should be constructed from the `args` array.\n   *\n   * Note: In reporters, `message` is typically undefined. It is primarily for\n   * `consola.[type]({ message: 'xxx' })` usage and is normalized into `args` before\n   * reporters receive the log object. See: https://github.com/unjs/consola/issues/406#issuecomment-3684792551\n   */\n  message?: string;\n}\n\nconst DEFAULT_CAPTURED_LEVELS: Array<LogSeverityLevel> = ['trace', 'debug', 'info', 'warn', 'error', 'fatal'];\n\n/**\n * Creates a new Sentry reporter for Consola that forwards logs to Sentry.\n *\n * **Note: This integration supports Consola v3.x only.** The reporter interface and log object structure\n * may differ in other versions of Consola.\n *\n * @param options - Configuration options for the reporter.\n * @returns A Consola reporter that can be added to consola instances.\n *\n * @example\n * ```ts\n * import * as Sentry from '@sentry/node';\n * import { consola } from 'consola';\n *\n * Sentry.init({\n *   dsn: '__DSN__',\n * });\n *\n * const sentryReporter = Sentry.createConsolaReporter({\n *   // Optional: filter levels to capture\n *   levels: ['error', 'warn', 'info'],\n * });\n *\n * consola.addReporter(sentryReporter);\n *\n * // Now consola logs will be captured by Sentry\n * consola.info('This will be sent to Sentry');\n * consola.error('This error will also be sent to Sentry');\n * ```\n */\nexport function createConsolaReporter(options: ConsolaReporterOptions = {}): ConsolaReporter {\n  const levels = new Set(options.levels ?? DEFAULT_CAPTURED_LEVELS);\n  const providedClient = options.client;\n\n  return {\n    log(logObj: ConsolaLogObject) {\n      // We need to exclude certain known properties from being added as additional attributes\n      // eslint-disable-next-line @typescript-eslint/no-unused-vars\n      const { type, level, message: consolaMessage, args, tag, date: _date, ...rest } = logObj;\n\n      // Get client - use provided client or current client\n      const client = providedClient || getClient();\n      if (!client) {\n        return;\n      }\n\n      // Determine the log severity level\n      const logSeverityLevel = getLogSeverityLevel(type, level);\n\n      // Early exit if this level should not be captured\n      if (!levels.has(logSeverityLevel)) {\n        return;\n      }\n\n      const { normalizeDepth = 3, normalizeMaxBreadth = 1_000 } = client.getOptions();\n\n      const attributes: Record<string, unknown> = {};\n\n      // Build attributes\n      for (const [key, value] of Object.entries(rest)) {\n        attributes[key] = normalize(value, normalizeDepth, normalizeMaxBreadth);\n      }\n\n      attributes['sentry.origin'] = 'auto.log.consola';\n\n      if (tag) {\n        attributes['consola.tag'] = tag;\n      }\n\n      if (type) {\n        attributes['consola.type'] = type;\n      }\n\n      // Only add level if it's a valid number (not null/undefined)\n      if (level != null && typeof level === 'number') {\n        attributes['consola.level'] = level;\n      }\n\n      const extractionResult = processExtractedAttributes(\n        defaultExtractAttributes(args, normalizeDepth, normalizeMaxBreadth),\n        normalizeDepth,\n        normalizeMaxBreadth,\n      );\n\n      if (extractionResult?.attributes) {\n        Object.assign(attributes, extractionResult.attributes);\n      }\n\n      _INTERNAL_captureLog({\n        level: logSeverityLevel,\n        message:\n          extractionResult?.message ||\n          consolaMessage ||\n          (args && formatConsoleArgs(args, normalizeDepth, normalizeMaxBreadth)) ||\n          '',\n        attributes,\n      });\n    },\n  };\n}\n\n// Mapping from consola log types to Sentry log severity levels\nconst CONSOLA_TYPE_TO_LOG_SEVERITY_LEVEL_MAP: Record<string, LogSeverityLevel> = {\n  // Consola built-in types\n  silent: 'trace',\n  fatal: 'fatal',\n  error: 'error',\n  warn: 'warn',\n  log: 'info',\n  info: 'info',\n  success: 'info',\n  fail: 'error',\n  ready: 'info',\n  start: 'info',\n  box: 'info',\n  debug: 'debug',\n  trace: 'trace',\n  verbose: 'debug',\n  // Custom types that might exist\n  critical: 'fatal',\n  notice: 'info',\n};\n\n// Mapping from consola log levels (numbers) to Sentry log severity levels\nconst CONSOLA_LEVEL_TO_LOG_SEVERITY_LEVEL_MAP: Record<number, LogSeverityLevel> = {\n  0: 'fatal', // Fatal and Error\n  1: 'warn', // Warnings\n  2: 'info', // Normal logs\n  3: 'info', // Informational logs, success, fail, ready, start, ...\n  4: 'debug', // Debug logs\n  5: 'trace', // Trace logs\n};\n\n/**\n * Determines the log severity level from Consola type and level.\n *\n * @param type - The Consola log type (e.g., 'error', 'warn', 'info')\n * @param level - The Consola numeric log level (0-5) or null for some types like 'verbose'\n * @returns The corresponding Sentry log severity level\n */\nfunction getLogSeverityLevel(type?: string, level?: number | null): LogSeverityLevel {\n  // Handle special case for verbose logs (level can be null with infinite level in Consola)\n  if (type === 'verbose') {\n    return 'debug';\n  }\n\n  // Handle silent logs - these should be at trace level\n  if (type === 'silent') {\n    return 'trace';\n  }\n\n  // First try to map by type (more specific)\n  if (type) {\n    const mappedLevel = CONSOLA_TYPE_TO_LOG_SEVERITY_LEVEL_MAP[type];\n    if (mappedLevel) {\n      return mappedLevel;\n    }\n  }\n\n  // Fallback to level mapping (handle null level)\n  if (typeof level === 'number') {\n    const mappedLevel = CONSOLA_LEVEL_TO_LOG_SEVERITY_LEVEL_MAP[level];\n    if (mappedLevel) {\n      return mappedLevel;\n    }\n  }\n\n  // Default fallback\n  return 'info';\n}\n\n/**\n * Extracts structured attributes from console arguments. If the first argument is a plain object, its properties are extracted as attributes.\n */\nfunction defaultExtractAttributes(\n  args: unknown[] | undefined,\n  normalizeDepth: number,\n  normalizeMaxBreadth: number,\n): ExtractAttributesResult {\n  if (!args?.length) {\n    return { message: '' };\n  }\n\n  // Message looks like how consola logs the message to the console (all args stringified and joined)\n  const message = formatConsoleArgs(args, normalizeDepth, normalizeMaxBreadth);\n\n  const firstArg = args[0];\n\n  if (isPlainObject(firstArg)) {\n    // Remaining args start from index 2 i f we used second arg as message, otherwise from index 1\n    const remainingArgsStartIndex = typeof args[1] === 'string' ? 2 : 1;\n    const remainingArgs = args.slice(remainingArgsStartIndex);\n\n    return {\n      message,\n      // Object content from first arg is added as attributes\n      attributes: firstArg,\n      // Add remaining args as message parameters\n      messageParameters: remainingArgs,\n    };\n  } else {\n    const followingArgs = args.slice(1);\n\n    const shouldAddTemplateAttr =\n      followingArgs.length > 0 && typeof firstArg === 'string' && !hasConsoleSubstitutions(firstArg);\n\n    return {\n      message,\n      messageTemplate: shouldAddTemplateAttr ? firstArg : undefined,\n      messageParameters: shouldAddTemplateAttr ? followingArgs : undefined,\n    };\n  }\n}\n\n/**\n * Processes extracted attributes by normalizing them and preparing message parameter attributes if a template is present.\n */\nfunction processExtractedAttributes(\n  extractionResult: ExtractAttributesResult,\n  normalizeDepth: number,\n  normalizeMaxBreadth: number,\n): { message: string | undefined; attributes: Record<string, unknown> } {\n  const { message, attributes, messageTemplate, messageParameters } = extractionResult;\n\n  const messageParamAttributes: Record<string, unknown> = {};\n\n  if (messageTemplate && messageParameters) {\n    const templateAttrs = createConsoleTemplateAttributes(messageTemplate, messageParameters);\n\n    for (const [key, value] of Object.entries(templateAttrs)) {\n      messageParamAttributes[key] = key.startsWith('sentry.message.parameter.')\n        ? normalize(value, normalizeDepth, normalizeMaxBreadth)\n        : value;\n    }\n  } else if (messageParameters && messageParameters.length > 0) {\n    messageParameters.forEach((arg, index) => {\n      messageParamAttributes[`sentry.message.parameter.${index}`] = normalize(arg, normalizeDepth, normalizeMaxBreadth);\n    });\n  }\n\n  return {\n    message: message,\n    attributes: {\n      ...normalize(attributes, normalizeDepth, normalizeMaxBreadth),\n      ...messageParamAttributes,\n    },\n  };\n}\n","import { addBreadcrumb } from '../breadcrumbs';\nimport { getClient } from '../currentScopes';\nimport { addConsoleInstrumentationFilter, addConsoleInstrumentationHandler } from '../instrument/console';\nimport { defineIntegration } from '../integration';\nimport type { ConsoleLevel } from '../types/instrument';\nimport { CONSOLE_LEVELS } from '../utils/debug-logger';\nimport { severityLevelFromString } from '../utils/severity';\nimport { safeJoin } from '../utils/string';\nimport { GLOBAL_OBJ } from '../utils/worldwide';\n\ninterface ConsoleIntegrationOptions {\n  levels: ConsoleLevel[];\n  /**\n   * Filter out console messages that match the given strings or regular expressions.\n   * These will neither be passed to the handler, and they will also not be logged to the user, unless they have debug enabled.\n   */\n  filter?: (string | RegExp)[];\n}\n\ntype GlobalObjectWithUtil = typeof GLOBAL_OBJ & {\n  util: {\n    format: (...args: unknown[]) => string;\n  };\n};\n\nconst INTEGRATION_NAME = 'Console' as const;\n\n/**\n * Captures calls to the `console` API as breadcrumbs in Sentry.\n *\n * By default the integration instruments `console.debug`, `console.info`, `console.warn`, `console.error`,\n * `console.log`, `console.trace`, and `console.assert`. You can use the `levels` option to customize which\n * levels are captured.\n *\n * @example\n *\n * ```js\n * Sentry.init({\n *   integrations: [Sentry.consoleIntegration({ levels: ['error', 'warn'] })],\n * });\n * ```\n */\nexport const consoleIntegration = defineIntegration((options: Partial<ConsoleIntegrationOptions> = {}) => {\n  const levels = new Set(options.levels || CONSOLE_LEVELS);\n\n  return {\n    name: INTEGRATION_NAME,\n    setup(client) {\n      const unsubscribe = addConsoleInstrumentationHandler(({ args, level }) => {\n        if (getClient() !== client || !levels.has(level)) {\n          return;\n        }\n\n        addConsoleBreadcrumb(level, args);\n      });\n      client.registerCleanup(unsubscribe);\n\n      if (options.filter) {\n        const unsubscribe = addConsoleInstrumentationFilter(options.filter);\n        client.registerCleanup(unsubscribe);\n      }\n    },\n  };\n});\n\n/**\n * Capture a console breadcrumb.\n *\n * Exported just for tests.\n */\nexport function addConsoleBreadcrumb(level: ConsoleLevel, args: unknown[]): void {\n  const breadcrumb = {\n    category: 'console',\n    data: {\n      arguments: args,\n      logger: 'console',\n    },\n    level: severityLevelFromString(level),\n    message: formatConsoleArgs(args),\n  };\n\n  if (level === 'assert') {\n    if (args[0] === false) {\n      const assertionArgs = args.slice(1);\n      breadcrumb.message =\n        assertionArgs.length > 0 ? `Assertion failed: ${formatConsoleArgs(assertionArgs)}` : 'Assertion failed';\n      breadcrumb.data.arguments = assertionArgs;\n    } else {\n      // Don't capture a breadcrumb for passed assertions\n      return;\n    }\n  }\n\n  addBreadcrumb(breadcrumb, {\n    input: args,\n    level,\n  });\n}\n\nfunction formatConsoleArgs(values: unknown[]): string {\n  return 'util' in GLOBAL_OBJ && typeof (GLOBAL_OBJ as GlobalObjectWithUtil).util.format === 'function'\n    ? (GLOBAL_OBJ as GlobalObjectWithUtil).util.format(...values)\n    : safeJoin(values, ' ');\n}\n","import type { Client } from '../client';\nimport { getCurrentScope, getIsolationScope } from '../currentScopes';\nimport { defineIntegration } from '../integration';\nimport { GEN_AI_CONVERSATION_ID_ATTRIBUTE } from '../semanticAttributes';\nimport type { IntegrationFn } from '../types/integration';\nimport type { Span } from '../types/span';\nimport { spanToJSON } from '../utils/spanUtils';\n\nconst INTEGRATION_NAME = 'ConversationId' as const;\n\nconst _conversationIdIntegration = (() => {\n  return {\n    name: INTEGRATION_NAME,\n    setup(client: Client) {\n      client.on('spanStart', (span: Span) => {\n        const scopeData = getCurrentScope().getScopeData();\n        const isolationScopeData = getIsolationScope().getScopeData();\n\n        const conversationId = scopeData.conversationId || isolationScopeData.conversationId;\n\n        if (conversationId) {\n          const { op, data: attributes, description: name } = spanToJSON(span);\n\n          // Only apply conversation ID to gen_ai spans.\n          // We also check for Vercel AI spans (ai.operationId attribute or ai.* span name)\n          // because the Vercel AI integration sets the gen_ai.* op in its own spanStart handler\n          // which fires after this, so the op is not yet available at this point.\n          if (!op?.startsWith('gen_ai.') && !attributes['ai.operationId'] && !name?.startsWith('ai.')) {\n            return;\n          }\n\n          span.setAttribute(GEN_AI_CONVERSATION_ID_ATTRIBUTE, conversationId);\n        }\n      });\n    },\n  };\n}) satisfies IntegrationFn;\n\n/**\n * Automatically applies conversation ID from scope to spans.\n *\n * This integration reads the conversation ID from the current or isolation scope\n * and applies it to spans when they start. This ensures the conversation ID is\n * available for all AI-related operations.\n */\nexport const conversationIdIntegration = defineIntegration(_conversationIdIntegration);\n","import { DEBUG_BUILD } from '../debug-build';\nimport { defineIntegration } from '../integration';\nimport type { Event } from '../types/event';\nimport type { Exception } from '../types/exception';\nimport type { IntegrationFn } from '../types/integration';\nimport type { StackFrame } from '../types/stackframe';\nimport { debug } from '../utils/debug-logger';\nimport { getFramesFromEvent } from '../utils/stacktrace';\n\nconst INTEGRATION_NAME = 'Dedupe' as const;\n\nconst _dedupeIntegration = (() => {\n  let previousEvent: Event | undefined;\n\n  return {\n    name: INTEGRATION_NAME,\n    processEvent(currentEvent) {\n      // We want to ignore any non-error type events, e.g. transactions or replays\n      // These should never be deduped, and also not be compared against as _previousEvent.\n      if (currentEvent.type) {\n        return currentEvent;\n      }\n\n      // Juuust in case something goes wrong\n      try {\n        if (_shouldDropEvent(currentEvent, previousEvent)) {\n          DEBUG_BUILD && debug.warn('Event dropped due to being a duplicate of previously captured event.');\n          return null;\n        }\n      } catch {} // eslint-disable-line no-empty\n\n      return (previousEvent = currentEvent);\n    },\n  };\n}) satisfies IntegrationFn;\n\n/**\n * Deduplication filter.\n */\nexport const dedupeIntegration = defineIntegration(_dedupeIntegration);\n\n/** only exported for tests. */\nexport function _shouldDropEvent(currentEvent: Event, previousEvent?: Event): boolean {\n  if (!previousEvent) {\n    return false;\n  }\n\n  if (_isSameMessageEvent(currentEvent, previousEvent)) {\n    return true;\n  }\n\n  if (_isSameExceptionEvent(currentEvent, previousEvent)) {\n    return true;\n  }\n\n  return false;\n}\n\nfunction _isSameMessageEvent(currentEvent: Event, previousEvent: Event): boolean {\n  const currentMessage = currentEvent.message;\n  const previousMessage = previousEvent.message;\n\n  // If neither event has a message property, they were both exceptions, so bail out\n  if (!currentMessage && !previousMessage) {\n    return false;\n  }\n\n  // If only one event has a stacktrace, but not the other one, they are not the same\n  if ((currentMessage && !previousMessage) || (!currentMessage && previousMessage)) {\n    return false;\n  }\n\n  if (currentMessage !== previousMessage) {\n    return false;\n  }\n\n  if (!_isSameFingerprint(currentEvent, previousEvent)) {\n    return false;\n  }\n\n  if (!_isSameStacktrace(currentEvent, previousEvent)) {\n    return false;\n  }\n\n  return true;\n}\n\nfunction _isSameExceptionEvent(currentEvent: Event, previousEvent: Event): boolean {\n  const previousException = _getExceptionFromEvent(previousEvent);\n  const currentException = _getExceptionFromEvent(currentEvent);\n\n  if (!previousException || !currentException) {\n    return false;\n  }\n\n  if (previousException.type !== currentException.type || previousException.value !== currentException.value) {\n    return false;\n  }\n\n  if (!_isSameFingerprint(currentEvent, previousEvent)) {\n    return false;\n  }\n\n  if (!_isSameStacktrace(currentEvent, previousEvent)) {\n    return false;\n  }\n\n  return true;\n}\n\nfunction _isSameStacktrace(currentEvent: Event, previousEvent: Event): boolean {\n  let currentFrames = getFramesFromEvent(currentEvent);\n  let previousFrames = getFramesFromEvent(previousEvent);\n\n  // If neither event has a stacktrace, they are assumed to be the same\n  if (!currentFrames && !previousFrames) {\n    return true;\n  }\n\n  // If only one event has a stacktrace, but not the other one, they are not the same\n  if ((currentFrames && !previousFrames) || (!currentFrames && previousFrames)) {\n    return false;\n  }\n\n  currentFrames = currentFrames as StackFrame[];\n  previousFrames = previousFrames as StackFrame[];\n\n  // If number of frames differ, they are not the same\n  if (previousFrames.length !== currentFrames.length) {\n    return false;\n  }\n\n  // Otherwise, compare the two\n  for (let i = 0; i < previousFrames.length; i++) {\n    // eslint-disable-next-line @typescript-eslint/no-non-null-assertion\n    const frameA = previousFrames[i]!;\n    // eslint-disable-next-line @typescript-eslint/no-non-null-assertion\n    const frameB = currentFrames[i]!;\n\n    if (\n      frameA.filename !== frameB.filename ||\n      frameA.lineno !== frameB.lineno ||\n      frameA.colno !== frameB.colno ||\n      frameA.function !== frameB.function\n    ) {\n      return false;\n    }\n  }\n\n  return true;\n}\n\nfunction _isSameFingerprint(currentEvent: Event, previousEvent: Event): boolean {\n  let currentFingerprint = currentEvent.fingerprint;\n  let previousFingerprint = previousEvent.fingerprint;\n\n  // If neither event has a fingerprint, they are assumed to be the same\n  if (!currentFingerprint && !previousFingerprint) {\n    return true;\n  }\n\n  // If only one event has a fingerprint, but not the other one, they are not the same\n  if ((currentFingerprint && !previousFingerprint) || (!currentFingerprint && previousFingerprint)) {\n    return false;\n  }\n\n  currentFingerprint = currentFingerprint as string[];\n  previousFingerprint = previousFingerprint as string[];\n\n  // Otherwise, compare the two\n  try {\n    return !!(currentFingerprint.join('') === previousFingerprint.join(''));\n  } catch {\n    return false;\n  }\n}\n\nfunction _getExceptionFromEvent(event: Event): Exception | undefined {\n  return event.exception?.values?.[0];\n}\n","import { DEBUG_BUILD } from '../debug-build';\nimport { defineIntegration } from '../integration';\nimport type { Event } from '../types/event';\nimport type { IntegrationFn } from '../types/integration';\nimport type { StackFrame } from '../types/stackframe';\nimport { debug } from '../utils/debug-logger';\nimport { getPossibleEventMessages } from '../utils/eventUtils';\nimport { getEventDescription } from '../utils/misc';\nimport { stringMatchesSomePattern } from '../utils/string';\n\n// \"Script error.\" is hard coded into browsers for errors that it can't read.\n// this is the result of a script being pulled in from an external domain and CORS.\nconst DEFAULT_IGNORE_ERRORS = [\n  /^Script error\\.?$/,\n  /^Javascript error: Script error\\.? on line 0$/,\n  /^ResizeObserver loop completed with undelivered notifications.$/, // The browser logs this when a ResizeObserver handler takes a bit longer. Usually this is not an actual issue though. It indicates slowness.\n  /^Cannot redefine property: googletag$/, // This is thrown when google tag manager is used in combination with an ad blocker\n  /^Can't find variable: gmo$/, // Error from Google Search App https://issuetracker.google.com/issues/396043331\n  /^undefined is not an object \\(evaluating 'a\\.[A-Z]'\\)$/, // Random error that happens but not actionable or noticeable to end-users.\n  /can't redefine non-configurable property \"solana\"/, // Probably a browser extension or custom browser (Brave) throwing this error\n  /vv\\(\\)\\.getRestrictions is not a function/, // Error thrown by GTM, seemingly not affecting end-users\n  /Can't find variable: _AutofillCallbackHandler/, // Unactionable error in instagram webview https://developers.facebook.com/community/threads/320013549791141/\n  /Object Not Found Matching Id:\\d+, MethodName:simulateEvent/, // unactionable error from CEFSharp, a .NET library that embeds chromium in .NET apps\n  /Java exception was raised during method invocation$/, // error from Facebook Mobile browser (https://github.com/getsentry/sentry-javascript/issues/15065, https://github.com/getsentry/sentry-javascript/issues/23733)\n  /Java object is gone$/, // error from Facebook Mobile browser (https://github.com/getsentry/sentry-javascript/issues/15065, https://github.com/getsentry/sentry-javascript/issues/23733)\n];\n\n/** Options for the EventFilters integration */\nexport interface EventFiltersOptions {\n  allowUrls: Array<string | RegExp>;\n  denyUrls: Array<string | RegExp>;\n  ignoreErrors: Array<string | RegExp>;\n  ignoreTransactions: Array<string | RegExp>;\n  ignoreInternal: boolean;\n  disableErrorDefaults: boolean;\n}\n\nconst INTEGRATION_NAME = 'EventFilters' as const;\n\n/**\n * An integration that filters out events (errors and transactions) based on:\n *\n * - (Errors) A curated list of known low-value or irrelevant errors (see {@link DEFAULT_IGNORE_ERRORS})\n * - (Errors) A list of error messages or urls/filenames passed in via\n *   - Top level Sentry.init options (`ignoreErrors`, `denyUrls`, `allowUrls`)\n *   - The same options passed to the integration directly via @param options\n * - (Transactions/Spans) A list of root span (transaction) names passed in via\n *   - Top level Sentry.init option (`ignoreTransactions`)\n *   - The same option passed to the integration directly via @param options\n *\n * Events filtered by this integration will not be sent to Sentry.\n */\nexport const eventFiltersIntegration = defineIntegration((options: Partial<EventFiltersOptions> = {}) => {\n  let mergedOptions: Partial<EventFiltersOptions> | undefined;\n  return {\n    name: INTEGRATION_NAME,\n    setup(client) {\n      const clientOptions = client.getOptions();\n      mergedOptions = _mergeOptions(options, clientOptions);\n    },\n    processEvent(event, _hint, client) {\n      if (!mergedOptions) {\n        const clientOptions = client.getOptions();\n        mergedOptions = _mergeOptions(options, clientOptions);\n      }\n      return _shouldDropEvent(event, mergedOptions) ? null : event;\n    },\n  };\n});\n\n/**\n * An integration that filters out events (errors and transactions) based on:\n *\n * - (Errors) A curated list of known low-value or irrelevant errors (see {@link DEFAULT_IGNORE_ERRORS})\n * - (Errors) A list of error messages or urls/filenames passed in via\n *   - Top level Sentry.init options (`ignoreErrors`, `denyUrls`, `allowUrls`)\n *   - The same options passed to the integration directly via @param options\n * - (Transactions/Spans) A list of root span (transaction) names passed in via\n *   - Top level Sentry.init option (`ignoreTransactions`)\n *   - The same option passed to the integration directly via @param options\n *\n * Events filtered by this integration will not be sent to Sentry.\n *\n * @deprecated this integration was renamed and will be removed in a future major version.\n * Use `eventFiltersIntegration` instead.\n */\nexport const inboundFiltersIntegration = defineIntegration(((options: Partial<EventFiltersOptions> = {}) => {\n  return {\n    ...eventFiltersIntegration(options),\n    name: 'InboundFilters' as const,\n  };\n}) satisfies IntegrationFn);\n\nfunction _mergeOptions(\n  internalOptions: Partial<EventFiltersOptions> = {},\n  clientOptions: Partial<EventFiltersOptions> = {},\n): Partial<EventFiltersOptions> {\n  return {\n    allowUrls: [...(internalOptions.allowUrls || []), ...(clientOptions.allowUrls || [])],\n    denyUrls: [...(internalOptions.denyUrls || []), ...(clientOptions.denyUrls || [])],\n    ignoreErrors: [\n      ...(internalOptions.ignoreErrors || []),\n      ...(clientOptions.ignoreErrors || []),\n      ...(internalOptions.disableErrorDefaults ? [] : DEFAULT_IGNORE_ERRORS),\n    ],\n    ignoreTransactions: [...(internalOptions.ignoreTransactions || []), ...(clientOptions.ignoreTransactions || [])],\n  };\n}\n\nfunction _shouldDropEvent(event: Event, options: Partial<EventFiltersOptions>): boolean {\n  if (!event.type) {\n    // Filter errors\n    if (_isIgnoredError(event, options.ignoreErrors)) {\n      DEBUG_BUILD &&\n        debug.warn(\n          `Event dropped due to being matched by \\`ignoreErrors\\` option.\\nEvent: ${getEventDescription(event)}`,\n        );\n      return true;\n    }\n    if (_isUselessError(event)) {\n      DEBUG_BUILD &&\n        debug.warn(\n          `Event dropped due to not having an error message, error type or stacktrace.\\nEvent: ${getEventDescription(\n            event,\n          )}`,\n        );\n      return true;\n    }\n    if (_isDeniedUrl(event, options.denyUrls)) {\n      DEBUG_BUILD &&\n        debug.warn(\n          `Event dropped due to being matched by \\`denyUrls\\` option.\\nEvent: ${getEventDescription(\n            event,\n          )}.\\nUrl: ${_getEventFilterUrl(event)}`,\n        );\n      return true;\n    }\n    if (!_isAllowedUrl(event, options.allowUrls)) {\n      DEBUG_BUILD &&\n        debug.warn(\n          `Event dropped due to not being matched by \\`allowUrls\\` option.\\nEvent: ${getEventDescription(\n            event,\n          )}.\\nUrl: ${_getEventFilterUrl(event)}`,\n        );\n      return true;\n    }\n  } else if (event.type === 'transaction') {\n    // Filter transactions\n\n    if (_isIgnoredTransaction(event, options.ignoreTransactions)) {\n      DEBUG_BUILD &&\n        debug.warn(\n          `Event dropped due to being matched by \\`ignoreTransactions\\` option.\\nEvent: ${getEventDescription(event)}`,\n        );\n      return true;\n    }\n  }\n  return false;\n}\n\nfunction _isIgnoredError(event: Event, ignoreErrors?: Array<string | RegExp>): boolean {\n  if (!ignoreErrors?.length) {\n    return false;\n  }\n\n  return getPossibleEventMessages(event).some(message => stringMatchesSomePattern(message, ignoreErrors));\n}\n\nfunction _isIgnoredTransaction(event: Event, ignoreTransactions?: Array<string | RegExp>): boolean {\n  if (!ignoreTransactions?.length) {\n    return false;\n  }\n\n  const name = event.transaction;\n  return name ? stringMatchesSomePattern(name, ignoreTransactions) : false;\n}\n\nfunction _isDeniedUrl(event: Event, denyUrls?: Array<string | RegExp>): boolean {\n  if (!denyUrls?.length) {\n    return false;\n  }\n  const url = _getEventFilterUrl(event);\n  return !url ? false : stringMatchesSomePattern(url, denyUrls);\n}\n\nfunction _isAllowedUrl(event: Event, allowUrls?: Array<string | RegExp>): boolean {\n  if (!allowUrls?.length) {\n    return true;\n  }\n  const url = _getEventFilterUrl(event);\n  return !url ? true : stringMatchesSomePattern(url, allowUrls);\n}\n\nfunction _getLastValidUrl(frames: StackFrame[] = []): string | null {\n  for (let i = frames.length - 1; i >= 0; i--) {\n    const frame = frames[i];\n\n    if (frame && frame.filename !== '<anonymous>' && frame.filename !== '[native code]') {\n      return frame.filename || null;\n    }\n  }\n\n  return null;\n}\n\nfunction _getEventFilterUrl(event: Event): string | null {\n  try {\n    // If there are linked exceptions or exception aggregates we only want to match against the top frame of the \"root\" (the main exception)\n    // The root always comes last in linked exceptions\n    const rootException = [...(event.exception?.values ?? [])]\n      .reverse()\n      .find(value => value.mechanism?.parent_id === undefined && value.stacktrace?.frames?.length);\n    const frames = rootException?.stacktrace?.frames;\n    return frames ? _getLastValidUrl(frames) : null;\n  } catch {\n    DEBUG_BUILD && debug.error(`Cannot extract url for event ${getEventDescription(event)}`);\n    return null;\n  }\n}\n\nfunction _isUselessError(event: Event): boolean {\n  // We only want to consider events for dropping that actually have recorded exception values.\n  if (!event.exception?.values?.length) {\n    return false;\n  }\n\n  return (\n    // No top-level message\n    !event.message &&\n    // There are no exception values that have a stacktrace, a non-generic-Error type or value\n    !event.exception.values.some(value => value.stacktrace || (value.type && value.type !== 'Error') || value.value)\n  );\n}\n","/**\n * Platform-portable Express tracing integration.\n *\n * @module\n *\n * This Sentry integration is a derivative work based on the OpenTelemetry\n * Express instrumentation.\n *\n * <https://github.com/open-telemetry/opentelemetry-js-contrib/tree/main/packages/instrumentation-express>\n *\n * Extended under the terms of the Apache 2.0 license linked below:\n *\n * ----\n *\n * Copyright The OpenTelemetry Authors\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n *      https://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\nimport { debug } from '../../utils/debug-logger';\nimport { captureException } from '../../exports';\nimport { getClient } from '../../currentScopes';\nimport { DEBUG_BUILD } from '../../debug-build';\nimport type {\n  ExpressApplication,\n  ExpressErrorMiddleware,\n  ExpressHandlerOptions,\n  ExpressIntegration,\n  ExpressIntegrationOptions,\n  ExpressLayer,\n  ExpressMiddleware,\n  ExpressModuleExport,\n  ExpressRequest,\n  ExpressResponse,\n  ExpressRouter,\n  ExpressRouterv4,\n  ExpressRouterv5,\n  ExpressShouldHandleError,\n  MiddlewareError,\n} from './types';\nimport {\n  defaultShouldHandleError,\n  getLayerPath,\n  isExpressWithoutRouterPrototype,\n  isExpressWithRouterPrototype,\n} from './utils';\nimport { wrapMethod } from '../../utils/object';\nimport { patchLayer } from './patch-layer';\nimport { setSDKProcessingMetadata } from './set-sdk-processing-metadata';\nimport { getDefaultExport } from '../../utils/get-default-export';\n\nfunction isLegacyOptions(\n  options: ExpressModuleExport | (ExpressIntegrationOptions & { express: ExpressModuleExport }),\n): options is ExpressIntegrationOptions & { express: ExpressModuleExport } {\n  return !!(options as { express: ExpressModuleExport }).express;\n}\n\n// TODO: remove this deprecation handling in v11\nlet didLegacyDeprecationWarning = false;\nfunction deprecationWarning() {\n  if (!didLegacyDeprecationWarning) {\n    didLegacyDeprecationWarning = true;\n    DEBUG_BUILD &&\n      debug.warn(\n        '[Express] `patchExpressModule(options)` is deprecated. Use `patchExpressModule(moduleExports, getOptions)` instead.',\n      );\n  }\n}\n\n/**\n * This is a portable instrumentatiton function that works in any environment\n * where Express can be loaded, without depending on OpenTelemetry.\n *\n * @example\n * ```javascript\n * import express from 'express';\n * import * as Sentry from '@sentry/deno'; // or any SDK that extends core\n *\n * Sentry.patchExpressModule(express, () => ({}));\n * ```\n */\nexport function patchExpressModule(\n  moduleExports: ExpressModuleExport,\n  getOptions: () => ExpressIntegrationOptions,\n): ExpressModuleExport;\n/**\n * @deprecated Pass the Express module export as the first argument and options getter as the second argument.\n */\nexport function patchExpressModule(\n  options: ExpressIntegrationOptions & { express: ExpressModuleExport },\n): ExpressModuleExport;\nexport function patchExpressModule(\n  optionsOrExports: ExpressModuleExport | (ExpressIntegrationOptions & { express: ExpressModuleExport }),\n  maybeGetOptions?: () => ExpressIntegrationOptions,\n): ExpressModuleExport {\n  let getOptions: () => ExpressIntegrationOptions;\n  let moduleExports: ExpressModuleExport;\n  if (!maybeGetOptions && isLegacyOptions(optionsOrExports)) {\n    // eslint-disable-next-line typescript/no-deprecated\n    const { express, ...options } = optionsOrExports;\n    moduleExports = express;\n    getOptions = () => options;\n    deprecationWarning();\n  } else if (typeof maybeGetOptions !== 'function') {\n    throw new TypeError('`patchExpressModule(moduleExports, getOptions)` requires a `getOptions` callback');\n  } else {\n    getOptions = maybeGetOptions;\n    moduleExports = optionsOrExports as ExpressModuleExport;\n  }\n\n  // pass in the require() or import() result of express\n  const express = getDefaultExport(moduleExports);\n  const routerProto: ExpressRouterv4 | ExpressRouterv5 | undefined = isExpressWithRouterPrototype(express)\n    ? express.Router.prototype // Express v5\n    : isExpressWithoutRouterPrototype(express)\n      ? express.Router // Express v4\n      : undefined;\n\n  if (!routerProto) {\n    throw new TypeError('no valid Express route function to instrument');\n  }\n\n  // oxlint-disable-next-line @typescript-eslint/unbound-method\n  const originalRouteMethod = routerProto.route;\n  try {\n    wrapMethod(\n      routerProto,\n      'route',\n      function routeTrace(this: ExpressRouter, ...args: Parameters<typeof originalRouteMethod>[]) {\n        const route = originalRouteMethod.apply(this, args);\n        const layer = this.stack[this.stack.length - 1] as ExpressLayer;\n        patchLayer(getOptions, layer, getLayerPath(args));\n        return route;\n      },\n    );\n  } catch (e) {\n    DEBUG_BUILD && debug.error('Failed to patch express route method:', e);\n  }\n\n  // oxlint-disable-next-line @typescript-eslint/unbound-method\n  const originalRouterUse = routerProto.use;\n  try {\n    wrapMethod(\n      routerProto,\n      'use',\n      function useTrace(this: ExpressApplication, ...args: Parameters<typeof originalRouterUse>) {\n        const route = originalRouterUse.apply(this, args);\n        const layer = this.stack[this.stack.length - 1];\n        if (!layer) {\n          return route;\n        }\n        patchLayer(getOptions, layer, getLayerPath(args));\n        return route;\n      },\n    );\n  } catch (e) {\n    DEBUG_BUILD && debug.error('Failed to patch express use method:', e);\n  }\n\n  const { application } = express;\n  const originalApplicationUse = application.use;\n  try {\n    wrapMethod(\n      application,\n      'use',\n      function appUseTrace(\n        this: ExpressApplication & {\n          _router?: ExpressRouter;\n          router?: ExpressRouter;\n        },\n        ...args: Parameters<ExpressApplication['use']>\n      ) {\n        // If we access app.router in express 4.x we trigger an assertion error.\n        // This property existed in v3, was removed in v4 and then re-added in v5.\n        const route = originalApplicationUse.apply(this, args);\n        const router = isExpressWithRouterPrototype(express) ? this.router : this._router;\n        if (router) {\n          const layer = router.stack[router.stack.length - 1];\n          if (layer) {\n            patchLayer(getOptions, layer, getLayerPath(args));\n          }\n        }\n        return route;\n      },\n    );\n  } catch (e) {\n    DEBUG_BUILD && debug.error('Failed to patch express application.use method:', e);\n  }\n\n  return express;\n}\n\n/**\n * The `shouldHandleError` configured on the registered Express integration, if any.\n *\n * The integration is defined per platform (e.g. `expressIntegration()` in `@sentry/node`), so it is\n * looked up by name here — the same way `getIntegrationByName` is used for `VercelAI` and\n * `ProfilingIntegration`.\n */\nfunction getIntegrationShouldHandleError(): ExpressShouldHandleError | undefined {\n  return getClient()?.getIntegrationByName<ExpressIntegration>('Express')?.getShouldHandleError?.();\n}\n\n/**\n * An Express-compatible error handler, used by setupExpressErrorHandler\n */\nexport function expressErrorHandler(options?: ExpressHandlerOptions): ExpressErrorMiddleware {\n  return function sentryErrorMiddleware(\n    error: MiddlewareError,\n    request: ExpressRequest,\n    res: ExpressResponse,\n    next: (error: MiddlewareError) => void,\n  ): void {\n    // When an error happens, the `expressRequestHandler` middleware does not run, so we set it here too\n    setSDKProcessingMetadata(request);\n    const shouldHandleError =\n      // oxlint-disable-next-line typescript/no-deprecated\n      options?.shouldHandleError ?? getIntegrationShouldHandleError() ?? defaultShouldHandleError;\n\n    if (shouldHandleError === false) {\n      next(error);\n      return;\n    }\n\n    if (shouldHandleError(error)) {\n      const eventId = captureException(error, {\n        mechanism: { type: 'auto.middleware.express', handled: false },\n      });\n      (res as { sentry?: string }).sentry = eventId;\n    }\n\n    next(error);\n  };\n}\n\n/**\n * Add an Express error handler to capture errors to Sentry.\n *\n * The error handler must be before any other middleware and after all controllers.\n *\n * @param app The Express instances\n * @param options {ExpressHandlerOptions} Configuration options for the handler\n *\n * @example\n * ```javascript\n * import * as Sentry from 'sentry/deno'; // or any other @sentry/<platform>\n * import * as express from 'express';\n *\n * Sentry.instrumentExpress(express);\n *\n * const app = express();\n *\n * // Add your routes, etc.\n *\n * // Add this after all routes,\n * // but before any and other error-handling middlewares are defined\n * Sentry.setupExpressErrorHandler(app);\n *\n * app.listen(3000);\n * ```\n */\nexport function setupExpressErrorHandler(\n  app: {\n    //oxlint-disable-next-line no-explicit-any\n    use: (middleware: any) => unknown;\n  },\n  options?: ExpressHandlerOptions,\n): void {\n  app.use(expressRequestHandler());\n  app.use(expressErrorHandler(options));\n}\n\nfunction expressRequestHandler(): ExpressMiddleware {\n  return function sentryRequestMiddleware(request: ExpressRequest, _res: ExpressResponse, next: () => void): void {\n    setSDKProcessingMetadata(request);\n    next();\n  };\n}\n","/**\n * Platform-portable Express tracing integration.\n *\n * @module\n *\n * This Sentry integration is a derivative work based on the OpenTelemetry\n * Express instrumentation.\n *\n * <https://github.com/open-telemetry/opentelemetry-js-contrib/tree/main/packages/instrumentation-express>\n *\n * Extended under the terms of the Apache 2.0 license linked below:\n *\n * ----\n *\n * Copyright The OpenTelemetry Authors\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n *      https://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\nimport { DEBUG_BUILD } from '../../debug-build';\nimport { SEMANTIC_ATTRIBUTE_SENTRY_OP, SEMANTIC_ATTRIBUTE_SENTRY_ORIGIN } from '../../semanticAttributes';\nimport { SPAN_STATUS_ERROR, startSpanManual, withActiveSpan } from '../../tracing';\nimport { debug } from '../../utils/debug-logger';\nimport type { SpanAttributes } from '../../types/span';\nimport { getActiveSpan } from '../../utils/spanUtils';\nimport { getStoredLayers, storeLayer } from './request-layer-store';\nimport {\n  type ExpressRequest,\n  type ExpressResponse,\n  type ExpressIntegrationOptions,\n  type ExpressLayer,\n  ATTR_HTTP_ROUTE,\n  ATTR_EXPRESS_TYPE,\n  ATTR_EXPRESS_NAME,\n  ExpressLayerType_ROUTER,\n} from './types';\nimport {\n  asErrorAndMessage,\n  getActualMatchedRoute,\n  getConstructedRoute,\n  getLayerMetadata,\n  isLayerIgnored,\n} from './utils';\nimport { getIsolationScope } from '../../currentScopes';\nimport { getDefaultIsolationScope } from '../../defaultScopes';\nimport { getOriginalFunction, markFunctionWrapped } from '../../utils/object';\nimport { setSDKProcessingMetadata } from './set-sdk-processing-metadata';\n\nexport type ExpressPatchLayerOptions = Pick<\n  ExpressIntegrationOptions,\n  'onRouteResolved' | 'ignoreLayers' | 'ignoreLayersType'\n>;\n\nexport function patchLayer(\n  getOptions: () => ExpressPatchLayerOptions,\n  maybeLayer?: ExpressLayer,\n  layerPath?: string,\n): void {\n  if (!maybeLayer?.handle) {\n    return;\n  }\n  const layer = maybeLayer;\n\n  const layerHandleOriginal = layer.handle;\n\n  // avoid patching multiple times the same layer\n  if (getOriginalFunction(layerHandleOriginal)) {\n    return;\n  }\n\n  if (layerHandleOriginal.length === 4) {\n    // todo: instrument error handlers\n    return;\n  }\n\n  function layerHandlePatched(\n    this: ExpressLayer,\n    req: ExpressRequest,\n    res: ExpressResponse,\n    //oxlint-disable-next-line no-explicit-any\n    ...otherArgs: any[]\n  ) {\n    const options = getOptions();\n\n    // Set normalizedRequest here because expressRequestHandler middleware\n    // (registered via setupExpressErrorHandler) is added after routes and\n    // therefore never runs for successful requests — route handlers typically\n    // send a response without calling next(). It would be safe to set this\n    // multiple times, since the data is identical, but more performant not to.\n    setSDKProcessingMetadata(req);\n\n    // Only create spans when there's an active parent span\n    // Without a parent span, this request is being ignored, so skip it\n    const parentSpan = getActiveSpan();\n    if (!parentSpan) {\n      return layerHandleOriginal.apply(this, [req, res, ...otherArgs]);\n    }\n\n    if (layerPath) {\n      storeLayer(req, layerPath);\n    }\n    const storedLayers = getStoredLayers(req);\n    const isLayerPathStored = !!layerPath;\n\n    const constructedRoute = getConstructedRoute(req);\n    const actualMatchedRoute = getActualMatchedRoute(req, constructedRoute);\n\n    options.onRouteResolved?.(actualMatchedRoute);\n\n    const metadata = getLayerMetadata(constructedRoute, layer, layerPath);\n    const name = metadata.attributes[ATTR_EXPRESS_NAME];\n    const type = metadata.attributes[ATTR_EXPRESS_TYPE];\n    const attributes: SpanAttributes = Object.assign(metadata.attributes, {\n      [SEMANTIC_ATTRIBUTE_SENTRY_ORIGIN]: 'auto.http.express',\n      [SEMANTIC_ATTRIBUTE_SENTRY_OP]: `${type}.express`,\n    });\n    if (actualMatchedRoute) {\n      attributes[ATTR_HTTP_ROUTE] = actualMatchedRoute;\n    }\n\n    // verify against the config if the layer should be ignored\n    if (isLayerIgnored(metadata.attributes[ATTR_EXPRESS_NAME], type, options)) {\n      // XXX: the isLayerPathStored guard here is *not* present in the\n      // original @opentelemetry/instrumentation-express impl, but was\n      // suggested by the Sentry code review bot. It appears to correctly\n      // prevent improper layer calculation in the case where there's a\n      // middleware without a layerPath argument. It's unclear whether\n      // that's possible, or if any existing code depends on that \"bug\".\n      if (isLayerPathStored) {\n        storedLayers.pop();\n      }\n      return layerHandleOriginal.apply(this, [req, res, ...otherArgs]);\n    }\n\n    const currentScope = getIsolationScope();\n    if (currentScope !== getDefaultIsolationScope()) {\n      if (type === 'request_handler') {\n        // type cast b/c Otel unfortunately types info.request as any :(\n        const method = req.method ? req.method.toUpperCase() : 'GET';\n        currentScope.setTransactionName(`${method} ${constructedRoute}`);\n      }\n    } else {\n      DEBUG_BUILD && debug.warn('Isolation scope is still default isolation scope - skipping setting transactionName');\n    }\n\n    return startSpanManual({ name, attributes }, span => {\n      let spanHasEnded = false;\n      // TODO: Fix router spans (getRouterPath does not work properly) to\n      // have useful names before removing this branch\n      if (metadata.attributes[ATTR_EXPRESS_TYPE] === ExpressLayerType_ROUTER) {\n        span.end();\n        spanHasEnded = true;\n      }\n      // listener for response.on('finish')\n      const onResponseFinish = () => {\n        if (!spanHasEnded) {\n          spanHasEnded = true;\n          span.end();\n        }\n      };\n\n      // verify we have a callback\n      for (let i = 0; i < otherArgs.length; i++) {\n        const callback = otherArgs[i] as Function;\n        if (typeof callback !== 'function') {\n          continue;\n        }\n\n        //oxlint-disable-next-line no-explicit-any\n        otherArgs[i] = function (...args: any[]) {\n          // express considers anything but an empty value, \"route\" or \"router\"\n          // passed to its callback to be an error\n          const maybeError = args[0];\n          const isError = !!maybeError && maybeError !== 'route' && maybeError !== 'router';\n          if (!spanHasEnded && isError) {\n            const [_, message] = asErrorAndMessage(maybeError);\n            // intentionally do not record the exception here, because\n            // the error handler we assign does that, provided the user\n            // correctly calls setupExpressErrorHandler.\n            // TODO: A future enhancement can automatically attach\n            // the error handler if we detect that it has not been added.\n            span.setStatus({\n              code: SPAN_STATUS_ERROR,\n              message,\n            });\n          }\n\n          if (!spanHasEnded) {\n            spanHasEnded = true;\n            res.removeListener('finish', onResponseFinish);\n            span.end();\n          }\n          if (!(req.route && isError) && isLayerPathStored) {\n            storedLayers.pop();\n          }\n          // execute the callback back in the parent's scope, so that\n          // we bubble up each level as next() is called.\n          return withActiveSpan(parentSpan, () => callback.apply(this, args));\n        };\n        break;\n      }\n\n      try {\n        return layerHandleOriginal.apply(this, [req, res, ...otherArgs]);\n      } catch (anyError) {\n        const [_, message] = asErrorAndMessage(anyError);\n        // intentionally do not record the exception here, because\n        // the error handler we assign does that, provided the user\n        // correctly calls setupExpressErrorHandler.\n        // TODO: A future enhancement can automatically attach\n        // the error handler if we detect that it has not been added.\n        span.setStatus({\n          code: SPAN_STATUS_ERROR,\n          message,\n        });\n        throw anyError;\n        /* v8 ignore next - it sees the block end at the throw */\n      } finally {\n        // At this point if the callback wasn't called, that means\n        // either the layer is asynchronous (so it will call the\n        // callback later on) or that the layer directly ends the\n        // http response, so we'll hook into the \"finish\" event to\n        // handle the later case.\n        if (!spanHasEnded) {\n          res.once('finish', onResponseFinish);\n        }\n      }\n    });\n  }\n\n  // `handle` isn't just a regular function in some cases. It also contains\n  // some properties holding metadata and state so we need to proxy them\n  // through through patched function. Use a for-in to also pick up properties\n  // that other libraries might add to the prototype before we instrument.\n  // ref: https://github.com/open-telemetry/opentelemetry-js-contrib/issues/1950\n  // ref: https://github.com/open-telemetry/opentelemetry-js-contrib/issues/2271\n  // oxlint-disable-next-line guard-for-in\n  for (const key in layerHandleOriginal as Function & Record<string, unknown>) {\n    // skip standard function prototype fields that both have\n    if (key in layerHandlePatched) {\n      continue;\n    }\n    Object.defineProperty(layerHandlePatched, key, {\n      get() {\n        return layerHandleOriginal[key];\n      },\n      set(value) {\n        layerHandleOriginal[key] = value;\n      },\n    });\n  }\n\n  markFunctionWrapped(layerHandlePatched, layerHandleOriginal);\n\n  Object.defineProperty(layer, 'handle', {\n    enumerable: true,\n    configurable: true,\n    writable: true,\n    value: layerHandlePatched,\n  });\n}\n","/**\n * Platform-portable Express tracing integration.\n *\n * @module\n *\n * This Sentry integration is a derivative work based on the OpenTelemetry\n * Express instrumentation.\n *\n * <https://github.com/open-telemetry/opentelemetry-js-contrib/tree/main/packages/instrumentation-express>\n *\n * Extended under the terms of the Apache 2.0 license linked below:\n *\n * ----\n *\n * Copyright The OpenTelemetry Authors\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n *      https://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\nimport type { ExpressRequest } from './types';\n\n// map of patched request objects to stored layers\nconst requestLayerStore = new WeakMap<ExpressRequest, string[]>();\nexport const storeLayer = (req: ExpressRequest, layer: string) => {\n  const store = requestLayerStore.get(req);\n  if (!store) {\n    requestLayerStore.set(req, [layer]);\n  } else {\n    store.push(layer);\n  }\n};\n\nexport const getStoredLayers = (req: ExpressRequest) => {\n  let store = requestLayerStore.get(req);\n  if (!store) {\n    store = [];\n    requestLayerStore.set(req, store);\n  }\n  return store;\n};\n","/**\n * Platform-portable Express tracing integration.\n *\n * @module\n *\n * This Sentry integration is a derivative work based on the OpenTelemetry\n * Express instrumentation.\n *\n * <https://github.com/open-telemetry/opentelemetry-js-contrib/tree/main/packages/instrumentation-express>\n *\n * Extended under the terms of the Apache 2.0 license linked below:\n *\n * ----\n *\n * Copyright The OpenTelemetry Authors\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n *      https://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\n/**\n * Abstract this out because we call it in multiple places, and it's cheaper to\n * only do one time for any given request.\n */\n\nimport type { ExpressRequest } from './types';\nimport { getIsolationScope } from '../../currentScopes';\nimport { httpRequestToRequestData } from '../../utils/request';\n\n// TODO: consider moving this into a core util, eg\n// setSDKProcessingMetadataFromRequest(..), if other integrations need it.\nexport function setSDKProcessingMetadata(request: ExpressRequest) {\n  const sdkProcMeta = getIsolationScope()?.getScopeData()?.sdkProcessingMetadata;\n  if (!sdkProcMeta?.normalizedRequest) {\n    const normalizedRequest = httpRequestToRequestData(request);\n    getIsolationScope().setSDKProcessingMetadata({ normalizedRequest });\n  }\n}\n","/**\n * Platform-portable Express tracing integration.\n *\n * @module\n *\n * This Sentry integration is a derivative work based on the OpenTelemetry\n * Express instrumentation.\n *\n * <https://github.com/open-telemetry/opentelemetry-js-contrib/tree/main/packages/instrumentation-express>\n *\n * Extended under the terms of the Apache 2.0 license linked below:\n *\n * ----\n *\n * Copyright The OpenTelemetry Authors\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n *      https://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\nimport type { Integration } from '../../types/integration';\nimport type { RequestEventData } from '../../types/request';\nimport type { SpanAttributes } from '../../types/span';\n\nexport const ATTR_EXPRESS_NAME = 'express.name';\nexport const ATTR_HTTP_ROUTE = 'http.route';\nexport const ATTR_EXPRESS_TYPE = 'express.type';\n\nexport type ExpressExport = {\n  Router: ExpressRouterv5 | ExpressRouterv4;\n  application: ExpressApplication;\n};\n\nexport type ExpressExportv5 = ExpressExport & {\n  Router: ExpressRouterv5;\n};\n\nexport type ExpressExportv4 = ExpressExport & {\n  Router: ExpressRouterv4;\n};\n\nexport type ExpressModuleExport = ExpressExport | { default: ExpressExport };\n\nexport interface ExpressRequest extends RequestEventData {\n  originalUrl: string;\n  route: unknown;\n  // Note: req.res is typed as optional (only present after middleware init).\n  // mark optional to preserve compat with express v4 types.\n  res?: ExpressResponse;\n}\n\n// just a minimum type def for what we need, since this also needs to\n// work in environments lacking node:http\nexport interface ExpressResponse {\n  once(ev: string, listener: Function): this;\n  removeListener(ev: string, listener?: Function): this;\n  emit(ev: string, ...data: unknown[]): this;\n}\n\nexport interface NextFunction {\n  (err?: unknown): void;\n  /**\n   * \"Break-out\" of a router by calling {next('router')};\n   * @see {https://expressjs.com/en/guide/using-middleware.html#middleware.router}\n   */\n  (deferToNext: 'router'): void;\n  /**\n   * \"Break-out\" of a route by calling {next('route')};\n   * @see {https://expressjs.com/en/guide/using-middleware.html#middleware.application}\n   */\n  (deferToNext: 'route'): void;\n}\n\n// Need to mark this as `any` so they don't conflict with the actual express\n//oxlint-disable-next-line no-explicit-any\nexport type ExpressApplicationRequestHandler = (...handlers: any[]) => any;\n\nexport type ExpressRequestInfo<T = unknown> = {\n  /** An express request object */\n  request: T;\n  route: string;\n  layerType: ExpressLayerType;\n};\n\nexport type ExpressLayerType = 'router' | 'middleware' | 'request_handler';\nexport const ExpressLayerType_ROUTER = 'router';\nexport const ExpressLayerType_MIDDLEWARE = 'middleware';\nexport const ExpressLayerType_REQUEST_HANDLER = 'request_handler';\n\nexport type PathParams = string | RegExp | Array<string | RegExp>;\nexport type LayerPathSegment = string | RegExp | number;\n\nexport interface ExpressRoute {\n  path: string;\n  stack: ExpressLayer[];\n}\n\nexport type ExpressRouterv4 = ExpressRouter;\n\nexport interface ExpressRouterv5 {\n  prototype: ExpressRouter;\n}\n\n// https://github.com/expressjs/express/blob/main/lib/router/layer.js#L33\nexport type ExpressLayer = {\n  handle: Function &\n    Record<string, unknown> & {\n      stack?: ExpressLayer[];\n    };\n  name: string;\n  params: { [key: string]: string };\n  path?: string;\n  regexp: RegExp;\n  route?: ExpressLayer;\n};\n\nexport type ExpressRouter = {\n  params: { [key: string]: string };\n  _params: string[];\n  caseSensitive: boolean;\n  mergeParams: boolean;\n  strict: boolean;\n  stack: ExpressLayer[];\n  route(prefix: PathParams): ExpressRoute;\n  use(...handlers: unknown[]): unknown;\n};\n\nexport type IgnoreMatcher = string | RegExp | ((name: string) => boolean);\n\nexport type ExpressIntegrationOptions = {\n  /**\n   * @deprecated Pass the express module as the first argument, and an\n   * options getter as the second argument to patchExpressModule.\n   */\n  express?: ExpressModuleExport;\n\n  /** Ignore specific based on their name */\n  ignoreLayers?: IgnoreMatcher[];\n  /** Ignore specific layers based on their type */\n  ignoreLayersType?: ExpressLayerType[];\n  /**\n   * Optional callback invoked each time a layer resolves the matched HTTP route.\n   * Platform-specific integrations (e.g. Node.js) use this to propagate the\n   * resolved route to the underlying transport layer (e.g. OTel RPCMetadata).\n   */\n  onRouteResolved?: (route: string | undefined) => void;\n\n  /**\n   * Callback deciding whether an error passed to `next(error)` should be captured\n   * and sent to Sentry.\n   *\n   * By default, 5xx errors (and errors without a resolvable status) are sent, while\n   * 3xx and 4xx errors are not. Set to `false` to capture no errors at all.\n   *\n   * Capturing Express errors still requires `setupExpressErrorHandler(app)`. Passing\n   * `shouldHandleError` to that call instead is deprecated: it takes precedence over\n   * this option, but will be removed in v11.\n   *\n   * @example\n   *\n   * ```javascript\n   * Sentry.init({\n   *   integrations: [\n   *     Sentry.expressIntegration({\n   *       shouldHandleError(error) {\n   *         return (error.statusCode ?? 500) >= 500;\n   *       },\n   *     }),\n   *   ],\n   * });\n   * ```\n   */\n  shouldHandleError?: ExpressShouldHandleError;\n};\n\nexport type LayerMetadata = {\n  attributes: SpanAttributes;\n  name: string;\n};\n\nexport interface ExpressApplication {\n  stack: ExpressLayer[];\n  use: ExpressApplicationRequestHandler;\n}\n\nexport interface MiddlewareError extends Error {\n  status?: number | string;\n  statusCode?: number | string;\n  status_code?: number | string;\n  output?: {\n    statusCode?: number | string;\n  };\n}\n\nexport type ExpressMiddleware = (req: ExpressRequest, res: ExpressResponse, next: () => void) => void;\n\nexport type ExpressErrorMiddleware = (\n  error: MiddlewareError,\n  req: ExpressRequest,\n  res: ExpressResponse,\n  next: (error: MiddlewareError) => void,\n) => void;\n\n/** Callback deciding whether an error should be captured; `false` disables capture entirely. */\nexport type ExpressShouldHandleError = ((error: MiddlewareError) => boolean) | false;\n\n/**\n * The Express integration is defined per platform (e.g. `expressIntegration()` in `@sentry/node`), so\n * `expressErrorHandler` reads its `shouldHandleError` back off the registered instance by name.\n * `getShouldHandleError` is optional because not every platform's Express integration implements it.\n */\nexport interface ExpressIntegration extends Integration {\n  getShouldHandleError?: () => ExpressShouldHandleError | undefined;\n}\n\nexport interface ExpressHandlerOptions {\n  /**\n   * Callback method deciding whether error should be captured and sent to Sentry\n   *\n   * @param error Captured middleware error\n   *\n   * @deprecated Configure `shouldHandleError` on `expressIntegration()` rather than here. Keep calling\n   * `setupExpressErrorHandler(app)` as that is what captures the errors. This option will be removed in v11.\n   *\n   * @example\n   *\n   * ```javascript\n   * Sentry.init({\n   *   integrations: [\n   *     Sentry.expressIntegration({\n   *       shouldHandleError(error) {\n   *         return (error.statusCode ?? 500) >= 500;\n   *       },\n   *     }),\n   *   ],\n   * });\n   * ```\n   */\n  shouldHandleError?(this: void, error: MiddlewareError): boolean;\n}\n","/**\n * Platform-portable Express tracing integration.\n *\n * @module\n *\n * This Sentry integration is a derivative work based on the OpenTelemetry\n * Express instrumentation.\n *\n * <https://github.com/open-telemetry/opentelemetry-js-contrib/tree/main/packages/instrumentation-express>\n *\n * Extended under the terms of the Apache 2.0 license linked below:\n *\n * ----\n *\n * Copyright The OpenTelemetry Authors\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n *      https://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\nimport type { SpanAttributes } from '../../types/span';\nimport { getStoredLayers } from './request-layer-store';\nimport type {\n  ExpressIntegrationOptions,\n  ExpressLayer,\n  ExpressLayerType,\n  ExpressRequest,\n  LayerPathSegment,\n  MiddlewareError,\n  ExpressRouterv4,\n  ExpressExportv5,\n  ExpressExportv4,\n} from './types';\nimport {\n  ATTR_EXPRESS_NAME,\n  ATTR_EXPRESS_TYPE,\n  ExpressLayerType_MIDDLEWARE,\n  ExpressLayerType_REQUEST_HANDLER,\n  ExpressLayerType_ROUTER,\n} from './types';\nimport { stringMatchesSomePattern } from '../../utils/string';\n\n/**\n * Converts a user-provided error value into an error and error message pair\n *\n * @param error - User-provided error value\n * @returns Both an Error or string representation of the value and an error message\n */\nexport const asErrorAndMessage = (error: unknown): [string | Error, string] =>\n  error instanceof Error ? [error, error.message] : [String(error), String(error)];\n\n/**\n * Checks if a route contains parameter patterns (e.g., :id, :userId)\n * which are valid even if they don't exactly match the original URL\n */\nexport function isRoutePattern(route: string): boolean {\n  return route.includes(':') || route.includes('*');\n}\n\n/**\n * Parse express layer context to retrieve a name and attributes.\n * @param route The route of the layer\n * @param layer Express layer\n * @param [layerPath] if present, the path on which the layer has been mounted\n */\nexport const getLayerMetadata = (\n  route: string,\n  layer: ExpressLayer,\n  layerPath?: string,\n): {\n  attributes: SpanAttributes & { [ATTR_EXPRESS_NAME]: string; [ATTR_EXPRESS_TYPE]: ExpressLayerType };\n  name: string;\n} => {\n  if (layer.name === 'router') {\n    const maybeRouterPath = getRouterPath('', layer);\n    const extractedRouterPath = maybeRouterPath ? maybeRouterPath : layerPath || route || '/';\n\n    return {\n      attributes: {\n        [ATTR_EXPRESS_NAME]: extractedRouterPath,\n        [ATTR_EXPRESS_TYPE]: ExpressLayerType_ROUTER,\n      },\n      name: `router - ${extractedRouterPath}`,\n    };\n  } else if (layer.name === 'bound dispatch' || layer.name === 'handle') {\n    return {\n      attributes: {\n        [ATTR_EXPRESS_NAME]: (route || layerPath) ?? 'request handler',\n        [ATTR_EXPRESS_TYPE]: ExpressLayerType_REQUEST_HANDLER,\n      },\n      name: `request handler${layer.path ? ` - ${route || layerPath}` : ''}`,\n    };\n  } else {\n    return {\n      attributes: {\n        [ATTR_EXPRESS_NAME]: layer.name,\n        [ATTR_EXPRESS_TYPE]: ExpressLayerType_MIDDLEWARE,\n      },\n      name: `middleware - ${layer.name}`,\n    };\n  }\n};\n\n/**\n * Recursively search the router path from layer stack\n * @param path The path to reconstruct\n * @param layer The layer to reconstruct from\n * @returns The reconstructed path\n */\nexport const getRouterPath = (path: string, layer: ExpressLayer): string => {\n  const stackLayer = Array.isArray(layer.handle?.stack) ? layer.handle?.stack?.[0] : undefined;\n\n  if (stackLayer?.route?.path) {\n    return `${path}${stackLayer.route.path}`;\n  }\n\n  if (stackLayer && Array.isArray(stackLayer?.handle?.stack)) {\n    return getRouterPath(path, stackLayer);\n  }\n\n  return path;\n};\n\n/**\n * Check whether the given request is ignored by configuration\n * It will not re-throw exceptions from `list` provided by the client\n * @param constant e.g URL of request\n * @param [list] List of ignore patterns\n * @param [onException] callback for doing something when an exception has\n *     occurred\n */\nexport type ExpressIsLayerIgnoredOptions = Pick<ExpressIntegrationOptions, 'ignoreLayersType' | 'ignoreLayers'>;\nexport const isLayerIgnored = (\n  name: string,\n  type: ExpressLayerType,\n  config?: ExpressIsLayerIgnoredOptions,\n): boolean => {\n  if (Array.isArray(config?.ignoreLayersType) && config?.ignoreLayersType?.includes(type)) {\n    return true;\n  }\n  if (!Array.isArray(config?.ignoreLayers)) {\n    return false;\n  }\n  try {\n    return stringMatchesSomePattern(name, config.ignoreLayers, true);\n  } catch {}\n\n  return false;\n};\n\n/**\n * Extracts the actual matched route from Express request for OpenTelemetry instrumentation.\n * Returns the route that should be used as the http.route attribute.\n *\n * @param req - The Express request object with layers store\n * @param constructedRoute - The constructed route from `getConstructedRoute`\n * @returns The matched route string or undefined if no valid route is found\n */\nexport function getActualMatchedRoute(req: ExpressRequest, constructedRoute: string): string | undefined {\n  const layersStore = getStoredLayers(req);\n\n  // If no layers are stored, no route can be determined\n  if (layersStore.length === 0) {\n    return undefined;\n  }\n\n  // Handle root path case - if all paths are root, only return root if originalUrl is also root\n  // The layer store also includes root paths in case a non-existing url was requested\n  if (layersStore.every(path => path === '/')) {\n    return req.originalUrl === '/' ? '/' : undefined;\n  }\n\n  if (constructedRoute === '*') {\n    return constructedRoute;\n  }\n\n  // For RegExp routes or route arrays, return the constructed route\n  // This handles the case where the route is defined using RegExp or an array\n  if (\n    constructedRoute.includes('/') &&\n    (constructedRoute.includes(',') ||\n      constructedRoute.includes('\\\\') ||\n      constructedRoute.includes('*') ||\n      constructedRoute.includes('['))\n  ) {\n    return constructedRoute;\n  }\n\n  // Ensure route starts with '/' if it doesn't already\n  const normalizedRoute = constructedRoute.startsWith('/') ? constructedRoute : `/${constructedRoute}`;\n\n  // Validate that this appears to be a matched route\n  // A route is considered matched if:\n  // 1. We have a constructed route\n  // 2. The original URL matches or starts with our route pattern\n  const isValidRoute =\n    normalizedRoute.length > 0 &&\n    (req.originalUrl === normalizedRoute ||\n      req.originalUrl.startsWith(normalizedRoute) ||\n      isRoutePattern(normalizedRoute));\n\n  return isValidRoute ? normalizedRoute : undefined;\n}\n\nexport function getConstructedRoute(req: ExpressRequest) {\n  const layersStore: string[] = getStoredLayers(req);\n\n  let constructedRoute: string = '';\n  for (const path of layersStore) {\n    if (path === '/' || path === '/*') {\n      continue;\n    }\n    constructedRoute += !constructedRoute || constructedRoute.endsWith('/') ? path : `/${path}`;\n  }\n\n  return constructedRoute.replace(/\\/{2,}/g, '/');\n}\n\nexport const getLayerPath = (args: unknown[]): string | undefined => {\n  const firstArg = args[0];\n\n  if (Array.isArray(firstArg)) {\n    return firstArg.map(arg => extractLayerPathSegment(arg) || '').join(',');\n  }\n\n  return extractLayerPathSegment(firstArg as LayerPathSegment);\n};\n\nconst extractLayerPathSegment = (arg: LayerPathSegment): string | undefined =>\n  typeof arg === 'string' ? arg : arg instanceof RegExp || typeof arg === 'number' ? String(arg) : undefined;\n\n// v5 we instrument Router.prototype\n// v4 we instrument Router itself\nexport const isExpressWithRouterPrototype = (express: unknown): express is ExpressExportv5 =>\n  isExpressRouterPrototype((express as ExpressExportv5)?.Router?.prototype);\n\n// In Express v4, Router is a function (not a plain object), so we need to accept both\nconst isExpressRouterPrototype = (routerProto?: unknown): routerProto is ExpressRouterv4 =>\n  (typeof routerProto === 'object' || typeof routerProto === 'function') &&\n  !!routerProto &&\n  'route' in routerProto &&\n  typeof (routerProto as ExpressRouterv4).route === 'function';\n\nexport const isExpressWithoutRouterPrototype = (express: unknown): express is ExpressExportv4 =>\n  isExpressRouterPrototype((express as ExpressExportv4).Router) && !isExpressWithRouterPrototype(express);\n\nfunction getStatusCodeFromResponse(error: MiddlewareError): number {\n  const statusCode = error.status || error.statusCode || error.status_code || error.output?.statusCode;\n  return statusCode ? parseInt(statusCode as string, 10) : 500;\n}\n\n/** Returns true if response code is internal server error */\nexport function defaultShouldHandleError(error: MiddlewareError): boolean {\n  const status = getStatusCodeFromResponse(error);\n  return status >= 500;\n}\n","import { DEBUG_BUILD } from '../debug-build';\nimport { defineIntegration } from '../integration';\nimport type { Contexts } from '../types/context';\nimport type { ExtendedError } from '../types/error';\nimport type { Event, EventHint } from '../types/event';\nimport type { IntegrationFn } from '../types/integration';\nimport { debug } from '../utils/debug-logger';\nimport { isError, isPlainObject } from '../utils/is';\nimport { normalize } from '../utils/normalize';\nimport { setSkipNormalizationHint } from '../utils/normalizationHints';\nimport { truncate } from '../utils/string';\n\nconst INTEGRATION_NAME = 'ExtraErrorData' as const;\n\ninterface ExtraErrorDataOptions {\n  /**\n   * The object depth up to which to capture data on error objects.\n   */\n  depth: number;\n\n  /**\n   * Whether to capture error causes. Defaults to true.\n   *\n   * More information: https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Error/cause\n   */\n  captureErrorCause: boolean;\n}\n\n/**\n * Extract additional data for from original exceptions.\n */\nconst _extraErrorDataIntegration = ((options: Partial<ExtraErrorDataOptions> = {}) => {\n  const { depth = 3, captureErrorCause = true } = options;\n  return {\n    name: INTEGRATION_NAME,\n    processEvent(event, hint, client) {\n      const { maxValueLength } = client.getOptions();\n      return _enhanceEventWithErrorData(event, hint, depth, captureErrorCause, maxValueLength);\n    },\n  };\n}) satisfies IntegrationFn;\n\nexport const extraErrorDataIntegration = defineIntegration(_extraErrorDataIntegration);\n\nfunction _enhanceEventWithErrorData(\n  event: Event,\n  hint: EventHint = {},\n  depth: number,\n  captureErrorCause: boolean,\n  maxValueLength: number | undefined,\n): Event {\n  if (!hint.originalException || !isError(hint.originalException)) {\n    return event;\n  }\n  const exceptionName = (hint.originalException as ExtendedError).name || hint.originalException.constructor.name;\n\n  const errorData = _extractErrorData(hint.originalException as ExtendedError, captureErrorCause, maxValueLength);\n\n  if (errorData) {\n    const contexts: Contexts = {\n      ...event.contexts,\n    };\n\n    const normalizedErrorData = normalize(errorData, depth);\n\n    if (isPlainObject(normalizedErrorData)) {\n      // We mark the error data as \"already normalized\" here, because we don't want other normalization procedures to\n      // potentially truncate the data we just already normalized, with a certain depth setting.\n      setSkipNormalizationHint(normalizedErrorData);\n      contexts[exceptionName] = normalizedErrorData;\n    }\n\n    return {\n      ...event,\n      contexts,\n    };\n  }\n\n  return event;\n}\n\n/**\n * Extract extra information from the Error object\n */\nfunction _extractErrorData(\n  error: ExtendedError,\n  captureErrorCause: boolean,\n  maxValueLength: number | undefined,\n): Record<string, unknown> | null {\n  // We are trying to enhance already existing event, so no harm done if it won't succeed\n  try {\n    const nativeKeys = [\n      'name',\n      'message',\n      'stack',\n      'line',\n      'column',\n      'fileName',\n      'lineNumber',\n      'columnNumber',\n      'toJSON',\n    ];\n\n    const extraErrorInfo: Record<string, unknown> = {};\n\n    // We want only enumerable properties, thus `getOwnPropertyNames` is redundant here, as we filter keys anyway.\n    for (const key of Object.keys(error)) {\n      if (nativeKeys.indexOf(key) !== -1) {\n        continue;\n      }\n      const value = error[key];\n      extraErrorInfo[key] =\n        isError(value) || typeof value === 'string'\n          ? maxValueLength\n            ? truncate(`${value}`, maxValueLength)\n            : `${value}`\n          : value;\n    }\n\n    // Error.cause is a standard property that is non enumerable, we therefore need to access it separately.\n    // https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Error/cause\n    if (captureErrorCause && error.cause !== undefined) {\n      if (isError(error.cause)) {\n        const errorName = error.cause.name || error.cause.constructor.name;\n        extraErrorInfo.cause = { [errorName]: _extractErrorData(error.cause as ExtendedError, false, maxValueLength) };\n      } else {\n        extraErrorInfo.cause = error.cause;\n      }\n    }\n\n    // Check if someone attached `toJSON` method to grab even more properties (eg. axios is doing that)\n    if (typeof error.toJSON === 'function') {\n      const serializedError = error.toJSON() as Record<string, unknown>;\n\n      for (const key of Object.keys(serializedError)) {\n        const value = serializedError[key];\n        extraErrorInfo[key] = isError(value) ? value.toString() : value;\n      }\n    }\n\n    return extraErrorInfo;\n  } catch (oO) {\n    DEBUG_BUILD && debug.error('Unable to extract extra data from the Error object:', oO);\n  }\n\n  return null;\n}\n","import { type Client } from '../../client';\nimport { defineIntegration } from '../../integration';\nimport { type Event, type EventHint } from '../../types/event';\nimport { type Integration, type IntegrationFn } from '../../types/integration';\nimport {\n  _INTERNAL_addFeatureFlagToActiveSpan,\n  _INTERNAL_copyFlagsFromScopeToEvent,\n  _INTERNAL_insertFlagToScope,\n} from '../../utils/featureFlags';\n\nexport interface FeatureFlagsIntegration extends Integration {\n  addFeatureFlag: (name: string, value: unknown) => void;\n}\n\n/**\n * Sentry integration for buffering feature flag evaluations manually with an API, and\n * capturing them on error events and spans.\n *\n * See the [feature flag documentation](https://develop.sentry.dev/sdk/expected-features/#feature-flags) for more information.\n *\n * @example\n * ```\n * import * as Sentry from '@sentry/browser';\n * import { type FeatureFlagsIntegration } from '@sentry/browser';\n *\n * // Setup\n * Sentry.init(..., integrations: [Sentry.featureFlagsIntegration()])\n *\n * // Verify\n * const flagsIntegration = Sentry.getClient()?.getIntegrationByName<FeatureFlagsIntegration>('FeatureFlags');\n * if (flagsIntegration) {\n *   flagsIntegration.addFeatureFlag('my-flag', true);\n * } else {\n *   // check your setup\n * }\n * Sentry.captureException(Exception('broke')); // 'my-flag' should be captured to this Sentry event.\n * ```\n */\nexport const featureFlagsIntegration = defineIntegration(() => {\n  return {\n    name: 'FeatureFlags',\n\n    processEvent(event: Event, _hint: EventHint, _client: Client): Event {\n      return _INTERNAL_copyFlagsFromScopeToEvent(event);\n    },\n\n    addFeatureFlag(name: string, value: unknown): void {\n      _INTERNAL_insertFlagToScope(name, value);\n      _INTERNAL_addFeatureFlagToActiveSpan(name, value);\n    },\n  };\n}) as IntegrationFn<FeatureFlagsIntegration>;\n","import type { Client } from '../../client';\nimport { defineIntegration } from '../../integration';\nimport type { Event, EventHint } from '../../types/event';\nimport type { IntegrationFn } from '../../types/integration';\nimport {\n  _INTERNAL_addFeatureFlagToActiveSpan,\n  _INTERNAL_copyFlagsFromScopeToEvent,\n  _INTERNAL_insertFlagToScope,\n} from '../../utils/featureFlags';\nimport { fill } from '../../utils/object';\n\ninterface GrowthBookLike {\n  isOn(this: GrowthBookLike, featureKey: string, ...rest: unknown[]): boolean;\n  getFeatureValue(this: GrowthBookLike, featureKey: string, defaultValue: unknown, ...rest: unknown[]): unknown;\n}\n\n// `unknown[]` is contravariantly incompatible with real constructors (e.g. GrowthBook's), so use `any[]`.\n// oxlint-disable-next-line typescript-eslint/no-explicit-any\nexport type GrowthBookClassLike = new (...args: any[]) => GrowthBookLike;\n\n/**\n * Sentry integration for capturing feature flag evaluations from GrowthBook.\n *\n * Only boolean results are captured at this time.\n *\n * @example\n * ```typescript\n * import { GrowthBook } from '@growthbook/growthbook';\n * import * as Sentry from '@sentry/browser'; // or '@sentry/node'\n *\n * Sentry.init({\n *   dsn: 'your-dsn',\n *   integrations: [\n *     Sentry.growthbookIntegration({ growthbookClass: GrowthBook })\n *   ]\n * });\n * ```\n */\nexport const growthbookIntegration: IntegrationFn = defineIntegration(\n  ({ growthbookClass }: { growthbookClass: GrowthBookClassLike }) => {\n    return {\n      name: 'GrowthBook' as const,\n\n      setupOnce() {\n        const proto = growthbookClass.prototype as GrowthBookLike;\n\n        // Type guard and wrap isOn\n        if (typeof proto.isOn === 'function') {\n          fill(proto, 'isOn', _wrapAndCaptureBooleanResult);\n        }\n\n        // Type guard and wrap getFeatureValue\n        if (typeof proto.getFeatureValue === 'function') {\n          fill(proto, 'getFeatureValue', _wrapAndCaptureBooleanResult);\n        }\n      },\n\n      processEvent(event: Event, _hint: EventHint, _client: Client): Event {\n        return _INTERNAL_copyFlagsFromScopeToEvent(event);\n      },\n    };\n  },\n);\n\nfunction _wrapAndCaptureBooleanResult(\n  original: (this: GrowthBookLike, ...args: unknown[]) => unknown,\n): (this: GrowthBookLike, ...args: unknown[]) => unknown {\n  return function (this: GrowthBookLike, ...args: unknown[]): unknown {\n    const flagName = args[0];\n    const result = original.apply(this, args);\n\n    if (typeof flagName === 'string' && typeof result === 'boolean') {\n      _INTERNAL_insertFlagToScope(flagName, result);\n      _INTERNAL_addFeatureFlagToActiveSpan(flagName, result);\n    }\n\n    return result;\n  };\n}\n","import type { Client } from '../client';\nimport { getClient } from '../currentScopes';\nimport { defineIntegration } from '../integration';\nimport type { IntegrationFn } from '../types/integration';\nimport type { WrappedFunction } from '../types/wrappedfunction';\nimport { getOriginalFunction } from '../utils/object';\n\nconst INTEGRATION_NAME = 'FunctionToString' as const;\n\nconst SETUP_CLIENTS = new WeakMap<Client, boolean>();\n\nconst _functionToStringIntegration = (() => {\n  return {\n    name: INTEGRATION_NAME,\n    setupOnce() {\n      // eslint-disable-next-line @typescript-eslint/unbound-method\n      const originalFunctionToString = Function.prototype.toString;\n\n      // intrinsics (like Function.prototype) might be immutable in some environments\n      // e.g. Node with --frozen-intrinsics, XS (an embedded JavaScript engine) or SES (a JavaScript proposal)\n      try {\n        Function.prototype.toString = function (this: WrappedFunction, ...args: unknown[]): string {\n          const originalFunction = getOriginalFunction(this);\n          let unwrappedFunction: WrappedFunction | undefined;\n\n          try {\n            if (SETUP_CLIENTS.has(getClient() as Client) && originalFunction !== undefined) {\n              unwrappedFunction = originalFunction;\n            }\n          } catch {\n            // Reading the Sentry carrier off `getClient()` can throw a `SecurityError` when `this` (or the global\n            // object) is a `WindowProxy` whose browsing context was navigated cross-origin. The native\n            // `toString` never throws here, so fall back to it to avoid turning harmless introspection into noise.\n          }\n\n          return originalFunctionToString.apply(unwrappedFunction ?? this, args);\n        };\n      } catch {\n        // ignore errors here, just don't patch this\n      }\n    },\n    setup(client) {\n      SETUP_CLIENTS.set(client, true);\n    },\n  };\n}) satisfies IntegrationFn;\n\n/**\n * Patch toString calls to return proper name for wrapped functions.\n *\n * ```js\n * Sentry.init({\n *   integrations: [\n *     functionToStringIntegration(),\n *   ],\n * });\n * ```\n */\nexport const functionToStringIntegration = defineIntegration(_functionToStringIntegration);\n","import { addBreadcrumb } from '../../breadcrumbs';\nimport { getBreadcrumbLogLevelFromHttpStatusCode } from '../../utils/breadcrumb-log-level';\nimport { getSanitizedUrlString, parseUrl } from '../../utils/url';\nimport { getRequestUrlFromClientRequest } from './get-request-url';\nimport type { HttpClientRequest, HttpIncomingMessage } from './types';\n\n/**\n * Create a breadcrumb for a finished outgoing HTTP request.\n */\nexport function addOutgoingRequestBreadcrumb(\n  request: HttpClientRequest,\n  response: HttpIncomingMessage | undefined,\n): void {\n  const url = getRequestUrlFromClientRequest(request);\n  const parsedUrl = parseUrl(url);\n\n  const statusCode = response?.statusCode;\n  const level = getBreadcrumbLogLevelFromHttpStatusCode(statusCode);\n\n  addBreadcrumb(\n    {\n      category: 'http',\n      data: {\n        status_code: statusCode,\n        url: getSanitizedUrlString(parsedUrl),\n        'http.method': request.method || 'GET',\n        ...(parsedUrl.search ? { 'http.query': parsedUrl.search } : {}),\n        ...(parsedUrl.hash ? { 'http.fragment': parsedUrl.hash } : {}),\n      },\n      type: 'http',\n      level,\n    },\n    {\n      event: 'response',\n      request,\n      response,\n    },\n  );\n}\n","/**\n * Platform-portable HTTP(S) outgoing-request patching integration\n *\n * Patches the `http` and `https` Node.js built-in module exports to create\n * Sentry spans for outgoing requests and optionally inject distributed trace\n * propagation headers.\n *\n * @module\n *\n * This Sentry integration is a derivative work based on the OpenTelemetry\n * HTTP instrumentation.\n *\n * <https://github.com/open-telemetry/opentelemetry-js/tree/main/experimental/packages/opentelemetry-instrumentation-http>\n *\n * Extended under the terms of the Apache 2.0 license linked below:\n *\n * ----\n *\n * Copyright The OpenTelemetry Authors\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n *      https://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\nimport { getDefaultExport } from '../../utils/get-default-export';\nimport { HTTP_ON_CLIENT_REQUEST } from './constants';\nimport type { HttpExport, HttpModuleExport, HttpInstrumentationOptions, HttpClientRequest } from './types';\nimport { getOriginalFunction, wrapMethod } from '../../utils/object';\nimport { getHttpClientSubscriptions } from './client-subscriptions';\n\nlet onHttpClientRequestCreated: ReturnType<typeof getHttpClientSubscriptions>[typeof HTTP_ON_CLIENT_REQUEST];\n\n/**\n * Patch `ClientRequest.prototype._storeHeader` so that every outgoing request\n * is routed through our instrumentation.\n *\n * We deliberately patch the shared `ClientRequest` prototype rather than the\n * module's `request`/`get` exports. Every outgoing request — no matter how the\n * module was imported (`require('node:http')`, `import http from 'node:http'`,\n * or `import * as http from 'node:http'`) — ultimately constructs a\n * `ClientRequest` and serializes its headers through `_storeHeader` on this one\n * prototype. ES module namespace bindings (`import * as http` / `import\n * { request }`) are immutable snapshots that cannot be monkey-patched at all,\n * but the prototype is a shared, mutable object, so patching it reaches those\n * consumers too.\n *\n * `_storeHeader` is the method that renders the outgoing header block into\n * `request._header`. We run *before* the original, which is the last moment a\n * header can still be added via `setHeader` (afterwards `request._header` is\n * set and any `setHeader` call throws `ERR_HTTP_HEADERS_SENT`). It runs\n * synchronously in the caller's async context — during `request.end()` /\n * `request.write()` — so spans are parented correctly, and is invoked exactly\n * once per request whether the headers are being sent immediately or buffered\n * while a socket is assigned.\n *\n * We intentionally do *not* hook `onSocket`: it does not fire until a socket is\n * assigned to the request, which for an `Agent` with all sockets busy (e.g.\n * `maxSockets: 1`) happens only *after* the request's headers have already been\n * serialized — far too late to inject trace-propagation headers.\n *\n * `https` requests reuse `http`'s `ClientRequest`, so patching `http` covers\n * both; the `https` module does not expose its own `ClientRequest` and is a\n * no-op here.\n */\nfunction patchClientRequest(httpModule: HttpExport, options: HttpInstrumentationOptions): void {\n  const proto = httpModule.ClientRequest?.prototype;\n\n  // Nothing to patch if the module doesn't expose `ClientRequest` (e.g. `https`)\n  if (typeof proto?._storeHeader !== 'function') {\n    return;\n  }\n\n  const subscriptions = getHttpClientSubscriptions({\n    ...options,\n    http: httpModule,\n  });\n\n  onHttpClientRequestCreated = subscriptions[HTTP_ON_CLIENT_REQUEST];\n\n  // This means it was already wrapped, we just update onHttpClientRequestCreated and then stop\n  // future calls will pick up the new function\n  if (getOriginalFunction(proto._storeHeader)) {\n    return;\n  }\n\n  const originalStoreHeader = proto._storeHeader;\n  wrapMethod(proto, '_storeHeader', function patchedStoreHeader(this: HttpClientRequest, ...args: unknown[]) {\n    // Never let instrumentation errors break the underlying request.\n    try {\n      onHttpClientRequestCreated({ request: this }, HTTP_ON_CLIENT_REQUEST);\n    } catch {\n      // ignore\n    }\n    return originalStoreHeader.apply(this, args);\n  });\n}\n\nfunction patchModule(httpModuleExport: HttpModuleExport, options: HttpInstrumentationOptions = {}): HttpModuleExport {\n  // Resolve to the underlying module in case we were handed an interop\n  // container (e.g. `{ default: http }`). Either the container or its default\n  // export carries the same `ClientRequest` class.\n  const httpModule = getDefaultExport(httpModuleExport);\n  patchClientRequest(httpModule, options);\n  return httpModuleExport;\n}\n\n/**\n * Patch `node:http`. This also covers `node:https` as it reuses the same `ClientRequest` class.\n *\n * @example\n * ```javascript\n * import http from 'http';\n * import { patchHttpModule } from '@sentry/core';\n * patchHttpModule(http, { propagateTrace: true });\n * ```\n */\nexport const patchHttpModuleClient = (\n  httpModuleExport: HttpModuleExport,\n  options: HttpInstrumentationOptions = {},\n): HttpModuleExport => patchModule(httpModuleExport, options);\n","/**\n * Define the channels and subscription methods to subscribe to in order to\n * instrument the `node:http` module. Note that this does *not* actually\n * register the subscriptions, it simply returns a data object with the\n * channel names and the subscription handlers. Attach these to diagnostic\n * channels on Node versions where they are supported (ie, >=22.12.0).\n *\n * If any other platforms that do support diagnostic channels eventually add\n * channel coverage for the `node:http` client, then these methods can be\n * used on those platforms as well.\n *\n * This implementation is used in the client-patch strategy, by simply\n * calling the handlers with the relevant data at the appropriate time.\n */\n\nimport type { SpanStatus } from '../../types/spanStatus';\nimport { addOutgoingRequestBreadcrumb } from './add-outgoing-request-breadcrumb';\nimport {\n  bindScopeToEmitter,\n  getSpanStatusFromHttpCode,\n  SPAN_STATUS_ERROR,\n  SPAN_STATUS_UNSET,\n  startInactiveSpan,\n  SUPPRESS_TRACING_KEY,\n  withActiveSpan,\n} from '../../tracing';\nimport { debug } from '../../utils/debug-logger';\nimport { LRUMap } from '../../utils/lru';\nimport { getOutgoingRequestSpanData, setIncomingResponseSpanData } from './get-outgoing-span-data';\nimport { getRequestUrlFromClientRequest } from './get-request-url';\nimport { injectTracePropagationHeaders } from './inject-trace-propagation-headers';\nimport type { HttpInstrumentationOptions, HttpClientRequest, HttpIncomingMessage } from './types';\nimport { DEBUG_BUILD } from '../../debug-build';\nimport { LOG_PREFIX, HTTP_ON_CLIENT_REQUEST } from './constants';\nimport type { ClientSubscriptionName } from './constants';\nimport { getClient, getCurrentScope } from '../../currentScopes';\nimport { hasSpansEnabled } from '../../utils/hasSpansEnabled';\nimport { doubleWrapWarning } from './double-wrap-warning';\n\ntype ChannelListener = (message: unknown, name: string | symbol) => void;\n\nexport type HttpClientSubscriptions = Record<ClientSubscriptionName, ChannelListener>;\n\nexport function getHttpClientSubscriptions(options: HttpInstrumentationOptions): HttpClientSubscriptions {\n  const propagationDecisionMap = new LRUMap<string, boolean>(100);\n  const getConfig = () => getClient()?.getOptions();\n\n  const onHttpClientRequestCreated: ChannelListener = (data: unknown): void => {\n    // Skip all instrumentation if tracing is suppressed\n    // (e.g., Sentry's own transport uses this to avoid self-instrumentation)\n    if (getCurrentScope().getScopeData().sdkProcessingMetadata[SUPPRESS_TRACING_KEY] === true) {\n      return;\n    }\n\n    const clientOptions = getConfig();\n    const {\n      errorMonitor = 'error',\n      spans: createSpans = clientOptions ? hasSpansEnabled(clientOptions) : true,\n      propagateTrace = false,\n      breadcrumbs = true,\n      http,\n      https,\n      suppressOtelWarning = false,\n    } = options;\n\n    const { request } = data as { request: HttpClientRequest };\n\n    // check if request is ignored. if so, we do nothing at all.\n    if (options.ignoreOutgoingRequests?.(getRequestUrlFromClientRequest(request), request)) {\n      return;\n    }\n\n    // guard against adding breadcrumbs multiple times, or when not enabled\n    let addedBreadcrumbs = false;\n    function addBreadcrumbs(request: HttpClientRequest, response: HttpIncomingMessage | undefined) {\n      if (!addedBreadcrumbs) {\n        addedBreadcrumbs = true;\n        addOutgoingRequestBreadcrumb(request, response);\n      }\n    }\n\n    // called if spans and/or trace propagation are disabled\n    function breadcrumbsOnly(request: HttpClientRequest) {\n      request.on(errorMonitor, () => addBreadcrumbs(request, undefined));\n      request.prependListener('response', response => {\n        if (request.listenerCount('response') <= 1) {\n          response.resume();\n        }\n        response.on('end', () => addBreadcrumbs(request, response));\n        response.on(errorMonitor, () => addBreadcrumbs(request, response));\n      });\n    }\n\n    if (!createSpans) {\n      // no spans, but maybe tracing and/or breadcrumbs\n      if (breadcrumbs) {\n        breadcrumbsOnly(request);\n      }\n      if (propagateTrace) {\n        injectTracePropagationHeaders(request, propagationDecisionMap);\n      }\n      return;\n    }\n\n    // guard against OTel wrapping the same module and emitting double-spans\n    // this doesn't prevent it, just prints a debug warning for the user.\n    if (!suppressOtelWarning) {\n      if (http) doubleWrapWarning(http);\n      if (https) doubleWrapWarning(https);\n    }\n\n    // spans are enabled\n    const span = startInactiveSpan(getOutgoingRequestSpanData(request));\n    options.outgoingRequestHook?.(span, request);\n\n    // Inject trace headers after span creation so sentry-trace contains the\n    // outgoing span's ID (not the parent's), enabling downstream services to\n    // link to this span.\n    if (propagateTrace) {\n      if (span.isRecording()) {\n        withActiveSpan(span, () => {\n          injectTracePropagationHeaders(request, propagationDecisionMap);\n        });\n      } else {\n        injectTracePropagationHeaders(request, propagationDecisionMap);\n      }\n    }\n\n    let spanEnded = false;\n    function endSpan(status: SpanStatus): void {\n      if (!spanEnded) {\n        spanEnded = true;\n        span.setStatus(status);\n        span.end();\n      }\n    }\n\n    // Fallback: end span if the connection closes before any response.\n    // This is removed if we do get a response, because in that case\n    // we want to only end the span when the response is finished.\n    const requestOnClose = () => endSpan({ code: SPAN_STATUS_UNSET });\n    request.on('close', requestOnClose);\n\n    request.on(errorMonitor, error => {\n      DEBUG_BUILD && debug.log(LOG_PREFIX, 'outgoingRequest on request error()', error);\n      if (breadcrumbs) {\n        addBreadcrumbs(request, undefined);\n      }\n      endSpan({ code: SPAN_STATUS_ERROR });\n    });\n\n    request.prependListener('response', response => {\n      // no longer need this, listen on response now.\n      // do not end the span until the response finishes\n      request.removeListener('close', requestOnClose);\n      if (request.listenerCount('response') <= 1) {\n        response.resume();\n      }\n      setIncomingResponseSpanData(response, span);\n      bindScopeToEmitter(response);\n      options.outgoingResponseHook?.(span, response);\n\n      let finished = false;\n      function finishWithResponse(error?: unknown): void {\n        if (!finished) {\n          finished = true;\n          if (error) {\n            DEBUG_BUILD && debug.log(LOG_PREFIX, 'outgoingRequest on response error()', error);\n          }\n          if (breadcrumbs) {\n            addBreadcrumbs(request, response);\n          }\n          const aborted = response.aborted && !response.complete;\n          const status: SpanStatus =\n            error || typeof response.statusCode !== 'number' || aborted\n              ? { code: SPAN_STATUS_ERROR }\n              : getSpanStatusFromHttpCode(response.statusCode);\n          options.applyCustomAttributesOnSpan?.(span, request, response);\n          endSpan(status);\n        }\n      }\n\n      response.on('end', () => finishWithResponse());\n      response.on(errorMonitor, finishWithResponse);\n    });\n  };\n\n  return {\n    [HTTP_ON_CLIENT_REQUEST]: onHttpClientRequestCreated,\n  };\n}\n","export const LOG_PREFIX = '@sentry/instrumentation-http';\nexport const HTTP_ON_CLIENT_REQUEST = 'http.client.request.created';\nexport const HTTP_ON_SERVER_REQUEST = 'http.server.request.start';\nexport type ClientSubscriptionName = typeof HTTP_ON_CLIENT_REQUEST;\nexport type ServerSubscriptionName = typeof HTTP_ON_SERVER_REQUEST;\n","import { DEBUG_BUILD } from '../../debug-build';\nimport { debug } from '../../utils/debug-logger';\nimport type { HttpModuleExport } from './types';\n\nconst isOtelWrapped = (fn: Function & { __unwrap?: Function }): fn is Function & { __unwrap: Function } =>\n  typeof fn.__unwrap === 'function';\n\n// exported for tess\nexport const warning =\n  'Double-wrapped http.client detected. Either disable spans in Sentry.httpIntegration, or disable the OpenTelemetry HTTP instrumentation. See: https://docs.sentry.io/platforms/javascript/guides/express/opentelemetry/custom-setup/#custom-http-instrumentation';\n\nlet didDoubleWrapWarning = false;\n// no-op in non-debug builds\nexport const doubleWrapWarning = DEBUG_BUILD\n  ? (http: HttpModuleExport) => {\n      if (!didDoubleWrapWarning) {\n        if (isOtelWrapped(http.request) || isOtelWrapped(http.get)) {\n          didDoubleWrapWarning = true;\n          debug.warn(warning);\n        }\n      }\n    }\n  : () => {};\n","import type { Span, SpanAttributes } from '../../types/span';\nimport { SEMANTIC_ATTRIBUTE_SENTRY_OP } from '../../semanticAttributes';\nimport { getHttpSpanDetailsFromUrlObject, parseStringToURLObject } from '../../utils/url';\nimport type { HttpClientRequest, HttpIncomingMessage } from './types';\nimport { getRequestUrlFromClientRequest } from './get-request-url';\nimport type { StartSpanOptions } from '../../types/startSpanOptions';\n\n/**\n * Build the initial span name and attributes for an outgoing HTTP request.\n * This is called before the span is created, to get the initial details.\n */\nexport function getOutgoingRequestSpanData(request: HttpClientRequest): StartSpanOptions {\n  const url = getRequestUrlFromClientRequest(request);\n  const [name, attributes] = getHttpSpanDetailsFromUrlObject(\n    parseStringToURLObject(url),\n    'client',\n    'auto.http.client',\n    request,\n  );\n\n  const userAgent = request.getHeader('user-agent');\n\n  return {\n    name,\n    attributes: {\n      // TODO(v11): Update these to the Sentry semantic attributes for urls.\n      // https://getsentry.github.io/sentry-conventions/attributes/\n      [SEMANTIC_ATTRIBUTE_SENTRY_OP]: 'http.client',\n      'otel.kind': 'CLIENT',\n      'http.url': url,\n      'http.method': request.method,\n      'http.target': request.path || '/',\n      'net.peer.name': request.host,\n      'http.host': request.getHeader('host') as string | undefined,\n      ...(userAgent ? { 'user_agent.original': userAgent as string } : {}),\n      ...attributes,\n    },\n    onlyIfParent: true,\n  };\n}\n\n/**\n * Add span attributes once the response is received.\n */\nexport function setIncomingResponseSpanData(response: HttpIncomingMessage, span: Span): void {\n  const { statusCode, statusMessage, httpVersion, socket } = response;\n  const transport = httpVersion?.toUpperCase() !== 'QUIC' ? 'ip_tcp' : 'ip_udp';\n\n  span.setAttributes({\n    'http.response.status_code': statusCode,\n    'network.protocol.version': httpVersion,\n    // TODO(v11): Update these to the Sentry semantic attributes for urls.\n    // https://getsentry.github.io/sentry-conventions/attributes/\n    'http.flavor': httpVersion,\n    'network.transport': transport,\n    'net.transport': transport,\n    'http.status_text': statusMessage?.toUpperCase(),\n    'http.status_code': statusCode,\n    ...getResponseContentLengthAttributes(response),\n    ...getSocketAttrs(socket),\n  });\n}\n\nfunction getSocketAttrs(socket: HttpIncomingMessage['socket']): SpanAttributes {\n  if (!socket) return {};\n  const { remoteAddress, remotePort } = socket;\n  return {\n    'network.peer.address': remoteAddress,\n    'network.peer.port': remotePort,\n    'net.peer.ip': remoteAddress,\n    'net.peer.port': remotePort,\n  };\n}\n\nfunction getResponseContentLengthAttributes(response: HttpIncomingMessage): SpanAttributes {\n  const { headers } = response;\n  const contentLengthHeader = headers['content-length'];\n  const length = contentLengthHeader ? parseInt(String(contentLengthHeader), 10) : -1;\n  const encoding = headers['content-encoding'];\n  return length >= 0\n    ? encoding && encoding !== 'identity'\n      ? { 'http.response_content_length': length }\n      : { 'http.response_content_length_uncompressed': length }\n    : {};\n}\n","import type { HttpClientRequest, HttpRequestOptions } from './types';\n\n/** Convert an outgoing request to request options. */\nexport function getRequestOptions(request: HttpClientRequest): HttpRequestOptions {\n  // request.host may be 'hostname:port' when the caller passed\n  // { host: 'hostname:port' } to http.request(). Split it so that\n  // `hostname` is always port-free (matching the http.RequestOptions contract)\n  // and the port is not lost when request.port is undefined.\n  const hostWithPort = request.host || '';\n  const portInHost = /^(.*):(\\d+)$/.exec(hostWithPort);\n  const hostname = portInHost ? portInHost[1] : hostWithPort;\n  const port = request.port ?? (portInHost ? Number(portInHost[2]) : undefined);\n\n  return {\n    method: request.method,\n    port,\n    protocol: request.protocol,\n    host: request.host,\n    hostname,\n    path: request.path,\n    headers: request.getHeaders(),\n  };\n}\n\nexport function getRequestUrl(requestOptions: HttpRequestOptions): string {\n  try {\n    return String(getRequestUrlObject(requestOptions));\n  } catch {\n    return '';\n  }\n}\n\nexport function getRequestUrlObject(requestOptions: HttpRequestOptions): URL {\n  const protocol = requestOptions.protocol || 'http:';\n  const hostHeader = requestOptions.headers?.host && String(requestOptions.headers?.host);\n  const hostname = hostHeader || requestOptions.hostname || requestOptions.host || '';\n  // Don't log standard :80 (http) and :443 (https) ports to reduce the noise\n  // Also don't add port if the hostname already includes a port\n  const port =\n    !requestOptions.port || requestOptions.port === 80 || requestOptions.port === 443 || /^(.*):(\\d+)$/.test(hostname)\n      ? ''\n      : `:${requestOptions.port}`;\n  const path = requestOptions.path ? requestOptions.path : '/';\n  const base = `${protocol}//${hostname}${port}`;\n  // A path starting with `//` (valid for e.g. S3 object keys) would otherwise be parsed as a\n  // protocol-relative reference, discarding the request's origin, so we resolve it against the origin.\n  return new URL(path.startsWith('//') ? `${base}${path}` : path, base);\n}\n\n/**\n * Build the full URL string from a Node.js ClientRequest.\n */\nexport function getRequestUrlFromClientRequest(request: HttpClientRequest): string {\n  return String(getRequestUrl(getRequestOptions(request)));\n}\n","import type { LRUMap } from '../../utils/lru';\nimport { getClient } from '../../currentScopes';\nimport { DEBUG_BUILD } from '../../debug-build';\nimport { debug } from '../../utils/debug-logger';\nimport { isError } from '../../utils/is';\nimport { getTraceData } from '../../utils/traceData';\nimport { shouldPropagateTraceForUrl } from '../../utils/tracePropagationTargets';\nimport { LOG_PREFIX } from './constants';\nimport { getRequestUrlFromClientRequest } from './get-request-url';\nimport type { HttpClientRequest } from './types';\nimport { mergeBaggageHeaders } from '../../utils/baggage';\n\n/**\n * Inject Sentry trace-propagation headers into an outgoing request if the\n * target URL matches the configured `tracePropagationTargets`.\n *\n * Note: this must be called *before* calling `request.end()` (or firing the\n * `http.client.request.start` diagnostics channel), because at that point,\n * the headers have already been sent, and cannot be modified.\n */\nexport function injectTracePropagationHeaders(\n  request: HttpClientRequest,\n  propagationDecisionMap: LRUMap<string, boolean>,\n): void {\n  const url = getRequestUrlFromClientRequest(request);\n  const clientOptions = getClient()?.getOptions();\n  const { tracePropagationTargets, propagateTraceparent } = clientOptions ?? {};\n\n  if (!shouldPropagateTraceForUrl(url, tracePropagationTargets, propagationDecisionMap)) {\n    return;\n  }\n\n  const hasExistingSentryTraceHeader = !!request.getHeader('sentry-trace');\n\n  if (hasExistingSentryTraceHeader) {\n    // add nothing if there's already a sentry-trace header,\n    // or else baggage can be sent twice.\n    return;\n  }\n\n  const traceData = getTraceData({ propagateTraceparent });\n  if (!traceData) return;\n\n  const { 'sentry-trace': sentryTrace, baggage, traceparent } = traceData;\n\n  if (sentryTrace) {\n    try {\n      request.setHeader('sentry-trace', sentryTrace);\n      DEBUG_BUILD && debug.log(LOG_PREFIX, 'Added sentry-trace header');\n    } catch (e) {\n      DEBUG_BUILD &&\n        debug.error(LOG_PREFIX, 'Failed to set sentry-trace header:', isError(e) ? e.message : 'Unknown error');\n    }\n  }\n\n  if (traceparent && !request.getHeader('traceparent')) {\n    try {\n      request.setHeader('traceparent', traceparent);\n      DEBUG_BUILD && debug.log(LOG_PREFIX, 'Added traceparent header');\n    } catch (e) {\n      DEBUG_BUILD &&\n        debug.error(LOG_PREFIX, 'Failed to set traceparent header:', isError(e) ? e.message : 'Unknown error');\n    }\n  }\n\n  if (baggage) {\n    const merged = mergeBaggageHeaders(request.getHeader('baggage'), baggage);\n    if (merged) {\n      try {\n        request.setHeader('baggage', merged);\n        DEBUG_BUILD && debug.log(LOG_PREFIX, 'Added baggage header');\n      } catch (e) {\n        DEBUG_BUILD &&\n          debug.error(LOG_PREFIX, 'Failed to set baggage header:', isError(e) ? e.message : 'Unknown error');\n      }\n    }\n  }\n}\n","import type { Scope } from '../../scope';\nimport { debug } from '../../utils/debug-logger';\nimport { DEBUG_BUILD } from '../../debug-build';\nimport type { HttpIncomingMessage } from './types';\nimport { getMaxBodyByteLength, type MaxRequestBodySize } from '../../utils/request';\n\n/**\n * This method patches the request object to capture the body.\n * Instead of actually consuming the streamed body ourselves, which has\n * potential side effects, we monkey patch `req.on('data')` to intercept\n * the body chunks. This way, we only read the body if the user also consumes\n * the body, ensuring we do not change any behavior in unexpected ways.\n */\nexport function patchRequestToCaptureBody(\n  req: HttpIncomingMessage,\n  isolationScope: Scope,\n  maxIncomingRequestBodySize: Exclude<MaxRequestBodySize, 'none'>,\n  integrationName: string,\n): void {\n  let bodyByteLength = 0;\n  const chunks: Buffer[] = [];\n\n  DEBUG_BUILD && debug.log(integrationName, 'Patching request.on');\n\n  // keep track of the original callbacks to remove listeners later\n  // `off` depends on having the exact same function reference passed in,\n  // so we need to be able to map original listeners to our wrapped ones.\n  const callbackMap = new WeakMap();\n\n  const maxBodySize = getMaxBodyByteLength(maxIncomingRequestBodySize);\n\n  try {\n    // eslint-disable-next-line @typescript-eslint/unbound-method\n    req.on = req.addListener = new Proxy(req.on, {\n      apply: (target, thisArg, args: Parameters<typeof req.on>) => {\n        const [event, listener, ...restArgs] = args;\n\n        if (event === 'data') {\n          DEBUG_BUILD &&\n            debug.log(integrationName, `Handling request.on(\"data\") with maximum body size of ${maxBodySize}b`);\n\n          const callback = new Proxy(listener, {\n            apply: (target, thisArg, args: Parameters<typeof listener>) => {\n              try {\n                const chunk = args[0] as Buffer | string;\n                const bufferifiedChunk = Buffer.from(chunk);\n\n                if (bodyByteLength < maxBodySize) {\n                  chunks.push(bufferifiedChunk);\n                  bodyByteLength += bufferifiedChunk.byteLength;\n                } else if (DEBUG_BUILD) {\n                  debug.log(\n                    integrationName,\n                    `Dropping request body chunk because maximum body length of ${maxBodySize}b is exceeded.`,\n                  );\n                }\n              } catch (_err) {\n                DEBUG_BUILD && debug.error(integrationName, 'Encountered error while storing body chunk.');\n              }\n\n              return Reflect.apply(target, thisArg, args);\n            },\n          });\n\n          callbackMap.set(listener, callback);\n\n          return Reflect.apply(target, thisArg, [event, callback, ...restArgs]);\n        }\n\n        return Reflect.apply(target, thisArg, args);\n      },\n    });\n\n    // Ensure we also remove callbacks correctly\n    // eslint-disable-next-line @typescript-eslint/unbound-method\n    req.off = req.removeListener = new Proxy(req.off, {\n      apply: (target, thisArg, args: Parameters<typeof req.off>) => {\n        const [, listener] = args;\n\n        const callback = callbackMap.get(listener);\n        if (callback) {\n          callbackMap.delete(listener);\n\n          const modifiedArgs = args.slice();\n          modifiedArgs[1] = callback;\n          return Reflect.apply(target, thisArg, modifiedArgs);\n        }\n\n        return Reflect.apply(target, thisArg, args);\n      },\n    });\n\n    req.on('end', () => {\n      try {\n        const body = Buffer.concat(chunks).toString('utf-8');\n        if (body) {\n          // Using Buffer.byteLength here, because the body may contain characters that are not 1 byte long\n          const bodyByteLength = Buffer.byteLength(body, 'utf-8');\n          const truncatedBody =\n            bodyByteLength > maxBodySize\n              ? `${Buffer.from(body)\n                  .subarray(0, maxBodySize - 3)\n                  .toString('utf-8')}...`\n              : body;\n\n          isolationScope.setSDKProcessingMetadata({ normalizedRequest: { data: truncatedBody } });\n        }\n      } catch (error) {\n        if (DEBUG_BUILD) {\n          debug.error(integrationName, 'Error building captured request body', error);\n        }\n      }\n    });\n  } catch (error) {\n    if (DEBUG_BUILD) {\n      debug.error(integrationName, 'Error patching request to capture body', error);\n    }\n  }\n}\n","import type { Client } from '../../client';\nimport { debug } from '../../utils/debug-logger';\nimport { DEBUG_BUILD } from '../../debug-build';\nimport type { Scope } from '../../scope';\nimport type { HttpServerResponse } from './types';\nimport type { AggregationCounts } from '../../types/session';\nimport { safeDateNow } from '../../utils/randomSafeContext';\nimport { safeUnref } from '../../utils/timer';\n\nconst clientToRequestSessionAggregatesMap = new WeakMap<\n  Client,\n  { [timestampRoundedToSeconds: string]: { exited: number; crashed: number; errored: number } }\n>();\n\n/**\n * Starts a session and tracks it in the context of a given isolation scope.\n * When the passed response is finished, the session is put into a task and\n * is aggregated with other sessions that may happen in a certain time window\n * (sessionFlushingDelayMs).\n *\n * The sessions are always aggregated by the client that is on the current\n * scope at the time of ending the response (if there is one).\n */\nexport function recordRequestSession(\n  client: Client,\n  {\n    requestIsolationScope,\n    response,\n    sessionFlushingDelayMS,\n  }: {\n    requestIsolationScope: Scope;\n    response: HttpServerResponse;\n    sessionFlushingDelayMS?: number;\n  },\n): void {\n  requestIsolationScope.setSDKProcessingMetadata({\n    requestSession: { status: 'ok' },\n  });\n\n  response.once('close', () => {\n    const requestSession = requestIsolationScope.getScopeData().sdkProcessingMetadata.requestSession;\n\n    if (client && requestSession) {\n      DEBUG_BUILD && debug.log(`Recorded request session with status: ${requestSession.status}`);\n\n      const roundedDate = new Date(safeDateNow());\n      roundedDate.setSeconds(0, 0);\n      const dateBucketKey = roundedDate.toISOString();\n\n      const existingClientAggregate = clientToRequestSessionAggregatesMap.get(client);\n      const bucket = existingClientAggregate?.[dateBucketKey] || { exited: 0, crashed: 0, errored: 0 };\n      bucket[({ ok: 'exited', crashed: 'crashed', errored: 'errored' } as const)[requestSession.status]]++;\n\n      if (existingClientAggregate) {\n        existingClientAggregate[dateBucketKey] = bucket;\n      } else {\n        DEBUG_BUILD && debug.log('Opened new request session aggregate.');\n        const newClientAggregate = { [dateBucketKey]: bucket };\n        clientToRequestSessionAggregatesMap.set(client, newClientAggregate);\n\n        const flushPendingClientAggregates = (): void => {\n          clearTimeout(timeout);\n          unregisterClientFlushHook();\n          clientToRequestSessionAggregatesMap.delete(client);\n\n          const aggregatePayload: AggregationCounts[] = Object.entries(newClientAggregate).map(\n            ([timestamp, value]) => ({\n              started: timestamp,\n              exited: value.exited,\n              errored: value.errored,\n              crashed: value.crashed,\n            }),\n          );\n          client.sendSession({ aggregates: aggregatePayload });\n        };\n\n        const unregisterClientFlushHook = client.on('flush', () => {\n          DEBUG_BUILD && debug.log('Sending request session aggregate due to client flush');\n          flushPendingClientAggregates();\n        });\n        const timeout = setTimeout(() => {\n          DEBUG_BUILD && debug.log('Sending request session aggregate due to flushing schedule');\n          flushPendingClientAggregates();\n        }, sessionFlushingDelayMS);\n        safeUnref(timeout);\n      }\n    }\n  });\n}\n","// oxlint-disable max-lines\n/**\n * Provide the `http.server.request.start` subscription function that we use\n * to instrument incoming HTTP requests that use the `node:http` module.\n *\n * On Node.js v18.7 and up, we can just assign the diagnostics channel\n * listener, and that's enough. But for older node versions, or other SSJS\n * platforms, we have to explicitly fire the provided method an a patched\n * Server.emit method.\n *\n * This decision is made in the relevant Node/Bun/Deno SDKs; core just\n * provides them with the methods to use.\n *\n * When `options.spans` is enabled (explicitly or via the client's tracing\n * config), this also creates server spans around the emitted `'request'`\n * event. The OTel-mode node integration creates spans through a different\n * code path and opts out via explicit `spans: false`.\n */\n\nimport type { ServerSubscriptionName } from './constants';\ntype ChannelListener = (message: unknown, name: string | symbol) => void;\nimport { HTTP_ON_SERVER_REQUEST } from './constants';\nimport type { HttpIncomingMessage, HttpInstrumentationOptions, HttpServer, HttpServerResponse } from './types';\nimport { DEBUG_BUILD } from '../../debug-build';\nimport { debug } from '../../utils/debug-logger';\nimport { getClient, getCurrentScope, getIsolationScope, withIsolationScope } from '../../currentScopes';\nimport { hasSpansEnabled } from '../../utils/hasSpansEnabled';\nimport { headersToDict, httpHeadersToSpanAttributes, httpRequestToRequestData } from '../../utils/request';\nimport { patchRequestToCaptureBody } from './patch-request-to-capture-body';\nimport { isURLObjectRelative, parseStringToURLObject, stripUrlQueryAndFragment } from '../../utils/url';\nimport { recordRequestSession } from './record-request-session';\nimport { generateSpanId, generateTraceId } from '../../utils/propagationContext';\nimport { continueTrace } from '../../tracing/trace';\nimport { getSpanStatusFromHttpCode, SPAN_STATUS_ERROR, startSpanManual } from '../../tracing';\nimport {\n  SEMANTIC_ATTRIBUTE_SENTRY_OP,\n  SEMANTIC_ATTRIBUTE_SENTRY_ORIGIN,\n  SEMANTIC_ATTRIBUTE_SENTRY_SOURCE,\n} from '../../semanticAttributes';\nimport { safeMathRandom } from '../../utils/randomSafeContext';\nimport { SPAN_KIND } from '../../spanKind';\nimport type { SpanAttributes } from '../../types/span';\nimport type { SpanStatus } from '../../types/spanStatus';\nimport { HTTP_URL, URL_FULL, URL_PATH } from '@sentry/conventions/attributes';\n\n// Tree-shakable guard to remove all code related to tracing\ndeclare const __SENTRY_TRACING__: boolean;\n\nconst INTEGRATION_NAME = 'Http.Server';\nconst SPANS_INTEGRATION_NAME = 'Http.SentryServerSpans';\n\nexport type HttpServerSubscriptions = Record<ServerSubscriptionName, ChannelListener>;\n\n// Tracks the last Sentry-created emit wrapper for each server so we can detect\n// when user code has replaced server.emit (e.g. with a proxy of the original)\n// and re-wrap it to restore Sentry's instrumentation.\nconst lastSentryEmitMap = new WeakMap<HttpServer, HttpServer['emit']>();\n\nconst kRequestMark = Symbol.for('sentry_http_server_instrumented');\ntype MarkedRequest = HttpIncomingMessage & {\n  [kRequestMark]?: boolean;\n};\n\n/** return true if it is NOT already marked */\nfunction markRequest(request: MarkedRequest): boolean {\n  return !request[kRequestMark] && (request[kRequestMark] = true);\n}\n\nexport function instrumentServer(options: HttpInstrumentationOptions, server: HttpServer): void {\n  // Use a proxy and a WeakSet of server objects here, rather than a\n  // wrappedFunction, because NestJS has been observed to \"fork\" emit\n  // methods, including copying properties, leading to false positives.\n  // Furthermore, we mark the Request object so that if two copies of this\n  // instrumentation both are run on forked emit() methods for the same\n  // request, we still only ever create a single root span. Previously,\n  // this was done with a flag on the OTEL context, but in this non-OTEL\n  // version, we mark the Request itself with a non-enumerable prop instead.\n\n  // oxlint-disable-next-line typescript/unbound-method -- `this` is forwarded via Proxy/target.apply below\n  const currentEmit = server.emit;\n  const instrumentedEmit = lastSentryEmitMap.get(server);\n\n  // Skip re-wrapping only if already instrumented AND server.emit still points\n  // to our wrapper. If user code replaced server.emit (e.g. with a proxy of the\n  // original pre-Sentry emit), re-wrap so Sentry's instrumentation is restored.\n  if (currentEmit === instrumentedEmit) {\n    return;\n  }\n\n  const newEmit = new Proxy(currentEmit, {\n    apply(target, thisArg, args: unknown[]) {\n      const [event, ...data] = args;\n      if (event !== 'request') {\n        return target.apply(thisArg, args);\n      }\n\n      const client = getClient();\n      const [request, response] = data as [HttpIncomingMessage, HttpServerResponse];\n\n      if (!client || !markRequest(request)) {\n        return target.apply(thisArg, args);\n      }\n\n      DEBUG_BUILD && debug.log(INTEGRATION_NAME, 'Handling incoming request');\n      const isolationScope = getIsolationScope().clone();\n      isolationScope.setClient(client);\n\n      const ipAddress = request.socket?.remoteAddress;\n      const url = request.url || '/';\n      const normalizedRequest = httpRequestToRequestData(request);\n      const {\n        maxRequestBodySize = 'medium',\n        ignoreRequestBody,\n        sessions = true,\n        sessionFlushingDelayMS = 60_000,\n      } = options;\n\n      if (maxRequestBodySize !== 'none' && !ignoreRequestBody?.(url, request)) {\n        patchRequestToCaptureBody(request, isolationScope, maxRequestBodySize, INTEGRATION_NAME);\n      }\n\n      // Update the isolation scope, isolate this request\n      isolationScope.setSDKProcessingMetadata({ normalizedRequest, ipAddress });\n\n      // attempt to update the scope's `transactionName` based on the request\n      // URL. Ideally, framework instrumentations coming after the\n      // HttpInstrumentation update the transactionName once we get a\n      // parameterized route.\n      const httpMethod = (request.method || 'GET').toUpperCase();\n      const httpTargetWithoutQueryFragment = stripUrlQueryAndFragment(url);\n\n      const bestEffortTransactionName = `${httpMethod} ${httpTargetWithoutQueryFragment}`;\n\n      isolationScope.setTransactionName(bestEffortTransactionName);\n\n      if (sessions) {\n        recordRequestSession(client, {\n          requestIsolationScope: isolationScope,\n          response,\n          sessionFlushingDelayMS: sessionFlushingDelayMS ?? 60_000,\n        });\n      }\n\n      return withIsolationScope(isolationScope, () => {\n        const sentryTrace = normalizedRequest.headers?.['sentry-trace'];\n        const baggage = normalizedRequest.headers?.['baggage'];\n        const sentryTraceValue = Array.isArray(sentryTrace) ? sentryTrace[0] : sentryTrace;\n        return continueTrace(\n          {\n            sentryTrace: sentryTraceValue,\n            baggage: Array.isArray(baggage) ? baggage[0] : baggage,\n          },\n          () => {\n            const propagationContext = getCurrentScope().getPropagationContext();\n            // Set propagationSpanId after continueTrace because it calls\n            // withScope + setPropagationContext internally, which would\n            // overwrite any previously set value.\n            propagationContext.propagationSpanId = generateSpanId();\n            // In OTel mode, continueTrace does not generate a new traceId\n            // when there is no incoming sentry-trace header. We generate one\n            // explicitly here so each request gets a unique trace ID even when\n            // tracing is disabled.\n            if (!sentryTraceValue) {\n              propagationContext.traceId = generateTraceId();\n              propagationContext.sampleRand = safeMathRandom();\n            }\n\n            response.once('close', () => {\n              isolationScope.setContext('response', {\n                status_code: response.statusCode,\n              });\n            });\n\n            const wrap = options.wrapServerEmitRequest;\n            let emitResult: boolean = false;\n            if (wrap) {\n              wrap(request, response, normalizedRequest, () => {\n                emitResult = target.apply(thisArg, args) as boolean;\n              });\n            } else {\n              emitResult = target.apply(thisArg, args) as boolean;\n            }\n            return emitResult;\n          },\n        );\n      });\n    },\n  });\n\n  lastSentryEmitMap.set(server, newEmit);\n  server.emit = newEmit;\n}\n\nexport function getHttpServerSubscriptions(options: HttpInstrumentationOptions): HttpServerSubscriptions {\n  // The decision whether to create spans is evaluated per request (not once\n  // here), so it stays responsive to client-state changes after setup. This\n  // mirrors `getHttpClientSubscriptions`. Callers can force the no-span path\n  // with explicit `spans: false` (the node OTel `httpServerIntegration` does\n  // this because it creates spans through a separate code path).\n  const userWrap = options.wrapServerEmitRequest;\n  const spanWrap = buildServerSpanWrap(options);\n\n  const effectiveOptions: HttpInstrumentationOptions = {\n    ...options,\n    wrapServerEmitRequest(request, response, normalizedRequest, next) {\n      const clientOptions = getClient()?.getOptions();\n      const createSpans = options.spans ?? (clientOptions ? hasSpansEnabled(clientOptions) : false);\n      if (createSpans) {\n        // spanWrap composes the user's wrap (outer) with span creation (inner).\n        spanWrap(request, response, normalizedRequest, next);\n      } else if (userWrap) {\n        userWrap(request, response, normalizedRequest, next);\n      } else {\n        next();\n      }\n    },\n  };\n\n  const onHttpServerRequest: ChannelListener = (data: unknown): void => {\n    const { server } = data as { server: HttpServer };\n    instrumentServer(effectiveOptions, server);\n  };\n\n  return { [HTTP_ON_SERVER_REQUEST]: onHttpServerRequest };\n}\n\nfunction buildServerSpanWrap(\n  options: HttpInstrumentationOptions,\n): NonNullable<HttpInstrumentationOptions['wrapServerEmitRequest']> {\n  const {\n    wrapServerEmitRequest: userWrap,\n    ignoreIncomingRequests,\n    ignoreStaticAssets = true,\n    onSpanCreated,\n    errorMonitor = 'error',\n    onSpanEnd,\n  } = options;\n\n  return (request, response, normalizedRequest, next) => {\n    if (typeof __SENTRY_TRACING__ !== 'undefined' && !__SENTRY_TRACING__) {\n      return next();\n    }\n\n    // User wrap runs outside the span so it can set up context\n    // (e.g. OTel propagation) before the span is created.\n    return userWrap ? userWrap(request, response, normalizedRequest, createSpan) : createSpan();\n\n    function createSpan(): unknown {\n      const isolationScope = getIsolationScope();\n      const client = isolationScope.getClient();\n      if (!client) {\n        return next();\n      }\n\n      if (\n        shouldIgnoreSpansForIncomingRequest(request, {\n          ignoreStaticAssets,\n          ignoreIncomingRequests,\n        })\n      ) {\n        DEBUG_BUILD && debug.log(SPANS_INTEGRATION_NAME, 'Skipping span creation for incoming request', request.url);\n        return next();\n      }\n\n      const fullUrl = normalizedRequest.url || request.url || '/';\n      const urlObj = parseStringToURLObject(fullUrl);\n      const httpTargetWithoutQueryFragment = urlObj ? urlObj.pathname : stripUrlQueryAndFragment(fullUrl);\n      const method = (request.method || 'GET').toUpperCase();\n      const name = `${method} ${httpTargetWithoutQueryFragment}`;\n      const headers = request.headers;\n      const userAgent = headers['user-agent'];\n      const ips = headers['x-forwarded-for'];\n      const httpVersion = request.httpVersion;\n      const host = headers.host as undefined | string;\n      const hostname = host?.replace(/^(.*)(:[0-9]{1,5})/, '$1') || 'localhost';\n      const scheme = fullUrl.startsWith('https') ? 'https' : 'http';\n      const { socket } = request;\n      const { localAddress, localPort, remoteAddress, remotePort } = socket ?? {};\n\n      return startSpanManual(\n        {\n          name,\n          // Pass SERVER so the OTel sampler infers op='http.server' rather than\n          // 'http', which it does for the INTERNAL default.\n          kind: SPAN_KIND.SERVER,\n          attributes: {\n            // Sentry-specific attributes\n            [SEMANTIC_ATTRIBUTE_SENTRY_OP]: 'http.server',\n            [SEMANTIC_ATTRIBUTE_SENTRY_ORIGIN]: 'auto.http.server',\n            [SEMANTIC_ATTRIBUTE_SENTRY_SOURCE]: 'url',\n            // Set http.route to the URL path as a best-effort route name.\n            // Framework integrations (Express, etc.) update this via onSpanEnd.\n            'http.route': httpTargetWithoutQueryFragment,\n            // OTel kind (explicit attribute so it appears in span data)\n            'otel.kind': 'SERVER',\n            // Network attributes\n            'net.host.ip': localAddress,\n            'net.host.port': localPort,\n            'net.peer.ip': remoteAddress,\n            'net.peer.port': remotePort,\n            'sentry.http.prefetch': isKnownPrefetchRequest(request) || undefined,\n            // Old Semantic Conventions attributes for compatibility\n            [URL_FULL]: urlObj && !isURLObjectRelative(urlObj) ? urlObj.href : undefined,\n            [URL_PATH]: urlObj?.pathname ?? httpTargetWithoutQueryFragment,\n            // oxlint-disable-next-line typescript-eslint(no-deprecated)\n            [HTTP_URL]: fullUrl,\n            'http.method': method,\n            'http.target': urlObj ? `${urlObj.pathname}${urlObj.search}` : httpTargetWithoutQueryFragment,\n            'http.host': host,\n            'net.host.name': hostname,\n            'http.client_ip': typeof ips === 'string' ? ips.split(',')[0] : undefined,\n            'http.user_agent': userAgent,\n            'http.scheme': scheme,\n            'http.flavor': httpVersion,\n            'net.transport': httpVersion?.toUpperCase() === 'QUIC' ? 'ip_udp' : 'ip_tcp',\n            ...getRequestContentLengthAttribute(request),\n            ...httpHeadersToSpanAttributes(normalizedRequest.headers || {}, client.getDataCollectionOptions()),\n          },\n        },\n        span => {\n          onSpanCreated?.(span, request, response);\n          // Ensure we only end the span once\n          // E.g. error can be emitted before close is emitted\n          let isEnded = false;\n\n          function endSpan(status: SpanStatus): void {\n            if (isEnded) {\n              return;\n            }\n\n            isEnded = true;\n            // set attributes that come from the response\n            span.setAttributes({\n              'http.status_text': response.statusMessage?.toUpperCase(),\n              'http.response.status_code': response.statusCode,\n              'http.status_code': response.statusCode,\n              ...httpHeadersToSpanAttributes(\n                headersToDict(response.headers),\n                client?.getDataCollectionOptions() ?? false,\n                'response',\n              ),\n            });\n            span.setStatus(status);\n            onSpanEnd?.(span, request, response);\n            span.end();\n          }\n\n          response.once('close', () => {\n            endSpan(getSpanStatusFromHttpCode(response.statusCode));\n          });\n\n          response.once(errorMonitor, () => {\n            const httpStatus = getSpanStatusFromHttpCode(response.statusCode);\n            // Ensure we def. have an error status here\n            endSpan(httpStatus.code === SPAN_STATUS_ERROR ? httpStatus : { code: SPAN_STATUS_ERROR });\n          });\n\n          // Continue handling the request inside the active span context\n          next();\n        },\n      );\n    }\n  };\n}\n\nfunction shouldIgnoreSpansForIncomingRequest(\n  request: HttpIncomingMessage,\n  {\n    ignoreStaticAssets,\n    ignoreIncomingRequests,\n  }: {\n    ignoreStaticAssets?: boolean;\n    ignoreIncomingRequests?: (urlPath: string, request: HttpIncomingMessage) => boolean;\n  },\n): boolean {\n  // request.url is the only property that holds any information about the url\n  // it only consists of the URL path and query string (if any)\n  const urlPath = request.url;\n\n  const method = request.method?.toUpperCase();\n  // We do not capture OPTIONS/HEAD requests as spans\n  if (method === 'OPTIONS' || method === 'HEAD' || !urlPath) {\n    return true;\n  }\n\n  // Default static asset filtering\n  if (ignoreStaticAssets && method === 'GET' && isStaticAssetRequest(urlPath)) {\n    return true;\n  }\n\n  if (ignoreIncomingRequests?.(urlPath, request)) {\n    return true;\n  }\n\n  return false;\n}\n\nexport function isStaticAssetRequest(urlPath: string): boolean {\n  const path = stripUrlQueryAndFragment(urlPath);\n  // Common static file extensions\n  if (path.match(/\\.(ico|png|jpg|jpeg|gif|svg|css|js|woff|woff2|ttf|eot|webp|avif)$/)) {\n    return true;\n  }\n\n  // Common metadata files\n  if (path.match(/^\\/(robots\\.txt|sitemap\\.xml|manifest\\.json|browserconfig\\.xml)$/)) {\n    return true;\n  }\n\n  return false;\n}\n\nfunction isKnownPrefetchRequest(req: HttpIncomingMessage): boolean {\n  // Currently only handles Next.js prefetch requests but may check other frameworks in the future.\n  return req.headers['next-router-prefetch'] === '1';\n}\n\nfunction getRequestContentLengthAttribute(request: HttpIncomingMessage): SpanAttributes {\n  const { headers } = request;\n  const contentLengthHeader = headers['content-length'];\n  const length = contentLengthHeader ? parseInt(String(contentLengthHeader), 10) : -1;\n  const encoding = headers['content-encoding'];\n  return length >= 0\n    ? encoding && encoding !== 'identity'\n      ? { 'http.request_content_length': length }\n      : { 'http.request_content_length_uncompressed': length }\n    : {};\n}\n","/**\n * Core attribute extraction and building functions for MCP server instrumentation\n */\n\nimport { isURLObjectRelative, parseStringToURLObject } from '../../utils/url';\nimport {\n  MCP_LOGGING_DATA_TYPE_ATTRIBUTE,\n  MCP_LOGGING_LEVEL_ATTRIBUTE,\n  MCP_LOGGING_LOGGER_ATTRIBUTE,\n  MCP_LOGGING_MESSAGE_ATTRIBUTE,\n  MCP_REQUEST_ID_ATTRIBUTE,\n  MCP_RESOURCE_URI_ATTRIBUTE,\n} from './attributes';\nimport { extractTargetInfo, getRequestArguments } from './methodConfig';\nimport type { JsonRpcNotification, JsonRpcRequest, McpSpanType } from './types';\n\n/**\n * Formats logging data for span attributes\n * @internal\n */\nfunction formatLoggingData(data: unknown): string {\n  return typeof data === 'string' ? data : JSON.stringify(data);\n}\n\n/**\n * Extracts additional attributes for specific notification types\n * @param method - Notification method name\n * @param params - Notification parameters\n * @param recordInputs - Whether to include actual content or just metadata\n * @returns Method-specific attributes for span instrumentation\n */\nexport function getNotificationAttributes(\n  method: string,\n  params: Record<string, unknown>,\n  recordInputs?: boolean,\n): Record<string, string | number> {\n  const attributes: Record<string, string | number> = {};\n\n  switch (method) {\n    case 'notifications/cancelled':\n      if (params?.requestId) {\n        attributes['mcp.cancelled.request_id'] = String(params.requestId);\n      }\n      if (params?.reason) {\n        attributes['mcp.cancelled.reason'] = String(params.reason);\n      }\n      break;\n\n    case 'notifications/message':\n      if (params?.level) {\n        attributes[MCP_LOGGING_LEVEL_ATTRIBUTE] = String(params.level);\n      }\n      if (params?.logger) {\n        attributes[MCP_LOGGING_LOGGER_ATTRIBUTE] = String(params.logger);\n      }\n      if (params?.data !== undefined) {\n        attributes[MCP_LOGGING_DATA_TYPE_ATTRIBUTE] = typeof params.data;\n        if (recordInputs) {\n          attributes[MCP_LOGGING_MESSAGE_ATTRIBUTE] = formatLoggingData(params.data);\n        }\n      }\n      break;\n\n    case 'notifications/progress':\n      if (params?.progressToken) {\n        attributes['mcp.progress.token'] = String(params.progressToken);\n      }\n      if (typeof params?.progress === 'number') {\n        attributes['mcp.progress.current'] = params.progress;\n      }\n      if (typeof params?.total === 'number') {\n        attributes['mcp.progress.total'] = params.total;\n        if (typeof params?.progress === 'number') {\n          attributes['mcp.progress.percentage'] = (params.progress / params.total) * 100;\n        }\n      }\n      if (params?.message) {\n        attributes['mcp.progress.message'] = String(params.message);\n      }\n      break;\n\n    case 'notifications/resources/updated':\n      if (params?.uri) {\n        attributes[MCP_RESOURCE_URI_ATTRIBUTE] = String(params.uri);\n        const urlObject = parseStringToURLObject(String(params.uri));\n        if (urlObject && !isURLObjectRelative(urlObject)) {\n          attributes['mcp.resource.protocol'] = urlObject.protocol.replace(':', '');\n        }\n      }\n      break;\n\n    case 'notifications/initialized':\n      attributes['mcp.lifecycle.phase'] = 'initialization_complete';\n      attributes['mcp.protocol.ready'] = 1;\n      break;\n  }\n\n  return attributes;\n}\n\n/**\n * Build type-specific attributes based on message type\n * @param type - Span type (request or notification)\n * @param message - JSON-RPC message\n * @param params - Optional parameters for attribute extraction\n * @param recordInputs - Whether to capture input arguments in spans\n * @returns Type-specific attributes for span instrumentation\n */\nexport function buildTypeSpecificAttributes(\n  type: McpSpanType,\n  message: JsonRpcRequest | JsonRpcNotification,\n  params?: Record<string, unknown>,\n  recordInputs?: boolean,\n): Record<string, string | number> {\n  if (type === 'request') {\n    const request = message as JsonRpcRequest;\n    const targetInfo = extractTargetInfo(request.method, params || {});\n\n    return {\n      ...(request.id !== undefined && { [MCP_REQUEST_ID_ATTRIBUTE]: String(request.id) }),\n      ...targetInfo.attributes,\n      ...(recordInputs ? getRequestArguments(request.method, params || {}) : {}),\n    };\n  }\n\n  return getNotificationAttributes(message.method, params || {}, recordInputs);\n}\n\n// Re-export buildTransportAttributes for spans.ts\nexport { buildTransportAttributes } from './sessionExtraction';\n","/**\n * Essential MCP attribute constants for Sentry instrumentation\n *\n * Based on OpenTelemetry MCP semantic conventions\n * @see https://github.com/open-telemetry/semantic-conventions/blob/3097fb0af5b9492b0e3f55dc5f6c21a3dc2be8df/docs/gen-ai/mcp.md\n */\n\n// =============================================================================\n// CORE MCP ATTRIBUTES\n// =============================================================================\n\n/** The name of the request or notification method */\nexport const MCP_METHOD_NAME_ATTRIBUTE = 'mcp.method.name';\n\n/** JSON-RPC request identifier for the request. Unique within the MCP session. */\nexport const MCP_REQUEST_ID_ATTRIBUTE = 'mcp.request.id';\n\n/** Identifies the MCP session */\nexport const MCP_SESSION_ID_ATTRIBUTE = 'mcp.session.id';\n\n/** Transport method used for MCP communication */\nexport const MCP_TRANSPORT_ATTRIBUTE = 'mcp.transport';\n\n// =============================================================================\n// CLIENT ATTRIBUTES\n// =============================================================================\n\n/** Name of the MCP client application */\nexport const MCP_CLIENT_NAME_ATTRIBUTE = 'mcp.client.name';\n\n/** Display title of the MCP client application */\nexport const MCP_CLIENT_TITLE_ATTRIBUTE = 'mcp.client.title';\n\n/** Version of the MCP client application */\nexport const MCP_CLIENT_VERSION_ATTRIBUTE = 'mcp.client.version';\n\n// =============================================================================\n// SERVER ATTRIBUTES\n// =============================================================================\n\n/** Name of the MCP server application */\nexport const MCP_SERVER_NAME_ATTRIBUTE = 'mcp.server.name';\n\n/** Display title of the MCP server application */\nexport const MCP_SERVER_TITLE_ATTRIBUTE = 'mcp.server.title';\n\n/** Version of the MCP server application */\nexport const MCP_SERVER_VERSION_ATTRIBUTE = 'mcp.server.version';\n\n/** MCP protocol version used in the session */\nexport const MCP_PROTOCOL_VERSION_ATTRIBUTE = 'mcp.protocol.version';\n\n// =============================================================================\n// METHOD-SPECIFIC ATTRIBUTES\n// =============================================================================\n\n/** Name of the tool being called */\nexport const MCP_TOOL_NAME_ATTRIBUTE = 'mcp.tool.name';\n\n/** The resource URI being accessed */\nexport const MCP_RESOURCE_URI_ATTRIBUTE = 'mcp.resource.uri';\n\n/** Name of the prompt template */\nexport const MCP_PROMPT_NAME_ATTRIBUTE = 'mcp.prompt.name';\n\n// =============================================================================\n// TOOL RESULT ATTRIBUTES\n// =============================================================================\n\n/** Whether a tool execution resulted in an error */\nexport const MCP_TOOL_RESULT_IS_ERROR_ATTRIBUTE = 'mcp.tool.result.is_error';\n\n/** Number of content items in the tool result */\nexport const MCP_TOOL_RESULT_CONTENT_COUNT_ATTRIBUTE = 'mcp.tool.result.content_count';\n\n/** Serialized content of the tool result */\nexport const MCP_TOOL_RESULT_CONTENT_ATTRIBUTE = 'mcp.tool.result.content';\n\n/** Prefix for tool result attributes that contain sensitive content */\nexport const MCP_TOOL_RESULT_PREFIX = 'mcp.tool.result';\n\n// =============================================================================\n// PROMPT RESULT ATTRIBUTES\n// =============================================================================\n\n/** Description of the prompt result */\nexport const MCP_PROMPT_RESULT_DESCRIPTION_ATTRIBUTE = 'mcp.prompt.result.description';\n\n/** Number of messages in the prompt result */\nexport const MCP_PROMPT_RESULT_MESSAGE_COUNT_ATTRIBUTE = 'mcp.prompt.result.message_count';\n\n/** Role of the message in the prompt result (for single message results) */\nexport const MCP_PROMPT_RESULT_MESSAGE_ROLE_ATTRIBUTE = 'mcp.prompt.result.message_role';\n\n/** Content of the message in the prompt result (for single message results) */\nexport const MCP_PROMPT_RESULT_MESSAGE_CONTENT_ATTRIBUTE = 'mcp.prompt.result.message_content';\n\n/** Prefix for prompt result attributes that contain sensitive content */\nexport const MCP_PROMPT_RESULT_PREFIX = 'mcp.prompt.result';\n\n// =============================================================================\n// REQUEST ARGUMENT ATTRIBUTES\n// =============================================================================\n\n/** Prefix for MCP request argument prefix for each argument */\nexport const MCP_REQUEST_ARGUMENT = 'mcp.request.argument';\n\n// =============================================================================\n// LOGGING ATTRIBUTES\n// =============================================================================\n\n/** Log level for MCP logging operations */\nexport const MCP_LOGGING_LEVEL_ATTRIBUTE = 'mcp.logging.level';\n\n/** Logger name for MCP logging operations */\nexport const MCP_LOGGING_LOGGER_ATTRIBUTE = 'mcp.logging.logger';\n\n/** Data type of the logged message */\nexport const MCP_LOGGING_DATA_TYPE_ATTRIBUTE = 'mcp.logging.data_type';\n\n/** Log message content */\nexport const MCP_LOGGING_MESSAGE_ATTRIBUTE = 'mcp.logging.message';\n\n// =============================================================================\n// NETWORK ATTRIBUTES (OpenTelemetry Standard)\n// =============================================================================\n\n/** OSI transport layer protocol */\nexport const NETWORK_TRANSPORT_ATTRIBUTE = 'network.transport';\n\n/** The version of JSON RPC protocol used */\nexport const NETWORK_PROTOCOL_VERSION_ATTRIBUTE = 'network.protocol.version';\n\n/** Client address - domain name if available without reverse DNS lookup; otherwise, IP address or Unix domain socket name */\nexport const CLIENT_ADDRESS_ATTRIBUTE = 'client.address';\n\n/** Client port number */\nexport const CLIENT_PORT_ATTRIBUTE = 'client.port';\n\n// =============================================================================\n// SENTRY-SPECIFIC MCP ATTRIBUTE VALUES\n// =============================================================================\n\n/** Sentry operation value for MCP server spans */\nexport const MCP_SERVER_OP_VALUE = 'mcp.server';\n\n/**\n * Sentry operation value for client-to-server notifications\n * Following OpenTelemetry MCP semantic conventions\n */\nexport const MCP_NOTIFICATION_CLIENT_TO_SERVER_OP_VALUE = 'mcp.notification.client_to_server';\n\n/**\n * Sentry operation value for server-to-client notifications\n * Following OpenTelemetry MCP semantic conventions\n */\nexport const MCP_NOTIFICATION_SERVER_TO_CLIENT_OP_VALUE = 'mcp.notification.server_to_client';\n\n/** Sentry origin value for MCP function spans */\nexport const MCP_FUNCTION_ORIGIN_VALUE = 'auto.function.mcp_server';\n\n/** Sentry origin value for MCP notification spans */\nexport const MCP_NOTIFICATION_ORIGIN_VALUE = 'auto.mcp.notification';\n\n/** Sentry source value for MCP route spans */\nexport const MCP_ROUTE_SOURCE_VALUE = 'route';\n","/**\n * Request-span correlation system for MCP server instrumentation\n *\n * Handles mapping requestId to span data for correlation with handler execution.\n *\n * Uses sessionId as the primary key for stateful transports. This handles the wrapper\n * transport pattern (e.g., NodeStreamableHTTPServerTransport wrapping WebStandardStreamableHTTPServerTransport)\n * where onmessage and send may receive different `this` values but share the same sessionId.\n *\n * Falls back to WeakMap by transport instance for stateless transports (no sessionId).\n */\n\nimport { SPAN_STATUS_ERROR } from '../../tracing';\nimport type { Span } from '../../types/span';\nimport { MCP_PROTOCOL_VERSION_ATTRIBUTE } from './attributes';\nimport { extractPromptResultAttributes, extractToolResultAttributes } from './resultExtraction';\nimport {\n  buildServerAttributesFromInfo,\n  extractSessionDataFromInitializeResponse,\n  extractSessionDataFromResponse,\n} from './sessionExtraction';\nimport { updateSessionDataForTransport } from './sessionManagement';\nimport type { MCPTransport, RequestId, RequestSpanMapValue, ResolvedMcpOptions } from './types';\n\n/**\n * Session-scoped correlation for stateful transports (with sessionId)\n * @internal Using sessionId as key handles wrapper transport patterns where\n * different transport objects share the same logical session\n */\nconst sessionToSpanMap = new Map<string, Map<RequestId, RequestSpanMapValue>>();\n\n/**\n * Transport-scoped correlation fallback for stateless transports (no sessionId)\n * @internal WeakMap allows automatic cleanup when transport is garbage collected\n */\nconst statelessSpanMap = new WeakMap<MCPTransport, Map<RequestId, RequestSpanMapValue>>();\n\n/**\n * Gets or creates the span map for a transport, using sessionId when available\n * @internal\n * @param transport - MCP transport instance\n * @returns Span map for the transport/session\n */\nfunction getOrCreateSpanMap(transport: MCPTransport): Map<RequestId, RequestSpanMapValue> {\n  const sessionId = transport.sessionId;\n\n  if (sessionId) {\n    // Stateful transport - use sessionId as key (handles wrapper pattern)\n    let spanMap = sessionToSpanMap.get(sessionId);\n    if (!spanMap) {\n      spanMap = new Map();\n      sessionToSpanMap.set(sessionId, spanMap);\n    }\n    return spanMap;\n  }\n\n  // Stateless fallback - use transport instance as key\n  let spanMap = statelessSpanMap.get(transport);\n  if (!spanMap) {\n    spanMap = new Map();\n    statelessSpanMap.set(transport, spanMap);\n  }\n  return spanMap;\n}\n\n/**\n * Stores span context for later correlation with handler execution\n * @param transport - MCP transport instance\n * @param requestId - Request identifier\n * @param span - Active span to correlate\n * @param method - MCP method name\n * @param capturePolicy - Capture policy resolved when the request began\n */\nexport function storeSpanForRequest(\n  transport: MCPTransport,\n  requestId: RequestId,\n  span: Span,\n  method: string,\n  capturePolicy: ResolvedMcpOptions,\n): void {\n  const spanMap = getOrCreateSpanMap(transport);\n  spanMap.set(requestId, {\n    span,\n    method,\n    capturePolicy,\n    // oxlint-disable-next-line sdk/no-unsafe-random-apis\n    startTime: Date.now(),\n  });\n}\n\n/**\n * Completes span with results and cleans up correlation\n * @param transport - MCP transport instance\n * @param requestId - Request identifier\n * @param result - Execution result for attribute extraction\n * @param hasError - Whether the JSON-RPC response contained an error\n */\nexport function completeSpanWithResults(\n  transport: MCPTransport,\n  requestId: RequestId,\n  result: unknown,\n  hasError = false,\n): void {\n  const spanMap = getOrCreateSpanMap(transport);\n  const spanData = spanMap.get(requestId);\n  if (spanData) {\n    const { span, method } = spanData;\n    const responseSessionData =\n      method === 'initialize'\n        ? extractSessionDataFromInitializeResponse(result)\n        : extractSessionDataFromResponse(result);\n    if (responseSessionData.protocolVersion || responseSessionData.serverInfo) {\n      updateSessionDataForTransport(transport, responseSessionData);\n    }\n    const responseAttributes: Record<string, string | number> = {\n      ...buildServerAttributesFromInfo(responseSessionData.serverInfo),\n    };\n    if (responseSessionData.protocolVersion) {\n      responseAttributes[MCP_PROTOCOL_VERSION_ATTRIBUTE] = responseSessionData.protocolVersion;\n    }\n    if (Object.keys(responseAttributes).length > 0) {\n      span.setAttributes(responseAttributes);\n    }\n\n    if (hasError) {\n      span.setStatus({ code: SPAN_STATUS_ERROR, message: 'internal_error' });\n    } else if (method === 'tools/call') {\n      const toolAttributes = extractToolResultAttributes(result, spanData.capturePolicy.recordOutputs);\n      span.setAttributes(toolAttributes);\n    } else if (method === 'prompts/get') {\n      const promptAttributes = extractPromptResultAttributes(result, spanData.capturePolicy.recordOutputs);\n      span.setAttributes(promptAttributes);\n    }\n\n    span.end();\n    spanMap.delete(requestId);\n  }\n}\n\n/**\n * Cleans up pending spans for a specific transport (when that transport closes)\n * @param transport - MCP transport instance\n */\nexport function cleanupPendingSpansForTransport(transport: MCPTransport): void {\n  const sessionId = transport.sessionId;\n\n  // Try sessionId-based cleanup first (for stateful transports)\n  if (sessionId) {\n    const spanMap = sessionToSpanMap.get(sessionId);\n    if (spanMap) {\n      for (const [, spanData] of spanMap) {\n        spanData.span.setStatus({\n          code: SPAN_STATUS_ERROR,\n          message: 'cancelled',\n        });\n        spanData.span.end();\n      }\n      sessionToSpanMap.delete(sessionId);\n    }\n    return;\n  }\n\n  // Fallback to transport-based cleanup (for stateless transports)\n  const spanMap = statelessSpanMap.get(transport);\n  if (spanMap) {\n    for (const [, spanData] of spanMap) {\n      spanData.span.setStatus({\n        code: SPAN_STATUS_ERROR,\n        message: 'cancelled',\n      });\n      spanData.span.end();\n    }\n    spanMap.clear();\n    // Note: WeakMap entries are automatically cleaned up when transport is GC'd\n  }\n}\n","/**\n * Safe error capture utilities for MCP server instrumentation\n *\n * Ensures error reporting never interferes with MCP server operation.\n * All capture operations are wrapped in try-catch to prevent side effects.\n */\n\nimport { getClient } from '../../currentScopes';\nimport { captureException } from '../../exports';\nimport { SPAN_STATUS_ERROR } from '../../tracing';\nimport { getActiveSpan } from '../../utils/spanUtils';\nimport type { McpErrorType } from './types';\n\n/**\n * Captures an error without affecting MCP server operation.\n *\n * The active span already contains all MCP context (method, tool, arguments, etc.)\n * @param error - Error to capture\n * @param errorType - Classification of error type for filtering\n * @param extraData - Additional context data to include\n */\nexport function captureError(error: Error, errorType?: McpErrorType, extraData?: Record<string, unknown>): void {\n  try {\n    const client = getClient();\n    if (!client) {\n      return;\n    }\n\n    const activeSpan = getActiveSpan();\n    if (activeSpan?.isRecording()) {\n      activeSpan.setStatus({\n        code: SPAN_STATUS_ERROR,\n        message: 'internal_error',\n      });\n    }\n\n    captureException(error, {\n      mechanism: {\n        type: 'auto.ai.mcp_server',\n        handled: false,\n        data: {\n          error_type: errorType || 'handler_execution',\n          ...extraData,\n        },\n      },\n    });\n  } catch {\n    // noop\n  }\n}\n","/**\n * Handler method wrapping for MCP server instrumentation\n *\n * Provides automatic error capture and span correlation for tool, resource,\n * and prompt handlers.\n */\n\nimport { DEBUG_BUILD } from '../../debug-build';\nimport { debug } from '../../utils/debug-logger';\nimport { isObjectLike } from '../../utils/is';\nimport { fill } from '../../utils/object';\nimport { captureError } from './errorCapture';\nimport type { MCPHandler, MCPServerInstance } from './types';\n\n/**\n * Generic function to wrap MCP server method handlers\n * @internal\n * @param serverInstance - MCP server instance\n * @param methodName - Method name to wrap (tool, resource, prompt)\n */\nfunction wrapMethodHandler(serverInstance: MCPServerInstance, methodName: keyof MCPServerInstance): void {\n  fill(serverInstance, methodName, originalMethod => {\n    return function (this: MCPServerInstance, name: string, ...args: unknown[]) {\n      const handler = args[args.length - 1];\n\n      if (typeof handler !== 'function') {\n        return (originalMethod as (...args: unknown[]) => unknown).call(this, name, ...args);\n      }\n\n      const wrappedHandler = createWrappedHandler(handler as MCPHandler, methodName, name);\n      return (originalMethod as (...args: unknown[]) => unknown).call(this, name, ...args.slice(0, -1), wrappedHandler);\n    };\n  });\n}\n\n/**\n * Creates a wrapped handler with span correlation and error capture\n * @internal\n * @param originalHandler - Original handler function\n * @param methodName - MCP method name\n * @param handlerName - Handler identifier\n * @returns Wrapped handler function\n */\nfunction createWrappedHandler(originalHandler: MCPHandler, methodName: keyof MCPServerInstance, handlerName: string) {\n  return function (this: unknown, ...handlerArgs: unknown[]): unknown {\n    try {\n      return createErrorCapturingHandler.call(this, originalHandler, methodName, handlerName, handlerArgs);\n    } catch (error) {\n      DEBUG_BUILD && debug.warn('MCP handler wrapping failed:', error);\n      return originalHandler.apply(this, handlerArgs);\n    }\n  };\n}\n\n/**\n * Creates an error-capturing wrapper for handler execution\n * @internal\n * @param originalHandler - Original handler function\n * @param methodName - MCP method name\n * @param handlerName - Handler identifier\n * @param handlerArgs - Handler arguments\n * @param extraHandlerData - Additional handler context\n * @returns Handler execution result\n */\nfunction createErrorCapturingHandler(\n  this: MCPServerInstance,\n  originalHandler: MCPHandler,\n  methodName: keyof MCPServerInstance,\n  handlerName: string,\n  handlerArgs: unknown[],\n): unknown {\n  try {\n    const result = originalHandler.apply(this, handlerArgs);\n\n    if (isObjectLike(result) && typeof (result as { then?: unknown }).then === 'function') {\n      return Promise.resolve(result).catch(error => {\n        captureHandlerError(error, methodName, handlerName);\n        throw error;\n      });\n    }\n\n    return result;\n  } catch (error) {\n    captureHandlerError(error as Error, methodName, handlerName);\n    throw error;\n  }\n}\n\n/**\n * Captures handler execution errors based on handler type\n * @internal\n * @param error - Error to capture\n * @param methodName - MCP method name\n * @param handlerName - Handler identifier\n */\nfunction captureHandlerError(error: Error, methodName: keyof MCPServerInstance, handlerName: string): void {\n  try {\n    const extraData: Record<string, unknown> = {};\n\n    if (methodName === 'tool' || methodName === 'registerTool') {\n      extraData.tool_name = handlerName;\n\n      if (\n        error.name === 'ProtocolValidationError' ||\n        error.message.includes('validation') ||\n        error.message.includes('protocol')\n      ) {\n        captureError(error, 'validation', extraData);\n      } else if (\n        error.name === 'ServerTimeoutError' ||\n        error.message.includes('timed out') ||\n        error.message.includes('timeout')\n      ) {\n        captureError(error, 'timeout', extraData);\n      } else {\n        captureError(error, 'tool_execution', extraData);\n      }\n    } else if (methodName === 'resource' || methodName === 'registerResource') {\n      extraData.resource_uri = handlerName;\n      captureError(error, 'resource_execution', extraData);\n    } else if (methodName === 'prompt' || methodName === 'registerPrompt') {\n      extraData.prompt_name = handlerName;\n      captureError(error, 'prompt_execution', extraData);\n    }\n  } catch (_captureErr) {\n    // noop\n  }\n}\n\n/**\n * Wraps tool handlers to associate them with request spans.\n * Instruments both `tool` (legacy API) and `registerTool` (new API) if present.\n * @param serverInstance - MCP server instance\n */\nexport function wrapToolHandlers(serverInstance: MCPServerInstance): void {\n  // eslint-disable-next-line typescript/no-deprecated\n  if (typeof serverInstance.tool === 'function') wrapMethodHandler(serverInstance, 'tool');\n  if (typeof serverInstance.registerTool === 'function') wrapMethodHandler(serverInstance, 'registerTool');\n}\n\n/**\n * Wraps resource handlers to associate them with request spans.\n * Instruments both `resource` (legacy API) and `registerResource` (new API) if present.\n * @param serverInstance - MCP server instance\n */\nexport function wrapResourceHandlers(serverInstance: MCPServerInstance): void {\n  // eslint-disable-next-line typescript/no-deprecated\n  if (typeof serverInstance.resource === 'function') wrapMethodHandler(serverInstance, 'resource');\n  if (typeof serverInstance.registerResource === 'function') wrapMethodHandler(serverInstance, 'registerResource');\n}\n\n/**\n * Wraps prompt handlers to associate them with request spans.\n * Instruments both `prompt` (legacy API) and `registerPrompt` (new API) if present.\n * @param serverInstance - MCP server instance\n */\nexport function wrapPromptHandlers(serverInstance: MCPServerInstance): void {\n  // eslint-disable-next-line typescript/no-deprecated\n  if (typeof serverInstance.prompt === 'function') wrapMethodHandler(serverInstance, 'prompt');\n  if (typeof serverInstance.registerPrompt === 'function') wrapMethodHandler(serverInstance, 'registerPrompt');\n}\n\n/**\n * Wraps all MCP handler types for span correlation.\n * Supports both the legacy API (`tool`, `resource`, `prompt`) and the newer API\n * (`registerTool`, `registerResource`, `registerPrompt`), instrumenting whichever methods are present.\n * @param serverInstance - MCP server instance\n */\nexport function wrapAllMCPHandlers(serverInstance: MCPServerInstance): void {\n  wrapToolHandlers(serverInstance);\n  wrapResourceHandlers(serverInstance);\n  wrapPromptHandlers(serverInstance);\n}\n\n/**\n * Retroactively wraps handlers on tools, resources, and prompts that were registered\n * before `wrapMcpServerWithSentry` was called.\n *\n * The MCP SDK stores registered entries in private maps and invokes them via the entry's\n * own property at call time — `executor` for tools, `readCallback` for resources, and\n * `handler` for prompts. Replacing those properties\n * in-place is therefore equivalent to having wrapped the original registration call.\n *\n * NOTE: This intentionally accesses private MCP SDK internals (`_registeredTools` etc.).\n * The properties and their shapes are verified against @modelcontextprotocol/sdk source:\n * https://github.com/modelcontextprotocol/typescript-sdk/blob/2c0c481cb9dbfd15c8613f765c940a5f5bace94d/packages/server/src/server/mcp.ts#L304\n * When upgrading the MCP SDK, re-verify that these internal maps and their callable\n * properties still exist and are invoked directly (not captured by closure at registration).\n * All access is defensive — if a property is absent or not a function we skip silently.\n * @internal\n */\nexport function wrapExistingHandlers(serverInstance: MCPServerInstance): void {\n  const server = serverInstance as unknown as Record<string, unknown>;\n\n  // Tools: MCP SDK calls registeredTool.executor (generated from handler at registration time)\n  const registeredTools = server['_registeredTools'];\n  if (isObjectLike(registeredTools)) {\n    for (const [name, tool] of Object.entries(registeredTools as Record<string, Record<string, unknown>>)) {\n      if (typeof tool['executor'] === 'function') {\n        tool['executor'] = createWrappedHandler(tool['executor'] as MCPHandler, 'registerTool', name);\n      }\n    }\n  }\n\n  // Resources: MCP SDK calls registeredResource.readCallback\n  const registeredResources = server['_registeredResources'];\n  if (isObjectLike(registeredResources)) {\n    for (const [name, resource] of Object.entries(registeredResources as Record<string, Record<string, unknown>>)) {\n      if (typeof resource['readCallback'] === 'function') {\n        resource['readCallback'] = createWrappedHandler(\n          resource['readCallback'] as MCPHandler,\n          'registerResource',\n          name,\n        );\n      }\n    }\n  }\n\n  // Resource templates: MCP SDK calls registeredResourceTemplate.readCallback\n  const registeredResourceTemplates = server['_registeredResourceTemplates'];\n  if (isObjectLike(registeredResourceTemplates)) {\n    for (const [name, template] of Object.entries(\n      registeredResourceTemplates as Record<string, Record<string, unknown>>,\n    )) {\n      if (typeof template['readCallback'] === 'function') {\n        template['readCallback'] = createWrappedHandler(\n          template['readCallback'] as MCPHandler,\n          'registerResource',\n          name,\n        );\n      }\n    }\n  }\n\n  // Prompts: MCP SDK calls registeredPrompt.handler\n  const registeredPrompts = server['_registeredPrompts'];\n  if (isObjectLike(registeredPrompts)) {\n    for (const [name, prompt] of Object.entries(registeredPrompts as Record<string, Record<string, unknown>>)) {\n      if (typeof prompt['handler'] === 'function') {\n        prompt['handler'] = createWrappedHandler(prompt['handler'] as MCPHandler, 'registerPrompt', name);\n      }\n    }\n  }\n}\n","import { fill } from '../../utils/object';\nimport { wrapAllMCPHandlers, wrapExistingHandlers } from './handlers';\nimport { wrapTransportError, wrapTransportOnClose, wrapTransportOnMessage, wrapTransportSend } from './transport';\nimport type { MCPServerInstance, McpServerWrapperOptions, MCPTransport } from './types';\nimport { validateMcpServerInstance } from './validation';\n\n/**\n * Tracks wrapped MCP server instances to prevent double-wrapping\n * @internal\n */\nconst wrappedMcpServerInstances = new WeakSet();\n\n/**\n * Wraps an MCP Server instance with Sentry instrumentation.\n *\n * Compatible with versions `^1.9.0` of the `@modelcontextprotocol/sdk` package (legacy `tool`/`resource`/`prompt` API)\n * and `@modelcontextprotocol/server` version 2.x (`registerTool`/`registerResource`/`registerPrompt` API).\n * Automatically instruments transport methods and handler functions for comprehensive monitoring.\n *\n * Both call orderings are supported: wrapping before or after registering tools, resources,\n * and prompts. Sentry patches the registration methods for future handlers and retroactively\n * wraps any already-registered ones. Wrapping at construction time is recommended by\n * convention (consistent with other SDK integrations), but is not required.\n *\n * @example\n * ```typescript\n * import * as Sentry from '@sentry/core';\n * import { McpServer } from '@modelcontextprotocol/server';\n * import { NodeStreamableHTTPServerTransport } from '@modelcontextprotocol/node';\n *\n * // Wrap first, then register tools — this is the correct order\n * const server = Sentry.wrapMcpServerWithSentry(\n *   new McpServer({ name: \"my-server\", version: \"1.0.0\" })\n * );\n *\n * server.registerTool('my-tool', schema, handler);\n *\n * // Explicitly control input/output capture\n * const server = Sentry.wrapMcpServerWithSentry(\n *   new McpServer({ name: \"my-server\", version: \"1.0.0\" }),\n *   { recordInputs: true, recordOutputs: false }\n * );\n *\n * const transport = new NodeStreamableHTTPServerTransport();\n * await server.connect(transport);\n * ```\n *\n * @param mcpServerInstance - MCP server instance to instrument\n * @param options - Optional configuration for recording inputs and outputs\n * @returns Instrumented server instance (same reference)\n */\nexport function wrapMcpServerWithSentry<S extends object>(mcpServerInstance: S, options?: McpServerWrapperOptions): S {\n  if (wrappedMcpServerInstances.has(mcpServerInstance)) {\n    return mcpServerInstance;\n  }\n\n  if (!validateMcpServerInstance(mcpServerInstance)) {\n    return mcpServerInstance;\n  }\n\n  const serverInstance = mcpServerInstance as MCPServerInstance;\n  const captureOptions: McpServerWrapperOptions = { ...options };\n\n  fill(serverInstance, 'connect', originalConnect => {\n    return async function (this: MCPServerInstance, transport: MCPTransport, ...restArgs: unknown[]) {\n      const result = await (originalConnect as (...args: unknown[]) => Promise<unknown>).call(\n        this,\n        transport,\n        ...restArgs,\n      );\n\n      wrapTransportOnMessage(transport, captureOptions);\n      wrapTransportSend(transport, captureOptions);\n      wrapTransportOnClose(transport);\n      wrapTransportError(transport);\n\n      return result;\n    };\n  });\n\n  wrapAllMCPHandlers(serverInstance);\n\n  wrapExistingHandlers(serverInstance);\n\n  wrappedMcpServerInstances.add(mcpServerInstance);\n  return mcpServerInstance;\n}\n","/**\n * Method configuration and request processing for MCP server instrumentation\n */\n\nimport { isObjectLike } from '../../utils/is';\nimport {\n  MCP_PROMPT_NAME_ATTRIBUTE,\n  MCP_REQUEST_ARGUMENT,\n  MCP_RESOURCE_URI_ATTRIBUTE,\n  MCP_TOOL_NAME_ATTRIBUTE,\n} from './attributes';\nimport type { MethodConfig } from './types';\n\n/**\n * Configuration for MCP methods to extract targets and arguments\n * @internal Maps method names to their extraction configuration\n */\nconst METHOD_CONFIGS: Record<string, MethodConfig> = {\n  'tools/call': {\n    targetField: 'name',\n    targetAttribute: MCP_TOOL_NAME_ATTRIBUTE,\n    captureArguments: true,\n    argumentsField: 'arguments',\n  },\n  'resources/read': {\n    targetField: 'uri',\n    targetAttribute: MCP_RESOURCE_URI_ATTRIBUTE,\n    captureUri: true,\n  },\n  'resources/subscribe': {\n    targetField: 'uri',\n    targetAttribute: MCP_RESOURCE_URI_ATTRIBUTE,\n  },\n  'resources/unsubscribe': {\n    targetField: 'uri',\n    targetAttribute: MCP_RESOURCE_URI_ATTRIBUTE,\n  },\n  'prompts/get': {\n    targetField: 'name',\n    targetAttribute: MCP_PROMPT_NAME_ATTRIBUTE,\n    captureName: true,\n    captureArguments: true,\n    argumentsField: 'arguments',\n  },\n};\n\n/**\n * Extracts target info from method and params based on method type\n * @param method - MCP method name\n * @param params - Method parameters\n * @returns Target name and attributes for span instrumentation\n */\nexport function extractTargetInfo(\n  method: string,\n  params: Record<string, unknown>,\n): {\n  target?: string;\n  attributes: Record<string, string>;\n} {\n  const config = METHOD_CONFIGS[method];\n  if (!config) {\n    return { attributes: {} };\n  }\n\n  const target =\n    config.targetField && typeof params?.[config.targetField] === 'string'\n      ? (params[config.targetField] as string)\n      : undefined;\n\n  return {\n    target,\n    attributes: target && config.targetAttribute ? { [config.targetAttribute]: target } : {},\n  };\n}\n\n/**\n * Extracts request arguments based on method type\n * @param method - MCP method name\n * @param params - Method parameters\n * @returns Arguments as span attributes with mcp.request.argument prefix\n */\nexport function getRequestArguments(method: string, params: Record<string, unknown>): Record<string, string> {\n  const args: Record<string, string> = {};\n  const config = METHOD_CONFIGS[method];\n\n  if (!config) {\n    return args;\n  }\n\n  if (config.captureArguments && config.argumentsField && params?.[config.argumentsField]) {\n    const argumentsObj = params[config.argumentsField];\n    if (isObjectLike(argumentsObj)) {\n      for (const [key, value] of Object.entries(argumentsObj as Record<string, unknown>)) {\n        args[`${MCP_REQUEST_ARGUMENT}.${key.toLowerCase()}`] = JSON.stringify(value);\n      }\n    }\n  }\n\n  if (config.captureUri && params?.uri) {\n    args[`${MCP_REQUEST_ARGUMENT}.uri`] = JSON.stringify(params.uri);\n  }\n\n  if (config.captureName && params?.name) {\n    args[`${MCP_REQUEST_ARGUMENT}.name`] = JSON.stringify(params.name);\n  }\n\n  return args;\n}\n","/**\n * PII filtering for MCP server spans\n *\n * Removes network-level sensitive data when dataCollection.userInfo is false.\n * Input/output data (request arguments, tool/prompt results) is controlled\n * separately via recordInputs/recordOutputs options.\n */\nimport type { SpanAttributeValue } from '../../types/span';\nimport { CLIENT_ADDRESS_ATTRIBUTE, CLIENT_PORT_ATTRIBUTE, MCP_RESOURCE_URI_ATTRIBUTE } from './attributes';\n\n/**\n * Network PII attributes that should be removed when dataCollection.userInfo is false\n * @internal\n */\nconst NETWORK_PII_ATTRIBUTES = new Set([CLIENT_ADDRESS_ATTRIBUTE, CLIENT_PORT_ATTRIBUTE, MCP_RESOURCE_URI_ATTRIBUTE]);\n\n/**\n * Checks if an attribute key should be considered network PII.\n *\n * Returns true for:\n * - client.address (IP address)\n * - client.port (port number)\n * - mcp.resource.uri (potentially sensitive URIs)\n *\n * @param key - Attribute key to evaluate\n * @returns true if the attribute should be filtered out (is network PII), false if it should be preserved\n * @internal\n */\nfunction isNetworkPiiAttribute(key: string): boolean {\n  return NETWORK_PII_ATTRIBUTES.has(key);\n}\n\n/**\n * Removes network PII attributes from span data when dataCollection.userInfo is false\n * @param spanData - Raw span attributes\n * @param userInfo - Whether to include user identity data (IP, port, resource URIs)\n * @returns Filtered span attributes\n */\nexport function filterMcpPiiFromSpanData(\n  spanData: Record<string, unknown>,\n  userInfo: boolean,\n): Record<string, SpanAttributeValue> {\n  if (userInfo) {\n    return spanData as Record<string, SpanAttributeValue>;\n  }\n\n  return Object.entries(spanData).reduce(\n    (acc, [key, value]) => {\n      if (!isNetworkPiiAttribute(key)) {\n        acc[key] = value as SpanAttributeValue;\n      }\n      return acc;\n    },\n    {} as Record<string, SpanAttributeValue>,\n  );\n}\n","/**\n * Result extraction functions for MCP server instrumentation\n *\n * Handles extraction of attributes from tool and prompt execution results.\n */\n\nimport {\n  MCP_PROMPT_RESULT_DESCRIPTION_ATTRIBUTE,\n  MCP_PROMPT_RESULT_MESSAGE_COUNT_ATTRIBUTE,\n  MCP_TOOL_RESULT_CONTENT_COUNT_ATTRIBUTE,\n  MCP_TOOL_RESULT_IS_ERROR_ATTRIBUTE,\n} from './attributes';\nimport { isValidContentItem } from './validation';\n\n/**\n * Build attributes for tool result content items\n * @param content - Array of content items from tool result\n * @param includeContent - Whether to include actual content (text, URIs) or just metadata\n * @returns Attributes extracted from each content item\n */\nfunction buildAllContentItemAttributes(\n  content: unknown[],\n  includeContent: boolean,\n): Record<string, string | number | boolean> {\n  const attributes: Record<string, string | number> = {\n    [MCP_TOOL_RESULT_CONTENT_COUNT_ATTRIBUTE]: content.length,\n  };\n\n  for (const [i, item] of content.entries()) {\n    if (!isValidContentItem(item)) {\n      continue;\n    }\n\n    const prefix = content.length === 1 ? 'mcp.tool.result' : `mcp.tool.result.${i}`;\n\n    if (typeof item.type === 'string') {\n      attributes[`${prefix}.content_type`] = item.type;\n    }\n\n    if (includeContent) {\n      const safeSet = (key: string, value: unknown): void => {\n        if (typeof value === 'string') {\n          attributes[`${prefix}.${key}`] = value;\n        }\n      };\n\n      safeSet('mime_type', item.mimeType);\n      safeSet('uri', item.uri);\n      safeSet('name', item.name);\n\n      if (typeof item.text === 'string') {\n        attributes[`${prefix}.content`] = item.text;\n      }\n\n      if (typeof item.data === 'string') {\n        attributes[`${prefix}.data_size`] = item.data.length;\n      }\n\n      const resource = item.resource;\n      if (isValidContentItem(resource)) {\n        safeSet('resource_uri', resource.uri);\n        safeSet('resource_mime_type', resource.mimeType);\n      }\n    }\n  }\n\n  return attributes;\n}\n\n/**\n * Extract tool result attributes for span instrumentation\n * @param result - Tool execution result\n * @param recordOutputs - Whether to include actual content or just metadata (counts, error status)\n * @returns Attributes extracted from tool result content\n */\nexport function extractToolResultAttributes(\n  result: unknown,\n  recordOutputs: boolean,\n): Record<string, string | number | boolean> {\n  if (!isValidContentItem(result)) {\n    return {};\n  }\n\n  const attributes = Array.isArray(result.content) ? buildAllContentItemAttributes(result.content, recordOutputs) : {};\n\n  if (typeof result.isError === 'boolean') {\n    attributes[MCP_TOOL_RESULT_IS_ERROR_ATTRIBUTE] = result.isError;\n  }\n\n  return attributes;\n}\n\n/**\n * Extract prompt result attributes for span instrumentation\n * @param result - Prompt execution result\n * @param recordOutputs - Whether to include actual content or just metadata (counts)\n * @returns Attributes extracted from prompt result\n */\nexport function extractPromptResultAttributes(\n  result: unknown,\n  recordOutputs: boolean,\n): Record<string, string | number | boolean> {\n  const attributes: Record<string, string | number | boolean> = {};\n  if (!isValidContentItem(result)) {\n    return attributes;\n  }\n\n  if (recordOutputs && typeof result.description === 'string') {\n    attributes[MCP_PROMPT_RESULT_DESCRIPTION_ATTRIBUTE] = result.description;\n  }\n\n  if (Array.isArray(result.messages)) {\n    attributes[MCP_PROMPT_RESULT_MESSAGE_COUNT_ATTRIBUTE] = result.messages.length;\n\n    if (recordOutputs) {\n      const messages = result.messages;\n      for (const [i, message] of messages.entries()) {\n        if (!isValidContentItem(message)) {\n          continue;\n        }\n\n        const prefix = messages.length === 1 ? 'mcp.prompt.result' : `mcp.prompt.result.${i}`;\n\n        const safeSet = (key: string, value: unknown): void => {\n          if (typeof value === 'string') {\n            const attrName = messages.length === 1 ? `${prefix}.message_${key}` : `${prefix}.${key}`;\n            attributes[attrName] = value;\n          }\n        };\n\n        safeSet('role', message.role);\n\n        if (isValidContentItem(message.content)) {\n          const content = message.content;\n          if (typeof content.text === 'string') {\n            const attrName = messages.length === 1 ? `${prefix}.message_content` : `${prefix}.content`;\n            attributes[attrName] = content.text;\n          }\n        }\n      }\n    }\n  }\n\n  return attributes;\n}\n","/**\n * Session and party info extraction functions for MCP server instrumentation\n *\n * Handles extraction of client/server info and session data from MCP messages.\n */\n\nimport {\n  CLIENT_ADDRESS_ATTRIBUTE,\n  CLIENT_PORT_ATTRIBUTE,\n  MCP_PROTOCOL_VERSION_ATTRIBUTE,\n  MCP_SERVER_NAME_ATTRIBUTE,\n  MCP_SERVER_TITLE_ATTRIBUTE,\n  MCP_SERVER_VERSION_ATTRIBUTE,\n  MCP_SESSION_ID_ATTRIBUTE,\n  MCP_TRANSPORT_ATTRIBUTE,\n  NETWORK_PROTOCOL_VERSION_ATTRIBUTE,\n  NETWORK_TRANSPORT_ATTRIBUTE,\n} from './attributes';\nimport {\n  getClientInfoForTransport,\n  getProtocolVersionForTransport,\n  getSessionDataForTransport,\n} from './sessionManagement';\nimport type {\n  ExtraHandlerData,\n  JsonRpcNotification,\n  JsonRpcRequest,\n  MCPTransport,\n  PartyInfo,\n  SessionData,\n} from './types';\nimport { isValidContentItem } from './validation';\n\nconst MCP_PROTOCOL_VERSION_META_KEY = 'io.modelcontextprotocol/protocolVersion';\nconst MCP_CLIENT_INFO_META_KEY = 'io.modelcontextprotocol/clientInfo';\nconst MCP_SERVER_INFO_META_KEY = 'io.modelcontextprotocol/serverInfo';\n\n/**\n * Extracts and validates PartyInfo from an unknown object\n * @param obj - Unknown object that might contain party info\n * @returns Validated PartyInfo object with only string properties\n */\nfunction extractPartyInfo(obj: unknown): PartyInfo {\n  const partyInfo: PartyInfo = {};\n\n  if (isValidContentItem(obj)) {\n    if (typeof obj.name === 'string') {\n      partyInfo.name = obj.name;\n    }\n    if (typeof obj.title === 'string') {\n      partyInfo.title = obj.title;\n    }\n    if (typeof obj.version === 'string') {\n      partyInfo.version = obj.version;\n    }\n  }\n\n  return partyInfo;\n}\n\n/**\n * Extracts session data from \"initialize\" requests\n * @param request - JSON-RPC \"initialize\" request containing client info and protocol version\n * @returns Session data extracted from request parameters including protocol version and client info\n */\nexport function extractSessionDataFromInitializeRequest(request: JsonRpcRequest): SessionData {\n  const sessionData: SessionData = {};\n  if (isValidContentItem(request.params)) {\n    if (typeof request.params.protocolVersion === 'string') {\n      sessionData.protocolVersion = request.params.protocolVersion;\n    }\n    if (request.params.clientInfo) {\n      sessionData.clientInfo = extractPartyInfo(request.params.clientInfo);\n    }\n  }\n\n  return sessionData;\n}\n\n/**\n * Extracts session data from an MCP 2026-07-28 request or notification envelope.\n * @param message - JSON-RPC message containing modern request metadata\n * @returns Session data extracted from the message\n */\nexport function extractSessionDataFromMessage(message: JsonRpcRequest | JsonRpcNotification): SessionData {\n  const sessionData: SessionData = {};\n  if (isValidContentItem(message.params)) {\n    if (isValidContentItem(message.params._meta)) {\n      const meta = message.params._meta;\n      if (typeof meta[MCP_PROTOCOL_VERSION_META_KEY] === 'string') {\n        sessionData.protocolVersion = meta[MCP_PROTOCOL_VERSION_META_KEY];\n      }\n      if (meta[MCP_CLIENT_INFO_META_KEY]) {\n        sessionData.clientInfo = extractPartyInfo(meta[MCP_CLIENT_INFO_META_KEY]);\n      }\n    }\n  }\n\n  return sessionData;\n}\n\n/**\n * Extracts session data from \"initialize\" response\n * @param result - \"initialize\" response result containing server info and protocol version\n * @returns Partial session data extracted from response including protocol version and server info\n */\nexport function extractSessionDataFromInitializeResponse(result: unknown): Partial<SessionData> {\n  const sessionData: Partial<SessionData> = {};\n  if (isValidContentItem(result)) {\n    if (typeof result.protocolVersion === 'string') {\n      sessionData.protocolVersion = result.protocolVersion;\n    }\n    if (result.serverInfo) {\n      sessionData.serverInfo = extractPartyInfo(result.serverInfo);\n    }\n  }\n\n  return sessionData;\n}\n\n/**\n * Extracts session data from MCP 2026-07-28 result metadata.\n * @param result - JSON-RPC result containing modern response metadata\n * @returns Session data extracted from the result\n */\nexport function extractSessionDataFromResponse(result: unknown): Partial<SessionData> {\n  const sessionData: Partial<SessionData> = {};\n  if (isValidContentItem(result)) {\n    if (isValidContentItem(result._meta) && result._meta[MCP_SERVER_INFO_META_KEY]) {\n      sessionData.serverInfo = extractPartyInfo(result._meta[MCP_SERVER_INFO_META_KEY]);\n    }\n  }\n  return sessionData;\n}\n\n/**\n * Build client attributes from stored client info\n * @param transport - MCP transport instance\n * @returns Client attributes for span instrumentation\n */\nexport function getClientAttributes(transport: MCPTransport): Record<string, string> {\n  const clientInfo = getClientInfoForTransport(transport);\n  const attributes: Record<string, string> = {};\n\n  if (clientInfo?.name) {\n    attributes['mcp.client.name'] = clientInfo.name;\n  }\n  if (clientInfo?.title) {\n    attributes['mcp.client.title'] = clientInfo.title;\n  }\n  if (clientInfo?.version) {\n    attributes['mcp.client.version'] = clientInfo.version;\n  }\n\n  return attributes;\n}\n\n/**\n * Build client attributes from PartyInfo directly\n * @param clientInfo - Client party info\n * @returns Client attributes for span instrumentation\n */\nexport function buildClientAttributesFromInfo(clientInfo?: PartyInfo): Record<string, string> {\n  const attributes: Record<string, string> = {};\n\n  if (clientInfo?.name) {\n    attributes['mcp.client.name'] = clientInfo.name;\n  }\n  if (clientInfo?.title) {\n    attributes['mcp.client.title'] = clientInfo.title;\n  }\n  if (clientInfo?.version) {\n    attributes['mcp.client.version'] = clientInfo.version;\n  }\n\n  return attributes;\n}\n\n/**\n * Build server attributes from stored server info\n * @param transport - MCP transport instance\n * @returns Server attributes for span instrumentation\n */\nexport function getServerAttributes(transport: MCPTransport): Record<string, string> {\n  const serverInfo = getSessionDataForTransport(transport)?.serverInfo;\n  const attributes: Record<string, string> = {};\n\n  if (serverInfo?.name) {\n    attributes[MCP_SERVER_NAME_ATTRIBUTE] = serverInfo.name;\n  }\n  if (serverInfo?.title) {\n    attributes[MCP_SERVER_TITLE_ATTRIBUTE] = serverInfo.title;\n  }\n  if (serverInfo?.version) {\n    attributes[MCP_SERVER_VERSION_ATTRIBUTE] = serverInfo.version;\n  }\n\n  return attributes;\n}\n\n/**\n * Build server attributes from PartyInfo directly\n * @param serverInfo - Server party info\n * @returns Server attributes for span instrumentation\n */\nexport function buildServerAttributesFromInfo(serverInfo?: PartyInfo): Record<string, string> {\n  const attributes: Record<string, string> = {};\n\n  if (serverInfo?.name) {\n    attributes[MCP_SERVER_NAME_ATTRIBUTE] = serverInfo.name;\n  }\n  if (serverInfo?.title) {\n    attributes[MCP_SERVER_TITLE_ATTRIBUTE] = serverInfo.title;\n  }\n  if (serverInfo?.version) {\n    attributes[MCP_SERVER_VERSION_ATTRIBUTE] = serverInfo.version;\n  }\n\n  return attributes;\n}\n\n/**\n * Extracts client connection info from extra handler data\n * @param extra - Extra handler data containing connection info\n * @returns Client address and port information\n */\nexport function extractClientInfo(extra: ExtraHandlerData): {\n  address?: string;\n  port?: number;\n} {\n  return {\n    address:\n      extra?.requestInfo?.remoteAddress ||\n      extra?.clientAddress ||\n      extra?.request?.ip ||\n      extra?.request?.connection?.remoteAddress,\n    port: extra?.requestInfo?.remotePort || extra?.clientPort || extra?.request?.connection?.remotePort,\n  };\n}\n\n/**\n * Extracts transport types based on transport constructor name\n * @param transport - MCP transport instance\n * @returns Transport type mapping for span attributes\n */\nexport function getTransportTypes(transport: MCPTransport): { mcpTransport: string; networkTransport: string } {\n  if (!transport?.constructor) {\n    return { mcpTransport: 'unknown', networkTransport: 'unknown' };\n  }\n  const transportName = typeof transport.constructor?.name === 'string' ? transport.constructor.name : 'unknown';\n  let networkTransport = 'unknown';\n\n  const lowerTransportName = transportName.toLowerCase();\n  if (lowerTransportName.includes('stdio')) {\n    networkTransport = 'pipe';\n  } else if (lowerTransportName.includes('http') || lowerTransportName.includes('sse')) {\n    networkTransport = 'tcp';\n  }\n\n  return {\n    mcpTransport: transportName,\n    networkTransport,\n  };\n}\n\n/**\n * Build transport and network attributes\n * @param transport - MCP transport instance\n * @param extra - Optional extra handler data\n * @returns Transport attributes for span instrumentation\n * @note sessionId may be undefined during initial setup - session should be established by client during initialize flow\n */\nexport function buildTransportAttributes(\n  transport: MCPTransport,\n  extra?: ExtraHandlerData,\n): Record<string, string | number> {\n  const sessionId = transport && 'sessionId' in transport ? transport.sessionId : undefined;\n  const clientInfo = extra ? extractClientInfo(extra) : {};\n  const { mcpTransport, networkTransport } = getTransportTypes(transport);\n  const clientAttributes = getClientAttributes(transport);\n  const serverAttributes = getServerAttributes(transport);\n  const protocolVersion = getProtocolVersionForTransport(transport);\n\n  const attributes = {\n    ...(sessionId && { [MCP_SESSION_ID_ATTRIBUTE]: sessionId }),\n    ...(clientInfo.address && { [CLIENT_ADDRESS_ATTRIBUTE]: clientInfo.address }),\n    ...(clientInfo.port && { [CLIENT_PORT_ATTRIBUTE]: clientInfo.port }),\n    [MCP_TRANSPORT_ATTRIBUTE]: mcpTransport,\n    [NETWORK_TRANSPORT_ATTRIBUTE]: networkTransport,\n    [NETWORK_PROTOCOL_VERSION_ATTRIBUTE]: '2.0',\n    ...(protocolVersion && { [MCP_PROTOCOL_VERSION_ATTRIBUTE]: protocolVersion }),\n    ...clientAttributes,\n    ...serverAttributes,\n  };\n\n  return attributes;\n}\n","/**\n * Session data management for MCP server instrumentation\n *\n * Uses sessionId as the primary key for stateful transports. This handles the wrapper\n * transport pattern (e.g., NodeStreamableHTTPServerTransport wrapping WebStandardStreamableHTTPServerTransport)\n * where different methods may receive different `this` values but share the same sessionId.\n *\n * Falls back to WeakMap by transport instance for stateless transports (no sessionId).\n */\n\nimport type { MCPTransport, PartyInfo, SessionData } from './types';\n\n/**\n * Session-scoped data storage for stateful transports (with sessionId)\n * @internal Using sessionId as key handles wrapper transport patterns\n */\nconst sessionToSessionData = new Map<string, SessionData>();\n\n/**\n * Transport-scoped data storage fallback for stateless transports (no sessionId)\n * @internal WeakMap allows automatic cleanup when transport is garbage collected\n */\nconst statelessSessionData = new WeakMap<MCPTransport, SessionData>();\n\n/**\n * Gets session data for a transport, checking sessionId first then fallback\n * @internal\n */\nfunction getSessionData(transport: MCPTransport): SessionData | undefined {\n  const sessionId = transport.sessionId;\n  if (sessionId) {\n    return sessionToSessionData.get(sessionId);\n  }\n  return statelessSessionData.get(transport);\n}\n\n/**\n * Sets session data for a transport, using sessionId when available\n * @internal\n */\nfunction setSessionData(transport: MCPTransport, data: SessionData): void {\n  const sessionId = transport.sessionId;\n  if (sessionId) {\n    sessionToSessionData.set(sessionId, data);\n  } else {\n    statelessSessionData.set(transport, data);\n  }\n}\n\n/**\n * Stores session data for a transport\n * @param transport - MCP transport instance\n * @param sessionData - Session data to store\n */\nexport function storeSessionDataForTransport(transport: MCPTransport, sessionData: SessionData): void {\n  // For stateful transports, always store (sessionId is the key)\n  // For stateless transports, also store (transport instance is the key)\n  setSessionData(transport, sessionData);\n}\n\n/**\n * Updates session data for a transport (merges with existing data)\n * @param transport - MCP transport instance\n * @param partialSessionData - Partial session data to merge with existing data\n */\nexport function updateSessionDataForTransport(transport: MCPTransport, partialSessionData: Partial<SessionData>): void {\n  const existingData = getSessionData(transport) || {};\n  setSessionData(transport, { ...existingData, ...partialSessionData });\n}\n\n/**\n * Retrieves client information for a transport\n * @param transport - MCP transport instance\n * @returns Client information if available\n */\nexport function getClientInfoForTransport(transport: MCPTransport): PartyInfo | undefined {\n  return getSessionData(transport)?.clientInfo;\n}\n\n/**\n * Retrieves protocol version for a transport\n * @param transport - MCP transport instance\n * @returns Protocol version if available\n */\nexport function getProtocolVersionForTransport(transport: MCPTransport): string | undefined {\n  return getSessionData(transport)?.protocolVersion;\n}\n\n/**\n * Retrieves full session data for a transport\n * @param transport - MCP transport instance\n * @returns Complete session data if available\n */\nexport function getSessionDataForTransport(transport: MCPTransport): SessionData | undefined {\n  return getSessionData(transport);\n}\n\n/**\n * Cleans up session data for a specific transport (when that transport closes)\n * @param transport - MCP transport instance\n */\nexport function cleanupSessionDataForTransport(transport: MCPTransport): void {\n  const sessionId = transport.sessionId;\n  if (sessionId) {\n    sessionToSessionData.delete(sessionId);\n  }\n  // Note: WeakMap entries are automatically cleaned up when transport is GC'd\n  // No explicit delete needed for statelessSessionData\n}\n","/**\n * Span creation and management functions for MCP server instrumentation\n *\n * Provides unified span creation following OpenTelemetry MCP semantic conventions and our opinitionated take on MCP.\n * Handles both request and notification spans with attribute extraction.\n */\n\nimport { getClient } from '../../currentScopes';\nimport {\n  SEMANTIC_ATTRIBUTE_SENTRY_OP,\n  SEMANTIC_ATTRIBUTE_SENTRY_ORIGIN,\n  SEMANTIC_ATTRIBUTE_SENTRY_SOURCE,\n} from '../../semanticAttributes';\nimport { startSpan } from '../../tracing';\nimport { buildTransportAttributes, buildTypeSpecificAttributes } from './attributeExtraction';\nimport {\n  MCP_FUNCTION_ORIGIN_VALUE,\n  MCP_METHOD_NAME_ATTRIBUTE,\n  MCP_NOTIFICATION_CLIENT_TO_SERVER_OP_VALUE,\n  MCP_NOTIFICATION_ORIGIN_VALUE,\n  MCP_NOTIFICATION_SERVER_TO_CLIENT_OP_VALUE,\n  MCP_ROUTE_SOURCE_VALUE,\n  MCP_SERVER_OP_VALUE,\n} from './attributes';\nimport { extractTargetInfo } from './methodConfig';\nimport { filterMcpPiiFromSpanData } from './piiFiltering';\nimport type {\n  ExtraHandlerData,\n  JsonRpcNotification,\n  JsonRpcRequest,\n  McpSpanConfig,\n  MCPTransport,\n  ResolvedMcpOptions,\n} from './types';\n\n/**\n * Creates a span name based on the method and target\n * @internal\n * @param method - MCP method name\n * @param target - Optional target identifier\n * @returns Formatted span name\n */\nfunction createSpanName(method: string, target?: string): string {\n  return target ? `${method} ${target}` : method;\n}\n\n/**\n * Build Sentry-specific attributes based on span type\n * @internal\n * @param type - Span type configuration\n * @returns Sentry-specific attributes\n */\nfunction buildSentryAttributes(type: McpSpanConfig['type']): Record<string, string> {\n  let op: string;\n  let origin: string;\n\n  switch (type) {\n    case 'request':\n      op = MCP_SERVER_OP_VALUE;\n      origin = MCP_FUNCTION_ORIGIN_VALUE;\n      break;\n    case 'notification-incoming':\n      op = MCP_NOTIFICATION_CLIENT_TO_SERVER_OP_VALUE;\n      origin = MCP_NOTIFICATION_ORIGIN_VALUE;\n      break;\n    case 'notification-outgoing':\n      op = MCP_NOTIFICATION_SERVER_TO_CLIENT_OP_VALUE;\n      origin = MCP_NOTIFICATION_ORIGIN_VALUE;\n      break;\n  }\n\n  return {\n    [SEMANTIC_ATTRIBUTE_SENTRY_OP]: op,\n    [SEMANTIC_ATTRIBUTE_SENTRY_ORIGIN]: origin,\n    [SEMANTIC_ATTRIBUTE_SENTRY_SOURCE]: MCP_ROUTE_SOURCE_VALUE,\n  };\n}\n\n/**\n * Unified builder for creating MCP spans\n * @internal\n * @param config - Span configuration\n * @returns Created span\n */\nfunction createMcpSpan(config: McpSpanConfig): unknown {\n  const { type, message, transport, extra, callback, options } = config;\n  const { method } = message;\n  const params = message.params;\n\n  // Determine span name based on type and OTEL conventions\n  let spanName: string;\n  if (type === 'request') {\n    const targetInfo = extractTargetInfo(method, params || {});\n    spanName = createSpanName(method, targetInfo.target);\n  } else {\n    // For notifications, use method name directly per OpenTelemetry conventions\n    spanName = method;\n  }\n\n  const rawAttributes: Record<string, string | number> = {\n    ...buildTransportAttributes(transport, extra),\n    [MCP_METHOD_NAME_ATTRIBUTE]: method,\n    ...buildTypeSpecificAttributes(type, message, params, options?.recordInputs),\n    ...buildSentryAttributes(type),\n  };\n\n  const client = getClient();\n  const userInfo = Boolean(client?.getDataCollectionOptions().userInfo);\n  const attributes = filterMcpPiiFromSpanData(rawAttributes, userInfo) as Record<string, string | number>;\n\n  return startSpan(\n    {\n      name: spanName,\n      forceTransaction: true,\n      attributes,\n    },\n    callback,\n  );\n}\n\n/**\n * Creates a span for incoming MCP notifications\n * @param jsonRpcMessage - Notification message\n * @param transport - MCP transport instance\n * @param extra - Extra handler data\n * @param options - Resolved MCP options\n * @param callback - Span execution callback\n * @returns Span execution result\n */\nexport function createMcpNotificationSpan(\n  jsonRpcMessage: JsonRpcNotification,\n  transport: MCPTransport,\n  extra: ExtraHandlerData,\n  options: ResolvedMcpOptions,\n  callback: () => unknown,\n): unknown {\n  return createMcpSpan({\n    type: 'notification-incoming',\n    message: jsonRpcMessage,\n    transport,\n    extra,\n    callback,\n    options,\n  });\n}\n\n/**\n * Creates a span for outgoing MCP notifications\n * @param jsonRpcMessage - Notification message\n * @param transport - MCP transport instance\n * @param options - Resolved MCP options\n * @param callback - Span execution callback\n * @returns Span execution result\n */\nexport function createMcpOutgoingNotificationSpan(\n  jsonRpcMessage: JsonRpcNotification,\n  transport: MCPTransport,\n  options: ResolvedMcpOptions,\n  callback: () => unknown,\n): unknown {\n  return createMcpSpan({\n    type: 'notification-outgoing',\n    message: jsonRpcMessage,\n    transport,\n    options,\n    callback,\n  });\n}\n\n/**\n * Builds span configuration for MCP server requests\n * @param jsonRpcMessage - Request message\n * @param transport - MCP transport instance\n * @param extra - Optional extra handler data\n * @param options - Resolved MCP options\n * @returns Span configuration object\n */\nexport function buildMcpServerSpanConfig(\n  jsonRpcMessage: JsonRpcRequest,\n  transport: MCPTransport,\n  extra?: ExtraHandlerData,\n  options?: ResolvedMcpOptions,\n): {\n  name: string;\n  op: string;\n  forceTransaction: boolean;\n  attributes: Record<string, string | number>;\n} {\n  const { method } = jsonRpcMessage;\n  const params = jsonRpcMessage.params;\n\n  const targetInfo = extractTargetInfo(method, params || {});\n  const spanName = createSpanName(method, targetInfo.target);\n\n  const rawAttributes: Record<string, string | number> = {\n    ...buildTransportAttributes(transport, extra),\n    [MCP_METHOD_NAME_ATTRIBUTE]: method,\n    ...buildTypeSpecificAttributes('request', jsonRpcMessage, params, options?.recordInputs),\n    ...buildSentryAttributes('request'),\n  };\n\n  const client = getClient();\n  const userInfo = Boolean(client?.getDataCollectionOptions().userInfo);\n  const attributes = filterMcpPiiFromSpanData(rawAttributes, userInfo) as Record<string, string | number>;\n\n  return {\n    name: spanName,\n    op: MCP_SERVER_OP_VALUE,\n    forceTransaction: true,\n    attributes,\n  };\n}\n","/**\n * Transport layer instrumentation for MCP server\n *\n * Handles message interception and response correlation.\n * @see https://modelcontextprotocol.io/specification/2025-06-18/basic/transports\n */\n\nimport { getClient, getIsolationScope, withIsolationScope } from '../../currentScopes';\nimport { startInactiveSpan, withActiveSpan } from '../../tracing';\nimport { isObjectLike } from '../../utils/is';\nimport { fill } from '../../utils/object';\nimport { MCP_PROTOCOL_VERSION_ATTRIBUTE } from './attributes';\nimport { cleanupPendingSpansForTransport, completeSpanWithResults, storeSpanForRequest } from './correlation';\nimport { captureError } from './errorCapture';\nimport {\n  buildClientAttributesFromInfo,\n  extractSessionDataFromInitializeRequest,\n  extractSessionDataFromMessage,\n} from './sessionExtraction';\nimport { cleanupSessionDataForTransport, updateSessionDataForTransport } from './sessionManagement';\nimport { buildMcpServerSpanConfig, createMcpNotificationSpan, createMcpOutgoingNotificationSpan } from './spans';\nimport type { ExtraHandlerData, McpServerWrapperOptions, MCPTransport, ResolvedMcpOptions, SessionData } from './types';\nimport { isJsonRpcNotification, isJsonRpcRequest, isJsonRpcResponse } from './validation';\n\nfunction resolveMcpOptions(options: McpServerWrapperOptions): ResolvedMcpOptions {\n  if (options.recordInputs !== undefined && options.recordOutputs !== undefined) {\n    return {\n      recordInputs: options.recordInputs,\n      recordOutputs: options.recordOutputs,\n    };\n  }\n\n  const genAI = getClient()?.getDataCollectionOptions().genAI;\n\n  return {\n    recordInputs: options.recordInputs ?? genAI?.inputs ?? false,\n    recordOutputs: options.recordOutputs ?? genAI?.outputs ?? false,\n  };\n}\n\n/**\n * Wraps transport.onmessage to create spans for incoming messages.\n * Extracts and stores client info and protocol version from legacy initialize\n * requests and modern message envelopes.\n * @param transport - MCP transport instance to wrap\n * @param options - MCP capture overrides\n */\nexport function wrapTransportOnMessage(transport: MCPTransport, options: McpServerWrapperOptions): void {\n  if (transport.onmessage) {\n    fill(transport, 'onmessage', originalOnMessage => {\n      return function (this: MCPTransport, message: unknown, extra?: unknown) {\n        const request = isJsonRpcRequest(message) ? message : undefined;\n        const notification = isJsonRpcNotification(message) ? message : undefined;\n        const jsonRpcMessage = request || notification;\n        let messageSessionData: SessionData | undefined;\n\n        if (jsonRpcMessage) {\n          try {\n            messageSessionData =\n              request?.method === 'initialize'\n                ? extractSessionDataFromInitializeRequest(request)\n                : extractSessionDataFromMessage(jsonRpcMessage);\n            if (messageSessionData.protocolVersion || messageSessionData.clientInfo) {\n              updateSessionDataForTransport(transport, messageSessionData);\n            }\n          } catch {\n            // noop\n          }\n        }\n\n        if (request) {\n          const resolvedOptions = resolveMcpOptions(options);\n          const isolationScope = getIsolationScope().clone();\n\n          return withIsolationScope(isolationScope, () => {\n            const spanConfig = buildMcpServerSpanConfig(request, transport, extra as ExtraHandlerData, resolvedOptions);\n            const span = startInactiveSpan(spanConfig);\n\n            if (request.method === 'initialize' && messageSessionData) {\n              span.setAttributes({\n                ...buildClientAttributesFromInfo(messageSessionData.clientInfo),\n                ...(messageSessionData.protocolVersion && {\n                  [MCP_PROTOCOL_VERSION_ATTRIBUTE]: messageSessionData.protocolVersion,\n                }),\n              });\n            }\n\n            storeSpanForRequest(transport, request.id, span, request.method, resolvedOptions);\n\n            return withActiveSpan(span, () => {\n              return (originalOnMessage as (...args: unknown[]) => unknown).call(this, request, extra);\n            });\n          });\n        }\n\n        if (notification) {\n          const resolvedOptions = resolveMcpOptions(options);\n          return createMcpNotificationSpan(notification, transport, extra as ExtraHandlerData, resolvedOptions, () => {\n            return (originalOnMessage as (...args: unknown[]) => unknown).call(this, notification, extra);\n          });\n        }\n\n        return (originalOnMessage as (...args: unknown[]) => unknown).call(this, message, extra);\n      };\n    });\n  }\n}\n\n/**\n * Wraps transport.send to handle outgoing messages and response correlation.\n * Extracts and stores protocol version and server info from legacy initialize\n * responses and modern result metadata.\n * @param transport - MCP transport instance to wrap\n * @param options - MCP capture overrides\n */\nexport function wrapTransportSend(transport: MCPTransport, options: McpServerWrapperOptions): void {\n  if (transport.send) {\n    fill(transport, 'send', originalSend => {\n      return async function (this: MCPTransport, ...args: unknown[]) {\n        const [message] = args;\n\n        if (isJsonRpcNotification(message)) {\n          const resolvedOptions = resolveMcpOptions(options);\n          return createMcpOutgoingNotificationSpan(message, transport, resolvedOptions, () => {\n            return (originalSend as (...args: unknown[]) => unknown).call(this, ...args);\n          });\n        }\n\n        if (isJsonRpcResponse(message)) {\n          if (message.id !== null && message.id !== undefined) {\n            if (message.error) {\n              captureJsonRpcErrorResponse(message.error);\n            }\n\n            completeSpanWithResults(transport, message.id, message.result, !!message.error);\n          }\n        }\n\n        return (originalSend as (...args: unknown[]) => unknown).call(this, ...args);\n      };\n    });\n  }\n}\n\n/**\n * Wraps transport.onclose to clean up pending spans for this transport only\n * @param transport - MCP transport instance to wrap\n */\nexport function wrapTransportOnClose(transport: MCPTransport): void {\n  if (transport.onclose) {\n    fill(transport, 'onclose', originalOnClose => {\n      return function (this: MCPTransport, ...args: unknown[]) {\n        cleanupPendingSpansForTransport(transport);\n        cleanupSessionDataForTransport(transport);\n        return (originalOnClose as (...args: unknown[]) => unknown).call(this, ...args);\n      };\n    });\n  }\n}\n\n/**\n * Wraps transport error handlers to capture connection errors\n * @param transport - MCP transport instance to wrap\n */\nexport function wrapTransportError(transport: MCPTransport): void {\n  if (transport.onerror) {\n    fill(transport, 'onerror', (originalOnError: (error: Error) => void) => {\n      return function (this: MCPTransport, error: Error) {\n        captureTransportError(error);\n        return originalOnError.call(this, error);\n      };\n    });\n  }\n}\n\n/**\n * Captures JSON-RPC error responses for server-side errors.\n * @see https://www.jsonrpc.org/specification#error_object\n * @internal\n * @param errorResponse - JSON-RPC error response\n */\nfunction captureJsonRpcErrorResponse(errorResponse: unknown): void {\n  try {\n    if (isObjectLike(errorResponse) && 'code' in errorResponse && 'message' in errorResponse) {\n      const jsonRpcError = errorResponse as { code: number; message: string; data?: unknown };\n\n      const isServerError =\n        jsonRpcError.code === -32603 || (jsonRpcError.code >= -32099 && jsonRpcError.code <= -32000);\n\n      if (isServerError) {\n        const error = new Error(jsonRpcError.message);\n        error.name = `JsonRpcError_${jsonRpcError.code}`;\n\n        captureError(error, 'protocol');\n      }\n    }\n  } catch {\n    // noop\n  }\n}\n\n/**\n * Captures transport connection errors\n * @internal\n * @param error - Transport error\n */\nfunction captureTransportError(error: Error): void {\n  try {\n    captureError(error, 'transport');\n  } catch {\n    // noop\n  }\n}\n","/**\n * Message validation functions for MCP server instrumentation\n *\n * Provides JSON-RPC 2.0 message type validation and MCP server instance validation.\n */\n\nimport { DEBUG_BUILD } from '../../debug-build';\nimport { debug } from '../../utils/debug-logger';\nimport { isObjectLike } from '../../utils/is';\nimport type { JsonRpcNotification, JsonRpcRequest, JsonRpcResponse } from './types';\n\n/**\n * Validates if a message is a JSON-RPC request\n * @param message - Message to validate\n * @returns True if message is a JSON-RPC request\n */\nexport function isJsonRpcRequest(message: unknown): message is JsonRpcRequest {\n  return (\n    isObjectLike(message) && 'jsonrpc' in message && message.jsonrpc === '2.0' && 'method' in message && 'id' in message\n  );\n}\n\n/**\n * Validates if a message is a JSON-RPC notification\n * @param message - Message to validate\n * @returns True if message is a JSON-RPC notification\n */\nexport function isJsonRpcNotification(message: unknown): message is JsonRpcNotification {\n  return (\n    isObjectLike(message) &&\n    'jsonrpc' in message &&\n    message.jsonrpc === '2.0' &&\n    'method' in message &&\n    !('id' in message)\n  );\n}\n\n/**\n * Validates if a message is a JSON-RPC response\n * @param message - Message to validate\n * @returns True if message is a JSON-RPC response\n */\nexport function isJsonRpcResponse(message: unknown): message is JsonRpcResponse {\n  return (\n    isObjectLike(message) &&\n    'jsonrpc' in message &&\n    message.jsonrpc === '2.0' &&\n    'id' in message &&\n    ('result' in message || 'error' in message)\n  );\n}\n\n/**\n * Validates MCP server instance with type checking.\n * Accepts both the legacy API (`tool`, `resource`, `prompt`) used in SDK 1.x\n * and the newer API (`registerTool`, `registerResource`, `registerPrompt`) introduced\n * alongside the legacy API in SDK 1.x and made the only option in SDK 2.x.\n * @param instance - Object to validate as MCP server instance\n * @returns True if instance has required MCP server methods\n */\nexport function validateMcpServerInstance(instance: unknown): boolean {\n  if (\n    isObjectLike(instance) &&\n    'connect' in instance &&\n    (('tool' in instance && 'resource' in instance && 'prompt' in instance) ||\n      ('registerTool' in instance && 'registerResource' in instance && 'registerPrompt' in instance))\n  ) {\n    return true;\n  }\n  DEBUG_BUILD && debug.warn('Did not patch MCP server. Interface is incompatible.');\n  return false;\n}\n\n/**\n * Check if the item is a valid content item\n * @param item - The item to check\n * @returns True if the item is a valid content item, false otherwise\n */\nexport function isValidContentItem(item: unknown): item is Record<string, unknown> {\n  return isObjectLike(item);\n}\n","import { defineIntegration } from '../integration';\nimport { addMetadataToStackFrames, stripMetadataFromStackFrames } from '../metadata';\nimport type { EventItem } from '../types/envelope';\nimport { forEachEnvelopeItem } from '../utils/envelope';\n\n/**\n * Adds module metadata to stack frames.\n *\n * Metadata can be injected by the Sentry bundler plugins using the `moduleMetadata` config option.\n *\n * When this integration is added, the metadata passed to the bundler plugin is added to the stack frames of all events\n * under the `module_metadata` property. This can be used to help in tagging or routing of events from different teams\n * our sources\n */\nexport const moduleMetadataIntegration = defineIntegration(() => {\n  return {\n    name: 'ModuleMetadata' as const,\n    setup(client) {\n      // We need to strip metadata from stack frames before sending them to Sentry since these are client side only.\n      client.on('beforeEnvelope', envelope => {\n        forEachEnvelopeItem(envelope, (item, type) => {\n          if (type === 'event') {\n            const event = Array.isArray(item) ? (item as EventItem)[1] : undefined;\n\n            if (event) {\n              stripMetadataFromStackFrames(event);\n              item[1] = event;\n            }\n          }\n        });\n      });\n\n      client.on('applyFrameMetadata', event => {\n        // Only apply stack frame metadata to error events\n        if (event.type) {\n          return;\n        }\n\n        const stackParser = client.getOptions().stackParser;\n        addMetadataToStackFrames(stackParser, event);\n      });\n    },\n  };\n});\n","// Portable instrumentation for https://github.com/porsager/postgres\n// This can be used in any environment (Node.js, Cloudflare Workers, etc.)\n// without depending on OpenTelemetry module hooking.\n\nimport { DEBUG_BUILD } from '../debug-build';\nimport { SEMANTIC_ATTRIBUTE_SENTRY_ORIGIN } from '../semanticAttributes';\nimport { SPAN_STATUS_ERROR, startSpanManual } from '../tracing';\nimport type { Span } from '../types/span';\nimport { debug } from '../utils/debug-logger';\nimport { isObjectLike } from '../utils/is';\nimport { getActiveSpan } from '../utils/spanUtils';\n\nconst SQL_OPERATION_REGEX = /^(SELECT|INSERT|UPDATE|DELETE|CREATE|DROP|ALTER)/i;\n\nexport type PostgresConnectionContext = {\n  ATTR_DB_NAMESPACE?: string;\n  ATTR_SERVER_ADDRESS?: string;\n  ATTR_SERVER_PORT?: string;\n};\n\ninterface PostgresJsSqlInstrumentationOptions {\n  /**\n   * Whether to require a parent span for the instrumentation.\n   * If set to true, the instrumentation will only create spans if there is a parent span\n   * available in the current scope.\n   * @default true\n   */\n  requireParentSpan?: boolean;\n  /**\n   * Hook to modify the span before it is started.\n   * This can be used to set additional attributes or modify the span in any way.\n   */\n  requestHook?: (span: Span, sanitizedSqlQuery: string, postgresConnectionContext?: PostgresConnectionContext) => void;\n}\n\nconst CONNECTION_CONTEXT_SYMBOL = Symbol('sentryPostgresConnectionContext');\n\n// Use the same Symbol.for() markers as the Node.js OTel instrumentation\n// so that both approaches recognize each other and prevent double-wrapping.\nconst INSTRUMENTED_MARKER = Symbol.for('sentry.instrumented.postgresjs');\n// Marker to track if a query was created from an instrumented sql instance.\n// This prevents double-spanning when both the wrapper and the Node.js Query.prototype\n// fallback patch are active simultaneously.\nconst QUERY_FROM_INSTRUMENTED_SQL = Symbol.for('sentry.query.from.instrumented.sql');\n\n/**\n * Instruments a postgres.js `sql` instance with Sentry tracing.\n *\n * This is a portable instrumentation function that works in any environment\n * (Node.js, Cloudflare Workers, etc.) without depending on OpenTelemetry.\n *\n * @example\n * ```javascript\n * import postgres from 'postgres';\n * import * as Sentry from '@sentry/cloudflare'; // or '@sentry/deno'\n *\n * const sql = Sentry.instrumentPostgresJsSql(\n *   postgres({ host: 'localhost', database: 'mydb' })\n * );\n *\n * // All queries now create Sentry spans\n * await sql`SELECT * FROM users WHERE id = ${userId}`;\n * ```\n */\nexport function instrumentPostgresJsSql<T>(sql: T, options?: PostgresJsSqlInstrumentationOptions): T {\n  if (!sql || typeof sql !== 'function') {\n    DEBUG_BUILD && debug.warn('instrumentPostgresJsSql: provided value is not a valid postgres.js sql instance');\n    return sql;\n  }\n\n  return _instrumentSqlInstance(sql, { requireParentSpan: true, ...options }) as T;\n}\n\n/**\n * Instruments a sql instance by wrapping its query execution methods.\n */\nfunction _instrumentSqlInstance(\n  sql: unknown,\n  options: PostgresJsSqlInstrumentationOptions,\n  parentConnectionContext?: PostgresConnectionContext,\n): unknown {\n  // Check if already instrumented to prevent double-wrapping\n  // Using Symbol.for() ensures the marker survives proxying\n  if ((sql as Record<symbol, unknown>)[INSTRUMENTED_MARKER]) {\n    return sql;\n  }\n\n  // Wrap the sql function to intercept query creation\n  const proxiedSql: unknown = new Proxy(sql as (...args: unknown[]) => unknown, {\n    apply(target, thisArg, argumentsList: unknown[]) {\n      const query = Reflect.apply(target, thisArg, argumentsList);\n\n      if (isObjectLike(query) && 'handle' in query) {\n        _wrapSingleQueryHandle(query as { handle: unknown; strings?: string[] }, proxiedSql, options);\n      }\n\n      return query;\n    },\n    get(target, prop) {\n      const original = (target as unknown as Record<string | symbol, unknown>)[prop];\n\n      if (typeof prop !== 'string' || typeof original !== 'function') {\n        return original;\n      }\n\n      // Wrap methods that return PendingQuery objects (unsafe, file)\n      if (prop === 'unsafe' || prop === 'file') {\n        return _wrapQueryMethod(original as (...args: unknown[]) => unknown, target, proxiedSql, options);\n      }\n\n      // Wrap begin and reserve (not savepoint to avoid duplicate spans)\n      if (prop === 'begin' || prop === 'reserve') {\n        return _wrapCallbackMethod(original as (...args: unknown[]) => unknown, target, proxiedSql, options);\n      }\n\n      return original;\n    },\n  });\n\n  // Use provided parent context if available, otherwise extract from sql.options\n  if (parentConnectionContext) {\n    (proxiedSql as Record<symbol, unknown>)[CONNECTION_CONTEXT_SYMBOL] = parentConnectionContext;\n  } else {\n    _attachConnectionContext(sql, proxiedSql as Record<symbol, unknown>);\n  }\n\n  // Mark both the original and proxy as instrumented to prevent double-wrapping\n  (sql as Record<symbol, unknown>)[INSTRUMENTED_MARKER] = true;\n  (proxiedSql as Record<symbol, unknown>)[INSTRUMENTED_MARKER] = true;\n\n  return proxiedSql;\n}\n\n/**\n * Wraps query-returning methods (unsafe, file) to ensure their queries are instrumented.\n */\nfunction _wrapQueryMethod(\n  original: (...args: unknown[]) => unknown,\n  target: unknown,\n  proxiedSql: unknown,\n  options: PostgresJsSqlInstrumentationOptions,\n): (...args: unknown[]) => unknown {\n  return function (this: unknown, ...args: unknown[]): unknown {\n    const query = Reflect.apply(original, target, args);\n\n    if (isObjectLike(query) && 'handle' in query) {\n      _wrapSingleQueryHandle(query as { handle: unknown; strings?: string[] }, proxiedSql, options);\n    }\n\n    return query;\n  };\n}\n\n/**\n * Wraps callback-based methods (begin, reserve) to recursively instrument Sql instances.\n * Note: These methods can also be used as tagged templates, which we pass through unchanged.\n *\n * Savepoint is not wrapped to avoid complex nested transaction instrumentation issues.\n * Queries within savepoint callbacks are still instrumented through the parent transaction's Sql instance.\n */\nfunction _wrapCallbackMethod(\n  original: (...args: unknown[]) => unknown,\n  target: unknown,\n  parentSqlInstance: unknown,\n  options: PostgresJsSqlInstrumentationOptions,\n): (...args: unknown[]) => unknown {\n  return function (this: unknown, ...args: unknown[]): unknown {\n    // Extract parent context to propagate to child instances\n    const parentContext = (parentSqlInstance as Record<symbol, unknown>)[CONNECTION_CONTEXT_SYMBOL] as\n      | PostgresConnectionContext\n      | undefined;\n\n    // Check if this is a callback-based call by verifying the last argument is a function\n    const isCallbackBased = typeof args[args.length - 1] === 'function';\n\n    if (!isCallbackBased) {\n      // Not a callback-based call - could be tagged template or promise-based\n      const result = Reflect.apply(original, target, args);\n      // If result is a Promise (e.g., reserve() without callback), instrument the resolved Sql instance\n      if (result && typeof (result as Promise<unknown>).then === 'function') {\n        return (result as Promise<unknown>).then((sqlInstance: unknown) => {\n          return _instrumentSqlInstance(sqlInstance, options, parentContext);\n        });\n      }\n      return result;\n    }\n\n    // Callback-based call: wrap the callback to instrument the Sql instance\n    const callback = (args.length === 1 ? args[0] : args[1]) as (sql: unknown) => unknown;\n    const wrappedCallback = function (sqlInstance: unknown): unknown {\n      const instrumentedSql = _instrumentSqlInstance(sqlInstance, options, parentContext);\n      return callback(instrumentedSql);\n    };\n\n    const newArgs = args.length === 1 ? [wrappedCallback] : [args[0], wrappedCallback];\n    return Reflect.apply(original, target, newArgs);\n  };\n}\n\n/**\n * Wraps a single query's handle method to create spans.\n */\nfunction _wrapSingleQueryHandle(\n  query: { handle: unknown; strings?: string[]; __sentryWrapped?: boolean },\n  sqlInstance: unknown,\n  options: PostgresJsSqlInstrumentationOptions,\n): void {\n  // Prevent double wrapping - check if the handle itself is already wrapped\n  if ((query.handle as { __sentryWrapped?: boolean })?.__sentryWrapped) {\n    return;\n  }\n\n  // Mark this query as coming from an instrumented sql instance.\n  // This prevents the Node.js Query.prototype fallback patch from double-spanning.\n  (query as Record<symbol, unknown>)[QUERY_FROM_INSTRUMENTED_SQL] = true;\n\n  const originalHandle = query.handle as (...args: unknown[]) => Promise<unknown>;\n\n  // IMPORTANT: We must replace the handle function directly, not use a Proxy,\n  // because Query.then() internally calls this.handle(), which would bypass a Proxy wrapper.\n  const wrappedHandle = async function (this: { executed?: boolean }, ...args: unknown[]): Promise<unknown> {\n    // postgres.js calls handle() from then/catch/finally — only the first call executes SQL,\n    // subsequent calls are no-ops (guarded by this.executed). Skip span creation for no-ops.\n    if (this.executed || !_shouldCreateSpans(options)) {\n      return originalHandle.apply(this, args);\n    }\n\n    const fullQuery = _reconstructQuery(query.strings);\n    const sanitizedSqlQuery = _sanitizeSqlQuery(fullQuery);\n\n    return startSpanManual(\n      {\n        name: sanitizedSqlQuery || 'postgresjs.query',\n        op: 'db',\n      },\n      (span: Span) => {\n        span.setAttribute(SEMANTIC_ATTRIBUTE_SENTRY_ORIGIN, 'auto.db.postgresjs');\n\n        span.setAttributes({\n          'db.system.name': 'postgres',\n          'db.query.text': sanitizedSqlQuery,\n        });\n\n        const connectionContext = sqlInstance\n          ? ((sqlInstance as Record<symbol, unknown>)[CONNECTION_CONTEXT_SYMBOL] as\n              | PostgresConnectionContext\n              | undefined)\n          : undefined;\n\n        _setConnectionAttributes(span, connectionContext);\n\n        if (options.requestHook) {\n          try {\n            options.requestHook(span, sanitizedSqlQuery, connectionContext);\n          } catch (e) {\n            span.setAttribute('sentry.hook.error', 'requestHook failed');\n            DEBUG_BUILD && debug.error('Error in requestHook for PostgresJs instrumentation:', e);\n          }\n        }\n\n        const queryWithCallbacks = this as {\n          resolve: unknown;\n          reject: unknown;\n        };\n\n        queryWithCallbacks.resolve = new Proxy(queryWithCallbacks.resolve as (...args: unknown[]) => unknown, {\n          apply: (resolveTarget, resolveThisArg, resolveArgs: [{ command?: string }]) => {\n            try {\n              _setOperationName(span, sanitizedSqlQuery, resolveArgs?.[0]?.command);\n              span.end();\n            } catch (e) {\n              DEBUG_BUILD && debug.error('Error ending span in resolve callback:', e);\n            }\n\n            return Reflect.apply(resolveTarget, resolveThisArg, resolveArgs);\n          },\n        });\n\n        queryWithCallbacks.reject = new Proxy(queryWithCallbacks.reject as (...args: unknown[]) => unknown, {\n          apply: (rejectTarget, rejectThisArg, rejectArgs: { message?: string; code?: string; name?: string }[]) => {\n            try {\n              span.setStatus({\n                code: SPAN_STATUS_ERROR,\n                message: rejectArgs?.[0]?.message || 'unknown_error',\n              });\n\n              span.setAttribute('db.response.status_code', rejectArgs?.[0]?.code || 'unknown');\n              span.setAttribute('error.type', rejectArgs?.[0]?.name || 'unknown');\n\n              _setOperationName(span, sanitizedSqlQuery);\n              span.end();\n            } catch (e) {\n              DEBUG_BUILD && debug.error('Error ending span in reject callback:', e);\n            }\n            return Reflect.apply(rejectTarget, rejectThisArg, rejectArgs);\n          },\n        });\n\n        // Handle synchronous errors that might occur before promise is created\n        try {\n          return originalHandle.apply(this, args);\n        } catch (e) {\n          span.setStatus({\n            code: SPAN_STATUS_ERROR,\n            message: e instanceof Error ? e.message : 'unknown_error',\n          });\n          span.end();\n          throw e;\n        }\n      },\n    );\n  };\n\n  (wrappedHandle as { __sentryWrapped?: boolean }).__sentryWrapped = true;\n  query.handle = wrappedHandle;\n}\n\n/**\n * Determines whether a span should be created based on the current context.\n * If `requireParentSpan` is set to true in the options, a span will\n * only be created if there is a parent span available.\n */\nfunction _shouldCreateSpans(options: PostgresJsSqlInstrumentationOptions): boolean {\n  const hasParentSpan = getActiveSpan() !== undefined;\n  return hasParentSpan || !options.requireParentSpan;\n}\n\n/**\n * Reconstructs the full SQL query from template strings with PostgreSQL placeholders.\n *\n * For sql`SELECT * FROM users WHERE id = ${123} AND name = ${'foo'}`:\n *   strings = [\"SELECT * FROM users WHERE id = \", \" AND name = \", \"\"]\n *   returns: \"SELECT * FROM users WHERE id = $1 AND name = $2\"\n *\n * @internal Exported for testing only\n */\nexport function _reconstructQuery(strings: string[] | undefined): string | undefined {\n  if (!strings?.length) {\n    return undefined;\n  }\n  if (strings.length === 1) {\n    return strings[0] || undefined;\n  }\n  // Join template parts with PostgreSQL placeholders ($1, $2, etc.)\n  return strings.reduce((acc, str, i) => (i === 0 ? str : `${acc}$${i}${str}`), '');\n}\n\nlet integerLiteralRE: RegExp | undefined;\n\n/**\n * Sanitize SQL query as per the OTEL semantic conventions\n * https://opentelemetry.io/docs/specs/semconv/database/database-spans/#sanitization-of-dbquerytext\n *\n * PostgreSQL $n placeholders are preserved per OTEL spec - they're parameterized queries,\n * not sensitive literals. Only actual values (strings, numbers, booleans) are sanitized.\n *\n * @internal Exported for testing only\n */\nexport function _sanitizeSqlQuery(sqlQuery: string | undefined): string {\n  if (!sqlQuery) {\n    return 'Unknown SQL Query';\n  }\n\n  // Lazy init: constructing this at module scope would evaluate the lookbehind\n  // on import and crash Safari <16.4 browser bundles that reach this file via\n  // the core barrel. Building it on first call keeps the cost off the import path.\n  if (!integerLiteralRE) {\n    integerLiteralRE = new RegExp('(?<!\\\\$)-?\\\\b\\\\d+\\\\b', 'g');\n  }\n\n  return (\n    sqlQuery\n      // Remove comments first (they may contain newlines and extra spaces)\n      .replace(/--.*$/gm, '') // Single line comments (multiline mode)\n      .replace(/\\/\\*[\\s\\S]*?\\*\\//g, '') // Multi-line comments\n      .replace(/;\\s*$/, '') // Remove trailing semicolons\n      // Collapse whitespace to a single space (after removing comments)\n      .replace(/\\s+/g, ' ')\n      .trim() // Remove extra spaces and trim\n      // Sanitize hex/binary literals before string literals\n      .replace(/\\bX'[0-9A-Fa-f]*'/gi, '?') // Hex string literals\n      .replace(/\\bB'[01]*'/gi, '?') // Binary string literals\n      // Sanitize string literals (handles escaped quotes)\n      .replace(/'(?:[^']|'')*'/g, '?')\n      // Sanitize hex numbers\n      .replace(/\\b0x[0-9A-Fa-f]+/gi, '?')\n      // Sanitize boolean literals\n      .replace(/\\b(?:TRUE|FALSE)\\b/gi, '?')\n      // Sanitize numeric literals (preserve $n placeholders via negative lookbehind)\n      .replace(/-?\\b\\d+\\.?\\d*[eE][+-]?\\d+\\b/g, '?') // Scientific notation\n      .replace(/-?\\b\\d+\\.\\d+\\b/g, '?') // Decimals\n      .replace(/-?\\.\\d+\\b/g, '?') // Decimals starting with dot\n      .replace(integerLiteralRE, '?') // Integers (NOT $n placeholders)\n      // Collapse IN clauses for cardinality (both ? and $n variants)\n      .replace(/\\bIN\\b\\s*\\(\\s*\\?(?:\\s*,\\s*\\?)*\\s*\\)/gi, 'IN (?)')\n      .replace(/\\bIN\\b\\s*\\(\\s*\\$\\d+(?:\\s*,\\s*\\$\\d+)*\\s*\\)/gi, 'IN ($?)')\n  );\n}\n\n/**\n * Sets connection context attributes on a span.\n *\n * @internal Exported for the orchestrion (diagnostics-channel) integration.\n */\nexport function _setConnectionAttributes(span: Span, connectionContext: PostgresConnectionContext | undefined): void {\n  if (!connectionContext) {\n    return;\n  }\n  if (connectionContext.ATTR_DB_NAMESPACE) {\n    span.setAttribute('db.namespace', connectionContext.ATTR_DB_NAMESPACE);\n  }\n  if (connectionContext.ATTR_SERVER_ADDRESS) {\n    span.setAttribute('server.address', connectionContext.ATTR_SERVER_ADDRESS);\n  }\n  if (connectionContext.ATTR_SERVER_PORT !== undefined) {\n    // Port is stored as string in PostgresConnectionContext for requestHook backwards compatibility,\n    // but semantic conventions expect port as a number for span attributes\n    const portNumber = parseInt(connectionContext.ATTR_SERVER_PORT, 10);\n    if (!isNaN(portNumber)) {\n      span.setAttribute('server.port', portNumber);\n    }\n  }\n}\n\n/**\n * Extracts DB operation name from SQL query and sets it on the span.\n *\n * @internal Exported for the orchestrion (diagnostics-channel) integration.\n */\nexport function _setOperationName(span: Span, sanitizedQuery: string | undefined, command?: string): void {\n  if (command) {\n    span.setAttribute('db.operation.name', command);\n    return;\n  }\n  // Fallback: extract operation from the SQL query\n  const operationMatch = sanitizedQuery?.match(SQL_OPERATION_REGEX);\n  if (operationMatch?.[1]) {\n    span.setAttribute('db.operation.name', operationMatch[1].toUpperCase());\n  }\n}\n\n/**\n * Builds a {@link PostgresConnectionContext} from postgres.js' parsed options\n * (which store `host`/`port` as arrays). Defaults to 'localhost'/5432.\n *\n * @internal Exported for the orchestrion (diagnostics-channel) integration.\n */\nexport function _buildConnectionContext(options: {\n  host?: string[];\n  port?: number[];\n  database?: string;\n}): PostgresConnectionContext {\n  const host = options.host?.[0] || 'localhost';\n  const port = options.port?.[0] || 5432;\n  return {\n    ATTR_DB_NAMESPACE: typeof options.database === 'string' && options.database !== '' ? options.database : undefined,\n    ATTR_SERVER_ADDRESS: host,\n    ATTR_SERVER_PORT: String(port),\n  };\n}\n\n/**\n * Extracts and stores connection context from sql.options.\n */\nfunction _attachConnectionContext(sql: unknown, proxiedSql: Record<symbol, unknown>): void {\n  const sqlInstance = sql as { options?: { host?: string[]; port?: number[]; database?: string } };\n  if (!sqlInstance.options || typeof sqlInstance.options !== 'object') {\n    return;\n  }\n\n  proxiedSql[CONNECTION_CONTEXT_SYMBOL] = _buildConnectionContext(sqlInstance.options);\n}\n","import type { Client } from '../client';\nimport { getIsolationScope } from '../currentScopes';\nimport { defineIntegration } from '../integration';\nimport { SEMANTIC_ATTRIBUTE_USER_IP_ADDRESS } from '../semanticAttributes';\nimport type { ResolvedDataCollection } from '../types/datacollection';\nimport type { Event } from '../types/event';\nimport type { IntegrationFn } from '../types/integration';\nimport type { QueryParams, RequestEventData } from '../types/request';\nimport type { StreamedSpanJSON } from '../types/span';\nimport { parseCookie } from '../utils/cookie';\nimport { httpHeadersToSpanAttributes } from '../utils/request';\nimport { getClientIPAddress, ipHeaderNames } from '../vendor/getIpAddress';\nimport { safeSetSpanJSONAttributes } from '../tracing/spans/captureSpan';\nimport { URL_FULL, URL_QUERY } from '@sentry/conventions/attributes';\n\ninterface RequestDataIncludeOptions {\n  cookies?: boolean;\n  data?: boolean;\n  headers?: boolean;\n  ip?: boolean;\n  query_string?: boolean;\n  url?: boolean;\n}\n\ntype RequestDataIntegrationOptions = {\n  /**\n   * Controls what data is pulled from the request and added to the event.\n   */\n  include?: RequestDataIncludeOptions;\n};\n\nconst INTEGRATION_NAME = 'RequestData' as const;\n\nconst _requestDataIntegration = ((options: RequestDataIntegrationOptions = {}) => {\n  // Per spec, integration-level options override global dataCollection.\n  // When include overrides a category back on that dataCollection turned off,\n  // we flip the dataCollection behavior to true (default denylist filtering).\n  function resolveIncludeAndDataCollection(client: Client): {\n    include: RequestDataIncludeOptions;\n    dataCollection: ResolvedDataCollection;\n  } {\n    const dc = client.getDataCollectionOptions();\n    const dataCollection: ResolvedDataCollection = {\n      ...dc,\n      ...(options.include?.cookies === true && dc.cookies === false && { cookies: true as const }),\n      ...(options.include?.headers === true &&\n        dc.httpHeaders.request === false && {\n          httpHeaders: { ...dc.httpHeaders, request: true as const },\n        }),\n    };\n\n    return {\n      dataCollection,\n      include: {\n        cookies: dataCollection.cookies !== false,\n        // Always attach body data that's already on the scope — dataCollection.httpBodies gates write-time, not read-time\n        data: true,\n        headers: dataCollection.httpHeaders.request !== false,\n        ip: dataCollection.userInfo,\n        query_string: dataCollection.urlQueryParams !== false,\n        // No dataCollection equivalent — URL is always included\n        url: true,\n        ...options.include,\n      },\n    };\n  }\n\n  return {\n    name: INTEGRATION_NAME,\n    processEvent(event, _hint, client) {\n      const { sdkProcessingMetadata = {} } = event;\n      const { normalizedRequest, ipAddress } = sdkProcessingMetadata;\n\n      const { include } = resolveIncludeAndDataCollection(client);\n\n      if (normalizedRequest) {\n        addNormalizedRequestDataToEvent(event, normalizedRequest, { ipAddress }, include);\n      }\n\n      return event;\n    },\n    processSegmentSpan(span, client) {\n      const { sdkProcessingMetadata = {} } = getIsolationScope().getScopeData();\n      const { normalizedRequest, ipAddress } = sdkProcessingMetadata;\n\n      if (!normalizedRequest) {\n        return;\n      }\n\n      const { include, dataCollection } = resolveIncludeAndDataCollection(client);\n\n      addNormalizedRequestDataToSpan(span, normalizedRequest, ipAddress, include, dataCollection);\n    },\n  };\n}) satisfies IntegrationFn;\n\n/**\n * Add data about a request to an event. Primarily for use in Node-based SDKs, but included in `@sentry/core`\n * so it can be used in cross-platform SDKs like `@sentry/nextjs`.\n */\nexport const requestDataIntegration = defineIntegration(_requestDataIntegration);\n\n/**\n * Add already normalized request data to an event.\n * This mutates the passed in event.\n */\nfunction addNormalizedRequestDataToEvent(\n  event: Event,\n  req: RequestEventData,\n  // Data that should not go into `event.request` but is somehow related to requests\n  additionalData: { ipAddress?: string },\n  include: RequestDataIncludeOptions,\n): void {\n  event.request = {\n    ...event.request,\n    ...extractNormalizedRequestData(req, include),\n  };\n\n  if (include.ip) {\n    const ip = (req.headers && getClientIPAddress(req.headers)) || additionalData.ipAddress;\n    if (ip) {\n      event.user = {\n        ...event.user,\n        ip_address: ip,\n      };\n    }\n  }\n}\n\nfunction addNormalizedRequestDataToSpan(\n  span: StreamedSpanJSON,\n  normalizedRequest: RequestEventData,\n  ipAddress: string | undefined,\n  include: RequestDataIncludeOptions,\n  dataCollection: ResolvedDataCollection,\n): void {\n  const requestData = extractNormalizedRequestData(normalizedRequest, include);\n  const attributes: Record<string, unknown> = {};\n\n  if (requestData.url) {\n    attributes[URL_FULL] = requestData.url;\n  }\n\n  if (requestData.method) {\n    attributes['http.request.method'] = requestData.method;\n  }\n\n  if (requestData.query_string) {\n    attributes[URL_QUERY] = normalizeQueryString(requestData.query_string);\n  }\n\n  safeSetSpanJSONAttributes(span, attributes);\n\n  // Process cookies before headers so normalizedRequest.cookies takes precedence\n  // over the raw cookie header (matching the processEvent path).\n  if (requestData.cookies && Object.keys(requestData.cookies).length > 0) {\n    const cookieString = Object.entries(requestData.cookies)\n      .map(([name, value]) => `${name}=${value}`)\n      .join('; ');\n    const cookieAttributes = httpHeadersToSpanAttributes({ cookie: cookieString }, dataCollection, 'request');\n    safeSetSpanJSONAttributes(span, cookieAttributes);\n  }\n\n  if (requestData.headers) {\n    const headerAttributes = httpHeadersToSpanAttributes(requestData.headers, dataCollection, 'request');\n    safeSetSpanJSONAttributes(span, headerAttributes);\n  }\n\n  if (requestData.data != null) {\n    const serialized = typeof requestData.data === 'string' ? requestData.data : JSON.stringify(requestData.data);\n    if (serialized) {\n      safeSetSpanJSONAttributes(span, { 'http.request.body.data': serialized });\n    }\n  }\n\n  if (include.ip) {\n    const ip = (normalizedRequest.headers && getClientIPAddress(normalizedRequest.headers)) || ipAddress || undefined;\n    if (ip) {\n      safeSetSpanJSONAttributes(span, { [SEMANTIC_ATTRIBUTE_USER_IP_ADDRESS]: ip });\n    }\n  }\n}\n\nfunction extractNormalizedRequestData(\n  normalizedRequest: RequestEventData,\n  include: RequestDataIncludeOptions,\n): RequestEventData {\n  const requestData: RequestEventData = {};\n  const headers = { ...normalizedRequest.headers };\n\n  if (include.headers) {\n    requestData.headers = headers;\n\n    if (!include.cookies) {\n      delete (headers as { cookie?: string }).cookie;\n    }\n\n    if (!include.ip) {\n      const ipHeaderNamesLower = new Set(ipHeaderNames.map(name => name.toLowerCase()));\n      for (const key of Object.keys(headers)) {\n        if (ipHeaderNamesLower.has(key.toLowerCase())) {\n          // eslint-disable-next-line @typescript-eslint/no-dynamic-delete\n          delete (headers as Record<string, unknown>)[key];\n        }\n      }\n    }\n  }\n\n  requestData.method = normalizedRequest.method;\n\n  if (include.url) {\n    requestData.url = normalizedRequest.url;\n  }\n\n  if (include.cookies) {\n    const cookies = normalizedRequest.cookies || (headers?.cookie ? parseCookie(headers.cookie) : undefined);\n    requestData.cookies = cookies || {};\n  }\n\n  if (include.query_string) {\n    requestData.query_string = normalizedRequest.query_string;\n  }\n\n  if (include.data) {\n    requestData.data = normalizedRequest.data;\n  }\n\n  return requestData;\n}\n\nfunction normalizeQueryString(queryString: QueryParams): string | undefined {\n  if (typeof queryString === 'string') {\n    return queryString || undefined;\n  }\n\n  const pairs = Array.isArray(queryString) ? queryString : Object.entries(queryString);\n  const result = pairs.map(([key, value]) => `${key}=${value}`).join('&');\n\n  return result || undefined;\n}\n","import { defineIntegration } from '../integration';\nimport type { Event } from '../types/event';\nimport type { StackFrame } from '../types/stackframe';\nimport type { Stacktrace } from '../types/stacktrace';\nimport { basename, relative } from '../utils/path';\nimport { GLOBAL_OBJ } from '../utils/worldwide';\n\ntype StackFrameIteratee = (frame: StackFrame) => StackFrame;\n\nconst INTEGRATION_NAME = 'RewriteFrames' as const;\n\ninterface RewriteFramesOptions {\n  /**\n   * Root path (the beginning of the path) that will be stripped from the frames' filename.\n   *\n   * This option has slightly different behaviour in the browser and on servers:\n   * - In the browser, the value you provide in `root` will be stripped from the beginning stack frames' paths (if the path started with the value).\n   * - On the server, the root value will only replace the beginning of stack frame filepaths, when the path is absolute. If no `root` value is provided and the path is absolute, the frame will be reduced to only the filename and the provided `prefix` option.\n   *\n   * Browser example:\n   * - Original frame: `'http://example.com/my/path/static/asset.js'`\n   * - `root: 'http://example.com/my/path'`\n   * - `assetPrefix: 'app://'`\n   * - Resulting frame: `'app:///static/asset.js'`\n   *\n   * Server example:\n   * - Original frame: `'/User/local/my/path/static/asset.js'`\n   * - `root: '/User/local/my/path'`\n   * - `assetPrefix: 'app://'`\n   * - Resulting frame: `'app:///static/asset.js'`\n   */\n  root?: string;\n\n  /**\n   * A custom prefix that stack frames will be prepended with.\n   *\n   * Default: `'app://'`\n   *\n   * This option has slightly different behaviour in the browser and on servers:\n   * - In the browser, the value you provide in `prefix` will prefix the resulting filename when the value you provided in `root` was applied. Effectively replacing whatever `root` matched in the beginning of the frame with `prefix`.\n   * - On the server, the prefix is applied to all stackframes with absolute paths. On Windows, the drive identifier (e.g. \"C://\") is replaced with the prefix.\n   */\n  prefix?: string;\n\n  /**\n   * Defines an iterator that is used to iterate through all of the stack frames for modification before being sent to Sentry.\n   * Setting this option will effectively disable both the `root` and the `prefix` options.\n   */\n  iteratee?: StackFrameIteratee;\n}\n\n/**\n * Rewrite event frames paths.\n */\nexport const rewriteFramesIntegration = defineIntegration((options: RewriteFramesOptions = {}) => {\n  const root = options.root;\n  const prefix = options.prefix || 'app:///';\n\n  const isBrowser = 'window' in GLOBAL_OBJ && !!GLOBAL_OBJ.window;\n\n  const iteratee: StackFrameIteratee = options.iteratee || generateIteratee({ isBrowser, root, prefix });\n\n  /** Process an exception event. */\n  function _processExceptionsEvent(event: Event): Event {\n    try {\n      return {\n        ...event,\n        exception: {\n          ...event.exception,\n          // The check for this is performed inside `process` call itself, safe to skip here\n          // eslint-disable-next-line @typescript-eslint/no-non-null-assertion\n          values: event.exception!.values!.map(value => ({\n            ...value,\n            ...(value.stacktrace && { stacktrace: _processStacktrace(value.stacktrace) }),\n          })),\n        },\n      };\n    } catch {\n      return event;\n    }\n  }\n\n  /** Process a stack trace. */\n  function _processStacktrace(stacktrace?: Stacktrace): Stacktrace {\n    return {\n      ...stacktrace,\n      frames: stacktrace?.frames?.map(f => iteratee(f)),\n    };\n  }\n\n  return {\n    name: INTEGRATION_NAME,\n    processEvent(originalEvent) {\n      let processedEvent = originalEvent;\n\n      if (originalEvent.exception && Array.isArray(originalEvent.exception.values)) {\n        processedEvent = _processExceptionsEvent(processedEvent);\n      }\n\n      return processedEvent;\n    },\n  };\n});\n\n/**\n * Exported only for tests.\n */\nexport function generateIteratee({\n  isBrowser,\n  root,\n  prefix,\n}: {\n  isBrowser: boolean;\n  root?: string;\n  prefix: string;\n}): StackFrameIteratee {\n  return (frame: StackFrame) => {\n    if (!frame.filename) {\n      return frame;\n    }\n\n    // Determine if this is a Windows frame by checking for a Windows-style prefix such as `C:\\`\n    const isWindowsFrame =\n      /^[a-zA-Z]:\\\\/.test(frame.filename) ||\n      // or the presence of a backslash without a forward slash (which are not allowed on Windows)\n      (frame.filename.includes('\\\\') && !frame.filename.includes('/'));\n\n    // Check if the frame filename begins with `/`\n    const startsWithSlash = /^\\//.test(frame.filename);\n\n    if (isBrowser) {\n      if (root) {\n        const oldFilename = frame.filename;\n        if (oldFilename.indexOf(root) === 0) {\n          frame.filename = oldFilename.replace(root, prefix);\n        }\n      }\n    } else {\n      if (isWindowsFrame || startsWithSlash) {\n        const filename = isWindowsFrame\n          ? frame.filename\n              .replace(/^[a-zA-Z]:/, '') // remove Windows-style prefix\n              .replace(/\\\\/g, '/') // replace all `\\\\` instances with `/`\n          : frame.filename;\n        const base = root ? relative(root, filename) : basename(filename);\n        frame.filename = `${prefix}${base}`;\n      }\n    }\n\n    return frame;\n  };\n}\n","import type { IntegrationFn } from '../types/integration';\nimport { DEBUG_BUILD } from '../debug-build';\nimport { defineIntegration } from '../integration';\nimport { isStreamedBeforeSendSpanCallback } from '../tracing/spans/beforeSendSpan';\nimport { captureSpan } from '../tracing/spans/captureSpan';\nimport { hasSpanStreamingEnabled } from '../tracing/spans/hasSpanStreamingEnabled';\nimport { SpanBuffer } from '../tracing/spans/spanBuffer';\nimport { debug } from '../utils/debug-logger';\nimport { spanIsSampled } from '../utils/spanUtils';\n\nexport const spanStreamingIntegration = defineIntegration(() => {\n  return {\n    name: 'SpanStreaming' as const,\n\n    setup(client) {\n      const initialMessage = 'SpanStreaming integration requires';\n      const fallbackMsg = 'Falling back to static trace lifecycle.';\n      const clientOptions = client.getOptions();\n\n      if (!hasSpanStreamingEnabled(client)) {\n        clientOptions.traceLifecycle = 'static';\n        DEBUG_BUILD && debug.warn(`${initialMessage} \\`traceLifecycle\\` to be set to \"stream\"! ${fallbackMsg}`);\n        return;\n      }\n\n      const beforeSendSpan = clientOptions.beforeSendSpan;\n      if (beforeSendSpan && !isStreamedBeforeSendSpanCallback(beforeSendSpan)) {\n        clientOptions.traceLifecycle = 'static';\n        DEBUG_BUILD &&\n          debug.warn(`${initialMessage} a beforeSendSpan callback using \\`withStreamedSpan\\`! ${fallbackMsg}`);\n        return;\n      }\n\n      const buffer = new SpanBuffer(client);\n\n      client.on('afterSpanEnd', span => {\n        if (!spanIsSampled(span)) {\n          return;\n        }\n        buffer.add(captureSpan(span, client));\n      });\n    },\n  };\n}) satisfies IntegrationFn;\n","// Based on Kamil Ogórek's work on:\n// https://github.com/supabase-community/sentry-integration-js\n\n/* eslint-disable @typescript-eslint/no-explicit-any */\n/* eslint-disable max-lines */\nimport { addBreadcrumb } from '../breadcrumbs';\nimport { getClient } from '../currentScopes';\nimport { DEBUG_BUILD } from '../debug-build';\nimport { captureException } from '../exports';\nimport { defineIntegration } from '../integration';\nimport { SEMANTIC_ATTRIBUTE_SENTRY_OP, SEMANTIC_ATTRIBUTE_SENTRY_ORIGIN } from '../semanticAttributes';\nimport { setHttpStatus, SPAN_STATUS_ERROR, SPAN_STATUS_OK, startSpan } from '../tracing';\nimport type { IntegrationFn } from '../types/integration';\nimport type { WebFetchHeaders } from '../types/webfetchapi';\nimport { debug } from '../utils/debug-logger';\nimport { isObjectLike, isPlainObject } from '../utils/is';\nimport { addExceptionMechanism } from '../utils/misc';\n\nconst AUTH_OPERATIONS_TO_INSTRUMENT = [\n  'reauthenticate',\n  'signInAnonymously',\n  'signInWithOAuth',\n  'signInWithIdToken',\n  'signInWithOtp',\n  'signInWithPassword',\n  'signInWithSSO',\n  'signOut',\n  'signUp',\n  'verifyOtp',\n];\n\nconst AUTH_ADMIN_OPERATIONS_TO_INSTRUMENT = [\n  'createUser',\n  'deleteUser',\n  'listUsers',\n  'getUserById',\n  'updateUserById',\n  'inviteUserByEmail',\n];\n\nexport const FILTER_MAPPINGS = {\n  eq: 'eq',\n  neq: 'neq',\n  gt: 'gt',\n  gte: 'gte',\n  lt: 'lt',\n  lte: 'lte',\n  like: 'like',\n  'like(all)': 'likeAllOf',\n  'like(any)': 'likeAnyOf',\n  ilike: 'ilike',\n  'ilike(all)': 'ilikeAllOf',\n  'ilike(any)': 'ilikeAnyOf',\n  is: 'is',\n  in: 'in',\n  cs: 'contains',\n  cd: 'containedBy',\n  sr: 'rangeGt',\n  nxl: 'rangeGte',\n  sl: 'rangeLt',\n  nxr: 'rangeLte',\n  adj: 'rangeAdjacent',\n  ov: 'overlaps',\n  fts: '',\n  plfts: 'plain',\n  phfts: 'phrase',\n  wfts: 'websearch',\n  not: 'not',\n};\n\nexport const DB_OPERATIONS_TO_INSTRUMENT = ['select', 'insert', 'upsert', 'update', 'delete'];\n\ntype AuthOperationFn = (...args: unknown[]) => Promise<unknown>;\ntype AuthOperationName = (typeof AUTH_OPERATIONS_TO_INSTRUMENT)[number];\ntype AuthAdminOperationName = (typeof AUTH_ADMIN_OPERATIONS_TO_INSTRUMENT)[number];\ntype PostgRESTQueryOperationFn = (...args: unknown[]) => PostgRESTFilterBuilder;\n\nexport interface SupabaseClientInstance {\n  auth: {\n    admin: Record<AuthAdminOperationName, AuthOperationFn>;\n  } & Record<AuthOperationName, AuthOperationFn>;\n}\n\nexport interface PostgRESTQueryBuilder {\n  [key: string]: PostgRESTQueryOperationFn;\n}\n\n/**\n * `postgrest-js` stores the request headers as a plain object up to v1.19.x and as a `Headers`\n * instance from v2.74.0 on (shipped with `supabase-js` 2.74.0), so we have to handle both shapes.\n */\nexport type PostgRESTHeaders = Record<string, string> | WebFetchHeaders;\n\nexport interface PostgRESTFilterBuilder {\n  method: string;\n  headers: PostgRESTHeaders;\n  url: URL;\n  schema: string;\n  body: any;\n}\n\nexport interface SupabaseResponse {\n  status?: number;\n  error?: {\n    message: string;\n    code?: string;\n    details?: unknown;\n  };\n}\n\nexport interface SupabaseError extends Error {\n  code?: string;\n  details?: unknown;\n}\n\nexport interface SupabaseBreadcrumb {\n  type: string;\n  category: string;\n  message: string;\n  data?: {\n    query?: string[];\n    body?: Record<string, unknown>;\n  };\n}\n\nexport interface SupabaseClientConstructor {\n  prototype: {\n    from: (table: string) => PostgRESTQueryBuilder;\n  };\n}\n\nexport interface PostgRESTProtoThenable {\n  then: <T>(\n    onfulfilled?: ((value: T) => T | PromiseLike<T>) | null,\n    onrejected?: ((reason: any) => T | PromiseLike<T>) | null,\n  ) => Promise<T>;\n}\n\ntype SentryInstrumented<T> = T & {\n  __SENTRY_INSTRUMENTED__?: boolean;\n};\n\nfunction markAsInstrumented<T>(fn: T): void {\n  try {\n    (fn as SentryInstrumented<T>).__SENTRY_INSTRUMENTED__ = true;\n  } catch {\n    // ignore errors here\n  }\n}\n\nfunction isInstrumented<T>(fn: T): boolean | undefined {\n  try {\n    return (fn as SentryInstrumented<T>).__SENTRY_INSTRUMENTED__;\n  } catch {\n    return false;\n  }\n}\n\n/**\n * Plain-object bodies are copied into `plainBody`; array inserts (and other non-plain shapes) stay only on `rawBody`.\n * Returns a payload suitable for span attributes / breadcrumbs when operation data collection is enabled.\n */\nfunction getMutationBodyPayloadForTelemetry(rawBody: unknown, plainBody: Record<string, unknown>): unknown | undefined {\n  if (Object.keys(plainBody).length > 0) {\n    return plainBody;\n  }\n  if (Array.isArray(rawBody) && rawBody.length > 0) {\n    return rawBody;\n  }\n  return undefined;\n}\n\n/** True when the PostgREST builder carries a mutation body (for `insert(...)`, etc. in span descriptions). */\nfunction hasMutationBodyForDescription(rawBody: unknown, plainBody: Record<string, unknown>): boolean {\n  return getMutationBodyPayloadForTelemetry(rawBody, plainBody) !== undefined;\n}\n\n/**\n * Reads a header off a PostgREST builder, regardless of whether it holds a plain object or a\n * `Headers` instance. Lookup is case-insensitive because `Headers` lower-cases all of its keys.\n * @param headers - The request headers\n * @param name - The header name to look up\n * @returns The header value, or `undefined` if it is not set\n */\nexport function getHeader(headers: PostgRESTHeaders | undefined, name: string): string | undefined {\n  if (!headers) {\n    return undefined;\n  }\n\n  if (typeof (headers as WebFetchHeaders).get === 'function') {\n    return (headers as WebFetchHeaders).get(name) ?? undefined;\n  }\n\n  const plainHeaders = headers as Record<string, string>;\n  const lowerCaseName = name.toLowerCase();\n  const key = Object.keys(plainHeaders).find(headerName => headerName.toLowerCase() === lowerCaseName);\n\n  return key !== undefined ? plainHeaders[key] : undefined;\n}\n\n/**\n * Extracts the database operation type from the HTTP method and headers\n * @param method - The HTTP method of the request\n * @param headers - The request headers\n * @returns The database operation type ('select', 'insert', 'upsert', 'update', or 'delete')\n */\nexport function extractOperation(method: string, headers: PostgRESTHeaders = {}): string {\n  switch (method) {\n    case 'GET': {\n      return 'select';\n    }\n    case 'POST': {\n      if (getHeader(headers, 'Prefer')?.includes('resolution=')) {\n        return 'upsert';\n      } else {\n        return 'insert';\n      }\n    }\n    case 'PATCH': {\n      return 'update';\n    }\n    case 'DELETE': {\n      return 'delete';\n    }\n    default: {\n      return '<unknown-op>';\n    }\n  }\n}\n\n/**\n * Translates Supabase filter parameters into readable method names for tracing\n * @param key - The filter key from the URL search parameters\n * @param query - The filter value from the URL search parameters\n * @returns A string representation of the filter as a method call\n */\nexport function translateFiltersIntoMethods(key: string, query: string): string {\n  if (query === '' || query === '*') {\n    return 'select(*)';\n  }\n\n  if (key === 'select') {\n    return `select(${query})`;\n  }\n\n  if (key === 'or' || key.endsWith('.or')) {\n    return `${key}${query}`;\n  }\n\n  const [filter, ...value] = query.split('.');\n\n  let method;\n  // Handle optional `configPart` of the filter\n  if (filter?.startsWith('fts')) {\n    method = 'textSearch';\n  } else if (filter?.startsWith('plfts')) {\n    method = 'textSearch[plain]';\n  } else if (filter?.startsWith('phfts')) {\n    method = 'textSearch[phrase]';\n  } else if (filter?.startsWith('wfts')) {\n    method = 'textSearch[websearch]';\n  } else {\n    method = (filter && FILTER_MAPPINGS[filter as keyof typeof FILTER_MAPPINGS]) || 'filter';\n  }\n\n  return `${method}(${key}, ${value.join('.')})`;\n}\n\nfunction instrumentAuthOperation(operation: AuthOperationFn, isAdmin = false): AuthOperationFn {\n  return new Proxy(operation, {\n    apply(target, thisArg, argumentsList) {\n      return startSpan(\n        {\n          name: `auth ${isAdmin ? '(admin) ' : ''}${operation.name}`,\n          attributes: {\n            [SEMANTIC_ATTRIBUTE_SENTRY_ORIGIN]: 'auto.db.supabase',\n            [SEMANTIC_ATTRIBUTE_SENTRY_OP]: 'db',\n            'db.system': 'postgresql',\n            'db.operation': `auth.${isAdmin ? 'admin.' : ''}${operation.name}`,\n          },\n        },\n        span => {\n          return Reflect.apply(target, thisArg, argumentsList)\n            .then((res: unknown) => {\n              if (isObjectLike(res) && 'error' in res && res.error) {\n                span.setStatus({ code: SPAN_STATUS_ERROR });\n\n                captureException(res.error, {\n                  mechanism: {\n                    handled: false,\n                    type: 'auto.db.supabase.auth',\n                  },\n                });\n              } else {\n                span.setStatus({ code: SPAN_STATUS_OK });\n              }\n\n              span.end();\n              return res;\n            })\n            .catch((err: unknown) => {\n              span.setStatus({ code: SPAN_STATUS_ERROR });\n              span.end();\n\n              captureException(err, {\n                mechanism: {\n                  handled: false,\n                  type: 'auto.db.supabase.auth',\n                },\n              });\n\n              throw err;\n            })\n            .then(...argumentsList);\n        },\n      );\n    },\n  });\n}\n\nfunction instrumentSupabaseAuthClient(supabaseClientInstance: SupabaseClientInstance): void {\n  const auth = supabaseClientInstance.auth;\n\n  if (!auth || isInstrumented(supabaseClientInstance.auth)) {\n    return;\n  }\n\n  for (const operation of AUTH_OPERATIONS_TO_INSTRUMENT) {\n    const authOperation = auth[operation];\n\n    if (!authOperation) {\n      continue;\n    }\n\n    if (typeof supabaseClientInstance.auth[operation] === 'function') {\n      supabaseClientInstance.auth[operation] = instrumentAuthOperation(authOperation);\n    }\n  }\n\n  for (const operation of AUTH_ADMIN_OPERATIONS_TO_INSTRUMENT) {\n    const authOperation = auth.admin[operation];\n\n    if (!authOperation) {\n      continue;\n    }\n\n    if (typeof supabaseClientInstance.auth.admin[operation] === 'function') {\n      supabaseClientInstance.auth.admin[operation] = instrumentAuthOperation(authOperation, true);\n    }\n  }\n\n  markAsInstrumented(supabaseClientInstance.auth);\n}\n\nfunction instrumentSupabaseClientConstructor(SupabaseClient: unknown, _options: { sendOperationData?: boolean }): void {\n  if (isInstrumented((SupabaseClient as SupabaseClientConstructor).prototype.from)) {\n    return;\n  }\n\n  (SupabaseClient as SupabaseClientConstructor).prototype.from = new Proxy(\n    (SupabaseClient as SupabaseClientConstructor).prototype.from,\n    {\n      apply(target, thisArg, argumentsList) {\n        const rv = Reflect.apply(target, thisArg, argumentsList);\n        const PostgRESTQueryBuilder = (rv as PostgRESTQueryBuilder).constructor;\n\n        instrumentPostgRESTQueryBuilder(PostgRESTQueryBuilder as unknown as new () => PostgRESTQueryBuilder, _options);\n\n        return rv;\n      },\n    },\n  );\n\n  markAsInstrumented((SupabaseClient as SupabaseClientConstructor).prototype.from);\n}\n\nfunction instrumentPostgRESTFilterBuilder(\n  PostgRESTFilterBuilder: PostgRESTFilterBuilder['constructor'],\n  _options: { sendOperationData?: boolean },\n): void {\n  if (isInstrumented((PostgRESTFilterBuilder.prototype as unknown as PostgRESTProtoThenable).then)) {\n    return;\n  }\n\n  (PostgRESTFilterBuilder.prototype as unknown as PostgRESTProtoThenable).then = new Proxy(\n    (PostgRESTFilterBuilder.prototype as unknown as PostgRESTProtoThenable).then,\n    {\n      apply(target, thisArg, argumentsList) {\n        const operations = DB_OPERATIONS_TO_INSTRUMENT;\n        const typedThis = thisArg as PostgRESTFilterBuilder;\n        const operation = extractOperation(typedThis.method, typedThis.headers);\n\n        if (!operations.includes(operation)) {\n          return Reflect.apply(target, thisArg, argumentsList);\n        }\n\n        if (!typedThis?.url?.pathname || typeof typedThis.url.pathname !== 'string') {\n          return Reflect.apply(target, thisArg, argumentsList);\n        }\n\n        const pathParts = typedThis.url.pathname.split('/');\n        const table = pathParts.length > 0 ? pathParts[pathParts.length - 1] : '';\n\n        const queryItems: string[] = [];\n        for (const [key, value] of typedThis.url.searchParams.entries()) {\n          // It's possible to have multiple entries for the same key, eg. `id=eq.7&id=eq.3`,\n          // so we need to use array instead of object to collect them.\n          queryItems.push(translateFiltersIntoMethods(key, value));\n        }\n        const body: Record<string, unknown> = Object.create(null);\n        if (isPlainObject(typedThis.body)) {\n          for (const [key, value] of Object.entries(typedThis.body)) {\n            body[key] = value;\n          }\n        }\n\n        const client = getClient();\n        const shouldSendData =\n          _options.sendOperationData ?? client?.getDataCollectionOptions().databaseQueryData === true;\n        const bodyPayload = getMutationBodyPayloadForTelemetry(typedThis.body, body);\n\n        // Adding operation to the beginning of the description if it's not a `select` operation\n        // For example, it can be an `insert` or `update` operation but the query can be `select(...)`\n        // For `select` operations, we don't need repeat it in the description\n        const mutationPart =\n          operation === 'select'\n            ? ''\n            : `${operation}${hasMutationBodyForDescription(typedThis.body, body) ? '(...) ' : ''}`;\n        const queryPart = shouldSendData ? queryItems.join(' ') : queryItems.length > 0 ? '[redacted]' : '';\n        const descriptionMiddle = [mutationPart.trimEnd(), queryPart].filter(Boolean).join(' ');\n        const description = descriptionMiddle ? `${descriptionMiddle} from(${table})` : `from(${table})`;\n\n        const attributes: Record<string, any> = {\n          'db.table': table,\n          'db.schema': typedThis.schema,\n          'db.url': typedThis.url.origin,\n          'db.sdk': getHeader(typedThis.headers, 'X-Client-Info'),\n          'db.system': 'postgresql',\n          'db.operation': operation,\n          [SEMANTIC_ATTRIBUTE_SENTRY_ORIGIN]: 'auto.db.supabase',\n          [SEMANTIC_ATTRIBUTE_SENTRY_OP]: 'db',\n        };\n\n        if (queryItems.length && shouldSendData) {\n          attributes['db.query'] = queryItems;\n        }\n\n        if (bodyPayload !== undefined && shouldSendData) {\n          attributes['db.body'] = bodyPayload;\n        }\n\n        return startSpan(\n          {\n            name: description,\n            attributes,\n          },\n          span => {\n            return (Reflect.apply(target, thisArg, []) as Promise<SupabaseResponse>)\n              .then(\n                (res: SupabaseResponse) => {\n                  if (span) {\n                    if (res && typeof res === 'object' && 'status' in res) {\n                      setHttpStatus(span, res.status || 500);\n                    }\n                    span.end();\n                  }\n\n                  if (res?.error) {\n                    const err = new Error(res.error.message) as SupabaseError;\n                    if (res.error.code) {\n                      err.code = res.error.code;\n                    }\n                    if (res.error.details) {\n                      err.details = res.error.details;\n                    }\n\n                    const supabaseContext: Record<string, any> = {};\n                    if (queryItems.length && shouldSendData) {\n                      supabaseContext.query = queryItems;\n                    }\n                    if (bodyPayload !== undefined && shouldSendData) {\n                      supabaseContext.body = bodyPayload;\n                    }\n\n                    captureException(err, scope => {\n                      scope.addEventProcessor(e => {\n                        addExceptionMechanism(e, {\n                          handled: false,\n                          type: 'auto.db.supabase.postgres',\n                        });\n\n                        return e;\n                      });\n\n                      scope.setContext('supabase', supabaseContext);\n\n                      return scope;\n                    });\n                  }\n\n                  const breadcrumb: SupabaseBreadcrumb = {\n                    type: 'supabase',\n                    category: `db.${operation}`,\n                    message: description,\n                  };\n\n                  const data: Record<string, unknown> = {};\n\n                  if (queryItems.length && shouldSendData) {\n                    data.query = queryItems;\n                  }\n\n                  if (bodyPayload !== undefined && shouldSendData) {\n                    data.body = bodyPayload;\n                  }\n\n                  if (Object.keys(data).length) {\n                    breadcrumb.data = data;\n                  }\n\n                  addBreadcrumb(breadcrumb);\n\n                  return res;\n                },\n                (err: Error) => {\n                  // TODO: shouldn't we capture this error?\n                  if (span) {\n                    setHttpStatus(span, 500);\n                    span.end();\n                  }\n                  throw err;\n                },\n              )\n              .then(...argumentsList);\n          },\n        );\n      },\n    },\n  );\n\n  markAsInstrumented((PostgRESTFilterBuilder.prototype as unknown as PostgRESTProtoThenable).then);\n}\n\nfunction instrumentPostgRESTQueryBuilder(\n  PostgRESTQueryBuilder: new () => PostgRESTQueryBuilder,\n  _options: { sendOperationData?: boolean },\n): void {\n  // We need to wrap _all_ operations despite them sharing the same `PostgRESTFilterBuilder`\n  // constructor, as we don't know which method will be called first, and we don't want to miss any calls.\n  for (const operation of DB_OPERATIONS_TO_INSTRUMENT) {\n    if (isInstrumented((PostgRESTQueryBuilder.prototype as Record<string, any>)[operation])) {\n      continue;\n    }\n\n    type PostgRESTOperation = keyof Pick<PostgRESTQueryBuilder, 'select' | 'insert' | 'upsert' | 'update' | 'delete'>;\n    (PostgRESTQueryBuilder.prototype as Record<string, any>)[operation as PostgRESTOperation] = new Proxy(\n      (PostgRESTQueryBuilder.prototype as Record<string, any>)[operation as PostgRESTOperation],\n      {\n        apply(target, thisArg, argumentsList) {\n          const rv = Reflect.apply(target, thisArg, argumentsList);\n          const PostgRESTFilterBuilder = (rv as PostgRESTFilterBuilder).constructor;\n\n          DEBUG_BUILD && debug.log(`Instrumenting ${operation} operation's PostgRESTFilterBuilder`);\n\n          instrumentPostgRESTFilterBuilder(PostgRESTFilterBuilder, _options);\n\n          return rv;\n        },\n      },\n    );\n\n    markAsInstrumented((PostgRESTQueryBuilder.prototype as Record<string, any>)[operation]);\n  }\n}\n\nexport const instrumentSupabaseClient = (\n  supabaseClient: unknown,\n  options: { sendOperationData?: boolean } = {},\n): void => {\n  if (!supabaseClient) {\n    DEBUG_BUILD && debug.warn('Supabase integration was not installed because no Supabase client was provided.');\n    return;\n  }\n  const SupabaseClientConstructor =\n    supabaseClient.constructor === Function ? supabaseClient : supabaseClient.constructor;\n\n  instrumentSupabaseClientConstructor(SupabaseClientConstructor, options);\n  instrumentSupabaseAuthClient(supabaseClient as SupabaseClientInstance);\n};\n\ninterface SupabaseIntegrationOptions {\n  supabaseClient: any;\n  /**\n   * Whether to attach PostgREST query filters and mutation body payloads\n   * to Sentry telemetry.\n   *\n   * Falls back to `dataCollection.databaseQueryData` when not set.\n   * @default undefined\n   */\n  sendOperationData?: boolean;\n}\n\nconst INTEGRATION_NAME = 'Supabase' as const;\n\nconst _supabaseIntegration = ((supabaseClient: unknown, options: { sendOperationData?: boolean }) => {\n  return {\n    setupOnce() {\n      instrumentSupabaseClient(supabaseClient, options);\n    },\n    name: INTEGRATION_NAME,\n  };\n}) satisfies IntegrationFn;\n\nexport const supabaseIntegration = defineIntegration((options: SupabaseIntegrationOptions) => {\n  return _supabaseIntegration(options.supabaseClient, { sendOperationData: options.sendOperationData });\n}) satisfies IntegrationFn;\n","import { defineIntegration } from '../integration';\nimport { addMetadataToStackFrames, stripMetadataFromStackFrames } from '../metadata';\nimport type { EventItem } from '../types/envelope';\nimport type { Event } from '../types/event';\nimport type { StackFrame } from '../types/stackframe';\nimport { forEachEnvelopeItem } from '../utils/envelope';\nimport { getFramesFromEvent } from '../utils/stacktrace';\nimport { GLOBAL_OBJ } from '../utils/worldwide';\n\ninterface Options {\n  /**\n   * Keys that have been provided in the Sentry bundler plugin via the the `applicationKey` option, identifying your bundles.\n   *\n   * - Webpack plugin: https://www.npmjs.com/package/@sentry/webpack-plugin#applicationkey\n   * - Vite plugin: https://www.npmjs.com/package/@sentry/vite-plugin#applicationkey\n   * - Esbuild plugin: https://www.npmjs.com/package/@sentry/esbuild-plugin#applicationkey\n   * - Rollup plugin: https://www.npmjs.com/package/@sentry/rollup-plugin#applicationkey\n   */\n  filterKeys: string[];\n\n  /**\n   * Defines how the integration should behave. \"Third-Party Stack Frames\" are stack frames that did not come from files marked with a matching bundle key.\n   *\n   * You can define the behaviour with one of 4 modes:\n   * - `drop-error-if-contains-third-party-frames`: Drop error events that contain at least one third-party stack frame.\n   * - `drop-error-if-exclusively-contains-third-party-frames`: Drop error events that exclusively contain third-party stack frames.\n   * - `apply-tag-if-contains-third-party-frames`: Keep all error events, but apply a `third_party_code: true` tag in case the error contains at least one third-party stack frame.\n   * - `apply-tag-if-exclusively-contains-third-party-frames`: Keep all error events, but apply a `third_party_code: true` tag in case the error contains exclusively third-party stack frames.\n   *\n   * If you chose the mode to only apply tags, the tags can then be used in Sentry to filter your issue stream by entering `!third_party_code:True` in the search bar.\n   */\n  behaviour:\n    | 'drop-error-if-contains-third-party-frames'\n    | 'drop-error-if-exclusively-contains-third-party-frames'\n    | 'apply-tag-if-contains-third-party-frames'\n    | 'apply-tag-if-exclusively-contains-third-party-frames';\n\n  /**\n   * @experimental\n   * If set to true, the integration will ignore frames that are internal to the Sentry SDK from the third-party frame detection.\n   * Note that enabling this option might lead to errors being misclassified as third-party errors.\n   */\n  ignoreSentryInternalFrames?: boolean;\n}\n\n/**\n * This integration allows you to filter out, or tag error events that do not come from user code marked with a bundle key via the Sentry bundler plugins.\n */\nexport const thirdPartyErrorFilterIntegration = defineIntegration((options: Options) => {\n  return {\n    name: 'ThirdPartyErrorsFilter' as const,\n    setup(client) {\n      // We need to strip metadata from stack frames before sending them to Sentry since these are client side only.\n      client.on('beforeEnvelope', envelope => {\n        forEachEnvelopeItem(envelope, (item, type) => {\n          if (type === 'event') {\n            const event = Array.isArray(item) ? (item as EventItem)[1] : undefined;\n\n            if (event) {\n              stripMetadataFromStackFrames(event);\n              item[1] = event;\n            }\n          }\n        });\n      });\n\n      client.on('applyFrameMetadata', event => {\n        // Only apply stack frame metadata to error events\n        if (event.type) {\n          return;\n        }\n\n        const stackParser = client.getOptions().stackParser;\n        addMetadataToStackFrames(stackParser, event);\n      });\n    },\n\n    preprocessEvent(event) {\n      // Snapshot the depth counter onto the event before any event processors run.\n      // This is necessary because async event processors could cause the finally block\n      // in sentryWrapped to decrement the counter before processEvent reads it.\n      if (options.ignoreSentryInternalFrames && (GLOBAL_OBJ._sentryWrappedDepth ?? 0) > 0) {\n        event.sdkProcessingMetadata = {\n          ...event.sdkProcessingMetadata,\n          insideSentryWrapped: true,\n        };\n      }\n    },\n\n    processEvent(event) {\n      const insideSentryWrapped = options.ignoreSentryInternalFrames\n        ? event.sdkProcessingMetadata?.insideSentryWrapped === true && event.exception?.values?.length === 1\n        : false;\n      const frameKeys = getBundleKeysForAllFramesWithFilenames(\n        event,\n        options.ignoreSentryInternalFrames,\n        insideSentryWrapped,\n      );\n\n      if (frameKeys) {\n        const arrayMethod =\n          options.behaviour === 'drop-error-if-contains-third-party-frames' ||\n          options.behaviour === 'apply-tag-if-contains-third-party-frames'\n            ? 'some'\n            : 'every';\n\n        const behaviourApplies = frameKeys[arrayMethod](keys => !keys.some(key => options.filterKeys.includes(key)));\n\n        if (behaviourApplies) {\n          const shouldDrop =\n            options.behaviour === 'drop-error-if-contains-third-party-frames' ||\n            options.behaviour === 'drop-error-if-exclusively-contains-third-party-frames';\n          if (shouldDrop) {\n            return null;\n          } else {\n            event.tags = {\n              ...event.tags,\n              third_party_code: true,\n            };\n          }\n        }\n      }\n\n      return event;\n    },\n  };\n});\n\n/** Checks if a frame is Sentry-internal via runtime depth, function name, or source patterns. */\nfunction isSentryInternalFrame(frame: StackFrame, frameIndex: number, insideSentryWrapped: boolean): boolean {\n  // Only match the last frame (index 0 in reversed stack)\n  if (frameIndex !== 0) {\n    return false;\n  }\n\n  // When processEvent runs inside a sentryWrapped call and the frame looks minified,\n  // the outermost frame is the sentryWrapped function with a mangled name.\n  // We gate on minified shape to avoid false positives in non-minified builds\n  // where stripSentryFramesAndReverse already removed the sentryWrapped frame.\n  if (insideSentryWrapped && isLikelyMinifiedSentryWrappedFrame(frame)) {\n    return true;\n  }\n\n  // Match by function name (works when function names survive bundling but source patterns don't)\n  if (frame.function === 'sentryWrapped') {\n    return true;\n  }\n\n  if (!frame.context_line || !frame.filename) {\n    return false;\n  }\n\n  // Match by source code patterns (works in development / unbundled builds)\n  if (\n    !frame.filename.includes('sentry') ||\n    !frame.filename.includes('helpers') || // Filename would look something like this: 'node_modules/@sentry/browser/build/npm/esm/helpers.js'\n    !frame.context_line.includes(SENTRY_INTERNAL_FN_APPLY) // Must have context_line with the exact fn.apply pattern\n  ) {\n    return false;\n  }\n\n  // Check pre_context array for comment pattern\n  if (frame.pre_context) {\n    const len = frame.pre_context.length;\n    for (let i = 0; i < len; i++) {\n      if (frame.pre_context[i]?.includes(SENTRY_INTERNAL_COMMENT)) {\n        return true;\n      }\n    }\n  }\n\n  return false;\n}\n\nfunction getBundleKeysForAllFramesWithFilenames(\n  event: Event,\n  ignoreSentryInternalFrames?: boolean,\n  insideSentryWrapped?: boolean,\n): string[][] | undefined {\n  const frames = getFramesFromEvent(event);\n\n  if (!frames) {\n    return undefined;\n  }\n\n  return frames\n    .filter((frame, index) => {\n      // Exclude frames without a filename\n      if (!frame.filename) {\n        return false;\n      }\n      // Exclude frames without location info, since these are likely native code or built-ins.\n      // JS frames have lineno/colno, WASM frames have instruction_addr instead.\n      if (frame.lineno == null && frame.colno == null && frame.instruction_addr == null) {\n        return false;\n      }\n      // Optionally ignore Sentry internal frames\n      return !ignoreSentryInternalFrames || !isSentryInternalFrame(frame, index, !!insideSentryWrapped);\n    })\n    .map(frame => {\n      if (!frame.module_metadata) {\n        return [];\n      }\n      return Object.keys(frame.module_metadata)\n        .filter(key => key.startsWith(BUNDLER_PLUGIN_APP_KEY_PREFIX))\n        .map(key => key.slice(BUNDLER_PLUGIN_APP_KEY_PREFIX.length));\n    });\n}\n\nfunction isLikelyMinifiedSentryWrappedFrame(frame: StackFrame): boolean {\n  return !frame.context_line && !frame.pre_context && !!frame.function && frame.function.length <= 2;\n}\n\nconst BUNDLER_PLUGIN_APP_KEY_PREFIX = '_sentryBundlerPluginAppKey:';\nconst SENTRY_INTERNAL_COMMENT = 'Attempt to invoke user-land function';\nconst SENTRY_INTERNAL_FN_APPLY = 'fn.apply(this, wrappedArguments)';\n","import { defineIntegration } from '../integration';\nimport type { Event, EventHint } from '../types/event';\nimport type { IntegrationFn } from '../types/integration';\nimport { isError } from '../utils/is';\nimport { truncate } from '../utils/string';\n\ninterface ZodErrorsOptions {\n  key?: string;\n  /**\n   * Limits the number of Zod errors inlined in each Sentry event.\n   *\n   * @default 10\n   */\n  limit?: number;\n  /**\n   * Save full list of Zod issues as an attachment in Sentry\n   *\n   * @default false\n   */\n  saveZodIssuesAsAttachment?: boolean;\n}\n\nconst DEFAULT_LIMIT = 10;\nconst INTEGRATION_NAME = 'ZodErrors' as const;\n\n/**\n * Simplified ZodIssue type definition\n */\ninterface ZodIssue {\n  path: (string | number)[];\n  message?: string;\n  expected?: unknown;\n  received?: unknown;\n  unionErrors?: unknown[];\n  keys?: unknown[];\n  invalid_literal?: unknown;\n}\n\ninterface ZodError extends Error {\n  issues: ZodIssue[];\n}\n\nfunction originalExceptionIsZodError(originalException: unknown): originalException is ZodError {\n  return (\n    isError(originalException) &&\n    originalException.name === 'ZodError' &&\n    Array.isArray((originalException as ZodError).issues)\n  );\n}\n\ntype SingleLevelZodIssue<T extends ZodIssue> = {\n  [P in keyof T]: T[P] extends string | number | undefined\n    ? T[P]\n    : T[P] extends unknown[]\n      ? string | undefined\n      : unknown;\n};\n\n/**\n * Formats child objects or arrays to a string\n * that is preserved when sent to Sentry.\n *\n * Without this, we end up with something like this in Sentry:\n *\n * [\n *  [Object],\n *  [Object],\n *  [Object],\n *  [Object]\n * ]\n */\nexport function flattenIssue(issue: ZodIssue): SingleLevelZodIssue<ZodIssue> {\n  return {\n    ...issue,\n    path: 'path' in issue && Array.isArray(issue.path) ? issue.path.join('.') : undefined,\n    keys: 'keys' in issue ? JSON.stringify(issue.keys) : undefined,\n    unionErrors: 'unionErrors' in issue ? JSON.stringify(issue.unionErrors) : undefined,\n  };\n}\n\n/**\n * Takes ZodError issue path array and returns a flattened version as a string.\n * This makes it easier to display paths within a Sentry error message.\n *\n * Array indexes are normalized to reduce duplicate entries\n *\n * @param path ZodError issue path\n * @returns flattened path\n *\n * @example\n * flattenIssuePath([0, 'foo', 1, 'bar']) // -> '<array>.foo.<array>.bar'\n */\nexport function flattenIssuePath(path: Array<string | number>): string {\n  return path\n    .map(p => {\n      if (typeof p === 'number') {\n        return '<array>';\n      } else {\n        return p;\n      }\n    })\n    .join('.');\n}\n\n/**\n * Zod error message is a stringified version of ZodError.issues\n * This doesn't display well in the Sentry UI. Replace it with something shorter.\n */\nexport function formatIssueMessage(zodError: ZodError): string {\n  const errorKeyMap = new Set<string | number | symbol>();\n  for (const iss of zodError.issues) {\n    const issuePath = flattenIssuePath(iss.path);\n    if (issuePath.length > 0) {\n      errorKeyMap.add(issuePath);\n    }\n  }\n\n  const errorKeys = Array.from(errorKeyMap);\n  if (errorKeys.length === 0) {\n    // If there are no keys, then we're likely validating the root\n    // variable rather than a key within an object. This attempts\n    // to extract what type it was that failed to validate.\n    // For example, z.string().parse(123) would return \"string\" here.\n    let rootExpectedType = 'variable';\n    if (zodError.issues.length > 0) {\n      const iss = zodError.issues[0];\n      if (iss !== undefined && 'expected' in iss && typeof iss.expected === 'string') {\n        rootExpectedType = iss.expected;\n      }\n    }\n    return `Failed to validate ${rootExpectedType}`;\n  }\n  return `Failed to validate keys: ${truncate(errorKeys.join(', '), 100)}`;\n}\n\n/**\n * Applies ZodError issues to an event extra and replaces the error message\n */\nexport function applyZodErrorsToEvent(\n  limit: number,\n  saveZodIssuesAsAttachment: boolean = false,\n  event: Event,\n  hint: EventHint,\n): Event {\n  if (\n    !event.exception?.values ||\n    !hint.originalException ||\n    !originalExceptionIsZodError(hint.originalException) ||\n    hint.originalException.issues.length === 0\n  ) {\n    return event;\n  }\n\n  try {\n    const issuesToFlatten = saveZodIssuesAsAttachment\n      ? hint.originalException.issues\n      : hint.originalException.issues.slice(0, limit);\n    const flattenedIssues = issuesToFlatten.map(flattenIssue);\n\n    if (saveZodIssuesAsAttachment) {\n      // Sometimes having the full error details can be helpful.\n      // Attachments have much higher limits, so we can include the full list of issues.\n      if (!Array.isArray(hint.attachments)) {\n        hint.attachments = [];\n      }\n      hint.attachments.push({\n        filename: 'zod_issues.json',\n        data: JSON.stringify({\n          issues: flattenedIssues,\n        }),\n      });\n    }\n\n    return {\n      ...event,\n      exception: {\n        ...event.exception,\n        values: [\n          {\n            ...event.exception.values[0],\n            value: formatIssueMessage(hint.originalException),\n          },\n          ...event.exception.values.slice(1),\n        ],\n      },\n      extra: {\n        ...event.extra,\n        'zoderror.issues': flattenedIssues.slice(0, limit),\n      },\n    };\n  } catch (e) {\n    // Hopefully we never throw errors here, but record it\n    // with the event just in case.\n    return {\n      ...event,\n      extra: {\n        ...event.extra,\n        'zoderrors sentry integration parse error': {\n          message: 'an exception was thrown while processing ZodError within applyZodErrorsToEvent()',\n          error: e instanceof Error ? `${e.name}: ${e.message}\\n${e.stack}` : 'unknown',\n        },\n      },\n    };\n  }\n}\n\nconst _zodErrorsIntegration = ((options: ZodErrorsOptions = {}) => {\n  const limit = options.limit ?? DEFAULT_LIMIT;\n\n  return {\n    name: INTEGRATION_NAME,\n    processEvent(originalEvent, hint): Event {\n      const processedEvent = applyZodErrorsToEvent(limit, options.saveZodIssuesAsAttachment, originalEvent, hint);\n      return processedEvent;\n    },\n  };\n}) satisfies IntegrationFn;\n\n/**\n * Sentry integration to process Zod errors, making them easier to work with in Sentry.\n */\nexport const zodErrorsIntegration = defineIntegration(_zodErrorsIntegration);\n","import { getClient } from '../currentScopes';\nimport { DEBUG_BUILD } from '../debug-build';\nimport { addConsoleInstrumentationHandler } from '../instrument/console';\nimport { defineIntegration } from '../integration';\nimport { SEMANTIC_ATTRIBUTE_SENTRY_ORIGIN } from '../semanticAttributes';\nimport type { ConsoleLevel } from '../types/instrument';\nimport type { IntegrationFn } from '../types/integration';\nimport { CONSOLE_LEVELS, debug } from '../utils/debug-logger';\nimport { isPlainObject } from '../utils/is';\nimport { normalize } from '../utils/normalize';\nimport { _INTERNAL_captureLog } from './internal';\nimport { createConsoleTemplateAttributes, formatConsoleArgs, hasConsoleSubstitutions } from './utils';\n\ninterface CaptureConsoleOptions {\n  levels: ConsoleLevel[];\n}\n\nconst INTEGRATION_NAME = 'ConsoleLogs' as const;\n\nconst DEFAULT_ATTRIBUTES = {\n  [SEMANTIC_ATTRIBUTE_SENTRY_ORIGIN]: 'auto.log.console',\n};\n\nconst _consoleLoggingIntegration = ((options: Partial<CaptureConsoleOptions> = {}) => {\n  const levels = options.levels || CONSOLE_LEVELS;\n\n  return {\n    name: INTEGRATION_NAME,\n    setup(client) {\n      const { enableLogs, normalizeDepth = 3, normalizeMaxBreadth = 1_000 } = client.getOptions();\n      if (!enableLogs) {\n        DEBUG_BUILD && debug.warn('`enableLogs` is not enabled, ConsoleLogs integration disabled');\n        return;\n      }\n\n      const unsubscribe = addConsoleInstrumentationHandler(({ args, level }) => {\n        if (getClient() !== client || !levels.includes(level)) {\n          return;\n        }\n\n        const firstArg = args[0];\n        const followingArgs = args.slice(1);\n\n        if (level === 'assert') {\n          if (!firstArg) {\n            const assertionMessage =\n              followingArgs.length > 0\n                ? `Assertion failed: ${formatConsoleArgs(followingArgs, normalizeDepth, normalizeMaxBreadth)}`\n                : 'Assertion failed';\n            _INTERNAL_captureLog({ level: 'error', message: assertionMessage, attributes: DEFAULT_ATTRIBUTES });\n          }\n          return;\n        }\n\n        const isLevelLog = level === 'log';\n\n        const attributes: Record<string, unknown> = { ...DEFAULT_ATTRIBUTES };\n\n        if (isPlainObject(firstArg)) {\n          // Object-first: extract object keys as attributes, remaining args as parameters\n          Object.assign(attributes, normalize(firstArg, normalizeDepth, normalizeMaxBreadth));\n\n          const remainingArgsStartIndex = typeof args[1] === 'string' ? 2 : 1;\n          const remainingArgs = args.slice(remainingArgsStartIndex);\n\n          remainingArgs.forEach((arg, index) => {\n            attributes[`sentry.message.parameter.${index}`] = normalize(arg, normalizeDepth, normalizeMaxBreadth);\n          });\n        } else {\n          // Fallback: template + parameters when first arg is a string without substitutions\n          const shouldGenerateTemplate =\n            followingArgs.length > 0 && typeof firstArg === 'string' && !hasConsoleSubstitutions(firstArg);\n\n          if (shouldGenerateTemplate) {\n            const templateAttrs = createConsoleTemplateAttributes(firstArg, followingArgs);\n            for (const [key, value] of Object.entries(templateAttrs)) {\n              attributes[key] = key.startsWith('sentry.message.parameter.')\n                ? normalize(value, normalizeDepth, normalizeMaxBreadth)\n                : value;\n            }\n          }\n        }\n\n        _INTERNAL_captureLog({\n          level: isLevelLog ? 'info' : level,\n          message: formatConsoleArgs(args, normalizeDepth, normalizeMaxBreadth),\n          severityNumber: isLevelLog ? 10 : undefined,\n          attributes,\n        });\n      });\n\n      client.registerCleanup(unsubscribe);\n    },\n  };\n}) satisfies IntegrationFn;\n\n/**\n * Captures calls to the `console` API as logs in Sentry.\n *\n * @experimental This feature is experimental and may be changed or removed in future versions.\n *\n * By default the integration instruments `console.debug`, `console.info`, `console.warn`, `console.error`,\n * `console.log`, `console.trace`, and `console.assert`. You can use the `levels` option to customize which\n * levels are captured.\n *\n * @example\n *\n * ```ts\n * import * as Sentry from '@sentry/browser';\n *\n * Sentry.init({\n *   integrations: [Sentry.consoleLoggingIntegration({ levels: ['error', 'warn'] })],\n * });\n * ```\n */\nexport const consoleLoggingIntegration = defineIntegration(_consoleLoggingIntegration);\n","import type { LogSeverityLevel } from '../types/log';\n\n/**\n * Maps a log severity level to a log severity number.\n *\n * @see LogSeverityLevel\n */\nexport const SEVERITY_TEXT_TO_SEVERITY_NUMBER: Partial<Record<LogSeverityLevel, number>> = {\n  trace: 1,\n  debug: 5,\n  info: 9,\n  warn: 13,\n  error: 17,\n  fatal: 21,\n};\n","import type { DsnComponents } from '../types/dsn';\nimport type { LogContainerItem, LogEnvelope } from '../types/envelope';\nimport type { SerializedLog } from '../types/log';\nimport type { SdkMetadata } from '../types/sdkmetadata';\nimport { dsnToString } from '../utils/dsn';\nimport { createEnvelope } from '../utils/envelope';\nimport { isBrowser } from '../utils/isBrowser';\n\n/**\n * Creates a log container envelope item for a list of logs.\n *\n * @param items - The logs to include in the envelope.\n * @param inferUserData - If true, tells Relay to infer the end-user IP and User-Agent from the incoming request.\n *                        Only emitted as `ingest_settings` in browser environments.\n * @returns The created log container envelope item.\n */\nexport function createLogContainerEnvelopeItem(items: Array<SerializedLog>, inferUserData?: boolean): LogContainerItem {\n  const inferSetting = inferUserData ? 'auto' : 'never';\n  return [\n    {\n      type: 'log',\n      item_count: items.length,\n      content_type: 'application/vnd.sentry.items.log+json',\n    },\n    {\n      version: 2,\n      ...(isBrowser() && {\n        ingest_settings: { infer_ip: inferSetting, infer_user_agent: inferSetting },\n      }),\n      items,\n    },\n  ];\n}\n\n/**\n * Creates an envelope for a list of logs.\n *\n * Logs from multiple traces can be included in the same envelope.\n *\n * @param logs - The logs to include in the envelope.\n * @param metadata - The metadata to include in the envelope.\n * @param tunnel - The tunnel to include in the envelope.\n * @param dsn - The DSN to include in the envelope.\n * @param inferUserData - If true, tells Relay to infer the end-user IP and User-Agent from the incoming request.\n * @returns The created envelope.\n */\nexport function createLogEnvelope(\n  logs: Array<SerializedLog>,\n  metadata?: SdkMetadata,\n  tunnel?: string,\n  dsn?: DsnComponents,\n  inferUserData?: boolean,\n): LogEnvelope {\n  const headers: LogEnvelope[0] = {};\n\n  if (metadata?.sdk) {\n    headers.sdk = {\n      name: metadata.sdk.name,\n      version: metadata.sdk.version,\n    };\n  }\n\n  if (!!tunnel && !!dsn) {\n    headers.dsn = dsnToString(dsn);\n  }\n\n  return createEnvelope<LogEnvelope>(headers, [createLogContainerEnvelopeItem(logs, inferUserData)]);\n}\n","import type { Attributes } from '../attributes';\nimport { serializeAttributes } from '../attributes';\nimport { getGlobalSingleton } from '../carrier';\nimport type { Client } from '../client';\nimport { getClient, getCurrentScope, getIsolationScope } from '../currentScopes';\nimport { DEBUG_BUILD } from '../debug-build';\nimport type { Integration } from '../types/integration';\nimport type { Log, SerializedLog } from '../types/log';\nimport { consoleSandbox, debug } from '../utils/debug-logger';\nimport { isParameterizedString } from '../utils/is';\nimport { getCombinedScopeData } from '../utils/scopeData';\nimport { _getSpanForScope } from '../utils/spanOnScope';\nimport { timestampInSeconds } from '../utils/time';\nimport { getSequenceAttribute } from '../utils/timestampSequence';\nimport { _getTraceInfoFromScope } from '../utils/trace-info';\nimport { SEVERITY_TEXT_TO_SEVERITY_NUMBER } from './constants';\nimport { createLogEnvelope } from './envelope';\n\nconst MAX_LOG_BUFFER_SIZE = 100;\n\n/**\n * Sets a log attribute if the value exists and the attribute key is not already present.\n *\n * @param logAttributes - The log attributes object to modify.\n * @param key - The attribute key to set.\n * @param value - The value to set (only sets if truthy and key not present).\n * @param setEvenIfPresent - Whether to set the attribute if it is present. Defaults to true.\n */\nfunction setLogAttribute(\n  logAttributes: Record<string, unknown>,\n  key: string,\n  value: unknown,\n  setEvenIfPresent = true,\n): void {\n  if (value && (!logAttributes[key] || setEvenIfPresent)) {\n    logAttributes[key] = value;\n  }\n}\n\n/**\n * Captures a serialized log event and adds it to the log buffer for the given client.\n *\n * @param client - A client. Uses the current client if not provided.\n * @param serializedLog - The serialized log event to capture.\n *\n * @experimental This method will experience breaking changes. This is not yet part of\n * the stable Sentry SDK API and can be changed or removed without warning.\n */\nexport function _INTERNAL_captureSerializedLog(client: Client, serializedLog: SerializedLog): void {\n  const bufferMap = _getBufferMap();\n  const logBuffer = _INTERNAL_getLogBuffer(client);\n\n  if (logBuffer === undefined) {\n    bufferMap.set(client, [serializedLog]);\n  } else {\n    if (logBuffer.length >= MAX_LOG_BUFFER_SIZE) {\n      _INTERNAL_flushLogsBuffer(client, logBuffer);\n      bufferMap.set(client, [serializedLog]);\n    } else {\n      bufferMap.set(client, [...logBuffer, serializedLog]);\n    }\n  }\n}\n\n/**\n * Captures a log event and sends it to Sentry.\n *\n * @param log - The log event to capture.\n * @param scope - A scope. Uses the current scope if not provided.\n * @param client - A client. Uses the current client if not provided.\n * @param captureSerializedLog - A function to capture the serialized log.\n *\n * @experimental This method will experience breaking changes. This is not yet part of\n * the stable Sentry SDK API and can be changed or removed without warning.\n */\nexport function _INTERNAL_captureLog(\n  beforeLog: Log,\n  currentScope = getCurrentScope(),\n  captureSerializedLog: (client: Client, log: SerializedLog) => void = _INTERNAL_captureSerializedLog,\n): void {\n  const client = currentScope?.getClient() ?? getClient();\n  if (!client) {\n    DEBUG_BUILD && debug.warn('No client available to capture log.');\n    return;\n  }\n\n  const { release, environment, enableLogs = true, beforeSendLog } = client.getOptions();\n  if (!enableLogs) {\n    DEBUG_BUILD && debug.warn('logging option not enabled, log will not be captured.');\n    return;\n  }\n\n  const [, traceContext] = _getTraceInfoFromScope(client, currentScope);\n\n  const processedLogAttributes = {\n    ...beforeLog.attributes,\n  };\n\n  const {\n    user: { id, email, username },\n    attributes: scopeAttributes = {},\n  } = getCombinedScopeData(getIsolationScope(), currentScope);\n\n  setLogAttribute(processedLogAttributes, 'user.id', id, false);\n  setLogAttribute(processedLogAttributes, 'user.email', email, false);\n  setLogAttribute(processedLogAttributes, 'user.name', username, false);\n\n  setLogAttribute(processedLogAttributes, 'sentry.release', release);\n  setLogAttribute(processedLogAttributes, 'sentry.environment', environment);\n\n  const { name, version } = client.getSdkMetadata()?.sdk ?? {};\n  setLogAttribute(processedLogAttributes, 'sentry.sdk.name', name);\n  setLogAttribute(processedLogAttributes, 'sentry.sdk.version', version);\n\n  const replay = client.getIntegrationByName<\n    Integration & {\n      getReplayId: (onlyIfSampled?: boolean) => string;\n      getRecordingMode: () => 'session' | 'buffer' | undefined;\n    }\n  >('Replay');\n\n  const replayId = replay?.getReplayId(true);\n  setLogAttribute(processedLogAttributes, 'sentry.replay_id', replayId);\n\n  if (replayId && replay?.getRecordingMode() === 'buffer') {\n    // We send this so we can identify cases where the replayId is attached but the replay itself might not have been sent to Sentry\n    setLogAttribute(processedLogAttributes, 'sentry._internal.replay_is_buffering', true);\n  }\n\n  const beforeLogMessage = beforeLog.message;\n  if (isParameterizedString(beforeLogMessage)) {\n    const { __sentry_template_string__, __sentry_template_values__ = [] } = beforeLogMessage;\n    if (__sentry_template_values__?.length) {\n      processedLogAttributes['sentry.message.template'] = __sentry_template_string__;\n    }\n    __sentry_template_values__.forEach((param, index) => {\n      processedLogAttributes[`sentry.message.parameter.${index}`] = param;\n    });\n  }\n\n  const span = _getSpanForScope(currentScope);\n  // Add the parent span ID to the log attributes for trace context\n  setLogAttribute(processedLogAttributes, 'sentry.trace.parent_span_id', span?.spanContext().spanId);\n\n  const processedLog = { ...beforeLog, attributes: processedLogAttributes };\n\n  client.emit('beforeCaptureLog', processedLog);\n\n  // We need to wrap this in `consoleSandbox` to avoid recursive calls to `beforeSendLog`\n  const log = beforeSendLog ? consoleSandbox(() => beforeSendLog(processedLog)) : processedLog;\n  if (!log) {\n    client.recordDroppedEvent('before_send', 'log_item', 1);\n    DEBUG_BUILD && debug.warn('beforeSendLog returned null, log will not be captured.');\n    return;\n  }\n\n  const { level, message, attributes: logAttributes = {}, severityNumber } = log;\n\n  const timestamp = timestampInSeconds();\n  const sequenceAttr = getSequenceAttribute(timestamp);\n\n  const serializedLog: SerializedLog = {\n    timestamp,\n    level,\n    body: _removeLoneSurrogates(String(message)),\n    trace_id: traceContext?.trace_id,\n    severity_number: severityNumber ?? SEVERITY_TEXT_TO_SEVERITY_NUMBER[level],\n    attributes: sanitizeLogAttributes({\n      ...serializeAttributes(scopeAttributes),\n      ...serializeAttributes(logAttributes, true),\n      [sequenceAttr.key]: sequenceAttr.value,\n    }),\n  };\n\n  captureSerializedLog(client, serializedLog);\n\n  client.emit('afterCaptureLog', log);\n}\n\n/**\n * Flushes the logs buffer to Sentry.\n *\n * @param client - A client.\n * @param maybeLogBuffer - A log buffer. Uses the log buffer for the given client if not provided.\n *\n * @experimental This method will experience breaking changes. This is not yet part of\n * the stable Sentry SDK API and can be changed or removed without warning.\n */\nexport function _INTERNAL_flushLogsBuffer(client: Client, maybeLogBuffer?: Array<SerializedLog>): void {\n  const logBuffer = maybeLogBuffer ?? _INTERNAL_getLogBuffer(client) ?? [];\n  if (logBuffer.length === 0) {\n    return;\n  }\n\n  const clientOptions = client.getOptions();\n  const envelope = createLogEnvelope(\n    logBuffer,\n    clientOptions._metadata,\n    clientOptions.tunnel,\n    client.getDsn(),\n    client.getDataCollectionOptions().userInfo,\n  );\n\n  // Clear the log buffer after envelopes have been constructed.\n  _getBufferMap().set(client, []);\n\n  client.emit('flushLogs');\n\n  // sendEnvelope should not throw\n  // eslint-disable-next-line @typescript-eslint/no-floating-promises\n  client.sendEnvelope(envelope);\n}\n\n/**\n * Returns the log buffer for a given client.\n *\n * Exported for testing purposes.\n *\n * @param client - The client to get the log buffer for.\n * @returns The log buffer for the given client.\n */\nexport function _INTERNAL_getLogBuffer(client: Client): Array<SerializedLog> | undefined {\n  return _getBufferMap().get(client);\n}\n\nfunction _getBufferMap(): WeakMap<Client, Array<SerializedLog>> {\n  // The reference to the Client <> LogBuffer map is stored on the carrier to ensure it's always the same\n  return getGlobalSingleton('clientToLogBufferMap', () => new WeakMap<Client, Array<SerializedLog>>());\n}\n\n/**\n * Sanitizes serialized log attributes by replacing lone surrogates in both\n * keys and string values with U+FFFD.\n */\nfunction sanitizeLogAttributes(attributes: Attributes): Attributes {\n  const sanitized: Attributes = {};\n  for (const [key, attr] of Object.entries(attributes)) {\n    const sanitizedKey = _removeLoneSurrogates(key);\n    if (attr.type === 'string') {\n      sanitized[sanitizedKey] = { ...attr, value: _removeLoneSurrogates(attr.value) };\n    } else {\n      sanitized[sanitizedKey] = attr;\n    }\n  }\n  return sanitized;\n}\n\n/**\n * Replaces unpaired UTF-16 surrogates with U+FFFD (replacement character).\n *\n * Lone surrogates (U+D800–U+DFFF not part of a valid pair) cause `serde_json`\n * on the server to reject the entire log batch when they appear in\n * JSON-escaped form (e.g. `\\uD800`). Replacing them at the SDK level ensures\n * only the offending characters are lost instead of the whole payload.\n *\n * Uses the native `String.prototype.toWellFormed()` when available\n * (Node 20+, Chrome 111+, Safari 15.4+, Firefox 119+, Hermes).\n * On older runtimes without native support, returns the string as-is.\n *\n * Exported for testing\n */\nexport function _removeLoneSurrogates(str: string): string {\n  // isWellFormed/toWellFormed are ES2024 (not in our TS lib target), so we feature-detect via Object().\n  const strObj: Record<string, Function> = Object(str);\n  const isWellFormed = strObj['isWellFormed'];\n  const toWellFormed = strObj['toWellFormed'];\n  if (typeof isWellFormed === 'function' && typeof toWellFormed === 'function') {\n    return isWellFormed.call(str) ? str : toWellFormed.call(str);\n  }\n  return str;\n}\n","import type { Scope } from '../scope';\nimport type { Log, LogSeverityLevel } from '../types/log';\nimport type { ParameterizedString } from '../types/parameterize';\nimport { _INTERNAL_captureLog } from './internal';\n\n/**\n * Capture a log with the given level.\n *\n * @param level - The level of the log.\n * @param message - The message to log.\n * @param attributes - Arbitrary structured data that stores information about the log - e.g., userId: 100.\n * @param scope - The scope to capture the log with.\n * @param severityNumber - The severity number of the log.\n */\nfunction captureLog(\n  level: LogSeverityLevel,\n  message: ParameterizedString,\n  attributes?: Log['attributes'],\n  scope?: Scope,\n  severityNumber?: Log['severityNumber'],\n): void {\n  _INTERNAL_captureLog({ level, message, attributes, severityNumber }, scope);\n}\n\n/**\n * Additional metadata to capture the log with.\n */\ninterface CaptureLogMetadata {\n  scope?: Scope;\n}\n\n/**\n * @summary Capture a log with the `trace` level.\n *\n * @param message - The message to log.\n * @param attributes - Arbitrary structured data that stores information about the log - e.g., { userId: 100, route: '/dashboard' }.\n * @param metadata - additional metadata to capture the log with.\n *\n * @example\n *\n * ```\n * Sentry.logger.trace('User clicked submit button', {\n *   buttonId: 'submit-form',\n *   formId: 'user-profile',\n *   timestamp: Date.now()\n * });\n * ```\n *\n * @example With template strings\n *\n * ```\n * Sentry.logger.trace(Sentry.logger.fmt`User ${user} navigated to ${page}`, {\n *   userId: '123',\n *   sessionId: 'abc-xyz'\n * });\n * ```\n */\nexport function trace(\n  message: ParameterizedString,\n  attributes?: Log['attributes'],\n  { scope }: CaptureLogMetadata = {},\n): void {\n  captureLog('trace', message, attributes, scope);\n}\n\n/**\n * @summary Capture a log with the `debug` level.\n *\n * @param message - The message to log.\n * @param attributes - Arbitrary structured data that stores information about the log - e.g., { component: 'Header', state: 'loading' }.\n * @param metadata - additional metadata to capture the log with.\n *\n * @example\n *\n * ```\n * Sentry.logger.debug('Component mounted', {\n *   component: 'UserProfile',\n *   props: { userId: 123 },\n *   renderTime: 150\n * });\n * ```\n *\n * @example With template strings\n *\n * ```\n * Sentry.logger.debug(Sentry.logger.fmt`API request to ${endpoint} failed`, {\n *   statusCode: 404,\n *   requestId: 'req-123',\n *   duration: 250\n * });\n * ```\n */\nexport function debug(\n  message: ParameterizedString,\n  attributes?: Log['attributes'],\n  { scope }: CaptureLogMetadata = {},\n): void {\n  captureLog('debug', message, attributes, scope);\n}\n\n/**\n * @summary Capture a log with the `info` level.\n *\n * @param message - The message to log.\n * @param attributes - Arbitrary structured data that stores information about the log - e.g., { feature: 'checkout', status: 'completed' }.\n * @param metadata - additional metadata to capture the log with.\n *\n * @example\n *\n * ```\n * Sentry.logger.info('User completed checkout', {\n *   orderId: 'order-123',\n *   amount: 99.99,\n *   paymentMethod: 'credit_card'\n * });\n * ```\n *\n * @example With template strings\n *\n * ```\n * Sentry.logger.info(Sentry.logger.fmt`User ${user} updated profile picture`, {\n *   userId: 'user-123',\n *   imageSize: '2.5MB',\n *   timestamp: Date.now()\n * });\n * ```\n */\nexport function info(\n  message: ParameterizedString,\n  attributes?: Log['attributes'],\n  { scope }: CaptureLogMetadata = {},\n): void {\n  captureLog('info', message, attributes, scope);\n}\n\n/**\n * @summary Capture a log with the `warn` level.\n *\n * @param message - The message to log.\n * @param attributes - Arbitrary structured data that stores information about the log - e.g., { browser: 'Chrome', version: '91.0' }.\n * @param metadata - additional metadata to capture the log with.\n *\n * @example\n *\n * ```\n * Sentry.logger.warn('Browser compatibility issue detected', {\n *   browser: 'Safari',\n *   version: '14.0',\n *   feature: 'WebRTC',\n *   fallback: 'enabled'\n * });\n * ```\n *\n * @example With template strings\n *\n * ```\n * Sentry.logger.warn(Sentry.logger.fmt`API endpoint ${endpoint} is deprecated`, {\n *   recommendedEndpoint: '/api/v2/users',\n *   sunsetDate: '2024-12-31',\n *   clientVersion: '1.2.3'\n * });\n * ```\n */\nexport function warn(\n  message: ParameterizedString,\n  attributes?: Log['attributes'],\n  { scope }: CaptureLogMetadata = {},\n): void {\n  captureLog('warn', message, attributes, scope);\n}\n\n/**\n * @summary Capture a log with the `error` level.\n *\n * @param message - The message to log.\n * @param attributes - Arbitrary structured data that stores information about the log - e.g., { error: 'NetworkError', url: '/api/data' }.\n * @param metadata - additional metadata to capture the log with.\n *\n * @example\n *\n * ```\n * Sentry.logger.error('Failed to load user data', {\n *   error: 'NetworkError',\n *   url: '/api/users/123',\n *   statusCode: 500,\n *   retryCount: 3\n * });\n * ```\n *\n * @example With template strings\n *\n * ```\n * Sentry.logger.error(Sentry.logger.fmt`Payment processing failed for order ${orderId}`, {\n *   error: 'InsufficientFunds',\n *   amount: 100.00,\n *   currency: 'USD',\n *   userId: 'user-456'\n * });\n * ```\n */\nexport function error(\n  message: ParameterizedString,\n  attributes?: Log['attributes'],\n  { scope }: CaptureLogMetadata = {},\n): void {\n  captureLog('error', message, attributes, scope);\n}\n\n/**\n * @summary Capture a log with the `fatal` level.\n *\n * @param message - The message to log.\n * @param attributes - Arbitrary structured data that stores information about the log - e.g., { appState: 'corrupted', sessionId: 'abc-123' }.\n * @param metadata - additional metadata to capture the log with.\n *\n * @example\n *\n * ```\n * Sentry.logger.fatal('Application state corrupted', {\n *   lastKnownState: 'authenticated',\n *   sessionId: 'session-123',\n *   timestamp: Date.now(),\n *   recoveryAttempted: true\n * });\n * ```\n *\n * @example With template strings\n *\n * ```\n * Sentry.logger.fatal(Sentry.logger.fmt`Critical system failure in ${service}`, {\n *   service: 'payment-processor',\n *   errorCode: 'CRITICAL_FAILURE',\n *   affectedUsers: 150,\n *   timestamp: Date.now()\n * });\n * ```\n */\nexport function fatal(\n  message: ParameterizedString,\n  attributes?: Log['attributes'],\n  { scope }: CaptureLogMetadata = {},\n): void {\n  captureLog('fatal', message, attributes, scope);\n}\n\nexport { fmt } from '../utils/parameterize';\n","import { isPrimitive } from '../utils/is';\nimport { normalize } from '../utils/normalize';\nimport { GLOBAL_OBJ } from '../utils/worldwide';\n\ntype GlobalObjectWithUtil = typeof GLOBAL_OBJ & {\n  util: {\n    format: (...args: unknown[]) => string;\n  };\n};\n\n/**\n * Formats the given values into a string.\n *\n * @param values - The values to format.\n * @param normalizeDepth - The depth to normalize the values.\n * @param normalizeMaxBreadth - The max breadth to normalize the values.\n * @returns The formatted string.\n */\nexport function formatConsoleArgs(values: unknown[], normalizeDepth: number, normalizeMaxBreadth: number): string {\n  return 'util' in GLOBAL_OBJ && typeof (GLOBAL_OBJ as GlobalObjectWithUtil).util.format === 'function'\n    ? (GLOBAL_OBJ as GlobalObjectWithUtil).util.format(...values)\n    : safeJoinConsoleArgs(values, normalizeDepth, normalizeMaxBreadth);\n}\n\n/**\n * Joins the given values into a string.\n *\n * @param values - The values to join.\n * @param normalizeDepth - The depth to normalize the values.\n * @param normalizeMaxBreadth - The max breadth to normalize the values.\n * @returns The joined string.\n */\nexport function safeJoinConsoleArgs(values: unknown[], normalizeDepth: number, normalizeMaxBreadth: number): string {\n  return values\n    .map(value =>\n      isPrimitive(value) ? String(value) : JSON.stringify(normalize(value, normalizeDepth, normalizeMaxBreadth)),\n    )\n    .join(' ');\n}\n\n/**\n * Checks if a string contains console substitution patterns like %s, %d, %i, %f, %o, %O, %c.\n *\n * @param str - The string to check\n * @returns true if the string contains console substitution patterns\n */\nexport function hasConsoleSubstitutions(str: string): boolean {\n  // Match console substitution patterns: %s, %d, %i, %f, %o, %O, %c\n  return /%[sdifocO]/.test(str);\n}\n\n/**\n * Creates template attributes for multiple console arguments.\n *\n * @param args - The console arguments\n * @returns An object with template and parameter attributes\n */\nexport function createConsoleTemplateAttributes(firstArg: unknown, followingArgs: unknown[]): Record<string, unknown> {\n  const attributes: Record<string, unknown> = {};\n\n  // Create template with placeholders for each argument\n  const template = new Array(followingArgs.length).fill('{}').join(' ');\n  attributes['sentry.message.template'] = `${firstArg} ${template}`;\n\n  // Add each argument as a parameter\n  followingArgs.forEach((arg, index) => {\n    attributes[`sentry.message.parameter.${index}`] = arg;\n  });\n\n  return attributes;\n}\n","import type { Event } from './types/event';\nimport type { StackParser } from './types/stacktrace';\nimport { GLOBAL_OBJ } from './utils/worldwide';\n\n/** Keys are source filename/url, values are metadata objects. */\n// eslint-disable-next-line @typescript-eslint/no-explicit-any\nconst filenameMetadataMap = new Map<string, any>();\n/** Set of stack strings that have already been parsed. */\nconst parsedStacks = new Set<string>();\n\n/**\n * Builds a map of filenames to module metadata from the global _sentryModuleMetadata object.\n * This is useful for forwarding metadata from web workers to the main thread.\n *\n * @param parser - Stack parser to use for extracting filenames from stack traces\n * @returns A map of filename to metadata object\n */\n// eslint-disable-next-line @typescript-eslint/no-explicit-any\nexport function getFilenameToMetadataMap(parser: StackParser): Record<string, any> {\n  if (!GLOBAL_OBJ._sentryModuleMetadata) {\n    return {};\n  }\n\n  // eslint-disable-next-line @typescript-eslint/no-explicit-any\n  const filenameMap: Record<string, any> = {};\n\n  for (const stack of Object.keys(GLOBAL_OBJ._sentryModuleMetadata)) {\n    const metadata = GLOBAL_OBJ._sentryModuleMetadata[stack];\n    const frames = parser(stack);\n\n    for (const frame of frames.reverse()) {\n      if (frame.filename) {\n        filenameMap[frame.filename] = metadata;\n        break;\n      }\n    }\n  }\n\n  return filenameMap;\n}\n\nfunction ensureMetadataStacksAreParsed(parser: StackParser): void {\n  if (!GLOBAL_OBJ._sentryModuleMetadata) {\n    return;\n  }\n\n  for (const stack of Object.keys(GLOBAL_OBJ._sentryModuleMetadata)) {\n    const metadata = GLOBAL_OBJ._sentryModuleMetadata[stack];\n\n    if (parsedStacks.has(stack)) {\n      continue;\n    }\n\n    // Ensure this stack doesn't get parsed again\n    parsedStacks.add(stack);\n\n    const frames = parser(stack);\n\n    // Go through the frames starting from the top of the stack and find the first one with a filename\n    for (const frame of frames.reverse()) {\n      if (frame.filename) {\n        // Save the metadata for this filename\n        filenameMetadataMap.set(frame.filename, metadata);\n        break;\n      }\n    }\n  }\n}\n\n/**\n * Retrieve metadata for a specific JavaScript file URL.\n *\n * Metadata is injected by the Sentry bundler plugins using the `_experiments.moduleMetadata` config option.\n */\n// eslint-disable-next-line @typescript-eslint/no-explicit-any\nexport function getMetadataForUrl(parser: StackParser, filename: string): any | undefined {\n  ensureMetadataStacksAreParsed(parser);\n  return filenameMetadataMap.get(filename);\n}\n\n/**\n * Adds metadata to stack frames.\n *\n * Metadata is injected by the Sentry bundler plugins using the `_experiments.moduleMetadata` config option.\n */\nexport function addMetadataToStackFrames(parser: StackParser, event: Event): void {\n  event.exception?.values?.forEach(exception => {\n    exception.stacktrace?.frames?.forEach(frame => {\n      if (!frame.filename || frame.module_metadata) {\n        return;\n      }\n\n      const metadata = getMetadataForUrl(parser, frame.filename);\n\n      if (metadata) {\n        frame.module_metadata = metadata;\n      }\n    });\n  });\n}\n\n/**\n * Strips metadata from stack frames.\n */\nexport function stripMetadataFromStackFrames(event: Event): void {\n  event.exception?.values?.forEach(exception => {\n    exception.stacktrace?.frames?.forEach(frame => {\n      delete frame.module_metadata;\n    });\n  });\n}\n","import type { DsnComponents } from '../types/dsn';\nimport type { MetricContainerItem, MetricEnvelope } from '../types/envelope';\nimport type { SerializedMetric } from '../types/metric';\nimport type { SdkMetadata } from '../types/sdkmetadata';\nimport { dsnToString } from '../utils/dsn';\nimport { createEnvelope } from '../utils/envelope';\nimport { isBrowser } from '../utils/isBrowser';\n\n/**\n * Creates a metric container envelope item for a list of metrics.\n *\n * @param items - The metrics to include in the envelope.\n * @param inferUserData - If true, tells Relay to infer the end-user IP and User-Agent from the incoming request.\n *                        Only emitted as `ingest_settings` in browser environments.\n * @returns The created metric container envelope item.\n */\nexport function createMetricContainerEnvelopeItem(\n  items: Array<SerializedMetric>,\n  inferUserData?: boolean,\n): MetricContainerItem {\n  const inferSetting = inferUserData ? 'auto' : 'never';\n  return [\n    {\n      type: 'trace_metric',\n      item_count: items.length,\n      content_type: 'application/vnd.sentry.items.trace-metric+json',\n    } as MetricContainerItem[0],\n    {\n      version: 2,\n      ...(isBrowser() && {\n        ingest_settings: { infer_ip: inferSetting, infer_user_agent: inferSetting },\n      }),\n      items,\n    },\n  ];\n}\n\n/**\n * Creates an envelope for a list of metrics.\n *\n * Metrics from multiple traces can be included in the same envelope.\n *\n * @param metrics - The metrics to include in the envelope.\n * @param metadata - The metadata to include in the envelope.\n * @param tunnel - The tunnel to include in the envelope.\n * @param dsn - The DSN to include in the envelope.\n * @param inferUserData - If true, tells Relay to infer the end-user IP and User-Agent from the incoming request.\n * @returns The created envelope.\n */\nexport function createMetricEnvelope(\n  metrics: Array<SerializedMetric>,\n  metadata?: SdkMetadata,\n  tunnel?: string,\n  dsn?: DsnComponents,\n  inferUserData?: boolean,\n): MetricEnvelope {\n  const headers: MetricEnvelope[0] = {};\n\n  if (metadata?.sdk) {\n    headers.sdk = {\n      name: metadata.sdk.name,\n      version: metadata.sdk.version,\n    };\n  }\n\n  if (!!tunnel && !!dsn) {\n    headers.dsn = dsnToString(dsn);\n  }\n\n  return createEnvelope<MetricEnvelope>(headers, [createMetricContainerEnvelopeItem(metrics, inferUserData)]);\n}\n","import { type RawAttributes, serializeAttributes } from '../attributes';\nimport { getGlobalSingleton } from '../carrier';\nimport type { Client } from '../client';\nimport { getClient, getCurrentScope, getIsolationScope } from '../currentScopes';\nimport { DEBUG_BUILD } from '../debug-build';\nimport type { Scope } from '../scope';\nimport type { Integration } from '../types/integration';\nimport type { Metric, SerializedMetric } from '../types/metric';\nimport type { User } from '../types/user';\nimport { debug } from '../utils/debug-logger';\nimport { getCombinedScopeData } from '../utils/scopeData';\nimport { _getSpanForScope } from '../utils/spanOnScope';\nimport { timestampInSeconds } from '../utils/time';\nimport { getSequenceAttribute } from '../utils/timestampSequence';\nimport { _getTraceInfoFromScope } from '../utils/trace-info';\nimport { createMetricEnvelope } from './envelope';\n\nconst MAX_METRIC_BUFFER_SIZE = 1000;\n\n/**\n * Sets a metric attribute if the value exists and the attribute key is not already present.\n *\n * @param metricAttributes - The metric attributes object to modify.\n * @param key - The attribute key to set.\n * @param value - The value to set (only sets if truthy and key not present).\n * @param setEvenIfPresent - Whether to set the attribute if it is present. Defaults to true.\n */\nfunction setMetricAttribute(\n  metricAttributes: Record<string, unknown>,\n  key: string,\n  value: unknown,\n  setEvenIfPresent = true,\n): void {\n  if (value && (setEvenIfPresent || !(key in metricAttributes))) {\n    metricAttributes[key] = value;\n  }\n}\n\n/**\n * Captures a serialized metric event and adds it to the metric buffer for the given client.\n *\n * @param client - A client. Uses the current client if not provided.\n * @param serializedMetric - The serialized metric event to capture.\n *\n * @experimental This method will experience breaking changes. This is not yet part of\n * the stable Sentry SDK API and can be changed or removed without warning.\n */\nexport function _INTERNAL_captureSerializedMetric(client: Client, serializedMetric: SerializedMetric): void {\n  const bufferMap = _getBufferMap();\n  const metricBuffer = _INTERNAL_getMetricBuffer(client);\n\n  if (metricBuffer === undefined) {\n    bufferMap.set(client, [serializedMetric]);\n  } else {\n    if (metricBuffer.length >= MAX_METRIC_BUFFER_SIZE) {\n      _INTERNAL_flushMetricsBuffer(client, metricBuffer);\n      bufferMap.set(client, [serializedMetric]);\n    } else {\n      bufferMap.set(client, [...metricBuffer, serializedMetric]);\n    }\n  }\n}\n\n/**\n * Options for capturing a metric internally.\n */\nexport interface InternalCaptureMetricOptions {\n  /**\n   * The scope to capture the metric with.\n   */\n  scope?: Scope;\n\n  /**\n   * A function to capture the serialized metric.\n   */\n  captureSerializedMetric?: (client: Client, metric: SerializedMetric) => void;\n}\n\n/**\n * Enriches metric with all contextual attributes (user, SDK metadata, replay, etc.)\n */\nfunction _enrichMetricAttributes(beforeMetric: Metric, client: Client, user: User): Metric {\n  const { release, environment } = client.getOptions();\n\n  const processedMetricAttributes = {\n    ...beforeMetric.attributes,\n  };\n\n  // Add user attributes\n  setMetricAttribute(processedMetricAttributes, 'user.id', user.id, false);\n  setMetricAttribute(processedMetricAttributes, 'user.email', user.email, false);\n  setMetricAttribute(processedMetricAttributes, 'user.name', user.username, false);\n\n  // Add Sentry metadata\n  setMetricAttribute(processedMetricAttributes, 'sentry.release', release);\n  setMetricAttribute(processedMetricAttributes, 'sentry.environment', environment);\n\n  // Add SDK metadata\n  const { name, version } = client.getSdkMetadata()?.sdk ?? {};\n  setMetricAttribute(processedMetricAttributes, 'sentry.sdk.name', name);\n  setMetricAttribute(processedMetricAttributes, 'sentry.sdk.version', version);\n\n  // Add replay metadata\n  const replay = client.getIntegrationByName<\n    Integration & {\n      getReplayId: (onlyIfSampled?: boolean) => string;\n      getRecordingMode: () => 'session' | 'buffer' | undefined;\n    }\n  >('Replay');\n\n  const replayId = replay?.getReplayId(true);\n  setMetricAttribute(processedMetricAttributes, 'sentry.replay_id', replayId);\n\n  if (replayId && replay?.getRecordingMode() === 'buffer') {\n    setMetricAttribute(processedMetricAttributes, 'sentry._internal.replay_is_buffering', true);\n  }\n\n  return {\n    ...beforeMetric,\n    attributes: processedMetricAttributes,\n  };\n}\n\n/**\n * Creates a serialized metric ready to be sent to Sentry.\n */\nfunction _buildSerializedMetric(\n  metric: Metric,\n  client: Client,\n  currentScope: Scope,\n  scopeAttributes: RawAttributes<Record<string, unknown>> | undefined,\n): SerializedMetric {\n  // Get trace context\n  const [, traceContext] = _getTraceInfoFromScope(client, currentScope);\n  const span = _getSpanForScope(currentScope);\n  const traceId = span ? span.spanContext().traceId : traceContext?.trace_id;\n  const spanId = span ? span.spanContext().spanId : undefined;\n\n  const timestamp = timestampInSeconds();\n  const sequenceAttr = getSequenceAttribute(timestamp);\n\n  return {\n    timestamp,\n    trace_id: traceId ?? '',\n    span_id: spanId,\n    name: metric.name,\n    type: metric.type,\n    unit: metric.unit,\n    value: metric.value,\n    attributes: {\n      ...serializeAttributes(scopeAttributes),\n      ...serializeAttributes(metric.attributes, 'skip-undefined'),\n      [sequenceAttr.key]: sequenceAttr.value,\n    },\n  };\n}\n\n/**\n * Captures a metric event and sends it to Sentry.\n *\n * @param metric - The metric event to capture.\n * @param options - Options for capturing the metric.\n *\n * @experimental This method will experience breaking changes. This is not yet part of\n * the stable Sentry SDK API and can be changed or removed without warning.\n */\nexport function _INTERNAL_captureMetric(beforeMetric: Metric, options?: InternalCaptureMetricOptions): void {\n  const currentScope = options?.scope ?? getCurrentScope();\n  const captureSerializedMetric = options?.captureSerializedMetric ?? _INTERNAL_captureSerializedMetric;\n  const client = currentScope?.getClient() ?? getClient();\n  if (!client) {\n    DEBUG_BUILD && debug.warn('No client available to capture metric.');\n    return;\n  }\n\n  const { _experiments, enableMetrics, beforeSendMetric } = client.getOptions();\n\n  // todo(v11): Remove the experimental flag\n  // eslint-disable-next-line typescript/no-deprecated\n  const metricsEnabled = enableMetrics ?? _experiments?.enableMetrics ?? true;\n\n  if (!metricsEnabled) {\n    DEBUG_BUILD && debug.warn('metrics option not enabled, metric will not be captured.');\n    return;\n  }\n\n  // Enrich metric with contextual attributes\n  const { user, attributes: scopeAttributes } = getCombinedScopeData(getIsolationScope(), currentScope);\n  const enrichedMetric = _enrichMetricAttributes(beforeMetric, client, user);\n\n  client.emit('processMetric', enrichedMetric);\n\n  // todo(v11): Remove the experimental `beforeSendMetric`\n  // eslint-disable-next-line typescript/no-deprecated\n  const beforeSendCallback = beforeSendMetric || _experiments?.beforeSendMetric;\n  const processedMetric = beforeSendCallback ? beforeSendCallback(enrichedMetric) : enrichedMetric;\n\n  if (!processedMetric) {\n    DEBUG_BUILD && debug.log('`beforeSendMetric` returned `null`, will not send metric.');\n    return;\n  }\n\n  const serializedMetric = _buildSerializedMetric(processedMetric, client, currentScope, scopeAttributes);\n\n  DEBUG_BUILD && debug.log('[Metric]', serializedMetric);\n\n  captureSerializedMetric(client, serializedMetric);\n\n  client.emit('afterCaptureMetric', processedMetric);\n}\n\n/**\n * Flushes the metrics buffer to Sentry.\n *\n * @param client - A client.\n * @param maybeMetricBuffer - A metric buffer. Uses the metric buffer for the given client if not provided.\n *\n * @experimental This method will experience breaking changes. This is not yet part of\n * the stable Sentry SDK API and can be changed or removed without warning.\n */\nexport function _INTERNAL_flushMetricsBuffer(client: Client, maybeMetricBuffer?: Array<SerializedMetric>): void {\n  const metricBuffer = maybeMetricBuffer ?? _INTERNAL_getMetricBuffer(client) ?? [];\n  if (metricBuffer.length === 0) {\n    return;\n  }\n\n  const clientOptions = client.getOptions();\n  const envelope = createMetricEnvelope(\n    metricBuffer,\n    clientOptions._metadata,\n    clientOptions.tunnel,\n    client.getDsn(),\n    client.getDataCollectionOptions().userInfo,\n  );\n\n  // Clear the metric buffer after envelopes have been constructed.\n  _getBufferMap().set(client, []);\n\n  client.emit('flushMetrics');\n\n  // sendEnvelope should not throw\n  // eslint-disable-next-line @typescript-eslint/no-floating-promises\n  client.sendEnvelope(envelope);\n}\n\n/**\n * Returns the metric buffer for a given client.\n *\n * Exported for testing purposes.\n *\n * @param client - The client to get the metric buffer for.\n * @returns The metric buffer for the given client.\n */\nexport function _INTERNAL_getMetricBuffer(client: Client): Array<SerializedMetric> | undefined {\n  return _getBufferMap().get(client);\n}\n\nfunction _getBufferMap(): WeakMap<Client, Array<SerializedMetric>> {\n  // The reference to the Client <> MetricBuffer map is stored on the carrier to ensure it's always the same\n  return getGlobalSingleton('clientToMetricBufferMap', () => new WeakMap<Client, Array<SerializedMetric>>());\n}\n","import type { Scope } from '../scope';\nimport type { Metric, MetricType } from '../types/metric';\nimport { _INTERNAL_captureMetric } from './internal';\n\n/**\n * Options for capturing a metric.\n */\nexport interface MetricOptions {\n  /**\n   * The unit of the metric value.\n   */\n  unit?: string;\n\n  /**\n   * Arbitrary structured data that stores information about the metric.\n   */\n  attributes?: Metric['attributes'];\n\n  /**\n   * The scope to capture the metric with.\n   */\n  scope?: Scope;\n}\n\n/**\n * Capture a metric with the given type, name, and value.\n *\n * @param type - The type of the metric.\n * @param name - The name of the metric.\n * @param value - The value of the metric.\n * @param options - Options for capturing the metric.\n */\nfunction captureMetric(type: MetricType, name: string, value: number, options?: MetricOptions): void {\n  _INTERNAL_captureMetric(\n    { type, name, value, unit: options?.unit, attributes: options?.attributes },\n    { scope: options?.scope },\n  );\n}\n\n/**\n * @summary Increment a counter metric.\n *\n * @param name - The name of the counter metric.\n * @param value - The value to increment by (defaults to 1).\n * @param options - Options for capturing the metric.\n *\n * @example\n *\n * ```\n * Sentry.metrics.count('api.requests', 1, {\n *   attributes: {\n *     endpoint: '/api/users',\n *     method: 'GET',\n *     status: 200\n *   }\n * });\n * ```\n *\n * @example With custom value\n *\n * ```\n * Sentry.metrics.count('items.processed', 5, {\n *   attributes: {\n *     processor: 'batch-processor',\n *     queue: 'high-priority'\n *   }\n * });\n * ```\n */\nexport function count(name: string, value: number = 1, options?: MetricOptions): void {\n  captureMetric('counter', name, value, options);\n}\n\n/**\n * @summary Set a gauge metric to a specific value.\n *\n * @param name - The name of the gauge metric.\n * @param value - The current value of the gauge.\n * @param options - Options for capturing the metric.\n *\n * @example\n *\n * ```\n * Sentry.metrics.gauge('memory.usage', 1024, {\n *   unit: 'megabyte',\n *   attributes: {\n *     process: 'web-server',\n *     region: 'us-east-1'\n *   }\n * });\n * ```\n *\n * @example Without unit\n *\n * ```\n * Sentry.metrics.gauge('active.connections', 42, {\n *   attributes: {\n *     server: 'api-1',\n *     protocol: 'websocket'\n *   }\n * });\n * ```\n */\nexport function gauge(name: string, value: number, options?: MetricOptions): void {\n  captureMetric('gauge', name, value, options);\n}\n\n/**\n * @summary Record a value in a distribution metric.\n *\n * @param name - The name of the distribution metric.\n * @param value - The value to record in the distribution.\n * @param options - Options for capturing the metric.\n *\n * @example\n *\n * ```\n * Sentry.metrics.distribution('task.duration', 500, {\n *   unit: 'millisecond',\n *   attributes: {\n *     task: 'data-processing',\n *     priority: 'high'\n *   }\n * });\n * ```\n *\n * @example Without unit\n *\n * ```\n * Sentry.metrics.distribution('batch.size', 100, {\n *   attributes: {\n *     processor: 'batch-1',\n *     type: 'async'\n *   }\n * });\n * ```\n */\nexport function distribution(name: string, value: number, options?: MetricOptions): void {\n  captureMetric('distribution', name, value, options);\n}\n","import { getClient, getCurrentScope, withIsolationScope } from './currentScopes';\nimport { DEBUG_BUILD } from './debug-build';\nimport { startNewTrace } from './tracing/trace';\nimport type { CheckIn, FinishedCheckIn, MonitorConfig } from './types/checkin';\nimport { debug } from './utils/debug-logger';\nimport { isThenable } from './utils/is';\nimport { uuid4 } from './utils/misc';\nimport { timestampInSeconds } from './utils/time';\nimport { isContinuingTrace } from './utils/tracing';\n\n/**\n * Wraps a callback with a cron monitor check in. The check in will be sent to Sentry when the callback finishes.\n *\n * @param monitorSlug The distinct slug of the monitor.\n * @param callback Callback to be monitored\n * @param upsertMonitorConfig An optional object that describes a monitor config. Use this if you want\n * to create a monitor automatically when sending a check in.\n */\nexport function withMonitor<T>(\n  monitorSlug: CheckIn['monitorSlug'],\n  callback: () => T,\n  upsertMonitorConfig?: MonitorConfig,\n): T {\n  function runCallback(): T {\n    const checkInId = captureCheckIn({ monitorSlug, status: 'in_progress' }, upsertMonitorConfig);\n    const now = timestampInSeconds();\n\n    function finishCheckIn(status: FinishedCheckIn['status']): void {\n      captureCheckIn({ monitorSlug, status, checkInId, duration: timestampInSeconds() - now });\n    }\n    // Default behavior without isolateTrace\n    let maybePromiseResult: T;\n    try {\n      maybePromiseResult = callback();\n    } catch (e) {\n      finishCheckIn('error');\n      throw e;\n    }\n\n    if (isThenable(maybePromiseResult)) {\n      return maybePromiseResult.then(\n        r => {\n          finishCheckIn('ok');\n          return r;\n        },\n        e => {\n          finishCheckIn('error');\n          throw e;\n        },\n      ) as T;\n    }\n    finishCheckIn('ok');\n\n    return maybePromiseResult;\n  }\n\n  // `withIsolationScope` gives the fork its own trace, so unless `isolateTrace` is set we restore the\n  // parent's trace below. Copied rather than aliased: sharing the object with the parent scope would\n  // let in-place writes inside the callback (e.g. the HTTP server integration assigning\n  // `propagationSpanId`) rewrite the parent's trace.\n  const oldPropagationContext = { ...getCurrentScope().getPropagationContext() };\n\n  return withIsolationScope(() => {\n    if (upsertMonitorConfig?.isolateTrace) {\n      return startNewTrace(runCallback);\n    }\n\n    // Mirrors the reset condition in the async context strategies: only a fork that was given a fresh\n    // trace needs the parent's trace put back.\n    const scope = getCurrentScope();\n    if (!isContinuingTrace(scope.getPropagationContext())) {\n      scope.setPropagationContext(oldPropagationContext);\n    }\n\n    return runCallback();\n  });\n}\n\n/**\n * Create a cron monitor check in and send it to Sentry.\n *\n * @param checkIn An object that describes a check in.\n * @param upsertMonitorConfig An optional object that describes a monitor config. Use this if you want\n * to create a monitor automatically when sending a check in.\n */\nexport function captureCheckIn(checkIn: CheckIn, upsertMonitorConfig?: MonitorConfig): string {\n  const scope = getCurrentScope();\n  const client = getClient();\n  if (!client) {\n    DEBUG_BUILD && debug.warn('Cannot capture check-in. No client defined.');\n  } else if (!client.captureCheckIn) {\n    DEBUG_BUILD && debug.warn('Cannot capture check-in. Client does not support sending check-ins.');\n  } else {\n    return client.captureCheckIn(checkIn, upsertMonitorConfig, scope);\n  }\n\n  return uuid4();\n}\n","import { getClient } from './currentScopes';\nimport { DEBUG_BUILD } from './debug-build';\nimport type { Profiler, ProfilingIntegration } from './types/profiling';\nimport { debug } from './utils/debug-logger';\n\nfunction isProfilingIntegrationWithProfiler(\n  integration: ProfilingIntegration | undefined,\n): integration is ProfilingIntegration {\n  return (\n    !!integration &&\n    typeof integration['_profiler'] !== 'undefined' &&\n    typeof integration['_profiler']['start'] === 'function' &&\n    typeof integration['_profiler']['stop'] === 'function'\n  );\n}\n/**\n * Starts the Sentry continuous profiler.\n * This mode is exclusive with the transaction profiler and will only work if the profilesSampleRate is set to a falsy value.\n * In continuous profiling mode, the profiler will keep reporting profile chunks to Sentry until it is stopped, which allows for continuous profiling of the application.\n */\nfunction startProfiler(): void {\n  const client = getClient();\n  if (!client) {\n    DEBUG_BUILD && debug.warn('No Sentry client available, profiling is not started');\n    return;\n  }\n\n  const integration = client.getIntegrationByName<ProfilingIntegration>('ProfilingIntegration');\n\n  if (!integration) {\n    DEBUG_BUILD && debug.warn('ProfilingIntegration is not available');\n    return;\n  }\n\n  if (!isProfilingIntegrationWithProfiler(integration)) {\n    DEBUG_BUILD && debug.warn('Profiler is not available on profiling integration.');\n    return;\n  }\n\n  integration._profiler.start();\n}\n\n/**\n * Stops the Sentry continuous profiler.\n * Calls to stop will stop the profiler and flush the currently collected profile data to Sentry.\n */\nfunction stopProfiler(): void {\n  const client = getClient();\n  if (!client) {\n    DEBUG_BUILD && debug.warn('No Sentry client available, profiling is not started');\n    return;\n  }\n\n  const integration = client.getIntegrationByName<ProfilingIntegration>('ProfilingIntegration');\n  if (!integration) {\n    DEBUG_BUILD && debug.warn('ProfilingIntegration is not available');\n    return;\n  }\n\n  if (!isProfilingIntegrationWithProfiler(integration)) {\n    DEBUG_BUILD && debug.warn('Profiler is not available on profiling integration.');\n    return;\n  }\n\n  integration._profiler.stop();\n}\n\n/**\n * Profiler namespace for controlling the profiler in 'manual' mode.\n *\n * Requires the `nodeProfilingIntegration` from the `@sentry/profiling-node` package.\n */\nexport const profiler: Profiler = {\n  startProfiler,\n  stopProfiler,\n};\n","/* eslint-disable max-lines */\nimport type { AttributeObject, RawAttribute, RawAttributes } from './attributes';\nimport type { Client } from './client';\nimport { DEBUG_BUILD } from './debug-build';\nimport { updateSession } from './session';\nimport type { Attachment } from './types/attachment';\nimport type { Breadcrumb } from './types/breadcrumb';\nimport type { Context, Contexts } from './types/context';\nimport type { DynamicSamplingContext } from './types/envelope';\nimport type { Event, EventHint } from './types/event';\nimport type { EventProcessor } from './types/eventprocessor';\nimport type { Extra, Extras } from './types/extra';\nimport type { Primitive } from './types/misc';\nimport type { RequestEventData } from './types/request';\nimport type { Session } from './types/session';\nimport type { SeverityLevel } from './types/severity';\nimport type { Span } from './types/span';\nimport type { PropagationContext } from './types/tracing';\nimport type { User } from './types/user';\nimport { debug } from './utils/debug-logger';\nimport { isPlainObject } from './utils/is';\nimport { merge } from './utils/merge';\nimport { uuid4 } from './utils/misc';\nimport { generateTraceId } from './utils/propagationContext';\nimport { safeMathRandom } from './utils/randomSafeContext';\nimport { _getSpanForScope, _setSpanForScope } from './utils/spanOnScope';\nimport { truncate } from './utils/string';\nimport { dateTimestampInSeconds } from './utils/time';\n\n/**\n * Default value for maximum number of breadcrumbs added to an event.\n */\nconst DEFAULT_MAX_BREADCRUMBS = 100;\n\n/**\n * A context to be used for capturing an event.\n * This can either be a Scope, or a partial ScopeContext,\n * or a callback that receives the current scope and returns a new scope to use.\n */\nexport type CaptureContext = Scope | Partial<ScopeContext> | ((scope: Scope) => Scope);\n\n/**\n * Data that can be converted to a Scope.\n */\nexport interface ScopeContext {\n  user: User;\n  level: SeverityLevel;\n  extra: Extras;\n  contexts: Contexts;\n  tags: { [key: string]: Primitive };\n  attributes?: RawAttributes<Record<string, unknown>>;\n  fingerprint: string[];\n  propagationContext: PropagationContext;\n  conversationId?: string;\n}\n\nexport interface SdkProcessingMetadata {\n  [key: string]: unknown;\n  requestSession?: {\n    status: 'ok' | 'errored' | 'crashed';\n  };\n  normalizedRequest?: RequestEventData;\n  dynamicSamplingContext?: Partial<DynamicSamplingContext>;\n  capturedSpanScope?: Scope;\n  capturedSpanIsolationScope?: Scope;\n  spanCountBeforeProcessing?: number;\n  ipAddress?: string;\n}\n\n/**\n * Normalized data of the Scope, ready to be used.\n */\nexport interface ScopeData {\n  eventProcessors: EventProcessor[];\n  breadcrumbs: Breadcrumb[];\n  user: User;\n  tags: { [key: string]: Primitive };\n  // TODO(v11): Make this a required field (could be subtly breaking if we did it today)\n  attributes?: RawAttributes<Record<string, unknown>>;\n  extra: Extras;\n  contexts: Contexts;\n  attachments: Attachment[];\n  propagationContext: PropagationContext;\n  sdkProcessingMetadata: SdkProcessingMetadata;\n  fingerprint: string[];\n  level?: SeverityLevel;\n  transactionName?: string;\n  span?: Span;\n  conversationId?: string;\n}\n\n/**\n * Holds additional event information.\n */\nexport class Scope {\n  /** Flag if notifying is happening. */\n  protected _notifyingListeners: boolean;\n\n  /** Callback for client to receive scope changes. */\n  protected _scopeListeners: Array<(scope: Scope) => void>;\n\n  /** Callback list that will be called during event processing. */\n  protected _eventProcessors: EventProcessor[];\n\n  /** Array of breadcrumbs. */\n  protected _breadcrumbs: Breadcrumb[];\n\n  /** User */\n  protected _user: User;\n\n  /** Tags */\n  protected _tags: { [key: string]: Primitive };\n\n  /** Attributes */\n  protected _attributes: RawAttributes<Record<string, unknown>>;\n\n  /** Extra */\n  protected _extra: Extras;\n\n  /** Contexts */\n  protected _contexts: Contexts;\n\n  /** Attachments */\n  protected _attachments: Attachment[];\n\n  /** Propagation Context for distributed tracing */\n  protected _propagationContext: PropagationContext;\n\n  /**\n   * A place to stash data which is needed at some point in the SDK's event processing pipeline but which shouldn't get\n   * sent to Sentry\n   */\n  protected _sdkProcessingMetadata: SdkProcessingMetadata;\n\n  /** Fingerprint */\n  protected _fingerprint?: string[];\n\n  /** Severity */\n  protected _level?: SeverityLevel;\n\n  /**\n   * Transaction Name\n   *\n   * IMPORTANT: The transaction name on the scope has nothing to do with root spans/transaction objects.\n   * It's purpose is to assign a transaction to the scope that's added to non-transaction events.\n   */\n  protected _transactionName?: string;\n\n  /** Session */\n  protected _session?: Session;\n\n  /** The client on this scope */\n  protected _client?: Client;\n\n  /** Contains the last event id of a captured event.  */\n  protected _lastEventId?: string;\n\n  /** Conversation ID */\n  protected _conversationId?: string;\n\n  // NOTE: Any field which gets added here should get added not only to the constructor but also to the `clone` method.\n\n  public constructor() {\n    this._notifyingListeners = false;\n    this._scopeListeners = [];\n    this._eventProcessors = [];\n    this._breadcrumbs = [];\n    this._attachments = [];\n    this._user = {};\n    this._tags = {};\n    this._attributes = {};\n    this._extra = {};\n    this._contexts = {};\n    this._sdkProcessingMetadata = {};\n    this._propagationContext = {\n      traceId: generateTraceId(),\n      sampleRand: safeMathRandom(),\n    };\n  }\n\n  /**\n   * Clone all data from this scope into a new scope.\n   */\n  public clone(): Scope {\n    const newScope = new Scope();\n    newScope._breadcrumbs = [...this._breadcrumbs];\n    newScope._tags = { ...this._tags };\n    newScope._attributes = { ...this._attributes };\n    newScope._extra = { ...this._extra };\n    newScope._contexts = { ...this._contexts };\n    if (this._contexts.flags) {\n      // We need to copy the `values` array so insertions on a cloned scope\n      // won't affect the original array.\n      newScope._contexts.flags = {\n        values: [...this._contexts.flags.values],\n      };\n    }\n\n    newScope._user = this._user;\n    newScope._level = this._level;\n    newScope._session = this._session;\n    newScope._transactionName = this._transactionName;\n    newScope._fingerprint = this._fingerprint;\n    newScope._eventProcessors = [...this._eventProcessors];\n    newScope._attachments = [...this._attachments];\n    newScope._sdkProcessingMetadata = { ...this._sdkProcessingMetadata };\n    newScope._propagationContext = { ...this._propagationContext };\n    newScope._client = this._client;\n    newScope._lastEventId = this._lastEventId;\n    newScope._conversationId = this._conversationId;\n\n    _setSpanForScope(newScope, _getSpanForScope(this));\n\n    return newScope;\n  }\n\n  /**\n   * Update the client assigned to this scope.\n   * Note that not every scope will have a client assigned - isolation scopes & the global scope will generally not have a client,\n   * as well as manually created scopes.\n   */\n  public setClient(client: Client | undefined): void {\n    this._client = client;\n  }\n\n  /**\n   * Set the ID of the last captured error event.\n   * This is generally only captured on the isolation scope.\n   */\n  public setLastEventId(lastEventId: string | undefined): void {\n    this._lastEventId = lastEventId;\n  }\n\n  /**\n   * Get the client assigned to this scope.\n   */\n  public getClient<C extends Client>(): C | undefined {\n    return this._client as C | undefined;\n  }\n\n  /**\n   * Get the ID of the last captured error event.\n   * This is generally only available on the isolation scope.\n   */\n  public lastEventId(): string | undefined {\n    return this._lastEventId;\n  }\n\n  /**\n   * @inheritDoc\n   */\n  public addScopeListener(callback: (scope: Scope) => void): void {\n    this._scopeListeners.push(callback);\n  }\n\n  /**\n   * Add an event processor that will be called before an event is sent.\n   */\n  public addEventProcessor(callback: EventProcessor): this {\n    this._eventProcessors.push(callback);\n    return this;\n  }\n\n  /**\n   * Set the user for this scope.\n   * Set to `null` to unset the user.\n   */\n  public setUser(user: User | null): this {\n    // If null is passed we want to unset everything, but still define keys,\n    // so that later down in the pipeline any existing values are cleared.\n    this._user = user || {\n      email: undefined,\n      id: undefined,\n      ip_address: undefined,\n      username: undefined,\n    };\n\n    if (this._session) {\n      updateSession(this._session, { user });\n    }\n\n    this._notifyScopeListeners();\n    return this;\n  }\n\n  /**\n   * Get the user from this scope.\n   */\n  public getUser(): User | undefined {\n    return this._user;\n  }\n\n  /**\n   * Set the conversation ID for this scope.\n   * Set to `null` to unset the conversation ID.\n   */\n  public setConversationId(conversationId: string | null | undefined): this {\n    this._conversationId = conversationId || undefined;\n    this._notifyScopeListeners();\n    return this;\n  }\n\n  /**\n   * Set an object that will be merged into existing tags on the scope,\n   * and will be sent as tags data with the event.\n   */\n  public setTags(tags: { [key: string]: Primitive }): this {\n    this._tags = {\n      ...this._tags,\n      ...tags,\n    };\n    this._notifyScopeListeners();\n    return this;\n  }\n\n  /**\n   * Set a single tag that will be sent as tags data with the event.\n   */\n  public setTag(key: string, value: Primitive): this {\n    return this.setTags({ [key]: value });\n  }\n\n  /**\n   * Sets attributes onto the scope.\n   *\n   * These attributes are applied to logs, metrics and streamed spans.\n   *\n   * Supported attribute value types are `string`, `number`, `boolean`, `string[]`, `number[]` and `boolean[]`.\n   *\n   * @param newAttributes - The attributes to set on the scope, as key-value pairs.\n   *\n   * @example\n   * ```typescript\n   * scope.setAttributes({\n   *   is_admin: true,\n   *   payment_selection: 'credit_card',\n   *   render_duration: 150,\n   * });\n   * ```\n   */\n  public setAttributes<T extends Record<string, unknown>>(newAttributes: RawAttributes<T>): this {\n    this._attributes = {\n      ...this._attributes,\n      ...newAttributes,\n    };\n\n    this._notifyScopeListeners();\n    return this;\n  }\n\n  /**\n   * Sets an attribute onto the scope.\n   *\n   * These attributes are applied to logs, metrics and streamed spans.\n   *\n   * Supported attribute value types are `string`, `number`, `boolean`, `string[]`, `number[]` and `boolean[]`.\n   *\n   * @param key - The attribute key.\n   * @param value - The attribute value.\n   *\n   * @example\n   * ```typescript\n   * scope.setAttribute('is_admin', true);\n   * scope.setAttribute('render_duration', 150);\n   * ```\n   */\n  // eslint-disable-next-line @typescript-eslint/no-explicit-any\n  public setAttribute<T extends RawAttribute<T> extends { value: any } | { unit: any } ? AttributeObject : unknown>(\n    key: string,\n    value: RawAttribute<T>,\n  ): this {\n    return this.setAttributes({ [key]: value });\n  }\n\n  /**\n   * Removes the attribute with the given key from the scope.\n   *\n   * @param key - The attribute key.\n   *\n   * @example\n   * ```typescript\n   * scope.removeAttribute('is_admin');\n   * ```\n   */\n  public removeAttribute(key: string): this {\n    if (key in this._attributes) {\n      // eslint-disable-next-line @typescript-eslint/no-dynamic-delete\n      delete this._attributes[key];\n      this._notifyScopeListeners();\n    }\n    return this;\n  }\n\n  /**\n   * Set an object that will be merged into existing extra on the scope,\n   * and will be sent as extra data with the event.\n   */\n  public setExtras(extras: Extras): this {\n    this._extra = {\n      ...this._extra,\n      ...extras,\n    };\n    this._notifyScopeListeners();\n    return this;\n  }\n\n  /**\n   * Set a single key:value extra entry that will be sent as extra data with the event.\n   */\n  public setExtra(key: string, extra: Extra): this {\n    this._extra = { ...this._extra, [key]: extra };\n    this._notifyScopeListeners();\n    return this;\n  }\n\n  /**\n   * Sets the fingerprint on the scope to send with the events.\n   * @param {string[]} fingerprint Fingerprint to group events in Sentry.\n   */\n  public setFingerprint(fingerprint: string[]): this {\n    this._fingerprint = fingerprint;\n    this._notifyScopeListeners();\n    return this;\n  }\n\n  /**\n   * Sets the level on the scope for future events.\n   */\n  public setLevel(level: SeverityLevel): this {\n    this._level = level;\n    this._notifyScopeListeners();\n    return this;\n  }\n\n  /**\n   * Sets the transaction name on the scope so that the name of e.g. taken server route or\n   * the page location is attached to future events.\n   *\n   * IMPORTANT: Calling this function does NOT change the name of the currently active\n   * root span. If you want to change the name of the active root span, use\n   * `Sentry.updateSpanName(rootSpan, 'new name')` instead.\n   *\n   * By default, the SDK updates the scope's transaction name automatically on sensible\n   * occasions, such as a page navigation or when handling a new request on the server.\n   */\n  public setTransactionName(name?: string): this {\n    this._transactionName = name;\n    this._notifyScopeListeners();\n    return this;\n  }\n\n  /**\n   * Sets context data with the given name.\n   * Data passed as context will be normalized. You can also pass `null` to unset the context.\n   * Note that context data will not be merged - calling `setContext` will overwrite an existing context with the same key.\n   */\n  public setContext(key: string, context: Context | null): this {\n    if (context === null) {\n      // eslint-disable-next-line @typescript-eslint/no-dynamic-delete\n      delete this._contexts[key];\n    } else {\n      this._contexts[key] = context;\n    }\n\n    this._notifyScopeListeners();\n    return this;\n  }\n\n  /**\n   * Set the session for the scope.\n   */\n  public setSession(session?: Session): this {\n    if (!session) {\n      delete this._session;\n    } else {\n      this._session = session;\n    }\n    this._notifyScopeListeners();\n    return this;\n  }\n\n  /**\n   * Get the session from the scope.\n   */\n  public getSession(): Session | undefined {\n    return this._session;\n  }\n\n  /**\n   * Updates the scope with provided data. Can work in three variations:\n   * - plain object containing updatable attributes\n   * - Scope instance that'll extract the attributes from\n   * - callback function that'll receive the current scope as an argument and allow for modifications\n   */\n  public update(captureContext?: CaptureContext): this {\n    if (!captureContext) {\n      return this;\n    }\n\n    const scopeToMerge = typeof captureContext === 'function' ? captureContext(this) : captureContext;\n\n    const scopeInstance =\n      scopeToMerge instanceof Scope\n        ? scopeToMerge.getScopeData()\n        : isPlainObject(scopeToMerge)\n          ? (captureContext as ScopeContext)\n          : undefined;\n\n    const {\n      tags,\n      attributes,\n      extra,\n      user,\n      contexts,\n      level,\n      fingerprint = [],\n      propagationContext,\n      conversationId,\n    } = scopeInstance || {};\n\n    this._tags = { ...this._tags, ...tags };\n    this._attributes = { ...this._attributes, ...attributes };\n    this._extra = { ...this._extra, ...extra };\n    this._contexts = { ...this._contexts, ...contexts };\n\n    if (user && Object.keys(user).length) {\n      this._user = user;\n    }\n\n    if (level) {\n      this._level = level;\n    }\n\n    if (fingerprint.length) {\n      this._fingerprint = fingerprint;\n    }\n\n    if (propagationContext) {\n      this._propagationContext = propagationContext;\n    }\n\n    if (conversationId) {\n      this._conversationId = conversationId;\n    }\n\n    return this;\n  }\n\n  /**\n   * Clears the current scope and resets its properties.\n   * Note: The client will not be cleared.\n   *\n   * @deprecated This method will be removed in v11. To reset scope state, re-initialize the SDK or run\n   * your code in a fresh scope via `withScope` instead.\n   */\n  public clear(): this {\n    // client is not cleared here on purpose!\n    this._breadcrumbs = [];\n    this._tags = {};\n    this._attributes = {};\n    this._extra = {};\n    this._user = {};\n    this._contexts = {};\n    this._level = undefined;\n    this._transactionName = undefined;\n    this._fingerprint = undefined;\n    this._session = undefined;\n    this._conversationId = undefined;\n    _setSpanForScope(this, undefined);\n    this._attachments = [];\n    this.setPropagationContext({\n      traceId: generateTraceId(),\n      sampleRand: safeMathRandom(),\n    });\n\n    this._notifyScopeListeners();\n    return this;\n  }\n\n  /**\n   * Adds a breadcrumb to the scope.\n   * By default, the last 100 breadcrumbs are kept.\n   */\n  public addBreadcrumb(breadcrumb: Breadcrumb, maxBreadcrumbs?: number): this {\n    const maxCrumbs = typeof maxBreadcrumbs === 'number' ? maxBreadcrumbs : DEFAULT_MAX_BREADCRUMBS;\n\n    // No data has been changed, so don't notify scope listeners\n    if (maxCrumbs <= 0) {\n      return this;\n    }\n\n    const mergedBreadcrumb: Breadcrumb = {\n      timestamp: dateTimestampInSeconds(),\n      ...breadcrumb,\n      // Breadcrumb messages can theoretically be infinitely large and they're held in memory so we truncate them not to leak (too much) memory\n      message: breadcrumb.message ? truncate(breadcrumb.message, 2048) : breadcrumb.message,\n    };\n\n    this._breadcrumbs.push(mergedBreadcrumb);\n    if (this._breadcrumbs.length > maxCrumbs) {\n      this._breadcrumbs = this._breadcrumbs.slice(-maxCrumbs);\n      this._client?.recordDroppedEvent('buffer_overflow', 'log_item');\n    }\n\n    this._notifyScopeListeners();\n\n    return this;\n  }\n\n  /**\n   * Get the last breadcrumb of the scope.\n   */\n  public getLastBreadcrumb(): Breadcrumb | undefined {\n    return this._breadcrumbs[this._breadcrumbs.length - 1];\n  }\n\n  /**\n   * Clear all breadcrumbs from the scope.\n   */\n  public clearBreadcrumbs(): this {\n    this._breadcrumbs = [];\n    this._notifyScopeListeners();\n    return this;\n  }\n\n  /**\n   * Add an attachment to the scope.\n   */\n  public addAttachment(attachment: Attachment): this {\n    this._attachments.push(attachment);\n    return this;\n  }\n\n  /**\n   * Clear all attachments from the scope.\n   */\n  public clearAttachments(): this {\n    this._attachments = [];\n    return this;\n  }\n\n  /**\n   * Get the data of this scope, which should be applied to an event during processing.\n   */\n  public getScopeData(): ScopeData {\n    return {\n      breadcrumbs: this._breadcrumbs,\n      attachments: this._attachments,\n      contexts: this._contexts,\n      tags: this._tags,\n      attributes: this._attributes,\n      extra: this._extra,\n      user: this._user,\n      level: this._level,\n      fingerprint: this._fingerprint || [],\n      eventProcessors: this._eventProcessors,\n      propagationContext: this._propagationContext,\n      sdkProcessingMetadata: this._sdkProcessingMetadata,\n      transactionName: this._transactionName,\n      span: _getSpanForScope(this),\n      conversationId: this._conversationId,\n    };\n  }\n\n  /**\n   * Add data which will be accessible during event processing but won't get sent to Sentry.\n   */\n  public setSDKProcessingMetadata(newData: SdkProcessingMetadata): this {\n    this._sdkProcessingMetadata = merge(this._sdkProcessingMetadata, newData, 2);\n    return this;\n  }\n\n  /**\n   * Add propagation context to the scope, used for distributed tracing\n   */\n  public setPropagationContext(context: PropagationContext): this {\n    this._propagationContext = context;\n    return this;\n  }\n\n  /**\n   * Get propagation context from the scope, used for distributed tracing\n   */\n  public getPropagationContext(): PropagationContext {\n    return this._propagationContext;\n  }\n\n  /**\n   * Capture an exception for this scope.\n   *\n   * @returns {string} The id of the captured Sentry event.\n   */\n  public captureException(exception: unknown, hint?: EventHint): string {\n    const eventId = hint?.event_id || uuid4();\n\n    if (!this._client) {\n      DEBUG_BUILD && debug.warn('No client configured on scope - will not capture exception!');\n      return eventId;\n    }\n\n    const syntheticException = new Error('Sentry syntheticException');\n\n    this._client.captureException(\n      exception,\n      {\n        originalException: exception,\n        syntheticException,\n        ...hint,\n        event_id: eventId,\n      },\n      this,\n    );\n\n    return eventId;\n  }\n\n  /**\n   * Capture a message for this scope.\n   *\n   * @returns {string} The id of the captured message.\n   */\n  public captureMessage(message: string, level?: SeverityLevel, hint?: EventHint): string {\n    const eventId = hint?.event_id || uuid4();\n\n    if (!this._client) {\n      DEBUG_BUILD && debug.warn('No client configured on scope - will not capture message!');\n      return eventId;\n    }\n\n    const syntheticException = hint?.syntheticException ?? new Error(message);\n\n    this._client.captureMessage(\n      message,\n      level,\n      {\n        originalException: message,\n        syntheticException,\n        ...hint,\n        event_id: eventId,\n      },\n      this,\n    );\n\n    return eventId;\n  }\n\n  /**\n   * Capture a Sentry event for this scope.\n   *\n   * @returns {string} The id of the captured event.\n   */\n  public captureEvent(event: Event, hint?: EventHint): string {\n    const eventId = event.event_id || hint?.event_id || uuid4();\n\n    if (!this._client) {\n      DEBUG_BUILD && debug.warn('No client configured on scope - will not capture event!');\n      return eventId;\n    }\n\n    this._client.captureEvent(event, { ...hint, event_id: eventId }, this);\n\n    return eventId;\n  }\n\n  /**\n   * This will be called on every set call.\n   */\n  protected _notifyScopeListeners(): void {\n    // We need this check for this._notifyingListeners to be able to work on scope during updates\n    // If this check is not here we'll produce endless recursion when something is done with the scope\n    // during the callback.\n    if (!this._notifyingListeners) {\n      this._notifyingListeners = true;\n      this._scopeListeners.forEach(callback => {\n        callback(this);\n      });\n      this._notifyingListeners = false;\n    }\n  }\n}\n","/**\n * Use this attribute to represent the source of a span name.\n * Must be one of: custom, url, route, view, component, task\n * TODO(v11): remove this export\n */\nexport const SEMANTIC_ATTRIBUTE_SENTRY_SOURCE = 'sentry.source';\n\n/**\n * Attributes that holds the sample rate that was locally applied to a span.\n * If this attribute is not defined, it means that the span inherited a sampling decision.\n *\n * NOTE: Is only defined on root spans.\n */\nexport const SEMANTIC_ATTRIBUTE_SENTRY_SAMPLE_RATE = 'sentry.sample_rate';\n\n/**\n * Attribute holding the sample rate of the previous trace.\n * This is used to sample consistently across subsequent traces in the browser SDK.\n *\n * Note: Only defined on root spans, if opted into consistent sampling\n */\nexport const SEMANTIC_ATTRIBUTE_SENTRY_PREVIOUS_TRACE_SAMPLE_RATE = 'sentry.previous_trace_sample_rate';\n\n/**\n * Use this attribute to represent the operation of a span.\n */\nexport const SEMANTIC_ATTRIBUTE_SENTRY_OP = 'sentry.op';\n\n/**\n * Use this attribute to represent the origin of a span.\n */\nexport const SEMANTIC_ATTRIBUTE_SENTRY_ORIGIN = 'sentry.origin';\n\n/**\n * Holds the human-readable span status message (e.g. set via\n * `span.setStatus({ code, message })`).\n *\n * Streamed (v2) span statuses are reduced to `ok`/`error`, so we preserve the\n * message as an attribute instead of dropping it. This mirrors the attribute\n * Sentry's OTLP ingestion uses for the same purpose.\n */\nexport const SEMANTIC_ATTRIBUTE_SENTRY_STATUS_MESSAGE = 'sentry.status.message';\n\n/** The reason why an idle span finished. */\nexport const SEMANTIC_ATTRIBUTE_SENTRY_IDLE_SPAN_FINISH_REASON = 'sentry.idle_span_finish_reason';\n\n/** The unit of a measurement, which may be stored as a TimedEvent. */\nexport const SEMANTIC_ATTRIBUTE_SENTRY_MEASUREMENT_UNIT = 'sentry.measurement_unit';\n\n/** The value of a measurement, which may be stored as a TimedEvent. */\nexport const SEMANTIC_ATTRIBUTE_SENTRY_MEASUREMENT_VALUE = 'sentry.measurement_value';\n\n/** The release version of the application */\nexport const SEMANTIC_ATTRIBUTE_SENTRY_RELEASE = 'sentry.release';\n/** The environment name (e.g., \"production\", \"staging\", \"development\") */\nexport const SEMANTIC_ATTRIBUTE_SENTRY_ENVIRONMENT = 'sentry.environment';\n/**\n * The segment name (e.g., \"GET /users\")\n * @deprecated Use `SENTRY_SEGMENT_NAME` `@sentry/conventions/attributes` instead.\n */\nexport const SEMANTIC_ATTRIBUTE_SENTRY_SEGMENT_NAME = 'sentry.segment.name';\n/**\n * The id of the segment that this span belongs to.\n * @deprecated Use `SENTRY_SEGMENT_ID` `@sentry/conventions/attributes` instead.\n */\nexport const SEMANTIC_ATTRIBUTE_SENTRY_SEGMENT_ID = 'sentry.segment.id';\n/**\n * The name of the Sentry SDK (e.g., \"sentry.php\", \"sentry.javascript\")\n * @deprecated Use `SENTRY_SDK_NAME` `@sentry/conventions/attributes` instead.\n */\nexport const SEMANTIC_ATTRIBUTE_SENTRY_SDK_NAME = 'sentry.sdk.name';\n/**\n * The version of the Sentry SDK\n * @deprecated Use `SENTRY_SDK_VERSION` `@sentry/conventions/attributes` instead.\n */\nexport const SEMANTIC_ATTRIBUTE_SENTRY_SDK_VERSION = 'sentry.sdk.version';\n/** The list of integrations enabled in the Sentry SDK (e.g., [\"InboundFilters\", \"BrowserTracing\"]) */\nexport const SEMANTIC_ATTRIBUTE_SENTRY_SDK_INTEGRATIONS = 'sentry.sdk.integrations';\n\n/** The user ID */\nexport const SEMANTIC_ATTRIBUTE_USER_ID = 'user.id';\n/** The user email */\nexport const SEMANTIC_ATTRIBUTE_USER_EMAIL = 'user.email';\n/** The user IP address */\nexport const SEMANTIC_ATTRIBUTE_USER_IP_ADDRESS = 'user.ip_address';\n/** The user username */\nexport const SEMANTIC_ATTRIBUTE_USER_USERNAME = 'user.name';\n\n/**\n * A custom span name set by users guaranteed to be taken over any automatically\n * inferred name. This attribute is removed before the span is sent.\n *\n * @internal only meant for internal SDK usage\n * @hidden\n */\nexport const SEMANTIC_ATTRIBUTE_SENTRY_CUSTOM_SPAN_NAME = 'sentry.custom_span_name';\n\n/**\n * The id of the profile that this span occurred in.\n */\nexport const SEMANTIC_ATTRIBUTE_PROFILE_ID = 'sentry.profile_id';\n\nexport const SEMANTIC_ATTRIBUTE_EXCLUSIVE_TIME = 'sentry.exclusive_time';\n\nexport const SEMANTIC_ATTRIBUTE_CACHE_HIT = 'cache.hit';\n\nexport const SEMANTIC_ATTRIBUTE_CACHE_KEY = 'cache.key';\n\nexport const SEMANTIC_ATTRIBUTE_CACHE_ITEM_SIZE = 'cache.item_size';\n\n/** TODO: Remove these once we update to latest semantic conventions */\nexport const SEMANTIC_ATTRIBUTE_HTTP_REQUEST_METHOD = 'http.request.method';\n/**\n * @deprecated Use `URL_FULL` `@sentry/conventions/attributes` instead.\n */\nexport const SEMANTIC_ATTRIBUTE_URL_FULL = 'url.full';\n\n/**\n * A span link attribute to mark the link as a special span link.\n *\n * Known values:\n * - `previous_trace`: The span links to the frontend root span of the previous trace.\n * - `next_trace`: The span links to the frontend root span of the next trace. (Not set by the SDK)\n *\n * Other values may be set as appropriate.\n * @see https://develop.sentry.dev/sdk/telemetry/traces/span-links/#link-types\n */\nexport const SEMANTIC_LINK_ATTRIBUTE_LINK_TYPE = 'sentry.link.type';\n\n/**\n * =============================================================================\n * GEN AI ATTRIBUTES\n * Based on OpenTelemetry Semantic Conventions for Generative AI\n * @see https://opentelemetry.io/docs/specs/semconv/gen-ai/\n * =============================================================================\n */\n\n/**\n * The conversation ID for linking messages across API calls.\n * For OpenAI Assistants API: thread_id\n * For LangGraph: configurable.thread_id\n */\nexport const GEN_AI_CONVERSATION_ID_ATTRIBUTE = 'gen_ai.conversation.id';\n","import { createCheckInEnvelope } from './checkin';\nimport { Client } from './client';\nimport { getIsolationScope } from './currentScopes';\nimport { DEBUG_BUILD } from './debug-build';\nimport { spanStreamingIntegration } from './integrations/spanStreaming';\nimport type { Scope } from './scope';\nimport { DEFAULT_TRANSPORT_BUFFER_SIZE } from './transports/base';\nimport { addUserAgentToTransportHeaders } from './transports/userAgent';\nimport type { CheckIn, MonitorConfig, SerializedCheckIn } from './types/checkin';\nimport type { Event, EventHint } from './types/event';\nimport type { ClientOptions } from './types/options';\nimport type { ParameterizedString } from './types/parameterize';\nimport type { SeverityLevel } from './types/severity';\nimport type { BaseTransportOptions, Transport } from './types/transport';\nimport { debug } from './utils/debug-logger';\nimport { eventFromMessage, eventFromUnknownInput } from './utils/eventbuilder';\nimport { uuid4 } from './utils/misc';\nimport { makePromiseBuffer } from './utils/promisebuffer';\nimport { resolvedSyncPromise } from './utils/syncpromise';\nimport { _getTraceInfoFromScope } from './utils/trace-info';\n\nexport interface ServerRuntimeClientOptions extends ClientOptions<BaseTransportOptions> {\n  platform?: string;\n  runtime?: { name: string; version?: string };\n  serverName?: string;\n}\n\n/**\n * The Sentry Server Runtime Client SDK.\n */\nexport class ServerRuntimeClient<\n  O extends ClientOptions & ServerRuntimeClientOptions = ServerRuntimeClientOptions,\n> extends Client<O> {\n  private _disposeCallbacks: (() => void)[] = [];\n\n  /**\n   * Creates a new Edge SDK instance.\n   * @param options Configuration options for this SDK.\n   */\n  public constructor(options: O) {\n    addUserAgentToTransportHeaders(options);\n\n    // When span streaming is enabled (`traceLifecycle: 'stream'`), the `spanStreamingIntegration`\n    // is required to flush spans. We add it here so the individual server SDKs don't have to.\n    // A user-provided `spanStreamingIntegration` always takes precedence over the one we add.\n    if (options.traceLifecycle === 'stream' && !options.integrations.some(i => i.name === 'SpanStreaming')) {\n      options.integrations.push(spanStreamingIntegration());\n    }\n\n    super(options);\n\n    this._setUpMetricsProcessing();\n  }\n\n  /**\n   * @inheritDoc\n   */\n  public eventFromException(exception: unknown, hint?: EventHint): PromiseLike<Event> {\n    const event = eventFromUnknownInput(this, this._options.stackParser, exception, hint);\n    event.level = 'error';\n\n    return resolvedSyncPromise(event);\n  }\n\n  /**\n   * @inheritDoc\n   */\n  public eventFromMessage(\n    message: ParameterizedString,\n    level: SeverityLevel = 'info',\n    hint?: EventHint,\n  ): PromiseLike<Event> {\n    return resolvedSyncPromise(\n      eventFromMessage(this._options.stackParser, message, level, hint, this._options.attachStacktrace),\n    );\n  }\n\n  /**\n   * @inheritDoc\n   */\n  public captureException(exception: unknown, hint?: EventHint, scope?: Scope): string {\n    setCurrentRequestSessionErroredOrCrashed(hint);\n    return super.captureException(exception, hint, scope);\n  }\n\n  /**\n   * @inheritDoc\n   */\n  public captureEvent(event: Event, hint?: EventHint, scope?: Scope): string {\n    // If the event is of type Exception, then a request session should be captured\n    const isException = !event.type && event.exception?.values && event.exception.values.length > 0;\n    if (isException) {\n      setCurrentRequestSessionErroredOrCrashed(hint);\n    }\n\n    return super.captureEvent(event, hint, scope);\n  }\n\n  /**\n   * Create a cron monitor check in and send it to Sentry.\n   *\n   * @param checkIn An object that describes a check in.\n   * @param upsertMonitorConfig An optional object that describes a monitor config. Use this if you want\n   * to create a monitor automatically when sending a check in.\n   */\n  public captureCheckIn(checkIn: CheckIn, monitorConfig?: MonitorConfig, scope?: Scope): string {\n    const id = 'checkInId' in checkIn && checkIn.checkInId ? checkIn.checkInId : uuid4();\n    if (!this._isEnabled()) {\n      DEBUG_BUILD && debug.warn('SDK not enabled, will not capture check-in.');\n      return id;\n    }\n\n    const options = this.getOptions();\n    const { release, environment, tunnel } = options;\n\n    const serializedCheckIn: SerializedCheckIn = {\n      check_in_id: id,\n      monitor_slug: checkIn.monitorSlug,\n      status: checkIn.status,\n      release,\n      environment,\n    };\n\n    if ('duration' in checkIn) {\n      serializedCheckIn.duration = checkIn.duration;\n    }\n\n    if (monitorConfig) {\n      serializedCheckIn.monitor_config = {\n        schedule: monitorConfig.schedule,\n        checkin_margin: monitorConfig.checkinMargin,\n        max_runtime: monitorConfig.maxRuntime,\n        timezone: monitorConfig.timezone,\n        failure_issue_threshold: monitorConfig.failureIssueThreshold,\n        recovery_threshold: monitorConfig.recoveryThreshold,\n      };\n    }\n\n    const [dynamicSamplingContext, traceContext] = _getTraceInfoFromScope(this, scope);\n    if (traceContext) {\n      serializedCheckIn.contexts = {\n        trace: traceContext,\n      };\n    }\n\n    const envelope = createCheckInEnvelope(\n      serializedCheckIn,\n      dynamicSamplingContext,\n      this.getSdkMetadata(),\n      tunnel,\n      this.getDsn(),\n    );\n\n    DEBUG_BUILD && debug.log('Sending checkin:', checkIn.monitorSlug, checkIn.status);\n\n    // sendEnvelope should not throw\n    // eslint-disable-next-line @typescript-eslint/no-floating-promises\n    this.sendEnvelope(envelope);\n\n    return id;\n  }\n\n  /**\n   * @inheritDoc\n   */\n  public override registerCleanup(callback: () => void): void {\n    this._disposeCallbacks.push(callback);\n  }\n\n  /**\n   * Disposes of the client and releases all resources.\n   *\n   * This method clears all internal state to allow the client to be garbage collected.\n   * It clears hooks, event processors, integrations, transport, and other internal references.\n   *\n   * Call this method after flushing to allow the client to be garbage collected.\n   * After calling dispose(), the client should not be used anymore.\n   *\n   * Subclasses should override this method to clean up their own resources and call `super.dispose()`.\n   */\n  public override dispose(): void {\n    DEBUG_BUILD && debug.log('Disposing client...');\n\n    // Run all registered cleanup callbacks\n    for (const callback of this._disposeCallbacks) {\n      try {\n        callback();\n      } catch {\n        // Ignore errors in cleanup callbacks\n      }\n    }\n    this._disposeCallbacks.length = 0;\n\n    for (const hookName of Object.keys(this._hooks)) {\n      this._hooks[hookName]?.clear();\n    }\n\n    this._hooks = {};\n    this._eventProcessors.length = 0;\n    this._integrations = {};\n    this._outcomes = {};\n    (this as unknown as { _transport?: Transport })._transport = undefined;\n    this._promiseBuffer = makePromiseBuffer(DEFAULT_TRANSPORT_BUFFER_SIZE);\n  }\n\n  /**\n   * @inheritDoc\n   */\n  protected _prepareEvent(\n    event: Event,\n    hint: EventHint,\n    currentScope: Scope,\n    isolationScope: Scope,\n  ): PromiseLike<Event | null> {\n    if (this._options.platform) {\n      event.platform = event.platform || this._options.platform;\n    }\n\n    if (this._options.runtime) {\n      event.contexts = {\n        ...event.contexts,\n        runtime: event.contexts?.runtime || this._options.runtime,\n      };\n    }\n\n    if (this._options.serverName) {\n      event.server_name = event.server_name || this._options.serverName;\n    }\n\n    return super._prepareEvent(event, hint, currentScope, isolationScope);\n  }\n\n  /**\n   * Process a server-side metric before it is captured.\n   */\n  private _setUpMetricsProcessing(): void {\n    this.on('processMetric', metric => {\n      if (this._options.serverName) {\n        metric.attributes = {\n          'server.address': this._options.serverName,\n          ...metric.attributes,\n        };\n      }\n    });\n  }\n}\n\nfunction setCurrentRequestSessionErroredOrCrashed(eventHint?: EventHint): void {\n  const requestSession = getIsolationScope().getScopeData().sdkProcessingMetadata.requestSession;\n  if (requestSession) {\n    // We mutate instead of doing `setSdkProcessingMetadata` because the http integration stores away a particular\n    // isolationScope. If that isolation scope is forked, setting the processing metadata here will not mutate the\n    // original isolation scope that the http integration stored away.\n    const isHandledException = eventHint?.mechanism?.handled ?? true;\n    // A request session can go from \"errored\" -> \"crashed\" but not \"crashed\" -> \"errored\".\n    // Crashed (unhandled exception) is worse than errored (handled exception).\n    if (isHandledException && requestSession.status !== 'crashed') {\n      requestSession.status = 'errored';\n    } else if (!isHandledException) {\n      requestSession.status = 'crashed';\n    }\n  }\n}\n","import type { SerializedSession, Session, SessionContext, SessionStatus } from './types/session';\nimport { uuid4 } from './utils/misc';\nimport { timestampInSeconds } from './utils/time';\n\n/**\n * Creates a new `Session` object by setting certain default parameters. If optional @param context\n * is passed, the passed properties are applied to the session object.\n *\n * @param context (optional) additional properties to be applied to the returned session object\n *\n * @returns a new `Session` object\n */\nexport function makeSession(context?: Omit<SessionContext, 'started' | 'status'>): Session {\n  // Both timestamp and started are in seconds since the UNIX epoch.\n  const startingTime = timestampInSeconds();\n\n  const session: Session = {\n    sid: uuid4(),\n    init: true,\n    timestamp: startingTime,\n    started: startingTime,\n    duration: 0,\n    status: 'ok',\n    errors: 0,\n    ignoreDuration: false,\n    toJSON: () => sessionToJSON(session),\n  };\n\n  if (context) {\n    updateSession(session, context);\n  }\n\n  return session;\n}\n\n/**\n * Updates a session object with the properties passed in the context.\n *\n * Note that this function mutates the passed object and returns void.\n * (Had to do this instead of returning a new and updated session because closing and sending a session\n * makes an update to the session after it was passed to the sending logic.\n * @see Client.captureSession )\n *\n * @param session the `Session` to update\n * @param context the `SessionContext` holding the properties that should be updated in @param session\n */\n// eslint-disable-next-line complexity\nexport function updateSession(session: Session, context: SessionContext = {}): void {\n  if (context.user) {\n    if (!session.ipAddress && context.user.ip_address) {\n      session.ipAddress = context.user.ip_address;\n    }\n\n    if (!session.did && !context.did) {\n      session.did = context.user.id || context.user.email || context.user.username;\n    }\n  }\n\n  session.timestamp = context.timestamp || timestampInSeconds();\n\n  if (context.abnormal_mechanism) {\n    session.abnormal_mechanism = context.abnormal_mechanism;\n  }\n\n  if (context.ignoreDuration) {\n    session.ignoreDuration = context.ignoreDuration;\n  }\n  if (context.sid) {\n    // Good enough uuid validation. — Kamil\n    session.sid = context.sid.length === 32 ? context.sid : uuid4();\n  }\n  if (context.init !== undefined) {\n    session.init = context.init;\n  }\n  if (!session.did && context.did) {\n    session.did = `${context.did}`;\n  }\n  if (typeof context.started === 'number') {\n    session.started = context.started;\n  }\n  if (session.ignoreDuration) {\n    session.duration = undefined;\n  } else if (typeof context.duration === 'number') {\n    session.duration = context.duration;\n  } else {\n    const duration = session.timestamp - session.started;\n    session.duration = duration >= 0 ? duration : 0;\n  }\n  if (context.release) {\n    session.release = context.release;\n  }\n  if (context.environment) {\n    session.environment = context.environment;\n  }\n  if (!session.ipAddress && context.ipAddress) {\n    session.ipAddress = context.ipAddress;\n  }\n  if (!session.userAgent && context.userAgent) {\n    session.userAgent = context.userAgent;\n  }\n  if (typeof context.errors === 'number') {\n    session.errors = context.errors;\n  }\n  if (context.status) {\n    session.status = context.status;\n  }\n}\n\n/**\n * Closes a session by setting its status and updating the session object with it.\n * Internally calls `updateSession` to update the passed session object.\n *\n * Note that this function mutates the passed session (@see updateSession for explanation).\n *\n * @param session the `Session` object to be closed\n * @param status the `SessionStatus` with which the session was closed. If you don't pass a status,\n *               this function will keep the previously set status, unless it was `'ok'` in which case\n *               it is changed to `'exited'`.\n */\nexport function closeSession(session: Session, status?: Exclude<SessionStatus, 'ok'>): void {\n  let context = {};\n  if (status) {\n    context = { status };\n  } else if (session.status === 'ok') {\n    context = { status: 'exited' };\n  }\n\n  updateSession(session, context);\n}\n\n/**\n * Serializes a passed session object to a JSON object with a slightly different structure.\n * This is necessary because the Sentry backend requires a slightly different schema of a session\n * than the one the JS SDKs use internally.\n *\n * @param session the session to be converted\n *\n * @returns a JSON object of the passed session\n */\nfunction sessionToJSON(session: Session): SerializedSession {\n  return {\n    sid: `${session.sid}`,\n    init: session.init,\n    // Make sure that sec is converted to ms for date constructor\n    started: new Date(session.started * 1000).toISOString(),\n    timestamp: new Date(session.timestamp * 1000).toISOString(),\n    status: session.status,\n    errors: session.errors,\n    did: typeof session.did === 'number' || typeof session.did === 'string' ? `${session.did}` : undefined,\n    duration: session.duration,\n    abnormal_mechanism: session.abnormal_mechanism,\n    attrs: {\n      release: session.release,\n      environment: session.environment,\n      ip_address: session.ipAddress,\n      user_agent: session.userAgent,\n    },\n  };\n}\n","/**\n * The kind of a span, mirroring OpenTelemetry's `SpanKind` enum values.\n *\n * Exported as a plain const object so SDK code can set a span's kind without\n * importing `@opentelemetry/api` just for the enum. The numeric values must\n * stay in sync with OpenTelemetry's `SpanKind` since they are passed through to\n * the underlying OTel span and sampler.\n */\nexport const SPAN_KIND = {\n  INTERNAL: 0,\n  SERVER: 1,\n  CLIENT: 2,\n  PRODUCER: 3,\n  CONSUMER: 4,\n} as const;\n\nexport type SpanKindValue = (typeof SPAN_KIND)[keyof typeof SPAN_KIND];\n\n// Reverse of SPAN_KIND (value → name), for the `otel.kind` attribute. The numeric keys come from\n// SPAN_KIND so they stay in sync; `satisfies` ensures every kind has a name.\nconst SPAN_KIND_NAME = {\n  [SPAN_KIND.INTERNAL]: 'INTERNAL',\n  [SPAN_KIND.SERVER]: 'SERVER',\n  [SPAN_KIND.CLIENT]: 'CLIENT',\n  [SPAN_KIND.PRODUCER]: 'PRODUCER',\n  [SPAN_KIND.CONSUMER]: 'CONSUMER',\n} as const satisfies Record<SpanKindValue, string>;\n\n/**\n * Resolve the string name of a span kind value (e.g. `1` → `'SERVER'`), mirroring the reverse\n * mapping of OpenTelemetry's `SpanKind` enum. Used for the `otel.kind` span attribute, so SDK\n * code doesn't need to import `@opentelemetry/api` just for that reverse lookup.\n */\nexport function spanKindToName(kind: number): (typeof SPAN_KIND_NAME)[SpanKindValue] | undefined {\n  return SPAN_KIND_NAME[kind as SpanKindValue];\n}\n","/**\n * OpenAI Integration Telemetry Attributes\n * Based on OpenTelemetry Semantic Conventions for Generative AI\n * @see https://opentelemetry.io/docs/specs/semconv/gen-ai/\n */\n\n// =============================================================================\n// OPENTELEMETRY SEMANTIC CONVENTIONS FOR GENAI\n// =============================================================================\n\n/**\n * The input messages sent to the model\n */\nexport const GEN_AI_PROMPT_ATTRIBUTE = 'gen_ai.prompt';\n\n/**\n * The Generative AI system being used\n * For OpenAI, this should always be \"openai\"\n */\nexport const GEN_AI_SYSTEM_ATTRIBUTE = 'gen_ai.system';\n\n/**\n * The name of the model as requested\n * Examples: \"gpt-4\", \"gpt-3.5-turbo\"\n */\nexport const GEN_AI_REQUEST_MODEL_ATTRIBUTE = 'gen_ai.request.model';\n\n/**\n * Whether streaming was enabled for the request\n */\nexport const GEN_AI_REQUEST_STREAM_ATTRIBUTE = 'gen_ai.request.stream';\n\n/**\n * The temperature setting for the model request\n */\nexport const GEN_AI_REQUEST_TEMPERATURE_ATTRIBUTE = 'gen_ai.request.temperature';\n\n/**\n * The maximum number of tokens requested\n */\nexport const GEN_AI_REQUEST_MAX_TOKENS_ATTRIBUTE = 'gen_ai.request.max_tokens';\n\n/**\n * The frequency penalty setting for the model request\n */\nexport const GEN_AI_REQUEST_FREQUENCY_PENALTY_ATTRIBUTE = 'gen_ai.request.frequency_penalty';\n\n/**\n * The presence penalty setting for the model request\n */\nexport const GEN_AI_REQUEST_PRESENCE_PENALTY_ATTRIBUTE = 'gen_ai.request.presence_penalty';\n\n/**\n * The top_p (nucleus sampling) setting for the model request\n */\nexport const GEN_AI_REQUEST_TOP_P_ATTRIBUTE = 'gen_ai.request.top_p';\n\n/**\n * The top_k setting for the model request\n */\nexport const GEN_AI_REQUEST_TOP_K_ATTRIBUTE = 'gen_ai.request.top_k';\n\n/**\n * Stop sequences for the model request\n */\nexport const GEN_AI_REQUEST_STOP_SEQUENCES_ATTRIBUTE = 'gen_ai.request.stop_sequences';\n\n/**\n * The encoding format for the model request\n */\nexport const GEN_AI_REQUEST_ENCODING_FORMAT_ATTRIBUTE = 'gen_ai.request.encoding_format';\n\n/**\n * The dimensions for the model request\n */\nexport const GEN_AI_REQUEST_DIMENSIONS_ATTRIBUTE = 'gen_ai.request.dimensions';\n\n/**\n * Array of reasons why the model stopped generating tokens\n */\nexport const GEN_AI_RESPONSE_FINISH_REASONS_ATTRIBUTE = 'gen_ai.response.finish_reasons';\n\n/**\n * The name of the model that generated the response\n */\nexport const GEN_AI_RESPONSE_MODEL_ATTRIBUTE = 'gen_ai.response.model';\n\n/**\n * The unique identifier for the response\n */\nexport const GEN_AI_RESPONSE_ID_ATTRIBUTE = 'gen_ai.response.id';\n\n/**\n * The reason why the model stopped generating tokens\n */\nexport const GEN_AI_RESPONSE_STOP_REASON_ATTRIBUTE = 'gen_ai.response.stop_reason';\n\n/**\n * The number of tokens used in the prompt\n */\nexport const GEN_AI_USAGE_INPUT_TOKENS_ATTRIBUTE = 'gen_ai.usage.input_tokens';\n\n/**\n * The number of tokens used in the response\n */\nexport const GEN_AI_USAGE_OUTPUT_TOKENS_ATTRIBUTE = 'gen_ai.usage.output_tokens';\n\n/**\n * The total number of tokens used (input + output)\n */\nexport const GEN_AI_USAGE_TOTAL_TOKENS_ATTRIBUTE = 'gen_ai.usage.total_tokens';\n\n/**\n * The operation name\n */\nexport const GEN_AI_OPERATION_NAME_ATTRIBUTE = 'gen_ai.operation.name';\n\n/**\n * Original length of messages array, used to indicate truncations had occured\n */\nexport const GEN_AI_INPUT_MESSAGES_ORIGINAL_LENGTH_ATTRIBUTE = 'sentry.sdk_meta.gen_ai.input.messages.original_length';\n\n/**\n * The prompt messages\n * Only recorded when recordInputs is enabled\n */\nexport const GEN_AI_INPUT_MESSAGES_ATTRIBUTE = 'gen_ai.input.messages';\n\n/**\n * The model's response messages including text and tool calls\n * Only recorded when recordOutputs is enabled\n * Format: stringified array of message objects with role, parts, and finish_reason\n * @see https://opentelemetry.io/docs/specs/semconv/registry/attributes/gen-ai/#gen-ai-output-messages\n */\nexport const GEN_AI_OUTPUT_MESSAGES_ATTRIBUTE = 'gen_ai.output.messages';\n\n/**\n * The system instructions extracted from system messages\n * Only recorded when recordInputs is enabled\n * According to OpenTelemetry spec: https://opentelemetry.io/docs/specs/semconv/registry/attributes/gen-ai/#gen-ai-system-instructions\n */\nexport const GEN_AI_SYSTEM_INSTRUCTIONS_ATTRIBUTE = 'gen_ai.system_instructions';\n\n/**\n * The response text\n * Only recorded when recordOutputs is enabled\n */\nexport const GEN_AI_RESPONSE_TEXT_ATTRIBUTE = 'gen_ai.response.text';\n\n/**\n * The available tools from incoming request\n * Only recorded when recordInputs is enabled\n */\nexport const GEN_AI_REQUEST_AVAILABLE_TOOLS_ATTRIBUTE = 'gen_ai.request.available_tools';\n\n/**\n * Whether the response is a streaming response\n */\nexport const GEN_AI_RESPONSE_STREAMING_ATTRIBUTE = 'gen_ai.response.streaming';\n\n/**\n * The tool calls from the response\n * Only recorded when recordOutputs is enabled\n */\nexport const GEN_AI_RESPONSE_TOOL_CALLS_ATTRIBUTE = 'gen_ai.response.tool_calls';\n\n/**\n * The agent name\n */\nexport const GEN_AI_AGENT_NAME_ATTRIBUTE = 'gen_ai.agent.name';\n\n/**\n * The pipeline name\n */\nexport const GEN_AI_PIPELINE_NAME_ATTRIBUTE = 'gen_ai.pipeline.name';\n\n/**\n * The conversation ID for linking messages across API calls\n * For OpenAI Assistants API: thread_id\n * For LangGraph: configurable.thread_id\n */\nexport const GEN_AI_CONVERSATION_ID_ATTRIBUTE = 'gen_ai.conversation.id';\n\n/**\n * The number of cache creation input tokens used\n */\nexport const GEN_AI_USAGE_CACHE_CREATION_INPUT_TOKENS_ATTRIBUTE = 'gen_ai.usage.cache_creation_input_tokens';\n\n/**\n * The number of cache read input tokens used\n */\nexport const GEN_AI_USAGE_CACHE_READ_INPUT_TOKENS_ATTRIBUTE = 'gen_ai.usage.cache_read_input_tokens';\n\n/**\n * The number of cache write input tokens used\n */\nexport const GEN_AI_USAGE_INPUT_TOKENS_CACHE_WRITE_ATTRIBUTE = 'gen_ai.usage.input_tokens.cache_write';\n\n/**\n * The number of cached input tokens that were used\n */\nexport const GEN_AI_USAGE_INPUT_TOKENS_CACHED_ATTRIBUTE = 'gen_ai.usage.input_tokens.cached';\n\n/**\n * The span operation name for invoking an agent\n */\nexport const GEN_AI_INVOKE_AGENT_OPERATION_ATTRIBUTE = 'gen_ai.invoke_agent';\n\n/**\n * The span operation name for generating content\n */\nexport const GEN_AI_GENERATE_CONTENT_OPERATION_ATTRIBUTE = 'gen_ai.generate_content';\n\n/**\n * The embeddings input\n * Only recorded when recordInputs is enabled\n */\nexport const GEN_AI_EMBEDDINGS_INPUT_ATTRIBUTE = 'gen_ai.embeddings.input';\n\n/**\n * The span operation for embeddings\n */\nexport const GEN_AI_EMBEDDINGS_OPERATION_ATTRIBUTE = 'gen_ai.embeddings';\n\n/**\n * The span operation name for reranking\n */\nexport const GEN_AI_RERANK_DO_RERANK_OPERATION_ATTRIBUTE = 'gen_ai.rerank';\n\n/**\n * The span operation name for executing a tool\n */\nexport const GEN_AI_EXECUTE_TOOL_OPERATION_ATTRIBUTE = 'gen_ai.execute_tool';\n\n/**\n * The tool name for tool call spans\n */\nexport const GEN_AI_TOOL_NAME_ATTRIBUTE = 'gen_ai.tool.name';\n\n/**\n * The tool call ID\n */\nexport const GEN_AI_TOOL_CALL_ID_ATTRIBUTE = 'gen_ai.tool.call.id';\n\n/**\n * The tool type (e.g., 'function')\n */\nexport const GEN_AI_TOOL_TYPE_ATTRIBUTE = 'gen_ai.tool.type';\n\n/**\n * The tool input/arguments\n */\nexport const GEN_AI_TOOL_INPUT_ATTRIBUTE = 'gen_ai.tool.input';\n\n/**\n * The tool output/result\n */\nexport const GEN_AI_TOOL_OUTPUT_ATTRIBUTE = 'gen_ai.tool.output';\n\n/**\n * The description of the tool being used\n * @see https://opentelemetry.io/docs/specs/semconv/registry/attributes/gen-ai/#gen-ai-tool-description\n */\nexport const GEN_AI_TOOL_DESCRIPTION_ATTRIBUTE = 'gen_ai.tool.description';\n","/**\n * Inline media content source, with a potentially very large base64\n * blob or data: uri.\n */\nexport type ContentMedia = Record<string, unknown> &\n  (\n    | {\n        media_type: string;\n        data: string;\n      }\n    | {\n        image_url: `data:${string}`;\n      }\n    | {\n        image_url: { url: `data:${string}` };\n      }\n    | {\n        type: 'blob' | 'base64';\n        content: string;\n      }\n    | {\n        b64_json: string;\n      }\n    | {\n        uri: `data:${string}`;\n      }\n    | {\n        type: 'input_audio';\n        input_audio: { data: string };\n      }\n    | {\n        type: 'file';\n        file: { file_data?: string };\n      }\n  );\n\n/**\n * Check if a content part is an OpenAI/Anthropic media source\n */\nexport function isContentMedia(part: unknown): part is ContentMedia {\n  if (!part || typeof part !== 'object') return false;\n\n  return (\n    isContentMediaSource(part) ||\n    hasInlineData(part) ||\n    hasImageUrl(part) ||\n    hasInputAudio(part) ||\n    hasFileData(part) ||\n    hasMediaTypeData(part) ||\n    hasVercelFileData(part) ||\n    hasVercelImageData(part) ||\n    hasBlobOrBase64Type(part) ||\n    hasB64Json(part) ||\n    hasImageGenerationResult(part) ||\n    hasDataUri(part)\n  );\n}\n\nfunction hasImageUrl(part: NonNullable<unknown>): boolean {\n  if (!('image_url' in part)) return false;\n  if (typeof part.image_url === 'string') return part.image_url.startsWith('data:');\n  return hasNestedImageUrl(part);\n}\n\nfunction hasNestedImageUrl(part: NonNullable<unknown>): part is { image_url: { url: string } } {\n  return (\n    'image_url' in part &&\n    !!part.image_url &&\n    typeof part.image_url === 'object' &&\n    'url' in part.image_url &&\n    typeof part.image_url.url === 'string' &&\n    part.image_url.url.startsWith('data:')\n  );\n}\n\nfunction isContentMediaSource(part: NonNullable<unknown>): boolean {\n  return 'type' in part && typeof part.type === 'string' && 'source' in part && isContentMedia(part.source);\n}\n\nfunction hasInlineData(part: NonNullable<unknown>): part is { inlineData: { data?: string } } {\n  return (\n    'inlineData' in part &&\n    !!part.inlineData &&\n    typeof part.inlineData === 'object' &&\n    'data' in part.inlineData &&\n    typeof part.inlineData.data === 'string'\n  );\n}\n\nfunction hasInputAudio(part: NonNullable<unknown>): part is { type: 'input_audio'; input_audio: { data: string } } {\n  return (\n    'type' in part &&\n    part.type === 'input_audio' &&\n    'input_audio' in part &&\n    !!part.input_audio &&\n    typeof part.input_audio === 'object' &&\n    'data' in part.input_audio &&\n    typeof part.input_audio.data === 'string'\n  );\n}\n\nfunction hasFileData(part: NonNullable<unknown>): part is { type: 'file'; file: { file_data: string } } {\n  return (\n    'type' in part &&\n    part.type === 'file' &&\n    'file' in part &&\n    !!part.file &&\n    typeof part.file === 'object' &&\n    'file_data' in part.file &&\n    typeof part.file.file_data === 'string'\n  );\n}\n\nfunction hasMediaTypeData(part: NonNullable<unknown>): part is { media_type: string; data: string } {\n  return 'media_type' in part && typeof part.media_type === 'string' && 'data' in part;\n}\n\n/**\n * Check for Vercel AI SDK file format: { type: \"file\", mediaType: \"...\", data: \"...\" }\n * Only matches base64/binary data, not HTTP/HTTPS URLs (which should be preserved).\n */\nfunction hasVercelFileData(part: NonNullable<unknown>): part is { type: 'file'; mediaType: string; data: string } {\n  return (\n    'type' in part &&\n    part.type === 'file' &&\n    'mediaType' in part &&\n    typeof part.mediaType === 'string' &&\n    'data' in part &&\n    typeof part.data === 'string' &&\n    // Only strip base64/binary data, not HTTP/HTTPS URLs which should be preserved as references\n    !part.data.startsWith('http://') &&\n    !part.data.startsWith('https://')\n  );\n}\n\n/**\n * Check for Vercel AI SDK image format: { type: \"image\", image: \"base64...\", mimeType?: \"...\" }\n * Only matches base64/data URIs, not HTTP/HTTPS URLs (which should be preserved).\n * Note: mimeType is optional in Vercel AI SDK image parts.\n */\nfunction hasVercelImageData(part: NonNullable<unknown>): part is { type: 'image'; image: string; mimeType?: string } {\n  return (\n    'type' in part &&\n    part.type === 'image' &&\n    'image' in part &&\n    typeof part.image === 'string' &&\n    // Only strip base64/data URIs, not HTTP/HTTPS URLs which should be preserved as references\n    !part.image.startsWith('http://') &&\n    !part.image.startsWith('https://')\n  );\n}\n\nfunction hasBlobOrBase64Type(part: NonNullable<unknown>): part is { type: 'blob' | 'base64'; content: string } {\n  return 'type' in part && (part.type === 'blob' || part.type === 'base64');\n}\n\nfunction hasB64Json(part: NonNullable<unknown>): part is { b64_json: string } {\n  return 'b64_json' in part;\n}\n\nfunction hasImageGenerationResult(part: NonNullable<unknown>): part is { type: 'image_generation'; result: string } {\n  return 'type' in part && 'result' in part && part.type === 'image_generation';\n}\n\nfunction hasDataUri(part: NonNullable<unknown>): part is { uri: string } {\n  return 'uri' in part && typeof part.uri === 'string' && part.uri.startsWith('data:');\n}\n\nconst REMOVED_STRING = '[Blob substitute]';\n\nconst MEDIA_FIELDS = ['image_url', 'data', 'content', 'b64_json', 'result', 'uri', 'image'] as const;\n\n/**\n * Replace inline binary data in a single media content part with a placeholder.\n */\nexport function stripInlineMediaFromSingleMessage(part: ContentMedia): ContentMedia {\n  const strip = { ...part };\n  if (isContentMedia(strip.source)) {\n    strip.source = stripInlineMediaFromSingleMessage(strip.source);\n  }\n  if (hasInlineData(part)) {\n    strip.inlineData = { ...part.inlineData, data: REMOVED_STRING };\n  }\n  if (hasNestedImageUrl(part)) {\n    strip.image_url = { ...part.image_url, url: REMOVED_STRING };\n  }\n  if (hasInputAudio(part)) {\n    strip.input_audio = { ...part.input_audio, data: REMOVED_STRING };\n  }\n  if (hasFileData(part)) {\n    strip.file = { ...part.file, file_data: REMOVED_STRING };\n  }\n  for (const field of MEDIA_FIELDS) {\n    if (typeof strip[field] === 'string') strip[field] = REMOVED_STRING;\n  }\n  return strip;\n}\n","import { isContentMedia, stripInlineMediaFromSingleMessage } from './mediaStripping';\n\n/**\n * Default maximum size in bytes for GenAI messages.\n * Messages exceeding this limit will be truncated.\n */\nexport const DEFAULT_GEN_AI_MESSAGES_BYTE_LIMIT = 20000;\n\n/**\n * Message format used by OpenAI and Anthropic APIs.\n */\ntype ContentMessage = {\n  [key: string]: unknown;\n  content: string;\n};\n\n/**\n * One block inside OpenAI / Anthropic `content: [...]` arrays (text, image_url, etc.).\n */\ntype ContentArrayBlock = {\n  [key: string]: unknown;\n  type: string;\n};\n\n/**\n * Message format used by OpenAI and Anthropic APIs for media.\n */\ntype ContentArrayMessage = {\n  [key: string]: unknown;\n  content: ContentArrayBlock[];\n};\n\n/**\n * Message format used by Google GenAI API.\n * Parts can be strings or objects with a text property.\n */\ntype PartsMessage = {\n  [key: string]: unknown;\n  parts: Array<TextPart | MediaPart>;\n};\n\n/**\n * A part in a Google GenAI message that contains text.\n */\ntype TextPart = string | { text: string };\n\n/**\n * A part in a Google GenAI that contains media.\n */\ntype MediaPart = {\n  type: string;\n  content: string;\n};\n\n/**\n * One element of an array-based message: OpenAI/Anthropic `content[]` or Google `parts`.\n */\ntype ArrayMessageItem = TextPart | MediaPart | ContentArrayBlock;\n\n/**\n * Calculate the UTF-8 byte length of a string.\n */\nconst utf8Bytes = (text: string): number => {\n  return new TextEncoder().encode(text).length;\n};\n\n/**\n * Calculate the UTF-8 byte length of a value's JSON representation.\n */\nconst jsonBytes = (value: unknown): number => {\n  return utf8Bytes(JSON.stringify(value));\n};\n\n/**\n * Truncate a string to fit within maxBytes (inclusive) when encoded as UTF-8.\n * Uses binary search for efficiency with multi-byte characters.\n *\n * @param text - The string to truncate\n * @param maxBytes - Maximum byte length (inclusive, UTF-8 encoded)\n * @returns Truncated string whose UTF-8 byte length is at most maxBytes\n */\nfunction truncateTextByBytes(text: string, maxBytes: number): string {\n  if (utf8Bytes(text) <= maxBytes) {\n    return text;\n  }\n\n  let low = 0;\n  let high = text.length;\n  let bestFit = '';\n\n  while (low <= high) {\n    const mid = Math.floor((low + high) / 2);\n    const candidate = text.slice(0, mid);\n    const byteSize = utf8Bytes(candidate);\n\n    if (byteSize <= maxBytes) {\n      bestFit = candidate;\n      low = mid + 1;\n    } else {\n      high = mid - 1;\n    }\n  }\n\n  return bestFit;\n}\n\n/**\n * Extract text content from a message item.\n * Handles plain strings and objects with a text property.\n *\n * @returns The text content\n */\nfunction getItemText(item: ArrayMessageItem): string {\n  if (typeof item === 'string') {\n    return item;\n  }\n  if ('text' in item && typeof item.text === 'string') {\n    return item.text;\n  }\n  return '';\n}\n\n/**\n * Create a new item with updated text content while preserving the original structure.\n *\n * @param item - Original item (string or object)\n * @param text - New text content\n * @returns New item with updated text\n */\nfunction withItemText(item: ArrayMessageItem, text: string): ArrayMessageItem {\n  if (typeof item === 'string') {\n    return text;\n  }\n  return { ...item, text };\n}\n\n/**\n * Check if a message has the OpenAI/Anthropic content format.\n */\nfunction isContentMessage(message: unknown): message is ContentMessage {\n  return (\n    message !== null &&\n    typeof message === 'object' &&\n    'content' in message &&\n    typeof (message as ContentMessage).content === 'string'\n  );\n}\n\n/**\n * Check if a message has the OpenAI/Anthropic content array format.\n */\nfunction isContentArrayMessage(message: unknown): message is ContentArrayMessage {\n  return message !== null && typeof message === 'object' && 'content' in message && Array.isArray(message.content);\n}\n\n/**\n * Check if a message has the Google GenAI parts format.\n */\nfunction isPartsMessage(message: unknown): message is PartsMessage {\n  return (\n    message !== null &&\n    typeof message === 'object' &&\n    'parts' in message &&\n    Array.isArray((message as PartsMessage).parts) &&\n    (message as PartsMessage).parts.length > 0\n  );\n}\n\n/**\n * Truncate a message with `content: string` format (OpenAI/Anthropic).\n *\n * @param message - Message with content property\n * @param maxBytes - Maximum byte limit\n * @returns Array with truncated message, or empty array if it doesn't fit\n */\nfunction truncateContentMessage(message: ContentMessage, maxBytes: number): unknown[] {\n  // Calculate overhead (message structure without content)\n  const emptyMessage = { ...message, content: '' };\n  const overhead = jsonBytes(emptyMessage);\n  const availableForContent = maxBytes - overhead;\n\n  if (availableForContent <= 0) {\n    return [];\n  }\n\n  const truncatedContent = truncateTextByBytes(message.content, availableForContent);\n  return [{ ...message, content: truncatedContent }];\n}\n\n/**\n * Extracts the array items and their key from an array-based message.\n * Returns `null` key if neither `parts` nor `content` is a valid array.\n */\nfunction getArrayItems(message: PartsMessage | ContentArrayMessage): {\n  key: 'parts' | 'content' | null;\n  items: ArrayMessageItem[];\n} {\n  if ('parts' in message && Array.isArray(message.parts)) {\n    return { key: 'parts', items: message.parts };\n  }\n  if ('content' in message && Array.isArray(message.content)) {\n    return { key: 'content', items: message.content };\n  }\n  return { key: null, items: [] };\n}\n\n/**\n * Truncate a message with an array-based format.\n * Handles both `parts: [...]` (Google GenAI) and `content: [...]` (OpenAI/Anthropic multimodal).\n * Keeps as many complete items as possible, only truncating the first item if needed.\n *\n * @param message - Message with parts or content array\n * @param maxBytes - Maximum byte limit\n * @returns Array with truncated message, or empty array if it doesn't fit\n */\nfunction truncateArrayMessage(message: PartsMessage | ContentArrayMessage, maxBytes: number): unknown[] {\n  const { key, items } = getArrayItems(message);\n\n  if (key === null || items.length === 0) {\n    return [];\n  }\n\n  // Calculate overhead by creating empty text items\n  const emptyItems = items.map(item => withItemText(item, ''));\n  const overhead = jsonBytes({ ...message, [key]: emptyItems });\n  let remainingBytes = maxBytes - overhead;\n\n  if (remainingBytes <= 0) {\n    return [];\n  }\n\n  // Include items until we run out of space\n  const includedItems: ArrayMessageItem[] = [];\n\n  for (const item of items) {\n    const text = getItemText(item);\n    const textSize = utf8Bytes(text);\n\n    if (textSize <= remainingBytes) {\n      // Item fits: include it as-is\n      includedItems.push(item);\n      remainingBytes -= textSize;\n    } else if (includedItems.length === 0) {\n      // First item doesn't fit: truncate it\n      const truncated = truncateTextByBytes(text, remainingBytes);\n      if (truncated) {\n        includedItems.push(withItemText(item, truncated));\n      }\n      break;\n    } else {\n      // Subsequent item doesn't fit: stop here\n      break;\n    }\n  }\n\n  /* c8 ignore start\n   * for type safety only, algorithm guarantees SOME text included */\n  if (includedItems.length <= 0) {\n    return [];\n  } else {\n    /* c8 ignore stop */\n    return [{ ...message, [key]: includedItems }];\n  }\n}\n\n/**\n * Truncate a single message to fit within maxBytes.\n *\n * Supports three message formats:\n * - OpenAI/Anthropic: `{ ..., content: string }`\n * - Vercel AI/OpenAI multimodal: `{ ..., content: Array<{type, text?, ...}> }`\n * - Google GenAI: `{ ..., parts: Array<string | {text: string} | non-text> }`\n *\n * @param message - The message to truncate\n * @param maxBytes - Maximum byte limit for the message\n * @returns Array containing the truncated message, or empty array if truncation fails\n */\nfunction truncateSingleMessage(message: unknown, maxBytes: number): unknown[] {\n  if (!message) return [];\n\n  // Handle plain strings (e.g., embeddings input)\n  if (typeof message === 'string') {\n    const truncated = truncateTextByBytes(message, maxBytes);\n    return truncated ? [truncated] : [];\n  }\n\n  if (typeof message !== 'object') {\n    return [];\n  }\n\n  if (isContentMessage(message)) {\n    return truncateContentMessage(message, maxBytes);\n  }\n\n  if (isContentArrayMessage(message) || isPartsMessage(message)) {\n    return truncateArrayMessage(message, maxBytes);\n  }\n\n  // Unknown message format: cannot truncate safely\n  return [];\n}\n\n/**\n * Strip the inline media from message arrays.\n *\n * This returns a stripped message. We do NOT want to mutate the data in place,\n * because of course we still want the actual API/client to handle the media.\n */\nfunction stripInlineMediaFromMessages(messages: unknown[]): unknown[] {\n  const stripped = messages.map(message => {\n    let newMessage: Record<string, unknown> | undefined = undefined;\n    if (!!message && typeof message === 'object') {\n      if (isContentArrayMessage(message)) {\n        newMessage = {\n          ...message,\n          content: stripInlineMediaFromMessages(message.content),\n        };\n      } else if ('content' in message && isContentMedia(message.content)) {\n        newMessage = {\n          ...message,\n          content: stripInlineMediaFromSingleMessage(message.content),\n        };\n      }\n      if (isPartsMessage(message)) {\n        newMessage = {\n          // might have to strip content AND parts\n          ...(newMessage ?? message),\n          parts: stripInlineMediaFromMessages(message.parts),\n        };\n      }\n      if (isContentMedia(newMessage)) {\n        newMessage = stripInlineMediaFromSingleMessage(newMessage);\n      } else if (isContentMedia(message)) {\n        newMessage = stripInlineMediaFromSingleMessage(message);\n      }\n    }\n    return newMessage ?? message;\n  });\n  return stripped;\n}\n\n/**\n * Truncate an array of messages to fit within a byte limit.\n *\n * Strategy:\n * - Always keeps only the last (newest) message\n * - Strips inline media from the message\n * - Truncates the message content if it exceeds the byte limit\n *\n * @param messages - Array of messages to truncate\n * @param maxBytes - Maximum total byte limit for the message\n * @returns Array containing only the last message (possibly truncated)\n *\n * @example\n * ```ts\n * const messages = [msg1, msg2, msg3, msg4]; // newest is msg4\n * const truncated = truncateMessagesByBytes(messages, 10000);\n * // Returns [msg4] (truncated if needed)\n * ```\n */\nfunction truncateMessagesByBytes(messages: unknown[], maxBytes: number): unknown[] {\n  // Early return for empty or invalid input\n  if (!Array.isArray(messages) || messages.length === 0) {\n    return messages;\n  }\n\n  // The result is always a single-element array that callers wrap with\n  // JSON.stringify([message]), so subtract the 2-byte array wrapper (\"[\"  and \"]\")\n  // to ensure the final serialized value stays under the limit.\n  const effectiveMaxBytes = maxBytes - 2;\n\n  // Always keep only the last message\n  const lastMessage = messages[messages.length - 1];\n\n  // Strip inline media from the single message\n  const stripped = stripInlineMediaFromMessages([lastMessage]);\n  const strippedMessage = stripped[0];\n\n  // Check if it fits\n  const messageBytes = jsonBytes(strippedMessage);\n  if (messageBytes <= effectiveMaxBytes) {\n    return stripped;\n  }\n\n  // Truncate the single message if needed\n  return truncateSingleMessage(strippedMessage, effectiveMaxBytes);\n}\n\n/**\n * Truncate GenAI messages using the default byte limit.\n *\n * Convenience wrapper around `truncateMessagesByBytes` with the default limit.\n *\n * @param messages - Array of messages to truncate\n * @returns Truncated array of messages\n */\nexport function truncateGenAiMessages(messages: unknown[]): unknown[] {\n  return truncateMessagesByBytes(messages, DEFAULT_GEN_AI_MESSAGES_BYTE_LIMIT);\n}\n\n/**\n * Truncate GenAI string input using the default byte limit.\n *\n * @param input - The string to truncate\n * @returns Truncated string\n */\nexport function truncateGenAiStringInput(input: string): string {\n  return truncateTextByBytes(input, DEFAULT_GEN_AI_MESSAGES_BYTE_LIMIT);\n}\n","/**\n * Shared utils for AI integrations (OpenAI, Anthropic, Verce.AI, etc.)\n */\nimport { getClient } from '../../currentScopes';\nimport { hasSpanStreamingEnabled } from '../spans/hasSpanStreamingEnabled';\nimport type { Span } from '../../types/span';\nimport { isThenable } from '../../utils/is';\nimport {\n  GEN_AI_RESPONSE_FINISH_REASONS_ATTRIBUTE,\n  GEN_AI_RESPONSE_ID_ATTRIBUTE,\n  GEN_AI_RESPONSE_MODEL_ATTRIBUTE,\n  GEN_AI_RESPONSE_STREAMING_ATTRIBUTE,\n  GEN_AI_RESPONSE_TEXT_ATTRIBUTE,\n  GEN_AI_RESPONSE_TOOL_CALLS_ATTRIBUTE,\n  GEN_AI_USAGE_INPUT_TOKENS_ATTRIBUTE,\n  GEN_AI_USAGE_OUTPUT_TOKENS_ATTRIBUTE,\n  GEN_AI_USAGE_TOTAL_TOKENS_ATTRIBUTE,\n} from './gen-ai-attributes';\nimport { truncateGenAiMessages, truncateGenAiStringInput } from './messageTruncation';\n\nexport interface AIRecordingOptions {\n  recordInputs?: boolean;\n  recordOutputs?: boolean;\n}\n\n/**\n * A method registry entry describes a single instrumented method:\n * which gen_ai operation it maps to and whether it is intrinsically streaming.\n */\nexport interface InstrumentedMethodEntry {\n  /** Operation name (e.g. 'chat', 'embeddings', 'generate_content'). Omit for factory methods that only need result proxying. */\n  operation?: string;\n  /** True if the method itself is always streaming (not param-based) */\n  streaming?: boolean;\n  /** When set, the method's return value is re-proxied with this as the base path */\n  proxyResultPath?: string;\n}\n\n/**\n * Maps method paths to their registry entries.\n * Used by proxy-based AI client instrumentations to determine which methods\n * to instrument, what operation name to use, and whether they stream.\n */\nexport type InstrumentedMethodRegistry = Record<string, InstrumentedMethodEntry>;\n\n/**\n * Resolves AI recording options by falling back to the client's `dataCollection.genAI` settings.\n * Precedence: explicit option > dataCollection.genAI > sendDefaultPii > false\n */\nexport function resolveAIRecordingOptions<T extends AIRecordingOptions>(options?: T): T & Required<AIRecordingOptions> {\n  const genAI = getClient()?.getDataCollectionOptions().genAI;\n  return {\n    ...options,\n    recordInputs: options?.recordInputs ?? genAI?.inputs ?? false,\n    recordOutputs: options?.recordOutputs ?? genAI?.outputs ?? false,\n  } as T & Required<AIRecordingOptions>;\n}\n\n/**\n * Resolves whether truncation should be enabled.\n * If the user explicitly set `enableTruncation`, that value is used.\n * Otherwise, truncation is disabled whenever gen_ai spans are sent through the span streaming / v2\n * span path, i.e. full span streaming (`traceLifecycle: 'stream'`) or `streamGenAiSpans`. That path\n * is not subject to the transaction payload-size limits that truncation works around, so the full\n * message data can be retained. `streamGenAiSpans` is opt-out (on unless explicitly set to `false`).\n */\nexport function shouldEnableTruncation(enableTruncation: boolean | undefined): boolean {\n  if (enableTruncation !== undefined) {\n    return enableTruncation;\n  }\n\n  const client = getClient();\n  if (!client) {\n    return true;\n  }\n\n  return !hasSpanStreamingEnabled(client) && client.getOptions().streamGenAiSpans === false;\n}\n\n/**\n * Build method path from current traversal\n */\nexport function buildMethodPath(currentPath: string, prop: string): string {\n  return currentPath ? `${currentPath}.${prop}` : prop;\n}\n\n/**\n * Set token usage attributes\n * @param span - The span to add attributes to\n * @param promptTokens - The number of prompt tokens\n * @param completionTokens - The number of completion tokens\n * @param cachedInputTokens - The number of cached input tokens\n * @param cachedOutputTokens - The number of cached output tokens\n */\nexport function setTokenUsageAttributes(\n  span: Span,\n  promptTokens?: number,\n  completionTokens?: number,\n  cachedInputTokens?: number,\n  cachedOutputTokens?: number,\n): void {\n  if (promptTokens !== undefined) {\n    span.setAttributes({\n      [GEN_AI_USAGE_INPUT_TOKENS_ATTRIBUTE]: promptTokens,\n    });\n  }\n  if (completionTokens !== undefined) {\n    span.setAttributes({\n      [GEN_AI_USAGE_OUTPUT_TOKENS_ATTRIBUTE]: completionTokens,\n    });\n  }\n  if (\n    promptTokens !== undefined ||\n    completionTokens !== undefined ||\n    cachedInputTokens !== undefined ||\n    cachedOutputTokens !== undefined\n  ) {\n    /**\n     * Total input tokens in a request is the summation of `input_tokens`,\n     * `cache_creation_input_tokens`, and `cache_read_input_tokens`.\n     */\n    const totalTokens =\n      (promptTokens ?? 0) + (completionTokens ?? 0) + (cachedInputTokens ?? 0) + (cachedOutputTokens ?? 0);\n\n    span.setAttributes({\n      [GEN_AI_USAGE_TOTAL_TOKENS_ATTRIBUTE]: totalTokens,\n    });\n  }\n}\n\nexport interface StreamResponseState {\n  responseId?: string;\n  responseModel?: string;\n  finishReasons: string[];\n  responseTexts: string[];\n  toolCalls: unknown[];\n  promptTokens?: number;\n  completionTokens?: number;\n  totalTokens?: number;\n  cacheCreationInputTokens?: number;\n  cacheReadInputTokens?: number;\n}\n\n/**\n * Ends a streaming span by setting all accumulated response attributes and ending the span.\n * Shared across OpenAI, Anthropic, and Google GenAI streaming implementations.\n */\nexport function endStreamSpan(span: Span, state: StreamResponseState, recordOutputs: boolean): void {\n  if (!span.isRecording()) {\n    return;\n  }\n\n  const attrs: Record<string, string | number | boolean> = {\n    [GEN_AI_RESPONSE_STREAMING_ATTRIBUTE]: true,\n  };\n\n  if (state.responseId) attrs[GEN_AI_RESPONSE_ID_ATTRIBUTE] = state.responseId;\n  if (state.responseModel) attrs[GEN_AI_RESPONSE_MODEL_ATTRIBUTE] = state.responseModel;\n\n  if (state.promptTokens !== undefined) attrs[GEN_AI_USAGE_INPUT_TOKENS_ATTRIBUTE] = state.promptTokens;\n  if (state.completionTokens !== undefined) attrs[GEN_AI_USAGE_OUTPUT_TOKENS_ATTRIBUTE] = state.completionTokens;\n\n  // Use explicit total if provided (OpenAI, Google), otherwise compute from cache tokens (Anthropic)\n  if (state.totalTokens !== undefined) {\n    attrs[GEN_AI_USAGE_TOTAL_TOKENS_ATTRIBUTE] = state.totalTokens;\n  } else if (\n    state.promptTokens !== undefined ||\n    state.completionTokens !== undefined ||\n    state.cacheCreationInputTokens !== undefined ||\n    state.cacheReadInputTokens !== undefined\n  ) {\n    attrs[GEN_AI_USAGE_TOTAL_TOKENS_ATTRIBUTE] =\n      (state.promptTokens ?? 0) +\n      (state.completionTokens ?? 0) +\n      (state.cacheCreationInputTokens ?? 0) +\n      (state.cacheReadInputTokens ?? 0);\n  }\n\n  if (state.finishReasons.length) {\n    attrs[GEN_AI_RESPONSE_FINISH_REASONS_ATTRIBUTE] = JSON.stringify(state.finishReasons);\n  }\n  if (recordOutputs && state.responseTexts.length) {\n    attrs[GEN_AI_RESPONSE_TEXT_ATTRIBUTE] = state.responseTexts.join('');\n  }\n  if (recordOutputs && state.toolCalls.length) {\n    attrs[GEN_AI_RESPONSE_TOOL_CALLS_ATTRIBUTE] = JSON.stringify(state.toolCalls);\n  }\n\n  span.setAttributes(attrs);\n  span.end();\n}\n\n/**\n * Get the truncated JSON string for a string, an array of messages, or an object.\n *\n * @param value - The value to truncate and serialize\n * @returns The truncated JSON string\n */\nexport function getTruncatedJsonString<T>(value: T | T[]): string {\n  if (typeof value === 'string') {\n    // Some values are already JSON strings, so we don't need to duplicate the JSON parsing\n    return truncateGenAiStringInput(value);\n  }\n  // Both truncation (media stripping recurses the value) and `JSON.stringify` can throw on\n  // circular refs or non-serializable values (e.g. BigInt); never let that crash instrumentation.\n  try {\n    return JSON.stringify(Array.isArray(value) ? truncateGenAiMessages(value) : value);\n  } catch {\n    return '[unserializable]';\n  }\n}\n\n/**\n * Extract system instructions from messages array.\n * Finds the first system message and formats it according to OpenTelemetry semantic conventions.\n *\n * @param messages - Array of messages to extract system instructions from\n * @returns systemInstructions (JSON string) and filteredMessages (without system message)\n */\nexport function extractSystemInstructions(messages: unknown[] | unknown): {\n  systemInstructions: string | undefined;\n  filteredMessages: unknown[] | unknown;\n} {\n  if (!Array.isArray(messages)) {\n    return { systemInstructions: undefined, filteredMessages: messages };\n  }\n\n  const systemMessageIndex = messages.findIndex(\n    msg => msg && typeof msg === 'object' && 'role' in msg && (msg as { role: string }).role === 'system',\n  );\n\n  if (systemMessageIndex === -1) {\n    return { systemInstructions: undefined, filteredMessages: messages };\n  }\n\n  const systemMessage = messages[systemMessageIndex] as { role: string; content?: string | unknown };\n  const systemContent =\n    typeof systemMessage.content === 'string'\n      ? systemMessage.content\n      : systemMessage.content !== undefined\n        ? JSON.stringify(systemMessage.content)\n        : undefined;\n\n  if (!systemContent) {\n    return { systemInstructions: undefined, filteredMessages: messages };\n  }\n\n  const systemInstructions = JSON.stringify([{ type: 'text', content: systemContent }]);\n  const filteredMessages = [...messages.slice(0, systemMessageIndex), ...messages.slice(systemMessageIndex + 1)];\n\n  return { systemInstructions, filteredMessages };\n}\n\n/**\n * Creates a wrapped version of .withResponse() that replaces the data field\n * with the instrumented result while preserving metadata (response, request_id).\n */\nasync function createWithResponseWrapper<T>(\n  originalWithResponse: Promise<unknown>,\n  instrumentedPromise: Promise<T>,\n): Promise<unknown> {\n  // Awaited together rather than in sequence so both promises get a handler attached synchronously.\n  // Awaiting them one after the other leaves the second unobserved when the first rejects, which\n  // surfaces as an unhandled rejection.\n  const [instrumentedResult, originalWrapper] = await Promise.all([instrumentedPromise, originalWithResponse]);\n\n  // Combine instrumented result with original metadata\n  if (originalWrapper && typeof originalWrapper === 'object' && 'data' in originalWrapper) {\n    return {\n      ...originalWrapper,\n      data: instrumentedResult,\n    };\n  }\n  return instrumentedResult;\n}\n\n/**\n * Wraps a promise-like object to preserve additional methods (like .withResponse())\n * that AI SDK clients (OpenAI, Anthropic) attach to their APIPromise return values.\n *\n * Standard Promise methods (.then, .catch, .finally) are routed to the instrumented\n * promise to preserve Sentry's span instrumentation, while custom SDK methods are\n * forwarded to the original promise to maintain the SDK's API surface.\n */\nexport function wrapPromiseWithMethods<R>(\n  originalPromiseLike: Promise<R>,\n  instrumentedPromise: Promise<R>,\n): Promise<R> {\n  // If the original result is not thenable, return the instrumented promise\n  if (!isThenable(originalPromiseLike)) {\n    return instrumentedPromise;\n  }\n\n  // Create a proxy that forwards Promise methods to instrumentedPromise\n  // and preserves additional methods from the original result\n  return new Proxy(originalPromiseLike, {\n    get(target: object, prop: string | symbol): unknown {\n      // For standard Promise methods (.then, .catch, .finally, Symbol.toStringTag),\n      // use instrumentedPromise to preserve Sentry instrumentation.\n      // For custom methods (like .withResponse()), use the original target.\n      const useInstrumentedPromise = prop in Promise.prototype || prop === Symbol.toStringTag;\n      const source = useInstrumentedPromise ? instrumentedPromise : target;\n\n      const value = Reflect.get(source, prop) as unknown;\n\n      // Special handling for .withResponse() to preserve instrumentation\n      // .withResponse() returns { data: T, response: Response, request_id: string }\n      if (prop === 'withResponse' && typeof value === 'function') {\n        return function wrappedWithResponse(this: unknown): unknown {\n          const originalWithResponse = (value as (...args: unknown[]) => unknown).call(target);\n          return createWithResponseWrapper(originalWithResponse, instrumentedPromise);\n        };\n      }\n\n      return typeof value === 'function' ? value.bind(source) : value;\n    },\n  }) as Promise<R>;\n}\n","import type { InstrumentedMethodRegistry } from '../ai/utils';\n\nexport const ANTHROPIC_AI_INTEGRATION_NAME = 'Anthropic_AI' as const;\n\n// https://docs.anthropic.com/en/api/messages\n// https://docs.anthropic.com/en/api/models-list\nexport const ANTHROPIC_METHOD_REGISTRY = {\n  'messages.create': { operation: 'chat' },\n  'messages.stream': { operation: 'chat', streaming: true },\n  'messages.countTokens': { operation: 'chat' },\n  'models.get': { operation: 'models' },\n  'completions.create': { operation: 'chat' },\n  'models.retrieve': { operation: 'models' },\n  'beta.messages.create': { operation: 'chat' },\n} as const satisfies InstrumentedMethodRegistry;\n","import { SEMANTIC_ATTRIBUTE_SENTRY_ORIGIN } from '../../semanticAttributes';\nimport { SPAN_STATUS_ERROR } from '../../tracing';\nimport { startSpan, startSpanManual } from '../../tracing/trace';\nimport type { Span, SpanAttributeValue } from '../../types/span';\nimport {\n  GEN_AI_OPERATION_NAME_ATTRIBUTE,\n  GEN_AI_PROMPT_ATTRIBUTE,\n  GEN_AI_REQUEST_AVAILABLE_TOOLS_ATTRIBUTE,\n  GEN_AI_REQUEST_FREQUENCY_PENALTY_ATTRIBUTE,\n  GEN_AI_REQUEST_MAX_TOKENS_ATTRIBUTE,\n  GEN_AI_REQUEST_MODEL_ATTRIBUTE,\n  GEN_AI_REQUEST_STREAM_ATTRIBUTE,\n  GEN_AI_REQUEST_TEMPERATURE_ATTRIBUTE,\n  GEN_AI_REQUEST_TOP_K_ATTRIBUTE,\n  GEN_AI_REQUEST_TOP_P_ATTRIBUTE,\n  GEN_AI_RESPONSE_ID_ATTRIBUTE,\n  GEN_AI_RESPONSE_MODEL_ATTRIBUTE,\n  GEN_AI_RESPONSE_TEXT_ATTRIBUTE,\n  GEN_AI_RESPONSE_TOOL_CALLS_ATTRIBUTE,\n  GEN_AI_SYSTEM_ATTRIBUTE,\n} from '../ai/gen-ai-attributes';\nimport type { InstrumentedMethodEntry } from '../ai/utils';\nimport {\n  resolveAIRecordingOptions,\n  setTokenUsageAttributes,\n  shouldEnableTruncation,\n  wrapPromiseWithMethods,\n} from '../ai/utils';\nimport { ANTHROPIC_METHOD_REGISTRY } from './constants';\nimport { instrumentAsyncIterableStream, instrumentMessageStream } from './streaming';\nimport type { AnthropicAiOptions, AnthropicAiResponse, AnthropicAiStreamingEvent, ContentBlock } from './types';\nimport { handleResponseError, messagesFromParams, setMessagesAttribute } from './utils';\n\n// Set only while a streaming helper (e.g. `messages.stream()`) synchronously delegates to the\n// underlying `create`. The SDK invokes that internal `create` synchronously, so a plain flag\n// suppresses exactly the duplicate delegation and nothing else: a `create` made later from a\n// stream event handler runs in a separate async continuation with the flag already cleared.\nlet suppressDelegatedCreate = false;\n\n// Methods that have already been wrapped, so instrumenting the same client twice is a no-op.\nconst INSTRUMENTED_METHODS = new WeakSet<object>();\n\n/**\n * Extract request attributes from method arguments\n */\nexport function extractRequestAttributes(\n  args: unknown[],\n  methodPath: string,\n  operationName: string,\n): Record<string, unknown> {\n  const attributes: Record<string, unknown> = {\n    [GEN_AI_SYSTEM_ATTRIBUTE]: 'anthropic',\n    [GEN_AI_OPERATION_NAME_ATTRIBUTE]: operationName,\n    [SEMANTIC_ATTRIBUTE_SENTRY_ORIGIN]: 'auto.ai.anthropic',\n  };\n\n  if (args.length > 0 && typeof args[0] === 'object' && args[0] !== null) {\n    const params = args[0] as Record<string, unknown>;\n    if (params.tools && Array.isArray(params.tools)) {\n      attributes[GEN_AI_REQUEST_AVAILABLE_TOOLS_ATTRIBUTE] = JSON.stringify(params.tools);\n    }\n\n    attributes[GEN_AI_REQUEST_MODEL_ATTRIBUTE] = params.model ?? 'unknown';\n    if ('temperature' in params) attributes[GEN_AI_REQUEST_TEMPERATURE_ATTRIBUTE] = params.temperature;\n    if ('top_p' in params) attributes[GEN_AI_REQUEST_TOP_P_ATTRIBUTE] = params.top_p;\n    if ('stream' in params) attributes[GEN_AI_REQUEST_STREAM_ATTRIBUTE] = params.stream;\n    if ('top_k' in params) attributes[GEN_AI_REQUEST_TOP_K_ATTRIBUTE] = params.top_k;\n    if ('frequency_penalty' in params)\n      attributes[GEN_AI_REQUEST_FREQUENCY_PENALTY_ATTRIBUTE] = params.frequency_penalty;\n    if ('max_tokens' in params) attributes[GEN_AI_REQUEST_MAX_TOKENS_ATTRIBUTE] = params.max_tokens;\n  } else {\n    if (methodPath === 'models.retrieve' || methodPath === 'models.get') {\n      // models.retrieve(model-id) and models.get(model-id)\n      attributes[GEN_AI_REQUEST_MODEL_ATTRIBUTE] = args[0];\n    } else {\n      attributes[GEN_AI_REQUEST_MODEL_ATTRIBUTE] = 'unknown';\n    }\n  }\n\n  return attributes;\n}\n\n/**\n * Add private request attributes to spans.\n * This is only recorded if recordInputs is true.\n */\nexport function addPrivateRequestAttributes(\n  span: Span,\n  params: Record<string, unknown>,\n  enableTruncation: boolean,\n): void {\n  const messages = messagesFromParams(params);\n  setMessagesAttribute(span, messages, enableTruncation);\n\n  if ('prompt' in params) {\n    span.setAttributes({ [GEN_AI_PROMPT_ATTRIBUTE]: JSON.stringify(params.prompt) });\n  }\n}\n\n/**\n * Add content attributes when recordOutputs is enabled\n */\nfunction addContentAttributes(span: Span, response: AnthropicAiResponse): void {\n  // Messages.create\n  if ('content' in response) {\n    if (Array.isArray(response.content)) {\n      span.setAttributes({\n        [GEN_AI_RESPONSE_TEXT_ATTRIBUTE]: response.content\n          .map((item: ContentBlock) => item.text)\n          .filter(text => !!text)\n          .join(''),\n      });\n\n      const toolCalls: Array<ContentBlock> = [];\n\n      for (const item of response.content) {\n        if (item.type === 'tool_use' || item.type === 'server_tool_use') {\n          toolCalls.push(item);\n        }\n      }\n      if (toolCalls.length > 0) {\n        span.setAttributes({ [GEN_AI_RESPONSE_TOOL_CALLS_ATTRIBUTE]: JSON.stringify(toolCalls) });\n      }\n    }\n  }\n  // Completions.create\n  if ('completion' in response) {\n    span.setAttributes({ [GEN_AI_RESPONSE_TEXT_ATTRIBUTE]: response.completion });\n  }\n  // Models.countTokens\n  if ('input_tokens' in response) {\n    span.setAttributes({ [GEN_AI_RESPONSE_TEXT_ATTRIBUTE]: JSON.stringify(response.input_tokens) });\n  }\n}\n\n/**\n * Add basic metadata attributes from the response\n */\nfunction addMetadataAttributes(span: Span, response: AnthropicAiResponse): void {\n  if ('id' in response && 'model' in response) {\n    span.setAttributes({\n      [GEN_AI_RESPONSE_ID_ATTRIBUTE]: response.id,\n      [GEN_AI_RESPONSE_MODEL_ATTRIBUTE]: response.model,\n    });\n\n    if ('usage' in response && response.usage) {\n      setTokenUsageAttributes(\n        span,\n        response.usage.input_tokens,\n        response.usage.output_tokens,\n        response.usage.cache_creation_input_tokens,\n        response.usage.cache_read_input_tokens,\n      );\n    }\n  }\n}\n\n/**\n * Add response attributes to spans\n */\nexport function addResponseAttributes(span: Span, response: AnthropicAiResponse, recordOutputs?: boolean): void {\n  if (!response || typeof response !== 'object') return;\n\n  // capture error, do not add attributes if error (they shouldn't exist)\n  if ('type' in response && response.type === 'error') {\n    handleResponseError(span, response);\n    return;\n  }\n\n  // Private response attributes that are only recorded if recordOutputs is true.\n  if (recordOutputs) {\n    addContentAttributes(span, response);\n  }\n\n  // Add basic metadata attributes\n  addMetadataAttributes(span, response);\n}\n\n/**\n * Handle common error catching and reporting for streaming requests\n */\nfunction handleStreamingError(error: unknown, span: Span): never {\n  if (span.isRecording()) {\n    span.setStatus({ code: SPAN_STATUS_ERROR, message: 'internal_error' });\n    span.end();\n  }\n  throw error;\n}\n\n/**\n * Handle streaming cases with common logic\n */\nfunction handleStreamingRequest<T extends unknown[], R>(\n  target: (...args: T) => R | Promise<R>,\n  invocationThis: unknown,\n  args: T,\n  requestAttributes: Record<string, unknown>,\n  operationName: string,\n  methodPath: string,\n  params: Record<string, unknown> | undefined,\n  options: AnthropicAiOptions,\n  isStreamRequested: boolean,\n  isStreamingMethod: boolean,\n): R | Promise<R> {\n  const model = requestAttributes[GEN_AI_REQUEST_MODEL_ATTRIBUTE] ?? 'unknown';\n  const spanConfig = {\n    name: `${operationName} ${model}`,\n    op: `gen_ai.${operationName}`,\n    attributes: requestAttributes as Record<string, SpanAttributeValue>,\n  };\n\n  // messages.stream() always returns a sync MessageStream, even with stream: true param\n  if (isStreamRequested && !isStreamingMethod) {\n    let originalResult!: Promise<R>;\n\n    const instrumentedPromise = startSpanManual(spanConfig, (span: Span) => {\n      originalResult = target.apply(invocationThis, args) as Promise<R>;\n\n      if (options.recordInputs && params) {\n        addPrivateRequestAttributes(span, params, shouldEnableTruncation(options.enableTruncation));\n      }\n\n      return (async () => {\n        try {\n          const result = await originalResult;\n          return instrumentAsyncIterableStream(\n            result as AsyncIterable<AnthropicAiStreamingEvent>,\n            span,\n            options.recordOutputs ?? false,\n          ) as unknown as R;\n        } catch (error) {\n          return handleStreamingError(error, span);\n        }\n      })();\n    });\n\n    return wrapPromiseWithMethods(originalResult, instrumentedPromise);\n  } else {\n    return startSpanManual(spanConfig, span => {\n      try {\n        if (options.recordInputs && params) {\n          addPrivateRequestAttributes(span, params, shouldEnableTruncation(options.enableTruncation));\n        }\n        // The helper synchronously delegates to `create`; suppress that one internal call so it\n        // does not produce a duplicate child span (see the dedup gate in `instrumentMethod`).\n        suppressDelegatedCreate = true;\n        const messageStream = target.apply(invocationThis, args);\n        suppressDelegatedCreate = false;\n        return instrumentMessageStream(messageStream, span, options.recordOutputs ?? false);\n      } catch (error) {\n        suppressDelegatedCreate = false;\n        return handleStreamingError(error, span);\n      }\n    });\n  }\n}\n\n/**\n * Instrument a method with Sentry spans\n * Following Sentry AI Agents Manual Instrumentation conventions\n * @see https://docs.sentry.io/platforms/javascript/guides/node/tracing/instrumentation/ai-agents-module/#manual-instrumentation\n */\nfunction instrumentMethod<T extends unknown[], R>(\n  originalMethod: (...args: T) => R | Promise<R>,\n  methodPath: string,\n  instrumentedMethod: InstrumentedMethodEntry,\n  context: unknown,\n  options: AnthropicAiOptions,\n): (...args: T) => R | Promise<R> {\n  return new Proxy(originalMethod, {\n    apply(target, thisArg, args: T): R | Promise<R> {\n      // Preserve the caller's `this` so instrumentation stays transparent: the SDK's methods\n      // rely on private fields bound to the real instance, and internal delegation (e.g.\n      // `messages.stream()` calling `this.create()`) must resolve against the same object it\n      // would on an uninstrumented client. Fall back to the wrap-time owner for unbound calls.\n      const invocationThis = thisArg !== undefined ? thisArg : context;\n\n      const isStreamingMethod = instrumentedMethod.streaming === true;\n\n      // If this is the SDK's internal `create` delegation from a streaming helper (e.g.\n      // `messages.stream()` invoking `this.create()`), skip instrumentation: the helper span\n      // already represents this operation, so a second span would be a duplicate.\n      if (!isStreamingMethod && suppressDelegatedCreate) {\n        return target.apply(invocationThis, args);\n      }\n\n      const operationName = instrumentedMethod.operation || 'unknown';\n      const requestAttributes = extractRequestAttributes(args, methodPath, operationName);\n      const model = requestAttributes[GEN_AI_REQUEST_MODEL_ATTRIBUTE] ?? 'unknown';\n\n      const params = typeof args[0] === 'object' ? (args[0] as Record<string, unknown>) : undefined;\n      const isStreamRequested = Boolean(params?.stream);\n\n      if (isStreamRequested || isStreamingMethod) {\n        return handleStreamingRequest(\n          target,\n          invocationThis,\n          args,\n          requestAttributes,\n          operationName,\n          methodPath,\n          params,\n          options,\n          isStreamRequested,\n          isStreamingMethod,\n        );\n      }\n\n      let originalResult!: Promise<R>;\n\n      const instrumentedPromise = startSpan(\n        {\n          name: `${operationName} ${model}`,\n          op: `gen_ai.${operationName}`,\n          attributes: requestAttributes as Record<string, SpanAttributeValue>,\n        },\n        span => {\n          originalResult = target.apply(invocationThis, args) as Promise<R>;\n\n          if (options.recordInputs && params) {\n            addPrivateRequestAttributes(span, params, shouldEnableTruncation(options.enableTruncation));\n          }\n\n          return originalResult.then(result => {\n            addResponseAttributes(span, result as AnthropicAiResponse, options.recordOutputs);\n            return result;\n          });\n        },\n      );\n\n      return wrapPromiseWithMethods(originalResult, instrumentedPromise);\n    },\n  }) as (...args: T) => R | Promise<R>;\n}\n\n/**\n * Instrument the Anthropic client's methods in place.\n *\n * We deliberately do not wrap the client in a Proxy. The Anthropic SDK relies on private class\n * fields (`this.#field`), which are invisible to a Proxy and throw if a method runs with a\n * proxied `this`. Wrapping the registered methods in place (as own properties shadowing the\n * prototype) keeps `this` bound to the real instance, so instrumentation stays observationally\n * transparent: internal delegation (e.g. `messages.stream()` calling `this.create()`) and\n * `instanceof` checks behave exactly as on an uninstrumented client, and non-instrumented\n * methods are left untouched.\n */\nfunction instrumentClientInPlace<T extends object>(client: T, options: AnthropicAiOptions): T {\n  for (const methodPath of Object.keys(ANTHROPIC_METHOD_REGISTRY) as Array<keyof typeof ANTHROPIC_METHOD_REGISTRY>) {\n    const segments = methodPath.split('.');\n    const methodName = segments.pop() as string;\n\n    let owner = client as Record<string, unknown> | undefined;\n    for (const segment of segments) {\n      owner = owner?.[segment] as Record<string, unknown> | undefined;\n    }\n\n    if (!owner || typeof owner[methodName] !== 'function') {\n      continue;\n    }\n\n    const originalMethod = owner[methodName] as (...args: unknown[]) => unknown;\n    if (INSTRUMENTED_METHODS.has(originalMethod)) {\n      continue;\n    }\n\n    const instrumented = instrumentMethod(\n      originalMethod,\n      methodPath,\n      ANTHROPIC_METHOD_REGISTRY[methodPath],\n      owner,\n      options,\n    );\n    INSTRUMENTED_METHODS.add(instrumented);\n    owner[methodName] = instrumented;\n  }\n\n  return client;\n}\n\n/**\n * Instrument an Anthropic AI client with Sentry tracing\n * Can be used across Node.js, Cloudflare Workers, and Vercel Edge\n *\n * @template T - The type of the client that extends object\n * @param client - The Anthropic AI client to instrument\n * @param options - Optional configuration for recording inputs and outputs\n * @returns The instrumented client with the same type as the input\n */\nexport function instrumentAnthropicAiClient<T extends object>(anthropicAiClient: T, options?: AnthropicAiOptions): T {\n  return instrumentClientInPlace(anthropicAiClient, resolveAIRecordingOptions(options));\n}\n","import { captureException } from '../../exports';\nimport { SPAN_STATUS_ERROR } from '../../tracing';\nimport type { Span } from '../../types/span';\nimport { endStreamSpan } from '../ai/utils';\nimport type { AnthropicAiStreamingEvent } from './types';\nimport { mapAnthropicErrorToStatusMessage } from './utils';\n\n/**\n * State object used to accumulate information from a stream of Anthropic AI events.\n */\ninterface StreamingState {\n  /** Collected response text fragments (for output recording). */\n  responseTexts: string[];\n  /** Reasons for finishing the response, as reported by the API. */\n  finishReasons: string[];\n  /** The response ID. */\n  responseId: string;\n  /** The model name. */\n  responseModel: string;\n  /** Number of prompt/input tokens used. */\n  promptTokens: number | undefined;\n  /** Number of completion/output tokens used. */\n  completionTokens: number | undefined;\n  /** Number of cache creation input tokens used. */\n  cacheCreationInputTokens: number | undefined;\n  /** Number of cache read input tokens used. */\n  cacheReadInputTokens: number | undefined;\n  /** Accumulated tool calls (finalized) */\n  toolCalls: Array<Record<string, unknown>>;\n  /** In-progress tool call blocks keyed by index */\n  activeToolBlocks: Record<\n    number,\n    {\n      id?: string;\n      name?: string;\n      inputJsonParts: string[];\n    }\n  >;\n}\n\n/**\n * Checks if an event is an error event\n * @param event - The event to process\n * @param state - The state of the streaming process\n * @param recordOutputs - Whether to record outputs\n * @param span - The span to update\n * @returns Whether an error occurred\n */\n\nfunction isErrorEvent(event: AnthropicAiStreamingEvent, span: Span): boolean {\n  if ('type' in event && typeof event.type === 'string') {\n    if (event.type === 'error') {\n      // The SDK surfaces this error to the caller (the async iterator rejects / their `error`\n      // listener fires), so we only mark the span failed and do not record it.\n      span.setStatus({ code: SPAN_STATUS_ERROR, message: mapAnthropicErrorToStatusMessage(event.error?.type) });\n      return true;\n    }\n  }\n  return false;\n}\n\n/**\n * Processes the message metadata of an event\n * @param event - The event to process\n * @param state - The state of the streaming process\n */\n\nfunction handleMessageMetadata(event: AnthropicAiStreamingEvent, state: StreamingState): void {\n  // Cumulative token counts and the final stop reason both arrive on the message_delta event.\n  // @see https://docs.anthropic.com/en/docs/build-with-claude/streaming#event-types\n  if (event.type === 'message_delta') {\n    if (event.usage && typeof event.usage.output_tokens === 'number') {\n      state.completionTokens = event.usage.output_tokens;\n    }\n    if (event.delta?.stop_reason) {\n      state.finishReasons.push(event.delta.stop_reason);\n    }\n  }\n\n  if (event.message) {\n    const message = event.message;\n\n    if (message.id) state.responseId = message.id;\n    if (message.model) state.responseModel = message.model;\n\n    if (message.usage) {\n      if (typeof message.usage.input_tokens === 'number') state.promptTokens = message.usage.input_tokens;\n      if (typeof message.usage.cache_creation_input_tokens === 'number')\n        state.cacheCreationInputTokens = message.usage.cache_creation_input_tokens;\n      if (typeof message.usage.cache_read_input_tokens === 'number')\n        state.cacheReadInputTokens = message.usage.cache_read_input_tokens;\n    }\n  }\n}\n\n/**\n * Handle start of a content block (e.g., tool_use)\n */\nfunction handleContentBlockStart(event: AnthropicAiStreamingEvent, state: StreamingState): void {\n  if (event.type !== 'content_block_start' || typeof event.index !== 'number' || !event.content_block) return;\n  if (event.content_block.type === 'tool_use' || event.content_block.type === 'server_tool_use') {\n    state.activeToolBlocks[event.index] = {\n      id: event.content_block.id,\n      name: event.content_block.name,\n      inputJsonParts: [],\n    };\n  }\n}\n\n/**\n * Handle deltas of a content block, including input_json_delta for tool_use\n */\nfunction handleContentBlockDelta(\n  event: AnthropicAiStreamingEvent,\n  state: StreamingState,\n  recordOutputs: boolean,\n): void {\n  if (event.type !== 'content_block_delta' || !event.delta) return;\n\n  // Accumulate tool_use input JSON deltas only when we have an index and an active tool block\n  if (\n    typeof event.index === 'number' &&\n    'partial_json' in event.delta &&\n    typeof event.delta.partial_json === 'string'\n  ) {\n    const active = state.activeToolBlocks[event.index];\n    if (active) {\n      active.inputJsonParts.push(event.delta.partial_json);\n    }\n  }\n\n  // Accumulate streamed response text regardless of index\n  if (recordOutputs && typeof event.delta.text === 'string') {\n    state.responseTexts.push(event.delta.text);\n  }\n}\n\n/**\n * Handle stop of a content block; finalize tool_use entries\n */\nfunction handleContentBlockStop(event: AnthropicAiStreamingEvent, state: StreamingState): void {\n  if (event.type !== 'content_block_stop' || typeof event.index !== 'number') return;\n\n  const active = state.activeToolBlocks[event.index];\n  if (!active) return;\n\n  const raw = active.inputJsonParts.join('');\n  let parsedInput: unknown;\n\n  try {\n    parsedInput = raw ? JSON.parse(raw) : {};\n  } catch {\n    parsedInput = { __unparsed: raw };\n  }\n\n  state.toolCalls.push({\n    type: 'tool_use',\n    id: active.id,\n    name: active.name,\n    input: parsedInput,\n  });\n\n  // eslint-disable-next-line @typescript-eslint/no-dynamic-delete\n  delete state.activeToolBlocks[event.index];\n}\n\n/**\n * Processes an event\n * @param event - The event to process\n * @param state - The state of the streaming process\n * @param recordOutputs - Whether to record outputs\n * @param span - The span to update\n */\nfunction processEvent(\n  event: AnthropicAiStreamingEvent,\n  state: StreamingState,\n  recordOutputs: boolean,\n  span: Span,\n): void {\n  if (!(event && typeof event === 'object')) {\n    return;\n  }\n\n  const isError = isErrorEvent(event, span);\n  if (isError) return;\n\n  handleMessageMetadata(event, state);\n\n  // Tool call events are sent via 3 separate events:\n  // - content_block_start (start of the tool call)\n  // - content_block_delta (delta aka input of the tool call)\n  // - content_block_stop (end of the tool call)\n  // We need to handle them all to capture the full tool call.\n  handleContentBlockStart(event, state);\n  handleContentBlockDelta(event, state, recordOutputs);\n  handleContentBlockStop(event, state);\n}\n\n/**\n * Instruments an async iterable stream of Anthropic events, updates the span with\n * streaming attributes and (optionally) the aggregated output text, and yields\n * each event from the input stream unchanged.\n */\nexport async function* instrumentAsyncIterableStream(\n  stream: AsyncIterable<AnthropicAiStreamingEvent>,\n  span: Span,\n  recordOutputs: boolean,\n): AsyncGenerator<AnthropicAiStreamingEvent, void, unknown> {\n  const state: StreamingState = {\n    responseTexts: [],\n    finishReasons: [],\n    responseId: '',\n    responseModel: '',\n    promptTokens: undefined,\n    completionTokens: undefined,\n    cacheCreationInputTokens: undefined,\n    cacheReadInputTokens: undefined,\n    toolCalls: [],\n    activeToolBlocks: {},\n  };\n\n  try {\n    for await (const event of stream) {\n      processEvent(event, state, recordOutputs, span);\n      yield event;\n    }\n  } finally {\n    endStreamSpan(span, state, recordOutputs);\n  }\n}\n\n/**\n * Instruments a MessageStream by registering event handlers and preserving the original stream API.\n */\nexport function instrumentMessageStream<R extends { on: (...args: unknown[]) => void }>(\n  stream: R,\n  span: Span,\n  recordOutputs: boolean,\n): R {\n  const state: StreamingState = {\n    responseTexts: [],\n    finishReasons: [],\n    responseId: '',\n    responseModel: '',\n    promptTokens: undefined,\n    completionTokens: undefined,\n    cacheCreationInputTokens: undefined,\n    cacheReadInputTokens: undefined,\n    toolCalls: [],\n    activeToolBlocks: {},\n  };\n\n  stream.on('streamEvent', (event: unknown) => {\n    processEvent(event as AnthropicAiStreamingEvent, state, recordOutputs, span);\n  });\n\n  // The event fired when a message is done being streamed by the API. Corresponds to the message_stop SSE event.\n  // @see https://github.com/anthropics/anthropic-sdk-typescript/blob/d3be31f5a4e6ebb4c0a2f65dbb8f381ae73a9166/helpers.md?plain=1#L42-L44\n  stream.on('message', () => {\n    endStreamSpan(span, state, recordOutputs);\n  });\n\n  stream.on('error', (error: unknown) => {\n    // Attaching this listener stops the stream error from being raised as an unhandled rejection, so\n    // we capture it here to avoid swallowing it (e.g. for callers that don't await/iterate the stream).\n    captureException(error, {\n      mechanism: {\n        handled: false,\n        type: 'auto.ai.anthropic.stream_error',\n      },\n    });\n\n    if (span.isRecording()) {\n      span.setStatus({ code: SPAN_STATUS_ERROR, message: 'internal_error' });\n      span.end();\n    }\n  });\n\n  return stream;\n}\n","import { captureException } from '../../exports';\nimport { SPAN_STATUS_ERROR } from '../../tracing';\nimport type { Span } from '../../types/span';\nimport type { SpanStatusType } from '../../types/spanStatus';\nimport {\n  GEN_AI_INPUT_MESSAGES_ATTRIBUTE,\n  GEN_AI_INPUT_MESSAGES_ORIGINAL_LENGTH_ATTRIBUTE,\n  GEN_AI_SYSTEM_INSTRUCTIONS_ATTRIBUTE,\n} from '../ai/gen-ai-attributes';\nimport { extractSystemInstructions, getTruncatedJsonString } from '../ai/utils';\nimport { stringify } from '../../utils/string';\nimport type { AnthropicAiResponse } from './types';\n\n/**\n * Set the messages and messages original length attributes.\n * Extracts system instructions before truncation.\n */\nexport function setMessagesAttribute(span: Span, messages: unknown, enableTruncation: boolean): void {\n  if (Array.isArray(messages) && messages.length === 0) {\n    return;\n  }\n\n  const { systemInstructions, filteredMessages } = extractSystemInstructions(messages);\n\n  if (systemInstructions) {\n    span.setAttributes({\n      [GEN_AI_SYSTEM_INSTRUCTIONS_ATTRIBUTE]: systemInstructions,\n    });\n  }\n\n  const filteredLength = Array.isArray(filteredMessages) ? filteredMessages.length : 1;\n  span.setAttributes({\n    [GEN_AI_INPUT_MESSAGES_ATTRIBUTE]: enableTruncation\n      ? getTruncatedJsonString(filteredMessages)\n      : stringify(filteredMessages),\n    [GEN_AI_INPUT_MESSAGES_ORIGINAL_LENGTH_ATTRIBUTE]: filteredLength,\n  });\n}\n\nconst ANTHROPIC_ERROR_TYPE_TO_SPAN_STATUS: Record<string, SpanStatusType> = {\n  invalid_request_error: 'invalid_argument',\n  authentication_error: 'unauthenticated',\n  permission_error: 'permission_denied',\n  not_found_error: 'not_found',\n  request_too_large: 'failed_precondition',\n  rate_limit_error: 'resource_exhausted',\n  api_error: 'internal_error',\n  overloaded_error: 'unavailable',\n};\n\n/**\n * Map an Anthropic API error type to a SpanStatusType value.\n * @see https://docs.anthropic.com/en/api/errors#error-shapes\n */\nexport function mapAnthropicErrorToStatusMessage(errorType: string | undefined): SpanStatusType {\n  if (!errorType) {\n    return 'internal_error';\n  }\n  return ANTHROPIC_ERROR_TYPE_TO_SPAN_STATUS[errorType] || 'internal_error';\n}\n\n/**\n * Capture error information from the response\n * @see https://docs.anthropic.com/en/api/errors#error-shapes\n */\nexport function handleResponseError(span: Span, response: AnthropicAiResponse): void {\n  if (response.error) {\n    span.setStatus({ code: SPAN_STATUS_ERROR, message: mapAnthropicErrorToStatusMessage(response.error.type) });\n\n    captureException(response.error, {\n      mechanism: {\n        handled: false,\n        type: 'auto.ai.anthropic.anthropic_error',\n      },\n    });\n  }\n}\n\n/**\n * Include the system prompt in the messages list, if available\n */\nexport function messagesFromParams(params: Record<string, unknown>): unknown[] {\n  const { system, messages, input } = params;\n\n  const systemMessages = typeof system === 'string' ? [{ role: 'system', content: params.system }] : [];\n\n  const inputParamMessages = Array.isArray(input) ? input : input != null ? [input] : undefined;\n\n  const messagesParamMessages = Array.isArray(messages) ? messages : messages != null ? [messages] : [];\n\n  const userMessages = inputParamMessages ?? messagesParamMessages;\n\n  return [...systemMessages, ...userMessages];\n}\n","import { getCurrentScope, withScope } from '../currentScopes';\nimport type { Scope } from '../scope';\n\ntype BoundListener = (...args: unknown[]) => unknown;\n\n/**\n * Per-event map from a user-provided listener to its single scope-bound wrapper. We reuse one stable\n * wrapper per listener (rather than minting a new one per registration) and let the underlying\n * emitter/target handle repeat registrations:\n * - Node's `EventEmitter` allows duplicates and counts them, so registering the same wrapper N times\n *   fires N times and `removeListener` removes one instance per call — no orphaned wrappers.\n * - the DOM `EventTarget` dedupes by `(type, callback, capture)`, so reusing the wrapper preserves\n *   that idempotency; a fresh wrapper per call would defeat it and fire the listener repeatedly.\n */\ntype ListenerPatchMap = Map<string, WeakMap<BoundListener, BoundListener>>;\n\n// We patch both Node.js `EventEmitter` registration methods (`on`, `addListener`, ...) and the DOM\n// `EventTarget.addEventListener`, so this works for Node emitters and browser-native event targets.\n\n/** Listener-registration methods we patch so listeners inherit the bound scope. */\nconst ADD_LISTENER_METHODS = [\n  'addListener',\n  'on',\n  'once',\n  'prependListener',\n  'prependOnceListener',\n  'addEventListener',\n] as const;\n/** Listener-removal methods we patch so removals find the scope-bound wrapper. */\nconst REMOVE_LISTENER_METHODS = ['removeListener', 'off', 'removeEventListener'] as const;\n\n/** Symbol under which the patch map is stashed on a bound emitter. */\nconst SCOPE_BOUND_LISTENERS = Symbol('SentryScopeBoundListeners');\n\n/**\n * Minimal structural type for a Node.js-style `EventEmitter` or DOM `EventTarget`. We intentionally\n * avoid importing `node:events` so this stays usable in non-Node environments — objects without any\n * of these methods simply pass through untouched.\n */\ntype EventEmitterLike = Record<string, unknown>;\n\n// Tracks the scope-bound wrapper currently being registered. Node's `once`/`prependOnceListener`\n// synchronously re-enter `on`/`prependListener`, passing an internal \"once wrapper\" whose `.listener`\n// is our wrapper; that re-entry must not be wrapped again. We scope the guard to that exact wrapper\n// rather than using a blanket flag for the whole registration, so unrelated listeners added in the same\n// synchronous window — e.g. from a Node `newListener` handler, or on another bound emitter — are still\n// wrapped and keep their scope. Binding is synchronous, so a module-level value (with save/restore for\n// nesting) is safe here.\nlet registeringWrapper: BoundListener | undefined;\n\n// True when `listener` is the wrapper we're mid-registering, or a Node once-wrapper around it (Node sets\n// `.listener` on the once-wrapper to the function we passed). These are the only re-entrant adds to skip.\nfunction isReentrantWrapperRegistration(listener: BoundListener): boolean {\n  return (\n    registeringWrapper !== undefined &&\n    (listener === registeringWrapper || (listener as { listener?: unknown }).listener === registeringWrapper)\n  );\n}\n\n/**\n * Binds a scope to the given event emitter, so that any listener added to it runs with that scope\n * (and therefore the active span) active — even if the listener fires later, in a different async\n * context.\n *\n * By default the currently active scope is bound, captured at the time this function is called.\n * Pass an explicit `scope` to bind a different one.\n *\n * This is useful when instrumenting APIs that hand back an event emitter (e.g. a streamed database\n * query) whose `'data'` / `'error'` / `'end'` listeners would otherwise lose the trace context.\n *\n * Works with both Node.js `EventEmitter`s (`on`, `addListener`, ...) and DOM `EventTarget`s\n * (`addEventListener`). Objects exposing none of these methods are returned untouched.\n *\n * The isolation scope is intentionally not captured — it is carried along by the active async\n * context. This mirrors the event-emitter behavior of OpenTelemetry's `ContextManager.bind`.\n */\nexport function bindScopeToEmitter<T extends object>(emitter: T, scope: Scope = getCurrentScope()): T {\n  const ee = emitter as EventEmitterLike;\n\n  // Already bound -> nothing to do.\n  if (getPatchMap(ee)) {\n    return emitter;\n  }\n\n  createPatchMap(ee);\n\n  for (const methodName of ADD_LISTENER_METHODS) {\n    if (typeof ee[methodName] !== 'function') {\n      continue;\n    }\n    ee[methodName] = patchAddListener(ee, ee[methodName] as BoundListener, scope);\n  }\n\n  for (const methodName of REMOVE_LISTENER_METHODS) {\n    if (typeof ee[methodName] !== 'function') {\n      continue;\n    }\n    ee[methodName] = patchRemoveListener(ee, ee[methodName] as BoundListener);\n  }\n\n  if (typeof ee.removeAllListeners === 'function') {\n    ee.removeAllListeners = patchRemoveAllListeners(ee, ee.removeAllListeners as BoundListener);\n  }\n\n  return emitter;\n}\n\n/** Wraps a listener so it runs with the given scope active. */\nfunction bindListenerToScope(listener: BoundListener, scope: Scope): BoundListener {\n  return function (this: unknown, ...args: unknown[]) {\n    return withScope(scope, () => listener.apply(this, args));\n  };\n}\n\nfunction isBoundListener(listener: unknown): listener is BoundListener {\n  return typeof listener === 'function';\n}\n\nfunction patchAddListener(ee: EventEmitterLike, original: BoundListener, scope: Scope): BoundListener {\n  return function (this: unknown, ...args: unknown[]) {\n    const event = args[0] as string;\n    const listener = args[1];\n    // Extra args (e.g. the `options` argument of `addEventListener`) must be forwarded verbatim.\n    const rest = args.slice(2);\n\n    // Pass through what we must not wrap: non-function listeners (e.g. `EventListener` objects passed to\n    // `addEventListener`) and the re-entrant once-wrapper registration. Anything else is wrapped, even\n    // when added synchronously mid-registration.\n    if (!isBoundListener(listener) || isReentrantWrapperRegistration(listener)) {\n      return original.apply(this, args);\n    }\n\n    const map = getPatchMap(ee) || createPatchMap(ee);\n    let listeners = map.get(event);\n    if (!listeners) {\n      listeners = new WeakMap();\n      map.set(event, listeners);\n    }\n\n    // Reuse one stable wrapper per listener so repeat registrations are handled correctly by the\n    // underlying emitter/target (Node counts duplicates; the DOM dedupes by `(callback, capture)`).\n    let boundListener = listeners.get(listener);\n    if (!boundListener) {\n      boundListener = bindListenerToScope(listener, scope);\n      listeners.set(listener, boundListener);\n    }\n\n    const previous = registeringWrapper;\n    registeringWrapper = boundListener;\n    try {\n      return original.call(this, event, boundListener, ...rest);\n    } finally {\n      registeringWrapper = previous;\n    }\n  };\n}\n\n// Unlike `patchRemoveAllListeners`, this intentionally leaves the map entry in place: Node counts\n// duplicate registrations, so the same wrapper may still be registered after removing one instance,\n// and later `removeListener` calls need the mapping to find it. The entry is in a `WeakMap` keyed by\n// the user listener, so it is GC'd once the user drops their reference — no manual cleanup needed.\nfunction patchRemoveListener(ee: EventEmitterLike, original: BoundListener): BoundListener {\n  return function (this: unknown, ...args: unknown[]) {\n    const event = args[0] as string;\n    const listener = args[1];\n    const rest = args.slice(2);\n\n    const boundListener = isBoundListener(listener) ? getPatchMap(ee)?.get(event)?.get(listener) : undefined;\n    if (!boundListener) {\n      return original.apply(this, args);\n    }\n    // Pass the same stable wrapper and forward the caller's extra args (e.g. the `capture` option of\n    // `removeEventListener`) unchanged, so the emitter/target matches the right registration itself.\n    return original.call(this, event, boundListener, ...rest);\n  };\n}\n\n// Safe to drop map entries here (unlike `patchRemoveListener`): this removes *every* listener for the\n// event at once, so no registration referencing those wrappers remains. It also reclaims keys from the\n// strong outer `Map` (keyed by event-name strings), which would otherwise accumulate indefinitely.\nfunction patchRemoveAllListeners(ee: EventEmitterLike, original: BoundListener): BoundListener {\n  return function (this: unknown, ...args: unknown[]) {\n    const map = getPatchMap(ee);\n    if (map) {\n      if (args.length === 0) {\n        // `removeAllListeners()` with no event clears everything -> reset the map.\n        createPatchMap(ee);\n      } else {\n        const event = args[0] as string;\n        map.delete(event);\n      }\n    }\n    return original.apply(this, args);\n  };\n}\n\nfunction createPatchMap(ee: EventEmitterLike): ListenerPatchMap {\n  const map: ListenerPatchMap = new Map();\n  (ee as Record<symbol, ListenerPatchMap>)[SCOPE_BOUND_LISTENERS] = map;\n  return map;\n}\n\nfunction getPatchMap(ee: EventEmitterLike): ListenerPatchMap | undefined {\n  return (ee as Record<symbol, ListenerPatchMap | undefined>)[SCOPE_BOUND_LISTENERS];\n}\n","import type { Client } from '../client';\nimport type { Scope } from '../scope';\nimport type { Span } from '../types/span';\nimport { debounce } from '../utils/debounce';\nimport { getSegmentSpanCaptureStrategy, setSegmentSpanCaptureStrategy } from './segmentSpanCaptureStrategy';\nimport type { SegmentSpanConverter } from './segmentSpanCaptureStrategy';\n\n// Spans already sent in a transaction, so a child ending after its segment can be emitted as its own\n// orphan transaction instead of being dropped or sent twice.\nconst CAPTURED_SPANS = new WeakSet<Span>();\nconst isSpanAlreadyCaptured = (span: Span): boolean => CAPTURED_SPANS.has(span);\nconst markSpanCaptured = (span: Span): void => {\n  CAPTURED_SPANS.add(span);\n};\n\n// One debounced queue per client, drained on the client's `flush`/`close`. Mirrors the OpenTelemetry\n// span exporter, which holds one such buffer per instance, and the debounce window matches it. The\n// capturing client is resolved from the span's captured scope and bound when the span ends, not\n// re-resolved at drain time, so a deferred transaction lands on the client that created the span even if\n// the current client (or the captured scope's own client) is reassigned before the debounce fires.\nconst CLIENT_QUEUES = new WeakMap<Client, (capture: () => void) => void>();\n\n/**\n * @private Private API with no semver guarantees!\n *\n * Enable deferred segment-span transaction capture for a client: create its debounced queue and\n * register the strategy (idempotent).\n *\n * `SentrySpan` otherwise assembles the transaction synchronously the instant a segment span ends, which\n * drops children whose async instrumentation closes them later (a diagnostics-channel `asyncEnd`\n * callback in the same tick, or engine spans replayed on a later tick). The debounced snapshot delays\n * capture just enough for those later span ends to land first; a child that still ends after it is\n * emitted as its own orphan transaction. Pending captures drain on the client's `flush` hook, so\n * `Sentry.flush()` / `client.close()` cannot resolve before they run.\n */\nexport function _INTERNAL_setDeferSegmentSpanCapture(client: Client): void {\n  if (!getSegmentSpanCaptureStrategy()) {\n    setSegmentSpanCaptureStrategy(deferredSegmentSpanCaptureStrategy);\n  }\n  if (CLIENT_QUEUES.has(client)) {\n    return;\n  }\n\n  const pendingCaptures = new Set<() => void>();\n  const debouncedDrain = debounce(\n    () => {\n      const captures = [...pendingCaptures];\n      pendingCaptures.clear();\n      for (const capture of captures) {\n        capture();\n      }\n    },\n    1,\n    { maxWait: 100 },\n  );\n\n  client.on('flush', () => {\n    debouncedDrain.flush();\n  });\n\n  CLIENT_QUEUES.set(client, capture => {\n    pendingCaptures.add(capture);\n    debouncedDrain();\n  });\n}\n\nconst deferredSegmentSpanCaptureStrategy = {\n  onSegmentSpanEnded(convert: SegmentSpanConverter, scope: Scope): void {\n    const client = scope.getClient();\n    const enqueue = client && CLIENT_QUEUES.get(client);\n    if (!enqueue) {\n      // The capturing client didn't enable deferral: capture synchronously.\n      const transactionEvent = convert();\n      if (transactionEvent) {\n        client?.captureEvent(transactionEvent);\n      }\n      return;\n    }\n\n    enqueue(() => {\n      const transactionEvent = convert({ isSpanAlreadyCaptured, onSpanCaptured: markSpanCaptured });\n      if (transactionEvent) {\n        client.captureEvent(transactionEvent);\n      }\n    });\n  },\n\n  onChildSpanEnded(span: Span, rootSpan: Span, convert: SegmentSpanConverter, scope: Scope): void {\n    // Only a late child of an already-captured segment is an orphan. Inert under span streaming, where\n    // `CAPTURED_SPANS` is never populated.\n    if (CAPTURED_SPANS.has(span) || !CAPTURED_SPANS.has(rootSpan)) {\n      return;\n    }\n\n    const client = scope.getClient();\n    const enqueue = client && CLIENT_QUEUES.get(client);\n\n    const captureOrphan = (): void => {\n      const transactionEvent = convert({ isSpanAlreadyCaptured, onSpanCaptured: markSpanCaptured });\n      if (transactionEvent?.contexts?.trace?.data) {\n        // Tag orphans so they're distinguishable downstream (mirrors the OTel span exporter).\n        transactionEvent.contexts.trace.data['sentry.parent_span_already_sent'] = true;\n      }\n      if (transactionEvent) {\n        client?.captureEvent(transactionEvent);\n      }\n    };\n\n    // Defer when the capturing client batches; otherwise emit now so the orphan isn't dropped.\n    if (enqueue) {\n      enqueue(captureOrphan);\n    } else {\n      captureOrphan();\n    }\n  },\n};\n","import type { Client } from '../client';\nimport { DEFAULT_ENVIRONMENT } from '../constants';\nimport { getClient } from '../currentScopes';\nimport type { Scope } from '../scope';\nimport {\n  SEMANTIC_ATTRIBUTE_SENTRY_PREVIOUS_TRACE_SAMPLE_RATE,\n  SEMANTIC_ATTRIBUTE_SENTRY_SAMPLE_RATE,\n  SEMANTIC_ATTRIBUTE_SENTRY_SOURCE,\n} from '../semanticAttributes';\nimport type { DynamicSamplingContext } from '../types/envelope';\nimport type { Span } from '../types/span';\nimport { baggageHeaderToDynamicSamplingContext, dynamicSamplingContextToSentryBaggageHeader } from '../utils/baggage';\nimport { extractOrgIdFromClient } from '../utils/dsn';\nimport { hasSpansEnabled } from '../utils/hasSpansEnabled';\nimport { addNonEnumerableProperty } from '../utils/object';\nimport { getRootSpan, spanIsSampled, spanToJSON } from '../utils/spanUtils';\nimport { spanIsNonRecordingSpan } from './sentryNonRecordingSpan';\nimport { getCapturedScopesOnSpan } from './utils';\n\n/**\n * If you change this value, also update the terser plugin config to\n * avoid minification of the object property!\n */\nconst FROZEN_DSC_FIELD = '_frozenDsc';\n\ntype SpanWithMaybeDsc = Span & {\n  [FROZEN_DSC_FIELD]?: Partial<DynamicSamplingContext> | undefined;\n};\n\n/**\n * Freeze the given DSC on the given span.\n */\nexport function freezeDscOnSpan(span: Span, dsc: Partial<DynamicSamplingContext>): void {\n  const spanWithMaybeDsc = span as SpanWithMaybeDsc;\n  addNonEnumerableProperty(spanWithMaybeDsc, FROZEN_DSC_FIELD, dsc);\n}\n\n/**\n * Creates a dynamic sampling context from a client.\n *\n * Dispatches the `createDsc` lifecycle hook as a side effect.\n */\nexport function getDynamicSamplingContextFromClient(trace_id: string, client: Client): DynamicSamplingContext {\n  const options = client.getOptions();\n\n  const { publicKey: public_key } = client.getDsn() || {};\n\n  // Instead of conditionally adding non-undefined values, we add them and then remove them if needed\n  // otherwise, the order of baggage entries changes, which \"breaks\" a bunch of tests etc.\n  const dsc: DynamicSamplingContext = {\n    environment: options.environment || DEFAULT_ENVIRONMENT,\n    release: options.release,\n    public_key,\n    trace_id,\n    org_id: extractOrgIdFromClient(client),\n  };\n\n  client.emit('createDsc', dsc);\n\n  return dsc;\n}\n\n/**\n * Get the dynamic sampling context for the currently active scopes.\n */\nexport function getDynamicSamplingContextFromScope(client: Client, scope: Scope): Partial<DynamicSamplingContext> {\n  const propagationContext = scope.getPropagationContext();\n  return propagationContext.dsc || getDynamicSamplingContextFromClient(propagationContext.traceId, client);\n}\n\n/**\n * Creates a dynamic sampling context from a span (and client and scope)\n *\n * @param span the span from which a few values like the root span name and sample rate are extracted.\n *\n * @returns a dynamic sampling context\n */\nexport function getDynamicSamplingContextFromSpan(span: Span): Readonly<Partial<DynamicSamplingContext>> {\n  const client = getClient();\n  if (!client) {\n    return {};\n  }\n\n  const rootSpan = getRootSpan(span);\n  const rootSpanJson = spanToJSON(rootSpan);\n  const rootSpanAttributes = rootSpanJson.data;\n  const traceState = rootSpan.spanContext().traceState;\n\n  // The span sample rate that was locally applied to the root span should also always be applied to the DSC, even if the DSC is frozen.\n  // This is so that the downstream traces/services can use parentSampleRate in their `tracesSampler` to make consistent sampling decisions across the entire trace.\n  const rootSpanSampleRate =\n    traceState?.get('sentry.sample_rate') ??\n    rootSpanAttributes[SEMANTIC_ATTRIBUTE_SENTRY_SAMPLE_RATE] ??\n    rootSpanAttributes[SEMANTIC_ATTRIBUTE_SENTRY_PREVIOUS_TRACE_SAMPLE_RATE];\n\n  function applyLocalSampleRateToDsc(dsc: Partial<DynamicSamplingContext>): Partial<DynamicSamplingContext> {\n    if (typeof rootSpanSampleRate === 'number' || typeof rootSpanSampleRate === 'string') {\n      dsc.sample_rate = `${rootSpanSampleRate}`;\n    }\n    return dsc;\n  }\n\n  // For core implementation, we freeze the DSC onto the span as a non-enumerable property\n  const frozenDsc = (rootSpan as SpanWithMaybeDsc)[FROZEN_DSC_FIELD];\n  if (frozenDsc) {\n    return applyLocalSampleRateToDsc(frozenDsc);\n  }\n\n  // For a non-recording placeholder in Tracing without Performance (TwP) mode or an ignored segment,\n  // the DSC is not carried on the span; the scope is the source of truth. Resolve it from the span's\n  // captured scope so continued traces keep their incoming DSC.\n  //\n  // We gate this on `!hasSpansEnabled()` so it mirrors the `sentry-trace` source in `getTraceData`:\n  // with tracing enabled, other non-recording spans (e.g. an `onlyIfParent` placeholder) keep deriving\n  // their DSC from the span/client. Ignored segments are an explicit exception: they preserve the\n  // incoming DSC but override its sampling decision to agree with the propagated `sentry-trace`.\n  //\n  // We spread into a new object so applying the local sample rate can't mutate the scope's DSC.\n  const isNonRecordingRoot = spanIsNonRecordingSpan(rootSpan);\n  const isIgnoredRoot = isNonRecordingRoot && rootSpan.dropReason === 'ignored';\n  if (isNonRecordingRoot && (!hasSpansEnabled(client.getOptions()) || isIgnoredRoot)) {\n    const capturedScope = getCapturedScopesOnSpan(rootSpan).scope;\n    if (capturedScope) {\n      const dsc = { ...getDynamicSamplingContextFromScope(client, capturedScope) };\n      if (isIgnoredRoot) {\n        dsc.sampled = 'false';\n      }\n      return applyLocalSampleRateToDsc(dsc);\n    }\n  }\n\n  // For OpenTelemetry, we freeze the DSC on the trace state\n  const traceStateDsc = traceState?.get('sentry.dsc');\n\n  // If the span has a DSC, we want it to take precedence\n  const dscOnTraceState = traceStateDsc && baggageHeaderToDynamicSamplingContext(traceStateDsc);\n\n  if (dscOnTraceState) {\n    return applyLocalSampleRateToDsc(dscOnTraceState);\n  }\n\n  // Else, we generate it from the span\n  const dsc = getDynamicSamplingContextFromClient(span.spanContext().traceId, client);\n\n  // We don't want to have a transaction name in the DSC if the source is \"url\" because URLs might contain PII\n  // TODO(v11): Only read `SENTRY_SEGMENT_NAME_SOURCE` once we removed `SEMANTIC_ATTRIBUTE_SENTRY_SOURCE`\n  const source =\n    rootSpanAttributes[SEMANTIC_ATTRIBUTE_SENTRY_SOURCE] ?? rootSpanAttributes['sentry.segment.name.source'];\n\n  // after JSON conversion, txn.name becomes jsonSpan.description\n  const name = rootSpanJson.description;\n  if (source !== 'url' && name) {\n    dsc.transaction = name;\n  }\n\n  // How can we even land here with hasSpansEnabled() returning false?\n  // Otel creates a Non-recording span in Tracing Without Performance mode when handling incoming requests\n  // So we end up with an active span that is not sampled (neither positively nor negatively)\n  if (hasSpansEnabled()) {\n    dsc.sampled = String(spanIsSampled(rootSpan));\n    dsc.sample_rand =\n      // In OTEL we store the sample rand on the trace state because we cannot access scopes for NonRecordingSpans\n      // The Sentry OTEL SpanSampler takes care of writing the sample rand on the root span\n      traceState?.get('sentry.sample_rand') ??\n      // On all other platforms we can actually get the scopes from a root span (we use this as a fallback)\n      getCapturedScopesOnSpan(rootSpan).scope?.getPropagationContext().sampleRand.toString();\n  }\n\n  applyLocalSampleRateToDsc(dsc);\n\n  client.emit('createDsc', dsc, rootSpan);\n\n  return dsc;\n}\n\n/**\n * Convert a Span to a baggage header.\n */\nexport function spanToBaggageHeader(span: Span): string | undefined {\n  const dsc = getDynamicSamplingContextFromSpan(span);\n  return dynamicSamplingContextToSentryBaggageHeader(dsc);\n}\n","import { DEBUG_BUILD } from '../debug-build';\nimport { addGlobalErrorInstrumentationHandler } from '../instrument/globalError';\nimport { addGlobalUnhandledRejectionInstrumentationHandler } from '../instrument/globalUnhandledRejection';\nimport { debug } from '../utils/debug-logger';\nimport { getActiveSpan, getRootSpan } from '../utils/spanUtils';\nimport { SPAN_STATUS_ERROR } from './spanstatus';\n\nlet errorsInstrumented = false;\n\n/**  Only exposed for testing */\nexport function _resetErrorsInstrumented(): void {\n  errorsInstrumented = false;\n}\n\n/**\n * Ensure that global errors automatically set the active span status.\n */\nexport function registerSpanErrorInstrumentation(): void {\n  if (errorsInstrumented) {\n    return;\n  }\n\n  /**\n   * If an error or unhandled promise occurs, we mark the active root span as failed\n   */\n  function errorCallback(): void {\n    const activeSpan = getActiveSpan();\n    const rootSpan = activeSpan && getRootSpan(activeSpan);\n    if (rootSpan) {\n      const message = 'internal_error';\n      DEBUG_BUILD && debug.log(`[Tracing] Root span: ${message} -> Global error occurred`);\n      rootSpan.setStatus({ code: SPAN_STATUS_ERROR, message });\n    }\n  }\n\n  errorsInstrumented = true;\n  addGlobalErrorInstrumentationHandler(errorCallback);\n  addGlobalUnhandledRejectionInstrumentationHandler(errorCallback);\n}\n","import type { InstrumentedMethodRegistry } from '../ai/utils';\n\nexport const GOOGLE_GENAI_INTEGRATION_NAME = 'Google_GenAI' as const;\n\n// https://ai.google.dev/api/rest/v1/models/generateContent\n// https://ai.google.dev/api/rest/v1/chats/sendMessage\n// https://googleapis.github.io/js-genai/release_docs/classes/models.Models.html#generatecontentstream\n// https://googleapis.github.io/js-genai/release_docs/classes/chats.Chat.html#sendmessagestream\nexport const GOOGLE_GENAI_METHOD_REGISTRY = {\n  'models.generateContent': { operation: 'generate_content' },\n  'models.generateContentStream': { operation: 'generate_content', streaming: true },\n  'models.embedContent': { operation: 'embeddings' },\n  'chats.create': { proxyResultPath: 'chat' },\n  'chat.sendMessage': { operation: 'chat' },\n  'chat.sendMessageStream': { operation: 'chat', streaming: true },\n} as const satisfies InstrumentedMethodRegistry;\n\n// Constants for internal use\nexport const GOOGLE_GENAI_SYSTEM_NAME = 'google_genai';\n","/* eslint-disable max-lines */\nimport { SEMANTIC_ATTRIBUTE_SENTRY_ORIGIN } from '../../semanticAttributes';\nimport { SPAN_STATUS_ERROR } from '../../tracing';\nimport { startSpan, startSpanManual } from '../../tracing/trace';\nimport type { Span, SpanAttributeValue } from '../../types/span';\nimport { handleCallbackErrors } from '../../utils/handleCallbackErrors';\nimport {\n  GEN_AI_EMBEDDINGS_INPUT_ATTRIBUTE,\n  GEN_AI_INPUT_MESSAGES_ATTRIBUTE,\n  GEN_AI_INPUT_MESSAGES_ORIGINAL_LENGTH_ATTRIBUTE,\n  GEN_AI_OPERATION_NAME_ATTRIBUTE,\n  GEN_AI_REQUEST_AVAILABLE_TOOLS_ATTRIBUTE,\n  GEN_AI_REQUEST_FREQUENCY_PENALTY_ATTRIBUTE,\n  GEN_AI_REQUEST_MAX_TOKENS_ATTRIBUTE,\n  GEN_AI_REQUEST_MODEL_ATTRIBUTE,\n  GEN_AI_REQUEST_PRESENCE_PENALTY_ATTRIBUTE,\n  GEN_AI_REQUEST_TEMPERATURE_ATTRIBUTE,\n  GEN_AI_REQUEST_TOP_K_ATTRIBUTE,\n  GEN_AI_REQUEST_TOP_P_ATTRIBUTE,\n  GEN_AI_RESPONSE_MODEL_ATTRIBUTE,\n  GEN_AI_RESPONSE_TEXT_ATTRIBUTE,\n  GEN_AI_RESPONSE_TOOL_CALLS_ATTRIBUTE,\n  GEN_AI_SYSTEM_ATTRIBUTE,\n  GEN_AI_SYSTEM_INSTRUCTIONS_ATTRIBUTE,\n  GEN_AI_USAGE_INPUT_TOKENS_ATTRIBUTE,\n  GEN_AI_USAGE_OUTPUT_TOKENS_ATTRIBUTE,\n  GEN_AI_USAGE_TOTAL_TOKENS_ATTRIBUTE,\n} from '../ai/gen-ai-attributes';\nimport type { InstrumentedMethodEntry } from '../ai/utils';\nimport { stringify } from '../../utils/string';\nimport {\n  buildMethodPath,\n  extractSystemInstructions,\n  getTruncatedJsonString,\n  resolveAIRecordingOptions,\n  shouldEnableTruncation,\n} from '../ai/utils';\nimport { GOOGLE_GENAI_METHOD_REGISTRY, GOOGLE_GENAI_SYSTEM_NAME } from './constants';\nimport { instrumentStream } from './streaming';\nimport type { Candidate, ContentPart, GoogleGenAIOptions, GoogleGenAIResponse } from './types';\nimport type { ContentListUnion, ContentUnion, Message, PartListUnion } from './utils';\nimport { contentUnionToMessages } from './utils';\n\n/**\n * Extract model from parameters or chat context object\n * For chat instances, the model is available on the chat object as 'model' (older versions) or 'modelVersion' (newer versions)\n */\nexport function extractModel(params: Record<string, unknown>, context?: unknown): string {\n  if ('model' in params && typeof params.model === 'string') {\n    return params.model;\n  }\n\n  // Try to get model from chat context object (chat instance has model property)\n  if (context && typeof context === 'object') {\n    const contextObj = context as Record<string, unknown>;\n\n    // Check for 'model' property (older versions, and streaming)\n    if ('model' in contextObj && typeof contextObj.model === 'string') {\n      return contextObj.model;\n    }\n\n    // Check for 'modelVersion' property (newer versions)\n    if ('modelVersion' in contextObj && typeof contextObj.modelVersion === 'string') {\n      return contextObj.modelVersion;\n    }\n  }\n\n  return 'unknown';\n}\n\n/**\n * Extract generation config parameters\n */\nfunction extractConfigAttributes(config: Record<string, unknown>): Record<string, SpanAttributeValue> {\n  const attributes: Record<string, SpanAttributeValue> = {};\n\n  if ('temperature' in config && typeof config.temperature === 'number') {\n    attributes[GEN_AI_REQUEST_TEMPERATURE_ATTRIBUTE] = config.temperature;\n  }\n  if ('topP' in config && typeof config.topP === 'number') {\n    attributes[GEN_AI_REQUEST_TOP_P_ATTRIBUTE] = config.topP;\n  }\n  if ('topK' in config && typeof config.topK === 'number') {\n    attributes[GEN_AI_REQUEST_TOP_K_ATTRIBUTE] = config.topK;\n  }\n  if ('maxOutputTokens' in config && typeof config.maxOutputTokens === 'number') {\n    attributes[GEN_AI_REQUEST_MAX_TOKENS_ATTRIBUTE] = config.maxOutputTokens;\n  }\n  if ('frequencyPenalty' in config && typeof config.frequencyPenalty === 'number') {\n    attributes[GEN_AI_REQUEST_FREQUENCY_PENALTY_ATTRIBUTE] = config.frequencyPenalty;\n  }\n  if ('presencePenalty' in config && typeof config.presencePenalty === 'number') {\n    attributes[GEN_AI_REQUEST_PRESENCE_PENALTY_ATTRIBUTE] = config.presencePenalty;\n  }\n\n  return attributes;\n}\n\n/**\n * Extract request attributes from method arguments\n * Builds the base attributes for span creation including system info, model, and config\n */\nexport function extractRequestAttributes(\n  operationName: string,\n  params?: Record<string, unknown>,\n  context?: unknown,\n): Record<string, SpanAttributeValue> {\n  const attributes: Record<string, SpanAttributeValue> = {\n    [GEN_AI_SYSTEM_ATTRIBUTE]: GOOGLE_GENAI_SYSTEM_NAME,\n    [GEN_AI_OPERATION_NAME_ATTRIBUTE]: operationName,\n    [SEMANTIC_ATTRIBUTE_SENTRY_ORIGIN]: 'auto.ai.google_genai',\n  };\n\n  if (params) {\n    attributes[GEN_AI_REQUEST_MODEL_ATTRIBUTE] = extractModel(params, context);\n\n    // Extract generation config parameters\n    if ('config' in params && typeof params.config === 'object' && params.config) {\n      const config = params.config as Record<string, unknown>;\n      Object.assign(attributes, extractConfigAttributes(config));\n\n      // Extract available tools from config\n      if ('tools' in config && Array.isArray(config.tools)) {\n        const functionDeclarations = config.tools.flatMap(\n          (tool: { functionDeclarations: unknown[] }) => tool.functionDeclarations,\n        );\n        attributes[GEN_AI_REQUEST_AVAILABLE_TOOLS_ATTRIBUTE] = JSON.stringify(functionDeclarations);\n      }\n    }\n  } else {\n    attributes[GEN_AI_REQUEST_MODEL_ATTRIBUTE] = extractModel({}, context);\n  }\n\n  return attributes;\n}\n\n/**\n * Add private request attributes to spans.\n * This is only recorded if recordInputs is true.\n * Handles different parameter formats for different Google GenAI methods.\n */\nexport function addPrivateRequestAttributes(\n  span: Span,\n  params: Record<string, unknown>,\n  operationName: string,\n  enableTruncation: boolean,\n): void {\n  if (operationName === 'embeddings') {\n    const contents = params.contents;\n    if (contents != null) {\n      span.setAttribute(\n        GEN_AI_EMBEDDINGS_INPUT_ATTRIBUTE,\n        typeof contents === 'string' ? contents : JSON.stringify(contents),\n      );\n    }\n    return;\n  }\n\n  const messages: Message[] = [];\n\n  // config.systemInstruction: ContentUnion\n  if (\n    'config' in params &&\n    params.config &&\n    typeof params.config === 'object' &&\n    'systemInstruction' in params.config &&\n    params.config.systemInstruction\n  ) {\n    messages.push(...contentUnionToMessages(params.config.systemInstruction as ContentUnion, 'system'));\n  }\n\n  // For chats.create: history contains the conversation history\n  if ('history' in params) {\n    messages.push(...contentUnionToMessages(params.history as PartListUnion, 'user'));\n  }\n\n  // For models.generateContent: ContentListUnion\n  if ('contents' in params) {\n    messages.push(...contentUnionToMessages(params.contents as ContentListUnion, 'user'));\n  }\n\n  // For chat.sendMessage: message can be PartListUnion\n  if ('message' in params) {\n    messages.push(...contentUnionToMessages(params.message as PartListUnion, 'user'));\n  }\n\n  if (Array.isArray(messages) && messages.length) {\n    const { systemInstructions, filteredMessages } = extractSystemInstructions(messages);\n\n    if (systemInstructions) {\n      span.setAttribute(GEN_AI_SYSTEM_INSTRUCTIONS_ATTRIBUTE, systemInstructions);\n    }\n\n    const filteredLength = Array.isArray(filteredMessages) ? filteredMessages.length : 0;\n    span.setAttributes({\n      [GEN_AI_INPUT_MESSAGES_ORIGINAL_LENGTH_ATTRIBUTE]: filteredLength,\n      [GEN_AI_INPUT_MESSAGES_ATTRIBUTE]: enableTruncation\n        ? getTruncatedJsonString(filteredMessages)\n        : stringify(filteredMessages),\n    });\n  }\n}\n\n/**\n * Add response attributes from the Google GenAI response\n * @see https://github.com/googleapis/js-genai/blob/v1.19.0/src/types.ts#L2313\n */\nexport function addResponseAttributes(span: Span, response: GoogleGenAIResponse, recordOutputs?: boolean): void {\n  if (!response || typeof response !== 'object') return;\n\n  if (response.modelVersion) {\n    span.setAttribute(GEN_AI_RESPONSE_MODEL_ATTRIBUTE, response.modelVersion);\n  }\n\n  // Add usage metadata if present\n  if (response.usageMetadata && typeof response.usageMetadata === 'object') {\n    const usage = response.usageMetadata;\n    if (typeof usage.promptTokenCount === 'number') {\n      span.setAttributes({\n        [GEN_AI_USAGE_INPUT_TOKENS_ATTRIBUTE]: usage.promptTokenCount,\n      });\n    }\n    if (typeof usage.candidatesTokenCount === 'number') {\n      span.setAttributes({\n        [GEN_AI_USAGE_OUTPUT_TOKENS_ATTRIBUTE]: usage.candidatesTokenCount,\n      });\n    }\n    if (typeof usage.totalTokenCount === 'number') {\n      span.setAttributes({\n        [GEN_AI_USAGE_TOTAL_TOKENS_ATTRIBUTE]: usage.totalTokenCount,\n      });\n    }\n  }\n\n  // Add response text if recordOutputs is enabled\n  if (recordOutputs && Array.isArray(response.candidates) && response.candidates.length > 0) {\n    const responseTexts = response.candidates\n      .map((candidate: Candidate) => {\n        if (candidate.content?.parts && Array.isArray(candidate.content.parts)) {\n          return candidate.content.parts\n            .map((part: ContentPart) => (typeof part.text === 'string' ? part.text : ''))\n            .filter((text: string) => text.length > 0)\n            .join('');\n        }\n        return '';\n      })\n      .filter((text: string) => text.length > 0);\n\n    if (responseTexts.length > 0) {\n      span.setAttributes({\n        [GEN_AI_RESPONSE_TEXT_ATTRIBUTE]: responseTexts.join(''),\n      });\n    }\n  }\n\n  // Add tool calls if recordOutputs is enabled\n  if (recordOutputs && response.functionCalls) {\n    const functionCalls = response.functionCalls;\n    if (Array.isArray(functionCalls) && functionCalls.length > 0) {\n      span.setAttributes({\n        [GEN_AI_RESPONSE_TOOL_CALLS_ATTRIBUTE]: JSON.stringify(functionCalls),\n      });\n    }\n  }\n}\n\n/**\n * Instrument any async or synchronous genai method with Sentry spans\n * Handles operations like models.generateContent and chat.sendMessage and chats.create\n * @see https://docs.sentry.io/platforms/javascript/guides/node/tracing/instrumentation/ai-agents-module/#manual-instrumentation\n */\nfunction instrumentMethod<T extends unknown[], R>(\n  originalMethod: (...args: T) => R | Promise<R>,\n  methodPath: string,\n  instrumentedMethod: InstrumentedMethodEntry,\n  context: unknown,\n  options: GoogleGenAIOptions,\n): (...args: T) => R | Promise<R> {\n  const isEmbeddings = instrumentedMethod.operation === 'embeddings';\n\n  return new Proxy(originalMethod, {\n    apply(target, _, args: T): R | Promise<R> {\n      const operationName = instrumentedMethod.operation || 'unknown';\n      const params = args[0] as Record<string, unknown> | undefined;\n      const requestAttributes = extractRequestAttributes(operationName, params, context);\n      const model = requestAttributes[GEN_AI_REQUEST_MODEL_ATTRIBUTE] ?? 'unknown';\n\n      // Check if this is a streaming method\n      if (instrumentedMethod.streaming) {\n        // Use startSpanManual for streaming methods to control span lifecycle\n        return startSpanManual(\n          {\n            name: `${operationName} ${model}`,\n            op: `gen_ai.${operationName}`,\n            attributes: requestAttributes,\n          },\n          async (span: Span) => {\n            try {\n              if (options.recordInputs && params) {\n                addPrivateRequestAttributes(\n                  span,\n                  params,\n                  operationName,\n                  shouldEnableTruncation(options.enableTruncation),\n                );\n              }\n              const stream = await target.apply(context, args);\n              return instrumentStream(stream, span, Boolean(options.recordOutputs)) as R;\n            } catch (error) {\n              span.setStatus({ code: SPAN_STATUS_ERROR, message: 'internal_error' });\n              span.end();\n              throw error;\n            }\n          },\n        );\n      }\n      // Single span for both sync and async operations\n      return startSpan(\n        {\n          name: `${operationName} ${model}`,\n          op: `gen_ai.${operationName}`,\n          attributes: requestAttributes,\n        },\n        (span: Span) => {\n          if (options.recordInputs && params) {\n            addPrivateRequestAttributes(span, params, operationName, shouldEnableTruncation(options.enableTruncation));\n          }\n\n          // `onError` is a no-op because the rejection is rethrown to the caller and `startSpan` already\n          // marks the span errored; both leading callbacks are positional and only exist to reach `onSuccess`.\n          return handleCallbackErrors(\n            () => target.apply(context, args),\n            () => {},\n            () => {},\n            result => {\n              // Only add response attributes for content-producing methods, not for embeddings\n              if (!isEmbeddings) {\n                addResponseAttributes(span, result, options.recordOutputs);\n              }\n            },\n          );\n        },\n      );\n    },\n  }) as (...args: T) => R | Promise<R>;\n}\n\n/**\n * Create a deep proxy for Google GenAI client instrumentation\n * Recursively instruments methods and handles special cases like chats.create\n */\nfunction createDeepProxy<T extends object>(target: T, currentPath = '', options: GoogleGenAIOptions): T {\n  return new Proxy(target, {\n    get: (t, prop, receiver) => {\n      const value = Reflect.get(t, prop, receiver);\n      const methodPath = buildMethodPath(currentPath, String(prop));\n\n      const instrumentedMethod: InstrumentedMethodEntry | undefined =\n        GOOGLE_GENAI_METHOD_REGISTRY[methodPath as keyof typeof GOOGLE_GENAI_METHOD_REGISTRY];\n      if (typeof value === 'function' && instrumentedMethod) {\n        // If an operation is specified, we need to instrument the method itself\n        const wrappedMethod = instrumentedMethod.operation\n          ? instrumentMethod(value as (...args: unknown[]) => unknown, methodPath, instrumentedMethod, t, options)\n          : value.bind(t);\n\n        if (!instrumentedMethod.proxyResultPath) {\n          return wrappedMethod;\n        }\n\n        // If a proxyResultPath is specified, we need to proxy the result of the method.\n        // Note: This currently only properly handles synchronous methods. For async methods,\n        // the Promise itself would be proxied instead of the resolved value. Currently we\n        // don't have a case where this is needed, so I'll keep it simple for now.\n        return function (...args: unknown[]): unknown {\n          const result = wrappedMethod(...args);\n          if (result && typeof result === 'object') {\n            return createDeepProxy(result as object, instrumentedMethod.proxyResultPath, options);\n          }\n          return result;\n        };\n      }\n\n      if (typeof value === 'function') {\n        // Bind non-instrumented functions to preserve the original `this` context\n        return value.bind(t);\n      }\n\n      if (value && typeof value === 'object') {\n        return createDeepProxy(value, methodPath, options);\n      }\n\n      return value;\n    },\n  });\n}\n\n/**\n * Instrument a Google GenAI client with Sentry tracing\n * Can be used across Node.js, Cloudflare Workers, and Vercel Edge\n *\n * @template T - The type of the client that extends client object\n * @param client - The Google GenAI client to instrument\n * @param options - Optional configuration for recording inputs and outputs\n * @returns The instrumented client with the same type as the input\n *\n * @example\n * ```typescript\n * import { GoogleGenAI } from '@google/genai';\n * import { instrumentGoogleGenAIClient } from '@sentry/core';\n *\n * const genAI = new GoogleGenAI({ apiKey: process.env.GOOGLE_GENAI_API_KEY });\n * const instrumentedClient = instrumentGoogleGenAIClient(genAI);\n *\n * // Now both chats.create and sendMessage will be instrumented\n * const chat = instrumentedClient.chats.create({ model: 'gemini-1.5-pro' });\n * const response = await chat.sendMessage({ message: 'Hello' });\n * ```\n */\nexport function instrumentGoogleGenAIClient<T extends object>(client: T, options?: GoogleGenAIOptions): T {\n  return createDeepProxy(client, '', resolveAIRecordingOptions(options));\n}\n","import { captureException } from '../../exports';\nimport { SPAN_STATUS_ERROR } from '../../tracing';\nimport type { Span } from '../../types/span';\nimport { endStreamSpan } from '../ai/utils';\nimport type { GoogleGenAIResponse } from './types';\n\n/**\n * State object used to accumulate information from a stream of Google GenAI events.\n */\ninterface StreamingState {\n  /** Collected response text fragments (for output recording). */\n  responseTexts: string[];\n  /** Reasons for finishing the response, as reported by the API. */\n  finishReasons: string[];\n  /** The response ID. */\n  responseId?: string;\n  /** The model name. */\n  responseModel?: string;\n  /** Number of prompt/input tokens used. */\n  promptTokens?: number;\n  /** Number of completion/output tokens used. */\n  completionTokens?: number;\n  /** Number of total tokens used. */\n  totalTokens?: number;\n  /** Accumulated tool calls (finalized) */\n  toolCalls: Array<Record<string, unknown>>;\n}\n\n/**\n * Checks if a response chunk contains an error\n * @param chunk - The response chunk to check\n * @param span - The span to update if error is found\n * @returns Whether an error occurred\n */\nfunction isErrorChunk(chunk: GoogleGenAIResponse, span: Span): boolean {\n  const feedback = chunk?.promptFeedback;\n  if (feedback?.blockReason) {\n    const message = feedback.blockReasonMessage ?? feedback.blockReason;\n    span.setStatus({ code: SPAN_STATUS_ERROR, message: 'internal_error' });\n    captureException(`Content blocked: ${message}`, {\n      mechanism: { handled: false, type: 'auto.ai.google_genai' },\n    });\n    return true;\n  }\n  return false;\n}\n\n/**\n * Processes response metadata from a chunk\n * @param chunk - The response chunk to process\n * @param state - The state of the streaming process\n */\nfunction handleResponseMetadata(chunk: GoogleGenAIResponse, state: StreamingState): void {\n  if (typeof chunk.responseId === 'string') state.responseId = chunk.responseId;\n  if (typeof chunk.modelVersion === 'string') state.responseModel = chunk.modelVersion;\n\n  const usage = chunk.usageMetadata;\n  if (usage) {\n    if (typeof usage.promptTokenCount === 'number') state.promptTokens = usage.promptTokenCount;\n    if (typeof usage.candidatesTokenCount === 'number') state.completionTokens = usage.candidatesTokenCount;\n    if (typeof usage.totalTokenCount === 'number') state.totalTokens = usage.totalTokenCount;\n  }\n}\n\n/**\n * Processes candidate content from a response chunk\n * @param chunk - The response chunk to process\n * @param state - The state of the streaming process\n * @param recordOutputs - Whether to record outputs\n */\nfunction handleCandidateContent(chunk: GoogleGenAIResponse, state: StreamingState, recordOutputs: boolean): void {\n  if (Array.isArray(chunk.functionCalls)) {\n    state.toolCalls.push(...chunk.functionCalls);\n  }\n\n  for (const candidate of chunk.candidates ?? []) {\n    if (candidate?.finishReason && !state.finishReasons.includes(candidate.finishReason)) {\n      state.finishReasons.push(candidate.finishReason);\n    }\n\n    for (const part of candidate?.content?.parts ?? []) {\n      if (recordOutputs && part.text) state.responseTexts.push(part.text);\n      if (part.functionCall) {\n        state.toolCalls.push({\n          type: 'function',\n          id: part.functionCall.id,\n          name: part.functionCall.name,\n          arguments: part.functionCall.args,\n        });\n      }\n    }\n  }\n}\n\n/**\n * Processes a single chunk from the Google GenAI stream\n * @param chunk - The chunk to process\n * @param state - The state of the streaming process\n * @param recordOutputs - Whether to record outputs\n * @param span - The span to update\n */\nfunction processChunk(chunk: GoogleGenAIResponse, state: StreamingState, recordOutputs: boolean, span: Span): void {\n  if (!chunk || isErrorChunk(chunk, span)) return;\n  handleResponseMetadata(chunk, state);\n  handleCandidateContent(chunk, state, recordOutputs);\n}\n\n/**\n * Instruments an async iterable stream of Google GenAI response chunks, updates the span with\n * streaming attributes and (optionally) the aggregated output text, and yields\n * each chunk from the input stream unchanged.\n */\nexport async function* instrumentStream(\n  stream: AsyncIterable<GoogleGenAIResponse>,\n  span: Span,\n  recordOutputs: boolean,\n): AsyncGenerator<GoogleGenAIResponse, void, unknown> {\n  const state: StreamingState = {\n    responseTexts: [],\n    finishReasons: [],\n    toolCalls: [],\n  };\n\n  try {\n    for await (const chunk of stream) {\n      processChunk(chunk, state, recordOutputs, span);\n      yield chunk;\n    }\n  } finally {\n    endStreamSpan(span, state, recordOutputs);\n  }\n}\n","// Copied from https://googleapis.github.io/js-genai/release_docs/index.html\nexport type ContentListUnion = Content | Content[] | PartListUnion;\nexport type ContentUnion = Content | PartUnion[] | PartUnion;\nexport type Content = {\n  parts?: Part[];\n  role?: string;\n};\nexport type PartUnion = Part | string;\nexport type Part = Record<string, unknown> & {\n  inlineData?: {\n    data?: string;\n    displayName?: string;\n    mimeType?: string;\n  };\n  text?: string;\n};\nexport type PartListUnion = PartUnion[] | PartUnion;\n\n// our consistent span message shape\nexport type Message = Record<string, unknown> & {\n  role: string;\n  content?: PartListUnion;\n  parts?: PartListUnion;\n};\n\n/**\n *\n */\nexport function contentUnionToMessages(content: ContentListUnion, role = 'user'): Message[] {\n  if (typeof content === 'string') {\n    return [{ role, content }];\n  }\n  if (Array.isArray(content)) {\n    return content.flatMap(content => contentUnionToMessages(content, role));\n  }\n  if (typeof content !== 'object' || !content) return [];\n  if ('role' in content && typeof content.role === 'string') {\n    return [content as Message];\n  }\n  if ('parts' in content) {\n    return [{ ...content, role } as Message];\n  }\n  return [{ role, content }];\n}\n","import { getClient, getCurrentScope, getIsolationScope } from '../currentScopes';\nimport { DEBUG_BUILD } from '../debug-build';\nimport { SEMANTIC_ATTRIBUTE_SENTRY_IDLE_SPAN_FINISH_REASON } from '../semanticAttributes';\nimport type { Span } from '../types/span';\nimport type { StartSpanOptions } from '../types/startSpanOptions';\nimport { debug } from '../utils/debug-logger';\nimport { hasSpansEnabled } from '../utils/hasSpansEnabled';\nimport { shouldIgnoreSpan } from '../utils/should-ignore-span';\nimport { _setSpanForScope } from '../utils/spanOnScope';\nimport {\n  getActiveSpan,\n  getSpanDescendants,\n  removeChildSpanFromSpan,\n  spanTimeInputToSeconds,\n  spanToJSON,\n} from '../utils/spanUtils';\nimport { timestampInSeconds } from '../utils/time';\nimport { SentryNonRecordingSpan, spanIsNonRecordingSpan } from './sentryNonRecordingSpan';\nimport { SentrySpan } from './sentrySpan';\nimport { SPAN_STATUS_ERROR, SPAN_STATUS_OK } from './spanstatus';\nimport { startInactiveSpan } from './trace';\nimport { setCapturedScopesOnSpan } from './utils';\n\nexport const TRACING_DEFAULTS = {\n  idleTimeout: 1_000,\n  finalTimeout: 30_000,\n  childSpanTimeout: 15_000,\n};\n\nconst FINISH_REASON_HEARTBEAT_FAILED = 'heartbeatFailed';\nconst FINISH_REASON_IDLE_TIMEOUT = 'idleTimeout';\nconst FINISH_REASON_FINAL_TIMEOUT = 'finalTimeout';\nconst FINISH_REASON_EXTERNAL_FINISH = 'externalFinish';\nconst FINISH_REASON_CANCELLED = 'cancelled';\n\n// unused\nconst FINISH_REASON_DOCUMENT_HIDDEN = 'documentHidden';\n\n// unused in this file, but used in BrowserTracing\nconst FINISH_REASON_INTERRUPTED = 'interactionInterrupted';\n\ntype IdleSpanFinishReason =\n  | typeof FINISH_REASON_CANCELLED\n  | typeof FINISH_REASON_DOCUMENT_HIDDEN\n  | typeof FINISH_REASON_EXTERNAL_FINISH\n  | typeof FINISH_REASON_FINAL_TIMEOUT\n  | typeof FINISH_REASON_HEARTBEAT_FAILED\n  | typeof FINISH_REASON_IDLE_TIMEOUT\n  | typeof FINISH_REASON_INTERRUPTED;\n\ninterface IdleSpanOptions {\n  /**\n   * The time that has to pass without any span being created.\n   * If this time is exceeded, the idle span will finish.\n   */\n  idleTimeout: number;\n  /**\n   * The max. time an idle span may run.\n   * If this time is exceeded, the idle span will finish no matter what.\n   */\n  finalTimeout: number;\n  /**\n   * The max. time a child span may run.\n   * If the time since the last span was started exceeds this time, the idle span will finish.\n   */\n  childSpanTimeout?: number;\n  /**\n   * When set to `true`, will disable the idle timeout and child timeout\n   * until the `idleSpanEnableAutoFinish` hook is emitted for the idle span.\n   * The final timeout mechanism will not be affected by this option,\n   * meaning the idle span will definitely be finished when the final timeout is\n   * reached, no matter what this option is configured to.\n   *\n   * Defaults to `false`.\n   */\n  disableAutoFinish?: boolean;\n\n  /** Allows to configure a hook that is called when the idle span is ended, before it is processed. */\n  beforeSpanEnd?: (span: Span) => void;\n\n  /**\n   * If set to `true`, the idle span will be trimmed to the latest span end timestamp of its children.\n   *\n   * @default `true`.\n   */\n  trimIdleSpanEndTimestamp?: boolean;\n}\n\n/**\n * An idle span is a span that automatically finishes. It does this by tracking child spans as activities.\n * An idle span is always the active span.\n */\nexport function startIdleSpan(startSpanOptions: StartSpanOptions, options: Partial<IdleSpanOptions> = {}): Span {\n  // Activities store a list of active spans\n  const activities = new Map<string, boolean>();\n\n  // We should not use heartbeat if we finished a span\n  let _finished = false;\n\n  // Timer that tracks idleTimeout\n  let _idleTimeoutID: ReturnType<typeof setTimeout> | undefined;\n\n  // Timer that tracks maxSpanTime for child spans\n  let _childSpanTimeoutID: ReturnType<typeof setTimeout> | undefined;\n\n  // The reason why the span was finished\n  let _finishReason: IdleSpanFinishReason = FINISH_REASON_EXTERNAL_FINISH;\n\n  let _autoFinishAllowed: boolean = !options.disableAutoFinish;\n\n  const _cleanupHooks: (() => void)[] = [];\n\n  const {\n    idleTimeout = TRACING_DEFAULTS.idleTimeout,\n    finalTimeout = TRACING_DEFAULTS.finalTimeout,\n    childSpanTimeout = TRACING_DEFAULTS.childSpanTimeout,\n    beforeSpanEnd,\n    trimIdleSpanEndTimestamp = true,\n  } = options;\n\n  const client = getClient();\n  const scope = getCurrentScope();\n\n  if (!client || !hasSpansEnabled()) {\n    // The placeholder is a thin marker; it carries no sampling decision or DSC. Both are read from\n    // the scope: the sampling decision in `getTraceData`, the DSC in `getDynamicSamplingContextFromSpan`.\n    const span = new SentryNonRecordingSpan({ traceId: scope.getPropagationContext().traceId });\n\n    // Capture scopes so consumers (e.g. SentryTraceProvider) can read them and so the DSC can be\n    // resolved from the scope by `getDynamicSamplingContextFromSpan`.\n    setCapturedScopesOnSpan(span, scope, getIsolationScope());\n\n    return span;\n  }\n\n  const previousActiveSpan = getActiveSpan();\n  const span = _startIdleSpan(startSpanOptions);\n\n  // We patch span.end to ensure we can run some things before the span is ended\n  // eslint-disable-next-line @typescript-eslint/unbound-method\n  span.end = new Proxy(span.end, {\n    apply(target, thisArg, args: Parameters<Span['end']>) {\n      if (beforeSpanEnd) {\n        beforeSpanEnd(span);\n      }\n\n      // If the span is non-recording, nothing more to do here...\n      // This is the case if tracing is enabled but this specific span was not sampled\n      if (spanIsNonRecordingSpan(thisArg)) {\n        return;\n      }\n\n      // Just ensuring that this keeps working, even if we ever have more arguments here\n      const [definedEndTimestamp, ...rest] = args;\n      const timestamp = definedEndTimestamp || timestampInSeconds();\n      const spanEndTimestamp = spanTimeInputToSeconds(timestamp);\n\n      // Ensure we end with the last span timestamp, if possible\n      const spans = getSpanDescendants(span).filter(child => child !== span);\n\n      const spanJson = spanToJSON(span);\n\n      // If we have no spans, we just end, nothing else to do here\n      // Likewise, if users explicitly ended the span, we simply end the span without timestamp adjustment\n      if (!spans.length || !trimIdleSpanEndTimestamp) {\n        onIdleSpanEnded(spanEndTimestamp);\n        return Reflect.apply(target, thisArg, [spanEndTimestamp, ...rest]);\n      }\n\n      const ignoreSpans = client.getOptions().ignoreSpans;\n\n      const latestSpanEndTimestamp = spans?.reduce((acc: number | undefined, current) => {\n        const currentSpanJson = spanToJSON(current);\n        if (!currentSpanJson.timestamp) {\n          return acc;\n        }\n        // Ignored spans will get dropped later (in the client) but since we already adjust\n        // the idle span end timestamp here, we can already take to-be-ignored spans out of\n        // the calculation here.\n        if (\n          ignoreSpans &&\n          shouldIgnoreSpan(\n            { description: currentSpanJson.description, op: currentSpanJson.op, attributes: currentSpanJson.data },\n            ignoreSpans,\n          )\n        ) {\n          return acc;\n        }\n        return acc ? Math.max(acc, currentSpanJson.timestamp) : currentSpanJson.timestamp;\n      }, undefined);\n\n      // In reality this should always exist here, but type-wise it may be undefined...\n      const spanStartTimestamp = spanJson.start_timestamp;\n\n      // The final endTimestamp should:\n      // * Never be before the span start timestamp\n      // * Be the latestSpanEndTimestamp, if there is one, and it is smaller than the passed span end timestamp\n      // * Otherwise be the passed end timestamp\n      // Final timestamp can never be after finalTimeout\n      const endTimestamp = Math.min(\n        spanStartTimestamp ? spanStartTimestamp + finalTimeout / 1000 : Infinity,\n        Math.max(spanStartTimestamp || -Infinity, Math.min(spanEndTimestamp, latestSpanEndTimestamp || Infinity)),\n      );\n\n      onIdleSpanEnded(endTimestamp);\n      return Reflect.apply(target, thisArg, [endTimestamp, ...rest]);\n    },\n  });\n\n  /**\n   * Cancels the existing idle timeout, if there is one.\n   */\n  function _cancelIdleTimeout(): void {\n    if (_idleTimeoutID) {\n      clearTimeout(_idleTimeoutID);\n      _idleTimeoutID = undefined;\n    }\n  }\n\n  /**\n   * Cancels the existing child span timeout, if there is one.\n   */\n  function _cancelChildSpanTimeout(): void {\n    if (_childSpanTimeoutID) {\n      clearTimeout(_childSpanTimeoutID);\n      _childSpanTimeoutID = undefined;\n    }\n  }\n\n  /**\n   * Restarts idle timeout, if there is no running idle timeout it will start one.\n   */\n  function _restartIdleTimeout(endTimestamp?: number): void {\n    _cancelIdleTimeout();\n    _idleTimeoutID = setTimeout(() => {\n      if (!_finished && activities.size === 0 && _autoFinishAllowed) {\n        _finishReason = FINISH_REASON_IDLE_TIMEOUT;\n        span.end(endTimestamp);\n      }\n    }, idleTimeout);\n  }\n\n  /**\n   * Restarts child span timeout, if there is none running it will start one.\n   */\n  function _restartChildSpanTimeout(endTimestamp?: number): void {\n    _cancelChildSpanTimeout();\n    _childSpanTimeoutID = setTimeout(() => {\n      if (!_finished && _autoFinishAllowed) {\n        _finishReason = FINISH_REASON_HEARTBEAT_FAILED;\n        span.end(endTimestamp);\n      }\n    }, childSpanTimeout);\n  }\n\n  /**\n   * Start tracking a specific activity.\n   * @param spanId The span id that represents the activity\n   */\n  function _pushActivity(spanId: string): void {\n    _cancelIdleTimeout();\n    activities.set(spanId, true);\n\n    const endTimestamp = timestampInSeconds();\n    // We need to add the timeout here to have the real endtimestamp of the idle span\n    // Remember timestampInSeconds is in seconds, timeout is in ms\n    _restartChildSpanTimeout(endTimestamp + childSpanTimeout / 1000);\n  }\n\n  /**\n   * Remove an activity from usage\n   * @param spanId The span id that represents the activity\n   */\n  function _popActivity(spanId: string): void {\n    if (activities.has(spanId)) {\n      activities.delete(spanId);\n    }\n\n    if (activities.size === 0) {\n      const endTimestamp = timestampInSeconds();\n      // We need to add the timeout here to have the real endtimestamp of the idle span\n      // Remember timestampInSeconds is in seconds, timeout is in ms\n      _restartIdleTimeout(endTimestamp + idleTimeout / 1000);\n      _cancelChildSpanTimeout();\n    }\n  }\n\n  function onIdleSpanEnded(endTimestamp: number): void {\n    _finished = true;\n    activities.clear();\n\n    _cleanupHooks.forEach(cleanup => cleanup());\n\n    _setSpanForScope(scope, previousActiveSpan);\n\n    const spanJSON = spanToJSON(span);\n\n    const { start_timestamp: startTimestamp } = spanJSON;\n    // This should never happen, but to make TS happy...\n    if (!startTimestamp) {\n      return;\n    }\n\n    const attributes = spanJSON.data;\n    if (!attributes[SEMANTIC_ATTRIBUTE_SENTRY_IDLE_SPAN_FINISH_REASON]) {\n      span.setAttribute(SEMANTIC_ATTRIBUTE_SENTRY_IDLE_SPAN_FINISH_REASON, _finishReason);\n    }\n\n    // Set span status to 'ok' if it hasn't been explicitly set to an error status\n    const currentStatus = spanJSON.status;\n    if (!currentStatus || currentStatus === 'unknown') {\n      span.setStatus({ code: SPAN_STATUS_OK });\n    }\n\n    debug.log(`[Tracing] Idle span \"${spanJSON.op}\" finished`);\n\n    const childSpans = getSpanDescendants(span).filter(child => child !== span);\n\n    let discardedSpans = 0;\n    childSpans.forEach(childSpan => {\n      // We cancel all pending spans with status \"cancelled\" to indicate the idle span was finished early\n      if (childSpan.isRecording()) {\n        childSpan.setStatus({ code: SPAN_STATUS_ERROR, message: 'cancelled' });\n        childSpan.end(endTimestamp);\n        DEBUG_BUILD &&\n          debug.log('[Tracing] Cancelling span since span ended early', JSON.stringify(childSpan, undefined, 2));\n      }\n\n      const childSpanJSON = spanToJSON(childSpan);\n      const { timestamp: childEndTimestamp = 0, start_timestamp: childStartTimestamp = 0 } = childSpanJSON;\n\n      const spanStartedBeforeIdleSpanEnd = childStartTimestamp <= endTimestamp;\n\n      // Add a delta with idle timeout so that we prevent false positives\n      const timeoutWithMarginOfError = (finalTimeout + idleTimeout) / 1000;\n      const spanEndedBeforeFinalTimeout = childEndTimestamp - childStartTimestamp <= timeoutWithMarginOfError;\n\n      if (DEBUG_BUILD) {\n        const stringifiedSpan = JSON.stringify(childSpan, undefined, 2);\n        if (!spanStartedBeforeIdleSpanEnd) {\n          debug.log('[Tracing] Discarding span since it happened after idle span was finished', stringifiedSpan);\n        } else if (!spanEndedBeforeFinalTimeout) {\n          debug.log('[Tracing] Discarding span since it finished after idle span final timeout', stringifiedSpan);\n        }\n      }\n\n      if (!spanEndedBeforeFinalTimeout || !spanStartedBeforeIdleSpanEnd) {\n        removeChildSpanFromSpan(span, childSpan);\n        discardedSpans++;\n      }\n    });\n\n    if (discardedSpans > 0) {\n      span.setAttribute('sentry.idle_span_discarded_spans', discardedSpans);\n    }\n  }\n\n  _cleanupHooks.push(\n    client.on('spanStart', startedSpan => {\n      // If we already finished the idle span,\n      // or if this is the idle span itself being started,\n      // or if the started span has already been closed,\n      // we don't care about it for activity\n      if (\n        _finished ||\n        startedSpan === span ||\n        !!spanToJSON(startedSpan).timestamp ||\n        (startedSpan instanceof SentrySpan && startedSpan.isStandaloneSpan())\n      ) {\n        return;\n      }\n\n      const allSpans = getSpanDescendants(span);\n\n      // If the span that was just started is a child of the idle span, we should track it\n      if (allSpans.includes(startedSpan)) {\n        _pushActivity(startedSpan.spanContext().spanId);\n      }\n    }),\n  );\n\n  _cleanupHooks.push(\n    client.on('spanEnd', endedSpan => {\n      if (_finished) {\n        return;\n      }\n\n      _popActivity(endedSpan.spanContext().spanId);\n    }),\n  );\n\n  _cleanupHooks.push(\n    client.on('idleSpanEnableAutoFinish', spanToAllowAutoFinish => {\n      if (spanToAllowAutoFinish === span) {\n        _autoFinishAllowed = true;\n        _restartIdleTimeout();\n\n        if (activities.size) {\n          _restartChildSpanTimeout();\n        }\n      }\n    }),\n  );\n\n  // We only start the initial idle timeout if we are not delaying the auto finish\n  if (!options.disableAutoFinish) {\n    _restartIdleTimeout();\n  }\n\n  setTimeout(() => {\n    if (!_finished) {\n      span.setStatus({ code: SPAN_STATUS_ERROR, message: 'deadline_exceeded' });\n      _finishReason = FINISH_REASON_FINAL_TIMEOUT;\n      span.end();\n    }\n  }, finalTimeout);\n\n  return span;\n}\n\nfunction _startIdleSpan(options: StartSpanOptions): Span {\n  const span = startInactiveSpan(options);\n\n  _setSpanForScope(getCurrentScope(), span);\n\n  DEBUG_BUILD && debug.log('[Tracing] Started span is an idle span');\n\n  return span;\n}\n","export const LANGCHAIN_INTEGRATION_NAME = 'LangChain' as const;\nexport const LANGCHAIN_ORIGIN = 'auto.ai.langchain';\n\nexport const ROLE_MAP: Record<string, string> = {\n  human: 'user',\n  ai: 'assistant',\n  assistant: 'assistant',\n  system: 'system',\n  function: 'function',\n  tool: 'tool',\n};\n","import { SEMANTIC_ATTRIBUTE_SENTRY_OP, SEMANTIC_ATTRIBUTE_SENTRY_ORIGIN } from '../../semanticAttributes';\nimport { startSpan } from '../../tracing/trace';\nimport type { SpanAttributeValue } from '../../types/span';\nimport {\n  GEN_AI_EMBEDDINGS_OPERATION_ATTRIBUTE,\n  GEN_AI_EMBEDDINGS_INPUT_ATTRIBUTE,\n  GEN_AI_OPERATION_NAME_ATTRIBUTE,\n  GEN_AI_REQUEST_DIMENSIONS_ATTRIBUTE,\n  GEN_AI_REQUEST_ENCODING_FORMAT_ATTRIBUTE,\n  GEN_AI_REQUEST_MODEL_ATTRIBUTE,\n  GEN_AI_SYSTEM_ATTRIBUTE,\n} from '../ai/gen-ai-attributes';\nimport { resolveAIRecordingOptions } from '../ai/utils';\nimport { LANGCHAIN_ORIGIN } from './constants';\nimport type { LangChainOptions } from './types';\n\n/**\n * Infers the AI provider system name from the embedding class instance.\n */\nfunction inferSystemFromInstance(instance: Record<string, unknown>): string {\n  const name = (instance.constructor as { name?: string })?.name ?? '';\n  if (name.includes('OpenAI')) return 'openai';\n  if (name.includes('Google')) return 'google_genai';\n  if (name.includes('Mistral')) return 'mistralai';\n  if (name.includes('Vertex')) return 'google_vertexai';\n  if (name.includes('Bedrock')) return 'aws_bedrock';\n  if (name.includes('Ollama')) return 'ollama';\n  if (name.includes('Cloudflare')) return 'cloudflare';\n  if (name.includes('Cohere')) return 'cohere';\n  return 'langchain';\n}\n\n/**\n * Extracts span attributes from a LangChain embedding class instance.\n */\nfunction extractEmbeddingAttributes(instance: unknown): Record<string, unknown> {\n  const embeddingsInstance = (instance ?? {}) as Record<string, unknown>;\n\n  const attributes: Record<string, unknown> = {\n    [SEMANTIC_ATTRIBUTE_SENTRY_ORIGIN]: LANGCHAIN_ORIGIN,\n    [SEMANTIC_ATTRIBUTE_SENTRY_OP]: GEN_AI_EMBEDDINGS_OPERATION_ATTRIBUTE,\n    [GEN_AI_OPERATION_NAME_ATTRIBUTE]: 'embeddings',\n    [GEN_AI_REQUEST_MODEL_ATTRIBUTE]: embeddingsInstance.model ?? 'unknown',\n  };\n\n  attributes[GEN_AI_SYSTEM_ATTRIBUTE] = inferSystemFromInstance(embeddingsInstance);\n  if ('dimensions' in embeddingsInstance) {\n    attributes[GEN_AI_REQUEST_DIMENSIONS_ATTRIBUTE] = embeddingsInstance.dimensions;\n  }\n  if ('encodingFormat' in embeddingsInstance) {\n    attributes[GEN_AI_REQUEST_ENCODING_FORMAT_ATTRIBUTE] = embeddingsInstance.encodingFormat;\n  }\n\n  return attributes;\n}\n\n/**\n * Builds the span options for a LangChain embedding call from the embeddings instance and input.\n *\n * @internal Exported so the diagnostics-channel (orchestrion) instrumentation can build the same\n * span as the prototype-patching path below.\n */\nexport function _INTERNAL_getLangChainEmbeddingsSpanOptions(\n  instance: unknown,\n  input: unknown,\n  options: LangChainOptions = {},\n): { name: string; op: string; attributes: Record<string, SpanAttributeValue> } {\n  const { recordInputs } = resolveAIRecordingOptions(options);\n  const attributes = extractEmbeddingAttributes(instance);\n  const modelName = attributes[GEN_AI_REQUEST_MODEL_ATTRIBUTE] || 'unknown';\n\n  if (recordInputs && input != null) {\n    attributes[GEN_AI_EMBEDDINGS_INPUT_ATTRIBUTE] = typeof input === 'string' ? input : JSON.stringify(input);\n  }\n\n  return {\n    name: `embeddings ${modelName}`,\n    op: GEN_AI_EMBEDDINGS_OPERATION_ATTRIBUTE,\n    attributes: attributes as Record<string, SpanAttributeValue>,\n  };\n}\n\n/**\n * Wraps a LangChain embedding method (embedQuery or embedDocuments) to create Sentry spans.\n *\n * Used internally by the Node.js auto-instrumentation to patch embedding class prototypes.\n */\nexport function instrumentEmbeddingMethod(\n  originalMethod: (...args: unknown[]) => Promise<unknown>,\n  options: LangChainOptions = {},\n): (...args: unknown[]) => Promise<unknown> {\n  return new Proxy(originalMethod, {\n    apply(target, thisArg, args: unknown[]): Promise<unknown> {\n      return startSpan(_INTERNAL_getLangChainEmbeddingsSpanOptions(thisArg, args[0], options), () => {\n        // On rejection `startSpan` marks the span failed and rethrows to the caller, so we don't\n        // record the error ourselves.\n        return Reflect.apply(target, thisArg, args);\n      });\n    },\n  }) as (...args: unknown[]) => Promise<unknown>;\n}\n\n/**\n * Wraps a LangChain embeddings instance to create Sentry spans for `embedQuery` and `embedDocuments` calls.\n *\n * Use this in non-Node runtimes (Cloudflare, browser, etc.) where auto-instrumentation is not available.\n *\n * @example\n * ```javascript\n * import * as Sentry from '@sentry/cloudflare';\n * import { OpenAIEmbeddings } from '@langchain/openai';\n *\n * const embeddings = Sentry.instrumentLangChainEmbeddings(\n *   new OpenAIEmbeddings({ model: 'text-embedding-3-small' })\n * );\n *\n * await embeddings.embedQuery('Hello world');\n * await embeddings.embedDocuments(['doc1', 'doc2']);\n * ```\n */\nexport function instrumentLangChainEmbeddings<T extends object>(instance: T, options?: LangChainOptions): T {\n  const embeddingsInstance = instance as Record<string, unknown>;\n\n  if (typeof embeddingsInstance.embedQuery === 'function') {\n    embeddingsInstance.embedQuery = instrumentEmbeddingMethod(\n      embeddingsInstance.embedQuery as (...args: unknown[]) => Promise<unknown>,\n      options,\n    );\n  }\n\n  if (typeof embeddingsInstance.embedDocuments === 'function') {\n    embeddingsInstance.embedDocuments = instrumentEmbeddingMethod(\n      embeddingsInstance.embedDocuments as (...args: unknown[]) => Promise<unknown>,\n      options,\n    );\n  }\n\n  return instance;\n}\n","/* eslint-disable max-lines */\nimport { SEMANTIC_ATTRIBUTE_SENTRY_OP, SEMANTIC_ATTRIBUTE_SENTRY_ORIGIN } from '../../semanticAttributes';\nimport { SPAN_STATUS_ERROR } from '../../tracing';\nimport { startSpanManual } from '../../tracing/trace';\nimport type { Span, SpanAttributeValue } from '../../types/span';\nimport {\n  GEN_AI_OPERATION_NAME_ATTRIBUTE,\n  GEN_AI_REQUEST_AVAILABLE_TOOLS_ATTRIBUTE,\n  GEN_AI_REQUEST_MODEL_ATTRIBUTE,\n  GEN_AI_TOOL_INPUT_ATTRIBUTE,\n  GEN_AI_TOOL_NAME_ATTRIBUTE,\n  GEN_AI_TOOL_OUTPUT_ATTRIBUTE,\n} from '../ai/gen-ai-attributes';\nimport { resolveAIRecordingOptions, shouldEnableTruncation } from '../ai/utils';\nimport { LANGCHAIN_ORIGIN } from './constants';\nimport type {\n  LangChainCallbackHandler,\n  LangChainLLMResult,\n  LangChainMessage,\n  LangChainOptions,\n  LangChainSerialized,\n} from './types';\nimport {\n  extractChatModelRequestAttributes,\n  extractLLMRequestAttributes,\n  extractLlmResponseAttributes,\n  extractToolDefinitions,\n  getAgentNameFromMetadata,\n  getInvocationParams,\n} from './utils';\n\n/**\n * Creates a Sentry callback handler for LangChain\n * Returns a plain object that LangChain will call via duck-typing\n *\n * This is a stateful handler that tracks spans across multiple LangChain executions.\n */\nexport function createLangChainCallbackHandler(options: LangChainOptions = {}): LangChainCallbackHandler {\n  const { recordInputs, recordOutputs } = resolveAIRecordingOptions(options);\n  const enableTruncation = shouldEnableTruncation(options.enableTruncation);\n\n  // Internal state - single instance tracks all spans\n  const spanMap = new Map<string, Span>();\n\n  /**\n   * Exit a span and clean up\n   */\n  const exitSpan = (runId: string): void => {\n    const span = spanMap.get(runId);\n    if (span?.isRecording()) {\n      span.end();\n      spanMap.delete(runId);\n    }\n  };\n\n  /**\n   * Handler for LLM Start\n   * This handler will be called by LangChain's callback handler when an LLM event is detected.\n   */\n  const handler: LangChainCallbackHandler = {\n    // Required LangChain BaseCallbackHandler properties\n    lc_serializable: false,\n    lc_namespace: ['langchain_core', 'callbacks', 'sentry'],\n    lc_secrets: undefined,\n    lc_attributes: undefined,\n    lc_aliases: undefined,\n    lc_serializable_keys: undefined,\n    lc_id: ['langchain_core', 'callbacks', 'sentry'],\n    lc_kwargs: {},\n    name: 'SentryCallbackHandler',\n\n    // BaseCallbackHandlerInput boolean flags\n    ignoreLLM: false,\n    ignoreChain: false,\n    ignoreAgent: false,\n    ignoreRetriever: false,\n    ignoreCustomEvent: false,\n    raiseError: false,\n    awaitHandlers: true,\n\n    handleLLMStart(\n      llm: unknown,\n      prompts: string[],\n      runId: string,\n      _parentRunId?: string,\n      _extraParams?: Record<string, unknown>,\n      tags?: string[],\n      metadata?: Record<string, unknown>,\n      _runName?: string,\n    ) {\n      const invocationParams = getInvocationParams(tags);\n      const attributes = extractLLMRequestAttributes(\n        llm as LangChainSerialized,\n        prompts,\n        recordInputs,\n        enableTruncation,\n        invocationParams,\n        metadata,\n      );\n      const modelName = attributes[GEN_AI_REQUEST_MODEL_ATTRIBUTE];\n      const operationName = attributes[GEN_AI_OPERATION_NAME_ATTRIBUTE];\n\n      startSpanManual(\n        {\n          name: `${operationName} ${modelName}`,\n          op: 'gen_ai.chat',\n          attributes: {\n            ...getAgentNameFromMetadata(metadata),\n            ...attributes,\n            [SEMANTIC_ATTRIBUTE_SENTRY_OP]: 'gen_ai.chat',\n          },\n        },\n        span => {\n          spanMap.set(runId, span);\n          return span;\n        },\n      );\n    },\n\n    // Chat Model Start Handler\n    handleChatModelStart(\n      llm: unknown,\n      messages: unknown,\n      runId: string,\n      _parentRunId?: string,\n      extraParams?: Record<string, unknown>,\n      tags?: string[],\n      metadata?: Record<string, unknown>,\n      _runName?: string,\n    ) {\n      const invocationParams = getInvocationParams(tags);\n      const attributes = extractChatModelRequestAttributes(\n        llm as LangChainSerialized,\n        messages as LangChainMessage[][],\n        recordInputs,\n        enableTruncation,\n        invocationParams,\n        metadata,\n      );\n\n      const toolDefsJson = extractToolDefinitions(extraParams);\n      if (toolDefsJson) {\n        attributes[GEN_AI_REQUEST_AVAILABLE_TOOLS_ATTRIBUTE] = toolDefsJson;\n      }\n\n      const modelName = attributes[GEN_AI_REQUEST_MODEL_ATTRIBUTE];\n      const operationName = attributes[GEN_AI_OPERATION_NAME_ATTRIBUTE];\n\n      startSpanManual(\n        {\n          name: `${operationName} ${modelName}`,\n          op: 'gen_ai.chat',\n          attributes: {\n            ...getAgentNameFromMetadata(metadata),\n            ...attributes,\n            [SEMANTIC_ATTRIBUTE_SENTRY_OP]: 'gen_ai.chat',\n          },\n        },\n        span => {\n          spanMap.set(runId, span);\n          return span;\n        },\n      );\n    },\n\n    // LLM End Handler - note: handleLLMEnd with capital LLM (used by both LLMs and chat models!)\n    handleLLMEnd(\n      output: unknown,\n      runId: string,\n      _parentRunId?: string,\n      _tags?: string[],\n      _extraParams?: Record<string, unknown>,\n    ) {\n      const span = spanMap.get(runId);\n      if (span?.isRecording()) {\n        const attributes = extractLlmResponseAttributes(output as LangChainLLMResult, recordOutputs);\n        if (attributes) {\n          span.setAttributes(attributes);\n        }\n        exitSpan(runId);\n      }\n    },\n\n    // LLM Error Handler - note: handleLLMError with capital LLM\n    handleLLMError(_error: Error, runId: string) {\n      // The error is surfaced to the caller (invoke() rejects), so we only mark the span failed and\n      // do not record it.\n      const span = spanMap.get(runId);\n      if (span?.isRecording()) {\n        span.setStatus({ code: SPAN_STATUS_ERROR, message: 'internal_error' });\n        exitSpan(runId);\n      }\n    },\n\n    // Chain Start Handler\n    handleChainStart(\n      chain: { name?: string },\n      inputs: Record<string, unknown>,\n      runId: string,\n      _parentRunId?: string,\n      _tags?: string[],\n      metadata?: Record<string, unknown>,\n      _runType?: string,\n      runName?: string,\n    ) {\n      // Skip chain spans when inside an agent context (createReactAgent).\n      // The agent already creates an invoke_agent span; internal chain steps\n      // (ChannelWrite, Branch, prompt, etc.) are noise.\n      if (metadata?.__sentry_langgraph__) {\n        return;\n      }\n\n      const chainName = runName || chain.name || 'unknown_chain';\n      const attributes: Record<string, SpanAttributeValue> = {\n        [SEMANTIC_ATTRIBUTE_SENTRY_ORIGIN]: 'auto.ai.langchain',\n        'langchain.chain.name': chainName,\n      };\n\n      if (recordInputs) {\n        attributes['langchain.chain.inputs'] = JSON.stringify(inputs);\n      }\n\n      startSpanManual(\n        {\n          name: `chain ${chainName}`,\n          op: 'gen_ai.invoke_agent',\n          attributes: {\n            ...attributes,\n            [SEMANTIC_ATTRIBUTE_SENTRY_OP]: 'gen_ai.invoke_agent',\n          },\n        },\n        span => {\n          spanMap.set(runId, span);\n          return span;\n        },\n      );\n    },\n\n    // Chain End Handler\n    handleChainEnd(outputs: unknown, runId: string) {\n      const span = spanMap.get(runId);\n      if (span?.isRecording()) {\n        // Add outputs if recordOutputs is enabled\n        if (recordOutputs) {\n          span.setAttributes({\n            'langchain.chain.outputs': JSON.stringify(outputs),\n          });\n        }\n        exitSpan(runId);\n      }\n    },\n\n    // Chain Error Handler\n    handleChainError(_error: Error, runId: string) {\n      // The error is surfaced to the caller (invoke() rejects), so we only mark the span failed and\n      // do not record it.\n      const span = spanMap.get(runId);\n      if (span?.isRecording()) {\n        span.setStatus({ code: SPAN_STATUS_ERROR, message: 'internal_error' });\n        exitSpan(runId);\n      }\n    },\n\n    // Tool Start Handler\n    handleToolStart(\n      tool: { name?: string },\n      input: string,\n      runId: string,\n      _parentRunId?: string,\n      _tags?: string[],\n      metadata?: Record<string, unknown>,\n      runName?: string,\n    ) {\n      // Skip tool spans when inside an agent context (createReactAgent).\n      // Tool spans are created by wrapToolsWithSpans with richer attributes.\n      if (metadata?.__sentry_langgraph__) {\n        return;\n      }\n\n      // runName is set to tool.name by LangChain's StructuredTool.call()\n      const toolName = runName || tool.name || 'unknown_tool';\n      const attributes: Record<string, SpanAttributeValue> = {\n        ...getAgentNameFromMetadata(metadata),\n        [SEMANTIC_ATTRIBUTE_SENTRY_ORIGIN]: LANGCHAIN_ORIGIN,\n        [GEN_AI_OPERATION_NAME_ATTRIBUTE]: 'execute_tool',\n        [GEN_AI_TOOL_NAME_ATTRIBUTE]: toolName,\n      };\n\n      if (recordInputs) {\n        attributes[GEN_AI_TOOL_INPUT_ATTRIBUTE] = input;\n      }\n\n      startSpanManual(\n        {\n          name: `execute_tool ${toolName}`,\n          op: 'gen_ai.execute_tool',\n          attributes: {\n            ...attributes,\n            [SEMANTIC_ATTRIBUTE_SENTRY_OP]: 'gen_ai.execute_tool',\n          },\n        },\n        span => {\n          spanMap.set(runId, span);\n          return span;\n        },\n      );\n    },\n\n    // Tool End Handler\n    handleToolEnd(output: unknown, runId: string) {\n      const span = spanMap.get(runId);\n      if (span?.isRecording()) {\n        if (recordOutputs) {\n          // LangChain tools may return ToolMessage objects — extract the content\n          const outputObj = output as Record<string, unknown> | undefined;\n          const content =\n            outputObj && typeof outputObj === 'object' && 'content' in outputObj ? outputObj.content : output;\n          span.setAttributes({\n            [GEN_AI_TOOL_OUTPUT_ATTRIBUTE]: typeof content === 'string' ? content : JSON.stringify(content),\n          });\n        }\n        exitSpan(runId);\n      }\n    },\n\n    // Tool Error Handler\n    handleToolError(_error: Error, runId: string) {\n      // The error is surfaced to the caller (invoke() rejects), so we only mark the span failed and\n      // do not record it.\n      const span = spanMap.get(runId);\n      if (span?.isRecording()) {\n        span.setStatus({ code: SPAN_STATUS_ERROR, message: 'internal_error' });\n        exitSpan(runId);\n      }\n    },\n\n    // LangChain BaseCallbackHandler required methods\n    copy() {\n      return handler;\n    },\n\n    toJSON() {\n      return {\n        lc: 1,\n        type: 'not_implemented',\n        id: handler.lc_id,\n      };\n    },\n\n    toJSONNotImplemented() {\n      return {\n        lc: 1,\n        type: 'not_implemented',\n        id: handler.lc_id,\n      };\n    },\n  };\n\n  return handler;\n}\n\nexport { instrumentLangChainEmbeddings } from './embeddings';\n","import { SEMANTIC_ATTRIBUTE_SENTRY_ORIGIN } from '../../semanticAttributes';\nimport type { SpanAttributeValue } from '../../types/span';\nimport { stringify } from '../../utils/string';\nimport {\n  GEN_AI_AGENT_NAME_ATTRIBUTE,\n  GEN_AI_INPUT_MESSAGES_ATTRIBUTE,\n  GEN_AI_INPUT_MESSAGES_ORIGINAL_LENGTH_ATTRIBUTE,\n  GEN_AI_OPERATION_NAME_ATTRIBUTE,\n  GEN_AI_REQUEST_FREQUENCY_PENALTY_ATTRIBUTE,\n  GEN_AI_REQUEST_MAX_TOKENS_ATTRIBUTE,\n  GEN_AI_REQUEST_MODEL_ATTRIBUTE,\n  GEN_AI_REQUEST_PRESENCE_PENALTY_ATTRIBUTE,\n  GEN_AI_REQUEST_STREAM_ATTRIBUTE,\n  GEN_AI_REQUEST_TEMPERATURE_ATTRIBUTE,\n  GEN_AI_REQUEST_TOP_P_ATTRIBUTE,\n  GEN_AI_RESPONSE_FINISH_REASONS_ATTRIBUTE,\n  GEN_AI_RESPONSE_ID_ATTRIBUTE,\n  GEN_AI_RESPONSE_MODEL_ATTRIBUTE,\n  GEN_AI_RESPONSE_STOP_REASON_ATTRIBUTE,\n  GEN_AI_RESPONSE_TEXT_ATTRIBUTE,\n  GEN_AI_RESPONSE_TOOL_CALLS_ATTRIBUTE,\n  GEN_AI_SYSTEM_ATTRIBUTE,\n  GEN_AI_SYSTEM_INSTRUCTIONS_ATTRIBUTE,\n  GEN_AI_USAGE_CACHE_CREATION_INPUT_TOKENS_ATTRIBUTE,\n  GEN_AI_USAGE_CACHE_READ_INPUT_TOKENS_ATTRIBUTE,\n  GEN_AI_USAGE_INPUT_TOKENS_ATTRIBUTE,\n  GEN_AI_USAGE_OUTPUT_TOKENS_ATTRIBUTE,\n  GEN_AI_USAGE_TOTAL_TOKENS_ATTRIBUTE,\n} from '../ai/gen-ai-attributes';\nimport { isContentMedia, stripInlineMediaFromSingleMessage } from '../ai/mediaStripping';\nimport { extractSystemInstructions, getTruncatedJsonString } from '../ai/utils';\nimport { LANGCHAIN_ORIGIN, ROLE_MAP } from './constants';\nimport type { LangChainLLMResult, LangChainMessage, LangChainSerialized } from './types';\n\n/**\n * Assigns an attribute only when the value is neither `undefined` nor `null`.\n *\n * We keep this tiny helper because call sites are repetitive and easy to miswrite.\n * It also preserves falsy-but-valid values like `0` and `\"\"`.\n */\nconst setIfDefined = (target: Record<string, SpanAttributeValue | undefined>, key: string, value: unknown): void => {\n  if (value != null) target[key] = value as SpanAttributeValue;\n};\n\n/**\n * Like `setIfDefined`, but converts the value with `Number()` and skips only when the\n * result is `NaN`. This ensures numeric 0 makes it through (unlike truthy checks).\n */\nconst setNumberIfDefined = (\n  target: Record<string, SpanAttributeValue | undefined>,\n  key: string,\n  value: unknown,\n): void => {\n  const n = Number(value);\n  if (!Number.isNaN(n)) target[key] = n;\n};\n\n/**\n * Converts message content to a string, stripping inline media (base64 images, audio, etc.)\n * from multimodal content before stringification so downstream media stripping can't miss it.\n *\n * @example\n * // String content passes through unchanged:\n * normalizeContent(\"Hello\") // => \"Hello\"\n *\n * // Multimodal array content — media is replaced with \"[Blob substitute]\" before JSON.stringify:\n * normalizeContent([\n *   { type: \"text\", text: \"What color?\" },\n *   { type: \"image_url\", image_url: { url: \"data:image/png;base64,iVBOR...\" } }\n * ])\n * // => '[{\"type\":\"text\",\"text\":\"What color?\"},{\"type\":\"image_url\",\"image_url\":{\"url\":\"[Blob substitute]\"}}]'\n *\n * // Without this, stringification would JSON.stringify the raw array and the base64 blob\n * // would end up in span attributes, since downstream stripping only works on objects.\n */\nfunction normalizeContent(v: unknown): string | undefined {\n  if (Array.isArray(v)) {\n    try {\n      const stripped = v.map(part =>\n        part && typeof part === 'object' && isContentMedia(part) ? stripInlineMediaFromSingleMessage(part) : part,\n      );\n      return JSON.stringify(stripped);\n    } catch {\n      return String(v);\n    }\n  }\n  return stringify(v, String);\n}\n\n/**\n * Normalizes a single role token to our canonical set.\n *\n * @param role Incoming role value (free-form, any casing)\n * @returns Canonical role: 'user' | 'assistant' | 'system' | 'function' | 'tool' | <passthrough>\n */\nfunction normalizeMessageRole(role: string): string {\n  const normalized = role.toLowerCase();\n  return ROLE_MAP[normalized] ?? normalized;\n}\n\n/**\n * Infers a role from a LangChain message constructor name.\n *\n * Checks for substrings like \"System\", \"Human\", \"AI\", etc.\n */\nfunction normalizeRoleNameFromCtor(name: string): string {\n  if (name.includes('System')) return 'system';\n  if (name.includes('Human')) return 'user';\n  if (name.includes('AI') || name.includes('Assistant')) return 'assistant';\n  if (name.includes('Function')) return 'function';\n  if (name.includes('Tool')) return 'tool';\n  return 'user';\n}\n\n/**\n * Returns invocation params from a LangChain `tags` object.\n *\n * LangChain often passes runtime parameters (model, temperature, etc.) via the\n * `tags.invocation_params` bag. If `tags` is an array (LangChain sometimes uses\n * string tags), we return `undefined`.\n *\n * @param tags LangChain tags (string[] or record)\n * @returns The `invocation_params` object, if present\n */\nexport function getInvocationParams(tags?: string[] | Record<string, unknown>): Record<string, unknown> | undefined {\n  if (!tags || Array.isArray(tags)) return undefined;\n  return tags.invocation_params as Record<string, unknown> | undefined;\n}\n\n/**\n * Normalizes a heterogeneous set of LangChain messages to `{ role, content }`.\n *\n * Why so many branches? LangChain messages can arrive in several shapes:\n *  - Message classes with `_getType()` (most reliable)\n *  - Classes with meaningful constructor names (e.g. `SystemMessage`)\n *  - Plain objects with `type`, or `{ role, content }`\n *  - Serialized format with `{ lc: 1, id: [...], kwargs: { content } }`\n * We preserve the prioritization to minimize behavioral drift.\n *\n * @param messages Mixed LangChain messages\n * @returns Array of normalized `{ role, content }`\n */\nexport function normalizeLangChainMessages(\n  messages: LangChainMessage[],\n): Array<{ role: string; content: string | undefined }> {\n  return messages.map(message => {\n    // 1) Prefer _getType() when present\n    const maybeGetType = (message as { _getType?: () => string })._getType;\n    if (typeof maybeGetType === 'function') {\n      const messageType = maybeGetType.call(message);\n      return {\n        role: normalizeMessageRole(messageType),\n        content: normalizeContent(message.content),\n      };\n    }\n\n    // 2) Serialized LangChain format (lc: 1) - check before constructor name\n    // This is more reliable than constructor.name which can be lost during serialization\n    if (message.lc === 1 && message.kwargs) {\n      const id = message.id;\n      const messageType = Array.isArray(id) && id.length > 0 ? id[id.length - 1] : '';\n      const role = typeof messageType === 'string' ? normalizeRoleNameFromCtor(messageType) : 'user';\n\n      return {\n        role: normalizeMessageRole(role),\n        content: normalizeContent(message.kwargs?.content),\n      };\n    }\n\n    // 3) Then objects with `type`\n    if (message.type) {\n      const role = String(message.type).toLowerCase();\n      return {\n        role: normalizeMessageRole(role),\n        content: normalizeContent(message.content),\n      };\n    }\n\n    // 4) Then objects with `{ role, content }` - check before constructor name\n    // Plain objects have constructor.name=\"Object\" which would incorrectly default to \"user\"\n    if (message.role) {\n      return {\n        role: normalizeMessageRole(String(message.role)),\n        content: normalizeContent(message.content),\n      };\n    }\n\n    // 5) Then try constructor name (SystemMessage / HumanMessage / ...)\n    // Only use this if we haven't matched a more specific case\n    const ctor = (message as { constructor?: { name?: string } }).constructor?.name;\n    if (ctor && ctor !== 'Object') {\n      return {\n        role: normalizeMessageRole(normalizeRoleNameFromCtor(ctor)),\n        content: normalizeContent(message.content),\n      };\n    }\n\n    // 6) Fallback: treat as user text\n    return {\n      role: 'user',\n      content: normalizeContent(message.content),\n    };\n  });\n}\n\n/**\n * Extracts request attributes common to both LLM and ChatModel invocations.\n *\n * Source precedence:\n * 1) `invocationParams` (highest)\n * 2) `langSmithMetadata`\n *\n * Numeric values are set even when 0 (e.g. `temperature: 0`), but skipped if `NaN`.\n */\nfunction extractCommonRequestAttributes(\n  serialized: LangChainSerialized,\n  invocationParams?: Record<string, unknown>,\n  langSmithMetadata?: Record<string, unknown>,\n): Record<string, SpanAttributeValue> {\n  const attrs: Record<string, SpanAttributeValue> = {};\n\n  // Get kwargs if available (from constructor type)\n  const kwargs = 'kwargs' in serialized ? serialized.kwargs : undefined;\n\n  const temperature = invocationParams?.temperature ?? langSmithMetadata?.ls_temperature ?? kwargs?.temperature;\n  setNumberIfDefined(attrs, GEN_AI_REQUEST_TEMPERATURE_ATTRIBUTE, temperature);\n\n  const maxTokens = invocationParams?.max_tokens ?? langSmithMetadata?.ls_max_tokens ?? kwargs?.max_tokens;\n  setNumberIfDefined(attrs, GEN_AI_REQUEST_MAX_TOKENS_ATTRIBUTE, maxTokens);\n\n  const topP = invocationParams?.top_p ?? kwargs?.top_p;\n  setNumberIfDefined(attrs, GEN_AI_REQUEST_TOP_P_ATTRIBUTE, topP);\n\n  const frequencyPenalty = invocationParams?.frequency_penalty;\n  setNumberIfDefined(attrs, GEN_AI_REQUEST_FREQUENCY_PENALTY_ATTRIBUTE, frequencyPenalty);\n\n  const presencePenalty = invocationParams?.presence_penalty;\n  setNumberIfDefined(attrs, GEN_AI_REQUEST_PRESENCE_PENALTY_ATTRIBUTE, presencePenalty);\n\n  // LangChain uses `stream`. We only set the attribute if the key actually exists\n  // (some callbacks report `false` even on streamed requests, this stems from LangChain's callback handler).\n  if (invocationParams && 'stream' in invocationParams) {\n    setIfDefined(attrs, GEN_AI_REQUEST_STREAM_ATTRIBUTE, Boolean(invocationParams.stream));\n  }\n\n  return attrs;\n}\n\n/**\n * Small helper to assemble boilerplate attributes shared by both request extractors.\n * Always uses 'chat' as the operation type for all LLM and chat model operations.\n */\nfunction baseRequestAttributes(\n  system: unknown,\n  modelName: unknown,\n  serialized: LangChainSerialized,\n  invocationParams?: Record<string, unknown>,\n  langSmithMetadata?: Record<string, unknown>,\n): Record<string, SpanAttributeValue | undefined> {\n  return {\n    [GEN_AI_SYSTEM_ATTRIBUTE]: stringify(system ?? 'langchain', String),\n    [GEN_AI_OPERATION_NAME_ATTRIBUTE]: 'chat',\n    [GEN_AI_REQUEST_MODEL_ATTRIBUTE]: stringify(modelName, String),\n    [SEMANTIC_ATTRIBUTE_SENTRY_ORIGIN]: LANGCHAIN_ORIGIN,\n    ...extractCommonRequestAttributes(serialized, invocationParams, langSmithMetadata),\n  };\n}\n\n/**\n * Extracts attributes for plain LLM invocations (string prompts).\n *\n * - Operation is tagged as `chat` following OpenTelemetry semantic conventions.\n *   LangChain LLM operations are treated as chat operations.\n * - When `recordInputs` is true, string prompts are wrapped into `{role:\"user\"}`\n *   messages to align with the chat schema used elsewhere.\n */\nexport function extractLLMRequestAttributes(\n  llm: LangChainSerialized,\n  prompts: string[],\n  recordInputs: boolean,\n  enableTruncation: boolean,\n  invocationParams?: Record<string, unknown>,\n  langSmithMetadata?: Record<string, unknown>,\n): Record<string, SpanAttributeValue | undefined> {\n  const system = langSmithMetadata?.ls_provider;\n  const modelName = invocationParams?.model ?? langSmithMetadata?.ls_model_name ?? 'unknown';\n\n  const attrs = baseRequestAttributes(system, modelName, llm, invocationParams, langSmithMetadata);\n\n  if (recordInputs && Array.isArray(prompts) && prompts.length > 0) {\n    setIfDefined(attrs, GEN_AI_INPUT_MESSAGES_ORIGINAL_LENGTH_ATTRIBUTE, prompts.length);\n    const messages = prompts.map(p => ({ role: 'user', content: p }));\n    setIfDefined(\n      attrs,\n      GEN_AI_INPUT_MESSAGES_ATTRIBUTE,\n      enableTruncation ? getTruncatedJsonString(messages) : stringify(messages),\n    );\n  }\n\n  return attrs;\n}\n\n/**\n * Extracts attributes for ChatModel invocations (array-of-arrays of messages).\n *\n * - Operation is tagged as `chat` following OpenTelemetry semantic conventions.\n *   LangChain chat model operations are chat operations.\n * - We flatten LangChain's `LangChainMessage[][]` and normalize shapes into a\n *   consistent `{ role, content }` array when `recordInputs` is true.\n * - Provider system value falls back to `serialized.id?.[2]`.\n */\nexport function extractChatModelRequestAttributes(\n  llm: LangChainSerialized,\n  langChainMessages: LangChainMessage[][],\n  recordInputs: boolean,\n  enableTruncation: boolean,\n  invocationParams?: Record<string, unknown>,\n  langSmithMetadata?: Record<string, unknown>,\n): Record<string, SpanAttributeValue | undefined> {\n  const system = langSmithMetadata?.ls_provider ?? llm.id?.[2];\n  const modelName = invocationParams?.model ?? langSmithMetadata?.ls_model_name ?? 'unknown';\n\n  const attrs = baseRequestAttributes(system, modelName, llm, invocationParams, langSmithMetadata);\n\n  if (recordInputs && Array.isArray(langChainMessages) && langChainMessages.length > 0) {\n    const normalized = normalizeLangChainMessages(langChainMessages.flat());\n\n    const { systemInstructions, filteredMessages } = extractSystemInstructions(normalized);\n\n    if (systemInstructions) {\n      setIfDefined(attrs, GEN_AI_SYSTEM_INSTRUCTIONS_ATTRIBUTE, systemInstructions);\n    }\n\n    const filteredLength = Array.isArray(filteredMessages) ? filteredMessages.length : 0;\n    setIfDefined(attrs, GEN_AI_INPUT_MESSAGES_ORIGINAL_LENGTH_ATTRIBUTE, filteredLength);\n\n    setIfDefined(\n      attrs,\n      GEN_AI_INPUT_MESSAGES_ATTRIBUTE,\n      enableTruncation ? getTruncatedJsonString(filteredMessages) : stringify(filteredMessages),\n    );\n  }\n\n  return attrs;\n}\n\n/**\n * Extracts tool calls from generations and records them on the span attributes.\n * Prefers message.tool_calls (LangChain's normalized format). Falls back to\n * scanning message.content for Anthropic-style tool_use items in older versions\n * where tool_calls may not be populated.\n */\nfunction addToolCallsAttributes(generations: LangChainMessage[][], attrs: Record<string, SpanAttributeValue>): void {\n  const toolCalls: unknown[] = [];\n  const flatGenerations = generations.flat();\n\n  for (const gen of flatGenerations) {\n    const msg = gen.message as Record<string, unknown> | undefined;\n    const msgToolCalls = msg?.tool_calls as unknown[] | undefined;\n    if (Array.isArray(msgToolCalls) && msgToolCalls.length > 0) {\n      toolCalls.push(...msgToolCalls);\n    } else {\n      // Fallback for older LangChain versions: scan message.content for Anthropic-style tool_use\n      const content = gen.message?.content;\n      if (Array.isArray(content)) {\n        for (const item of content) {\n          const t = item as Record<string, unknown>;\n          if (t.type === 'tool_use') toolCalls.push(t);\n        }\n      }\n    }\n  }\n\n  if (toolCalls.length > 0) {\n    setIfDefined(attrs, GEN_AI_RESPONSE_TOOL_CALLS_ATTRIBUTE, stringify(toolCalls, String));\n  }\n}\n\n/**\n * Adds token usage attributes, supporting both OpenAI (`tokenUsage`) and Anthropic (`usage`) formats.\n * - Preserve zero values (0 tokens) by avoiding truthy checks.\n * - Compute a total for Anthropic when not explicitly provided.\n * - Include cache token metrics when present.\n */\nfunction addTokenUsageAttributes(\n  llmOutput: LangChainLLMResult['llmOutput'],\n  attrs: Record<string, SpanAttributeValue>,\n): void {\n  if (!llmOutput) return;\n\n  const tokenUsage = llmOutput.tokenUsage as\n    | { promptTokens?: number; completionTokens?: number; totalTokens?: number }\n    | undefined;\n  const anthropicUsage = llmOutput.usage as\n    | {\n        input_tokens?: number;\n        output_tokens?: number;\n        cache_creation_input_tokens?: number;\n        cache_read_input_tokens?: number;\n      }\n    | undefined;\n\n  if (tokenUsage) {\n    setNumberIfDefined(attrs, GEN_AI_USAGE_INPUT_TOKENS_ATTRIBUTE, tokenUsage.promptTokens);\n    setNumberIfDefined(attrs, GEN_AI_USAGE_OUTPUT_TOKENS_ATTRIBUTE, tokenUsage.completionTokens);\n    setNumberIfDefined(attrs, GEN_AI_USAGE_TOTAL_TOKENS_ATTRIBUTE, tokenUsage.totalTokens);\n  } else if (anthropicUsage) {\n    setNumberIfDefined(attrs, GEN_AI_USAGE_INPUT_TOKENS_ATTRIBUTE, anthropicUsage.input_tokens);\n    setNumberIfDefined(attrs, GEN_AI_USAGE_OUTPUT_TOKENS_ATTRIBUTE, anthropicUsage.output_tokens);\n\n    // Compute total when not provided by the provider.\n    const input = Number(anthropicUsage.input_tokens);\n    const output = Number(anthropicUsage.output_tokens);\n    const total = (Number.isNaN(input) ? 0 : input) + (Number.isNaN(output) ? 0 : output);\n    if (total > 0) setNumberIfDefined(attrs, GEN_AI_USAGE_TOTAL_TOKENS_ATTRIBUTE, total);\n\n    // Extra Anthropic cache metrics (present only when caching is enabled)\n    if (anthropicUsage.cache_creation_input_tokens !== undefined)\n      setNumberIfDefined(\n        attrs,\n        GEN_AI_USAGE_CACHE_CREATION_INPUT_TOKENS_ATTRIBUTE,\n        anthropicUsage.cache_creation_input_tokens,\n      );\n    if (anthropicUsage.cache_read_input_tokens !== undefined)\n      setNumberIfDefined(attrs, GEN_AI_USAGE_CACHE_READ_INPUT_TOKENS_ATTRIBUTE, anthropicUsage.cache_read_input_tokens);\n  }\n}\n\n/**\n * Extracts response-related attributes based on a `LangChainLLMResult`.\n *\n * - Records finish reasons when present on generations (e.g., OpenAI)\n * - When `recordOutputs` is true, captures textual response content and any\n *   tool calls.\n * - Also propagates model name (`model_name` or `model`), response `id`, and\n *   `stop_reason` (for providers that use it).\n */\nexport function extractLlmResponseAttributes(\n  llmResult: LangChainLLMResult,\n  recordOutputs: boolean,\n): Record<string, SpanAttributeValue> | undefined {\n  if (!llmResult) return;\n\n  const attrs: Record<string, SpanAttributeValue> = {};\n\n  if (Array.isArray(llmResult.generations)) {\n    const finishReasons = llmResult.generations\n      .flat()\n      .map(g => {\n        // v1 uses generationInfo.finish_reason\n        if (g.generationInfo?.finish_reason) {\n          return g.generationInfo.finish_reason;\n        }\n        // v0.3+ uses generation_info.finish_reason\n        if (g.generation_info?.finish_reason) {\n          return g.generation_info.finish_reason;\n        }\n        return null;\n      })\n      .filter((r): r is string => typeof r === 'string');\n\n    if (finishReasons.length > 0) {\n      setIfDefined(attrs, GEN_AI_RESPONSE_FINISH_REASONS_ATTRIBUTE, stringify(finishReasons, String));\n    }\n\n    // Tool calls metadata (names, IDs) are not PII, so capture them regardless of recordOutputs\n    addToolCallsAttributes(llmResult.generations as LangChainMessage[][], attrs);\n\n    if (recordOutputs) {\n      const texts = llmResult.generations\n        .flat()\n        .map(gen => gen.text ?? gen.message?.content)\n        .filter(t => typeof t === 'string');\n\n      if (texts.length > 0) {\n        setIfDefined(attrs, GEN_AI_RESPONSE_TEXT_ATTRIBUTE, stringify(texts, String));\n      }\n    }\n  }\n\n  addTokenUsageAttributes(llmResult.llmOutput, attrs);\n\n  const llmOutput = llmResult.llmOutput;\n\n  // Extract from v1 generations structure if available\n  const firstGeneration = llmResult.generations?.[0]?.[0];\n  const v1Message = firstGeneration?.message;\n\n  // Provider model identifier: `model_name` (OpenAI-style) or `model` (others)\n  // v1 stores this in message.response_metadata.model_name\n  const modelName = llmOutput?.model_name ?? llmOutput?.model ?? v1Message?.response_metadata?.model_name;\n  if (modelName) setIfDefined(attrs, GEN_AI_RESPONSE_MODEL_ATTRIBUTE, modelName);\n\n  // Response ID: v1 stores this in message.id\n  const responseId = llmOutput?.id ?? v1Message?.id;\n  if (responseId) {\n    setIfDefined(attrs, GEN_AI_RESPONSE_ID_ATTRIBUTE, responseId);\n  }\n\n  // Stop reason: v1 stores this in message.response_metadata.finish_reason\n  const stopReason = llmOutput?.stop_reason ?? v1Message?.response_metadata?.finish_reason;\n  if (stopReason) {\n    setIfDefined(attrs, GEN_AI_RESPONSE_STOP_REASON_ATTRIBUTE, stringify(stopReason, String));\n  }\n\n  return attrs;\n}\n\nexport function getAgentNameFromMetadata(metadata?: Record<string, unknown>): Record<string, SpanAttributeValue> {\n  const attrs: Record<string, SpanAttributeValue> = {};\n  // lc_agent_name is injected by instrumentCompiledGraphInvoke (langgraph integration)\n  const agentName = metadata?.lc_agent_name;\n  if (typeof agentName === 'string') {\n    attrs[GEN_AI_AGENT_NAME_ATTRIBUTE] = agentName;\n  }\n  return attrs;\n}\n\nexport function extractToolDefinitions(extraParams?: Record<string, unknown>): string | undefined {\n  const tools =\n    (extraParams?.invocation_params as Record<string, unknown>)?.tools ??\n    (extraParams?.options as Record<string, unknown>)?.tools;\n  if (!Array.isArray(tools) || tools.length === 0) return undefined;\n  const toolDefs = tools.map((tool: Record<string, unknown>) => {\n    const fn = tool.function as Record<string, unknown> | undefined;\n    return {\n      type: 'function',\n      name: tool.name ?? fn?.name ?? '',\n      description: tool.description ?? fn?.description,\n    };\n  });\n  return JSON.stringify(toolDefs);\n}\n\n/** Duck-types a LangChain `CallbackManager` (avoids coupling to a specific `@langchain/core` resolution). */\nfunction isCallbackManager(value: unknown): value is {\n  addHandler: (handler: unknown, inherit?: boolean) => void;\n  copy: () => unknown;\n  handlers?: unknown[];\n} {\n  if (!value || typeof value !== 'object') {\n    return false;\n  }\n  const candidate = value as { addHandler?: unknown; copy?: unknown };\n  return typeof candidate.addHandler === 'function' && typeof candidate.copy === 'function';\n}\n\nfunction isSentryHandler(handler: unknown): boolean {\n  return typeof handler === 'object' && (handler as Record<string, unknown>)?.name === 'SentryCallbackHandler';\n}\n\nfunction containsSentryHandler(handlers: unknown[]): boolean {\n  return handlers.some(isSentryHandler);\n}\n\n/**\n * Merge `sentryHandler` into a given set of LangChain callbacks or callback manager.\n * @internal Exported for cross-package instrumentation.\n */\nexport function _INTERNAL_mergeLangChainCallbackHandler(existing: unknown, sentryHandler: unknown): unknown {\n  if (!existing) {\n    return [sentryHandler];\n  }\n\n  if (isCallbackManager(existing)) {\n    if (containsSentryHandler(existing.handlers ?? [])) {\n      return existing;\n    }\n\n    const copied = existing.copy() as { addHandler: (handler: unknown, inherit?: boolean) => void };\n    copied.addHandler(sentryHandler, true);\n    return copied;\n  }\n\n  const handlers = Array.isArray(existing) ? existing : [existing];\n  if (containsSentryHandler(handlers)) {\n    return existing;\n  }\n\n  return [...handlers, sentryHandler];\n}\n","export const LANGGRAPH_INTEGRATION_NAME = 'LangGraph' as const;\nexport const LANGGRAPH_ORIGIN = 'auto.ai.langgraph';\n","import { SEMANTIC_ATTRIBUTE_SENTRY_OP, SEMANTIC_ATTRIBUTE_SENTRY_ORIGIN } from '../../semanticAttributes';\nimport { SPAN_STATUS_ERROR } from '../../tracing';\nimport {\n  GEN_AI_AGENT_NAME_ATTRIBUTE,\n  GEN_AI_CONVERSATION_ID_ATTRIBUTE,\n  GEN_AI_INPUT_MESSAGES_ATTRIBUTE,\n  GEN_AI_INPUT_MESSAGES_ORIGINAL_LENGTH_ATTRIBUTE,\n  GEN_AI_INVOKE_AGENT_OPERATION_ATTRIBUTE,\n  GEN_AI_OPERATION_NAME_ATTRIBUTE,\n  GEN_AI_PIPELINE_NAME_ATTRIBUTE,\n  GEN_AI_REQUEST_AVAILABLE_TOOLS_ATTRIBUTE,\n  GEN_AI_REQUEST_MODEL_ATTRIBUTE,\n  GEN_AI_SYSTEM_INSTRUCTIONS_ATTRIBUTE,\n} from '../ai/gen-ai-attributes';\nimport {\n  extractSystemInstructions,\n  getTruncatedJsonString,\n  resolveAIRecordingOptions,\n  shouldEnableTruncation,\n} from '../ai/utils';\nimport { stringify } from '../../utils/string';\nimport type { SpanAttributeValue } from '../../types/span';\nimport { createLangChainCallbackHandler } from '../langchain';\nimport type { BaseChatModel, LangChainMessage } from '../langchain/types';\nimport { normalizeLangChainMessages } from '../langchain/utils';\nimport { startSpan } from '../trace';\nimport { LANGGRAPH_ORIGIN } from './constants';\nimport type { CompiledGraph, LangGraphOptions } from './types';\nimport {\n  extractAgentNameFromParams,\n  extractLLMFromParams,\n  extractToolsFromCompiledGraph,\n  setResponseAttributes,\n  wrapToolsWithSpans,\n} from './utils';\nimport { _INTERNAL_mergeLangChainCallbackHandler } from '../langchain/utils';\n\nlet _insideCreateReactAgent = false;\n\nconst SENTRY_PATCHED = '__sentry_patched__';\n\n/**\n * Builds the span options for a LangGraph `create_agent` span.\n *\n * @internal Exported so the diagnostics-channel (orchestrion) instrumentation can open the same span\n * as the prototype-patching path below without re-declaring the semantic attribute keys.\n */\nexport function _INTERNAL_getLangGraphCreateAgentSpanOptions(agentName?: string): {\n  op: string;\n  name: string;\n  attributes: Record<string, SpanAttributeValue>;\n} {\n  const attributes: Record<string, SpanAttributeValue> = {\n    [SEMANTIC_ATTRIBUTE_SENTRY_ORIGIN]: LANGGRAPH_ORIGIN,\n    [SEMANTIC_ATTRIBUTE_SENTRY_OP]: 'gen_ai.create_agent',\n    [GEN_AI_OPERATION_NAME_ATTRIBUTE]: 'create_agent',\n  };\n\n  if (agentName) {\n    attributes[GEN_AI_AGENT_NAME_ATTRIBUTE] = agentName;\n  }\n\n  return {\n    op: 'gen_ai.create_agent',\n    name: agentName ? `create_agent ${agentName}` : 'create_agent',\n    attributes,\n  };\n}\n\n/**\n * Instruments StateGraph's compile method to create spans for agent creation and invocation\n *\n * Wraps the compile() method to:\n * - Create a `gen_ai.create_agent` span when compile() is called\n * - Automatically wrap the invoke() method on the returned compiled graph with a `gen_ai.invoke_agent` span\n *\n */\nexport function instrumentStateGraphCompile(\n  originalCompile: (...args: unknown[]) => CompiledGraph,\n  options: LangGraphOptions,\n): (...args: unknown[]) => CompiledGraph {\n  if (Object.prototype.hasOwnProperty.call(originalCompile, SENTRY_PATCHED)) {\n    return originalCompile;\n  }\n\n  const sentryHandler = createLangChainCallbackHandler(options);\n\n  const wrapped = new Proxy(originalCompile, {\n    apply(target, thisArg, args: unknown[]): CompiledGraph {\n      // Skip when called from within createReactAgent to avoid duplicate instrumentation\n      if (_insideCreateReactAgent) {\n        return Reflect.apply(target, thisArg, args);\n      }\n\n      return startSpan(_INTERNAL_getLangGraphCreateAgentSpanOptions(), span => {\n        try {\n          const compiledGraph = Reflect.apply(target, thisArg, args);\n          const compileOptions = args.length > 0 ? (args[0] as Record<string, unknown>) : {};\n\n          // Extract graph name\n          if (compileOptions?.name && typeof compileOptions.name === 'string') {\n            span.setAttribute(GEN_AI_AGENT_NAME_ATTRIBUTE, compileOptions.name);\n            span.updateName(`create_agent ${compileOptions.name}`);\n          }\n\n          // Instrument agent invoke method on the compiled graph\n          const originalInvoke = compiledGraph.invoke;\n          if (originalInvoke && typeof originalInvoke === 'function') {\n            compiledGraph.invoke = instrumentCompiledGraphInvoke(\n              originalInvoke.bind(compiledGraph) as (...args: unknown[]) => Promise<unknown>,\n              compiledGraph,\n              compileOptions,\n              options,\n              undefined,\n              sentryHandler,\n            ) as typeof originalInvoke;\n          }\n\n          return compiledGraph;\n        } catch (error) {\n          // The error is rethrown to the caller (compile() throws), so we only mark the span failed\n          // and do not record it.\n          span.setStatus({ code: SPAN_STATUS_ERROR, message: 'internal_error' });\n          throw error;\n        }\n      });\n    },\n  }) as (...args: unknown[]) => CompiledGraph;\n\n  Object.defineProperty(wrapped, SENTRY_PATCHED, { value: true, enumerable: false });\n  return wrapped;\n}\n\n/**\n * Instruments CompiledGraph's invoke method to create spans for agent invocation\n *\n * Creates a `gen_ai.invoke_agent` span when invoke() is called\n */\nexport function instrumentCompiledGraphInvoke(\n  originalInvoke: (...args: unknown[]) => Promise<unknown>,\n  graphInstance: CompiledGraph,\n  compileOptions: Record<string, unknown>,\n  options: LangGraphOptions,\n  llm?: BaseChatModel | null,\n  sentryCallbackHandler?: unknown,\n): (...args: unknown[]) => Promise<unknown> {\n  return new Proxy(originalInvoke, {\n    apply(target, thisArg, args: unknown[]): Promise<unknown> {\n      const modelName = llm?.modelName ?? llm?.model;\n      return startSpan(\n        {\n          op: 'gen_ai.invoke_agent',\n          name: 'invoke_agent',\n          attributes: {\n            [SEMANTIC_ATTRIBUTE_SENTRY_ORIGIN]: LANGGRAPH_ORIGIN,\n            [SEMANTIC_ATTRIBUTE_SENTRY_OP]: GEN_AI_INVOKE_AGENT_OPERATION_ATTRIBUTE,\n            [GEN_AI_OPERATION_NAME_ATTRIBUTE]: 'invoke_agent',\n          },\n        },\n        async span => {\n          try {\n            const graphName = compileOptions?.name;\n\n            if (graphName && typeof graphName === 'string') {\n              span.setAttribute(GEN_AI_PIPELINE_NAME_ATTRIBUTE, graphName);\n              span.setAttribute(GEN_AI_AGENT_NAME_ATTRIBUTE, graphName);\n              span.updateName(`invoke_agent ${graphName}`);\n            }\n\n            if (modelName) {\n              span.setAttribute(GEN_AI_REQUEST_MODEL_ATTRIBUTE, modelName);\n            }\n\n            // Extract thread_id from the config (second argument)\n            // LangGraph uses config.configurable.thread_id for conversation/session linking\n            const config = args.length > 1 ? (args[1] as Record<string, unknown> | undefined) : undefined;\n            const configurable = config?.configurable as Record<string, unknown> | undefined;\n            const threadId = configurable?.thread_id;\n            if (threadId && typeof threadId === 'string') {\n              span.setAttribute(GEN_AI_CONVERSATION_ID_ATTRIBUTE, threadId);\n            }\n\n            // Inject callback handler and agent name into invoke config\n            if (sentryCallbackHandler) {\n              const invokeConfig = (args[1] ?? {}) as Record<string, unknown>;\n              args[1] = invokeConfig;\n\n              const existingMetadata = (invokeConfig.metadata ?? {}) as Record<string, unknown>;\n              invokeConfig.metadata = {\n                ...existingMetadata,\n                __sentry_langgraph__: true,\n                ...(typeof graphName === 'string' ? { lc_agent_name: graphName } : {}),\n              };\n\n              invokeConfig.callbacks = _INTERNAL_mergeLangChainCallbackHandler(\n                invokeConfig.callbacks,\n                sentryCallbackHandler,\n              );\n            }\n\n            // Extract available tools from the graph instance\n            const tools = extractToolsFromCompiledGraph(graphInstance);\n            if (tools) {\n              span.setAttribute(GEN_AI_REQUEST_AVAILABLE_TOOLS_ATTRIBUTE, JSON.stringify(tools));\n            }\n\n            // Parse input messages\n            const recordInputs = options.recordInputs;\n            const recordOutputs = options.recordOutputs;\n            const inputMessages =\n              args.length > 0 ? ((args[0] as { messages?: LangChainMessage[] } | null)?.messages ?? []) : [];\n\n            if (inputMessages && recordInputs) {\n              const normalizedMessages = normalizeLangChainMessages(inputMessages);\n              const { systemInstructions, filteredMessages } = extractSystemInstructions(normalizedMessages);\n\n              if (systemInstructions) {\n                span.setAttribute(GEN_AI_SYSTEM_INSTRUCTIONS_ATTRIBUTE, systemInstructions);\n              }\n\n              const enableTruncation = shouldEnableTruncation(options.enableTruncation);\n              const filteredLength = Array.isArray(filteredMessages) ? filteredMessages.length : 0;\n              span.setAttributes({\n                [GEN_AI_INPUT_MESSAGES_ATTRIBUTE]: enableTruncation\n                  ? getTruncatedJsonString(filteredMessages)\n                  : stringify(filteredMessages),\n                [GEN_AI_INPUT_MESSAGES_ORIGINAL_LENGTH_ATTRIBUTE]: filteredLength,\n              });\n            }\n\n            // Call original invoke\n            const result = await Reflect.apply(target, thisArg, args);\n\n            if (recordOutputs) {\n              setResponseAttributes(span, inputMessages ?? null, result);\n            }\n\n            return result;\n          } catch (error) {\n            // The error is rethrown to the caller (invoke() rejects), so we only mark the span failed\n            // and do not record it.\n            span.setStatus({ code: SPAN_STATUS_ERROR, message: 'internal_error' });\n            throw error;\n          }\n        },\n      );\n    },\n  }) as (...args: unknown[]) => Promise<unknown>;\n}\n\n/**\n * Instruments createReactAgent to create invoke_agent and execute_tool spans.\n */\nexport function instrumentCreateReactAgent(\n  originalCreateReactAgent: (...args: unknown[]) => CompiledGraph,\n  options?: LangGraphOptions,\n): (...args: unknown[]) => CompiledGraph {\n  if (Object.prototype.hasOwnProperty.call(originalCreateReactAgent, SENTRY_PATCHED)) {\n    return originalCreateReactAgent;\n  }\n\n  const resolvedOptions = resolveAIRecordingOptions(options);\n  const sentryHandler = createLangChainCallbackHandler(resolvedOptions);\n\n  const wrapped = new Proxy(originalCreateReactAgent, {\n    apply(target, thisArg, args: unknown[]): CompiledGraph {\n      const llm = extractLLMFromParams(args);\n      const agentName = extractAgentNameFromParams(args);\n\n      // Wrap tools with execute_tool spans (direct access gives us name, type, description)\n      const params = args[0] as Record<string, unknown> | undefined;\n      if (params && Array.isArray(params.tools) && params.tools.length > 0) {\n        wrapToolsWithSpans(params.tools, resolvedOptions, agentName ?? undefined);\n      }\n\n      // Suppress StateGraph.compile instrumentation inside createReactAgent\n      _insideCreateReactAgent = true;\n      let compiledGraph: CompiledGraph;\n      try {\n        compiledGraph = Reflect.apply(target, thisArg, args);\n      } finally {\n        _insideCreateReactAgent = false;\n      }\n\n      // Wrap invoke() on the returned compiled graph\n      const originalInvoke = compiledGraph.invoke;\n      if (originalInvoke && typeof originalInvoke === 'function') {\n        const compileOptions: Record<string, unknown> = {};\n        if (agentName) {\n          compileOptions.name = agentName;\n        }\n\n        compiledGraph.invoke = instrumentCompiledGraphInvoke(\n          originalInvoke.bind(compiledGraph) as (...args: unknown[]) => Promise<unknown>,\n          compiledGraph,\n          compileOptions,\n          resolvedOptions,\n          llm,\n          sentryHandler,\n        ) as typeof originalInvoke;\n      }\n\n      return compiledGraph;\n    },\n  }) as (...args: unknown[]) => CompiledGraph;\n\n  Object.defineProperty(wrapped, SENTRY_PATCHED, { value: true, enumerable: false });\n  return wrapped;\n}\n\n/**\n * Directly instruments a StateGraph instance to add tracing spans\n *\n * This function can be used to manually instrument LangGraph StateGraph instances\n * in environments where automatic instrumentation is not available or desired.\n *\n * @param stateGraph - The StateGraph instance to instrument\n * @param options - Optional configuration for recording inputs/outputs\n *\n * @example\n * ```typescript\n * import { instrumentStateGraph } from '@sentry/cloudflare';\n * import { StateGraph } from '@langchain/langgraph';\n *\n * const graph = new StateGraph(MessagesAnnotation)\n *   .addNode('agent', mockLlm)\n *   .addEdge(START, 'agent')\n *   .addEdge('agent', END);\n *\n * instrumentStateGraph(graph, { recordInputs: true, recordOutputs: true });\n * const compiled = graph.compile({ name: 'my_agent' });\n * ```\n */\n// eslint-disable-next-line @typescript-eslint/no-explicit-any\nexport function instrumentStateGraph<T extends { compile: (...args: any[]) => any }>(\n  stateGraph: T,\n  options?: LangGraphOptions,\n): T {\n  stateGraph.compile = instrumentStateGraphCompile(stateGraph.compile, resolveAIRecordingOptions(options));\n\n  return stateGraph;\n}\n\n/**\n * Directly instruments a StateGraph instance to add tracing spans.\n *\n * @deprecated This function was renamed and will be removed in a future major version.\n * Use `instrumentStateGraph` instead.\n */\nexport const instrumentLangGraph = instrumentStateGraph;\n","import { SEMANTIC_ATTRIBUTE_SENTRY_OP, SEMANTIC_ATTRIBUTE_SENTRY_ORIGIN } from '../../semanticAttributes';\nimport { SPAN_STATUS_ERROR } from '../../tracing';\nimport type { Span, SpanAttributes } from '../../types/span';\nimport {\n  GEN_AI_AGENT_NAME_ATTRIBUTE,\n  GEN_AI_EXECUTE_TOOL_OPERATION_ATTRIBUTE,\n  GEN_AI_OPERATION_NAME_ATTRIBUTE,\n  GEN_AI_RESPONSE_FINISH_REASONS_ATTRIBUTE,\n  GEN_AI_RESPONSE_MODEL_ATTRIBUTE,\n  GEN_AI_RESPONSE_TEXT_ATTRIBUTE,\n  GEN_AI_RESPONSE_TOOL_CALLS_ATTRIBUTE,\n  GEN_AI_TOOL_CALL_ID_ATTRIBUTE,\n  GEN_AI_TOOL_INPUT_ATTRIBUTE,\n  GEN_AI_TOOL_OUTPUT_ATTRIBUTE,\n  GEN_AI_TOOL_DESCRIPTION_ATTRIBUTE,\n  GEN_AI_TOOL_NAME_ATTRIBUTE,\n  GEN_AI_TOOL_TYPE_ATTRIBUTE,\n  GEN_AI_USAGE_INPUT_TOKENS_ATTRIBUTE,\n  GEN_AI_USAGE_OUTPUT_TOKENS_ATTRIBUTE,\n  GEN_AI_USAGE_TOTAL_TOKENS_ATTRIBUTE,\n} from '../ai/gen-ai-attributes';\nimport type { BaseChatModel, LangChainMessage } from '../langchain/types';\nimport { normalizeLangChainMessages } from '../langchain/utils';\nimport { startSpan } from '../trace';\nimport { LANGGRAPH_ORIGIN } from './constants';\nimport type { CompiledGraph, LangGraphOptions, LangGraphTool } from './types';\n\n/**\n * Extract LLM model object from createReactAgent params\n */\nexport function extractLLMFromParams(args: unknown[]): BaseChatModel | null {\n  const arg = args[0];\n  if (typeof arg !== 'object' || !arg || !('llm' in arg) || !arg.llm || typeof arg.llm !== 'object') {\n    return null;\n  }\n  const llm = arg.llm as BaseChatModel;\n  if (typeof llm.modelName !== 'string' && typeof llm.model !== 'string') {\n    return null;\n  }\n  return llm;\n}\n\n/**\n * Extract agent name from createReactAgent params\n */\nexport function extractAgentNameFromParams(args: unknown[]): string | null {\n  const arg = args[0];\n  if (typeof arg === 'object' && !!arg && 'name' in arg && typeof arg.name === 'string') {\n    return arg.name;\n  }\n  return null;\n}\n\n/**\n * Wraps an array of LangChain tools so each invocation creates a gen_ai.execute_tool span.\n *\n * Wraps each tool's invoke() method in place. A marker prevents double-wrapping.\n */\nexport function wrapToolsWithSpans(tools: unknown[], options: LangGraphOptions, agentName?: string): unknown[] {\n  const SENTRY_WRAPPED = '__sentry_tool_wrapped__';\n\n  for (const tool of tools) {\n    if (!tool || typeof tool !== 'object') {\n      continue;\n    }\n\n    const t = tool as Record<string, unknown>;\n    const originalInvoke = t.invoke;\n    if (typeof originalInvoke !== 'function' || Object.prototype.hasOwnProperty.call(t, SENTRY_WRAPPED)) {\n      continue;\n    }\n\n    const toolName = typeof t.name === 'string' ? t.name : 'unknown_tool';\n    const toolDescription = typeof t.description === 'string' ? t.description : undefined;\n\n    const wrappedInvoke = new Proxy(originalInvoke as (...args: unknown[]) => unknown, {\n      apply(target, thisArg, args: unknown[]): unknown {\n        const spanAttributes: SpanAttributes = {\n          [SEMANTIC_ATTRIBUTE_SENTRY_ORIGIN]: LANGGRAPH_ORIGIN,\n          [SEMANTIC_ATTRIBUTE_SENTRY_OP]: GEN_AI_EXECUTE_TOOL_OPERATION_ATTRIBUTE,\n          [GEN_AI_OPERATION_NAME_ATTRIBUTE]: 'execute_tool',\n          [GEN_AI_TOOL_NAME_ATTRIBUTE]: toolName,\n          [GEN_AI_TOOL_TYPE_ATTRIBUTE]: 'function',\n        };\n\n        // Read agent name from LangChain's propagated config metadata at call time,\n        // so shared tools get the correct agent name for each invocation\n        const callConfig = args[1] as Record<string, unknown> | undefined;\n        const callAgentName = (callConfig?.metadata as Record<string, unknown>)?.lc_agent_name ?? agentName;\n        if (typeof callAgentName === 'string') {\n          spanAttributes[GEN_AI_AGENT_NAME_ATTRIBUTE] = callAgentName;\n        }\n\n        if (toolDescription) {\n          spanAttributes[GEN_AI_TOOL_DESCRIPTION_ATTRIBUTE] = toolDescription;\n        }\n\n        // LangGraph ToolNode passes { name, args, id, type: \"tool_call\" }\n        const input = args[0] as Record<string, unknown> | undefined;\n        if (typeof input === 'object' && !!input) {\n          if ('id' in input && typeof input.id === 'string') {\n            spanAttributes[GEN_AI_TOOL_CALL_ID_ATTRIBUTE] = input.id;\n          }\n\n          if (options.recordInputs) {\n            const toolArgs = 'args' in input && typeof input.args === 'object' ? input.args : input;\n            try {\n              spanAttributes[GEN_AI_TOOL_INPUT_ATTRIBUTE] = JSON.stringify(toolArgs);\n            } catch {\n              // skip if not serializable\n            }\n          }\n        }\n\n        return startSpan(\n          {\n            op: GEN_AI_EXECUTE_TOOL_OPERATION_ATTRIBUTE,\n            name: `execute_tool ${toolName}`,\n            attributes: spanAttributes,\n          },\n          async span => {\n            try {\n              const result = await Reflect.apply(target, thisArg, args);\n\n              if (options.recordOutputs) {\n                try {\n                  // ToolMessage objects wrap the result in .content\n                  const resultObj = result as Record<string, unknown> | undefined;\n                  const content =\n                    resultObj && typeof resultObj === 'object' && 'content' in resultObj ? resultObj.content : result;\n                  span.setAttribute(\n                    GEN_AI_TOOL_OUTPUT_ATTRIBUTE,\n                    typeof content === 'string' ? content : JSON.stringify(content),\n                  );\n                } catch {\n                  // skip if not serializable\n                }\n              }\n\n              return result;\n            } catch (error) {\n              // The error is rethrown to the caller (invoke() rejects), so we only mark the span\n              // failed and do not record it.\n              span.setStatus({ code: SPAN_STATUS_ERROR, message: 'internal_error' });\n              throw error;\n            }\n          },\n        );\n      },\n    });\n\n    t.invoke = wrappedInvoke;\n    Object.defineProperty(t, SENTRY_WRAPPED, { value: true, enumerable: false });\n  }\n\n  return tools;\n}\n\n/**\n * Extract tool calls from messages\n */\nexport function extractToolCalls(messages: Array<Record<string, unknown>> | null): unknown[] | null {\n  if (!messages || messages.length === 0) {\n    return null;\n  }\n\n  const toolCalls: unknown[] = [];\n\n  for (const message of messages) {\n    if (message && typeof message === 'object') {\n      const msgToolCalls = message.tool_calls;\n      if (msgToolCalls && Array.isArray(msgToolCalls)) {\n        toolCalls.push(...msgToolCalls);\n      }\n    }\n  }\n\n  return toolCalls.length > 0 ? toolCalls : null;\n}\n\n/**\n * Extract token usage from a message's usage_metadata or response_metadata\n * Returns token counts without setting span attributes\n */\nexport function extractTokenUsageFromMessage(message: LangChainMessage): {\n  inputTokens: number;\n  outputTokens: number;\n  totalTokens: number;\n} {\n  const msg = message as Record<string, unknown>;\n  let inputTokens = 0;\n  let outputTokens = 0;\n  let totalTokens = 0;\n\n  // Extract from usage_metadata (newer format)\n  if (msg.usage_metadata && typeof msg.usage_metadata === 'object') {\n    const usage = msg.usage_metadata as Record<string, unknown>;\n    if (typeof usage.input_tokens === 'number') {\n      inputTokens = usage.input_tokens;\n    }\n    if (typeof usage.output_tokens === 'number') {\n      outputTokens = usage.output_tokens;\n    }\n    if (typeof usage.total_tokens === 'number') {\n      totalTokens = usage.total_tokens;\n    }\n    return { inputTokens, outputTokens, totalTokens };\n  }\n\n  // Fallback: Extract from response_metadata.tokenUsage\n  if (msg.response_metadata && typeof msg.response_metadata === 'object') {\n    const metadata = msg.response_metadata as Record<string, unknown>;\n    if (metadata.tokenUsage && typeof metadata.tokenUsage === 'object') {\n      const tokenUsage = metadata.tokenUsage as Record<string, unknown>;\n      if (typeof tokenUsage.promptTokens === 'number') {\n        inputTokens = tokenUsage.promptTokens;\n      }\n      if (typeof tokenUsage.completionTokens === 'number') {\n        outputTokens = tokenUsage.completionTokens;\n      }\n      if (typeof tokenUsage.totalTokens === 'number') {\n        totalTokens = tokenUsage.totalTokens;\n      }\n    }\n  }\n\n  return { inputTokens, outputTokens, totalTokens };\n}\n\n/**\n * Extract model and finish reason from a message's response_metadata\n */\nexport function extractModelMetadata(span: Span, message: LangChainMessage): void {\n  const msg = message as Record<string, unknown>;\n\n  if (msg.response_metadata && typeof msg.response_metadata === 'object') {\n    const metadata = msg.response_metadata as Record<string, unknown>;\n\n    if (metadata.model_name && typeof metadata.model_name === 'string') {\n      span.setAttribute(GEN_AI_RESPONSE_MODEL_ATTRIBUTE, metadata.model_name);\n    }\n\n    if (metadata.finish_reason && typeof metadata.finish_reason === 'string') {\n      span.setAttribute(GEN_AI_RESPONSE_FINISH_REASONS_ATTRIBUTE, [metadata.finish_reason]);\n    }\n  }\n}\n\n/**\n * Extract tools from compiled graph structure\n *\n * Tools are stored in: compiledGraph.builder.nodes.tools.runnable.tools\n */\nexport function extractToolsFromCompiledGraph(compiledGraph: CompiledGraph): unknown[] | null {\n  if (!compiledGraph.builder?.nodes?.tools?.runnable?.tools) {\n    return null;\n  }\n\n  const tools = compiledGraph.builder?.nodes?.tools?.runnable?.tools;\n\n  if (!tools || !Array.isArray(tools) || tools.length === 0) {\n    return null;\n  }\n\n  // Extract name, description, and schema from each tool's lc_kwargs\n  return tools.map((tool: LangGraphTool) => ({\n    name: tool.lc_kwargs?.name,\n    description: tool.lc_kwargs?.description,\n    schema: tool.lc_kwargs?.schema,\n  }));\n}\n\n/**\n * Set response attributes on the span\n */\nexport function setResponseAttributes(span: Span, inputMessages: LangChainMessage[] | null, result: unknown): void {\n  // Extract messages from result\n  const resultObj = result as { messages?: LangChainMessage[] } | undefined;\n  const outputMessages = resultObj?.messages;\n\n  if (!outputMessages || !Array.isArray(outputMessages)) {\n    return;\n  }\n\n  // Get new messages (delta between input and output)\n  const inputCount = inputMessages?.length ?? 0;\n  const newMessages = outputMessages.length > inputCount ? outputMessages.slice(inputCount) : [];\n\n  if (newMessages.length === 0) {\n    return;\n  }\n\n  // Extract and set tool calls from new messages BEFORE normalization\n  // (normalization strips tool_calls, so we need to extract them first)\n  const toolCalls = extractToolCalls(newMessages as Array<Record<string, unknown>>);\n  if (toolCalls) {\n    span.setAttribute(GEN_AI_RESPONSE_TOOL_CALLS_ATTRIBUTE, JSON.stringify(toolCalls));\n  }\n\n  // Normalize the new messages\n  const normalizedNewMessages = normalizeLangChainMessages(newMessages);\n  span.setAttribute(GEN_AI_RESPONSE_TEXT_ATTRIBUTE, JSON.stringify(normalizedNewMessages));\n\n  // Accumulate token usage across all messages\n  let totalInputTokens = 0;\n  let totalOutputTokens = 0;\n  let totalTokens = 0;\n\n  // Extract metadata from messages\n  for (const message of newMessages) {\n    // Accumulate token usage\n    const tokens = extractTokenUsageFromMessage(message);\n    totalInputTokens += tokens.inputTokens;\n    totalOutputTokens += tokens.outputTokens;\n    totalTokens += tokens.totalTokens;\n\n    // Extract model metadata (last message's metadata wins for model/finish_reason)\n    extractModelMetadata(span, message);\n  }\n\n  // Set accumulated token usage on span\n  if (totalInputTokens > 0) {\n    span.setAttribute(GEN_AI_USAGE_INPUT_TOKENS_ATTRIBUTE, totalInputTokens);\n  }\n  if (totalOutputTokens > 0) {\n    span.setAttribute(GEN_AI_USAGE_OUTPUT_TOKENS_ATTRIBUTE, totalOutputTokens);\n  }\n  if (totalTokens > 0) {\n    span.setAttribute(GEN_AI_USAGE_TOTAL_TOKENS_ATTRIBUTE, totalTokens);\n  }\n}\n","import { DEBUG_BUILD } from '../debug-build';\nimport type { Span } from '../types/span';\nimport { debug } from '../utils/debug-logger';\nimport { getRootSpan, spanIsSampled, spanToJSON } from '../utils/spanUtils';\n\n/**\n * Print a log message for a started span.\n */\nexport function logSpanStart(span: Span): void {\n  if (!DEBUG_BUILD) return;\n\n  const { description = '< unknown name >', op = '< unknown op >', parent_span_id: parentSpanId } = spanToJSON(span);\n  const { spanId } = span.spanContext();\n\n  const sampled = spanIsSampled(span);\n  const rootSpan = getRootSpan(span);\n  const isRootSpan = rootSpan === span;\n\n  const header = `[Tracing] Starting ${sampled ? 'sampled' : 'unsampled'} ${isRootSpan ? 'root ' : ''}span`;\n\n  const infoParts: string[] = [`op: ${op}`, `name: ${description}`, `ID: ${spanId}`];\n\n  if (parentSpanId) {\n    infoParts.push(`parent ID: ${parentSpanId}`);\n  }\n\n  if (!isRootSpan) {\n    const { op, description } = spanToJSON(rootSpan);\n    infoParts.push(`root ID: ${rootSpan.spanContext().spanId}`);\n    if (op) {\n      infoParts.push(`root op: ${op}`);\n    }\n    if (description) {\n      infoParts.push(`root description: ${description}`);\n    }\n  }\n\n  debug.log(`${header}\n  ${infoParts.join('\\n  ')}`);\n}\n\n/**\n * Print a log message for an ended span.\n */\nexport function logSpanEnd(span: Span): void {\n  if (!DEBUG_BUILD) return;\n\n  const { description = '< unknown name >', op = '< unknown op >' } = spanToJSON(span);\n  const { spanId } = span.spanContext();\n  const rootSpan = getRootSpan(span);\n  const isRootSpan = rootSpan === span;\n\n  const msg = `[Tracing] Finishing \"${op}\" ${isRootSpan ? 'root ' : ''}span \"${description}\" with ID ${spanId}`;\n  debug.log(msg);\n}\n","import { DEBUG_BUILD } from '../debug-build';\nimport {\n  SEMANTIC_ATTRIBUTE_SENTRY_MEASUREMENT_UNIT,\n  SEMANTIC_ATTRIBUTE_SENTRY_MEASUREMENT_VALUE,\n} from '../semanticAttributes';\nimport type { Measurements, MeasurementUnit } from '../types/measurement';\nimport type { TimedEvent } from '../types/timedEvent';\nimport { debug } from '../utils/debug-logger';\nimport { getActiveSpan, getRootSpan } from '../utils/spanUtils';\n\n/**\n * Adds a measurement to the active transaction on the current global scope. You can optionally pass in a different span\n * as the 4th parameter.\n */\nexport function setMeasurement(name: string, value: number, unit: MeasurementUnit, activeSpan = getActiveSpan()): void {\n  const rootSpan = activeSpan && getRootSpan(activeSpan);\n\n  if (rootSpan) {\n    DEBUG_BUILD && debug.log(`[Measurement] Setting measurement on root span: ${name} = ${value} ${unit}`);\n    rootSpan.addEvent(name, {\n      [SEMANTIC_ATTRIBUTE_SENTRY_MEASUREMENT_VALUE]: value,\n      [SEMANTIC_ATTRIBUTE_SENTRY_MEASUREMENT_UNIT]: unit as string,\n    });\n  }\n}\n\n/**\n * Convert timed events to measurements.\n */\nexport function timedEventsToMeasurements(events: TimedEvent[]): Measurements | undefined {\n  if (!events || events.length === 0) {\n    return undefined;\n  }\n\n  const measurements: Measurements = {};\n  events.forEach(event => {\n    const attributes = event.attributes || {};\n    const unit = attributes[SEMANTIC_ATTRIBUTE_SENTRY_MEASUREMENT_UNIT] as MeasurementUnit | undefined;\n    const value = attributes[SEMANTIC_ATTRIBUTE_SENTRY_MEASUREMENT_VALUE] as number | undefined;\n\n    if (typeof unit === 'string' && typeof value === 'number') {\n      measurements[event.name] = { value, unit };\n    }\n  });\n\n  return measurements;\n}\n","import type { InstrumentedMethodRegistry } from '../ai/utils';\n\nexport const OPENAI_INTEGRATION_NAME = 'OpenAI' as const;\n\n// https://platform.openai.com/docs/quickstart?api-mode=responses\n// https://platform.openai.com/docs/quickstart?api-mode=chat\n// https://platform.openai.com/docs/api-reference/conversations\nexport const OPENAI_METHOD_REGISTRY = {\n  'responses.create': { operation: 'chat' },\n  'chat.completions.create': { operation: 'chat' },\n  'embeddings.create': { operation: 'embeddings' },\n  // Conversations API - for conversation state management\n  // https://platform.openai.com/docs/guides/conversation-state\n  'conversations.create': { operation: 'chat' },\n} as const satisfies InstrumentedMethodRegistry;\nexport const RESPONSES_TOOL_CALL_EVENT_TYPES = [\n  'response.output_item.added',\n  'response.function_call_arguments.delta',\n  'response.function_call_arguments.done',\n  'response.output_item.done',\n] as const;\nexport const RESPONSE_EVENT_TYPES = [\n  'response.created',\n  'response.in_progress',\n  'response.failed',\n  'response.completed',\n  'response.incomplete',\n  'response.queued',\n  'response.output_text.delta',\n  ...RESPONSES_TOOL_CALL_EVENT_TYPES,\n] as const;\n","import { DEBUG_BUILD } from '../../debug-build';\nimport { SEMANTIC_ATTRIBUTE_SENTRY_ORIGIN } from '../../semanticAttributes';\nimport { SPAN_STATUS_ERROR } from '../../tracing';\nimport { startSpan, startSpanManual } from '../../tracing/trace';\nimport type { Span, SpanAttributeValue } from '../../types/span';\nimport { debug } from '../../utils/debug-logger';\nimport {\n  GEN_AI_EMBEDDINGS_INPUT_ATTRIBUTE,\n  GEN_AI_INPUT_MESSAGES_ATTRIBUTE,\n  GEN_AI_INPUT_MESSAGES_ORIGINAL_LENGTH_ATTRIBUTE,\n  GEN_AI_OPERATION_NAME_ATTRIBUTE,\n  GEN_AI_REQUEST_AVAILABLE_TOOLS_ATTRIBUTE,\n  GEN_AI_REQUEST_MODEL_ATTRIBUTE,\n  GEN_AI_SYSTEM_ATTRIBUTE,\n  GEN_AI_SYSTEM_INSTRUCTIONS_ATTRIBUTE,\n} from '../ai/gen-ai-attributes';\nimport type { InstrumentedMethodEntry } from '../ai/utils';\nimport { stringify } from '../../utils/string';\nimport {\n  buildMethodPath,\n  extractSystemInstructions,\n  getTruncatedJsonString,\n  resolveAIRecordingOptions,\n  shouldEnableTruncation,\n  wrapPromiseWithMethods,\n} from '../ai/utils';\nimport { OPENAI_METHOD_REGISTRY } from './constants';\nimport { instrumentStream } from './streaming';\nimport type { ChatCompletionChunk, OpenAiOptions, OpenAIStream, ResponseStreamingEvent } from './types';\nimport { addResponseAttributes, extractRequestParameters } from './utils';\n\n/**\n * Extract available tools from request parameters\n */\nfunction extractAvailableTools(params: Record<string, unknown>): string | undefined {\n  const tools = Array.isArray(params.tools) ? params.tools : [];\n  const hasWebSearchOptions = params.web_search_options && typeof params.web_search_options === 'object';\n  const webSearchOptions = hasWebSearchOptions\n    ? [{ type: 'web_search_options', ...(params.web_search_options as Record<string, unknown>) }]\n    : [];\n\n  const availableTools = [...tools, ...webSearchOptions];\n  if (availableTools.length === 0) {\n    return undefined;\n  }\n\n  try {\n    return JSON.stringify(availableTools);\n  } catch (error) {\n    DEBUG_BUILD && debug.error('Failed to serialize OpenAI tools:', error);\n    return undefined;\n  }\n}\n\n/**\n * Extract request attributes from method arguments\n */\nexport function extractRequestAttributes(args: unknown[], operationName: string): Record<string, unknown> {\n  const attributes: Record<string, unknown> = {\n    [GEN_AI_SYSTEM_ATTRIBUTE]: 'openai',\n    [GEN_AI_OPERATION_NAME_ATTRIBUTE]: operationName,\n    [SEMANTIC_ATTRIBUTE_SENTRY_ORIGIN]: 'auto.ai.openai',\n  };\n\n  if (args.length > 0 && typeof args[0] === 'object' && args[0] !== null) {\n    const params = args[0] as Record<string, unknown>;\n\n    const availableTools = extractAvailableTools(params);\n    if (availableTools) {\n      attributes[GEN_AI_REQUEST_AVAILABLE_TOOLS_ATTRIBUTE] = availableTools;\n    }\n\n    Object.assign(attributes, extractRequestParameters(params));\n  } else {\n    attributes[GEN_AI_REQUEST_MODEL_ATTRIBUTE] = 'unknown';\n  }\n\n  return attributes;\n}\n\n// Extract and record AI request inputs, if present. This is intentionally separate from response attributes.\nexport function addRequestAttributes(\n  span: Span,\n  params: Record<string, unknown>,\n  operationName: string,\n  enableTruncation: boolean,\n): void {\n  // Store embeddings input on a separate attribute and do not truncate it\n  if (operationName === 'embeddings' && 'input' in params) {\n    const input = params.input;\n\n    // No input provided\n    if (input == null) {\n      return;\n    }\n\n    // Empty input string\n    if (typeof input === 'string' && input.length === 0) {\n      return;\n    }\n\n    // Empty array input\n    if (Array.isArray(input) && input.length === 0) {\n      return;\n    }\n\n    // Store strings as-is, arrays/objects as JSON\n    span.setAttribute(GEN_AI_EMBEDDINGS_INPUT_ATTRIBUTE, typeof input === 'string' ? input : JSON.stringify(input));\n    return;\n  }\n\n  const src = 'input' in params ? params.input : 'messages' in params ? params.messages : undefined;\n\n  if (!src) {\n    return;\n  }\n\n  if (Array.isArray(src) && src.length === 0) {\n    return;\n  }\n\n  const { systemInstructions, filteredMessages } = extractSystemInstructions(src);\n\n  if (systemInstructions) {\n    span.setAttribute(GEN_AI_SYSTEM_INSTRUCTIONS_ATTRIBUTE, systemInstructions);\n  }\n\n  span.setAttribute(\n    GEN_AI_INPUT_MESSAGES_ATTRIBUTE,\n    enableTruncation ? getTruncatedJsonString(filteredMessages) : stringify(filteredMessages),\n  );\n\n  if (Array.isArray(filteredMessages)) {\n    span.setAttribute(GEN_AI_INPUT_MESSAGES_ORIGINAL_LENGTH_ATTRIBUTE, filteredMessages.length);\n  } else {\n    span.setAttribute(GEN_AI_INPUT_MESSAGES_ORIGINAL_LENGTH_ATTRIBUTE, 1);\n  }\n}\n\n/**\n * Instrument a method with Sentry spans\n * Following Sentry AI Agents Manual Instrumentation conventions\n * @see https://docs.sentry.io/platforms/javascript/guides/node/tracing/instrumentation/ai-agents-module/#manual-instrumentation\n */\nfunction instrumentMethod<T extends unknown[], R>(\n  originalMethod: (...args: T) => Promise<R>,\n  methodPath: string,\n  instrumentedMethod: InstrumentedMethodEntry,\n  context: unknown,\n  options: OpenAiOptions,\n): (...args: T) => Promise<R> {\n  return function instrumentedCall(...args: T): Promise<R> {\n    const operationName = instrumentedMethod.operation || 'unknown';\n    const requestAttributes = extractRequestAttributes(args, operationName);\n    const model = (requestAttributes[GEN_AI_REQUEST_MODEL_ATTRIBUTE] as string) || 'unknown';\n\n    const params = args[0] as Record<string, unknown> | undefined;\n    const isStreamRequested = params && typeof params === 'object' && params.stream === true;\n\n    const spanConfig = {\n      name: `${operationName} ${model}`,\n      op: `gen_ai.${operationName}`,\n      attributes: requestAttributes as Record<string, SpanAttributeValue>,\n    };\n\n    if (isStreamRequested) {\n      let originalResult!: Promise<R>;\n\n      const instrumentedPromise = startSpanManual(spanConfig, (span: Span) => {\n        originalResult = originalMethod.apply(context, args);\n\n        if (options.recordInputs && params) {\n          addRequestAttributes(span, params, operationName, shouldEnableTruncation(options.enableTruncation));\n        }\n\n        // Return async processing\n        return (async () => {\n          try {\n            const result = await originalResult;\n            return instrumentStream(\n              result as OpenAIStream<ChatCompletionChunk | ResponseStreamingEvent>,\n              span,\n              options.recordOutputs ?? false,\n            ) as unknown as R;\n          } catch (error) {\n            span.setStatus({ code: SPAN_STATUS_ERROR, message: 'internal_error' });\n            span.end();\n            throw error;\n          }\n        })();\n      });\n\n      return wrapPromiseWithMethods(originalResult, instrumentedPromise);\n    }\n\n    // Non-streaming\n    let originalResult!: Promise<R>;\n\n    const instrumentedPromise = startSpan(spanConfig, (span: Span) => {\n      // Call synchronously to capture the promise\n      originalResult = originalMethod.apply(context, args);\n\n      if (options.recordInputs && params) {\n        addRequestAttributes(span, params, operationName, shouldEnableTruncation(options.enableTruncation));\n      }\n\n      return originalResult.then(result => {\n        addResponseAttributes(span, result, options.recordOutputs);\n        return result;\n      });\n    });\n\n    return wrapPromiseWithMethods(originalResult, instrumentedPromise);\n  };\n}\n\n/**\n * Create a deep proxy for OpenAI client instrumentation\n */\nfunction createDeepProxy<T extends object>(target: T, currentPath = '', options: OpenAiOptions): T {\n  return new Proxy(target, {\n    get(obj: object, prop: string): unknown {\n      const value = (obj as Record<string, unknown>)[prop];\n      const methodPath = buildMethodPath(currentPath, String(prop));\n\n      const instrumentedMethod = OPENAI_METHOD_REGISTRY[methodPath as keyof typeof OPENAI_METHOD_REGISTRY];\n      if (typeof value === 'function' && instrumentedMethod) {\n        return instrumentMethod(\n          value as (...args: unknown[]) => Promise<unknown>,\n          methodPath,\n          instrumentedMethod,\n          obj,\n          options,\n        );\n      }\n\n      if (typeof value === 'function') {\n        // Bind non-instrumented functions to preserve the original `this` context,\n        // which is required for accessing private class fields (e.g. #baseURL) in OpenAI SDK v5.\n        return value.bind(obj);\n      }\n\n      if (value && typeof value === 'object') {\n        return createDeepProxy(value, methodPath, options);\n      }\n\n      return value;\n    },\n  }) as T;\n}\n\n/**\n * Instrument an OpenAI client with Sentry tracing\n * Can be used across Node.js, Cloudflare Workers, and Vercel Edge\n */\nexport function instrumentOpenAiClient<T extends object>(client: T, options?: OpenAiOptions): T {\n  return createDeepProxy(client, '', resolveAIRecordingOptions(options));\n}\n","import { captureException } from '../../exports';\nimport { SPAN_STATUS_ERROR } from '../../tracing';\nimport type { Span } from '../../types/span';\nimport { endStreamSpan } from '../ai/utils';\nimport { RESPONSE_EVENT_TYPES } from './constants';\nimport type {\n  ChatCompletionChunk,\n  ChatCompletionToolCall,\n  OpenAIResponseObject,\n  ResponseFunctionCall,\n  ResponseStreamingEvent,\n} from './types';\nimport { isChatCompletionChunk, isResponsesApiStreamEvent } from './utils';\n\n/**\n * State object used to accumulate information from a stream of OpenAI events/chunks.\n */\ninterface StreamingState {\n  /** Types of events encountered in the stream. */\n  eventTypes: string[];\n  /** Collected response text fragments (for output recording). */\n  responseTexts: string[];\n  /** Reasons for finishing the response, as reported by the API. */\n  finishReasons: string[];\n  /** The response ID. */\n  responseId: string;\n  /** The model name. */\n  responseModel: string;\n  /** Number of prompt/input tokens used. */\n  promptTokens: number | undefined;\n  /** Number of completion/output tokens used. */\n  completionTokens: number | undefined;\n  /** Total number of tokens used (prompt + completion). */\n  totalTokens: number | undefined;\n  /**\n   * Accumulated tool calls from Chat Completion streaming, indexed by tool call index.\n   * @see https://platform.openai.com/docs/guides/function-calling?api-mode=chat#streaming\n   */\n  chatCompletionToolCalls: Record<number, ChatCompletionToolCall>;\n  /**\n   * Accumulated function calls from Responses API streaming.\n   * @see https://platform.openai.com/docs/guides/function-calling?api-mode=responses#streaming\n   */\n  responsesApiToolCalls: Array<ResponseFunctionCall | unknown>;\n}\n\n/**\n * Processes tool calls from a chat completion chunk delta.\n * Follows the pattern: accumulate by index, then convert to array at the end.\n *\n * @param toolCalls - Array of tool calls from the delta.\n * @param state - The current streaming state to update.\n *\n *  @see https://platform.openai.com/docs/guides/function-calling#streaming\n */\nfunction processChatCompletionToolCalls(toolCalls: ChatCompletionToolCall[], state: StreamingState): void {\n  for (const toolCall of toolCalls) {\n    const index = toolCall.index;\n    if (index === undefined || !toolCall.function) continue;\n\n    // Initialize tool call if this is the first chunk for this index\n    if (!(index in state.chatCompletionToolCalls)) {\n      state.chatCompletionToolCalls[index] = {\n        ...toolCall,\n        function: {\n          name: toolCall.function.name,\n          arguments: toolCall.function.arguments || '',\n        },\n      };\n    } else {\n      // Accumulate function arguments from subsequent chunks\n      const existingToolCall = state.chatCompletionToolCalls[index];\n      if (toolCall.function.arguments && existingToolCall?.function) {\n        existingToolCall.function.arguments += toolCall.function.arguments;\n      }\n    }\n  }\n}\n\n/**\n * Processes a single OpenAI ChatCompletionChunk event, updating the streaming state.\n *\n * @param chunk - The ChatCompletionChunk event to process.\n * @param state - The current streaming state to update.\n * @param recordOutputs - Whether to record output text fragments.\n */\nfunction processChatCompletionChunk(chunk: ChatCompletionChunk, state: StreamingState, recordOutputs: boolean): void {\n  state.responseId = chunk.id ?? state.responseId;\n  state.responseModel = chunk.model ?? state.responseModel;\n\n  if (chunk.usage) {\n    // For stream responses, the input tokens remain constant across all events in the stream.\n    // Output tokens, however, are only finalized in the last event.\n    // Since we can't guarantee that the last event will include usage data or even be a typed event,\n    // we update the output token values on every event that includes them.\n    // This ensures that output token usage is always set, even if the final event lacks it.\n    state.promptTokens = chunk.usage.prompt_tokens;\n    state.completionTokens = chunk.usage.completion_tokens;\n    state.totalTokens = chunk.usage.total_tokens;\n  }\n\n  for (const choice of chunk.choices ?? []) {\n    if (recordOutputs) {\n      if (choice.delta?.content) {\n        state.responseTexts.push(choice.delta.content);\n      }\n\n      // Handle tool calls from delta\n      if (choice.delta?.tool_calls) {\n        processChatCompletionToolCalls(choice.delta.tool_calls, state);\n      }\n    }\n    if (choice.finish_reason) {\n      state.finishReasons.push(choice.finish_reason);\n    }\n  }\n}\n\n/**\n * Processes a single OpenAI Responses API streaming event, updating the streaming state and span.\n *\n * @param streamEvent - The event to process (may be an error or unknown object).\n * @param state - The current streaming state to update.\n * @param recordOutputs - Whether to record output text fragments.\n * @param span - The span to update with error status if needed.\n */\nfunction processResponsesApiEvent(\n  streamEvent: ResponseStreamingEvent | unknown | Error,\n  state: StreamingState,\n  recordOutputs: boolean,\n  span: Span,\n): void {\n  if (!(streamEvent && typeof streamEvent === 'object')) {\n    state.eventTypes.push('unknown:non-object');\n    return;\n  }\n  if (streamEvent instanceof Error) {\n    span.setStatus({ code: SPAN_STATUS_ERROR, message: 'internal_error' });\n    captureException(streamEvent, {\n      mechanism: {\n        handled: false,\n        type: 'auto.ai.openai.stream-response',\n      },\n    });\n    return;\n  }\n\n  if (!('type' in streamEvent)) return;\n  const event = streamEvent as ResponseStreamingEvent;\n\n  if (!RESPONSE_EVENT_TYPES.includes(event.type)) {\n    state.eventTypes.push(event.type);\n    return;\n  }\n\n  // Handle output text delta\n  if (recordOutputs) {\n    // Handle tool call events for Responses API\n    if (event.type === 'response.output_item.done' && 'item' in event) {\n      state.responsesApiToolCalls.push(event.item);\n    }\n\n    if (event.type === 'response.output_text.delta' && 'delta' in event && event.delta) {\n      state.responseTexts.push(event.delta);\n      return;\n    }\n  }\n\n  if ('response' in event) {\n    const { response } = event as { response: OpenAIResponseObject };\n    state.responseId = response.id ?? state.responseId;\n    state.responseModel = response.model ?? state.responseModel;\n\n    if (response.usage) {\n      // For stream responses, the input tokens remain constant across all events in the stream.\n      // Output tokens, however, are only finalized in the last event.\n      // Since we can't guarantee that the last event will include usage data or even be a typed event,\n      // we update the output token values on every event that includes them.\n      // This ensures that output token usage is always set, even if the final event lacks it.\n      state.promptTokens = response.usage.input_tokens;\n      state.completionTokens = response.usage.output_tokens;\n      state.totalTokens = response.usage.total_tokens;\n    }\n\n    if (response.status) {\n      state.finishReasons.push(response.status);\n    }\n\n    if (recordOutputs && response.output_text) {\n      state.responseTexts.push(response.output_text);\n    }\n  }\n}\n\n/**\n * Instruments a stream of OpenAI events, updating the provided span with relevant attributes and\n * optionally recording output text. This function yields each event from the input stream as it is processed.\n *\n * @template T - The type of events in the stream.\n * @param stream - The async iterable stream of events to instrument.\n * @param span - The span to add attributes to and to finish at the end of the stream.\n * @param recordOutputs - Whether to record output text fragments in the span.\n * @returns An async generator yielding each event from the input stream.\n */\nexport async function* instrumentStream<T>(\n  stream: AsyncIterable<T>,\n  span: Span,\n  recordOutputs: boolean,\n): AsyncGenerator<T, void, unknown> {\n  const state: StreamingState = {\n    eventTypes: [],\n    responseTexts: [],\n    finishReasons: [],\n    responseId: '',\n    responseModel: '',\n    promptTokens: undefined,\n    completionTokens: undefined,\n    totalTokens: undefined,\n    chatCompletionToolCalls: {},\n    responsesApiToolCalls: [],\n  };\n\n  try {\n    for await (const event of stream) {\n      if (isChatCompletionChunk(event)) {\n        processChatCompletionChunk(event as ChatCompletionChunk, state, recordOutputs);\n      } else if (isResponsesApiStreamEvent(event)) {\n        processResponsesApiEvent(event as ResponseStreamingEvent, state, recordOutputs, span);\n      }\n      yield event;\n    }\n  } finally {\n    const allToolCalls = [...Object.values(state.chatCompletionToolCalls), ...state.responsesApiToolCalls];\n    endStreamSpan(span, { ...state, toolCalls: allToolCalls }, recordOutputs);\n  }\n}\n","import type { Span } from '../../types/span';\nimport type { SpanAttributeValue } from '../../types/span';\nimport {\n  GEN_AI_CONVERSATION_ID_ATTRIBUTE,\n  GEN_AI_REQUEST_DIMENSIONS_ATTRIBUTE,\n  GEN_AI_REQUEST_ENCODING_FORMAT_ATTRIBUTE,\n  GEN_AI_REQUEST_FREQUENCY_PENALTY_ATTRIBUTE,\n  GEN_AI_REQUEST_MODEL_ATTRIBUTE,\n  GEN_AI_REQUEST_PRESENCE_PENALTY_ATTRIBUTE,\n  GEN_AI_REQUEST_STREAM_ATTRIBUTE,\n  GEN_AI_REQUEST_TEMPERATURE_ATTRIBUTE,\n  GEN_AI_REQUEST_TOP_P_ATTRIBUTE,\n  GEN_AI_RESPONSE_FINISH_REASONS_ATTRIBUTE,\n  GEN_AI_RESPONSE_ID_ATTRIBUTE,\n  GEN_AI_RESPONSE_MODEL_ATTRIBUTE,\n  GEN_AI_RESPONSE_TEXT_ATTRIBUTE,\n  GEN_AI_RESPONSE_TOOL_CALLS_ATTRIBUTE,\n  GEN_AI_USAGE_INPUT_TOKENS_ATTRIBUTE,\n  GEN_AI_USAGE_OUTPUT_TOKENS_ATTRIBUTE,\n  GEN_AI_USAGE_TOTAL_TOKENS_ATTRIBUTE,\n} from '../ai/gen-ai-attributes';\nimport type { ChatCompletionChunk, ResponseStreamingEvent } from './types';\n\n/**\n * Check if streaming event is from the Responses API\n */\nexport function isResponsesApiStreamEvent(event: unknown): event is ResponseStreamingEvent {\n  return (\n    event !== null &&\n    typeof event === 'object' &&\n    'type' in event &&\n    typeof (event as Record<string, unknown>).type === 'string' &&\n    ((event as Record<string, unknown>).type as string).startsWith('response.')\n  );\n}\n\n/**\n * Check if streaming event is a chat completion chunk\n */\nexport function isChatCompletionChunk(event: unknown): event is ChatCompletionChunk {\n  return (\n    event !== null &&\n    typeof event === 'object' &&\n    'object' in event &&\n    (event as Record<string, unknown>).object === 'chat.completion.chunk'\n  );\n}\n\n/**\n * Add response attributes to a span using duck-typing.\n * Works for Chat Completions, Responses API, Embeddings, and Conversations API responses.\n */\nexport function addResponseAttributes(span: Span, result: unknown, recordOutputs?: boolean): void {\n  if (!result || typeof result !== 'object') return;\n\n  const response = result as Record<string, unknown>;\n  const attrs: Record<string, SpanAttributeValue> = {};\n\n  // Response ID\n  if (typeof response.id === 'string') {\n    attrs[GEN_AI_RESPONSE_ID_ATTRIBUTE] = response.id;\n  }\n\n  // Response model\n  if (typeof response.model === 'string') {\n    attrs[GEN_AI_RESPONSE_MODEL_ATTRIBUTE] = response.model;\n  }\n\n  // Conversation ID (conversation objects use id as conversation link)\n  if (response.object === 'conversation' && typeof response.id === 'string') {\n    attrs[GEN_AI_CONVERSATION_ID_ATTRIBUTE] = response.id;\n  }\n\n  // Token usage — supports both naming conventions (chat: prompt_tokens/completion_tokens, responses: input_tokens/output_tokens)\n  if (response.usage && typeof response.usage === 'object') {\n    const usage = response.usage as Record<string, unknown>;\n\n    const inputTokens = usage.prompt_tokens ?? usage.input_tokens;\n    if (typeof inputTokens === 'number') {\n      attrs[GEN_AI_USAGE_INPUT_TOKENS_ATTRIBUTE] = inputTokens;\n    }\n\n    const outputTokens = usage.completion_tokens ?? usage.output_tokens;\n    if (typeof outputTokens === 'number') {\n      attrs[GEN_AI_USAGE_OUTPUT_TOKENS_ATTRIBUTE] = outputTokens;\n    }\n\n    if (typeof usage.total_tokens === 'number') {\n      attrs[GEN_AI_USAGE_TOTAL_TOKENS_ATTRIBUTE] = usage.total_tokens;\n    }\n  }\n\n  // Finish reasons from choices (chat completions)\n  if (Array.isArray(response.choices)) {\n    const choices = response.choices as Array<Record<string, unknown>>;\n    const finishReasons = choices\n      .map(choice => choice.finish_reason)\n      .filter((reason): reason is string => typeof reason === 'string');\n    if (finishReasons.length > 0) {\n      attrs[GEN_AI_RESPONSE_FINISH_REASONS_ATTRIBUTE] = JSON.stringify(finishReasons);\n    }\n\n    if (recordOutputs) {\n      // Response text from choices\n      const responseTexts = choices.map(choice => {\n        const message = choice.message as Record<string, unknown> | undefined;\n        return (message?.content as string) || '';\n      });\n      attrs[GEN_AI_RESPONSE_TEXT_ATTRIBUTE] = JSON.stringify(responseTexts);\n\n      // Tool calls from choices\n      const toolCalls = choices\n        .map(choice => {\n          const message = choice.message as Record<string, unknown> | undefined;\n          return message?.tool_calls;\n        })\n        .filter(calls => Array.isArray(calls) && calls.length > 0)\n        .flat();\n\n      if (toolCalls.length > 0) {\n        attrs[GEN_AI_RESPONSE_TOOL_CALLS_ATTRIBUTE] = JSON.stringify(toolCalls);\n      }\n    }\n  }\n\n  // Finish reason from status (responses API)\n  if (typeof response.status === 'string') {\n    // Only set if not already set from choices\n    if (!attrs[GEN_AI_RESPONSE_FINISH_REASONS_ATTRIBUTE]) {\n      attrs[GEN_AI_RESPONSE_FINISH_REASONS_ATTRIBUTE] = JSON.stringify([response.status]);\n    }\n  }\n\n  if (recordOutputs) {\n    // Response text from output_text (responses API)\n    if (typeof response.output_text === 'string' && !attrs[GEN_AI_RESPONSE_TEXT_ATTRIBUTE]) {\n      attrs[GEN_AI_RESPONSE_TEXT_ATTRIBUTE] = response.output_text;\n    }\n\n    // Tool calls from output array (responses API)\n    if (Array.isArray(response.output) && response.output.length > 0 && !attrs[GEN_AI_RESPONSE_TOOL_CALLS_ATTRIBUTE]) {\n      const functionCalls = (response.output as Array<Record<string, unknown>>).filter(\n        item => item?.type === 'function_call',\n      );\n      if (functionCalls.length > 0) {\n        attrs[GEN_AI_RESPONSE_TOOL_CALLS_ATTRIBUTE] = JSON.stringify(functionCalls);\n      }\n    }\n  }\n\n  span.setAttributes(attrs);\n}\n\n/**\n * Extract conversation ID from request parameters\n * Supports both Conversations API and previous_response_id chaining\n * @see https://platform.openai.com/docs/guides/conversation-state\n */\nfunction extractConversationId(params: Record<string, unknown>): string | undefined {\n  // Conversations API: conversation parameter (e.g., \"conv_...\")\n  if ('conversation' in params && typeof params.conversation === 'string') {\n    return params.conversation;\n  }\n  // Responses chaining: previous_response_id links to parent response\n  if ('previous_response_id' in params && typeof params.previous_response_id === 'string') {\n    return params.previous_response_id;\n  }\n  return undefined;\n}\n\n/**\n * Extract request parameters including model settings and conversation context\n */\nexport function extractRequestParameters(params: Record<string, unknown>): Record<string, unknown> {\n  const attributes: Record<string, unknown> = {\n    [GEN_AI_REQUEST_MODEL_ATTRIBUTE]: params.model ?? 'unknown',\n  };\n\n  if ('temperature' in params) attributes[GEN_AI_REQUEST_TEMPERATURE_ATTRIBUTE] = params.temperature;\n  if ('top_p' in params) attributes[GEN_AI_REQUEST_TOP_P_ATTRIBUTE] = params.top_p;\n  if ('frequency_penalty' in params) attributes[GEN_AI_REQUEST_FREQUENCY_PENALTY_ATTRIBUTE] = params.frequency_penalty;\n  if ('presence_penalty' in params) attributes[GEN_AI_REQUEST_PRESENCE_PENALTY_ATTRIBUTE] = params.presence_penalty;\n  if ('stream' in params) attributes[GEN_AI_REQUEST_STREAM_ATTRIBUTE] = params.stream;\n  if ('encoding_format' in params) attributes[GEN_AI_REQUEST_ENCODING_FORMAT_ATTRIBUTE] = params.encoding_format;\n  if ('dimensions' in params) attributes[GEN_AI_REQUEST_DIMENSIONS_ATTRIBUTE] = params.dimensions;\n\n  // Capture conversation ID for linking messages across API calls\n  const conversationId = extractConversationId(params);\n  if (conversationId) {\n    attributes[GEN_AI_CONVERSATION_ID_ATTRIBUTE] = conversationId;\n  }\n\n  return attributes;\n}\n","import { DEBUG_BUILD } from '../debug-build';\nimport type { CoreOptions } from '../types/options';\nimport type { SamplingContext } from '../types/samplingcontext';\nimport { debug } from '../utils/debug-logger';\nimport { hasSpansEnabled } from '../utils/hasSpansEnabled';\nimport { parseSampleRate } from '../utils/parseSampleRate';\n\n/**\n * Makes a sampling decision for the given options.\n *\n * Called every time a root span is created. Only root spans which emerge with a `sampled` value of `true` will be\n * sent to Sentry.\n */\nexport function sampleSpan(\n  options: Pick<CoreOptions, 'tracesSampleRate' | 'tracesSampler'>,\n  samplingContext: SamplingContext,\n  sampleRand: number,\n): [sampled: boolean, sampleRate?: number, localSampleRateWasApplied?: boolean] {\n  // nothing to do if span recording is not enabled\n  if (!hasSpansEnabled(options)) {\n    return [false];\n  }\n\n  let localSampleRateWasApplied = undefined;\n\n  // we would have bailed already if neither `tracesSampler` nor `tracesSampleRate` were defined, so one of these should\n  // work; prefer the hook if so\n  let sampleRate;\n  if (typeof options.tracesSampler === 'function') {\n    sampleRate = options.tracesSampler({\n      ...samplingContext,\n      inheritOrSampleWith: fallbackSampleRate => {\n        // If we have an incoming parent sample rate, we'll just use that one.\n        // The sampling decision will be inherited because of the sample_rand that was generated when the trace reached the incoming boundaries of the SDK.\n        if (typeof samplingContext.parentSampleRate === 'number') {\n          return samplingContext.parentSampleRate;\n        }\n\n        // Fallback if parent sample rate is not on the incoming trace (e.g. if there is no baggage)\n        // This is to provide backwards compatibility if there are incoming traces from older SDKs that don't send a parent sample rate or a sample rand. In these cases we just want to force either a sampling decision on the downstream traces via the sample rate.\n        if (typeof samplingContext.parentSampled === 'boolean') {\n          return Number(samplingContext.parentSampled);\n        }\n\n        return fallbackSampleRate;\n      },\n    });\n    localSampleRateWasApplied = true;\n  } else if (samplingContext.parentSampled !== undefined) {\n    sampleRate = samplingContext.parentSampled;\n  } else if (typeof options.tracesSampleRate !== 'undefined') {\n    sampleRate = options.tracesSampleRate;\n    localSampleRateWasApplied = true;\n  }\n\n  // Since this is coming from the user (or from a function provided by the user), who knows what we might get.\n  // (The only valid values are booleans or numbers between 0 and 1.)\n  const parsedSampleRate = parseSampleRate(sampleRate);\n\n  if (parsedSampleRate === undefined) {\n    DEBUG_BUILD &&\n      debug.warn(\n        `[Tracing] Discarding root span because of invalid sample rate. Sample rate must be a boolean or a number between 0 and 1. Got ${JSON.stringify(\n          sampleRate,\n        )} of type ${JSON.stringify(typeof sampleRate)}.`,\n      );\n    return [false];\n  }\n\n  // if the function returned 0 (or false), or if `tracesSampleRate` is 0, it's a sign the transaction should be dropped\n  if (!parsedSampleRate) {\n    DEBUG_BUILD &&\n      debug.log(\n        `[Tracing] Discarding transaction because ${\n          typeof options.tracesSampler === 'function'\n            ? 'tracesSampler returned 0 or false'\n            : 'a negative sampling decision was inherited or tracesSampleRate is set to 0'\n        }`,\n      );\n    return [false, parsedSampleRate, localSampleRateWasApplied];\n  }\n\n  // We always compare the sample rand for the current execution context against the chosen sample rate.\n  // Read more: https://develop.sentry.dev/sdk/telemetry/traces/#propagated-random-value\n  const shouldSample = sampleRand < parsedSampleRate;\n\n  // if we're not going to keep it, we're done\n  if (!shouldSample) {\n    DEBUG_BUILD &&\n      debug.log(\n        `[Tracing] Discarding transaction because it's not included in the random sample (sampling rate = ${Number(\n          sampleRate,\n        )})`,\n      );\n  }\n\n  return [shouldSample, parsedSampleRate, localSampleRateWasApplied];\n}\n","import { getMainCarrier, getSentryCarrier } from '../carrier';\nimport type { Scope } from '../scope';\nimport type { TransactionEvent } from '../types/event';\nimport type { Span } from '../types/span';\n\n/**\n * Callbacks the deferred-capture strategy hands to `_convertSpanToTransaction` when assembling a\n * transaction. The synchronous (browser) path calls the converter with no options, so neither runs.\n */\nexport interface SegmentSpanCaptureConvertOptions {\n  /** Skip a descendant already sent in an earlier transaction, so it isn't sent twice. */\n  isSpanAlreadyCaptured?: (span: Span) => boolean;\n  /** Record each span included here, so a child that ends after the snapshot can be emitted as an orphan. */\n  onSpanCaptured?: (span: Span) => void;\n}\n\nexport type SegmentSpanConverter = (options?: SegmentSpanCaptureConvertOptions) => TransactionEvent | undefined;\n\n/**\n * Assembles segment spans into transactions. Registered by SDKs that defer capture (see\n * `_INTERNAL_setDeferSegmentSpanCapture`); when unset, `SentrySpan` captures synchronously. Living\n * behind this seam tree-shakes the deferral machinery out of SDKs that never register one (e.g. browser).\n */\nexport interface SegmentSpanCaptureStrategy {\n  /** Assemble and capture a segment (root or standalone-root) span's transaction through its captured scope. */\n  onSegmentSpanEnded(convert: SegmentSpanConverter, scope: Scope): void;\n  /** Consider a child that ended after its segment for emission as its own orphan transaction. */\n  onChildSpanEnded(span: Span, rootSpan: Span, convert: SegmentSpanConverter, scope: Scope): void;\n}\n\n/**\n * @private Private API with no semver guarantees!\n *\n * Set the global segment-span capture strategy (or clear it with `undefined`).\n */\nexport function setSegmentSpanCaptureStrategy(strategy: SegmentSpanCaptureStrategy | undefined): void {\n  getSentryCarrier(getMainCarrier()).segmentSpanCaptureStrategy = strategy;\n}\n\n/** Get the global segment-span capture strategy, or `undefined` when none is registered. */\nexport function getSegmentSpanCaptureStrategy(): SegmentSpanCaptureStrategy | undefined {\n  return getSentryCarrier(getMainCarrier()).segmentSpanCaptureStrategy;\n}\n","import type { EventDropReason } from '../types/clientreport';\nimport type {\n  SentrySpanArguments,\n  Span,\n  SpanAttributes,\n  SpanAttributeValue,\n  SpanContextData,\n  SpanTimeInput,\n} from '../types/span';\nimport type { SpanStatus } from '../types/spanStatus';\nimport { addNonEnumerableProperty } from '../utils/object';\nimport { generateSpanId, generateTraceId } from '../utils/propagationContext';\nimport { TRACE_FLAG_NONE } from '../utils/spanUtils';\n\ninterface SentryNonRecordingSpanArguments extends SentrySpanArguments {\n  dropReason?: EventDropReason;\n}\n\n// Brand used to detect non-recording spans via {@link spanIsNonRecordingSpan} without `instanceof`,\n// which is brittle when `@sentry/core` is duplicated across packages. We use `Symbol.for` so the key\n// is shared across copies of the module, and so user payloads (e.g. JSON) cannot spoof the marker.\nconst NON_RECORDING_SPAN_FIELD = Symbol.for('sentry.nonRecordingSpan');\n\n/**\n * A Sentry Span that is non-recording, meaning it will not be sent to Sentry.\n */\nexport class SentryNonRecordingSpan implements Span {\n  private _traceId: string;\n  private _spanId: string;\n\n  /**\n   * Reason why this span was dropped, if applicable ('ignored' or 'sample_rate').\n   * Used to propagate the correct client report outcome to descendant spans\n   * when span streaming is enabled.\n   */\n  public dropReason?: EventDropReason;\n\n  public constructor(spanContext: SentryNonRecordingSpanArguments = {}) {\n    this._traceId = spanContext.traceId || generateTraceId();\n    this._spanId = spanContext.spanId || generateSpanId();\n    this.dropReason = spanContext.dropReason;\n    addNonEnumerableProperty(this, NON_RECORDING_SPAN_FIELD, true);\n  }\n\n  /** @inheritdoc */\n  public spanContext(): SpanContextData {\n    return {\n      spanId: this._spanId,\n      traceId: this._traceId,\n      traceFlags: TRACE_FLAG_NONE,\n    };\n  }\n\n  /** @inheritdoc */\n  public end(_timestamp?: SpanTimeInput): void {}\n\n  /** @inheritdoc */\n  public setAttribute(_key: string, _value: SpanAttributeValue | undefined): this {\n    return this;\n  }\n\n  /** @inheritdoc */\n  public setAttributes(_values: SpanAttributes): this {\n    return this;\n  }\n\n  /** @inheritdoc */\n  public setStatus(_status: SpanStatus): this {\n    return this;\n  }\n\n  /** @inheritdoc */\n  public updateName(_name: string): this {\n    return this;\n  }\n\n  /** @inheritdoc */\n  public isRecording(): boolean {\n    return false;\n  }\n\n  /** @inheritdoc */\n  public addEvent(\n    _name: string,\n    _attributesOrStartTime?: SpanAttributes | SpanTimeInput,\n    _startTime?: SpanTimeInput,\n  ): this {\n    return this;\n  }\n\n  /** @inheritDoc */\n  public addLink(_link: unknown): this {\n    return this;\n  }\n\n  /** @inheritDoc */\n  public addLinks(_links: unknown[]): this {\n    return this;\n  }\n\n  /**\n   * This should generally not be used,\n   * but we need it for being compliant with the OTEL Span interface.\n   *\n   * @hidden\n   * @internal\n   */\n  public recordException(_exception: unknown, _time?: SpanTimeInput | undefined): void {\n    // noop\n  }\n}\n\n/**\n * Whether the given span is a {@link SentryNonRecordingSpan}.\n */\nexport function spanIsNonRecordingSpan(span: Span | undefined): span is SentryNonRecordingSpan {\n  return !!span && (span as { [NON_RECORDING_SPAN_FIELD]?: boolean })[NON_RECORDING_SPAN_FIELD] === true;\n}\n","/* eslint-disable max-lines */\nimport { getClient, getCurrentScope } from '../currentScopes';\nimport { DEBUG_BUILD } from '../debug-build';\nimport { createSpanEnvelope } from '../envelope';\nimport {\n  SEMANTIC_ATTRIBUTE_EXCLUSIVE_TIME,\n  SEMANTIC_ATTRIBUTE_PROFILE_ID,\n  SEMANTIC_ATTRIBUTE_SENTRY_CUSTOM_SPAN_NAME,\n  SEMANTIC_ATTRIBUTE_SENTRY_OP,\n  SEMANTIC_ATTRIBUTE_SENTRY_ORIGIN,\n  SEMANTIC_ATTRIBUTE_SENTRY_SOURCE,\n} from '../semanticAttributes';\nimport type { SpanEnvelope } from '../types/envelope';\nimport type { TransactionEvent } from '../types/event';\nimport type { SpanLink } from '../types/link';\nimport type {\n  SentrySpanArguments,\n  Span,\n  SpanAttributes,\n  SpanAttributeValue,\n  SpanContextData,\n  SpanJSON,\n  SpanOrigin,\n  SpanTimeInput,\n  StreamedSpanJSON,\n} from '../types/span';\nimport type { SpanStatus } from '../types/spanStatus';\nimport type { TimedEvent } from '../types/timedEvent';\nimport { debug } from '../utils/debug-logger';\nimport { generateSpanId, generateTraceId } from '../utils/propagationContext';\nimport {\n  addStatusMessageAttribute,\n  convertSpanLinksForEnvelope,\n  getRootSpan,\n  getSimpleStatus,\n  getSpanDescendants,\n  getStatusMessage,\n  getStreamedSpanLinks,\n  spanTimeInputToSeconds,\n  spanToJSON,\n  spanToTransactionTraceContext,\n  TRACE_FLAG_NONE,\n  TRACE_FLAG_SAMPLED,\n} from '../utils/spanUtils';\nimport { timestampInSeconds } from '../utils/time';\nimport { getDynamicSamplingContextFromSpan } from './dynamicSamplingContext';\nimport { logSpanEnd } from './logSpans';\nimport { timedEventsToMeasurements } from './measurement';\nimport { getSegmentSpanCaptureStrategy, type SegmentSpanCaptureConvertOptions } from './segmentSpanCaptureStrategy';\nimport { hasSpanStreamingEnabled } from './spans/hasSpanStreamingEnabled';\nimport {\n  getCapturedScopesOnSpan,\n  markSpanSourceAsExplicit,\n  spanIsTracerProviderSpan,\n  spanShouldInferOtelSource,\n} from './utils';\n\nconst MAX_SPAN_COUNT = 1000;\n\n/**\n * Span contains all data about a span\n */\nexport class SentrySpan implements Span {\n  protected _traceId: string;\n  protected _spanId: string;\n  protected _parentSpanId?: string | undefined;\n  protected _sampled: boolean | undefined;\n  protected _name?: string | undefined;\n  protected _attributes: SpanAttributes;\n  protected _links?: SpanLink[];\n  /** Epoch timestamp in seconds when the span started. */\n  protected _startTime: number;\n  /** Epoch timestamp in seconds when the span ended. */\n  protected _endTime?: number | undefined;\n  /** Internal keeper of the status */\n  protected _status?: SpanStatus;\n  /** The timed events added to this span. */\n  protected _events: TimedEvent[];\n\n  /** if true, treat span as a standalone span (not part of a transaction) */\n  private _isStandaloneSpan?: boolean;\n\n  /** if true, the span is sealed and ignores further mutations (set after end for tracer-provider spans) */\n  private _frozen?: boolean;\n\n  /**\n   * You should never call the constructor manually, always use `Sentry.startSpan()`\n   * or other span methods.\n   * @internal\n   * @hideconstructor\n   * @hidden\n   */\n  public constructor(spanContext: SentrySpanArguments = {}) {\n    this._traceId = spanContext.traceId || generateTraceId();\n    this._spanId = spanContext.spanId || generateSpanId();\n    this._startTime = spanContext.startTimestamp || timestampInSeconds();\n    this._links = spanContext.links;\n\n    this._attributes = {};\n    this.setAttributes({\n      [SEMANTIC_ATTRIBUTE_SENTRY_ORIGIN]: 'manual',\n      [SEMANTIC_ATTRIBUTE_SENTRY_OP]: spanContext.op,\n      ...spanContext.attributes,\n    });\n\n    this._name = spanContext.name;\n\n    if (spanContext.parentSpanId) {\n      this._parentSpanId = spanContext.parentSpanId;\n    }\n    // We want to include booleans as well here\n    if ('sampled' in spanContext) {\n      this._sampled = spanContext.sampled;\n    }\n    if (spanContext.endTimestamp) {\n      this._endTime = spanContext.endTimestamp;\n    }\n\n    this._events = [];\n\n    this._isStandaloneSpan = spanContext.isStandalone;\n\n    // If the span is already ended, ensure we finalize the span immediately\n    if (this._endTime) {\n      this._onSpanEnded();\n    }\n  }\n\n  /** @inheritDoc */\n  public addLink(link: SpanLink): this {\n    if (this._frozen) {\n      return this;\n    }\n    if (this._links) {\n      this._links.push(link);\n    } else {\n      this._links = [link];\n    }\n    return this;\n  }\n\n  /** @inheritDoc */\n  public addLinks(links: SpanLink[]): this {\n    if (this._frozen) {\n      return this;\n    }\n    if (this._links) {\n      this._links.push(...links);\n    } else {\n      this._links = links;\n    }\n    return this;\n  }\n\n  /**\n   * This should generally not be used,\n   * but it is needed for being compliant with the OTEL Span interface.\n   *\n   * @hidden\n   * @internal\n   */\n  public recordException(_exception: unknown, _time?: SpanTimeInput | undefined): void {\n    // noop\n  }\n\n  /** @inheritdoc */\n  public spanContext(): SpanContextData {\n    const { _spanId: spanId, _traceId: traceId, _sampled: sampled } = this;\n    return {\n      spanId,\n      traceId,\n      traceFlags: sampled ? TRACE_FLAG_SAMPLED : TRACE_FLAG_NONE,\n    };\n  }\n\n  /** @inheritdoc */\n  public setAttribute(key: string, value: SpanAttributeValue | undefined): this {\n    if (this._frozen) {\n      return this;\n    }\n\n    if (value === undefined) {\n      // eslint-disable-next-line @typescript-eslint/no-dynamic-delete\n      delete this._attributes[key];\n    } else {\n      this._attributes[key] = value;\n    }\n\n    // Setting the source on a span branded for OTel-style inference means user code is choosing it\n    // explicitly, so flag it to keep `applyOtelSpanData` from overriding it with an inferred source.\n    if (key === SEMANTIC_ATTRIBUTE_SENTRY_SOURCE && value !== undefined && spanShouldInferOtelSource(this)) {\n      markSpanSourceAsExplicit(this);\n    }\n\n    return this;\n  }\n\n  /** @inheritdoc */\n  public setAttributes(attributes: SpanAttributes): this {\n    Object.keys(attributes).forEach(key => this.setAttribute(key, attributes[key]));\n    return this;\n  }\n\n  /**\n   * This should generally not be used,\n   * but we need it for browser tracing where we want to adjust the start time afterwards.\n   * USE THIS WITH CAUTION!\n   *\n   * @hidden\n   * @internal\n   */\n  public updateStartTime(timeInput: SpanTimeInput): void {\n    if (this._frozen) {\n      return;\n    }\n    this._startTime = spanTimeInputToSeconds(timeInput);\n  }\n\n  /**\n   * @inheritDoc\n   */\n  public setStatus(value: SpanStatus): this {\n    if (this._frozen) {\n      return this;\n    }\n    this._status = value;\n    return this;\n  }\n\n  /**\n   * @inheritDoc\n   */\n  public updateName(name: string): this {\n    if (this._frozen) {\n      return this;\n    }\n    this._name = name;\n    // Renaming a span marks its name as explicitly chosen, so we stamp `custom`.\n    // The exception is spans created by SentryTraceProvider: those are branded for\n    // OTel-style source inference at span end (mirroring OTel SDK spans, which have\n    // no Sentry source concept), so instrumentations renaming them must not pin\n    // `custom` — applyOtelSpanData infers the correct source (e.g. 'route', 'task').\n    if (!spanShouldInferOtelSource(this)) {\n      this.setAttribute(SEMANTIC_ATTRIBUTE_SENTRY_SOURCE, 'custom');\n    }\n    return this;\n  }\n\n  /** @inheritdoc */\n  public end(endTimestamp?: SpanTimeInput): void {\n    // If already ended, skip the end-of-span processing, but still seal a tracer-provider span. The\n    // seal at the bottom of this method is skipped on this early return, and `_endTime` may have been\n    // set before this first `end()` call (e.g. via the constructor's `endTimestamp`), which would\n    // otherwise leave the span mutable after `end()`. End-of-span processing already ran in that case.\n    if (this._endTime) {\n      this._frozen = spanIsTracerProviderSpan(this);\n      return;\n    }\n\n    this._endTime = spanTimeInputToSeconds(endTimestamp);\n    logSpanEnd(this);\n\n    this._onSpanEnded();\n\n    // A span created by the SentryTracerProvider is handed to OTel instrumentations as an OTel span,\n    // so once end-of-span processing is done (including the `spanEnd` hook where `applyOtelSpanData`\n    // finalizes status/source) it is sealed against further writes — mirroring the OpenTelemetry SDK,\n    // where setters no-op after a span has ended. Without this, an instrumentation that sets\n    // status/attributes after `end()` (e.g. Next.js on a render error) would overwrite the finalized\n    // values, and the deferred capture would then serialize those late writes. Spans created directly\n    // through the core API (e.g. the browser SDK, which backfills resource-timing attributes after a\n    // span ends) are not tracer-provider spans and stay mutable.\n    this._frozen = spanIsTracerProviderSpan(this);\n  }\n\n  /**\n   * Get JSON representation of this span.\n   *\n   * @hidden\n   * @internal This method is purely for internal purposes and should not be used outside\n   * of SDK code. If you need to get a JSON representation of a span,\n   * use `spanToJSON(span)` instead.\n   */\n  public getSpanJSON(): SpanJSON {\n    return {\n      data: this._attributes,\n      description: this._name,\n      op: this._attributes[SEMANTIC_ATTRIBUTE_SENTRY_OP],\n      parent_span_id: this._parentSpanId,\n      span_id: this._spanId,\n      start_timestamp: this._startTime,\n      status: getStatusMessage(this._status),\n      timestamp: this._endTime,\n      trace_id: this._traceId,\n      origin: this._attributes[SEMANTIC_ATTRIBUTE_SENTRY_ORIGIN] as SpanOrigin | undefined,\n      profile_id: this._attributes[SEMANTIC_ATTRIBUTE_PROFILE_ID] as string | undefined,\n      exclusive_time: this._attributes[SEMANTIC_ATTRIBUTE_EXCLUSIVE_TIME] as number | undefined,\n      measurements: timedEventsToMeasurements(this._events),\n      is_segment: (this._isStandaloneSpan && getRootSpan(this) === this) || undefined,\n      segment_id: this._isStandaloneSpan ? getRootSpan(this).spanContext().spanId : undefined,\n      links: convertSpanLinksForEnvelope(this._links),\n    };\n  }\n\n  /**\n   * Get {@link StreamedSpanJSON} representation of this span.\n   *\n   * @hidden\n   * @internal This method is purely for internal purposes and should not be used outside\n   * of SDK code. If you need to get a JSON representation of a span,\n   * use `spanToStreamedSpanJSON(span)` instead.\n   */\n  public getStreamedSpanJSON(): StreamedSpanJSON {\n    return {\n      name: this._name ?? '',\n      span_id: this._spanId,\n      trace_id: this._traceId,\n      parent_span_id: this._parentSpanId,\n      start_timestamp: this._startTime,\n      // just in case _endTime is not set, we use the start time (i.e. duration 0)\n      end_timestamp: this._endTime ?? this._startTime,\n      is_segment: this._isStandaloneSpan || this === getRootSpan(this),\n      status: getSimpleStatus(this._status),\n      attributes: addStatusMessageAttribute(this._attributes, this._status),\n      links: getStreamedSpanLinks(this._links),\n    };\n  }\n\n  /** @inheritdoc */\n  public isRecording(): boolean {\n    return !this._endTime && !!this._sampled;\n  }\n\n  /**\n   * @inheritdoc\n   */\n  public addEvent(\n    name: string,\n    attributesOrStartTime?: SpanAttributes | SpanTimeInput,\n    startTime?: SpanTimeInput,\n  ): this {\n    if (this._frozen) {\n      return this;\n    }\n    DEBUG_BUILD && debug.log('[Tracing] Adding an event to span:', name);\n\n    const time = isSpanTimeInput(attributesOrStartTime) ? attributesOrStartTime : startTime || timestampInSeconds();\n    const attributes = isSpanTimeInput(attributesOrStartTime) ? {} : attributesOrStartTime || {};\n\n    const event: TimedEvent = {\n      name,\n      time: spanTimeInputToSeconds(time),\n      attributes,\n    };\n\n    this._events.push(event);\n\n    return this;\n  }\n\n  /**\n   * This method should generally not be used,\n   * but for now we need a way to publicly check if the `_isStandaloneSpan` flag is set.\n   * USE THIS WITH CAUTION!\n   * @internal\n   * @hidden\n   * @experimental\n   */\n  public isStandaloneSpan(): boolean {\n    return !!this._isStandaloneSpan;\n  }\n\n  /** Emit `spanEnd` when the span is ended. */\n  private _onSpanEnded(): void {\n    const client = getClient();\n    if (client) {\n      client.emit('spanEnd', this);\n      // Guarding sending standalone v1 spans as v2 streamed spans for now.\n      // Otherwise they'd be sent once as v1 spans and again as streamed spans.\n      // We'll migrate CLS and LCP spans to streamed spans in a later PR and\n      // INP spans in the next major of the SDK. At that point, we can fully remove\n      // standalone v1 spans <3\n      if (!this._isStandaloneSpan) {\n        client.emit('afterSpanEnd', this);\n      }\n    }\n\n    // A segment span is basically the root span of a local span tree.\n    // So for now, this is either what we previously refer to as the root span,\n    // or a standalone span.\n    const rootSpan = getRootSpan(this);\n    const isSegmentSpan = this._isStandaloneSpan || this === rootSpan;\n\n    // if this is a standalone span, we send it immediately\n    if (this._isStandaloneSpan) {\n      if (this._sampled) {\n        sendSpanEnvelope(createSpanEnvelope([this], client));\n      } else {\n        DEBUG_BUILD &&\n          debug.log('[Tracing] Discarding standalone span because its trace was not chosen to be sampled.');\n        if (client) {\n          client.recordDroppedEvent('sample_rate', 'span');\n        }\n      }\n      return;\n    }\n\n    // Non-segment children aren't captured on their own. A registered strategy may re-emit a late child\n    // as its own orphan transaction; without one, it's dropped.\n    if (!isSegmentSpan) {\n      const strategy = getSegmentSpanCaptureStrategy();\n      if (strategy) {\n        const scope = getCapturedScopesOnSpan(this).scope || getCurrentScope();\n        strategy.onChildSpanEnded(this, rootSpan, options => this._convertSpanToTransaction(options), scope);\n      }\n      return;\n    }\n\n    if (client && hasSpanStreamingEnabled(client)) {\n      // TODO (spans): Remove standalone span custom logic in favor of sending simple v2 web vital spans\n      client.emit('afterSegmentSpanEnd', this);\n      return;\n    }\n\n    // A registered strategy defers the snapshot so children closing just after the segment still land\n    // (and late ones can orphan); without one, assemble synchronously from the live tree.\n    const scope = getCapturedScopesOnSpan(this).scope || getCurrentScope();\n    const strategy = getSegmentSpanCaptureStrategy();\n    if (strategy) {\n      strategy.onSegmentSpanEnded(options => this._convertSpanToTransaction(options), scope);\n    } else {\n      const transactionEvent = this._convertSpanToTransaction();\n      if (transactionEvent) {\n        scope.captureEvent(transactionEvent);\n      }\n    }\n  }\n\n  /**\n   * Finish the transaction & prepare the event to send to Sentry.\n   */\n  private _convertSpanToTransaction(options: SegmentSpanCaptureConvertOptions = {}): TransactionEvent | undefined {\n    // We can only convert finished spans\n    if (!isFullFinishedSpan(spanToJSON(this))) {\n      return undefined;\n    }\n\n    if (!this._name) {\n      DEBUG_BUILD && debug.warn('Transaction has no name, falling back to `<unlabeled transaction>`.');\n      this._name = '<unlabeled transaction>';\n    }\n\n    const { scope: capturedSpanScope, isolationScope: capturedSpanIsolationScope } = getCapturedScopesOnSpan(this);\n\n    const normalizedRequest = capturedSpanScope?.getScopeData().sdkProcessingMetadata?.normalizedRequest;\n\n    if (this._sampled !== true) {\n      return undefined;\n    }\n\n    // Skip the span itself, standalone spans, and (when a strategy tracks it) spans already sent. The\n    // synchronous default passes no hooks, so this bookkeeping stays out of SDKs that don't defer.\n    options.onSpanCaptured?.(this);\n    const spans: SpanJSON[] = [];\n    for (const descendant of getSpanDescendants(this)) {\n      if (descendant === this || isStandaloneSpan(descendant) || options.isSpanAlreadyCaptured?.(descendant)) {\n        continue;\n      }\n      const spanJSON = spanToJSON(descendant);\n      if (!isFullFinishedSpan(spanJSON)) {\n        continue;\n      }\n      options.onSpanCaptured?.(descendant);\n      spans.push(spanJSON);\n    }\n\n    const source = this._attributes[SEMANTIC_ATTRIBUTE_SENTRY_SOURCE];\n\n    // remove internal root span attributes we don't need to send.\n    /* eslint-disable @typescript-eslint/no-dynamic-delete */\n    delete this._attributes[SEMANTIC_ATTRIBUTE_SENTRY_CUSTOM_SPAN_NAME];\n    let hasGenAiSpans = false;\n    spans.forEach(span => {\n      delete span.data[SEMANTIC_ATTRIBUTE_SENTRY_CUSTOM_SPAN_NAME];\n      if (span.op?.startsWith('gen_ai.')) {\n        hasGenAiSpans = true;\n      }\n    });\n    // eslint-enabled-next-line @typescript-eslint/no-dynamic-delete\n\n    const transaction: TransactionEvent = {\n      contexts: {\n        trace: spanToTransactionTraceContext(this),\n      },\n      spans:\n        // spans.sort() mutates the array, but `spans` is already a copy so we can safely do this here\n        // we do not use spans anymore after this point\n        spans.length > MAX_SPAN_COUNT\n          ? spans.sort((a, b) => a.start_timestamp - b.start_timestamp).slice(0, MAX_SPAN_COUNT)\n          : spans,\n      start_timestamp: this._startTime,\n      timestamp: this._endTime,\n      transaction: this._name,\n      type: 'transaction',\n      sdkProcessingMetadata: {\n        capturedSpanScope,\n        capturedSpanIsolationScope,\n        dynamicSamplingContext: getDynamicSamplingContextFromSpan(this),\n        hasGenAiSpans,\n      },\n      request: normalizedRequest,\n      ...(source && {\n        transaction_info: {\n          source,\n        },\n      }),\n    };\n\n    const measurements = timedEventsToMeasurements(this._events);\n    const hasMeasurements = measurements && Object.keys(measurements).length;\n\n    if (hasMeasurements) {\n      DEBUG_BUILD &&\n        debug.log(\n          '[Measurements] Adding measurements to transaction event',\n          JSON.stringify(measurements, undefined, 2),\n        );\n      transaction.measurements = measurements;\n    }\n\n    return transaction;\n  }\n}\n\nfunction isSpanTimeInput(value: undefined | SpanAttributes | SpanTimeInput): value is SpanTimeInput {\n  return (value && typeof value === 'number') || value instanceof Date || Array.isArray(value);\n}\n\n// We want to filter out any incomplete SpanJSON objects\nfunction isFullFinishedSpan(input: Partial<SpanJSON>): input is SpanJSON {\n  return !!input.start_timestamp && !!input.timestamp && !!input.span_id && !!input.trace_id;\n}\n\n/** `SentrySpan`s can be sent as a standalone span rather than belonging to a transaction */\nfunction isStandaloneSpan(span: Span): boolean {\n  return span instanceof SentrySpan && span.isStandaloneSpan();\n}\n\n/**\n * Sends a `SpanEnvelope`.\n *\n * Note: If the envelope's spans are dropped, e.g. via `beforeSendSpan`,\n * the envelope will not be sent either.\n */\nfunction sendSpanEnvelope(envelope: SpanEnvelope): void {\n  const client = getClient();\n  if (!client) {\n    return;\n  }\n\n  const spanItems = envelope[1];\n  if (!spanItems || spanItems.length === 0) {\n    client.recordDroppedEvent('before_send', 'span');\n    return;\n  }\n\n  // sendEnvelope should not throw\n  // eslint-disable-next-line @typescript-eslint/no-floating-promises\n  client.sendEnvelope(envelope);\n}\n","import type { CoreOptions } from '../../types/options';\nimport type { BeforeSendStreamedSpanCallback } from '../../types/options';\nimport type { StreamedSpanJSON } from '../../types/span';\nimport { addNonEnumerableProperty } from '../../utils/object';\n\ntype StaticBeforeSendSpanCallback = CoreOptions['beforeSendSpan'];\n\n/**\n * A wrapper to use the new span format in your `beforeSendSpan` callback.\n *\n * When using `traceLifecycle: 'stream'`, wrap your callback with this function\n * to receive and return {@link StreamedSpanJSON} instead of the standard {@link SpanJSON}.\n *\n * @example\n *\n * Sentry.init({\n *   traceLifecycle: 'stream',\n *   beforeSendSpan: withStreamedSpan((span) => {\n *     // span is of type StreamedSpanJSON\n *     return span;\n *   }),\n * });\n *\n * @param callback - The callback function that receives and returns a {@link StreamedSpanJSON}.\n * @returns A callback that is compatible with the `beforeSendSpan` option when using `traceLifecycle: 'stream'`.\n */\nexport function withStreamedSpan(\n  callback: (span: StreamedSpanJSON) => StreamedSpanJSON,\n): StaticBeforeSendSpanCallback & { _streamed: true } {\n  addNonEnumerableProperty(callback, '_streamed', true);\n  return callback as unknown as StaticBeforeSendSpanCallback & { _streamed: true };\n}\n\n/**\n * Typesafe check to identify if a `beforeSendSpan` callback expects the streamed span JSON format.\n *\n * @param callback - The `beforeSendSpan` callback to check.\n * @returns `true` if the callback was wrapped with {@link withStreamedSpan}.\n */\nexport function isStreamedBeforeSendSpanCallback(callback: unknown): callback is BeforeSendStreamedSpanCallback {\n  return !!callback && typeof callback === 'function' && '_streamed' in callback && !!callback._streamed;\n}\n","import type { RawAttributes } from '../../attributes';\nimport type { Client } from '../../client';\nimport type { ScopeData } from '../../scope';\nimport {\n  SEMANTIC_ATTRIBUTE_SENTRY_ENVIRONMENT,\n  SEMANTIC_ATTRIBUTE_SENTRY_RELEASE,\n  SEMANTIC_ATTRIBUTE_SENTRY_SDK_INTEGRATIONS,\n  SEMANTIC_ATTRIBUTE_SENTRY_SOURCE,\n  SEMANTIC_ATTRIBUTE_USER_EMAIL,\n  SEMANTIC_ATTRIBUTE_USER_ID,\n  SEMANTIC_ATTRIBUTE_USER_IP_ADDRESS,\n  SEMANTIC_ATTRIBUTE_USER_USERNAME,\n} from '../../semanticAttributes';\nimport type { SerializedStreamedSpan, Span, StreamedSpanJSON } from '../../types/span';\nimport { getCombinedScopeData } from '../../utils/scopeData';\nimport {\n  INTERNAL_getSegmentSpan,\n  showSpanDropWarning,\n  spanToStreamedSpanJSON,\n  streamedSpanJsonToSerializedSpan,\n} from '../../utils/spanUtils';\nimport { getCapturedScopesOnSpan } from '../utils';\nimport { isStreamedBeforeSendSpanCallback } from './beforeSendSpan';\nimport { scopeContextsToSpanAttributes } from './scopeContextAttributes';\nimport { DEFAULT_ENVIRONMENT } from '../../constants';\nimport {\n  SENTRY_SDK_NAME,\n  SENTRY_SDK_VERSION,\n  SENTRY_SEGMENT_ID,\n  SENTRY_SEGMENT_NAME,\n  SENTRY_TRACE_LIFECYCLE,\n} from '@sentry/conventions/attributes';\n\nexport type SerializedStreamedSpanWithSegmentSpan = SerializedStreamedSpan & {\n  _segmentSpan: Span;\n};\n\n/**\n * Captures a span and returns a JSON representation to be enqueued for sending.\n *\n * IMPORTANT: This function converts the span to JSON immediately to avoid writing\n * to an already-ended OTel span instance (which is blocked by the OTel Span class).\n *\n * @returns the final serialized span with a reference to its segment span. This reference\n * is needed later on to compute the DSC for the span envelope.\n */\nexport function captureSpan(span: Span, client: Client): SerializedStreamedSpanWithSegmentSpan {\n  // Convert to JSON FIRST - we cannot write to an already-ended span\n  const spanJSON = spanToStreamedSpanJSON(span);\n\n  const segmentSpan = INTERNAL_getSegmentSpan(span);\n  const serializedSegmentSpan = spanToStreamedSpanJSON(segmentSpan);\n\n  const { isolationScope: spanIsolationScope, scope: spanScope } = getCapturedScopesOnSpan(span);\n\n  const finalScopeData = getCombinedScopeData(spanIsolationScope, spanScope);\n\n  applyCommonSpanAttributes(spanJSON, serializedSegmentSpan, client, finalScopeData);\n\n  // Access `kind` via duck-typing — OTel span objects have this property but it's not on Sentry's Span type.\n  // It is forwarded to `preprocessSpan` subscribers (e.g. the OpenTelemetry SDK backfills op/source/name from it).\n  const spanKind = (span as { kind?: number }).kind;\n\n  // Preprocess the span JSON before any other hooks run, so that `processSpan`/`processSegmentSpan`\n  // subscribers (incl. integrations) and `beforeSendSpan` see fully inferred span data.\n  client.emit('preprocessSpan', spanJSON, { spanKind });\n\n  if (spanJSON.is_segment) {\n    applyScopeToSegmentSpan(spanJSON, finalScopeData);\n    applySdkMetadataToSegmentSpan(spanJSON, client);\n    // Allow hook subscribers to mutate the segment span JSON\n    // This also invokes the `processSegmentSpan` hook of all integrations\n    client.emit('processSegmentSpan', spanJSON);\n  }\n\n  // This allows hook subscribers to mutate the span JSON\n  // This also invokes the `processSpan` hook of all integrations\n  client.emit('processSpan', spanJSON);\n\n  const { beforeSendSpan } = client.getOptions();\n  const processedSpan =\n    beforeSendSpan && isStreamedBeforeSendSpanCallback(beforeSendSpan)\n      ? applyBeforeSendSpanCallback(spanJSON, beforeSendSpan)\n      : spanJSON;\n\n  const spanNameSource = processedSpan.attributes?.[SEMANTIC_ATTRIBUTE_SENTRY_SOURCE];\n  if (spanJSON.is_segment && spanNameSource) {\n    // Backfill sentry.segment.name.source from sentry.source.\n    // TODO(v11): Remove this backfill once we removed setting SEMANTIC_ATTRIBUTE_SENTRY_SOURCE in favour of\n    // SENTRY_SEGMENT_NAME_SOURCE from @sentry/conventions/attributes only on segment spans.\n    safeSetSpanJSONAttributes(processedSpan, {\n      ['sentry.segment.name.source']: spanNameSource,\n    });\n  }\n\n  return {\n    ...streamedSpanJsonToSerializedSpan(processedSpan),\n    _segmentSpan: segmentSpan,\n  };\n}\n\nfunction applyScopeToSegmentSpan(segmentSpanJSON: StreamedSpanJSON, scopeData: ScopeData): void {\n  const contextAttributes = scopeContextsToSpanAttributes(scopeData.contexts);\n  safeSetSpanJSONAttributes(segmentSpanJSON, contextAttributes);\n}\n\n/**\n * Safely set attributes on a span JSON.\n * If an attribute already exists, it will not be overwritten.\n */\nexport function safeSetSpanJSONAttributes(\n  spanJSON: StreamedSpanJSON,\n  newAttributes: RawAttributes<Record<string, unknown>>,\n): void {\n  const originalAttributes = spanJSON.attributes ?? (spanJSON.attributes = {});\n\n  Object.entries(newAttributes).forEach(([key, value]) => {\n    if (value != null && !(key in originalAttributes)) {\n      originalAttributes[key] = value;\n    }\n  });\n}\n\nfunction applySdkMetadataToSegmentSpan(segmentSpanJSON: StreamedSpanJSON, client: Client): void {\n  const integrationNames = client.getIntegrationNames();\n  if (!integrationNames.length) return;\n\n  safeSetSpanJSONAttributes(segmentSpanJSON, {\n    [SEMANTIC_ATTRIBUTE_SENTRY_SDK_INTEGRATIONS]: integrationNames,\n  });\n}\n\nfunction applyCommonSpanAttributes(\n  spanJSON: StreamedSpanJSON,\n  serializedSegmentSpan: StreamedSpanJSON,\n  client: Client,\n  scopeData: ScopeData,\n): void {\n  const sdk = client.getSdkMetadata();\n  const { release, environment } = client.getOptions();\n\n  // avoid overwriting any previously set attributes (from users or potentially our SDK instrumentation)\n  safeSetSpanJSONAttributes(spanJSON, {\n    [SENTRY_TRACE_LIFECYCLE]: 'stream',\n    [SENTRY_SEGMENT_NAME]: serializedSegmentSpan.name,\n    [SENTRY_SEGMENT_ID]: serializedSegmentSpan.span_id,\n    [SENTRY_SDK_NAME]: sdk?.sdk?.name,\n    [SENTRY_SDK_VERSION]: sdk?.sdk?.version,\n    [SEMANTIC_ATTRIBUTE_SENTRY_RELEASE]: release,\n    [SEMANTIC_ATTRIBUTE_SENTRY_ENVIRONMENT]: environment || DEFAULT_ENVIRONMENT,\n    [SEMANTIC_ATTRIBUTE_USER_ID]: scopeData.user?.id,\n    [SEMANTIC_ATTRIBUTE_USER_EMAIL]: scopeData.user?.email,\n    [SEMANTIC_ATTRIBUTE_USER_IP_ADDRESS]: scopeData.user?.ip_address,\n    [SEMANTIC_ATTRIBUTE_USER_USERNAME]: scopeData.user?.username,\n    ...scopeData.attributes,\n  });\n}\n\n/**\n * Apply a user-provided beforeSendSpan callback to a span JSON.\n */\nexport function applyBeforeSendSpanCallback(\n  span: StreamedSpanJSON,\n  beforeSendSpan: (span: StreamedSpanJSON) => StreamedSpanJSON,\n): StreamedSpanJSON {\n  const modifedSpan = beforeSendSpan(span);\n  if (!modifedSpan) {\n    showSpanDropWarning();\n    return span;\n  }\n  return modifedSpan;\n}\n","import type { Client } from '../../client';\nimport type { DynamicSamplingContext, SpanContainerItem, StreamedSpanEnvelope } from '../../types/envelope';\nimport type { SerializedStreamedSpan } from '../../types/span';\nimport { dsnToString } from '../../utils/dsn';\nimport { createEnvelope, getSdkMetadataForEnvelopeHeader } from '../../utils/envelope';\nimport { isBrowser } from '../../utils/isBrowser';\nimport { safeDateNow } from '../../utils/randomSafeContext';\n\n/**\n * Creates a span v2 span streaming envelope\n */\nexport function createStreamedSpanEnvelope(\n  serializedSpans: Array<SerializedStreamedSpan>,\n  dsc: Partial<DynamicSamplingContext>,\n  client: Client,\n): StreamedSpanEnvelope {\n  const options = client.getOptions();\n  const dsn = client.getDsn();\n  const tunnel = options.tunnel;\n  const sdk = getSdkMetadataForEnvelopeHeader(options._metadata);\n\n  const headers: StreamedSpanEnvelope[0] = {\n    sent_at: new Date(safeDateNow()).toISOString(),\n    ...(dscHasRequiredProps(dsc) && { trace: dsc }),\n    ...(sdk && { sdk }),\n    ...(!!tunnel && dsn && { dsn: dsnToString(dsn) }),\n  };\n\n  const inferSetting = client.getDataCollectionOptions().userInfo ? 'auto' : 'never';\n\n  const spanContainer: SpanContainerItem = [\n    { type: 'span', item_count: serializedSpans.length, content_type: 'application/vnd.sentry.items.span.v2+json' },\n    {\n      version: 2,\n      ...(isBrowser() && {\n        ingest_settings: { infer_ip: inferSetting, infer_user_agent: inferSetting },\n      }),\n      items: serializedSpans,\n    },\n  ];\n\n  return createEnvelope<StreamedSpanEnvelope>(headers, [spanContainer]);\n}\n\nfunction dscHasRequiredProps(dsc: Partial<DynamicSamplingContext>): dsc is DynamicSamplingContext {\n  return !!dsc.trace_id && !!dsc.public_key;\n}\n","import { estimateTypedAttributesSizeInBytes } from '../../attributes';\nimport type { SerializedStreamedSpan } from '../../types/span';\n\n/**\n * Estimates the serialized byte size of a {@link SerializedStreamedSpan}.\n *\n * Uses 2 bytes per character as a UTF-16 approximation, and 8 bytes per number.\n * The estimate is intentionally conservative and may be slightly lower than the\n * actual byte size on the wire.\n * We compensate for this by setting the span buffers internal limit well below the limit\n * of how large an actual span v2 envelope may be.\n */\nexport function estimateSerializedSpanSizeInBytes(span: SerializedStreamedSpan): number {\n  /*\n   * Fixed-size fields are pre-computed as a constant for performance:\n   * - two timestamps (8 bytes each = 16)\n   * - is_segment boolean (5 bytes, assumed false for most spans)\n   * - trace_id  – always 32 hex chars (64 bytes)\n   * - span_id   – always 16 hex chars (32 bytes)\n   * - parent_span_id – 16 hex chars, assumed present for most spans (32 bytes)\n   * - status \"ok\" – most common value (8 bytes)\n   * = 156 bytes total base\n   */\n  let weight = 156;\n  weight += span.name.length * 2;\n  weight += estimateTypedAttributesSizeInBytes(span.attributes);\n  if (span.links && span.links.length > 0) {\n    // Assumption: Links are roughly equal in number of attributes\n    // probably not always true but allows us to cut down on runtime\n    const firstLink = span.links[0];\n    const attributes = firstLink?.attributes;\n    // Fixed size 100 due to span_id, trace_id and sampled flag (see above)\n    const linkWeight = 100 + (attributes ? estimateTypedAttributesSizeInBytes(attributes) : 0);\n    weight += linkWeight * span.links.length;\n  }\n  return weight;\n}\n","import type { Client } from '../../client';\nimport type { SpanContainerItem } from '../../types/envelope';\nimport type { Event } from '../../types/event';\nimport { isBrowser } from '../../utils/isBrowser';\nimport { hasSpanStreamingEnabled } from './hasSpanStreamingEnabled';\nimport { spanJsonToSerializedStreamedSpan } from './spanJsonToStreamedSpan';\n\n/**\n * Extracts gen_ai spans from a transaction event, converts them to span v2 format,\n * and returns them as a SpanContainerItem.\n *\n * Only applies to static mode (non-streaming) transactions.\n *\n * WARNING: This function mutates `event.spans` by removing the extracted gen_ai spans\n * from the array. Call this before creating the event envelope so the transaction\n * item does not include the extracted spans.\n */\nexport function extractGenAiSpansFromEvent(event: Event, client: Client): SpanContainerItem | undefined {\n  if (\n    event.type !== 'transaction' ||\n    !event.spans?.length ||\n    !event.sdkProcessingMetadata?.hasGenAiSpans ||\n    client.getOptions().streamGenAiSpans === false ||\n    hasSpanStreamingEnabled(client)\n  ) {\n    return undefined;\n  }\n\n  const genAiSpans = [];\n  const remainingSpans = [];\n\n  for (const span of event.spans) {\n    if (span.op?.startsWith('gen_ai.')) {\n      genAiSpans.push(spanJsonToSerializedStreamedSpan(span));\n    } else {\n      remainingSpans.push(span);\n    }\n  }\n\n  if (genAiSpans.length === 0) {\n    return undefined;\n  }\n\n  event.spans = remainingSpans;\n\n  const inferSetting = client.getDataCollectionOptions().userInfo ? 'auto' : 'never';\n\n  return [\n    { type: 'span', item_count: genAiSpans.length, content_type: 'application/vnd.sentry.items.span.v2+json' },\n    {\n      version: 2,\n      ...(isBrowser() && {\n        ingest_settings: { infer_ip: inferSetting, infer_user_agent: inferSetting },\n      }),\n      items: genAiSpans,\n    },\n  ];\n}\n","import type { Client } from '../../client';\n\n/**\n * Determines if span streaming is enabled for the given client\n */\nexport function hasSpanStreamingEnabled(client: Client): boolean {\n  return client.getOptions().traceLifecycle === 'stream';\n}\n","import type { Contexts } from '../../types/context';\n\n/**\n * Convert known scope contexts set by SDK integrations to span attributes.\n * Only maps context keys that are relevant to browser SDKs.\n * Server-only contexts (aws, gcp, missing_instrumentation, trpc) are handled\n * by processSegmentSpan hooks in their respective packages.\n */\nexport function scopeContextsToSpanAttributes(contexts: Contexts): Record<string, unknown> {\n  const attrs: Record<string, unknown> = {};\n\n  const { response, profile, cloud_resource, culture, state } = contexts;\n\n  if (response) {\n    if (response.status_code != null) {\n      attrs['http.response.status_code'] = response.status_code;\n    }\n    if (response.body_size != null) {\n      attrs['http.response.body.size'] = response.body_size;\n    }\n  }\n\n  if (profile) {\n    if (profile.profile_id) {\n      attrs['sentry.profile_id'] = profile.profile_id;\n    }\n    if (profile.profiler_id) {\n      attrs['sentry.profiler_id'] = profile.profiler_id;\n    }\n  }\n\n  // CloudResourceContext keys are already in dot-notation (OTel resource conventions)\n  if (cloud_resource) {\n    for (const [key, value] of Object.entries(cloud_resource)) {\n      if (value != null) {\n        attrs[key] = value;\n      }\n    }\n  }\n\n  if (culture) {\n    if (culture.locale) {\n      attrs['culture.locale'] = culture.locale;\n    }\n    if (culture.timezone) {\n      attrs['culture.timezone'] = culture.timezone;\n    }\n  }\n\n  if (state?.state && typeof state.state.type === 'string') {\n    attrs['state.type'] = state.state.type;\n  }\n\n  // Framework version contexts\n  const angular = contexts['angular'];\n  if (angular) {\n    const version = angular['version'];\n    if (typeof version === 'string' || typeof version === 'number') {\n      attrs['angular.version'] = version;\n    }\n  }\n\n  const react = contexts['react'];\n  if (react) {\n    const version = react['version'];\n    if (typeof version === 'string' || typeof version === 'number') {\n      attrs['react.version'] = version;\n    }\n  }\n\n  return attrs;\n}\n","import type { Client } from '../../client';\nimport { DEBUG_BUILD } from '../../debug-build';\nimport type { SerializedStreamedSpan } from '../../types/span';\nimport { debug } from '../../utils/debug-logger';\nimport { safeUnref } from '../../utils/timer';\nimport { getDynamicSamplingContextFromSpan } from '../dynamicSamplingContext';\nimport type { SerializedStreamedSpanWithSegmentSpan } from './captureSpan';\nimport { createStreamedSpanEnvelope } from './envelope';\nimport { estimateSerializedSpanSizeInBytes } from './estimateSize';\n\n/**\n * We must not send more than 1000 spans in one envelope.\n * Otherwise the envelope is dropped by Relay.\n */\nconst MAX_SPANS_PER_ENVELOPE = 1000;\n\nconst MAX_TRACE_WEIGHT_IN_BYTES = 5_000_000;\n\ninterface TraceBucket {\n  spans: Set<SerializedStreamedSpanWithSegmentSpan>;\n  size: number;\n  timeout: ReturnType<typeof setTimeout>;\n}\n\nexport interface SpanBufferOptions {\n  /**\n   * Max spans per trace before auto-flush\n   * Must not exceed 1000.\n   *\n   * @default 1_000\n   */\n  maxSpanLimit?: number;\n\n  /**\n   * Per-trace flush timeout in ms. A timeout is started when a trace bucket is first created\n   * and fires flush() for that specific trace when it expires.\n   * Must be greater than 0.\n   *\n   * @default 5_000\n   */\n  flushInterval?: number;\n\n  /**\n   * Max accumulated byte weight of spans per trace before auto-flush.\n   * Size is estimated, not exact. Uses 2 bytes per character for strings (UTF-16).\n   *\n   * @default 5_000_000 (5 MB)\n   */\n  maxTraceWeightInBytes?: number;\n}\n\n/**\n * A buffer for serialized streamed span JSON objects that flushes them to Sentry in Span v2 envelopes.\n * Handles per-trace timeout-based flushing, size thresholds, and graceful shutdown.\n * Also handles computation of the Dynamic Sampling Context (DSC) for the trace, if it wasn't yet\n * frozen onto the segment span.\n *\n * For this, we need the reference to the segment span instance, from\n * which we compute the DSC. Doing this in the buffer ensures that we compute the DSC as late as possible,\n * allowing span name and data updates up to this point. Worth noting here that the segment span is likely\n * still active and modifyable when child spans are added to the buffer.\n */\nexport class SpanBuffer {\n  /* Bucket spans by their trace id, along with accumulated size and a per-trace flush timeout */\n  private _traceBuckets: Map<string, TraceBucket>;\n\n  private _client: Client;\n  private _maxSpanLimit: number;\n  private _flushInterval: number;\n  private _maxTraceWeight: number;\n\n  public constructor(client: Client, options?: SpanBufferOptions) {\n    this._traceBuckets = new Map();\n    this._client = client;\n\n    const { maxSpanLimit, flushInterval, maxTraceWeightInBytes } = options ?? {};\n\n    this._maxSpanLimit =\n      maxSpanLimit && maxSpanLimit > 0 && maxSpanLimit <= MAX_SPANS_PER_ENVELOPE\n        ? maxSpanLimit\n        : MAX_SPANS_PER_ENVELOPE;\n    this._flushInterval = flushInterval && flushInterval > 0 ? flushInterval : 5_000;\n    this._maxTraceWeight =\n      maxTraceWeightInBytes && maxTraceWeightInBytes > 0 ? maxTraceWeightInBytes : MAX_TRACE_WEIGHT_IN_BYTES;\n\n    this._client.on('flush', () => {\n      this.drain();\n    });\n\n    this._client.on('close', () => {\n      // No need to drain the buffer here as `Client.close()` internally already calls `Client.flush()`\n      // which already invokes the `flush` hook and thus drains the buffer.\n      this._traceBuckets.forEach(bucket => {\n        clearTimeout(bucket.timeout);\n      });\n      this._traceBuckets.clear();\n    });\n  }\n\n  /**\n   * Add a span to the buffer.\n   */\n  public add(spanJSON: SerializedStreamedSpanWithSegmentSpan): void {\n    const traceId = spanJSON.trace_id;\n    let bucket = this._traceBuckets.get(traceId);\n\n    if (!bucket) {\n      bucket = {\n        spans: new Set(),\n        size: 0,\n        timeout: safeUnref(\n          setTimeout(() => {\n            this.flush(traceId);\n          }, this._flushInterval),\n        ),\n      };\n      this._traceBuckets.set(traceId, bucket);\n    }\n\n    bucket.spans.add(spanJSON);\n    bucket.size += estimateSerializedSpanSizeInBytes(spanJSON);\n\n    if (bucket.spans.size >= this._maxSpanLimit || bucket.size >= this._maxTraceWeight) {\n      this.flush(traceId);\n    }\n  }\n\n  /**\n   * Drain and flush all buffered traces.\n   */\n  public drain(): void {\n    if (!this._traceBuckets.size) {\n      return;\n    }\n\n    DEBUG_BUILD && debug.log(`Flushing span tree map with ${this._traceBuckets.size} traces`);\n\n    this._traceBuckets.forEach((_, traceId) => {\n      this.flush(traceId);\n    });\n  }\n\n  /**\n   * Flush spans of a specific trace.\n   * In contrast to {@link SpanBuffer.drain}, this method does not flush all traces, but only the one with the given traceId.\n   */\n  public flush(traceId: string): void {\n    const bucket = this._traceBuckets.get(traceId);\n    if (!bucket) {\n      return;\n    }\n\n    if (!bucket.spans.size) {\n      // we should never get here, given we always add a span when we create a new bucket\n      // and delete the bucket once we flush out the trace\n      this._removeTrace(traceId);\n      return;\n    }\n\n    const spans = Array.from(bucket.spans);\n\n    const segmentSpan = spans[0]?._segmentSpan;\n    if (!segmentSpan) {\n      DEBUG_BUILD && debug.warn('No segment span reference found on span JSON, cannot compute DSC');\n      this._removeTrace(traceId);\n      return;\n    }\n\n    const dsc = getDynamicSamplingContextFromSpan(segmentSpan);\n\n    const cleanedSpans: SerializedStreamedSpan[] = spans.map(spanJSON => {\n      // eslint-disable-next-line @typescript-eslint/no-unused-vars\n      const { _segmentSpan, ...cleanSpanJSON } = spanJSON;\n      return cleanSpanJSON;\n    });\n\n    const envelope = createStreamedSpanEnvelope(cleanedSpans, dsc, this._client);\n\n    DEBUG_BUILD && debug.log(`Sending span envelope for trace ${traceId} with ${cleanedSpans.length} spans`);\n\n    this._client.sendEnvelope(envelope).then(null, reason => {\n      DEBUG_BUILD && debug.error('Error while sending streamed span envelope:', reason);\n    });\n\n    this._removeTrace(traceId);\n  }\n\n  private _removeTrace(traceId: string): void {\n    const bucket = this._traceBuckets.get(traceId);\n    if (bucket) {\n      clearTimeout(bucket.timeout);\n    }\n    this._traceBuckets.delete(traceId);\n  }\n}\n","import type { RawAttributes } from '../../attributes';\nimport type { SerializedStreamedSpan, SpanJSON, StreamedSpanJSON } from '../../types/span';\nimport { streamedSpanJsonToSerializedSpan } from '../../utils/spanUtils';\n\n/**\n * Converts a v1 SpanJSON (from a legacy transaction) to a serialized v2 StreamedSpan.\n */\nexport function spanJsonToSerializedStreamedSpan(span: SpanJSON): SerializedStreamedSpan {\n  const streamedSpan: StreamedSpanJSON = {\n    trace_id: span.trace_id,\n    span_id: span.span_id,\n    parent_span_id: span.parent_span_id,\n    name: span.description || '',\n    start_timestamp: span.start_timestamp,\n    end_timestamp: span.timestamp || span.start_timestamp,\n    status: !span.status || span.status === 'ok' || span.status === 'cancelled' ? 'ok' : 'error',\n    is_segment: false,\n    attributes: { ...(span.data as RawAttributes<Record<string, unknown>>) },\n    links: span.links,\n  };\n\n  return streamedSpanJsonToSerializedSpan(streamedSpan);\n}\n","import type { Span } from '../types/span';\nimport type { SpanStatus } from '../types/spanStatus';\n\nexport const SPAN_STATUS_UNSET = 0;\nexport const SPAN_STATUS_OK = 1;\nexport const SPAN_STATUS_ERROR = 2;\n\n/**\n * Converts a HTTP status code into a sentry status with a message.\n *\n * @param httpStatus The HTTP response status code.\n * @returns The span status or internal_error.\n */\n// https://develop.sentry.dev/sdk/event-payloads/span/\nexport function getSpanStatusFromHttpCode(httpStatus: number): SpanStatus {\n  if (httpStatus < 400 && httpStatus >= 100) {\n    return { code: SPAN_STATUS_OK };\n  }\n\n  if (httpStatus >= 400 && httpStatus < 500) {\n    switch (httpStatus) {\n      case 401:\n        return { code: SPAN_STATUS_ERROR, message: 'unauthenticated' };\n      case 403:\n        return { code: SPAN_STATUS_ERROR, message: 'permission_denied' };\n      case 404:\n        return { code: SPAN_STATUS_ERROR, message: 'not_found' };\n      case 409:\n        return { code: SPAN_STATUS_ERROR, message: 'already_exists' };\n      case 413:\n        return { code: SPAN_STATUS_ERROR, message: 'failed_precondition' };\n      case 429:\n        return { code: SPAN_STATUS_ERROR, message: 'resource_exhausted' };\n      case 499:\n        return { code: SPAN_STATUS_ERROR, message: 'cancelled' };\n      default:\n        return { code: SPAN_STATUS_ERROR, message: 'invalid_argument' };\n    }\n  }\n\n  if (httpStatus >= 500 && httpStatus < 600) {\n    switch (httpStatus) {\n      case 501:\n        return { code: SPAN_STATUS_ERROR, message: 'unimplemented' };\n      case 503:\n        return { code: SPAN_STATUS_ERROR, message: 'unavailable' };\n      case 504:\n        return { code: SPAN_STATUS_ERROR, message: 'deadline_exceeded' };\n      default:\n        return { code: SPAN_STATUS_ERROR, message: 'internal_error' };\n    }\n  }\n\n  return { code: SPAN_STATUS_ERROR, message: 'internal_error' };\n}\n\n/**\n * Sets the Http status attributes on the current span based on the http code.\n * Additionally, the span's status is updated, depending on the http code.\n */\nexport function setHttpStatus(span: Span, httpStatus: number): void {\n  span.setAttribute('http.response.status_code', httpStatus);\n\n  const spanStatus = getSpanStatusFromHttpCode(httpStatus);\n  if (spanStatus.message !== 'unknown_error') {\n    span.setStatus(spanStatus);\n  }\n}\n","/* eslint-disable max-lines */\n\nimport { getAsyncContextStrategy } from '../asyncContext';\nimport type { AsyncContextStrategy } from '../asyncContext/types';\nimport { getMainCarrier } from '../carrier';\nimport { getClient, getCurrentScope, getIsolationScope, withScope } from '../currentScopes';\nimport { DEBUG_BUILD } from '../debug-build';\nimport type { Scope } from '../scope';\nimport {\n  SEMANTIC_ATTRIBUTE_SENTRY_OP,\n  SEMANTIC_ATTRIBUTE_SENTRY_SAMPLE_RATE,\n  SEMANTIC_ATTRIBUTE_SENTRY_SOURCE,\n} from '../semanticAttributes';\nimport type { ClientOptions } from '../types/options';\nimport type { SentrySpanArguments, Span, SpanTimeInput } from '../types/span';\nimport type { StartSpanOptions } from '../types/startSpanOptions';\nimport { baggageHeaderToDynamicSamplingContext } from '../utils/baggage';\nimport { debug } from '../utils/debug-logger';\nimport { handleCallbackErrors } from '../utils/handleCallbackErrors';\nimport { hasSpansEnabled } from '../utils/hasSpansEnabled';\nimport { shouldIgnoreSpan } from '../utils/should-ignore-span';\nimport { hasSpanStreamingEnabled } from './spans/hasSpanStreamingEnabled';\nimport { parseSampleRate } from '../utils/parseSampleRate';\nimport { generateTraceId } from '../utils/propagationContext';\nimport { safeMathRandom } from '../utils/randomSafeContext';\nimport { _getSpanForScope, _setSpanForScope } from '../utils/spanOnScope';\nimport { addChildSpanToSpan, getRootSpan, spanIsSampled, spanTimeInputToSeconds, spanToJSON } from '../utils/spanUtils';\nimport { propagationContextFromHeaders, shouldContinueTrace } from '../utils/tracing';\nimport { freezeDscOnSpan, getDynamicSamplingContextFromSpan } from './dynamicSamplingContext';\nimport { logSpanStart } from './logSpans';\nimport { sampleSpan } from './sampling';\nimport { SentryNonRecordingSpan, spanIsNonRecordingSpan } from './sentryNonRecordingSpan';\nimport { SentrySpan } from './sentrySpan';\nimport { SPAN_STATUS_ERROR } from './spanstatus';\nimport { setCapturedScopesOnSpan } from './utils';\nimport type { Client } from '../client';\n\nexport const SUPPRESS_TRACING_KEY = '__SENTRY_SUPPRESS_TRACING__';\n\n/**\n * Wraps a function with a transaction/span and finishes the span after the function is done.\n * The created span is the active span and will be used as parent by other spans created inside the function\n * and can be accessed via `Sentry.getActiveSpan()`, as long as the function is executed while the scope is active.\n *\n * If you want to create a span that is not set as active, use {@link startInactiveSpan}.\n *\n * You'll always get a span passed to the callback,\n * it may just be a non-recording span if the span is not sampled or if tracing is disabled.\n */\nexport function startSpan<T>(options: StartSpanOptions, callback: (span: Span) => T): T {\n  const acs = getAcs();\n  if (acs.startSpan) {\n    return acs.startSpan(options, callback);\n  }\n\n  const spanArguments = parseSentrySpanArguments(options);\n  const { forceTransaction, parentSpan: customParentSpan, scope: customScope } = options;\n\n  // We still need to fork a potentially passed scope, as we set the active span on it\n  // and we need to ensure that it is cleaned up properly once the span ends.\n  const customForkedScope = customScope?.clone();\n\n  return withScope(customForkedScope, () => {\n    // If `options.parentSpan` is defined, we want to wrap the callback in `withActiveSpan`\n    const wrapper = getActiveSpanWrapper<T>(customParentSpan);\n\n    return wrapper(() => {\n      const scope = getCurrentScope();\n      const parentSpan = getParentSpan(scope, customParentSpan);\n      const client = getClient();\n\n      const missingRequiredParent = options.onlyIfParent && !parentSpan;\n      const activeSpan = missingRequiredParent\n        ? startMissingRequiredParentSpan(scope, client)\n        : createChildOrRootSpan({\n            parentSpan,\n            spanArguments,\n            forceTransaction,\n            scope,\n          });\n\n      // Ignored root spans still need to be set on scope so that `getActiveSpan()` returns them\n      // and descendants are also non-recording. Ignored child spans don't need this because\n      // the parent span is already on scope.\n      if (!spanIsIgnored(activeSpan) || !parentSpan) {\n        _setSpanForScope(scope, activeSpan);\n      }\n\n      return handleCallbackErrors(\n        () => callback(activeSpan),\n        () => {\n          // Only update the span status if it hasn't been changed yet, and the span is not yet finished\n          const { status } = spanToJSON(activeSpan);\n          if (activeSpan.isRecording() && (!status || status === 'ok')) {\n            activeSpan.setStatus({ code: SPAN_STATUS_ERROR, message: 'internal_error' });\n          }\n        },\n        () => {\n          activeSpan.end();\n        },\n      );\n    });\n  });\n}\n\n/**\n * Similar to `Sentry.startSpan`. Wraps a function with a transaction/span, but does not finish the span\n * after the function is done automatically. Use `span.end()` to end the span.\n *\n * The created span is the active span and will be used as parent by other spans created inside the function\n * and can be accessed via `Sentry.getActiveSpan()`, as long as the function is executed while the scope is active.\n *\n * You'll always get a span passed to the callback,\n * it may just be a non-recording span if the span is not sampled or if tracing is disabled.\n */\nexport function startSpanManual<T>(options: StartSpanOptions, callback: (span: Span, finish: () => void) => T): T {\n  const acs = getAcs();\n  if (acs.startSpanManual) {\n    return acs.startSpanManual(options, callback);\n  }\n\n  const spanArguments = parseSentrySpanArguments(options);\n  const { forceTransaction, parentSpan: customParentSpan, scope: customScope } = options;\n\n  const customForkedScope = customScope?.clone();\n\n  return withScope(customForkedScope, () => {\n    // If `options.parentSpan` is defined, we want to wrap the callback in `withActiveSpan`\n    const wrapper = getActiveSpanWrapper<T>(customParentSpan);\n\n    return wrapper(() => {\n      const scope = getCurrentScope();\n      const parentSpan = getParentSpan(scope, customParentSpan);\n\n      const missingRequiredParent = options.onlyIfParent && !parentSpan;\n      const activeSpan = missingRequiredParent\n        ? startMissingRequiredParentSpan(scope, getClient())\n        : createChildOrRootSpan({\n            parentSpan,\n            spanArguments,\n            forceTransaction,\n            scope,\n          });\n\n      // We don't set ignored child spans onto the scope because there likely is an active,\n      // unignored span on the scope already.\n      if (!spanIsIgnored(activeSpan) || !parentSpan) {\n        _setSpanForScope(scope, activeSpan);\n      }\n\n      return handleCallbackErrors(\n        // We pass the `finish` function to the callback, so the user can finish the span manually\n        // this is mainly here for historic purposes because previously, we instructed users to call\n        // `finish` instead of `span.end()` to also clean up the scope. Nowadays, calling `span.end()`\n        // or `finish` has the same effect and we simply leave it here to avoid breaking user code.\n        () => callback(activeSpan, () => activeSpan.end()),\n        () => {\n          // Only update the span status if it hasn't been changed yet, and the span is not yet finished\n          const { status } = spanToJSON(activeSpan);\n          if (activeSpan.isRecording() && (!status || status === 'ok')) {\n            activeSpan.setStatus({ code: SPAN_STATUS_ERROR, message: 'internal_error' });\n          }\n        },\n      );\n    });\n  });\n}\n\n/**\n * Creates a span. This span is not set as active, so will not get automatic instrumentation spans\n * as children or be able to be accessed via `Sentry.getActiveSpan()`.\n *\n * If you want to create a span that is set as active, use {@link startSpan}.\n *\n * This function will always return a span,\n * it may just be a non-recording span if the span is not sampled or if tracing is disabled.\n */\nexport function startInactiveSpan(options: StartSpanOptions): Span {\n  const acs = getAcs();\n  if (acs.startInactiveSpan) {\n    return acs.startInactiveSpan(options);\n  }\n\n  return _startInactiveSpanImpl(options);\n}\n\n/**\n * Internal version of startInactiveSpan that bypasses the ACS check.\n * Used by SentryTracerProvider to create spans without triggering recursion\n * through ACS overrides.\n * @hidden\n */\nexport function _INTERNAL_startInactiveSpan(options: StartSpanOptions): Span {\n  return _startInactiveSpanImpl(options);\n}\n\nfunction _startInactiveSpanImpl(options: StartSpanOptions): Span {\n  const spanArguments = parseSentrySpanArguments(options);\n  const { forceTransaction, parentSpan: customParentSpan } = options;\n\n  // If `options.scope` is defined, we use this as as a wrapper,\n  // If `options.parentSpan` is defined, we want to wrap the callback in `withActiveSpan`\n  const wrapper = options.scope\n    ? (callback: () => Span) => withScope(options.scope, callback)\n    : customParentSpan !== undefined\n      ? (callback: () => Span) => withActiveSpan(customParentSpan, callback)\n      : (callback: () => Span) => callback();\n\n  return wrapper(() => {\n    const scope = getCurrentScope();\n    const parentSpan = getParentSpan(scope, customParentSpan);\n    const client = getClient();\n\n    const missingRequiredParent = options.onlyIfParent && !parentSpan;\n\n    if (missingRequiredParent) {\n      return startMissingRequiredParentSpan(scope, client);\n    }\n\n    return createChildOrRootSpan({\n      parentSpan,\n      spanArguments,\n      forceTransaction,\n      scope,\n    });\n  });\n}\n\n/**\n * Continue a trace from `sentry-trace` and `baggage` values.\n * These values can be obtained from incoming request headers, or in the browser from `<meta name=\"sentry-trace\">`\n * and `<meta name=\"baggage\">` HTML tags.\n *\n * Spans started with `startSpan`, `startSpanManual` and `startInactiveSpan`, within the callback will automatically\n * be attached to the incoming trace.\n */\nexport const continueTrace = <V>(\n  options: {\n    sentryTrace: Parameters<typeof propagationContextFromHeaders>[0];\n    baggage: Parameters<typeof propagationContextFromHeaders>[1];\n  },\n  callback: () => V,\n): V => {\n  const carrier = getMainCarrier();\n  const acs = getAsyncContextStrategy(carrier);\n  if (acs.continueTrace) {\n    return acs.continueTrace(options, callback);\n  }\n\n  const { sentryTrace, baggage } = options;\n\n  const client = getClient();\n  const incomingDsc = baggageHeaderToDynamicSamplingContext(baggage);\n  if (client && !shouldContinueTrace(client, incomingDsc?.org_id)) {\n    return startNewTrace(callback);\n  }\n\n  return withScope(scope => {\n    const propagationContext = propagationContextFromHeaders(sentryTrace, baggage);\n    scope.setPropagationContext(propagationContext);\n    _setSpanForScope(scope, undefined);\n    return callback();\n  });\n};\n\n/**\n * Forks the current scope and sets the provided span as active span in the context of the provided callback. Can be\n * passed `null` to start an entirely new span tree.\n *\n * @param span Spans started in the context of the provided callback will be children of this span. If `null` is passed,\n * spans started within the callback will not be attached to a parent span.\n * @param callback Execution context in which the provided span will be active. Is passed the newly forked scope.\n * @returns the value returned from the provided callback function.\n */\nexport function withActiveSpan<T>(span: Span | null, callback: (scope: Scope) => T): T {\n  const acs = getAcs();\n  if (acs.withActiveSpan) {\n    return acs.withActiveSpan(span, callback);\n  }\n\n  return withScope(scope => {\n    _setSpanForScope(scope, span || undefined);\n    return callback(scope);\n  });\n}\n\n/** Suppress tracing in the given callback, ensuring no spans are generated inside of it. */\nexport function suppressTracing<T>(callback: () => T): T {\n  const acs = getAcs();\n\n  if (acs.suppressTracing) {\n    return acs.suppressTracing(callback);\n  }\n\n  return withScope(scope => {\n    // Note: We do not wait for the callback to finish before we reset the metadata\n    // the reason for this is that otherwise, in the browser this can lead to very weird behavior\n    // as there is only a single top scope, if the callback takes longer to finish,\n    // other, unrelated spans may also be suppressed, which we do not want\n    // so instead, we only suppress tracing synchronoysly in the browser\n    scope.setSDKProcessingMetadata({ [SUPPRESS_TRACING_KEY]: true });\n    const res = callback();\n    scope.setSDKProcessingMetadata({ [SUPPRESS_TRACING_KEY]: undefined });\n    return res;\n  });\n}\n\n/** Check if tracing is suppressed. */\nexport function isTracingSuppressed(scope = getCurrentScope()): boolean {\n  const acs = getAcs();\n\n  if (acs.isTracingSuppressed) {\n    return acs.isTracingSuppressed(scope);\n  }\n\n  return scope.getScopeData().sdkProcessingMetadata[SUPPRESS_TRACING_KEY] === true;\n}\n\n/**\n * Starts a new trace for the duration of the provided callback. Spans started within the\n * callback will be part of the new trace instead of a potentially previously started trace.\n *\n * Important: Only use this function if you want to override the default trace lifetime and\n * propagation mechanism of the SDK for the duration and scope of the provided callback.\n * The newly created trace will also be the root of a new distributed trace, for example if\n * you make http requests within the callback.\n * This function might be useful if the operation you want to instrument should not be part\n * of a potentially ongoing trace.\n *\n * Default behavior:\n * - Server-side: A new trace is started for each incoming request.\n * - Browser: A new trace is started for each page our route. Navigating to a new route\n *            or page will automatically create a new trace.\n */\nexport function startNewTrace<T>(callback: () => T): T {\n  const acs = getAcs();\n  if (acs.startNewTrace) {\n    return acs.startNewTrace(callback);\n  }\n\n  return withScope(scope => {\n    scope.setPropagationContext({\n      traceId: generateTraceId(),\n      sampleRand: safeMathRandom(),\n    });\n    DEBUG_BUILD && debug.log(`Starting a new trace with id ${scope.getPropagationContext().traceId}`);\n    return withActiveSpan(null, callback);\n  });\n}\n\n/**\n * The placeholder returned from `startSpan*` when `onlyIfParent` is set but there is no parent span.\n * It carries the current trace id and captured scopes so the trace data it propagates (and any nested\n * span that resolves it as its root via `getRootSpan`) reads its DSC from the scope, preserving a\n * continued trace's DSC instead of fabricating a fresh client one. Also records the dropped-span outcome.\n */\nfunction startMissingRequiredParentSpan(scope: Scope, client: Client | undefined): SentryNonRecordingSpan {\n  client?.recordDroppedEvent('no_parent_span', 'span');\n  const span = new SentryNonRecordingSpan({ traceId: scope.getPropagationContext().traceId });\n  setCapturedScopesOnSpan(span, scope, getIsolationScope());\n  return span;\n}\n\nfunction createChildOrRootSpan({\n  parentSpan,\n  spanArguments,\n  forceTransaction,\n  scope,\n}: {\n  parentSpan: SentrySpan | undefined;\n  spanArguments: SentrySpanArguments;\n  forceTransaction?: boolean;\n  scope: Scope;\n}): Span {\n  const isolationScope = getIsolationScope();\n\n  if (!hasSpansEnabled()) {\n    const scopePropagationContext = scope.getPropagationContext();\n    const traceId = parentSpan ? parentSpan.spanContext().traceId : scopePropagationContext.traceId;\n\n    // The placeholder is a thin marker; it carries no sampling decision or DSC. Both are read from\n    // the scope: the sampling decision in `getTraceData`, the DSC in `getDynamicSamplingContextFromSpan`.\n    const span = new SentryNonRecordingSpan({ traceId });\n\n    // Nested placeholders link to their parent so `getRootSpan` resolves to the root placeholder,\n    // whose captured scope is the source of truth. Root/forced placeholders are their own root.\n    if (parentSpan && !forceTransaction) {\n      addChildSpanToSpan(parentSpan, span);\n    }\n\n    // Capture scopes so consumers (e.g. SentryTraceProvider) can read them and so the DSC can be\n    // resolved from the scope by `getDynamicSamplingContextFromSpan`. Consistent with `startIdleSpan`.\n    setCapturedScopesOnSpan(span, scope, isolationScope);\n\n    return span;\n  }\n\n  const client = getClient();\n  if (_shouldIgnoreStreamedSpan(client, spanArguments)) {\n    if (!isTracingSuppressed(scope)) {\n      // if tracing is actively suppressed (Sentry.suppressTracing(...)),\n      // we don't want to record a client outcome for the ignored span\n      client?.recordDroppedEvent('ignored', 'span');\n    }\n\n    const ignoredSpan = new SentryNonRecordingSpan({\n      dropReason: 'ignored',\n      traceId: parentSpan?.spanContext().traceId ?? scope.getPropagationContext().traceId,\n    });\n    if (parentSpan && !forceTransaction) {\n      // Preserve the root relationship so async context strategies can distinguish\n      // ignored children from ignored segments and keep the parent active.\n      addChildSpanToSpan(parentSpan, ignoredSpan);\n    }\n    setCapturedScopesOnSpan(ignoredSpan, scope, isolationScope);\n\n    return ignoredSpan;\n  }\n\n  let span: Span;\n  if (parentSpan && !forceTransaction) {\n    span = _startChildSpan(parentSpan, scope, spanArguments, isolationScope);\n    addChildSpanToSpan(parentSpan, span);\n  } else if (parentSpan) {\n    // If we forced a transaction but have a parent span, make sure to continue from the parent span, not the scope\n    const dsc = getDynamicSamplingContextFromSpan(parentSpan);\n    const { traceId, spanId: parentSpanId } = parentSpan.spanContext();\n    const parentSampled = spanIsSampled(parentSpan);\n\n    span = _startRootSpan(\n      {\n        traceId,\n        parentSpanId,\n        ...spanArguments,\n      },\n      scope,\n      isolationScope,\n      parentSampled,\n    );\n\n    freezeDscOnSpan(span, dsc);\n  } else {\n    const { traceId, dsc, parentSpanId, sampled: parentSampled } = scope.getPropagationContext();\n\n    span = _startRootSpan(\n      {\n        traceId,\n        parentSpanId,\n        ...spanArguments,\n      },\n      scope,\n      isolationScope,\n      parentSampled,\n    );\n\n    if (dsc) {\n      freezeDscOnSpan(span, dsc);\n    }\n  }\n\n  logSpanStart(span);\n\n  return span;\n}\n\n/**\n * This converts StartSpanOptions to SentrySpanArguments.\n * For the most part (for now) we accept the same options,\n * but some of them need to be transformed.\n */\nfunction parseSentrySpanArguments(options: StartSpanOptions): SentrySpanArguments {\n  const exp = options.experimental || {};\n  const initialCtx: SentrySpanArguments = {\n    isStandalone: exp.standalone,\n    ...options,\n  };\n\n  if (options.startTime) {\n    const ctx: SentrySpanArguments & { startTime?: SpanTimeInput } = { ...initialCtx };\n    ctx.startTimestamp = spanTimeInputToSeconds(options.startTime);\n    delete ctx.startTime;\n    return ctx;\n  }\n\n  return initialCtx;\n}\n\nfunction getAcs(): AsyncContextStrategy {\n  const carrier = getMainCarrier();\n  return getAsyncContextStrategy(carrier);\n}\n\nfunction _startRootSpan(\n  spanArguments: SentrySpanArguments,\n  scope: Scope,\n  isolationScope: Scope,\n  parentSampled?: boolean,\n): SentrySpan {\n  const client = getClient();\n  const options: Partial<ClientOptions> = client?.getOptions() || {};\n\n  const { name = '' } = spanArguments;\n\n  const mutableSpanSamplingData = { spanAttributes: { ...spanArguments.attributes }, spanName: name, parentSampled };\n\n  // we don't care about the decision for the moment; this is just a placeholder\n  client?.emit('beforeSampling', mutableSpanSamplingData, { decision: false });\n\n  // If hook consumers override the parentSampled flag, we will use that value instead of the actual one\n  const finalParentSampled = mutableSpanSamplingData.parentSampled ?? parentSampled;\n  const finalAttributes = mutableSpanSamplingData.spanAttributes;\n\n  const currentPropagationContext = scope.getPropagationContext();\n  const _isTracingSuppressed = isTracingSuppressed(scope);\n\n  const [sampled, sampleRate, localSampleRateWasApplied] = _isTracingSuppressed\n    ? [false]\n    : sampleSpan(\n        options,\n        {\n          name,\n          parentSampled: finalParentSampled,\n          attributes: finalAttributes,\n          normalizedRequest: isolationScope.getScopeData().sdkProcessingMetadata.normalizedRequest,\n          parentSampleRate: parseSampleRate(currentPropagationContext.dsc?.sample_rate),\n        },\n        currentPropagationContext.sampleRand,\n      );\n\n  const rootSpan = new SentrySpan({\n    ...spanArguments,\n    attributes: {\n      [SEMANTIC_ATTRIBUTE_SENTRY_SOURCE]: 'custom',\n      [SEMANTIC_ATTRIBUTE_SENTRY_SAMPLE_RATE]:\n        sampleRate !== undefined && localSampleRateWasApplied ? sampleRate : undefined,\n      ...finalAttributes,\n    },\n    sampled,\n  });\n\n  if (!sampled && client && !_isTracingSuppressed) {\n    DEBUG_BUILD && debug.log('[Tracing] Discarding root span because its trace was not chosen to be sampled.');\n    client.recordDroppedEvent('sample_rate', hasSpanStreamingEnabled(client) ? 'span' : 'transaction');\n  }\n\n  setCapturedScopesOnSpan(rootSpan, scope, isolationScope);\n\n  if (client) {\n    client.emit('spanStart', rootSpan);\n  }\n\n  return rootSpan;\n}\n\n/**\n * Creates a new `Span` while setting the current `Span.id` as `parentSpanId`.\n * This inherits the sampling decision from the parent span.\n */\nfunction _startChildSpan(\n  parentSpan: Span,\n  scope: Scope,\n  spanArguments: SentrySpanArguments,\n  isolationScope: Scope,\n): Span {\n  const { spanId, traceId } = parentSpan.spanContext();\n  const _isTracingSuppressed = isTracingSuppressed(scope);\n  const sampled = _isTracingSuppressed ? false : spanIsSampled(parentSpan);\n\n  const childSpan = sampled\n    ? new SentrySpan({\n        ...spanArguments,\n        parentSpanId: spanId,\n        traceId,\n        sampled,\n      })\n    : new SentryNonRecordingSpan({ traceId });\n\n  addChildSpanToSpan(parentSpan, childSpan);\n\n  setCapturedScopesOnSpan(childSpan, scope, isolationScope);\n\n  const client = getClient();\n\n  if (!client) {\n    return childSpan;\n  }\n\n  if (hasSpanStreamingEnabled(client) && spanIsNonRecordingSpan(childSpan)) {\n    if (spanIsNonRecordingSpan(parentSpan) && parentSpan.dropReason) {\n      // We land here if the parent span was a segment span that was ignored (`ignoreSpans`).\n      // In this case, the child was also ignored (see `sampled` above) but we need to\n      // record a client outcome for the child.\n      childSpan.dropReason = parentSpan.dropReason;\n      client.recordDroppedEvent(parentSpan.dropReason, 'span');\n    } else if (!_isTracingSuppressed) {\n      // Otherwise, the child is not sampled due to sampling of the parent span,\n      // hence we record a sample_rate client outcome for the child.\n      childSpan.dropReason = 'sample_rate';\n      client.recordDroppedEvent('sample_rate', 'span');\n    }\n  }\n\n  client.emit('spanStart', childSpan);\n  // If it has an endTimestamp, it's already ended\n  if (spanArguments.endTimestamp) {\n    client.emit('spanEnd', childSpan);\n    client.emit('afterSpanEnd', childSpan);\n  }\n\n  return childSpan;\n}\n\nfunction getParentSpan(scope: Scope, customParentSpan: Span | null | undefined): SentrySpan | undefined {\n  // always use the passed in span directly\n  if (customParentSpan) {\n    return customParentSpan as SentrySpan;\n  }\n\n  // This is different from `undefined` as it means the user explicitly wants no parent span\n  if (customParentSpan === null) {\n    return undefined;\n  }\n\n  const span = _getSpanForScope(scope) as SentrySpan | undefined;\n\n  if (!span) {\n    return undefined;\n  }\n\n  const client = getClient();\n  const options: Partial<ClientOptions> = client ? client.getOptions() : {};\n  if (options.parentSpanIsAlwaysRootSpan) {\n    return getRootSpan(span) as SentrySpan;\n  }\n\n  return span;\n}\n\nfunction getActiveSpanWrapper<T>(parentSpan: Span | undefined | null): (callback: () => T) => T {\n  return parentSpan !== undefined\n    ? (callback: () => T) => {\n        return withActiveSpan(parentSpan, callback);\n      }\n    : (callback: () => T) => callback();\n}\n\n/* Checks if `ignoreSpans` applies (extracted for bundle size)*/\nfunction _shouldIgnoreStreamedSpan(client: Client | undefined, spanArguments: SentrySpanArguments): boolean {\n  const ignoreSpans = client?.getOptions().ignoreSpans;\n\n  if (!client || !hasSpanStreamingEnabled(client) || !ignoreSpans?.length) {\n    return false;\n  }\n\n  return shouldIgnoreSpan(\n    {\n      description: spanArguments.name || '',\n      op: spanArguments.attributes?.[SEMANTIC_ATTRIBUTE_SENTRY_OP] || spanArguments.op,\n      attributes: spanArguments.attributes,\n    },\n    ignoreSpans,\n  );\n}\n\n/**\n * Whether a span is an ignored (`ignoreSpans`) placeholder. Such a span must not be set as the active\n * span when it has a parent, so its children attach to that parent and get re-parented rather than\n * dropped with it. Shared with the OTel-based provider so both span pipelines apply the same rule.\n */\nexport function spanIsIgnored(span: Span): span is SentryNonRecordingSpan {\n  return spanIsNonRecordingSpan(span) && span.dropReason === 'ignored';\n}\n","import type { ToolCallSpanContext } from './types';\n\n// Global map to track tool call IDs to their corresponding span contexts.\n// This allows us to capture tool errors and link them to the correct span\n// without keeping full Span objects (and their potentially large attributes) alive.\nexport const toolCallSpanContextMap = new Map<string, ToolCallSpanContext>();\n\n// Used to make tool descriptions available to execute_tool spans in the span streaming path.\n// Streamed spans are processed individually, so execute_tool spans cannot look up descriptions\n// from their sibling doGenerate span on span end (as we do for transactions).\n// Instead we store descriptions at spanStart and apply them in the processSpan hook.\n// Stores parent_span_id -> Map<toolName, description>\nexport const toolDescriptionMap = new Map<string, Map<string, string>>();\n\n/** Maps Vercel AI span names to standardized OpenTelemetry operation names. */\nexport const SPAN_TO_OPERATION_NAME = new Map<string, string>([\n  ['ai.generateText', 'invoke_agent'],\n  ['ai.streamText', 'invoke_agent'],\n  ['ai.generateObject', 'invoke_agent'],\n  ['ai.streamObject', 'invoke_agent'],\n  ['ai.generateText.doGenerate', 'generate_content'],\n  ['ai.streamText.doStream', 'generate_content'],\n  ['ai.generateObject.doGenerate', 'generate_content'],\n  ['ai.streamObject.doStream', 'generate_content'],\n  ['ai.embed.doEmbed', 'embeddings'],\n  ['ai.embedMany.doEmbed', 'embeddings'],\n  ['ai.rerank.doRerank', 'rerank'],\n  ['ai.toolCall', 'execute_tool'],\n]);\n","/* eslint-disable max-lines */\nimport type { Client } from '../../client';\nimport { getClient } from '../../currentScopes';\nimport { SEMANTIC_ATTRIBUTE_SENTRY_OP, SEMANTIC_ATTRIBUTE_SENTRY_ORIGIN } from '../../semanticAttributes';\nimport { shouldEnableTruncation } from '../ai/utils';\nimport type { Event } from '../../types/event';\nimport type { Span, SpanAttributes, SpanAttributeValue, SpanJSON, StreamedSpanJSON } from '../../types/span';\nimport { _INTERNAL_skipAiProviderWrapping } from '../../utils/ai/providerSkip';\nimport { spanToJSON } from '../../utils/spanUtils';\nimport { WORKERS_AI_INTEGRATION_NAME } from '../workers-ai/constants';\nimport {\n  GEN_AI_CONVERSATION_ID_ATTRIBUTE,\n  GEN_AI_EMBEDDINGS_INPUT_ATTRIBUTE,\n  GEN_AI_INPUT_MESSAGES_ATTRIBUTE,\n  GEN_AI_OPERATION_NAME_ATTRIBUTE,\n  GEN_AI_OUTPUT_MESSAGES_ATTRIBUTE,\n  GEN_AI_REQUEST_MODEL_ATTRIBUTE,\n  GEN_AI_RESPONSE_MODEL_ATTRIBUTE,\n  GEN_AI_TOOL_CALL_ID_ATTRIBUTE,\n  GEN_AI_TOOL_DESCRIPTION_ATTRIBUTE,\n  GEN_AI_TOOL_INPUT_ATTRIBUTE,\n  GEN_AI_TOOL_NAME_ATTRIBUTE,\n  GEN_AI_TOOL_OUTPUT_ATTRIBUTE,\n  GEN_AI_TOOL_TYPE_ATTRIBUTE,\n  GEN_AI_USAGE_INPUT_TOKENS_ATTRIBUTE,\n  GEN_AI_USAGE_INPUT_TOKENS_CACHE_WRITE_ATTRIBUTE,\n  GEN_AI_USAGE_INPUT_TOKENS_CACHED_ATTRIBUTE,\n  GEN_AI_USAGE_OUTPUT_TOKENS_ATTRIBUTE,\n  GEN_AI_USAGE_TOTAL_TOKENS_ATTRIBUTE,\n} from '../ai/gen-ai-attributes';\nimport { SPAN_TO_OPERATION_NAME, toolCallSpanContextMap, toolDescriptionMap } from './constants';\nimport type { TokenSummary } from './types';\nimport { hasSpanStreamingEnabled } from '../spans/hasSpanStreamingEnabled';\nimport {\n  accumulateTokensForParent,\n  applyAccumulatedTokens,\n  applyToolDescriptionsAndTokens,\n  convertAvailableToolsToJsonString,\n  requestMessagesFromPrompt,\n} from './utils';\nimport type { OpenAiProviderMetadata, ProviderMetadata } from './vercel-ai-attributes';\nimport {\n  AI_MODEL_ID_ATTRIBUTE,\n  AI_OPERATION_ID_ATTRIBUTE,\n  AI_PROMPT_MESSAGES_ATTRIBUTE,\n  AI_PROMPT_TOOLS_ATTRIBUTE,\n  AI_RESPONSE_FINISH_REASON_ATTRIBUTE,\n  AI_RESPONSE_OBJECT_ATTRIBUTE,\n  AI_RESPONSE_PROVIDER_METADATA_ATTRIBUTE,\n  AI_RESPONSE_TEXT_ATTRIBUTE,\n  AI_RESPONSE_TOOL_CALLS_ATTRIBUTE,\n  AI_SCHEMA_ATTRIBUTE,\n  AI_TELEMETRY_FUNCTION_ID_ATTRIBUTE,\n  AI_TOOL_CALL_ARGS_ATTRIBUTE,\n  AI_TOOL_CALL_ID_ATTRIBUTE,\n  AI_TOOL_CALL_NAME_ATTRIBUTE,\n  AI_TOOL_CALL_RESULT_ATTRIBUTE,\n  AI_USAGE_CACHED_INPUT_TOKENS_ATTRIBUTE,\n  AI_USAGE_COMPLETION_TOKENS_ATTRIBUTE,\n  AI_USAGE_INPUT_TOKEN_DETAILS_ATTRIBUTE_PREFIX,\n  AI_USAGE_PROMPT_TOKENS_ATTRIBUTE,\n  AI_USAGE_TOKENS_ATTRIBUTE,\n  AI_VALUES_ATTRIBUTE,\n  OPERATION_NAME_ATTRIBUTE,\n} from './vercel-ai-attributes';\n\n/**\n * Post-process spans emitted by the Vercel AI SDK.\n * This is supposed to be used in `client.on('spanStart', ...)\n */\nfunction onVercelAiSpanStart(span: Span): void {\n  const { data: attributes, description: name } = spanToJSON(span);\n\n  if (!name) {\n    return;\n  }\n\n  // Tool call spans\n  // https://ai-sdk.dev/docs/ai-sdk-core/telemetry#tool-call-spans\n  if (attributes[AI_TOOL_CALL_NAME_ATTRIBUTE] && attributes[AI_TOOL_CALL_ID_ATTRIBUTE] && name === 'ai.toolCall') {\n    processToolCallSpan(span, attributes);\n    return;\n  }\n\n  // V6+ Check if this is a Vercel AI span by checking if the operation ID attribute is present.\n  // V5+ Check if this is a Vercel AI span by name pattern.\n  if (!attributes[AI_OPERATION_ID_ATTRIBUTE] && !name.startsWith('ai.')) {\n    return;\n  }\n\n  // Registered lazily here (not at `setupOnce`) so a direct `env.AI.run` call made before any `ai`\n  // SDK call still gets its own span.\n  if (SPAN_TO_OPERATION_NAME.get(name) === 'generate_content') {\n    _INTERNAL_skipAiProviderWrapping([WORKERS_AI_INTEGRATION_NAME]);\n  }\n\n  const client = getClient();\n  const integration = client?.getIntegrationByName('VercelAI') as\n    | { options?: { enableTruncation?: boolean } }\n    | undefined;\n  const enableTruncation = shouldEnableTruncation(integration?.options?.enableTruncation);\n\n  processGenerateSpan(span, name, attributes, enableTruncation);\n}\n\nfunction vercelAiEventProcessor(event: Event): Event {\n  if (event.type === 'transaction' && event.spans) {\n    // Map to accumulate token data by parent span ID\n    const tokenAccumulator: Map<string, TokenSummary> = new Map();\n\n    // First pass: process all spans and accumulate token data\n    for (const span of event.spans) {\n      processEndedVercelAiSpan(span);\n\n      // Accumulate token data for parent spans\n      accumulateTokensForParent(span, tokenAccumulator);\n    }\n\n    // Second pass: apply tool descriptions and accumulated tokens\n    applyToolDescriptionsAndTokens(event.spans, tokenAccumulator);\n\n    // Also apply to root when it is the invoke_agent pipeline\n    const trace = event.contexts?.trace;\n    if (trace?.op === 'gen_ai.invoke_agent') {\n      applyAccumulatedTokens(trace, tokenAccumulator);\n    }\n  }\n\n  return event;\n}\n\n/**\n * Tool call structure from Vercel AI SDK\n * Note: V5/V6 use 'input' for arguments, V4 and earlier use 'args'\n */\ninterface VercelToolCall {\n  toolCallId: string;\n  toolName: string;\n  input?: Record<string, unknown> | string; // V5/V6\n  args?: string; // V4 and earlier\n}\n\n/**\n * Normalize finish reason to match OpenTelemetry semantic conventions.\n * Valid values: \"stop\", \"length\", \"content_filter\", \"tool_call\", \"error\"\n *\n * Vercel AI SDK uses \"tool-calls\" (plural, with hyphen) which we map to \"tool_call\".\n */\nfunction normalizeFinishReason(finishReason: unknown): string {\n  if (typeof finishReason !== 'string') {\n    return 'stop';\n  }\n\n  // Map Vercel AI SDK finish reasons to OpenTelemetry semantic convention values\n  switch (finishReason) {\n    case 'tool-calls':\n      return 'tool_call';\n    case 'stop':\n    case 'length':\n    case 'content_filter':\n    case 'error':\n      return finishReason;\n    default:\n      // For unknown values, return as-is (schema allows arbitrary strings)\n      return finishReason;\n  }\n}\n\n/**\n * Build gen_ai.output.messages from ai.response.text and/or ai.response.toolCalls\n *\n * Format follows OpenTelemetry semantic conventions:\n * [{\"role\": \"assistant\", \"parts\": [...], \"finish_reason\": \"stop\"}]\n *\n * Parts can be:\n * - {\"type\": \"text\", \"content\": \"...\"}\n * - {\"type\": \"tool_call\", \"id\": \"...\", \"name\": \"...\", \"arguments\": \"...\"}\n */\nfunction buildOutputMessages(attributes: Record<string, unknown>): void {\n  const responseText = attributes[AI_RESPONSE_TEXT_ATTRIBUTE];\n  const responseToolCalls = attributes[AI_RESPONSE_TOOL_CALLS_ATTRIBUTE];\n  const finishReason = attributes[AI_RESPONSE_FINISH_REASON_ATTRIBUTE];\n\n  // Skip if neither text nor tool calls are present\n  if (responseText == null && responseToolCalls == null) {\n    return;\n  }\n\n  const parts: Array<Record<string, unknown>> = [];\n\n  // Add text part if present\n  if (typeof responseText === 'string' && responseText.length > 0) {\n    parts.push({\n      type: 'text',\n      content: responseText,\n    });\n  }\n\n  // Add tool call parts if present\n  if (responseToolCalls != null) {\n    try {\n      // Tool calls can be a string (JSON) or already parsed array\n      const toolCalls: VercelToolCall[] =\n        typeof responseToolCalls === 'string' ? JSON.parse(responseToolCalls) : responseToolCalls;\n\n      if (Array.isArray(toolCalls)) {\n        for (const toolCall of toolCalls) {\n          // V5/V6 use 'input', V4 and earlier use 'args'\n          const args = toolCall.input ?? toolCall.args;\n          parts.push({\n            type: 'tool_call',\n            id: toolCall.toolCallId,\n            name: toolCall.toolName,\n            // Handle undefined args: JSON.stringify(undefined) returns undefined, not a string,\n            // which would cause the property to be omitted from the final JSON output\n            arguments: typeof args === 'string' ? args : JSON.stringify(args ?? {}),\n          });\n        }\n        // Only delete tool calls attribute if we successfully processed them\n        // eslint-disable-next-line @typescript-eslint/no-dynamic-delete\n        delete attributes[AI_RESPONSE_TOOL_CALLS_ATTRIBUTE];\n      }\n    } catch {\n      // Ignore parsing errors - tool calls attribute is preserved\n    }\n  }\n\n  // Only set output messages and delete text attribute if we have parts\n  if (parts.length > 0) {\n    const outputMessage = {\n      role: 'assistant',\n      parts,\n      finish_reason: normalizeFinishReason(finishReason),\n    };\n\n    attributes[GEN_AI_OUTPUT_MESSAGES_ATTRIBUTE] = JSON.stringify([outputMessage]);\n\n    // Remove the text attribute since it's now captured in gen_ai.output.messages\n    // Note: tool calls attribute is deleted above only if successfully parsed\n    // eslint-disable-next-line @typescript-eslint/no-dynamic-delete\n    delete attributes[AI_RESPONSE_TEXT_ATTRIBUTE];\n  }\n}\n\n/**\n * Post-process spans emitted by the Vercel AI SDK.\n */\n/**\n * Rename and normalize Vercel AI SDK attributes to OpenTelemetry semantic conventions.\n * This is the shared attribute processing logic used by both the legacy event processor\n * path (SpanJSON) and the streamed span path (StreamedSpanJSON).\n */\nexport function processVercelAiSpanAttributes(attributes: Record<string, unknown>): void {\n  renameAttributeKey(attributes, AI_USAGE_COMPLETION_TOKENS_ATTRIBUTE, GEN_AI_USAGE_OUTPUT_TOKENS_ATTRIBUTE);\n  renameAttributeKey(attributes, AI_USAGE_PROMPT_TOKENS_ATTRIBUTE, GEN_AI_USAGE_INPUT_TOKENS_ATTRIBUTE);\n  renameAttributeKey(attributes, AI_USAGE_CACHED_INPUT_TOKENS_ATTRIBUTE, GEN_AI_USAGE_INPUT_TOKENS_CACHED_ATTRIBUTE);\n\n  // Parent spans (ai.streamText, ai.streamObject, etc.) use inputTokens/outputTokens instead of promptTokens/completionTokens\n  renameAttributeKey(attributes, 'ai.usage.inputTokens', GEN_AI_USAGE_INPUT_TOKENS_ATTRIBUTE);\n  renameAttributeKey(attributes, 'ai.usage.outputTokens', GEN_AI_USAGE_OUTPUT_TOKENS_ATTRIBUTE);\n\n  // Embedding spans use ai.usage.tokens instead of promptTokens/completionTokens\n  renameAttributeKey(attributes, AI_USAGE_TOKENS_ATTRIBUTE, GEN_AI_USAGE_INPUT_TOKENS_ATTRIBUTE);\n\n  // AI SDK uses avgOutputTokensPerSecond, map to our expected attribute name\n  renameAttributeKey(attributes, 'ai.response.avgOutputTokensPerSecond', 'ai.response.avgCompletionTokensPerSecond');\n\n  // v6 input tokens are cache-inclusive (marked by the presence of `inputTokenDetails.*`); only\n  // older SDKs need the cached tokens added back.\n  const inputTokensAreCacheInclusive = Object.keys(attributes).some(key =>\n    key.startsWith(AI_USAGE_INPUT_TOKEN_DETAILS_ATTRIBUTE_PREFIX),\n  );\n  if (\n    !inputTokensAreCacheInclusive &&\n    typeof attributes[GEN_AI_USAGE_INPUT_TOKENS_ATTRIBUTE] === 'number' &&\n    typeof attributes[GEN_AI_USAGE_INPUT_TOKENS_CACHED_ATTRIBUTE] === 'number'\n  ) {\n    attributes[GEN_AI_USAGE_INPUT_TOKENS_ATTRIBUTE] =\n      attributes[GEN_AI_USAGE_INPUT_TOKENS_ATTRIBUTE] + attributes[GEN_AI_USAGE_INPUT_TOKENS_CACHED_ATTRIBUTE];\n  }\n\n  // Compute total tokens from input + output (embeddings may only have input tokens)\n  if (typeof attributes[GEN_AI_USAGE_INPUT_TOKENS_ATTRIBUTE] === 'number') {\n    const outputTokens =\n      typeof attributes[GEN_AI_USAGE_OUTPUT_TOKENS_ATTRIBUTE] === 'number'\n        ? attributes[GEN_AI_USAGE_OUTPUT_TOKENS_ATTRIBUTE]\n        : 0;\n    attributes[GEN_AI_USAGE_TOTAL_TOKENS_ATTRIBUTE] = outputTokens + attributes[GEN_AI_USAGE_INPUT_TOKENS_ATTRIBUTE];\n  }\n\n  // Convert the available tools array to a JSON string\n  if (attributes[AI_PROMPT_TOOLS_ATTRIBUTE] && Array.isArray(attributes[AI_PROMPT_TOOLS_ATTRIBUTE])) {\n    attributes[AI_PROMPT_TOOLS_ATTRIBUTE] = convertAvailableToolsToJsonString(\n      attributes[AI_PROMPT_TOOLS_ATTRIBUTE] as unknown[],\n    );\n  }\n\n  // Rename AI SDK attributes to standardized gen_ai attributes\n  // Map operation.name to OpenTelemetry semantic convention values\n  if (attributes[OPERATION_NAME_ATTRIBUTE]) {\n    // V6+ sets ai.operationId to the bare operation (e.g. \"ai.streamText\") while\n    // operation.name appends functionId (e.g. \"ai.streamText myAgent\").\n    // When ai.operationId is present, use it for correct mapping.\n    const rawOperationName = attributes[AI_OPERATION_ID_ATTRIBUTE]\n      ? (attributes[AI_OPERATION_ID_ATTRIBUTE] as string)\n      : (attributes[OPERATION_NAME_ATTRIBUTE] as string);\n    const operationName = SPAN_TO_OPERATION_NAME.get(rawOperationName) ?? rawOperationName;\n    attributes[GEN_AI_OPERATION_NAME_ATTRIBUTE] = operationName;\n    // eslint-disable-next-line @typescript-eslint/no-dynamic-delete\n    delete attributes[OPERATION_NAME_ATTRIBUTE];\n  }\n  renameAttributeKey(attributes, AI_PROMPT_MESSAGES_ATTRIBUTE, GEN_AI_INPUT_MESSAGES_ATTRIBUTE);\n\n  // Build gen_ai.output.messages from response text and/or tool calls\n  // Note: buildOutputMessages also removes the source attributes when output is successfully generated\n  buildOutputMessages(attributes);\n\n  renameAttributeKey(attributes, AI_RESPONSE_OBJECT_ATTRIBUTE, 'gen_ai.response.object');\n  renameAttributeKey(attributes, AI_PROMPT_TOOLS_ATTRIBUTE, 'gen_ai.request.available_tools');\n\n  renameAttributeKey(attributes, AI_TOOL_CALL_ARGS_ATTRIBUTE, GEN_AI_TOOL_INPUT_ATTRIBUTE);\n  renameAttributeKey(attributes, AI_TOOL_CALL_RESULT_ATTRIBUTE, GEN_AI_TOOL_OUTPUT_ATTRIBUTE);\n\n  renameAttributeKey(attributes, AI_SCHEMA_ATTRIBUTE, 'gen_ai.request.schema');\n  renameAttributeKey(attributes, AI_MODEL_ID_ATTRIBUTE, GEN_AI_REQUEST_MODEL_ATTRIBUTE);\n\n  // Map embedding input: ai.values → gen_ai.embeddings.input\n  // Vercel AI SDK JSON-stringifies each value individually, so we parse each element back.\n  // Single embed gets unwrapped to a plain value; batch embedMany stays as a JSON array.\n  if (Array.isArray(attributes[AI_VALUES_ATTRIBUTE])) {\n    const parsed = (attributes[AI_VALUES_ATTRIBUTE] as string[]).map(v => {\n      try {\n        return JSON.parse(v);\n      } catch {\n        return v;\n      }\n    });\n    attributes[GEN_AI_EMBEDDINGS_INPUT_ATTRIBUTE] = parsed.length === 1 ? parsed[0] : JSON.stringify(parsed);\n  }\n\n  addProviderMetadataToAttributes(attributes);\n\n  for (const key of Object.keys(attributes)) {\n    // JSON-stringify any array-valued attributes so they survive v2 span serialization.\n    // Can be removed once span streaming supports arrays natively.\n    if (Array.isArray(attributes[key])) {\n      attributes[key] = JSON.stringify(attributes[key]);\n    }\n    // Change attributes namespaced with `ai.X` to `vercel.ai.X`\n    if (key.startsWith('ai.')) {\n      renameAttributeKey(attributes, key, `vercel.${key}`);\n    }\n  }\n}\n\nfunction processEndedVercelAiSpan(span: SpanJSON): void {\n  const { data: attributes, origin } = span;\n\n  if (origin !== 'auto.vercelai.otel') {\n    return;\n  }\n\n  // The Vercel AI SDK sets span status to raw error message strings.\n  // Any such value should be normalized to a SpanStatusType value. We pick internal_error as it is the most generic.\n  if (span.status && span.status !== 'ok') {\n    span.status = 'internal_error';\n  }\n\n  processVercelAiSpanAttributes(attributes);\n}\n\nfunction processVercelAiStreamedSpan(span: StreamedSpanJSON): void {\n  const attributes = span.attributes;\n  if (attributes?.[SEMANTIC_ATTRIBUTE_SENTRY_ORIGIN] !== 'auto.vercelai.otel') {\n    return;\n  }\n\n  processVercelAiSpanAttributes(attributes);\n\n  // Look up tool description from the toolDescriptionMap for execute_tool spans\n  if (attributes[SEMANTIC_ATTRIBUTE_SENTRY_OP] === 'gen_ai.execute_tool' && span.parent_span_id) {\n    const descriptions = toolDescriptionMap.get(span.parent_span_id);\n\n    if (descriptions) {\n      const toolName = attributes[GEN_AI_TOOL_NAME_ATTRIBUTE];\n      if (typeof toolName === 'string') {\n        const desc = descriptions.get(toolName);\n        if (desc) {\n          attributes[GEN_AI_TOOL_DESCRIPTION_ATTRIBUTE] = desc;\n        }\n      }\n    }\n  }\n\n  // Clean up tool descriptions when the parent span ends\n  toolDescriptionMap.delete(span.span_id);\n}\n\n/**\n * Renames an attribute key in the provided attributes object if the old key exists.\n * This function safely handles null and undefined values.\n */\nfunction renameAttributeKey(attributes: Record<string, unknown>, oldKey: string, newKey: string): void {\n  if (attributes[oldKey] != null) {\n    attributes[newKey] = attributes[oldKey];\n    // eslint-disable-next-line @typescript-eslint/no-dynamic-delete\n    delete attributes[oldKey];\n  }\n}\n\nfunction processToolCallSpan(span: Span, attributes: SpanAttributes): void {\n  span.setAttribute(SEMANTIC_ATTRIBUTE_SENTRY_ORIGIN, 'auto.vercelai.otel');\n  span.setAttribute(SEMANTIC_ATTRIBUTE_SENTRY_OP, 'gen_ai.execute_tool');\n  span.setAttribute(GEN_AI_OPERATION_NAME_ATTRIBUTE, 'execute_tool');\n  renameAttributeKey(attributes, AI_TOOL_CALL_NAME_ATTRIBUTE, GEN_AI_TOOL_NAME_ATTRIBUTE);\n  renameAttributeKey(attributes, AI_TOOL_CALL_ID_ATTRIBUTE, GEN_AI_TOOL_CALL_ID_ATTRIBUTE);\n\n  // Store the span context in our global map using the tool call ID.\n  // This allows us to capture tool errors and link them to the correct span\n  // without retaining the full Span object in memory.\n  const toolCallId = attributes[GEN_AI_TOOL_CALL_ID_ATTRIBUTE];\n\n  if (typeof toolCallId === 'string') {\n    toolCallSpanContextMap.set(toolCallId, span.spanContext());\n  }\n\n  // https://opentelemetry.io/docs/specs/semconv/registry/attributes/gen-ai/#gen-ai-tool-type\n  if (!attributes[GEN_AI_TOOL_TYPE_ATTRIBUTE]) {\n    span.setAttribute(GEN_AI_TOOL_TYPE_ATTRIBUTE, 'function');\n  }\n  const toolName = attributes[GEN_AI_TOOL_NAME_ATTRIBUTE];\n  if (toolName) {\n    span.updateName(`execute_tool ${toolName}`);\n  }\n}\n\nfunction processGenerateSpan(span: Span, name: string, attributes: SpanAttributes, enableTruncation: boolean): void {\n  span.setAttribute(SEMANTIC_ATTRIBUTE_SENTRY_ORIGIN, 'auto.vercelai.otel');\n\n  const nameWthoutAi = name.replace('ai.', '');\n  span.setAttribute('ai.pipeline.name', nameWthoutAi);\n  span.updateName(nameWthoutAi);\n\n  const functionId = attributes[AI_TELEMETRY_FUNCTION_ID_ATTRIBUTE];\n  if (functionId && typeof functionId === 'string') {\n    span.setAttribute('gen_ai.function_id', functionId);\n  }\n\n  requestMessagesFromPrompt(span, attributes, enableTruncation);\n\n  if (attributes[AI_MODEL_ID_ATTRIBUTE] && !attributes[GEN_AI_RESPONSE_MODEL_ATTRIBUTE]) {\n    span.setAttribute(GEN_AI_RESPONSE_MODEL_ATTRIBUTE, attributes[AI_MODEL_ID_ATTRIBUTE]);\n  }\n  span.setAttribute('ai.streaming', name.includes('stream'));\n\n  // Set the op based on the operation name registry\n  const operationName = SPAN_TO_OPERATION_NAME.get(name);\n  if (operationName) {\n    span.setAttribute(SEMANTIC_ATTRIBUTE_SENTRY_OP, `gen_ai.${operationName}`);\n  } else if (name.startsWith('ai.stream')) {\n    span.setAttribute(SEMANTIC_ATTRIBUTE_SENTRY_OP, 'ai.run');\n  }\n\n  // For invoke_agent pipeline spans, use 'invoke_agent' as the description\n  // to be consistent with other AI integrations (e.g. LangGraph)\n  if (operationName === 'invoke_agent') {\n    if (functionId && typeof functionId === 'string') {\n      span.updateName(`invoke_agent ${functionId}`);\n    } else {\n      span.updateName('invoke_agent');\n    }\n    return;\n  }\n\n  const modelId = attributes[AI_MODEL_ID_ATTRIBUTE];\n  if (modelId && operationName) {\n    span.updateName(`${operationName} ${modelId}`);\n  }\n\n  // Store tool descriptions in the toolDescriptionMap so processSpan can apply them to execute_tool spans.\n  // This is only needed for span streaming (transaction path handles this separately)\n  const client = getClient();\n  if (\n    client &&\n    hasSpanStreamingEnabled(client) &&\n    attributes[AI_PROMPT_TOOLS_ATTRIBUTE] &&\n    Array.isArray(attributes[AI_PROMPT_TOOLS_ATTRIBUTE])\n  ) {\n    const descriptions = new Map<string, string>();\n\n    // parse tool names and descriptions from tool string array\n    for (const toolStr of attributes[AI_PROMPT_TOOLS_ATTRIBUTE] as unknown[]) {\n      try {\n        const parsed = (typeof toolStr === 'string' ? JSON.parse(toolStr) : toolStr) as {\n          name?: string;\n          description?: string;\n        };\n        if (parsed?.name && parsed?.description) {\n          descriptions.set(parsed.name, parsed.description);\n        }\n      } catch {\n        // ignore parse errors\n      }\n    }\n    if (descriptions.size > 0) {\n      // Tool call spans are siblings of doGenerate (both children of invoke_agent),\n      // so we key by the parent span ID (the invoke_agent span).\n      const parentSpanId = spanToJSON(span).parent_span_id;\n      if (parentSpanId) {\n        toolDescriptionMap.set(parentSpanId, descriptions);\n      }\n    }\n  }\n}\n\nconst CLIENTS_WITH_VERCEL_AI_PROCESSORS = new WeakSet<Client>();\n\n/**\n * Add event processors to the given client to process Vercel AI spans.\n *\n * Idempotent: both the integration and the Next.js SDK register these, and duplicate hooks would\n * process every span twice.\n */\nexport function addVercelAiProcessors(client: Client): void {\n  if (CLIENTS_WITH_VERCEL_AI_PROCESSORS.has(client)) {\n    return;\n  }\n  CLIENTS_WITH_VERCEL_AI_PROCESSORS.add(client);\n\n  client.on('spanStart', onVercelAiSpanStart);\n  // Note: We cannot do this on `spanEnd`, because the span cannot be mutated anymore at this point\n  client.addEventProcessor(Object.assign(vercelAiEventProcessor, { id: 'VercelAiEventProcessor' }));\n  client.on('processSpan', span => {\n    processVercelAiStreamedSpan(span);\n  });\n}\n\n/**\n * Derive the `gen_ai.usage.*` cache/reasoning/prediction token attributes and `gen_ai.conversation.id`\n * from an AI SDK `providerMetadata` object.\n *\n * Shared between the OTel processor (which parses `providerMetadata` from a serialized span attribute)\n * and the `ai` >= 7 tracing-channel subscriber (which receives it as an object on the channel result),\n * so both paths emit an identical shape. Pass the already-parsed object; unknown/empty input yields `{}`.\n */\nexport function getProviderMetadataAttributes(providerMetadata: unknown): Record<string, number | string> {\n  const attributes: Record<string, number | string> = {};\n\n  if (!providerMetadata || typeof providerMetadata !== 'object') {\n    return attributes;\n  }\n  const metadata = providerMetadata as ProviderMetadata;\n\n  // OpenAI (v5 uses 'openai', v6 Azure Responses API uses 'azure')\n  const openaiMetadata: OpenAiProviderMetadata | undefined = metadata.openai ?? metadata.azure;\n  if (openaiMetadata) {\n    setAttributeIfDefined(attributes, GEN_AI_USAGE_INPUT_TOKENS_CACHED_ATTRIBUTE, openaiMetadata.cachedPromptTokens);\n    setAttributeIfDefined(attributes, 'gen_ai.usage.output_tokens.reasoning', openaiMetadata.reasoningTokens);\n    setAttributeIfDefined(\n      attributes,\n      'gen_ai.usage.output_tokens.prediction_accepted',\n      openaiMetadata.acceptedPredictionTokens,\n    );\n    setAttributeIfDefined(\n      attributes,\n      'gen_ai.usage.output_tokens.prediction_rejected',\n      openaiMetadata.rejectedPredictionTokens,\n    );\n    setAttributeIfDefined(attributes, GEN_AI_CONVERSATION_ID_ATTRIBUTE, openaiMetadata.responseId);\n  }\n\n  if (metadata.anthropic) {\n    const cachedInputTokens =\n      metadata.anthropic.usage?.cache_read_input_tokens ?? metadata.anthropic.cacheReadInputTokens;\n    setAttributeIfDefined(attributes, GEN_AI_USAGE_INPUT_TOKENS_CACHED_ATTRIBUTE, cachedInputTokens);\n\n    const cacheWriteInputTokens =\n      metadata.anthropic.usage?.cache_creation_input_tokens ?? metadata.anthropic.cacheCreationInputTokens;\n    setAttributeIfDefined(attributes, GEN_AI_USAGE_INPUT_TOKENS_CACHE_WRITE_ATTRIBUTE, cacheWriteInputTokens);\n  }\n\n  if (metadata.bedrock?.usage) {\n    setAttributeIfDefined(\n      attributes,\n      GEN_AI_USAGE_INPUT_TOKENS_CACHED_ATTRIBUTE,\n      metadata.bedrock.usage.cacheReadInputTokens,\n    );\n    setAttributeIfDefined(\n      attributes,\n      GEN_AI_USAGE_INPUT_TOKENS_CACHE_WRITE_ATTRIBUTE,\n      metadata.bedrock.usage.cacheWriteInputTokens,\n    );\n  }\n\n  if (metadata.deepseek) {\n    setAttributeIfDefined(\n      attributes,\n      GEN_AI_USAGE_INPUT_TOKENS_CACHED_ATTRIBUTE,\n      metadata.deepseek.promptCacheHitTokens,\n    );\n    setAttributeIfDefined(attributes, 'gen_ai.usage.input_tokens.cache_miss', metadata.deepseek.promptCacheMissTokens);\n  }\n\n  // Google (v5 uses 'google', v6 Vertex AI uses 'vertex'). Gemini reports its reasoning (\"thoughts\")\n  // tokens separately from the candidate output count, so the SDK's `outputTokens` covers only the\n  // visible answer. Recompute output from `candidatesTokenCount + thoughtsTokenCount` rather than\n  // adding onto the existing value, which stays correct even if a future SDK version already folds\n  // reasoning in. `candidatesTokenCount` is omitted when the response is truncated during thinking,\n  // which means no candidate tokens, so it counts as zero. Reasoning is a subset of output per the\n  // conventions, so it is only written alongside the reasoning-inclusive output it belongs to.\n  const googleUsage = (metadata.google ?? metadata.vertex)?.usageMetadata;\n  if (googleUsage && typeof googleUsage.thoughtsTokenCount === 'number' && googleUsage.thoughtsTokenCount > 0) {\n    attributes[GEN_AI_USAGE_OUTPUT_TOKENS_ATTRIBUTE] =\n      (googleUsage.candidatesTokenCount ?? 0) + googleUsage.thoughtsTokenCount;\n    setAttributeIfDefined(attributes, GEN_AI_USAGE_TOTAL_TOKENS_ATTRIBUTE, googleUsage.totalTokenCount);\n    setAttributeIfDefined(attributes, 'gen_ai.usage.reasoning.output_tokens', googleUsage.thoughtsTokenCount);\n  }\n\n  return attributes;\n}\n\n/**\n * Usage attributes that `getProviderMetadataAttributes` derives from `providerMetadata`, which\n * describes only the last step of a call. They must not be written onto a span that reports usage\n * aggregated across steps (`gen_ai.invoke_agent`), where they would replace the aggregate with one\n * step's figures. Exported so the channel/orchestrion subscribers, which call\n * `getProviderMetadataAttributes` directly rather than through `addProviderMetadataToAttributes`,\n * apply the same rule.\n */\nexport const LAST_STEP_ONLY_USAGE_KEYS = new Set<string>([\n  GEN_AI_USAGE_OUTPUT_TOKENS_ATTRIBUTE,\n  GEN_AI_USAGE_TOTAL_TOKENS_ATTRIBUTE,\n  'gen_ai.usage.reasoning.output_tokens',\n]);\n\nfunction addProviderMetadataToAttributes(attributes: Record<string, unknown>): void {\n  const providerMetadata = attributes[AI_RESPONSE_PROVIDER_METADATA_ATTRIBUTE] as string | undefined;\n  if (!providerMetadata) {\n    return;\n  }\n  // An `invoke_agent` span carries the summed `ai.usage.*` of every step, while `providerMetadata`\n  // describes the last step alone. Writing output or total from it would replace the aggregate with\n  // one step's figures, so a two-step call reports output 50 against input 900. The event-processor\n  // path happens to overwrite it again in `applyAccumulatedTokens`; the streamed path ships it.\n  // Reasoning goes with them: it is a subset of an output the parent never recomputes, and the\n  // accumulator never sums it, so the last step's count would stand in for the whole call.\n  const lastStepOnly = attributes[GEN_AI_OPERATION_NAME_ATTRIBUTE] === 'invoke_agent';\n  try {\n    const derived = getProviderMetadataAttributes(JSON.parse(providerMetadata) as ProviderMetadata);\n    for (const [key, value] of Object.entries(derived)) {\n      // Preserve the original behaviour of not overwriting an already-set conversation id.\n      if (key === GEN_AI_CONVERSATION_ID_ATTRIBUTE && attributes[key]) {\n        continue;\n      }\n      if (lastStepOnly && LAST_STEP_ONLY_USAGE_KEYS.has(key)) {\n        continue;\n      }\n      attributes[key] = value;\n    }\n  } catch {\n    // Ignore\n  }\n}\n\n/**\n * Sets an attribute only if the value is not null or undefined.\n */\nfunction setAttributeIfDefined(\n  attributes: Record<string, unknown>,\n  key: string,\n  value: SpanAttributeValue | undefined,\n): void {\n  if (value != null) {\n    attributes[key] = value;\n  }\n}\n","import type { TraceContext } from '../../types/context';\nimport type { Span, SpanAttributes, SpanJSON } from '../../types/span';\nimport {\n  GEN_AI_INPUT_MESSAGES_ATTRIBUTE,\n  GEN_AI_INPUT_MESSAGES_ORIGINAL_LENGTH_ATTRIBUTE,\n  GEN_AI_REQUEST_AVAILABLE_TOOLS_ATTRIBUTE,\n  GEN_AI_SYSTEM_INSTRUCTIONS_ATTRIBUTE,\n  GEN_AI_TOOL_DESCRIPTION_ATTRIBUTE,\n  GEN_AI_TOOL_NAME_ATTRIBUTE,\n  GEN_AI_USAGE_INPUT_TOKENS_ATTRIBUTE,\n  GEN_AI_USAGE_OUTPUT_TOKENS_ATTRIBUTE,\n} from '../ai/gen-ai-attributes';\nimport { extractSystemInstructions, getTruncatedJsonString } from '../ai/utils';\nimport { stringify } from '../../utils/string';\nimport { toolCallSpanContextMap } from './constants';\nimport type { TokenSummary, ToolCallSpanContext } from './types';\nimport { AI_PROMPT_ATTRIBUTE, AI_PROMPT_MESSAGES_ATTRIBUTE } from './vercel-ai-attributes';\n\n/**\n * Accumulates token data from a span to its parent in the token accumulator map.\n * This function extracts token usage from the current span and adds it to the\n * accumulated totals for its parent span.\n */\nexport function accumulateTokensForParent(span: SpanJSON, tokenAccumulator: Map<string, TokenSummary>): void {\n  const parentSpanId = span.parent_span_id;\n  if (!parentSpanId) {\n    return;\n  }\n\n  const inputTokens = span.data[GEN_AI_USAGE_INPUT_TOKENS_ATTRIBUTE];\n  const outputTokens = span.data[GEN_AI_USAGE_OUTPUT_TOKENS_ATTRIBUTE];\n\n  if (typeof inputTokens === 'number' || typeof outputTokens === 'number') {\n    const existing = tokenAccumulator.get(parentSpanId) || { inputTokens: 0, outputTokens: 0 };\n\n    if (typeof inputTokens === 'number') {\n      existing.inputTokens += inputTokens;\n    }\n    if (typeof outputTokens === 'number') {\n      existing.outputTokens += outputTokens;\n    }\n\n    tokenAccumulator.set(parentSpanId, existing);\n  }\n}\n\n/**\n * Applies accumulated token data to the `gen_ai.invoke_agent` span.\n * Only immediate children of the `gen_ai.invoke_agent` span are considered,\n * since aggregation will automatically occur for each parent span.\n */\nexport function applyAccumulatedTokens(\n  spanOrTrace: SpanJSON | TraceContext,\n  tokenAccumulator: Map<string, TokenSummary>,\n): void {\n  const accumulated = tokenAccumulator.get(spanOrTrace.span_id);\n  if (!accumulated || !spanOrTrace.data) {\n    return;\n  }\n\n  if (accumulated.inputTokens > 0) {\n    spanOrTrace.data[GEN_AI_USAGE_INPUT_TOKENS_ATTRIBUTE] = accumulated.inputTokens;\n  }\n  if (accumulated.outputTokens > 0) {\n    spanOrTrace.data[GEN_AI_USAGE_OUTPUT_TOKENS_ATTRIBUTE] = accumulated.outputTokens;\n  }\n  if (accumulated.inputTokens > 0 || accumulated.outputTokens > 0) {\n    spanOrTrace.data['gen_ai.usage.total_tokens'] = accumulated.inputTokens + accumulated.outputTokens;\n  }\n}\n\n/**\n * Builds a map of tool name -> description from all spans with available_tools.\n * This avoids O(n²) iteration and repeated JSON parsing.\n */\nfunction buildToolDescriptionMap(spans: SpanJSON[]): Map<string, string> {\n  const toolDescriptions = new Map<string, string>();\n\n  for (const span of spans) {\n    const availableTools = span.data[GEN_AI_REQUEST_AVAILABLE_TOOLS_ATTRIBUTE];\n    if (typeof availableTools !== 'string') {\n      continue;\n    }\n    try {\n      const tools = JSON.parse(availableTools) as Array<{ name?: string; description?: string }>;\n      for (const tool of tools) {\n        if (tool.name && tool.description && !toolDescriptions.has(tool.name)) {\n          toolDescriptions.set(tool.name, tool.description);\n        }\n      }\n    } catch {\n      // ignore parse errors\n    }\n  }\n\n  return toolDescriptions;\n}\n\n/**\n * Applies tool descriptions and accumulated tokens to spans in a single pass.\n *\n * - For `gen_ai.execute_tool` spans: looks up tool description from\n *   `gen_ai.request.available_tools` on sibling spans\n * - For `gen_ai.invoke_agent` spans: applies accumulated token data from children\n */\nexport function applyToolDescriptionsAndTokens(spans: SpanJSON[], tokenAccumulator: Map<string, TokenSummary>): void {\n  // Build lookup map once to avoid O(n²) iteration and repeated JSON parsing\n  const toolDescriptions = buildToolDescriptionMap(spans);\n\n  for (const span of spans) {\n    if (span.op === 'gen_ai.execute_tool') {\n      const toolName = span.data[GEN_AI_TOOL_NAME_ATTRIBUTE];\n      if (typeof toolName === 'string') {\n        const description = toolDescriptions.get(toolName);\n        if (description) {\n          span.data[GEN_AI_TOOL_DESCRIPTION_ATTRIBUTE] = description;\n        }\n      }\n    }\n\n    if (span.op === 'gen_ai.invoke_agent') {\n      applyAccumulatedTokens(span, tokenAccumulator);\n    }\n  }\n}\n\n/**\n * Get the span context associated with a tool call ID.\n */\nexport function _INTERNAL_getSpanContextForToolCallId(toolCallId: string): ToolCallSpanContext | undefined {\n  return toolCallSpanContextMap.get(toolCallId);\n}\n\n/**\n * Clean up the span mapping for a tool call ID\n */\nexport function _INTERNAL_cleanupToolCallSpanContext(toolCallId: string): void {\n  toolCallSpanContextMap.delete(toolCallId);\n}\n\n/**\n * Convert an array of tool strings to a JSON string\n */\nexport function convertAvailableToolsToJsonString(tools: unknown[]): string {\n  const toolObjects = tools.map(tool => {\n    if (typeof tool === 'string') {\n      try {\n        return JSON.parse(tool);\n      } catch {\n        return tool;\n      }\n    }\n    return tool;\n  });\n  return JSON.stringify(toolObjects);\n}\n\n/**\n * Filter out invalid entries in messages array\n * @param input - The input array to filter\n * @returns The filtered array\n */\nfunction filterMessagesArray(input: unknown[]): { role: string; content: string }[] {\n  return input.filter(\n    (m: unknown): m is { role: string; content: string } =>\n      !!m && typeof m === 'object' && 'role' in m && 'content' in m,\n  );\n}\n\n/**\n * Normalize the user input (stringified object with prompt, system, messages) to messages array\n */\nexport function convertUserInputToMessagesFormat(userInput: string): { role: string; content: string }[] {\n  try {\n    const p = JSON.parse(userInput);\n    if (!!p && typeof p === 'object') {\n      let { messages } = p;\n      const { prompt, system } = p;\n      const result: { role: string; content: string }[] = [];\n\n      // prepend top-level system instruction if present\n      if (typeof system === 'string') {\n        result.push({ role: 'system', content: system });\n      }\n\n      // stringified messages array\n      if (typeof messages === 'string') {\n        try {\n          messages = JSON.parse(messages);\n        } catch {\n          // ignore parse errors\n        }\n      }\n\n      // messages array format: { messages: [...] }\n      if (Array.isArray(messages)) {\n        result.push(...filterMessagesArray(messages));\n        return result;\n      }\n\n      // prompt array format: { prompt: [...] }\n      if (Array.isArray(prompt)) {\n        result.push(...filterMessagesArray(prompt));\n        return result;\n      }\n\n      // prompt string format: { prompt: \"...\" }\n      if (typeof prompt === 'string') {\n        result.push({ role: 'user', content: prompt });\n      }\n\n      if (result.length > 0) {\n        return result;\n      }\n    }\n    // eslint-disable-next-line no-empty\n  } catch {}\n  return [];\n}\n\n/**\n * Generate a request.messages JSON array from the prompt field in the\n * invoke_agent op\n */\nexport function requestMessagesFromPrompt(span: Span, attributes: SpanAttributes, enableTruncation: boolean): void {\n  if (\n    typeof attributes[AI_PROMPT_ATTRIBUTE] === 'string' &&\n    !attributes[GEN_AI_INPUT_MESSAGES_ATTRIBUTE] &&\n    !attributes[AI_PROMPT_MESSAGES_ATTRIBUTE]\n  ) {\n    // No messages array is present, so we need to convert the prompt to the proper messages format\n    // This is the case for ai.generateText spans\n    // The ai.prompt attribute is a stringified object with prompt, system, messages attributes\n    // The format of these is described in the vercel docs, for instance: https://ai-sdk.dev/docs/reference/ai-sdk-core/stream-object#parameters\n    const userInput = attributes[AI_PROMPT_ATTRIBUTE];\n    const messages = convertUserInputToMessagesFormat(userInput);\n    if (messages.length) {\n      const { systemInstructions, filteredMessages } = extractSystemInstructions(messages);\n\n      if (systemInstructions) {\n        span.setAttribute(GEN_AI_SYSTEM_INSTRUCTIONS_ATTRIBUTE, systemInstructions);\n      }\n\n      const filteredLength = Array.isArray(filteredMessages) ? filteredMessages.length : 0;\n      const messagesJson = enableTruncation ? getTruncatedJsonString(filteredMessages) : stringify(filteredMessages);\n\n      span.setAttributes({\n        [AI_PROMPT_ATTRIBUTE]: messagesJson,\n        [GEN_AI_INPUT_MESSAGES_ATTRIBUTE]: messagesJson,\n        [GEN_AI_INPUT_MESSAGES_ORIGINAL_LENGTH_ATTRIBUTE]: filteredLength,\n      });\n    }\n  } else if (typeof attributes[AI_PROMPT_MESSAGES_ATTRIBUTE] === 'string') {\n    // In this case we already get a properly formatted messages array, this is the preferred way to get the messages\n    // This is the case for ai.generateText.doGenerate spans\n    const originalMessagesJson = attributes[AI_PROMPT_MESSAGES_ATTRIBUTE];\n    try {\n      const messages = JSON.parse(originalMessagesJson);\n      if (Array.isArray(messages)) {\n        const { systemInstructions, filteredMessages } = extractSystemInstructions(messages);\n\n        if (systemInstructions) {\n          span.setAttribute(GEN_AI_SYSTEM_INSTRUCTIONS_ATTRIBUTE, systemInstructions);\n        }\n\n        const filteredLength = Array.isArray(filteredMessages) ? filteredMessages.length : 0;\n\n        // `extractSystemInstructions` returns the original array reference unchanged when no\n        // system message is extracted. When truncation is also disabled, re-serializing would\n        // reproduce the SDK's own input string, so we reuse it instead of allocating a second\n        // full-size copy of the payload (matters for large prompts in memory-constrained runtimes).\n        const messagesJson =\n          !enableTruncation && filteredMessages === messages\n            ? originalMessagesJson\n            : enableTruncation\n              ? getTruncatedJsonString(filteredMessages)\n              : stringify(filteredMessages);\n\n        span.setAttributes({\n          [AI_PROMPT_MESSAGES_ATTRIBUTE]: messagesJson,\n          [GEN_AI_INPUT_MESSAGES_ATTRIBUTE]: messagesJson,\n          [GEN_AI_INPUT_MESSAGES_ORIGINAL_LENGTH_ATTRIBUTE]: filteredLength,\n        });\n      }\n      // eslint-disable-next-line no-empty\n    } catch {}\n  }\n}\n","/**\n * AI SDK Telemetry Attributes\n * Based on https://ai-sdk.dev/docs/ai-sdk-core/telemetry#collected-data\n */\n\n// =============================================================================\n// COMMON ATTRIBUTES\n// =============================================================================\n\n/**\n * Common attribute for operation name across all functions and spans\n * @see https://ai-sdk.dev/docs/ai-sdk-core/telemetry#collected-data\n */\nexport const OPERATION_NAME_ATTRIBUTE = 'operation.name';\n\n/**\n * Common attribute for AI operation ID across all functions and spans\n * @see https://ai-sdk.dev/docs/ai-sdk-core/telemetry#collected-data\n */\nexport const AI_OPERATION_ID_ATTRIBUTE = 'ai.operationId';\n\n// =============================================================================\n// SHARED ATTRIBUTES\n// =============================================================================\n\n/**\n * `generateText` function - `ai.generateText` span\n * `streamText` function - `ai.streamText` span\n *\n * The prompt that was used when calling the function\n * @see https://ai-sdk.dev/docs/ai-sdk-core/telemetry#generatetext-function\n * @see https://ai-sdk.dev/docs/ai-sdk-core/telemetry#streamtext-function\n */\nexport const AI_PROMPT_ATTRIBUTE = 'ai.prompt';\n\n/**\n * `generateObject` function - `ai.generateObject` span\n * `streamObject` function - `ai.streamObject` span\n *\n * The JSON schema version of the schema that was passed into the function\n * @see https://ai-sdk.dev/docs/ai-sdk-core/telemetry#generateobject-function\n * @see https://ai-sdk.dev/docs/ai-sdk-core/telemetry#streamobject-function\n */\nexport const AI_SCHEMA_ATTRIBUTE = 'ai.schema';\n\n/**\n * `generateObject` function - `ai.generateObject` span\n * `streamObject` function - `ai.streamObject` span\n *\n * The object that was generated (stringified JSON)\n * @see https://ai-sdk.dev/docs/ai-sdk-core/telemetry#generateobject-function\n * @see https://ai-sdk.dev/docs/ai-sdk-core/telemetry#streamobject-function\n */\nexport const AI_RESPONSE_OBJECT_ATTRIBUTE = 'ai.response.object';\n\n/**\n * `embed` function - `ai.embed.doEmbed` span\n * `embedMany` function - `ai.embedMany` span\n *\n * The values that were passed into the function (array)\n * @see https://ai-sdk.dev/docs/ai-sdk-core/telemetry#embed-function\n * @see https://ai-sdk.dev/docs/ai-sdk-core/telemetry#embedmany-function\n */\nexport const AI_VALUES_ATTRIBUTE = 'ai.values';\n\n// =============================================================================\n// GENERATETEXT FUNCTION - UNIQUE ATTRIBUTES\n// =============================================================================\n\n/**\n * `generateText` function - `ai.generateText` span\n *\n * The text that was generated\n * @see https://ai-sdk.dev/docs/ai-sdk-core/telemetry#generatetext-function\n */\nexport const AI_RESPONSE_TEXT_ATTRIBUTE = 'ai.response.text';\n\n/**\n * `generateText` function - `ai.generateText` span\n *\n * The tool calls that were made as part of the generation (stringified JSON)\n * @see https://ai-sdk.dev/docs/ai-sdk-core/telemetry#generatetext-function\n */\nexport const AI_RESPONSE_TOOL_CALLS_ATTRIBUTE = 'ai.response.toolCalls';\n\n/**\n * `generateText` function - `ai.generateText` span\n *\n * The reason why the generation finished\n * @see https://ai-sdk.dev/docs/ai-sdk-core/telemetry#generatetext-function\n */\nexport const AI_RESPONSE_FINISH_REASON_ATTRIBUTE = 'ai.response.finishReason';\n\n/**\n * `generateText` function - `ai.generateText` span\n *\n * The maximum number of steps that were set\n * @see https://ai-sdk.dev/docs/ai-sdk-core/telemetry#generatetext-function\n */\nexport const AI_SETTINGS_MAX_STEPS_ATTRIBUTE = 'ai.settings.maxSteps';\n\n/**\n * `generateText` function - `ai.generateText.doGenerate` span\n *\n * The messages that were passed into the provider\n * @see https://ai-sdk.dev/docs/ai-sdk-core/telemetry#generatetext-function\n */\nexport const AI_PROMPT_MESSAGES_ATTRIBUTE = 'ai.prompt.messages';\n\n/**\n * `generateText` function - `ai.generateText.doGenerate` span\n *\n * Array of stringified tool definitions\n * @see https://ai-sdk.dev/docs/ai-sdk-core/telemetry#generatetext-function\n */\nexport const AI_PROMPT_TOOLS_ATTRIBUTE = 'ai.prompt.tools';\n\n// =============================================================================\n// BASIC LLM SPAN INFORMATION\n// =============================================================================\n\n/**\n * Basic LLM span information\n * Multiple spans\n *\n * The id of the model\n * @see https://ai-sdk.dev/docs/ai-sdk-core/telemetry#basic-llm-span-information\n */\nexport const AI_MODEL_ID_ATTRIBUTE = 'ai.model.id';\n\n/**\n * Basic LLM span information\n * Multiple spans\n *\n * Provider specific metadata returned with the generation response\n * @see https://ai-sdk.dev/docs/ai-sdk-core/telemetry#basic-llm-span-information\n */\nexport const AI_RESPONSE_PROVIDER_METADATA_ATTRIBUTE = 'ai.response.providerMetadata';\n\n/**\n * Basic LLM span information\n * Multiple spans\n *\n * The number of cached input tokens that were used\n * @see https://ai-sdk.dev/docs/ai-sdk-core/telemetry#basic-llm-span-information\n */\nexport const AI_USAGE_CACHED_INPUT_TOKENS_ATTRIBUTE = 'ai.usage.cachedInputTokens';\n\n/**\n * Prefix for the per-category breakdown of input tokens (AI SDK v6+), e.g.\n * `noCacheTokens`, `cacheReadTokens`, `cacheWriteTokens`. Only emitted by v6, where\n * `ai.usage.inputTokens` is already cache-inclusive.\n */\nexport const AI_USAGE_INPUT_TOKEN_DETAILS_ATTRIBUTE_PREFIX = 'ai.usage.inputTokenDetails.';\n\n/**\n * Basic LLM span information\n * Multiple spans\n *\n * The functionId that was set through `telemetry.functionId`\n * @see https://ai-sdk.dev/docs/ai-sdk-core/telemetry#basic-llm-span-information\n */\nexport const AI_TELEMETRY_FUNCTION_ID_ATTRIBUTE = 'ai.telemetry.functionId';\n\n/**\n * Basic LLM span information\n * Multiple spans\n *\n * The number of completion tokens that were used\n * @see https://ai-sdk.dev/docs/ai-sdk-core/telemetry#basic-llm-span-information\n */\nexport const AI_USAGE_COMPLETION_TOKENS_ATTRIBUTE = 'ai.usage.completionTokens';\n\n/**\n * Basic LLM span information\n * Multiple spans\n *\n * The number of prompt tokens that were used\n * @see https://ai-sdk.dev/docs/ai-sdk-core/telemetry#basic-llm-span-information\n */\nexport const AI_USAGE_PROMPT_TOKENS_ATTRIBUTE = 'ai.usage.promptTokens';\n\n// =============================================================================\n// CALL LLM SPAN INFORMATION\n// =============================================================================\n\n/**\n * Call LLM span information\n * Individual LLM call spans\n *\n * The model that was used to generate the response\n * @see https://ai-sdk.dev/docs/ai-sdk-core/telemetry#call-llm-span-information\n */\nexport const AI_RESPONSE_MODEL_ATTRIBUTE = 'ai.response.model';\n\n/**\n * Call LLM span information\n * Individual LLM call spans\n *\n * The id of the response\n * @see https://ai-sdk.dev/docs/ai-sdk-core/telemetry#call-llm-span-information\n */\nexport const AI_RESPONSE_ID_ATTRIBUTE = 'ai.response.id';\n\n/**\n * Call LLM span information\n * Individual LLM call spans\n *\n * The timestamp of the response\n * @see https://ai-sdk.dev/docs/ai-sdk-core/telemetry#call-llm-span-information\n */\nexport const AI_RESPONSE_TIMESTAMP_ATTRIBUTE = 'ai.response.timestamp';\n\n// =============================================================================\n// BASIC EMBEDDING SPAN INFORMATION\n// =============================================================================\n\n/**\n * Basic embedding span information\n * Embedding spans\n *\n * The number of tokens that were used\n * @see https://ai-sdk.dev/docs/ai-sdk-core/telemetry#basic-embedding-span-information\n */\nexport const AI_USAGE_TOKENS_ATTRIBUTE = 'ai.usage.tokens';\n\n// =============================================================================\n// TOOL CALL SPANS\n// =============================================================================\n\n/**\n * Tool call spans\n * `ai.toolCall` span\n *\n * The name of the tool\n * @see https://ai-sdk.dev/docs/ai-sdk-core/telemetry#tool-call-spans\n */\nexport const AI_TOOL_CALL_NAME_ATTRIBUTE = 'ai.toolCall.name';\n\n/**\n * Tool call spans\n * `ai.toolCall` span\n *\n * The id of the tool call\n * @see https://ai-sdk.dev/docs/ai-sdk-core/telemetry#tool-call-spans\n */\nexport const AI_TOOL_CALL_ID_ATTRIBUTE = 'ai.toolCall.id';\n\n/**\n * Tool call spans\n * `ai.toolCall` span\n *\n * The parameters of the tool call\n * @see https://ai-sdk.dev/docs/ai-sdk-core/telemetry#tool-call-spans\n */\nexport const AI_TOOL_CALL_ARGS_ATTRIBUTE = 'ai.toolCall.args';\n\n/**\n * Tool call spans\n * `ai.toolCall` span\n *\n * The result of the tool call\n * @see https://ai-sdk.dev/docs/ai-sdk-core/telemetry#tool-call-spans\n */\nexport const AI_TOOL_CALL_RESULT_ATTRIBUTE = 'ai.toolCall.result';\n\n// =============================================================================\n// PROVIDER METADATA\n// =============================================================================\n\n/**\n * OpenAI Provider Metadata\n * @see https://ai-sdk.dev/providers/ai-sdk-providers/openai\n * @see https://github.com/vercel/ai/blob/65e042afde6aad4da9d7a62526ece839eb34f9a5/packages/openai/src/openai-chat-language-model.ts#L397-L416\n * @see https://github.com/vercel/ai/blob/65e042afde6aad4da9d7a62526ece839eb34f9a5/packages/openai/src/responses/openai-responses-language-model.ts#L377C7-L384\n */\nexport interface OpenAiProviderMetadata {\n  /**\n   * The number of predicted output tokens that were accepted.\n   * @see https://ai-sdk.dev/providers/ai-sdk-providers/openai#predicted-outputs\n   */\n  acceptedPredictionTokens?: number;\n\n  /**\n   * The number of predicted output tokens that were rejected.\n   * @see https://ai-sdk.dev/providers/ai-sdk-providers/openai#predicted-outputs\n   */\n  rejectedPredictionTokens?: number;\n\n  /**\n   * The number of reasoning tokens that the model generated.\n   * @see https://ai-sdk.dev/providers/ai-sdk-providers/openai#responses-models\n   */\n  reasoningTokens?: number;\n\n  /**\n   * The number of prompt tokens that were a cache hit.\n   * @see https://ai-sdk.dev/providers/ai-sdk-providers/openai#responses-models\n   */\n  cachedPromptTokens?: number;\n\n  /**\n   * @see https://ai-sdk.dev/providers/ai-sdk-providers/openai#responses-models\n   *\n   * The ID of the response. Can be used to continue a conversation.\n   */\n  responseId?: string;\n}\n\n/**\n * Anthropic Provider Metadata\n * @see https://ai-sdk.dev/providers/ai-sdk-providers/anthropic\n * @see https://github.com/vercel/ai/blob/65e042afde6aad4da9d7a62526ece839eb34f9a5/packages/anthropic/src/anthropic-messages-language-model.ts#L346-L352\n */\ninterface AnthropicProviderMetadata {\n  /**\n   * The number of tokens that were used to create the cache.\n   * @see https://ai-sdk.dev/providers/ai-sdk-providers/anthropic#cache-control\n   */\n  cacheCreationInputTokens?: number;\n\n  /**\n   * The number of tokens that were read from the cache.\n   * @see https://ai-sdk.dev/providers/ai-sdk-providers/anthropic#cache-control\n   */\n  cacheReadInputTokens?: number;\n\n  /**\n   * Usage metrics for the Anthropic model.\n   */\n  usage?: {\n    input_tokens: number;\n    cache_creation_input_tokens?: number;\n    cache_read_input_tokens?: number;\n    cache_creation?: {\n      ephemeral_5m_input_tokens?: number;\n      ephemeral_1h_input_tokens?: number;\n    };\n    output_tokens?: number;\n    service_tier?: string;\n  };\n}\n\n/**\n * Amazon Bedrock Provider Metadata\n * @see https://ai-sdk.dev/providers/ai-sdk-providers/amazon-bedrock\n * @see https://github.com/vercel/ai/blob/65e042afde6aad4da9d7a62526ece839eb34f9a5/packages/amazon-bedrock/src/bedrock-chat-language-model.ts#L263-L280\n */\ninterface AmazonBedrockProviderMetadata {\n  /**\n   * @see https://docs.aws.amazon.com/bedrock/latest/APIReference/API_runtime_ConverseTrace.html\n   */\n  trace?: {\n    /**\n     * The guardrail trace object.\n     * @see https://docs.aws.amazon.com/bedrock/latest/APIReference/API_runtime_GuardrailTraceAssessment.html\n     *\n     * This was purposely left as unknown as it's a complex object. This can be typed in the future\n     * if the SDK decides to support bedrock in a more advanced way.\n     */\n    guardrail?: unknown;\n    /**\n     * The request's prompt router.\n     * @see https://docs.aws.amazon.com/bedrock/latest/APIReference/API_runtime_PromptRouterTrace.html\n     */\n    promptRouter?: {\n      /**\n       * The ID of the invoked model.\n       */\n      invokedModelId?: string;\n    };\n  };\n  usage?: {\n    /**\n     * The number of tokens that were read from the cache.\n     * @see https://ai-sdk.dev/providers/ai-sdk-providers/amazon-bedrock#cache-points\n     */\n    cacheReadInputTokens?: number;\n\n    /**\n     * The number of tokens that were written to the cache.\n     * @see https://ai-sdk.dev/providers/ai-sdk-providers/amazon-bedrock#cache-points\n     */\n    cacheWriteInputTokens?: number;\n  };\n}\n\n/**\n * Google Generative AI Provider Metadata\n * @see https://ai-sdk.dev/providers/ai-sdk-providers/google-generative-ai\n */\nexport interface GoogleGenerativeAIProviderMetadata {\n  /**\n   * @see https://github.com/vercel/ai/blob/65e042afde6aad4da9d7a62526ece839eb34f9a5/packages/google/src/google-generative-ai-prompt.ts#L28-L30\n   */\n  groundingMetadata: null | {\n    /**\n     * Array of search queries used to retrieve information\n     * @example [\"What's the weather in Chicago this weekend?\"]\n     *\n     * @see https://ai-sdk.dev/providers/ai-sdk-providers/google-generative-ai#search-grounding\n     */\n    webSearchQueries: string[] | null;\n    /**\n     * Contains the main search result content used as an entry point\n     * The `renderedContent` field contains the formatted content\n     * @see https://ai-sdk.dev/providers/ai-sdk-providers/google-generative-ai#search-grounding\n     */\n    searchEntryPoint?: {\n      renderedContent: string;\n    } | null;\n    /**\n     * Contains details about how specific response parts are supported by search results\n     * @see https://ai-sdk.dev/providers/ai-sdk-providers/google-generative-ai#search-grounding\n     */\n    groundingSupports: Array<{\n      /**\n       * Information about the grounded text segment.\n       */\n      segment: {\n        /**\n         * The start index of the text segment.\n         */\n        startIndex?: number | null;\n        /**\n         * The end index of the text segment.\n         */\n        endIndex?: number | null;\n        /**\n         * The actual text segment.\n         */\n        text?: string | null;\n      };\n      /**\n       * References to supporting search result chunks.\n       */\n      groundingChunkIndices?: number[] | null;\n      /**\n       * Confidence scores (0-1) for each supporting chunk.\n       */\n      confidenceScores?: number[] | null;\n    }> | null;\n  };\n  /**\n   * @see https://github.com/vercel/ai/blob/65e042afde6aad4da9d7a62526ece839eb34f9a5/packages/google/src/google-generative-ai-language-model.ts#L620-L627\n   * @see https://cloud.google.com/vertex-ai/generative-ai/docs/multimodal/configure-safety-filters\n   */\n  safetyRatings?: null | unknown;\n\n  /**\n   * Raw token usage returned by the Gemini API. Reasoning (\"thoughts\") tokens are reported here in\n   * `thoughtsTokenCount`, separately from the candidate output count, so they have to be added back\n   * into `gen_ai.usage.output_tokens`.\n   * @see https://ai.google.dev/api/generate-content#UsageMetadata\n   * @see https://github.com/vercel/ai/blob/main/packages/google/src/google-language-model.ts\n   */\n  usageMetadata?: null | {\n    promptTokenCount?: number;\n    candidatesTokenCount?: number;\n    thoughtsTokenCount?: number;\n    totalTokenCount?: number;\n  };\n}\n\n/**\n * DeepSeek Provider Metadata\n * @see https://ai-sdk.dev/providers/ai-sdk-providers/deepseek\n */\ninterface DeepSeekProviderMetadata {\n  /**\n   * The number of tokens that were cache hits.\n   * @see https://ai-sdk.dev/providers/ai-sdk-providers/deepseek#cache-token-usage\n   */\n  promptCacheHitTokens?: number;\n\n  /**\n   * The number of tokens that were cache misses.\n   * @see https://ai-sdk.dev/providers/ai-sdk-providers/deepseek#cache-token-usage\n   */\n  promptCacheMissTokens?: number;\n}\n\n/**\n * Perplexity Provider Metadata\n * @see https://ai-sdk.dev/providers/ai-sdk-providers/perplexity\n */\ninterface PerplexityProviderMetadata {\n  /**\n   * Object containing citationTokens and numSearchQueries metrics\n   */\n  usage?: {\n    citationTokens?: number;\n    numSearchQueries?: number;\n  };\n  /**\n   * Array of image URLs when return_images is enabled.\n   *\n   * You can enable image responses by setting return_images: true in the provider options.\n   * This feature is only available to Perplexity Tier-2 users and above.\n   */\n  images?: Array<{\n    imageUrl?: string;\n    originUrl?: string;\n    height?: number;\n    width?: number;\n  }>;\n}\n\nexport interface ProviderMetadata {\n  openai?: OpenAiProviderMetadata;\n  azure?: OpenAiProviderMetadata; // v6: Azure Responses API uses 'azure' key instead of 'openai'\n  anthropic?: AnthropicProviderMetadata;\n  bedrock?: AmazonBedrockProviderMetadata;\n  google?: GoogleGenerativeAIProviderMetadata;\n  vertex?: GoogleGenerativeAIProviderMetadata; // v6: Google Vertex uses 'vertex' key instead of 'google'\n  deepseek?: DeepSeekProviderMetadata;\n  perplexity?: PerplexityProviderMetadata;\n}\n","/**\n * The provider value for the `gen_ai.provider.name` attribute.\n * @see https://developers.cloudflare.com/workers-ai/\n */\nexport const WORKERS_AI_PROVIDER_NAME = 'cloudflare.workers_ai';\n\n/**\n * The Sentry origin for spans created by the Workers AI instrumentation.\n */\nexport const WORKERS_AI_ORIGIN = 'auto.ai.cloudflare.workers_ai';\n\n/**\n * The key used to register this provider in the AI provider skip registry.\n *\n * @see `_INTERNAL_skipAiProviderWrapping`\n */\nexport const WORKERS_AI_INTEGRATION_NAME = 'WorkersAI' as const;\n","import { SPAN_STATUS_ERROR } from '../../tracing';\nimport { startSpan, startSpanManual } from '../../tracing/trace';\nimport type { Span } from '../../types/span';\nimport { _INTERNAL_shouldSkipAiProviderWrapping } from '../../utils/ai/providerSkip';\nimport { isObjectLike } from '../../utils/is';\nimport { resolveAIRecordingOptions, shouldEnableTruncation } from '../ai/utils';\nimport { WORKERS_AI_INTEGRATION_NAME } from './constants';\nimport { instrumentWorkersAiStream } from './streaming';\nimport type { WorkersAiOptions } from './types';\nimport { addRequestAttributes, addResponseAttributes, extractRequestAttributes, getOperationName } from './utils';\n\n// Adapted from /server-utils/src/vercel-ai/util.ts\n// TODO(v11): Reuse this function once this gets moved to @sentry/server-utils\n// Workers AI streaming responses are SSE byte streams, so we narrow to `Uint8Array`.\nfunction isReadableStream(value: unknown): value is ReadableStream<Uint8Array> {\n  return (\n    isObjectLike(value) &&\n    typeof (value as { pipeThrough?: unknown }).pipeThrough === 'function' &&\n    typeof (value as { getReader?: unknown }).getReader === 'function'\n  );\n}\n\n/**\n * Wrap the `run` method of the Workers AI binding with Sentry tracing.\n */\nfunction instrumentRun(\n  originalRun: (...args: unknown[]) => Promise<unknown>,\n  context: unknown,\n  options: WorkersAiOptions & Required<Pick<WorkersAiOptions, 'recordInputs' | 'recordOutputs'>>,\n): (...args: unknown[]) => Promise<unknown> {\n  return function instrumentedRun(...args: unknown[]): Promise<unknown> {\n    // When another integration (e.g. Vercel AI via `workers-ai-provider`) is driving this binding,\n    // it records the spans itself and marks this provider as skipped; skip here to avoid double spans.\n    if (_INTERNAL_shouldSkipAiProviderWrapping(WORKERS_AI_INTEGRATION_NAME)) {\n      return originalRun.apply(context, args);\n    }\n\n    const [model, inputs, runOptions] = args as [unknown, unknown, Record<string, unknown> | undefined];\n\n    const operationName = getOperationName(inputs);\n    const requestAttributes = extractRequestAttributes(model, inputs, operationName);\n    const modelName = typeof model === 'string' ? model : 'unknown';\n\n    const isStreamRequested =\n      !!inputs && typeof inputs === 'object' && (inputs as { stream?: unknown }).stream === true;\n    const returnsRawResponse =\n      !!runOptions &&\n      typeof runOptions === 'object' &&\n      (runOptions.returnRawResponse === true || runOptions.websocket === true);\n\n    const spanConfig = {\n      name: `${operationName} ${modelName}`,\n      op: `gen_ai.${operationName}`,\n      attributes: requestAttributes,\n    };\n\n    if (isStreamRequested && !returnsRawResponse) {\n      return startSpanManual(spanConfig, (span: Span) => {\n        // `startSpanManual` does not auto-end the span, so we must end it on every exit path,\n        // including a synchronous throw from `run`.\n        const handleError = (error: unknown): never => {\n          span.setStatus({ code: SPAN_STATUS_ERROR, message: 'internal_error' });\n          span.end();\n          throw error;\n        };\n\n        let originalResult: Promise<unknown>;\n\n        try {\n          originalResult = originalRun.apply(context, args) as Promise<unknown>;\n        } catch (error) {\n          return handleError(error);\n        }\n\n        if (options.recordInputs) {\n          addRequestAttributes(span, inputs, operationName, shouldEnableTruncation(options.enableTruncation));\n        }\n\n        return originalResult.then(result => {\n          if (isReadableStream(result)) {\n            return instrumentWorkersAiStream(result, span, options.recordOutputs);\n          }\n\n          // The model did not actually return a stream — finalize the span eagerly.\n          addResponseAttributes(span, result, options.recordOutputs);\n          span.end();\n          return result;\n        }, handleError);\n      });\n    }\n\n    return startSpan(spanConfig, (span: Span) => {\n      const originalResult = originalRun.apply(context, args) as Promise<unknown>;\n\n      if (options.recordInputs) {\n        addRequestAttributes(span, inputs, operationName, shouldEnableTruncation(options.enableTruncation));\n      }\n\n      return originalResult.then(result => {\n        if (!returnsRawResponse) {\n          addResponseAttributes(span, result, options.recordOutputs);\n        }\n        return result;\n      });\n    });\n  };\n}\n\n/**\n * Instrument a Cloudflare Workers AI binding (`env.AI`) with Sentry tracing.\n *\n * This wraps the binding's `run` method to create `gen_ai` spans following the\n * Sentry AI Agents conventions. All other methods are passed through untouched.\n *\n * In `@sentry/cloudflare`, the `env.AI` binding is instrumented automatically —\n * wrapping manually is only needed to pass custom options.\n *\n * @example\n * ```javascript\n * const ai = Sentry.instrumentWorkersAiClient(env.AI, { recordInputs: true, recordOutputs: true });\n * const result = await ai.run('@cf/meta/llama-3.1-8b-instruct', { prompt: 'Hello' });\n * ```\n */\nexport function instrumentWorkersAiClient<T extends object>(client: T, options?: WorkersAiOptions): T {\n  const resolvedOptions = resolveAIRecordingOptions(options);\n\n  const instrumented = new Proxy(client, {\n    get(target: object, prop: string | symbol, receiver: unknown): unknown {\n      const value = Reflect.get(target, prop, receiver);\n\n      if (prop === 'run' && typeof value === 'function') {\n        return instrumentRun(value as (...args: unknown[]) => Promise<unknown>, target, resolvedOptions);\n      }\n\n      // Bind passed-through functions to the original target to preserve `this` (e.g. private fields).\n      return typeof value === 'function' ? (value as (...args: unknown[]) => unknown).bind(target) : value;\n    },\n  }) as T;\n\n  return instrumented;\n}\n","import { SPAN_STATUS_ERROR } from '../../tracing';\nimport type { Span } from '../../types/span';\nimport { endStreamSpan, type StreamResponseState } from '../ai/utils';\nimport type { WorkersAiUsage } from './types';\nimport { setOutputMessagesAttribute } from './utils';\n\ninterface WorkersAiStreamingToolCall {\n  index?: number;\n  id?: string;\n  type?: string;\n  function?: { name?: string; arguments?: string };\n  // Some Workers AI models stream tool calls with the name/arguments at the top\n  // level of the tool-call object instead of nested under `function`.\n  name?: string;\n  arguments?: string;\n}\n\ninterface WorkersAiStreamChunk {\n  // Native Workers AI streaming shape (`env.AI.run` with `stream: true`).\n  response?: unknown;\n  tool_calls?: unknown[];\n  // OpenAI-compatible streaming shape emitted for models routed through the\n  // OpenAI-compatible endpoint (e.g. via `workers-ai-provider`).\n  choices?: Array<{\n    delta?: { content?: unknown; tool_calls?: WorkersAiStreamingToolCall[] };\n    finish_reason?: unknown;\n  }>;\n  usage?: WorkersAiUsage & { prompt_tokens?: number; completion_tokens?: number; total_tokens?: number };\n}\n\n/**\n * Accumulate a fragmented OpenAI-compatible tool call (delivered across multiple\n * `choices[].delta.tool_calls` chunks) into the index-keyed accumulator.\n */\nfunction accumulateStreamingToolCalls(\n  toolCalls: WorkersAiStreamingToolCall[],\n  accumulator: Record<number, WorkersAiStreamingToolCall>,\n): void {\n  for (const toolCall of toolCalls) {\n    // Normalize both shapes: name/arguments nested under `function`, or at the top level.\n    const name = toolCall.function?.name ?? toolCall.name;\n    const args = toolCall.function?.arguments ?? toolCall.arguments;\n\n    // A tool call must carry at least a name or argument fragment to be meaningful.\n    if (name == null && args == null) {\n      continue;\n    }\n\n    const index = toolCall.index ?? 0;\n    const existing = accumulator[index];\n\n    if (!existing) {\n      accumulator[index] = {\n        index,\n        id: toolCall.id,\n        type: toolCall.type,\n        function: {\n          name,\n          arguments: args ?? '',\n        },\n      };\n    } else if (existing.function) {\n      if (name && !existing.function.name) {\n        existing.function.name = name;\n      }\n      if (args) {\n        existing.function.arguments = `${existing.function.arguments ?? ''}${args}`;\n      }\n    }\n  }\n}\n\n/**\n * Parse a single SSE line (`data: {...}`) and accumulate its data into the streaming state.\n *\n * Handles both the native Workers AI shape (top-level `response`/`tool_calls`) and the\n * OpenAI-compatible shape (`choices[].delta.content`/`choices[].delta.tool_calls`), because\n * the same `run()` call transparently yields either format depending on the model.\n */\nfunction processLine(\n  line: string,\n  state: StreamResponseState,\n  recordOutputs: boolean,\n  toolCallAccumulator: Record<number, WorkersAiStreamingToolCall>,\n): void {\n  const trimmed = line.trim();\n  if (!trimmed.startsWith('data:')) {\n    return;\n  }\n\n  const data = trimmed.slice('data:'.length).trim();\n  if (!data || data === '[DONE]') {\n    return;\n  }\n\n  let parsed: WorkersAiStreamChunk;\n  try {\n    parsed = JSON.parse(data) as WorkersAiStreamChunk;\n  } catch {\n    return;\n  }\n\n  if (parsed.usage) {\n    if (typeof parsed.usage.prompt_tokens === 'number') {\n      state.promptTokens = parsed.usage.prompt_tokens;\n    }\n    if (typeof parsed.usage.completion_tokens === 'number') {\n      state.completionTokens = parsed.usage.completion_tokens;\n    }\n    if (typeof parsed.usage.total_tokens === 'number') {\n      state.totalTokens = parsed.usage.total_tokens;\n    }\n  }\n\n  if (recordOutputs && typeof parsed.response === 'string') {\n    state.responseTexts.push(parsed.response);\n  }\n\n  if (recordOutputs && Array.isArray(parsed.tool_calls) && parsed.tool_calls.length > 0) {\n    state.toolCalls.push(...parsed.tool_calls);\n  }\n\n  if (Array.isArray(parsed.choices)) {\n    for (const choice of parsed.choices) {\n      if (recordOutputs && typeof choice.delta?.content === 'string' && choice.delta.content) {\n        state.responseTexts.push(choice.delta.content);\n      }\n      if (recordOutputs && Array.isArray(choice.delta?.tool_calls)) {\n        accumulateStreamingToolCalls(choice.delta.tool_calls, toolCallAccumulator);\n      }\n      if (typeof choice.finish_reason === 'string') {\n        state.finishReasons.push(choice.finish_reason);\n      }\n    }\n  }\n}\n\n/**\n * Wrap a Workers AI streaming response (a server-sent-events `ReadableStream`) so we can\n * accumulate the response text and token usage while passing the original bytes through untouched.\n *\n * The span is ended once the consumer finishes reading (or cancels) the stream.\n */\nexport function instrumentWorkersAiStream(\n  stream: ReadableStream<Uint8Array>,\n  span: Span,\n  recordOutputs: boolean,\n): ReadableStream<Uint8Array> {\n  const reader = stream.getReader();\n  const decoder = new TextDecoder();\n\n  const state: StreamResponseState = {\n    responseId: '',\n    responseModel: '',\n    finishReasons: [],\n    responseTexts: [],\n    toolCalls: [],\n    promptTokens: undefined,\n    completionTokens: undefined,\n    totalTokens: undefined,\n  };\n\n  // OpenAI-compatible tool calls arrive fragmented across chunks and are keyed by index;\n  // accumulate them here and flatten into `state.toolCalls` once the stream ends.\n  const toolCallAccumulator: Record<number, WorkersAiStreamingToolCall> = {};\n\n  let buffer = '';\n  let spanEnded = false;\n\n  const finish = (): void => {\n    if (spanEnded) {\n      return;\n    }\n    spanEnded = true;\n\n    if (recordOutputs) {\n      const accumulatedToolCalls = Object.values(toolCallAccumulator);\n      if (accumulatedToolCalls.length > 0) {\n        state.toolCalls.push(...accumulatedToolCalls);\n      }\n\n      // Set the authoritative `gen_ai.output.messages` alongside the deprecated response\n      // attributes `endStreamSpan` writes, so tool calls survive Relay's lossy migration.\n      setOutputMessagesAttribute(span, {\n        responseText: state.responseTexts.join(''),\n        toolCalls: state.toolCalls,\n      });\n    }\n\n    endStreamSpan(span, state, recordOutputs);\n  };\n\n  const flushBuffer = (isDone: boolean): void => {\n    const lines = buffer.split('\\n');\n    // Keep the last (potentially incomplete) line in the buffer unless the stream is done.\n    buffer = isDone ? '' : (lines.pop() ?? '');\n    for (const line of lines) {\n      processLine(line, state, recordOutputs, toolCallAccumulator);\n    }\n  };\n\n  return new ReadableStream<Uint8Array>({\n    async pull(controller) {\n      try {\n        const { done, value } = await reader.read();\n\n        if (done) {\n          buffer += decoder.decode();\n          flushBuffer(true);\n          finish();\n          controller.close();\n          return;\n        }\n\n        buffer += decoder.decode(value, { stream: true });\n        flushBuffer(false);\n        controller.enqueue(value);\n      } catch (error) {\n        span.setStatus({ code: SPAN_STATUS_ERROR, message: 'internal_error' });\n        finish();\n        controller.error(error);\n      }\n    },\n    async cancel(reason) {\n      finish();\n      await reader.cancel(reason);\n    },\n  });\n}\n","import {\n  GEN_AI_EMBEDDINGS_INPUT,\n  GEN_AI_INPUT_MESSAGES,\n  GEN_AI_OPERATION_NAME,\n  GEN_AI_REQUEST_FREQUENCY_PENALTY,\n  GEN_AI_REQUEST_MAX_TOKENS,\n  GEN_AI_REQUEST_MODEL,\n  GEN_AI_REQUEST_PRESENCE_PENALTY,\n  GEN_AI_REQUEST_TEMPERATURE,\n  GEN_AI_REQUEST_TOP_K,\n  GEN_AI_REQUEST_TOP_P,\n  GEN_AI_PROVIDER_NAME,\n  GEN_AI_SYSTEM_INSTRUCTIONS,\n} from '@sentry/conventions/attributes';\nimport { SEMANTIC_ATTRIBUTE_SENTRY_ORIGIN } from '../../semanticAttributes';\nimport type { Span, SpanAttributeValue } from '../../types/span';\nimport {\n  GEN_AI_INPUT_MESSAGES_ORIGINAL_LENGTH_ATTRIBUTE,\n  GEN_AI_OUTPUT_MESSAGES_ATTRIBUTE,\n  GEN_AI_REQUEST_STREAM_ATTRIBUTE,\n  GEN_AI_RESPONSE_TEXT_ATTRIBUTE,\n  GEN_AI_RESPONSE_TOOL_CALLS_ATTRIBUTE,\n} from '../ai/gen-ai-attributes';\nimport { extractSystemInstructions, getTruncatedJsonString, setTokenUsageAttributes } from '../ai/utils';\nimport { stringify } from '../../utils/string';\nimport { WORKERS_AI_ORIGIN, WORKERS_AI_PROVIDER_NAME } from './constants';\nimport type { WorkersAiInput, WorkersAiOutput } from './types';\n\n/**\n * Determine the gen_ai operation name from the inputs passed to `AI.run`.\n * Workers AI exposes a single `run` method, so we infer the operation from the input shape.\n */\nexport function getOperationName(inputs: unknown): string {\n  if (inputs && typeof inputs === 'object') {\n    if ('messages' in inputs || 'prompt' in inputs) {\n      return 'chat';\n    }\n    if ('text' in inputs) {\n      return 'embeddings';\n    }\n  }\n  return 'chat';\n}\n\n/**\n * Extract the request attributes (model, request parameters, system, origin) from a `run` call.\n */\nexport function extractRequestAttributes(\n  model: unknown,\n  inputs: unknown,\n  operationName: string,\n): Record<string, SpanAttributeValue> {\n  const attributes: Record<string, SpanAttributeValue> = {\n    [GEN_AI_PROVIDER_NAME]: WORKERS_AI_PROVIDER_NAME,\n    [GEN_AI_OPERATION_NAME]: operationName,\n    [SEMANTIC_ATTRIBUTE_SENTRY_ORIGIN]: WORKERS_AI_ORIGIN,\n    [GEN_AI_REQUEST_MODEL]: typeof model === 'string' ? model : 'unknown',\n  };\n\n  if (inputs && typeof inputs === 'object') {\n    const params = inputs as WorkersAiInput;\n\n    if (typeof params.temperature === 'number') {\n      attributes[GEN_AI_REQUEST_TEMPERATURE] = params.temperature;\n    }\n    if (typeof params.max_tokens === 'number') {\n      attributes[GEN_AI_REQUEST_MAX_TOKENS] = params.max_tokens;\n    }\n    if (typeof params.top_p === 'number') {\n      attributes[GEN_AI_REQUEST_TOP_P] = params.top_p;\n    }\n    if (typeof params.top_k === 'number') {\n      attributes[GEN_AI_REQUEST_TOP_K] = params.top_k;\n    }\n    if (typeof params.frequency_penalty === 'number') {\n      attributes[GEN_AI_REQUEST_FREQUENCY_PENALTY] = params.frequency_penalty;\n    }\n    if (typeof params.presence_penalty === 'number') {\n      attributes[GEN_AI_REQUEST_PRESENCE_PENALTY] = params.presence_penalty;\n    }\n    if (params.stream === true) {\n      attributes[GEN_AI_REQUEST_STREAM_ATTRIBUTE] = true;\n    }\n  }\n\n  return attributes;\n}\n\n/**\n * Record the request inputs (messages/prompt/embeddings input) on the span.\n * Only called when `recordInputs` is enabled.\n */\nexport function addRequestAttributes(\n  span: Span,\n  inputs: unknown,\n  operationName: string,\n  enableTruncation: boolean,\n): void {\n  if (!inputs || typeof inputs !== 'object') {\n    return;\n  }\n  const params = inputs as WorkersAiInput;\n\n  // Store embeddings input on a separate attribute and do not truncate it\n  if (operationName === 'embeddings') {\n    const text = params.text;\n\n    if (text == null || (typeof text === 'string' && text.length === 0) || (Array.isArray(text) && text.length === 0)) {\n      return;\n    }\n\n    span.setAttribute(GEN_AI_EMBEDDINGS_INPUT, typeof text === 'string' ? text : JSON.stringify(text));\n    return;\n  }\n\n  const src = params.messages ?? params.prompt;\n\n  if (src == null || (Array.isArray(src) && src.length === 0)) {\n    return;\n  }\n\n  const { systemInstructions, filteredMessages } = extractSystemInstructions(src);\n\n  if (systemInstructions) {\n    span.setAttribute(GEN_AI_SYSTEM_INSTRUCTIONS, systemInstructions);\n  }\n\n  span.setAttribute(\n    GEN_AI_INPUT_MESSAGES,\n    enableTruncation ? getTruncatedJsonString(filteredMessages) : stringify(filteredMessages),\n  );\n\n  span.setAttribute(\n    GEN_AI_INPUT_MESSAGES_ORIGINAL_LENGTH_ATTRIBUTE,\n    Array.isArray(filteredMessages) ? filteredMessages.length : 1,\n  );\n}\n\n/**\n * Build the `gen_ai.output.messages` value (a single assistant message with text and/or\n * tool-call parts) from the response text and tool calls.\n *\n * We set this in addition to the deprecated `gen_ai.response.text` / `gen_ai.response.tool_calls`\n * attributes because Sentry's product reads the model output from `gen_ai.output.messages` first.\n * Relay migrates `gen_ai.response.text` into `gen_ai.output.messages`, but the tool-calls half of\n * that migration is lossy — so tool-call turns would otherwise render an empty Output. Emitting the\n * normalized message here (mirroring the Vercel AI integration) keeps tool calls visible.\n */\nexport function setOutputMessagesAttribute(\n  span: Span,\n  { responseText, toolCalls }: { responseText?: string; toolCalls?: unknown[] },\n): void {\n  const parts: Array<Record<string, unknown>> = [];\n\n  if (typeof responseText === 'string' && responseText.length > 0) {\n    parts.push({ type: 'text', content: responseText });\n  }\n\n  if (Array.isArray(toolCalls)) {\n    for (const toolCall of toolCalls) {\n      if (!toolCall || typeof toolCall !== 'object') {\n        continue;\n      }\n      const call = toolCall as {\n        id?: unknown;\n        function?: { name?: unknown; arguments?: unknown };\n        name?: unknown;\n        arguments?: unknown;\n      };\n      // Normalize both the OpenAI-compatible shape (name/arguments nested under `function`)\n      // and the native Workers AI shape (name/arguments at the top level).\n      const name = call.function?.name ?? call.name;\n      const args = call.function?.arguments ?? call.arguments;\n      parts.push({\n        type: 'tool_call',\n        id: call.id,\n        name,\n        arguments: typeof args === 'string' ? args : JSON.stringify(args ?? {}),\n      });\n    }\n  }\n\n  if (parts.length > 0) {\n    span.setAttribute(GEN_AI_OUTPUT_MESSAGES_ATTRIBUTE, JSON.stringify([{ role: 'assistant', parts }]));\n  }\n}\n\n/**\n * Record the response attributes (token usage, response text, tool calls) on the span.\n */\nexport function addResponseAttributes(span: Span, result: unknown, recordOutputs: boolean): void {\n  if (\n    !result ||\n    typeof result !== 'object' ||\n    // Raw `Response` objects (from `returnRawResponse`/`websocket`) cannot be introspected without consuming them.\n    (typeof Response !== 'undefined' && result instanceof Response)\n  ) {\n    return;\n  }\n\n  const response = result as WorkersAiOutput;\n\n  if (response.usage) {\n    setTokenUsageAttributes(span, response.usage.prompt_tokens, response.usage.completion_tokens);\n  }\n\n  if (recordOutputs) {\n    let responseText: string | undefined;\n    if (typeof response.response === 'string') {\n      responseText = response.response;\n      span.setAttribute(GEN_AI_RESPONSE_TEXT_ATTRIBUTE, response.response);\n    } else if (response.response != null) {\n      responseText = JSON.stringify(response.response);\n      span.setAttribute(GEN_AI_RESPONSE_TEXT_ATTRIBUTE, responseText);\n    }\n\n    const toolCalls =\n      Array.isArray(response.tool_calls) && response.tool_calls.length > 0 ? response.tool_calls : undefined;\n    if (toolCalls) {\n      span.setAttribute(GEN_AI_RESPONSE_TOOL_CALLS_ATTRIBUTE, JSON.stringify(toolCalls));\n    }\n\n    setOutputMessagesAttribute(span, { responseText, toolCalls });\n  }\n}\n","import { DEBUG_BUILD } from '../debug-build';\nimport type { EventDropReason } from '../types/clientreport';\nimport type { Envelope, EnvelopeItem } from '../types/envelope';\nimport type {\n  InternalBaseTransportOptions,\n  Transport,\n  TransportMakeRequestResponse,\n  TransportRequestExecutor,\n} from '../types/transport';\nimport { debug } from '../utils/debug-logger';\nimport {\n  createEnvelope,\n  envelopeContainsItemType,\n  envelopeItemTypeToDataCategory,\n  forEachEnvelopeItem,\n  serializeEnvelope,\n} from '../utils/envelope';\nimport { makePromiseBuffer, type PromiseBuffer, SENTRY_BUFFER_FULL_ERROR } from '../utils/promisebuffer';\nimport { isRateLimited, type RateLimits, updateRateLimits } from '../utils/ratelimit';\n\nexport const DEFAULT_TRANSPORT_BUFFER_SIZE = 64;\n\n/**\n * Creates an instance of a Sentry `Transport`\n *\n * @param options\n * @param makeRequest\n */\nexport function createTransport(\n  options: InternalBaseTransportOptions,\n  makeRequest: TransportRequestExecutor,\n  buffer: PromiseBuffer<TransportMakeRequestResponse> = makePromiseBuffer(\n    options.bufferSize || DEFAULT_TRANSPORT_BUFFER_SIZE,\n  ),\n): Transport {\n  let rateLimits: RateLimits = {};\n  const flush = (timeout?: number): PromiseLike<boolean> => buffer.drain(timeout);\n\n  function send(envelope: Envelope): PromiseLike<TransportMakeRequestResponse> {\n    const filteredEnvelopeItems: EnvelopeItem[] = [];\n\n    // Drop rate limited items from envelope\n    forEachEnvelopeItem(envelope, (item, type) => {\n      const dataCategory = envelopeItemTypeToDataCategory(type);\n      if (isRateLimited(rateLimits, dataCategory)) {\n        options.recordDroppedEvent('ratelimit_backoff', dataCategory);\n      } else {\n        filteredEnvelopeItems.push(item);\n      }\n    });\n\n    // Skip sending if envelope is empty after filtering out rate limited events\n    if (filteredEnvelopeItems.length === 0) {\n      return Promise.resolve({});\n    }\n\n    const filteredEnvelope: Envelope = createEnvelope(envelope[0], filteredEnvelopeItems as (typeof envelope)[1]);\n\n    // Creates client report for each item in an envelope\n    const recordEnvelopeLoss = (reason: EventDropReason): void => {\n      // Don't record outcomes for client reports - we don't want to create a feedback loop if client reports themselves fail to send\n      if (envelopeContainsItemType(filteredEnvelope, ['client_report'])) {\n        DEBUG_BUILD && debug.warn(`Dropping client report. Will not send outcomes (reason: ${reason}).`);\n        return;\n      }\n      forEachEnvelopeItem(filteredEnvelope, (item, type) => {\n        options.recordDroppedEvent(reason, envelopeItemTypeToDataCategory(type));\n      });\n    };\n\n    const requestTask = (): PromiseLike<TransportMakeRequestResponse> =>\n      makeRequest({ body: serializeEnvelope(filteredEnvelope) }).then(\n        response => {\n          // Handle 413 Content Too Large\n          // Loss of envelope content is expected so we record a send_error client report\n          // https://develop.sentry.dev/sdk/expected-features/#dealing-with-network-failures\n          if (response.statusCode === 413) {\n            DEBUG_BUILD &&\n              debug.error(\n                'Sentry responded with status code 413. Envelope was discarded due to exceeding size limits.',\n              );\n            recordEnvelopeLoss('send_error');\n            return response;\n          }\n\n          // We don't want to throw on NOK responses, but we want to at least log them\n          if (\n            DEBUG_BUILD &&\n            response.statusCode !== undefined &&\n            (response.statusCode < 200 || response.statusCode >= 300)\n          ) {\n            debug.warn(`Sentry responded with status code ${response.statusCode} to sent event.`);\n          }\n\n          rateLimits = updateRateLimits(rateLimits, response);\n          return response;\n        },\n        error => {\n          recordEnvelopeLoss('network_error');\n          DEBUG_BUILD && debug.error('Encountered error running transport request:', error);\n          throw error;\n        },\n      );\n\n    return buffer.add(requestTask).then(\n      result => result,\n      error => {\n        if (error === SENTRY_BUFFER_FULL_ERROR) {\n          DEBUG_BUILD && debug.error('Skipped sending event because buffer is full.');\n          recordEnvelopeLoss('queue_overflow');\n          return Promise.resolve({});\n        } else {\n          throw error;\n        }\n      },\n    );\n  }\n\n  return {\n    send,\n    flush,\n  };\n}\n","import { getEnvelopeEndpointWithUrlEncodedAuth } from '../api';\nimport type { Envelope, EnvelopeItemType, EventItem } from '../types/envelope';\nimport type { Event } from '../types/event';\nimport type { BaseTransportOptions, Transport, TransportMakeRequestResponse } from '../types/transport';\nimport { dsnFromString } from '../utils/dsn';\nimport { createEnvelope, forEachEnvelopeItem } from '../utils/envelope';\n\ninterface MatchParam {\n  /** The envelope to be sent */\n  envelope: Envelope;\n  /**\n   * A function that returns an event from the envelope if one exists. You can optionally pass an array of envelope item\n   * types to filter by - only envelopes matching the given types will be multiplexed.\n   * Allowed values are: 'event', 'transaction', 'profile', 'replay_event'\n   *\n   * @param types Defaults to ['event']\n   */\n  getEvent(types?: EnvelopeItemType[]): Event | undefined;\n}\n\ntype RouteTo = { dsn: string; release: string };\ntype Matcher = (param: MatchParam) => (string | RouteTo)[];\n\n/**\n * Key used in event.extra to provide routing information for the multiplexed transport.\n * Should contain an array of `{ dsn: string, release?: string }` objects.\n */\nexport const MULTIPLEXED_TRANSPORT_EXTRA_KEY = 'MULTIPLEXED_TRANSPORT_EXTRA_KEY';\n\n/**\n * Gets an event from an envelope.\n *\n * This is only exported for use in the tests\n */\nexport function eventFromEnvelope(env: Envelope, types: EnvelopeItemType[]): Event | undefined {\n  let event: Event | undefined;\n\n  forEachEnvelopeItem(env, (item, type) => {\n    if (types.includes(type)) {\n      event = Array.isArray(item) ? (item as EventItem)[1] : undefined;\n    }\n    // bail out if we found an event\n    return !!event;\n  });\n\n  return event;\n}\n\n/**\n * Creates a transport that overrides the release on all events.\n */\nfunction makeOverrideReleaseTransport<TO extends BaseTransportOptions>(\n  createTransport: (options: TO) => Transport,\n  release: string,\n): (options: TO) => Transport {\n  return options => {\n    const transport = createTransport(options);\n\n    return {\n      ...transport,\n      send: async (envelope: Envelope): Promise<TransportMakeRequestResponse> => {\n        const event = eventFromEnvelope(envelope, ['event', 'transaction', 'profile', 'replay_event']);\n\n        if (event) {\n          event.release = release;\n        }\n        return transport.send(envelope);\n      },\n    };\n  };\n}\n\n/** Overrides the DSN in the envelope header  */\nfunction overrideDsn(envelope: Envelope, dsn: string): Envelope {\n  return createEnvelope(\n    dsn\n      ? {\n          ...envelope[0],\n          dsn,\n        }\n      : envelope[0],\n    envelope[1],\n  );\n}\n\n/**\n * Creates a transport that can send events to different DSNs depending on the envelope contents.\n *\n * If no matcher is provided, the transport will look for routing information in\n * `event.extra[MULTIPLEXED_TRANSPORT_EXTRA_KEY]`, which should contain\n * an array of `{ dsn: string, release?: string }` objects.\n */\nexport function makeMultiplexedTransport<TO extends BaseTransportOptions>(\n  createTransport: (options: TO) => Transport,\n  matcher?: Matcher,\n): (options: TO) => Transport {\n  return options => {\n    const fallbackTransport = createTransport(options);\n    const otherTransports: Map<string, Transport> = new Map();\n\n    // Use provided matcher or default to simple multiplexed transport behavior\n    const actualMatcher: Matcher =\n      matcher ||\n      (args => {\n        const event = args.getEvent();\n        if (\n          event?.extra?.[MULTIPLEXED_TRANSPORT_EXTRA_KEY] &&\n          Array.isArray(event.extra[MULTIPLEXED_TRANSPORT_EXTRA_KEY])\n        ) {\n          return event.extra[MULTIPLEXED_TRANSPORT_EXTRA_KEY];\n        }\n        return [];\n      });\n\n    function getTransport(dsn: string, release: string | undefined): [string, Transport] | undefined {\n      // We create a transport for every unique dsn/release combination as there may be code from multiple releases in\n      // use at the same time\n      const key = release ? `${dsn}:${release}` : dsn;\n\n      let transport = otherTransports.get(key);\n\n      if (!transport) {\n        const validatedDsn = dsnFromString(dsn);\n        if (!validatedDsn) {\n          return undefined;\n        }\n        const url = getEnvelopeEndpointWithUrlEncodedAuth(validatedDsn, options.tunnel);\n\n        transport = release\n          ? makeOverrideReleaseTransport(createTransport, release)({ ...options, url })\n          : createTransport({ ...options, url });\n\n        otherTransports.set(key, transport);\n      }\n\n      return [dsn, transport];\n    }\n\n    async function send(envelope: Envelope): Promise<TransportMakeRequestResponse> {\n      function getEvent(types?: EnvelopeItemType[]): Event | undefined {\n        const eventTypes: EnvelopeItemType[] = types?.length ? types : ['event'];\n        return eventFromEnvelope(envelope, eventTypes);\n      }\n\n      const transports = actualMatcher({ envelope, getEvent })\n        .map(result => {\n          if (typeof result === 'string') {\n            return getTransport(result, undefined);\n          } else {\n            return getTransport(result.dsn, result.release);\n          }\n        })\n        .filter((t): t is [string, Transport] => !!t);\n\n      // If we have no transports to send to, use the fallback transport\n      // Don't override the DSN in the header for the fallback transport. '' is falsy\n      const transportsWithFallback: [string, Transport][] = transports.length ? transports : [['', fallbackTransport]];\n\n      const results = (await Promise.all(\n        transportsWithFallback.map(([dsn, transport]) => transport.send(overrideDsn(envelope, dsn))),\n      )) as [TransportMakeRequestResponse, ...TransportMakeRequestResponse[]];\n\n      return results[0];\n    }\n\n    async function flush(timeout: number | undefined): Promise<boolean> {\n      const allTransports = [...otherTransports.values(), fallbackTransport];\n      const results = await Promise.all(allTransports.map(transport => transport.flush(timeout)));\n      return results.every(r => r);\n    }\n\n    return {\n      send,\n      flush,\n    };\n  };\n}\n","import type { ClientOptions } from '../types/options';\n\n/**\n * Takes the SDK metadata and adds the user-agent header to the transport options.\n * This ensures that the SDK sends the user-agent header with SDK name and version to\n * all requests made by the transport.\n *\n * @see https://develop.sentry.dev/sdk/overview/#user-agent\n */\nexport function addUserAgentToTransportHeaders(options: ClientOptions): void {\n  const sdkMetadata = options._metadata?.sdk;\n  const sdkUserAgent =\n    sdkMetadata?.name && sdkMetadata?.version ? `${sdkMetadata?.name}/${sdkMetadata?.version}` : undefined;\n\n  options.transportOptions = {\n    ...options.transportOptions,\n    headers: {\n      ...(sdkUserAgent && { 'user-agent': sdkUserAgent }),\n      ...options.transportOptions?.headers,\n    },\n  };\n}\n","import { getClient, withIsolationScope } from './currentScopes';\nimport { captureException } from './exports';\nimport { SEMANTIC_ATTRIBUTE_SENTRY_ORIGIN, SEMANTIC_ATTRIBUTE_SENTRY_SOURCE } from './semanticAttributes';\nimport { startSpanManual } from './tracing';\nimport { normalize } from './utils/normalize';\nimport { setNormalizationDepthOverrideHint } from './utils/normalizationHints';\n\ninterface SentryTrpcMiddlewareOptions {\n  /** Whether to include procedure inputs in reported events. Defaults to `false`. */\n  attachRpcInput?: boolean;\n  forceTransaction?: boolean;\n}\n\nexport interface SentryTrpcMiddlewareArguments<T> {\n  path?: unknown;\n  type?: unknown;\n  next: () => T;\n  rawInput?: unknown;\n  getRawInput?: () => Promise<unknown>;\n}\n\nconst trpcCaptureContext = { mechanism: { handled: false, type: 'auto.rpc.trpc.middleware' } };\n\nfunction captureIfError(nextResult: unknown): void {\n  // TODO: Set span status based on what TRPCError was encountered\n  if (\n    typeof nextResult === 'object' &&\n    nextResult !== null &&\n    'ok' in nextResult &&\n    !nextResult.ok &&\n    'error' in nextResult\n  ) {\n    captureException(nextResult.error, trpcCaptureContext);\n  }\n}\n\ntype SentryTrpcMiddleware<T> = T extends Promise<unknown> ? T : Promise<T>;\n\n/**\n * Sentry tRPC middleware that captures errors and creates spans for tRPC procedures.\n */\nexport function trpcMiddleware(options: SentryTrpcMiddlewareOptions = {}) {\n  // eslint-disable-next-line @typescript-eslint/ban-ts-comment\n  // @ts-ignore\n  return async function <T>(opts: SentryTrpcMiddlewareArguments<T>): SentryTrpcMiddleware<T> {\n    const { path, type, next, rawInput, getRawInput } = opts;\n\n    const client = getClient();\n    const clientOptions = client?.getOptions();\n    const dataCollection = client?.getDataCollectionOptions();\n\n    const trpcContext: Record<string, unknown> = {\n      procedure_path: path,\n      procedure_type: type,\n    };\n\n    setNormalizationDepthOverrideHint(\n      trpcContext,\n      1 + // 1 for context.input + the normal normalization depth\n        (clientOptions?.normalizeDepth ?? 5), // 5 is a sane depth\n    );\n\n    if (\n      options.attachRpcInput !== undefined\n        ? options.attachRpcInput\n        : dataCollection?.httpBodies.includes('incomingRequest')\n    ) {\n      if (rawInput !== undefined) {\n        trpcContext.input = normalize(rawInput);\n      }\n\n      if (getRawInput !== undefined && typeof getRawInput === 'function') {\n        try {\n          const rawRes = await getRawInput();\n\n          trpcContext.input = normalize(rawRes);\n        } catch {\n          // noop\n        }\n      }\n    }\n\n    return withIsolationScope(scope => {\n      scope.setContext('trpc', trpcContext);\n      return startSpanManual(\n        {\n          name: `trpc/${path}`,\n          op: 'rpc.server',\n          attributes: {\n            [SEMANTIC_ATTRIBUTE_SENTRY_SOURCE]: 'route',\n            [SEMANTIC_ATTRIBUTE_SENTRY_ORIGIN]: 'auto.rpc.trpc',\n          },\n          forceTransaction: !!options.forceTransaction,\n        },\n        async span => {\n          try {\n            const nextResult = await next();\n            captureIfError(nextResult);\n            span.end();\n            return nextResult;\n          } catch (e) {\n            captureException(e, trpcCaptureContext);\n            span.end();\n            throw e;\n          }\n        },\n      ) as SentryTrpcMiddleware<T>;\n    });\n  };\n}\n","import type { ExtendedError } from '../types/error';\nimport type { Event, EventHint } from '../types/event';\nimport type { Exception } from '../types/exception';\nimport type { StackParser } from '../types/stacktrace';\nimport { isError } from './is';\n\n/**\n * Creates exceptions inside `event.exception.values` for errors that are nested on properties based on the `key` parameter.\n */\nexport function applyAggregateErrorsToEvent(\n  exceptionFromErrorImplementation: (stackParser: StackParser, ex: Error) => Exception,\n  parser: StackParser,\n  key: string,\n  limit: number,\n  event: Event,\n  hint?: EventHint,\n): void {\n  if (!event.exception?.values || !hint || !isError(hint.originalException)) {\n    return;\n  }\n\n  // Generally speaking the last item in `event.exception.values` is the exception originating from the original Error\n  const originalException: Exception | undefined =\n    event.exception.values.length > 0 ? event.exception.values[event.exception.values.length - 1] : undefined;\n\n  // We only create exception grouping if there is an exception in the event.\n  if (originalException) {\n    event.exception.values = aggregateExceptionsFromError(\n      exceptionFromErrorImplementation,\n      parser,\n      limit,\n      hint.originalException as ExtendedError,\n      key,\n      event.exception.values,\n      originalException,\n      0,\n    );\n  }\n}\n\nfunction aggregateExceptionsFromError(\n  exceptionFromErrorImplementation: (stackParser: StackParser, ex: Error) => Exception,\n  parser: StackParser,\n  limit: number,\n  error: ExtendedError,\n  key: string,\n  prevExceptions: Exception[],\n  exception: Exception,\n  exceptionId: number,\n): Exception[] {\n  if (prevExceptions.length >= limit + 1) {\n    return prevExceptions;\n  }\n\n  let newExceptions = [...prevExceptions];\n\n  // Recursively call this function in order to walk down a chain of errors\n  if (isError(error[key])) {\n    applyExceptionGroupFieldsForParentException(exception, exceptionId, error);\n    const newException = exceptionFromErrorImplementation(parser, error[key]);\n    const newExceptionId = newExceptions.length;\n    applyExceptionGroupFieldsForChildException(newException, key, newExceptionId, exceptionId);\n    newExceptions = aggregateExceptionsFromError(\n      exceptionFromErrorImplementation,\n      parser,\n      limit,\n      error[key] as ExtendedError,\n      key,\n      [newException, ...newExceptions],\n      newException,\n      newExceptionId,\n    );\n  }\n\n  // This will create exception grouping for AggregateErrors\n  // https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/AggregateError\n  if (isExceptionGroup(error)) {\n    error.errors.forEach((childError, i) => {\n      if (isError(childError)) {\n        applyExceptionGroupFieldsForParentException(exception, exceptionId, error);\n        const newException = exceptionFromErrorImplementation(parser, childError);\n        const newExceptionId = newExceptions.length;\n        applyExceptionGroupFieldsForChildException(newException, `errors[${i}]`, newExceptionId, exceptionId);\n        newExceptions = aggregateExceptionsFromError(\n          exceptionFromErrorImplementation,\n          parser,\n          limit,\n          childError as ExtendedError,\n          key,\n          [newException, ...newExceptions],\n          newException,\n          newExceptionId,\n        );\n      }\n    });\n  }\n\n  return newExceptions;\n}\n\nfunction isExceptionGroup(error: ExtendedError): error is ExtendedError & { errors: unknown[] } {\n  return Array.isArray(error.errors);\n}\n\nfunction applyExceptionGroupFieldsForParentException(\n  exception: Exception,\n  exceptionId: number,\n  error: ExtendedError,\n): void {\n  exception.mechanism = {\n    handled: true,\n    type: 'auto.core.linked_errors',\n    ...(isExceptionGroup(error) && { is_exception_group: true }),\n    ...exception.mechanism,\n    exception_id: exceptionId,\n  };\n}\n\nfunction applyExceptionGroupFieldsForChildException(\n  exception: Exception,\n  source: string,\n  exceptionId: number,\n  parentId: number | undefined,\n): void {\n  exception.mechanism = {\n    handled: true,\n    ...exception.mechanism,\n    type: 'chained',\n    source,\n    exception_id: exceptionId,\n    parent_id: parentId,\n  };\n}\n","import { DEBUG_BUILD } from '../../debug-build';\nimport { debug } from '../debug-logger';\n\n/**\n * Registry tracking which AI provider modules should skip instrumentation wrapping.\n *\n * This prevents duplicate spans when a higher-level integration (like LangChain)\n * already instruments AI providers at a higher abstraction level.\n */\nconst SKIPPED_AI_PROVIDERS = new Set<string>();\n\n/**\n * Mark AI provider modules to skip instrumentation wrapping.\n *\n * This prevents duplicate spans when a higher-level integration (like LangChain)\n * already instruments AI providers at a higher abstraction level.\n *\n * @internal\n * @param modules - Array of npm module names to skip (e.g., '@anthropic-ai/sdk', 'openai')\n *\n * @example\n * ```typescript\n * // In LangChain integration\n * _INTERNAL_skipAiProviderWrapping(['@anthropic-ai/sdk', 'openai', '@google/generative-ai']);\n * ```\n */\nexport function _INTERNAL_skipAiProviderWrapping(modules: string[]): void {\n  modules.forEach(module => {\n    SKIPPED_AI_PROVIDERS.add(module);\n    DEBUG_BUILD && debug.log(`AI provider \"${module}\" wrapping will be skipped`);\n  });\n}\n\n/**\n * Check if an AI provider module should skip instrumentation wrapping.\n *\n * @internal\n * @param module - The npm module name (e.g., '@anthropic-ai/sdk', 'openai')\n * @returns true if wrapping should be skipped\n *\n * @example\n * ```typescript\n * // In AI provider instrumentation\n * if (_INTERNAL_shouldSkipAiProviderWrapping('@anthropic-ai/sdk')) {\n *   return Reflect.construct(Original, args); // Don't instrument\n * }\n * ```\n */\nexport function _INTERNAL_shouldSkipAiProviderWrapping(module: string): boolean {\n  return SKIPPED_AI_PROVIDERS.has(module);\n}\n\n/**\n * Clear all AI provider skip registrations.\n *\n * This is automatically called at the start of Sentry.init() to ensure a clean state\n * between different client initializations.\n *\n * @internal\n */\nexport function _INTERNAL_clearAiProviderSkips(): void {\n  SKIPPED_AI_PROVIDERS.clear();\n  DEBUG_BUILD && debug.log('Cleared AI provider skip registrations');\n}\n","import type { StackFrame } from '../types/stackframe';\nimport { filenameIsInApp } from './node-stack-trace';\nimport { UNKNOWN_FUNCTION } from './stacktrace';\n\ntype WatchdogReturn = {\n  /** Resets the watchdog timer */\n  poll: () => void;\n  /** Enables or disables the watchdog timer */\n  enabled: (state: boolean) => void;\n};\n\ntype CreateTimerImpl = () => { getTimeMs: () => number; reset: () => void };\n\n/**\n * A node.js watchdog timer\n * @param pollInterval The interval that we expect to get polled at\n * @param anrThreshold The threshold for when we consider ANR\n * @param callback The callback to call for ANR\n * @returns An object with `poll` and `enabled` functions {@link WatchdogReturn}\n */\nexport function watchdogTimer(\n  createTimer: CreateTimerImpl,\n  pollInterval: number,\n  anrThreshold: number,\n  callback: () => void,\n): WatchdogReturn {\n  const timer = createTimer();\n  let triggered = false;\n  let enabled = true;\n\n  setInterval(() => {\n    const diffMs = timer.getTimeMs();\n\n    if (triggered === false && diffMs > pollInterval + anrThreshold) {\n      triggered = true;\n      if (enabled) {\n        callback();\n      }\n    }\n\n    if (diffMs < pollInterval + anrThreshold) {\n      triggered = false;\n    }\n  }, 20);\n\n  return {\n    poll: () => {\n      timer.reset();\n    },\n    enabled: (state: boolean) => {\n      enabled = state;\n    },\n  };\n}\n\n// types copied from inspector.d.ts\ninterface Location {\n  scriptId: string;\n  lineNumber: number;\n  columnNumber?: number;\n}\n\ninterface CallFrame {\n  functionName: string;\n  location: Location;\n  url: string;\n}\n\n/**\n * Converts Debugger.CallFrame to Sentry StackFrame\n */\nexport function callFrameToStackFrame(\n  frame: CallFrame,\n  url: string | undefined,\n  getModuleFromFilename: (filename: string | undefined) => string | undefined,\n): StackFrame {\n  const filename = url ? url.replace(/^file:\\/\\//, '') : undefined;\n\n  // CallFrame row/col are 0 based, whereas StackFrame are 1 based\n  const colno = frame.location.columnNumber ? frame.location.columnNumber + 1 : undefined;\n  const lineno = frame.location.lineNumber ? frame.location.lineNumber + 1 : undefined;\n\n  return {\n    filename,\n    module: getModuleFromFilename(filename),\n    function: frame.functionName || UNKNOWN_FUNCTION,\n    colno,\n    lineno,\n    in_app: filename ? filenameIsInApp(filename) : undefined,\n  };\n}\n","/**\n * Return a new array with duplicate values removed, preserving first-occurrence order.\n *\n * @param input the array to deduplicate\n * @returns a new array containing each distinct value once, in the order it first appeared\n */\nexport function uniq<T>(input: T[]): T[] {\n  return Array.from(new Set(input));\n}\n","import { DEBUG_BUILD } from '../debug-build';\nimport type { DynamicSamplingContext } from '../types/envelope';\nimport { debug } from './debug-logger';\nimport { isString } from './is';\n\nexport const SENTRY_BAGGAGE_KEY_PREFIX = 'sentry-';\n\nexport const SENTRY_BAGGAGE_KEY_PREFIX_REGEX = /^sentry-/;\n\n/**\n * Max length of a serialized baggage string\n *\n * https://www.w3.org/TR/baggage/#limits\n */\nexport const MAX_BAGGAGE_STRING_LENGTH = 8192;\n\n/**\n * Takes a baggage header and turns it into Dynamic Sampling Context, by extracting all the \"sentry-\" prefixed values\n * from it.\n *\n * @param baggageHeader A very bread definition of a baggage header as it might appear in various frameworks.\n * @returns The Dynamic Sampling Context that was found on `baggageHeader`, if there was any, `undefined` otherwise.\n */\nexport function baggageHeaderToDynamicSamplingContext(\n  // Very liberal definition of what any incoming header might look like\n  baggageHeader: string | string[] | number | null | undefined | boolean,\n): Partial<DynamicSamplingContext> | undefined {\n  const baggageObject = parseBaggageHeader(baggageHeader);\n\n  if (!baggageObject) {\n    return undefined;\n  }\n\n  // Read all \"sentry-\" prefixed values out of the baggage object and put it onto a dynamic sampling context object.\n  const dynamicSamplingContext = Object.entries(baggageObject).reduce<Record<string, string>>((acc, [key, value]) => {\n    if (key.startsWith(SENTRY_BAGGAGE_KEY_PREFIX)) {\n      const nonPrefixedKey = key.slice(SENTRY_BAGGAGE_KEY_PREFIX.length);\n      acc[nonPrefixedKey] = value;\n    }\n    return acc;\n  }, {});\n\n  // Only return a dynamic sampling context object if there are keys in it.\n  // A keyless object means there were no sentry values on the header, which means that there is no DSC.\n  if (Object.keys(dynamicSamplingContext).length > 0) {\n    return dynamicSamplingContext as Partial<DynamicSamplingContext>;\n  } else {\n    return undefined;\n  }\n}\n\n/**\n * Turns a Dynamic Sampling Object into a baggage header by prefixing all the keys on the object with \"sentry-\".\n *\n * @param dynamicSamplingContext The Dynamic Sampling Context to turn into a header. For convenience and compatibility\n * with the `getDynamicSamplingContext` method on the Transaction class ,this argument can also be `undefined`. If it is\n * `undefined` the function will return `undefined`.\n * @returns a baggage header, created from `dynamicSamplingContext`, or `undefined` either if `dynamicSamplingContext`\n * was `undefined`, or if `dynamicSamplingContext` didn't contain any values.\n */\nexport function dynamicSamplingContextToSentryBaggageHeader(\n  // this also takes undefined for convenience and bundle size in other places\n  dynamicSamplingContext?: Partial<DynamicSamplingContext>,\n): string | undefined {\n  if (!dynamicSamplingContext) {\n    return undefined;\n  }\n\n  // Prefix all DSC keys with \"sentry-\" and put them into a new object\n  const sentryPrefixedDSC = Object.entries(dynamicSamplingContext).reduce<Record<string, string>>(\n    (acc, [dscKey, dscValue]) => {\n      if (dscValue) {\n        acc[`${SENTRY_BAGGAGE_KEY_PREFIX}${dscKey}`] = dscValue;\n      }\n      return acc;\n    },\n    {},\n  );\n\n  return objectToBaggageHeader(sentryPrefixedDSC);\n}\n\n/**\n * Take a baggage header and parse it into an object.\n */\nexport function parseBaggageHeader(\n  baggageHeader: string | string[] | number | null | undefined | boolean,\n): Record<string, string> | undefined {\n  if (!baggageHeader || (!isString(baggageHeader) && !Array.isArray(baggageHeader))) {\n    return undefined;\n  }\n\n  if (Array.isArray(baggageHeader)) {\n    // Combine all baggage headers into one object containing the baggage values so we can later read the Sentry-DSC-values from it\n    return baggageHeader.reduce<Record<string, string>>((acc, curr) => {\n      const currBaggageObject = baggageHeaderToObject(curr);\n      Object.entries(currBaggageObject).forEach(([key, value]) => {\n        acc[key] = value;\n      });\n      return acc;\n    }, {});\n  }\n\n  return baggageHeaderToObject(baggageHeader);\n}\n\n/**\n * Will parse a baggage header, which is a simple key-value map, into a flat object.\n *\n * @param baggageHeader The baggage header to parse.\n * @returns a flat object containing all the key-value pairs from `baggageHeader`.\n */\nfunction baggageHeaderToObject(baggageHeader: string): Record<string, string> {\n  return baggageHeader\n    .split(',')\n    .map(baggageEntry => {\n      const eqIdx = baggageEntry.indexOf('=');\n      if (eqIdx === -1) {\n        // Likely an invalid entry\n        return [];\n      }\n      const key = baggageEntry.slice(0, eqIdx);\n      const value = baggageEntry.slice(eqIdx + 1);\n      return [key, value].map(keyOrValue => {\n        try {\n          return decodeURIComponent(keyOrValue.trim());\n        } catch {\n          // We ignore errors here, e.g. if the value cannot be URL decoded.\n          // This will then be skipped in the next step\n          return;\n        }\n      });\n    })\n    .reduce<Record<string, string>>((acc, [key, value]) => {\n      if (key && value) {\n        acc[key] = value;\n      }\n      return acc;\n    }, {});\n}\n\n/**\n * Turns a flat object (key-value pairs) into a baggage header, which is also just key-value pairs.\n *\n * @param object The object to turn into a baggage header.\n * @returns a baggage header string, or `undefined` if the object didn't have any values, since an empty baggage header\n * is not spec compliant.\n */\nexport function objectToBaggageHeader(object: Record<string, string>): string | undefined {\n  if (Object.keys(object).length === 0) {\n    // An empty baggage header is not spec compliant: We return undefined.\n    return undefined;\n  }\n\n  return Object.entries(object).reduce((baggageHeader, [objectKey, objectValue], currentIndex) => {\n    const baggageEntry = `${encodeURIComponent(objectKey)}=${encodeURIComponent(objectValue)}`;\n    const newBaggageHeader = currentIndex === 0 ? baggageEntry : `${baggageHeader},${baggageEntry}`;\n    if (newBaggageHeader.length > MAX_BAGGAGE_STRING_LENGTH) {\n      DEBUG_BUILD &&\n        debug.warn(\n          `Not adding key: ${objectKey} with val: ${objectValue} to baggage header due to exceeding baggage size limits.`,\n        );\n      return baggageHeader;\n    } else {\n      return newBaggageHeader;\n    }\n  }, '');\n}\n\n/**\n * Merge two baggage headers into one.\n * - Sentry-specific entries (keys starting with \"sentry-\") from the new\n *   baggage take precedence\n * - Non-Sentry entries from existing baggage take precedence\n *\n * The order of the existing baggage will be preserved, and new entries will\n * be added to the end.\n *\n * This matches the behavior of OTEL's propagation.inject() which uses\n * `baggage.setEntry()`  to overwrite existing entries with the same key.\n */\nexport function mergeBaggageHeaders<Existing extends string | string[] | number | undefined>(\n  existing: Existing,\n  incoming: string,\n): string | undefined | Existing {\n  if (!existing) {\n    return incoming;\n  }\n\n  const existingEntries = parseBaggageHeader(existing);\n  const incomingEntries = parseBaggageHeader(incoming);\n\n  if (!incomingEntries) {\n    return existing;\n  }\n\n  // 1. All non-sentry entries from existing are kept\n  // 2. All sentry- entries from the new baggage are retained\n  // 3. If sentry- entries present in new, ignore from old, else keep from old.\n  // 4. Non-sentry entries from new are only kept if not in existing.\n\n  const merged: Record<string, string> = {};\n\n  // partition incoming entries into sentry and non-sentry prefixed\n  let hasNewSentryEntries = false;\n  const newSentryEntries: Record<string, string> = {};\n  const newNonSentryEntries: Record<string, string> = {};\n  for (const [key, value] of Object.entries(incomingEntries)) {\n    if (key.startsWith(SENTRY_BAGGAGE_KEY_PREFIX)) {\n      newSentryEntries[key] = value;\n      hasNewSentryEntries = true;\n    } else {\n      newNonSentryEntries[key] = value;\n    }\n  }\n\n  // If new baggage contains at least one sentry- value, we remove all old\n  // sentry- values otherwise, we keep old sentry- values. If we don't remove\n  // old sentry- values, we end up with an inconsistent dynamic sampling\n  // context propagation.\n  if (existingEntries) {\n    for (const [key, value] of Object.entries(existingEntries)) {\n      if (!hasNewSentryEntries || !key.startsWith(SENTRY_BAGGAGE_KEY_PREFIX)) {\n        merged[key] = value;\n      }\n    }\n  }\n\n  // Assign new sentry fields.\n  if (hasNewSentryEntries) {\n    Object.assign(merged, newSentryEntries);\n  }\n\n  // assign new non-sentry fields not found on existing object.\n  for (const [key, value] of Object.entries(newNonSentryEntries)) {\n    merged[key] ??= value;\n  }\n\n  return objectToBaggageHeader(merged);\n}\n","import type { SeverityLevel } from '../types/severity';\n\n/**\n * Determine a breadcrumb's log level (only `warning` or `error`) based on an HTTP status code.\n */\nexport function getBreadcrumbLogLevelFromHttpStatusCode(statusCode: number | undefined): SeverityLevel | undefined {\n  // NOTE: undefined defaults to 'info' in Sentry\n  if (statusCode === undefined) {\n    return undefined;\n  } else if (statusCode >= 400 && statusCode < 500) {\n    return 'warning';\n  } else if (statusCode >= 500) {\n    return 'error';\n  } else {\n    return undefined;\n  }\n}\n","import { isString } from './is';\nimport { GLOBAL_OBJ } from './worldwide';\n\nconst WINDOW = GLOBAL_OBJ as unknown as Window;\n\nconst DEFAULT_MAX_STRING_LENGTH = 80;\n\ntype SimpleNode = {\n  parentNode: SimpleNode;\n} | null;\n\n/**\n * Given a child DOM element, returns a query-selector statement describing that\n * and its ancestors\n * e.g. [HTMLElement] => body > div > input#foo.btn[name=baz]\n * @returns generated DOM path\n * @deprecated This is browser-specific and will be removed from `@sentry/core` in a future major version.\n * Import `htmlTreeAsString` from `@sentry/browser-utils` instead.\n */\nexport function htmlTreeAsString(\n  elem: unknown,\n  options: string[] | { keyAttrs?: string[]; maxStringLength?: number } = {},\n): string {\n  if (!elem) {\n    return '<unknown>';\n  }\n\n  // try/catch both:\n  // - accessing event.target (see getsentry/raven-js#838, #768)\n  // - `htmlTreeAsString` because it's complex, and just accessing the DOM incorrectly\n  // - can throw an exception in some circumstances.\n  try {\n    let currentElem = elem as SimpleNode;\n    const MAX_TRAVERSE_HEIGHT = 5;\n    const out = [];\n    let height = 0;\n    let len = 0;\n    const separator = ' > ';\n    const sepLength = separator.length;\n    let nextStr;\n    const keyAttrs = Array.isArray(options) ? options : options.keyAttrs;\n    const maxStringLength = (!Array.isArray(options) && options.maxStringLength) || DEFAULT_MAX_STRING_LENGTH;\n\n    while (currentElem && height++ < MAX_TRAVERSE_HEIGHT) {\n      nextStr = _htmlElementAsString(currentElem, keyAttrs);\n      // bail out if\n      // - nextStr is the 'html' element\n      // - the length of the string that would be created exceeds maxStringLength\n      //   (ignore this limit if we are on the first iteration)\n      if (nextStr === 'html' || (height > 1 && len + out.length * sepLength + nextStr.length >= maxStringLength)) {\n        break;\n      }\n\n      out.push(nextStr);\n\n      len += nextStr.length;\n      currentElem = currentElem.parentNode;\n    }\n\n    return out.reverse().join(separator);\n  } catch {\n    return '<unknown>';\n  }\n}\n\n/**\n * Returns a simple, query-selector representation of a DOM element\n * e.g. [HTMLElement] => input#foo.btn[name=baz]\n * @returns generated DOM path\n */\nfunction _htmlElementAsString(el: unknown, keyAttrs?: string[]): string {\n  const elem = el as {\n    tagName?: string;\n    id?: string;\n    className?: string;\n    getAttribute(key: string): string;\n  };\n\n  const out = [];\n\n  if (!elem?.tagName) {\n    return '';\n  }\n\n  // @ts-expect-error WINDOW has HTMLElement\n  if (WINDOW.HTMLElement) {\n    // If using the component name annotation plugin, this value may be available on the DOM node\n    if (elem instanceof HTMLElement && elem.dataset) {\n      if (elem.dataset['sentryComponent']) {\n        return elem.dataset['sentryComponent'];\n      }\n      if (elem.dataset['sentryElement']) {\n        return elem.dataset['sentryElement'];\n      }\n    }\n  }\n\n  out.push(elem.tagName.toLowerCase());\n\n  // Pairs of attribute keys defined in `serializeAttribute` and their values on element.\n  const keyAttrPairs = keyAttrs?.length\n    ? keyAttrs.filter(keyAttr => elem.getAttribute(keyAttr)).map(keyAttr => [keyAttr, elem.getAttribute(keyAttr)])\n    : null;\n\n  if (keyAttrPairs?.length) {\n    keyAttrPairs.forEach(keyAttrPair => {\n      out.push(`[${keyAttrPair[0]}=\"${keyAttrPair[1]}\"]`);\n    });\n  } else {\n    if (elem.id) {\n      out.push(`#${elem.id}`);\n    }\n\n    const className = elem.className;\n    if (className && isString(className)) {\n      const classes = className.split(/\\s+/);\n      for (const c of classes) {\n        out.push(`.${c}`);\n      }\n    }\n  }\n  for (const k of ['aria-label', 'type', 'name', 'title', 'alt']) {\n    const attr = elem.getAttribute(k);\n    if (attr) {\n      out.push(`[${k}=\"${attr}\"]`);\n    }\n  }\n\n  return out.join('');\n}\n\n/**\n * A safe form of location.href\n */\nexport function getLocationHref(): string {\n  try {\n    return WINDOW.document.location.href;\n  } catch {\n    return '';\n  }\n}\n\n/**\n * Given a DOM element, traverses up the tree until it finds the first ancestor node\n * that has the `data-sentry-component` or `data-sentry-element` attribute with `data-sentry-component` taking\n * precedence. This attribute is added at build-time by projects that have the component name annotation plugin installed.\n *\n * @returns a string representation of the component for the provided DOM element, or `null` if not found\n */\nexport function getComponentName(elem: unknown, maxTraverseHeight: number = 5): string | null {\n  // @ts-expect-error WINDOW has HTMLElement\n  if (!WINDOW.HTMLElement) {\n    return null;\n  }\n\n  let currentElem = elem as SimpleNode;\n  for (let i = 0; i < maxTraverseHeight; i++) {\n    if (!currentElem) {\n      return null;\n    }\n\n    if (currentElem instanceof HTMLElement) {\n      if (currentElem.dataset['sentryComponent']) {\n        return currentElem.dataset['sentryComponent'];\n      }\n      if (currentElem.dataset['sentryElement']) {\n        return currentElem.dataset['sentryElement'];\n      }\n    }\n\n    currentElem = currentElem.parentNode;\n  }\n\n  return null;\n}\n","const isActualPromise = (p: unknown) =>\n  p instanceof Promise && !(p as unknown as ChainedPromiseLike<unknown>)[kChainedCopy];\n\ntype ChainedPromiseLike<T> = PromiseLike<T> & {\n  [kChainedCopy]: true;\n};\nconst kChainedCopy = Symbol('chained PromiseLike');\n\n/**\n * Copy the properties from a decorated promiselike object onto its chained\n * actual promise.\n */\nexport const chainAndCopyPromiseLike = <V, T extends PromiseLike<V>>(\n  original: T,\n  onSuccess: (value: V) => void,\n  onError: (e: unknown) => void,\n): T => {\n  const chained = original.then(\n    value => {\n      onSuccess(value);\n      return value;\n    },\n    err => {\n      onError(err);\n      throw err;\n    },\n  ) as T;\n\n  // if we're just dealing with \"normal\" Promise objects, return the chain\n  return isActualPromise(chained) && isActualPromise(original) ? chained : copyProps(original, chained);\n};\n\n// eslint-disable-next-line @typescript-eslint/no-explicit-any\nconst copyProps = <T extends Record<string, any>>(original: T, chained: T): T => {\n  if (!chained) return original;\n  let mutated = false;\n  //oxlint-disable-next-line guard-for-in\n  for (const key in original) {\n    if (key in chained) continue;\n    mutated = true;\n    const value = original[key];\n    if (typeof value === 'function') {\n      Object.defineProperty(chained, key, {\n        value: (...args: unknown[]) => value.apply(original, args),\n        enumerable: true,\n        configurable: true,\n        writable: true,\n      });\n    } else {\n      (chained as Record<string, unknown>)[key] = value;\n    }\n  }\n\n  if (mutated) Object.assign(chained, { [kChainedCopy]: true });\n  return chained;\n};\n","import type { ClientReport } from '../types/clientreport';\nimport type { ClientReportEnvelope, ClientReportItem } from '../types/envelope';\nimport { createEnvelope } from './envelope';\nimport { dateTimestampInSeconds } from './time';\n\n/**\n * Creates client report envelope\n * @param discarded_events An array of discard events\n * @param dsn A DSN that can be set on the header. Optional.\n */\nexport function createClientReportEnvelope(\n  discarded_events: ClientReport['discarded_events'],\n  dsn?: string,\n  timestamp?: number,\n): ClientReportEnvelope {\n  const clientReportItem: ClientReportItem = [\n    { type: 'client_report' },\n    {\n      timestamp: timestamp || dateTimestampInSeconds(),\n      discarded_events,\n    },\n  ];\n  return createEnvelope<ClientReportEnvelope>(dsn ? { dsn } : {}, [clientReportItem]);\n}\n","/**\n * This code was originally copied from the 'cookie` module at v0.5.0 and was simplified for our use case.\n * https://github.com/jshttp/cookie/blob/a0c84147aab6266bdb3996cf4062e93907c0b0fc/index.js\n * It had the following license:\n *\n * (The MIT License)\n *\n * Copyright (c) 2012-2014 Roman Shtylman <shtylman@gmail.com>\n * Copyright (c) 2015 Douglas Christopher Wilson <doug@somethingdoug.com>\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 NONINFRINGEMENT.\n * IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY\n * CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,\n * TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE\n * SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.\n */\n\n/**\n * Parses a cookie string\n */\nexport function parseCookie(str: string): Record<string, string> {\n  const obj: Record<string, string> = {};\n  let index = 0;\n\n  while (index < str.length) {\n    const eqIdx = str.indexOf('=', index);\n\n    // no more cookie pairs\n    if (eqIdx === -1) {\n      break;\n    }\n\n    let endIdx = str.indexOf(';', index);\n\n    if (endIdx === -1) {\n      endIdx = str.length;\n    } else if (endIdx < eqIdx) {\n      // backtrack on prior semicolon\n      index = str.lastIndexOf(';', eqIdx - 1) + 1;\n      continue;\n    }\n\n    const key = str.slice(index, eqIdx).trim();\n\n    // only assign once\n    if (undefined === obj[key]) {\n      let val = str.slice(eqIdx + 1, endIdx).trim();\n\n      // quoted values\n      if (val.charCodeAt(0) === 0x22) {\n        val = val.slice(1, -1);\n      }\n\n      try {\n        obj[key] = val.indexOf('%') !== -1 ? decodeURIComponent(val) : val;\n      } catch {\n        obj[key] = val;\n      }\n    }\n\n    index = endIdx + 1;\n  }\n\n  return obj;\n}\n","import { PII_HEADER_SNIPPETS } from './filtering-snippets';\nimport type { ResolvedDataCollection } from '../../types/datacollection';\n\n/**\n * Helper function that maps the `sendDefaultPii` boolean flag to the corresponding `DataCollection` configuration.\n * Used as a backward-compatibility bridge when `dataCollection` is not set by the user.\n *\n * TODO(v11): Remove this function along with `sendDefaultPii`. Once `dataCollection` is the only API,\n * the DEFAULTS in `resolveDataCollectionOptions` (including `userInfo: true`) will always apply.\n */\nexport function defaultPiiToCollectionOptions(sendDefaultPii?: boolean): ResolvedDataCollection {\n  return sendDefaultPii === true\n    ? {\n        userInfo: true,\n        cookies: true,\n        httpHeaders: { request: true, response: true },\n        httpBodies: ['incomingRequest', 'outgoingRequest', 'incomingResponse', 'outgoingResponse'],\n        urlQueryParams: true,\n        graphQL: { document: true, variables: true },\n        genAI: { inputs: true, outputs: true },\n        databaseQueryData: true,\n        stackFrameVariables: true,\n        frameContextLines: 7, // default should be 5, but ContextLines integration uses 7\n      }\n    : {\n        userInfo: false,\n        cookies: { deny: PII_HEADER_SNIPPETS },\n        httpHeaders: { request: { deny: PII_HEADER_SNIPPETS }, response: { deny: PII_HEADER_SNIPPETS } },\n        httpBodies: [],\n        urlQueryParams: { deny: PII_HEADER_SNIPPETS },\n        // The GraphQL document has literal values redacted at collection time, so it was historically\n        // always attached regardless of `sendDefaultPii`; keep it on to preserve that behavior.\n        graphQL: { document: true, variables: true },\n        genAI: { inputs: false, outputs: false },\n        // Database query values were only sent with `sendDefaultPii: true` (e.g. Supabase gated on it),\n        // so map the legacy \"off\" state to `false`.\n        databaseQueryData: false,\n        stackFrameVariables: true,\n        frameContextLines: 7, // default should be 5, but ContextLines integration uses 7\n      };\n}\n","import type { CollectBehavior } from '../../types/datacollection';\nimport { parseCookie } from '../cookie';\nimport { FILTERED_VALUE as FILTERED, SENSITIVE_COOKIE_NAME_SNIPPETS } from './filtering-snippets';\nimport { filterKeyValueData } from './filterKeyValueData';\n\n/**\n * Filters a cookie string according to a `CollectBehavior`.\n *\n * When individual cookies can be parsed, each key-value pair is filtered\n * independently. When parsing fails, the entire string is replaced with `[Filtered]`.\n */\nexport function filterCookies(cookieString: string, behavior: CollectBehavior): Record<string, string> | string {\n  if (behavior === false) {\n    return {};\n  }\n\n  try {\n    const parsed = parseCookie(cookieString);\n\n    if (Object.keys(parsed).length === 0) {\n      return {};\n    }\n\n    return filterKeyValueData(parsed, behavior, SENSITIVE_COOKIE_NAME_SNIPPETS);\n  } catch {\n    return FILTERED;\n  }\n}\n","import type { CollectBehavior } from '../../types/datacollection';\nimport { FILTERED_VALUE as FILTERED, SENSITIVE_KEY_SNIPPETS } from './filtering-snippets';\n\nfunction isSensitiveKey(lower: string, denySnippets: string[]): boolean {\n  return denySnippets.some(snippet => lower.includes(snippet));\n}\n\n/**\n * Filters a key-value record according to a `CollectBehavior`.\n *\n * Key names are always preserved. Values are either kept, replaced with\n * `[Filtered]`, or the entire record is dropped (off mode).\n *\n * @param additionalDenyTerms - Additional sensitive snippets to check beyond the built-in denylist.\n */\nexport function filterKeyValueData<T>(\n  data: Record<string, T>,\n  behavior: CollectBehavior,\n  additionalDenyTerms?: string[],\n): Record<string, T | string> {\n  if (behavior === false) {\n    return {};\n  }\n\n  const denySnippets =\n    additionalDenyTerms != null ? [...SENSITIVE_KEY_SNIPPETS, ...additionalDenyTerms] : SENSITIVE_KEY_SNIPPETS;\n  const result: Record<string, T | string> = {};\n\n  if (behavior === true) {\n    for (const key of Object.keys(data)) {\n      result[key] = isSensitiveKey(key.toLowerCase(), denySnippets) ? FILTERED : data[key]!;\n    }\n    return result;\n  }\n\n  if ('deny' in behavior) {\n    const lowerTerms = behavior.deny.map(t => t.toLowerCase());\n    for (const key of Object.keys(data)) {\n      const lower = key.toLowerCase();\n      const isDenied = isSensitiveKey(lower, denySnippets) || lowerTerms.some(term => lower.includes(term));\n      result[key] = isDenied ? FILTERED : data[key]!;\n    }\n    return result;\n  }\n\n  // allowList mode\n  const lowerTerms = behavior.allow.map(t => t.toLowerCase());\n  for (const key of Object.keys(data)) {\n    const lower = key.toLowerCase();\n    if (isSensitiveKey(lower, denySnippets)) {\n      result[key] = FILTERED;\n    } else {\n      const isAllowed = lowerTerms.some(term => lower.includes(term));\n      result[key] = isAllowed ? data[key]! : FILTERED;\n    }\n  }\n  return result;\n}\n","import type { CollectBehavior } from '../../types/datacollection';\nimport { FILTERED_VALUE as FILTERED } from './filtering-snippets';\nimport { filterKeyValueData } from './filterKeyValueData';\n\n/**\n * Filters a query parameter string according to a `CollectBehavior`.\n *\n * When individual params can be parsed, each key-value pair is filtered\n * independently. When parsing fails, the entire string is replaced with `[Filtered]`.\n */\nexport function filterQueryParams(queryString: string, behavior: CollectBehavior): Record<string, string> | string {\n  if (behavior === false) {\n    return {};\n  }\n\n  try {\n    const params = new URLSearchParams(queryString);\n    const parsed: Record<string, string> = {};\n    params.forEach((value, key) => {\n      parsed[key] = value;\n    });\n\n    if (Object.keys(parsed).length === 0) {\n      return {};\n    }\n\n    return filterKeyValueData(parsed, behavior);\n  } catch {\n    return FILTERED;\n  }\n}\n","export const FILTERED_VALUE = '[Filtered]';\n\nexport const PII_HEADER_SNIPPETS = ['forwarded', '-ip', 'remote-', 'via', '-user'];\n\nexport const SENSITIVE_KEY_SNIPPETS = [\n  'auth',\n  'token',\n  'secret',\n  'session', // for the user_session cookie\n  'password',\n  'passwd',\n  'pwd',\n  'key',\n  'jwt',\n  'bearer',\n  'sso',\n  'saml',\n  'csrf',\n  'xsrf',\n  'credentials',\n  'sid',\n  'identity',\n  // Always treat cookie headers as sensitive in case individual key-value cookie pairs cannot properly be extracted\n  'set-cookie',\n  'cookie',\n];\n\n/**\n * Extra substrings matched only against individual Cookie / Set-Cookie **names** (not header names),\n * so we can cover common session secrets that do not match {@link SENSITIVE_KEY_SNIPPETS}\n * (e.g. `connect.sid` does not contain `session`) without false positives on arbitrary HTTP headers.\n *\n * Cookie names are checked with the same `includes()` list as headers plus these entries; omit redundant\n * cookie-only snippets that are already implied by a header match (e.g. `oauth` → `auth`, `id_token` → `token`,\n * `next-auth` → `auth`).\n */\nexport const SENSITIVE_COOKIE_NAME_SNIPPETS = [\n  // Express / Connect default session cookie\n  '.sid',\n  // Opaque session ids (PHPSESSID, ASPSESSIONID*, BIGipServer*, *sessid*, …)\n  'sessid',\n  // Laravel etc. \"remember me\" tokens\n  'remember',\n  // OIDC / OAuth auxiliary (`oauth*` covered by header snippet `auth`)\n  'oidc',\n  'pkce',\n  'nonce',\n  // RFC 6265bis high-security cookie name prefixes\n  '__secure-',\n  '__host-',\n  // Load balancer / CDN sticky-session cookies (opaque routing tokens)\n  'awsalb',\n  'awselb',\n  'akamai',\n  // BaaS / IdP session cookies (names often omit \"session\")\n  '__stripe',\n  'cognito',\n  'firebase',\n  'supabase',\n  'sb-',\n  // Step-up / MFA cookies\n  'mfa',\n  '2fa',\n];\n","import type { DataCollection, ResolvedDataCollection } from '../../types/datacollection';\nimport { defaultPiiToCollectionOptions } from './defaultPiiToCollectionOptions';\n\nconst DEFAULTS: ResolvedDataCollection = {\n  userInfo: true,\n  cookies: true,\n  httpHeaders: { request: true, response: true },\n  httpBodies: ['incomingRequest', 'outgoingRequest', 'incomingResponse', 'outgoingResponse'],\n  urlQueryParams: true,\n  graphQL: { document: true, variables: true },\n  genAI: { inputs: true, outputs: true },\n  databaseQueryData: true,\n  stackFrameVariables: true,\n  frameContextLines: 5,\n};\n\n/**\n * Resolves the effective `DataCollection` configuration from client options.\n *\n * Precedence:\n * 1. Fields explicitly set in `dataCollection`\n * 2. If `sendDefaultPii` is set and `dataCollection` is absent, bridge via `defaultPiiToCollectionOptions`\n * 3. Spec defaults\n *\n * TODO(v11): Remove `sendDefaultPii` support and always fall through to DEFAULTS so that `userInfo: true`\n * NOTE: In v10, DEFAULTS only apply when `dataCollection` is explicitly provided.\n * When `dataCollection` is absent, the legacy `sendDefaultPii` bridge is used, which defaults to\n * `userInfo: false` to preserve backward compatibility.\n */\nexport function resolveDataCollectionOptions(options: {\n  dataCollection?: DataCollection;\n  sendDefaultPii?: boolean;\n}): ResolvedDataCollection {\n  // TODO(v11): Remove the sendDefaultPii bridge and always use DEFAULTS.\n  const base = options.dataCollection != null ? DEFAULTS : defaultPiiToCollectionOptions(options.sendDefaultPii);\n\n  const dc = options.dataCollection ?? {};\n\n  return {\n    userInfo: dc.userInfo ?? base.userInfo,\n    cookies: dc.cookies ?? base.cookies,\n    httpHeaders: {\n      request: dc.httpHeaders?.request ?? base.httpHeaders.request,\n      response: dc.httpHeaders?.response ?? base.httpHeaders.response,\n    },\n    httpBodies: dc.httpBodies ?? base.httpBodies,\n    // oxlint-disable-next-line typescript/no-deprecated\n    urlQueryParams: dc.urlQueryParams ?? dc.queryParams ?? base.urlQueryParams,\n    graphQL: {\n      document: dc.graphQL?.document ?? base.graphQL.document,\n      variables: dc.graphQL?.variables ?? base.graphQL.variables,\n    },\n    genAI: {\n      inputs: dc.genAI?.inputs ?? base.genAI.inputs,\n      outputs: dc.genAI?.outputs ?? base.genAI.outputs,\n    },\n    databaseQueryData: dc.databaseQueryData ?? base.databaseQueryData,\n    stackFrameVariables: dc.stackFrameVariables ?? base.stackFrameVariables,\n    frameContextLines: dc.frameContextLines ?? base.frameContextLines,\n  };\n}\n","type DebouncedCallback = {\n  (): void | unknown;\n  flush: () => void | unknown;\n  cancel: () => void;\n};\ntype CallbackFunction = () => unknown;\ntype DebounceOptions = {\n  /** The max. time in ms to wait for the callback to be invoked. */\n  maxWait?: number;\n  /** This can be overwritten to use a different setTimeout implementation, e.g. to avoid triggering change detection in Angular  */\n  setTimeoutImpl?: typeof setTimeout;\n};\n\n/**\n * Heavily simplified debounce function based on lodash.debounce.\n *\n * This function takes a callback function (@param fun) and delays its invocation\n * by @param wait milliseconds. Optionally, a maxWait can be specified in @param options,\n * which ensures that the callback is invoked at least once after the specified max. wait time.\n *\n * @param func the function whose invocation is to be debounced\n * @param wait the minimum time until the function is invoked after it was called once\n * @param options the options object, which can contain the `maxWait` property\n *\n * @returns the debounced version of the function, which needs to be called at least once to start the\n *          debouncing process. Subsequent calls will reset the debouncing timer and, in case @paramfunc\n *          was already invoked in the meantime, return @param func's return value.\n *          The debounced function has two additional properties:\n *          - `flush`: Invokes the debounced function immediately and returns its return value\n *          - `cancel`: Cancels the debouncing process and resets the debouncing timer\n */\nexport function debounce(func: CallbackFunction, wait: number, options?: DebounceOptions): DebouncedCallback {\n  let callbackReturnValue: unknown;\n\n  let timerId: ReturnType<typeof setTimeout> | undefined;\n  let maxTimerId: ReturnType<typeof setTimeout> | undefined;\n\n  const maxWait = options?.maxWait ? Math.max(options.maxWait, wait) : 0;\n  const setTimeoutImpl = options?.setTimeoutImpl || setTimeout;\n\n  function invokeFunc(): unknown {\n    cancelTimers();\n    callbackReturnValue = func();\n    return callbackReturnValue;\n  }\n\n  function cancelTimers(): void {\n    timerId !== undefined && clearTimeout(timerId);\n    maxTimerId !== undefined && clearTimeout(maxTimerId);\n    timerId = maxTimerId = undefined;\n  }\n\n  function flush(): unknown {\n    if (timerId !== undefined || maxTimerId !== undefined) {\n      return invokeFunc();\n    }\n    return callbackReturnValue;\n  }\n\n  function debounced(): unknown {\n    if (timerId) {\n      clearTimeout(timerId);\n    }\n    timerId = setTimeoutImpl(invokeFunc, wait);\n\n    if (maxWait && maxTimerId === undefined) {\n      maxTimerId = setTimeoutImpl(invokeFunc, maxWait);\n    }\n\n    return callbackReturnValue;\n  }\n\n  debounced.cancel = cancelTimers;\n  debounced.flush = flush;\n  return debounced;\n}\n","import type { DebugImage } from '../types/debugMeta';\nimport type { StackParser } from '../types/stacktrace';\nimport { normalizeStackTracePath } from './stacktrace';\nimport { GLOBAL_OBJ } from './worldwide';\n\ntype StackString = string;\ntype CachedResult = [string, string];\n\nlet parsedStackResults: Record<StackString, CachedResult> | undefined;\nlet lastSentryKeysCount: number | undefined;\nlet lastNativeKeysCount: number | undefined;\nlet cachedFilenameDebugIds: Record<string, string> | undefined;\n\n/**\n * Clears the cached debug ID mappings.\n * Useful for testing or when the global debug ID state changes.\n */\nexport function clearDebugIdCache(): void {\n  parsedStackResults = undefined;\n  lastSentryKeysCount = undefined;\n  lastNativeKeysCount = undefined;\n  cachedFilenameDebugIds = undefined;\n}\n\n/**\n * Returns a map of filenames to debug identifiers.\n * Supports both proprietary _sentryDebugIds and native _debugIds (e.g., from Vercel) formats.\n */\nexport function getFilenameToDebugIdMap(stackParser: StackParser): Record<string, string> {\n  const sentryDebugIdMap = GLOBAL_OBJ._sentryDebugIds;\n  const nativeDebugIdMap = GLOBAL_OBJ._debugIds;\n\n  if (!sentryDebugIdMap && !nativeDebugIdMap) {\n    return {};\n  }\n\n  const sentryDebugIdKeys = sentryDebugIdMap ? Object.keys(sentryDebugIdMap) : [];\n  const nativeDebugIdKeys = nativeDebugIdMap ? Object.keys(nativeDebugIdMap) : [];\n\n  // If the count of registered globals hasn't changed since the last call, we\n  // can just return the cached result.\n  if (\n    cachedFilenameDebugIds &&\n    sentryDebugIdKeys.length === lastSentryKeysCount &&\n    nativeDebugIdKeys.length === lastNativeKeysCount\n  ) {\n    return cachedFilenameDebugIds;\n  }\n\n  lastSentryKeysCount = sentryDebugIdKeys.length;\n  lastNativeKeysCount = nativeDebugIdKeys.length;\n\n  // Build a map of filename -> debug_id from both sources\n  cachedFilenameDebugIds = {};\n\n  if (!parsedStackResults) {\n    parsedStackResults = {};\n  }\n\n  const processDebugIds = (debugIdKeys: string[], debugIdMap: Record<string, string>): void => {\n    for (const key of debugIdKeys) {\n      const debugId = debugIdMap[key];\n      const result = parsedStackResults?.[key];\n\n      if (result && cachedFilenameDebugIds && debugId) {\n        // Use cached filename but update with current debug ID\n        cachedFilenameDebugIds[result[0]] = debugId;\n        // Update cached result with new debug ID\n        if (parsedStackResults) {\n          parsedStackResults[key] = [result[0], debugId];\n        }\n      } else if (debugId) {\n        const parsedStack = stackParser(key);\n\n        for (let i = parsedStack.length - 1; i >= 0; i--) {\n          const stackFrame = parsedStack[i];\n          const filename = stackFrame?.filename;\n\n          if (filename && cachedFilenameDebugIds && parsedStackResults) {\n            cachedFilenameDebugIds[filename] = debugId;\n            parsedStackResults[key] = [filename, debugId];\n            break;\n          }\n        }\n      }\n    }\n  };\n\n  if (sentryDebugIdMap) {\n    processDebugIds(sentryDebugIdKeys, sentryDebugIdMap);\n  }\n\n  // Native _debugIds will override _sentryDebugIds if same file\n  if (nativeDebugIdMap) {\n    processDebugIds(nativeDebugIdKeys, nativeDebugIdMap);\n  }\n\n  return cachedFilenameDebugIds;\n}\n\n/**\n * Returns a list of debug images for the given resources.\n */\nexport function getDebugImagesForResources(\n  stackParser: StackParser,\n  resource_paths: ReadonlyArray<string>,\n): DebugImage[] {\n  const filenameDebugIdMap = getFilenameToDebugIdMap(stackParser);\n\n  if (!filenameDebugIdMap) {\n    return [];\n  }\n\n  const images: DebugImage[] = [];\n  for (const path of resource_paths) {\n    const normalizedPath = normalizeStackTracePath(path);\n    if (normalizedPath && filenameDebugIdMap[normalizedPath]) {\n      images.push({\n        type: 'sourcemap',\n        code_file: path,\n        debug_id: filenameDebugIdMap[normalizedPath],\n      });\n    }\n  }\n\n  return images;\n}\n","import { getGlobalSingleton } from '../carrier';\nimport { DEBUG_BUILD } from '../debug-build';\nimport type { ConsoleLevel } from '../types/instrument';\nimport { GLOBAL_OBJ } from './worldwide';\n\nexport interface SentryDebugLogger {\n  disable(): void;\n  enable(): void;\n  isEnabled(): boolean;\n  log(...args: Parameters<typeof console.log>): void;\n  warn(...args: Parameters<typeof console.warn>): void;\n  error(...args: Parameters<typeof console.error>): void;\n}\n\nexport const CONSOLE_LEVELS: readonly ConsoleLevel[] = [\n  'debug',\n  'info',\n  'warn',\n  'error',\n  'log',\n  'assert',\n  'trace',\n] as const;\n\n/** Prefix for logging strings */\nconst PREFIX = 'Sentry Logger ';\n\n/** This may be mutated by the console instrumentation. */\nexport const originalConsoleMethods: Partial<{\n  log(...args: Parameters<typeof console.log>): void;\n  info(...args: Parameters<typeof console.info>): void;\n  warn(...args: Parameters<typeof console.warn>): void;\n  error(...args: Parameters<typeof console.error>): void;\n  debug(...args: Parameters<typeof console.debug>): void;\n  assert(...args: Parameters<typeof console.assert>): void;\n  trace(...args: Parameters<typeof console.trace>): void;\n}> = {};\n\n/**\n * Temporarily disable sentry console instrumentations.\n *\n * @param callback The function to run against the original `console` messages\n * @returns The results of the callback\n */\nexport function consoleSandbox<T>(callback: () => T): T {\n  if (!('console' in GLOBAL_OBJ)) {\n    return callback();\n  }\n\n  const console = GLOBAL_OBJ.console;\n  const wrappedFuncs: Partial<Record<ConsoleLevel, (...args: unknown[]) => void>> = {};\n\n  const wrappedLevels = Object.keys(originalConsoleMethods) as ConsoleLevel[];\n\n  // Restore all wrapped console methods\n  wrappedLevels.forEach(level => {\n    const originalConsoleMethod = originalConsoleMethods[level];\n    wrappedFuncs[level] = console[level] as (...args: unknown[]) => void;\n    console[level] = originalConsoleMethod as (...args: unknown[]) => void;\n  });\n\n  try {\n    return callback();\n  } finally {\n    // Revert restoration to wrapped state\n    wrappedLevels.forEach(level => {\n      console[level] = wrappedFuncs[level] as (...args: unknown[]) => void;\n    });\n  }\n}\n\nfunction enable(): void {\n  _getLoggerSettings().enabled = true;\n}\n\nfunction disable(): void {\n  _getLoggerSettings().enabled = false;\n}\n\nfunction isEnabled(): boolean {\n  return _getLoggerSettings().enabled;\n}\n\nfunction log(...args: Parameters<typeof console.log>): void {\n  _maybeLog('log', ...args);\n}\n\nfunction warn(...args: Parameters<typeof console.warn>): void {\n  _maybeLog('warn', ...args);\n}\n\nfunction error(...args: Parameters<typeof console.error>): void {\n  _maybeLog('error', ...args);\n}\n\nfunction _maybeLog(level: ConsoleLevel, ...args: Parameters<(typeof console)[typeof level]>): void {\n  if (!DEBUG_BUILD) {\n    return;\n  }\n\n  if (isEnabled()) {\n    consoleSandbox(() => {\n      GLOBAL_OBJ.console[level](`${PREFIX}[${level}]:`, ...args);\n    });\n  }\n}\n\nfunction _getLoggerSettings(): { enabled: boolean } {\n  if (!DEBUG_BUILD) {\n    return { enabled: false };\n  }\n\n  return getGlobalSingleton('loggerSettings', () => ({ enabled: false }));\n}\n\n/**\n * This is a logger singleton which either logs things or no-ops if logging is not enabled.\n */\nexport const debug = {\n  /** Enable logging. */\n  enable,\n  /** Disable logging. */\n  disable,\n  /** Check if logging is enabled. */\n  isEnabled,\n  /** Log a message. */\n  log,\n  /** Log a warning. */\n  warn,\n  /** Log an error. */\n  error,\n} satisfies SentryDebugLogger;\n","import type { Client } from '../client';\nimport { DEBUG_BUILD } from '../debug-build';\nimport type { DsnComponents, DsnLike, DsnProtocol } from '../types/dsn';\nimport { consoleSandbox, debug } from './debug-logger';\n\n/** Regular expression used to extract org ID from a DSN host. */\nconst ORG_ID_REGEX = /^o(\\d+)\\./;\n\n/** Regular expression used to parse a Dsn. */\nconst DSN_REGEX = /^(?:(\\w+):)\\/\\/(?:(\\w+)(?::(\\w+)?)?@)((?:\\[[:.%\\w]+\\]|[\\w.-]+))(?::(\\d+))?\\/(.+)/;\n\nfunction isValidProtocol(protocol?: string): protocol is DsnProtocol {\n  return protocol === 'http' || protocol === 'https';\n}\n\n/**\n * Renders the string representation of this Dsn.\n *\n * By default, this will render the public representation without the password\n * component. To get the deprecated private representation, set `withPassword`\n * to true.\n *\n * @param withPassword When set to true, the password will be included.\n */\nexport function dsnToString(dsn: DsnComponents, withPassword: boolean = false): string {\n  const { host, path, pass, port, projectId, protocol, publicKey } = dsn;\n  return (\n    `${protocol}://${publicKey}${withPassword && pass ? `:${pass}` : ''}` +\n    `@${host}${port ? `:${port}` : ''}/${path ? `${path}/` : path}${projectId}`\n  );\n}\n\n/**\n * Parses a Dsn from a given string.\n *\n * @param str A Dsn as string\n * @returns Dsn as DsnComponents or undefined if @param str is not a valid DSN string\n */\nexport function dsnFromString(str: string): DsnComponents | undefined {\n  const match = DSN_REGEX.exec(str);\n\n  if (!match) {\n    // This should be logged to the console\n    consoleSandbox(() => {\n      // eslint-disable-next-line no-console\n      console.error(`Invalid Sentry Dsn: ${str}`);\n    });\n    return undefined;\n  }\n\n  const [protocol, publicKey, pass = '', host = '', port = '', lastPath = ''] = match.slice(1);\n  let path = '';\n  let projectId = lastPath;\n\n  const split = projectId.split('/');\n  if (split.length > 1) {\n    path = split.slice(0, -1).join('/');\n    projectId = split.pop() as string;\n  }\n\n  if (projectId) {\n    const projectMatch = projectId.match(/^\\d+/);\n    if (projectMatch) {\n      projectId = projectMatch[0];\n    }\n  }\n\n  return dsnFromComponents({ host, pass, path, projectId, port, protocol: protocol as DsnProtocol, publicKey });\n}\n\nfunction dsnFromComponents(components: DsnComponents): DsnComponents {\n  return {\n    protocol: components.protocol,\n    publicKey: components.publicKey || '',\n    pass: components.pass || '',\n    host: components.host,\n    port: components.port || '',\n    path: components.path || '',\n    projectId: components.projectId,\n  };\n}\n\nfunction validateDsn(dsn: DsnComponents): boolean {\n  if (!DEBUG_BUILD) {\n    return true;\n  }\n\n  const { port, projectId, protocol } = dsn;\n\n  const requiredComponents: ReadonlyArray<keyof DsnComponents> = ['protocol', 'publicKey', 'host', 'projectId'];\n  const hasMissingRequiredComponent = requiredComponents.find(component => {\n    if (!dsn[component]) {\n      debug.error(`Invalid Sentry Dsn: ${component} missing`);\n      return true;\n    }\n    return false;\n  });\n\n  if (hasMissingRequiredComponent) {\n    return false;\n  }\n\n  if (!projectId.match(/^\\d+$/)) {\n    debug.error(`Invalid Sentry Dsn: Invalid projectId ${projectId}`);\n    return false;\n  }\n\n  if (!isValidProtocol(protocol)) {\n    debug.error(`Invalid Sentry Dsn: Invalid protocol ${protocol}`);\n    return false;\n  }\n\n  if (port && isNaN(parseInt(port, 10))) {\n    debug.error(`Invalid Sentry Dsn: Invalid port ${port}`);\n    return false;\n  }\n\n  return true;\n}\n\n/**\n * Extract the org ID from a DSN host.\n *\n * @param host The host from a DSN\n * @returns The org ID if found, undefined otherwise\n */\nexport function extractOrgIdFromDsnHost(host: string): string | undefined {\n  const match = host.match(ORG_ID_REGEX);\n\n  return match?.[1];\n}\n\n/**\n *  Returns the organization ID of the client.\n *\n *  The organization ID is extracted from the DSN. If the client options include a `orgId`, this will always take precedence.\n */\nexport function extractOrgIdFromClient(client: Client): string | undefined {\n  const options = client.getOptions();\n\n  const { host } = client.getDsn() || {};\n\n  let org_id: string | undefined;\n\n  if (options.orgId) {\n    org_id = String(options.orgId);\n  } else if (host) {\n    org_id = extractOrgIdFromDsnHost(host);\n  }\n\n  return org_id;\n}\n\n/**\n * Creates a valid Sentry Dsn object, identifying a Sentry instance and project.\n * @returns a valid DsnComponents object or `undefined` if @param from is an invalid DSN source\n */\nexport function makeDsn(from: DsnLike): DsnComponents | undefined {\n  const components = typeof from === 'string' ? dsnFromString(from) : dsnFromComponents(from);\n  if (!components || !validateDsn(components)) {\n    return undefined;\n  }\n  return components;\n}\n","/*\n * This module exists for optimizations in the build process through rollup and terser.  We define some global\n * constants, which can be overridden during build. By guarding certain pieces of code with functions that return these\n * constants, we can control whether or not they appear in the final bundle. (Any code guarded by a false condition will\n * never run, and will hence be dropped during treeshaking.) The two primary uses for this are stripping out calls to\n * `debug` and preventing node-related code from appearing in browser bundles.\n *\n * Attention:\n * This file should not be used to define constants/flags that are intended to be used for tree-shaking conducted by\n * users. These flags should live in their respective packages, as we identified user tooling (specifically webpack)\n * having issues tree-shaking these constants across package boundaries.\n * An example for this is the __SENTRY_DEBUG__ constant. It is declared in each package individually because we want\n * users to be able to shake away expressions that it guards.\n */\n\ndeclare const __SENTRY_BROWSER_BUNDLE__: boolean | undefined;\n\nexport type SdkSource = 'npm' | 'cdn' | 'loader' | 'aws-lambda-layer';\n\n/**\n * Figures out if we're building a browser bundle.\n *\n * @returns true if this is a browser bundle build.\n */\nexport function isBrowserBundle(): boolean {\n  return typeof __SENTRY_BROWSER_BUNDLE__ !== 'undefined' && !!__SENTRY_BROWSER_BUNDLE__;\n}\n\n/**\n * Get source of SDK.\n */\nexport function getSDKSource(): SdkSource {\n  // The `/*! ... */` marker is replaced by our CDN bundle build step with `return 'cdn';`.\n  // It uses the `/*!` legal-comment syntax specifically so it survives esbuild's transpile\n  // (which strips ordinary `/* ... */` block comments).\n  /*! __SENTRY_SDK_SOURCE__ */ return 'npm';\n}\n","export const FALSY_ENV_VALUES = new Set(['false', 'f', 'n', 'no', 'off', '0']);\nexport const TRUTHY_ENV_VALUES = new Set(['true', 't', 'y', 'yes', 'on', '1']);\n\nexport type StrictBoolCast = {\n  strict: true;\n};\n\nexport type LooseBoolCast = {\n  strict?: false;\n};\n\nexport type BoolCastOptions = StrictBoolCast | LooseBoolCast;\n\nexport function envToBool(value: unknown, options?: LooseBoolCast): boolean;\nexport function envToBool(value: unknown, options: StrictBoolCast): boolean | null;\nexport function envToBool(value: unknown, options?: BoolCastOptions): boolean | null;\n/**\n * A helper function which casts an ENV variable value to `true` or `false` using the constants defined above.\n * In strict mode, it may return `null` if the value doesn't match any of the predefined values.\n *\n * @param value The value of the env variable\n * @param options -- Only has `strict` key for now, which requires a strict match for `true` in TRUTHY_ENV_VALUES\n * @returns true/false if the lowercase value matches the predefined values above. If not, null in strict mode,\n *          and Boolean(value) in loose mode.\n */\nexport function envToBool(value: unknown, options?: BoolCastOptions): boolean | null {\n  const normalized = String(value).toLowerCase();\n\n  if (FALSY_ENV_VALUES.has(normalized)) {\n    return false;\n  }\n\n  if (TRUTHY_ENV_VALUES.has(normalized)) {\n    return true;\n  }\n\n  return options?.strict ? null : Boolean(value);\n}\n","import { getSentryCarrier } from '../carrier';\nimport type { Attachment } from '../types/attachment';\nimport type { DataCategory } from '../types/datacategory';\nimport type { DsnComponents } from '../types/dsn';\nimport type {\n  AttachmentItem,\n  BaseEnvelopeHeaders,\n  BaseEnvelopeItemHeaders,\n  Envelope,\n  EnvelopeItemType,\n  EventEnvelopeHeaders,\n  SpanItem,\n} from '../types/envelope';\nimport type { Event } from '../types/event';\nimport type { SdkInfo } from '../types/sdkinfo';\nimport type { SdkMetadata } from '../types/sdkmetadata';\nimport type { SpanJSON } from '../types/span';\nimport { dsnToString } from './dsn';\nimport { normalize } from './normalize';\nimport { safeDateNow } from './randomSafeContext';\nimport { GLOBAL_OBJ } from './worldwide';\n\n/**\n * Creates an envelope.\n * Make sure to always explicitly provide the generic to this function\n * so that the envelope types resolve correctly.\n */\nexport function createEnvelope<E extends Envelope>(headers: E[0], items: E[1] = []): E {\n  return [headers, items] as E;\n}\n\n/**\n * Add an item to an envelope.\n * Make sure to always explicitly provide the generic to this function\n * so that the envelope types resolve correctly.\n */\nexport function addItemToEnvelope<E extends Envelope>(envelope: E, newItem: E[1][number]): E {\n  const [headers, items] = envelope;\n  return [headers, [...items, newItem]] as unknown as E;\n}\n\n/**\n * Convenience function to loop through the items and item types of an envelope.\n * (This function was mostly created because working with envelope types is painful at the moment)\n *\n * If the callback returns true, the rest of the items will be skipped.\n */\nexport function forEachEnvelopeItem<E extends Envelope>(\n  envelope: Envelope,\n  callback: (envelopeItem: E[1][number], envelopeItemType: E[1][number][0]['type']) => boolean | void,\n): boolean {\n  const envelopeItems = envelope[1];\n\n  for (const envelopeItem of envelopeItems) {\n    const envelopeItemType = envelopeItem[0].type;\n    const result = callback(envelopeItem, envelopeItemType);\n\n    if (result) {\n      return true;\n    }\n  }\n\n  return false;\n}\n\n/**\n * Returns true if the envelope contains any of the given envelope item types\n */\nexport function envelopeContainsItemType(envelope: Envelope, types: EnvelopeItemType[]): boolean {\n  return forEachEnvelopeItem(envelope, (_, type) => types.includes(type));\n}\n\n/**\n * Encode a string to UTF8 array.\n */\nfunction encodeUTF8(input: string): Uint8Array {\n  const carrier = getSentryCarrier(GLOBAL_OBJ);\n  return carrier.encodePolyfill ? carrier.encodePolyfill(input) : new TextEncoder().encode(input);\n}\n\n/**\n * Decode a UTF8 array to string.\n */\nfunction decodeUTF8(input: Uint8Array): string {\n  const carrier = getSentryCarrier(GLOBAL_OBJ);\n  return carrier.decodePolyfill ? carrier.decodePolyfill(input) : new TextDecoder().decode(input);\n}\n\n/**\n * Serializes an envelope.\n */\nexport function serializeEnvelope(envelope: Envelope): string | Uint8Array {\n  const [envHeaders, items] = envelope;\n  // Initially we construct our envelope as a string and only convert to binary chunks if we encounter binary data\n  let parts: string | Uint8Array[] = JSON.stringify(envHeaders);\n\n  function append(next: string | Uint8Array): void {\n    if (typeof parts === 'string') {\n      parts = typeof next === 'string' ? parts + next : [encodeUTF8(parts), next];\n    } else {\n      parts.push(typeof next === 'string' ? encodeUTF8(next) : next);\n    }\n  }\n\n  for (const item of items) {\n    const [itemHeaders, payload] = item;\n\n    append(`\\n${JSON.stringify(itemHeaders)}\\n`);\n\n    if (typeof payload === 'string' || payload instanceof Uint8Array) {\n      append(payload);\n    } else {\n      let stringifiedPayload: string;\n      try {\n        stringifiedPayload = JSON.stringify(payload);\n      } catch {\n        // In case, despite all our efforts to keep `payload` circular-dependency-free, `JSON.stringify()` still\n        // fails, we try again after normalizing it again with infinite normalization depth. This of course has a\n        // performance impact but in this case a performance hit is better than throwing.\n        stringifiedPayload = JSON.stringify(normalize(payload));\n      }\n      append(stringifiedPayload);\n    }\n  }\n\n  return typeof parts === 'string' ? parts : concatBuffers(parts);\n}\n\nfunction concatBuffers(buffers: Uint8Array[]): Uint8Array {\n  const totalLength = buffers.reduce((acc, buf) => acc + buf.length, 0);\n\n  const merged = new Uint8Array(totalLength);\n  let offset = 0;\n  for (const buffer of buffers) {\n    merged.set(buffer, offset);\n    offset += buffer.length;\n  }\n\n  return merged;\n}\n\n/**\n * Parses an envelope\n */\nexport function parseEnvelope(env: string | Uint8Array): Envelope {\n  let buffer = typeof env === 'string' ? encodeUTF8(env) : env;\n\n  function readBinary(length: number): Uint8Array {\n    const bin = buffer.subarray(0, length);\n    // Replace the buffer with the remaining data excluding trailing newline\n    buffer = buffer.subarray(length + 1);\n    return bin;\n  }\n\n  function readJson<T>(): T {\n    let i = buffer.indexOf(0xa);\n    // If we couldn't find a newline, we must have found the end of the buffer\n    if (i < 0) {\n      i = buffer.length;\n    }\n\n    return JSON.parse(decodeUTF8(readBinary(i))) as T;\n  }\n\n  const envelopeHeader = readJson<BaseEnvelopeHeaders>();\n  // eslint-disable-next-line @typescript-eslint/no-explicit-any\n  const items: [any, any][] = [];\n\n  while (buffer.length) {\n    const itemHeader = readJson<BaseEnvelopeItemHeaders>();\n    const binaryLength = typeof itemHeader.length === 'number' ? itemHeader.length : undefined;\n\n    items.push([itemHeader, binaryLength ? readBinary(binaryLength) : readJson()]);\n  }\n\n  return [envelopeHeader, items];\n}\n\n/**\n * Creates envelope item for a single span\n */\nexport function createSpanEnvelopeItem(spanJson: Partial<SpanJSON>): SpanItem {\n  const spanHeaders: SpanItem[0] = {\n    type: 'span',\n  };\n\n  return [spanHeaders, spanJson];\n}\n\n/**\n * Creates attachment envelope items\n */\nexport function createAttachmentEnvelopeItem(attachment: Attachment): AttachmentItem {\n  const buffer = typeof attachment.data === 'string' ? encodeUTF8(attachment.data) : attachment.data;\n\n  return [\n    {\n      type: 'attachment',\n      length: buffer.length,\n      filename: attachment.filename,\n      content_type: attachment.contentType,\n      attachment_type: attachment.attachmentType,\n    },\n    buffer,\n  ];\n}\n\ntype OverriddenItemType = Exclude<EnvelopeItemType, DataCategory>;\n\n// Map of envelope item types to data categories where the category differs from the type.\n// Types that map to themselves (session, attachment, transaction, profile, feedback, span, metric) fall through.\nconst DATA_CATEGORY_OVERRIDES: Record<OverriddenItemType, DataCategory> = {\n  sessions: 'session',\n  event: 'error',\n  client_report: 'internal',\n  user_report: 'default',\n  profile_chunk: 'profile',\n  replay_event: 'replay',\n  replay_recording: 'replay',\n  check_in: 'monitor',\n  raw_security: 'security',\n  log: 'log_item',\n  trace_metric: 'metric',\n};\n\nfunction _isOverriddenType(type: EnvelopeItemType): type is OverriddenItemType {\n  return type in DATA_CATEGORY_OVERRIDES;\n}\n\n/**\n * Maps the type of an envelope item to a data category.\n */\nexport function envelopeItemTypeToDataCategory(type: EnvelopeItemType): DataCategory {\n  return _isOverriddenType(type) ? DATA_CATEGORY_OVERRIDES[type] : type;\n}\n\n/** Extracts the minimal SDK info from the metadata or an events */\nexport function getSdkMetadataForEnvelopeHeader(metadataOrEvent?: SdkMetadata | Event): SdkInfo | undefined {\n  if (!metadataOrEvent?.sdk) {\n    return;\n  }\n  const { name, version } = metadataOrEvent.sdk;\n  return { name, version };\n}\n\n/**\n * Creates event envelope headers, based on event, sdk info and tunnel\n * Note: This function was extracted from the core package to make it available in Replay\n */\nexport function createEventEnvelopeHeaders(\n  event: Event,\n  sdkInfo: SdkInfo | undefined,\n  tunnel: string | undefined,\n  dsn?: DsnComponents,\n): EventEnvelopeHeaders {\n  const dynamicSamplingContext = event.sdkProcessingMetadata?.dynamicSamplingContext;\n  return {\n    event_id: event.event_id as string,\n    sent_at: new Date(safeDateNow()).toISOString(),\n    ...(sdkInfo && { sdk: sdkInfo }),\n    ...(!!tunnel && dsn && { dsn: dsnToString(dsn) }),\n    ...(dynamicSamplingContext && {\n      trace: dynamicSamplingContext,\n    }),\n  };\n}\n","import type { ConsoleLevel } from '../types/instrument';\n\n/**\n * An error emitted by Sentry SDKs and related utilities.\n * @deprecated This class is no longer used and will be removed in a future version. Use `Error` instead.\n */\nexport class SentryError extends Error {\n  public logLevel: ConsoleLevel;\n\n  public constructor(\n    public message: string,\n    logLevel: ConsoleLevel = 'warn',\n  ) {\n    super(message);\n\n    this.logLevel = logLevel;\n  }\n}\n","import type { Event } from '../types/event';\n\n/**\n * Get a list of possible event messages from a Sentry event.\n */\nexport function getPossibleEventMessages(event: Event): string[] {\n  const possibleMessages: string[] = [];\n\n  if (event.message) {\n    possibleMessages.push(event.message);\n  }\n\n  try {\n    // @ts-expect-error Try catching to save bundle size\n    const lastException = event.exception.values[event.exception.values.length - 1];\n    if (lastException?.value) {\n      possibleMessages.push(lastException.value);\n      if (lastException.type) {\n        possibleMessages.push(`${lastException.type}: ${lastException.value}`);\n      }\n    }\n  } catch {\n    // ignore errors here\n  }\n\n  return possibleMessages;\n}\n","import type { Client } from '../client';\nimport type { Event, EventHint } from '../types/event';\nimport type { Exception } from '../types/exception';\nimport type { Extras } from '../types/extra';\nimport type { Mechanism } from '../types/mechanism';\nimport type { ParameterizedString } from '../types/parameterize';\nimport type { SeverityLevel } from '../types/severity';\nimport type { StackFrame } from '../types/stackframe';\nimport type { StackParser } from '../types/stacktrace';\nimport { isError, isErrorEvent, isParameterizedString, isPlainObject } from './is';\nimport { addExceptionMechanism, addExceptionTypeValue } from './misc';\nimport { normalizeToSize } from './normalize';\nimport { extractExceptionKeysForMessage } from './object';\n\n/**\n * Extracts stack frames from the error.stack string\n */\nexport function parseStackFrames(stackParser: StackParser, error: Error): StackFrame[] {\n  return stackParser(error.stack || '', 1);\n}\n\nfunction hasSentryFetchUrlHost(error: unknown): error is Error & { __sentry_fetch_url_host__: string } {\n  return isError(error) && '__sentry_fetch_url_host__' in error && typeof error.__sentry_fetch_url_host__ === 'string';\n}\n\n/**\n * Enhances the error message with the hostname for better Sentry error reporting.\n * This allows third-party packages to still match on the original error message,\n * while Sentry gets the enhanced version with context.\n *\n * Only used internally\n * @hidden\n */\nexport function _enhanceErrorWithSentryInfo<T extends Error>(error: T): string {\n  // If the error has a __sentry_fetch_url_host__ property (added by fetch instrumentation),\n  // enhance the error message with the hostname.\n  if (hasSentryFetchUrlHost(error)) {\n    return `${error.message} (${error.__sentry_fetch_url_host__})`;\n  }\n\n  return error.message;\n}\n\n/**\n * Extracts stack frames from the error and builds a Sentry Exception\n */\nexport function exceptionFromError(stackParser: StackParser, error: Error): Exception {\n  const exception: Exception = {\n    type: error.name || error.constructor.name,\n    value: _enhanceErrorWithSentryInfo(error),\n  };\n\n  const frames = parseStackFrames(stackParser, error);\n  if (frames.length) {\n    exception.stacktrace = { frames };\n  }\n\n  return exception;\n}\n\n/** If a plain object has a property that is an `Error`, return this error. */\nfunction getErrorPropertyFromObject(obj: Record<string, unknown>): Error | undefined {\n  for (const prop in obj) {\n    if (Object.prototype.hasOwnProperty.call(obj, prop)) {\n      const value = obj[prop];\n      if (isError(value)) {\n        return value;\n      }\n    }\n  }\n\n  return undefined;\n}\n\nfunction getMessageForObject(exception: Record<string, unknown>): string {\n  if ('name' in exception && typeof exception.name === 'string') {\n    let message = `'${exception.name}' captured as exception`;\n\n    if ('message' in exception && typeof exception.message === 'string') {\n      message += ` with message '${exception.message}'`;\n    }\n\n    return message;\n  } else if ('message' in exception && typeof exception.message === 'string') {\n    return exception.message;\n  }\n\n  const keys = extractExceptionKeysForMessage(exception);\n\n  // Some ErrorEvent instances do not have an `error` property, which is why they are not handled before\n  // We still want to try to get a decent message for these cases\n  if (isErrorEvent(exception)) {\n    return `Event \\`ErrorEvent\\` captured as exception with message \\`${exception.message}\\``;\n  }\n\n  const className = getObjectClassName(exception);\n\n  return `${\n    className && className !== 'Object' ? `'${className}'` : 'Object'\n  } captured as exception with keys: ${keys}`;\n}\n\nfunction getObjectClassName(obj: unknown): string | undefined | void {\n  try {\n    const prototype: unknown | null = Object.getPrototypeOf(obj);\n    return prototype ? prototype.constructor.name : undefined;\n  } catch {\n    // ignore errors here\n  }\n}\n\nfunction getException(\n  client: Client,\n  mechanism: Mechanism,\n  exception: unknown,\n  hint?: EventHint,\n): [Error, Extras | undefined] {\n  if (isError(exception)) {\n    return [exception, undefined];\n  }\n\n  // Mutate this!\n  mechanism.synthetic = true;\n\n  if (isPlainObject(exception)) {\n    const normalizeDepth = client?.getOptions().normalizeDepth;\n    const extras = { ['__serialized__']: normalizeToSize(exception, normalizeDepth) };\n\n    const errorFromProp = getErrorPropertyFromObject(exception);\n    if (errorFromProp) {\n      return [errorFromProp, extras];\n    }\n\n    const message = getMessageForObject(exception);\n    const ex = hint?.syntheticException || new Error(message);\n    ex.message = message;\n\n    return [ex, extras];\n  }\n\n  // This handles when someone does: `throw \"something awesome\";`\n  // We use synthesized Error here so we can extract a (rough) stack trace.\n  const ex = hint?.syntheticException || new Error(exception as string);\n  ex.message = `${exception}`;\n\n  return [ex, undefined];\n}\n\n/**\n * Builds and Event from a Exception\n * @hidden\n */\nexport function eventFromUnknownInput(\n  client: Client,\n  stackParser: StackParser,\n  exception: unknown,\n  hint?: EventHint,\n): Event {\n  const providedMechanism: Mechanism | undefined = hint?.data && (hint.data as { mechanism: Mechanism }).mechanism;\n  const mechanism: Mechanism = providedMechanism || {\n    handled: true,\n    type: 'generic',\n  };\n\n  const [ex, extras] = getException(client, mechanism, exception, hint);\n\n  const event: Event = {\n    exception: {\n      values: [exceptionFromError(stackParser, ex)],\n    },\n  };\n\n  if (extras) {\n    event.extra = extras;\n  }\n\n  addExceptionTypeValue(event, undefined, undefined);\n  addExceptionMechanism(event, mechanism);\n\n  return {\n    ...event,\n    event_id: hint?.event_id,\n  };\n}\n\n/**\n * Builds and Event from a Message\n * @hidden\n */\nexport function eventFromMessage(\n  stackParser: StackParser,\n  message: ParameterizedString,\n  level: SeverityLevel = 'info',\n  hint?: EventHint,\n  attachStacktrace?: boolean,\n): Event {\n  const event: Event = {\n    event_id: hint?.event_id,\n    level,\n  };\n\n  if (attachStacktrace && hint?.syntheticException) {\n    const frames = parseStackFrames(stackParser, hint.syntheticException);\n    if (frames.length) {\n      event.exception = {\n        values: [\n          {\n            value: message,\n            stacktrace: { frames },\n          },\n        ],\n      };\n      addExceptionMechanism(event, { synthetic: true });\n    }\n  }\n\n  if (isParameterizedString(message)) {\n    const { __sentry_template_string__, __sentry_template_values__ } = message;\n\n    event.logentry = {\n      message: __sentry_template_string__,\n      params: __sentry_template_values__,\n    };\n    return event;\n  }\n\n  event.message = message;\n  return event;\n}\n","/**\n * Replaces constructor functions in module exports, handling read-only properties,\n * and both default and named exports by wrapping them with the constructor.\n *\n * @param exports The module exports object to modify\n * @param exportName The name of the export to replace (e.g., 'GoogleGenAI', 'Anthropic', 'OpenAI')\n * @param wrappedConstructor The wrapped constructor function to replace the original with\n * @returns void\n */\nexport function replaceExports(\n  exports: { [key: string]: unknown },\n  exportName: string,\n  wrappedConstructor: unknown,\n): void {\n  const original = exports[exportName];\n\n  if (typeof original !== 'function') {\n    return;\n  }\n\n  // Replace the named export - handle read-only properties\n  try {\n    exports[exportName] = wrappedConstructor;\n  } catch {\n    // If direct assignment fails, override the property descriptor\n    Object.defineProperty(exports, exportName, {\n      value: wrappedConstructor,\n      writable: true,\n      configurable: true,\n      enumerable: true,\n    });\n  }\n\n  // Replace the default export if it points to the original constructor\n  if (exports.default === original) {\n    try {\n      exports.default = wrappedConstructor;\n    } catch {\n      Object.defineProperty(exports, 'default', {\n        value: wrappedConstructor,\n        writable: true,\n        configurable: true,\n        enumerable: true,\n      });\n    }\n  }\n}\n","import { getCurrentScope } from '../currentScopes';\nimport { DEBUG_BUILD } from '../debug-build';\nimport { type Event } from '../types/event';\nimport { debug } from './debug-logger';\nimport { getActiveSpan, spanToJSON } from './spanUtils';\n\n/**\n * Ordered LRU cache for storing feature flags in the scope context. The name\n * of each flag in the buffer is unique, and the output of getAll() is ordered\n * from oldest to newest.\n */\n\nexport type FeatureFlag = { readonly flag: string; readonly result: boolean };\n\n/**\n * Max size of the LRU flag buffer stored in Sentry scope and event contexts.\n */\nexport const _INTERNAL_FLAG_BUFFER_SIZE = 100;\n\n/**\n * Max number of flag evaluations to record per span.\n */\nexport const _INTERNAL_MAX_FLAGS_PER_SPAN = 10;\n\nconst SPAN_FLAG_ATTRIBUTE_PREFIX = 'flag.evaluation.';\n\n/**\n * Copies feature flags that are in current scope context to the event context\n */\nexport function _INTERNAL_copyFlagsFromScopeToEvent(event: Event): Event {\n  if (event.type) {\n    // No need to add the flags context to transaction events.\n    // Spans already get the flag.evaluation attributes.\n    return event;\n  }\n\n  const scope = getCurrentScope();\n  const flagContext = scope.getScopeData().contexts.flags;\n  const flagBuffer = flagContext ? flagContext.values : [];\n\n  if (!flagBuffer.length) {\n    return event;\n  }\n\n  if (event.contexts === undefined) {\n    event.contexts = {};\n  }\n  event.contexts.flags = { values: [...flagBuffer] };\n  return event;\n}\n\n/**\n * Inserts a flag into the current scope's context while maintaining ordered LRU properties.\n * Not thread-safe. After inserting:\n * - The flag buffer is sorted in order of recency, with the newest evaluation at the end.\n * - The names in the buffer are always unique.\n * - The length of the buffer never exceeds `maxSize`.\n *\n * @param name     Name of the feature flag to insert.\n * @param value    Value of the feature flag.\n * @param maxSize  Max number of flags the buffer should store. Default value should always be used in production.\n */\nexport function _INTERNAL_insertFlagToScope(\n  name: string,\n  value: unknown,\n  maxSize: number = _INTERNAL_FLAG_BUFFER_SIZE,\n): void {\n  const scopeContexts = getCurrentScope().getScopeData().contexts;\n  if (!scopeContexts.flags) {\n    scopeContexts.flags = { values: [] };\n  }\n  const flags = scopeContexts.flags.values;\n  _INTERNAL_insertToFlagBuffer(flags, name, value, maxSize);\n}\n\n/**\n * Exported for tests only. Currently only accepts boolean values (otherwise no-op).\n * Inserts a flag into a FeatureFlag array while maintaining the following properties:\n * - Flags are sorted in order of recency, with the newest evaluation at the end.\n * - The flag names are always unique.\n * - The length of the array never exceeds `maxSize`.\n *\n * @param flags      The buffer to insert the flag into.\n * @param name       Name of the feature flag to insert.\n * @param value      Value of the feature flag.\n * @param maxSize    Max number of flags the buffer should store. Default value should always be used in production.\n */\nexport function _INTERNAL_insertToFlagBuffer(\n  flags: FeatureFlag[],\n  name: string,\n  value: unknown,\n  maxSize: number,\n): void {\n  if (typeof value !== 'boolean') {\n    return;\n  }\n\n  if (flags.length > maxSize) {\n    DEBUG_BUILD && debug.error(`[Feature Flags] insertToFlagBuffer called on a buffer larger than maxSize=${maxSize}`);\n    return;\n  }\n\n  // Check if the flag is already in the buffer - O(n)\n  const index = flags.findIndex(f => f.flag === name);\n\n  if (index !== -1) {\n    // The flag was found, remove it from its current position - O(n)\n    flags.splice(index, 1);\n  }\n\n  if (flags.length === maxSize) {\n    // If at capacity, pop the earliest flag - O(n)\n    flags.shift();\n  }\n\n  // Push the flag to the end - O(1)\n  flags.push({\n    flag: name,\n    result: value,\n  });\n}\n\n/**\n * Records a feature flag evaluation for the active span. This is a no-op for non-boolean values.\n * The flag and its value is stored in span attributes with the `flag.evaluation` prefix. Once the\n * unique flags for a span reaches maxFlagsPerSpan, subsequent flags are dropped.\n *\n * @param name             Name of the feature flag.\n * @param value            Value of the feature flag. Non-boolean values are ignored.\n * @param maxFlagsPerSpan  Max number of flags a buffer should store. Default value should always be used in production.\n */\nexport function _INTERNAL_addFeatureFlagToActiveSpan(\n  name: string,\n  value: unknown,\n  maxFlagsPerSpan: number = _INTERNAL_MAX_FLAGS_PER_SPAN,\n): void {\n  if (typeof value !== 'boolean') {\n    return;\n  }\n\n  const span = getActiveSpan();\n  if (!span) {\n    return;\n  }\n\n  const attributes = spanToJSON(span).data;\n\n  // If the flag already exists, always update it\n  if (`${SPAN_FLAG_ATTRIBUTE_PREFIX}${name}` in attributes) {\n    span.setAttribute(`${SPAN_FLAG_ATTRIBUTE_PREFIX}${name}`, value);\n    return;\n  }\n\n  // Else, add the flag to the span if we have not reached the max number of flags\n  const numOfAddedFlags = Object.keys(attributes).filter(key => key.startsWith(SPAN_FLAG_ATTRIBUTE_PREFIX)).length;\n  if (numOfAddedFlags < maxFlagsPerSpan) {\n    span.setAttribute(`${SPAN_FLAG_ATTRIBUTE_PREFIX}${name}`, value);\n  }\n}\n","import { flush } from '../exports';\nimport { debug } from './debug-logger';\nimport { vercelWaitUntil } from './vercelWaitUntil';\nimport { GLOBAL_OBJ } from './worldwide';\n\ntype MinimalCloudflareContext = {\n  // eslint-disable-next-line @typescript-eslint/no-explicit-any\n  waitUntil(promise: Promise<any>): void;\n};\n\nasync function flushWithTimeout(timeout: number): Promise<void> {\n  try {\n    debug.log('Flushing events...');\n    await flush(timeout);\n    debug.log('Done flushing events');\n  } catch (e) {\n    debug.log('Error while flushing events:\\n', e);\n  }\n}\n\n/**\n *  Flushes the event queue with a timeout in serverless environments to ensure that events are sent to Sentry before the\n *  serverless function execution ends.\n *\n * The function is async, but in environments that support a `waitUntil` mechanism, it will run synchronously.\n *\n * This function is aware of the following serverless platforms:\n * - Cloudflare: If a Cloudflare context is provided, it will use `ctx.waitUntil()` to flush events (keeps the `this` context of `ctx`).\n *               If a `cloudflareWaitUntil` function is provided, it will use that to flush events (looses the `this` context of `ctx`).\n * - Vercel: It detects the Vercel environment and uses Vercel's `waitUntil` function.\n * - Other Serverless (AWS Lambda, Google Cloud, etc.): It detects the environment via environment variables\n *   and uses a regular `await flush()`.\n *\n *  @internal This function is supposed for internal Sentry SDK usage only.\n *  @hidden\n */\nexport async function flushIfServerless(\n  params: // eslint-disable-next-line @typescript-eslint/no-explicit-any\n    | { timeout?: number; cloudflareWaitUntil?: (task: Promise<any>) => void }\n    | { timeout?: number; cloudflareCtx?: MinimalCloudflareContext } = {},\n): Promise<void> {\n  const { timeout = 2000 } = params;\n\n  if ('cloudflareWaitUntil' in params && typeof params?.cloudflareWaitUntil === 'function') {\n    params.cloudflareWaitUntil(flushWithTimeout(timeout));\n    return;\n  }\n\n  if ('cloudflareCtx' in params && typeof params.cloudflareCtx?.waitUntil === 'function') {\n    params.cloudflareCtx.waitUntil(flushWithTimeout(timeout));\n    return;\n  }\n\n  // Note: vercelWaitUntil only does something in Vercel Edge runtime\n  // In Node runtime, we use process.on('SIGTERM') instead\n  // @ts-expect-error This is not typed\n  if (GLOBAL_OBJ[Symbol.for('@vercel/request-context')]) {\n    // Vercel has a waitUntil equivalent that works without execution context\n    vercelWaitUntil(flushWithTimeout(timeout));\n    return;\n  }\n\n  if (typeof process === 'undefined') {\n    return;\n  }\n\n  const isServerless =\n    !!process.env.FUNCTIONS_WORKER_RUNTIME || // Azure Functions\n    !!process.env.LAMBDA_TASK_ROOT || // AWS Lambda\n    !!process.env.K_SERVICE || // Google Cloud Run\n    !!process.env.CF_PAGES || // Cloudflare Pages\n    !!process.env.VERCEL ||\n    !!process.env.NETLIFY;\n\n  if (isServerless) {\n    // Use regular flush for environments without a generic waitUntil mechanism\n    await flushWithTimeout(timeout);\n  }\n}\n","/**\n * Often we patch a module's default export, but we want to be able to do\n * something like this:\n *\n * ```ts\n * patchTheThing(await import('the-thing'));\n * ```\n *\n * Or like this:\n *\n * ```ts\n * import theThing from 'the-thing';\n * patchTheThing(theThing);\n * ```\n *\n * Note: this does not support modules with a falsey default export. However,\n * presumably in those cases, there's no default export to patch anyway.\n */\nexport function getDefaultExport<T>(moduleExport: T | { default: T }): T {\n  return (\n    (!!moduleExport &&\n      typeof moduleExport === 'object' &&\n      'default' in moduleExport &&\n      (moduleExport as { default: T }).default) ||\n    (moduleExport as T)\n  );\n}\n","import { chainAndCopyPromiseLike } from '../utils/chain-and-copy-promiselike';\nimport { isThenable } from '../utils/is';\n\n/* eslint-disable */\n// Vendor \"Awaited\" in to be TS 3.8 compatible\ntype AwaitedPromise<T> = T extends null | undefined\n  ? T // special case for `null | undefined` when not in `--strictNullChecks` mode\n  : T extends object & { then(onfulfilled: infer F, ...args: infer _): any } // `await` only unwraps object types with a callable `then`. Non-object types are not unwrapped\n    ? F extends (value: infer V, ...args: infer _) => any // if the argument to `then` is callable, extracts the first argument\n      ? V // normally this would recursively unwrap, but this is not possible in TS3.8\n      : never // the argument to `then` was not callable\n    : T; // non-object or non-thenable\n/* eslint-enable */\n\n// eslint-disable-next-line @typescript-eslint/no-explicit-any\nexport function handleCallbackErrors<Fn extends () => Promise<any>, PromiseValue = AwaitedPromise<ReturnType<Fn>>>(\n  fn: Fn,\n  onError: (error: unknown) => void,\n  onFinally?: () => void,\n  onSuccess?: (result: PromiseValue) => void,\n): ReturnType<Fn>;\n// eslint-disable-next-line @typescript-eslint/no-explicit-any\nexport function handleCallbackErrors<Fn extends () => any>(\n  fn: Fn,\n  onError: (error: unknown) => void,\n  onFinally?: () => void,\n  onSuccess?: (result: ReturnType<Fn>) => void,\n): ReturnType<Fn>;\n/**\n * Wrap a callback function with error handling.\n * If an error is thrown, it will be passed to the `onError` callback and re-thrown.\n *\n * If the return value of the function is a promise, it will be handled with `maybeHandlePromiseRejection`.\n *\n * If an `onFinally` callback is provided, this will be called when the callback has finished\n * - so if it returns a promise, once the promise resolved/rejected,\n * else once the callback has finished executing.\n * The `onFinally` callback will _always_ be called, no matter if an error was thrown or not.\n */\nexport function handleCallbackErrors<\n  // eslint-disable-next-line @typescript-eslint/no-explicit-any\n  Fn extends () => any,\n  ValueType = ReturnType<Fn>,\n>(\n  fn: Fn,\n  onError: (error: unknown) => void,\n  onFinally: () => void = () => {},\n  onSuccess: (result: ValueType | AwaitedPromise<ValueType>) => void = () => {},\n): ValueType {\n  let maybePromiseResult: ReturnType<Fn>;\n  try {\n    maybePromiseResult = fn();\n  } catch (e) {\n    onError(e);\n    onFinally();\n    throw e;\n  }\n\n  return maybeHandlePromiseRejection(maybePromiseResult, onError, onFinally, onSuccess);\n}\n\n/**\n * Maybe handle a promise rejection.\n * This expects to be given a value that _may_ be a promise, or any other value.\n * If it is a promise, and it rejects, it will call the `onError` callback.\n *\n * For thenable objects with extra methods (like jQuery's jqXHR),\n * this function preserves those methods by wrapping the original thenable in a Proxy\n * that intercepts .then() calls to apply error handling while forwarding all other\n * properties to the original object.\n * This allows code like `startSpan(() => $.ajax(...)).abort()` to work correctly.\n */\nfunction maybeHandlePromiseRejection<MaybePromise>(\n  value: MaybePromise,\n  onError: (error: unknown) => void,\n  onFinally: () => void,\n  onSuccess: (result: MaybePromise | AwaitedPromise<MaybePromise>) => void,\n): MaybePromise {\n  if (isThenable(value)) {\n    return chainAndCopyPromiseLike(\n      value as MaybePromise & PromiseLike<Awaited<typeof value>> & Record<string, unknown>,\n      result => {\n        onFinally();\n        onSuccess(result as Awaited<MaybePromise>);\n      },\n      err => {\n        onError(err);\n        onFinally();\n      },\n    ) as MaybePromise;\n  }\n  // Non-thenable value - call callbacks immediately and return as-is\n  onFinally();\n  onSuccess(value);\n  return value;\n}\n","import { getClient } from '../currentScopes';\nimport type { CoreOptions } from '../types/options';\n\n// Treeshakable guard to remove all code related to tracing\ndeclare const __SENTRY_TRACING__: boolean | undefined;\n\n/**\n * Determines if span recording is currently enabled.\n *\n * Spans are recorded when at least one of `tracesSampleRate` and `tracesSampler`\n * is defined in the SDK config. This function does not make any assumption about\n * sampling decisions, it only checks if the SDK is configured to record spans.\n *\n * Important: This function only determines if span recording is enabled. Trace\n * continuation and propagation is separately controlled and not covered by this function.\n * If this function returns `false`, traces can still be propagated (which is what\n * we refer to by \"Tracing without Performance\")\n * @see https://develop.sentry.dev/sdk/telemetry/traces/tracing-without-performance/\n *\n * @param maybeOptions An SDK options object to be passed to this function.\n * If this option is not provided, the function will use the current client's options.\n */\nexport function hasSpansEnabled(\n  maybeOptions?: Pick<CoreOptions, 'tracesSampleRate' | 'tracesSampler'> | undefined,\n): boolean {\n  if (typeof __SENTRY_TRACING__ === 'boolean' && !__SENTRY_TRACING__) {\n    return false;\n  }\n\n  const options = maybeOptions || getClient()?.getOptions();\n  return (\n    !!options &&\n    // Note: This check is `!= null`, meaning \"nullish\". `0` is not \"nullish\", `undefined` and `null` are. (This comment was brought to you by 15 minutes of questioning life)\n    (options.tracesSampleRate != null || !!options.tracesSampler)\n  );\n}\n","import type { Session, SessionAggregates } from '../types/session';\nimport type { User } from '../types/user';\n\n// By default, we want to infer the IP address, unless this is explicitly set to `null`\n// We do this after all other processing is done\n// If `ip_address` is explicitly set to `null` or a value, we leave it as is\n\n/**\n * @internal\n * @deprecated -- set ip inferral via via SDK metadata options on client instead.\n */\nexport function addAutoIpAddressToUser(objWithMaybeUser: { user?: User | null }): void {\n  if (objWithMaybeUser.user?.ip_address === undefined) {\n    objWithMaybeUser.user = {\n      ...objWithMaybeUser.user,\n      ip_address: '{{auto}}',\n    };\n  }\n}\n\n/**\n * @internal\n */\nexport function addAutoIpAddressToSession(session: Session | SessionAggregates): void {\n  if ('aggregates' in session) {\n    if (session.attrs?.['ip_address'] === undefined) {\n      session.attrs = {\n        ...session.attrs,\n        ip_address: '{{auto}}',\n      };\n    }\n  } else {\n    if (session.ipAddress === undefined) {\n      session.ipAddress = '{{auto}}';\n    }\n  }\n}\n","/* eslint-disable @typescript-eslint/no-explicit-any */\n\nimport type { Primitive } from '../types/misc';\nimport type { ParameterizedString } from '../types/parameterize';\nimport type { PolymorphicEvent } from '../types/polymorphics';\nimport type { VNode, VueViewModel } from '../types/vue';\n\n// eslint-disable-next-line @typescript-eslint/unbound-method\nconst objectToString = Object.prototype.toString;\n\n/**\n * Checks whether given value's type is one of a few Error or Error-like\n * {@link isError}.\n *\n * @param wat A value to be checked.\n * @returns A boolean representing the result.\n */\nexport function isError(wat: unknown): wat is Error {\n  switch (objectToString.call(wat)) {\n    case '[object Error]':\n    case '[object Exception]':\n    case '[object DOMException]':\n    case '[object WebAssembly.Exception]':\n      return true;\n    default:\n      return isInstanceOf(wat, Error);\n  }\n}\n/**\n * Checks whether given value is an instance of the given built-in class.\n *\n * @param wat The value to be checked\n * @param className\n * @returns A boolean representing the result.\n */\nfunction isBuiltin(wat: unknown, className: string): boolean {\n  return objectToString.call(wat) === `[object ${className}]`;\n}\n\n/**\n * Checks whether given value's type is ErrorEvent\n * {@link isErrorEvent}.\n *\n * @param wat A value to be checked.\n * @returns A boolean representing the result.\n */\nexport function isErrorEvent(wat: unknown): boolean {\n  return isBuiltin(wat, 'ErrorEvent');\n}\n\n/**\n * Checks whether given value's type is DOMError\n * {@link isDOMError}.\n *\n * @param wat A value to be checked.\n * @returns A boolean representing the result.\n */\nexport function isDOMError(wat: unknown): boolean {\n  return isBuiltin(wat, 'DOMError');\n}\n\n/**\n * Checks whether given value's type is DOMException\n * {@link isDOMException}.\n *\n * @param wat A value to be checked.\n * @returns A boolean representing the result.\n */\nexport function isDOMException(wat: unknown): boolean {\n  return isBuiltin(wat, 'DOMException');\n}\n\n/**\n * Checks whether given value's type is a string\n * {@link isString}.\n *\n * @param wat A value to be checked.\n * @returns A boolean representing the result.\n */\nexport function isString(wat: unknown): wat is string {\n  return isBuiltin(wat, 'String');\n}\n\n/**\n * Checks whether given string is parameterized\n * {@link isParameterizedString}.\n *\n * @param wat A value to be checked.\n * @returns A boolean representing the result.\n */\nexport function isParameterizedString(wat: unknown): wat is ParameterizedString {\n  return (\n    typeof wat === 'object' &&\n    wat !== null &&\n    '__sentry_template_string__' in wat &&\n    '__sentry_template_values__' in wat\n  );\n}\n\n/**\n * Checks whether given value is a primitive (undefined, null, number, boolean, string, bigint, symbol)\n * {@link isPrimitive}.\n *\n * @param wat A value to be checked.\n * @returns A boolean representing the result.\n */\nexport function isPrimitive(wat: unknown): wat is Primitive {\n  return wat === null || isParameterizedString(wat) || (typeof wat !== 'object' && typeof wat !== 'function');\n}\n\n/**\n * Checks whether given value's type is an object literal, or a class instance.\n * {@link isPlainObject}.\n *\n * @param wat A value to be checked.\n * @returns A boolean representing the result.\n */\nexport function isPlainObject(wat: unknown): wat is Record<string, unknown> {\n  return isBuiltin(wat, 'Object');\n}\n\n/**\n * Checks whether given value is a non-null object (i.e. `typeof` is `'object'` and it is not `null`).\n * Unlike {@link isPlainObject}, this also accepts arrays and class instances - it only rules out\n * `null`, primitives, and functions.\n * {@link isObjectLike}.\n *\n * @param wat A value to be checked.\n * @returns A boolean representing the result.\n */\nexport function isObjectLike(wat: unknown): wat is Record<PropertyKey, unknown> {\n  return typeof wat === 'object' && wat !== null;\n}\n\n/**\n * Checks whether given value's type is an Event instance\n * {@link isEvent}.\n *\n * @param wat A value to be checked.\n * @returns A boolean representing the result.\n */\nexport function isEvent(wat: unknown): wat is PolymorphicEvent {\n  return typeof Event !== 'undefined' && isInstanceOf(wat, Event);\n}\n\n/**\n * Checks whether given value's type is an Element instance\n * {@link isElement}.\n *\n * @param wat A value to be checked.\n * @returns A boolean representing the result.\n * @deprecated This is browser-specific and will be removed from `@sentry/core` in a future major version.\n * Import `isElement` from `@sentry/browser-utils` instead.\n */\nexport function isElement(wat: unknown): boolean {\n  return typeof Element !== 'undefined' && isInstanceOf(wat, Element);\n}\n\n/**\n * Checks whether given value's type is an regexp\n * {@link isRegExp}.\n *\n * @param wat A value to be checked.\n * @returns A boolean representing the result.\n */\nexport function isRegExp(wat: unknown): wat is RegExp {\n  return isBuiltin(wat, 'RegExp');\n}\n\n/**\n * Checks whether given value has a then function.\n * @param wat A value to be checked.\n */\nexport function isThenable(wat: any): wat is PromiseLike<any> {\n  // eslint-disable-next-line @typescript-eslint/no-unsafe-member-access\n  return Boolean(wat?.then && typeof wat.then === 'function');\n}\n\n/**\n * Checks whether given value's type is a React SyntheticEvent\n * {@link isSyntheticEvent}.\n *\n * @param wat A value to be checked.\n * @returns A boolean representing the result.\n * @deprecated This is React-specific and will be removed from `@sentry/core` in a future major version.\n * Use the equivalent helper that ships with `@sentry/react` instead.\n */\nexport function isSyntheticEvent(wat: unknown): boolean {\n  return isPlainObject(wat) && 'nativeEvent' in wat && 'preventDefault' in wat && 'stopPropagation' in wat;\n}\n\n/**\n * Checks whether given value's type is an instance of provided constructor.\n * {@link isInstanceOf}.\n *\n * @param wat A value to be checked.\n * @param base A constructor to be used in a check.\n * @returns A boolean representing the result.\n */\n// TODO: fix in v11, convert any to unknown\n// export function isInstanceOf<T>(wat: unknown, base: { new (...args: any[]): T }): wat is T {\nexport function isInstanceOf<T>(wat: any, base: any): wat is T {\n  try {\n    return wat instanceof base;\n  } catch {\n    return false;\n  }\n}\n\n/**\n * Checks whether given value's type is a Vue ViewModel or a VNode.\n *\n * @param wat A value to be checked.\n * @returns A boolean representing the result.\n * @deprecated This is Vue-specific and will be removed from `@sentry/core` in a future major version.\n * Use the equivalent helper that ships with `@sentry/vue` instead.\n */\nexport function isVueViewModel(wat: unknown): wat is VueViewModel | VNode {\n  // Not using Object.prototype.toString because in Vue 3 it would read the instance's Symbol(Symbol.toStringTag) property.\n  // We also need to check for __v_isVNode because Vue 3 component render instances have an internal __v_isVNode property.\n  return !!(\n    typeof wat === 'object' &&\n    wat !== null &&\n    ((wat as VueViewModel).__isVue || (wat as VueViewModel)._isVue || (wat as { __v_isVNode?: boolean }).__v_isVNode)\n  );\n}\n\n/**\n * Checks whether the given parameter is a Standard Web API Request instance.\n *\n * Returns false if Request is not available in the current runtime.\n */\nexport function isRequest(request: unknown): request is Request {\n  return typeof Request !== 'undefined' && isInstanceOf(request, Request);\n}\n","import { isNodeEnv } from './node';\nimport { GLOBAL_OBJ } from './worldwide';\n\n/**\n * Returns true if we are in the browser.\n */\nexport function isBrowser(): boolean {\n  // eslint-disable-next-line no-restricted-globals\n  return typeof window !== 'undefined' && (!isNodeEnv() || isElectronNodeRenderer());\n}\n\ntype ElectronProcess = { type?: string };\n\n// Electron renderers with nodeIntegration enabled are detected as Node.js so we specifically test for them\nfunction isElectronNodeRenderer(): boolean {\n  const process = (GLOBAL_OBJ as typeof GLOBAL_OBJ & { process?: ElectronProcess }).process;\n  return process?.type === 'renderer';\n}\n","import type { Client } from '../client';\nimport type { DsnComponents } from '../types/dsn';\nimport { isURLObjectRelative, parseStringToURLObject } from './url';\n\n/**\n * Checks whether given url points to Sentry server\n *\n * @param url url to verify\n */\nexport function isSentryRequestUrl(url: string, client: Client | undefined): boolean {\n  const dsn = client?.getDsn();\n  const tunnel = client?.getOptions().tunnel;\n  return checkDsn(url, dsn) || checkTunnel(url, tunnel);\n}\n\nfunction checkTunnel(url: string, tunnel: string | undefined): boolean {\n  if (!tunnel) {\n    return false;\n  }\n\n  return removeTrailingSlash(url) === removeTrailingSlash(tunnel);\n}\n\nfunction checkDsn(url: string, dsn: DsnComponents | undefined): boolean {\n  // Requests to Sentry's ingest endpoint must have a `sentry_key` in the query string\n  // This is equivalent to the public_key which is required in the DSN\n  // see https://develop.sentry.dev/sdk/overview/#parsing-the-dsn\n  // Therefore, a request to the same host and with a `sentry_key` in the query string\n  // can be considered a request to the ingest endpoint.\n  const urlParts = parseStringToURLObject(url);\n  if (!urlParts || isURLObjectRelative(urlParts)) {\n    return false;\n  }\n\n  if (!dsn) {\n    return false;\n  }\n\n  return hostnameMatchesDsnHost(urlParts.hostname, dsn.host) && /(^|&|\\?)sentry_key=/.test(urlParts.search);\n}\n\nfunction hostnameMatchesDsnHost(hostname: string, dsnHost: string): boolean {\n  return hostname === dsnHost || (dsnHost.length > 0 && hostname.endsWith(`.${dsnHost}`));\n}\n\nfunction removeTrailingSlash(str: string): string {\n  return str[str.length - 1] === '/' ? str.slice(0, -1) : str;\n}\n","/** A simple Least Recently Used map */\nexport class LRUMap<K, V> {\n  private readonly _cache: Map<K, V>;\n\n  public constructor(private readonly _maxSize: number) {\n    this._cache = new Map<K, V>();\n  }\n\n  /** Get the current size of the cache */\n  public get size(): number {\n    return this._cache.size;\n  }\n\n  /** Get an entry or undefined if it was not in the cache. Re-inserts to update the recently used order */\n  public get(key: K): V | undefined {\n    const value = this._cache.get(key);\n    if (value === undefined) {\n      return undefined;\n    }\n    // Remove and re-insert to update the order\n    this._cache.delete(key);\n    this._cache.set(key, value);\n    return value;\n  }\n\n  /** Insert an entry and evict an older entry if we've reached maxSize */\n  public set(key: K, value: V): void {\n    if (this._cache.size >= this._maxSize) {\n      // keys() returns an iterator in insertion order so keys().next() gives us the oldest key\n      // eslint-disable-next-line @typescript-eslint/no-non-null-assertion\n      const nextKey = this._cache.keys().next().value!;\n      this._cache.delete(nextKey);\n    }\n    this._cache.set(key, value);\n  }\n\n  /** Remove an entry and return the entry if it was in the cache */\n  public remove(key: K): V | undefined {\n    const value = this._cache.get(key);\n    if (value) {\n      this._cache.delete(key);\n    }\n    return value;\n  }\n\n  /** Clear all entries */\n  public clear(): void {\n    this._cache.clear();\n  }\n\n  /** Get all the keys */\n  public keys(): Array<K> {\n    return Array.from(this._cache.keys());\n  }\n\n  /** Get all the values */\n  public values(): Array<V> {\n    const values: V[] = [];\n    this._cache.forEach(value => values.push(value));\n    return values;\n  }\n}\n","/**\n * Shallow merge two objects.\n * Does not mutate the passed in objects.\n * Undefined/empty values in the merge object will overwrite existing values.\n *\n * By default, this merges 2 levels deep.\n */\nexport function merge<T>(initialObj: T, mergeObj: T, levels = 2): T {\n  // If the merge value is not an object, or we have no merge levels left,\n  // we just set the value to the merge value\n  if (!mergeObj || typeof mergeObj !== 'object' || levels <= 0) {\n    return mergeObj;\n  }\n\n  // If the merge object is an empty object, and the initial object is not undefined, we return the initial object\n  if (initialObj && Object.keys(mergeObj).length === 0) {\n    return initialObj;\n  }\n\n  // Clone object\n  const output = { ...initialObj };\n\n  // Merge values into output, resursively\n  for (const key in mergeObj) {\n    if (Object.prototype.hasOwnProperty.call(mergeObj, key)) {\n      output[key] = merge(output[key], mergeObj[key], levels - 1);\n    }\n  }\n\n  return output;\n}\n","import type { SerializedTraceData } from '../types/tracing';\nimport { getTraceData } from './traceData';\n\n/**\n * Returns a string of meta tags that represent the current trace data.\n *\n * You can use this to propagate a trace from your server-side rendered Html to the browser.\n * This function returns up to two meta tags, `sentry-trace` and `baggage`, depending on the\n * current trace data state.\n *\n * @example\n * Usage example:\n *\n * ```js\n * function renderHtml() {\n *   return `\n *     <head>\n *       ${getTraceMetaTags()}\n *     </head>\n *   `;\n * }\n * ```\n *\n */\nexport function getTraceMetaTags(traceData?: SerializedTraceData): string {\n  return (\n    Object.entries(traceData || getTraceData())\n      .map(([key, value]) => `<meta name=\"${key}\" content=\"${value}\"/>`)\n      // Joined without whitespace on purpose: a separator between the tags becomes a text node when\n      // injected into `<head>`, which breaks React 19 whole-document hydration (#21915).\n      .join('')\n  );\n}\n","import type { Event } from '../types/event';\nimport type { Exception } from '../types/exception';\nimport type { Mechanism } from '../types/mechanism';\nimport type { StackFrame } from '../types/stackframe';\nimport { addNonEnumerableProperty } from './object';\nimport { safeMathRandom, withRandomSafeContext } from './randomSafeContext';\nimport { snipLine } from './string';\nimport { GLOBAL_OBJ } from './worldwide';\n\ninterface CryptoInternal {\n  randomUUID?(): string;\n}\n\n/** An interface for common properties on global */\ninterface CryptoGlobal {\n  msCrypto?: CryptoInternal;\n  crypto?: CryptoInternal;\n}\n\nfunction getCrypto(): CryptoInternal | undefined {\n  const gbl = GLOBAL_OBJ as typeof GLOBAL_OBJ & CryptoGlobal;\n  return gbl.crypto || gbl.msCrypto;\n}\n\nlet emptyUuid: string | undefined;\n\nfunction getRandomByte(): number {\n  return safeMathRandom() * 16;\n}\n\n/**\n * UUID4 generator\n * @param crypto Object that provides the crypto API.\n * @returns string Generated UUID4.\n */\nexport function uuid4(crypto = getCrypto()): string {\n  try {\n    if (crypto?.randomUUID) {\n      // eslint-disable-next-line @typescript-eslint/no-non-null-assertion\n      return withRandomSafeContext(() => crypto.randomUUID!()).replace(/-/g, '');\n    }\n  } catch {\n    // some runtimes can crash invoking crypto\n    // https://github.com/getsentry/sentry-javascript/issues/8935\n  }\n\n  if (!emptyUuid) {\n    // http://stackoverflow.com/questions/105034/how-to-create-a-guid-uuid-in-javascript/2117523#2117523\n    // Concatenating the following numbers as strings results in '10000000100040008000100000000000'\n    emptyUuid = ([1e7] as unknown as string) + 1e3 + 4e3 + 8e3 + 1e11;\n  }\n\n  return emptyUuid.replace(/[018]/g, c =>\n    // eslint-disable-next-line no-bitwise\n    ((c as unknown as number) ^ ((getRandomByte() & 15) >> ((c as unknown as number) / 4))).toString(16),\n  );\n}\n\nfunction getFirstException(event: Event): Exception | undefined {\n  return event.exception?.values?.[0];\n}\n\n/**\n * Extracts either message or type+value from an event that can be used for user-facing logs\n * @returns event's description\n */\nexport function getEventDescription(event: Event): string {\n  const { message, event_id: eventId } = event;\n  if (message) {\n    return message;\n  }\n\n  const firstException = getFirstException(event);\n  if (firstException) {\n    if (firstException.type && firstException.value) {\n      return `${firstException.type}: ${firstException.value}`;\n    }\n    return firstException.type || firstException.value || eventId || '<unknown>';\n  }\n  return eventId || '<unknown>';\n}\n\n/**\n * Adds exception values, type and value to an synthetic Exception.\n * @param event The event to modify.\n * @param value Value of the exception.\n * @param type Type of the exception.\n * @hidden\n */\nexport function addExceptionTypeValue(event: Event, value?: string, type?: string): void {\n  const exception = (event.exception = event.exception || {});\n  const values = (exception.values = exception.values || []);\n  const firstException = (values[0] = values[0] || {});\n  if (!firstException.value) {\n    firstException.value = value || '';\n  }\n  if (!firstException.type) {\n    firstException.type = type || 'Error';\n  }\n}\n\n/**\n * Adds exception mechanism data to a given event. Uses defaults if the second parameter is not passed.\n *\n * @param event The event to modify.\n * @param newMechanism Mechanism data to add to the event.\n * @hidden\n */\nexport function addExceptionMechanism(event: Event, newMechanism?: Partial<Mechanism>): void {\n  const firstException = getFirstException(event);\n  if (!firstException) {\n    return;\n  }\n\n  const defaultMechanism = { type: 'generic', handled: true };\n  const currentMechanism = firstException.mechanism;\n  firstException.mechanism = { ...defaultMechanism, ...currentMechanism, ...newMechanism };\n\n  if (newMechanism && 'data' in newMechanism) {\n    const mergedData = { ...currentMechanism?.data, ...newMechanism.data };\n    firstException.mechanism.data = mergedData;\n  }\n}\n\n// https://semver.org/#is-there-a-suggested-regular-expression-regex-to-check-a-semver-string\nconst SEMVER_REGEXP =\n  /^(0|[1-9]\\d*)\\.(0|[1-9]\\d*)\\.(0|[1-9]\\d*)(?:-((?:0|[1-9]\\d*|\\d*[a-zA-Z-][0-9a-zA-Z-]*)(?:\\.(?:0|[1-9]\\d*|\\d*[a-zA-Z-][0-9a-zA-Z-]*))*))?(?:\\+([0-9a-zA-Z-]+(?:\\.[0-9a-zA-Z-]+)*))?$/;\n\n/**\n * Represents Semantic Versioning object\n */\ninterface SemVer {\n  major?: number;\n  minor?: number;\n  patch?: number;\n  prerelease?: string;\n  buildmetadata?: string;\n}\n\nfunction _parseInt(input: string | undefined): number {\n  return parseInt(input || '', 10);\n}\n\n/**\n * Parses input into a SemVer interface\n * @param input string representation of a semver version\n */\nexport function parseSemver(input: string): SemVer {\n  const match = input.match(SEMVER_REGEXP) || [];\n  const major = _parseInt(match[1]);\n  const minor = _parseInt(match[2]);\n  const patch = _parseInt(match[3]);\n  return {\n    buildmetadata: match[5],\n    major: isNaN(major) ? undefined : major,\n    minor: isNaN(minor) ? undefined : minor,\n    patch: isNaN(patch) ? undefined : patch,\n    prerelease: match[4],\n  };\n}\n\n/**\n * This function adds context (pre/post/line) lines to the provided frame\n *\n * @param lines string[] containing all lines\n * @param frame StackFrame that will be mutated\n * @param linesOfContext number of context lines we want to add pre/post\n */\nexport function addContextToFrame(lines: string[], frame: StackFrame, linesOfContext: number = 5): void {\n  // When there is no line number in the frame, attaching context is nonsensical and will even break grouping\n  if (frame.lineno === undefined) {\n    return;\n  }\n\n  const maxLines = lines.length;\n  const sourceLine = Math.max(Math.min(maxLines - 1, frame.lineno - 1), 0);\n\n  frame.pre_context = lines\n    .slice(Math.max(0, sourceLine - linesOfContext), sourceLine)\n    .map((line: string) => snipLine(line, 0));\n\n  // We guard here to ensure this is not larger than the existing number of lines\n  const lineIndex = Math.min(maxLines - 1, sourceLine);\n\n  // eslint-disable-next-line @typescript-eslint/no-non-null-assertion\n  frame.context_line = snipLine(lines[lineIndex]!, frame.colno || 0);\n\n  frame.post_context = lines\n    .slice(Math.min(sourceLine + 1, maxLines), sourceLine + 1 + linesOfContext)\n    .map((line: string) => snipLine(line, 0));\n}\n\n/**\n * Checks whether or not we've already captured the given exception (note: not an identical exception - the very object\n * in question), and marks it captured if not.\n *\n * This is useful because it's possible for an error to get captured by more than one mechanism. After we intercept and\n * record an error, we rethrow it (assuming we've intercepted it before it's reached the top-level global handlers), so\n * that we don't interfere with whatever effects the error might have had were the SDK not there. At that point, because\n * the error has been rethrown, it's possible for it to bubble up to some other code we've instrumented. If it's not\n * caught after that, it will bubble all the way up to the global handlers (which of course we also instrument). This\n * function helps us ensure that even if we encounter the same error more than once, we only record it the first time we\n * see it.\n *\n * Note: It will ignore primitives (always return `false` and not mark them as seen), as properties can't be set on\n * them. {@link: Object.objectify} can be used on exceptions to convert any that are primitives into their equivalent\n * object wrapper forms so that this check will always work. However, because we need to flag the exact object which\n * will get rethrown, and because that rethrowing happens outside of the event processing pipeline, the objectification\n * must be done before the exception captured.\n *\n * @param A thrown exception to check or flag as having been seen\n * @returns `true` if the exception has already been captured, `false` if not (with the side effect of marking it seen)\n */\nexport function checkOrSetAlreadyCaught(exception: unknown): boolean {\n  if (isAlreadyCaptured(exception)) {\n    return true;\n  }\n\n  try {\n    // set it this way rather than by assignment so that it's not ennumerable and therefore isn't recorded by the\n    // `ExtraErrorData` integration\n    addNonEnumerableProperty(exception as { [key: string]: unknown }, '__sentry_captured__', true);\n  } catch {\n    // `exception` is a primitive, so we can't mark it seen\n  }\n\n  return false;\n}\n\n/**\n * Checks whether we've already captured the given exception (note: not an identical exception - the very object).\n * It is considered already captured if it has the `__sentry_captured__` property set to `true`.\n *\n * @internal Only considered for internal usage\n */\nexport function isAlreadyCaptured(exception: unknown): boolean | void {\n  try {\n    return (exception as { __sentry_captured__?: boolean }).__sentry_captured__;\n  } catch {} // eslint-disable-line no-empty\n}\n","// This code was originally forked from https://github.com/felixge/node-stack-trace\n// Since then it has been highly modified to fit our needs.\n\n// Copyright (c) 2011 Felix Geisendörfer (felix@debuggable.com)//\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\nimport type { StackLineParser, StackLineParserFn } from '../types/stacktrace';\nimport { normalizeStackTracePath, UNKNOWN_FUNCTION } from './stacktrace';\n\nexport type GetModuleFn = (filename: string | undefined) => string | undefined;\n\n/**\n * Does this filename look like it's part of the app code?\n */\nexport function filenameIsInApp(filename: string, isNative: boolean = false): boolean {\n  const isInternal =\n    isNative ||\n    (filename &&\n      // It's not internal if it's an absolute linux path\n      !filename.startsWith('/') &&\n      // It's not internal if it's an absolute windows path\n      !filename.match(/^[A-Z]:/) &&\n      // It's not internal if the path is starting with a dot\n      !filename.startsWith('.') &&\n      // It's not internal if the frame has a protocol. In node, this is usually the case if the file got pre-processed with a bundler like webpack\n      !filename.match(/^[a-zA-Z]([a-zA-Z0-9.\\-+])*:\\/\\//)); // Schema from: https://stackoverflow.com/a/3641782\n\n  // in_app is all that's not an internal Node function or a module within node_modules\n  // note that isNative appears to return true even for node core libraries\n  // see https://github.com/getsentry/raven-node/issues/176\n\n  return !isInternal && filename !== undefined && !filename.includes('node_modules/');\n}\n\n/** Node Stack line parser */\nexport function node(getModule?: GetModuleFn): StackLineParserFn {\n  const FILENAME_MATCH = /^\\s*[-]{4,}$/;\n  const FULL_MATCH = /at (?:async )?(?:(.+?)\\s+\\()?(?:(.+):(\\d+):(\\d+)?|([^)]+))\\)?/;\n  const DATA_URI_MATCH = /at (?:async )?(.+?) \\(data:(.*?),/;\n\n  return (line: string) => {\n    const dataUriMatch = line.match(DATA_URI_MATCH);\n    if (dataUriMatch) {\n      return {\n        filename: `<data:${dataUriMatch[2]}>`,\n        function: dataUriMatch[1],\n      };\n    }\n\n    const lineMatch = line.match(FULL_MATCH);\n\n    if (lineMatch) {\n      let object: string | undefined;\n      let method: string | undefined;\n      let functionName: string | undefined;\n      let typeName: string | undefined;\n      let methodName: string | undefined;\n\n      if (lineMatch[1]) {\n        functionName = lineMatch[1];\n\n        let methodStart = functionName.lastIndexOf('.');\n        if (functionName[methodStart - 1] === '.') {\n          methodStart--;\n        }\n\n        if (methodStart > 0) {\n          object = functionName.slice(0, methodStart);\n          method = functionName.slice(methodStart + 1);\n          const objectEnd = object.indexOf('.Module');\n          if (objectEnd > 0) {\n            functionName = functionName.slice(objectEnd + 1);\n            object = object.slice(0, objectEnd);\n          }\n        }\n        typeName = undefined;\n      }\n\n      if (method) {\n        typeName = object;\n        methodName = method;\n      }\n\n      if (method === '<anonymous>') {\n        methodName = undefined;\n        functionName = undefined;\n      }\n\n      if (functionName === undefined) {\n        methodName = methodName || UNKNOWN_FUNCTION;\n        functionName = typeName ? `${typeName}.${methodName}` : methodName;\n      }\n\n      let filename = normalizeStackTracePath(lineMatch[2]);\n      const isNative = lineMatch[5] === 'native';\n\n      if (!filename && lineMatch[5] && !isNative) {\n        filename = lineMatch[5];\n      }\n\n      const maybeDecodedFilename = filename ? _safeDecodeURI(filename) : undefined;\n      return {\n        filename: maybeDecodedFilename ?? filename,\n        module: maybeDecodedFilename && getModule?.(maybeDecodedFilename),\n        function: functionName,\n        lineno: _parseIntOrUndefined(lineMatch[3]),\n        colno: _parseIntOrUndefined(lineMatch[4]),\n        in_app: filenameIsInApp(filename || '', isNative),\n      };\n    }\n\n    if (line.match(FILENAME_MATCH)) {\n      return {\n        filename: line,\n      };\n    }\n\n    return undefined;\n  };\n}\n\n/**\n * Node.js stack line parser\n *\n * This is in @sentry/core so it can be used from the Electron SDK in the browser for when `nodeIntegration == true`.\n * This allows it to be used without referencing or importing any node specific code which causes bundlers to complain\n */\nexport function nodeStackLineParser(getModule?: GetModuleFn): StackLineParser {\n  return [90, node(getModule)];\n}\n\nfunction _parseIntOrUndefined(input: string | undefined): number | undefined {\n  return parseInt(input || '', 10) || undefined;\n}\n\nfunction _safeDecodeURI(filename: string): string | undefined {\n  try {\n    return decodeURI(filename);\n  } catch {\n    return undefined;\n  }\n}\n","/**\n * NOTE: In order to avoid circular dependencies, if you add a function to this module and it needs to print something,\n * you must either a) use `console.log` rather than the `debug` singleton, or b) put your function elsewhere.\n */\n\nimport { isBrowserBundle } from './env';\n\n/**\n * Checks whether we're in the Node.js or Browser environment\n *\n * @returns Answer to given question\n */\nexport function isNodeEnv(): boolean {\n  // explicitly check for browser bundles as those can be optimized statically\n  // by terser/rollup.\n  return (\n    !isBrowserBundle() &&\n    Object.prototype.toString.call(typeof process !== 'undefined' ? process : 0) === '[object process]'\n  );\n}\n\n/**\n * Requires a module which is protected against bundler minification.\n *\n * @param request The module path to resolve\n */\n// eslint-disable-next-line @typescript-eslint/no-explicit-any\nfunction dynamicRequire(mod: any, request: string): any {\n  // eslint-disable-next-line @typescript-eslint/no-unsafe-member-access\n  return mod.require(request);\n}\n\n/**\n * Helper for dynamically loading module that should work with linked dependencies.\n * The problem is that we _should_ be using `require(require.resolve(moduleName, { paths: [cwd()] }))`\n * However it's _not possible_ to do that with Webpack, as it has to know all the dependencies during\n * build time. `require.resolve` is also not available in any other way, so we cannot create,\n * a fake helper like we do with `dynamicRequire`.\n *\n * We always prefer to use local package, thus the value is not returned early from each `try/catch` block.\n * That is to mimic the behavior of `require.resolve` exactly.\n *\n * @param moduleName module name to require\n * @param existingModule module to use for requiring\n * @returns possibly required module\n */\nexport function loadModule<T>(\n  moduleName: string,\n  // Default parameters are evaluated before the body runs, so a bare `module` would throw a\n  // ReferenceError in ESM before reaching the try/catch below that makes this helper degrade\n  // gracefully. Guard it so the ESM build resolves to `undefined` instead of crashing.\n  // eslint-disable-next-line @typescript-eslint/no-explicit-any\n  existingModule: any = typeof module !== 'undefined' ? module : undefined,\n): T | undefined {\n  let mod: T | undefined;\n\n  try {\n    mod = dynamicRequire(existingModule, moduleName);\n  } catch {\n    // no-empty\n  }\n\n  if (!mod) {\n    try {\n      const { cwd } = dynamicRequire(existingModule, 'process');\n      mod = dynamicRequire(existingModule, `${cwd()}/node_modules/${moduleName}`) as T;\n    } catch {\n      // no-empty\n    }\n  }\n\n  return mod;\n}\n","import { addNonEnumerableProperty } from './object';\n\n/**\n * Internal symbols for normalization behavior. JSON and other structured user payloads cannot\n * carry these keys, so they cannot spoof SDK-only normalization hints.\n * We use Symbol.for to ensure that the symbols are the same across different modules/files.\n */\nconst SENTRY_SKIP_NORMALIZATION = Symbol.for('sentry.skipNormalization');\nconst SENTRY_OVERRIDE_NORMALIZATION_DEPTH = Symbol.for('sentry.overrideNormalizationDepth');\n\n/** Marks an object so `normalize` returns it unchanged (already-normalized SDK data). */\nexport function setSkipNormalizationHint(obj: object): void {\n  addNonEnumerableProperty(obj, SENTRY_SKIP_NORMALIZATION, true);\n}\n\n/** Overrides remaining normalization depth from this object downward (e.g. Redux / Pinia state). */\nexport function setNormalizationDepthOverrideHint(obj: object, depth: number): void {\n  addNonEnumerableProperty(obj, SENTRY_OVERRIDE_NORMALIZATION_DEPTH, depth);\n}\n\n/** @internal */\nexport function hasSkipNormalizationHint(value: object) {\n  return Boolean((value as Record<symbol, unknown>)[SENTRY_SKIP_NORMALIZATION]);\n}\n\n/** @internal */\nexport function getNormalizationDepthOverrideHint(value: object): number | undefined {\n  const v = (value as Record<symbol, unknown>)[SENTRY_OVERRIDE_NORMALIZATION_DEPTH];\n  return typeof v === 'number' ? v : undefined;\n}\n","import type { Primitive } from '../types/misc';\nimport { getNormalizationDepthOverrideHint, hasSkipNormalizationHint } from './normalizationHints';\nimport { convertToPlainObject } from './object';\nimport { getFunctionName } from './stacktrace';\n\ntype Stringifier = (value: Exclude<unknown, string | number | boolean | null>) => string | undefined;\n\n// We store a custom stringifier in module scope, which is not bullet proof\n// however, we currently only really use this for browser-specific values, where this should work just fine, generally.\nlet stringifier: Stringifier | undefined;\n\n/**\n * Set a custom stringifier for the normalize function.\n * If this returns a non-empty string, it will be used instead of the default stringification.\n * Return undefined to fall back to the generic behavior.\n */\nexport function setNormalizeStringifier(newStringifier: Stringifier | undefined): void {\n  stringifier = newStringifier;\n}\n\ntype Prototype = { constructor?: (...args: unknown[]) => unknown };\n// This is a hack to placate TS, relying on the fact that technically, arrays are objects with integer keys. Normally we\n// think of those keys as actual numbers, but `arr['0']` turns out to work just as well as `arr[0]`, and doing it this\n// way lets us use a single type in the places where behave as if we are only dealing with objects, even if some of them\n// might be arrays.\ntype ObjOrArray<T> = { [key: string]: T };\n\ntype MemoFunc = [\n  // memoize\n  (obj: object) => boolean,\n  // unmemoize\n  (obj: object) => void,\n];\n\n/**\n * Recursively normalizes the given object.\n *\n * - Creates a copy to prevent original input mutation\n * - Skips non-enumerable properties\n * - When stringifying, calls `toJSON` if implemented\n * - Removes circular references\n * - Translates non-serializable values (`undefined`/`NaN`/functions) to serializable format\n * - Translates known global objects/classes to a string representations\n * - Takes care of `Error` object serialization\n * - Optionally limits depth of final output\n * - Optionally limits number of properties/elements included in any single object/array\n *\n * @param input The object to be normalized.\n * @param depth The max depth to which to normalize the object. (Anything deeper stringified whole.)\n * @param maxProperties The max number of elements or properties to be included in any single array or\n * object in the normalized output.\n * @returns A normalized version of the object, or `\"**non-serializable**\"` if any errors are thrown during normalization.\n */\n// eslint-disable-next-line @typescript-eslint/no-explicit-any\nexport function normalize(input: unknown, depth: number = 100, maxProperties: number = +Infinity): any {\n  try {\n    // since we're at the outermost level, we don't provide a key\n    return visit('', input, depth, maxProperties);\n  } catch (err) {\n    return { ERROR: `**non-serializable** (${err})` };\n  }\n}\n\n/** JSDoc */\nexport function normalizeToSize<T>(\n  // eslint-disable-next-line @typescript-eslint/no-explicit-any\n  object: { [key: string]: any },\n  // Default Node.js REPL depth\n  depth: number = 3,\n  // 100kB, as 200kB is max payload size, so half sounds reasonable\n  maxSize: number = 100 * 1024,\n): T {\n  const normalized = normalize(object, depth);\n\n  if (jsonSize(normalized) > maxSize) {\n    return normalizeToSize(object, depth - 1, maxSize);\n  }\n\n  return normalized as T;\n}\n\n/**\n * Visits a node to perform normalization on it\n *\n * @param key The key corresponding to the given node\n * @param value The node to be visited\n * @param depth Optional number indicating the maximum recursion depth\n * @param maxProperties Optional maximum number of properties/elements included in any single object/array\n * @param memo Optional Memo class handling decycling\n */\nfunction visit(\n  key: string,\n  value: unknown,\n  depth: number = +Infinity,\n  maxProperties: number = +Infinity,\n  memo = memoBuilder(),\n): Primitive | ObjOrArray<unknown> {\n  const [memoize, unmemoize] = memo;\n\n  // Get the simple cases out of the way first\n  if (\n    value == null || // this matches null and undefined -> eqeq not eqeqeq\n    ['boolean', 'string'].includes(typeof value) ||\n    (typeof value === 'number' && Number.isFinite(value))\n  ) {\n    return value as Primitive;\n  }\n\n  const stringified = stringifyValue(key, value);\n\n  // Anything we could potentially dig into more (objects or arrays) will have come back as `\"[object XXXX]\"`.\n  // Everything else will have already been serialized, so if we don't see that pattern, we're done.\n  if (!stringified.startsWith('[object ')) {\n    return stringified;\n  }\n\n  // From here on, we can assert that `value` is either an object or an array.\n\n  // Do not normalize objects that we know have already been normalized. Hints use internal symbols\n  // (see normalizationHints.ts) so user-controlled JSON cannot spoof them.\n  if (hasSkipNormalizationHint(value)) {\n    return value as ObjOrArray<unknown>;\n  }\n\n  // Override remaining depth from this node (e.g. Redux / Pinia state). Set via setNormalizationDepthOverrideHint.\n  const overrideDepth = getNormalizationDepthOverrideHint(value);\n  const remainingDepth = overrideDepth !== undefined ? overrideDepth : depth;\n\n  // We're also done if we've reached the max depth\n  if (remainingDepth === 0) {\n    // At this point we know `serialized` is a string of the form `\"[object XXXX]\"`. Clean it up so it's just `\"[XXXX]\"`.\n    return stringified.replace('object ', '');\n  }\n\n  // If we've already visited this branch, bail out, as it's circular reference. If not, note that we're seeing it now.\n  if (memoize(value)) {\n    return '[Circular ~]';\n  }\n\n  // If the value has a `toJSON` method, we call it to extract more information\n  const valueWithToJSON = value as unknown & { toJSON?: () => unknown };\n  if (valueWithToJSON && typeof valueWithToJSON.toJSON === 'function') {\n    try {\n      const jsonValue = valueWithToJSON.toJSON();\n      // We need to normalize the return value of `.toJSON()` in case it has circular references\n      return visit('', jsonValue, remainingDepth - 1, maxProperties, memo);\n    } catch {\n      // pass (The built-in `toJSON` failed, but we can still try to do it ourselves)\n    }\n  }\n\n  // At this point we know we either have an object or an array, we haven't seen it before, and we're going to recurse\n  // because we haven't yet reached the max depth. Create an accumulator to hold the results of visiting each\n  // property/entry, and keep track of the number of items we add to it.\n  const normalized = (Array.isArray(value) ? [] : {}) as ObjOrArray<unknown>;\n  let numAdded = 0;\n\n  // Before we begin, convert`Error` and`Event` instances into plain objects, since some of each of their relevant\n  // properties are non-enumerable and otherwise would get missed.\n  const visitable = convertToPlainObject(value as ObjOrArray<unknown>);\n\n  for (const visitKey in visitable) {\n    // Avoid iterating over fields in the prototype if they've somehow been exposed to enumeration.\n    if (!Object.prototype.hasOwnProperty.call(visitable, visitKey)) {\n      continue;\n    }\n\n    if (numAdded >= maxProperties) {\n      normalized[visitKey] = '[MaxProperties ~]';\n      break;\n    }\n\n    // Recursively visit all the child nodes\n    const visitValue = visitable[visitKey];\n    normalized[visitKey] = visit(visitKey, visitValue, remainingDepth - 1, maxProperties, memo);\n\n    numAdded++;\n  }\n\n  // Once we've visited all the branches, remove the parent from memo storage\n  unmemoize(value);\n\n  // Return accumulated values\n  return normalized;\n}\n\n/* eslint-disable complexity */\n/**\n * Stringify the given value. Handles various known special values and types.\n *\n * Not meant to be used on simple primitives which already have a string representation, as it will, for example, turn\n * the number 1231 into \"[Object Number]\", nor on `null`, as it will throw.\n *\n * @param value The value to stringify\n * @returns A stringified representation of the given value\n */\nexport function stringifyValue(\n  key: unknown,\n  // this type is a tiny bit of a cheat, since this function does handle NaN (which is technically a number), but for\n  // our internal use, it'll do\n  value: Exclude<unknown, string | number | boolean | null>,\n): string {\n  try {\n    // Runtime-specific stringifications (browser, framework integrations) are registered on the\n    // async-context strategy. Consult them before the universal fallbacks below.\n    if (stringifier) {\n      const stringified = stringifier(value);\n      // Safe to ignore empty strings here as well, we wont stringify to this\n      if (stringified) {\n        return stringified;\n      }\n    }\n\n    if (typeof global !== 'undefined' && value === global) {\n      return '[Global]';\n    }\n\n    if (typeof value === 'number' && !Number.isFinite(value)) {\n      return `[${value}]`;\n    }\n\n    if (typeof value === 'function') {\n      return `[Function: ${getFunctionName(value)}]`;\n    }\n\n    if (typeof value === 'symbol') {\n      return `[${String(value)}]`;\n    }\n\n    // stringified BigInts are indistinguishable from regular numbers, so we need to label them to avoid confusion\n    if (typeof value === 'bigint') {\n      return `[BigInt: ${String(value)}]`;\n    }\n\n    // Now that we've knocked out all the special cases and the primitives, all we have left are objects. Simply casting\n    // them to strings means that instances of classes which haven't defined their `toStringTag` will just come out as\n    // `\"[object Object]\"`. If we instead look at the constructor's name (which is the same as the name of the class),\n    // we can make sure that only plain objects come out that way.\n    const objName = getConstructorName(value);\n\n    return `[object ${objName}]`;\n  } catch (err) {\n    return `**non-serializable** (${err})`;\n  }\n}\n/* eslint-enable complexity */\n\nfunction getConstructorName(value: unknown): string {\n  const prototype: Prototype | null = Object.getPrototypeOf(value);\n\n  return prototype?.constructor ? prototype.constructor.name : 'null prototype';\n}\n\n/** Calculates bytes size of input string */\nfunction utf8Length(value: string): number {\n  // eslint-disable-next-line no-bitwise\n  return ~-encodeURI(value).split(/%..|./).length;\n}\n\n/** Calculates bytes size of input object */\n// eslint-disable-next-line @typescript-eslint/no-explicit-any\nfunction jsonSize(value: any): number {\n  return utf8Length(JSON.stringify(value));\n}\n\n/**\n * Normalizes URLs in exceptions and stacktraces to a base path so Sentry can fingerprint\n * across platforms and working directory.\n *\n * @param url The URL to be normalized.\n * @param basePath The application base path.\n * @returns The normalized URL.\n */\nexport function normalizeUrlToBase(url: string, basePath: string): string {\n  const escapedBase = basePath\n    // Backslash to forward\n    .replace(/\\\\/g, '/')\n    // Escape RegExp special characters\n    .replace(/[|\\\\{}()[\\]^$+*?.]/g, '\\\\$&');\n\n  let newUrl = url;\n  try {\n    newUrl = decodeURI(url);\n  } catch {\n    // Sometime this breaks\n  }\n  return (\n    newUrl\n      .replace(/\\\\/g, '/')\n      .replace(/webpack:\\/?/g, '') // Remove intermediate base path\n      // oxlint-disable-next-line sdk/no-regexp-constructor\n      .replace(new RegExp(`(file://)?/*${escapedBase}/*`, 'ig'), 'app:///')\n  );\n}\n\n/**\n * Helper to decycle json objects\n */\nfunction memoBuilder(): MemoFunc {\n  const inner = new WeakSet<object>();\n  function memoize(obj: object): boolean {\n    if (inner.has(obj)) {\n      return true;\n    }\n    inner.add(obj);\n    return false;\n  }\n\n  function unmemoize(obj: object): void {\n    inner.delete(obj);\n  }\n  return [memoize, unmemoize];\n}\n","/* eslint-disable @typescript-eslint/no-explicit-any */\nimport { DEBUG_BUILD } from '../debug-build';\nimport type { WrappedFunction } from '../types/wrappedfunction';\nimport { debug } from './debug-logger';\nimport { isError, isEvent, isObjectLike, isPrimitive } from './is';\n\n/**\n * Replace a method in an object with a wrapped version of itself.\n *\n * If the method on the passed object is not a function, the wrapper will not be applied.\n *\n * @param source An object that contains a method to be wrapped.\n * @param name The name of the method to be wrapped.\n * @param replacementFactory A higher-order function that takes the original version of the given method and returns a\n * wrapped version. Note: The function returned by `replacementFactory` needs to be a non-arrow function, in order to\n * preserve the correct value of `this`, and the original method must be called using `origMethod.call(this, <other\n * args>)` or `origMethod.apply(this, [<other args>])` (rather than being called directly), again to preserve `this`.\n * @returns void\n */\n\nexport function fill(source: { [key: string]: any }, name: string, replacementFactory: (...args: any[]) => any): void {\n  if (!(name in source)) {\n    return;\n  }\n\n  // explicitly casting to unknown because we don't know the type of the method initially at all\n  const original = source[name] as unknown;\n\n  if (typeof original !== 'function') {\n    return;\n  }\n\n  const wrapped = replacementFactory(original) as WrappedFunction;\n\n  // Make sure it's a function first, as we need to attach an empty prototype for `defineProperties` to work\n  // otherwise it'll throw \"TypeError: Object.defineProperties called on non-object\"\n  if (typeof wrapped === 'function') {\n    markFunctionWrapped(wrapped, original);\n  }\n\n  try {\n    source[name] = wrapped;\n  } catch {\n    DEBUG_BUILD && debug.log(`Failed to replace method \"${name}\" in object`, source);\n  }\n}\n\n/**\n * Defines a non-enumerable property on the given object.\n *\n * @param obj The object on which to set the property\n * @param name The name of the property to be set\n * @param value The value to which to set the property\n */\nexport function addNonEnumerableProperty(obj: object, name: string | symbol, value: unknown): void {\n  try {\n    Object.defineProperty(obj, name, {\n      // enumerable: false, // the default, so we can save on bundle size by not explicitly setting it\n      value,\n      writable: true,\n      configurable: true,\n    });\n  } catch {\n    DEBUG_BUILD && debug.log(`Failed to add non-enumerable property \"${String(name)}\" to object`, obj);\n  }\n}\n\n/**\n * Remembers the original function on the wrapped function and\n * patches up the prototype.\n *\n * @param wrapped the wrapper function\n * @param original the original function that gets wrapped\n */\nexport function markFunctionWrapped(wrapped: WrappedFunction, original: WrappedFunction): void {\n  try {\n    const proto = original.prototype || {};\n    wrapped.prototype = original.prototype = proto;\n    addNonEnumerableProperty(wrapped, '__sentry_original__', original);\n  } catch {} // eslint-disable-line no-empty\n}\n\n/**\n * Wrap a method on an object by name, only if it is not already wrapped.\n *\n * Note: to set the wrapped method as a non-enumerable property, pass\n * false as the `enumerable` argument. This could be detected, but only\n * by either walking up the prototype chain, or iterating over all fields\n * in a `for(in)` loop. Neither are an acceptable performance impact for\n * the rare case where we might patch a non-enumerable method.\n */\nexport function wrapMethod<O extends {}, T extends string & keyof O>(\n  obj: O,\n  field: T,\n  wrapped: WrappedFunction,\n  enumerable: boolean = true,\n): void {\n  const original = obj[field];\n  if (typeof original !== 'function') {\n    throw new Error(`Cannot wrap method: ${field} is not a function`);\n  }\n  if (getOriginalFunction(original)) {\n    throw new Error(`Attempting to wrap method ${field} multiple times`);\n  }\n  markFunctionWrapped(wrapped, original);\n  Object.defineProperty(obj, field, {\n    writable: true,\n    configurable: true,\n    enumerable,\n    value: wrapped,\n  });\n}\n\n/**\n * This extracts the original function if available.  See\n * `markFunctionWrapped` for more information.\n *\n * @param func the function to unwrap\n * @returns the unwrapped version of the function if available.\n */\n// eslint-disable-next-line @typescript-eslint/ban-types\nexport function getOriginalFunction<T extends Function>(func: WrappedFunction<T>): T | undefined {\n  return func.__sentry_original__;\n}\n\n/**\n * Transforms any `Error` or `Event` into a plain object with all of their enumerable properties, and some of their\n * non-enumerable properties attached.\n *\n * @param value Initial source that we have to transform in order for it to be usable by the serializer\n * @returns An Event or Error turned into an object - or the value argument itself, when value is neither an Event nor\n *  an Error.\n */\nexport function convertToPlainObject<V>(value: V): Record<string, unknown> | V {\n  if (isError(value)) {\n    return {\n      message: value.message,\n      name: value.name,\n      stack: value.stack,\n      ...getOwnProperties(value),\n    };\n  }\n\n  // This handles browser events specifically, where certain properties are non-enumerable and need to be unpacked.\n  if (isEvent(value)) {\n    const { type, target, currentTarget, detail } = value;\n    return {\n      type,\n      target,\n      currentTarget,\n      ...(detail ? { detail } : {}),\n      ...getOwnProperties(value),\n    };\n  }\n\n  return value;\n}\n\n/** Filters out all but an object's own properties */\nfunction getOwnProperties(obj: unknown): { [key: string]: unknown } {\n  if (isObjectLike(obj)) {\n    return Object.fromEntries(Object.entries(obj));\n  }\n  return {};\n}\n\n/**\n * Given any captured exception, extract its keys and create a sorted\n * and truncated list that will be used inside the event message.\n * eg. `Non-error exception captured with keys: foo, bar, baz`\n */\nexport function extractExceptionKeysForMessage(exception: Record<string, unknown>): string {\n  const keys = Object.keys(convertToPlainObject(exception));\n  keys.sort();\n\n  return !keys[0] ? '[object has no keys]' : keys.join(', ');\n}\n\n/**\n * Given any object, return a new object having removed all fields whose value was `undefined`.\n * Works recursively on objects and arrays.\n *\n * Attention: This function keeps circular references in the returned object.\n *\n * @deprecated This function is no longer used by the SDK and will be removed in a future major version.\n */\nexport function dropUndefinedKeys<T>(inputValue: T): T {\n  // This map keeps track of what already visited nodes map to.\n  // Our Set - based memoBuilder doesn't work here because we want to the output object to have the same circular\n  // references as the input object.\n  const memoizationMap = new Map<unknown, unknown>();\n\n  // This function just proxies `_dropUndefinedKeys` to keep the `memoBuilder` out of this function's API\n  return _dropUndefinedKeys(inputValue, memoizationMap);\n}\n\nfunction _dropUndefinedKeys<T>(inputValue: T, memoizationMap: Map<unknown, unknown>): T {\n  // Early return for primitive values\n  if (inputValue === null || typeof inputValue !== 'object') {\n    return inputValue;\n  }\n\n  // Check memo map first for all object types\n  const memoVal = memoizationMap.get(inputValue);\n  if (memoVal !== undefined) {\n    return memoVal as T;\n  }\n\n  // handle arrays\n  if (Array.isArray(inputValue)) {\n    const returnValue: unknown[] = [];\n    // Store mapping to handle circular references\n    memoizationMap.set(inputValue, returnValue);\n\n    inputValue.forEach(value => {\n      returnValue.push(_dropUndefinedKeys(value, memoizationMap));\n    });\n\n    return returnValue as unknown as T;\n  }\n\n  if (isPojo(inputValue)) {\n    const returnValue: { [key: string]: unknown } = {};\n    // Store mapping to handle circular references\n    memoizationMap.set(inputValue, returnValue);\n\n    const keys = Object.keys(inputValue);\n\n    keys.forEach(key => {\n      const val = inputValue[key];\n      if (val !== undefined) {\n        returnValue[key] = _dropUndefinedKeys(val, memoizationMap);\n      }\n    });\n\n    return returnValue as T;\n  }\n\n  // For other object types, return as is\n  return inputValue;\n}\n\nfunction isPojo(input: unknown): input is Record<string, unknown> {\n  // Plain objects have Object as constructor or no constructor\n  const constructor = (input as object).constructor;\n  return constructor === Object || constructor === undefined;\n}\n\n/**\n * Ensure that something is an object.\n *\n * Turns `undefined` and `null` into `String`s and all other primitives into instances of their respective wrapper\n * classes (String, Boolean, Number, etc.). Acts as the identity function on non-primitives.\n *\n * @param wat The subject of the objectification\n * @returns A version of `wat` which can safely be used with `Object` class methods\n */\nexport function objectify(wat: unknown): typeof Object {\n  let objectified;\n  switch (true) {\n    // this will catch both undefined and null\n    case wat == undefined:\n      objectified = new String(wat);\n      break;\n\n    // Though symbols and bigints do have wrapper classes (`Symbol` and `BigInt`, respectively), for whatever reason\n    // those classes don't have constructors which can be used with the `new` keyword. We therefore need to cast each as\n    // an object in order to wrap it.\n    case typeof wat === 'symbol' || typeof wat === 'bigint':\n      objectified = Object(wat);\n      break;\n\n    // this will catch the remaining primitives: `String`, `Number`, and `Boolean`\n    case isPrimitive(wat):\n      // eslint-disable-next-line @typescript-eslint/no-unsafe-member-access\n      objectified = new (wat as any).constructor(wat);\n      break;\n\n    // by process of elimination, at this point we know that `wat` must already be an object\n    default:\n      objectified = wat;\n      break;\n  }\n  return objectified;\n}\n","import type { ParameterizedString } from '../types/parameterize';\n\n/**\n * Tagged template function which returns parameterized representation of the message\n * For example: parameterize`This is a log statement with ${x} and ${y} params`, would return:\n * \"__sentry_template_string__\": 'This is a log statement with %s and %s params',\n * \"__sentry_template_values__\": ['first', 'second']\n *\n * @param strings An array of string values splitted between expressions\n * @param values Expressions extracted from template string\n *\n * @returns A `ParameterizedString` object that can be passed into `captureMessage` or Sentry.logger.X methods.\n */\nexport function parameterize(strings: TemplateStringsArray, ...values: unknown[]): ParameterizedString {\n  const formatted = new String(String.raw(strings, ...values)) as ParameterizedString;\n  formatted.__sentry_template_string__ = strings.join('\\x00').replace(/%/g, '%%').replace(/\\0/g, '%s');\n  formatted.__sentry_template_values__ = values;\n  return formatted;\n}\n\n/**\n * Tagged template function which returns parameterized representation of the message.\n *\n * @param strings An array of string values splitted between expressions\n * @param values Expressions extracted from template string\n * @returns A `ParameterizedString` object that can be passed into `captureMessage` or Sentry.logger.X methods.\n */\nexport const fmt = parameterize;\n","/**\n * Parse a sample rate from a given value.\n * This will either return a boolean or number sample rate, if the sample rate is valid (between 0 and 1).\n * If a string is passed, we try to convert it to a number.\n *\n * Any invalid sample rate will return `undefined`.\n */\nexport function parseSampleRate(sampleRate: unknown): number | undefined {\n  if (typeof sampleRate === 'boolean') {\n    return Number(sampleRate);\n  }\n\n  const rate = typeof sampleRate === 'string' ? parseFloat(sampleRate) : sampleRate;\n  if (typeof rate !== 'number' || isNaN(rate) || rate < 0 || rate > 1) {\n    return undefined;\n  }\n\n  return rate;\n}\n","// Slightly modified (no IE8 support, ES6) and transcribed to TypeScript\n// https://github.com/calvinmetcalf/rollup-plugin-node-builtins/blob/63ab8aacd013767445ca299e468d9a60a95328d7/src/es6/path.js\n//\n// Copyright Joyent, Inc.and other Node contributors.\n//\n// Permission is hereby granted, free of charge, to any person obtaining a\n// 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 permit\n// persons to whom the Software is furnished to do so, subject to the\n// following conditions:\n//\n// The above copyright notice and this permission notice shall be included\n// in all copies or substantial portions of the Software.\n//\n// THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS\n// OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF\n// MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN\n// NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM,\n// DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR\n// OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE\n// USE OR OTHER DEALINGS IN THE SOFTWARE.\n\n/** JSDoc */\nfunction normalizeArray(parts: string[], allowAboveRoot?: boolean): string[] {\n  // if the path tries to go above the root, `up` ends up > 0\n  let up = 0;\n  for (let i = parts.length - 1; i >= 0; i--) {\n    const last = parts[i];\n    if (last === '.') {\n      parts.splice(i, 1);\n    } else if (last === '..') {\n      parts.splice(i, 1);\n      up++;\n    } else if (up) {\n      parts.splice(i, 1);\n      up--;\n    }\n  }\n\n  // if the path is allowed to go above the root, restore leading ..s\n  if (allowAboveRoot) {\n    for (; up--; up) {\n      parts.unshift('..');\n    }\n  }\n\n  return parts;\n}\n\n// Split a filename into [root, dir, basename, ext], unix version\n// 'root' is just a slash, or nothing.\nconst splitPathRe = /^(\\S+:\\\\|\\/?)([\\s\\S]*?)((?:\\.{1,2}|[^/\\\\]+?|)(\\.[^./\\\\]*|))(?:[/\\\\]*)$/;\n/** JSDoc */\nfunction splitPath(filename: string): string[] {\n  // Truncate files names greater than 1024 characters to avoid regex dos\n  // https://github.com/getsentry/sentry-javascript/pull/8737#discussion_r1285719172\n  const truncated = filename.length > 1024 ? `<truncated>${filename.slice(-1024)}` : filename;\n  const parts = splitPathRe.exec(truncated);\n  return parts ? parts.slice(1) : [];\n}\n\n// path.resolve([from ...], to)\n// posix version\n/** JSDoc */\nexport function resolve(...args: string[]): string {\n  let resolvedPath = '';\n  let resolvedAbsolute = false;\n\n  for (let i = args.length - 1; i >= -1 && !resolvedAbsolute; i--) {\n    const path = i >= 0 ? args[i] : '/';\n\n    // Skip empty entries\n    if (!path) {\n      continue;\n    }\n\n    resolvedPath = `${path}/${resolvedPath}`;\n    resolvedAbsolute = path.charAt(0) === '/';\n  }\n\n  // At this point the path should be resolved to a full absolute path, but\n  // handle relative paths to be safe (might happen when process.cwd() fails)\n\n  // Normalize the path\n  resolvedPath = normalizeArray(\n    resolvedPath.split('/').filter(p => !!p),\n    !resolvedAbsolute,\n  ).join('/');\n\n  return (resolvedAbsolute ? '/' : '') + resolvedPath || '.';\n}\n\n/** JSDoc */\nfunction trim(arr: string[]): string[] {\n  let start = 0;\n  for (; start < arr.length; start++) {\n    if (arr[start] !== '') {\n      break;\n    }\n  }\n\n  let end = arr.length - 1;\n  for (; end >= 0; end--) {\n    if (arr[end] !== '') {\n      break;\n    }\n  }\n\n  if (start > end) {\n    return [];\n  }\n  return arr.slice(start, end - start + 1);\n}\n\n// path.relative(from, to)\n// posix version\n/** JSDoc */\nexport function relative(from: string, to: string): string {\n  /* eslint-disable no-param-reassign */\n  from = resolve(from).slice(1);\n  to = resolve(to).slice(1);\n  /* eslint-enable no-param-reassign */\n\n  const fromParts = trim(from.split('/'));\n  const toParts = trim(to.split('/'));\n\n  const length = Math.min(fromParts.length, toParts.length);\n  let samePartsLength = length;\n  for (let i = 0; i < length; i++) {\n    if (fromParts[i] !== toParts[i]) {\n      samePartsLength = i;\n      break;\n    }\n  }\n\n  let outputParts = [];\n  for (let i = samePartsLength; i < fromParts.length; i++) {\n    outputParts.push('..');\n  }\n\n  outputParts = outputParts.concat(toParts.slice(samePartsLength));\n\n  return outputParts.join('/');\n}\n\n// path.normalize(path)\n// posix version\n/** JSDoc */\nexport function normalizePath(path: string): string {\n  const isPathAbsolute = isAbsolute(path);\n  const trailingSlash = path.slice(-1) === '/';\n\n  // Normalize the path\n  let normalizedPath = normalizeArray(\n    path.split('/').filter(p => !!p),\n    !isPathAbsolute,\n  ).join('/');\n\n  if (!normalizedPath && !isPathAbsolute) {\n    normalizedPath = '.';\n  }\n  if (normalizedPath && trailingSlash) {\n    normalizedPath += '/';\n  }\n\n  return (isPathAbsolute ? '/' : '') + normalizedPath;\n}\n\n// posix version\n/** JSDoc */\nexport function isAbsolute(path: string): boolean {\n  return path.charAt(0) === '/';\n}\n\n// posix version\n/** JSDoc */\nexport function join(...args: string[]): string {\n  return normalizePath(args.join('/'));\n}\n\n/** JSDoc */\nexport function dirname(path: string): string {\n  const result = splitPath(path);\n  const root = result[0] || '';\n  let dir = result[1];\n\n  if (!root && !dir) {\n    // No dirname whatsoever\n    return '.';\n  }\n\n  if (dir) {\n    // It has a dirname, strip trailing slash\n    dir = dir.slice(0, dir.length - 1);\n  }\n\n  return root + dir;\n}\n\n/** JSDoc */\nexport function basename(path: string, ext?: string): string {\n  let f = splitPath(path)[2] || '';\n  if (ext && f.slice(ext.length * -1) === ext) {\n    f = f.slice(0, f.length - ext.length);\n  }\n  return f;\n}\n","import type { Client } from '../client';\nimport { DEFAULT_ENVIRONMENT } from '../constants';\nimport { notifyEventProcessors } from '../eventProcessors';\nimport type { CaptureContext, ScopeContext } from '../scope';\nimport { Scope } from '../scope';\nimport type { Event, EventHint } from '../types/event';\nimport type { ClientOptions } from '../types/options';\nimport type { StackParser } from '../types/stacktrace';\nimport { getFilenameToDebugIdMap } from './debug-ids';\nimport { addExceptionMechanism, uuid4 } from './misc';\nimport { normalize } from './normalize';\nimport { applyScopeDataToEvent, getCombinedScopeData } from './scopeData';\nimport { truncate } from './string';\nimport { resolvedSyncPromise } from './syncpromise';\nimport { dateTimestampInSeconds } from './time';\n\n/**\n * This type makes sure that we get either a CaptureContext, OR an EventHint.\n * It does not allow mixing them, which could lead to unexpected outcomes, e.g. this is disallowed:\n * { user: { id: '123' }, mechanism: { handled: false } }\n */\nexport type ExclusiveEventHintOrCaptureContext =\n  | (CaptureContext & Partial<{ [key in keyof EventHint]: never }>)\n  | (EventHint & Partial<{ [key in keyof ScopeContext]: never }>);\n\n/**\n * Adds common information to events.\n *\n * The information includes release and environment from `options`,\n * breadcrumbs and context (extra, tags and user) from the scope.\n *\n * Information that is already present in the event is never overwritten. For\n * nested objects, such as the context, keys are merged.\n *\n * @param event The original event.\n * @param hint May contain additional information about the original exception.\n * @param scope A scope containing event metadata.\n * @returns A new event with more information.\n * @hidden\n */\nexport function prepareEvent(\n  options: ClientOptions,\n  event: Event,\n  hint: EventHint,\n  scope?: Scope,\n  client?: Client,\n  isolationScope?: Scope,\n): PromiseLike<Event | null> {\n  const { normalizeDepth = 3, normalizeMaxBreadth = 1_000 } = options;\n  const prepared: Event = {\n    ...event,\n    event_id: event.event_id || hint.event_id || uuid4(),\n    timestamp: event.timestamp || dateTimestampInSeconds(),\n  };\n  const integrations = hint.integrations || options.integrations.map(i => i.name);\n\n  applyClientOptions(prepared, options);\n  applyIntegrationsMetadata(prepared, integrations);\n\n  if (client) {\n    client.emit('applyFrameMetadata', event);\n  }\n\n  // Only put debug IDs onto frames for error events.\n  if (event.type === undefined) {\n    applyDebugIds(prepared, options.stackParser);\n  }\n\n  // If we have scope given to us, use it as the base for further modifications.\n  // This allows us to prevent unnecessary copying of data if `captureContext` is not provided.\n  const finalScope = getFinalScope(scope, hint.captureContext);\n\n  if (hint.mechanism) {\n    addExceptionMechanism(prepared, hint.mechanism);\n  }\n\n  const clientEventProcessors = client ? client.getEventProcessors() : [];\n\n  // This should be the last thing called, since we want that\n  // {@link Scope.addEventProcessor} gets the finished prepared event.\n  // Merge scope data together\n  const data = getCombinedScopeData(isolationScope, finalScope);\n\n  const attachments = [...(hint.attachments || []), ...data.attachments];\n  if (attachments.length) {\n    hint.attachments = attachments;\n  }\n\n  applyScopeDataToEvent(prepared, data);\n\n  const eventProcessors = [\n    ...clientEventProcessors,\n    // Run scope event processors _after_ all other processors\n    ...data.eventProcessors,\n  ];\n\n  // Skip event processors for internal exceptions to prevent recursion\n  // oxlint-disable-next-line typescript/prefer-optional-chain\n  const isInternalException = hint.data && (hint.data as { __sentry__: boolean }).__sentry__ === true;\n  const result = isInternalException\n    ? resolvedSyncPromise(prepared)\n    : notifyEventProcessors(eventProcessors, prepared, hint);\n\n  return result.then(evt => {\n    if (evt) {\n      // We apply the debug_meta field only after all event processors have ran, so that if any event processors modified\n      // file names (e.g.the RewriteFrames integration) the filename -> debug ID relationship isn't destroyed.\n      // This should not cause any PII issues, since we're only moving data that is already on the event and not adding\n      // any new data\n      applyDebugMeta(evt);\n    }\n\n    if (typeof normalizeDepth === 'number' && normalizeDepth > 0) {\n      return normalizeEvent(evt, normalizeDepth, normalizeMaxBreadth);\n    }\n    return evt;\n  });\n}\n\n/**\n * Enhances event using the client configuration.\n * It takes care of all \"static\" values like environment, release and `dist`,\n * as well as truncating overly long values.\n *\n * Only exported for tests.\n *\n * @param event event instance to be enhanced\n */\nexport function applyClientOptions(event: Event, options: ClientOptions): void {\n  const { environment, release, dist, maxValueLength } = options;\n\n  // empty strings do not make sense for environment, release, and dist\n  // so we handle them the same as if they were not provided\n  event.environment = event.environment || environment || DEFAULT_ENVIRONMENT;\n\n  if (!event.release && release) {\n    event.release = release;\n  }\n\n  if (!event.dist && dist) {\n    event.dist = dist;\n  }\n\n  const request = event.request;\n  if (request?.url && maxValueLength) {\n    request.url = truncate(request.url, maxValueLength);\n  }\n\n  if (maxValueLength) {\n    event.exception?.values?.forEach(exception => {\n      if (exception.value) {\n        // Truncates error messages\n        exception.value = truncate(exception.value, maxValueLength);\n      }\n    });\n  }\n}\n\n/**\n * Puts debug IDs into the stack frames of an error event.\n */\nexport function applyDebugIds(event: Event, stackParser: StackParser): void {\n  // Build a map of filename -> debug_id\n  const filenameDebugIdMap = getFilenameToDebugIdMap(stackParser);\n\n  event.exception?.values?.forEach(exception => {\n    exception.stacktrace?.frames?.forEach(frame => {\n      if (frame.filename) {\n        frame.debug_id = filenameDebugIdMap[frame.filename];\n      }\n    });\n  });\n}\n\n/**\n * Moves debug IDs from the stack frames of an error event into the debug_meta field.\n */\nexport function applyDebugMeta(event: Event): void {\n  // Extract debug IDs and filenames from the stack frames on the event.\n  const filenameDebugIdMap: Record<string, string> = {};\n  event.exception?.values?.forEach(exception => {\n    exception.stacktrace?.frames?.forEach(frame => {\n      if (frame.debug_id) {\n        if (frame.abs_path) {\n          filenameDebugIdMap[frame.abs_path] = frame.debug_id;\n        } else if (frame.filename) {\n          filenameDebugIdMap[frame.filename] = frame.debug_id;\n        }\n        delete frame.debug_id;\n      }\n    });\n  });\n\n  if (Object.keys(filenameDebugIdMap).length === 0) {\n    return;\n  }\n\n  // Fill debug_meta information\n  event.debug_meta = event.debug_meta || {};\n  event.debug_meta.images = event.debug_meta.images || [];\n  const images = event.debug_meta.images;\n  Object.entries(filenameDebugIdMap).forEach(([filename, debug_id]) => {\n    images.push({\n      type: 'sourcemap',\n      code_file: filename,\n      debug_id,\n    });\n  });\n}\n\n/**\n * This function adds all used integrations to the SDK info in the event.\n * @param event The event that will be filled with all integrations.\n */\nfunction applyIntegrationsMetadata(event: Event, integrationNames: string[]): void {\n  if (integrationNames.length > 0) {\n    event.sdk = event.sdk || {};\n    event.sdk.integrations = [...(event.sdk.integrations || []), ...integrationNames];\n  }\n}\n\n/**\n * Applies `normalize` function on necessary `Event` attributes to make them safe for serialization.\n * Normalized keys:\n * - `breadcrumbs.data`\n * - `user`\n * - `contexts`\n * - `extra`\n * @param event Event\n * @returns Normalized event\n */\nfunction normalizeEvent(event: Event | null, depth: number, maxBreadth: number): Event | null {\n  if (!event) {\n    return null;\n  }\n\n  const normalized: Event = {\n    ...event,\n    ...(event.breadcrumbs && {\n      breadcrumbs: event.breadcrumbs.map(b => ({\n        ...b,\n        ...(b.data && {\n          data: normalize(b.data, depth, maxBreadth),\n        }),\n      })),\n    }),\n    ...(event.user && {\n      user: normalize(event.user, depth, maxBreadth),\n    }),\n    ...(event.contexts && {\n      contexts: normalize(event.contexts, depth, maxBreadth),\n    }),\n    ...(event.extra && {\n      extra: normalize(event.extra, depth, maxBreadth),\n    }),\n  };\n\n  // event.contexts.trace stores information about a Transaction. Similarly,\n  // event.spans[] stores information about child Spans. Given that a\n  // Transaction is conceptually a Span, normalization should apply to both\n  // Transactions and Spans consistently.\n  // For now the decision is to skip normalization of Transactions and Spans,\n  // so this block overwrites the normalized event to add back the original\n  // Transaction information prior to normalization.\n  if (event.contexts?.trace && normalized.contexts) {\n    normalized.contexts.trace = event.contexts.trace;\n\n    // event.contexts.trace.data may contain circular/dangerous data so we need to normalize it\n    if (event.contexts.trace.data) {\n      normalized.contexts.trace.data = normalize(event.contexts.trace.data, depth, maxBreadth);\n    }\n  }\n\n  // event.spans[].data may contain circular/dangerous data so we need to normalize it\n  if (event.spans) {\n    normalized.spans = event.spans.map(span => {\n      return {\n        ...span,\n        ...(span.data && {\n          data: normalize(span.data, depth, maxBreadth),\n        }),\n      };\n    });\n  }\n\n  // event.contexts.flags (FeatureFlagContext) stores context for our feature\n  // flag integrations. It has a greater nesting depth than our other typed\n  // Contexts, so we re-normalize with a fixed depth of 3 here. We do not want\n  // to skip this in case of conflicting, user-provided context.\n  if (event.contexts?.flags && normalized.contexts) {\n    normalized.contexts.flags = normalize(event.contexts.flags, 3, maxBreadth);\n  }\n\n  return normalized;\n}\n\nfunction getFinalScope(scope: Scope | undefined, captureContext: CaptureContext | undefined): Scope | undefined {\n  if (!captureContext) {\n    return scope;\n  }\n\n  const finalScope = scope ? scope.clone() : new Scope();\n  finalScope.update(captureContext);\n  return finalScope;\n}\n\n/**\n * Parse either an `EventHint` directly, or convert a `CaptureContext` to an `EventHint`.\n * This is used to allow to update method signatures that used to accept a `CaptureContext` but should now accept an `EventHint`.\n */\nexport function parseEventHintOrCaptureContext(\n  hint: ExclusiveEventHintOrCaptureContext | undefined,\n): EventHint | undefined {\n  if (!hint) {\n    return undefined;\n  }\n\n  // If you pass a Scope or `() => Scope` as CaptureContext, we just return this as captureContext\n  if (hintIsScopeOrFunction(hint)) {\n    return { captureContext: hint };\n  }\n\n  if (hintIsScopeContext(hint)) {\n    return {\n      captureContext: hint,\n    };\n  }\n\n  return hint;\n}\n\nfunction hintIsScopeOrFunction(hint: CaptureContext | EventHint): hint is Scope | ((scope: Scope) => Scope) {\n  return hint instanceof Scope || typeof hint === 'function';\n}\n\ntype ScopeContextProperty = keyof ScopeContext;\nconst captureContextKeys: readonly ScopeContextProperty[] = [\n  'user',\n  'level',\n  'extra',\n  'contexts',\n  'tags',\n  'fingerprint',\n  'propagationContext',\n] as const;\n\nfunction hintIsScopeContext(hint: Partial<ScopeContext> | EventHint): hint is Partial<ScopeContext> {\n  return Object.keys(hint).some(key => captureContextKeys.includes(key as ScopeContextProperty));\n}\n","import { rejectedSyncPromise, resolvedSyncPromise } from './syncpromise';\nimport { safeUnref } from './timer';\n\nexport interface PromiseBuffer<T> {\n  // exposes the internal array so tests can assert on the state of it.\n  // XXX: this really should not be public api.\n  $: PromiseLike<T>[];\n  add(taskProducer: () => PromiseLike<T>): PromiseLike<T>;\n  drain(timeout?: number): PromiseLike<boolean>;\n}\n\nexport const SENTRY_BUFFER_FULL_ERROR = Symbol.for('SentryBufferFullError');\n\n/**\n * Creates an new PromiseBuffer object with the specified limit\n * @param limit max number of promises that can be stored in the buffer\n */\nexport function makePromiseBuffer<T>(limit: number = 100): PromiseBuffer<T> {\n  const buffer: Set<PromiseLike<T>> = new Set();\n\n  function isReady(): boolean {\n    return buffer.size < limit;\n  }\n\n  /**\n   * Remove a promise from the queue.\n   *\n   * @param task Can be any PromiseLike<T>\n   * @returns Removed promise.\n   */\n  function remove(task: PromiseLike<T>): void {\n    buffer.delete(task);\n  }\n\n  /**\n   * Add a promise (representing an in-flight action) to the queue, and set it to remove itself on fulfillment.\n   *\n   * @param taskProducer A function producing any PromiseLike<T>; In previous versions this used to be `task:\n   *        PromiseLike<T>`, but under that model, Promises were instantly created on the call-site and their executor\n   *        functions therefore ran immediately. Thus, even if the buffer was full, the action still happened. By\n   *        requiring the promise to be wrapped in a function, we can defer promise creation until after the buffer\n   *        limit check.\n   * @returns The original promise.\n   */\n  function add(taskProducer: () => PromiseLike<T>): PromiseLike<T> {\n    if (!isReady()) {\n      return rejectedSyncPromise(SENTRY_BUFFER_FULL_ERROR);\n    }\n\n    // start the task and add its promise to the queue\n    const task = taskProducer();\n    buffer.add(task);\n    void task.then(\n      () => remove(task),\n      () => remove(task),\n    );\n    return task;\n  }\n\n  /**\n   * Wait for all promises in the queue to resolve or for timeout to expire, whichever comes first.\n   *\n   * @param timeout The time, in ms, after which to resolve to `false` if the queue is still non-empty. Passing `0` (or\n   * not passing anything) will make the promise wait as long as it takes for the queue to drain before resolving to\n   * `true`.\n   * @returns A promise which will resolve to `true` if the queue is already empty or drains before the timeout, and\n   * `false` otherwise\n   */\n  function drain(timeout?: number): PromiseLike<boolean> {\n    if (!buffer.size) {\n      return resolvedSyncPromise(true);\n    }\n\n    // We want to resolve even if one of the promises rejects\n    const drainPromise = Promise.allSettled(Array.from(buffer)).then(() => true);\n\n    if (!timeout) {\n      return drainPromise;\n    }\n\n    const promises = [\n      drainPromise,\n      new Promise<boolean>(resolve => safeUnref(setTimeout(() => resolve(false), timeout))),\n    ];\n\n    return Promise.race(promises);\n  }\n\n  return {\n    get $(): PromiseLike<T>[] {\n      return Array.from(buffer);\n    },\n    add,\n    drain,\n  };\n}\n","import { uuid4 } from './misc';\n\n/**\n * Generate a random, valid trace ID.\n */\nexport function generateTraceId(): string {\n  return uuid4();\n}\n\n/**\n * Generate a random, valid span ID.\n */\nexport function generateSpanId(): string {\n  return uuid4().substring(16);\n}\n","import { GLOBAL_OBJ } from './worldwide';\n\nexport type RandomSafeContextRunner = <T>(callback: () => T) => T;\n\n// undefined = not yet resolved, null = no runner found, function = runner found\nlet RESOLVED_RUNNER: RandomSafeContextRunner | null | undefined;\n\n/**\n * Simple wrapper that allows SDKs to *secretly* set context wrapper to generate safe random IDs in cache components contexts\n */\nexport function withRandomSafeContext<T>(cb: () => T): T {\n  // Skips future symbol lookups if we've already resolved (or attempted to resolve) the runner once\n  if (RESOLVED_RUNNER !== undefined) {\n    return RESOLVED_RUNNER ? RESOLVED_RUNNER(cb) : cb();\n  }\n\n  const sym = Symbol.for('__SENTRY_SAFE_RANDOM_ID_WRAPPER__');\n  const globalWithSymbol: typeof GLOBAL_OBJ & { [sym]?: RandomSafeContextRunner } = GLOBAL_OBJ;\n\n  if (sym in globalWithSymbol && typeof globalWithSymbol[sym] === 'function') {\n    RESOLVED_RUNNER = globalWithSymbol[sym];\n    return RESOLVED_RUNNER(cb);\n  }\n\n  RESOLVED_RUNNER = null;\n  return cb();\n}\n\n/**\n * Identical to Math.random() but wrapped in withRandomSafeContext\n * to ensure safe random number generation in certain contexts (e.g., Next.js Cache Components).\n */\nexport function safeMathRandom(): number {\n  return withRandomSafeContext(() => Math.random());\n}\n\n/**\n * Identical to Date.now() but wrapped in withRandomSafeContext\n * to ensure safe time value generation in certain contexts (e.g., Next.js Cache Components).\n */\nexport function safeDateNow(): number {\n  return withRandomSafeContext(() => Date.now());\n}\n","import type { DataCategory } from '../types/datacategory';\nimport type { TransportMakeRequestResponse } from '../types/transport';\nimport { safeDateNow } from './randomSafeContext';\n\n// Intentionally keeping the key broad, as we don't know for sure what rate limit headers get returned from backend\nexport type RateLimits = Record<string, number>;\n\nexport const DEFAULT_RETRY_AFTER = 60 * 1000; // 60 seconds\n\n/**\n * Extracts Retry-After value from the request header or returns default value\n * @param header string representation of 'Retry-After' header\n * @param now current unix timestamp\n *\n */\nexport function parseRetryAfterHeader(header: string, now: number = safeDateNow()): number {\n  const headerDelay = parseInt(`${header}`, 10);\n  if (!isNaN(headerDelay)) {\n    return headerDelay * 1000;\n  }\n\n  const headerDate = Date.parse(`${header}`);\n  if (!isNaN(headerDate)) {\n    return headerDate - now;\n  }\n\n  return DEFAULT_RETRY_AFTER;\n}\n\n/**\n * Gets the time that the given category is disabled until for rate limiting.\n * In case no category-specific limit is set but a general rate limit across all categories is active,\n * that time is returned.\n *\n * @return the time in ms that the category is disabled until or 0 if there's no active rate limit.\n */\nexport function disabledUntil(limits: RateLimits, dataCategory: DataCategory): number {\n  return limits[dataCategory] || limits.all || 0;\n}\n\n/**\n * Checks if a category is rate limited\n */\nexport function isRateLimited(limits: RateLimits, dataCategory: DataCategory, now: number = safeDateNow()): boolean {\n  return disabledUntil(limits, dataCategory) > now;\n}\n\n/**\n * Update ratelimits from incoming headers.\n *\n * @return the updated RateLimits object.\n */\nexport function updateRateLimits(\n  limits: RateLimits,\n  { statusCode, headers }: TransportMakeRequestResponse,\n  now: number = safeDateNow(),\n): RateLimits {\n  const updatedRateLimits: RateLimits = {\n    ...limits,\n  };\n\n  // \"The name is case-insensitive.\"\n  // https://developer.mozilla.org/en-US/docs/Web/API/Headers/get\n  const rateLimitHeader = headers?.['x-sentry-rate-limits'];\n  const retryAfterHeader = headers?.['retry-after'];\n\n  if (rateLimitHeader) {\n    /**\n     * rate limit headers are of the form\n     *     <header>,<header>,..\n     * where each <header> is of the form\n     *     <retry_after>: <categories>: <scope>: <reason_code>: <namespaces>\n     * where\n     *     <retry_after> is a delay in seconds\n     *     <categories> is the event type(s) (error, transaction, etc) being rate limited and is of the form\n     *         <category>;<category>;...\n     *     <scope> is what's being limited (org, project, or key) - ignored by SDK\n     *     <reason_code> is an arbitrary string like \"org_quota\" - ignored by SDK\n     *     <namespaces> Semicolon-separated list of metric namespace identifiers. Defines which namespace(s) will be affected.\n     *         Only present if rate limit applies to the metric_bucket data category.\n     */\n    for (const limit of rateLimitHeader.trim().split(',')) {\n      const [retryAfter, categories, , , namespaces] = limit.split(':', 5) as [string, ...string[]];\n      const headerDelay = parseInt(retryAfter, 10);\n      const delay = (!isNaN(headerDelay) ? headerDelay : 60) * 1000; // 60sec default\n      if (!categories) {\n        updatedRateLimits.all = now + delay;\n      } else {\n        for (const category of categories.split(';')) {\n          if (category === 'metric_bucket') {\n            // namespaces will be present when category === 'metric_bucket'\n            if (!namespaces || namespaces.split(';').includes('custom')) {\n              updatedRateLimits[category] = now + delay;\n            }\n          } else {\n            updatedRateLimits[category] = now + delay;\n          }\n        }\n      }\n    }\n  } else if (retryAfterHeader) {\n    updatedRateLimits.all = now + parseRetryAfterHeader(retryAfterHeader, now);\n  } else if (statusCode === 429) {\n    updatedRateLimits.all = now + 60 * 1000;\n  }\n\n  return updatedRateLimits;\n}\n","/* eslint-disable max-lines-per-function */\nimport { DEBUG_BUILD } from '../debug-build';\nimport type { Scope } from '../scope';\nimport type { ResolvedDataCollection } from '../types/datacollection';\nimport type { PolymorphicRequest } from '../types/polymorphics';\nimport type { RequestEventData } from '../types/request';\nimport type { WebFetchHeaders, WebFetchRequest } from '../types/webfetchapi';\nimport { debug } from './debug-logger';\nimport { defaultPiiToCollectionOptions } from './data-collection/defaultPiiToCollectionOptions';\nimport { FILTERED_VALUE, SENSITIVE_COOKIE_NAME_SNIPPETS } from './data-collection/filtering-snippets';\nimport { filterKeyValueData } from './data-collection/filterKeyValueData';\nimport { safeUnref } from './timer';\n\n/**\n * Maximum size of incoming HTTP request bodies attached to events.\n *\n * - `'none'`: No request bodies will be attached\n * - `'small'`: Request bodies up to 1,000 bytes will be attached\n * - `'medium'`: Request bodies up to 10,000 bytes will be attached\n * - `'always'`: Request bodies will always be attached (up to 1MB hard cap)\n */\nexport type MaxRequestBodySize = 'none' | 'small' | 'medium' | 'always';\n\n/** Hard cap on captured body size, even when `maxRequestBodySize` is `'always'`. */\nexport const MAX_BODY_BYTE_LENGTH = 1_024 * 1_024;\n\n/** Content types that are safe to capture as text. */\nconst TEXT_CONTENT_TYPES = [\n  'text/',\n  'application/json',\n  'application/x-www-form-urlencoded',\n  'application/xml',\n  'application/graphql',\n];\n\n/**\n * Convert a `maxRequestBodySize` setting to a maximum byte length.\n */\nexport function getMaxBodyByteLength(maxRequestBodySize: Exclude<MaxRequestBodySize, 'none'>): number {\n  if (maxRequestBodySize === 'small') return 1_000;\n  if (maxRequestBodySize === 'medium') return 10_000;\n  return MAX_BODY_BYTE_LENGTH;\n}\n\n/**\n * Transforms a `Headers` object that implements the `Web Fetch API` (https://developer.mozilla.org/en-US/docs/Web/API/Headers) into a simple key-value dict.\n * The header keys will be lower case: e.g. A \"Content-Type\" header will be stored as \"content-type\".\n */\nexport function winterCGHeadersToDict(winterCGHeaders: WebFetchHeaders): Record<string, string> {\n  const headers: Record<string, string> = {};\n  try {\n    winterCGHeaders.forEach((value, key) => {\n      if (typeof value === 'string') {\n        // We check that value is a string even though it might be redundant to make sure prototype pollution is not possible.\n        headers[key] = value;\n      }\n    });\n  } catch {\n    // just return the empty headers\n  }\n\n  return headers;\n}\n\n/**\n * Convert common request headers to a simple dictionary.\n */\nexport function headersToDict(\n  reqHeaders: Record<string, string | string[] | undefined | number>,\n): Record<string, string> {\n  const headers: Record<string, string> = Object.create(null);\n\n  try {\n    Object.entries(reqHeaders).forEach(([key, value]) => {\n      if (typeof value === 'string') {\n        headers[key] = value;\n      } else if (typeof value === 'number') {\n        headers[key] = String(value);\n      }\n    });\n  } catch {\n    // just return the empty headers\n  }\n\n  return headers;\n}\n\n/**\n * Converts a `Request` object that implements the `Web Fetch API` (https://developer.mozilla.org/en-US/docs/Web/API/Headers) into the format that the `RequestData` integration understands.\n */\nexport function winterCGRequestToRequestData(req: WebFetchRequest): RequestEventData {\n  const headers = winterCGHeadersToDict(req.headers);\n\n  return {\n    method: req.method,\n    url: req.url,\n    query_string: extractQueryParamsFromUrl(req.url),\n    headers,\n    // TODO: Can we extract body data from the request?\n  };\n}\n\n/**\n * Checks if the content type is textual and safe to capture.\n */\nfunction isTextualContentType(contentType: string | null): boolean {\n  if (!contentType) {\n    return false;\n  }\n  const lowerContentType = contentType.toLowerCase();\n  return TEXT_CONTENT_TYPES.some(type => lowerContentType.includes(type));\n}\n\n/**\n * Captures the body from a Web Fetch API Request and adds it to the isolation scope.\n *\n * This function clones the request to read the body without affecting the original.\n * Only textual content types are captured - binary data is skipped.\n *\n * This is used by WinterCG-compatible runtimes (Cloudflare Workers, Deno, Bun, Vercel Edge, etc.)\n * that use the Web Fetch API Request object.\n *\n * @param request - The incoming Web Fetch API Request\n * @param isolationScope - The isolation scope to add the body to\n * @param maxRequestBodySize - The maximum size of the request body to capture ('small' = 1KB, 'medium' = 10KB, 'always' = 1MB)\n */\nexport async function captureBodyFromWinterCGRequest(\n  request: WebFetchRequest,\n  isolationScope: Scope,\n  maxRequestBodySize: Exclude<MaxRequestBodySize, 'none'>,\n): Promise<void> {\n  try {\n    const contentType = request.headers.get('content-type');\n\n    if (!isTextualContentType(contentType)) {\n      DEBUG_BUILD && debug.log('Skipping body capture for non-textual content type:', contentType);\n      return;\n    }\n\n    if (!request.body) {\n      return;\n    }\n\n    const contentLength = request.headers.get('content-length');\n    const maxBodySize = getMaxBodyByteLength(maxRequestBodySize);\n\n    if (contentLength) {\n      const length = parseInt(contentLength, 10);\n      if (!isNaN(length) && length > MAX_BODY_BYTE_LENGTH) {\n        DEBUG_BUILD && debug.log('Skipping body capture: body too large', length);\n        return;\n      }\n    }\n\n    const clonedRequest = request.clone();\n    const bodyPromise = clonedRequest.text();\n    const timeoutPromise = new Promise<null>(resolve => {\n      safeUnref(setTimeout(() => resolve(null), 2000));\n    });\n\n    const body = await Promise.race([bodyPromise, timeoutPromise]);\n\n    if (body === null) {\n      DEBUG_BUILD && debug.log('Timeout reading request body');\n      return;\n    }\n\n    if (!body) {\n      return;\n    }\n\n    // Using TextEncoder to get byte length for UTF-8 strings\n    const encoder = new TextEncoder();\n    const bytes = encoder.encode(body);\n    const bodyByteLength = bytes.length;\n\n    let truncatedBody: string;\n    if (bodyByteLength > maxBodySize) {\n      const decoder = new TextDecoder();\n      truncatedBody = `${decoder.decode(bytes.slice(0, maxBodySize - 3))}...`;\n    } else {\n      truncatedBody = body;\n    }\n\n    isolationScope.setSDKProcessingMetadata({ normalizedRequest: { data: truncatedBody } });\n\n    DEBUG_BUILD && debug.log('Captured request body:', bodyByteLength, 'bytes');\n  } catch (error) {\n    DEBUG_BUILD && debug.error('Error capturing request body:', error);\n  }\n}\n\n/**\n * Convert a HTTP request object to RequestEventData to be passed as normalizedRequest.\n * Instead of allowing `PolymorphicRequest` to be passed,\n * we want to be more specific and generally require a http.IncomingMessage-like object.\n */\nexport function httpRequestToRequestData(request: {\n  method?: string;\n  url?: string;\n  headers?: {\n    [key: string]: string | string[] | undefined;\n  };\n  protocol?: string;\n  socket?: {\n    encrypted?: boolean;\n    remoteAddress?: string;\n  };\n}): RequestEventData {\n  const headers = request.headers || {};\n\n  // Check for x-forwarded-host first, then fall back to host header\n  const forwardedHost = typeof headers['x-forwarded-host'] === 'string' ? headers['x-forwarded-host'] : undefined;\n  const host = forwardedHost || (typeof headers.host === 'string' ? headers.host : undefined);\n\n  // Check for x-forwarded-proto first, then fall back to existing protocol detection\n  const forwardedProto = typeof headers['x-forwarded-proto'] === 'string' ? headers['x-forwarded-proto'] : undefined;\n  const protocol = forwardedProto || request.protocol || (request.socket?.encrypted ? 'https' : 'http');\n\n  const url = request.url || '';\n\n  const absoluteUrl = getAbsoluteUrl({\n    url,\n    host,\n    protocol,\n  });\n\n  // This is non-standard, but may be sometimes set\n  // It may be overwritten later by our own body handling\n  const data = (request as PolymorphicRequest).body || undefined;\n\n  // This is non-standard, but may be set on e.g. Next.js or Express requests\n  const cookies = (request as PolymorphicRequest).cookies;\n\n  return {\n    url: absoluteUrl,\n    method: request.method,\n    query_string: extractQueryParamsFromUrl(url),\n    headers: headersToDict(headers),\n    cookies,\n    data,\n  };\n}\n\nfunction getAbsoluteUrl({\n  url,\n  protocol,\n  host,\n}: {\n  url?: string;\n  protocol: string;\n  host?: string;\n}): string | undefined {\n  if (url?.startsWith('http')) {\n    return url;\n  }\n\n  if (url && host) {\n    return `${protocol}://${host}${url}`;\n  }\n\n  return undefined;\n}\n\n/**\n * Converts incoming HTTP request or response headers to OpenTelemetry span attributes following semantic conventions.\n * Header names are converted to the format: http.<request|response>.header.<key>\n * where <key> is the header name in lowercase with dashes converted to underscores.\n *\n * @param lifecycle - The lifecycle of the headers, either 'request' or 'response'\n *\n * @see https://opentelemetry.io/docs/specs/semconv/registry/attributes/http/#http-request-header\n * @see https://opentelemetry.io/docs/specs/semconv/registry/attributes/http/#http-response-header\n *\n * @see https://getsentry.github.io/sentry-conventions/attributes/http/#http-request-header-key\n * @see https://getsentry.github.io/sentry-conventions/attributes/http/#http-response-header-key\n */\nexport function httpHeadersToSpanAttributes(\n  headers: Record<string, string | string[] | undefined>,\n  // TODO(v11): Remove boolean support once sendDefaultPii is fully removed.\n  // Internally, always pass ResolvedDataCollection from client.getDataCollectionOptions().\n  dataCollection: ResolvedDataCollection | boolean = false,\n  lifecycle: 'request' | 'response' = 'request',\n): Record<string, string> {\n  const resolvedDataCollection =\n    typeof dataCollection === 'boolean' ? defaultPiiToCollectionOptions(dataCollection) : dataCollection;\n\n  const headerBehavior =\n    lifecycle === 'request' ? resolvedDataCollection.httpHeaders.request : resolvedDataCollection.httpHeaders.response;\n  const cookieBehavior = resolvedDataCollection.cookies;\n  const prefix = `http.${lifecycle}.header.`;\n\n  const spanAttributes: Record<string, string> = {};\n\n  try {\n    const regularHeaders: Record<string, string> = {};\n\n    for (const [key, value] of Object.entries(headers)) {\n      if (value == null) {\n        continue;\n      }\n\n      const lowerKey = key.toLowerCase();\n      const isCookieHeader = lowerKey === 'cookie' || lowerKey === 'set-cookie';\n\n      if (isCookieHeader) {\n        if (cookieBehavior === false) {\n          continue;\n        }\n\n        if (typeof value === 'string' && value !== '') {\n          const parsed = parseCookieHeader(value, lowerKey === 'set-cookie');\n          const filtered = filterKeyValueData(parsed, cookieBehavior, SENSITIVE_COOKIE_NAME_SNIPPETS);\n          for (const [cookieKey, cookieValue] of Object.entries(filtered)) {\n            spanAttributes[`${prefix}${normalizeAttributeKey(lowerKey)}.${normalizeAttributeKey(cookieKey)}`] =\n              cookieValue;\n          }\n        } else {\n          spanAttributes[`${prefix}${normalizeAttributeKey(lowerKey)}`] = FILTERED_VALUE;\n        }\n      } else {\n        if (headerBehavior === false) {\n          continue;\n        }\n\n        if (Array.isArray(value)) {\n          regularHeaders[lowerKey] = value.map(v => (v != null ? String(v) : v)).join(';');\n        } else if (typeof value === 'string') {\n          regularHeaders[lowerKey] = value;\n        }\n      }\n    }\n\n    if (headerBehavior !== false) {\n      const filtered = filterKeyValueData(regularHeaders, headerBehavior);\n      for (const [headerKey, headerValue] of Object.entries(filtered)) {\n        spanAttributes[`${prefix}${normalizeAttributeKey(headerKey)}`] = headerValue;\n      }\n    }\n  } catch {\n    // Return empty object if there's an error\n  }\n\n  return spanAttributes;\n}\n\nfunction normalizeAttributeKey(key: string): string {\n  return key.replace(/-/g, '_');\n}\n\nfunction parseCookieHeader(value: string, isSetCookie: boolean): Record<string, string> {\n  // Set-Cookie: single cookie with attributes (\"name=value; HttpOnly; Secure\")\n  // Cookie: multiple cookies separated by \"; \" (\"cookie1=value1; cookie2=value2\")\n  const semicolonIndex = value.indexOf(';');\n  const cookieString = isSetCookie && semicolonIndex !== -1 ? value.substring(0, semicolonIndex) : value;\n  const cookies = isSetCookie ? [cookieString] : cookieString.split('; ');\n\n  const result: Record<string, string> = {};\n  for (const cookie of cookies) {\n    const equalSignIndex = cookie.indexOf('=');\n    const cookieKey = (equalSignIndex !== -1 ? cookie.substring(0, equalSignIndex) : cookie).toLowerCase();\n    const cookieValue = equalSignIndex !== -1 ? cookie.substring(equalSignIndex + 1) : '';\n    result[cookieKey] = cookieValue;\n  }\n  return result;\n}\n\n/** Extract the query params from an URL. */\nexport function extractQueryParamsFromUrl(url: string): string | undefined {\n  // url is path and query string\n  if (!url) {\n    return;\n  }\n\n  try {\n    // The `URL` constructor can't handle internal URLs of the form `/some/path/here`, so stick a dummy protocol and\n    // hostname as the base. Since the point here is just to grab the query string, it doesn't matter what we use.\n    const queryParams = new URL(url, 'http://s.io').search.slice(1);\n    return queryParams.length ? queryParams : undefined;\n  } catch {\n    return undefined;\n  }\n}\n","import { getGlobalScope } from '../currentScopes';\nimport type { Scope, ScopeData } from '../scope';\nimport { getDynamicSamplingContextFromSpan } from '../tracing/dynamicSamplingContext';\nimport type { Breadcrumb } from '../types/breadcrumb';\nimport type { Event } from '../types/event';\nimport type { Span } from '../types/span';\nimport { merge } from './merge';\nimport { getRootSpan, spanToJSON, spanToTraceContext } from './spanUtils';\n\n/**\n * Applies data from the scope to the event and runs all event processors on it.\n */\nexport function applyScopeDataToEvent(event: Event, data: ScopeData): void {\n  const { fingerprint, span, breadcrumbs, sdkProcessingMetadata } = data;\n\n  // Apply general data\n  applyDataToEvent(event, data);\n\n  // We want to set the trace context for normal events only if there isn't already\n  // a trace context on the event. There is a product feature in place where we link\n  // errors with transaction and it relies on that.\n  if (span) {\n    applySpanToEvent(event, span);\n  }\n\n  applyFingerprintToEvent(event, fingerprint);\n  applyBreadcrumbsToEvent(event, breadcrumbs);\n  applySdkMetadataToEvent(event, sdkProcessingMetadata);\n}\n\n/** Merge data of two scopes together. */\nexport function mergeScopeData(data: ScopeData, mergeData: ScopeData): void {\n  const {\n    extra,\n    tags,\n    attributes,\n    user,\n    contexts,\n    level,\n    sdkProcessingMetadata,\n    breadcrumbs,\n    fingerprint,\n    eventProcessors,\n    attachments,\n    propagationContext,\n    transactionName,\n    span,\n  } = mergeData;\n\n  mergeAndOverwriteScopeData(data, 'extra', extra);\n  mergeAndOverwriteScopeData(data, 'tags', tags);\n  mergeAndOverwriteScopeData(data, 'attributes', attributes);\n  mergeAndOverwriteScopeData(data, 'user', user);\n  mergeAndOverwriteScopeData(data, 'contexts', contexts);\n\n  data.sdkProcessingMetadata = merge(data.sdkProcessingMetadata, sdkProcessingMetadata, 2);\n\n  if (level) {\n    data.level = level;\n  }\n\n  if (transactionName) {\n    data.transactionName = transactionName;\n  }\n\n  if (span) {\n    data.span = span;\n  }\n\n  if (breadcrumbs.length) {\n    data.breadcrumbs = [...data.breadcrumbs, ...breadcrumbs];\n  }\n\n  if (fingerprint.length) {\n    data.fingerprint = [...data.fingerprint, ...fingerprint];\n  }\n\n  if (eventProcessors.length) {\n    data.eventProcessors = [...data.eventProcessors, ...eventProcessors];\n  }\n\n  if (attachments.length) {\n    data.attachments = [...data.attachments, ...attachments];\n  }\n\n  data.propagationContext = { ...data.propagationContext, ...propagationContext };\n}\n\n/**\n * Merges certain scope data. Undefined values will overwrite any existing values.\n * Exported only for tests.\n */\nexport function mergeAndOverwriteScopeData<\n  Prop extends 'extra' | 'tags' | 'attributes' | 'user' | 'contexts' | 'sdkProcessingMetadata',\n  Data extends ScopeData,\n>(data: Data, prop: Prop, mergeVal: Data[Prop]): void {\n  data[prop] = merge(data[prop], mergeVal, 1);\n}\n\n/** Exported only for tests */\nexport function mergeArray<Prop extends 'breadcrumbs' | 'fingerprint'>(\n  event: Event,\n  prop: Prop,\n  mergeVal: ScopeData[Prop],\n): void {\n  const prevVal = event[prop];\n  // If we are not merging any new values,\n  // we only need to proceed if there was an empty array before (as we want to replace it with undefined)\n  if (!mergeVal.length && (!prevVal || prevVal.length)) {\n    return;\n  }\n\n  const merged = [...(prevVal || []), ...mergeVal] as ScopeData[Prop];\n  event[prop] = merged.length ? merged : undefined;\n}\n\n/**\n * Get the scope data for the current scope after merging with the\n * global scope and isolation scope.\n *\n * @param currentScope - The current scope.\n * @returns The scope data.\n */\nexport function getCombinedScopeData(isolationScope: Scope | undefined, currentScope: Scope | undefined): ScopeData {\n  const scopeData = getGlobalScope().getScopeData();\n  isolationScope && mergeScopeData(scopeData, isolationScope.getScopeData());\n  currentScope && mergeScopeData(scopeData, currentScope.getScopeData());\n  return scopeData;\n}\n\nfunction applyDataToEvent(event: Event, data: ScopeData): void {\n  const { extra, tags, user, contexts, level, transactionName } = data;\n\n  if (Object.keys(extra).length) {\n    event.extra = { ...extra, ...event.extra };\n  }\n\n  if (Object.keys(tags).length) {\n    event.tags = { ...tags, ...event.tags };\n  }\n\n  if (Object.keys(user).length) {\n    event.user = { ...user, ...event.user };\n  }\n\n  if (Object.keys(contexts).length) {\n    event.contexts = { ...contexts, ...event.contexts };\n  }\n\n  if (level) {\n    event.level = level;\n  }\n\n  // transaction events get their `transaction` from the root span name\n  if (transactionName && event.type !== 'transaction') {\n    event.transaction = transactionName;\n  }\n}\n\nfunction applyBreadcrumbsToEvent(event: Event, breadcrumbs: Breadcrumb[]): void {\n  const mergedBreadcrumbs = [...(event.breadcrumbs || []), ...breadcrumbs];\n  event.breadcrumbs = mergedBreadcrumbs.length ? mergedBreadcrumbs : undefined;\n}\n\nfunction applySdkMetadataToEvent(event: Event, sdkProcessingMetadata: ScopeData['sdkProcessingMetadata']): void {\n  event.sdkProcessingMetadata = {\n    ...event.sdkProcessingMetadata,\n    ...sdkProcessingMetadata,\n  };\n}\n\nfunction applySpanToEvent(event: Event, span: Span): void {\n  event.contexts = {\n    trace: spanToTraceContext(span),\n    ...event.contexts,\n  };\n\n  event.sdkProcessingMetadata = {\n    dynamicSamplingContext: getDynamicSamplingContextFromSpan(span),\n    ...event.sdkProcessingMetadata,\n  };\n\n  const rootSpan = getRootSpan(span);\n  const transactionName = spanToJSON(rootSpan).description;\n  if (transactionName && !event.transaction && event.type === 'transaction') {\n    event.transaction = transactionName;\n  }\n}\n\n/**\n * Applies fingerprint from the scope to the event if there's one,\n * uses message if there's one instead or get rid of empty fingerprint\n */\nfunction applyFingerprintToEvent(event: Event, fingerprint: ScopeData['fingerprint'] | undefined): void {\n  // Make sure it's an array first and we actually have something in place\n  event.fingerprint = event.fingerprint\n    ? Array.isArray(event.fingerprint)\n      ? event.fingerprint\n      : [event.fingerprint]\n    : [];\n\n  // If we have something on the scope, then merge it with event\n  if (fingerprint) {\n    event.fingerprint = event.fingerprint.concat(fingerprint);\n  }\n\n  // If we have no data at all, remove empty array default\n  if (!event.fingerprint.length) {\n    delete event.fingerprint;\n  }\n}\n","import type { CoreOptions } from '../types/options';\nimport { SDK_VERSION } from '../utils/version';\n\n/**\n * A builder for the SDK metadata in the options for the SDK initialization.\n *\n * Note: This function is identical to `buildMetadata` in Remix and NextJS and SvelteKit.\n * We don't extract it for bundle size reasons.\n * @see https://github.com/getsentry/sentry-javascript/pull/7404\n * @see https://github.com/getsentry/sentry-javascript/pull/4196\n *\n * If you make changes to this function consider updating the others as well.\n *\n * @param options SDK options object that gets mutated\n * @param names list of package names\n */\nexport function applySdkMetadata(options: CoreOptions, name: string, names = [name], source = 'npm'): void {\n  const sdk = ((options._metadata = options._metadata || {}).sdk = options._metadata.sdk || {});\n\n  if (!sdk.name) {\n    sdk.name = `sentry.javascript.${name}`;\n    sdk.packages = names.map(name => ({\n      name: `${source}:@sentry/${name}`,\n      version: SDK_VERSION,\n    }));\n    sdk.version = SDK_VERSION;\n  }\n}\n","import type { SeverityLevel } from '../types/severity';\n\n/**\n * Converts a string-based level into a `SeverityLevel`, normalizing it along the way.\n *\n * @param level String representation of desired `SeverityLevel`.\n * @returns The `SeverityLevel` corresponding to the given string, or 'log' if the string isn't a valid level.\n */\nexport function severityLevelFromString(level: SeverityLevel | string): SeverityLevel {\n  return (\n    level === 'warn' ? 'warning' : ['fatal', 'error', 'warning', 'log', 'info', 'debug'].includes(level) ? level : 'log'\n  ) as SeverityLevel;\n}\n","import { DEBUG_BUILD } from '../debug-build';\nimport type { ClientOptions, IgnoreSpanAttributeValue } from '../types/options';\nimport type { SpanJSON } from '../types/span';\nimport { debug } from './debug-logger';\nimport { isMatchingPattern } from './string';\n\nfunction logIgnoredSpan(droppedSpan: Pick<SpanJSON, 'description' | 'op'>): void {\n  debug.log(`Ignoring span ${droppedSpan.op} - ${droppedSpan.description} because it matches \\`ignoreSpans\\`.`);\n}\n\n/**\n * Check if a span should be ignored based on the ignoreSpans configuration.\n */\nexport function shouldIgnoreSpan(\n  span: Pick<SpanJSON, 'description' | 'op'> & { attributes?: Record<string, unknown> },\n  ignoreSpans: Required<ClientOptions>['ignoreSpans'],\n): boolean {\n  if (!ignoreSpans?.length) {\n    return false;\n  }\n\n  for (const pattern of ignoreSpans) {\n    if (isStringOrRegExp(pattern)) {\n      if (span.description && isMatchingPattern(span.description, pattern)) {\n        DEBUG_BUILD && logIgnoredSpan(span);\n        return true;\n      }\n      continue;\n    }\n\n    const hasAttributes = !!pattern.attributes && Object.keys(pattern.attributes).length > 0;\n    if (!pattern.name && !pattern.op && !hasAttributes) {\n      continue;\n    }\n\n    const nameMatches = pattern.name ? span.description && isMatchingPattern(span.description, pattern.name) : true;\n    const opMatches = pattern.op ? span.op && isMatchingPattern(span.op, pattern.op) : true;\n    const attrsMatch = pattern.attributes\n      ? Object.entries(pattern.attributes).every(([key, valuePattern]) =>\n          _matchesAttributeValue(span.attributes?.[key], valuePattern),\n        )\n      : true;\n\n    // This check here is only correct because we can guarantee that we ran `isMatchingPattern`\n    // for at least one of `nameMatches`, `opMatches`, or `attrsMatch`. So in contrary to how this looks,\n    // not all of op, name, and attributes actually have to match. This is the most efficient way to check\n    // for all combinations of name, op, and attribute patterns.\n    if (nameMatches && opMatches && attrsMatch) {\n      DEBUG_BUILD && logIgnoredSpan(span);\n      return true;\n    }\n  }\n\n  return false;\n}\n\nfunction _matchesAttributeValue(actual: unknown, pat: IgnoreSpanAttributeValue): boolean {\n  // String values support pattern matching\n  if (typeof actual === 'string' && (typeof pat === 'string' || pat instanceof RegExp)) {\n    return isMatchingPattern(actual, pat);\n  }\n  // Arrays: element-wise strict equality\n  if (Array.isArray(actual) && Array.isArray(pat)) {\n    return actual.length === pat.length && actual.every((v, i) => v === pat[i]);\n  }\n  // Primitives: strict equality\n  return actual === pat;\n}\n\n/**\n * Takes a list of spans, and a span that was dropped, and re-parents the child spans of the dropped span to the parent of the dropped span, if possible.\n * This mutates the spans array in place!\n */\nexport function reparentChildSpans(spans: SpanJSON[], dropSpan: SpanJSON): void {\n  const droppedSpanParentId = dropSpan.parent_span_id;\n  const droppedSpanId = dropSpan.span_id;\n\n  // This should generally not happen, as we do not apply this on root spans\n  // but to be safe, we just bail in this case\n  if (!droppedSpanParentId) {\n    return;\n  }\n\n  for (const span of spans) {\n    if (span.parent_span_id === droppedSpanId) {\n      span.parent_span_id = droppedSpanParentId;\n    }\n  }\n}\n\nfunction isStringOrRegExp(value: unknown): value is string | RegExp {\n  return typeof value === 'string' || value instanceof RegExp;\n}\n","import type { Scope } from '../scope';\nimport type { Span } from '../types/span';\nimport { addNonEnumerableProperty } from '../utils/object';\nimport { derefWeakRef, makeWeakRef, type MaybeWeakRef } from './weakRef';\n\nconst SCOPE_SPAN_FIELD = '_sentrySpan';\n\ntype ScopeWithMaybeSpan = Scope & {\n  [SCOPE_SPAN_FIELD]?: MaybeWeakRef<Span>;\n};\n\n/**\n * Set the active span for a given scope.\n * NOTE: This should NOT be used directly, but is only used internally by the trace methods.\n */\nexport function _setSpanForScope(scope: Scope, span: Span | undefined): void {\n  if (span) {\n    // Use WeakRef to avoid circular reference with span holding scope\n    addNonEnumerableProperty(scope as ScopeWithMaybeSpan, SCOPE_SPAN_FIELD, makeWeakRef(span));\n  } else {\n    // eslint-disable-next-line @typescript-eslint/no-dynamic-delete\n    delete (scope as ScopeWithMaybeSpan)[SCOPE_SPAN_FIELD];\n  }\n}\n\n/**\n * Get the active span for a given scope.\n * NOTE: This should NOT be used directly, but is only used internally by the trace methods.\n */\nexport function _getSpanForScope(scope: ScopeWithMaybeSpan): Span | undefined {\n  return derefWeakRef(scope[SCOPE_SPAN_FIELD]);\n}\n","// oxlint-disable max-lines\nimport { getAsyncContextStrategy } from '../asyncContext';\nimport type { RawAttributes } from '../attributes';\nimport { serializeAttributes } from '../attributes';\nimport { getMainCarrier } from '../carrier';\nimport { getCurrentScope } from '../currentScopes';\nimport {\n  SEMANTIC_ATTRIBUTE_SENTRY_CUSTOM_SPAN_NAME,\n  SEMANTIC_ATTRIBUTE_SENTRY_OP,\n  SEMANTIC_ATTRIBUTE_SENTRY_ORIGIN,\n  SEMANTIC_ATTRIBUTE_SENTRY_SOURCE,\n  SEMANTIC_ATTRIBUTE_SENTRY_STATUS_MESSAGE,\n} from '../semanticAttributes';\nimport type { SentrySpan } from '../tracing/sentrySpan';\nimport { SPAN_STATUS_OK, SPAN_STATUS_UNSET } from '../tracing/spanstatus';\nimport { getCapturedScopesOnSpan } from '../tracing/utils';\nimport type { TraceContext } from '../types/context';\nimport type { SpanLink, SpanLinkJSON } from '../types/link';\nimport type {\n  SerializedStreamedSpan,\n  Span,\n  SpanAttributes,\n  SpanJSON,\n  SpanOrigin,\n  SpanTimeInput,\n  StreamedSpanJSON,\n} from '../types/span';\nimport type { SpanStatus } from '../types/spanStatus';\nimport { addNonEnumerableProperty } from '../utils/object';\nimport { generateSpanId } from '../utils/propagationContext';\nimport { timestampInSeconds } from '../utils/time';\nimport { generateSentryTraceHeader, generateTraceparentHeader } from '../utils/tracing';\nimport { consoleSandbox } from './debug-logger';\nimport { _getSpanForScope } from './spanOnScope';\n\n// These are aligned with OpenTelemetry trace flags\nexport const TRACE_FLAG_NONE = 0x0;\nexport const TRACE_FLAG_SAMPLED = 0x1;\n\nlet hasShownSpanDropWarning = false;\n\n/**\n * Convert a span to a trace context, which can be sent as the `trace` context in an event.\n * By default, this will only include trace_id, span_id & parent_span_id.\n * If `includeAllData` is true, it will also include data, op, status & origin.\n */\nexport function spanToTransactionTraceContext(span: Span): TraceContext {\n  const { spanId: span_id, traceId: trace_id } = span.spanContext();\n  const { data, op, parent_span_id, status, origin, links } = spanToJSON(span);\n\n  return {\n    parent_span_id,\n    span_id,\n    trace_id,\n    data,\n    op,\n    status,\n    origin,\n    links,\n  };\n}\n\n/**\n * Convert a span to a trace context, which can be sent as the `trace` context in a non-transaction event.\n */\nexport function spanToTraceContext(span: Span): TraceContext {\n  const { spanId, traceId: trace_id, isRemote } = span.spanContext();\n\n  // If the span is remote, we use a random/virtual span as span_id to the trace context,\n  // and the remote span as parent_span_id\n  const parent_span_id = isRemote ? spanId : spanToJSON(span).parent_span_id;\n  const scope = getCapturedScopesOnSpan(span).scope;\n\n  const span_id = isRemote ? scope?.getPropagationContext().propagationSpanId || generateSpanId() : spanId;\n\n  return {\n    parent_span_id,\n    span_id,\n    trace_id,\n  };\n}\n\n/**\n * Convert a Span to a Sentry trace header.\n */\nexport function spanToTraceHeader(span: Span): string {\n  const { traceId, spanId } = span.spanContext();\n  const sampled = spanIsSampled(span);\n  return generateSentryTraceHeader(traceId, spanId, sampled);\n}\n\n/**\n * Convert a Span to a W3C traceparent header.\n */\nexport function spanToTraceparentHeader(span: Span): string {\n  const { traceId, spanId } = span.spanContext();\n  const sampled = spanIsSampled(span);\n  return generateTraceparentHeader(traceId, spanId, sampled);\n}\n\n/**\n *  Converts the span links array to a flattened version to be sent within an envelope.\n *\n *  If the links array is empty, it returns `undefined` so the empty value can be dropped before it's sent.\n */\nexport function convertSpanLinksForEnvelope(links?: SpanLink[]): SpanLinkJSON[] | undefined {\n  if (links && links.length > 0) {\n    return links.map(({ context: { spanId, traceId, traceFlags, ...restContext }, attributes }) => ({\n      span_id: spanId,\n      trace_id: traceId,\n      sampled: traceFlags === TRACE_FLAG_SAMPLED,\n      attributes,\n      ...restContext,\n    }));\n  } else {\n    return undefined;\n  }\n}\n\n/**\n * Converts the span links array to a flattened version with serialized attributes for V2 spans.\n *\n * If the links array is empty, it returns `undefined` so the empty value can be dropped before it's sent.\n */\nexport function getStreamedSpanLinks(\n  links?: SpanLink[],\n): SpanLinkJSON<RawAttributes<Record<string, unknown>>>[] | undefined {\n  if (links?.length) {\n    return links.map(({ context: { spanId, traceId, traceFlags }, attributes }) => ({\n      span_id: spanId,\n      trace_id: traceId,\n      sampled: traceFlags === TRACE_FLAG_SAMPLED,\n      attributes,\n    }));\n  } else {\n    return undefined;\n  }\n}\n\n/**\n * Convert a span time input into a timestamp in seconds.\n */\nexport function spanTimeInputToSeconds(input: SpanTimeInput | undefined): number {\n  if (typeof input === 'number') {\n    return ensureTimestampInSeconds(input);\n  }\n\n  if (Array.isArray(input)) {\n    // See {@link HrTime} for the array-based time format\n    return input[0] + input[1] / 1e9;\n  }\n\n  if (input instanceof Date) {\n    return ensureTimestampInSeconds(input.getTime());\n  }\n\n  return timestampInSeconds();\n}\n\n/**\n * Converts a timestamp to second, if it was in milliseconds, or keeps it as second.\n */\nfunction ensureTimestampInSeconds(timestamp: number): number {\n  const isMs = timestamp > 9999999999;\n  return isMs ? timestamp / 1000 : timestamp;\n}\n\n/**\n * Convert a span to a JSON representation.\n */\n// Note: Because of this, we currently have a circular type dependency (which we opted out of in package.json).\n// This is not avoidable as we need `spanToJSON` in `spanUtils.ts`, which in turn is needed by `span.ts` for backwards compatibility.\n// And `spanToJSON` needs the Span class from `span.ts` to check here.\nexport function spanToJSON(span: Span): SpanJSON {\n  if (spanIsSentrySpan(span)) {\n    return span.getSpanJSON();\n  }\n\n  const { spanId: span_id, traceId: trace_id } = span.spanContext();\n\n  // Handle a span from @opentelemetry/sdk-base-trace's `Span` class\n  if (spanIsOpenTelemetrySdkTraceBaseSpan(span)) {\n    const { attributes, startTime, name, endTime, status, links } = span;\n\n    return {\n      span_id,\n      trace_id,\n      data: attributes,\n      description: name,\n      parent_span_id: getOtelParentSpanId(span),\n      start_timestamp: spanTimeInputToSeconds(startTime),\n      // This is [0,0] by default in OTEL, in which case we want to interpret this as no end time\n      timestamp: spanTimeInputToSeconds(endTime) || undefined,\n      status: getStatusMessage(status),\n      op: attributes[SEMANTIC_ATTRIBUTE_SENTRY_OP],\n      origin: attributes[SEMANTIC_ATTRIBUTE_SENTRY_ORIGIN] as SpanOrigin | undefined,\n      links: convertSpanLinksForEnvelope(links),\n    };\n  }\n\n  // Finally, at least we have `spanContext()`....\n  // This should not actually happen in reality, but we need to handle it for type safety.\n  return {\n    span_id,\n    trace_id,\n    start_timestamp: 0,\n    data: {},\n  };\n}\n\n/**\n * Convert a span to the intermediate {@link StreamedSpanJSON} representation.\n */\nexport function spanToStreamedSpanJSON(span: Span): StreamedSpanJSON {\n  if (spanIsSentrySpan(span)) {\n    return span.getStreamedSpanJSON();\n  }\n\n  const { spanId: span_id, traceId: trace_id } = span.spanContext();\n\n  // Handle a span from @opentelemetry/sdk-base-trace's `Span` class\n  if (spanIsOpenTelemetrySdkTraceBaseSpan(span)) {\n    const { attributes, startTime, name, endTime, status, links } = span;\n\n    return {\n      name,\n      span_id,\n      trace_id,\n      parent_span_id: getOtelParentSpanId(span),\n      start_timestamp: spanTimeInputToSeconds(startTime),\n      end_timestamp: spanTimeInputToSeconds(endTime),\n      is_segment: span === INTERNAL_getSegmentSpan(span),\n      status: getSimpleStatus(status),\n      attributes: addStatusMessageAttribute(attributes, status),\n      links: getStreamedSpanLinks(links),\n    };\n  }\n\n  // Finally, as a fallback, at least we have `spanContext()`....\n  // This should not actually happen in reality, but we need to handle it for type safety.\n  return {\n    span_id,\n    trace_id,\n    start_timestamp: 0,\n    name: '',\n    end_timestamp: 0,\n    status: 'ok',\n    is_segment: span === INTERNAL_getSegmentSpan(span),\n  };\n}\n\n/**\n * In preparation for the next major of OpenTelemetry, we want to support\n * looking up the parent span id according to the new API\n * In OTel v1, the parent span id is accessed as `parentSpanId`\n * In OTel v2, the parent span id is accessed as `spanId` on the `parentSpanContext`\n */\nfunction getOtelParentSpanId(span: OpenTelemetrySdkTraceBaseSpan): string | undefined {\n  return 'parentSpanId' in span\n    ? span.parentSpanId\n    : 'parentSpanContext' in span\n      ? (span.parentSpanContext as { spanId?: string } | undefined)?.spanId\n      : undefined;\n}\n\n/**\n * Converts a {@link StreamedSpanJSON} to a {@link SerializedSpan}.\n * This is the final serialized span format that is sent to Sentry.\n * The returned serilaized spans must not be consumed by users or SDK integrations.\n */\nexport function streamedSpanJsonToSerializedSpan(spanJson: StreamedSpanJSON): SerializedStreamedSpan {\n  return {\n    ...spanJson,\n    attributes: serializeAttributes(spanJson.attributes),\n    links: spanJson.links?.map(link => ({\n      ...link,\n      attributes: serializeAttributes(link.attributes),\n    })),\n  };\n}\n\nfunction spanIsOpenTelemetrySdkTraceBaseSpan(span: Span): span is OpenTelemetrySdkTraceBaseSpan {\n  const castSpan = span as Partial<OpenTelemetrySdkTraceBaseSpan>;\n  return !!castSpan.attributes && !!castSpan.startTime && !!castSpan.name && !!castSpan.endTime && !!castSpan.status;\n}\n\n/** Exported only for tests. */\nexport interface OpenTelemetrySdkTraceBaseSpan extends Span {\n  attributes: SpanAttributes;\n  startTime: SpanTimeInput;\n  name: string;\n  status: SpanStatus;\n  endTime: SpanTimeInput;\n  parentSpanId?: string;\n  links?: SpanLink[];\n}\n\n/**\n * Sadly, due to circular dependency checks we cannot actually import the Span class here and check for instanceof.\n * :( So instead we approximate this by checking if it has the `getSpanJSON` method.\n */\nexport function spanIsSentrySpan(span: Span): span is SentrySpan {\n  return typeof (span as SentrySpan).getSpanJSON === 'function';\n}\n\n/**\n * Returns true if a span is sampled.\n * In most cases, you should just use `span.isRecording()` instead.\n * However, this has a slightly different semantic, as it also returns false if the span is finished.\n * So in the case where this distinction is important, use this method.\n */\nexport function spanIsSampled(span: Span): boolean {\n  // We align our trace flags with the ones OpenTelemetry use\n  // So we also check for sampled the same way they do.\n  const { traceFlags } = span.spanContext();\n  return traceFlags === TRACE_FLAG_SAMPLED;\n}\n\n/** Get the status message to use for a JSON representation of a span. */\nexport function getStatusMessage(status: SpanStatus | undefined): string | undefined {\n  if (!status || status.code === SPAN_STATUS_UNSET) {\n    return undefined;\n  }\n\n  if (status.code === SPAN_STATUS_OK) {\n    return 'ok';\n  }\n\n  return status.message || 'internal_error';\n}\n\n/**\n * Convert the various statuses to the simple ones expected by Sentry for streamed spans ('ok' is default).\n */\nexport function getSimpleStatus(status: SpanStatus | undefined): 'ok' | 'error' {\n  return !status ||\n    status.code === SPAN_STATUS_OK ||\n    status.code === SPAN_STATUS_UNSET ||\n    status.message === 'cancelled'\n    ? 'ok'\n    : 'error';\n}\n\n/**\n * Returns the span's attributes with the SEMANTIC_ATTRIBUTE_SENTRY_STATUS_MESSAGE attribute added\n * if the span has an error status message worth preserving.\n *\n * An explicitly set attribute is never overwritten.\n */\nexport function addStatusMessageAttribute(\n  attributes: SpanAttributes,\n  status: SpanStatus | undefined,\n): RawAttributes<Record<string, unknown>> {\n  const statusMessage = getSimpleStatus(status) === 'error' ? status?.message : undefined;\n  return {\n    ...(statusMessage && { [SEMANTIC_ATTRIBUTE_SENTRY_STATUS_MESSAGE]: statusMessage }),\n    ...attributes,\n  };\n}\n\nconst CHILD_SPANS_FIELD = '_sentryChildSpans';\nconst ROOT_SPAN_FIELD = '_sentryRootSpan';\n\ntype SpanWithPotentialChildren = Span & {\n  [CHILD_SPANS_FIELD]?: Set<Span>;\n  [ROOT_SPAN_FIELD]?: Span;\n};\n\n/**\n * Adds an opaque child span reference to a span.\n */\nexport function addChildSpanToSpan(span: SpanWithPotentialChildren, childSpan: Span): void {\n  // We store the root span reference on the child span\n  // We need this for `getRootSpan()` to work\n  const rootSpan = span[ROOT_SPAN_FIELD] || span;\n  addNonEnumerableProperty(childSpan as SpanWithPotentialChildren, ROOT_SPAN_FIELD, rootSpan);\n\n  // `_sentryChildSpans` exists only so `getSpanDescendants()` can walk the tree when the segment span\n  // is sent, and that walk stops at an unsampled span without ever visiting its children. So a child\n  // tracked here would be held for the parent's lifetime and never read.\n  if (!spanIsSampled(span)) {\n    return;\n  }\n\n  // Once the segment span stopped recording, the tree has been read for the last time, and a child\n  // starting now belongs to whatever segment comes next: it is re-emitted on its own instead. Tracking\n  // it here would pin it for as long as the parent lives, which for a span left active in an async\n  // context (e.g. a framework boot span captured by a queue consumer) is the rest of the process. Only\n  // a parent that is itself still recording keeps tracking, so a late child that outlives its segment\n  // still collects the subtree it is re-emitted with.\n  if (!span.isRecording() && !rootSpan.isRecording()) {\n    return;\n  }\n\n  // We store a list of child spans on the parent span\n  // We need this for `getSpanDescendants()` to work\n  if (span[CHILD_SPANS_FIELD]) {\n    span[CHILD_SPANS_FIELD].add(childSpan);\n  } else {\n    addNonEnumerableProperty(span, CHILD_SPANS_FIELD, new Set([childSpan]));\n  }\n}\n\n/** This is only used internally by Idle Spans. */\nexport function removeChildSpanFromSpan(span: SpanWithPotentialChildren, childSpan: Span): void {\n  if (span[CHILD_SPANS_FIELD]) {\n    span[CHILD_SPANS_FIELD].delete(childSpan);\n  }\n}\n\n/**\n * Returns an array of the given span and all of its descendants.\n */\nexport function getSpanDescendants(span: SpanWithPotentialChildren): Span[] {\n  const resultSet = new Set<Span>();\n\n  function addSpanChildren(span: SpanWithPotentialChildren): void {\n    // This exit condition is required to not infinitely loop in case of a circular dependency.\n    if (resultSet.has(span)) {\n      return;\n      // We want to ignore unsampled spans (e.g. non recording spans)\n    } else if (spanIsSampled(span)) {\n      resultSet.add(span);\n      const childSpans = span[CHILD_SPANS_FIELD] ? Array.from(span[CHILD_SPANS_FIELD]) : [];\n      for (const childSpan of childSpans) {\n        addSpanChildren(childSpan);\n      }\n    }\n  }\n\n  addSpanChildren(span);\n\n  return Array.from(resultSet);\n}\n\n/**\n * Returns the root span of a given span.\n */\nexport const getRootSpan = INTERNAL_getSegmentSpan;\n\n/**\n * Returns the segment span of a given span.\n */\nexport function INTERNAL_getSegmentSpan(span: SpanWithPotentialChildren): Span {\n  return span[ROOT_SPAN_FIELD] || span;\n}\n\n/**\n * Returns the currently active span.\n */\nexport function getActiveSpan(): Span | undefined {\n  const carrier = getMainCarrier();\n  const acs = getAsyncContextStrategy(carrier);\n  if (acs.getActiveSpan) {\n    return acs.getActiveSpan();\n  }\n\n  return _getSpanForScope(getCurrentScope());\n}\n\n/**\n * Logs a warning once if `beforeSendSpan` is used to drop spans.\n */\nexport function showSpanDropWarning(): void {\n  if (!hasShownSpanDropWarning) {\n    consoleSandbox(() => {\n      // eslint-disable-next-line no-console\n      console.warn(\n        '[Sentry] Returning null from `beforeSendSpan` is disallowed. To drop certain spans, configure the respective integrations directly or use `ignoreSpans`.',\n      );\n    });\n    hasShownSpanDropWarning = true;\n  }\n}\n\n/**\n * Updates the name of the given span and ensures that the span name is not\n * overwritten by the Sentry SDK.\n *\n * Use this function instead of `span.updateName()` if you want to make sure that\n * your name is kept. For some spans, for example root `http.server` spans the\n * Sentry SDK would otherwise overwrite the span name with a high-quality name\n * it infers when the span ends.\n *\n * Use this function in server code or when your span is started on the server\n * and on the client (browser). If you only update a span name on the client,\n * you can also use `span.updateName()` the SDK does not overwrite the name.\n *\n * @param span - The span to update the name of.\n * @param name - The name to set on the span.\n */\nexport function updateSpanName(span: Span, name: string): void {\n  span.updateName(name);\n  span.setAttributes({\n    [SEMANTIC_ATTRIBUTE_SENTRY_SOURCE]: 'custom',\n    [SEMANTIC_ATTRIBUTE_SENTRY_CUSTOM_SPAN_NAME]: name,\n  });\n}\n","const MAX_SUMMARY_LENGTH = 255;\n\nconst TABLE_NAME_CHARS = /[^\\s(,;)]+/;\nconst TABLE_NAME = TABLE_NAME_CHARS.source;\n\nconst DDL_RE = new RegExp(\n  `^\\\\s*(?<operation>(?:CREATE|DROP)\\\\s+(?:TABLE|INDEX)|ALTER\\\\s+TABLE)(?:\\\\s+IF\\\\s+(?:NOT\\\\s+)?EXISTS)?\\\\s+(?<table>${TABLE_NAME})`,\n  'i',\n);\n\n// SQLite upserts insert an optional conflict clause between operation and INTO\n// (`INSERT OR REPLACE INTO`, https://sqlite.org/lang_insert.html), with `REPLACE INTO` as the\n// standalone shorthand. The clause is filler like INTO — stripping it keeps upserts on the same\n// low-cardinality summary as plain inserts.\nconst INSERT_RE = new RegExp(\n  `^\\\\s*(?<operation>INSERT|REPLACE)(?:\\\\s+OR\\\\s+(?:ROLLBACK|ABORT|FAIL|IGNORE|REPLACE))?\\\\s+INTO\\\\s+(?<table>${TABLE_NAME})`,\n  'i',\n);\nconst UPDATE_RE = new RegExp(\n  `^\\\\s*(?<operation>UPDATE)(?:\\\\s+OR\\\\s+(?:ROLLBACK|ABORT|FAIL|IGNORE|REPLACE))?\\\\s+(?<table>${TABLE_NAME})`,\n  'i',\n);\nconst DELETE_RE = new RegExp(`^\\\\s*(?<operation>DELETE)\\\\s+FROM\\\\s+(?<table>${TABLE_NAME})`, 'i');\n\nconst SELECT_RE = /^\\s*\\(?\\s*(?<operation>SELECT)\\b/i;\n\nconst PRAGMA_RE = /^\\s*(?<operation>PRAGMA)\\s+(?<command>\\S+)/i;\n\nconst TOKEN_RE = /\\b(?:FROM|JOIN)\\s+|\\(\\s*(SELECT)\\b|\\b(?:UNION|INTERSECT|EXCEPT|MINUS)\\s+(?:ALL\\s+)?(SELECT)\\b/gi;\nconst QUOTED_OR_PLAIN_TABLE_RE = /^(?:\"[^\"]*\"|'[^']*'|[^\\s(,;)]+)/;\nconst COMMA_TABLE_RE = /^\\s*,\\s*((?:\"[^\"]*\"|'[^']*'|[^\\s(,;)]+))/;\nconst SUBQUERY_SELECT_RE = /^\\(\\s*(SELECT)\\b/i;\n\n/**\n * Derives a low-cardinality summary from a SQL query for use as `db.query.summary`.\n *\n * Conforms to the OTEL semantic convention for generating query summaries:\n * - Preserves original case of operations and identifiers (no normalization)\n * - Uses format: `{operation} {target1} {target2} ...`\n * - Strips filler words (INTO, FROM) from the operation\n * - Captures multiple table targets (JOINs)\n * - Handles INSERT...SELECT with both targets\n * - Truncates to 255 characters without splitting mid-value\n *\n * @see https://opentelemetry.io/docs/specs/semconv/database/database-spans/#generating-a-summary-of-the-query\n */\nexport function getSqlQuerySummary(query: string | undefined): string | undefined {\n  if (!query) {\n    return undefined;\n  }\n\n  const pragmaMatch = PRAGMA_RE.exec(query);\n  if (pragmaMatch?.groups?.['operation'] && pragmaMatch.groups['command']) {\n    const operation = pragmaMatch.groups['operation'];\n    const command = pragmaMatch.groups['command'];\n    const parenIdx = command.indexOf('(');\n    return truncate(`${operation} ${parenIdx >= 0 ? command.substring(0, parenIdx) : command}`);\n  }\n\n  const ddlMatch = DDL_RE.exec(query);\n  if (ddlMatch?.groups?.['operation'] && ddlMatch.groups['table']) {\n    return truncate(`${ddlMatch.groups['operation']} ${ddlMatch.groups['table']}`);\n  }\n\n  const insertMatch = INSERT_RE.exec(query);\n  if (insertMatch?.groups?.['operation'] && insertMatch.groups['table']) {\n    const parts = [insertMatch.groups['operation'], insertMatch.groups['table']];\n    const rest = query.slice(insertMatch[0].length);\n    const subSelect = /\\b(SELECT)\\b/i.exec(rest);\n    if (subSelect?.[1]) {\n      parts.push(subSelect[1]);\n      const selectTables = extractTableNames(rest.slice(subSelect.index));\n      parts.push(...selectTables);\n    }\n    return truncate(parts.join(' '));\n  }\n\n  const updateMatch = UPDATE_RE.exec(query);\n  if (updateMatch?.groups?.['operation'] && updateMatch.groups['table']) {\n    return truncate(`${updateMatch.groups['operation']} ${updateMatch.groups['table']}`);\n  }\n\n  const deleteMatch = DELETE_RE.exec(query);\n  if (deleteMatch?.groups?.['operation'] && deleteMatch.groups['table']) {\n    return truncate(`${deleteMatch.groups['operation']} ${deleteMatch.groups['table']}`);\n  }\n\n  const selectMatch = SELECT_RE.exec(query);\n  if (selectMatch?.groups?.['operation']) {\n    const tables = extractTableNames(query.slice(selectMatch[0].length));\n    if (tables.length > 0) {\n      return truncate(`${selectMatch.groups['operation']} ${tables.join(' ')}`);\n    }\n    return selectMatch.groups['operation'];\n  }\n\n  return truncate(query.trim().split(/\\s+/)[0] ?? query);\n}\n\nfunction extractTableNames(sql: string): string[] {\n  const tables: string[] = [];\n  TOKEN_RE.lastIndex = 0;\n  let match: RegExpExecArray | null;\n\n  while ((match = TOKEN_RE.exec(sql)) !== null) {\n    if (match[1] || match[2]) {\n      tables.push((match[1] || match[2])!);\n      continue;\n    }\n\n    const rest = sql.slice(match.index + match[0].length);\n\n    const subqueryMatch = SUBQUERY_SELECT_RE.exec(rest);\n    if (subqueryMatch?.[1]) {\n      tables.push(subqueryMatch[1]);\n      TOKEN_RE.lastIndex = match.index + match[0].length + subqueryMatch[0].length;\n      continue;\n    }\n\n    const tableMatch = QUOTED_OR_PLAIN_TABLE_RE.exec(rest);\n    if (!tableMatch) continue;\n    tables.push(tableMatch[0]);\n\n    let afterTable = rest.slice(tableMatch[0].length);\n    let commaMatch: RegExpExecArray | null;\n    while ((commaMatch = COMMA_TABLE_RE.exec(afterTable)) !== null) {\n      if (!commaMatch[1]) break;\n      tables.push(commaMatch[1]);\n      afterTable = afterTable.slice(commaMatch[0].length);\n    }\n  }\n\n  return tables;\n}\n\nfunction truncate(summary: string): string {\n  if (summary.length <= MAX_SUMMARY_LENGTH) {\n    return summary;\n  }\n  const truncated = summary.substring(0, MAX_SUMMARY_LENGTH);\n  const lastSpace = truncated.lastIndexOf(' ');\n  return lastSpace > 0 ? truncated.substring(0, lastSpace) : truncated;\n}\n","import type { Event } from '../types/event';\nimport type { StackFrame } from '../types/stackframe';\nimport type { StackLineParser, StackParser } from '../types/stacktrace';\nimport type { VNode, VueViewModel } from '../types/vue';\n\nconst STACKTRACE_FRAME_LIMIT = 50;\nexport const UNKNOWN_FUNCTION = '?';\n// Used to sanitize webpack (error: *) wrapped stack errors\nconst WEBPACK_ERROR_REGEXP = /\\(error: (.*)\\)/;\nconst STRIP_FRAME_REGEXP = /captureMessage|captureException/;\n\n/**\n * Creates a stack parser with the supplied line parsers\n *\n * StackFrames are returned in the correct order for Sentry Exception\n * frames and with Sentry SDK internal frames removed from the top and bottom\n *\n */\nexport function createStackParser(...parsers: StackLineParser[]): StackParser {\n  const sortedParsers = parsers.sort((a, b) => a[0] - b[0]).map(p => p[1]);\n\n  return (stack: string, skipFirstLines: number = 0, framesToPop: number = 0): StackFrame[] => {\n    const frames: StackFrame[] = [];\n    const lines = stack.split('\\n');\n\n    for (let i = skipFirstLines; i < lines.length; i++) {\n      let line = lines[i] as string;\n      // Truncate lines over 1kb because many of the regular expressions use\n      // backtracking which results in run time that increases exponentially\n      // with input size. Huge strings can result in hangs/Denial of Service:\n      // https://github.com/getsentry/sentry-javascript/issues/2286\n      if (line.length > 1024) {\n        line = line.slice(0, 1024);\n      }\n\n      // https://github.com/getsentry/sentry-javascript/issues/5459\n      // Remove webpack (error: *) wrappers\n      const cleanedLine = WEBPACK_ERROR_REGEXP.test(line) ? line.replace(WEBPACK_ERROR_REGEXP, '$1') : line;\n\n      // https://github.com/getsentry/sentry-javascript/issues/7813\n      // Skip Error: lines\n      // Using includes() instead of a regex to avoid O(n²) backtracking on long lines\n      // https://github.com/getsentry/sentry-javascript/issues/20052\n      if (cleanedLine.includes('Error: ')) {\n        continue;\n      }\n\n      for (const parser of sortedParsers) {\n        const frame = parser(cleanedLine);\n\n        if (frame) {\n          frames.push(frame);\n          break;\n        }\n      }\n\n      if (frames.length >= STACKTRACE_FRAME_LIMIT + framesToPop) {\n        break;\n      }\n    }\n\n    return stripSentryFramesAndReverse(frames.slice(framesToPop));\n  };\n}\n\n/**\n * Gets a stack parser implementation from Options.stackParser\n * @see Options\n *\n * If options contains an array of line parsers, it is converted into a parser\n */\nexport function stackParserFromStackParserOptions(stackParser: StackParser | StackLineParser[]): StackParser {\n  if (Array.isArray(stackParser)) {\n    return createStackParser(...stackParser);\n  }\n  return stackParser;\n}\n\n/**\n * Removes Sentry frames from the top and bottom of the stack if present and enforces a limit of max number of frames.\n * Assumes stack input is ordered from top to bottom and returns the reverse representation so call site of the\n * function that caused the crash is the last frame in the array.\n * @hidden\n */\nexport function stripSentryFramesAndReverse(stack: ReadonlyArray<StackFrame>): StackFrame[] {\n  if (!stack.length) {\n    return [];\n  }\n\n  const localStack = Array.from(stack);\n\n  // If stack starts with one of our API calls, remove it (starts, meaning it's the top of the stack - aka last call)\n  if (/sentryWrapped/.test(getLastStackFrame(localStack).function || '')) {\n    localStack.pop();\n  }\n\n  // Reversing in the middle of the procedure allows us to just pop the values off the stack\n  localStack.reverse();\n\n  // If stack ends with one of our internal API calls, remove it (ends, meaning it's the bottom of the stack - aka top-most call)\n  if (STRIP_FRAME_REGEXP.test(getLastStackFrame(localStack).function || '')) {\n    localStack.pop();\n\n    // When using synthetic events, we will have a 2 levels deep stack, as `new Error('Sentry syntheticException')`\n    // is produced within the scope itself, making it:\n    //\n    //   Sentry.captureException()\n    //   scope.captureException()\n    //\n    // instead of just the top `Sentry` call itself.\n    // This forces us to possibly strip an additional frame in the exact same was as above.\n    if (STRIP_FRAME_REGEXP.test(getLastStackFrame(localStack).function || '')) {\n      localStack.pop();\n    }\n  }\n\n  return localStack.slice(0, STACKTRACE_FRAME_LIMIT).map(frame => ({\n    ...frame,\n    filename: frame.filename || getLastStackFrame(localStack).filename,\n    function: frame.function || UNKNOWN_FUNCTION,\n  }));\n}\n\nfunction getLastStackFrame(arr: StackFrame[]): StackFrame {\n  return arr[arr.length - 1] || {};\n}\n\nconst defaultFunctionName = '<anonymous>';\n\n/**\n * Safely extract function name from itself\n */\nexport function getFunctionName(fn: unknown): string {\n  try {\n    if (!fn || typeof fn !== 'function') {\n      return defaultFunctionName;\n    }\n    return fn.name || defaultFunctionName;\n  } catch {\n    // Just accessing custom props in some Selenium environments\n    // can cause a \"Permission denied\" exception (see raven-js#495).\n    return defaultFunctionName;\n  }\n}\n\n/**\n * Get's stack frames from an event without needing to check for undefined properties.\n */\nexport function getFramesFromEvent(event: Event): StackFrame[] | undefined {\n  const exception = event.exception;\n\n  if (exception) {\n    const frames: StackFrame[] = [];\n    try {\n      // @ts-expect-error Object could be undefined\n      exception.values.forEach(value => {\n        // @ts-expect-error Value could be undefined\n        if (value.stacktrace.frames) {\n          // @ts-expect-error Value could be undefined\n          frames.push(...value.stacktrace.frames);\n        }\n      });\n      return frames;\n    } catch {\n      return undefined;\n    }\n  }\n  return undefined;\n}\n\n/**\n * Get the internal name of an internal Vue value, to represent it in a stacktrace.\n *\n * @param value The value to get the internal name of.\n * @deprecated This is Vue-specific and will be removed from `@sentry/core` in a future major version.\n * The `@sentry/vue` SDK inlines its own equivalent — there's no replacement export from core.\n */\nexport function getVueInternalName(value: VueViewModel | VNode): string {\n  // Check if it's a VNode (has __v_isVNode) or a component instance (has _isVue/__isVue)\n  const isVNode = '__v_isVNode' in value && value.__v_isVNode;\n\n  return isVNode ? '[VueVNode]' : '[VueViewModel]';\n}\n\n/**\n * Normalizes stack line paths by removing file:// prefix and leading slashes for Windows paths\n */\nexport function normalizeStackTracePath(path: string | undefined): string | undefined {\n  let filename = path?.startsWith('file://') ? path.slice(7) : path;\n  // If it's a Windows path, trim the leading slash so that `/C:/foo` becomes `C:/foo`\n  if (filename?.match(/\\/[A-Z]:/)) {\n    filename = filename.slice(1);\n  }\n  return filename;\n}\n","import { isPrimitive, isRegExp, isString } from './is';\nimport { stringifyValue } from './normalize';\n\nexport { escapeStringForRegex } from '../vendor/escapeStringForRegex';\n\n/**\n * Coerce a value to a string without ever throwing. Strings pass through unchanged (so an\n * already-serialized value isn't double-encoded and a plain string isn't wrapped in quotes);\n * anything else is `JSON.stringify`-ed, falling back to `fallback` if that throws (e.g. on\n * circular references or `BigInt`). Returns `undefined` for values `JSON.stringify` itself drops\n * (top-level `undefined`, functions, symbols), matching `JSON.stringify`'s own runtime behavior.\n *\n * @param value the value to stringify\n * @param fallback returned when serialization throws, or, if a function, called with `value` to\n *   produce the fallback. Defaults to `'[unserializable]'`.\n */\nexport function stringify(\n  value: unknown,\n  fallback: string | ((value: unknown) => string) = '[unserializable]',\n): string | undefined {\n  if (typeof value === 'string') {\n    return value;\n  }\n  try {\n    return JSON.stringify(value);\n  } catch {\n    return typeof fallback === 'function' ? fallback(value) : fallback;\n  }\n}\n\n/**\n * Truncates given string to the maximum characters count\n *\n * @param str An object that contains serializable values\n * @param max Maximum number of characters in truncated string (0 = unlimited)\n * @returns string Encoded\n */\nexport function truncate(str: string, max: number = 0): string {\n  if (typeof str !== 'string' || max === 0) {\n    return str;\n  }\n  return str.length <= max ? str : `${str.slice(0, max)}...`;\n}\n\n/**\n * This is basically just `trim_line` from\n * https://github.com/getsentry/sentry/blob/master/src/sentry/lang/javascript/processor.py#L67\n *\n * @param str An object that contains serializable values\n * @param max Maximum number of characters in truncated string\n * @returns string Encoded\n */\nexport function snipLine(line: string, colno: number): string {\n  let newLine = line;\n  const lineLength = newLine.length;\n  if (lineLength <= 150) {\n    return newLine;\n  }\n  if (colno > lineLength) {\n    // eslint-disable-next-line no-param-reassign\n    colno = lineLength;\n  }\n\n  let start = Math.max(colno - 60, 0);\n  if (start < 5) {\n    start = 0;\n  }\n\n  let end = Math.min(start + 140, lineLength);\n  if (end > lineLength - 5) {\n    end = lineLength;\n  }\n  if (end === lineLength) {\n    start = Math.max(end - 140, 0);\n  }\n\n  newLine = newLine.slice(start, end);\n  if (start > 0) {\n    newLine = `'{snip} ${newLine}`;\n  }\n  if (end < lineLength) {\n    newLine += ' {snip}';\n  }\n\n  return newLine;\n}\n\n/**\n * Join values in array\n * @param input array of values to be joined together\n * @param delimiter string to be placed in-between values\n * @returns Joined values\n */\nexport function safeJoin(input: unknown[], delimiter?: string): string {\n  if (!Array.isArray(input)) {\n    return '';\n  }\n\n  const output = [];\n  // eslint-disable-next-line typescript/prefer-for-of\n  for (let i = 0; i < input.length; i++) {\n    const value = input[i];\n    if (isPrimitive(value)) {\n      output.push(String(value));\n    } else if (value instanceof Error) {\n      // While stringifyValue does not special-case errors, because we later handle them specifically based on the [object XXX] fallback,\n      // in this method we want to render them more nicely\n      output.push(value.message ? `${value.name}: ${value.message}` : value.name);\n    } else {\n      output.push(stringifyValue(undefined, value));\n    }\n  }\n\n  return output.join(delimiter);\n}\n\n/**\n * Checks if the given value matches a regex or string\n *\n * @param value The string to test\n * @param pattern Either a regex or a string against which `value` will be matched\n * @param requireExactStringMatch If true, `value` must match `pattern` exactly. If false, `value` will match\n * `pattern` if it contains `pattern`. Only applies to string-type patterns.\n */\nexport function isMatchingPattern(\n  value: string,\n  pattern: RegExp | string | ((value: string) => boolean),\n  requireExactStringMatch: boolean = false,\n): boolean {\n  if (!isString(value)) {\n    return false;\n  }\n\n  if (isRegExp(pattern)) {\n    return pattern.test(value);\n  }\n  if (isString(pattern)) {\n    return requireExactStringMatch ? value === pattern : value.includes(pattern);\n  }\n  if (typeof pattern === 'function') {\n    return pattern(value);\n  }\n\n  return false;\n}\n\n/**\n * Test the given string against an array of strings and regexes. By default, string matching is done on a\n * substring-inclusion basis rather than a strict equality basis\n *\n * @param testString The string to test\n * @param patterns The patterns against which to test the string\n * @param requireExactStringMatch If true, `testString` must match one of the given string patterns exactly in order to\n * count. If false, `testString` will match a string pattern if it contains that pattern.\n * @returns\n */\nexport function stringMatchesSomePattern(\n  testString: string,\n  patterns:\n    | Array<string | RegExp | ((value: string) => boolean)>\n    | Set<string | RegExp | ((value: string) => boolean)> = [],\n  requireExactStringMatch: boolean = false,\n): boolean {\n  for (const pattern of patterns) {\n    if (isMatchingPattern(testString, pattern, requireExactStringMatch)) {\n      return true;\n    }\n  }\n  return false;\n}\n","import { DEBUG_BUILD } from '../debug-build';\nimport { debug } from './debug-logger';\nimport { GLOBAL_OBJ } from './worldwide';\n\nconst WINDOW = GLOBAL_OBJ as unknown as Window;\n\ndeclare const EdgeRuntime: string | undefined;\n\n/**\n * Tells whether current environment supports ErrorEvent objects\n * {@link supportsErrorEvent}.\n *\n * @returns Answer to the given question.\n */\nexport function supportsErrorEvent(): boolean {\n  try {\n    new ErrorEvent('');\n    return true;\n  } catch {\n    return false;\n  }\n}\n\n/**\n * Tells whether current environment supports DOMError objects\n * {@link supportsDOMError}.\n *\n * @returns Answer to the given question.\n */\nexport function supportsDOMError(): boolean {\n  try {\n    // Chrome: VM89:1 Uncaught TypeError: Failed to construct 'DOMError':\n    // 1 argument required, but only 0 present.\n    // @ts-expect-error It really needs 1 argument, not 0.\n    new DOMError('');\n    return true;\n  } catch {\n    return false;\n  }\n}\n\n/**\n * Tells whether current environment supports DOMException objects\n * {@link supportsDOMException}.\n *\n * @returns Answer to the given question.\n */\nexport function supportsDOMException(): boolean {\n  try {\n    new DOMException('');\n    return true;\n  } catch {\n    return false;\n  }\n}\n\n/**\n * Tells whether current environment supports History API\n * {@link supportsHistory}.\n *\n * @returns Answer to the given question.\n */\nexport function supportsHistory(): boolean {\n  return 'history' in WINDOW && !!WINDOW.history;\n}\n\n/**\n * Tells whether current environment supports Fetch API\n * {@link supportsFetch}.\n *\n * @returns Answer to the given question.\n * @deprecated This is no longer used and will be removed in a future major version.\n */\nexport const supportsFetch = _isFetchSupported;\n\nfunction _isFetchSupported(): boolean {\n  if (!('fetch' in WINDOW)) {\n    return false;\n  }\n\n  try {\n    new Headers();\n    // Deno requires a valid URL so '' cannot be used as an argument\n    new Request('data:,');\n    new Response();\n    return true;\n  } catch {\n    return false;\n  }\n}\n\n/**\n * isNative checks if the given function is a native implementation\n */\n// eslint-disable-next-line @typescript-eslint/ban-types\nexport function isNativeFunction(func: Function): boolean {\n  return func && /^function\\s+\\w+\\(\\)\\s+\\{\\s+\\[native code\\]\\s+\\}$/.test(func.toString());\n}\n\n/**\n * Tells whether current environment supports Fetch API natively\n * {@link supportsNativeFetch}.\n *\n * @returns true if `window.fetch` is natively implemented, false otherwise\n */\nexport function supportsNativeFetch(): boolean {\n  if (typeof EdgeRuntime === 'string') {\n    return true;\n  }\n\n  if (!_isFetchSupported()) {\n    return false;\n  }\n\n  // Fast path to avoid DOM I/O\n  // eslint-disable-next-line @typescript-eslint/unbound-method\n  if (isNativeFunction(WINDOW.fetch)) {\n    return true;\n  }\n\n  // window.fetch is implemented, but is polyfilled or already wrapped (e.g: by a chrome extension)\n  // so create a \"pure\" iframe to see if that has native fetch\n  let result = false;\n  const doc = WINDOW.document;\n  // eslint-disable-next-line typescript/no-deprecated\n  if (doc && typeof (doc.createElement as unknown) === 'function') {\n    try {\n      const sandbox = doc.createElement('iframe');\n      sandbox.hidden = true;\n      doc.head.appendChild(sandbox);\n      if (sandbox.contentWindow?.fetch) {\n        // eslint-disable-next-line @typescript-eslint/unbound-method\n        result = isNativeFunction(sandbox.contentWindow.fetch);\n      }\n      doc.head.removeChild(sandbox);\n    } catch (err) {\n      DEBUG_BUILD && debug.warn('Could not create sandbox iframe for pure fetch check, bailing to window.fetch: ', err);\n    }\n  }\n\n  return result;\n}\n\n/**\n * Tells whether current environment supports ReportingObserver API\n * {@link supportsReportingObserver}.\n *\n * @returns Answer to the given question.\n */\nexport function supportsReportingObserver(): boolean {\n  return 'ReportingObserver' in WINDOW;\n}\n\n/**\n * Tells whether current environment supports Referrer Policy API\n * {@link supportsReferrerPolicy}.\n *\n * @returns Answer to the given question.\n * @deprecated This is no longer used and will be removed in a future major version.\n */\nexport function supportsReferrerPolicy(): boolean {\n  // Despite all stars in the sky saying that Edge supports old draft syntax, aka 'never', 'always', 'origin' and 'default'\n  // (see https://caniuse.com/#feat=referrer-policy),\n  // it doesn't. And it throws an exception instead of ignoring this parameter...\n  // REF: https://github.com/getsentry/raven-js/issues/1233\n\n  if (!_isFetchSupported()) {\n    return false;\n  }\n\n  try {\n    new Request('_', {\n      referrerPolicy: 'origin' as ReferrerPolicy,\n    });\n    return true;\n  } catch {\n    return false;\n  }\n}\n","/* eslint-disable @typescript-eslint/no-explicit-any */\nimport { isThenable } from './is';\n\n/** SyncPromise internal states */\nconst STATE_PENDING = 0;\nconst STATE_RESOLVED = 1;\nconst STATE_REJECTED = 2;\n\ntype State = typeof STATE_PENDING | typeof STATE_RESOLVED | typeof STATE_REJECTED;\n\n// Overloads so we can call resolvedSyncPromise without arguments and generic argument\nexport function resolvedSyncPromise(): PromiseLike<void>;\nexport function resolvedSyncPromise<T>(value: T | PromiseLike<T>): PromiseLike<T>;\n\n/**\n * Creates a resolved sync promise.\n *\n * @param value the value to resolve the promise with\n * @returns the resolved sync promise\n */\nexport function resolvedSyncPromise<T>(value?: T | PromiseLike<T>): PromiseLike<T> {\n  return new SyncPromise(resolve => {\n    resolve(value);\n  });\n}\n\n/**\n * Creates a rejected sync promise.\n *\n * @param value the value to reject the promise with\n * @returns the rejected sync promise\n */\nexport function rejectedSyncPromise<T = never>(reason?: any): PromiseLike<T> {\n  return new SyncPromise((_, reject) => {\n    reject(reason);\n  });\n}\n\ntype Executor<T> = (resolve: (value?: T | PromiseLike<T> | null) => void, reject: (reason?: any) => void) => void;\n\n/**\n * Thenable class that behaves like a Promise and follows it's interface\n * but is not async internally\n */\nexport class SyncPromise<T> implements PromiseLike<T> {\n  private _state: State;\n  private _handlers: Array<[boolean, (value: T) => void, (reason: any) => any]>;\n  private _value: any;\n\n  public constructor(executor: Executor<T>) {\n    this._state = STATE_PENDING;\n    this._handlers = [];\n\n    this._runExecutor(executor);\n  }\n\n  /** @inheritdoc */\n  public then<TResult1 = T, TResult2 = never>(\n    onfulfilled?: ((value: T) => TResult1 | PromiseLike<TResult1>) | null,\n    onrejected?: ((reason: any) => TResult2 | PromiseLike<TResult2>) | null,\n  ): PromiseLike<TResult1 | TResult2> {\n    return new SyncPromise((resolve, reject) => {\n      this._handlers.push([\n        false,\n        result => {\n          if (!onfulfilled) {\n            // TODO: ¯\\_(ツ)_/¯\n            // TODO: FIXME\n            resolve(result as any);\n          } else {\n            try {\n              resolve(onfulfilled(result));\n            } catch (e) {\n              reject(e);\n            }\n          }\n        },\n        reason => {\n          if (!onrejected) {\n            reject(reason);\n          } else {\n            try {\n              resolve(onrejected(reason));\n            } catch (e) {\n              reject(e);\n            }\n          }\n        },\n      ]);\n      this._executeHandlers();\n    });\n  }\n\n  /** @inheritdoc */\n  public catch<TResult = never>(\n    onrejected?: ((reason: any) => TResult | PromiseLike<TResult>) | null,\n  ): PromiseLike<T | TResult> {\n    return this.then(val => val, onrejected);\n  }\n\n  /** @inheritdoc */\n  public finally<TResult>(onfinally?: (() => void) | null): PromiseLike<TResult> {\n    return new SyncPromise<TResult>((resolve, reject) => {\n      let val: TResult | any;\n      let isRejected: boolean;\n\n      return this.then(\n        value => {\n          isRejected = false;\n          val = value;\n          if (onfinally) {\n            onfinally();\n          }\n        },\n        reason => {\n          isRejected = true;\n          val = reason;\n          if (onfinally) {\n            onfinally();\n          }\n        },\n      ).then(() => {\n        if (isRejected) {\n          reject(val);\n          return;\n        }\n\n        resolve(val as unknown as any);\n      });\n    });\n  }\n\n  /** Excute the resolve/reject handlers. */\n  private _executeHandlers(): void {\n    if (this._state === STATE_PENDING) {\n      return;\n    }\n\n    const cachedHandlers = this._handlers.slice();\n    this._handlers = [];\n\n    cachedHandlers.forEach(handler => {\n      if (handler[0]) {\n        return;\n      }\n\n      if (this._state === STATE_RESOLVED) {\n        handler[1](this._value as unknown as any);\n      }\n\n      if (this._state === STATE_REJECTED) {\n        handler[2](this._value);\n      }\n\n      handler[0] = true;\n    });\n  }\n\n  /** Run the executor for the SyncPromise. */\n  private _runExecutor(executor: Executor<T>): void {\n    const setResult = (state: State, value?: T | PromiseLike<T> | any): void => {\n      if (this._state !== STATE_PENDING) {\n        return;\n      }\n\n      if (isThenable(value)) {\n        void (value as PromiseLike<T>).then(resolve, reject);\n        return;\n      }\n\n      this._state = state;\n      this._value = value;\n\n      this._executeHandlers();\n    };\n\n    const resolve = (value: unknown): void => {\n      setResult(STATE_RESOLVED, value);\n    };\n\n    const reject = (reason: unknown): void => {\n      setResult(STATE_REJECTED, reason);\n    };\n\n    try {\n      executor(resolve, reject);\n    } catch (e) {\n      reject(e);\n    }\n  }\n}\n","import { safeDateNow, withRandomSafeContext } from './randomSafeContext';\nimport { GLOBAL_OBJ } from './worldwide';\n\nconst ONE_SECOND_IN_MS = 1000;\n\n/**\n * A partial definition of the [Performance Web API]{@link https://developer.mozilla.org/en-US/docs/Web/API/Performance}\n * for accessing a high-resolution monotonic clock.\n */\ninterface Performance {\n  /**\n   * The millisecond timestamp at which measurement began, measured in Unix time.\n   */\n  timeOrigin: number;\n  /**\n   * Returns the current millisecond timestamp, where 0 represents the start of measurement.\n   */\n  now(): number;\n}\n\n/**\n * Returns a timestamp in seconds since the UNIX epoch using the Date API.\n */\nexport function dateTimestampInSeconds(): number {\n  return safeDateNow() / ONE_SECOND_IN_MS;\n}\n\n/**\n * Returns a wrapper around the native Performance API browser implementation, or undefined for browsers that do not\n * support the API.\n *\n * Wrapping the native API works around differences in behavior from different browsers.\n */\nfunction createUnixTimestampInSecondsFunc(): () => number {\n  const { performance } = GLOBAL_OBJ as typeof GLOBAL_OBJ & { performance?: Performance };\n  // Some browser and environments don't have a performance or timeOrigin, so we fallback to\n  // using Date.now() to compute the starting time.\n  if (!performance?.now || !performance.timeOrigin) {\n    return dateTimestampInSeconds;\n  }\n\n  const timeOrigin = performance.timeOrigin;\n\n  // performance.now() is a monotonic clock, which means it starts at 0 when the process begins. To get the current\n  // wall clock time (actual UNIX timestamp), we need to add the starting time origin and the current time elapsed.\n  //\n  // TODO: This does not account for the case where the monotonic clock that powers performance.now() drifts from the\n  // wall clock time, which causes the returned timestamp to be inaccurate. We should investigate how to detect and\n  // correct for this.\n  // See: https://github.com/getsentry/sentry-javascript/issues/2590\n  // See: https://github.com/mdn/content/issues/4713\n  // See: https://dev.to/noamr/when-a-millisecond-is-not-a-millisecond-3h6\n  return () => {\n    return (timeOrigin + withRandomSafeContext(() => performance.now())) / ONE_SECOND_IN_MS;\n  };\n}\n\nlet _cachedTimestampInSeconds: (() => number) | undefined;\n\n/**\n * Returns a timestamp in seconds since the UNIX epoch using either the Performance or Date APIs, depending on the\n * availability of the Performance API.\n *\n * BUG: Note that because of how browsers implement the Performance API, the clock might stop when the computer is\n * asleep. This creates a skew between `dateTimestampInSeconds` and `timestampInSeconds`. The\n * skew can grow to arbitrary amounts like days, weeks or months.\n * See https://github.com/getsentry/sentry-javascript/issues/2590.\n */\nexport function timestampInSeconds(): number {\n  // We store this in a closure so that we don't have to create a new function every time this is called.\n  const func = _cachedTimestampInSeconds ?? (_cachedTimestampInSeconds = createUnixTimestampInSecondsFunc());\n  return func();\n}\n\n/**\n * Cached result of getBrowserTimeOrigin.\n */\nlet cachedTimeOrigin: number | null | undefined = null;\n\n/**\n * Gets the time origin and the mode used to determine it.\n *\n * Unfortunately browsers may report an inaccurate time origin data, through either performance.timeOrigin or\n * performance.timing.navigationStart, which results in poor results in performance data. We only treat time origin\n * data as reliable if they are within a reasonable threshold of the current time.\n *\n * TODO: move to `@sentry/browser-utils` package.\n */\nfunction getBrowserTimeOrigin(): number | undefined {\n  const { performance } = GLOBAL_OBJ as typeof GLOBAL_OBJ & Window;\n  if (!performance?.now) {\n    return undefined;\n  }\n\n  const threshold = 300_000; // 5 minutes in milliseconds\n  const performanceNow = withRandomSafeContext(() => performance.now());\n  const dateNow = safeDateNow();\n\n  const timeOrigin = performance.timeOrigin;\n  if (typeof timeOrigin === 'number') {\n    const timeOriginDelta = Math.abs(timeOrigin + performanceNow - dateNow);\n    if (timeOriginDelta < threshold) {\n      return timeOrigin;\n    }\n  }\n\n  // TODO: Remove all code related to `performance.timing.navigationStart` once we drop support for Safari 14.\n  // `performance.timeSince` is available in Safari 15.\n  // see: https://caniuse.com/mdn-api_performance_timeorigin\n\n  // While performance.timing.navigationStart is deprecated in favor of performance.timeOrigin, performance.timeOrigin\n  // is not as widely supported. Namely, performance.timeOrigin is undefined in Safari as of writing.\n  // Also as of writing, performance.timing is not available in Web Workers in mainstream browsers, so it is not always\n  // a valid fallback. In the absence of an initial time provided by the browser, fallback to the current time from the\n  // Date API.\n  // eslint-disable-next-line typescript/no-deprecated\n  const navigationStart = performance.timing?.navigationStart;\n  if (typeof navigationStart === 'number') {\n    const navigationStartDelta = Math.abs(navigationStart + performanceNow - dateNow);\n    if (navigationStartDelta < threshold) {\n      return navigationStart;\n    }\n  }\n\n  // Either both timeOrigin and navigationStart are skewed or neither is available, fallback to subtracting\n  // `performance.now()` from `Date.now()`.\n  return dateNow - performanceNow;\n}\n\n/**\n * The number of milliseconds since the UNIX epoch. This value is only usable in a browser, and only when the\n * performance API is available.\n */\nexport function browserPerformanceTimeOrigin(): number | undefined {\n  if (cachedTimeOrigin === null) {\n    cachedTimeOrigin = getBrowserTimeOrigin();\n  }\n\n  return cachedTimeOrigin;\n}\n","/**\n * Calls `unref` on a timer, if the method is available on @param timer.\n *\n * `unref()` is used to allow processes to exit immediately, even if the timer\n * is still running and hasn't resolved yet.\n *\n * Use this in places where code can run on browser or server, since browsers\n * do not support `unref`.\n */\nexport function safeUnref(timer: ReturnType<typeof setTimeout>): ReturnType<typeof setTimeout> {\n  if (typeof timer === 'object' && typeof timer.unref === 'function') {\n    timer.unref();\n  }\n  return timer;\n}\n","const SEQUENCE_ATTR_KEY = 'sentry.timestamp.sequence';\n\nlet _sequenceNumber = 0;\nlet _previousTimestampMs: number | undefined;\n\n/**\n * Returns the `sentry.timestamp.sequence` attribute entry for a serialized telemetry item.\n *\n * The sequence number starts at 0 and increments by 1 for each item captured.\n * It resets to 0 when the current item's integer millisecond timestamp differs\n * from the previous item's integer millisecond timestamp.\n *\n * @param timestampInSeconds - The timestamp of the telemetry item in seconds.\n */\nexport function getSequenceAttribute(timestampInSeconds: number): {\n  key: string;\n  value: { value: number; type: 'integer' };\n} {\n  const nowMs = Math.floor(timestampInSeconds * 1000);\n\n  if (_previousTimestampMs !== undefined && nowMs !== _previousTimestampMs) {\n    _sequenceNumber = 0;\n  }\n\n  const value = _sequenceNumber;\n  _sequenceNumber++;\n  _previousTimestampMs = nowMs;\n\n  return {\n    key: SEQUENCE_ATTR_KEY,\n    value: { value, type: 'integer' },\n  };\n}\n\n/**\n * Resets the sequence number state. Only exported for testing purposes.\n */\nexport function _INTERNAL_resetSequenceNumber(): void {\n  _sequenceNumber = 0;\n  _previousTimestampMs = undefined;\n}\n","import type { Client } from '../client';\nimport { getTraceContextFromScope, withScope } from '../currentScopes';\nimport type { Scope } from '../scope';\nimport {\n  getDynamicSamplingContextFromScope,\n  getDynamicSamplingContextFromSpan,\n} from '../tracing/dynamicSamplingContext';\nimport type { TraceContext } from '../types/context';\nimport type { DynamicSamplingContext } from '../types/envelope';\nimport { getActiveSpan, spanToTraceContext } from './spanUtils';\n\n/** Extract trace information from scope */\nexport function _getTraceInfoFromScope(\n  client: Client,\n  scope: Scope | undefined,\n): [dynamicSamplingContext: Partial<DynamicSamplingContext> | undefined, traceContext: TraceContext | undefined] {\n  if (!scope) {\n    return [undefined, undefined];\n  }\n\n  return withScope(scope, () => {\n    const span = getActiveSpan();\n    const traceContext = span ? spanToTraceContext(span) : getTraceContextFromScope(scope);\n    const dynamicSamplingContext = span\n      ? getDynamicSamplingContextFromSpan(span)\n      : getDynamicSamplingContextFromScope(client, scope);\n    return [dynamicSamplingContext, traceContext];\n  });\n}\n","import { getAsyncContextStrategy } from '../asyncContext';\nimport { getMainCarrier } from '../carrier';\nimport type { Client } from '../client';\nimport { getClient, getCurrentScope, hasExternalPropagationContext } from '../currentScopes';\nimport { isEnabled } from '../exports';\nimport type { Scope } from '../scope';\nimport { getDynamicSamplingContextFromScope, getDynamicSamplingContextFromSpan } from '../tracing';\nimport { spanIsNonRecordingSpan } from '../tracing/sentryNonRecordingSpan';\nimport type { Span } from '../types/span';\nimport type { SerializedTraceData } from '../types/tracing';\nimport { dynamicSamplingContextToSentryBaggageHeader } from './baggage';\nimport { debug } from './debug-logger';\nimport { hasSpansEnabled } from './hasSpansEnabled';\nimport { getActiveSpan, spanToTraceHeader, spanToTraceparentHeader } from './spanUtils';\nimport { generateSentryTraceHeader, generateTraceparentHeader, TRACEPARENT_REGEXP } from './tracing';\n\n/**\n * Extracts trace propagation data from the current span or from the client's scope (via transaction or propagation\n * context) and serializes it to `sentry-trace` and `baggage` values. These values can be used to propagate\n * a trace via our tracing Http headers or Html `<meta>` tags.\n *\n * This function also applies some validation to the generated sentry-trace and baggage values to ensure that\n * only valid strings are returned.\n *\n * When an external propagation context is registered (e.g. via the OTLP integration) and there is no active\n * Sentry span, this function returns an empty object to defer outgoing request propagation to the external\n * propagator (e.g. an OpenTelemetry propagator).\n *\n * If (@param options.propagateTraceparent) is `true`, the function will also generate a `traceparent` value,\n * following the W3C traceparent header format.\n *\n * @returns an object with the tracing data values. The object keys are the name of the tracing key to be used as header\n * or meta tag name.\n */\nexport function getTraceData(\n  options: { span?: Span; scope?: Scope; client?: Client; propagateTraceparent?: boolean } = {},\n): SerializedTraceData {\n  const client = options.client || getClient();\n  if (!isEnabled() || !client) {\n    return {};\n  }\n\n  const carrier = getMainCarrier();\n  const acs = getAsyncContextStrategy(carrier);\n  if (acs.getTraceData) {\n    return acs.getTraceData(options);\n  }\n\n  const scope = options.scope || getCurrentScope();\n  const span = options.span || getActiveSpan();\n\n  // In Tracing-without-Performance (TwP) mode, spans are non-recording placeholders that carry no\n  // sampling decision of their own (it's deferred). The scope is the source of truth, so we read\n  // the trace headers from the scope. A non-recording span in *tracing* mode (e.g. an unsampled\n  // child or an ignored span) is different: it represents an explicit negative decision, which\n  // `spanToTraceHeader` correctly encodes as `-0`, so we keep reading those from the span.\n  const isTwpPlaceholder = spanIsNonRecordingSpan(span) && !hasSpansEnabled(client.getOptions());\n\n  // When there's no recording span and an external propagation context is registered (e.g. OTLP\n  // integration), return empty to let the external propagator handle outgoing request propagation.\n  if (!span && hasExternalPropagationContext()) {\n    return {};\n  }\n\n  const sentryTrace = span && !isTwpPlaceholder ? spanToTraceHeader(span) : scopeToTraceHeader(scope);\n  const dsc = span ? getDynamicSamplingContextFromSpan(span) : getDynamicSamplingContextFromScope(client, scope);\n  const baggage = dynamicSamplingContextToSentryBaggageHeader(dsc);\n\n  const isValidSentryTraceHeader = TRACEPARENT_REGEXP.test(sentryTrace);\n  if (!isValidSentryTraceHeader) {\n    debug.warn('Invalid sentry-trace data. Cannot generate trace data');\n    return {};\n  }\n\n  const traceData: SerializedTraceData = {\n    'sentry-trace': sentryTrace,\n    baggage,\n  };\n\n  if (options.propagateTraceparent) {\n    traceData.traceparent = span && !isTwpPlaceholder ? spanToTraceparentHeader(span) : scopeToTraceparentHeader(scope);\n  }\n\n  return traceData;\n}\n\n/**\n * Get a sentry-trace header value for the given scope.\n */\nfunction scopeToTraceHeader(scope: Scope): string {\n  const { traceId, sampled, propagationSpanId } = scope.getPropagationContext();\n  return generateSentryTraceHeader(traceId, propagationSpanId, sampled);\n}\n\nfunction scopeToTraceparentHeader(scope: Scope): string {\n  const { traceId, sampled, propagationSpanId } = scope.getPropagationContext();\n  return generateTraceparentHeader(traceId, propagationSpanId, sampled);\n}\n","import { DEBUG_BUILD } from '../debug-build';\nimport type { CoreOptions as Options } from '../types/options';\nimport { debug } from './debug-logger';\nimport type { LRUMap } from './lru';\nimport { stringMatchesSomePattern } from './string';\n\nconst NOT_PROPAGATED_MESSAGE =\n  '[Tracing] Not injecting trace data for url because it does not match tracePropagationTargets:';\n\n/**\n * Check if a given URL should be propagated to or not.\n * If no url is defined, or no trace propagation targets are defined, this will always return `true`.\n * You can also optionally provide a decision map, to cache decisions and avoid repeated regex lookups.\n */\nexport function shouldPropagateTraceForUrl(\n  url: string | undefined,\n  tracePropagationTargets: Options['tracePropagationTargets'],\n  decisionMap?: LRUMap<string, boolean>,\n): boolean {\n  if (typeof url !== 'string' || !tracePropagationTargets) {\n    return true;\n  }\n\n  const cachedDecision = decisionMap?.get(url);\n  if (cachedDecision !== undefined) {\n    DEBUG_BUILD && !cachedDecision && debug.log(NOT_PROPAGATED_MESSAGE, url);\n    return cachedDecision;\n  }\n\n  const decision = stringMatchesSomePattern(url, tracePropagationTargets);\n  decisionMap?.set(url, decision);\n\n  DEBUG_BUILD && !decision && debug.log(NOT_PROPAGATED_MESSAGE, url);\n  return decision;\n}\n","import type { Client } from '../client';\nimport type { DynamicSamplingContext } from '../types/envelope';\nimport type { PropagationContext } from '../types/tracing';\nimport type { TraceparentData } from '../types/transaction';\nimport { debug } from '../utils/debug-logger';\nimport { baggageHeaderToDynamicSamplingContext } from './baggage';\nimport { extractOrgIdFromClient } from './dsn';\nimport { parseSampleRate } from './parseSampleRate';\nimport { generateSpanId, generateTraceId } from './propagationContext';\nimport { safeMathRandom } from './randomSafeContext';\n\n// oxlint-disable-next-line sdk/no-regexp-constructor -- RegExp is used for readability here\nexport const TRACEPARENT_REGEXP = new RegExp(\n  '^[ \\\\t]*' + // whitespace\n    '([0-9a-f]{32})?' + // trace_id\n    '-?([0-9a-f]{16})?' + // span_id\n    '-?([01])?' + // sampled\n    '[ \\\\t]*$', // whitespace\n);\n\n/**\n * Extract transaction context data from a `sentry-trace` header.\n *\n * This is terrible naming but the function has nothing to do with the W3C traceparent header.\n * It can only parse the `sentry-trace` header and extract the \"trace parent\" data.\n *\n * @param traceparent Traceparent string\n *\n * @returns Object containing data from the header, or undefined if traceparent string is malformed\n */\nexport function extractTraceparentData(traceparent?: string): TraceparentData | undefined {\n  if (!traceparent) {\n    return undefined;\n  }\n\n  const matches = traceparent.match(TRACEPARENT_REGEXP);\n  if (!matches) {\n    return undefined;\n  }\n\n  let parentSampled: boolean | undefined;\n  if (matches[3] === '1') {\n    parentSampled = true;\n  } else if (matches[3] === '0') {\n    parentSampled = false;\n  }\n\n  return {\n    traceId: matches[1],\n    parentSampled,\n    parentSpanId: matches[2],\n  };\n}\n\n/**\n * Whether a propagation context continues an incoming trace, rather than being the head of a new one.\n *\n * Both fields have to be checked. `parentSpanId` is unset when the incoming `sentry-trace` header\n * carried no span id, which the header format allows. `dsc` is unset when a remote parent arrived\n * without any incoming baggage. Either one on its own therefore misses a continued trace.\n */\nexport function isContinuingTrace(propagationContext: PropagationContext): boolean {\n  return !!propagationContext.parentSpanId || !!propagationContext.dsc;\n}\n\n/**\n * Create a propagation context from incoming headers or\n * creates a minimal new one if the headers are undefined.\n */\nexport function propagationContextFromHeaders(\n  sentryTrace: string | undefined,\n  baggage: string | number | boolean | string[] | null | undefined,\n): PropagationContext {\n  const traceparentData = extractTraceparentData(sentryTrace);\n  const dynamicSamplingContext = baggageHeaderToDynamicSamplingContext(baggage);\n\n  if (!traceparentData?.traceId) {\n    return {\n      traceId: generateTraceId(),\n      sampleRand: safeMathRandom(),\n    };\n  }\n\n  const sampleRand = getSampleRandFromTraceparentAndDsc(traceparentData, dynamicSamplingContext);\n\n  // The sample_rand on the DSC needs to be generated based on traceparent + baggage.\n  if (dynamicSamplingContext) {\n    dynamicSamplingContext.sample_rand = sampleRand.toString();\n  }\n\n  const { traceId, parentSpanId, parentSampled } = traceparentData;\n\n  return {\n    traceId,\n    parentSpanId,\n    sampled: parentSampled,\n    dsc: dynamicSamplingContext || {}, // If we have traceparent data but no DSC it means we are not head of trace and we must freeze it\n    sampleRand,\n  };\n}\n\n/**\n * Create sentry-trace header from span context values.\n */\nexport function generateSentryTraceHeader(\n  traceId: string | undefined = generateTraceId(),\n  spanId: string | undefined = generateSpanId(),\n  sampled?: boolean,\n): string {\n  let sampledString = '';\n  if (sampled !== undefined) {\n    sampledString = sampled ? '-1' : '-0';\n  }\n  return `${traceId}-${spanId}${sampledString}`;\n}\n\n/**\n * Creates a W3C traceparent header from the given trace and span ids.\n */\nexport function generateTraceparentHeader(\n  traceId: string | undefined = generateTraceId(),\n  spanId: string | undefined = generateSpanId(),\n  sampled?: boolean,\n): string {\n  return `00-${traceId}-${spanId}-${sampled ? '01' : '00'}`;\n}\n\n/**\n * Given any combination of an incoming trace, generate a sample rand based on its defined semantics.\n *\n * Read more: https://develop.sentry.dev/sdk/telemetry/traces/#propagated-random-value\n */\nfunction getSampleRandFromTraceparentAndDsc(\n  traceparentData: TraceparentData | undefined,\n  dsc: Partial<DynamicSamplingContext> | undefined,\n): number {\n  // When there is an incoming sample rand use it.\n  const parsedSampleRand = parseSampleRate(dsc?.sample_rand);\n  if (parsedSampleRand !== undefined) {\n    return parsedSampleRand;\n  }\n\n  // Otherwise, if there is an incoming sampling decision + sample rate, generate a sample rand that would lead to the same sampling decision.\n  const parsedSampleRate = parseSampleRate(dsc?.sample_rate);\n  if (parsedSampleRate && traceparentData?.parentSampled !== undefined) {\n    return traceparentData.parentSampled\n      ? // Returns a sample rand with positive sampling decision [0, sampleRate)\n        safeMathRandom() * parsedSampleRate\n      : // Returns a sample rand with negative sampling decision [sampleRate, 1)\n        parsedSampleRate + safeMathRandom() * (1 - parsedSampleRate);\n  } else {\n    // If nothing applies, return a random sample rand.\n    return safeMathRandom();\n  }\n}\n\n/**\n * Determines whether a new trace should be continued based on the provided baggage org ID and the client's `strictTraceContinuation` option.\n * If the trace should not be continued, a new trace will be started.\n *\n * The result is dependent on the `strictTraceContinuation` option in the client.\n * See https://develop.sentry.dev/sdk/telemetry/traces/#stricttracecontinuation\n */\nexport function shouldContinueTrace(client: Client, baggageOrgId?: string): boolean {\n  const clientOrgId = extractOrgIdFromClient(client);\n\n  // Case: baggage orgID and Client orgID don't match - always start new trace\n  if (baggageOrgId && clientOrgId && baggageOrgId !== clientOrgId) {\n    debug.log(\n      `Won't continue trace because org IDs don't match (incoming baggage: ${baggageOrgId}, SDK options: ${clientOrgId})`,\n    );\n    return false;\n  }\n\n  const strictTraceContinuation = client.getOptions().strictTraceContinuation || false; // default for `strictTraceContinuation` is `false`\n\n  if (strictTraceContinuation) {\n    // With strict continuation enabled, don't continue trace if:\n    // - Baggage has orgID, but Client doesn't have one\n    // - Client has orgID, but baggage doesn't have one\n    if ((baggageOrgId && !clientOrgId) || (!baggageOrgId && clientOrgId)) {\n      debug.log(\n        `Starting a new trace because strict trace continuation is enabled but one org ID is missing (incoming baggage: ${baggageOrgId}, Sentry client: ${clientOrgId})`,\n      );\n      return false;\n    }\n  }\n\n  return true;\n}\n","import { SEMANTIC_ATTRIBUTE_EXCLUSIVE_TIME, SEMANTIC_ATTRIBUTE_PROFILE_ID } from '../semanticAttributes';\nimport type { TransactionEvent } from '../types/event';\nimport type { SpanJSON } from '../types/span';\n\n/**\n * Converts a transaction event to a span JSON object.\n */\nexport function convertTransactionEventToSpanJson(event: TransactionEvent): SpanJSON {\n  const { trace_id, parent_span_id, span_id, status, origin, data, op } = event.contexts?.trace ?? {};\n\n  return {\n    data: data ?? {},\n    description: event.transaction,\n    op,\n    parent_span_id,\n    span_id: span_id ?? '',\n    start_timestamp: event.start_timestamp ?? 0,\n    status,\n    timestamp: event.timestamp,\n    trace_id: trace_id ?? '',\n    origin,\n    profile_id: data?.[SEMANTIC_ATTRIBUTE_PROFILE_ID] as string | undefined,\n    exclusive_time: data?.[SEMANTIC_ATTRIBUTE_EXCLUSIVE_TIME] as number | undefined,\n    measurements: event.measurements,\n    is_segment: true,\n  };\n}\n\n/**\n * Converts a span JSON object to a transaction event.\n */\nexport function convertSpanJsonToTransactionEvent(span: SpanJSON): TransactionEvent {\n  return {\n    type: 'transaction',\n    timestamp: span.timestamp,\n    start_timestamp: span.start_timestamp,\n    transaction: span.description,\n    contexts: {\n      trace: {\n        trace_id: span.trace_id,\n        span_id: span.span_id,\n        parent_span_id: span.parent_span_id,\n        op: span.op,\n        status: span.status,\n        origin: span.origin,\n        data: {\n          ...span.data,\n          ...(span.profile_id && { [SEMANTIC_ATTRIBUTE_PROFILE_ID]: span.profile_id }),\n          ...(span.exclusive_time && { [SEMANTIC_ATTRIBUTE_EXCLUSIVE_TIME]: span.exclusive_time }),\n        },\n      },\n    },\n    measurements: span.measurements,\n  };\n}\n","import { getEnvelopeEndpointWithUrlEncodedAuth } from '../api';\nimport { debug } from './debug-logger';\nimport { makeDsn } from './dsn';\nimport { parseEnvelope } from './envelope';\n\nexport interface HandleTunnelRequestOptions {\n  /** Incoming request containing the Sentry envelope as its body */\n  request: Request;\n  /** Pre-parsed array of allowed DSN strings */\n  allowedDsns: Array<string>;\n}\n\n/**\n * Core Sentry tunnel handler - framework agnostic.\n *\n * Validates the envelope DSN against allowed DSNs, then forwards the\n * envelope to the Sentry ingest endpoint.\n *\n * @returns A `Response` — either the upstream Sentry response on success, or an error response.\n */\nexport async function handleTunnelRequest(options: HandleTunnelRequestOptions): Promise<Response> {\n  const { request, allowedDsns } = options;\n\n  if (allowedDsns.length === 0) {\n    return new Response('Tunnel not configured', { status: 500 });\n  }\n\n  const body = new Uint8Array(await request.arrayBuffer());\n\n  let envelopeHeader;\n  try {\n    [envelopeHeader] = parseEnvelope(body);\n  } catch {\n    return new Response('Invalid envelope', { status: 400 });\n  }\n\n  if (!envelopeHeader) {\n    return new Response('Invalid envelope: missing header', { status: 400 });\n  }\n\n  const dsn = envelopeHeader.dsn;\n  if (!dsn) {\n    return new Response('Invalid envelope: missing DSN', { status: 400 });\n  }\n\n  // SECURITY: Validate that the envelope DSN matches one of the allowed DSNs\n  // This prevents SSRF attacks where attackers send crafted envelopes\n  // with malicious DSNs pointing to arbitrary hosts\n  const isAllowed = allowedDsns.some(allowed => allowed === dsn);\n\n  if (!isAllowed) {\n    debug.warn(`Sentry tunnel: rejected request with unauthorized DSN (${dsn})`);\n    return new Response('DSN not allowed', { status: 403 });\n  }\n\n  const dsnComponents = makeDsn(dsn);\n  if (!dsnComponents) {\n    debug.warn(`Could not extract DSN Components from: ${dsn}`);\n    return new Response('Invalid DSN', { status: 403 });\n  }\n\n  const sentryIngestUrl = getEnvelopeEndpointWithUrlEncodedAuth(dsnComponents);\n\n  try {\n    return await fetch(sentryIngestUrl, {\n      method: 'POST',\n      headers: {\n        'Content-Type': 'application/x-sentry-envelope',\n      },\n      body,\n    });\n  } catch (error) {\n    debug.error('Sentry tunnel: failed to forward envelope', error);\n    return new Response('Failed to forward envelope to Sentry', { status: 500 });\n  }\n}\n","import { URL_FULL } from '@sentry/conventions/attributes';\nimport {\n  SEMANTIC_ATTRIBUTE_HTTP_REQUEST_METHOD,\n  SEMANTIC_ATTRIBUTE_SENTRY_ORIGIN,\n  SEMANTIC_ATTRIBUTE_SENTRY_SOURCE,\n} from '../semanticAttributes';\nimport type { SpanAttributes } from '../types/span';\n\ntype PartialURL = {\n  host?: string;\n  path?: string;\n  protocol?: string;\n  relative?: string;\n  search?: string;\n  hash?: string;\n};\n\ninterface URLwithCanParse extends URL {\n  canParse: (url: string, base?: string | URL | undefined) => boolean;\n}\n\n// A subset of the URL object that is valid for relative URLs\n// The URL object cannot handle relative URLs, so we need to handle them separately\ntype RelativeURL = {\n  isRelative: true;\n  pathname: URL['pathname'];\n  search: URL['search'];\n  hash: URL['hash'];\n};\n\ntype URLObject = RelativeURL | URL;\n\n// Curious about `thismessage:/`? See: https://www.rfc-editor.org/rfc/rfc2557.html\n//  > When the methods above do not yield an absolute URI, a base URL\n//  > of \"thismessage:/\" MUST be employed. This base URL has been\n//  > defined for the sole purpose of resolving relative references\n//  > within a multipart/related structure when no other base URI is\n//  > specified.\n//\n// We need to provide a base URL to `parseStringToURLObject` because the fetch API gives us a\n// relative URL sometimes.\n//\n// This is the only case where we need to provide a base URL to `parseStringToURLObject`\n// because the relative URL is not valid on its own.\nconst DEFAULT_BASE_URL = 'thismessage:/';\n\n/**\n * Checks if the URL object is relative\n *\n * @param url - The URL object to check\n * @returns True if the URL object is relative, false otherwise\n */\nexport function isURLObjectRelative(url: URLObject): url is RelativeURL {\n  return 'isRelative' in url;\n}\n\n/**\n * Parses string to a URL object\n *\n * @param url - The URL to parse\n * @returns The parsed URL object or undefined if the URL is invalid\n */\nexport function parseStringToURLObject(url: string, urlBase?: string | URL | undefined): URLObject | undefined {\n  const isRelative = url.indexOf('://') <= 0 && url.indexOf('//') !== 0;\n  const base = urlBase ?? (isRelative ? DEFAULT_BASE_URL : undefined);\n  try {\n    // Use `canParse` to short-circuit the URL constructor if it's not a valid URL\n    // This is faster than trying to construct the URL and catching the error\n    // Node 20+, Chrome 120+, Firefox 115+, Safari 17+\n    if ('canParse' in URL && !(URL as unknown as URLwithCanParse).canParse(url, base)) {\n      return undefined;\n    }\n\n    const fullUrlObject = new URL(url, base);\n    if (isRelative) {\n      // Because we used a fake base URL, we need to return a relative URL object.\n      // We cannot return anything about the origin, host, etc. because it will refer to the fake base URL.\n      return {\n        isRelative,\n        pathname: fullUrlObject.pathname,\n        search: fullUrlObject.search,\n        hash: fullUrlObject.hash,\n      };\n    }\n    return fullUrlObject;\n  } catch {\n    // empty body\n  }\n\n  return undefined;\n}\n\n/**\n * Takes a URL object and returns a sanitized string which is safe to use as span name\n * see: https://develop.sentry.dev/sdk/data-handling/#structuring-data\n */\nexport function getSanitizedUrlStringFromUrlObject(url: URLObject): string {\n  if (isURLObjectRelative(url)) {\n    return url.pathname;\n  }\n\n  const newUrl = new URL(url);\n  newUrl.search = '';\n  newUrl.hash = '';\n  if (['80', '443'].includes(newUrl.port)) {\n    newUrl.port = '';\n  }\n  if (newUrl.password) {\n    newUrl.password = '%filtered%';\n  }\n  if (newUrl.username) {\n    newUrl.username = '%filtered%';\n  }\n\n  return newUrl.toString();\n}\n\ntype PartialRequest = {\n  method?: string;\n};\n\nfunction getHttpSpanNameFromUrlObject(\n  urlObject: URLObject | undefined,\n  kind: 'server' | 'client',\n  request?: PartialRequest,\n  routeName?: string,\n): string {\n  const method = request?.method?.toUpperCase() ?? 'GET';\n  const route = routeName\n    ? routeName\n    : urlObject\n      ? kind === 'client'\n        ? getSanitizedUrlStringFromUrlObject(urlObject)\n        : urlObject.pathname\n      : '/';\n\n  return `${method} ${route}`;\n}\n\n/**\n * Takes a parsed URL object and returns a set of attributes for the span\n * that represents the HTTP request for that url. This is used for both server\n * and client http spans.\n *\n * Follows https://opentelemetry.io/docs/specs/semconv/http/.\n *\n * @param urlObject - see {@link parseStringToURLObject}\n * @param kind - The type of HTTP operation (server or client)\n * @param spanOrigin - The origin of the span\n * @param request - The request object, see {@link PartialRequest}\n * @param routeName - The name of the route, must be low cardinality\n * @returns The span name and attributes for the HTTP operation\n */\nexport function getHttpSpanDetailsFromUrlObject(\n  urlObject: URLObject | undefined,\n  kind: 'server' | 'client',\n  spanOrigin: string,\n  request?: PartialRequest,\n  routeName?: string,\n): [name: string, attributes: SpanAttributes] {\n  const attributes: SpanAttributes = {\n    [SEMANTIC_ATTRIBUTE_SENTRY_ORIGIN]: spanOrigin,\n    [SEMANTIC_ATTRIBUTE_SENTRY_SOURCE]: 'url',\n  };\n\n  if (routeName) {\n    // This is based on https://opentelemetry.io/docs/specs/semconv/http/http-spans/#name\n    attributes[kind === 'server' ? 'http.route' : 'url.template'] = routeName;\n    attributes[SEMANTIC_ATTRIBUTE_SENTRY_SOURCE] = 'route';\n  }\n\n  if (request?.method) {\n    attributes[SEMANTIC_ATTRIBUTE_HTTP_REQUEST_METHOD] = request.method.toUpperCase();\n  }\n\n  if (urlObject) {\n    if (urlObject.search) {\n      attributes['url.query'] = urlObject.search;\n    }\n    if (urlObject.hash) {\n      attributes['url.fragment'] = urlObject.hash;\n    }\n    if (urlObject.pathname) {\n      attributes['url.path'] = urlObject.pathname;\n      if (urlObject.pathname === '/') {\n        attributes[SEMANTIC_ATTRIBUTE_SENTRY_SOURCE] = 'route';\n      }\n    }\n\n    if (!isURLObjectRelative(urlObject)) {\n      attributes[URL_FULL] = urlObject.href;\n      if (urlObject.port) {\n        attributes['url.port'] = urlObject.port;\n      }\n      if (urlObject.protocol) {\n        attributes['url.scheme'] = urlObject.protocol;\n      }\n      if (urlObject.hostname) {\n        attributes[kind === 'server' ? 'server.address' : 'url.domain'] = urlObject.hostname;\n      }\n    }\n  }\n\n  return [getHttpSpanNameFromUrlObject(urlObject, kind, request, routeName), attributes];\n}\n\n/**\n * Parses string form of URL into an object\n * // borrowed from https://tools.ietf.org/html/rfc3986#appendix-B\n * // intentionally using regex and not <a/> href parsing trick because React Native and other\n * // environments where DOM might not be available\n * @returns parsed URL object\n */\nexport function parseUrl(url: string): PartialURL {\n  if (!url) {\n    return {};\n  }\n\n  const match = url.match(/^(([^:/?#]+):)?(\\/\\/([^/?#]*))?([^?#]*)(\\?([^#]*))?(#(.*))?$/);\n\n  if (!match) {\n    return {};\n  }\n\n  // coerce to undefined values to empty string so we don't get 'undefined'\n  const query = match[6] || '';\n  const fragment = match[8] || '';\n  return {\n    host: match[4],\n    path: match[5],\n    protocol: match[2],\n    search: query,\n    hash: fragment,\n    relative: match[5] + query + fragment, // everything minus origin\n  };\n}\n\n/**\n * Strip the query string and fragment off of a given URL or path (if present)\n *\n * @param urlPath Full URL or path, including possible query string and/or fragment\n * @returns URL or path without query string or fragment\n */\nexport function stripUrlQueryAndFragment(urlPath: string): string {\n  return (urlPath.split(/[?#]/, 1) as [string, ...string[]])[0];\n}\n\n/**\n * Takes a URL object and returns a sanitized string which is safe to use as span name\n * see: https://develop.sentry.dev/sdk/data-handling/#structuring-data\n */\nexport function getSanitizedUrlString(url: PartialURL): string {\n  const { protocol, host, path } = url;\n\n  const filteredHost =\n    host\n      // Always filter out authority\n      ?.replace(/^.*@/, '[filtered]:[filtered]@')\n      // Don't show standard :80 (http) and :443 (https) ports to reduce the noise\n      // TODO: Use new URL global if it exists\n      .replace(/(:80)$/, '')\n      .replace(/(:443)$/, '') || '';\n\n  return `${protocol ? `${protocol}://` : ''}${filteredHost}${path}`;\n}\n\n/**\n * Strips the content from a data URL, returning a placeholder with the MIME type.\n *\n * Data URLs can be very long (e.g. base64 encoded scripts for Web Workers),\n * with little valuable information, often leading to envelopes getting dropped due\n * to size limit violations. Therefore, we strip data URLs and replace them with a\n * placeholder.\n *\n * @param url - The URL to process\n * @param includeDataPrefix - If true, includes the first 10 characters of the data stream\n *                            for debugging (e.g., to identify magic bytes like WASM's AGFzbQ).\n *                            Defaults to true.\n * @returns For data URLs, returns a short format like `data:text/javascript;base64,SGVsbG8gV2... [truncated]`.\n *          For non-data URLs, returns the original URL unchanged.\n */\nexport function stripDataUrlContent(url: string, includeDataPrefix: boolean = true): string {\n  if (url.startsWith('data:')) {\n    // Match the MIME type (everything after 'data:' until the first ';' or ',')\n    const match = url.match(/^data:([^;,]+)/);\n    const mimeType = match ? match[1] : 'text/plain';\n    const isBase64 = url.includes(';base64,');\n\n    // Find where the actual data starts (after the comma)\n    const dataStart = url.indexOf(',');\n    let dataPrefix = '';\n    if (includeDataPrefix && dataStart !== -1) {\n      const data = url.slice(dataStart + 1);\n      // Include first 10 chars of data to help identify content (e.g., magic bytes)\n      dataPrefix = data.length > 10 ? `${data.slice(0, 10)}... [truncated]` : data;\n    }\n\n    return `data:${mimeType}${isBase64 ? ',base64' : ''}${dataPrefix ? `,${dataPrefix}` : ''}`;\n  }\n  return url;\n}\n","import { GLOBAL_OBJ } from './worldwide';\n\ndeclare const EdgeRuntime: string | undefined;\n\ninterface VercelRequestContextGlobal {\n  get?():\n    | {\n        waitUntil?: (task: Promise<unknown>) => void;\n      }\n    | undefined;\n}\n\n/**\n * Function that delays closing of a Vercel lambda until the provided promise is resolved.\n *\n * Vendored from https://www.npmjs.com/package/@vercel/functions\n */\nexport function vercelWaitUntil(task: Promise<unknown>): void {\n  // We only flush manually in Vercel Edge runtime\n  // In Node runtime, we use process.on('SIGTERM') instead\n  if (typeof EdgeRuntime !== 'string') {\n    return;\n  }\n  const vercelRequestContextGlobal: VercelRequestContextGlobal | undefined =\n    // @ts-expect-error This is not typed\n    GLOBAL_OBJ[Symbol.for('@vercel/request-context')];\n\n  const ctx = vercelRequestContextGlobal?.get?.();\n\n  if (ctx?.waitUntil) {\n    ctx.waitUntil(task);\n  }\n}\n","// This is a magic string replaced by rollup\ndeclare const __SENTRY_SDK_VERSION__: string;\n\nexport const SDK_VERSION = typeof __SENTRY_SDK_VERSION__ === 'string' ? __SENTRY_SDK_VERSION__ : '0.0.0-unknown.0';\n","import { GLOBAL_OBJ } from './worldwide';\n\n/**\n * Interface representing a weak reference to an object.\n * This matches the standard WeakRef interface but is defined here\n * because WeakRef is not available in ES2020 type definitions.\n */\ninterface WeakRefLike<T extends object> {\n  deref(): T | undefined;\n}\n\n/**\n * A wrapper type that represents either a WeakRef-like object or a direct reference.\n * Used for optional weak referencing in environments where WeakRef may not be available.\n */\nexport type MaybeWeakRef<T extends object> = WeakRefLike<T> | T;\n\n/**\n * Creates a weak reference to an object if WeakRef is available,\n * otherwise returns the object directly.\n *\n * This is useful for breaking circular references while maintaining\n * compatibility with environments that don't support WeakRef (e.g., older browsers).\n *\n * @param value - The object to create a weak reference to\n * @returns A WeakRef wrapper if available, or the original object as fallback\n */\nexport function makeWeakRef<T extends object>(value: T): MaybeWeakRef<T> {\n  try {\n    // @ts-expect-error - WeakRef may not be in the type definitions for older TS targets\n    const WeakRefImpl = GLOBAL_OBJ.WeakRef;\n    if (typeof WeakRefImpl === 'function') {\n      return new WeakRefImpl(value);\n    }\n  } catch {\n    // WeakRef not available or construction failed\n  }\n  return value;\n}\n\n/**\n * Resolves a potentially weak reference, returning the underlying object\n * or undefined if the reference has been garbage collected.\n *\n * @param ref - A MaybeWeakRef or undefined\n * @returns The referenced object, or undefined if GC'd or ref was undefined\n */\nexport function derefWeakRef<T extends object>(ref: MaybeWeakRef<T> | undefined): T | undefined {\n  if (!ref) {\n    return undefined;\n  }\n\n  // Check if this is a WeakRef (has deref method)\n  if (typeof ref === 'object' && 'deref' in ref && typeof ref.deref === 'function') {\n    try {\n      return ref.deref();\n    } catch {\n      // deref() failed - treat as GC'd\n      return undefined;\n    }\n  }\n\n  // Direct reference fallback\n  return ref as T;\n}\n","/**\n * NOTE: In order to avoid circular dependencies, if you add a function to this module and it needs to print something,\n * you must either a) use `console.log` rather than the `debug` singleton, or b) put your function elsewhere.\n *\n * Note: This file was originally called `global.ts`, but was changed to unblock users which might be doing\n * string replaces with bundlers like Vite for `global` (would break imports that rely on importing from utils/src/global).\n *\n * Why worldwide?\n *\n * Why not?\n */\n\n/* eslint-disable @typescript-eslint/no-explicit-any */\n\nimport type { Integration } from '../types/integration';\nimport type { Carrier } from '../carrier';\nimport type { SdkSource } from './env';\n\n/** Internal global with common properties and Sentry extensions  */\nexport type InternalGlobal = {\n  navigator?: { userAgent?: string; maxTouchPoints?: number };\n  console: Console;\n  PerformanceObserver?: any;\n  Sentry?: any;\n  onerror?: {\n    (event: object | string, source?: string, lineno?: number, colno?: number, error?: Error): any;\n    __SENTRY_INSTRUMENTED__?: true;\n  };\n  onunhandledrejection?: {\n    (event: unknown): boolean;\n    __SENTRY_INSTRUMENTED__?: true;\n  };\n  SENTRY_ENVIRONMENT?: string;\n  SENTRY_DSN?: string;\n  SENTRY_RELEASE?: {\n    id?: string;\n  };\n  SENTRY_SDK_SOURCE?: SdkSource;\n  /**\n   * Debug IDs are indirectly injected by Sentry CLI or bundler plugins to directly reference a particular source map\n   * for resolving of a source file. The injected code will place an entry into the record for each loaded bundle/JS\n   * file.\n   */\n  _sentryDebugIds?: Record<string, string>;\n  /**\n   * Native debug IDs implementation (e.g., from Vercel).\n   * This uses the same format as _sentryDebugIds but with a different global name.\n   * Keys are `error.stack` strings, values are debug IDs.\n   */\n  _debugIds?: Record<string, string>;\n  /**\n   * Raw module metadata that is injected by bundler plugins.\n   *\n   * Keys are `error.stack` strings, values are the metadata.\n   */\n  _sentryModuleMetadata?: Record<string, any>;\n  _sentryEsmLoaderHookRegistered?: boolean;\n  _sentryWrappedDepth?: number;\n  /**\n   * Orchestrion bundler and runtime detection.\n   */\n  __SENTRY_ORCHESTRION__?: {\n    /** Empty array signifies runtime hooked */\n    runtime?: string[];\n    /** Empty array signifies bundler plugin ran */\n    bundler?: string[];\n    /**\n     * Channel-subscriber integration factories a bundler plugin's\n     * subscribe-injection stored here, keyed by export name (one per instrumented\n     * package actually bundled; the key dedupes packages split across several\n     * files). A bundler-only SDK (e.g. `@sentry/cloudflare`) reads these at\n     * `init()` and instantiates them.\n     */\n    integrations?: Map<string, () => Integration>;\n  };\n} & Carrier;\n\n/** Get's the global object for the current JavaScript runtime */\nexport const GLOBAL_OBJ = globalThis as unknown as InternalGlobal;\n","// Based on https://github.com/sindresorhus/escape-string-regexp but with modifications to:\n//   a) reduce the size by skipping the runtime type - checking\n//   b) ensure it gets down - compiled for old versions of Node(the published package only supports Node 14+).\n//\n// Copyright (c) Sindre Sorhus <sindresorhus@gmail.com> (https://sindresorhus.com)\n// SPDX-License-Identifier: MIT\n\n/**\n * Given a string, escape characters which have meaning in the regex grammar, such that the result is safe to feed to\n * `new RegExp()`.\n *\n * @param regexString The string to escape\n * @returns An version of the string with all special regex characters escaped\n */\nexport function escapeStringForRegex(regexString: string): string {\n  // escape the hyphen separately so we can also replace it with a unicode literal hyphen, to avoid the problems\n  // discussed in https://github.com/sindresorhus/escape-string-regexp/issues/20.\n  return regexString.replace(/[|\\\\{}()[\\]^$+*?.]/g, '\\\\$&').replace(/-/g, '\\\\x2d');\n}\n","// Vendored / modified from @sergiodxa/remix-utils\n\n// https://github.com/sergiodxa/remix-utils/blob/02af80e12829a53696bfa8f3c2363975cf59f55e/src/server/get-client-ip-address.ts\n// Copyright (c) 2021 Sergio Xalambrí\n// SPDX-License-Identifier: MIT\n\n// The headers to check, in priority order\nexport const ipHeaderNames = [\n  'X-Client-IP',\n  'X-Forwarded-For',\n  'Fly-Client-IP',\n  'CF-Connecting-IP',\n  'Fastly-Client-Ip',\n  'True-Client-Ip',\n  'X-Real-IP',\n  'X-Cluster-Client-IP',\n  'X-Forwarded',\n  'Forwarded-For',\n  'Forwarded',\n  'X-Vercel-Forwarded-For',\n];\n\n/**\n * Get the IP address of the client sending a request.\n *\n * It receives a Request headers object and use it to get the\n * IP address from one of the following headers in order.\n *\n * If the IP address is valid, it will be returned. Otherwise, null will be\n * returned.\n *\n * If the header values contains more than one IP address, the first valid one\n * will be returned.\n */\nexport function getClientIPAddress(headers: { [key: string]: string | string[] | undefined }): string | null {\n  // Build a map of lowercase header names to their values for case-insensitive lookup\n  // This is needed because headers from different sources may have different casings\n  const lowerCaseHeaders: { [key: string]: string | string[] | undefined } = {};\n\n  for (const key of Object.keys(headers)) {\n    lowerCaseHeaders[key.toLowerCase()] = headers[key];\n  }\n\n  // This will end up being Array<string | string[] | undefined | null> because of the various possible values a header\n  // can take\n  const headerValues = ipHeaderNames.map((headerName: string) => {\n    const rawValue = lowerCaseHeaders[headerName.toLowerCase()];\n    const value = Array.isArray(rawValue) ? rawValue.join(';') : rawValue;\n\n    if (headerName === 'Forwarded') {\n      return parseForwardedHeader(value);\n    }\n\n    return value?.split(',').map((v: string) => v.trim());\n  });\n\n  // Flatten the array and filter out any falsy entries\n  const flattenedHeaderValues = headerValues.reduce((acc: string[], val) => {\n    if (!val) {\n      return acc;\n    }\n\n    return acc.concat(val);\n  }, []);\n\n  // Find the first value which is a valid IP address, if any\n  const ipAddress = flattenedHeaderValues.find(ip => ip !== null && isIP(ip));\n\n  return ipAddress || null;\n}\n\nfunction parseForwardedHeader(value: string | null | undefined): string | null {\n  if (!value) {\n    return null;\n  }\n\n  for (const part of value.split(';')) {\n    if (part.startsWith('for=')) {\n      return part.slice(4);\n    }\n  }\n\n  return null;\n}\n\n//\n/**\n * Custom method instead of importing this from `net` package, as this only exists in node\n * Accepts:\n * 127.0.0.1\n * 192.168.1.1\n * 192.168.1.255\n * 255.255.255.255\n * 10.1.1.1\n * 0.0.0.0\n * 2b01:cb19:8350:ed00:d0dd:fa5b:de31:8be5\n *\n * Rejects:\n * 1.1.1.01\n * 30.168.1.255.1\n * 127.1\n * 192.168.1.256\n * -1.2.3.4\n * 1.1.1.1.\n * 3...3\n * 192.168.1.099\n */\nfunction isIP(str: string): boolean {\n  const regex =\n    /(?:^(?:25[0-5]|2[0-4]\\d|1\\d\\d|[1-9]\\d|\\d)(?:\\.(?:25[0-5]|2[0-4]\\d|1\\d\\d|[1-9]\\d|\\d)){3}$)|(?:^(?:(?:[a-fA-F\\d]{1,4}:){7}(?:[a-fA-F\\d]{1,4}|:)|(?:[a-fA-F\\d]{1,4}:){6}(?:(?:25[0-5]|2[0-4]\\d|1\\d\\d|[1-9]\\d|\\d)(?:\\\\.(?:25[0-5]|2[0-4]\\d|1\\d\\d|[1-9]\\d|\\d)){3}|:[a-fA-F\\d]{1,4}|:)|(?:[a-fA-F\\d]{1,4}:){5}(?::(?:25[0-5]|2[0-4]\\d|1\\d\\d|[1-9]\\d|\\d)(?:\\\\.(?:25[0-5]|2[0-4]\\d|1\\d\\d|[1-9]\\d|\\d)){3}|(?::[a-fA-F\\d]{1,4}){1,2}|:)|(?:[a-fA-F\\d]{1,4}:){4}(?:(?::[a-fA-F\\d]{1,4}){0,1}:(?:25[0-5]|2[0-4]\\d|1\\d\\d|[1-9]\\d|\\d)(?:\\\\.(?:25[0-5]|2[0-4]\\d|1\\d\\d|[1-9]\\d|\\d)){3}|(?::[a-fA-F\\d]{1,4}){1,3}|:)|(?:[a-fA-F\\d]{1,4}:){3}(?:(?::[a-fA-F\\d]{1,4}){0,2}:(?:25[0-5]|2[0-4]\\d|1\\d\\d|[1-9]\\d|\\d)(?:\\\\.(?:25[0-5]|2[0-4]\\d|1\\d\\d|[1-9]\\d|\\d)){3}|(?::[a-fA-F\\d]{1,4}){1,4}|:)|(?:[a-fA-F\\d]{1,4}:){2}(?:(?::[a-fA-F\\d]{1,4}){0,3}:(?:25[0-5]|2[0-4]\\d|1\\d\\d|[1-9]\\d|\\d)(?:\\\\.(?:25[0-5]|2[0-4]\\d|1\\d\\d|[1-9]\\d|\\d)){3}|(?::[a-fA-F\\d]{1,4}){1,5}|:)|(?:[a-fA-F\\d]{1,4}:){1}(?:(?::[a-fA-F\\d]{1,4}){0,4}:(?:25[0-5]|2[0-4]\\d|1\\d\\d|[1-9]\\d|\\d)(?:\\\\.(?:25[0-5]|2[0-4]\\d|1\\d\\d|[1-9]\\d|\\d)){3}|(?::[a-fA-F\\d]{1,4}){1,6}|:)|(?::(?:(?::[a-fA-F\\d]{1,4}){0,5}:(?:25[0-5]|2[0-4]\\d|1\\d\\d|[1-9]\\d|\\d)(?:\\\\.(?:25[0-5]|2[0-4]\\d|1\\d\\d|[1-9]\\d|\\d)){3}|(?::[a-fA-F\\d]{1,4}){1,7}|:)))(?:%[0-9a-zA-Z]{1,})?$)/;\n  return regex.test(str);\n}\n","import { GLOBAL_OBJ } from '@sentry/core';\n\n// exporting a separate copy of `WINDOW` rather than exporting the one from `@sentry/browser`\n// prevents the browser package from being bundled in the CDN bundle, and avoids a\n// circular dependency between the browser and feedback packages\nexport const WINDOW = GLOBAL_OBJ as typeof GLOBAL_OBJ & Window;\nexport const DOCUMENT = WINDOW.document;\nexport const NAVIGATOR = WINDOW.navigator;\n\nexport const TRIGGER_LABEL = 'Report a Bug';\nexport const CANCEL_BUTTON_LABEL = 'Cancel';\nexport const SUBMIT_BUTTON_LABEL = 'Send Bug Report';\nexport const CONFIRM_BUTTON_LABEL = 'Confirm';\nexport const FORM_TITLE = 'Report a Bug';\nexport const EMAIL_PLACEHOLDER = 'your.email@example.org';\nexport const EMAIL_LABEL = 'Email';\nexport const MESSAGE_PLACEHOLDER = \"What's the bug? What did you expect?\";\nexport const MESSAGE_LABEL = 'Description';\nexport const NAME_PLACEHOLDER = 'Your Name';\nexport const NAME_LABEL = 'Name';\nexport const SUCCESS_MESSAGE_TEXT = 'Thank you for your report!';\nexport const IS_REQUIRED_LABEL = '(required)';\nexport const ADD_SCREENSHOT_LABEL = 'Add a screenshot';\nexport const REMOVE_SCREENSHOT_LABEL = 'Remove screenshot';\nexport const HIGHLIGHT_TOOL_TEXT = 'Highlight';\nexport const HIDE_TOOL_TEXT = 'Hide';\nexport const REMOVE_HIGHLIGHT_TEXT = 'Remove';\n\nexport const ERROR_EMPTY_MESSAGE_TEXT = 'Unable to submit feedback with empty message';\nexport const ERROR_NO_CLIENT_TEXT = 'No client setup, cannot send feedback.';\nexport const ERROR_TIMEOUT_TEXT = 'Unable to determine if Feedback was correctly sent.';\nexport const ERROR_FORBIDDEN_TEXT =\n  'Unable to send feedback. This could be because this domain is not in your list of allowed domains.';\nexport const ERROR_GENERIC_TEXT =\n  'Unable to send feedback. This could be because of network issues, or because you are using an ad-blocker.';\n\nexport const FEEDBACK_WIDGET_SOURCE = 'widget';\nexport const FEEDBACK_API_SOURCE = 'api';\n\nexport const SUCCESS_MESSAGE_TIMEOUT = 5000;\n","import type { FeedbackErrorCode, FeedbackErrorMessages } from '@sentry/core';\nimport {\n  ERROR_EMPTY_MESSAGE_TEXT,\n  ERROR_FORBIDDEN_TEXT,\n  ERROR_GENERIC_TEXT,\n  ERROR_NO_CLIENT_TEXT,\n  ERROR_TIMEOUT_TEXT,\n} from '../constants';\n\nconst DEFAULT_MESSAGES: Record<FeedbackErrorCode, string> = {\n  ERROR_EMPTY_MESSAGE: ERROR_EMPTY_MESSAGE_TEXT,\n  ERROR_NO_CLIENT: ERROR_NO_CLIENT_TEXT,\n  ERROR_TIMEOUT: ERROR_TIMEOUT_TEXT,\n  ERROR_FORBIDDEN: ERROR_FORBIDDEN_TEXT,\n  ERROR_GENERIC: ERROR_GENERIC_TEXT,\n};\n\nexport function resolveFeedbackErrorMessage(code: FeedbackErrorCode, messages?: FeedbackErrorMessages): string {\n  return messages?.[code] ?? DEFAULT_MESSAGES[code];\n}\n\nexport function createFeedbackError(code: FeedbackErrorCode, messages?: FeedbackErrorMessages): Error {\n  return new Error(resolveFeedbackErrorMessage(code, messages));\n}\n","import type {\n  Event,\n  EventHint,\n  FeedbackErrorMessages,\n  SendFeedback,\n  SendFeedbackParams,\n  TransportMakeRequestResponse,\n} from '@sentry/core';\nimport { captureFeedback, getClient, getCurrentScope, getLocationHref } from '@sentry/core';\nimport { FEEDBACK_API_SOURCE } from '../constants';\nimport { createFeedbackError, resolveFeedbackErrorMessage } from '../util/createFeedbackError';\n\n/**\n * Public API to send a Feedback item to Sentry\n */\nexport const sendFeedback: SendFeedback = (\n  params: SendFeedbackParams,\n  hint: EventHint & { includeReplay?: boolean; errorMessages?: FeedbackErrorMessages } = { includeReplay: true },\n): Promise<string> => {\n  const errorMessages = hint.errorMessages;\n\n  if (!params.message) {\n    throw createFeedbackError('ERROR_EMPTY_MESSAGE', errorMessages);\n  }\n\n  // We want to wait for the feedback to be sent (or not)\n  const client = getClient();\n\n  if (!client) {\n    throw createFeedbackError('ERROR_NO_CLIENT', errorMessages);\n  }\n\n  if (params.tags && Object.keys(params.tags).length) {\n    getCurrentScope().setTags(params.tags);\n  }\n  const eventId = captureFeedback(\n    {\n      source: FEEDBACK_API_SOURCE,\n      url: getLocationHref(),\n      ...params,\n    },\n    hint,\n  );\n\n  // We want to wait for the feedback to be sent (or not)\n  return new Promise<string>((resolve, reject) => {\n    // After 30s, we want to clear anyhow\n    const timeout = setTimeout(() => {\n      cleanup();\n      reject(resolveFeedbackErrorMessage('ERROR_TIMEOUT', errorMessages));\n    }, 30_000);\n\n    const cleanup = client.on('afterSendEvent', (event: Event, response: TransportMakeRequestResponse) => {\n      if (event.event_id !== eventId) {\n        return;\n      }\n\n      clearTimeout(timeout);\n      cleanup();\n\n      // Require valid status codes, otherwise can assume feedback was not sent successfully\n      if (response?.statusCode && response.statusCode >= 200 && response.statusCode < 300) {\n        return resolve(eventId);\n      }\n\n      if (response?.statusCode === 403) {\n        return reject(resolveFeedbackErrorMessage('ERROR_FORBIDDEN', errorMessages));\n      }\n\n      return reject(resolveFeedbackErrorMessage('ERROR_GENERIC', errorMessages));\n    });\n  });\n};\n\n/*\n * For reference, the fully built event looks something like this:\n * {\n *     \"type\": \"feedback\",\n *     \"event_id\": \"d2132d31b39445f1938d7e21b6bf0ec4\",\n *     \"timestamp\": 1597977777.6189718,\n *     \"dist\": \"1.12\",\n *     \"platform\": \"javascript\",\n *     \"environment\": \"production\",\n *     \"release\": 42,\n *     \"tags\": {\"transaction\": \"/organizations/:orgId/performance/:eventSlug/\"},\n *     \"sdk\": {\"name\": \"name\", \"version\": \"version\"},\n *     \"user\": {\n *         \"id\": \"123\",\n *         \"username\": \"user\",\n *         \"email\": \"user@site.com\",\n *         \"ip_address\": \"192.168.11.12\",\n *     },\n *     \"request\": {\n *         \"url\": None,\n *         \"headers\": {\n *             \"user-Agent\": \"Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/605.1.15 (KHTML, like Gecko) Version/15.5 Safari/605.1.15\"\n *         },\n *     },\n *     \"contexts\": {\n *         \"feedback\": {\n *             \"message\": \"test message\",\n *             \"contact_email\": \"test@example.com\",\n *             \"type\": \"feedback\",\n *         },\n *         \"trace\": {\n *             \"trace_id\": \"4C79F60C11214EB38604F4AE0781BFB2\",\n *             \"span_id\": \"FA90FDEAD5F74052\",\n *             \"type\": \"trace\",\n *         },\n *         \"replay\": {\n *             \"replay_id\": \"e2d42047b1c5431c8cba85ee2a8ab25d\",\n *         },\n *     },\n *   }\n */\n","declare const __DEBUG_BUILD__: boolean;\n\n/**\n * This serves as a build time flag that will be true by default, but false in non-debug builds or if users replace `__SENTRY_DEBUG__` in their generated code.\n *\n * ATTENTION: This constant must never cross package boundaries (i.e. be exported) to guarantee that it can be used for tree shaking.\n */\nexport const DEBUG_BUILD = __DEBUG_BUILD__;\n","import type { FeedbackFormData, FeedbackInternalOptions } from '@sentry/core';\nimport type { OptionalFeedbackConfiguration } from '../core/types';\n\n/**\n * Quick and dirty deep merge for the Feedback integration options\n */\nexport function mergeOptions(\n  defaultOptions: FeedbackInternalOptions,\n  optionOverrides: OptionalFeedbackConfiguration,\n): FeedbackInternalOptions {\n  return {\n    ...defaultOptions,\n    ...optionOverrides,\n    tags: {\n      ...defaultOptions.tags,\n      ...optionOverrides.tags,\n    },\n    onFormOpen: () => {\n      optionOverrides.onFormOpen?.();\n      defaultOptions.onFormOpen?.();\n    },\n    onFormClose: () => {\n      optionOverrides.onFormClose?.();\n      defaultOptions.onFormClose?.();\n    },\n    onSubmitSuccess: (data: FeedbackFormData, eventId: string) => {\n      optionOverrides.onSubmitSuccess?.(data, eventId);\n      defaultOptions.onSubmitSuccess?.(data, eventId);\n    },\n    onSubmitError: (error: Error) => {\n      optionOverrides.onSubmitError?.(error);\n      defaultOptions.onSubmitError?.(error);\n    },\n    onFormSubmitted: () => {\n      optionOverrides.onFormSubmitted?.();\n      defaultOptions.onFormSubmitted?.();\n    },\n    themeDark: {\n      ...defaultOptions.themeDark,\n      ...optionOverrides.themeDark,\n    },\n    themeLight: {\n      ...defaultOptions.themeLight,\n      ...optionOverrides.themeLight,\n    },\n  };\n}\n","/**\n * Helper function to set a dict of attributes on element (w/ specified namespace)\n */\nexport function setAttributesNS<T extends SVGElement>(el: T, attributes: Record<string, string>): T {\n  Object.entries(attributes).forEach(([key, val]) => {\n    el.setAttributeNS(null, key, val);\n  });\n  return el;\n}\n","import type { FeedbackInternalOptions } from '@sentry/core';\nimport { DOCUMENT } from '../constants';\n\nconst PURPLE = 'rgba(88, 74, 192, 1)';\n\ninterface InternalTheme extends NonNullable<FeedbackInternalOptions['themeLight']> {\n  border: string;\n  interactiveFilter: string;\n}\n\nconst DEFAULT_LIGHT: InternalTheme = {\n  foreground: '#2b2233',\n  background: '#ffffff',\n  accentForeground: 'white',\n  accentBackground: PURPLE,\n  successColor: '#268d75',\n  errorColor: '#df3338',\n  border: '1.5px solid rgba(41, 35, 47, 0.13)',\n  boxShadow: '0px 4px 24px 0px rgba(43, 34, 51, 0.12)',\n  outline: '1px auto var(--accent-background)',\n  interactiveFilter: 'brightness(95%)',\n};\nconst DEFAULT_DARK: InternalTheme = {\n  foreground: '#ebe6ef',\n  background: '#29232f',\n  accentForeground: 'white',\n  accentBackground: PURPLE,\n  successColor: '#2da98c',\n  errorColor: '#f55459',\n  border: '1.5px solid rgba(235, 230, 239, 0.15)',\n  boxShadow: '0px 4px 24px 0px rgba(43, 34, 51, 0.12)',\n  outline: '1px auto var(--accent-background)',\n  interactiveFilter: 'brightness(150%)',\n};\n\nfunction getThemedCssVariables(theme: InternalTheme): string {\n  return `\n  --foreground: ${theme.foreground};\n  --background: ${theme.background};\n  --accent-foreground: ${theme.accentForeground};\n  --accent-background: ${theme.accentBackground};\n  --success-color: ${theme.successColor};\n  --error-color: ${theme.errorColor};\n  --border: ${theme.border};\n  --box-shadow: ${theme.boxShadow};\n  --outline: ${theme.outline};\n  --interactive-filter: ${theme.interactiveFilter};\n  `;\n}\n\n/**\n * Creates <style> element for widget actor (button that opens the dialog)\n */\nexport function createMainStyles({\n  colorScheme,\n  themeDark,\n  themeLight,\n  styleNonce,\n}: FeedbackInternalOptions): HTMLStyleElement {\n  const style = DOCUMENT.createElement('style');\n  style.textContent = `\n:host {\n  --font-family: system-ui, 'Helvetica Neue', Arial, sans-serif;\n  --font-size: 14px;\n  --z-index: 100000;\n\n  --page-margin: 16px;\n  --inset: auto 0 0 auto;\n  --actor-inset: var(--inset);\n\n  font-family: var(--font-family);\n  font-size: var(--font-size);\n\n  ${colorScheme !== 'system' ? `color-scheme: only ${colorScheme};` : ''}\n\n  ${getThemedCssVariables(\n    colorScheme === 'dark' ? { ...DEFAULT_DARK, ...themeDark } : { ...DEFAULT_LIGHT, ...themeLight },\n  )}\n}\n\n${\n  colorScheme === 'system'\n    ? `\n@media (prefers-color-scheme: dark) {\n  :host {\n    color-scheme: only dark;\n\n    ${getThemedCssVariables({ ...DEFAULT_DARK, ...themeDark })}\n  }\n}`\n    : ''\n}\n`;\n\n  if (styleNonce) {\n    style.setAttribute('nonce', styleNonce);\n  }\n\n  return style;\n}\n","var n,l,u,t,i,o,r,f,e,c={},s=[],a=/acit|ex(?:s|g|n|p|$)|rph|grid|ows|mnc|ntw|ine[ch]|zoo|^ord|itera/i,h=Array.isArray;function v(n,l){for(var u in l)n[u]=l[u];return n}function p(n){var l=n.parentNode;l&&l.removeChild(n)}function y(l,u,t){var i,o,r,f={};for(r in u)\"key\"==r?i=u[r]:\"ref\"==r?o=u[r]:f[r]=u[r];if(arguments.length>2&&(f.children=arguments.length>3?n.call(arguments,2):t),\"function\"==typeof l&&null!=l.defaultProps)for(r in l.defaultProps)void 0===f[r]&&(f[r]=l.defaultProps[r]);return d(l,f,i,o,null)}function d(n,t,i,o,r){var f={type:n,props:t,key:i,ref:o,__k:null,__:null,__b:0,__e:null,__d:void 0,__c:null,constructor:void 0,__v:null==r?++u:r,__i:-1,__u:0};return null==r&&null!=l.vnode&&l.vnode(f),f}function _(){return{current:null}}function g(n){return n.children}function b(n,l){this.props=n,this.context=l}function m(n,l){if(null==l)return n.__?m(n.__,n.__i+1):null;for(var u;l<n.__k.length;l++)if(null!=(u=n.__k[l])&&null!=u.__e)return u.__e;return\"function\"==typeof n.type?m(n):null}function w(n,u,t){var i,o=n.__v,r=o.__e,f=n.__P;if(f)return(i=v({},o)).__v=o.__v+1,l.vnode&&l.vnode(i),M(f,i,o,n.__n,void 0!==f.ownerSVGElement,32&o.__u?[r]:null,u,null==r?m(o):r,!!(32&o.__u),t),i.__.__k[i.__i]=i,i.__d=void 0,i.__e!=r&&k(i),i}function k(n){var l,u;if(null!=(n=n.__)&&null!=n.__c){for(n.__e=n.__c.base=null,l=0;l<n.__k.length;l++)if(null!=(u=n.__k[l])&&null!=u.__e){n.__e=n.__c.base=u.__e;break}return k(n)}}function x(n){(!n.__d&&(n.__d=!0)&&i.push(n)&&!C.__r++||o!==l.debounceRendering)&&((o=l.debounceRendering)||r)(C)}function C(){var n,u,t,o=[],r=[];for(i.sort(f);n=i.shift();)n.__d&&(t=i.length,u=w(n,o,r)||u,0===t||i.length>t?(j(o,u,r),r.length=o.length=0,u=void 0,i.sort(f)):u&&l.__c&&l.__c(u,s));u&&j(o,u,r),C.__r=0}function P(n,l,u,t,i,o,r,f,e,a,h){var v,p,y,d,_,g=t&&t.__k||s,b=l.length;for(u.__d=e,S(u,l,g),e=u.__d,v=0;v<b;v++)null!=(y=u.__k[v])&&\"boolean\"!=typeof y&&\"function\"!=typeof y&&(p=-1===y.__i?c:g[y.__i]||c,y.__i=v,M(n,y,p,i,o,r,f,e,a,h),d=y.__e,y.ref&&p.ref!=y.ref&&(p.ref&&N(p.ref,null,y),h.push(y.ref,y.__c||d,y)),null==_&&null!=d&&(_=d),65536&y.__u||p.__k===y.__k?e=$(y,e,n):\"function\"==typeof y.type&&void 0!==y.__d?e=y.__d:d&&(e=d.nextSibling),y.__d=void 0,y.__u&=-196609);u.__d=e,u.__e=_}function S(n,l,u){var t,i,o,r,f,e=l.length,c=u.length,s=c,a=0;for(n.__k=[],t=0;t<e;t++)null!=(i=n.__k[t]=null==(i=l[t])||\"boolean\"==typeof i||\"function\"==typeof i?null:\"string\"==typeof i||\"number\"==typeof i||\"bigint\"==typeof i||i.constructor==String?d(null,i,null,null,i):h(i)?d(g,{children:i},null,null,null):void 0===i.constructor&&i.__b>0?d(i.type,i.props,i.key,i.ref?i.ref:null,i.__v):i)?(i.__=n,i.__b=n.__b+1,f=I(i,u,r=t+a,s),i.__i=f,o=null,-1!==f&&(s--,(o=u[f])&&(o.__u|=131072)),null==o||null===o.__v?(-1==f&&a--,\"function\"!=typeof i.type&&(i.__u|=65536)):f!==r&&(f===r+1?a++:f>r?s>e-r?a+=f-r:a--:a=f<r&&f==r-1?f-r:0,f!==t+a&&(i.__u|=65536))):(o=u[t])&&null==o.key&&o.__e&&(o.__e==n.__d&&(n.__d=m(o)),O(o,o,!1),u[t]=null,s--);if(s)for(t=0;t<c;t++)null!=(o=u[t])&&0==(131072&o.__u)&&(o.__e==n.__d&&(n.__d=m(o)),O(o,o))}function $(n,l,u){var t,i;if(\"function\"==typeof n.type){for(t=n.__k,i=0;t&&i<t.length;i++)t[i]&&(t[i].__=n,l=$(t[i],l,u));return l}n.__e!=l&&(u.insertBefore(n.__e,l||null),l=n.__e);do{l=l&&l.nextSibling}while(null!=l&&8===l.nodeType);return l}function H(n,l){return l=l||[],null==n||\"boolean\"==typeof n||(h(n)?n.some(function(n){H(n,l)}):l.push(n)),l}function I(n,l,u,t){var i=n.key,o=n.type,r=u-1,f=u+1,e=l[u];if(null===e||e&&i==e.key&&o===e.type)return u;if(t>(null!=e&&0==(131072&e.__u)?1:0))for(;r>=0||f<l.length;){if(r>=0){if((e=l[r])&&0==(131072&e.__u)&&i==e.key&&o===e.type)return r;r--}if(f<l.length){if((e=l[f])&&0==(131072&e.__u)&&i==e.key&&o===e.type)return f;f++}}return-1}function T(n,l,u){\"-\"===l[0]?n.setProperty(l,null==u?\"\":u):n[l]=null==u?\"\":\"number\"!=typeof u||a.test(l)?u:u+\"px\"}function A(n,l,u,t,i){var o;n:if(\"style\"===l)if(\"string\"==typeof u)n.style.cssText=u;else{if(\"string\"==typeof t&&(n.style.cssText=t=\"\"),t)for(l in t)u&&l in u||T(n.style,l,\"\");if(u)for(l in u)t&&u[l]===t[l]||T(n.style,l,u[l])}else if(\"o\"===l[0]&&\"n\"===l[1])o=l!==(l=l.replace(/(PointerCapture)$|Capture$/i,\"$1\")),l=l.toLowerCase()in n?l.toLowerCase().slice(2):l.slice(2),n.l||(n.l={}),n.l[l+o]=u,u?t?u.u=t.u:(u.u=Date.now(),n.addEventListener(l,o?L:D,o)):n.removeEventListener(l,o?L:D,o);else{if(i)l=l.replace(/xlink(H|:h)/,\"h\").replace(/sName$/,\"s\");else if(\"width\"!==l&&\"height\"!==l&&\"href\"!==l&&\"list\"!==l&&\"form\"!==l&&\"tabIndex\"!==l&&\"download\"!==l&&\"rowSpan\"!==l&&\"colSpan\"!==l&&\"role\"!==l&&l in n)try{n[l]=null==u?\"\":u;break n}catch(n){}\"function\"==typeof u||(null==u||!1===u&&\"-\"!==l[4]?n.removeAttribute(l):n.setAttribute(l,u))}}function D(n){if(this.l){var u=this.l[n.type+!1];if(n.t){if(n.t<=u.u)return}else n.t=Date.now();return u(l.event?l.event(n):n)}}function L(n){if(this.l)return this.l[n.type+!0](l.event?l.event(n):n)}function M(n,u,t,i,o,r,f,e,c,s){var a,p,y,d,_,m,w,k,x,C,S,$,H,I,T,A=u.type;if(void 0!==u.constructor)return null;128&t.__u&&(c=!!(32&t.__u),r=[e=u.__e=t.__e]),(a=l.__b)&&a(u);n:if(\"function\"==typeof A)try{if(k=u.props,x=(a=A.contextType)&&i[a.__c],C=a?x?x.props.value:a.__:i,t.__c?w=(p=u.__c=t.__c).__=p.__E:(\"prototype\"in A&&A.prototype.render?u.__c=p=new A(k,C):(u.__c=p=new b(k,C),p.constructor=A,p.render=q),x&&x.sub(p),p.props=k,p.state||(p.state={}),p.context=C,p.__n=i,y=p.__d=!0,p.__h=[],p._sb=[]),null==p.__s&&(p.__s=p.state),null!=A.getDerivedStateFromProps&&(p.__s==p.state&&(p.__s=v({},p.__s)),v(p.__s,A.getDerivedStateFromProps(k,p.__s))),d=p.props,_=p.state,p.__v=u,y)null==A.getDerivedStateFromProps&&null!=p.componentWillMount&&p.componentWillMount(),null!=p.componentDidMount&&p.__h.push(p.componentDidMount);else{if(null==A.getDerivedStateFromProps&&k!==d&&null!=p.componentWillReceiveProps&&p.componentWillReceiveProps(k,C),!p.__e&&(null!=p.shouldComponentUpdate&&!1===p.shouldComponentUpdate(k,p.__s,C)||u.__v===t.__v)){for(u.__v!==t.__v&&(p.props=k,p.state=p.__s,p.__d=!1),u.__e=t.__e,u.__k=t.__k,u.__k.forEach(function(n){n&&(n.__=u)}),S=0;S<p._sb.length;S++)p.__h.push(p._sb[S]);p._sb=[],p.__h.length&&f.push(p);break n}null!=p.componentWillUpdate&&p.componentWillUpdate(k,p.__s,C),null!=p.componentDidUpdate&&p.__h.push(function(){p.componentDidUpdate(d,_,m)})}if(p.context=C,p.props=k,p.__P=n,p.__e=!1,$=l.__r,H=0,\"prototype\"in A&&A.prototype.render){for(p.state=p.__s,p.__d=!1,$&&$(u),a=p.render(p.props,p.state,p.context),I=0;I<p._sb.length;I++)p.__h.push(p._sb[I]);p._sb=[]}else do{p.__d=!1,$&&$(u),a=p.render(p.props,p.state,p.context),p.state=p.__s}while(p.__d&&++H<25);p.state=p.__s,null!=p.getChildContext&&(i=v(v({},i),p.getChildContext())),y||null==p.getSnapshotBeforeUpdate||(m=p.getSnapshotBeforeUpdate(d,_)),P(n,h(T=null!=a&&a.type===g&&null==a.key?a.props.children:a)?T:[T],u,t,i,o,r,f,e,c,s),p.base=u.__e,u.__u&=-161,p.__h.length&&f.push(p),w&&(p.__E=p.__=null)}catch(n){u.__v=null,c||null!=r?(u.__e=e,u.__u|=c?160:32,r[r.indexOf(e)]=null):(u.__e=t.__e,u.__k=t.__k),l.__e(n,u,t)}else null==r&&u.__v===t.__v?(u.__k=t.__k,u.__e=t.__e):u.__e=z(t.__e,u,t,i,o,r,f,c,s);(a=l.diffed)&&a(u)}function j(n,u,t){for(var i=0;i<t.length;i++)N(t[i],t[++i],t[++i]);l.__c&&l.__c(u,n),n.some(function(u){try{n=u.__h,u.__h=[],n.some(function(n){n.call(u)})}catch(n){l.__e(n,u.__v)}})}function z(l,u,t,i,o,r,f,e,s){var a,v,y,d,_,g,b,w=t.props,k=u.props,x=u.type;if(\"svg\"===x&&(o=!0),null!=r)for(a=0;a<r.length;a++)if((_=r[a])&&\"setAttribute\"in _==!!x&&(x?_.localName===x:3===_.nodeType)){l=_,r[a]=null;break}if(null==l){if(null===x)return document.createTextNode(k);l=o?document.createElementNS(\"http://www.w3.org/2000/svg\",x):document.createElement(x,k.is&&k),r=null,e=!1}if(null===x)w===k||e&&l.data===k||(l.data=k);else{if(r=r&&n.call(l.childNodes),w=t.props||c,!e&&null!=r)for(w={},a=0;a<l.attributes.length;a++)w[(_=l.attributes[a]).name]=_.value;for(a in w)_=w[a],\"children\"==a||(\"dangerouslySetInnerHTML\"==a?y=_:\"key\"===a||a in k||A(l,a,null,_,o));for(a in k)_=k[a],\"children\"==a?d=_:\"dangerouslySetInnerHTML\"==a?v=_:\"value\"==a?g=_:\"checked\"==a?b=_:\"key\"===a||e&&\"function\"!=typeof _||w[a]===_||A(l,a,_,w[a],o);if(v)e||y&&(v.__html===y.__html||v.__html===l.innerHTML)||(l.innerHTML=v.__html),u.__k=[];else if(y&&(l.innerHTML=\"\"),P(l,h(d)?d:[d],u,t,i,o&&\"foreignObject\"!==x,r,f,r?r[0]:t.__k&&m(t,0),e,s),null!=r)for(a=r.length;a--;)null!=r[a]&&p(r[a]);e||(a=\"value\",void 0!==g&&(g!==l[a]||\"progress\"===x&&!g||\"option\"===x&&g!==w[a])&&A(l,a,g,w[a],!1),a=\"checked\",void 0!==b&&b!==l[a]&&A(l,a,b,w[a],!1))}return l}function N(n,u,t){try{\"function\"==typeof n?n(u):n.current=u}catch(n){l.__e(n,t)}}function O(n,u,t){var i,o;if(l.unmount&&l.unmount(n),(i=n.ref)&&(i.current&&i.current!==n.__e||N(i,null,u)),null!=(i=n.__c)){if(i.componentWillUnmount)try{i.componentWillUnmount()}catch(n){l.__e(n,u)}i.base=i.__P=null,n.__c=void 0}if(i=n.__k)for(o=0;o<i.length;o++)i[o]&&O(i[o],u,t||\"function\"!=typeof n.type);t||null==n.__e||p(n.__e),n.__=n.__e=n.__d=void 0}function q(n,l,u){return this.constructor(n,u)}function B(u,t,i){var o,r,f,e;l.__&&l.__(u,t),r=(o=\"function\"==typeof i)?null:i&&i.__k||t.__k,f=[],e=[],M(t,u=(!o&&i||t).__k=y(g,null,[u]),r||c,c,void 0!==t.ownerSVGElement,!o&&i?[i]:r?null:t.firstChild?n.call(t.childNodes):null,f,!o&&i?i:r?r.__e:t.firstChild,o,e),u.__d=void 0,j(f,u,e)}function E(n,l){B(n,l,E)}function F(l,u,t){var i,o,r,f,e=v({},l.props);for(r in l.type&&l.type.defaultProps&&(f=l.type.defaultProps),u)\"key\"==r?i=u[r]:\"ref\"==r?o=u[r]:e[r]=void 0===u[r]&&void 0!==f?f[r]:u[r];return arguments.length>2&&(e.children=arguments.length>3?n.call(arguments,2):t),d(l.type,e,i||l.key,o||l.ref,null)}function G(n,l){var u={__c:l=\"__cC\"+e++,__:n,Consumer:function(n,l){return n.children(l)},Provider:function(n){var u,t;return this.getChildContext||(u=[],(t={})[l]=this,this.getChildContext=function(){return t},this.shouldComponentUpdate=function(n){this.props.value!==n.value&&u.some(function(n){n.__e=!0,x(n)})},this.sub=function(n){u.push(n);var l=n.componentWillUnmount;n.componentWillUnmount=function(){u.splice(u.indexOf(n),1),l&&l.call(n)}}),n.children}};return u.Provider.__=u.Consumer.contextType=u}n=s.slice,l={__e:function(n,l,u,t){for(var i,o,r;l=l.__;)if((i=l.__c)&&!i.__)try{if((o=i.constructor)&&null!=o.getDerivedStateFromError&&(i.setState(o.getDerivedStateFromError(n)),r=i.__d),null!=i.componentDidCatch&&(i.componentDidCatch(n,t||{}),r=i.__d),r)return i.__E=i}catch(l){n=l}throw n}},u=0,t=function(n){return null!=n&&null==n.constructor},b.prototype.setState=function(n,l){var u;u=null!=this.__s&&this.__s!==this.state?this.__s:this.__s=v({},this.state),\"function\"==typeof n&&(n=n(v({},u),this.props)),n&&v(u,n),null!=n&&this.__v&&(l&&this._sb.push(l),x(this))},b.prototype.forceUpdate=function(n){this.__v&&(this.__e=!0,n&&this.__h.push(n),x(this))},b.prototype.render=g,i=[],r=\"function\"==typeof Promise?Promise.prototype.then.bind(Promise.resolve()):setTimeout,f=function(n,l){return n.__v.__b-l.__v.__b},C.__r=0,e=0;export{b as Component,g as Fragment,F as cloneElement,G as createContext,y as createElement,_ as createRef,y as h,E as hydrate,t as isValidElement,l as options,B as render,H as toChildArray};\n//# sourceMappingURL=preact.module.js.map\n","import{options as n}from\"preact\";var t,r,u,i,o=0,f=[],c=[],e=n,a=e.__b,v=e.__r,l=e.diffed,m=e.__c,s=e.unmount,d=e.__;function h(n,t){e.__h&&e.__h(r,n,o||t),o=0;var u=r.__H||(r.__H={__:[],__h:[]});return n>=u.__.length&&u.__.push({__V:c}),u.__[n]}function p(n){return o=1,y(D,n)}function y(n,u,i){var o=h(t++,2);if(o.t=n,!o.__c&&(o.__=[i?i(u):D(void 0,u),function(n){var t=o.__N?o.__N[0]:o.__[0],r=o.t(t,n);t!==r&&(o.__N=[r,o.__[1]],o.__c.setState({}))}],o.__c=r,!r.u)){var f=function(n,t,r){if(!o.__c.__H)return!0;var u=o.__c.__H.__.filter(function(n){return!!n.__c});if(u.every(function(n){return!n.__N}))return!c||c.call(this,n,t,r);var i=!1;return u.forEach(function(n){if(n.__N){var t=n.__[0];n.__=n.__N,n.__N=void 0,t!==n.__[0]&&(i=!0)}}),!(!i&&o.__c.props===n)&&(!c||c.call(this,n,t,r))};r.u=!0;var c=r.shouldComponentUpdate,e=r.componentWillUpdate;r.componentWillUpdate=function(n,t,r){if(this.__e){var u=c;c=void 0,f(n,t,r),c=u}e&&e.call(this,n,t,r)},r.shouldComponentUpdate=f}return o.__N||o.__}function _(n,u){var i=h(t++,3);!e.__s&&C(i.__H,u)&&(i.__=n,i.i=u,r.__H.__h.push(i))}function A(n,u){var i=h(t++,4);!e.__s&&C(i.__H,u)&&(i.__=n,i.i=u,r.__h.push(i))}function F(n){return o=5,q(function(){return{current:n}},[])}function T(n,t,r){o=6,A(function(){return\"function\"==typeof n?(n(t()),function(){return n(null)}):n?(n.current=t(),function(){return n.current=null}):void 0},null==r?r:r.concat(n))}function q(n,r){var u=h(t++,7);return C(u.__H,r)?(u.__V=n(),u.i=r,u.__h=n,u.__V):u.__}function x(n,t){return o=8,q(function(){return n},t)}function P(n){var u=r.context[n.__c],i=h(t++,9);return i.c=n,u?(null==i.__&&(i.__=!0,u.sub(r)),u.props.value):n.__}function V(n,t){e.useDebugValue&&e.useDebugValue(t?t(n):n)}function b(n){var u=h(t++,10),i=p();return u.__=n,r.componentDidCatch||(r.componentDidCatch=function(n,t){u.__&&u.__(n,t),i[1](n)}),[i[0],function(){i[1](void 0)}]}function g(){var n=h(t++,11);if(!n.__){for(var u=r.__v;null!==u&&!u.__m&&null!==u.__;)u=u.__;var i=u.__m||(u.__m=[0,0]);n.__=\"P\"+i[0]+\"-\"+i[1]++}return n.__}function j(){for(var n;n=f.shift();)if(n.__P&&n.__H)try{n.__H.__h.forEach(z),n.__H.__h.forEach(B),n.__H.__h=[]}catch(t){n.__H.__h=[],e.__e(t,n.__v)}}e.__b=function(n){r=null,a&&a(n)},e.__=function(n,t){t.__k&&t.__k.__m&&(n.__m=t.__k.__m),d&&d(n,t)},e.__r=function(n){v&&v(n),t=0;var i=(r=n.__c).__H;i&&(u===r?(i.__h=[],r.__h=[],i.__.forEach(function(n){n.__N&&(n.__=n.__N),n.__V=c,n.__N=n.i=void 0})):(i.__h.forEach(z),i.__h.forEach(B),i.__h=[],t=0)),u=r},e.diffed=function(n){l&&l(n);var t=n.__c;t&&t.__H&&(t.__H.__h.length&&(1!==f.push(t)&&i===e.requestAnimationFrame||((i=e.requestAnimationFrame)||w)(j)),t.__H.__.forEach(function(n){n.i&&(n.__H=n.i),n.__V!==c&&(n.__=n.__V),n.i=void 0,n.__V=c})),u=r=null},e.__c=function(n,t){t.some(function(n){try{n.__h.forEach(z),n.__h=n.__h.filter(function(n){return!n.__||B(n)})}catch(r){t.some(function(n){n.__h&&(n.__h=[])}),t=[],e.__e(r,n.__v)}}),m&&m(n,t)},e.unmount=function(n){s&&s(n);var t,r=n.__c;r&&r.__H&&(r.__H.__.forEach(function(n){try{z(n)}catch(n){t=n}}),r.__H=void 0,t&&e.__e(t,r.__v))};var k=\"function\"==typeof requestAnimationFrame;function w(n){var t,r=function(){clearTimeout(u),k&&cancelAnimationFrame(t),setTimeout(n)},u=setTimeout(r,100);k&&(t=requestAnimationFrame(r))}function z(n){var t=r,u=n.__c;\"function\"==typeof u&&(n.__c=void 0,u()),r=t}function B(n){var t=r;n.__c=n.__(),r=t}function C(n,t){return!n||n.length!==t.length||t.some(function(t,r){return t!==n[r]})}function D(n,t){return\"function\"==typeof t?t(n):t}export{x as useCallback,P as useContext,V as useDebugValue,_ as useEffect,b as useErrorBoundary,g as useId,T as useImperativeHandle,A as useLayoutEffect,q as useMemo,y as useReducer,F as useRef,p as useState};\n//# sourceMappingURL=hooks.module.js.map\n","import { DOCUMENT } from '../../constants';\nimport { setAttributesNS } from '../../util/setAttributesNS';\n\nconst XMLNS = 'http://www.w3.org/2000/svg';\n\n/**\n * Sentry Logo\n */\nexport function SentryLogo(): SVGElement {\n  const createElementNS = <K extends keyof SVGElementTagNameMap>(tagName: K): SVGElementTagNameMap[K] =>\n    DOCUMENT.createElementNS(XMLNS, tagName);\n  const svg = setAttributesNS(createElementNS('svg'), {\n    width: '32',\n    height: '30',\n    viewBox: '0 0 72 66',\n    fill: 'inherit',\n  });\n\n  const path = setAttributesNS(createElementNS('path'), {\n    transform: 'translate(11, 11)',\n    d: 'M29,2.26a4.67,4.67,0,0,0-8,0L14.42,13.53A32.21,32.21,0,0,1,32.17,40.19H27.55A27.68,27.68,0,0,0,12.09,17.47L6,28a15.92,15.92,0,0,1,9.23,12.17H4.62A.76.76,0,0,1,4,39.06l2.94-5a10.74,10.74,0,0,0-3.36-1.9l-2.91,5a4.54,4.54,0,0,0,1.69,6.24A4.66,4.66,0,0,0,4.62,44H19.15a19.4,19.4,0,0,0-8-17.31l2.31-4A23.87,23.87,0,0,1,23.76,44H36.07a35.88,35.88,0,0,0-16.41-31.8l4.67-8a.77.77,0,0,1,1.05-.27c.53.29,20.29,34.77,20.66,35.17a.76.76,0,0,1-.68,1.13H40.6q.09,1.91,0,3.81h4.78A4.59,4.59,0,0,0,50,39.43a4.49,4.49,0,0,0-.62-2.28Z',\n  });\n  svg.appendChild(path);\n\n  return svg;\n}\n","import type { FeedbackInternalOptions } from '@sentry/core';\nimport type { VNode } from 'preact';\nimport { h } from 'preact'; // eslint-disable-line @typescript-eslint/no-unused-vars\nimport { useMemo } from 'preact/hooks';\nimport { SentryLogo } from './SentryLogo';\n\nexport interface Props {\n  options: FeedbackInternalOptions;\n}\n\nexport function DialogHeader({ options }: Props): VNode {\n  const logoHtml = useMemo(() => ({ __html: SentryLogo().outerHTML }), []);\n\n  return (\n    <h2 class=\"dialog__header\">\n      <span class=\"dialog__title\">{options.formTitle}</span>\n      {options.showBranding ? (\n        <a\n          class=\"brand-link\"\n          target=\"_blank\"\n          href=\"https://sentry.io/welcome/\"\n          title=\"Powered by Sentry\"\n          rel=\"noopener noreferrer\"\n          dangerouslySetInnerHTML={logoHtml}\n        />\n      ) : null}\n    </h2>\n  );\n}\n","import type {\n  FeedbackFormData,\n  FeedbackInternalOptions,\n  FeedbackScreenshotIntegration,\n  SendFeedback,\n} from '@sentry/core';\nimport { debug } from '@sentry/core';\nimport type { JSX, VNode } from 'preact';\nimport { h } from 'preact'; // eslint-disable-line @typescript-eslint/no-unused-vars\nimport { useCallback, useState } from 'preact/hooks';\nimport { FEEDBACK_WIDGET_SOURCE } from '../../constants';\nimport { DEBUG_BUILD } from '../../util/debug-build';\nimport { getMissingFields } from '../../util/validate';\n\nexport interface Props extends Pick<FeedbackInternalOptions, 'showEmail' | 'showName'> {\n  options: FeedbackInternalOptions;\n  defaultEmail: string;\n  defaultName: string;\n  onFormClose: () => void;\n  onSubmit: SendFeedback;\n  onSubmitSuccess: (data: FeedbackFormData, eventId: string) => void;\n  onSubmitError: (error: Error) => void;\n  screenshotInput: ReturnType<FeedbackScreenshotIntegration['createInput']> | undefined;\n}\n\nfunction retrieveStringValue(formData: FormData, key: string): string {\n  const value = formData.get(key);\n  if (typeof value === 'string') {\n    return value.trim();\n  }\n  return '';\n}\n\nexport function Form({\n  options,\n  defaultEmail,\n  defaultName,\n\n  onFormClose,\n  onSubmit,\n  onSubmitSuccess,\n  onSubmitError,\n  showEmail,\n  showName,\n  screenshotInput,\n}: Props): VNode {\n  const {\n    tags,\n    addScreenshotButtonLabel,\n    removeScreenshotButtonLabel,\n    cancelButtonLabel,\n    emailLabel,\n    emailPlaceholder,\n    isEmailRequired,\n    isNameRequired,\n    messageLabel,\n    messagePlaceholder,\n    nameLabel,\n    namePlaceholder,\n    submitButtonLabel,\n    isRequiredLabel,\n  } = options;\n  const [isSubmitting, setIsSubmitting] = useState<boolean>(false);\n  // TODO: set a ref on the form, and whenever an input changes call processForm() and setError()\n  const [error, setError] = useState<null | string>(null);\n\n  const [showScreenshotInput, setShowScreenshotInput] = useState(false);\n  // eslint-disable-next-line @typescript-eslint/no-explicit-any\n  const ScreenshotInputComponent: any = screenshotInput?.input;\n\n  const [screenshotError, setScreenshotError] = useState<null | Error>(null);\n  const onScreenshotError = useCallback((error: Error) => {\n    setScreenshotError(error);\n    setShowScreenshotInput(false);\n  }, []);\n\n  const hasAllRequiredFields = useCallback(\n    (data: FeedbackFormData) => {\n      const missingFields = getMissingFields(data, {\n        emailLabel,\n        isEmailRequired,\n        isNameRequired,\n        messageLabel,\n        nameLabel,\n      });\n\n      if (missingFields.length > 0) {\n        setError(`Please enter in the following required fields: ${missingFields.join(', ')}`);\n      } else {\n        setError(null);\n      }\n\n      return missingFields.length === 0;\n    },\n    [emailLabel, isEmailRequired, isNameRequired, messageLabel, nameLabel],\n  );\n\n  const handleSubmit = useCallback(\n    async (e: JSX.TargetedSubmitEvent<HTMLFormElement>) => {\n      setIsSubmitting(true);\n      try {\n        e.preventDefault();\n        if (!(e.target instanceof HTMLFormElement)) {\n          return;\n        }\n        const formData = new FormData(e.target);\n        const attachment = await (screenshotInput && showScreenshotInput ? screenshotInput.value() : undefined);\n\n        const data: FeedbackFormData = {\n          name: retrieveStringValue(formData, 'name'),\n          email: retrieveStringValue(formData, 'email'),\n          message: retrieveStringValue(formData, 'message'),\n          attachments: attachment ? [attachment] : undefined,\n        };\n\n        if (!hasAllRequiredFields(data)) {\n          return;\n        }\n\n        try {\n          const eventId = await onSubmit(\n            {\n              name: data.name,\n              email: data.email,\n              message: data.message,\n              source: FEEDBACK_WIDGET_SOURCE,\n              tags,\n            },\n            { attachments: data.attachments },\n          );\n          onSubmitSuccess(data, eventId);\n        } catch (error) {\n          DEBUG_BUILD && debug.error(error);\n          const err = error instanceof Error ? error : new Error(String(error));\n          setError(err.message);\n          onSubmitError(err);\n        }\n      } finally {\n        setIsSubmitting(false);\n      }\n    },\n    [screenshotInput && showScreenshotInput, onSubmitSuccess, onSubmitError],\n  );\n\n  return (\n    <form class=\"form\" onSubmit={handleSubmit}>\n      {ScreenshotInputComponent && showScreenshotInput ? (\n        <ScreenshotInputComponent onError={onScreenshotError} />\n      ) : null}\n\n      <fieldset class=\"form__right\" data-sentry-feedback={true} disabled={isSubmitting}>\n        <div class=\"form__top\">\n          {error ? <div class=\"form__error-container\">{error}</div> : null}\n\n          {showName ? (\n            <label for=\"name\" class=\"form__label\">\n              <LabelText label={nameLabel} isRequiredLabel={isRequiredLabel} isRequired={isNameRequired} />\n              <input\n                class=\"form__input\"\n                defaultValue={defaultName}\n                id=\"name\"\n                name=\"name\"\n                placeholder={namePlaceholder}\n                required={isNameRequired}\n                type=\"text\"\n              />\n            </label>\n          ) : (\n            <input aria-hidden value={defaultName} name=\"name\" type=\"hidden\" />\n          )}\n\n          {showEmail ? (\n            <label for=\"email\" class=\"form__label\">\n              <LabelText label={emailLabel} isRequiredLabel={isRequiredLabel} isRequired={isEmailRequired} />\n              <input\n                class=\"form__input\"\n                defaultValue={defaultEmail}\n                id=\"email\"\n                name=\"email\"\n                placeholder={emailPlaceholder}\n                required={isEmailRequired}\n                type=\"email\"\n              ></input>\n            </label>\n          ) : (\n            <input aria-hidden value={defaultEmail} name=\"email\" type=\"hidden\" />\n          )}\n\n          <label for=\"message\" class=\"form__label\">\n            <LabelText label={messageLabel} isRequiredLabel={isRequiredLabel} isRequired />\n            <textarea\n              autoFocus\n              class=\"form__input form__input--textarea\"\n              id=\"message\"\n              name=\"message\"\n              placeholder={messagePlaceholder}\n              required={true}\n              rows={5}\n            />\n          </label>\n\n          {ScreenshotInputComponent ? (\n            <label for=\"screenshot\" class=\"form__label\">\n              <button\n                class=\"btn btn--default\"\n                disabled={isSubmitting}\n                type=\"button\"\n                onClick={() => {\n                  setScreenshotError(null);\n                  setShowScreenshotInput(prev => !prev);\n                }}\n              >\n                {showScreenshotInput ? removeScreenshotButtonLabel : addScreenshotButtonLabel}\n              </button>\n              {screenshotError ? <div class=\"form__error-container\">{screenshotError.message}</div> : null}\n            </label>\n          ) : null}\n        </div>\n        <div class=\"btn-group\">\n          <button class=\"btn btn--primary\" disabled={isSubmitting} type=\"submit\">\n            {submitButtonLabel}\n          </button>\n          <button class=\"btn btn--default\" disabled={isSubmitting} type=\"button\" onClick={onFormClose}>\n            {cancelButtonLabel}\n          </button>\n        </div>\n      </fieldset>\n    </form>\n  );\n}\n\nfunction LabelText({\n  label,\n  isRequired,\n  isRequiredLabel,\n}: {\n  label: string;\n  isRequired: boolean;\n  isRequiredLabel: string;\n}): VNode {\n  return (\n    <span class=\"form__label__text\">\n      {label}\n      {isRequired && <span class=\"form__label__text--required\">{isRequiredLabel}</span>}\n    </span>\n  );\n}\n","import type { FeedbackFormData, FeedbackInternalOptions } from '@sentry/core';\n\nexport type Props = Pick<\n  FeedbackInternalOptions,\n  'emailLabel' | 'isEmailRequired' | 'isNameRequired' | 'messageLabel' | 'nameLabel'\n>;\n\n/**\n * Validate that a given feedback submission has the required fields\n */\nexport function getMissingFields(feedback: FeedbackFormData, props: Props): string[] {\n  const emptyFields = [];\n  if (props.isNameRequired && !feedback.name) {\n    emptyFields.push(props.nameLabel);\n  }\n  if (props.isEmailRequired && !feedback.email) {\n    emptyFields.push(props.emailLabel);\n  }\n  if (!feedback.message) {\n    emptyFields.push(props.messageLabel);\n  }\n\n  return emptyFields;\n}\n","import { WINDOW } from '../../constants';\nimport { setAttributesNS } from '../../util/setAttributesNS';\n\nconst WIDTH = 16;\nconst HEIGHT = 17;\nconst XMLNS = 'http://www.w3.org/2000/svg';\n\n/**\n * Success Icon (checkmark)\n */\nexport function SuccessIcon(): SVGElement {\n  const createElementNS = <K extends keyof SVGElementTagNameMap>(tagName: K): SVGElementTagNameMap[K] =>\n    WINDOW.document.createElementNS(XMLNS, tagName);\n  const svg = setAttributesNS(createElementNS('svg'), {\n    width: `${WIDTH}`,\n    height: `${HEIGHT}`,\n    viewBox: `0 0 ${WIDTH} ${HEIGHT}`,\n    fill: 'inherit',\n  });\n\n  const g = setAttributesNS(createElementNS('g'), {\n    clipPath: 'url(#clip0_57_156)',\n  });\n\n  const path2 = setAttributesNS(createElementNS('path'), {\n    ['fill-rule']: 'evenodd',\n    ['clip-rule']: 'evenodd',\n    d: 'M3.55544 15.1518C4.87103 16.0308 6.41775 16.5 8 16.5C10.1217 16.5 12.1566 15.6571 13.6569 14.1569C15.1571 12.6566 16 10.6217 16 8.5C16 6.91775 15.5308 5.37103 14.6518 4.05544C13.7727 2.73985 12.5233 1.71447 11.0615 1.10897C9.59966 0.503466 7.99113 0.34504 6.43928 0.653721C4.88743 0.962403 3.46197 1.72433 2.34315 2.84315C1.22433 3.96197 0.462403 5.38743 0.153721 6.93928C-0.15496 8.49113 0.00346625 10.0997 0.608967 11.5615C1.21447 13.0233 2.23985 14.2727 3.55544 15.1518ZM4.40546 3.1204C5.46945 2.40946 6.72036 2.03 8 2.03C9.71595 2.03 11.3616 2.71166 12.575 3.92502C13.7883 5.13838 14.47 6.78405 14.47 8.5C14.47 9.77965 14.0905 11.0306 13.3796 12.0945C12.6687 13.1585 11.6582 13.9878 10.476 14.4775C9.29373 14.9672 7.99283 15.0953 6.73777 14.8457C5.48271 14.596 4.32987 13.9798 3.42502 13.075C2.52018 12.1701 1.90397 11.0173 1.65432 9.76224C1.40468 8.50718 1.5328 7.20628 2.0225 6.02404C2.5122 4.8418 3.34148 3.83133 4.40546 3.1204Z',\n  });\n  const path = setAttributesNS(createElementNS('path'), {\n    d: 'M6.68775 12.4297C6.78586 12.4745 6.89218 12.4984 7 12.5C7.11275 12.4955 7.22315 12.4664 7.32337 12.4145C7.4236 12.3627 7.51121 12.2894 7.58 12.2L12 5.63999C12.0848 5.47724 12.1071 5.28902 12.0625 5.11098C12.0178 4.93294 11.9095 4.77744 11.7579 4.67392C11.6064 4.57041 11.4221 4.52608 11.24 4.54931C11.0579 4.57254 10.8907 4.66173 10.77 4.79999L6.88 10.57L5.13 8.56999C5.06508 8.49566 4.98613 8.43488 4.89768 8.39111C4.80922 8.34735 4.713 8.32148 4.61453 8.31498C4.51605 8.30847 4.41727 8.32147 4.32382 8.35322C4.23038 8.38497 4.14413 8.43484 4.07 8.49999C3.92511 8.63217 3.83692 8.81523 3.82387 9.01092C3.81083 9.2066 3.87393 9.39976 4 9.54999L6.43 12.24C6.50187 12.3204 6.58964 12.385 6.68775 12.4297Z',\n  });\n\n  svg.appendChild(g).append(path, path2);\n\n  const speakerDefs = createElementNS('defs');\n  const speakerClipPathDef = setAttributesNS(createElementNS('clipPath'), {\n    id: 'clip0_57_156',\n  });\n\n  const speakerRect = setAttributesNS(createElementNS('rect'), {\n    width: `${WIDTH}`,\n    height: `${WIDTH}`,\n    fill: 'white',\n    transform: 'translate(0 0.5)',\n  });\n\n  speakerClipPathDef.appendChild(speakerRect);\n  speakerDefs.appendChild(speakerClipPathDef);\n\n  svg.appendChild(speakerDefs).appendChild(speakerClipPathDef).appendChild(speakerRect);\n\n  return svg;\n}\n","import type { FeedbackFormData, FeedbackInternalOptions } from '@sentry/core';\nimport type { VNode } from 'preact';\nimport { Fragment, h } from 'preact'; // eslint-disable-line @typescript-eslint/no-unused-vars\nimport { useCallback, useMemo, useState } from 'preact/hooks';\nimport { SUCCESS_MESSAGE_TIMEOUT } from '../../constants';\nimport type { Props as HeaderProps } from './DialogHeader';\nimport { DialogHeader } from './DialogHeader';\nimport type { Props as FormProps } from './Form';\nimport { Form } from './Form';\nimport { SuccessIcon } from './SuccessIcon';\n\ninterface Props extends HeaderProps, FormProps {\n  onFormSubmitted: () => void;\n  open: boolean;\n  options: FeedbackInternalOptions;\n}\n\nexport function Dialog({ open, onFormSubmitted, ...props }: Props): VNode {\n  const options = props.options;\n  const successIconHtml = useMemo(() => ({ __html: SuccessIcon().outerHTML }), []);\n\n  const [timeoutId, setTimeoutId] = useState<NodeJS.Timeout | null>(null);\n\n  const handleOnSuccessClick = useCallback(() => {\n    if (timeoutId) {\n      clearTimeout(timeoutId);\n      setTimeoutId(null);\n    }\n    onFormSubmitted();\n  }, [timeoutId]);\n\n  const onSubmitSuccess = useCallback(\n    (data: FeedbackFormData, eventId: string) => {\n      props.onSubmitSuccess(data, eventId);\n      setTimeoutId(\n        setTimeout(() => {\n          onFormSubmitted();\n          setTimeoutId(null);\n        }, SUCCESS_MESSAGE_TIMEOUT),\n      );\n    },\n    [onFormSubmitted],\n  );\n\n  return (\n    <Fragment>\n      {timeoutId ? (\n        <div class=\"success__position\" onClick={handleOnSuccessClick}>\n          <div class=\"success__content\">\n            {options.successMessageText}\n            <span class=\"success__icon\" dangerouslySetInnerHTML={successIconHtml} />\n          </div>\n        </div>\n      ) : (\n        <dialog class=\"dialog\" onClick={options.onFormClose} open={open}>\n          <div class=\"dialog__position\">\n            <div\n              class=\"dialog__content\"\n              onClick={e => {\n                // Stop event propagation so clicks on content modal do not propagate to dialog (which will close dialog)\n                e.stopPropagation();\n              }}\n            >\n              <DialogHeader options={options} />\n              <Form {...props} onSubmitSuccess={onSubmitSuccess} />\n            </div>\n          </div>\n        </dialog>\n      )}\n    </Fragment>\n  );\n}\n","import { DOCUMENT } from '../../constants';\n\n/**\n * Creates <style> element for widget dialog\n */\nexport function createScreenshotInputStyles(styleNonce?: string): HTMLStyleElement {\n  const style = DOCUMENT.createElement('style');\n\n  const surface200 = '#1A141F';\n  const gray100 = '#302735';\n\n  style.textContent = `\n.editor {\n  display: flex;\n  flex-grow: 1;\n  flex-direction: column;\n}\n\n.editor__image-container {\n  justify-items: center;\n  padding: 15px;\n  position: relative;\n  height: 100%;\n  border-radius: var(--menu-border-radius, 6px);\n\n  background-color: ${surface200};\n  background-image: repeating-linear-gradient(\n      -145deg,\n      transparent,\n      transparent 8px,\n      ${surface200} 8px,\n      ${surface200} 11px\n    ),\n    repeating-linear-gradient(\n      -45deg,\n      transparent,\n      transparent 15px,\n      ${gray100} 15px,\n      ${gray100} 16px\n    );\n}\n\n.editor__canvas-container {\n  width: 100%;\n  height: 100%;\n  position: relative;\n  display: flex;\n  align-items: center;\n  justify-content: center;\n}\n\n.editor__canvas-container > * {\n  object-fit: contain;\n  position: absolute;\n}\n\n.editor__tool-container {\n  padding-top: 8px;\n  display: flex;\n  justify-content: center;\n}\n\n.editor__tool-bar {\n  display: flex;\n  gap: 8px;\n}\n\n.editor__tool {\n  display: flex;\n  padding: 8px 12px;\n  justify-content: center;\n  align-items: center;\n  border: var(--button-border, var(--border));\n  border-radius: var(--button-border-radius, 6px);\n  background: var(--button-background, var(--background));\n  color: var(--button-color, var(--foreground));\n}\n\n.editor__tool--active {\n  background: var(--button-primary-background, var(--accent-background));\n  color: var(--button-primary-color, var(--accent-foreground));\n}\n\n.editor__rect {\n  position: absolute;\n  z-index: 2;\n}\n\n.editor__rect button {\n  opacity: 0;\n  position: absolute;\n  top: -12px;\n  right: -12px;\n  cursor: pointer;\n  padding: 0;\n  z-index: 3;\n  border: none;\n  background: none;\n}\n\n.editor__rect:hover button {\n  opacity: 1;\n}\n`;\n\n  if (styleNonce) {\n    style.setAttribute('nonce', styleNonce);\n  }\n\n  return style;\n}\n","import type { FeedbackInternalOptions, FeedbackModalIntegration } from '@sentry/core';\nimport type { ComponentType, h as hType, VNode } from 'preact';\nimport { h } from 'preact'; // eslint-disable-line @typescript-eslint/no-unused-vars\nimport type * as Hooks from 'preact/hooks';\nimport { DOCUMENT, WINDOW } from '../../constants';\nimport IconCloseFactory from './IconClose';\nimport { createScreenshotInputStyles } from './ScreenshotInput.css';\nimport ToolbarFactory from './Toolbar';\nimport { useTakeScreenshotFactory } from './useTakeScreenshot';\n\ninterface FactoryParams {\n  h: typeof hType;\n  hooks: typeof Hooks;\n\n  /**\n   * A ref to a Canvas Element that serves as our \"value\" or image output.\n   */\n  outputBuffer: HTMLCanvasElement;\n\n  /**\n   * A reference to the whole dialog (the parent of this component) so that we\n   * can show/hide it and take a clean screenshot of the webpage.\n   */\n  dialog: ReturnType<FeedbackModalIntegration['createDialog']>;\n\n  /**\n   * The whole options object.\n   *\n   * Needed to set nonce and id values for editor specific styles\n   */\n  options: FeedbackInternalOptions;\n}\n\ninterface Props {\n  onError: (error: Error) => void;\n}\n\ntype MaybeCanvas = HTMLCanvasElement | null;\ntype Screenshot = { canvas: HTMLCanvasElement; dpi: number };\n\ntype DrawType = 'highlight' | 'hide' | '';\ninterface DrawCommand {\n  type: DrawType;\n  x: number;\n  y: number;\n  h: number;\n  w: number;\n}\n\nfunction drawRect(command: DrawCommand, ctx: CanvasRenderingContext2D, color: string): void {\n  switch (command.type) {\n    case 'highlight': {\n      // creates a shadow around\n      ctx.shadowColor = 'rgba(0, 0, 0, 0.7)';\n      ctx.shadowBlur = 50;\n\n      // draws a rectangle first with a shadow\n      ctx.fillStyle = color;\n      ctx.fillRect(command.x - 1, command.y - 1, command.w + 2, command.h + 2);\n\n      // cut out the inside of the rectangle\n      ctx.clearRect(command.x, command.y, command.w, command.h);\n\n      break;\n    }\n    case 'hide':\n      ctx.fillStyle = 'rgb(0, 0, 0)';\n      ctx.fillRect(command.x, command.y, command.w, command.h);\n\n      break;\n    default:\n      break;\n  }\n}\n\nfunction with2dContext(\n  canvas: MaybeCanvas,\n  options: CanvasRenderingContext2DSettings,\n  callback: (canvas: HTMLCanvasElement, ctx: CanvasRenderingContext2D) => void,\n): void {\n  if (!canvas) {\n    return;\n  }\n  const ctx = canvas.getContext('2d', options);\n  if (!ctx) {\n    return;\n  }\n  callback(canvas, ctx);\n}\n\nfunction paintImage(maybeDest: MaybeCanvas, source: HTMLCanvasElement): void {\n  with2dContext(maybeDest, { alpha: true }, (destCanvas, destCtx) => {\n    destCtx.drawImage(source, 0, 0, source.width, source.height, 0, 0, destCanvas.width, destCanvas.height);\n  });\n}\n\n// Paint the array of drawCommands into a canvas.\n// Assuming this is the canvas foreground, and the background is cleaned.\nfunction paintForeground(maybeCanvas: MaybeCanvas, strokeColor: string, drawCommands: DrawCommand[]): void {\n  with2dContext(maybeCanvas, { alpha: true }, (canvas, ctx) => {\n    // If there's anything to draw, then we'll first clear the canvas with\n    // a transparent grey background\n    if (drawCommands.length) {\n      ctx.fillStyle = 'rgba(0, 0, 0, 0.25)';\n      ctx.fillRect(0, 0, canvas.width, canvas.height);\n    }\n\n    drawCommands.forEach(command => {\n      drawRect(command, ctx, strokeColor);\n    });\n  });\n}\n\nexport function ScreenshotEditorFactory({\n  h,\n  hooks,\n  outputBuffer,\n  dialog,\n  options,\n}: FactoryParams): ComponentType<Props> {\n  const useTakeScreenshot = useTakeScreenshotFactory({ hooks });\n  const Toolbar = ToolbarFactory({ h });\n  const IconClose = IconCloseFactory({ h });\n  const editorStyleInnerText = { __html: createScreenshotInputStyles(options.styleNonce).innerText };\n\n  const dialogStyle = (dialog.el as HTMLElement).style;\n\n  const ScreenshotEditor = ({ screenshot }: { screenshot: Screenshot }): VNode => {\n    // Data for rendering:\n    const [action, setAction] = hooks.useState<DrawType>('highlight');\n    const [drawCommands, setDrawCommands] = hooks.useState<DrawCommand[]>([]);\n\n    // Refs to our html components:\n    const measurementRef = hooks.useRef<HTMLDivElement | null>(null);\n    const backgroundRef = hooks.useRef<MaybeCanvas>(null);\n    const foregroundRef = hooks.useRef<MaybeCanvas>(null);\n    const mouseRef = hooks.useRef<HTMLDivElement | null>(null);\n\n    // The size of our window, relative to the imageSource\n    const [scaleFactor, setScaleFactor] = hooks.useState<number>(1);\n\n    const strokeColor = hooks.useMemo((): string => {\n      const sentryFeedback = DOCUMENT.getElementById(options.id);\n      if (!sentryFeedback) {\n        return 'white';\n      }\n      const computedStyle = getComputedStyle(sentryFeedback);\n      return (\n        computedStyle.getPropertyValue('--button-primary-background') ||\n        computedStyle.getPropertyValue('--accent-background')\n      );\n    }, [options.id]);\n\n    // The initial resize, to measure the area and set the children to the correct size\n    hooks.useLayoutEffect(() => {\n      const handleResize = (): void => {\n        const measurementDiv = measurementRef.current;\n        if (!measurementDiv) {\n          return;\n        }\n\n        with2dContext(screenshot.canvas, { alpha: false }, canvas => {\n          const scale = Math.min(\n            measurementDiv.clientWidth / canvas.width,\n            measurementDiv.clientHeight / canvas.height,\n          );\n          setScaleFactor(scale);\n        });\n\n        // For Firefox, the canvas is not yet measured, so we need to wait for it to get the correct size\n        if (measurementDiv.clientHeight === 0 || measurementDiv.clientWidth === 0) {\n          setTimeout(handleResize, 0);\n        }\n      };\n\n      handleResize();\n      WINDOW.addEventListener('resize', handleResize);\n      return () => {\n        WINDOW.removeEventListener('resize', handleResize);\n      };\n    }, [screenshot]);\n\n    // Set the size of the canvas element to match our screenshot\n    const setCanvasSize = hooks.useCallback(\n      (maybeCanvas: MaybeCanvas, scale: number): void => {\n        with2dContext(maybeCanvas, { alpha: true }, (canvas, ctx) => {\n          // Must call `scale()` before setting `width` & `height`\n          ctx.scale(scale, scale);\n          canvas.width = screenshot.canvas.width;\n          canvas.height = screenshot.canvas.height;\n        });\n      },\n      [screenshot],\n    );\n\n    // Draw the screenshot into the background\n    hooks.useEffect(() => {\n      setCanvasSize(backgroundRef.current, screenshot.dpi);\n      paintImage(backgroundRef.current, screenshot.canvas);\n    }, [screenshot]);\n\n    // Draw the commands into the foreground\n    hooks.useEffect(() => {\n      setCanvasSize(foregroundRef.current, screenshot.dpi);\n      with2dContext(foregroundRef.current, { alpha: true }, (canvas, ctx) => {\n        ctx.clearRect(0, 0, canvas.width, canvas.height);\n      });\n      paintForeground(foregroundRef.current, strokeColor, drawCommands);\n    }, [drawCommands, strokeColor]);\n\n    // Draw into the output outputBuffer\n    hooks.useEffect(() => {\n      setCanvasSize(outputBuffer, screenshot.dpi);\n      paintImage(outputBuffer, screenshot.canvas);\n      with2dContext(DOCUMENT.createElement('canvas'), { alpha: true }, (foreground, ctx) => {\n        ctx.scale(screenshot.dpi, screenshot.dpi); // The scale needs to be set before we set the width/height and paint\n        foreground.width = screenshot.canvas.width;\n        foreground.height = screenshot.canvas.height;\n        paintForeground(foreground, strokeColor, drawCommands);\n        paintImage(outputBuffer, foreground);\n      });\n    }, [drawCommands, screenshot, strokeColor]);\n\n    const handleMouseDown = (e: MouseEvent): void => {\n      if (!action || !mouseRef.current) {\n        return;\n      }\n\n      const boundingRect = mouseRef.current.getBoundingClientRect();\n      const startingPoint: DrawCommand = {\n        type: action,\n        x: e.offsetX / scaleFactor,\n        y: e.offsetY / scaleFactor,\n        w: 0,\n        h: 0,\n      };\n\n      const getDrawCommand = (startingPoint: DrawCommand, e: MouseEvent): DrawCommand => {\n        const x = (e.clientX - boundingRect.x) / scaleFactor;\n        const y = (e.clientY - boundingRect.y) / scaleFactor;\n        return {\n          type: startingPoint.type,\n          x: Math.min(startingPoint.x, x),\n          y: Math.min(startingPoint.y, y),\n          w: Math.abs(x - startingPoint.x),\n          h: Math.abs(y - startingPoint.y),\n        } as DrawCommand;\n      };\n\n      const handleMouseMove = (e: MouseEvent): void => {\n        with2dContext(foregroundRef.current, { alpha: true }, (canvas, ctx) => {\n          ctx.clearRect(0, 0, canvas.width, canvas.height);\n        });\n        paintForeground(foregroundRef.current, strokeColor, [...drawCommands, getDrawCommand(startingPoint, e)]);\n      };\n\n      const handleMouseUp = (e: MouseEvent): void => {\n        const drawCommand = getDrawCommand(startingPoint, e);\n\n        // Prevent just clicking onto the canvas, mouse has to move at least 1 pixel\n        if (drawCommand.w * scaleFactor >= 1 && drawCommand.h * scaleFactor >= 1) {\n          setDrawCommands(prev => [...prev, drawCommand]);\n        }\n        DOCUMENT.removeEventListener('mousemove', handleMouseMove);\n        DOCUMENT.removeEventListener('mouseup', handleMouseUp);\n      };\n\n      DOCUMENT.addEventListener('mousemove', handleMouseMove);\n      DOCUMENT.addEventListener('mouseup', handleMouseUp);\n    };\n\n    const deleteRect = hooks.useCallback((index: number): hType.JSX.MouseEventHandler<HTMLButtonElement> => {\n      return (e: MouseEvent): void => {\n        e.preventDefault();\n        e.stopPropagation();\n        setDrawCommands(prev => {\n          const updatedRects = [...prev];\n          updatedRects.splice(index, 1);\n          return updatedRects;\n        });\n      };\n    }, []);\n\n    const dimensions = {\n      width: `${screenshot.canvas.width * scaleFactor}px`,\n      height: `${screenshot.canvas.height * scaleFactor}px`,\n    };\n\n    const handleStopPropagation = (e: MouseEvent): void => {\n      e.stopPropagation();\n    };\n\n    return (\n      <div class=\"editor\">\n        <style nonce={options.styleNonce} dangerouslySetInnerHTML={editorStyleInnerText} />\n        <div class=\"editor__image-container\">\n          <div class=\"editor__canvas-container\" ref={measurementRef}>\n            <canvas ref={backgroundRef} id=\"background\" style={dimensions} />\n            <canvas ref={foregroundRef} id=\"foreground\" style={dimensions} />\n            <div ref={mouseRef} onMouseDown={handleMouseDown} style={dimensions}>\n              {drawCommands.map((rect, index) => (\n                <div\n                  key={index}\n                  class=\"editor__rect\"\n                  style={{\n                    top: `${rect.y * scaleFactor}px`,\n                    left: `${rect.x * scaleFactor}px`,\n                    width: `${rect.w * scaleFactor}px`,\n                    height: `${rect.h * scaleFactor}px`,\n                  }}\n                >\n                  <button\n                    aria-label={options.removeHighlightText}\n                    onClick={deleteRect(index)}\n                    onMouseDown={handleStopPropagation}\n                    onMouseUp={handleStopPropagation}\n                    type=\"button\"\n                  >\n                    <IconClose />\n                  </button>\n                </div>\n              ))}\n            </div>\n          </div>\n        </div>\n        <Toolbar options={options} action={action} setAction={setAction} />\n      </div>\n    );\n  };\n\n  return function Wrapper({ onError }: Props): VNode {\n    const [screenshot, setScreenshot] = hooks.useState<undefined | Screenshot>();\n\n    useTakeScreenshot({\n      onBeforeScreenshot: hooks.useCallback(() => {\n        dialogStyle.display = 'none';\n      }, []),\n      onScreenshot: hooks.useCallback((screenshotVideo: HTMLVideoElement, dpi: number) => {\n        // Stash the original screenshot image so we can (re)draw it multiple times\n        with2dContext(DOCUMENT.createElement('canvas'), { alpha: false }, (canvas, ctx) => {\n          ctx.scale(dpi, dpi); // The scale needs to be set before we set the width/height and paint\n          canvas.width = screenshotVideo.videoWidth;\n          canvas.height = screenshotVideo.videoHeight;\n          ctx.drawImage(screenshotVideo, 0, 0, canvas.width, canvas.height);\n\n          setScreenshot({ canvas, dpi });\n        });\n\n        // The output buffer, we only need to set the width/height on this once, it stays the same forever\n        outputBuffer.width = screenshotVideo.videoWidth;\n        outputBuffer.height = screenshotVideo.videoHeight;\n      }, []),\n      onAfterScreenshot: hooks.useCallback(() => {\n        dialogStyle.display = 'block';\n      }, []),\n      onError: hooks.useCallback(error => {\n        dialogStyle.display = 'block';\n        onError(error);\n      }, []),\n    });\n\n    if (screenshot) {\n      return <ScreenshotEditor screenshot={screenshot} />;\n    }\n\n    return <div />;\n  };\n}\n","import type * as Hooks from 'preact/hooks';\nimport { DOCUMENT, NAVIGATOR, WINDOW } from '../../constants';\n\ninterface FactoryParams {\n  hooks: typeof Hooks;\n}\n\ninterface Props {\n  onBeforeScreenshot: () => void;\n  onScreenshot: (imageSource: HTMLVideoElement, dpi: number) => void;\n  onAfterScreenshot: () => void;\n  onError: (error: Error) => void;\n}\n\ntype UseTakeScreenshot = ({ onBeforeScreenshot, onScreenshot, onAfterScreenshot, onError }: Props) => void;\n\nexport function useTakeScreenshotFactory({ hooks }: FactoryParams): UseTakeScreenshot {\n  function useDpi(): number {\n    const [dpi, setDpi] = hooks.useState<number>(WINDOW.devicePixelRatio ?? 1);\n    hooks.useEffect(() => {\n      const onChange = (): void => {\n        setDpi(WINDOW.devicePixelRatio);\n      };\n      const media = matchMedia(`(resolution: ${WINDOW.devicePixelRatio}dppx)`);\n      media.addEventListener('change', onChange);\n      return () => {\n        media.removeEventListener('change', onChange);\n      };\n    }, []);\n\n    return dpi;\n  }\n\n  return function useTakeScreenshot({ onBeforeScreenshot, onScreenshot, onAfterScreenshot, onError }: Props) {\n    const dpi = useDpi();\n\n    hooks.useEffect(() => {\n      const takeScreenshot = async (): Promise<void> => {\n        onBeforeScreenshot();\n\n        // Chrome will animate a top-bar which can shrink the window height by a\n        // few pixels. The exact amount depends on how fast it takes to exec\n        // the onloadedmetadata callback.\n        // https://stackoverflow.com/q/75833049\n        const stream = await NAVIGATOR.mediaDevices.getDisplayMedia({\n          video: {\n            width: WINDOW.innerWidth * dpi,\n            height: WINDOW.innerHeight * dpi,\n          },\n          audio: false,\n          // @ts-expect-error experimental flags: https://developer.mozilla.org/en-US/docs/Web/API/MediaDevices/getDisplayMedia#prefercurrenttab\n          monitorTypeSurfaces: 'exclude',\n          preferCurrentTab: true,\n          selfBrowserSurface: 'include',\n          surfaceSwitching: 'exclude',\n        });\n\n        const video = DOCUMENT.createElement('video');\n        await new Promise<void>((resolve, reject) => {\n          video.srcObject = stream;\n          video.onloadedmetadata = () => {\n            onScreenshot(video, dpi);\n            stream.getTracks().forEach(track => track.stop());\n            resolve();\n          };\n          video.play().catch(reject);\n        });\n        onAfterScreenshot();\n      };\n\n      takeScreenshot().catch(onError);\n    }, []);\n  };\n}\n","import type { FeedbackInternalOptions } from '@sentry/core';\nimport type { h as hType, VNode } from 'preact';\nimport type * as Hooks from 'preact/hooks';\n\ninterface FactoryParams {\n  h: typeof hType;\n}\n\nexport default function ToolbarFactory({\n  h, // eslint-disable-line @typescript-eslint/no-unused-vars\n}: FactoryParams) {\n  return function Toolbar({\n    action,\n    setAction,\n    options,\n  }: {\n    action: 'highlight' | 'hide' | '';\n    setAction: Hooks.StateUpdater<'highlight' | 'hide' | ''>;\n    options: FeedbackInternalOptions;\n  }): VNode {\n    return (\n      <div class=\"editor__tool-container\">\n        <div class=\"editor__tool-bar\">\n          <button\n            type=\"button\"\n            class={`editor__tool ${action === 'highlight' ? 'editor__tool--active' : ''}`}\n            onClick={() => {\n              setAction(action === 'highlight' ? '' : 'highlight');\n            }}\n          >\n            {options.highlightToolText}\n          </button>\n          <button\n            type=\"button\"\n            class={`editor__tool ${action === 'hide' ? 'editor__tool--active' : ''}`}\n            onClick={() => {\n              setAction(action === 'hide' ? '' : 'hide');\n            }}\n          >\n            {options.hideToolText}\n          </button>\n        </div>\n      </div>\n    );\n  };\n}\n","import type { h as hType, VNode } from 'preact';\n\ninterface FactoryParams {\n  h: typeof hType;\n}\n\nexport default function IconCloseFactory({\n  h, // eslint-disable-line @typescript-eslint/no-unused-vars\n}: FactoryParams) {\n  return function IconClose(): VNode {\n    return (\n      <svg data-test-id=\"icon-close\" viewBox=\"0 0 16 16\" fill=\"#2B2233\" height=\"25px\" width=\"25px\">\n        <circle r=\"7\" cx=\"8\" cy=\"8\" fill=\"white\" />\n        <path\n          strokeWidth=\"1.5\"\n          d=\"M8,16a8,8,0,1,1,8-8A8,8,0,0,1,8,16ZM8,1.53A6.47,6.47,0,1,0,14.47,8,6.47,6.47,0,0,0,8,1.53Z\"\n        ></path>\n        <path\n          strokeWidth=\"1.5\"\n          d=\"M5.34,11.41a.71.71,0,0,1-.53-.22.74.74,0,0,1,0-1.06l5.32-5.32a.75.75,0,0,1,1.06,1.06L5.87,11.19A.74.74,0,0,1,5.34,11.41Z\"\n        ></path>\n        <path\n          strokeWidth=\"1.5\"\n          d=\"M10.66,11.41a.74.74,0,0,1-.53-.22L4.81,5.87A.75.75,0,0,1,5.87,4.81l5.32,5.32a.74.74,0,0,1,0,1.06A.71.71,0,0,1,10.66,11.41Z\"\n        ></path>\n      </svg>\n    );\n  };\n}\n","/* eslint-disable max-lines */\n/* eslint-disable complexity */\n\nimport type {\n  FeedbackErrorMessages,\n  FeedbackInternalOptions,\n  FeedbackModalIntegration,\n  FeedbackScreenshotIntegration,\n  Integration,\n  IntegrationFn,\n  SendFeedback,\n} from '@sentry/core';\nimport { addIntegration, debug, isBrowser } from '@sentry/core';\nimport {\n  ADD_SCREENSHOT_LABEL,\n  CANCEL_BUTTON_LABEL,\n  CONFIRM_BUTTON_LABEL,\n  DOCUMENT,\n  EMAIL_LABEL,\n  EMAIL_PLACEHOLDER,\n  ERROR_EMPTY_MESSAGE_TEXT,\n  ERROR_FORBIDDEN_TEXT,\n  ERROR_GENERIC_TEXT,\n  ERROR_NO_CLIENT_TEXT,\n  ERROR_TIMEOUT_TEXT,\n  FORM_TITLE,\n  HIDE_TOOL_TEXT,\n  HIGHLIGHT_TOOL_TEXT,\n  IS_REQUIRED_LABEL,\n  MESSAGE_LABEL,\n  MESSAGE_PLACEHOLDER,\n  NAME_LABEL,\n  NAME_PLACEHOLDER,\n  REMOVE_HIGHLIGHT_TEXT,\n  REMOVE_SCREENSHOT_LABEL,\n  SUBMIT_BUTTON_LABEL,\n  SUCCESS_MESSAGE_TEXT,\n  TRIGGER_LABEL,\n} from '../constants';\nimport { DEBUG_BUILD } from '../util/debug-build';\nimport { isScreenshotSupported } from '../util/isScreenshotSupported';\nimport { mergeOptions } from '../util/mergeOptions';\nimport type { ActorComponent } from './components/Actor';\nimport { Actor } from './components/Actor';\nimport { createMainStyles } from './createMainStyles';\nimport { sendFeedback } from './sendFeedback';\nimport type { OptionalFeedbackConfiguration, OverrideFeedbackConfiguration } from './types';\n\ntype Unsubscribe = () => void;\n\n/**\n * Allow users to capture user feedback and send it to Sentry.\n */\n\ntype BuilderOptions =\n  | {\n      lazyLoadIntegration?: never;\n      getModalIntegration: () => IntegrationFn;\n      getScreenshotIntegration: () => IntegrationFn;\n    }\n  | {\n      // The type here should be `keyof typeof LazyLoadableIntegrations`, but that'll cause a cicrular\n      // dependency with @sentry/core\n      lazyLoadIntegration: (\n        name: 'feedbackModalIntegration' | 'feedbackScreenshotIntegration',\n        scriptNonce?: string,\n      ) => Promise<IntegrationFn>;\n      getModalIntegration?: never;\n      getScreenshotIntegration?: never;\n    };\n\nexport const buildFeedbackIntegration = ({\n  lazyLoadIntegration,\n  getModalIntegration,\n  getScreenshotIntegration,\n}: BuilderOptions): IntegrationFn<\n  Integration & {\n    attachTo(el: Element | string, optionOverrides?: OverrideFeedbackConfiguration): Unsubscribe;\n    createForm(\n      optionOverrides?: OverrideFeedbackConfiguration,\n    ): Promise<ReturnType<FeedbackModalIntegration['createDialog']>>;\n    createWidget(optionOverrides?: OverrideFeedbackConfiguration): ActorComponent;\n    setTheme(colorScheme: 'light' | 'dark' | 'system'): void;\n    remove(): void;\n  }\n> => {\n  const feedbackIntegration = (({\n    // FeedbackGeneralConfiguration\n    id = 'sentry-feedback',\n    autoInject = true,\n    showBranding = true,\n    isEmailRequired = false,\n    isNameRequired = false,\n    showEmail = true,\n    showName = true,\n    enableScreenshot = true,\n    useSentryUser = {\n      email: 'email',\n      name: 'username',\n    },\n    tags,\n    styleNonce,\n    scriptNonce,\n\n    // FeedbackThemeConfiguration\n    colorScheme = 'system',\n    themeLight = {},\n    themeDark = {},\n\n    // FeedbackTextConfiguration\n    addScreenshotButtonLabel = ADD_SCREENSHOT_LABEL,\n    cancelButtonLabel = CANCEL_BUTTON_LABEL,\n    confirmButtonLabel = CONFIRM_BUTTON_LABEL,\n    emailLabel = EMAIL_LABEL,\n    emailPlaceholder = EMAIL_PLACEHOLDER,\n    formTitle = FORM_TITLE,\n    isRequiredLabel = IS_REQUIRED_LABEL,\n    messageLabel = MESSAGE_LABEL,\n    messagePlaceholder = MESSAGE_PLACEHOLDER,\n    nameLabel = NAME_LABEL,\n    namePlaceholder = NAME_PLACEHOLDER,\n    removeScreenshotButtonLabel = REMOVE_SCREENSHOT_LABEL,\n    submitButtonLabel = SUBMIT_BUTTON_LABEL,\n    successMessageText = SUCCESS_MESSAGE_TEXT,\n    triggerLabel = TRIGGER_LABEL,\n    triggerAriaLabel = '',\n    highlightToolText = HIGHLIGHT_TOOL_TEXT,\n    hideToolText = HIDE_TOOL_TEXT,\n    removeHighlightText = REMOVE_HIGHLIGHT_TEXT,\n    errorEmptyMessageText = ERROR_EMPTY_MESSAGE_TEXT,\n    errorNoClientText = ERROR_NO_CLIENT_TEXT,\n    errorTimeoutText = ERROR_TIMEOUT_TEXT,\n    errorForbiddenText = ERROR_FORBIDDEN_TEXT,\n    errorGenericText = ERROR_GENERIC_TEXT,\n\n    // FeedbackCallbacks\n    onFormOpen,\n    onFormClose,\n    onSubmitSuccess,\n    onSubmitError,\n    onFormSubmitted,\n  }: OptionalFeedbackConfiguration = {}) => {\n    const _options = {\n      id,\n      autoInject,\n      showBranding,\n      isEmailRequired,\n      isNameRequired,\n      showEmail,\n      showName,\n      enableScreenshot,\n      useSentryUser,\n      tags,\n      styleNonce,\n      scriptNonce,\n\n      colorScheme,\n      themeDark,\n      themeLight,\n\n      triggerLabel,\n      triggerAriaLabel,\n      cancelButtonLabel,\n      submitButtonLabel,\n      confirmButtonLabel,\n      formTitle,\n      emailLabel,\n      emailPlaceholder,\n      messageLabel,\n      messagePlaceholder,\n      nameLabel,\n      namePlaceholder,\n      successMessageText,\n      isRequiredLabel,\n      addScreenshotButtonLabel,\n      removeScreenshotButtonLabel,\n      highlightToolText,\n      hideToolText,\n      removeHighlightText,\n      errorEmptyMessageText,\n      errorNoClientText,\n      errorTimeoutText,\n      errorForbiddenText,\n      errorGenericText,\n\n      onFormClose,\n      onFormOpen,\n      onSubmitError,\n      onSubmitSuccess,\n      onFormSubmitted,\n    };\n\n    let _shadow: ShadowRoot | null = null;\n    let _mainStyle: HTMLStyleElement | null = null;\n    let _subscriptions: Unsubscribe[] = [];\n\n    /**\n     * Get the shadow root where we will append css\n     */\n    const _createShadow = (options: FeedbackInternalOptions): ShadowRoot => {\n      if (!_shadow) {\n        const host = DOCUMENT.createElement('div');\n        host.id = String(options.id);\n        DOCUMENT.body.appendChild(host);\n\n        _shadow = host.attachShadow({ mode: 'open' });\n        _mainStyle = createMainStyles(options);\n        _shadow.appendChild(_mainStyle);\n      }\n      return _shadow;\n    };\n\n    const _loadAndRenderDialog = async (\n      options: FeedbackInternalOptions,\n    ): Promise<ReturnType<FeedbackModalIntegration['createDialog']>> => {\n      const screenshotRequired = options.enableScreenshot && isScreenshotSupported();\n\n      let modalIntegration: FeedbackModalIntegration;\n      let screenshotIntegration: FeedbackScreenshotIntegration | undefined;\n\n      try {\n        const modalIntegrationFn = getModalIntegration\n          ? getModalIntegration()\n          : await lazyLoadIntegration('feedbackModalIntegration', scriptNonce);\n        modalIntegration = modalIntegrationFn() as FeedbackModalIntegration;\n        addIntegration(modalIntegration);\n      } catch {\n        DEBUG_BUILD &&\n          debug.error(\n            '[Feedback] Error when trying to load feedback integrations. Try using `feedbackSyncIntegration` in your `Sentry.init`.',\n          );\n        throw new Error('[Feedback] Missing feedback modal integration!');\n      }\n\n      try {\n        const screenshotIntegrationFn = screenshotRequired\n          ? getScreenshotIntegration\n            ? getScreenshotIntegration()\n            : await lazyLoadIntegration('feedbackScreenshotIntegration', scriptNonce)\n          : undefined;\n\n        if (screenshotIntegrationFn) {\n          screenshotIntegration = screenshotIntegrationFn() as FeedbackScreenshotIntegration;\n          addIntegration(screenshotIntegration);\n        }\n      } catch {\n        DEBUG_BUILD &&\n          debug.error('[Feedback] Missing feedback screenshot integration. Proceeding without screenshots.');\n      }\n\n      const errorMessages: FeedbackErrorMessages = {\n        ERROR_EMPTY_MESSAGE: options.errorEmptyMessageText,\n        ERROR_NO_CLIENT: options.errorNoClientText,\n        ERROR_TIMEOUT: options.errorTimeoutText,\n        ERROR_FORBIDDEN: options.errorForbiddenText,\n        ERROR_GENERIC: options.errorGenericText,\n      };\n      const wrappedSendFeedback: SendFeedback = (params, hint) =>\n        sendFeedback(params, { includeReplay: true, ...hint, errorMessages });\n\n      const dialog = modalIntegration.createDialog({\n        options: {\n          ...options,\n          onFormClose: () => {\n            dialog?.close();\n            options.onFormClose?.();\n          },\n          onFormSubmitted: () => {\n            dialog?.close();\n            options.onFormSubmitted?.();\n          },\n        },\n        screenshotIntegration,\n        sendFeedback: wrappedSendFeedback,\n        shadow: _createShadow(options),\n      });\n\n      return dialog;\n    };\n\n    const _attachTo = (el: Element | string, optionOverrides: OverrideFeedbackConfiguration = {}): Unsubscribe => {\n      const mergedOptions = mergeOptions(_options, optionOverrides);\n\n      const targetEl =\n        typeof el === 'string' ? DOCUMENT.querySelector(el) : typeof el.addEventListener === 'function' ? el : null;\n\n      if (!targetEl) {\n        DEBUG_BUILD && debug.error('[Feedback] Unable to attach to target element');\n        throw new Error('Unable to attach to target element');\n      }\n\n      let dialog: ReturnType<FeedbackModalIntegration['createDialog']> | null = null;\n      const handleClick = async (): Promise<void> => {\n        if (!dialog) {\n          dialog = await _loadAndRenderDialog({\n            ...mergedOptions,\n            onFormSubmitted: () => {\n              dialog?.removeFromDom();\n              mergedOptions.onFormSubmitted?.();\n            },\n          });\n        }\n        dialog.appendToDom();\n        dialog.open();\n      };\n      targetEl.addEventListener('click', handleClick);\n      const unsubscribe = (): void => {\n        _subscriptions = _subscriptions.filter(sub => sub !== unsubscribe);\n        dialog?.removeFromDom();\n        dialog = null;\n        targetEl.removeEventListener('click', handleClick);\n      };\n      _subscriptions.push(unsubscribe);\n      return unsubscribe;\n    };\n\n    const _createActor = (optionOverrides: OverrideFeedbackConfiguration = {}): ActorComponent => {\n      const mergedOptions = mergeOptions(_options, optionOverrides);\n      const shadow = _createShadow(mergedOptions);\n      const actor = Actor({\n        triggerLabel: mergedOptions.triggerLabel,\n        triggerAriaLabel: mergedOptions.triggerAriaLabel,\n        shadow,\n        styleNonce,\n      });\n      _attachTo(actor.el, {\n        ...mergedOptions,\n        onFormOpen() {\n          actor.hide();\n        },\n        onFormClose() {\n          actor.show();\n        },\n        onFormSubmitted() {\n          actor.show();\n        },\n      });\n      return actor;\n    };\n\n    return {\n      name: 'Feedback' as const,\n      setupOnce() {\n        if (!isBrowser() || !_options.autoInject) {\n          return;\n        }\n\n        if (DOCUMENT.readyState === 'loading') {\n          DOCUMENT.addEventListener('DOMContentLoaded', () => _createActor().appendToDom());\n        } else {\n          _createActor().appendToDom();\n        }\n      },\n\n      /**\n       * Adds click listener to the element to open a feedback dialog\n       *\n       * The returned function can be used to remove the click listener\n       */\n      attachTo: _attachTo,\n\n      /**\n       * Creates a new widget which is composed of a Button which triggers a Dialog.\n       * Accepts partial options to override any options passed to constructor.\n       */\n      createWidget(optionOverrides: OverrideFeedbackConfiguration = {}): ActorComponent {\n        const actor = _createActor(mergeOptions(_options, optionOverrides));\n        actor.appendToDom();\n        return actor;\n      },\n\n      /**\n       * Creates a new Form which you can\n       * Accepts partial options to override any options passed to constructor.\n       */\n      async createForm(\n        optionOverrides: OverrideFeedbackConfiguration = {},\n      ): Promise<ReturnType<FeedbackModalIntegration['createDialog']>> {\n        return _loadAndRenderDialog(mergeOptions(_options, optionOverrides));\n      },\n\n      /**\n       * Updates the color scheme of the feedback widget at runtime.\n       */\n      setTheme(colorScheme: 'light' | 'dark' | 'system'): void {\n        _options.colorScheme = colorScheme;\n        if (_shadow) {\n          const newStyle = createMainStyles(_options);\n          if (_mainStyle) {\n            _shadow.replaceChild(newStyle, _mainStyle);\n          } else {\n            _shadow.prepend(newStyle);\n          }\n          _mainStyle = newStyle;\n        }\n      },\n\n      /**\n       * Removes the Feedback integration (including host, shadow DOM, and all widgets)\n       */\n      remove(): void {\n        if (_shadow) {\n          _shadow.parentElement?.remove();\n          _shadow = null;\n          _mainStyle = null;\n        }\n        // Remove any lingering subscriptions\n        _subscriptions.forEach(sub => sub());\n        _subscriptions = [];\n      },\n    };\n  }) satisfies IntegrationFn;\n\n  return feedbackIntegration;\n};\n","import { NAVIGATOR } from '../constants';\n\n/**\n * Mobile browsers do not support `mediaDevices.getDisplayMedia` even though they have the api implemented\n * Instead they return things like `NotAllowedError` when called.\n *\n * It's simpler for us to browser sniff first, and avoid loading the integration if we can.\n *\n * https://stackoverflow.com/a/58879212\n * https://stackoverflow.com/a/3540295\n *\n * `mediaDevices.getDisplayMedia` is also only supported in secure contexts, and return a `mediaDevices is not supported` error, so we should also avoid loading the integration if we can.\n *\n * https://developer.mozilla.org/en-US/docs/Web/API/MediaDevices/getDisplayMedia\n */\nexport function isScreenshotSupported(): boolean {\n  if (/Android|webOS|iPhone|iPad|iPod|BlackBerry|IEMobile|Opera Mini/i.test(NAVIGATOR.userAgent)) {\n    return false;\n  }\n  /**\n   * User agent on iPads show as Macintosh, so we need extra checks\n   *\n   * https://forums.developer.apple.com/forums/thread/119186\n   * https://stackoverflow.com/questions/60482650/how-to-detect-ipad-useragent-on-safari-browser\n   */\n  if (/Macintosh/i.test(NAVIGATOR.userAgent) && NAVIGATOR.maxTouchPoints && NAVIGATOR.maxTouchPoints > 1) {\n    return false;\n  }\n  if (!isSecureContext) {\n    return false;\n  }\n  return true;\n}\n","import { DOCUMENT, TRIGGER_LABEL } from '../../constants';\nimport { createActorStyles } from './Actor.css';\nimport { FeedbackIcon } from './FeedbackIcon';\n\nexport interface ActorProps {\n  triggerLabel: string;\n  triggerAriaLabel: string;\n  shadow: ShadowRoot;\n  styleNonce?: string;\n}\n\nexport interface ActorComponent {\n  el: HTMLElement;\n\n  appendToDom: () => void;\n\n  removeFromDom: () => void;\n\n  show: () => void;\n\n  hide: () => void;\n}\n\n/**\n * The sentry-provided button to open the feedback modal\n */\nexport function Actor({ triggerLabel, triggerAriaLabel, shadow, styleNonce }: ActorProps): ActorComponent {\n  const el = DOCUMENT.createElement('button');\n  el.type = 'button';\n  el.className = 'widget__actor';\n  el.ariaHidden = 'false';\n  el.ariaLabel = triggerAriaLabel || triggerLabel || TRIGGER_LABEL;\n  el.appendChild(FeedbackIcon());\n  if (triggerLabel) {\n    const label = DOCUMENT.createElement('span');\n    label.appendChild(DOCUMENT.createTextNode(triggerLabel));\n    el.appendChild(label);\n  }\n\n  const style = createActorStyles(styleNonce);\n\n  return {\n    el,\n    appendToDom(): void {\n      shadow.appendChild(style);\n      shadow.appendChild(el);\n    },\n    removeFromDom(): void {\n      el.remove();\n      style.remove();\n    },\n    show(): void {\n      el.ariaHidden = 'false';\n    },\n    hide(): void {\n      el.ariaHidden = 'true';\n    },\n  };\n}\n","import { WINDOW } from '../../constants';\nimport { setAttributesNS } from '../../util/setAttributesNS';\n\nconst SIZE = 20;\nconst XMLNS = 'http://www.w3.org/2000/svg';\n\n/**\n * Feedback Icon\n */\nexport function FeedbackIcon(): SVGElement {\n  const createElementNS = <K extends keyof SVGElementTagNameMap>(tagName: K): SVGElementTagNameMap[K] =>\n    WINDOW.document.createElementNS(XMLNS, tagName);\n  const svg = setAttributesNS(createElementNS('svg'), {\n    width: `${SIZE}`,\n    height: `${SIZE}`,\n    viewBox: `0 0 ${SIZE} ${SIZE}`,\n    fill: 'var(--actor-color, var(--foreground))',\n  });\n\n  const g = setAttributesNS(createElementNS('g'), {\n    clipPath: 'url(#clip0_57_80)',\n  });\n\n  const path = setAttributesNS(createElementNS('path'), {\n    ['fill-rule']: 'evenodd',\n    ['clip-rule']: 'evenodd',\n    d: 'M15.6622 15H12.3997C12.2129 14.9959 12.031 14.9396 11.8747 14.8375L8.04965 12.2H7.49956V19.1C7.4875 19.3348 7.3888 19.5568 7.22256 19.723C7.05632 19.8892 6.83435 19.9879 6.59956 20H2.04956C1.80193 19.9968 1.56535 19.8969 1.39023 19.7218C1.21511 19.5467 1.1153 19.3101 1.11206 19.0625V12.2H0.949652C0.824431 12.2017 0.700142 12.1783 0.584123 12.1311C0.468104 12.084 0.362708 12.014 0.274155 11.9255C0.185602 11.8369 0.115689 11.7315 0.0685419 11.6155C0.0213952 11.4995 -0.00202913 11.3752 -0.00034808 11.25V3.75C-0.00900498 3.62067 0.0092504 3.49095 0.0532651 3.36904C0.0972798 3.24712 0.166097 3.13566 0.255372 3.04168C0.344646 2.94771 0.452437 2.87327 0.571937 2.82307C0.691437 2.77286 0.82005 2.74798 0.949652 2.75H8.04965L11.8747 0.1625C12.031 0.0603649 12.2129 0.00407221 12.3997 0H15.6622C15.9098 0.00323746 16.1464 0.103049 16.3215 0.278167C16.4966 0.453286 16.5964 0.689866 16.5997 0.9375V3.25269C17.3969 3.42959 18.1345 3.83026 18.7211 4.41679C19.5322 5.22788 19.9878 6.32796 19.9878 7.47502C19.9878 8.62209 19.5322 9.72217 18.7211 10.5333C18.1345 11.1198 17.3969 11.5205 16.5997 11.6974V14.0125C16.6047 14.1393 16.5842 14.2659 16.5395 14.3847C16.4948 14.5035 16.4268 14.6121 16.3394 14.7042C16.252 14.7962 16.147 14.8698 16.0307 14.9206C15.9144 14.9714 15.7891 14.9984 15.6622 15ZM1.89695 10.325H1.88715V4.625H8.33715C8.52423 4.62301 8.70666 4.56654 8.86215 4.4625L12.6872 1.875H14.7247V13.125H12.6872L8.86215 10.4875C8.70666 10.3835 8.52423 10.327 8.33715 10.325H2.20217C2.15205 10.3167 2.10102 10.3125 2.04956 10.3125C1.9981 10.3125 1.94708 10.3167 1.89695 10.325ZM2.98706 12.2V18.1625H5.66206V12.2H2.98706ZM16.5997 9.93612V5.01393C16.6536 5.02355 16.7072 5.03495 16.7605 5.04814C17.1202 5.13709 17.4556 5.30487 17.7425 5.53934C18.0293 5.77381 18.2605 6.06912 18.4192 6.40389C18.578 6.73866 18.6603 7.10452 18.6603 7.47502C18.6603 7.84552 18.578 8.21139 18.4192 8.54616C18.2605 8.88093 18.0293 9.17624 17.7425 9.41071C17.4556 9.64518 17.1202 9.81296 16.7605 9.90191C16.7072 9.91509 16.6536 9.9265 16.5997 9.93612Z',\n  });\n  svg.appendChild(g).appendChild(path);\n\n  const speakerDefs = createElementNS('defs');\n  const speakerClipPathDef = setAttributesNS(createElementNS('clipPath'), {\n    id: 'clip0_57_80',\n  });\n\n  const speakerRect = setAttributesNS(createElementNS('rect'), {\n    width: `${SIZE}`,\n    height: `${SIZE}`,\n    fill: 'white',\n  });\n\n  speakerClipPathDef.appendChild(speakerRect);\n  speakerDefs.appendChild(speakerClipPathDef);\n\n  svg.appendChild(speakerDefs).appendChild(speakerClipPathDef).appendChild(speakerRect);\n\n  return svg;\n}\n","import { DOCUMENT } from '../../constants';\n\n/**\n * Creates <style> element for widget actor (button that opens the dialog)\n */\nexport function createActorStyles(styleNonce?: string): HTMLStyleElement {\n  const style = DOCUMENT.createElement('style');\n  style.textContent = `\n.widget__actor {\n  position: fixed;\n  z-index: var(--z-index);\n  margin: var(--page-margin);\n  inset: var(--actor-inset);\n\n  display: flex;\n  align-items: center;\n  gap: 8px;\n  padding: 16px;\n\n  font-family: inherit;\n  font-size: var(--font-size);\n  font-weight: 600;\n  line-height: 1.14em;\n  text-decoration: none;\n\n  background: var(--actor-background, var(--background));\n  border-radius: var(--actor-border-radius, 1.7em/50%);\n  border: var(--actor-border, var(--border));\n  box-shadow: var(--actor-box-shadow, var(--box-shadow));\n  color: var(--actor-color, var(--foreground));\n  fill: var(--actor-color, var(--foreground));\n  cursor: pointer;\n  opacity: 1;\n  transition: transform 0.2s ease-in-out;\n  transform: translate(0, 0) scale(1);\n}\n.widget__actor[aria-hidden=\"true\"] {\n  opacity: 0;\n  pointer-events: none;\n  visibility: hidden;\n  transform: translate(0, 16px) scale(0.98);\n}\n\n.widget__actor:hover {\n  background: var(--actor-hover-background, var(--background));\n  filter: var(--interactive-filter);\n}\n\n.widget__actor svg {\n  width: 1.14em;\n  height: 1.14em;\n}\n\n@media (max-width: 600px) {\n  .widget__actor span {\n    display: none;\n  }\n}\n`;\n\n  if (styleNonce) {\n    style.setAttribute('nonce', styleNonce);\n  }\n\n  return style;\n}\n","import type { FeedbackFormData, FeedbackModalIntegration, IntegrationFn, User } from '@sentry/core';\nimport { getClient, getCurrentScope, getGlobalScope, getIsolationScope } from '@sentry/core';\nimport { h, render } from 'preact';\nimport * as hooks from 'preact/hooks';\nimport { DOCUMENT } from '../constants';\nimport { Dialog } from './components/Dialog';\nimport { createDialogStyles } from './components/Dialog.css';\n\nfunction getUser(): User | undefined {\n  const currentUser = getCurrentScope().getUser();\n  const isolationUser = getIsolationScope().getUser();\n  const globalUser = getGlobalScope().getUser();\n  if (currentUser && Object.keys(currentUser).length) {\n    return currentUser;\n  }\n  if (isolationUser && Object.keys(isolationUser).length) {\n    return isolationUser;\n  }\n  return globalUser;\n}\n\nexport const feedbackModalIntegration = ((): FeedbackModalIntegration => {\n  return {\n    name: 'FeedbackModal' as const,\n    setupOnce() {},\n    createDialog: ({ options, screenshotIntegration, sendFeedback, shadow }) => {\n      const shadowRoot = shadow as ShadowRoot;\n      const userKey = options.useSentryUser;\n      const user = getUser();\n\n      const el = DOCUMENT.createElement('div');\n      const style = createDialogStyles(options.styleNonce);\n\n      let originalOverflow = '';\n      const dialog: ReturnType<FeedbackModalIntegration['createDialog']> = {\n        get el() {\n          return el;\n        },\n        appendToDom(): void {\n          if (!shadowRoot.contains(style) && !shadowRoot.contains(el)) {\n            shadowRoot.appendChild(style);\n            shadowRoot.appendChild(el);\n          }\n        },\n        removeFromDom(): void {\n          el.remove();\n          style.remove();\n          DOCUMENT.body.style.overflow = originalOverflow;\n        },\n        open() {\n          renderContent(true);\n          options.onFormOpen?.();\n          getClient()?.emit('openFeedbackWidget');\n          originalOverflow = DOCUMENT.body.style.overflow;\n          DOCUMENT.body.style.overflow = 'hidden';\n        },\n        close() {\n          renderContent(false);\n          DOCUMENT.body.style.overflow = originalOverflow;\n        },\n      };\n\n      const screenshotInput = screenshotIntegration?.createInput({ h, hooks, dialog, options });\n\n      const renderContent = (open: boolean): void => {\n        render(\n          <Dialog\n            options={options}\n            screenshotInput={screenshotInput}\n            showName={options.showName || options.isNameRequired}\n            showEmail={options.showEmail || options.isEmailRequired}\n            defaultName={String((userKey && user?.[userKey.name]) || '')}\n            defaultEmail={String((userKey && user?.[userKey.email]) || '')}\n            onFormClose={() => {\n              renderContent(false);\n              options.onFormClose?.();\n            }}\n            onSubmit={sendFeedback}\n            onSubmitSuccess={(data: FeedbackFormData, eventId: string) => {\n              renderContent(false);\n              options.onSubmitSuccess?.(data, eventId);\n            }}\n            onSubmitError={(error: Error) => {\n              options.onSubmitError?.(error);\n            }}\n            onFormSubmitted={() => {\n              options.onFormSubmitted?.();\n            }}\n            open={open}\n          />,\n          el,\n        );\n      };\n\n      return dialog;\n    },\n  };\n}) satisfies IntegrationFn;\n","import { DOCUMENT } from '../../constants';\n\nconst DIALOG = `\n.dialog {\n  position: fixed;\n  z-index: var(--z-index);\n  margin: 0;\n  inset: 0;\n\n  display: flex;\n  align-items: center;\n  justify-content: center;\n  padding: 0;\n  height: 100vh;\n  width: 100vw;\n\n  color: var(--dialog-color, var(--foreground));\n  fill: var(--dialog-color, var(--foreground));\n  line-height: 1.75em;\n\n  background-color: rgba(0, 0, 0, 0.05);\n  border: none;\n  inset: 0;\n  opacity: 1;\n  transition: opacity 0.2s ease-in-out;\n}\n\n.dialog__position {\n  position: fixed;\n  z-index: var(--z-index);\n  inset: var(--dialog-inset);\n  padding: var(--page-margin);\n  display: flex;\n  max-height: calc(100vh - (2 * var(--page-margin)));\n}\n@media (max-width: 600px) {\n  .dialog__position {\n    inset: var(--page-margin);\n    padding: 0;\n  }\n}\n\n.dialog__position:has(.editor) {\n  inset: var(--page-margin);\n  padding: 0;\n}\n\n.dialog:not([open]) {\n  opacity: 0;\n  pointer-events: none;\n  visibility: hidden;\n}\n.dialog:not([open]) .dialog__content {\n  transform: translate(0, -16px) scale(0.98);\n}\n\n.dialog__content {\n  display: flex;\n  flex-direction: column;\n  gap: 16px;\n  padding: var(--dialog-padding, 24px);\n  max-width: 100%;\n  width: 100%;\n  max-height: 100%;\n  overflow: auto;\n\n  background: var(--dialog-background, var(--background));\n  border-radius: var(--dialog-border-radius, 20px);\n  border: var(--dialog-border, var(--border));\n  box-shadow: var(--dialog-box-shadow, var(--box-shadow));\n  transform: translate(0, 0) scale(1);\n  transition: transform 0.2s ease-in-out;\n}\n\n`;\n\nconst DIALOG_HEADER = `\n.dialog__header {\n  display: flex;\n  gap: 4px;\n  justify-content: space-between;\n  font-weight: var(--dialog-header-weight, 600);\n  margin: 0;\n}\n.dialog__title {\n  align-self: center;\n  width: var(--form-width, 272px);\n}\n\n@media (max-width: 600px) {\n  .dialog__title {\n    width: auto;\n  }\n}\n\n.dialog__position:has(.editor) .dialog__title {\n  width: auto;\n}\n\n\n.brand-link {\n  display: inline-flex;\n}\n.brand-link:focus-visible {\n  outline: var(--outline);\n}\n`;\n\nconst FORM = `\n.form {\n  display: flex;\n  overflow: auto;\n  flex-direction: row;\n  gap: 16px;\n  flex: 1 0;\n}\n\n.form fieldset {\n  border: none;\n  margin: 0;\n  padding: 0;\n}\n\n.form__right {\n  flex: 0 0 auto;\n  display: flex;\n  overflow: auto;\n  flex-direction: column;\n  justify-content: space-between;\n  gap: 20px;\n  width: var(--form-width, 100%);\n}\n\n.dialog__position:has(.editor) .form__right {\n  width: var(--form-width, 272px);\n}\n\n.form__top {\n  display: flex;\n  flex-direction: column;\n  gap: 8px;\n}\n\n.form__error-container {\n  color: var(--error-color);\n  fill: var(--error-color);\n}\n\n.form__label {\n  display: flex;\n  flex-direction: column;\n  gap: 4px;\n  margin: 0px;\n}\n\n.form__label__text {\n  display: flex;\n  gap: 4px;\n  align-items: center;\n}\n\n.form__label__text--required {\n  font-size: 0.85em;\n}\n\n.form__input {\n  font-family: inherit;\n  line-height: inherit;\n  background: transparent;\n  box-sizing: border-box;\n  border: var(--input-border, var(--border));\n  border-radius: var(--input-border-radius, 6px);\n  color: var(--input-color, inherit);\n  fill: var(--input-color, inherit);\n  font-size: var(--input-font-size, inherit);\n  font-weight: var(--input-font-weight, 500);\n  padding: 6px 12px;\n}\n\n.form__input::placeholder {\n  opacity: 0.65;\n  color: var(--input-placeholder-color, inherit);\n  filter: var(--interactive-filter);\n}\n\n.form__input:focus-visible {\n  outline: var(--input-focus-outline, var(--outline));\n}\n\n.form__input--textarea {\n  font-family: inherit;\n  resize: vertical;\n}\n\n.error {\n  color: var(--error-color);\n  fill: var(--error-color);\n}\n`;\n\nconst BUTTON = `\n.btn-group {\n  display: grid;\n  gap: 8px;\n}\n\n.btn {\n  line-height: inherit;\n  border: var(--button-border, var(--border));\n  border-radius: var(--button-border-radius, 6px);\n  cursor: pointer;\n  font-family: inherit;\n  font-size: var(--button-font-size, inherit);\n  font-weight: var(--button-font-weight, 600);\n  padding: var(--button-padding, 6px 16px);\n}\n.btn[disabled] {\n  opacity: 0.6;\n  pointer-events: none;\n}\n\n.btn--primary {\n  color: var(--button-primary-color, var(--accent-foreground));\n  fill: var(--button-primary-color, var(--accent-foreground));\n  background: var(--button-primary-background, var(--accent-background));\n  border: var(--button-primary-border, var(--border));\n  border-radius: var(--button-primary-border-radius, 6px);\n  font-weight: var(--button-primary-font-weight, 500);\n}\n.btn--primary:hover {\n  color: var(--button-primary-hover-color, var(--accent-foreground));\n  fill: var(--button-primary-hover-color, var(--accent-foreground));\n  background: var(--button-primary-hover-background, var(--accent-background));\n  filter: var(--interactive-filter);\n}\n.btn--primary:focus-visible {\n  background: var(--button-primary-hover-background, var(--accent-background));\n  filter: var(--interactive-filter);\n  outline: var(--button-primary-focus-outline, var(--outline));\n}\n\n.btn--default {\n  color: var(--button-color, var(--foreground));\n  fill: var(--button-color, var(--foreground));\n  background: var(--button-background, var(--background));\n  border: var(--button-border, var(--border));\n  border-radius: var(--button-border-radius, 6px);\n  font-weight: var(--button-font-weight, 500);\n}\n.btn--default:hover {\n  color: var(--button-color, var(--foreground));\n  fill: var(--button-color, var(--foreground));\n  background: var(--button-hover-background, var(--background));\n  filter: var(--interactive-filter);\n}\n.btn--default:focus-visible {\n  background: var(--button-hover-background, var(--background));\n  filter: var(--interactive-filter);\n  outline: var(--button-focus-outline, var(--outline));\n}\n`;\n\nconst SUCCESS = `\n.success__position {\n  position: fixed;\n  inset: var(--dialog-inset);\n  padding: var(--page-margin);\n  z-index: var(--z-index);\n}\n.success__content {\n  background: var(--success-background, var(--background));\n  border: var(--success-border, var(--border));\n  border-radius: var(--success-border-radius, 1.7em/50%);\n  box-shadow: var(--success-box-shadow, var(--box-shadow));\n  font-weight: var(--success-font-weight, 600);\n  color: var(--success-color);\n  fill: var(--success-color);\n  padding: 12px 24px;\n  line-height: 1.75em;\n\n  display: grid;\n  align-items: center;\n  grid-auto-flow: column;\n  gap: 6px;\n  cursor: default;\n}\n\n.success__icon {\n  display: flex;\n}\n`;\n\n/**\n * Creates <style> element for widget dialog\n */\nexport function createDialogStyles(styleNonce?: string): HTMLStyleElement {\n  const style = DOCUMENT.createElement('style');\n\n  style.textContent = `\n:host {\n  --dialog-inset: var(--inset);\n}\n\n${DIALOG}\n${DIALOG_HEADER}\n${FORM}\n${BUTTON}\n${SUCCESS}\n`;\n\n  if (styleNonce) {\n    style.setAttribute('nonce', styleNonce);\n  }\n\n  return style;\n}\n","import type { Attachment, FeedbackScreenshotIntegration, IntegrationFn } from '@sentry/core';\nimport type { h as hType } from 'preact';\nimport type * as Hooks from 'preact/hooks';\nimport { DOCUMENT } from '../constants';\nimport { ScreenshotEditorFactory } from './components/ScreenshotEditor';\n\nexport const feedbackScreenshotIntegration = ((): FeedbackScreenshotIntegration => {\n  return {\n    name: 'FeedbackScreenshot' as const,\n    setupOnce() {},\n    createInput: ({ h, hooks, dialog, options }) => {\n      const outputBuffer = DOCUMENT.createElement('canvas');\n\n      return {\n        input: ScreenshotEditorFactory({\n          h: h as typeof hType,\n          hooks: hooks as typeof Hooks,\n          outputBuffer,\n          dialog,\n          options,\n        }) as any, // eslint-disable-line @typescript-eslint/no-explicit-any\n\n        value: async () => {\n          const blob = await new Promise<Parameters<BlobCallback>[0]>(resolve => {\n            outputBuffer.toBlob(resolve, 'image/png');\n          });\n          if (blob) {\n            const data = new Uint8Array(await blob.arrayBuffer());\n            const attachment: Attachment = {\n              data,\n              filename: 'screenshot.png',\n              contentType: 'application/png',\n              // attachmentType?: string;\n            };\n            return attachment;\n          }\n          return undefined;\n        },\n      };\n    },\n  };\n}) satisfies IntegrationFn;\n","import { getClient } from '@sentry/core';\nimport type { buildFeedbackIntegration } from './integration';\n\ntype FeedbackIntegration = ReturnType<typeof buildFeedbackIntegration>;\n\n/**\n * This is a small utility to get a type-safe instance of the Feedback integration.\n */\nexport function getFeedback(): ReturnType<FeedbackIntegration> | undefined {\n  const client = getClient();\n  return client?.getIntegrationByName<ReturnType<FeedbackIntegration>>('Feedback');\n}\n","var __defProp = Object.defineProperty;\nvar __defNormalProp = (obj, key, value) => key in obj ? __defProp(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;\nvar __publicField = (obj, key, value) => __defNormalProp(obj, typeof key !== \"symbol\" ? key + \"\" : key, value);\nvar NodeType = /* @__PURE__ */ ((NodeType2) => {\n  NodeType2[NodeType2[\"Document\"] = 0] = \"Document\";\n  NodeType2[NodeType2[\"DocumentType\"] = 1] = \"DocumentType\";\n  NodeType2[NodeType2[\"Element\"] = 2] = \"Element\";\n  NodeType2[NodeType2[\"Text\"] = 3] = \"Text\";\n  NodeType2[NodeType2[\"CDATA\"] = 4] = \"CDATA\";\n  NodeType2[NodeType2[\"Comment\"] = 5] = \"Comment\";\n  return NodeType2;\n})(NodeType || {});\nfunction isElement(n) {\n  return n.nodeType === n.ELEMENT_NODE;\n}\nfunction isShadowRoot(n) {\n  const host = n?.host;\n  return Boolean(host?.shadowRoot === n);\n}\nfunction isNativeShadowDom(shadowRoot) {\n  return Object.prototype.toString.call(shadowRoot) === \"[object ShadowRoot]\";\n}\nfunction fixBrowserCompatibilityIssuesInCSS(cssText) {\n  if (cssText.includes(\" background-clip: text;\") && !cssText.includes(\" -webkit-background-clip: text;\")) {\n    cssText = cssText.replace(\n      /\\sbackground-clip:\\s*text;/g,\n      \" -webkit-background-clip: text; background-clip: text;\"\n    );\n  }\n  return cssText;\n}\nfunction escapeImportStatement(rule) {\n  const { cssText } = rule;\n  if (cssText.split('\"').length < 3) return cssText;\n  const statement = [\"@import\", `url(${JSON.stringify(rule.href)})`];\n  if (rule.layerName === \"\") {\n    statement.push(`layer`);\n  } else if (rule.layerName) {\n    statement.push(`layer(${rule.layerName})`);\n  }\n  if (rule.supportsText) {\n    statement.push(`supports(${rule.supportsText})`);\n  }\n  if (rule.media.length) {\n    statement.push(rule.media.mediaText);\n  }\n  return statement.join(\" \") + \";\";\n}\nfunction stringifyStylesheet(s) {\n  try {\n    const rules = s.rules || s.cssRules;\n    return rules ? fixBrowserCompatibilityIssuesInCSS(\n      Array.from(rules, stringifyRule).join(\"\")\n    ) : null;\n  } catch (error) {\n    return null;\n  }\n}\nfunction fixAllCssProperty(rule) {\n  let styles = \"\";\n  for (let i = 0; i < rule.style.length; i++) {\n    const styleDeclaration = rule.style;\n    const attribute = styleDeclaration[i];\n    const isImportant = styleDeclaration.getPropertyPriority(attribute);\n    styles += `${attribute}:${styleDeclaration.getPropertyValue(attribute)}${isImportant ? ` !important` : \"\"};`;\n  }\n  return `${rule.selectorText} { ${styles} }`;\n}\nfunction stringifyRule(rule) {\n  let importStringified;\n  if (isCSSImportRule(rule)) {\n    try {\n      importStringified = // for same-origin stylesheets,\n      // we can access the imported stylesheet rules directly\n      stringifyStylesheet(rule.styleSheet) || // work around browser issues with the raw string `@import url(...)` statement\n      escapeImportStatement(rule);\n    } catch (error) {\n    }\n  } else if (isCSSStyleRule(rule)) {\n    let cssText = rule.cssText;\n    const needsSafariColonFix = rule.selectorText.includes(\":\");\n    const needsAllFix = typeof rule.style[\"all\"] === \"string\" && rule.style[\"all\"];\n    if (needsAllFix) {\n      cssText = fixAllCssProperty(rule);\n    }\n    if (needsSafariColonFix) {\n      cssText = fixSafariColons(cssText);\n    }\n    if (needsSafariColonFix || needsAllFix) {\n      return cssText;\n    }\n  }\n  return importStringified || rule.cssText;\n}\nfunction fixSafariColons(cssStringified) {\n  const regex = /(\\[(?:[\\w-]+)[^\\\\])(:(?:[\\w-]+)\\])/gm;\n  return cssStringified.replace(regex, \"$1\\\\$2\");\n}\nfunction isCSSImportRule(rule) {\n  return \"styleSheet\" in rule;\n}\nfunction isCSSStyleRule(rule) {\n  return \"selectorText\" in rule;\n}\nclass Mirror {\n  constructor() {\n    __publicField(this, \"idNodeMap\", /* @__PURE__ */ new Map());\n    __publicField(this, \"nodeMetaMap\", /* @__PURE__ */ new WeakMap());\n  }\n  getId(n) {\n    if (!n) return -1;\n    const id = this.getMeta(n)?.id;\n    return id ?? -1;\n  }\n  getNode(id) {\n    return this.idNodeMap.get(id) || null;\n  }\n  getIds() {\n    return Array.from(this.idNodeMap.keys());\n  }\n  getMeta(n) {\n    return this.nodeMetaMap.get(n) || null;\n  }\n  // removes the node from idNodeMap\n  // doesn't remove the node from nodeMetaMap\n  removeNodeFromMap(n) {\n    const id = this.getId(n);\n    this.idNodeMap.delete(id);\n    if (n.childNodes) {\n      n.childNodes.forEach(\n        (childNode) => this.removeNodeFromMap(childNode)\n      );\n    }\n  }\n  has(id) {\n    return this.idNodeMap.has(id);\n  }\n  hasNode(node) {\n    return this.nodeMetaMap.has(node);\n  }\n  add(n, meta) {\n    const id = meta.id;\n    this.idNodeMap.set(id, n);\n    this.nodeMetaMap.set(n, meta);\n  }\n  replace(id, n) {\n    const oldNode = this.getNode(id);\n    if (oldNode) {\n      const meta = this.nodeMetaMap.get(oldNode);\n      if (meta) this.nodeMetaMap.set(n, meta);\n    }\n    this.idNodeMap.set(id, n);\n  }\n  reset() {\n    this.idNodeMap = /* @__PURE__ */ new Map();\n    this.nodeMetaMap = /* @__PURE__ */ new WeakMap();\n  }\n}\nfunction createMirror() {\n  return new Mirror();\n}\nfunction shouldMaskInput({\n  maskInputOptions,\n  tagName,\n  type\n}) {\n  if (tagName === \"OPTION\") {\n    tagName = \"SELECT\";\n  }\n  return Boolean(\n    maskInputOptions[tagName.toLowerCase()] || type && maskInputOptions[type] || type === \"password\" || // Default to \"text\" option for inputs without a \"type\" attribute defined\n    tagName === \"INPUT\" && !type && maskInputOptions[\"text\"]\n  );\n}\nfunction maskInputValue({\n  isMasked,\n  element,\n  value,\n  maskInputFn\n}) {\n  let text = value || \"\";\n  if (!isMasked) {\n    return text;\n  }\n  if (maskInputFn) {\n    text = maskInputFn(text, element);\n  }\n  return \"*\".repeat(text.length);\n}\nfunction toLowerCase(str) {\n  return str.toLowerCase();\n}\nfunction toUpperCase(str) {\n  return str.toUpperCase();\n}\nconst ORIGINAL_ATTRIBUTE_NAME = \"__rrweb_original__\";\nfunction is2DCanvasBlank(canvas) {\n  const ctx = canvas.getContext(\"2d\");\n  if (!ctx) return true;\n  const chunkSize = 50;\n  for (let x = 0; x < canvas.width; x += chunkSize) {\n    for (let y = 0; y < canvas.height; y += chunkSize) {\n      const getImageData = ctx.getImageData;\n      const originalGetImageData = ORIGINAL_ATTRIBUTE_NAME in getImageData ? getImageData[ORIGINAL_ATTRIBUTE_NAME] : getImageData;\n      const pixelBuffer = new Uint32Array(\n        // eslint-disable-next-line @typescript-eslint/no-unsafe-argument, @typescript-eslint/no-unsafe-member-access\n        originalGetImageData.call(\n          ctx,\n          x,\n          y,\n          Math.min(chunkSize, canvas.width - x),\n          Math.min(chunkSize, canvas.height - y)\n        ).data.buffer\n      );\n      if (pixelBuffer.some((pixel) => pixel !== 0)) return false;\n    }\n  }\n  return true;\n}\nfunction isNodeMetaEqual(a, b) {\n  if (!a || !b || a.type !== b.type) return false;\n  if (a.type === NodeType.Document)\n    return a.compatMode === b.compatMode;\n  else if (a.type === NodeType.DocumentType)\n    return a.name === b.name && a.publicId === b.publicId && a.systemId === b.systemId;\n  else if (a.type === NodeType.Comment || a.type === NodeType.Text || a.type === NodeType.CDATA)\n    return a.textContent === b.textContent;\n  else if (a.type === NodeType.Element)\n    return a.tagName === b.tagName && JSON.stringify(a.attributes) === JSON.stringify(b.attributes) && a.isSVG === b.isSVG && a.needBlock === b.needBlock;\n  return false;\n}\nfunction getInputType(element) {\n  const type = element.type;\n  return element.hasAttribute(\"data-rr-is-password\") ? \"password\" : type ? (\n    // eslint-disable-next-line @typescript-eslint/no-unnecessary-type-assertion\n    toLowerCase(type)\n  ) : null;\n}\nfunction getInputValue(el, tagName, type) {\n  if (tagName === \"INPUT\" && (type === \"radio\" || type === \"checkbox\")) {\n    return el.getAttribute(\"value\") || \"\";\n  }\n  return el.value;\n}\nfunction extractFileExtension(path, baseURL) {\n  let url;\n  try {\n    url = new URL(path, baseURL ?? window.location.href);\n  } catch (err) {\n    return null;\n  }\n  const regex = /\\.([0-9a-z]+)(?:$)/i;\n  const match = url.pathname.match(regex);\n  return match?.[1] ?? null;\n}\nconst cachedImplementations$1 = {};\nfunction getImplementation$1(name) {\n  const cached = cachedImplementations$1[name];\n  if (cached) {\n    return cached;\n  }\n  const document2 = window.document;\n  let impl = window[name];\n  if (document2 && typeof document2.createElement === \"function\") {\n    try {\n      const sandbox = document2.createElement(\"iframe\");\n      sandbox.hidden = true;\n      document2.head.appendChild(sandbox);\n      const contentWindow = sandbox.contentWindow;\n      if (contentWindow && contentWindow[name]) {\n        impl = // eslint-disable-next-line @typescript-eslint/unbound-method\n        contentWindow[name];\n      }\n      document2.head.removeChild(sandbox);\n    } catch (e) {\n    }\n  }\n  return cachedImplementations$1[name] = impl.bind(\n    window\n  );\n}\nfunction setTimeout$1(...rest) {\n  return getImplementation$1(\"setTimeout\")(...rest);\n}\nfunction clearTimeout$1(...rest) {\n  return getImplementation$1(\"clearTimeout\")(...rest);\n}\nfunction getIFrameContentDocument(iframe) {\n  try {\n    return iframe.contentDocument;\n  } catch {\n  }\n}\nfunction getIFrameContentWindow(iframe) {\n  try {\n    return iframe.contentWindow;\n  } catch {\n  }\n}\nlet _id = 1;\nconst tagNameRegex = new RegExp(\"[^a-z0-9-_:]\");\nconst IGNORED_NODE = -2;\nfunction genId() {\n  return _id++;\n}\nfunction getValidTagName(element) {\n  if (element instanceof HTMLFormElement) {\n    return \"form\";\n  }\n  const processedTagName = toLowerCase(element.tagName);\n  if (tagNameRegex.test(processedTagName)) {\n    return \"div\";\n  }\n  return processedTagName;\n}\nfunction extractOrigin(url) {\n  let origin = \"\";\n  if (url.indexOf(\"//\") > -1) {\n    origin = url.split(\"/\").slice(0, 3).join(\"/\");\n  } else {\n    origin = url.split(\"/\")[0];\n  }\n  origin = origin.split(\"?\")[0];\n  return origin;\n}\nlet canvasService;\nlet canvasCtx;\nconst URL_IN_CSS_REF = /url\\((?:(')([^']*)'|(\")(.*?)\"|([^)]*))\\)/gm;\nconst URL_PROTOCOL_MATCH = /^(?:[a-z+]+:)?\\/\\//i;\nconst URL_WWW_MATCH = /^www\\..*/i;\nconst DATA_URI = /^(data:)([^,]*),(.*)/i;\nfunction filterCSSPropertiesFromInlineStyle(cssText, ignoredProperties) {\n  if (!cssText || ignoredProperties.size === 0) {\n    return cssText;\n  }\n  try {\n    const properties = cssText.split(\";\");\n    const filteredProperties = [];\n    for (let property of properties) {\n      property = property.trim();\n      if (!property) continue;\n      const colonIndex = property.indexOf(\":\");\n      if (colonIndex === -1) {\n        filteredProperties.push(property);\n        continue;\n      }\n      const propertyName = property.slice(0, colonIndex).trim();\n      if (!ignoredProperties.has(propertyName)) {\n        filteredProperties.push(property);\n      }\n    }\n    return filteredProperties.join(\"; \") + (filteredProperties.length > 0 && cssText.endsWith(\";\") ? \";\" : \"\");\n  } catch (error) {\n    console.warn(\"Error filtering CSS properties:\", error);\n    return cssText;\n  }\n}\nfunction absoluteToStylesheet(cssText, href) {\n  return (cssText || \"\").replace(\n    URL_IN_CSS_REF,\n    (origin, quote1, path1, quote2, path2, path3) => {\n      const filePath = path1 || path2 || path3;\n      const maybeQuote = quote1 || quote2 || \"\";\n      if (!filePath) {\n        return origin;\n      }\n      if (URL_PROTOCOL_MATCH.test(filePath) || URL_WWW_MATCH.test(filePath)) {\n        return `url(${maybeQuote}${filePath}${maybeQuote})`;\n      }\n      if (DATA_URI.test(filePath)) {\n        return `url(${maybeQuote}${filePath}${maybeQuote})`;\n      }\n      if (filePath[0] === \"/\") {\n        return `url(${maybeQuote}${extractOrigin(href) + filePath}${maybeQuote})`;\n      }\n      const stack = href.split(\"/\");\n      const parts = filePath.split(\"/\");\n      stack.pop();\n      for (const part of parts) {\n        if (part === \".\") {\n          continue;\n        } else if (part === \"..\") {\n          stack.pop();\n        } else {\n          stack.push(part);\n        }\n      }\n      return `url(${maybeQuote}${stack.join(\"/\")}${maybeQuote})`;\n    }\n  );\n}\nconst SRCSET_NOT_SPACES = /^[^ \\t\\n\\r\\u000c]+/;\nconst SRCSET_COMMAS_OR_SPACES = /^[, \\t\\n\\r\\u000c]+/;\nfunction getAbsoluteSrcsetString(doc, attributeValue) {\n  if (attributeValue.trim() === \"\") {\n    return attributeValue;\n  }\n  let pos = 0;\n  function collectCharacters(regEx) {\n    let chars2;\n    const match = regEx.exec(attributeValue.substring(pos));\n    if (match) {\n      chars2 = match[0];\n      pos += chars2.length;\n      return chars2;\n    }\n    return \"\";\n  }\n  const output = [];\n  while (true) {\n    collectCharacters(SRCSET_COMMAS_OR_SPACES);\n    if (pos >= attributeValue.length) {\n      break;\n    }\n    let url = collectCharacters(SRCSET_NOT_SPACES);\n    if (url.slice(-1) === \",\") {\n      url = absoluteToDoc(doc, url.substring(0, url.length - 1));\n      output.push(url);\n    } else {\n      let descriptorsStr = \"\";\n      url = absoluteToDoc(doc, url);\n      let inParens = false;\n      while (true) {\n        const c = attributeValue.charAt(pos);\n        if (c === \"\") {\n          output.push((url + descriptorsStr).trim());\n          break;\n        } else if (!inParens) {\n          if (c === \",\") {\n            pos += 1;\n            output.push((url + descriptorsStr).trim());\n            break;\n          } else if (c === \"(\") {\n            inParens = true;\n          }\n        } else {\n          if (c === \")\") {\n            inParens = false;\n          }\n        }\n        descriptorsStr += c;\n        pos += 1;\n      }\n    }\n  }\n  return output.join(\", \");\n}\nconst cachedDocument = /* @__PURE__ */ new WeakMap();\nfunction absoluteToDoc(doc, attributeValue) {\n  if (!attributeValue || attributeValue.trim() === \"\") {\n    return attributeValue;\n  }\n  return getHref(doc, attributeValue);\n}\nfunction isSVGElement(el) {\n  return Boolean(el.tagName === \"svg\" || el.ownerSVGElement);\n}\nfunction getHref(doc, customHref) {\n  let a = cachedDocument.get(doc);\n  if (!a) {\n    a = doc.createElement(\"a\");\n    cachedDocument.set(doc, a);\n  }\n  if (!customHref) {\n    customHref = \"\";\n  } else if (customHref.startsWith(\"blob:\") || customHref.startsWith(\"data:\")) {\n    return customHref;\n  }\n  a.setAttribute(\"href\", customHref);\n  return a.href;\n}\nfunction transformAttribute(doc, tagName, name, value, element, maskAttributeFn, ignoreCSSAttributes) {\n  if (!value) {\n    return value;\n  }\n  if (name === \"src\" || name === \"href\" && !(tagName === \"use\" && value[0] === \"#\")) {\n    return absoluteToDoc(doc, value);\n  } else if (name === \"xlink:href\" && value[0] !== \"#\") {\n    return absoluteToDoc(doc, value);\n  } else if (name === \"background\" && (tagName === \"table\" || tagName === \"td\" || tagName === \"th\")) {\n    return absoluteToDoc(doc, value);\n  } else if (name === \"srcset\") {\n    return getAbsoluteSrcsetString(doc, value);\n  } else if (name === \"style\") {\n    let processedStyle = absoluteToStylesheet(value, getHref(doc));\n    if (ignoreCSSAttributes && ignoreCSSAttributes.size > 0) {\n      processedStyle = filterCSSPropertiesFromInlineStyle(\n        processedStyle,\n        ignoreCSSAttributes\n      );\n    }\n    return processedStyle;\n  } else if (tagName === \"object\" && name === \"data\") {\n    return absoluteToDoc(doc, value);\n  }\n  if (typeof maskAttributeFn === \"function\") {\n    return maskAttributeFn(name, value, element);\n  }\n  return value;\n}\nfunction ignoreAttribute(tagName, name, _value) {\n  return (tagName === \"video\" || tagName === \"audio\") && name === \"autoplay\";\n}\nfunction _isBlockedElement(element, blockClass, blockSelector, unblockSelector) {\n  try {\n    if (unblockSelector && element.matches(unblockSelector)) {\n      return false;\n    }\n    if (typeof blockClass === \"string\") {\n      if (element.classList.contains(blockClass)) {\n        return true;\n      }\n    } else {\n      for (let eIndex = element.classList.length; eIndex--; ) {\n        const className = element.classList[eIndex];\n        if (blockClass.test(className)) {\n          return true;\n        }\n      }\n    }\n    if (blockSelector) {\n      return element.matches(blockSelector);\n    }\n  } catch (e) {\n  }\n  return false;\n}\nfunction elementClassMatchesRegex(el, regex) {\n  for (let eIndex = el.classList.length; eIndex--; ) {\n    const className = el.classList[eIndex];\n    if (regex.test(className)) {\n      return true;\n    }\n  }\n  return false;\n}\nfunction distanceToMatch(node, matchPredicate, limit = Infinity, distance = 0) {\n  if (!node) return -1;\n  if (node.nodeType !== node.ELEMENT_NODE) return -1;\n  if (distance > limit) return -1;\n  if (matchPredicate(node)) return distance;\n  return distanceToMatch(node.parentNode, matchPredicate, limit, distance + 1);\n}\nfunction createMatchPredicate(className, selector) {\n  return (node) => {\n    const el = node;\n    if (el === null) return false;\n    try {\n      if (className) {\n        if (typeof className === \"string\") {\n          if (el.matches(`.${className}`)) return true;\n        } else if (elementClassMatchesRegex(el, className)) {\n          return true;\n        }\n      }\n      if (selector && el.matches(selector)) return true;\n      return false;\n    } catch {\n      return false;\n    }\n  };\n}\nfunction needMaskingText(node, maskTextClass, maskTextSelector, unmaskTextClass, unmaskTextSelector, maskAllText) {\n  try {\n    const el = node.nodeType === node.ELEMENT_NODE ? node : node.parentElement;\n    if (el === null) return false;\n    if (el.tagName === \"INPUT\") {\n      const autocomplete = el.getAttribute(\"autocomplete\");\n      const disallowedAutocompleteValues = [\n        \"current-password\",\n        \"new-password\",\n        \"cc-number\",\n        \"cc-exp\",\n        \"cc-exp-month\",\n        \"cc-exp-year\",\n        \"cc-csc\"\n      ];\n      if (disallowedAutocompleteValues.includes(autocomplete)) {\n        return true;\n      }\n    }\n    let maskDistance = -1;\n    let unmaskDistance = -1;\n    if (maskAllText) {\n      unmaskDistance = distanceToMatch(\n        el,\n        createMatchPredicate(unmaskTextClass, unmaskTextSelector)\n      );\n      if (unmaskDistance < 0) {\n        return true;\n      }\n      maskDistance = distanceToMatch(\n        el,\n        createMatchPredicate(maskTextClass, maskTextSelector),\n        unmaskDistance >= 0 ? unmaskDistance : Infinity\n      );\n    } else {\n      maskDistance = distanceToMatch(\n        el,\n        createMatchPredicate(maskTextClass, maskTextSelector)\n      );\n      if (maskDistance < 0) {\n        return false;\n      }\n      unmaskDistance = distanceToMatch(\n        el,\n        createMatchPredicate(unmaskTextClass, unmaskTextSelector),\n        maskDistance >= 0 ? maskDistance : Infinity\n      );\n    }\n    return maskDistance >= 0 ? unmaskDistance >= 0 ? maskDistance <= unmaskDistance : true : unmaskDistance >= 0 ? false : !!maskAllText;\n  } catch (e) {\n  }\n  return !!maskAllText;\n}\nfunction onceIframeLoaded(iframeEl, listener, iframeLoadTimeout) {\n  const win = getIFrameContentWindow(iframeEl);\n  if (!win) {\n    return;\n  }\n  let fired = false;\n  let readyState;\n  try {\n    readyState = win.document.readyState;\n  } catch (error) {\n    return;\n  }\n  if (readyState !== \"complete\") {\n    const timer = setTimeout$1(() => {\n      if (!fired) {\n        listener();\n        fired = true;\n      }\n    }, iframeLoadTimeout);\n    iframeEl.addEventListener(\"load\", () => {\n      clearTimeout$1(timer);\n      fired = true;\n      listener();\n    });\n    return;\n  }\n  const blankUrl = \"about:blank\";\n  if (win.location.href !== blankUrl || iframeEl.src === blankUrl || iframeEl.src === \"\") {\n    setTimeout$1(listener, 0);\n    return iframeEl.addEventListener(\"load\", listener);\n  }\n  iframeEl.addEventListener(\"load\", listener);\n}\nfunction onceStylesheetLoaded(link, listener, styleSheetLoadTimeout) {\n  let fired = false;\n  let styleSheetLoaded;\n  try {\n    styleSheetLoaded = link.sheet;\n  } catch (error) {\n    styleSheetLoaded = null;\n  }\n  if (styleSheetLoaded) return;\n  const timer = setTimeout$1(() => {\n    if (!fired) {\n      listener();\n      fired = true;\n    }\n  }, styleSheetLoadTimeout);\n  link.addEventListener(\"load\", () => {\n    clearTimeout$1(timer);\n    fired = true;\n    listener();\n  });\n}\nfunction serializeNode(n, options) {\n  const {\n    doc,\n    mirror,\n    blockClass,\n    blockSelector,\n    unblockSelector,\n    maskAllText,\n    maskAttributeFn,\n    maskTextClass,\n    unmaskTextClass,\n    maskTextSelector,\n    unmaskTextSelector,\n    inlineStylesheet,\n    maskInputOptions = {},\n    maskTextFn,\n    maskInputFn,\n    dataURLOptions = {},\n    inlineImages,\n    recordCanvas,\n    keepIframeSrcFn,\n    newlyAddedElement = false,\n    ignoreCSSAttributes\n  } = options;\n  const rootId = getRootId(doc, mirror);\n  switch (n.nodeType) {\n    case n.DOCUMENT_NODE:\n      if (n.compatMode !== \"CSS1Compat\") {\n        return {\n          type: NodeType.Document,\n          childNodes: [],\n          compatMode: n.compatMode\n          // probably \"BackCompat\"\n        };\n      } else {\n        return {\n          type: NodeType.Document,\n          childNodes: []\n        };\n      }\n    case n.DOCUMENT_TYPE_NODE:\n      return {\n        type: NodeType.DocumentType,\n        name: n.name,\n        publicId: n.publicId,\n        systemId: n.systemId,\n        rootId\n      };\n    case n.ELEMENT_NODE:\n      return serializeElementNode(n, {\n        doc,\n        blockClass,\n        blockSelector,\n        unblockSelector,\n        inlineStylesheet,\n        maskAttributeFn,\n        maskInputOptions,\n        maskInputFn,\n        dataURLOptions,\n        inlineImages,\n        recordCanvas,\n        keepIframeSrcFn,\n        newlyAddedElement,\n        rootId,\n        maskTextClass,\n        unmaskTextClass,\n        maskTextSelector,\n        unmaskTextSelector,\n        ignoreCSSAttributes\n      });\n    case n.TEXT_NODE:\n      return serializeTextNode(n, {\n        doc,\n        maskAllText,\n        maskTextClass,\n        unmaskTextClass,\n        maskTextSelector,\n        unmaskTextSelector,\n        maskTextFn,\n        maskInputOptions,\n        maskInputFn,\n        rootId\n      });\n    case n.CDATA_SECTION_NODE:\n      return {\n        type: NodeType.CDATA,\n        textContent: \"\",\n        rootId\n      };\n    case n.COMMENT_NODE:\n      return {\n        type: NodeType.Comment,\n        textContent: n.textContent || \"\",\n        rootId\n      };\n    default:\n      return false;\n  }\n}\nfunction getRootId(doc, mirror) {\n  if (!mirror.hasNode(doc)) return void 0;\n  const docId = mirror.getId(doc);\n  return docId === 1 ? void 0 : docId;\n}\nfunction serializeTextNode(n, options) {\n  const {\n    maskAllText,\n    maskTextClass,\n    unmaskTextClass,\n    maskTextSelector,\n    unmaskTextSelector,\n    maskTextFn,\n    maskInputOptions,\n    maskInputFn,\n    rootId\n  } = options;\n  const parentTagName = n.parentNode && n.parentNode.tagName;\n  let textContent = n.textContent;\n  const isStyle = parentTagName === \"STYLE\" ? true : void 0;\n  const isScript = parentTagName === \"SCRIPT\" ? true : void 0;\n  const isTextarea = parentTagName === \"TEXTAREA\" ? true : void 0;\n  if (isStyle && textContent) {\n    try {\n      if (n.nextSibling || n.previousSibling) {\n      } else if (n.parentNode.sheet?.cssRules) {\n        textContent = stringifyStylesheet(\n          n.parentNode.sheet\n        );\n      }\n    } catch (err) {\n      console.warn(\n        `Cannot get CSS styles from text's parentNode. Error: ${err}`,\n        n\n      );\n    }\n    textContent = absoluteToStylesheet(textContent, getHref(options.doc));\n  }\n  if (isScript) {\n    textContent = \"SCRIPT_PLACEHOLDER\";\n  }\n  const forceMask = needMaskingText(\n    n,\n    maskTextClass,\n    maskTextSelector,\n    unmaskTextClass,\n    unmaskTextSelector,\n    maskAllText\n  );\n  if (!isStyle && !isScript && !isTextarea && textContent && forceMask) {\n    textContent = maskTextFn ? maskTextFn(textContent, n.parentElement) : textContent.replace(/[\\S]/g, \"*\");\n  }\n  if (isTextarea && textContent && (maskInputOptions.textarea || forceMask)) {\n    textContent = maskInputFn ? maskInputFn(textContent, n.parentNode) : textContent.replace(/[\\S]/g, \"*\");\n  }\n  if (parentTagName === \"OPTION\" && textContent) {\n    const isInputMasked = shouldMaskInput({\n      type: null,\n      tagName: parentTagName,\n      maskInputOptions\n    });\n    textContent = maskInputValue({\n      isMasked: needMaskingText(\n        n,\n        maskTextClass,\n        maskTextSelector,\n        unmaskTextClass,\n        unmaskTextSelector,\n        isInputMasked\n      ),\n      element: n,\n      value: textContent,\n      maskInputFn\n    });\n  }\n  return {\n    type: NodeType.Text,\n    textContent: textContent || \"\",\n    isStyle,\n    rootId\n  };\n}\nfunction serializeElementNode(n, options) {\n  const {\n    doc,\n    blockClass,\n    blockSelector,\n    unblockSelector,\n    inlineStylesheet,\n    maskInputOptions = {},\n    maskAttributeFn,\n    maskInputFn,\n    dataURLOptions = {},\n    inlineImages,\n    recordCanvas,\n    keepIframeSrcFn,\n    newlyAddedElement = false,\n    rootId,\n    maskTextClass,\n    unmaskTextClass,\n    maskTextSelector,\n    unmaskTextSelector,\n    ignoreCSSAttributes\n  } = options;\n  const needBlock = _isBlockedElement(\n    n,\n    blockClass,\n    blockSelector,\n    unblockSelector\n  );\n  const tagName = getValidTagName(n);\n  let attributes2 = {};\n  const len = n.attributes.length;\n  for (let i = 0; i < len; i++) {\n    const attr = n.attributes[i];\n    if (attr.name && !ignoreAttribute(tagName, attr.name, attr.value)) {\n      attributes2[attr.name] = transformAttribute(\n        doc,\n        tagName,\n        toLowerCase(attr.name),\n        attr.value,\n        n,\n        maskAttributeFn,\n        ignoreCSSAttributes\n      );\n    }\n  }\n  if (tagName === \"link\" && inlineStylesheet) {\n    const stylesheet = Array.from(doc.styleSheets).find((s) => {\n      return s.href === n.href;\n    });\n    let cssText = null;\n    if (stylesheet) {\n      cssText = stringifyStylesheet(stylesheet);\n    }\n    if (cssText) {\n      attributes2.rel = null;\n      attributes2.href = null;\n      attributes2.crossorigin = null;\n      attributes2._cssText = absoluteToStylesheet(cssText, stylesheet.href);\n    }\n  }\n  if (tagName === \"style\" && n.sheet && // TODO: Currently we only try to get dynamic stylesheet when it is an empty style element\n  !(n.innerText || n.textContent || \"\").trim().length) {\n    const cssText = stringifyStylesheet(\n      n.sheet\n    );\n    if (cssText) {\n      attributes2._cssText = absoluteToStylesheet(cssText, getHref(doc));\n    }\n  }\n  if (tagName === \"input\" || tagName === \"textarea\" || tagName === \"select\" || tagName === \"option\") {\n    const el = n;\n    const type = getInputType(el);\n    const value = getInputValue(el, toUpperCase(tagName), type);\n    const checked = el.checked;\n    if (type !== \"submit\" && type !== \"button\" && value) {\n      const forceMask = needMaskingText(\n        el,\n        maskTextClass,\n        maskTextSelector,\n        unmaskTextClass,\n        unmaskTextSelector,\n        shouldMaskInput({\n          type,\n          tagName: toUpperCase(tagName),\n          maskInputOptions\n        })\n      );\n      attributes2.value = maskInputValue({\n        isMasked: forceMask,\n        element: el,\n        value,\n        maskInputFn\n      });\n    }\n    if (checked) {\n      attributes2.checked = checked;\n    }\n  }\n  if (tagName === \"option\") {\n    if (n.selected && !maskInputOptions[\"select\"]) {\n      attributes2.selected = true;\n    } else {\n      delete attributes2.selected;\n    }\n  }\n  if (tagName === \"canvas\" && recordCanvas) {\n    if (n.__context === \"2d\") {\n      if (!is2DCanvasBlank(n)) {\n        attributes2.rr_dataURL = n.toDataURL(\n          dataURLOptions.type,\n          dataURLOptions.quality\n        );\n      }\n    } else if (!(\"__context\" in n)) {\n      const canvasDataURL = n.toDataURL(\n        dataURLOptions.type,\n        dataURLOptions.quality\n      );\n      const blankCanvas = doc.createElement(\"canvas\");\n      blankCanvas.width = n.width;\n      blankCanvas.height = n.height;\n      const blankCanvasDataURL = blankCanvas.toDataURL(\n        dataURLOptions.type,\n        dataURLOptions.quality\n      );\n      if (canvasDataURL !== blankCanvasDataURL) {\n        attributes2.rr_dataURL = canvasDataURL;\n      }\n    }\n  }\n  if (tagName === \"img\" && inlineImages) {\n    if (!canvasService) {\n      canvasService = doc.createElement(\"canvas\");\n      canvasCtx = canvasService.getContext(\"2d\");\n    }\n    const image = n;\n    const imageSrc = image.currentSrc || image.getAttribute(\"src\") || \"<unknown-src>\";\n    const priorCrossOrigin = image.crossOrigin;\n    const recordInlineImage = () => {\n      image.removeEventListener(\"load\", recordInlineImage);\n      try {\n        canvasService.width = image.naturalWidth;\n        canvasService.height = image.naturalHeight;\n        canvasCtx.drawImage(image, 0, 0);\n        attributes2.rr_dataURL = canvasService.toDataURL(\n          dataURLOptions.type,\n          dataURLOptions.quality\n        );\n      } catch (err) {\n        if (image.crossOrigin !== \"anonymous\") {\n          image.crossOrigin = \"anonymous\";\n          if (image.complete && image.naturalWidth !== 0)\n            recordInlineImage();\n          else image.addEventListener(\"load\", recordInlineImage);\n          return;\n        } else {\n          console.warn(\n            `Cannot inline img src=${imageSrc}! Error: ${err}`\n          );\n        }\n      }\n      if (image.crossOrigin === \"anonymous\") {\n        priorCrossOrigin ? attributes2.crossOrigin = priorCrossOrigin : image.removeAttribute(\"crossorigin\");\n      }\n    };\n    if (image.complete && image.naturalWidth !== 0) recordInlineImage();\n    else image.addEventListener(\"load\", recordInlineImage);\n  }\n  if (tagName === \"audio\" || tagName === \"video\") {\n    attributes2.rr_mediaState = n.paused ? \"paused\" : \"played\";\n    attributes2.rr_mediaCurrentTime = n.currentTime;\n  }\n  if (!newlyAddedElement) {\n    if (n.scrollLeft) {\n      attributes2.rr_scrollLeft = n.scrollLeft;\n    }\n    if (n.scrollTop) {\n      attributes2.rr_scrollTop = n.scrollTop;\n    }\n  }\n  if (needBlock) {\n    const { width, height } = n.getBoundingClientRect();\n    attributes2 = {\n      class: attributes2.class,\n      rr_width: `${width}px`,\n      rr_height: `${height}px`\n    };\n  }\n  if (tagName === \"iframe\" && !keepIframeSrcFn(attributes2.src)) {\n    if (!needBlock && !getIFrameContentDocument(n)) {\n      attributes2.rr_src = attributes2.src;\n    }\n    delete attributes2.src;\n  }\n  let isCustomElement;\n  try {\n    if (customElements.get(tagName)) isCustomElement = true;\n  } catch (e) {\n  }\n  return {\n    type: NodeType.Element,\n    tagName,\n    attributes: attributes2,\n    childNodes: [],\n    isSVG: isSVGElement(n) || void 0,\n    needBlock,\n    rootId,\n    isCustom: isCustomElement\n  };\n}\nfunction lowerIfExists(maybeAttr) {\n  if (maybeAttr === void 0 || maybeAttr === null) {\n    return \"\";\n  } else {\n    return maybeAttr.toLowerCase();\n  }\n}\nfunction slimDOMExcluded(sn, slimDOMOptions) {\n  if (slimDOMOptions.comment && sn.type === NodeType.Comment) {\n    return true;\n  } else if (sn.type === NodeType.Element) {\n    if (slimDOMOptions.script && // script tag\n    (sn.tagName === \"script\" || // (module)preload link\n    sn.tagName === \"link\" && (sn.attributes.rel === \"preload\" || sn.attributes.rel === \"modulepreload\") || // prefetch link\n    sn.tagName === \"link\" && sn.attributes.rel === \"prefetch\" && typeof sn.attributes.href === \"string\" && extractFileExtension(sn.attributes.href) === \"js\")) {\n      return true;\n    } else if (slimDOMOptions.headFavicon && (sn.tagName === \"link\" && sn.attributes.rel === \"shortcut icon\" || sn.tagName === \"meta\" && (lowerIfExists(sn.attributes.name).match(\n      /^msapplication-tile(image|color)$/\n    ) || lowerIfExists(sn.attributes.name) === \"application-name\" || lowerIfExists(sn.attributes.rel) === \"icon\" || lowerIfExists(sn.attributes.rel) === \"apple-touch-icon\" || lowerIfExists(sn.attributes.rel) === \"shortcut icon\"))) {\n      return true;\n    } else if (sn.tagName === \"meta\") {\n      if (slimDOMOptions.headMetaDescKeywords && lowerIfExists(sn.attributes.name).match(/^description|keywords$/)) {\n        return true;\n      } else if (slimDOMOptions.headMetaSocial && (lowerIfExists(sn.attributes.property).match(/^(og|twitter|fb):/) || // og = opengraph (facebook)\n      lowerIfExists(sn.attributes.name).match(/^(og|twitter):/) || lowerIfExists(sn.attributes.name) === \"pinterest\")) {\n        return true;\n      } else if (slimDOMOptions.headMetaRobots && (lowerIfExists(sn.attributes.name) === \"robots\" || lowerIfExists(sn.attributes.name) === \"googlebot\" || lowerIfExists(sn.attributes.name) === \"bingbot\")) {\n        return true;\n      } else if (slimDOMOptions.headMetaHttpEquiv && sn.attributes[\"http-equiv\"] !== void 0) {\n        return true;\n      } else if (slimDOMOptions.headMetaAuthorship && (lowerIfExists(sn.attributes.name) === \"author\" || lowerIfExists(sn.attributes.name) === \"generator\" || lowerIfExists(sn.attributes.name) === \"framework\" || lowerIfExists(sn.attributes.name) === \"publisher\" || lowerIfExists(sn.attributes.name) === \"progid\" || lowerIfExists(sn.attributes.property).match(/^article:/) || lowerIfExists(sn.attributes.property).match(/^product:/))) {\n        return true;\n      } else if (slimDOMOptions.headMetaVerification && (lowerIfExists(sn.attributes.name) === \"google-site-verification\" || lowerIfExists(sn.attributes.name) === \"yandex-verification\" || lowerIfExists(sn.attributes.name) === \"csrf-token\" || lowerIfExists(sn.attributes.name) === \"p:domain_verify\" || lowerIfExists(sn.attributes.name) === \"verify-v1\" || lowerIfExists(sn.attributes.name) === \"verification\" || lowerIfExists(sn.attributes.name) === \"shopify-checkout-api-token\")) {\n        return true;\n      }\n    }\n  }\n  return false;\n}\nfunction serializeNodeWithId(n, options) {\n  const {\n    doc,\n    mirror,\n    blockClass,\n    blockSelector,\n    unblockSelector,\n    maskAllText,\n    maskTextClass,\n    unmaskTextClass,\n    maskTextSelector,\n    unmaskTextSelector,\n    skipChild = false,\n    inlineStylesheet = true,\n    maskInputOptions = {},\n    maskAttributeFn,\n    maskTextFn,\n    maskInputFn,\n    slimDOMOptions,\n    dataURLOptions = {},\n    inlineImages = false,\n    recordCanvas = false,\n    onSerialize,\n    onIframeLoad,\n    iframeLoadTimeout = 5e3,\n    onBlockedImageLoad,\n    onStylesheetLoad,\n    stylesheetLoadTimeout = 5e3,\n    keepIframeSrcFn = () => false,\n    newlyAddedElement = false,\n    ignoreCSSAttributes\n  } = options;\n  let { preserveWhiteSpace = true } = options;\n  const _serializedNode = serializeNode(n, {\n    doc,\n    mirror,\n    blockClass,\n    blockSelector,\n    maskAllText,\n    unblockSelector,\n    maskTextClass,\n    unmaskTextClass,\n    maskTextSelector,\n    unmaskTextSelector,\n    inlineStylesheet,\n    maskInputOptions,\n    maskAttributeFn,\n    maskTextFn,\n    maskInputFn,\n    dataURLOptions,\n    inlineImages,\n    recordCanvas,\n    keepIframeSrcFn,\n    newlyAddedElement,\n    ignoreCSSAttributes\n  });\n  if (!_serializedNode) {\n    console.warn(n, \"not serialized\");\n    return null;\n  }\n  let id;\n  if (mirror.hasNode(n)) {\n    id = mirror.getId(n);\n  } else if (slimDOMExcluded(_serializedNode, slimDOMOptions) || !preserveWhiteSpace && _serializedNode.type === NodeType.Text && !_serializedNode.isStyle && !_serializedNode.textContent.trim().length) {\n    id = IGNORED_NODE;\n  } else {\n    id = genId();\n  }\n  const serializedNode2 = Object.assign(_serializedNode, { id });\n  mirror.add(n, serializedNode2);\n  if (id === IGNORED_NODE) {\n    return null;\n  }\n  if (onSerialize) {\n    onSerialize(n);\n  }\n  let recordChild = !skipChild;\n  if (serializedNode2.type === NodeType.Element) {\n    recordChild = recordChild && !serializedNode2.needBlock;\n    const shadowRoot = n.shadowRoot;\n    if (shadowRoot && isNativeShadowDom(shadowRoot))\n      serializedNode2.isShadowHost = true;\n  }\n  if ((serializedNode2.type === NodeType.Document || serializedNode2.type === NodeType.Element) && recordChild) {\n    if (slimDOMOptions.headWhitespace && serializedNode2.type === NodeType.Element && serializedNode2.tagName === \"head\") {\n      preserveWhiteSpace = false;\n    }\n    const bypassOptions = {\n      doc,\n      mirror,\n      blockClass,\n      blockSelector,\n      maskAllText,\n      unblockSelector,\n      maskTextClass,\n      unmaskTextClass,\n      maskTextSelector,\n      unmaskTextSelector,\n      skipChild,\n      inlineStylesheet,\n      maskInputOptions,\n      maskAttributeFn,\n      maskTextFn,\n      maskInputFn,\n      slimDOMOptions,\n      dataURLOptions,\n      inlineImages,\n      recordCanvas,\n      preserveWhiteSpace,\n      onSerialize,\n      onIframeLoad,\n      iframeLoadTimeout,\n      onBlockedImageLoad,\n      onStylesheetLoad,\n      stylesheetLoadTimeout,\n      keepIframeSrcFn,\n      ignoreCSSAttributes\n    };\n    const childNodes = n.childNodes ? Array.from(n.childNodes) : [];\n    for (const childN of childNodes) {\n      const serializedChildNode = serializeNodeWithId(childN, bypassOptions);\n      if (serializedChildNode) {\n        serializedNode2.childNodes.push(serializedChildNode);\n      }\n    }\n    if (isElement(n) && n.shadowRoot) {\n      for (const childN of Array.from(n.shadowRoot.childNodes)) {\n        const serializedChildNode = serializeNodeWithId(childN, bypassOptions);\n        if (serializedChildNode) {\n          isNativeShadowDom(n.shadowRoot) && (serializedChildNode.isShadow = true);\n          serializedNode2.childNodes.push(serializedChildNode);\n        }\n      }\n    }\n  }\n  if (n.parentNode && isShadowRoot(n.parentNode) && isNativeShadowDom(n.parentNode)) {\n    serializedNode2.isShadow = true;\n  }\n  if (serializedNode2.type === NodeType.Element && serializedNode2.tagName === \"iframe\" && !serializedNode2.needBlock) {\n    onceIframeLoaded(\n      n,\n      () => {\n        const iframeDoc = getIFrameContentDocument(n);\n        if (iframeDoc && onIframeLoad) {\n          const serializedIframeNode = serializeNodeWithId(iframeDoc, {\n            doc: iframeDoc,\n            mirror,\n            blockClass,\n            blockSelector,\n            unblockSelector,\n            maskAllText,\n            maskTextClass,\n            unmaskTextClass,\n            maskTextSelector,\n            unmaskTextSelector,\n            skipChild: false,\n            inlineStylesheet,\n            maskInputOptions,\n            maskAttributeFn,\n            maskTextFn,\n            maskInputFn,\n            slimDOMOptions,\n            dataURLOptions,\n            inlineImages,\n            recordCanvas,\n            preserveWhiteSpace,\n            onSerialize,\n            onIframeLoad,\n            iframeLoadTimeout,\n            onStylesheetLoad,\n            stylesheetLoadTimeout,\n            keepIframeSrcFn,\n            ignoreCSSAttributes\n          });\n          if (serializedIframeNode) {\n            onIframeLoad(\n              n,\n              serializedIframeNode\n            );\n          }\n        }\n      },\n      iframeLoadTimeout\n    );\n  }\n  if (serializedNode2.type === NodeType.Element && serializedNode2.tagName === \"img\" && !n.complete && serializedNode2.needBlock) {\n    const image = n;\n    const updateImageDimensions = () => {\n      if (image.isConnected && !image.complete && onBlockedImageLoad) {\n        try {\n          const rect = image.getBoundingClientRect();\n          if (rect.width > 0 && rect.height > 0) {\n            onBlockedImageLoad(image, serializedNode2, rect);\n          }\n        } catch (error) {\n        }\n      }\n      image.removeEventListener(\"load\", updateImageDimensions);\n    };\n    if (image.isConnected) {\n      image.addEventListener(\"load\", updateImageDimensions);\n    }\n  }\n  if (serializedNode2.type === NodeType.Element && serializedNode2.tagName === \"link\" && typeof serializedNode2.attributes.rel === \"string\" && (serializedNode2.attributes.rel === \"stylesheet\" || serializedNode2.attributes.rel === \"preload\" && typeof serializedNode2.attributes.href === \"string\" && extractFileExtension(serializedNode2.attributes.href) === \"css\")) {\n    onceStylesheetLoaded(\n      n,\n      () => {\n        if (onStylesheetLoad) {\n          const serializedLinkNode = serializeNodeWithId(n, {\n            doc,\n            mirror,\n            blockClass,\n            blockSelector,\n            unblockSelector,\n            maskAllText,\n            maskTextClass,\n            unmaskTextClass,\n            maskTextSelector,\n            unmaskTextSelector,\n            skipChild: false,\n            inlineStylesheet,\n            maskInputOptions,\n            maskAttributeFn,\n            maskTextFn,\n            maskInputFn,\n            slimDOMOptions,\n            dataURLOptions,\n            inlineImages,\n            recordCanvas,\n            preserveWhiteSpace,\n            onSerialize,\n            onIframeLoad,\n            iframeLoadTimeout,\n            onStylesheetLoad,\n            stylesheetLoadTimeout,\n            keepIframeSrcFn,\n            ignoreCSSAttributes\n          });\n          if (serializedLinkNode) {\n            onStylesheetLoad(\n              n,\n              serializedLinkNode\n            );\n          }\n        }\n      },\n      stylesheetLoadTimeout\n    );\n  }\n  if (serializedNode2.type === NodeType.Element) {\n    delete serializedNode2.needBlock;\n  }\n  return serializedNode2;\n}\nfunction snapshot(n, options) {\n  const {\n    mirror = new Mirror(),\n    blockClass = \"rr-block\",\n    blockSelector = null,\n    unblockSelector = null,\n    maskAllText = false,\n    maskTextClass = \"rr-mask\",\n    unmaskTextClass = null,\n    maskTextSelector = null,\n    unmaskTextSelector = null,\n    inlineStylesheet = true,\n    inlineImages = false,\n    recordCanvas = false,\n    maskAllInputs = false,\n    maskAttributeFn,\n    maskTextFn,\n    maskInputFn,\n    slimDOM = false,\n    dataURLOptions,\n    preserveWhiteSpace,\n    onSerialize,\n    onIframeLoad,\n    iframeLoadTimeout,\n    onBlockedImageLoad,\n    onStylesheetLoad,\n    stylesheetLoadTimeout,\n    keepIframeSrcFn = () => false,\n    ignoreCSSAttributes = /* @__PURE__ */ new Set([])\n  } = options || {};\n  const maskInputOptions = maskAllInputs === true ? {\n    color: true,\n    date: true,\n    \"datetime-local\": true,\n    email: true,\n    month: true,\n    number: true,\n    range: true,\n    search: true,\n    tel: true,\n    text: true,\n    time: true,\n    url: true,\n    week: true,\n    textarea: true,\n    select: true\n  } : maskAllInputs === false ? {} : maskAllInputs;\n  const slimDOMOptions = slimDOM === true || slimDOM === \"all\" ? (\n    // if true: set of sensible options that should not throw away any information\n    {\n      script: true,\n      comment: true,\n      headFavicon: true,\n      headWhitespace: true,\n      headMetaDescKeywords: slimDOM === \"all\",\n      // destructive\n      headMetaSocial: true,\n      headMetaRobots: true,\n      headMetaHttpEquiv: true,\n      headMetaAuthorship: true,\n      headMetaVerification: true\n    }\n  ) : slimDOM === false ? {} : slimDOM;\n  return serializeNodeWithId(n, {\n    doc: n,\n    mirror,\n    blockClass,\n    blockSelector,\n    unblockSelector,\n    maskAllText,\n    maskTextClass,\n    unmaskTextClass,\n    maskTextSelector,\n    unmaskTextSelector,\n    skipChild: false,\n    inlineStylesheet,\n    maskInputOptions,\n    maskAttributeFn,\n    maskTextFn,\n    maskInputFn,\n    slimDOMOptions,\n    dataURLOptions,\n    inlineImages,\n    recordCanvas,\n    preserveWhiteSpace,\n    onSerialize,\n    onIframeLoad,\n    iframeLoadTimeout,\n    onBlockedImageLoad,\n    onStylesheetLoad,\n    stylesheetLoadTimeout,\n    keepIframeSrcFn,\n    newlyAddedElement: false,\n    ignoreCSSAttributes\n  });\n}\nconst commentre = /\\/\\*[^*]*\\*+([^/*][^*]*\\*+)*\\//g;\nfunction parse(css, options = {}) {\n  let lineno = 1;\n  let column = 1;\n  function updatePosition(str) {\n    const lines = str.match(/\\n/g);\n    if (lines) {\n      lineno += lines.length;\n    }\n    const i = str.lastIndexOf(\"\\n\");\n    column = i === -1 ? column + str.length : str.length - i;\n  }\n  function position() {\n    const start = { line: lineno, column };\n    return (node) => {\n      node.position = new Position(start);\n      whitespace();\n      return node;\n    };\n  }\n  const _Position = class _Position2 {\n    constructor(start) {\n      __publicField(this, \"content\");\n      __publicField(this, \"start\");\n      __publicField(this, \"end\");\n      __publicField(this, \"source\");\n      this.start = start;\n      this.end = { line: lineno, column };\n      this.source = options.source;\n      this.content = _Position2.content;\n    }\n  };\n  __publicField(_Position, \"content\");\n  let Position = _Position;\n  Position.content = css;\n  const errorsList = [];\n  function error(msg) {\n    const err = new Error(\n      `${options.source || \"\"}:${lineno}:${column}: ${msg}`\n    );\n    err.reason = msg;\n    err.filename = options.source;\n    err.line = lineno;\n    err.column = column;\n    err.source = css;\n    if (options.silent) {\n      errorsList.push(err);\n    } else {\n      throw err;\n    }\n  }\n  function stylesheet() {\n    const rulesList = rules();\n    return {\n      type: \"stylesheet\",\n      stylesheet: {\n        source: options.source,\n        rules: rulesList,\n        parsingErrors: errorsList\n      }\n    };\n  }\n  function open() {\n    return match(/^{\\s*/);\n  }\n  function close() {\n    return match(/^}/);\n  }\n  function rules() {\n    let node;\n    const rules2 = [];\n    whitespace();\n    comments(rules2);\n    while (css.length && css.charAt(0) !== \"}\" && (node = atrule() || rule())) {\n      if (node) {\n        rules2.push(node);\n        comments(rules2);\n      }\n    }\n    return rules2;\n  }\n  function match(re) {\n    const m = re.exec(css);\n    if (!m) {\n      return;\n    }\n    const str = m[0];\n    updatePosition(str);\n    css = css.slice(str.length);\n    return m;\n  }\n  function whitespace() {\n    match(/^\\s*/);\n  }\n  function comments(rules2 = []) {\n    let c;\n    while (c = comment()) {\n      if (c) {\n        rules2.push(c);\n      }\n      c = comment();\n    }\n    return rules2;\n  }\n  function comment() {\n    const pos = position();\n    if (\"/\" !== css.charAt(0) || \"*\" !== css.charAt(1)) {\n      return;\n    }\n    let i = 2;\n    while (\"\" !== css.charAt(i) && (\"*\" !== css.charAt(i) || \"/\" !== css.charAt(i + 1))) {\n      ++i;\n    }\n    i += 2;\n    if (\"\" === css.charAt(i - 1)) {\n      return error(\"End of comment missing\");\n    }\n    const str = css.slice(2, i - 2);\n    column += 2;\n    updatePosition(str);\n    css = css.slice(i);\n    column += 2;\n    return pos({\n      type: \"comment\",\n      comment: str\n    });\n  }\n  function selector() {\n    const m = match(/^([^{]+)/);\n    if (!m) {\n      return;\n    }\n    const splitSelectors = trim(m[0]).replace(/\\/\\*[\\s\\S]*?\\*\\/+/g, \"\").replace(/\"(?:\\\\\"|[^\"])*\"|'(?:\\\\'|[^'])*'/g, (m2) => {\n      return m2.replace(/,/g, \"‌\");\n    }).split(/\\s*(?![^(]*\\)),\\s*/);\n    if (splitSelectors.length <= 1) {\n      return splitSelectors.map((s) => {\n        return s.replace(/\\u200C/g, \",\");\n      });\n    }\n    let i = 0;\n    let j = 0;\n    const len = splitSelectors.length;\n    const finalSelectors = [];\n    while (i < len) {\n      const openingParensCount = (splitSelectors[i].match(/\\(/g) || []).length;\n      const closingParensCount = (splitSelectors[i].match(/\\)/g) || []).length;\n      let unbalancedParens = openingParensCount - closingParensCount;\n      if (unbalancedParens >= 1) {\n        let foundClosingSelector = false;\n        j = i + 1;\n        while (j < len) {\n          const nextOpeningParensCount = (splitSelectors[j].match(/\\(/g) || []).length;\n          const nextClosingParensCount = (splitSelectors[j].match(/\\)/g) || []).length;\n          const nextUnbalancedParens = nextClosingParensCount - nextOpeningParensCount;\n          if (nextUnbalancedParens === unbalancedParens) {\n            finalSelectors.push(splitSelectors.slice(i, j + 1).join(\",\"));\n            i = j + 1;\n            foundClosingSelector = true;\n            break;\n          }\n          j++;\n          unbalancedParens -= nextUnbalancedParens;\n        }\n        if (foundClosingSelector) {\n          continue;\n        }\n        splitSelectors.slice(i, len).forEach((selector2) => selector2 && finalSelectors.push(selector2));\n        break;\n      }\n      splitSelectors[i] && finalSelectors.push(splitSelectors[i]);\n      i++;\n    }\n    return finalSelectors.map((s) => {\n      return s.replace(/\\u200C/g, \",\");\n    });\n  }\n  function declaration() {\n    const pos = position();\n    const propMatch = match(/^(\\*?[-#\\/\\*\\\\\\w]+(\\[[0-9a-z_-]+\\])?)\\s*/);\n    if (!propMatch) {\n      return;\n    }\n    const prop = trim(propMatch[0]);\n    if (!match(/^:\\s*/)) {\n      return error(`property missing ':'`);\n    }\n    const val = match(/^((?:'(?:\\\\'|.)*?'|\"(?:\\\\\"|.)*?\"|\\([^\\)]*?\\)|[^};])+)/);\n    const ret = pos({\n      type: \"declaration\",\n      property: prop.replace(commentre, \"\"),\n      value: val ? trim(val[0]).replace(commentre, \"\") : \"\"\n    });\n    match(/^[;\\s]*/);\n    return ret;\n  }\n  function declarations() {\n    const decls = [];\n    if (!open()) {\n      return error(`missing '{'`);\n    }\n    comments(decls);\n    let decl;\n    while (decl = declaration()) {\n      if (decl !== false) {\n        decls.push(decl);\n        comments(decls);\n      }\n      decl = declaration();\n    }\n    if (!close()) {\n      return error(`missing '}'`);\n    }\n    return decls;\n  }\n  function keyframe() {\n    let m;\n    const vals = [];\n    const pos = position();\n    while (m = match(/^((\\d+\\.\\d+|\\.\\d+|\\d+)%?|[a-z]+)\\s*/)) {\n      vals.push(m[1]);\n      match(/^,\\s*/);\n    }\n    if (!vals.length) {\n      return;\n    }\n    return pos({\n      type: \"keyframe\",\n      values: vals,\n      declarations: declarations()\n    });\n  }\n  function atkeyframes() {\n    const pos = position();\n    let m = match(/^@([-\\w]+)?keyframes\\s*/);\n    if (!m) {\n      return;\n    }\n    const vendor = m[1];\n    m = match(/^([-\\w]+)\\s*/);\n    if (!m) {\n      return error(\"@keyframes missing name\");\n    }\n    const name = m[1];\n    if (!open()) {\n      return error(`@keyframes missing '{'`);\n    }\n    let frame;\n    let frames = comments();\n    while (frame = keyframe()) {\n      frames.push(frame);\n      frames = frames.concat(comments());\n    }\n    if (!close()) {\n      return error(`@keyframes missing '}'`);\n    }\n    return pos({\n      type: \"keyframes\",\n      name,\n      vendor,\n      keyframes: frames\n    });\n  }\n  function atsupports() {\n    const pos = position();\n    const m = match(/^@supports *([^{]+)/);\n    if (!m) {\n      return;\n    }\n    const supports = trim(m[1]);\n    if (!open()) {\n      return error(`@supports missing '{'`);\n    }\n    const style = comments().concat(rules());\n    if (!close()) {\n      return error(`@supports missing '}'`);\n    }\n    return pos({\n      type: \"supports\",\n      supports,\n      rules: style\n    });\n  }\n  function athost() {\n    const pos = position();\n    const m = match(/^@host\\s*/);\n    if (!m) {\n      return;\n    }\n    if (!open()) {\n      return error(`@host missing '{'`);\n    }\n    const style = comments().concat(rules());\n    if (!close()) {\n      return error(`@host missing '}'`);\n    }\n    return pos({\n      type: \"host\",\n      rules: style\n    });\n  }\n  function atmedia() {\n    const pos = position();\n    const m = match(/^@media *([^{]+)/);\n    if (!m) {\n      return;\n    }\n    const media = trim(m[1]);\n    if (!open()) {\n      return error(`@media missing '{'`);\n    }\n    const style = comments().concat(rules());\n    if (!close()) {\n      return error(`@media missing '}'`);\n    }\n    return pos({\n      type: \"media\",\n      media,\n      rules: style\n    });\n  }\n  function atcustommedia() {\n    const pos = position();\n    const m = match(/^@custom-media\\s+(--[^\\s]+)\\s*([^{;]+);/);\n    if (!m) {\n      return;\n    }\n    return pos({\n      type: \"custom-media\",\n      name: trim(m[1]),\n      media: trim(m[2])\n    });\n  }\n  function atpage() {\n    const pos = position();\n    const m = match(/^@page */);\n    if (!m) {\n      return;\n    }\n    const sel = selector() || [];\n    if (!open()) {\n      return error(`@page missing '{'`);\n    }\n    let decls = comments();\n    let decl;\n    while (decl = declaration()) {\n      decls.push(decl);\n      decls = decls.concat(comments());\n    }\n    if (!close()) {\n      return error(`@page missing '}'`);\n    }\n    return pos({\n      type: \"page\",\n      selectors: sel,\n      declarations: decls\n    });\n  }\n  function atdocument() {\n    const pos = position();\n    const m = match(/^@([-\\w]+)?document *([^{]+)/);\n    if (!m) {\n      return;\n    }\n    const vendor = trim(m[1]);\n    const doc = trim(m[2]);\n    if (!open()) {\n      return error(`@document missing '{'`);\n    }\n    const style = comments().concat(rules());\n    if (!close()) {\n      return error(`@document missing '}'`);\n    }\n    return pos({\n      type: \"document\",\n      document: doc,\n      vendor,\n      rules: style\n    });\n  }\n  function atfontface() {\n    const pos = position();\n    const m = match(/^@font-face\\s*/);\n    if (!m) {\n      return;\n    }\n    if (!open()) {\n      return error(`@font-face missing '{'`);\n    }\n    let decls = comments();\n    let decl;\n    while (decl = declaration()) {\n      decls.push(decl);\n      decls = decls.concat(comments());\n    }\n    if (!close()) {\n      return error(`@font-face missing '}'`);\n    }\n    return pos({\n      type: \"font-face\",\n      declarations: decls\n    });\n  }\n  const atimport = _compileAtrule(\"import\");\n  const atcharset = _compileAtrule(\"charset\");\n  const atnamespace = _compileAtrule(\"namespace\");\n  function _compileAtrule(name) {\n    const re = new RegExp(\n      \"^@\" + name + \"\\\\s*((?:\" + [\n        /[^\\\\]\"(?:\\\\\"|[^\"])*\"/.source,\n        // consume any quoted parts (checking that the double quote isn't itself escaped)\n        /[^\\\\]'(?:\\\\'|[^'])*'/.source,\n        // same but for single quotes\n        \"[^;]\"\n      ].join(\"|\") + \")+);\"\n    );\n    return () => {\n      const pos = position();\n      const m = match(re);\n      if (!m) {\n        return;\n      }\n      const ret = { type: name };\n      ret[name] = m[1].trim();\n      return pos(ret);\n    };\n  }\n  function atrule() {\n    if (css[0] !== \"@\") {\n      return;\n    }\n    return atkeyframes() || atmedia() || atcustommedia() || atsupports() || atimport() || atcharset() || atnamespace() || atdocument() || atpage() || athost() || atfontface();\n  }\n  function rule() {\n    const pos = position();\n    const sel = selector();\n    if (!sel) {\n      return error(\"selector missing\");\n    }\n    comments();\n    return pos({\n      type: \"rule\",\n      selectors: sel,\n      declarations: declarations()\n    });\n  }\n  return addParent(stylesheet());\n}\nfunction trim(str) {\n  return str ? str.replace(/^\\s+|\\s+$/g, \"\") : \"\";\n}\nfunction addParent(obj, parent) {\n  const isNode = obj && typeof obj.type === \"string\";\n  const childParent = isNode ? obj : parent;\n  for (const k of Object.keys(obj)) {\n    const value = obj[k];\n    if (Array.isArray(value)) {\n      value.forEach((v) => {\n        addParent(v, childParent);\n      });\n    } else if (value && typeof value === \"object\") {\n      addParent(value, childParent);\n    }\n  }\n  if (isNode) {\n    Object.defineProperty(obj, \"parent\", {\n      configurable: true,\n      writable: true,\n      enumerable: false,\n      value: parent || null\n    });\n  }\n  return obj;\n}\nconst tagMap = {\n  script: \"noscript\",\n  // camel case svg element tag names\n  altglyph: \"altGlyph\",\n  altglyphdef: \"altGlyphDef\",\n  altglyphitem: \"altGlyphItem\",\n  animatecolor: \"animateColor\",\n  animatemotion: \"animateMotion\",\n  animatetransform: \"animateTransform\",\n  clippath: \"clipPath\",\n  feblend: \"feBlend\",\n  fecolormatrix: \"feColorMatrix\",\n  fecomponenttransfer: \"feComponentTransfer\",\n  fecomposite: \"feComposite\",\n  feconvolvematrix: \"feConvolveMatrix\",\n  fediffuselighting: \"feDiffuseLighting\",\n  fedisplacementmap: \"feDisplacementMap\",\n  fedistantlight: \"feDistantLight\",\n  fedropshadow: \"feDropShadow\",\n  feflood: \"feFlood\",\n  fefunca: \"feFuncA\",\n  fefuncb: \"feFuncB\",\n  fefuncg: \"feFuncG\",\n  fefuncr: \"feFuncR\",\n  fegaussianblur: \"feGaussianBlur\",\n  feimage: \"feImage\",\n  femerge: \"feMerge\",\n  femergenode: \"feMergeNode\",\n  femorphology: \"feMorphology\",\n  feoffset: \"feOffset\",\n  fepointlight: \"fePointLight\",\n  fespecularlighting: \"feSpecularLighting\",\n  fespotlight: \"feSpotLight\",\n  fetile: \"feTile\",\n  feturbulence: \"feTurbulence\",\n  foreignobject: \"foreignObject\",\n  glyphref: \"glyphRef\",\n  lineargradient: \"linearGradient\",\n  radialgradient: \"radialGradient\"\n};\nfunction getTagName(n) {\n  let tagName = tagMap[n.tagName] ? tagMap[n.tagName] : n.tagName;\n  if (tagName === \"link\" && n.attributes._cssText) {\n    tagName = \"style\";\n  }\n  return tagName;\n}\nfunction escapeRegExp(str) {\n  return str.replace(/[.*+?^${}()|[\\]\\\\]/g, \"\\\\$&\");\n}\nconst HOVER_SELECTOR = /([^\\\\]):hover/;\nconst HOVER_SELECTOR_GLOBAL = new RegExp(HOVER_SELECTOR.source, \"g\");\nfunction addHoverClass(cssText, cache) {\n  const cachedStyle = cache?.stylesWithHoverClass.get(cssText);\n  if (cachedStyle) return cachedStyle;\n  if (cssText.length >= 1e6) {\n    return cssText;\n  }\n  const ast = parse(cssText, {\n    silent: true\n  });\n  if (!ast.stylesheet) {\n    return cssText;\n  }\n  const selectors = [];\n  ast.stylesheet.rules.forEach((rule) => {\n    if (\"selectors\" in rule) {\n      (rule.selectors || []).forEach((selector) => {\n        if (HOVER_SELECTOR.test(selector)) {\n          selectors.push(selector);\n        }\n      });\n    }\n  });\n  if (selectors.length === 0) {\n    return cssText;\n  }\n  const selectorMatcher = new RegExp(\n    selectors.filter((selector, index) => selectors.indexOf(selector) === index).sort((a, b) => b.length - a.length).map((selector) => {\n      return escapeRegExp(selector);\n    }).join(\"|\"),\n    \"g\"\n  );\n  const result = cssText.replace(selectorMatcher, (selector) => {\n    const newSelector = selector.replace(HOVER_SELECTOR_GLOBAL, \"$1.\\\\:hover\");\n    return `${selector}, ${newSelector}`;\n  });\n  cache?.stylesWithHoverClass.set(cssText, result);\n  return result;\n}\nfunction createCache() {\n  const stylesWithHoverClass = /* @__PURE__ */ new Map();\n  return {\n    stylesWithHoverClass\n  };\n}\nfunction buildNode(n, options) {\n  const { doc, hackCss, cache } = options;\n  switch (n.type) {\n    case NodeType.Document:\n      return doc.implementation.createDocument(null, \"\", null);\n    case NodeType.DocumentType:\n      return doc.implementation.createDocumentType(\n        n.name || \"html\",\n        n.publicId,\n        n.systemId\n      );\n    case NodeType.Element: {\n      const tagName = getTagName(n);\n      let node;\n      if (n.isSVG) {\n        node = doc.createElementNS(\"http://www.w3.org/2000/svg\", tagName);\n      } else {\n        if (\n          // If the tag name is a custom element name\n          n.isCustom && // If the browser supports custom elements\n          doc.defaultView?.customElements && // If the custom element hasn't been defined yet\n          !doc.defaultView.customElements.get(n.tagName)\n        )\n          try {\n            doc.defaultView.customElements.define(\n              n.tagName,\n              class extends doc.defaultView.HTMLElement {\n              }\n            );\n          } catch (e) {\n            console.warn(\"Cannot define custom element\", e);\n          }\n        node = doc.createElement(tagName);\n      }\n      const specialAttributes = {};\n      for (const name in n.attributes) {\n        if (!Object.prototype.hasOwnProperty.call(n.attributes, name)) {\n          continue;\n        }\n        let value = n.attributes[name];\n        if (tagName === \"option\" && name === \"selected\" && value === false) {\n          continue;\n        }\n        if (value === null) {\n          continue;\n        }\n        if (value === true) value = \"\";\n        if (name.startsWith(\"rr_\")) {\n          specialAttributes[name] = value;\n          continue;\n        }\n        const isTextarea = tagName === \"textarea\" && name === \"value\";\n        const isRemoteOrDynamicCss = tagName === \"style\" && name === \"_cssText\";\n        if (isRemoteOrDynamicCss && hackCss && typeof value === \"string\") {\n          value = addHoverClass(value, cache);\n        }\n        if ((isTextarea || isRemoteOrDynamicCss) && typeof value === \"string\") {\n          const child = doc.createTextNode(value);\n          for (const c of Array.from(node.childNodes)) {\n            if (c.nodeType === node.TEXT_NODE) {\n              node.removeChild(c);\n            }\n          }\n          node.appendChild(child);\n          continue;\n        }\n        try {\n          if (n.isSVG && name === \"xlink:href\") {\n            node.setAttributeNS(\n              \"http://www.w3.org/1999/xlink\",\n              name,\n              value.toString()\n            );\n          } else if (name === \"onload\" || name === \"onclick\" || name.substring(0, 7) === \"onmouse\") {\n            node.setAttribute(\"_\" + name, value.toString());\n          } else if (tagName === \"meta\" && n.attributes[\"http-equiv\"] === \"Content-Security-Policy\" && name === \"content\") {\n            node.setAttribute(\"csp-content\", value.toString());\n            continue;\n          } else if (tagName === \"link\" && (n.attributes.rel === \"preload\" || n.attributes.rel === \"modulepreload\")) {\n          } else if (tagName === \"link\" && n.attributes.rel === \"prefetch\" && typeof n.attributes.href === \"string\" && extractFileExtension(n.attributes.href) === \"js\") {\n          } else if (tagName === \"img\" && n.attributes.srcset && n.attributes.rr_dataURL) {\n            node.setAttribute(\n              \"rrweb-original-srcset\",\n              n.attributes.srcset\n            );\n          } else {\n            node.setAttribute(name, value.toString());\n          }\n        } catch (error) {\n        }\n      }\n      for (const name in specialAttributes) {\n        const value = specialAttributes[name];\n        if (tagName === \"canvas\" && name === \"rr_dataURL\") {\n          const image = doc.createElement(\"img\");\n          image.onload = () => {\n            const ctx = node.getContext(\"2d\");\n            if (ctx) {\n              ctx.drawImage(image, 0, 0, image.width, image.height);\n            }\n          };\n          image.src = value.toString();\n          if (node.RRNodeType)\n            node.rr_dataURL = value.toString();\n        } else if (tagName === \"img\" && name === \"rr_dataURL\") {\n          const image = node;\n          if (!image.currentSrc.startsWith(\"data:\")) {\n            image.setAttribute(\n              \"rrweb-original-src\",\n              n.attributes.src\n            );\n            image.src = value.toString();\n          }\n        }\n        if (name === \"rr_width\") {\n          node.style.setProperty(\"width\", value.toString());\n        } else if (name === \"rr_height\") {\n          node.style.setProperty(\"height\", value.toString());\n        } else if (name === \"rr_mediaCurrentTime\" && typeof value === \"number\") {\n          node.currentTime = value;\n        } else if (name === \"rr_mediaState\") {\n          switch (value) {\n            case \"played\":\n              node.play().catch((e) => console.warn(\"media playback error\", e));\n              break;\n            case \"paused\":\n              node.pause();\n              break;\n          }\n        }\n      }\n      if (n.isShadowHost) {\n        if (!node.shadowRoot) {\n          node.attachShadow({ mode: \"open\" });\n        } else {\n          while (node.shadowRoot.firstChild) {\n            node.shadowRoot.removeChild(node.shadowRoot.firstChild);\n          }\n        }\n      }\n      return node;\n    }\n    case NodeType.Text:\n      return doc.createTextNode(\n        n.isStyle && hackCss ? addHoverClass(n.textContent, cache) : n.textContent\n      );\n    case NodeType.CDATA:\n      if (!(doc instanceof XMLDocument)) {\n        return null;\n      }\n      return doc.createCDATASection(n.textContent);\n    case NodeType.Comment:\n      return doc.createComment(n.textContent);\n    default:\n      return null;\n  }\n}\nfunction buildNodeWithSN(n, options) {\n  const {\n    doc,\n    mirror,\n    skipChild = false,\n    hackCss = true,\n    afterAppend,\n    cache\n  } = options;\n  if (mirror.has(n.id)) {\n    const nodeInMirror = mirror.getNode(n.id);\n    const meta = mirror.getMeta(nodeInMirror);\n    if (isNodeMetaEqual(meta, n)) return mirror.getNode(n.id);\n  }\n  let node = buildNode(n, { doc, hackCss, cache });\n  if (!node) {\n    return null;\n  }\n  if (n.rootId && mirror.getNode(n.rootId) !== doc) {\n    mirror.replace(n.rootId, doc);\n  }\n  if (n.type === NodeType.Document) {\n    doc.close();\n    doc.open();\n    if (n.compatMode === \"BackCompat\" && n.childNodes && n.childNodes[0].type !== NodeType.DocumentType) {\n      if (n.childNodes[0].type === NodeType.Element && \"xmlns\" in n.childNodes[0].attributes && n.childNodes[0].attributes.xmlns === \"http://www.w3.org/1999/xhtml\") {\n        doc.write(\n          '<!DOCTYPE html PUBLIC \"-//W3C//DTD XHTML 1.0 Transitional//EN\" \"\">'\n        );\n      } else {\n        doc.write(\n          '<!DOCTYPE html PUBLIC \"-//W3C//DTD HTML 4.0 Transitional//EN\" \"\">'\n        );\n      }\n    }\n    node = doc;\n  }\n  mirror.add(node, n);\n  if ((n.type === NodeType.Document || n.type === NodeType.Element) && !skipChild) {\n    for (const childN of n.childNodes) {\n      const childNode = buildNodeWithSN(childN, {\n        doc,\n        mirror,\n        skipChild: false,\n        hackCss,\n        afterAppend,\n        cache\n      });\n      if (!childNode) {\n        console.warn(\"Failed to rebuild\", childN);\n        continue;\n      }\n      if (childN.isShadow && isElement(node) && node.shadowRoot) {\n        node.shadowRoot.appendChild(childNode);\n      } else if (n.type === NodeType.Document && childN.type == NodeType.Element) {\n        const htmlElement = childNode;\n        let body = null;\n        htmlElement.childNodes.forEach((child) => {\n          if (child.nodeName === \"BODY\") body = child;\n        });\n        if (body) {\n          htmlElement.removeChild(body);\n          node.appendChild(childNode);\n          htmlElement.appendChild(body);\n        } else {\n          node.appendChild(childNode);\n        }\n      } else {\n        node.appendChild(childNode);\n      }\n      if (afterAppend) {\n        afterAppend(childNode, childN.id);\n      }\n    }\n  }\n  return node;\n}\nfunction visit(mirror, onVisit) {\n  function walk(node) {\n    onVisit(node);\n  }\n  for (const id of mirror.getIds()) {\n    if (mirror.has(id)) {\n      walk(mirror.getNode(id));\n    }\n  }\n}\nfunction handleScroll(node, mirror) {\n  const n = mirror.getMeta(node);\n  if (n?.type !== NodeType.Element) {\n    return;\n  }\n  const el = node;\n  for (const name in n.attributes) {\n    if (!(Object.prototype.hasOwnProperty.call(n.attributes, name) && name.startsWith(\"rr_\"))) {\n      continue;\n    }\n    const value = n.attributes[name];\n    if (name === \"rr_scrollLeft\") {\n      el.scrollLeft = value;\n    }\n    if (name === \"rr_scrollTop\") {\n      el.scrollTop = value;\n    }\n  }\n}\nfunction rebuild(n, options) {\n  const {\n    doc,\n    onVisit,\n    hackCss = true,\n    afterAppend,\n    cache,\n    mirror = new Mirror()\n  } = options;\n  const node = buildNodeWithSN(n, {\n    doc,\n    mirror,\n    skipChild: false,\n    hackCss,\n    afterAppend,\n    cache\n  });\n  visit(mirror, (visitedNode) => {\n    if (onVisit) {\n      onVisit(visitedNode);\n    }\n    handleScroll(visitedNode, mirror);\n  });\n  return node;\n}\nfunction on(type, fn, target = document) {\n  const options = { capture: true, passive: true };\n  target.addEventListener(type, fn, options);\n  return () => target.removeEventListener(type, fn, options);\n}\nconst DEPARTED_MIRROR_ACCESS_WARNING = \"Please stop import mirror directly. Instead of that,\\r\\nnow you can use replayer.getMirror() to access the mirror instance of a replayer,\\r\\nor you can use record.mirror to access the mirror instance during recording.\";\nlet _mirror = {\n  map: {},\n  getId() {\n    console.error(DEPARTED_MIRROR_ACCESS_WARNING);\n    return -1;\n  },\n  getNode() {\n    console.error(DEPARTED_MIRROR_ACCESS_WARNING);\n    return null;\n  },\n  removeNodeFromMap() {\n    console.error(DEPARTED_MIRROR_ACCESS_WARNING);\n  },\n  has() {\n    console.error(DEPARTED_MIRROR_ACCESS_WARNING);\n    return false;\n  },\n  reset() {\n    console.error(DEPARTED_MIRROR_ACCESS_WARNING);\n  }\n};\nif (typeof window !== \"undefined\" && window.Proxy && window.Reflect) {\n  _mirror = new Proxy(_mirror, {\n    get(target, prop, receiver) {\n      if (prop === \"map\") {\n        console.error(DEPARTED_MIRROR_ACCESS_WARNING);\n      }\n      return Reflect.get(target, prop, receiver);\n    }\n  });\n}\nfunction throttle(func, wait, options = {}) {\n  let timeout = null;\n  let previous = 0;\n  return function(...args) {\n    const now = Date.now();\n    if (!previous && options.leading === false) {\n      previous = now;\n    }\n    const remaining = wait - (now - previous);\n    const context = this;\n    if (remaining <= 0 || remaining > wait) {\n      if (timeout) {\n        clearTimeout(timeout);\n        timeout = null;\n      }\n      previous = now;\n      func.apply(context, args);\n    } else if (!timeout && options.trailing !== false) {\n      timeout = setTimeout(() => {\n        previous = options.leading === false ? 0 : Date.now();\n        timeout = null;\n        func.apply(context, args);\n      }, remaining);\n    }\n  };\n}\nfunction hookSetter(target, key, d, isRevoked, win = window) {\n  const original = win.Object.getOwnPropertyDescriptor(target, key);\n  win.Object.defineProperty(\n    target,\n    key,\n    isRevoked ? d : {\n      set(value) {\n        setTimeout(() => {\n          d.set.call(this, value);\n        }, 0);\n        if (original && original.set) {\n          original.set.call(this, value);\n        }\n      }\n    }\n  );\n  return () => hookSetter(target, key, original || {}, true);\n}\nfunction patch(source, name, replacement) {\n  try {\n    if (!(name in source)) {\n      return () => {\n      };\n    }\n    const original = source[name];\n    const wrapped = replacement(original);\n    if (typeof wrapped === \"function\") {\n      wrapped.prototype = wrapped.prototype || {};\n      Object.defineProperties(wrapped, {\n        __rrweb_original__: {\n          enumerable: false,\n          value: original\n        }\n      });\n    }\n    source[name] = wrapped;\n    return () => {\n      source[name] = original;\n    };\n  } catch {\n    return () => {\n    };\n  }\n}\nlet nowTimestamp = Date.now;\nif (!/* @__PURE__ */ /[1-9][0-9]{12}/.test(Date.now().toString())) {\n  nowTimestamp = () => (/* @__PURE__ */ new Date()).getTime();\n}\nfunction getWindowScroll(win) {\n  const doc = win.document;\n  return {\n    left: doc.scrollingElement ? doc.scrollingElement.scrollLeft : win.pageXOffset !== void 0 ? win.pageXOffset : doc?.documentElement.scrollLeft || doc?.body?.parentElement?.scrollLeft || doc?.body?.scrollLeft || 0,\n    top: doc.scrollingElement ? doc.scrollingElement.scrollTop : win.pageYOffset !== void 0 ? win.pageYOffset : doc?.documentElement.scrollTop || doc?.body?.parentElement?.scrollTop || doc?.body?.scrollTop || 0\n  };\n}\nfunction getWindowHeight() {\n  return window.innerHeight || document.documentElement && document.documentElement.clientHeight || document.body && document.body.clientHeight;\n}\nfunction getWindowWidth() {\n  return window.innerWidth || document.documentElement && document.documentElement.clientWidth || document.body && document.body.clientWidth;\n}\nfunction closestElementOfNode(node) {\n  if (!node) {\n    return null;\n  }\n  try {\n    const el = node.nodeType === node.ELEMENT_NODE ? node : node.parentElement;\n    return el;\n  } catch (error) {\n    return null;\n  }\n}\nfunction isBlocked(node, blockClass, blockSelector, unblockSelector, checkAncestors) {\n  if (!node) {\n    return false;\n  }\n  const el = closestElementOfNode(node);\n  if (!el) {\n    return false;\n  }\n  const blockedPredicate = createMatchPredicate(blockClass, blockSelector);\n  if (!checkAncestors) {\n    const isUnblocked = unblockSelector && el.matches(unblockSelector);\n    return blockedPredicate(el) && !isUnblocked;\n  }\n  const blockDistance = distanceToMatch(el, blockedPredicate);\n  let unblockDistance = -1;\n  if (blockDistance < 0) {\n    return false;\n  }\n  if (unblockSelector) {\n    unblockDistance = distanceToMatch(\n      el,\n      createMatchPredicate(null, unblockSelector)\n    );\n  }\n  if (blockDistance > -1 && unblockDistance < 0) {\n    return true;\n  }\n  return blockDistance < unblockDistance;\n}\nfunction isSerialized(n, mirror) {\n  return mirror.getId(n) !== -1;\n}\nfunction isIgnored(n, mirror) {\n  return mirror.getId(n) === IGNORED_NODE;\n}\nfunction isAncestorRemoved(target, mirror) {\n  if (isShadowRoot(target)) {\n    return false;\n  }\n  const id = mirror.getId(target);\n  if (!mirror.has(id)) {\n    return true;\n  }\n  if (target.parentNode && target.parentNode.nodeType === target.DOCUMENT_NODE) {\n    return false;\n  }\n  if (!target.parentNode) {\n    return true;\n  }\n  return isAncestorRemoved(target.parentNode, mirror);\n}\nfunction legacy_isTouchEvent(event) {\n  return Boolean(event.changedTouches);\n}\nfunction polyfill(win = window) {\n  if (\"NodeList\" in win && !win.NodeList.prototype.forEach) {\n    win.NodeList.prototype.forEach = Array.prototype.forEach;\n  }\n  if (\"DOMTokenList\" in win && !win.DOMTokenList.prototype.forEach) {\n    win.DOMTokenList.prototype.forEach = Array.prototype.forEach;\n  }\n  if (!Node.prototype.contains) {\n    Node.prototype.contains = (...args) => {\n      let node = args[0];\n      if (!(0 in args)) {\n        throw new TypeError(\"1 argument is required\");\n      }\n      do {\n        if (this === node) {\n          return true;\n        }\n      } while (node = node && node.parentNode);\n      return false;\n    };\n  }\n}\nfunction queueToResolveTrees(queue) {\n  const queueNodeMap = {};\n  const putIntoMap = (m, parent) => {\n    const nodeInTree = {\n      value: m,\n      parent,\n      children: []\n    };\n    queueNodeMap[m.node.id] = nodeInTree;\n    return nodeInTree;\n  };\n  const queueNodeTrees = [];\n  for (const mutation of queue) {\n    const { nextId, parentId } = mutation;\n    if (nextId && nextId in queueNodeMap) {\n      const nextInTree = queueNodeMap[nextId];\n      if (nextInTree.parent) {\n        const idx = nextInTree.parent.children.indexOf(nextInTree);\n        nextInTree.parent.children.splice(\n          idx,\n          0,\n          putIntoMap(mutation, nextInTree.parent)\n        );\n      } else {\n        const idx = queueNodeTrees.indexOf(nextInTree);\n        queueNodeTrees.splice(idx, 0, putIntoMap(mutation, null));\n      }\n      continue;\n    }\n    if (parentId in queueNodeMap) {\n      const parentInTree = queueNodeMap[parentId];\n      parentInTree.children.push(putIntoMap(mutation, parentInTree));\n      continue;\n    }\n    queueNodeTrees.push(putIntoMap(mutation, null));\n  }\n  return queueNodeTrees;\n}\nfunction iterateResolveTree(tree, cb) {\n  cb(tree.value);\n  for (let i = tree.children.length - 1; i >= 0; i--) {\n    iterateResolveTree(tree.children[i], cb);\n  }\n}\nfunction isSerializedIframe(n, mirror) {\n  return Boolean(n.nodeName === \"IFRAME\" && mirror.getMeta(n));\n}\nfunction isSerializedStylesheet(n, mirror) {\n  return Boolean(\n    n.nodeName === \"LINK\" && n.nodeType === n.ELEMENT_NODE && n.getAttribute && n.getAttribute(\"rel\") === \"stylesheet\" && mirror.getMeta(n)\n  );\n}\nfunction getBaseDimension(node, rootIframe) {\n  const frameElement = node.ownerDocument?.defaultView?.frameElement;\n  if (!frameElement || frameElement === rootIframe) {\n    return {\n      x: 0,\n      y: 0,\n      relativeScale: 1,\n      absoluteScale: 1\n    };\n  }\n  const frameDimension = frameElement.getBoundingClientRect();\n  const frameBaseDimension = getBaseDimension(frameElement, rootIframe);\n  const relativeScale = frameDimension.height / frameElement.clientHeight;\n  return {\n    x: frameDimension.x * frameBaseDimension.relativeScale + frameBaseDimension.x,\n    y: frameDimension.y * frameBaseDimension.relativeScale + frameBaseDimension.y,\n    relativeScale,\n    absoluteScale: frameBaseDimension.absoluteScale * relativeScale\n  };\n}\nfunction hasShadowRoot(n) {\n  return Boolean(n?.shadowRoot);\n}\nfunction getNestedRule(rules, position) {\n  const rule = rules[position[0]];\n  if (position.length === 1) {\n    return rule;\n  } else {\n    return getNestedRule(\n      rule.cssRules[position[1]].cssRules,\n      position.slice(2)\n    );\n  }\n}\nfunction getPositionsAndIndex(nestedIndex) {\n  const positions = [...nestedIndex];\n  const index = positions.pop();\n  return { positions, index };\n}\nfunction uniqueTextMutations(mutations) {\n  const idSet = /* @__PURE__ */ new Set();\n  const uniqueMutations = [];\n  for (let i = mutations.length; i--; ) {\n    const mutation = mutations[i];\n    if (!idSet.has(mutation.id)) {\n      uniqueMutations.push(mutation);\n      idSet.add(mutation.id);\n    }\n  }\n  return uniqueMutations;\n}\nclass StyleSheetMirror {\n  constructor() {\n    this.id = 1;\n    this.styleIDMap = /* @__PURE__ */ new WeakMap();\n    this.idStyleMap = /* @__PURE__ */ new Map();\n  }\n  getId(stylesheet) {\n    return this.styleIDMap.get(stylesheet) ?? -1;\n  }\n  has(stylesheet) {\n    return this.styleIDMap.has(stylesheet);\n  }\n  /**\n   * @returns If the stylesheet is in the mirror, returns the id of the stylesheet. If not, return the new assigned id.\n   */\n  add(stylesheet, id) {\n    if (this.has(stylesheet)) return this.getId(stylesheet);\n    let newId;\n    if (id === void 0) {\n      newId = this.id++;\n    } else newId = id;\n    this.styleIDMap.set(stylesheet, newId);\n    this.idStyleMap.set(newId, stylesheet);\n    return newId;\n  }\n  getStyle(id) {\n    return this.idStyleMap.get(id) || null;\n  }\n  reset() {\n    this.styleIDMap = /* @__PURE__ */ new WeakMap();\n    this.idStyleMap = /* @__PURE__ */ new Map();\n    this.id = 1;\n  }\n  generateId() {\n    return this.id++;\n  }\n}\nfunction getShadowHost(n) {\n  let shadowHost = null;\n  if (n.getRootNode?.()?.nodeType === Node.DOCUMENT_FRAGMENT_NODE && n.getRootNode().host)\n    shadowHost = n.getRootNode().host;\n  return shadowHost;\n}\nfunction getRootShadowHost(n) {\n  let rootShadowHost = n;\n  let shadowHost;\n  while (shadowHost = getShadowHost(rootShadowHost))\n    rootShadowHost = shadowHost;\n  return rootShadowHost;\n}\nfunction shadowHostInDom(n) {\n  const doc = n.ownerDocument;\n  if (!doc) return false;\n  const shadowHost = getRootShadowHost(n);\n  return doc.contains(shadowHost);\n}\nfunction inDom(n) {\n  const doc = n.ownerDocument;\n  if (!doc) return false;\n  return doc.contains(n) || shadowHostInDom(n);\n}\nconst cachedImplementations = {};\nfunction getImplementation(name) {\n  const cached = cachedImplementations[name];\n  if (cached) {\n    return cached;\n  }\n  const document2 = window.document;\n  let impl = window[name];\n  if (document2 && typeof document2.createElement === \"function\") {\n    try {\n      const sandbox = document2.createElement(\"iframe\");\n      sandbox.hidden = true;\n      document2.head.appendChild(sandbox);\n      const contentWindow = sandbox.contentWindow;\n      if (contentWindow && contentWindow[name]) {\n        impl = // eslint-disable-next-line @typescript-eslint/unbound-method\n        contentWindow[name];\n      }\n      document2.head.removeChild(sandbox);\n    } catch (e) {\n    }\n  }\n  return cachedImplementations[name] = impl.bind(\n    window\n  );\n}\nfunction onRequestAnimationFrame(...rest) {\n  return getImplementation(\"requestAnimationFrame\")(...rest);\n}\nfunction setTimeout(...rest) {\n  return getImplementation(\"setTimeout\")(...rest);\n}\nfunction clearTimeout(...rest) {\n  return getImplementation(\"clearTimeout\")(...rest);\n}\nconst utils = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({\n  __proto__: null,\n  StyleSheetMirror,\n  get _mirror() {\n    return _mirror;\n  },\n  clearTimeout,\n  closestElementOfNode,\n  getBaseDimension,\n  getNestedRule,\n  getPositionsAndIndex,\n  getRootShadowHost,\n  getShadowHost,\n  getWindowHeight,\n  getWindowScroll,\n  getWindowWidth,\n  hasShadowRoot,\n  hookSetter,\n  inDom,\n  isAncestorRemoved,\n  isBlocked,\n  isIgnored,\n  isSerialized,\n  isSerializedIframe,\n  isSerializedStylesheet,\n  iterateResolveTree,\n  legacy_isTouchEvent,\n  get nowTimestamp() {\n    return nowTimestamp;\n  },\n  on,\n  onRequestAnimationFrame,\n  patch,\n  polyfill,\n  queueToResolveTrees,\n  setTimeout,\n  shadowHostInDom,\n  throttle,\n  uniqueTextMutations\n}, Symbol.toStringTag, { value: \"Module\" }));\nvar EventType = /* @__PURE__ */ ((EventType2) => {\n  EventType2[EventType2[\"DomContentLoaded\"] = 0] = \"DomContentLoaded\";\n  EventType2[EventType2[\"Load\"] = 1] = \"Load\";\n  EventType2[EventType2[\"FullSnapshot\"] = 2] = \"FullSnapshot\";\n  EventType2[EventType2[\"IncrementalSnapshot\"] = 3] = \"IncrementalSnapshot\";\n  EventType2[EventType2[\"Meta\"] = 4] = \"Meta\";\n  EventType2[EventType2[\"Custom\"] = 5] = \"Custom\";\n  EventType2[EventType2[\"Plugin\"] = 6] = \"Plugin\";\n  return EventType2;\n})(EventType || {});\nvar IncrementalSource = /* @__PURE__ */ ((IncrementalSource2) => {\n  IncrementalSource2[IncrementalSource2[\"Mutation\"] = 0] = \"Mutation\";\n  IncrementalSource2[IncrementalSource2[\"MouseMove\"] = 1] = \"MouseMove\";\n  IncrementalSource2[IncrementalSource2[\"MouseInteraction\"] = 2] = \"MouseInteraction\";\n  IncrementalSource2[IncrementalSource2[\"Scroll\"] = 3] = \"Scroll\";\n  IncrementalSource2[IncrementalSource2[\"ViewportResize\"] = 4] = \"ViewportResize\";\n  IncrementalSource2[IncrementalSource2[\"Input\"] = 5] = \"Input\";\n  IncrementalSource2[IncrementalSource2[\"TouchMove\"] = 6] = \"TouchMove\";\n  IncrementalSource2[IncrementalSource2[\"MediaInteraction\"] = 7] = \"MediaInteraction\";\n  IncrementalSource2[IncrementalSource2[\"StyleSheetRule\"] = 8] = \"StyleSheetRule\";\n  IncrementalSource2[IncrementalSource2[\"CanvasMutation\"] = 9] = \"CanvasMutation\";\n  IncrementalSource2[IncrementalSource2[\"Font\"] = 10] = \"Font\";\n  IncrementalSource2[IncrementalSource2[\"Log\"] = 11] = \"Log\";\n  IncrementalSource2[IncrementalSource2[\"Drag\"] = 12] = \"Drag\";\n  IncrementalSource2[IncrementalSource2[\"StyleDeclaration\"] = 13] = \"StyleDeclaration\";\n  IncrementalSource2[IncrementalSource2[\"Selection\"] = 14] = \"Selection\";\n  IncrementalSource2[IncrementalSource2[\"AdoptedStyleSheet\"] = 15] = \"AdoptedStyleSheet\";\n  IncrementalSource2[IncrementalSource2[\"CustomElement\"] = 16] = \"CustomElement\";\n  return IncrementalSource2;\n})(IncrementalSource || {});\nvar MouseInteractions = /* @__PURE__ */ ((MouseInteractions2) => {\n  MouseInteractions2[MouseInteractions2[\"MouseUp\"] = 0] = \"MouseUp\";\n  MouseInteractions2[MouseInteractions2[\"MouseDown\"] = 1] = \"MouseDown\";\n  MouseInteractions2[MouseInteractions2[\"Click\"] = 2] = \"Click\";\n  MouseInteractions2[MouseInteractions2[\"ContextMenu\"] = 3] = \"ContextMenu\";\n  MouseInteractions2[MouseInteractions2[\"DblClick\"] = 4] = \"DblClick\";\n  MouseInteractions2[MouseInteractions2[\"Focus\"] = 5] = \"Focus\";\n  MouseInteractions2[MouseInteractions2[\"Blur\"] = 6] = \"Blur\";\n  MouseInteractions2[MouseInteractions2[\"TouchStart\"] = 7] = \"TouchStart\";\n  MouseInteractions2[MouseInteractions2[\"TouchMove_Departed\"] = 8] = \"TouchMove_Departed\";\n  MouseInteractions2[MouseInteractions2[\"TouchEnd\"] = 9] = \"TouchEnd\";\n  MouseInteractions2[MouseInteractions2[\"TouchCancel\"] = 10] = \"TouchCancel\";\n  return MouseInteractions2;\n})(MouseInteractions || {});\nvar PointerTypes = /* @__PURE__ */ ((PointerTypes2) => {\n  PointerTypes2[PointerTypes2[\"Mouse\"] = 0] = \"Mouse\";\n  PointerTypes2[PointerTypes2[\"Pen\"] = 1] = \"Pen\";\n  PointerTypes2[PointerTypes2[\"Touch\"] = 2] = \"Touch\";\n  return PointerTypes2;\n})(PointerTypes || {});\nvar CanvasContext = /* @__PURE__ */ ((CanvasContext2) => {\n  CanvasContext2[CanvasContext2[\"2D\"] = 0] = \"2D\";\n  CanvasContext2[CanvasContext2[\"WebGL\"] = 1] = \"WebGL\";\n  CanvasContext2[CanvasContext2[\"WebGL2\"] = 2] = \"WebGL2\";\n  return CanvasContext2;\n})(CanvasContext || {});\nvar MediaInteractions = /* @__PURE__ */ ((MediaInteractions2) => {\n  MediaInteractions2[MediaInteractions2[\"Play\"] = 0] = \"Play\";\n  MediaInteractions2[MediaInteractions2[\"Pause\"] = 1] = \"Pause\";\n  MediaInteractions2[MediaInteractions2[\"Seeked\"] = 2] = \"Seeked\";\n  MediaInteractions2[MediaInteractions2[\"VolumeChange\"] = 3] = \"VolumeChange\";\n  MediaInteractions2[MediaInteractions2[\"RateChange\"] = 4] = \"RateChange\";\n  return MediaInteractions2;\n})(MediaInteractions || {});\nvar ReplayerEvents = /* @__PURE__ */ ((ReplayerEvents2) => {\n  ReplayerEvents2[\"Start\"] = \"start\";\n  ReplayerEvents2[\"Pause\"] = \"pause\";\n  ReplayerEvents2[\"Resume\"] = \"resume\";\n  ReplayerEvents2[\"Resize\"] = \"resize\";\n  ReplayerEvents2[\"Finish\"] = \"finish\";\n  ReplayerEvents2[\"FullsnapshotRebuilded\"] = \"fullsnapshot-rebuilded\";\n  ReplayerEvents2[\"LoadStylesheetStart\"] = \"load-stylesheet-start\";\n  ReplayerEvents2[\"LoadStylesheetEnd\"] = \"load-stylesheet-end\";\n  ReplayerEvents2[\"SkipStart\"] = \"skip-start\";\n  ReplayerEvents2[\"SkipEnd\"] = \"skip-end\";\n  ReplayerEvents2[\"MouseInteraction\"] = \"mouse-interaction\";\n  ReplayerEvents2[\"EventCast\"] = \"event-cast\";\n  ReplayerEvents2[\"CustomEvent\"] = \"custom-event\";\n  ReplayerEvents2[\"Flush\"] = \"flush\";\n  ReplayerEvents2[\"StateChange\"] = \"state-change\";\n  ReplayerEvents2[\"PlayBack\"] = \"play-back\";\n  ReplayerEvents2[\"Destroy\"] = \"destroy\";\n  return ReplayerEvents2;\n})(ReplayerEvents || {});\nlet errorHandler;\nfunction registerErrorHandler(handler) {\n  errorHandler = handler;\n}\nfunction unregisterErrorHandler() {\n  errorHandler = void 0;\n}\nconst callbackWrapper = (cb) => {\n  if (!errorHandler) {\n    return cb;\n  }\n  const rrwebWrapped = ((...rest) => {\n    try {\n      return cb(...rest);\n    } catch (error) {\n      if (errorHandler && errorHandler(error) === true) {\n        return () => {\n        };\n      }\n      throw error;\n    }\n  });\n  return rrwebWrapped;\n};\nvar chars = \"ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/\";\nvar lookup = typeof Uint8Array === \"undefined\" ? [] : new Uint8Array(256);\nfor (var i = 0; i < chars.length; i++) {\n  lookup[chars.charCodeAt(i)] = i;\n}\nvar encode = function(arraybuffer) {\n  var bytes = new Uint8Array(arraybuffer), i, len = bytes.length, base64 = \"\";\n  for (i = 0; i < len; i += 3) {\n    base64 += chars[bytes[i] >> 2];\n    base64 += chars[(bytes[i] & 3) << 4 | bytes[i + 1] >> 4];\n    base64 += chars[(bytes[i + 1] & 15) << 2 | bytes[i + 2] >> 6];\n    base64 += chars[bytes[i + 2] & 63];\n  }\n  if (len % 3 === 2) {\n    base64 = base64.substring(0, base64.length - 1) + \"=\";\n  } else if (len % 3 === 1) {\n    base64 = base64.substring(0, base64.length - 2) + \"==\";\n  }\n  return base64;\n};\nvar decode = function(base64) {\n  var bufferLength = base64.length * 0.75, len = base64.length, i, p = 0, encoded1, encoded2, encoded3, encoded4;\n  if (base64[base64.length - 1] === \"=\") {\n    bufferLength--;\n    if (base64[base64.length - 2] === \"=\") {\n      bufferLength--;\n    }\n  }\n  var arraybuffer = new ArrayBuffer(bufferLength), bytes = new Uint8Array(arraybuffer);\n  for (i = 0; i < len; i += 4) {\n    encoded1 = lookup[base64.charCodeAt(i)];\n    encoded2 = lookup[base64.charCodeAt(i + 1)];\n    encoded3 = lookup[base64.charCodeAt(i + 2)];\n    encoded4 = lookup[base64.charCodeAt(i + 3)];\n    bytes[p++] = encoded1 << 2 | encoded2 >> 4;\n    bytes[p++] = (encoded2 & 15) << 4 | encoded3 >> 2;\n    bytes[p++] = (encoded3 & 3) << 6 | encoded4 & 63;\n  }\n  return arraybuffer;\n};\nconst canvasVarMap = /* @__PURE__ */ new Map();\nfunction variableListFor(ctx, ctor) {\n  let contextMap = canvasVarMap.get(ctx);\n  if (!contextMap) {\n    contextMap = /* @__PURE__ */ new Map();\n    canvasVarMap.set(ctx, contextMap);\n  }\n  if (!contextMap.has(ctor)) {\n    contextMap.set(ctor, []);\n  }\n  return contextMap.get(ctor);\n}\nconst saveWebGLVar = (value, win, ctx) => {\n  if (!value || !(isInstanceOfWebGLObject(value, win) || typeof value === \"object\"))\n    return;\n  const name = value.constructor.name;\n  const list = variableListFor(ctx, name);\n  let index = list.indexOf(value);\n  if (index === -1) {\n    index = list.length;\n    list.push(value);\n  }\n  return index;\n};\nfunction serializeArg(value, win, ctx) {\n  if (value instanceof Array) {\n    return value.map((arg) => serializeArg(arg, win, ctx));\n  } else if (value === null) {\n    return value;\n  } else if (value instanceof Float32Array || value instanceof Float64Array || value instanceof Int32Array || value instanceof Uint32Array || value instanceof Uint8Array || value instanceof Uint16Array || value instanceof Int16Array || value instanceof Int8Array || value instanceof Uint8ClampedArray) {\n    const name = value.constructor.name;\n    return {\n      rr_type: name,\n      args: [Object.values(value)]\n    };\n  } else if (\n    // SharedArrayBuffer disabled on most browsers due to spectre.\n    // More info: https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/SharedArrayBuffer/SharedArrayBuffer\n    // value instanceof SharedArrayBuffer ||\n    value instanceof ArrayBuffer\n  ) {\n    const name = value.constructor.name;\n    const base64 = encode(value);\n    return {\n      rr_type: name,\n      base64\n    };\n  } else if (value instanceof DataView) {\n    const name = value.constructor.name;\n    return {\n      rr_type: name,\n      args: [\n        serializeArg(value.buffer, win, ctx),\n        value.byteOffset,\n        value.byteLength\n      ]\n    };\n  } else if (value instanceof HTMLImageElement) {\n    const name = value.constructor.name;\n    const { src } = value;\n    return {\n      rr_type: name,\n      src\n    };\n  } else if (value instanceof HTMLCanvasElement) {\n    const name = \"HTMLImageElement\";\n    const src = value.toDataURL();\n    return {\n      rr_type: name,\n      src\n    };\n  } else if (value instanceof ImageData) {\n    const name = value.constructor.name;\n    return {\n      rr_type: name,\n      args: [serializeArg(value.data, win, ctx), value.width, value.height]\n    };\n  } else if (isInstanceOfWebGLObject(value, win) || typeof value === \"object\") {\n    const name = value.constructor.name;\n    const index = saveWebGLVar(value, win, ctx);\n    return {\n      rr_type: name,\n      index\n    };\n  }\n  return value;\n}\nconst serializeArgs = (args, win, ctx) => {\n  return args.map((arg) => serializeArg(arg, win, ctx));\n};\nconst isInstanceOfWebGLObject = (value, win) => {\n  const webGLConstructorNames = [\n    \"WebGLActiveInfo\",\n    \"WebGLBuffer\",\n    \"WebGLFramebuffer\",\n    \"WebGLProgram\",\n    \"WebGLRenderbuffer\",\n    \"WebGLShader\",\n    \"WebGLShaderPrecisionFormat\",\n    \"WebGLTexture\",\n    \"WebGLUniformLocation\",\n    \"WebGLVertexArrayObject\",\n    // In old Chrome versions, value won't be an instanceof WebGLVertexArrayObject.\n    \"WebGLVertexArrayObjectOES\"\n  ];\n  const supportedWebGLConstructorNames = webGLConstructorNames.filter(\n    (name) => typeof win[name] === \"function\"\n  );\n  return Boolean(\n    supportedWebGLConstructorNames.find(\n      (name) => value instanceof win[name]\n    )\n  );\n};\nfunction initCanvas2DMutationObserver(cb, win, blockClass2, blockSelector, unblockSelector) {\n  const handlers = [];\n  const props2D = Object.getOwnPropertyNames(\n    win.CanvasRenderingContext2D.prototype\n  );\n  for (const prop of props2D) {\n    try {\n      if (typeof win.CanvasRenderingContext2D.prototype[prop] !== \"function\") {\n        continue;\n      }\n      const restoreHandler = patch(\n        win.CanvasRenderingContext2D.prototype,\n        prop,\n        function(original) {\n          return function(...args) {\n            if (!isBlocked(\n              this.canvas,\n              blockClass2,\n              blockSelector,\n              unblockSelector,\n              true\n            )) {\n              setTimeout(() => {\n                const recordArgs = serializeArgs(args, win, this);\n                cb(this.canvas, {\n                  type: CanvasContext[\"2D\"],\n                  property: prop,\n                  args: recordArgs\n                });\n              }, 0);\n            }\n            return original.apply(this, args);\n          };\n        }\n      );\n      handlers.push(restoreHandler);\n    } catch {\n      const hookHandler = hookSetter(\n        win.CanvasRenderingContext2D.prototype,\n        prop,\n        {\n          set(v) {\n            cb(this.canvas, {\n              type: CanvasContext[\"2D\"],\n              property: prop,\n              args: [v],\n              setter: true\n            });\n          }\n        }\n      );\n      handlers.push(hookHandler);\n    }\n  }\n  return () => {\n    handlers.forEach((h) => h());\n  };\n}\nfunction getNormalizedContextName(contextType) {\n  return contextType === \"experimental-webgl\" ? \"webgl\" : contextType;\n}\nfunction initCanvasContextObserver(win, blockClass, blockSelector, unblockSelector, setPreserveDrawingBufferToTrue) {\n  const handlers = [];\n  try {\n    const restoreHandler = patch(\n      win.HTMLCanvasElement.prototype,\n      \"getContext\",\n      function(original) {\n        return function(contextType, ...args) {\n          if (!isBlocked(this, blockClass, blockSelector, unblockSelector, true)) {\n            const ctxName = getNormalizedContextName(contextType);\n            if (!(\"__context\" in this)) this.__context = ctxName;\n            if (setPreserveDrawingBufferToTrue && [\"webgl\", \"webgl2\"].includes(ctxName)) {\n              if (args[0] && typeof args[0] === \"object\") {\n                const contextAttributes = args[0];\n                if (!contextAttributes.preserveDrawingBuffer) {\n                  contextAttributes.preserveDrawingBuffer = true;\n                }\n              } else {\n                args.splice(0, 1, {\n                  preserveDrawingBuffer: true\n                });\n              }\n            }\n          }\n          return original.apply(this, [contextType, ...args]);\n        };\n      }\n    );\n    handlers.push(restoreHandler);\n  } catch {\n    console.error(\"failed to patch HTMLCanvasElement.prototype.getContext\");\n  }\n  return () => {\n    handlers.forEach((h) => h());\n  };\n}\nfunction patchGLPrototype(prototype, type, cb, blockClass2, blockSelector, unblockSelector, _mirror2, win) {\n  const handlers = [];\n  const props = Object.getOwnPropertyNames(prototype);\n  for (const prop of props) {\n    if (\n      //prop.startsWith('get') ||  // e.g. getProgramParameter, but too risky\n      [\n        \"isContextLost\",\n        \"canvas\",\n        \"drawingBufferWidth\",\n        \"drawingBufferHeight\"\n      ].includes(prop)\n    ) {\n      continue;\n    }\n    try {\n      if (typeof prototype[prop] !== \"function\") {\n        continue;\n      }\n      const restoreHandler = patch(\n        prototype,\n        prop,\n        function(original) {\n          return function(...args) {\n            const result = original.apply(this, args);\n            saveWebGLVar(result, win, this);\n            if (\"tagName\" in this.canvas && !isBlocked(\n              this.canvas,\n              blockClass2,\n              blockSelector,\n              unblockSelector,\n              true\n            )) {\n              const recordArgs = serializeArgs(args, win, this);\n              const mutation = {\n                type,\n                property: prop,\n                args: recordArgs\n              };\n              cb(this.canvas, mutation);\n            }\n            return result;\n          };\n        }\n      );\n      handlers.push(restoreHandler);\n    } catch {\n      const hookHandler = hookSetter(prototype, prop, {\n        set(v) {\n          cb(this.canvas, {\n            type,\n            property: prop,\n            args: [v],\n            setter: true\n          });\n        }\n      });\n      handlers.push(hookHandler);\n    }\n  }\n  return handlers;\n}\nfunction initCanvasWebGLMutationObserver(cb, win, blockClass2, blockSelector, unblockSelector, mirror) {\n  const handlers = [];\n  handlers.push(\n    ...patchGLPrototype(\n      win.WebGLRenderingContext.prototype,\n      CanvasContext.WebGL,\n      cb,\n      blockClass2,\n      blockSelector,\n      unblockSelector,\n      mirror,\n      win\n    )\n  );\n  if (typeof win.WebGL2RenderingContext !== \"undefined\") {\n    handlers.push(\n      ...patchGLPrototype(\n        win.WebGL2RenderingContext.prototype,\n        CanvasContext.WebGL2,\n        cb,\n        blockClass2,\n        blockSelector,\n        unblockSelector,\n        mirror,\n        win\n      )\n    );\n  }\n  return () => {\n    handlers.forEach((h) => h());\n  };\n}\nconst r = `for(var e=\"ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/\",t=\"undefined\"==typeof Uint8Array?[]:new Uint8Array(256),a=0;a<64;a++)t[e.charCodeAt(a)]=a;var n=function(t){var a,n=new Uint8Array(t),r=n.length,s=\"\";for(a=0;a<r;a+=3)s+=e[n[a]>>2],s+=e[(3&n[a])<<4|n[a+1]>>4],s+=e[(15&n[a+1])<<2|n[a+2]>>6],s+=e[63&n[a+2]];return r%3==2?s=s.substring(0,s.length-1)+\"=\":r%3==1&&(s=s.substring(0,s.length-2)+\"==\"),s};const r=new Map,s=new Map;const i=self;i.onmessage=async function(e){if(!(\"OffscreenCanvas\"in globalThis))return i.postMessage({id:e.data.id});{const{id:t,bitmap:a,width:o,height:f,maxCanvasSize:c,dataURLOptions:g}=e.data,u=async function(e,t,a){const r=e+\"-\"+t;if(\"OffscreenCanvas\"in globalThis){if(s.has(r))return s.get(r);const i=new OffscreenCanvas(e,t);i.getContext(\"2d\");const o=await i.convertToBlob(a),f=await o.arrayBuffer(),c=n(f);return s.set(r,c),c}return\"\"}(o,f,g),[h,d]=function(e,t,a){if(!a)return[e,t];const[n,r]=a;if(e<=n&&t<=r)return[e,t];let s=e,i=t;return s>n&&(i=Math.floor(n*t/e),s=n),i>r&&(s=Math.floor(r*e/t),i=r),[s,i]}(o,f,c),l=new OffscreenCanvas(h,d),w=l.getContext(\"bitmaprenderer\"),p=h===o&&d===f?a:await createImageBitmap(a,{resizeWidth:h,resizeHeight:d,resizeQuality:\"low\"});w?.transferFromImageBitmap(p),a.close();const y=await l.convertToBlob(g),v=y.type,b=await y.arrayBuffer(),m=n(b);if(p.close(),!r.has(t)&&await u===m)return r.set(t,m),i.postMessage({id:t});if(r.get(t)===m)return i.postMessage({id:t});i.postMessage({id:t,type:v,base64:m,width:o,height:f}),r.set(t,m)}};`;\nfunction t() {\n  const t2 = new Blob([r]);\n  return URL.createObjectURL(t2);\n}\nclass CanvasManagerNoop {\n  reset() {\n  }\n  freeze() {\n  }\n  unfreeze() {\n  }\n  lock() {\n  }\n  unlock() {\n  }\n  snapshot() {\n  }\n  addWindow() {\n  }\n  addShadowRoot() {\n  }\n  resetShadowRoots() {\n  }\n}\nclass CanvasManager {\n  constructor(options) {\n    this.pendingCanvasMutations = /* @__PURE__ */ new Map();\n    this.rafStamps = { latestId: 0, invokeId: null };\n    this.shadowDoms = /* @__PURE__ */ new Set();\n    this.windowsSet = /* @__PURE__ */ new WeakSet();\n    this.windows = [];\n    this.restoreHandlers = [];\n    this.frozen = false;\n    this.locked = false;\n    this.snapshotInProgressMap = /* @__PURE__ */ new Map();\n    this.worker = null;\n    this.lastSnapshotTime = 0;\n    this.processMutation = (target, mutation) => {\n      const newFrame = this.rafStamps.invokeId && this.rafStamps.latestId !== this.rafStamps.invokeId;\n      if (newFrame || !this.rafStamps.invokeId)\n        this.rafStamps.invokeId = this.rafStamps.latestId;\n      if (!this.pendingCanvasMutations.has(target)) {\n        this.pendingCanvasMutations.set(target, []);\n      }\n      this.pendingCanvasMutations.get(target).push(mutation);\n    };\n    const {\n      enableManualSnapshot,\n      sampling = \"all\",\n      win,\n      recordCanvas,\n      errorHandler: errorHandler2\n    } = options;\n    options.sampling = sampling;\n    this.mutationCb = options.mutationCb;\n    this.mirror = options.mirror;\n    this.options = options;\n    if (errorHandler2) {\n      registerErrorHandler(errorHandler2);\n    }\n    if (recordCanvas && typeof sampling === \"number\" || enableManualSnapshot) {\n      this.worker = this.initFPSWorker();\n    }\n    this.addWindow(win);\n    if (enableManualSnapshot) {\n      return;\n    }\n    callbackWrapper(() => {\n      if (recordCanvas && sampling === \"all\") {\n        this.startRAFTimestamping();\n        this.startPendingCanvasMutationFlusher();\n      }\n      if (recordCanvas && typeof sampling === \"number\") {\n        this.initCanvasFPSObserver();\n      }\n    })();\n  }\n  reset() {\n    this.pendingCanvasMutations.clear();\n    this.restoreHandlers.forEach((handler) => {\n      try {\n        handler();\n      } catch (e) {\n      }\n    });\n    this.restoreHandlers = [];\n    this.windowsSet = /* @__PURE__ */ new WeakSet();\n    this.windows = [];\n    this.shadowDoms = /* @__PURE__ */ new Set();\n    this.worker?.terminate();\n    this.worker = null;\n    this.snapshotInProgressMap = /* @__PURE__ */ new Map();\n  }\n  freeze() {\n    this.frozen = true;\n  }\n  unfreeze() {\n    this.frozen = false;\n  }\n  lock() {\n    this.locked = true;\n  }\n  unlock() {\n    this.locked = false;\n  }\n  addWindow(win) {\n    const {\n      sampling = \"all\",\n      blockClass,\n      blockSelector,\n      unblockSelector,\n      recordCanvas,\n      enableManualSnapshot\n    } = this.options;\n    if (this.windowsSet.has(win)) return;\n    if (enableManualSnapshot) {\n      this.windowsSet.add(win);\n      this.windows.push(new WeakRef(win));\n      return;\n    }\n    callbackWrapper(() => {\n      if (recordCanvas && sampling === \"all\") {\n        this.initCanvasMutationObserver(\n          win,\n          blockClass,\n          blockSelector,\n          unblockSelector\n        );\n      }\n      if (recordCanvas && typeof sampling === \"number\") {\n        const canvasContextReset = initCanvasContextObserver(\n          win,\n          blockClass,\n          blockSelector,\n          unblockSelector,\n          true\n        );\n        this.restoreHandlers.push(() => {\n          canvasContextReset();\n        });\n      }\n    })();\n    this.windowsSet.add(win);\n    this.windows.push(new WeakRef(win));\n  }\n  addShadowRoot(shadowRoot) {\n    this.shadowDoms.add(new WeakRef(shadowRoot));\n  }\n  resetShadowRoots() {\n    this.shadowDoms = /* @__PURE__ */ new Set();\n  }\n  snapshot(canvasElement, options) {\n    if (options?.skipRequestAnimationFrame) {\n      this.takeSnapshot(performance.now(), true, canvasElement);\n      return;\n    }\n    onRequestAnimationFrame(\n      (timestamp) => this.takeSnapshot(timestamp, true, canvasElement)\n    );\n  }\n  initFPSWorker() {\n    const worker = new Worker(t());\n    worker.onmessage = (e) => {\n      const data = e.data;\n      const { id } = data;\n      this.snapshotInProgressMap.set(id, false);\n      if (!(\"base64\" in data)) return;\n      const { base64, type, width, height } = data;\n      this.mutationCb({\n        id,\n        type: CanvasContext[\"2D\"],\n        commands: [\n          {\n            property: \"clearRect\",\n            // wipe canvas\n            args: [0, 0, width, height]\n          },\n          {\n            property: \"drawImage\",\n            // draws (semi-transparent) image\n            args: [\n              {\n                rr_type: \"ImageBitmap\",\n                args: [\n                  {\n                    rr_type: \"Blob\",\n                    data: [{ rr_type: \"ArrayBuffer\", base64 }],\n                    type\n                  }\n                ]\n              },\n              0,\n              0,\n              // The below args are needed if we enforce a max size, we want to\n              // retain the original size when drawing the image (which should be smaller)\n              width,\n              height\n            ]\n          }\n        ]\n      });\n    };\n    return worker;\n  }\n  initCanvasFPSObserver() {\n    let rafId;\n    if (!this.windows.length && !this.shadowDoms.size) {\n      return;\n    }\n    const rafCallback = (timestamp) => {\n      this.takeSnapshot(timestamp, false);\n      rafId = onRequestAnimationFrame(rafCallback);\n    };\n    rafId = onRequestAnimationFrame(rafCallback);\n    this.restoreHandlers.push(() => {\n      if (rafId) {\n        cancelAnimationFrame(rafId);\n      }\n    });\n  }\n  initCanvasMutationObserver(win, blockClass, blockSelector, unblockSelector) {\n    const canvasContextReset = initCanvasContextObserver(\n      win,\n      blockClass,\n      blockSelector,\n      unblockSelector,\n      false\n    );\n    const canvas2DReset = initCanvas2DMutationObserver(\n      this.processMutation.bind(this),\n      win,\n      blockClass,\n      blockSelector,\n      unblockSelector\n    );\n    const canvasWebGL1and2Reset = initCanvasWebGLMutationObserver(\n      this.processMutation.bind(this),\n      win,\n      blockClass,\n      blockSelector,\n      unblockSelector,\n      this.mirror\n    );\n    this.restoreHandlers.push(() => {\n      canvasContextReset();\n      canvas2DReset();\n      canvasWebGL1and2Reset();\n    });\n  }\n  /**\n   * Returns all `canvas` elements that are not blocked by the given selectors. Searches all windows and shadow roots.\n   */\n  getCanvasElements(blockClass, blockSelector, unblockSelector) {\n    const matchedCanvas = [];\n    const searchCanvas = (root) => {\n      root.querySelectorAll(\"canvas\").forEach((canvas) => {\n        if (!isBlocked(canvas, blockClass, blockSelector, unblockSelector, true)) {\n          matchedCanvas.push(canvas);\n        }\n      });\n    };\n    for (const item of this.windows) {\n      const window2 = item.deref();\n      let _document;\n      try {\n        _document = window2 && window2.document;\n      } catch {\n      }\n      if (_document) {\n        searchCanvas(_document);\n      }\n    }\n    for (const item of this.shadowDoms) {\n      const shadowRoot = item.deref();\n      if (shadowRoot) {\n        searchCanvas(shadowRoot);\n      }\n    }\n    return matchedCanvas;\n  }\n  /**\n   * Takes a snapshot of the provided canvas element, or will search all windows/shadow roots for canvases. Will self-throttle based on `options.sampling`.\n   *\n   * @returns `true` if the snapshot was taken, `false` if it was throttled.\n   */\n  takeSnapshot(timestamp, isManualSnapshot, canvasElement) {\n    const {\n      sampling,\n      blockClass,\n      blockSelector,\n      unblockSelector,\n      dataURLOptions,\n      maxCanvasSize\n    } = this.options;\n    const fps = sampling === \"all\" ? 2 : sampling || 2;\n    const timeBetweenSnapshots = 1e3 / fps;\n    const shouldThrottle = this.lastSnapshotTime && timestamp - this.lastSnapshotTime < timeBetweenSnapshots;\n    if (shouldThrottle) {\n      return false;\n    }\n    this.lastSnapshotTime = timestamp;\n    const canvases = canvasElement ? [canvasElement] : this.getCanvasElements(blockClass, blockSelector, unblockSelector);\n    canvases.forEach((canvas) => {\n      const id = this.mirror.getId(canvas);\n      if (!this.mirror.hasNode(canvas) || !canvas.width || !canvas.height || this.snapshotInProgressMap.get(id)) {\n        return;\n      }\n      this.snapshotInProgressMap.set(id, true);\n      if (!isManualSnapshot && [\"webgl\", \"webgl2\"].includes(canvas.__context)) {\n        const context = canvas.getContext(canvas.__context);\n        if (context?.getContextAttributes()?.preserveDrawingBuffer === false) {\n          context.clear(context.COLOR_BUFFER_BIT);\n        }\n      }\n      createImageBitmap(canvas).then((bitmap) => {\n        this.worker?.postMessage(\n          {\n            id,\n            bitmap,\n            width: canvas.width,\n            height: canvas.height,\n            dataURLOptions,\n            maxCanvasSize\n          },\n          [bitmap]\n        );\n      }).catch((error) => {\n        callbackWrapper(() => {\n          this.snapshotInProgressMap.delete(id);\n          throw error;\n        })();\n      });\n    });\n    return true;\n  }\n  startPendingCanvasMutationFlusher() {\n    onRequestAnimationFrame(() => this.flushPendingCanvasMutations());\n  }\n  startRAFTimestamping() {\n    const setLatestRAFTimestamp = (timestamp) => {\n      this.rafStamps.latestId = timestamp;\n      onRequestAnimationFrame(setLatestRAFTimestamp);\n    };\n    onRequestAnimationFrame(setLatestRAFTimestamp);\n  }\n  flushPendingCanvasMutations() {\n    this.pendingCanvasMutations.forEach(\n      (_values, canvas) => {\n        const id = this.mirror.getId(canvas);\n        this.flushPendingCanvasMutationFor(canvas, id);\n      }\n    );\n    onRequestAnimationFrame(() => this.flushPendingCanvasMutations());\n  }\n  flushPendingCanvasMutationFor(canvas, id) {\n    if (this.frozen || this.locked) {\n      return;\n    }\n    const valuesWithType = this.pendingCanvasMutations.get(canvas);\n    if (!valuesWithType || id === -1) return;\n    const values = valuesWithType.map((value) => {\n      const { type: type2, ...rest } = value;\n      return rest;\n    });\n    const { type } = valuesWithType[0];\n    this.mutationCb({ id, type, commands: values });\n    this.pendingCanvasMutations.delete(canvas);\n  }\n}\nexport {\n  createCache as $,\n  MediaInteractions as A,\n  patch as B,\n  setTimeout as C,\n  legacy_isTouchEvent as D,\n  nowTimestamp as E,\n  IncrementalSource as F,\n  getWindowHeight as G,\n  getWindowWidth as H,\n  IGNORED_NODE as I,\n  toUpperCase as J,\n  genId as K,\n  EventType as L,\n  MouseInteractions as M,\n  NodeType as N,\n  stringifyRule as O,\n  PointerTypes as P,\n  onRequestAnimationFrame as Q,\n  polyfill as R,\n  StyleSheetMirror as S,\n  unregisterErrorHandler as T,\n  createMirror as U,\n  CanvasManagerNoop as V,\n  snapshot as W,\n  registerErrorHandler as X,\n  ReplayerEvents as Y,\n  decode as Z,\n  CanvasContext as _,\n  isBlocked as a,\n  rebuild as a0,\n  buildNodeWithSN as a1,\n  queueToResolveTrees as a2,\n  iterateResolveTree as a3,\n  uniqueTextMutations as a4,\n  getPositionsAndIndex as a5,\n  getNestedRule as a6,\n  getBaseDimension as a7,\n  clearTimeout as a8,\n  CanvasManager as a9,\n  utils as aa,\n  isShadowRoot as b,\n  isSerialized as c,\n  isAncestorRemoved as d,\n  isNativeShadowDom as e,\n  getInputValue as f,\n  getInputType as g,\n  ignoreAttribute as h,\n  isIgnored as i,\n  toLowerCase as j,\n  closestElementOfNode as k,\n  hasShadowRoot as l,\n  maskInputValue as m,\n  needMaskingText as n,\n  inDom as o,\n  getShadowHost as p,\n  serializeNodeWithId as q,\n  isSerializedIframe as r,\n  shouldMaskInput as s,\n  transformAttribute as t,\n  isSerializedStylesheet as u,\n  callbackWrapper as v,\n  throttle as w,\n  getWindowScroll as x,\n  on as y,\n  hookSetter as z\n};\n//# sourceMappingURL=canvas-manager-B7mHazUr.js.map\n","import { i as isIgnored, a as isBlocked, b as isShadowRoot, c as isSerialized, d as isAncestorRemoved, e as isNativeShadowDom, g as getInputType, f as getInputValue, s as shouldMaskInput, n as needMaskingText, m as maskInputValue, h as ignoreAttribute, t as transformAttribute, j as toLowerCase, k as closestElementOfNode, l as hasShadowRoot, I as IGNORED_NODE, o as inDom, p as getShadowHost, q as serializeNodeWithId, r as isSerializedIframe, u as isSerializedStylesheet, v as callbackWrapper, w as throttle, x as getWindowScroll, y as on, M as MouseInteractions, z as hookSetter, A as MediaInteractions, B as patch, C as setTimeout$1, D as legacy_isTouchEvent, E as nowTimestamp, F as IncrementalSource, G as getWindowHeight, H as getWindowWidth, J as toUpperCase, P as PointerTypes, K as genId, L as EventType, N as NodeType$2, S as StyleSheetMirror, O as stringifyRule, Q as onRequestAnimationFrame, R as polyfill$1, T as unregisterErrorHandler, U as createMirror$2, V as CanvasManagerNoop, W as snapshot, X as registerErrorHandler, Y as ReplayerEvents, Z as decode, _ as CanvasContext, $ as createCache, a0 as rebuild, a1 as buildNodeWithSN, a2 as queueToResolveTrees, a3 as iterateResolveTree, a4 as uniqueTextMutations, a5 as getPositionsAndIndex, a6 as getNestedRule, a7 as getBaseDimension, a8 as clearTimeout } from \"./canvas-manager-B7mHazUr.js\";\nimport { a9, aa } from \"./canvas-manager-B7mHazUr.js\";\nvar __defProp = Object.defineProperty;\nvar __defNormalProp = (obj, key, value) => key in obj ? __defProp(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;\nvar __publicField = (obj, key, value) => __defNormalProp(obj, typeof key !== \"symbol\" ? key + \"\" : key, value);\nvar __defProp2 = Object.defineProperty;\nvar __defNormalProp2 = (obj, key, value) => key in obj ? __defProp2(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;\nvar __publicField2 = (obj, key, value) => __defNormalProp2(obj, typeof key !== \"symbol\" ? key + \"\" : key, value);\nvar NodeType$1 = /* @__PURE__ */ ((NodeType2) => {\n  NodeType2[NodeType2[\"Document\"] = 0] = \"Document\";\n  NodeType2[NodeType2[\"DocumentType\"] = 1] = \"DocumentType\";\n  NodeType2[NodeType2[\"Element\"] = 2] = \"Element\";\n  NodeType2[NodeType2[\"Text\"] = 3] = \"Text\";\n  NodeType2[NodeType2[\"CDATA\"] = 4] = \"CDATA\";\n  NodeType2[NodeType2[\"Comment\"] = 5] = \"Comment\";\n  return NodeType2;\n})(NodeType$1 || {});\nlet Mirror$1 = class Mirror {\n  constructor() {\n    __publicField2(this, \"idNodeMap\", /* @__PURE__ */ new Map());\n    __publicField2(this, \"nodeMetaMap\", /* @__PURE__ */ new WeakMap());\n  }\n  getId(n2) {\n    if (!n2) return -1;\n    const id = this.getMeta(n2)?.id;\n    return id ?? -1;\n  }\n  getNode(id) {\n    return this.idNodeMap.get(id) || null;\n  }\n  getIds() {\n    return Array.from(this.idNodeMap.keys());\n  }\n  getMeta(n2) {\n    return this.nodeMetaMap.get(n2) || null;\n  }\n  // removes the node from idNodeMap\n  // doesn't remove the node from nodeMetaMap\n  removeNodeFromMap(n2) {\n    const id = this.getId(n2);\n    this.idNodeMap.delete(id);\n    if (n2.childNodes) {\n      n2.childNodes.forEach(\n        (childNode) => this.removeNodeFromMap(childNode)\n      );\n    }\n  }\n  has(id) {\n    return this.idNodeMap.has(id);\n  }\n  hasNode(node) {\n    return this.nodeMetaMap.has(node);\n  }\n  add(n2, meta) {\n    const id = meta.id;\n    this.idNodeMap.set(id, n2);\n    this.nodeMetaMap.set(n2, meta);\n  }\n  replace(id, n2) {\n    const oldNode = this.getNode(id);\n    if (oldNode) {\n      const meta = this.nodeMetaMap.get(oldNode);\n      if (meta) this.nodeMetaMap.set(n2, meta);\n    }\n    this.idNodeMap.set(id, n2);\n  }\n  reset() {\n    this.idNodeMap = /* @__PURE__ */ new Map();\n    this.nodeMetaMap = /* @__PURE__ */ new WeakMap();\n  }\n};\nfunction createMirror$1() {\n  return new Mirror$1();\n}\nfunction parseCSSText(cssText) {\n  const res = {};\n  const listDelimiter = /;(?![^(]*\\))/g;\n  const propertyDelimiter = /:(.+)/;\n  const comment = /\\/\\*.*?\\*\\//g;\n  cssText.replace(comment, \"\").split(listDelimiter).forEach(function(item) {\n    if (item) {\n      const tmp = item.split(propertyDelimiter);\n      tmp.length > 1 && (res[camelize(tmp[0].trim())] = tmp[1].trim());\n    }\n  });\n  return res;\n}\nfunction toCSSText(style) {\n  const properties = [];\n  for (const name in style) {\n    const value = style[name];\n    if (typeof value !== \"string\") continue;\n    const normalizedName = hyphenate(name);\n    properties.push(`${normalizedName}: ${value};`);\n  }\n  return properties.join(\" \");\n}\nconst camelizeRE = /-([a-z])/g;\nconst CUSTOM_PROPERTY_REGEX = /^--[a-zA-Z0-9-]+$/;\nconst camelize = (str) => {\n  if (CUSTOM_PROPERTY_REGEX.test(str)) return str;\n  return str.replace(camelizeRE, (_, c2) => c2 ? c2.toUpperCase() : \"\");\n};\nconst hyphenateRE = /\\B([A-Z])/g;\nconst hyphenate = (str) => {\n  return str.replace(hyphenateRE, \"-$1\").toLowerCase();\n};\nclass BaseRRNode {\n  // eslint-disable-next-line @typescript-eslint/no-unused-vars, @typescript-eslint/no-explicit-any\n  constructor(..._args) {\n    __publicField(this, \"parentElement\", null);\n    __publicField(this, \"parentNode\", null);\n    __publicField(this, \"ownerDocument\");\n    __publicField(this, \"firstChild\", null);\n    __publicField(this, \"lastChild\", null);\n    __publicField(this, \"previousSibling\", null);\n    __publicField(this, \"nextSibling\", null);\n    __publicField(this, \"ELEMENT_NODE\", 1);\n    __publicField(this, \"TEXT_NODE\", 3);\n    __publicField(this, \"nodeType\");\n    __publicField(this, \"nodeName\");\n    __publicField(this, \"RRNodeType\");\n  }\n  get childNodes() {\n    const childNodes = [];\n    let childIterator = this.firstChild;\n    while (childIterator) {\n      childNodes.push(childIterator);\n      childIterator = childIterator.nextSibling;\n    }\n    return childNodes;\n  }\n  contains(node) {\n    if (!(node instanceof BaseRRNode)) return false;\n    else if (node.ownerDocument !== this.ownerDocument) return false;\n    else if (node === this) return true;\n    while (node.parentNode) {\n      if (node.parentNode === this) return true;\n      node = node.parentNode;\n    }\n    return false;\n  }\n  // eslint-disable-next-line @typescript-eslint/no-unused-vars\n  appendChild(_newChild) {\n    throw new Error(\n      `RRDomException: Failed to execute 'appendChild' on 'RRNode': This RRNode type does not support this method.`\n    );\n  }\n  // eslint-disable-next-line @typescript-eslint/no-unused-vars\n  insertBefore(_newChild, _refChild) {\n    throw new Error(\n      `RRDomException: Failed to execute 'insertBefore' on 'RRNode': This RRNode type does not support this method.`\n    );\n  }\n  // eslint-disable-next-line @typescript-eslint/no-unused-vars\n  removeChild(_node) {\n    throw new Error(\n      `RRDomException: Failed to execute 'removeChild' on 'RRNode': This RRNode type does not support this method.`\n    );\n  }\n  toString() {\n    return \"RRNode\";\n  }\n}\nclass BaseRRDocument extends BaseRRNode {\n  // eslint-disable-next-line @typescript-eslint/no-explicit-any\n  constructor(...args) {\n    super(args);\n    __publicField(this, \"nodeType\", 9);\n    __publicField(this, \"nodeName\", \"#document\");\n    __publicField(this, \"compatMode\", \"CSS1Compat\");\n    __publicField(this, \"RRNodeType\", NodeType$1.Document);\n    __publicField(this, \"textContent\", null);\n    this.ownerDocument = this;\n  }\n  get documentElement() {\n    return this.childNodes.find(\n      (node) => node.RRNodeType === NodeType$1.Element && node.tagName === \"HTML\"\n    ) || null;\n  }\n  get body() {\n    return this.documentElement?.childNodes.find(\n      (node) => node.RRNodeType === NodeType$1.Element && node.tagName === \"BODY\"\n    ) || null;\n  }\n  get head() {\n    return this.documentElement?.childNodes.find(\n      (node) => node.RRNodeType === NodeType$1.Element && node.tagName === \"HEAD\"\n    ) || null;\n  }\n  get implementation() {\n    return this;\n  }\n  get firstElementChild() {\n    return this.documentElement;\n  }\n  appendChild(newChild) {\n    const nodeType = newChild.RRNodeType;\n    if (nodeType === NodeType$1.Element || nodeType === NodeType$1.DocumentType) {\n      if (this.childNodes.some((s2) => s2.RRNodeType === nodeType)) {\n        throw new Error(\n          `RRDomException: Failed to execute 'appendChild' on 'RRNode': Only one ${nodeType === NodeType$1.Element ? \"RRElement\" : \"RRDoctype\"} on RRDocument allowed.`\n        );\n      }\n    }\n    const child = appendChild(this, newChild);\n    child.parentElement = null;\n    return child;\n  }\n  insertBefore(newChild, refChild) {\n    const nodeType = newChild.RRNodeType;\n    if (nodeType === NodeType$1.Element || nodeType === NodeType$1.DocumentType) {\n      if (this.childNodes.some((s2) => s2.RRNodeType === nodeType)) {\n        throw new Error(\n          `RRDomException: Failed to execute 'insertBefore' on 'RRNode': Only one ${nodeType === NodeType$1.Element ? \"RRElement\" : \"RRDoctype\"} on RRDocument allowed.`\n        );\n      }\n    }\n    const child = insertBefore(this, newChild, refChild);\n    child.parentElement = null;\n    return child;\n  }\n  removeChild(node) {\n    return removeChild(this, node);\n  }\n  open() {\n    this.firstChild = null;\n    this.lastChild = null;\n  }\n  close() {\n  }\n  /**\n   * Adhoc implementation for setting xhtml namespace in rebuilt.ts (rrweb-snapshot).\n   * There are two lines used this function:\n   * 1. doc.write('\\<!DOCTYPE html PUBLIC \"-//W3C//DTD XHTML 1.0 Transitional//EN\" \"\"\\>')\n   * 2. doc.write('\\<!DOCTYPE html PUBLIC \"-//W3C//DTD HTML 4.0 Transitional//EN\" \"\"\\>')\n   */\n  write(content) {\n    let publicId;\n    if (content === '<!DOCTYPE html PUBLIC \"-//W3C//DTD XHTML 1.0 Transitional//EN\" \"\">')\n      publicId = \"-//W3C//DTD XHTML 1.0 Transitional//EN\";\n    else if (content === '<!DOCTYPE html PUBLIC \"-//W3C//DTD HTML 4.0 Transitional//EN\" \"\">')\n      publicId = \"-//W3C//DTD HTML 4.0 Transitional//EN\";\n    if (publicId) {\n      const doctype = this.createDocumentType(\"html\", publicId, \"\");\n      this.open();\n      this.appendChild(doctype);\n    }\n  }\n  createDocument(_namespace, _qualifiedName, _doctype) {\n    return new BaseRRDocument();\n  }\n  createDocumentType(qualifiedName, publicId, systemId) {\n    const doctype = new BaseRRDocumentType(qualifiedName, publicId, systemId);\n    doctype.ownerDocument = this;\n    return doctype;\n  }\n  createElement(tagName) {\n    const element = new BaseRRElement(tagName);\n    element.ownerDocument = this;\n    return element;\n  }\n  createElementNS(_namespaceURI, qualifiedName) {\n    return this.createElement(qualifiedName);\n  }\n  createTextNode(data) {\n    const text = new BaseRRText(data);\n    text.ownerDocument = this;\n    return text;\n  }\n  createComment(data) {\n    const comment = new BaseRRComment(data);\n    comment.ownerDocument = this;\n    return comment;\n  }\n  createCDATASection(data) {\n    const CDATASection = new BaseRRCDATASection(data);\n    CDATASection.ownerDocument = this;\n    return CDATASection;\n  }\n  toString() {\n    return \"RRDocument\";\n  }\n}\nclass BaseRRDocumentType extends BaseRRNode {\n  constructor(qualifiedName, publicId, systemId) {\n    super();\n    __publicField(this, \"nodeType\", 10);\n    __publicField(this, \"RRNodeType\", NodeType$1.DocumentType);\n    __publicField(this, \"name\");\n    __publicField(this, \"publicId\");\n    __publicField(this, \"systemId\");\n    __publicField(this, \"textContent\", null);\n    this.name = qualifiedName;\n    this.publicId = publicId;\n    this.systemId = systemId;\n    this.nodeName = qualifiedName;\n  }\n  toString() {\n    return \"RRDocumentType\";\n  }\n}\nclass BaseRRElement extends BaseRRNode {\n  constructor(tagName) {\n    super();\n    __publicField(this, \"nodeType\", 1);\n    __publicField(this, \"RRNodeType\", NodeType$1.Element);\n    __publicField(this, \"tagName\");\n    __publicField(this, \"attributes\", {});\n    __publicField(this, \"shadowRoot\", null);\n    __publicField(this, \"scrollLeft\");\n    __publicField(this, \"scrollTop\");\n    this.tagName = tagName.toUpperCase();\n    this.nodeName = tagName.toUpperCase();\n  }\n  get textContent() {\n    let result = \"\";\n    this.childNodes.forEach((node) => result += node.textContent);\n    return result;\n  }\n  set textContent(textContent) {\n    this.firstChild = null;\n    this.lastChild = null;\n    this.appendChild(this.ownerDocument.createTextNode(textContent));\n  }\n  get classList() {\n    return new ClassList(\n      this.attributes.class,\n      (newClassName) => {\n        this.attributes.class = newClassName;\n      }\n    );\n  }\n  get id() {\n    return this.attributes.id || \"\";\n  }\n  get className() {\n    return this.attributes.class || \"\";\n  }\n  get style() {\n    const style = this.attributes.style ? parseCSSText(this.attributes.style) : {};\n    const hyphenateRE2 = /\\B([A-Z])/g;\n    style.setProperty = (name, value, priority) => {\n      if (hyphenateRE2.test(name)) return;\n      const normalizedName = camelize(name);\n      if (!value) delete style[normalizedName];\n      else style[normalizedName] = value;\n      if (priority === \"important\") style[normalizedName] += \" !important\";\n      this.attributes.style = toCSSText(style);\n    };\n    style.removeProperty = (name) => {\n      if (hyphenateRE2.test(name)) return \"\";\n      const normalizedName = camelize(name);\n      const value = style[normalizedName] || \"\";\n      delete style[normalizedName];\n      this.attributes.style = toCSSText(style);\n      return value;\n    };\n    return style;\n  }\n  getAttribute(name) {\n    return this.attributes[name] || null;\n  }\n  setAttribute(name, attribute) {\n    this.attributes[name] = attribute;\n  }\n  setAttributeNS(_namespace, qualifiedName, value) {\n    this.setAttribute(qualifiedName, value);\n  }\n  removeAttribute(name) {\n    delete this.attributes[name];\n  }\n  appendChild(newChild) {\n    return appendChild(this, newChild);\n  }\n  insertBefore(newChild, refChild) {\n    return insertBefore(this, newChild, refChild);\n  }\n  removeChild(node) {\n    return removeChild(this, node);\n  }\n  // eslint-disable-next-line @typescript-eslint/no-unused-vars\n  attachShadow(_init) {\n    const shadowRoot = this.ownerDocument.createElement(\"SHADOWROOT\");\n    this.shadowRoot = shadowRoot;\n    return shadowRoot;\n  }\n  // eslint-disable-next-line @typescript-eslint/no-unused-vars\n  dispatchEvent(_event) {\n    return true;\n  }\n  toString() {\n    let attributeString = \"\";\n    for (const attribute in this.attributes) {\n      attributeString += `${attribute}=\"${this.attributes[attribute]}\" `;\n    }\n    return `${this.tagName} ${attributeString}`;\n  }\n}\nclass BaseRRMediaElement extends BaseRRElement {\n  constructor() {\n    super(...arguments);\n    __publicField(this, \"currentTime\");\n    __publicField(this, \"volume\");\n    __publicField(this, \"paused\");\n    __publicField(this, \"muted\");\n    __publicField(this, \"playbackRate\");\n    __publicField(this, \"loop\");\n  }\n  // eslint-disable-next-line @typescript-eslint/no-unused-vars\n  attachShadow(_init) {\n    throw new Error(\n      `RRDomException: Failed to execute 'attachShadow' on 'RRElement': This RRElement does not support attachShadow`\n    );\n  }\n  play() {\n    this.paused = false;\n  }\n  pause() {\n    this.paused = true;\n  }\n}\nclass BaseRRText extends BaseRRNode {\n  constructor(data) {\n    super();\n    __publicField(this, \"nodeType\", 3);\n    __publicField(this, \"nodeName\", \"#text\");\n    __publicField(this, \"RRNodeType\", NodeType$1.Text);\n    __publicField(this, \"data\");\n    this.data = data;\n  }\n  get textContent() {\n    return this.data;\n  }\n  set textContent(textContent) {\n    this.data = textContent;\n  }\n  toString() {\n    return `RRText text=${JSON.stringify(this.data)}`;\n  }\n}\nclass BaseRRComment extends BaseRRNode {\n  constructor(data) {\n    super();\n    __publicField(this, \"nodeType\", 8);\n    __publicField(this, \"nodeName\", \"#comment\");\n    __publicField(this, \"RRNodeType\", NodeType$1.Comment);\n    __publicField(this, \"data\");\n    this.data = data;\n  }\n  get textContent() {\n    return this.data;\n  }\n  set textContent(textContent) {\n    this.data = textContent;\n  }\n  toString() {\n    return `RRComment text=${JSON.stringify(this.data)}`;\n  }\n}\nclass BaseRRCDATASection extends BaseRRNode {\n  constructor(data) {\n    super();\n    __publicField(this, \"nodeName\", \"#cdata-section\");\n    __publicField(this, \"nodeType\", 4);\n    __publicField(this, \"RRNodeType\", NodeType$1.CDATA);\n    __publicField(this, \"data\");\n    this.data = data;\n  }\n  get textContent() {\n    return this.data;\n  }\n  set textContent(textContent) {\n    this.data = textContent;\n  }\n  toString() {\n    return `RRCDATASection data=${JSON.stringify(this.data)}`;\n  }\n}\nclass ClassList {\n  constructor(classText, onChange) {\n    __publicField(this, \"onChange\");\n    __publicField(this, \"classes\", []);\n    __publicField(this, \"add\", (...classNames) => {\n      for (const item of classNames) {\n        const className = String(item);\n        if (this.classes.indexOf(className) >= 0) continue;\n        this.classes.push(className);\n      }\n      this.onChange && this.onChange(this.classes.join(\" \"));\n    });\n    __publicField(this, \"remove\", (...classNames) => {\n      this.classes = this.classes.filter(\n        (item) => classNames.indexOf(item) === -1\n      );\n      this.onChange && this.onChange(this.classes.join(\" \"));\n    });\n    if (classText) {\n      const classes = classText.trim().split(/\\s+/);\n      this.classes.push(...classes);\n    }\n    this.onChange = onChange;\n  }\n}\nfunction appendChild(parent, newChild) {\n  if (newChild.parentNode) newChild.parentNode.removeChild(newChild);\n  if (parent.lastChild) {\n    parent.lastChild.nextSibling = newChild;\n    newChild.previousSibling = parent.lastChild;\n  } else {\n    parent.firstChild = newChild;\n    newChild.previousSibling = null;\n  }\n  parent.lastChild = newChild;\n  newChild.nextSibling = null;\n  newChild.parentNode = parent;\n  newChild.parentElement = parent;\n  newChild.ownerDocument = parent.ownerDocument;\n  return newChild;\n}\nfunction insertBefore(parent, newChild, refChild) {\n  if (!refChild) return appendChild(parent, newChild);\n  if (refChild.parentNode !== parent)\n    throw new Error(\n      \"Failed to execute 'insertBefore' on 'RRNode': The RRNode before which the new node is to be inserted is not a child of this RRNode.\"\n    );\n  if (newChild === refChild) return newChild;\n  if (newChild.parentNode) newChild.parentNode.removeChild(newChild);\n  newChild.previousSibling = refChild.previousSibling;\n  refChild.previousSibling = newChild;\n  newChild.nextSibling = refChild;\n  if (newChild.previousSibling) newChild.previousSibling.nextSibling = newChild;\n  else parent.firstChild = newChild;\n  newChild.parentElement = parent;\n  newChild.parentNode = parent;\n  newChild.ownerDocument = parent.ownerDocument;\n  return newChild;\n}\nfunction removeChild(parent, child) {\n  if (child.parentNode !== parent)\n    throw new Error(\n      \"Failed to execute 'removeChild' on 'RRNode': The RRNode to be removed is not a child of this RRNode.\"\n    );\n  if (child.previousSibling)\n    child.previousSibling.nextSibling = child.nextSibling;\n  else parent.firstChild = child.nextSibling;\n  if (child.nextSibling)\n    child.nextSibling.previousSibling = child.previousSibling;\n  else parent.lastChild = child.previousSibling;\n  child.previousSibling = null;\n  child.nextSibling = null;\n  child.parentElement = null;\n  child.parentNode = null;\n  return child;\n}\nvar NodeType = /* @__PURE__ */ ((NodeType2) => {\n  NodeType2[NodeType2[\"PLACEHOLDER\"] = 0] = \"PLACEHOLDER\";\n  NodeType2[NodeType2[\"ELEMENT_NODE\"] = 1] = \"ELEMENT_NODE\";\n  NodeType2[NodeType2[\"ATTRIBUTE_NODE\"] = 2] = \"ATTRIBUTE_NODE\";\n  NodeType2[NodeType2[\"TEXT_NODE\"] = 3] = \"TEXT_NODE\";\n  NodeType2[NodeType2[\"CDATA_SECTION_NODE\"] = 4] = \"CDATA_SECTION_NODE\";\n  NodeType2[NodeType2[\"ENTITY_REFERENCE_NODE\"] = 5] = \"ENTITY_REFERENCE_NODE\";\n  NodeType2[NodeType2[\"ENTITY_NODE\"] = 6] = \"ENTITY_NODE\";\n  NodeType2[NodeType2[\"PROCESSING_INSTRUCTION_NODE\"] = 7] = \"PROCESSING_INSTRUCTION_NODE\";\n  NodeType2[NodeType2[\"COMMENT_NODE\"] = 8] = \"COMMENT_NODE\";\n  NodeType2[NodeType2[\"DOCUMENT_NODE\"] = 9] = \"DOCUMENT_NODE\";\n  NodeType2[NodeType2[\"DOCUMENT_TYPE_NODE\"] = 10] = \"DOCUMENT_TYPE_NODE\";\n  NodeType2[NodeType2[\"DOCUMENT_FRAGMENT_NODE\"] = 11] = \"DOCUMENT_FRAGMENT_NODE\";\n  return NodeType2;\n})(NodeType || {});\nfunction getIFrameContentDocument(iframe) {\n  try {\n    return iframe.contentDocument;\n  } catch (e2) {\n  }\n}\nfunction getIFrameContentWindow(iframe) {\n  try {\n    return iframe.contentWindow;\n  } catch (e2) {\n  }\n}\nconst NAMESPACES = {\n  svg: \"http://www.w3.org/2000/svg\",\n  \"xlink:href\": \"http://www.w3.org/1999/xlink\",\n  xmlns: \"http://www.w3.org/2000/xmlns/\"\n};\nconst SVGTagMap = {\n  altglyph: \"altGlyph\",\n  altglyphdef: \"altGlyphDef\",\n  altglyphitem: \"altGlyphItem\",\n  animatecolor: \"animateColor\",\n  animatemotion: \"animateMotion\",\n  animatetransform: \"animateTransform\",\n  clippath: \"clipPath\",\n  feblend: \"feBlend\",\n  fecolormatrix: \"feColorMatrix\",\n  fecomponenttransfer: \"feComponentTransfer\",\n  fecomposite: \"feComposite\",\n  feconvolvematrix: \"feConvolveMatrix\",\n  fediffuselighting: \"feDiffuseLighting\",\n  fedisplacementmap: \"feDisplacementMap\",\n  fedistantlight: \"feDistantLight\",\n  fedropshadow: \"feDropShadow\",\n  feflood: \"feFlood\",\n  fefunca: \"feFuncA\",\n  fefuncb: \"feFuncB\",\n  fefuncg: \"feFuncG\",\n  fefuncr: \"feFuncR\",\n  fegaussianblur: \"feGaussianBlur\",\n  feimage: \"feImage\",\n  femerge: \"feMerge\",\n  femergenode: \"feMergeNode\",\n  femorphology: \"feMorphology\",\n  feoffset: \"feOffset\",\n  fepointlight: \"fePointLight\",\n  fespecularlighting: \"feSpecularLighting\",\n  fespotlight: \"feSpotLight\",\n  fetile: \"feTile\",\n  feturbulence: \"feTurbulence\",\n  foreignobject: \"foreignObject\",\n  glyphref: \"glyphRef\",\n  lineargradient: \"linearGradient\",\n  radialgradient: \"radialGradient\"\n};\nlet createdNodeSet = null;\nfunction diff(oldTree, newTree, replayer, rrnodeMirror = newTree.mirror || newTree.ownerDocument.mirror) {\n  oldTree = diffBeforeUpdatingChildren(\n    oldTree,\n    newTree,\n    replayer,\n    rrnodeMirror\n  );\n  diffChildren(oldTree, newTree, replayer, rrnodeMirror);\n  diffAfterUpdatingChildren(oldTree, newTree, replayer);\n}\nfunction diffBeforeUpdatingChildren(oldTree, newTree, replayer, rrnodeMirror) {\n  if (replayer.afterAppend && !createdNodeSet) {\n    createdNodeSet = /* @__PURE__ */ new WeakSet();\n    setTimeout(() => {\n      createdNodeSet = null;\n    }, 0);\n  }\n  if (!sameNodeType(oldTree, newTree)) {\n    const calibratedOldTree = createOrGetNode(\n      newTree,\n      replayer.mirror,\n      rrnodeMirror\n    );\n    oldTree.parentNode?.replaceChild(calibratedOldTree, oldTree);\n    oldTree = calibratedOldTree;\n  }\n  switch (newTree.RRNodeType) {\n    case NodeType$1.Document: {\n      if (!nodeMatching(oldTree, newTree, replayer.mirror, rrnodeMirror)) {\n        const newMeta = rrnodeMirror.getMeta(newTree);\n        if (newMeta) {\n          replayer.mirror.removeNodeFromMap(oldTree);\n          oldTree.close();\n          oldTree.open();\n          replayer.mirror.add(oldTree, newMeta);\n          createdNodeSet?.add(oldTree);\n        }\n      }\n      break;\n    }\n    case NodeType$1.Element: {\n      const oldElement = oldTree;\n      const newRRElement = newTree;\n      switch (newRRElement.tagName) {\n        case \"IFRAME\": {\n          const oldContentDocument = getIFrameContentDocument(\n            oldTree\n          );\n          if (!oldContentDocument) break;\n          diff(\n            oldContentDocument,\n            newTree.contentDocument,\n            replayer,\n            rrnodeMirror\n          );\n          break;\n        }\n      }\n      if (newRRElement.shadowRoot) {\n        if (!oldElement.shadowRoot) oldElement.attachShadow({ mode: \"open\" });\n        diffChildren(\n          // eslint-disable-next-line @typescript-eslint/no-non-null-assertion\n          oldElement.shadowRoot,\n          newRRElement.shadowRoot,\n          replayer,\n          rrnodeMirror\n        );\n      }\n      diffProps(oldElement, newRRElement, rrnodeMirror);\n      break;\n    }\n  }\n  return oldTree;\n}\nfunction diffAfterUpdatingChildren(oldTree, newTree, replayer) {\n  switch (newTree.RRNodeType) {\n    case NodeType$1.Document: {\n      const scrollData = newTree.scrollData;\n      scrollData && replayer.applyScroll(scrollData, true);\n      break;\n    }\n    case NodeType$1.Element: {\n      const oldElement = oldTree;\n      const newRRElement = newTree;\n      newRRElement.scrollData && replayer.applyScroll(newRRElement.scrollData, true);\n      newRRElement.inputData && replayer.applyInput(newRRElement.inputData);\n      switch (newRRElement.tagName) {\n        case \"AUDIO\":\n        case \"VIDEO\": {\n          const oldMediaElement = oldTree;\n          const newMediaRRElement = newRRElement;\n          if (newMediaRRElement.paused !== void 0) {\n            const maybePromise = newMediaRRElement.paused ? oldMediaElement.pause() : oldMediaElement.play();\n            if (typeof maybePromise?.catch === \"function\") {\n              maybePromise.catch((e2) => {\n                console.warn(e2);\n              });\n            }\n          }\n          if (newMediaRRElement.muted !== void 0)\n            oldMediaElement.muted = newMediaRRElement.muted;\n          if (newMediaRRElement.volume !== void 0)\n            oldMediaElement.volume = newMediaRRElement.volume;\n          if (newMediaRRElement.currentTime !== void 0)\n            oldMediaElement.currentTime = newMediaRRElement.currentTime;\n          if (newMediaRRElement.playbackRate !== void 0)\n            oldMediaElement.playbackRate = newMediaRRElement.playbackRate;\n          break;\n        }\n        case \"CANVAS\": {\n          const rrCanvasElement = newTree;\n          if (rrCanvasElement.rr_dataURL !== null) {\n            const image = document.createElement(\"img\");\n            image.onload = () => {\n              const ctx = oldElement.getContext(\"2d\");\n              if (ctx) {\n                ctx.drawImage(image, 0, 0, image.width, image.height);\n              }\n            };\n            image.src = rrCanvasElement.rr_dataURL;\n          }\n          rrCanvasElement.canvasMutations.forEach(\n            (canvasMutation2) => replayer.applyCanvas(\n              canvasMutation2.event,\n              canvasMutation2.mutation,\n              oldTree\n            )\n          );\n          break;\n        }\n        // Props of style elements have to be updated after all children are updated. Otherwise the props can be overwritten by textContent.\n        case \"STYLE\": {\n          const styleSheet = oldElement.sheet;\n          styleSheet && newTree.rules.forEach(\n            (data) => replayer.applyStyleSheetMutation(data, styleSheet)\n          );\n          break;\n        }\n      }\n      break;\n    }\n    case NodeType$1.Text:\n    case NodeType$1.Comment:\n    case NodeType$1.CDATA: {\n      if (oldTree.textContent !== newTree.data)\n        oldTree.textContent = newTree.data;\n      break;\n    }\n  }\n  if (createdNodeSet?.has(oldTree)) {\n    createdNodeSet.delete(oldTree);\n    replayer.afterAppend?.(oldTree, replayer.mirror.getId(oldTree));\n  }\n}\nfunction diffProps(oldTree, newTree, rrnodeMirror) {\n  const oldAttributes = oldTree.attributes;\n  const newAttributes = newTree.attributes;\n  for (const name in newAttributes) {\n    const newValue = newAttributes[name];\n    const sn = rrnodeMirror.getMeta(newTree);\n    if (sn?.isSVG && NAMESPACES[name])\n      oldTree.setAttributeNS(NAMESPACES[name], name, newValue);\n    else if (newTree.tagName === \"CANVAS\" && name === \"rr_dataURL\") {\n      const image = document.createElement(\"img\");\n      image.src = newValue;\n      image.onload = () => {\n        const ctx = oldTree.getContext(\"2d\");\n        if (ctx) {\n          ctx.drawImage(image, 0, 0, image.width, image.height);\n        }\n      };\n    } else if (newTree.tagName === \"IFRAME\" && name === \"srcdoc\") continue;\n    else {\n      try {\n        oldTree.setAttribute(name, newValue);\n      } catch (err) {\n        console.warn(err);\n      }\n    }\n  }\n  for (const { name } of Array.from(oldAttributes))\n    if (!(name in newAttributes)) oldTree.removeAttribute(name);\n  newTree.scrollLeft && (oldTree.scrollLeft = newTree.scrollLeft);\n  newTree.scrollTop && (oldTree.scrollTop = newTree.scrollTop);\n}\nfunction diffChildren(oldTree, newTree, replayer, rrnodeMirror) {\n  const oldChildren = Array.from(oldTree.childNodes);\n  const newChildren = newTree.childNodes;\n  if (oldChildren.length === 0 && newChildren.length === 0) return;\n  let oldStartIndex = 0, oldEndIndex = oldChildren.length - 1, newStartIndex = 0, newEndIndex = newChildren.length - 1;\n  let oldStartNode = oldChildren[oldStartIndex], oldEndNode = oldChildren[oldEndIndex], newStartNode = newChildren[newStartIndex], newEndNode = newChildren[newEndIndex];\n  let oldIdToIndex = void 0, indexInOld = void 0;\n  while (oldStartIndex <= oldEndIndex && newStartIndex <= newEndIndex) {\n    if (oldStartNode === void 0) {\n      oldStartNode = oldChildren[++oldStartIndex];\n    } else if (oldEndNode === void 0) {\n      oldEndNode = oldChildren[--oldEndIndex];\n    } else if (\n      // same first node?\n      nodeMatching(oldStartNode, newStartNode, replayer.mirror, rrnodeMirror)\n    ) {\n      oldStartNode = oldChildren[++oldStartIndex];\n      newStartNode = newChildren[++newStartIndex];\n    } else if (\n      // same last node?\n      nodeMatching(oldEndNode, newEndNode, replayer.mirror, rrnodeMirror)\n    ) {\n      oldEndNode = oldChildren[--oldEndIndex];\n      newEndNode = newChildren[--newEndIndex];\n    } else if (\n      // is the first old node the same as the last new node?\n      nodeMatching(oldStartNode, newEndNode, replayer.mirror, rrnodeMirror)\n    ) {\n      try {\n        handleInsertBefore(oldTree, oldStartNode, oldEndNode.nextSibling);\n      } catch (e2) {\n        console.warn(e2);\n      }\n      oldStartNode = oldChildren[++oldStartIndex];\n      newEndNode = newChildren[--newEndIndex];\n    } else if (\n      // is the last old node the same as the first new node?\n      nodeMatching(oldEndNode, newStartNode, replayer.mirror, rrnodeMirror)\n    ) {\n      try {\n        handleInsertBefore(oldTree, oldEndNode, oldStartNode);\n      } catch (e2) {\n        console.warn(e2);\n      }\n      oldEndNode = oldChildren[--oldEndIndex];\n      newStartNode = newChildren[++newStartIndex];\n    } else {\n      if (!oldIdToIndex) {\n        oldIdToIndex = {};\n        for (let i2 = oldStartIndex; i2 <= oldEndIndex; i2++) {\n          const oldChild2 = oldChildren[i2];\n          if (oldChild2 && replayer.mirror.hasNode(oldChild2))\n            oldIdToIndex[replayer.mirror.getId(oldChild2)] = i2;\n        }\n      }\n      indexInOld = oldIdToIndex[rrnodeMirror.getId(newStartNode)];\n      const nodeToMove = oldChildren[indexInOld];\n      if (indexInOld !== void 0 && nodeToMove && nodeMatching(nodeToMove, newStartNode, replayer.mirror, rrnodeMirror)) {\n        try {\n          handleInsertBefore(oldTree, nodeToMove, oldStartNode);\n        } catch (e2) {\n          console.warn(e2);\n        }\n        oldChildren[indexInOld] = void 0;\n      } else {\n        const newNode = createOrGetNode(\n          newStartNode,\n          replayer.mirror,\n          rrnodeMirror\n        );\n        if (oldTree.nodeName === \"#document\" && oldStartNode && /**\n        * Special case 1: one document isn't allowed to have two doctype nodes at the same time, so we need to remove the old one first before inserting the new one.\n        * How this case happens: A parent document in the old tree already has a doctype node with an id e.g. #1. A new full snapshot rebuilds the replayer with a new doctype node with another id #2. According to the algorithm, the new doctype node will be inserted before the old one, which is not allowed by the Document standard.\n        */\n        (newNode.nodeType === newNode.DOCUMENT_TYPE_NODE && oldStartNode.nodeType === oldStartNode.DOCUMENT_TYPE_NODE || /**\n        * Special case 2: one document isn't allowed to have two HTMLElements at the same time, so we need to remove the old one first before inserting the new one.\n        * How this case happens: A mounted iframe element has an automatically created HTML element. We should delete it before inserting a serialized one. Otherwise, an error 'Only one element on document allowed' will be thrown.\n        */\n        newNode.nodeType === newNode.ELEMENT_NODE && oldStartNode.nodeType === oldStartNode.ELEMENT_NODE)) {\n          oldTree.removeChild(oldStartNode);\n          replayer.mirror.removeNodeFromMap(oldStartNode);\n          oldStartNode = oldChildren[++oldStartIndex];\n        }\n        try {\n          handleInsertBefore(oldTree, newNode, oldStartNode || null);\n        } catch (e2) {\n          console.warn(e2);\n        }\n      }\n      newStartNode = newChildren[++newStartIndex];\n    }\n  }\n  if (oldStartIndex > oldEndIndex) {\n    const referenceRRNode = newChildren[newEndIndex + 1];\n    let referenceNode = null;\n    if (referenceRRNode)\n      referenceNode = replayer.mirror.getNode(\n        rrnodeMirror.getId(referenceRRNode)\n      );\n    for (; newStartIndex <= newEndIndex; ++newStartIndex) {\n      const newNode = createOrGetNode(\n        newChildren[newStartIndex],\n        replayer.mirror,\n        rrnodeMirror\n      );\n      try {\n        handleInsertBefore(oldTree, newNode, referenceNode);\n      } catch (e2) {\n        console.warn(e2);\n      }\n    }\n  } else if (newStartIndex > newEndIndex) {\n    for (; oldStartIndex <= oldEndIndex; oldStartIndex++) {\n      const node = oldChildren[oldStartIndex];\n      if (!node || node.parentNode !== oldTree) continue;\n      try {\n        oldTree.removeChild(node);\n        replayer.mirror.removeNodeFromMap(node);\n      } catch (e2) {\n        console.warn(e2);\n      }\n    }\n  }\n  let oldChild = oldTree.firstChild;\n  let newChild = newTree.firstChild;\n  while (oldChild !== null && newChild !== null) {\n    diff(oldChild, newChild, replayer, rrnodeMirror);\n    oldChild = oldChild.nextSibling;\n    newChild = newChild.nextSibling;\n  }\n}\nfunction createOrGetNode(rrNode, domMirror, rrnodeMirror) {\n  const nodeId = rrnodeMirror.getId(rrNode);\n  const sn = rrnodeMirror.getMeta(rrNode);\n  let node = null;\n  if (nodeId > -1) node = domMirror.getNode(nodeId);\n  if (node !== null && sameNodeType(node, rrNode)) return node;\n  switch (rrNode.RRNodeType) {\n    case NodeType$1.Document:\n      node = new Document();\n      break;\n    case NodeType$1.DocumentType:\n      node = document.implementation.createDocumentType(\n        rrNode.name,\n        rrNode.publicId,\n        rrNode.systemId\n      );\n      break;\n    case NodeType$1.Element: {\n      let tagName = rrNode.tagName.toLowerCase();\n      tagName = SVGTagMap[tagName] || tagName;\n      if (sn && \"isSVG\" in sn && sn?.isSVG) {\n        node = document.createElementNS(NAMESPACES[\"svg\"], tagName);\n      } else node = document.createElement(rrNode.tagName);\n      break;\n    }\n    case NodeType$1.Text:\n      node = document.createTextNode(rrNode.data);\n      break;\n    case NodeType$1.Comment:\n      node = document.createComment(rrNode.data);\n      break;\n    case NodeType$1.CDATA:\n      node = document.createCDATASection(rrNode.data);\n      break;\n  }\n  if (sn) domMirror.add(node, { ...sn });\n  try {\n    createdNodeSet?.add(node);\n  } catch (e2) {\n  }\n  return node;\n}\nfunction sameNodeType(node1, node2) {\n  if (node1.nodeType !== node2.nodeType) return false;\n  return node1.nodeType !== node1.ELEMENT_NODE || node1.tagName.toUpperCase() === node2.tagName;\n}\nfunction nodeMatching(node1, node2, domMirror, rrdomMirror) {\n  const node1Id = domMirror.getId(node1);\n  const node2Id = rrdomMirror.getId(node2);\n  if (node1Id === -1 || node1Id !== node2Id) return false;\n  return sameNodeType(node1, node2);\n}\nfunction getInsertedStylesFromElement(styleElement) {\n  const elementCssRules = styleElement.sheet?.cssRules;\n  if (!elementCssRules || !elementCssRules.length) return;\n  const tempStyleSheet = new CSSStyleSheet();\n  tempStyleSheet.replaceSync(styleElement.innerText);\n  const innerTextStylesMap = {};\n  for (let i2 = 0; i2 < tempStyleSheet.cssRules.length; i2++) {\n    innerTextStylesMap[tempStyleSheet.cssRules[i2].cssText] = tempStyleSheet.cssRules[i2];\n  }\n  const insertedStylesStyleSheet = [];\n  for (let i2 = 0; i2 < elementCssRules?.length; i2++) {\n    const cssRuleText = elementCssRules[i2].cssText;\n    if (!innerTextStylesMap[cssRuleText]) {\n      insertedStylesStyleSheet.push({\n        index: i2,\n        cssRuleText\n      });\n    }\n  }\n  return insertedStylesStyleSheet;\n}\nfunction handleInsertBefore(oldTree, nodeToMove, insertBeforeNode) {\n  let insertedStyles;\n  if (nodeToMove.nodeName === \"STYLE\") {\n    insertedStyles = getInsertedStylesFromElement(\n      nodeToMove\n    );\n  }\n  oldTree.insertBefore(nodeToMove, insertBeforeNode);\n  if (insertedStyles && insertedStyles.length) {\n    insertedStyles.forEach(({ cssRuleText, index }) => {\n      nodeToMove.sheet?.insertRule(cssRuleText, index);\n    });\n  }\n}\nclass RRDocument extends BaseRRDocument {\n  constructor(mirror2) {\n    super();\n    __publicField(this, \"UNSERIALIZED_STARTING_ID\", -2);\n    __publicField(this, \"_unserializedId\", this.UNSERIALIZED_STARTING_ID);\n    __publicField(this, \"mirror\", createMirror());\n    __publicField(this, \"scrollData\", null);\n    if (mirror2) {\n      this.mirror = mirror2;\n    }\n  }\n  /**\n   * Every time the id is used, it will minus 1 automatically to avoid collisions.\n   */\n  get unserializedId() {\n    return this._unserializedId--;\n  }\n  createDocument(_namespace, _qualifiedName, _doctype) {\n    return new RRDocument();\n  }\n  createDocumentType(qualifiedName, publicId, systemId) {\n    const documentTypeNode = new RRDocumentType(\n      qualifiedName,\n      publicId,\n      systemId\n    );\n    documentTypeNode.ownerDocument = this;\n    return documentTypeNode;\n  }\n  createElement(tagName) {\n    const upperTagName = tagName.toUpperCase();\n    let element;\n    switch (upperTagName) {\n      case \"AUDIO\":\n      case \"VIDEO\":\n        element = new RRMediaElement(upperTagName);\n        break;\n      case \"IFRAME\":\n        element = new RRIFrameElement(upperTagName, this.mirror);\n        break;\n      case \"CANVAS\":\n        element = new RRCanvasElement(upperTagName);\n        break;\n      case \"STYLE\":\n        element = new RRStyleElement(upperTagName);\n        break;\n      default:\n        element = new RRElement(upperTagName);\n        break;\n    }\n    element.ownerDocument = this;\n    return element;\n  }\n  createComment(data) {\n    const commentNode = new RRComment(data);\n    commentNode.ownerDocument = this;\n    return commentNode;\n  }\n  createCDATASection(data) {\n    const sectionNode = new RRCDATASection(data);\n    sectionNode.ownerDocument = this;\n    return sectionNode;\n  }\n  createTextNode(data) {\n    const textNode = new RRText(data);\n    textNode.ownerDocument = this;\n    return textNode;\n  }\n  destroyTree() {\n    this.firstChild = null;\n    this.lastChild = null;\n    this.mirror.reset();\n  }\n  open() {\n    super.open();\n    this._unserializedId = this.UNSERIALIZED_STARTING_ID;\n  }\n}\nconst RRDocumentType = BaseRRDocumentType;\nclass RRElement extends BaseRRElement {\n  constructor() {\n    super(...arguments);\n    __publicField(this, \"inputData\", null);\n    __publicField(this, \"scrollData\", null);\n  }\n}\nclass RRMediaElement extends BaseRRMediaElement {\n}\nclass RRCanvasElement extends RRElement {\n  constructor() {\n    super(...arguments);\n    __publicField(this, \"rr_dataURL\", null);\n    __publicField(this, \"canvasMutations\", []);\n  }\n  /**\n   * This is a dummy implementation to distinguish RRCanvasElement from real HTMLCanvasElement.\n   */\n  getContext() {\n    return null;\n  }\n}\nclass RRStyleElement extends RRElement {\n  constructor() {\n    super(...arguments);\n    __publicField(this, \"rules\", []);\n  }\n}\nclass RRIFrameElement extends RRElement {\n  constructor(upperTagName, mirror2) {\n    super(upperTagName);\n    __publicField(this, \"contentDocument\", new RRDocument());\n    this.contentDocument.mirror = mirror2;\n  }\n}\nconst RRText = BaseRRText;\nconst RRComment = BaseRRComment;\nconst RRCDATASection = BaseRRCDATASection;\nfunction getValidTagName(element) {\n  if (element instanceof HTMLFormElement) {\n    return \"FORM\";\n  }\n  return element.tagName.toUpperCase();\n}\nfunction buildFromNode(node, rrdom, domMirror, parentRRNode) {\n  let rrNode;\n  switch (node.nodeType) {\n    case NodeType.DOCUMENT_NODE:\n      if (parentRRNode && parentRRNode.nodeName === \"IFRAME\")\n        rrNode = parentRRNode.contentDocument;\n      else {\n        rrNode = rrdom;\n        rrNode.compatMode = node.compatMode;\n      }\n      break;\n    case NodeType.DOCUMENT_TYPE_NODE: {\n      const documentType = node;\n      rrNode = rrdom.createDocumentType(\n        documentType.name,\n        documentType.publicId,\n        documentType.systemId\n      );\n      break;\n    }\n    case NodeType.ELEMENT_NODE: {\n      const elementNode = node;\n      const tagName = getValidTagName(elementNode);\n      rrNode = rrdom.createElement(tagName);\n      const rrElement = rrNode;\n      for (const { name, value } of Array.from(elementNode.attributes)) {\n        rrElement.attributes[name] = value;\n      }\n      elementNode.scrollLeft && (rrElement.scrollLeft = elementNode.scrollLeft);\n      elementNode.scrollTop && (rrElement.scrollTop = elementNode.scrollTop);\n      break;\n    }\n    case NodeType.TEXT_NODE:\n      rrNode = rrdom.createTextNode(node.textContent || \"\");\n      break;\n    case NodeType.CDATA_SECTION_NODE:\n      rrNode = rrdom.createCDATASection(node.data);\n      break;\n    case NodeType.COMMENT_NODE:\n      rrNode = rrdom.createComment(node.textContent || \"\");\n      break;\n    // if node is a shadow root\n    case NodeType.DOCUMENT_FRAGMENT_NODE:\n      rrNode = parentRRNode.attachShadow({ mode: \"open\" });\n      break;\n    default:\n      return null;\n  }\n  let sn = domMirror.getMeta(node);\n  if (rrdom instanceof RRDocument) {\n    if (!sn) {\n      sn = getDefaultSN(rrNode, rrdom.unserializedId);\n      domMirror.add(node, sn);\n    }\n    rrdom.mirror.add(rrNode, { ...sn });\n  }\n  return rrNode;\n}\nfunction buildFromDom(dom, domMirror = createMirror$1(), rrdom = new RRDocument()) {\n  function walk2(node, parentRRNode) {\n    const rrNode = buildFromNode(node, rrdom, domMirror, parentRRNode);\n    if (rrNode === null) return;\n    if (\n      // if the parentRRNode isn't a RRIFrameElement\n      parentRRNode?.nodeName !== \"IFRAME\" && // if node isn't a shadow root\n      node.nodeType !== NodeType.DOCUMENT_FRAGMENT_NODE\n    ) {\n      parentRRNode?.appendChild(rrNode);\n      rrNode.parentNode = parentRRNode;\n      rrNode.parentElement = parentRRNode;\n    }\n    if (node.nodeName === \"IFRAME\") {\n      const iframeDoc = getIFrameContentDocument(node);\n      iframeDoc && walk2(iframeDoc, rrNode);\n    } else if (node.nodeType === NodeType.DOCUMENT_NODE || node.nodeType === NodeType.ELEMENT_NODE || node.nodeType === NodeType.DOCUMENT_FRAGMENT_NODE) {\n      if (node.nodeType === NodeType.ELEMENT_NODE && node.shadowRoot)\n        walk2(node.shadowRoot, rrNode);\n      node.childNodes.forEach((childNode) => walk2(childNode, rrNode));\n    }\n  }\n  walk2(dom, null);\n  return rrdom;\n}\nfunction createMirror() {\n  return new Mirror2();\n}\nclass Mirror2 {\n  constructor() {\n    __publicField(this, \"idNodeMap\", /* @__PURE__ */ new Map());\n    __publicField(this, \"nodeMetaMap\", /* @__PURE__ */ new WeakMap());\n  }\n  getId(n2) {\n    if (!n2) return -1;\n    const id = this.getMeta(n2)?.id;\n    return id ?? -1;\n  }\n  getNode(id) {\n    return this.idNodeMap.get(id) || null;\n  }\n  getIds() {\n    return Array.from(this.idNodeMap.keys());\n  }\n  getMeta(n2) {\n    return this.nodeMetaMap.get(n2) || null;\n  }\n  // removes the node from idNodeMap\n  // doesn't remove the node from nodeMetaMap\n  removeNodeFromMap(n2) {\n    const id = this.getId(n2);\n    this.idNodeMap.delete(id);\n    if (n2.childNodes) {\n      n2.childNodes.forEach((childNode) => this.removeNodeFromMap(childNode));\n    }\n  }\n  has(id) {\n    return this.idNodeMap.has(id);\n  }\n  hasNode(node) {\n    return this.nodeMetaMap.has(node);\n  }\n  add(n2, meta) {\n    const id = meta.id;\n    this.idNodeMap.set(id, n2);\n    this.nodeMetaMap.set(n2, meta);\n  }\n  replace(id, n2) {\n    const oldNode = this.getNode(id);\n    if (oldNode) {\n      const meta = this.nodeMetaMap.get(oldNode);\n      if (meta) this.nodeMetaMap.set(n2, meta);\n    }\n    this.idNodeMap.set(id, n2);\n  }\n  reset() {\n    this.idNodeMap = /* @__PURE__ */ new Map();\n    this.nodeMetaMap = /* @__PURE__ */ new WeakMap();\n  }\n}\nfunction getDefaultSN(node, id) {\n  switch (node.RRNodeType) {\n    case NodeType$1.Document:\n      return {\n        id,\n        type: node.RRNodeType,\n        childNodes: []\n      };\n    case NodeType$1.DocumentType: {\n      const doctype = node;\n      return {\n        id,\n        type: node.RRNodeType,\n        name: doctype.name,\n        publicId: doctype.publicId,\n        systemId: doctype.systemId\n      };\n    }\n    case NodeType$1.Element:\n      return {\n        id,\n        type: node.RRNodeType,\n        tagName: node.tagName.toLowerCase(),\n        // In rrweb data, all tagNames are lowercase.\n        attributes: {},\n        childNodes: []\n      };\n    case NodeType$1.Text:\n      return {\n        id,\n        type: node.RRNodeType,\n        textContent: node.textContent || \"\"\n      };\n    case NodeType$1.Comment:\n      return {\n        id,\n        type: node.RRNodeType,\n        textContent: node.textContent || \"\"\n      };\n    case NodeType$1.CDATA:\n      return {\n        id,\n        type: node.RRNodeType,\n        textContent: \"\"\n      };\n  }\n}\nclass StyleDeclarationParser {\n  constructor(doc) {\n    this.doc = doc;\n    this.unattachedDoc = null;\n  }\n  parse(styleText) {\n    return this.parseWithConstructableStylesheet(styleText) || this.parseWithDetachedElement(styleText);\n  }\n  parseWithConstructableStylesheet(styleText) {\n    if (typeof CSSStyleSheet === \"undefined\" || typeof CSSStyleSheet.prototype.replaceSync !== \"function\") {\n      return null;\n    }\n    try {\n      const sheet = new CSSStyleSheet();\n      sheet.replaceSync(`x { ${styleText} }`);\n      const rule = sheet.cssRules[0];\n      if (!rule || rule.type !== CSSRule.STYLE_RULE) {\n        return null;\n      }\n      return rule.style;\n    } catch {\n      return null;\n    }\n  }\n  parseWithDetachedElement(styleText) {\n    const old = this.getUnattachedDoc().createElement(\"span\");\n    old.setAttribute(\"style\", styleText);\n    return old.style;\n  }\n  getUnattachedDoc() {\n    if (!this.unattachedDoc) {\n      try {\n        this.unattachedDoc = document.implementation.createHTMLDocument();\n      } catch {\n        this.unattachedDoc = this.doc;\n      }\n    }\n    return this.unattachedDoc;\n  }\n}\nfunction isNodeInLinkedList(n2) {\n  return \"__ln\" in n2;\n}\nclass DoubleLinkedList {\n  constructor() {\n    this.length = 0;\n    this.head = null;\n    this.tail = null;\n  }\n  get(position) {\n    if (position >= this.length) {\n      throw new Error(\"Position outside of list range\");\n    }\n    let current = this.head;\n    for (let index = 0; index < position; index++) {\n      current = current?.next || null;\n    }\n    return current;\n  }\n  addNode(n2) {\n    const node = {\n      value: n2,\n      previous: null,\n      next: null\n    };\n    n2.__ln = node;\n    if (n2.previousSibling && isNodeInLinkedList(n2.previousSibling)) {\n      const current = n2.previousSibling.__ln.next;\n      node.next = current;\n      node.previous = n2.previousSibling.__ln;\n      n2.previousSibling.__ln.next = node;\n      if (current) {\n        current.previous = node;\n      }\n    } else if (n2.nextSibling && isNodeInLinkedList(n2.nextSibling) && n2.nextSibling.__ln.previous) {\n      const current = n2.nextSibling.__ln.previous;\n      node.previous = current;\n      node.next = n2.nextSibling.__ln;\n      n2.nextSibling.__ln.previous = node;\n      if (current) {\n        current.next = node;\n      }\n    } else {\n      if (this.head) {\n        this.head.previous = node;\n      }\n      node.next = this.head;\n      this.head = node;\n    }\n    if (node.next === null) {\n      this.tail = node;\n    }\n    this.length++;\n  }\n  removeNode(n2) {\n    const current = n2.__ln;\n    if (!this.head) {\n      return;\n    }\n    if (!current.previous) {\n      this.head = current.next;\n      if (this.head) {\n        this.head.previous = null;\n      } else {\n        this.tail = null;\n      }\n    } else {\n      current.previous.next = current.next;\n      if (current.next) {\n        current.next.previous = current.previous;\n      } else {\n        this.tail = current.previous;\n      }\n    }\n    if (n2.__ln) {\n      delete n2.__ln;\n    }\n    this.length--;\n  }\n}\nconst moveKey = (id, parentId) => `${id}@${parentId}`;\nclass MutationBuffer {\n  constructor() {\n    this.frozen = false;\n    this.locked = false;\n    this.texts = [];\n    this.attributes = [];\n    this.attributeMap = /* @__PURE__ */ new WeakMap();\n    this.removes = [];\n    this.mapRemoves = [];\n    this.movedMap = {};\n    this.addedSet = /* @__PURE__ */ new Set();\n    this.movedSet = /* @__PURE__ */ new Set();\n    this.droppedSet = /* @__PURE__ */ new Set();\n    this.processMutations = (mutations) => {\n      mutations.forEach(this.processMutation);\n      this.emit();\n    };\n    this.emit = () => {\n      if (this.frozen || this.locked) {\n        return;\n      }\n      const adds = [];\n      const addedIds = /* @__PURE__ */ new Set();\n      const addList = new DoubleLinkedList();\n      const getNextId = (n2) => {\n        let ns = n2;\n        let nextId = IGNORED_NODE;\n        while (nextId === IGNORED_NODE) {\n          ns = ns && ns.nextSibling;\n          nextId = ns && this.mirror.getId(ns);\n        }\n        return nextId;\n      };\n      const pushAdd = (n2) => {\n        if (!n2.parentNode || !inDom(n2)) {\n          return;\n        }\n        const parentId = isShadowRoot(n2.parentNode) ? this.mirror.getId(getShadowHost(n2)) : this.mirror.getId(n2.parentNode);\n        const nextId = getNextId(n2);\n        if (parentId === -1 || nextId === -1) {\n          return addList.addNode(n2);\n        }\n        const sn = serializeNodeWithId(n2, {\n          doc: this.doc,\n          mirror: this.mirror,\n          blockClass: this.blockClass,\n          blockSelector: this.blockSelector,\n          maskAllText: this.maskAllText,\n          unblockSelector: this.unblockSelector,\n          maskTextClass: this.maskTextClass,\n          unmaskTextClass: this.unmaskTextClass,\n          maskTextSelector: this.maskTextSelector,\n          unmaskTextSelector: this.unmaskTextSelector,\n          skipChild: true,\n          newlyAddedElement: true,\n          inlineStylesheet: this.inlineStylesheet,\n          maskInputOptions: this.maskInputOptions,\n          maskAttributeFn: this.maskAttributeFn,\n          maskTextFn: this.maskTextFn,\n          maskInputFn: this.maskInputFn,\n          slimDOMOptions: this.slimDOMOptions,\n          dataURLOptions: this.dataURLOptions,\n          recordCanvas: this.recordCanvas,\n          inlineImages: this.inlineImages,\n          onSerialize: (currentN) => {\n            if (isSerializedIframe(currentN, this.mirror) && !isBlocked(\n              currentN,\n              this.blockClass,\n              this.blockSelector,\n              this.unblockSelector,\n              false\n            )) {\n              this.iframeManager.addIframe(currentN);\n            }\n            if (isSerializedStylesheet(currentN, this.mirror)) {\n              this.stylesheetManager.trackLinkElement(\n                currentN\n              );\n            }\n            if (hasShadowRoot(n2)) {\n              this.shadowDomManager.addShadowRoot(n2.shadowRoot, this.doc);\n            }\n          },\n          onIframeLoad: (iframe, childSn) => {\n            if (isBlocked(\n              iframe,\n              this.blockClass,\n              this.blockSelector,\n              this.unblockSelector,\n              false\n            )) {\n              return;\n            }\n            this.iframeManager.attachIframe(iframe, childSn);\n            const contentWindow = getIFrameContentWindow(iframe);\n            if (contentWindow) {\n              this.canvasManager.addWindow(contentWindow);\n            }\n            this.shadowDomManager.observeAttachShadow(iframe);\n          },\n          onStylesheetLoad: (link, childSn) => {\n            this.stylesheetManager.attachLinkElement(link, childSn);\n          },\n          onBlockedImageLoad: (_imageEl, serializedNode, { width, height }) => {\n            this.mutationCb({\n              adds: [],\n              removes: [],\n              texts: [],\n              attributes: [\n                {\n                  id: serializedNode.id,\n                  attributes: {\n                    style: {\n                      width: `${width}px`,\n                      height: `${height}px`\n                    }\n                  }\n                }\n              ]\n            });\n          },\n          ignoreCSSAttributes: this.ignoreCSSAttributes\n        });\n        if (sn) {\n          adds.push({\n            parentId,\n            nextId,\n            node: sn\n          });\n          addedIds.add(sn.id);\n        }\n      };\n      while (this.mapRemoves.length) {\n        this.mirror.removeNodeFromMap(this.mapRemoves.shift());\n      }\n      for (const n2 of this.movedSet) {\n        if (isParentRemoved(this.removes, n2, this.mirror) && !this.movedSet.has(n2.parentNode)) {\n          continue;\n        }\n        pushAdd(n2);\n      }\n      for (const n2 of this.addedSet) {\n        if (!isAncestorInSet(this.droppedSet, n2) && !isParentRemoved(this.removes, n2, this.mirror)) {\n          pushAdd(n2);\n        } else if (isAncestorInSet(this.movedSet, n2)) {\n          pushAdd(n2);\n        } else {\n          this.droppedSet.add(n2);\n        }\n      }\n      let candidate = null;\n      while (addList.length) {\n        let node = null;\n        if (candidate) {\n          const parentId = this.mirror.getId(candidate.value.parentNode);\n          const nextId = getNextId(candidate.value);\n          if (parentId !== -1 && nextId !== -1) {\n            node = candidate;\n          }\n        }\n        if (!node) {\n          let tailNode = addList.tail;\n          while (tailNode) {\n            const _node = tailNode;\n            tailNode = tailNode.previous;\n            if (_node) {\n              const parentId = this.mirror.getId(_node.value.parentNode);\n              const nextId = getNextId(_node.value);\n              if (nextId === -1) continue;\n              else if (parentId !== -1) {\n                node = _node;\n                break;\n              } else {\n                const unhandledNode = _node.value;\n                if (unhandledNode.parentNode && unhandledNode.parentNode.nodeType === Node.DOCUMENT_FRAGMENT_NODE) {\n                  const shadowHost = unhandledNode.parentNode.host;\n                  const parentId2 = this.mirror.getId(shadowHost);\n                  if (parentId2 !== -1) {\n                    node = _node;\n                    break;\n                  }\n                }\n              }\n            }\n          }\n        }\n        if (!node) {\n          while (addList.head) {\n            addList.removeNode(addList.head.value);\n          }\n          break;\n        }\n        candidate = node.previous;\n        addList.removeNode(node.value);\n        pushAdd(node.value);\n      }\n      const payload = {\n        texts: this.texts.map((text) => ({\n          id: this.mirror.getId(text.node),\n          value: text.value\n        })).filter((text) => !addedIds.has(text.id)).filter((text) => this.mirror.has(text.id)),\n        attributes: this.attributes.map((attribute) => {\n          const { attributes } = attribute;\n          if (typeof attributes.style === \"string\") {\n            const diffAsStr = JSON.stringify(attribute.styleDiff);\n            const unchangedAsStr = JSON.stringify(attribute._unchangedStyles);\n            if (diffAsStr.length < attributes.style.length) {\n              if ((diffAsStr + unchangedAsStr).split(\"var(\").length === attributes.style.split(\"var(\").length) {\n                attributes.style = attribute.styleDiff;\n              }\n            }\n          }\n          return {\n            id: this.mirror.getId(attribute.node),\n            attributes\n          };\n        }).filter((attribute) => !addedIds.has(attribute.id)).filter((attribute) => this.mirror.has(attribute.id)),\n        removes: this.removes,\n        adds\n      };\n      if (!payload.texts.length && !payload.attributes.length && !payload.removes.length && !payload.adds.length) {\n        return;\n      }\n      this.texts = [];\n      this.attributes = [];\n      this.attributeMap = /* @__PURE__ */ new WeakMap();\n      this.removes = [];\n      this.addedSet = /* @__PURE__ */ new Set();\n      this.movedSet = /* @__PURE__ */ new Set();\n      this.droppedSet = /* @__PURE__ */ new Set();\n      this.movedMap = {};\n      this.mutationCb(payload);\n    };\n    this.processMutation = (m) => {\n      if (isIgnored(m.target, this.mirror)) {\n        return;\n      }\n      switch (m.type) {\n        case \"characterData\": {\n          const value = m.target.textContent;\n          if (!isBlocked(\n            m.target,\n            this.blockClass,\n            this.blockSelector,\n            this.unblockSelector,\n            false\n          ) && value !== m.oldValue) {\n            this.texts.push({\n              value: needMaskingText(\n                m.target,\n                this.maskTextClass,\n                this.maskTextSelector,\n                this.unmaskTextClass,\n                this.unmaskTextSelector,\n                this.maskAllText\n              ) && value ? this.maskTextFn ? this.maskTextFn(value, closestElementOfNode(m.target)) : value.replace(/[\\S]/g, \"*\") : value,\n              node: m.target\n            });\n          }\n          break;\n        }\n        case \"attributes\": {\n          const target = m.target;\n          let attributeName = m.attributeName;\n          let value = m.target.getAttribute(attributeName);\n          if (attributeName === \"value\") {\n            const type = getInputType(target);\n            const tagName = target.tagName;\n            value = getInputValue(target, tagName, type);\n            const isInputMasked = shouldMaskInput({\n              maskInputOptions: this.maskInputOptions,\n              tagName,\n              type\n            });\n            const forceMask = needMaskingText(\n              m.target,\n              this.maskTextClass,\n              this.maskTextSelector,\n              this.unmaskTextClass,\n              this.unmaskTextSelector,\n              isInputMasked\n            );\n            value = maskInputValue({\n              isMasked: forceMask,\n              element: target,\n              value,\n              maskInputFn: this.maskInputFn\n            });\n          }\n          if (isBlocked(\n            m.target,\n            this.blockClass,\n            this.blockSelector,\n            this.unblockSelector,\n            false\n          ) || value === m.oldValue) {\n            return;\n          }\n          let item = this.attributeMap.get(m.target);\n          if (target.tagName === \"IFRAME\" && attributeName === \"src\" && !this.keepIframeSrcFn(value)) {\n            const iframeDoc = getIFrameContentDocument(\n              target\n            );\n            if (!iframeDoc) {\n              attributeName = \"rr_src\";\n            } else {\n              return;\n            }\n          }\n          if (!item) {\n            item = {\n              node: m.target,\n              attributes: {},\n              styleDiff: {},\n              _unchangedStyles: {}\n            };\n            this.attributes.push(item);\n            this.attributeMap.set(m.target, item);\n          }\n          if (attributeName === \"type\" && target.tagName === \"INPUT\" && (m.oldValue || \"\").toLowerCase() === \"password\") {\n            target.setAttribute(\"data-rr-is-password\", \"true\");\n          }\n          if (!ignoreAttribute(target.tagName, attributeName)) {\n            item.attributes[attributeName] = transformAttribute(\n              this.doc,\n              toLowerCase(target.tagName),\n              toLowerCase(attributeName),\n              value,\n              target,\n              this.maskAttributeFn\n            );\n            if (attributeName === \"style\") {\n              const oldStyle = m.oldValue ? this.styleDeclarationParser.parse(m.oldValue) : null;\n              for (const pname of Array.from(target.style)) {\n                const newValue = target.style.getPropertyValue(pname);\n                const newPriority = target.style.getPropertyPriority(pname);\n                if (newValue !== (oldStyle?.getPropertyValue(pname) || \"\") || newPriority !== (oldStyle?.getPropertyPriority(pname) || \"\")) {\n                  if (newPriority === \"\") {\n                    item.styleDiff[pname] = newValue;\n                  } else {\n                    item.styleDiff[pname] = [newValue, newPriority];\n                  }\n                } else {\n                  item._unchangedStyles[pname] = [newValue, newPriority];\n                }\n              }\n              if (oldStyle) {\n                for (const pname of Array.from(oldStyle)) {\n                  if (target.style.getPropertyValue(pname) === \"\") {\n                    item.styleDiff[pname] = false;\n                  }\n                }\n              }\n            }\n          }\n          break;\n        }\n        case \"childList\": {\n          if (isBlocked(\n            m.target,\n            this.blockClass,\n            this.blockSelector,\n            this.unblockSelector,\n            true\n          )) {\n            return;\n          }\n          m.addedNodes.forEach((n2) => this.genAdds(n2, m.target));\n          m.removedNodes.forEach((n2) => {\n            const nodeId = this.mirror.getId(n2);\n            const parentId = isShadowRoot(m.target) ? this.mirror.getId(m.target.host) : this.mirror.getId(m.target);\n            if (isBlocked(\n              m.target,\n              this.blockClass,\n              this.blockSelector,\n              this.unblockSelector,\n              false\n            ) || isIgnored(n2, this.mirror) || !isSerialized(n2, this.mirror)) {\n              return;\n            }\n            if (this.addedSet.has(n2)) {\n              deepDelete(this.addedSet, n2);\n              this.droppedSet.add(n2);\n            } else if (this.addedSet.has(m.target) && nodeId === -1) ;\n            else if (isAncestorRemoved(m.target, this.mirror)) ;\n            else if (this.movedSet.has(n2) && this.movedMap[moveKey(nodeId, parentId)]) {\n              deepDelete(this.movedSet, n2);\n            } else {\n              this.removes.push({\n                parentId,\n                id: nodeId,\n                isShadow: isShadowRoot(m.target) && isNativeShadowDom(m.target) ? true : void 0\n              });\n            }\n            this.mapRemoves.push(n2);\n          });\n          break;\n        }\n      }\n    };\n    this.genAdds = (n2, target) => {\n      if (this.processedNodeManager.inOtherBuffer(n2, this)) return;\n      if (this.addedSet.has(n2) || this.movedSet.has(n2)) return;\n      if (this.mirror.hasNode(n2)) {\n        if (isIgnored(n2, this.mirror)) {\n          return;\n        }\n        this.movedSet.add(n2);\n        let targetId = null;\n        if (target && this.mirror.hasNode(target)) {\n          targetId = this.mirror.getId(target);\n        }\n        if (targetId && targetId !== -1) {\n          this.movedMap[moveKey(this.mirror.getId(n2), targetId)] = true;\n        }\n      } else {\n        this.addedSet.add(n2);\n        this.droppedSet.delete(n2);\n      }\n      if (!isBlocked(\n        n2,\n        this.blockClass,\n        this.blockSelector,\n        this.unblockSelector,\n        false\n      )) {\n        if (n2.childNodes) {\n          n2.childNodes.forEach((childN) => this.genAdds(childN));\n        }\n        if (hasShadowRoot(n2)) {\n          n2.shadowRoot.childNodes.forEach((childN) => {\n            this.processedNodeManager.add(childN, this);\n            this.genAdds(childN, n2);\n          });\n        }\n      }\n    };\n  }\n  init(options) {\n    [\n      \"mutationCb\",\n      \"blockClass\",\n      \"blockSelector\",\n      \"unblockSelector\",\n      \"maskAllText\",\n      \"maskTextClass\",\n      \"unmaskTextClass\",\n      \"maskTextSelector\",\n      \"unmaskTextSelector\",\n      \"inlineStylesheet\",\n      \"maskInputOptions\",\n      \"maskAttributeFn\",\n      \"maskTextFn\",\n      \"maskInputFn\",\n      \"keepIframeSrcFn\",\n      \"recordCanvas\",\n      \"inlineImages\",\n      \"slimDOMOptions\",\n      \"dataURLOptions\",\n      \"doc\",\n      \"mirror\",\n      \"iframeManager\",\n      \"stylesheetManager\",\n      \"shadowDomManager\",\n      \"canvasManager\",\n      \"processedNodeManager\",\n      \"ignoreCSSAttributes\"\n    ].forEach((key) => {\n      this[key] = options[key];\n    });\n    this.styleDeclarationParser = new StyleDeclarationParser(this.doc);\n  }\n  freeze() {\n    this.frozen = true;\n    this.canvasManager.freeze();\n  }\n  unfreeze() {\n    this.frozen = false;\n    this.canvasManager.unfreeze();\n    this.emit();\n  }\n  isFrozen() {\n    return this.frozen;\n  }\n  lock() {\n    this.locked = true;\n    this.canvasManager.lock();\n  }\n  unlock() {\n    this.locked = false;\n    this.canvasManager.unlock();\n    this.emit();\n  }\n  reset() {\n    this.shadowDomManager.reset();\n    this.canvasManager.reset();\n  }\n}\nfunction deepDelete(addsSet, n2) {\n  addsSet.delete(n2);\n  n2.childNodes?.forEach((childN) => deepDelete(addsSet, childN));\n}\nfunction isParentRemoved(removes, n2, mirror2) {\n  if (removes.length === 0) return false;\n  return _isParentRemoved(removes, n2, mirror2);\n}\nfunction _isParentRemoved(removes, n2, mirror2) {\n  let node = n2.parentNode;\n  while (node) {\n    const parentId = mirror2.getId(node);\n    if (removes.some((r2) => r2.id === parentId)) {\n      return true;\n    }\n    node = node.parentNode;\n  }\n  return false;\n}\nfunction isAncestorInSet(set, n2) {\n  if (set.size === 0) return false;\n  return _isAncestorInSet(set, n2);\n}\nfunction _isAncestorInSet(set, n2) {\n  const { parentNode } = n2;\n  if (!parentNode) {\n    return false;\n  }\n  if (set.has(parentNode)) {\n    return true;\n  }\n  return _isAncestorInSet(set, parentNode);\n}\nconst mutationBuffers = [];\nfunction getEventTarget(event) {\n  try {\n    if (\"composedPath\" in event) {\n      const path = event.composedPath();\n      if (path.length) {\n        return path[0];\n      }\n    } else if (\"path\" in event && event.path.length) {\n      return event.path[0];\n    }\n  } catch {\n  }\n  return event && event.target;\n}\nfunction initMutationObserver(options, rootEl) {\n  const mutationBuffer = new MutationBuffer();\n  mutationBuffers.push(mutationBuffer);\n  mutationBuffer.init(options);\n  let mutationObserverCtor = window.MutationObserver || /**\n  * Some websites may disable MutationObserver by removing it from the window object.\n  * If someone is using rrweb to build a browser extention or things like it, they\n  * could not change the website's code but can have an opportunity to inject some\n  * code before the website executing its JS logic.\n  * Then they can do this to store the native MutationObserver:\n  * window.__rrMutationObserver = MutationObserver\n  */\n  window.__rrMutationObserver;\n  const angularZoneSymbol = window?.Zone?.__symbol__?.(\"MutationObserver\");\n  if (angularZoneSymbol && window[angularZoneSymbol]) {\n    mutationObserverCtor = window[angularZoneSymbol];\n  }\n  const observer = new mutationObserverCtor(\n    callbackWrapper((mutations) => {\n      if (options.onMutation && options.onMutation(mutations) === false) {\n        return;\n      }\n      mutationBuffer.processMutations.bind(mutationBuffer)(mutations);\n    })\n  );\n  observer.observe(rootEl, {\n    attributes: true,\n    attributeOldValue: true,\n    characterData: true,\n    characterDataOldValue: true,\n    childList: true,\n    subtree: true\n  });\n  return observer;\n}\nfunction initMoveObserver({\n  mousemoveCb,\n  sampling,\n  doc,\n  mirror: mirror2\n}) {\n  if (sampling.mousemove === false) {\n    return () => {\n    };\n  }\n  const threshold = typeof sampling.mousemove === \"number\" ? sampling.mousemove : 50;\n  const callbackThreshold = typeof sampling.mousemoveCallback === \"number\" ? sampling.mousemoveCallback : 500;\n  let positions = [];\n  let timeBaseline;\n  const wrappedCb = throttle(\n    callbackWrapper(\n      (source) => {\n        const totalOffset = Date.now() - timeBaseline;\n        mousemoveCb(\n          positions.map((p) => {\n            p.timeOffset -= totalOffset;\n            return p;\n          }),\n          source\n        );\n        positions = [];\n        timeBaseline = null;\n      }\n    ),\n    callbackThreshold\n  );\n  const updatePosition = callbackWrapper(\n    throttle(\n      callbackWrapper((evt) => {\n        const target = getEventTarget(evt);\n        const { clientX, clientY } = legacy_isTouchEvent(evt) ? evt.changedTouches[0] : evt;\n        if (!timeBaseline) {\n          timeBaseline = nowTimestamp();\n        }\n        positions.push({\n          x: clientX,\n          y: clientY,\n          id: mirror2.getId(target),\n          timeOffset: nowTimestamp() - timeBaseline\n        });\n        wrappedCb(\n          typeof DragEvent !== \"undefined\" && evt instanceof DragEvent ? IncrementalSource.Drag : evt instanceof MouseEvent ? IncrementalSource.MouseMove : IncrementalSource.TouchMove\n        );\n      }),\n      threshold,\n      {\n        trailing: false\n      }\n    )\n  );\n  const handlers = [\n    on(\"mousemove\", updatePosition, doc),\n    on(\"touchmove\", updatePosition, doc),\n    on(\"drag\", updatePosition, doc)\n  ];\n  return callbackWrapper(() => {\n    handlers.forEach((h) => h());\n  });\n}\nfunction initMouseInteractionObserver({\n  mouseInteractionCb,\n  doc,\n  mirror: mirror2,\n  blockClass,\n  blockSelector,\n  unblockSelector,\n  sampling\n}) {\n  if (sampling.mouseInteraction === false) {\n    return () => {\n    };\n  }\n  const disableMap = sampling.mouseInteraction === true || sampling.mouseInteraction === void 0 ? {} : sampling.mouseInteraction;\n  const handlers = [];\n  let currentPointerType = null;\n  const getHandler = (eventKey) => {\n    return (event) => {\n      const target = getEventTarget(event);\n      if (isBlocked(target, blockClass, blockSelector, unblockSelector, true)) {\n        return;\n      }\n      let pointerType = null;\n      let thisEventKey = eventKey;\n      if (\"pointerType\" in event) {\n        switch (event.pointerType) {\n          case \"mouse\":\n            pointerType = PointerTypes.Mouse;\n            break;\n          case \"touch\":\n            pointerType = PointerTypes.Touch;\n            break;\n          case \"pen\":\n            pointerType = PointerTypes.Pen;\n            break;\n        }\n        if (pointerType === PointerTypes.Touch) {\n          if (MouseInteractions[eventKey] === MouseInteractions.MouseDown) {\n            thisEventKey = \"TouchStart\";\n          } else if (MouseInteractions[eventKey] === MouseInteractions.MouseUp) {\n            thisEventKey = \"TouchEnd\";\n          }\n        } else if (pointerType === PointerTypes.Pen) ;\n      } else if (legacy_isTouchEvent(event)) {\n        pointerType = PointerTypes.Touch;\n      }\n      if (pointerType !== null) {\n        currentPointerType = pointerType;\n        if (thisEventKey.startsWith(\"Touch\") && pointerType === PointerTypes.Touch || thisEventKey.startsWith(\"Mouse\") && pointerType === PointerTypes.Mouse) {\n          pointerType = null;\n        }\n      } else if (MouseInteractions[eventKey] === MouseInteractions.Click) {\n        pointerType = currentPointerType;\n        currentPointerType = null;\n      }\n      const e2 = legacy_isTouchEvent(event) ? event.changedTouches[0] : event;\n      if (!e2) {\n        return;\n      }\n      const id = mirror2.getId(target);\n      const { clientX, clientY } = e2;\n      callbackWrapper(mouseInteractionCb)({\n        type: MouseInteractions[thisEventKey],\n        id,\n        x: clientX,\n        y: clientY,\n        ...pointerType !== null && { pointerType }\n      });\n    };\n  };\n  Object.keys(MouseInteractions).filter(\n    (key) => Number.isNaN(Number(key)) && !key.endsWith(\"_Departed\") && disableMap[key] !== false\n  ).forEach((eventKey) => {\n    let eventName = toLowerCase(eventKey);\n    const handler = getHandler(eventKey);\n    if (window.PointerEvent) {\n      switch (MouseInteractions[eventKey]) {\n        case MouseInteractions.MouseDown:\n        case MouseInteractions.MouseUp:\n          eventName = eventName.replace(\n            \"mouse\",\n            \"pointer\"\n          );\n          break;\n        case MouseInteractions.TouchStart:\n        case MouseInteractions.TouchEnd:\n          return;\n      }\n    }\n    handlers.push(on(eventName, handler, doc));\n  });\n  return callbackWrapper(() => {\n    handlers.forEach((h) => h());\n  });\n}\nfunction initScrollObserver({\n  scrollCb,\n  doc,\n  mirror: mirror2,\n  blockClass,\n  blockSelector,\n  unblockSelector,\n  sampling\n}) {\n  const updatePosition = callbackWrapper(\n    throttle(\n      callbackWrapper((evt) => {\n        const target = getEventTarget(evt);\n        if (!target || isBlocked(\n          target,\n          blockClass,\n          blockSelector,\n          unblockSelector,\n          true\n        )) {\n          return;\n        }\n        const id = mirror2.getId(target);\n        if (target === doc && doc.defaultView) {\n          const scrollLeftTop = getWindowScroll(doc.defaultView);\n          scrollCb({\n            id,\n            x: scrollLeftTop.left,\n            y: scrollLeftTop.top\n          });\n        } else {\n          scrollCb({\n            id,\n            x: target.scrollLeft,\n            y: target.scrollTop\n          });\n        }\n      }),\n      sampling.scroll || 100\n    )\n  );\n  return on(\"scroll\", updatePosition, doc);\n}\nfunction initViewportResizeObserver({ viewportResizeCb }, { win }) {\n  let lastH = -1;\n  let lastW = -1;\n  const updateDimension = callbackWrapper(\n    throttle(\n      callbackWrapper(() => {\n        const height = getWindowHeight();\n        const width = getWindowWidth();\n        if (lastH !== height || lastW !== width) {\n          viewportResizeCb({\n            width: Number(width),\n            height: Number(height)\n          });\n          lastH = height;\n          lastW = width;\n        }\n      }),\n      200\n    )\n  );\n  return on(\"resize\", updateDimension, win);\n}\nconst INPUT_TAGS = [\"INPUT\", \"TEXTAREA\", \"SELECT\"];\nconst lastInputValueMap = /* @__PURE__ */ new WeakMap();\nfunction initInputObserver({\n  inputCb,\n  doc,\n  mirror: mirror2,\n  blockClass,\n  blockSelector,\n  unblockSelector,\n  ignoreClass,\n  ignoreSelector,\n  maskInputOptions,\n  maskInputFn,\n  sampling,\n  userTriggeredOnInput,\n  maskTextClass,\n  unmaskTextClass,\n  maskTextSelector,\n  unmaskTextSelector\n}) {\n  function eventHandler(event) {\n    let target = getEventTarget(event);\n    const userTriggered = event.isTrusted;\n    const tagName = target && toUpperCase(target.tagName);\n    if (tagName === \"OPTION\") target = target.parentElement;\n    if (!target || !tagName || INPUT_TAGS.indexOf(tagName) < 0 || isBlocked(\n      target,\n      blockClass,\n      blockSelector,\n      unblockSelector,\n      true\n    )) {\n      return;\n    }\n    const el = target;\n    if (el.classList.contains(ignoreClass) || ignoreSelector && el.matches(ignoreSelector)) {\n      return;\n    }\n    const type = getInputType(target);\n    let text = getInputValue(el, tagName, type);\n    let isChecked = false;\n    const isInputMasked = shouldMaskInput({\n      maskInputOptions,\n      tagName,\n      type\n    });\n    const forceMask = needMaskingText(\n      target,\n      maskTextClass,\n      maskTextSelector,\n      unmaskTextClass,\n      unmaskTextSelector,\n      isInputMasked\n    );\n    if (type === \"radio\" || type === \"checkbox\") {\n      isChecked = target.checked;\n    }\n    text = maskInputValue({\n      isMasked: forceMask,\n      element: target,\n      value: text,\n      maskInputFn\n    });\n    cbWithDedup(\n      target,\n      userTriggeredOnInput ? { text, isChecked, userTriggered } : { text, isChecked }\n    );\n    const name = target.name;\n    if (type === \"radio\" && name && isChecked) {\n      doc.querySelectorAll(`input[type=\"radio\"][name=\"${name}\"]`).forEach((el2) => {\n        if (el2 !== target) {\n          const text2 = maskInputValue({\n            // share mask behavior of `target`\n            isMasked: forceMask,\n            element: el2,\n            value: getInputValue(el2, tagName, type),\n            maskInputFn\n          });\n          cbWithDedup(\n            el2,\n            userTriggeredOnInput ? { text: text2, isChecked: !isChecked, userTriggered: false } : { text: text2, isChecked: !isChecked }\n          );\n        }\n      });\n    }\n  }\n  function cbWithDedup(target, v2) {\n    const lastInputValue = lastInputValueMap.get(target);\n    if (!lastInputValue || lastInputValue.text !== v2.text || lastInputValue.isChecked !== v2.isChecked) {\n      lastInputValueMap.set(target, v2);\n      const id = mirror2.getId(target);\n      callbackWrapper(inputCb)({\n        ...v2,\n        id\n      });\n    }\n  }\n  const events = sampling.input === \"last\" ? [\"change\"] : [\"input\", \"change\"];\n  const handlers = events.map(\n    (eventName) => on(eventName, callbackWrapper(eventHandler), doc)\n  );\n  const currentWindow = doc.defaultView;\n  if (!currentWindow) {\n    return () => {\n      handlers.forEach((h) => h());\n    };\n  }\n  const propertyDescriptor = currentWindow.Object.getOwnPropertyDescriptor(\n    currentWindow.HTMLInputElement.prototype,\n    \"value\"\n  );\n  const hookProperties = [\n    [currentWindow.HTMLInputElement.prototype, \"value\"],\n    [currentWindow.HTMLInputElement.prototype, \"checked\"],\n    [currentWindow.HTMLSelectElement.prototype, \"value\"],\n    [currentWindow.HTMLTextAreaElement.prototype, \"value\"],\n    // Some UI library use selectedIndex to set select value\n    [currentWindow.HTMLSelectElement.prototype, \"selectedIndex\"],\n    [currentWindow.HTMLOptionElement.prototype, \"selected\"]\n  ];\n  if (propertyDescriptor && propertyDescriptor.set) {\n    handlers.push(\n      ...hookProperties.map(\n        (p) => hookSetter(\n          p[0],\n          p[1],\n          {\n            set() {\n              callbackWrapper(eventHandler)({\n                target: this,\n                isTrusted: false\n                // userTriggered to false as this could well be programmatic\n              });\n            }\n          },\n          false,\n          currentWindow\n        )\n      )\n    );\n  }\n  return callbackWrapper(() => {\n    handlers.forEach((h) => h());\n  });\n}\nfunction getNestedCSSRulePositions(rule) {\n  const positions = [];\n  function recurse(childRule, pos) {\n    if (hasNestedCSSRule(\"CSSGroupingRule\") && childRule.parentRule instanceof CSSGroupingRule || hasNestedCSSRule(\"CSSMediaRule\") && childRule.parentRule instanceof CSSMediaRule || hasNestedCSSRule(\"CSSSupportsRule\") && childRule.parentRule instanceof CSSSupportsRule || hasNestedCSSRule(\"CSSConditionRule\") && childRule.parentRule instanceof CSSConditionRule) {\n      const rules2 = Array.from(\n        childRule.parentRule.cssRules\n      );\n      const index = rules2.indexOf(childRule);\n      pos.unshift(index);\n    } else if (childRule.parentStyleSheet) {\n      const rules2 = Array.from(childRule.parentStyleSheet.cssRules);\n      const index = rules2.indexOf(childRule);\n      pos.unshift(index);\n    }\n    return pos;\n  }\n  return recurse(rule, positions);\n}\nfunction getIdAndStyleId(sheet, mirror2, styleMirror) {\n  let id, styleId;\n  if (!sheet) return {};\n  if (sheet.ownerNode) id = mirror2.getId(sheet.ownerNode);\n  else styleId = styleMirror.getId(sheet);\n  return {\n    styleId,\n    id\n  };\n}\nfunction initStyleSheetObserver({ styleSheetRuleCb, mirror: mirror2, stylesheetManager }, { win }) {\n  if (!win.CSSStyleSheet || !win.CSSStyleSheet.prototype) {\n    return () => {\n    };\n  }\n  const insertRule = win.CSSStyleSheet.prototype.insertRule;\n  win.CSSStyleSheet.prototype.insertRule = new Proxy(insertRule, {\n    apply: callbackWrapper(\n      (target, thisArg, argumentsList) => {\n        const [rule, index] = argumentsList;\n        const { id, styleId } = getIdAndStyleId(\n          thisArg,\n          mirror2,\n          stylesheetManager.styleMirror\n        );\n        if (id && id !== -1 || styleId && styleId !== -1) {\n          styleSheetRuleCb({\n            id,\n            styleId,\n            adds: [{ rule, index }]\n          });\n        }\n        return target.apply(thisArg, argumentsList);\n      }\n    )\n  });\n  const deleteRule = win.CSSStyleSheet.prototype.deleteRule;\n  win.CSSStyleSheet.prototype.deleteRule = new Proxy(deleteRule, {\n    apply: callbackWrapper(\n      (target, thisArg, argumentsList) => {\n        const [index] = argumentsList;\n        const { id, styleId } = getIdAndStyleId(\n          thisArg,\n          mirror2,\n          stylesheetManager.styleMirror\n        );\n        if (id && id !== -1 || styleId && styleId !== -1) {\n          styleSheetRuleCb({\n            id,\n            styleId,\n            removes: [{ index }]\n          });\n        }\n        return target.apply(thisArg, argumentsList);\n      }\n    )\n  });\n  let replace;\n  if (win.CSSStyleSheet.prototype.replace) {\n    replace = win.CSSStyleSheet.prototype.replace;\n    win.CSSStyleSheet.prototype.replace = new Proxy(replace, {\n      apply: callbackWrapper(\n        (target, thisArg, argumentsList) => {\n          const [text] = argumentsList;\n          const { id, styleId } = getIdAndStyleId(\n            thisArg,\n            mirror2,\n            stylesheetManager.styleMirror\n          );\n          if (id && id !== -1 || styleId && styleId !== -1) {\n            styleSheetRuleCb({\n              id,\n              styleId,\n              replace: text\n            });\n          }\n          return target.apply(thisArg, argumentsList);\n        }\n      )\n    });\n  }\n  let replaceSync;\n  if (win.CSSStyleSheet.prototype.replaceSync) {\n    replaceSync = win.CSSStyleSheet.prototype.replaceSync;\n    win.CSSStyleSheet.prototype.replaceSync = new Proxy(replaceSync, {\n      apply: callbackWrapper(\n        (target, thisArg, argumentsList) => {\n          const [text] = argumentsList;\n          const { id, styleId } = getIdAndStyleId(\n            thisArg,\n            mirror2,\n            stylesheetManager.styleMirror\n          );\n          if (id && id !== -1 || styleId && styleId !== -1) {\n            styleSheetRuleCb({\n              id,\n              styleId,\n              replaceSync: text\n            });\n          }\n          return target.apply(thisArg, argumentsList);\n        }\n      )\n    });\n  }\n  const supportedNestedCSSRuleTypes = {};\n  if (canMonkeyPatchNestedCSSRule(\"CSSGroupingRule\")) {\n    supportedNestedCSSRuleTypes.CSSGroupingRule = win.CSSGroupingRule;\n  } else {\n    if (canMonkeyPatchNestedCSSRule(\"CSSMediaRule\")) {\n      supportedNestedCSSRuleTypes.CSSMediaRule = win.CSSMediaRule;\n    }\n    if (canMonkeyPatchNestedCSSRule(\"CSSConditionRule\")) {\n      supportedNestedCSSRuleTypes.CSSConditionRule = win.CSSConditionRule;\n    }\n    if (canMonkeyPatchNestedCSSRule(\"CSSSupportsRule\")) {\n      supportedNestedCSSRuleTypes.CSSSupportsRule = win.CSSSupportsRule;\n    }\n  }\n  const unmodifiedFunctions = {};\n  Object.entries(supportedNestedCSSRuleTypes).forEach(([typeKey, type]) => {\n    unmodifiedFunctions[typeKey] = {\n      // eslint-disable-next-line @typescript-eslint/unbound-method\n      insertRule: type.prototype.insertRule,\n      // eslint-disable-next-line @typescript-eslint/unbound-method\n      deleteRule: type.prototype.deleteRule\n    };\n    type.prototype.insertRule = new Proxy(\n      unmodifiedFunctions[typeKey].insertRule,\n      {\n        apply: callbackWrapper(\n          (target, thisArg, argumentsList) => {\n            const [rule, index] = argumentsList;\n            const { id, styleId } = getIdAndStyleId(\n              thisArg.parentStyleSheet,\n              mirror2,\n              stylesheetManager.styleMirror\n            );\n            if (id && id !== -1 || styleId && styleId !== -1) {\n              styleSheetRuleCb({\n                id,\n                styleId,\n                adds: [\n                  {\n                    rule,\n                    index: [\n                      ...getNestedCSSRulePositions(thisArg),\n                      index || 0\n                      // defaults to 0\n                    ]\n                  }\n                ]\n              });\n            }\n            return target.apply(thisArg, argumentsList);\n          }\n        )\n      }\n    );\n    type.prototype.deleteRule = new Proxy(\n      unmodifiedFunctions[typeKey].deleteRule,\n      {\n        apply: callbackWrapper(\n          (target, thisArg, argumentsList) => {\n            const [index] = argumentsList;\n            const { id, styleId } = getIdAndStyleId(\n              thisArg.parentStyleSheet,\n              mirror2,\n              stylesheetManager.styleMirror\n            );\n            if (id && id !== -1 || styleId && styleId !== -1) {\n              styleSheetRuleCb({\n                id,\n                styleId,\n                removes: [\n                  { index: [...getNestedCSSRulePositions(thisArg), index] }\n                ]\n              });\n            }\n            return target.apply(thisArg, argumentsList);\n          }\n        )\n      }\n    );\n  });\n  return callbackWrapper(() => {\n    win.CSSStyleSheet.prototype.insertRule = insertRule;\n    win.CSSStyleSheet.prototype.deleteRule = deleteRule;\n    replace && (win.CSSStyleSheet.prototype.replace = replace);\n    replaceSync && (win.CSSStyleSheet.prototype.replaceSync = replaceSync);\n    Object.entries(supportedNestedCSSRuleTypes).forEach(([typeKey, type]) => {\n      type.prototype.insertRule = unmodifiedFunctions[typeKey].insertRule;\n      type.prototype.deleteRule = unmodifiedFunctions[typeKey].deleteRule;\n    });\n  });\n}\nfunction initAdoptedStyleSheetObserver({\n  mirror: mirror2,\n  stylesheetManager\n}, host) {\n  let hostId = null;\n  if (host.nodeName === \"#document\") hostId = mirror2.getId(host);\n  else hostId = mirror2.getId(host.host);\n  const patchTarget = host.nodeName === \"#document\" ? host.defaultView?.Document : host.ownerDocument?.defaultView?.ShadowRoot;\n  const originalPropertyDescriptor = patchTarget?.prototype ? Object.getOwnPropertyDescriptor(\n    patchTarget?.prototype,\n    \"adoptedStyleSheets\"\n  ) : void 0;\n  if (hostId === null || hostId === -1 || !patchTarget || !originalPropertyDescriptor)\n    return () => {\n    };\n  Object.defineProperty(host, \"adoptedStyleSheets\", {\n    configurable: originalPropertyDescriptor.configurable,\n    enumerable: originalPropertyDescriptor.enumerable,\n    get() {\n      return originalPropertyDescriptor.get?.call(this);\n    },\n    set(sheets) {\n      const result = originalPropertyDescriptor.set?.call(this, sheets);\n      if (hostId !== null && hostId !== -1) {\n        try {\n          stylesheetManager.adoptStyleSheets(sheets, hostId);\n        } catch (e2) {\n        }\n      }\n      return result;\n    }\n  });\n  return callbackWrapper(() => {\n    Object.defineProperty(host, \"adoptedStyleSheets\", {\n      configurable: originalPropertyDescriptor.configurable,\n      enumerable: originalPropertyDescriptor.enumerable,\n      // eslint-disable-next-line @typescript-eslint/unbound-method\n      get: originalPropertyDescriptor.get,\n      // eslint-disable-next-line @typescript-eslint/unbound-method\n      set: originalPropertyDescriptor.set\n    });\n  });\n}\nfunction initStyleDeclarationObserver({\n  styleDeclarationCb,\n  mirror: mirror2,\n  ignoreCSSAttributes,\n  stylesheetManager\n}, { win }) {\n  const setProperty = win.CSSStyleDeclaration.prototype.setProperty;\n  win.CSSStyleDeclaration.prototype.setProperty = new Proxy(setProperty, {\n    apply: callbackWrapper(\n      (target, thisArg, argumentsList) => {\n        const [property, value, priority] = argumentsList;\n        if (ignoreCSSAttributes.has(property)) {\n          return setProperty.apply(thisArg, [property, value, priority]);\n        }\n        const { id, styleId } = getIdAndStyleId(\n          thisArg.parentRule?.parentStyleSheet,\n          mirror2,\n          stylesheetManager.styleMirror\n        );\n        if (id && id !== -1 || styleId && styleId !== -1) {\n          styleDeclarationCb({\n            id,\n            styleId,\n            set: {\n              property,\n              value,\n              priority\n            },\n            // eslint-disable-next-line @typescript-eslint/no-non-null-assertion\n            index: getNestedCSSRulePositions(thisArg.parentRule)\n          });\n        }\n        return target.apply(thisArg, argumentsList);\n      }\n    )\n  });\n  const removeProperty = win.CSSStyleDeclaration.prototype.removeProperty;\n  win.CSSStyleDeclaration.prototype.removeProperty = new Proxy(removeProperty, {\n    apply: callbackWrapper(\n      (target, thisArg, argumentsList) => {\n        const [property] = argumentsList;\n        if (ignoreCSSAttributes.has(property)) {\n          return removeProperty.apply(thisArg, [property]);\n        }\n        const { id, styleId } = getIdAndStyleId(\n          thisArg.parentRule?.parentStyleSheet,\n          mirror2,\n          stylesheetManager.styleMirror\n        );\n        if (id && id !== -1 || styleId && styleId !== -1) {\n          styleDeclarationCb({\n            id,\n            styleId,\n            remove: {\n              property\n            },\n            // eslint-disable-next-line @typescript-eslint/no-non-null-assertion\n            index: getNestedCSSRulePositions(thisArg.parentRule)\n          });\n        }\n        return target.apply(thisArg, argumentsList);\n      }\n    )\n  });\n  return callbackWrapper(() => {\n    win.CSSStyleDeclaration.prototype.setProperty = setProperty;\n    win.CSSStyleDeclaration.prototype.removeProperty = removeProperty;\n  });\n}\nfunction initMediaInteractionObserver({\n  mediaInteractionCb,\n  blockClass,\n  blockSelector,\n  unblockSelector,\n  mirror: mirror2,\n  sampling,\n  doc\n}) {\n  const handler = callbackWrapper(\n    (type) => throttle(\n      callbackWrapper((event) => {\n        const target = getEventTarget(event);\n        if (!target || isBlocked(\n          target,\n          blockClass,\n          blockSelector,\n          unblockSelector,\n          true\n        )) {\n          return;\n        }\n        const { currentTime, volume, muted, playbackRate } = target;\n        mediaInteractionCb({\n          type,\n          id: mirror2.getId(target),\n          currentTime,\n          volume,\n          muted,\n          playbackRate\n        });\n      }),\n      sampling.media || 500\n    )\n  );\n  const handlers = [\n    on(\"play\", handler(MediaInteractions.Play), doc),\n    on(\"pause\", handler(MediaInteractions.Pause), doc),\n    on(\"seeked\", handler(MediaInteractions.Seeked), doc),\n    on(\"volumechange\", handler(MediaInteractions.VolumeChange), doc),\n    on(\"ratechange\", handler(MediaInteractions.RateChange), doc)\n  ];\n  return callbackWrapper(() => {\n    handlers.forEach((h) => h());\n  });\n}\nfunction initFontObserver({ fontCb, doc }) {\n  const win = doc.defaultView;\n  if (!win) {\n    return () => {\n    };\n  }\n  const handlers = [];\n  const fontMap = /* @__PURE__ */ new WeakMap();\n  const originalFontFace = win.FontFace;\n  win.FontFace = function FontFace2(family, source, descriptors) {\n    const fontFace = new originalFontFace(family, source, descriptors);\n    fontMap.set(fontFace, {\n      family,\n      buffer: typeof source !== \"string\",\n      descriptors,\n      fontSource: typeof source === \"string\" ? source : JSON.stringify(Array.from(new Uint8Array(source)))\n    });\n    return fontFace;\n  };\n  const restoreHandler = patch(\n    doc.fonts,\n    \"add\",\n    function(original) {\n      return function(fontFace) {\n        setTimeout$1(\n          callbackWrapper(() => {\n            const p = fontMap.get(fontFace);\n            if (p) {\n              fontCb(p);\n              fontMap.delete(fontFace);\n            }\n          }),\n          0\n        );\n        return original.apply(this, [fontFace]);\n      };\n    }\n  );\n  handlers.push(() => {\n    win.FontFace = originalFontFace;\n  });\n  handlers.push(restoreHandler);\n  return callbackWrapper(() => {\n    handlers.forEach((h) => h());\n  });\n}\nfunction initSelectionObserver(param) {\n  const {\n    doc,\n    mirror: mirror2,\n    blockClass,\n    blockSelector,\n    unblockSelector,\n    selectionCb\n  } = param;\n  let collapsed = true;\n  const updateSelection = callbackWrapper(() => {\n    const selection = doc.getSelection();\n    if (!selection || collapsed && selection?.isCollapsed) return;\n    collapsed = selection.isCollapsed || false;\n    const ranges = [];\n    const count = selection.rangeCount || 0;\n    for (let i2 = 0; i2 < count; i2++) {\n      const range = selection.getRangeAt(i2);\n      const { startContainer, startOffset, endContainer, endOffset } = range;\n      const blocked = isBlocked(\n        startContainer,\n        blockClass,\n        blockSelector,\n        unblockSelector,\n        true\n      ) || isBlocked(\n        endContainer,\n        blockClass,\n        blockSelector,\n        unblockSelector,\n        true\n      );\n      if (blocked) continue;\n      ranges.push({\n        start: mirror2.getId(startContainer),\n        startOffset,\n        end: mirror2.getId(endContainer),\n        endOffset\n      });\n    }\n    selectionCb({ ranges });\n  });\n  updateSelection();\n  return on(\"selectionchange\", updateSelection);\n}\nfunction initCustomElementObserver({\n  doc,\n  customElementCb\n}) {\n  const win = doc.defaultView;\n  if (!win || !win.customElements) return () => {\n  };\n  const restoreHandler = patch(\n    win.customElements,\n    \"define\",\n    function(original) {\n      return function(name, constructor, options) {\n        try {\n          customElementCb({\n            define: {\n              name\n            }\n          });\n        } catch (e2) {\n        }\n        return original.apply(this, [name, constructor, options]);\n      };\n    }\n  );\n  return restoreHandler;\n}\nfunction initObservers(o2, _hooks = {}) {\n  const currentWindow = o2.doc.defaultView;\n  if (!currentWindow) {\n    return () => {\n    };\n  }\n  let mutationObserver;\n  if (o2.recordDOM) {\n    mutationObserver = initMutationObserver(o2, o2.doc);\n  }\n  const mousemoveHandler = initMoveObserver(o2);\n  const mouseInteractionHandler = initMouseInteractionObserver(o2);\n  const scrollHandler = initScrollObserver(o2);\n  const viewportResizeHandler = initViewportResizeObserver(o2, {\n    win: currentWindow\n  });\n  const inputHandler = initInputObserver(o2);\n  const mediaInteractionHandler = initMediaInteractionObserver(o2);\n  let styleSheetObserver = () => {\n  };\n  let adoptedStyleSheetObserver = () => {\n  };\n  let styleDeclarationObserver = () => {\n  };\n  let fontObserver = () => {\n  };\n  if (o2.recordDOM) {\n    styleSheetObserver = initStyleSheetObserver(o2, { win: currentWindow });\n    adoptedStyleSheetObserver = initAdoptedStyleSheetObserver(o2, o2.doc);\n    styleDeclarationObserver = initStyleDeclarationObserver(o2, {\n      win: currentWindow\n    });\n    if (o2.collectFonts) {\n      fontObserver = initFontObserver(o2);\n    }\n  }\n  const selectionObserver = initSelectionObserver(o2);\n  const customElementObserver = initCustomElementObserver(o2);\n  const pluginHandlers = [];\n  for (const plugin of o2.plugins) {\n    pluginHandlers.push(\n      plugin.observer(plugin.callback, currentWindow, plugin.options)\n    );\n  }\n  return callbackWrapper(() => {\n    mutationBuffers.forEach((b) => b.reset());\n    mutationObserver?.disconnect();\n    mousemoveHandler();\n    mouseInteractionHandler();\n    scrollHandler();\n    viewportResizeHandler();\n    inputHandler();\n    mediaInteractionHandler();\n    styleSheetObserver();\n    adoptedStyleSheetObserver();\n    styleDeclarationObserver();\n    fontObserver();\n    selectionObserver();\n    customElementObserver();\n    pluginHandlers.forEach((h) => h());\n  });\n}\nfunction hasNestedCSSRule(prop) {\n  return typeof window[prop] !== \"undefined\";\n}\nfunction canMonkeyPatchNestedCSSRule(prop) {\n  return Boolean(\n    typeof window[prop] !== \"undefined\" && // Note: Generally, this check _shouldn't_ be necessary\n    // However, in some scenarios (e.g. jsdom) this can sometimes fail, so we check for it here\n    window[prop].prototype && \"insertRule\" in window[prop].prototype && \"deleteRule\" in window[prop].prototype\n  );\n}\nclass CrossOriginIframeMirror {\n  constructor(generateIdFn) {\n    this.generateIdFn = generateIdFn;\n    this.iframeIdToRemoteIdMap = /* @__PURE__ */ new WeakMap();\n    this.iframeRemoteIdToIdMap = /* @__PURE__ */ new WeakMap();\n  }\n  getId(iframe, remoteId, idToRemoteMap, remoteToIdMap) {\n    const idToRemoteIdMap = idToRemoteMap || this.getIdToRemoteIdMap(iframe);\n    const remoteIdToIdMap = remoteToIdMap || this.getRemoteIdToIdMap(iframe);\n    let id = idToRemoteIdMap.get(remoteId);\n    if (!id) {\n      id = this.generateIdFn();\n      idToRemoteIdMap.set(remoteId, id);\n      remoteIdToIdMap.set(id, remoteId);\n    }\n    return id;\n  }\n  getIds(iframe, remoteId) {\n    const idToRemoteIdMap = this.getIdToRemoteIdMap(iframe);\n    const remoteIdToIdMap = this.getRemoteIdToIdMap(iframe);\n    return remoteId.map(\n      (id) => this.getId(iframe, id, idToRemoteIdMap, remoteIdToIdMap)\n    );\n  }\n  getRemoteId(iframe, id, map) {\n    const remoteIdToIdMap = map || this.getRemoteIdToIdMap(iframe);\n    if (typeof id !== \"number\") return id;\n    const remoteId = remoteIdToIdMap.get(id);\n    if (!remoteId) return -1;\n    return remoteId;\n  }\n  getRemoteIds(iframe, ids) {\n    const remoteIdToIdMap = this.getRemoteIdToIdMap(iframe);\n    return ids.map((id) => this.getRemoteId(iframe, id, remoteIdToIdMap));\n  }\n  reset(iframe) {\n    if (!iframe) {\n      this.iframeIdToRemoteIdMap = /* @__PURE__ */ new WeakMap();\n      this.iframeRemoteIdToIdMap = /* @__PURE__ */ new WeakMap();\n      return;\n    }\n    this.iframeIdToRemoteIdMap.delete(iframe);\n    this.iframeRemoteIdToIdMap.delete(iframe);\n  }\n  getIdToRemoteIdMap(iframe) {\n    let idToRemoteIdMap = this.iframeIdToRemoteIdMap.get(iframe);\n    if (!idToRemoteIdMap) {\n      idToRemoteIdMap = /* @__PURE__ */ new Map();\n      this.iframeIdToRemoteIdMap.set(iframe, idToRemoteIdMap);\n    }\n    return idToRemoteIdMap;\n  }\n  getRemoteIdToIdMap(iframe) {\n    let remoteIdToIdMap = this.iframeRemoteIdToIdMap.get(iframe);\n    if (!remoteIdToIdMap) {\n      remoteIdToIdMap = /* @__PURE__ */ new Map();\n      this.iframeRemoteIdToIdMap.set(iframe, remoteIdToIdMap);\n    }\n    return remoteIdToIdMap;\n  }\n}\nclass IframeManagerNoop {\n  constructor() {\n    this.crossOriginIframeMirror = new CrossOriginIframeMirror(genId);\n    this.crossOriginIframeRootIdMap = /* @__PURE__ */ new WeakMap();\n  }\n  addIframe() {\n  }\n  addLoadListener() {\n  }\n  attachIframe() {\n  }\n}\nclass IframeManager {\n  constructor(options) {\n    this.iframes = /* @__PURE__ */ new WeakMap();\n    this.crossOriginIframeMap = /* @__PURE__ */ new WeakMap();\n    this.crossOriginIframeMirror = new CrossOriginIframeMirror(genId);\n    this.crossOriginIframeRootIdMap = /* @__PURE__ */ new WeakMap();\n    this.mutationCb = options.mutationCb;\n    this.wrappedEmit = options.wrappedEmit;\n    this.stylesheetManager = options.stylesheetManager;\n    this.recordCrossOriginIframes = options.recordCrossOriginIframes;\n    this.crossOriginIframeStyleMirror = new CrossOriginIframeMirror(\n      this.stylesheetManager.styleMirror.generateId.bind(\n        this.stylesheetManager.styleMirror\n      )\n    );\n    this.mirror = options.mirror;\n    if (this.recordCrossOriginIframes) {\n      window.addEventListener(\"message\", this.handleMessage.bind(this));\n    }\n  }\n  addIframe(iframeEl) {\n    this.iframes.set(iframeEl, true);\n    const contentWindow = getIFrameContentWindow(iframeEl);\n    if (contentWindow) this.crossOriginIframeMap.set(contentWindow, iframeEl);\n  }\n  addLoadListener(cb) {\n    this.loadListener = cb;\n  }\n  attachIframe(iframeEl, childSn) {\n    this.mutationCb({\n      adds: [\n        {\n          parentId: this.mirror.getId(iframeEl),\n          nextId: null,\n          node: childSn\n        }\n      ],\n      removes: [],\n      texts: [],\n      attributes: [],\n      isAttachIframe: true\n    });\n    if (this.recordCrossOriginIframes) {\n      getIFrameContentWindow(iframeEl)?.addEventListener(\n        \"message\",\n        this.handleMessage.bind(this)\n      );\n    }\n    this.loadListener?.(iframeEl);\n    const iframeDoc = getIFrameContentDocument(iframeEl);\n    if (iframeDoc && iframeDoc.adoptedStyleSheets && iframeDoc.adoptedStyleSheets.length > 0)\n      this.stylesheetManager.adoptStyleSheets(\n        iframeDoc.adoptedStyleSheets,\n        this.mirror.getId(iframeDoc)\n      );\n  }\n  handleMessage(message) {\n    const crossOriginMessageEvent = message;\n    if (crossOriginMessageEvent.data.type !== \"rrweb\" || // To filter out the rrweb messages which are forwarded by some sites.\n    crossOriginMessageEvent.origin !== crossOriginMessageEvent.data.origin)\n      return;\n    const iframeSourceWindow = message.source;\n    if (!iframeSourceWindow) return;\n    const iframeEl = this.crossOriginIframeMap.get(message.source);\n    if (!iframeEl) return;\n    const transformedEvent = this.transformCrossOriginEvent(\n      iframeEl,\n      crossOriginMessageEvent.data.event\n    );\n    if (transformedEvent)\n      this.wrappedEmit(\n        transformedEvent,\n        crossOriginMessageEvent.data.isCheckout\n      );\n  }\n  transformCrossOriginEvent(iframeEl, e2) {\n    switch (e2.type) {\n      case EventType.FullSnapshot: {\n        this.crossOriginIframeMirror.reset(iframeEl);\n        this.crossOriginIframeStyleMirror.reset(iframeEl);\n        this.replaceIdOnNode(e2.data.node, iframeEl);\n        const rootId = e2.data.node.id;\n        this.crossOriginIframeRootIdMap.set(iframeEl, rootId);\n        this.patchRootIdOnNode(e2.data.node, rootId);\n        return {\n          timestamp: e2.timestamp,\n          type: EventType.IncrementalSnapshot,\n          data: {\n            source: IncrementalSource.Mutation,\n            adds: [\n              {\n                parentId: this.mirror.getId(iframeEl),\n                nextId: null,\n                node: e2.data.node\n              }\n            ],\n            removes: [],\n            texts: [],\n            attributes: [],\n            isAttachIframe: true\n          }\n        };\n      }\n      case EventType.Meta:\n      case EventType.Load:\n      case EventType.DomContentLoaded: {\n        return false;\n      }\n      case EventType.Plugin: {\n        return e2;\n      }\n      case EventType.Custom: {\n        this.replaceIds(\n          e2.data.payload,\n          iframeEl,\n          [\"id\", \"parentId\", \"previousId\", \"nextId\"]\n        );\n        return e2;\n      }\n      case EventType.IncrementalSnapshot: {\n        switch (e2.data.source) {\n          case IncrementalSource.Mutation: {\n            e2.data.adds.forEach((n2) => {\n              this.replaceIds(n2, iframeEl, [\n                \"parentId\",\n                \"nextId\",\n                \"previousId\"\n              ]);\n              this.replaceIdOnNode(n2.node, iframeEl);\n              const rootId = this.crossOriginIframeRootIdMap.get(iframeEl);\n              rootId && this.patchRootIdOnNode(n2.node, rootId);\n            });\n            e2.data.removes.forEach((n2) => {\n              this.replaceIds(n2, iframeEl, [\"parentId\", \"id\"]);\n            });\n            e2.data.attributes.forEach((n2) => {\n              this.replaceIds(n2, iframeEl, [\"id\"]);\n            });\n            e2.data.texts.forEach((n2) => {\n              this.replaceIds(n2, iframeEl, [\"id\"]);\n            });\n            return e2;\n          }\n          case IncrementalSource.Drag:\n          case IncrementalSource.TouchMove:\n          case IncrementalSource.MouseMove: {\n            e2.data.positions.forEach((p) => {\n              this.replaceIds(p, iframeEl, [\"id\"]);\n            });\n            return e2;\n          }\n          case IncrementalSource.ViewportResize: {\n            return false;\n          }\n          case IncrementalSource.MediaInteraction:\n          case IncrementalSource.MouseInteraction:\n          case IncrementalSource.Scroll:\n          case IncrementalSource.CanvasMutation:\n          case IncrementalSource.Input: {\n            this.replaceIds(e2.data, iframeEl, [\"id\"]);\n            return e2;\n          }\n          case IncrementalSource.StyleSheetRule:\n          case IncrementalSource.StyleDeclaration: {\n            this.replaceIds(e2.data, iframeEl, [\"id\"]);\n            this.replaceStyleIds(e2.data, iframeEl, [\"styleId\"]);\n            return e2;\n          }\n          case IncrementalSource.Font: {\n            return e2;\n          }\n          case IncrementalSource.Selection: {\n            e2.data.ranges.forEach((range) => {\n              this.replaceIds(range, iframeEl, [\"start\", \"end\"]);\n            });\n            return e2;\n          }\n          case IncrementalSource.AdoptedStyleSheet: {\n            this.replaceIds(e2.data, iframeEl, [\"id\"]);\n            this.replaceStyleIds(e2.data, iframeEl, [\"styleIds\"]);\n            e2.data.styles?.forEach((style) => {\n              this.replaceStyleIds(style, iframeEl, [\"styleId\"]);\n            });\n            return e2;\n          }\n        }\n      }\n    }\n    return false;\n  }\n  replace(iframeMirror, obj, iframeEl, keys) {\n    for (const key of keys) {\n      if (!Array.isArray(obj[key]) && typeof obj[key] !== \"number\") continue;\n      if (Array.isArray(obj[key])) {\n        obj[key] = iframeMirror.getIds(\n          iframeEl,\n          obj[key]\n        );\n      } else {\n        obj[key] = iframeMirror.getId(iframeEl, obj[key]);\n      }\n    }\n    return obj;\n  }\n  replaceIds(obj, iframeEl, keys) {\n    return this.replace(this.crossOriginIframeMirror, obj, iframeEl, keys);\n  }\n  replaceStyleIds(obj, iframeEl, keys) {\n    return this.replace(this.crossOriginIframeStyleMirror, obj, iframeEl, keys);\n  }\n  replaceIdOnNode(node, iframeEl) {\n    this.replaceIds(node, iframeEl, [\"id\", \"rootId\"]);\n    if (\"childNodes\" in node) {\n      node.childNodes.forEach((child) => {\n        this.replaceIdOnNode(child, iframeEl);\n      });\n    }\n  }\n  patchRootIdOnNode(node, rootId) {\n    if (node.type !== NodeType$2.Document && !node.rootId) node.rootId = rootId;\n    if (\"childNodes\" in node) {\n      node.childNodes.forEach((child) => {\n        this.patchRootIdOnNode(child, rootId);\n      });\n    }\n  }\n}\nclass ShadowDomManagerNoop {\n  init() {\n  }\n  addShadowRoot() {\n  }\n  observeAttachShadow() {\n  }\n  reset() {\n  }\n}\nclass ShadowDomManager {\n  constructor(options) {\n    this.shadowDoms = /* @__PURE__ */ new WeakSet();\n    this.restoreHandlers = [];\n    this.mutationCb = options.mutationCb;\n    this.scrollCb = options.scrollCb;\n    this.bypassOptions = options.bypassOptions;\n    this.mirror = options.mirror;\n    this.init();\n  }\n  init() {\n    this.reset();\n    this.patchAttachShadow(Element, document);\n  }\n  addShadowRoot(shadowRoot, doc) {\n    if (!isNativeShadowDom(shadowRoot)) return;\n    if (this.shadowDoms.has(shadowRoot)) return;\n    this.shadowDoms.add(shadowRoot);\n    this.bypassOptions.canvasManager.addShadowRoot(shadowRoot);\n    const observer = initMutationObserver(\n      {\n        ...this.bypassOptions,\n        doc,\n        mutationCb: this.mutationCb,\n        mirror: this.mirror,\n        shadowDomManager: this\n      },\n      shadowRoot\n    );\n    this.restoreHandlers.push(() => observer.disconnect());\n    this.restoreHandlers.push(\n      initScrollObserver({\n        ...this.bypassOptions,\n        scrollCb: this.scrollCb,\n        // https://gist.github.com/praveenpuglia/0832da687ed5a5d7a0907046c9ef1813\n        // scroll is not allowed to pass the boundary, so we need to listen the shadow document\n        doc: shadowRoot,\n        mirror: this.mirror\n      })\n    );\n    setTimeout$1(() => {\n      if (shadowRoot.adoptedStyleSheets && shadowRoot.adoptedStyleSheets.length > 0)\n        this.bypassOptions.stylesheetManager.adoptStyleSheets(\n          shadowRoot.adoptedStyleSheets,\n          this.mirror.getId(shadowRoot.host)\n        );\n      this.restoreHandlers.push(\n        initAdoptedStyleSheetObserver(\n          {\n            mirror: this.mirror,\n            stylesheetManager: this.bypassOptions.stylesheetManager\n          },\n          shadowRoot\n        )\n      );\n    }, 0);\n  }\n  /**\n   * Monkey patch 'attachShadow' of an IFrameElement to observe newly added shadow doms.\n   */\n  observeAttachShadow(iframeElement) {\n    const iframeDoc = getIFrameContentDocument(iframeElement);\n    const iframeWindow = getIFrameContentWindow(iframeElement);\n    if (!iframeDoc || !iframeWindow) return;\n    this.patchAttachShadow(\n      iframeWindow.Element,\n      iframeDoc\n    );\n  }\n  /**\n   * Patch 'attachShadow' to observe newly added shadow doms.\n   */\n  patchAttachShadow(element, doc) {\n    const manager = this;\n    this.restoreHandlers.push(\n      patch(\n        element.prototype,\n        \"attachShadow\",\n        function(original) {\n          return function(option) {\n            const shadowRoot = original.call(this, option);\n            if (this.shadowRoot && inDom(this))\n              manager.addShadowRoot(this.shadowRoot, doc);\n            return shadowRoot;\n          };\n        }\n      )\n    );\n  }\n  reset() {\n    this.restoreHandlers.forEach((handler) => {\n      try {\n        handler();\n      } catch (e2) {\n      }\n    });\n    this.restoreHandlers = [];\n    this.shadowDoms = /* @__PURE__ */ new WeakSet();\n    this.bypassOptions.canvasManager.resetShadowRoots();\n  }\n}\nclass StylesheetManager {\n  constructor(options) {\n    this.trackedLinkElements = /* @__PURE__ */ new WeakSet();\n    this.styleMirror = new StyleSheetMirror();\n    this.mutationCb = options.mutationCb;\n    this.adoptedStyleSheetCb = options.adoptedStyleSheetCb;\n  }\n  attachLinkElement(linkEl, childSn) {\n    if (\"_cssText\" in childSn.attributes)\n      this.mutationCb({\n        adds: [],\n        removes: [],\n        texts: [],\n        attributes: [\n          {\n            id: childSn.id,\n            attributes: childSn.attributes\n          }\n        ]\n      });\n    this.trackLinkElement(linkEl);\n  }\n  trackLinkElement(linkEl) {\n    if (this.trackedLinkElements.has(linkEl)) return;\n    this.trackedLinkElements.add(linkEl);\n    this.trackStylesheetInLinkElement(linkEl);\n  }\n  adoptStyleSheets(sheets, hostId) {\n    if (sheets.length === 0) return;\n    const adoptedStyleSheetData = {\n      id: hostId,\n      styleIds: []\n    };\n    const styles = [];\n    for (const sheet of sheets) {\n      let styleId;\n      if (!this.styleMirror.has(sheet)) {\n        styleId = this.styleMirror.add(sheet);\n        styles.push({\n          styleId,\n          rules: Array.from(sheet.rules || CSSRule, (r2, index) => ({\n            rule: stringifyRule(r2),\n            index\n          }))\n        });\n      } else styleId = this.styleMirror.getId(sheet);\n      adoptedStyleSheetData.styleIds.push(styleId);\n    }\n    if (styles.length > 0) adoptedStyleSheetData.styles = styles;\n    this.adoptedStyleSheetCb(adoptedStyleSheetData);\n  }\n  reset() {\n    this.styleMirror.reset();\n    this.trackedLinkElements = /* @__PURE__ */ new WeakSet();\n  }\n  // TODO: take snapshot on stylesheet reload by applying event listener\n  trackStylesheetInLinkElement(_linkEl) {\n  }\n}\nclass ProcessedNodeManager {\n  constructor() {\n    this.nodeMap = /* @__PURE__ */ new WeakMap();\n    this.active = false;\n  }\n  inOtherBuffer(node, thisBuffer) {\n    const buffers = this.nodeMap.get(node);\n    return buffers && Array.from(buffers).some((buffer) => buffer !== thisBuffer);\n  }\n  add(node, buffer) {\n    if (!this.active) {\n      this.active = true;\n      onRequestAnimationFrame(() => {\n        this.nodeMap = /* @__PURE__ */ new WeakMap();\n        this.active = false;\n      });\n    }\n    this.nodeMap.set(node, (this.nodeMap.get(node) || /* @__PURE__ */ new Set()).add(buffer));\n  }\n  destroy() {\n  }\n}\nlet wrappedEmit;\nlet _wrappedEmit;\nlet _takeFullSnapshot;\ntry {\n  if (Array.from([1], (x) => x * 2)[0] !== 2) {\n    const cleanFrame = document.createElement(\"iframe\");\n    document.body.appendChild(cleanFrame);\n    Array.from = cleanFrame.contentWindow?.Array.from || Array.from;\n    document.body.removeChild(cleanFrame);\n  }\n} catch (err) {\n  console.debug(\"Unable to override Array.from\", err);\n}\nconst mirror = createMirror$2();\nfunction record(options = {}) {\n  const {\n    emit,\n    checkoutEveryNms,\n    checkoutEveryNth,\n    blockClass = \"rr-block\",\n    blockSelector = null,\n    unblockSelector = null,\n    ignoreClass = \"rr-ignore\",\n    ignoreSelector = null,\n    maskAllText = false,\n    maskTextClass = \"rr-mask\",\n    unmaskTextClass = null,\n    maskTextSelector = null,\n    unmaskTextSelector = null,\n    inlineStylesheet = true,\n    maskAllInputs,\n    maskInputOptions: _maskInputOptions,\n    slimDOMOptions: _slimDOMOptions,\n    maskAttributeFn,\n    maskInputFn,\n    maskTextFn,\n    maxCanvasSize = null,\n    packFn,\n    sampling = {},\n    dataURLOptions = {},\n    mousemoveWait,\n    recordDOM = true,\n    recordCanvas = false,\n    recordCrossOriginIframes = false,\n    recordAfter = options.recordAfter === \"DOMContentLoaded\" ? options.recordAfter : \"load\",\n    userTriggeredOnInput = false,\n    collectFonts = false,\n    inlineImages = false,\n    plugins,\n    keepIframeSrcFn = () => false,\n    ignoreCSSAttributes = /* @__PURE__ */ new Set([]),\n    errorHandler,\n    onMutation,\n    getCanvasManager\n  } = options;\n  registerErrorHandler(errorHandler);\n  const inEmittingFrame = recordCrossOriginIframes ? window.parent === window : true;\n  let passEmitsToParent = false;\n  if (!inEmittingFrame) {\n    try {\n      if (window.parent.document) {\n        passEmitsToParent = false;\n      }\n    } catch (e2) {\n      passEmitsToParent = true;\n    }\n  }\n  if (inEmittingFrame && !emit) {\n    throw new Error(\"emit function is required\");\n  }\n  if (!inEmittingFrame && !passEmitsToParent) {\n    return () => {\n    };\n  }\n  if (mousemoveWait !== void 0 && sampling.mousemove === void 0) {\n    sampling.mousemove = mousemoveWait;\n  }\n  mirror.reset();\n  const maskInputOptions = maskAllInputs === true ? {\n    color: true,\n    date: true,\n    \"datetime-local\": true,\n    email: true,\n    month: true,\n    number: true,\n    range: true,\n    search: true,\n    tel: true,\n    text: true,\n    time: true,\n    url: true,\n    week: true,\n    textarea: true,\n    select: true,\n    radio: true,\n    checkbox: true\n  } : _maskInputOptions !== void 0 ? _maskInputOptions : {};\n  const slimDOMOptions = _slimDOMOptions === true || _slimDOMOptions === \"all\" ? {\n    script: true,\n    comment: true,\n    headFavicon: true,\n    headWhitespace: true,\n    headMetaSocial: true,\n    headMetaRobots: true,\n    headMetaHttpEquiv: true,\n    headMetaVerification: true,\n    // the following are off for slimDOMOptions === true,\n    // as they destroy some (hidden) info:\n    headMetaAuthorship: _slimDOMOptions === \"all\",\n    headMetaDescKeywords: _slimDOMOptions === \"all\"\n  } : _slimDOMOptions ? _slimDOMOptions : {};\n  polyfill$1();\n  let lastFullSnapshotEvent;\n  let incrementalSnapshotCount = 0;\n  const eventProcessor = (e2) => {\n    for (const plugin of plugins || []) {\n      if (plugin.eventProcessor) {\n        e2 = plugin.eventProcessor(e2);\n      }\n    }\n    if (packFn && // Disable packing events which will be emitted to parent frames.\n    !passEmitsToParent) {\n      e2 = packFn(e2);\n    }\n    return e2;\n  };\n  wrappedEmit = (r2, isCheckout) => {\n    const e2 = r2;\n    e2.timestamp = nowTimestamp();\n    if (mutationBuffers[0]?.isFrozen() && e2.type !== EventType.FullSnapshot && !(e2.type === EventType.IncrementalSnapshot && e2.data.source === IncrementalSource.Mutation)) {\n      mutationBuffers.forEach((buf) => buf.unfreeze());\n    }\n    if (inEmittingFrame) {\n      emit?.(eventProcessor(e2), isCheckout);\n    } else if (passEmitsToParent) {\n      const message = {\n        type: \"rrweb\",\n        event: eventProcessor(e2),\n        origin: window.location.origin,\n        isCheckout\n      };\n      window.parent.postMessage(message, \"*\");\n    }\n    if (e2.type === EventType.FullSnapshot) {\n      lastFullSnapshotEvent = e2;\n      incrementalSnapshotCount = 0;\n    } else if (e2.type === EventType.IncrementalSnapshot) {\n      if (e2.data.source === IncrementalSource.Mutation && e2.data.isAttachIframe) {\n        return;\n      }\n      incrementalSnapshotCount++;\n      const exceedCount = checkoutEveryNth && incrementalSnapshotCount >= checkoutEveryNth;\n      const exceedTime = checkoutEveryNms && lastFullSnapshotEvent && e2.timestamp - lastFullSnapshotEvent.timestamp > checkoutEveryNms;\n      if (exceedCount || exceedTime) {\n        takeFullSnapshot2(true);\n      }\n    }\n  };\n  _wrappedEmit = wrappedEmit;\n  const wrappedMutationEmit = (m) => {\n    wrappedEmit({\n      type: EventType.IncrementalSnapshot,\n      data: {\n        source: IncrementalSource.Mutation,\n        ...m\n      }\n    });\n  };\n  const wrappedScrollEmit = (p) => wrappedEmit({\n    type: EventType.IncrementalSnapshot,\n    data: {\n      source: IncrementalSource.Scroll,\n      ...p\n    }\n  });\n  const wrappedCanvasMutationEmit = (p) => wrappedEmit({\n    type: EventType.IncrementalSnapshot,\n    data: {\n      source: IncrementalSource.CanvasMutation,\n      ...p\n    }\n  });\n  const wrappedAdoptedStyleSheetEmit = (a2) => wrappedEmit({\n    type: EventType.IncrementalSnapshot,\n    data: {\n      source: IncrementalSource.AdoptedStyleSheet,\n      ...a2\n    }\n  });\n  const stylesheetManager = new StylesheetManager({\n    mutationCb: wrappedMutationEmit,\n    adoptedStyleSheetCb: wrappedAdoptedStyleSheetEmit\n  });\n  const iframeManager = typeof __RRWEB_EXCLUDE_IFRAME__ === \"boolean\" && __RRWEB_EXCLUDE_IFRAME__ ? new IframeManagerNoop() : new IframeManager({\n    mirror,\n    mutationCb: wrappedMutationEmit,\n    stylesheetManager,\n    recordCrossOriginIframes,\n    wrappedEmit\n  });\n  for (const plugin of plugins || []) {\n    if (plugin.getMirror)\n      plugin.getMirror({\n        nodeMirror: mirror,\n        crossOriginIframeMirror: iframeManager.crossOriginIframeMirror,\n        crossOriginIframeStyleMirror: iframeManager.crossOriginIframeStyleMirror\n      });\n  }\n  const processedNodeManager = new ProcessedNodeManager();\n  const canvasManager = _getCanvasManager(\n    getCanvasManager,\n    {\n      mirror,\n      win: window,\n      mutationCb: (p) => wrappedEmit({\n        type: EventType.IncrementalSnapshot,\n        data: {\n          source: IncrementalSource.CanvasMutation,\n          ...p\n        }\n      }),\n      recordCanvas,\n      blockClass,\n      blockSelector,\n      unblockSelector,\n      maxCanvasSize,\n      sampling: sampling[\"canvas\"],\n      dataURLOptions,\n      errorHandler\n    }\n  );\n  const shadowDomManager = typeof __RRWEB_EXCLUDE_SHADOW_DOM__ === \"boolean\" && __RRWEB_EXCLUDE_SHADOW_DOM__ ? new ShadowDomManagerNoop() : new ShadowDomManager({\n    mutationCb: wrappedMutationEmit,\n    scrollCb: wrappedScrollEmit,\n    bypassOptions: {\n      onMutation,\n      blockClass,\n      blockSelector,\n      unblockSelector,\n      maskAllText,\n      maskTextClass,\n      unmaskTextClass,\n      maskTextSelector,\n      unmaskTextSelector,\n      inlineStylesheet,\n      maskInputOptions,\n      dataURLOptions,\n      maskAttributeFn,\n      maskTextFn,\n      maskInputFn,\n      recordCanvas,\n      inlineImages,\n      sampling,\n      slimDOMOptions,\n      iframeManager,\n      stylesheetManager,\n      canvasManager,\n      keepIframeSrcFn,\n      processedNodeManager,\n      ignoreCSSAttributes\n    },\n    mirror\n  });\n  const takeFullSnapshot2 = (isCheckout = false) => {\n    if (!recordDOM) {\n      return;\n    }\n    wrappedEmit(\n      {\n        type: EventType.Meta,\n        data: {\n          href: window.location.href,\n          width: getWindowWidth(),\n          height: getWindowHeight()\n        }\n      },\n      isCheckout\n    );\n    stylesheetManager.reset();\n    shadowDomManager.init();\n    mutationBuffers.forEach((buf) => buf.lock());\n    const node = snapshot(document, {\n      mirror,\n      blockClass,\n      blockSelector,\n      unblockSelector,\n      maskAllText,\n      maskTextClass,\n      unmaskTextClass,\n      maskTextSelector,\n      unmaskTextSelector,\n      inlineStylesheet,\n      maskAllInputs: maskInputOptions,\n      maskAttributeFn,\n      maskInputFn,\n      maskTextFn,\n      slimDOM: slimDOMOptions,\n      dataURLOptions,\n      recordCanvas,\n      inlineImages,\n      onSerialize: (n2) => {\n        if (isSerializedIframe(n2, mirror)) {\n          iframeManager.addIframe(n2);\n        }\n        if (isSerializedStylesheet(n2, mirror)) {\n          stylesheetManager.trackLinkElement(n2);\n        }\n        if (hasShadowRoot(n2)) {\n          shadowDomManager.addShadowRoot(n2.shadowRoot, document);\n        }\n      },\n      onIframeLoad: (iframe, childSn) => {\n        iframeManager.attachIframe(iframe, childSn);\n        const contentWindow = getIFrameContentWindow(iframe);\n        if (contentWindow) {\n          canvasManager.addWindow(contentWindow);\n        }\n        shadowDomManager.observeAttachShadow(iframe);\n      },\n      onStylesheetLoad: (linkEl, childSn) => {\n        stylesheetManager.attachLinkElement(linkEl, childSn);\n      },\n      onBlockedImageLoad: (_imageEl, serializedNode, { width, height }) => {\n        wrappedMutationEmit({\n          adds: [],\n          removes: [],\n          texts: [],\n          attributes: [\n            {\n              id: serializedNode.id,\n              attributes: {\n                style: {\n                  width: `${width}px`,\n                  height: `${height}px`\n                }\n              }\n            }\n          ]\n        });\n      },\n      keepIframeSrcFn,\n      ignoreCSSAttributes\n    });\n    if (!node) {\n      return console.warn(\"Failed to snapshot the document\");\n    }\n    wrappedEmit({\n      type: EventType.FullSnapshot,\n      data: {\n        node,\n        initialOffset: getWindowScroll(window)\n      }\n    });\n    mutationBuffers.forEach((buf) => buf.unlock());\n    if (document.adoptedStyleSheets && document.adoptedStyleSheets.length > 0)\n      stylesheetManager.adoptStyleSheets(\n        document.adoptedStyleSheets,\n        mirror.getId(document)\n      );\n  };\n  _takeFullSnapshot = takeFullSnapshot2;\n  try {\n    const handlers = [];\n    const observe = (doc) => {\n      return callbackWrapper(initObservers)(\n        {\n          onMutation,\n          mutationCb: wrappedMutationEmit,\n          mousemoveCb: (positions, source) => wrappedEmit({\n            type: EventType.IncrementalSnapshot,\n            data: {\n              source,\n              positions\n            }\n          }),\n          mouseInteractionCb: (d) => wrappedEmit({\n            type: EventType.IncrementalSnapshot,\n            data: {\n              source: IncrementalSource.MouseInteraction,\n              ...d\n            }\n          }),\n          scrollCb: wrappedScrollEmit,\n          viewportResizeCb: (d) => wrappedEmit({\n            type: EventType.IncrementalSnapshot,\n            data: {\n              source: IncrementalSource.ViewportResize,\n              ...d\n            }\n          }),\n          inputCb: (v2) => wrappedEmit({\n            type: EventType.IncrementalSnapshot,\n            data: {\n              source: IncrementalSource.Input,\n              ...v2\n            }\n          }),\n          mediaInteractionCb: (p) => wrappedEmit({\n            type: EventType.IncrementalSnapshot,\n            data: {\n              source: IncrementalSource.MediaInteraction,\n              ...p\n            }\n          }),\n          styleSheetRuleCb: (r2) => wrappedEmit({\n            type: EventType.IncrementalSnapshot,\n            data: {\n              source: IncrementalSource.StyleSheetRule,\n              ...r2\n            }\n          }),\n          styleDeclarationCb: (r2) => wrappedEmit({\n            type: EventType.IncrementalSnapshot,\n            data: {\n              source: IncrementalSource.StyleDeclaration,\n              ...r2\n            }\n          }),\n          canvasMutationCb: wrappedCanvasMutationEmit,\n          fontCb: (p) => wrappedEmit({\n            type: EventType.IncrementalSnapshot,\n            data: {\n              source: IncrementalSource.Font,\n              ...p\n            }\n          }),\n          selectionCb: (p) => {\n            wrappedEmit({\n              type: EventType.IncrementalSnapshot,\n              data: {\n                source: IncrementalSource.Selection,\n                ...p\n              }\n            });\n          },\n          customElementCb: (c2) => {\n            wrappedEmit({\n              type: EventType.IncrementalSnapshot,\n              data: {\n                source: IncrementalSource.CustomElement,\n                ...c2\n              }\n            });\n          },\n          blockClass,\n          ignoreClass,\n          ignoreSelector,\n          maskAllText,\n          maskTextClass,\n          unmaskTextClass,\n          maskTextSelector,\n          unmaskTextSelector,\n          maskInputOptions,\n          inlineStylesheet,\n          sampling,\n          recordDOM,\n          recordCanvas,\n          inlineImages,\n          userTriggeredOnInput,\n          collectFonts,\n          doc,\n          maskAttributeFn,\n          maskInputFn,\n          maskTextFn,\n          keepIframeSrcFn,\n          blockSelector,\n          unblockSelector,\n          slimDOMOptions,\n          dataURLOptions,\n          mirror,\n          iframeManager,\n          stylesheetManager,\n          shadowDomManager,\n          processedNodeManager,\n          canvasManager,\n          ignoreCSSAttributes,\n          plugins: plugins?.filter((p) => p.observer)?.map((p) => ({\n            observer: p.observer,\n            options: p.options,\n            callback: (payload) => wrappedEmit({\n              type: EventType.Plugin,\n              data: {\n                plugin: p.name,\n                payload\n              }\n            })\n          })) || []\n        },\n        {}\n      );\n    };\n    iframeManager.addLoadListener((iframeEl) => {\n      try {\n        handlers.push(observe(iframeEl.contentDocument));\n      } catch (error) {\n        console.warn(error);\n      }\n    });\n    const init = () => {\n      takeFullSnapshot2();\n      handlers.push(observe(document));\n    };\n    if (document.readyState === \"interactive\" || document.readyState === \"complete\") {\n      init();\n    } else {\n      handlers.push(\n        on(\"DOMContentLoaded\", () => {\n          wrappedEmit({\n            type: EventType.DomContentLoaded,\n            data: {}\n          });\n          if (recordAfter === \"DOMContentLoaded\") init();\n        })\n      );\n      handlers.push(\n        on(\n          \"load\",\n          () => {\n            wrappedEmit({\n              type: EventType.Load,\n              data: {}\n            });\n            if (recordAfter === \"load\") init();\n          },\n          window\n        )\n      );\n    }\n    return () => {\n      handlers.forEach((h) => h());\n      processedNodeManager.destroy();\n      _takeFullSnapshot = void 0;\n      unregisterErrorHandler();\n    };\n  } catch (error) {\n    console.warn(error);\n  }\n}\nfunction addCustomEvent(tag, payload) {\n  if (!_wrappedEmit) {\n    throw new Error(\"please add custom event after start recording\");\n  }\n  wrappedEmit({\n    type: EventType.Custom,\n    data: {\n      tag,\n      payload\n    }\n  });\n}\nfunction freezePage() {\n  mutationBuffers.forEach((buf) => buf.freeze());\n}\nfunction takeFullSnapshot(isCheckout) {\n  if (!_takeFullSnapshot) {\n    throw new Error(\"please take full snapshot after start recording\");\n  }\n  _takeFullSnapshot(isCheckout);\n}\nrecord.mirror = mirror;\nrecord.takeFullSnapshot = takeFullSnapshot;\nfunction _getCanvasManager(getCanvasManagerFn, options) {\n  try {\n    return getCanvasManagerFn ? getCanvasManagerFn(options) : new CanvasManagerNoop();\n  } catch {\n    console.warn(\"Unable to initialize CanvasManager\");\n    return new CanvasManagerNoop();\n  }\n}\nfunction mitt$1(n2) {\n  return { all: n2 = n2 || /* @__PURE__ */ new Map(), on: function(t2, e2) {\n    var i2 = n2.get(t2);\n    i2 ? i2.push(e2) : n2.set(t2, [e2]);\n  }, off: function(t2, e2) {\n    var i2 = n2.get(t2);\n    i2 && (e2 ? i2.splice(i2.indexOf(e2) >>> 0, 1) : n2.set(t2, []));\n  }, emit: function(t2, e2) {\n    var i2 = n2.get(t2);\n    i2 && i2.slice().map(function(n3) {\n      n3(e2);\n    }), (i2 = n2.get(\"*\")) && i2.slice().map(function(n3) {\n      n3(t2, e2);\n    });\n  } };\n}\nconst mittProxy = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({\n  __proto__: null,\n  default: mitt$1\n}, Symbol.toStringTag, { value: \"Module\" }));\nfunction polyfill(w = window, d = document) {\n  if (\"scrollBehavior\" in d.documentElement.style && w.__forceSmoothScrollPolyfill__ !== true) {\n    return;\n  }\n  const Element2 = w.HTMLElement || w.Element;\n  const SCROLL_TIME = 468;\n  const original = {\n    scroll: w.scroll || w.scrollTo,\n    scrollBy: w.scrollBy,\n    elementScroll: Element2.prototype.scroll || scrollElement,\n    scrollIntoView: Element2.prototype.scrollIntoView\n  };\n  const now = w.performance && w.performance.now ? w.performance.now.bind(w.performance) : Date.now;\n  function isMicrosoftBrowser(userAgent) {\n    const userAgentPatterns = [\"MSIE \", \"Trident/\", \"Edge/\"];\n    return new RegExp(userAgentPatterns.join(\"|\")).test(userAgent);\n  }\n  const ROUNDING_TOLERANCE = isMicrosoftBrowser(w.navigator.userAgent) ? 1 : 0;\n  function scrollElement(x, y) {\n    this.scrollLeft = x;\n    this.scrollTop = y;\n  }\n  function ease(k) {\n    return 0.5 * (1 - Math.cos(Math.PI * k));\n  }\n  function shouldBailOut(firstArg) {\n    if (firstArg === null || typeof firstArg !== \"object\" || firstArg.behavior === void 0 || firstArg.behavior === \"auto\" || firstArg.behavior === \"instant\") {\n      return true;\n    }\n    if (typeof firstArg === \"object\" && firstArg.behavior === \"smooth\") {\n      return false;\n    }\n    throw new TypeError(\n      \"behavior member of ScrollOptions \" + firstArg.behavior + \" is not a valid value for enumeration ScrollBehavior.\"\n    );\n  }\n  function hasScrollableSpace(el, axis) {\n    if (axis === \"Y\") {\n      return el.clientHeight + ROUNDING_TOLERANCE < el.scrollHeight;\n    }\n    if (axis === \"X\") {\n      return el.clientWidth + ROUNDING_TOLERANCE < el.scrollWidth;\n    }\n  }\n  function canOverflow(el, axis) {\n    const overflowValue = w.getComputedStyle(el, null)[\"overflow\" + axis];\n    return overflowValue === \"auto\" || overflowValue === \"scroll\";\n  }\n  function isScrollable(el) {\n    const isScrollableY = hasScrollableSpace(el, \"Y\") && canOverflow(el, \"Y\");\n    const isScrollableX = hasScrollableSpace(el, \"X\") && canOverflow(el, \"X\");\n    return isScrollableY || isScrollableX;\n  }\n  function findScrollableParent(el) {\n    while (el !== d.body && isScrollable(el) === false) {\n      el = el.parentNode || el.host;\n    }\n    return el;\n  }\n  function step(context) {\n    const time = now();\n    let value;\n    let currentX;\n    let currentY;\n    let elapsed = (time - context.startTime) / SCROLL_TIME;\n    elapsed = elapsed > 1 ? 1 : elapsed;\n    value = ease(elapsed);\n    currentX = context.startX + (context.x - context.startX) * value;\n    currentY = context.startY + (context.y - context.startY) * value;\n    context.method.call(context.scrollable, currentX, currentY);\n    if (currentX !== context.x || currentY !== context.y) {\n      w.requestAnimationFrame(step.bind(w, context));\n    }\n  }\n  function smoothScroll(el, x, y) {\n    let scrollable;\n    let startX;\n    let startY;\n    let method;\n    const startTime = now();\n    if (el === d.body) {\n      scrollable = w;\n      startX = w.scrollX || w.pageXOffset;\n      startY = w.scrollY || w.pageYOffset;\n      method = original.scroll;\n    } else {\n      scrollable = el;\n      startX = el.scrollLeft;\n      startY = el.scrollTop;\n      method = scrollElement;\n    }\n    step({\n      scrollable,\n      method,\n      startTime,\n      startX,\n      startY,\n      x,\n      y\n    });\n  }\n  w.scroll = w.scrollTo = function() {\n    if (arguments[0] === void 0) {\n      return;\n    }\n    if (shouldBailOut(arguments[0]) === true) {\n      original.scroll.call(\n        w,\n        arguments[0].left !== void 0 ? arguments[0].left : typeof arguments[0] !== \"object\" ? arguments[0] : w.scrollX || w.pageXOffset,\n        // use top prop, second argument if present or fallback to scrollY\n        arguments[0].top !== void 0 ? arguments[0].top : arguments[1] !== void 0 ? arguments[1] : w.scrollY || w.pageYOffset\n      );\n      return;\n    }\n    smoothScroll.call(\n      w,\n      d.body,\n      arguments[0].left !== void 0 ? ~~arguments[0].left : w.scrollX || w.pageXOffset,\n      arguments[0].top !== void 0 ? ~~arguments[0].top : w.scrollY || w.pageYOffset\n    );\n  };\n  w.scrollBy = function() {\n    if (arguments[0] === void 0) {\n      return;\n    }\n    if (shouldBailOut(arguments[0])) {\n      original.scrollBy.call(\n        w,\n        arguments[0].left !== void 0 ? arguments[0].left : typeof arguments[0] !== \"object\" ? arguments[0] : 0,\n        arguments[0].top !== void 0 ? arguments[0].top : arguments[1] !== void 0 ? arguments[1] : 0\n      );\n      return;\n    }\n    smoothScroll.call(\n      w,\n      d.body,\n      ~~arguments[0].left + (w.scrollX || w.pageXOffset),\n      ~~arguments[0].top + (w.scrollY || w.pageYOffset)\n    );\n  };\n  Element2.prototype.scroll = Element2.prototype.scrollTo = function() {\n    if (arguments[0] === void 0) {\n      return;\n    }\n    if (shouldBailOut(arguments[0]) === true) {\n      if (typeof arguments[0] === \"number\" && arguments[1] === void 0) {\n        throw new SyntaxError(\"Value could not be converted\");\n      }\n      original.elementScroll.call(\n        this,\n        // use left prop, first number argument or fallback to scrollLeft\n        arguments[0].left !== void 0 ? ~~arguments[0].left : typeof arguments[0] !== \"object\" ? ~~arguments[0] : this.scrollLeft,\n        // use top prop, second argument or fallback to scrollTop\n        arguments[0].top !== void 0 ? ~~arguments[0].top : arguments[1] !== void 0 ? ~~arguments[1] : this.scrollTop\n      );\n      return;\n    }\n    const left = arguments[0].left;\n    const top = arguments[0].top;\n    smoothScroll.call(\n      this,\n      this,\n      typeof left === \"undefined\" ? this.scrollLeft : ~~left,\n      typeof top === \"undefined\" ? this.scrollTop : ~~top\n    );\n  };\n  Element2.prototype.scrollBy = function() {\n    if (arguments[0] === void 0) {\n      return;\n    }\n    if (shouldBailOut(arguments[0]) === true) {\n      original.elementScroll.call(\n        this,\n        arguments[0].left !== void 0 ? ~~arguments[0].left + this.scrollLeft : ~~arguments[0] + this.scrollLeft,\n        arguments[0].top !== void 0 ? ~~arguments[0].top + this.scrollTop : ~~arguments[1] + this.scrollTop\n      );\n      return;\n    }\n    this.scroll({\n      left: ~~arguments[0].left + this.scrollLeft,\n      top: ~~arguments[0].top + this.scrollTop,\n      behavior: arguments[0].behavior\n    });\n  };\n  Element2.prototype.scrollIntoView = function() {\n    if (shouldBailOut(arguments[0]) === true) {\n      original.scrollIntoView.call(\n        this,\n        arguments[0] === void 0 ? true : arguments[0]\n      );\n      return;\n    }\n    const scrollableParent = findScrollableParent(this);\n    const parentRects = scrollableParent.getBoundingClientRect();\n    const clientRects = this.getBoundingClientRect();\n    if (scrollableParent !== d.body) {\n      smoothScroll.call(\n        this,\n        scrollableParent,\n        scrollableParent.scrollLeft + clientRects.left - parentRects.left,\n        scrollableParent.scrollTop + clientRects.top - parentRects.top\n      );\n      if (w.getComputedStyle(scrollableParent).position !== \"fixed\") {\n        w.scrollBy({\n          left: parentRects.left,\n          top: parentRects.top,\n          behavior: \"smooth\"\n        });\n      }\n    } else {\n      w.scrollBy({\n        left: clientRects.left,\n        top: clientRects.top,\n        behavior: \"smooth\"\n      });\n    }\n  };\n}\nclass Timer {\n  constructor(actions = [], config) {\n    this.timeOffset = 0;\n    this.raf = null;\n    this.actions = actions;\n    this.speed = config.speed;\n  }\n  /**\n   * Add an action, possibly after the timer starts.\n   */\n  addAction(action) {\n    const rafWasActive = this.raf === true;\n    if (!this.actions.length || this.actions[this.actions.length - 1].delay <= action.delay) {\n      this.actions.push(action);\n    } else {\n      const index = this.findActionIndex(action);\n      this.actions.splice(index, 0, action);\n    }\n    if (rafWasActive) {\n      this.raf = onRequestAnimationFrame(this.rafCheck.bind(this));\n    }\n  }\n  start() {\n    this.timeOffset = 0;\n    this.lastTimestamp = performance.now();\n    this.raf = onRequestAnimationFrame(this.rafCheck.bind(this));\n  }\n  rafCheck() {\n    const time = performance.now();\n    this.timeOffset += (time - this.lastTimestamp) * this.speed;\n    this.lastTimestamp = time;\n    while (this.actions.length) {\n      const action = this.actions[0];\n      if (this.timeOffset >= action.delay) {\n        this.actions.shift();\n        action.doAction();\n      } else {\n        break;\n      }\n    }\n    if (this.actions.length > 0) {\n      this.raf = onRequestAnimationFrame(this.rafCheck.bind(this));\n    } else {\n      this.raf = true;\n    }\n  }\n  clear() {\n    if (this.raf) {\n      if (this.raf !== true) {\n        cancelAnimationFrame(this.raf);\n      }\n      this.raf = null;\n    }\n    this.actions.length = 0;\n  }\n  setSpeed(speed) {\n    this.speed = speed;\n  }\n  isActive() {\n    return this.raf !== null;\n  }\n  findActionIndex(action) {\n    let start = 0;\n    let end = this.actions.length - 1;\n    while (start <= end) {\n      const mid = Math.floor((start + end) / 2);\n      if (this.actions[mid].delay < action.delay) {\n        start = mid + 1;\n      } else if (this.actions[mid].delay > action.delay) {\n        end = mid - 1;\n      } else {\n        return mid + 1;\n      }\n    }\n    return start;\n  }\n}\nfunction addDelay(event, baselineTime) {\n  if (event.type === EventType.IncrementalSnapshot && event.data.source === IncrementalSource.MouseMove && event.data.positions && event.data.positions.length) {\n    const firstOffset = event.data.positions[0].timeOffset;\n    const firstTimestamp = event.timestamp + firstOffset;\n    event.delay = firstTimestamp - baselineTime;\n    return firstTimestamp - baselineTime;\n  }\n  event.delay = event.timestamp - baselineTime;\n  return event.delay;\n}\n/*! *****************************************************************************\nCopyright (c) Microsoft Corporation.\n\nPermission to use, copy, modify, and/or distribute this software for any\npurpose with or without fee is hereby granted.\n\nTHE SOFTWARE IS PROVIDED \"AS IS\" AND THE AUTHOR DISCLAIMS ALL WARRANTIES WITH\nREGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY\nAND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY SPECIAL, DIRECT,\nINDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM\nLOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR\nOTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR\nPERFORMANCE OF THIS SOFTWARE.\n***************************************************************************** */\nfunction t(t2, n2) {\n  var e2 = \"function\" == typeof Symbol && t2[Symbol.iterator];\n  if (!e2) return t2;\n  var r2, o2, i2 = e2.call(t2), a2 = [];\n  try {\n    for (; (void 0 === n2 || n2-- > 0) && !(r2 = i2.next()).done; ) a2.push(r2.value);\n  } catch (t3) {\n    o2 = { error: t3 };\n  } finally {\n    try {\n      r2 && !r2.done && (e2 = i2.return) && e2.call(i2);\n    } finally {\n      if (o2) throw o2.error;\n    }\n  }\n  return a2;\n}\nvar n;\n!(function(t2) {\n  t2[t2.NotStarted = 0] = \"NotStarted\", t2[t2.Running = 1] = \"Running\", t2[t2.Stopped = 2] = \"Stopped\";\n})(n || (n = {}));\nvar e = { type: \"xstate.init\" };\nfunction r(t2) {\n  return void 0 === t2 ? [] : [].concat(t2);\n}\nfunction o(t2) {\n  return { type: \"xstate.assign\", assignment: t2 };\n}\nfunction i(t2, n2) {\n  return \"string\" == typeof (t2 = \"string\" == typeof t2 && n2 && n2[t2] ? n2[t2] : t2) ? { type: t2 } : \"function\" == typeof t2 ? { type: t2.name, exec: t2 } : t2;\n}\nfunction a(t2) {\n  return function(n2) {\n    return t2 === n2;\n  };\n}\nfunction u(t2) {\n  return \"string\" == typeof t2 ? { type: t2 } : t2;\n}\nfunction c(t2, n2) {\n  return { value: t2, context: n2, actions: [], changed: false, matches: a(t2) };\n}\nfunction f(t2, n2, e2) {\n  var r2 = n2, o2 = false;\n  return [t2.filter((function(t3) {\n    if (\"xstate.assign\" === t3.type) {\n      o2 = true;\n      var n3 = Object.assign({}, r2);\n      return \"function\" == typeof t3.assignment ? n3 = t3.assignment(r2, e2) : Object.keys(t3.assignment).forEach((function(o3) {\n        n3[o3] = \"function\" == typeof t3.assignment[o3] ? t3.assignment[o3](r2, e2) : t3.assignment[o3];\n      })), r2 = n3, false;\n    }\n    return true;\n  })), r2, o2];\n}\nfunction s(n2, o2) {\n  void 0 === o2 && (o2 = {});\n  var s2 = t(f(r(n2.states[n2.initial].entry).map((function(t2) {\n    return i(t2, o2.actions);\n  })), n2.context, e), 2), l2 = s2[0], v2 = s2[1], y = { config: n2, _options: o2, initialState: { value: n2.initial, actions: l2, context: v2, matches: a(n2.initial) }, transition: function(e2, o3) {\n    var s3, l3, v3 = \"string\" == typeof e2 ? { value: e2, context: n2.context } : e2, p = v3.value, g = v3.context, d = u(o3), x = n2.states[p];\n    if (x.on) {\n      var m = r(x.on[d.type]);\n      try {\n        for (var h = (function(t2) {\n          var n3 = \"function\" == typeof Symbol && Symbol.iterator, e3 = n3 && t2[n3], r2 = 0;\n          if (e3) return e3.call(t2);\n          if (t2 && \"number\" == typeof t2.length) return { next: function() {\n            return t2 && r2 >= t2.length && (t2 = void 0), { value: t2 && t2[r2++], done: !t2 };\n          } };\n          throw new TypeError(n3 ? \"Object is not iterable.\" : \"Symbol.iterator is not defined.\");\n        })(m), b = h.next(); !b.done; b = h.next()) {\n          var S = b.value;\n          if (void 0 === S) return c(p, g);\n          var w = \"string\" == typeof S ? { target: S } : S, j = w.target, E = w.actions, R = void 0 === E ? [] : E, N = w.cond, O = void 0 === N ? function() {\n            return true;\n          } : N, _ = void 0 === j, k = null != j ? j : p, T = n2.states[k];\n          if (O(g, d)) {\n            var q = t(f((_ ? r(R) : [].concat(x.exit, R, T.entry).filter((function(t2) {\n              return t2;\n            }))).map((function(t2) {\n              return i(t2, y._options.actions);\n            })), g, d), 3), z = q[0], A = q[1], B = q[2], C = null != j ? j : p;\n            return { value: C, context: A, actions: z, changed: j !== p || z.length > 0 || B, matches: a(C) };\n          }\n        }\n      } catch (t2) {\n        s3 = { error: t2 };\n      } finally {\n        try {\n          b && !b.done && (l3 = h.return) && l3.call(h);\n        } finally {\n          if (s3) throw s3.error;\n        }\n      }\n    }\n    return c(p, g);\n  } };\n  return y;\n}\nvar l = function(t2, n2) {\n  return t2.actions.forEach((function(e2) {\n    var r2 = e2.exec;\n    return r2 && r2(t2.context, n2);\n  }));\n};\nfunction v(t2) {\n  var r2 = t2.initialState, o2 = n.NotStarted, i2 = /* @__PURE__ */ new Set(), c2 = { _machine: t2, send: function(e2) {\n    o2 === n.Running && (r2 = t2.transition(r2, e2), l(r2, u(e2)), i2.forEach((function(t3) {\n      return t3(r2);\n    })));\n  }, subscribe: function(t3) {\n    return i2.add(t3), t3(r2), { unsubscribe: function() {\n      return i2.delete(t3);\n    } };\n  }, start: function(i3) {\n    if (i3) {\n      var u2 = \"object\" == typeof i3 ? i3 : { context: t2.config.context, value: i3 };\n      r2 = { value: u2.value, actions: [], context: u2.context, matches: a(u2.value) };\n    }\n    return o2 = n.Running, l(r2, e), c2;\n  }, stop: function() {\n    return o2 = n.Stopped, i2.clear(), c2;\n  }, get state() {\n    return r2;\n  }, get status() {\n    return o2;\n  } };\n  return c2;\n}\nfunction discardPriorSnapshots(events, baselineTime) {\n  for (let idx = events.length - 1; idx >= 0; idx--) {\n    const event = events[idx];\n    if (event.type === EventType.Meta) {\n      if (event.timestamp <= baselineTime) {\n        return events.slice(idx);\n      }\n    }\n  }\n  return events;\n}\nfunction createPlayerService(context, { getCastFn, applyEventsSynchronously, emitter }) {\n  const playerMachine = s(\n    {\n      id: \"player\",\n      context,\n      initial: \"paused\",\n      states: {\n        playing: {\n          on: {\n            PAUSE: {\n              target: \"paused\",\n              actions: [\"pause\"]\n            },\n            CAST_EVENT: {\n              target: \"playing\",\n              actions: \"castEvent\"\n            },\n            END: {\n              target: \"paused\",\n              actions: [\"resetLastPlayedEvent\", \"pause\"]\n            },\n            ADD_EVENT: {\n              target: \"playing\",\n              actions: [\"addEvent\"]\n            }\n          }\n        },\n        paused: {\n          on: {\n            PLAY: {\n              target: \"playing\",\n              actions: [\"recordTimeOffset\", \"play\"]\n            },\n            CAST_EVENT: {\n              target: \"paused\",\n              actions: \"castEvent\"\n            },\n            TO_LIVE: {\n              target: \"live\",\n              actions: [\"startLive\"]\n            },\n            ADD_EVENT: {\n              target: \"paused\",\n              actions: [\"addEvent\"]\n            }\n          }\n        },\n        live: {\n          on: {\n            ADD_EVENT: {\n              target: \"live\",\n              actions: [\"addEvent\"]\n            },\n            CAST_EVENT: {\n              target: \"live\",\n              actions: [\"castEvent\"]\n            }\n          }\n        }\n      }\n    },\n    {\n      actions: {\n        castEvent: o({\n          lastPlayedEvent: (ctx, event) => {\n            if (event.type === \"CAST_EVENT\") {\n              return event.payload.event;\n            }\n            return ctx.lastPlayedEvent;\n          }\n        }),\n        recordTimeOffset: o((ctx, event) => {\n          let timeOffset = ctx.timeOffset;\n          if (\"payload\" in event && \"timeOffset\" in event.payload) {\n            timeOffset = event.payload.timeOffset;\n          }\n          return {\n            ...ctx,\n            timeOffset,\n            baselineTime: ctx.events[0].timestamp + timeOffset\n          };\n        }),\n        play(ctx) {\n          const { timer, events, baselineTime, lastPlayedEvent } = ctx;\n          timer.clear();\n          for (const event of events) {\n            addDelay(event, baselineTime);\n          }\n          const neededEvents = discardPriorSnapshots(events, baselineTime);\n          let lastPlayedTimestamp = lastPlayedEvent?.timestamp;\n          if (lastPlayedEvent?.type === EventType.IncrementalSnapshot && lastPlayedEvent.data.source === IncrementalSource.MouseMove) {\n            lastPlayedTimestamp = lastPlayedEvent.timestamp + lastPlayedEvent.data.positions[0]?.timeOffset;\n          }\n          if (baselineTime < (lastPlayedTimestamp || 0)) {\n            emitter.emit(ReplayerEvents.PlayBack);\n          }\n          const syncEvents = new Array();\n          for (const event of neededEvents) {\n            if (lastPlayedTimestamp && lastPlayedTimestamp < baselineTime && (event.timestamp <= lastPlayedTimestamp || event === lastPlayedEvent)) {\n              continue;\n            }\n            if (event.timestamp < baselineTime) {\n              syncEvents.push(event);\n            } else {\n              const castFn = getCastFn(event, false);\n              timer.addAction({\n                doAction: () => {\n                  castFn();\n                },\n                delay: event.delay\n              });\n            }\n          }\n          applyEventsSynchronously(syncEvents);\n          emitter.emit(ReplayerEvents.Flush);\n          timer.start();\n        },\n        pause(ctx) {\n          ctx.timer.clear();\n        },\n        resetLastPlayedEvent: o((ctx) => {\n          return {\n            ...ctx,\n            lastPlayedEvent: null\n          };\n        }),\n        startLive: o({\n          baselineTime: (ctx, event) => {\n            ctx.timer.start();\n            if (event.type === \"TO_LIVE\" && event.payload.baselineTime) {\n              return event.payload.baselineTime;\n            }\n            return Date.now();\n          }\n        }),\n        addEvent: o((ctx, machineEvent) => {\n          const { baselineTime, timer, events } = ctx;\n          if (machineEvent.type === \"ADD_EVENT\") {\n            const { event } = machineEvent.payload;\n            addDelay(event, baselineTime);\n            let end = events.length - 1;\n            if (!events[end] || events[end].timestamp <= event.timestamp) {\n              events.push(event);\n            } else {\n              let insertionIndex = -1;\n              let start = 0;\n              while (start <= end) {\n                const mid = Math.floor((start + end) / 2);\n                if (events[mid].timestamp <= event.timestamp) {\n                  start = mid + 1;\n                } else {\n                  end = mid - 1;\n                }\n              }\n              if (insertionIndex === -1) {\n                insertionIndex = start;\n              }\n              events.splice(insertionIndex, 0, event);\n            }\n            const isSync = event.timestamp < baselineTime;\n            const castFn = getCastFn(event, isSync);\n            if (isSync) {\n              castFn();\n            } else if (timer.isActive()) {\n              timer.addAction({\n                doAction: () => {\n                  castFn();\n                },\n                delay: event.delay\n              });\n            }\n          }\n          return { ...ctx, events };\n        })\n      }\n    }\n  );\n  return v(playerMachine);\n}\nfunction createSpeedService(context) {\n  const speedMachine = s(\n    {\n      id: \"speed\",\n      context,\n      initial: \"normal\",\n      states: {\n        normal: {\n          on: {\n            FAST_FORWARD: {\n              target: \"skipping\",\n              actions: [\"recordSpeed\", \"setSpeed\"]\n            },\n            SET_SPEED: {\n              target: \"normal\",\n              actions: [\"setSpeed\"]\n            }\n          }\n        },\n        skipping: {\n          on: {\n            BACK_TO_NORMAL: {\n              target: \"normal\",\n              actions: [\"restoreSpeed\"]\n            },\n            SET_SPEED: {\n              target: \"normal\",\n              actions: [\"setSpeed\"]\n            }\n          }\n        }\n      }\n    },\n    {\n      actions: {\n        setSpeed: (ctx, event) => {\n          if (\"payload\" in event) {\n            ctx.timer.setSpeed(event.payload.speed);\n          }\n        },\n        recordSpeed: o({\n          normalSpeed: (ctx) => ctx.timer.speed\n        }),\n        restoreSpeed: (ctx) => {\n          ctx.timer.setSpeed(ctx.normalSpeed);\n        }\n      }\n    }\n  );\n  return v(speedMachine);\n}\nconst rules = (blockClass) => [\n  `.${blockClass} { background: currentColor }`,\n  \"noscript { display: none !important; }\"\n];\nconst webGLVarMap = /* @__PURE__ */ new Map();\nfunction variableListFor(ctx, ctor) {\n  let contextMap = webGLVarMap.get(ctx);\n  if (!contextMap) {\n    contextMap = /* @__PURE__ */ new Map();\n    webGLVarMap.set(ctx, contextMap);\n  }\n  if (!contextMap.has(ctor)) {\n    contextMap.set(ctor, []);\n  }\n  return contextMap.get(ctor);\n}\nfunction deserializeArg(imageMap, ctx, preload) {\n  return async (arg) => {\n    if (arg && typeof arg === \"object\" && \"rr_type\" in arg) {\n      if (preload) preload.isUnchanged = false;\n      if (arg.rr_type === \"ImageBitmap\" && \"args\" in arg) {\n        const args = await deserializeArg(imageMap, ctx, preload)(arg.args);\n        return await createImageBitmap.apply(null, args);\n      } else if (\"index\" in arg) {\n        if (preload || ctx === null) return arg;\n        const { rr_type: name, index } = arg;\n        return variableListFor(ctx, name)[index];\n      } else if (\"args\" in arg) {\n        const { rr_type: name, args } = arg;\n        const ctor = window[name];\n        return new ctor(\n          ...await Promise.all(\n            args.map(deserializeArg(imageMap, ctx, preload))\n          )\n        );\n      } else if (\"base64\" in arg) {\n        return decode(arg.base64);\n      } else if (\"src\" in arg) {\n        const image = imageMap.get(arg.src);\n        if (image) {\n          return image;\n        } else {\n          const image2 = new Image();\n          image2.src = arg.src;\n          imageMap.set(arg.src, image2);\n          return image2;\n        }\n      } else if (\"data\" in arg && arg.rr_type === \"Blob\") {\n        const blobContents = await Promise.all(\n          arg.data.map(deserializeArg(imageMap, ctx, preload))\n        );\n        const blob = new Blob(blobContents, {\n          type: arg.type\n        });\n        return blob;\n      }\n    } else if (Array.isArray(arg)) {\n      const result = await Promise.all(\n        arg.map(deserializeArg(imageMap, ctx, preload))\n      );\n      return result;\n    }\n    return arg;\n  };\n}\nfunction getContext(target, type) {\n  try {\n    if (type === CanvasContext.WebGL) {\n      return target.getContext(\"webgl\") || target.getContext(\"experimental-webgl\");\n    }\n    return target.getContext(\"webgl2\");\n  } catch (e2) {\n    return null;\n  }\n}\nconst WebGLVariableConstructorsNames = [\n  \"WebGLActiveInfo\",\n  \"WebGLBuffer\",\n  \"WebGLFramebuffer\",\n  \"WebGLProgram\",\n  \"WebGLRenderbuffer\",\n  \"WebGLShader\",\n  \"WebGLShaderPrecisionFormat\",\n  \"WebGLTexture\",\n  \"WebGLUniformLocation\",\n  \"WebGLVertexArrayObject\"\n];\nfunction saveToWebGLVarMap(ctx, result) {\n  if (!result?.constructor) return;\n  const { name } = result.constructor;\n  if (!WebGLVariableConstructorsNames.includes(name)) return;\n  const variables = variableListFor(ctx, name);\n  if (!variables.includes(result)) variables.push(result);\n}\nasync function webglMutation({\n  mutation,\n  target,\n  type,\n  imageMap,\n  errorHandler\n}) {\n  try {\n    const ctx = getContext(target, type);\n    if (!ctx) return;\n    if (mutation.setter) {\n      ctx[mutation.property] = mutation.args[0];\n      return;\n    }\n    const original = ctx[mutation.property];\n    const args = await Promise.all(\n      mutation.args.map(deserializeArg(imageMap, ctx))\n    );\n    const result = original.apply(ctx, args);\n    saveToWebGLVarMap(ctx, result);\n    const debugMode = false;\n    if (debugMode) ;\n  } catch (error) {\n    errorHandler(mutation, error);\n  }\n}\nasync function canvasMutation$1({\n  event,\n  mutations,\n  target,\n  imageMap,\n  errorHandler\n}) {\n  const ctx = target.getContext(\"2d\");\n  if (!ctx) {\n    errorHandler(mutations[0], new Error(\"Canvas context is null\"));\n    return;\n  }\n  const mutationArgsPromises = mutations.map(\n    async (mutation) => {\n      return Promise.all(mutation.args.map(deserializeArg(imageMap, ctx)));\n    }\n  );\n  const args = await Promise.all(mutationArgsPromises);\n  args.forEach((args2, index) => {\n    const mutation = mutations[index];\n    try {\n      if (mutation.setter) {\n        ctx[mutation.property] = mutation.args[0];\n        return;\n      }\n      const original = ctx[mutation.property];\n      if (mutation.property === \"drawImage\" && typeof mutation.args[0] === \"string\") {\n        imageMap.get(event);\n        original.apply(ctx, mutation.args);\n      } else {\n        original.apply(ctx, args2);\n      }\n    } catch (error) {\n      errorHandler(mutation, error);\n    }\n    return;\n  });\n}\nasync function canvasMutation({\n  event,\n  mutation,\n  target,\n  imageMap,\n  canvasEventMap,\n  errorHandler\n}) {\n  try {\n    const precomputedMutation = canvasEventMap.get(event) || mutation;\n    const commands = \"commands\" in precomputedMutation ? precomputedMutation.commands : [precomputedMutation];\n    if ([CanvasContext.WebGL, CanvasContext.WebGL2].includes(mutation.type)) {\n      for (let i2 = 0; i2 < commands.length; i2++) {\n        const command = commands[i2];\n        await webglMutation({\n          mutation: command,\n          type: mutation.type,\n          target,\n          imageMap,\n          errorHandler\n        });\n      }\n      return;\n    }\n    await canvasMutation$1({\n      event,\n      mutations: commands,\n      target,\n      imageMap,\n      errorHandler\n    });\n  } catch (error) {\n    errorHandler(mutation, error);\n  }\n}\nconst SKIP_TIME_INTERVAL = 5 * 1e3;\nconst mitt = mitt$1 || mittProxy;\nconst REPLAY_CONSOLE_PREFIX = \"[replayer]\";\nfunction getEventIndex(events, eventTime) {\n  let result = -1;\n  if (events.length === 0) {\n    return result;\n  }\n  let left = 0, right = events.length - 1;\n  while (left <= right) {\n    const mid = Math.floor((left + right) / 2);\n    if (events[mid].timestamp <= eventTime) {\n      result = mid;\n      left = mid + 1;\n    } else {\n      right = mid - 1;\n    }\n  }\n  return result;\n}\nconst defaultMouseTailConfig = {\n  duration: 500,\n  lineCap: \"round\",\n  lineWidth: 3,\n  strokeStyle: \"red\"\n};\nfunction indicatesTouchDevice(e2) {\n  return e2.type == EventType.IncrementalSnapshot && (e2.data.source == IncrementalSource.TouchMove || e2.data.source == IncrementalSource.MouseInteraction && e2.data.type == MouseInteractions.TouchStart);\n}\nfunction getPointerId(d) {\n  const pointerId = \"pointerId\" in d && typeof d.pointerId === \"number\" ? d.pointerId : -1;\n  return pointerId;\n}\nclass Replayer {\n  constructor(events, config) {\n    this.usingVirtualDom = false;\n    this.virtualDom = new RRDocument();\n    this.emitter = mitt();\n    this.legacy_missingNodeRetryMap = {};\n    this.cache = createCache();\n    this.imageMap = /* @__PURE__ */ new Map();\n    this.canvasEventMap = /* @__PURE__ */ new Map();\n    this.mirror = createMirror$2();\n    this.styleMirror = new StyleSheetMirror();\n    this.firstFullSnapshot = null;\n    this.newDocumentQueue = [];\n    this.pointers = {};\n    this.lastMouseDownEvent = null;\n    this.lastSelectionData = null;\n    this.constructedStyleMutations = [];\n    this.adoptedStyleSheets = [];\n    this.handleResize = (dimension) => {\n      this.iframe.style.display = \"inherit\";\n      for (const el of [\n        ...Object.values(this.pointers).flatMap((a2) => a2.mouseTail),\n        this.iframe\n      ]) {\n        if (!el) {\n          continue;\n        }\n        el.setAttribute(\"width\", String(dimension.width));\n        el.setAttribute(\"height\", String(dimension.height));\n      }\n    };\n    this.applyEventsSynchronously = (events2) => {\n      for (const event of events2) {\n        switch (event.type) {\n          case EventType.DomContentLoaded:\n          case EventType.Load:\n          case EventType.Custom:\n            continue;\n          case EventType.FullSnapshot:\n          case EventType.Meta:\n          case EventType.Plugin:\n          case EventType.IncrementalSnapshot:\n            break;\n        }\n        const castFn = this.getCastFn(event, true);\n        castFn();\n      }\n    };\n    this.getCastFn = (event, isSync = false) => {\n      let castFn;\n      switch (event.type) {\n        case EventType.DomContentLoaded:\n        case EventType.Load:\n          break;\n        case EventType.Custom:\n          castFn = () => {\n            this.emitter.emit(ReplayerEvents.CustomEvent, event);\n          };\n          break;\n        case EventType.Meta:\n          castFn = () => this.emitter.emit(ReplayerEvents.Resize, {\n            width: event.data.width,\n            height: event.data.height\n          });\n          break;\n        case EventType.FullSnapshot:\n          castFn = () => {\n            if (this.firstFullSnapshot) {\n              if (this.firstFullSnapshot === event) {\n                this.firstFullSnapshot = true;\n                return;\n              }\n            } else {\n              this.firstFullSnapshot = true;\n            }\n            this.rebuildFullSnapshot(event, isSync);\n            this.iframe.contentWindow?.scrollTo(event.data.initialOffset);\n            this.styleMirror.reset();\n          };\n          break;\n        case EventType.IncrementalSnapshot:\n          castFn = () => {\n            this.applyIncremental(event, isSync);\n            if (isSync) {\n              return;\n            }\n            if (event === this.nextUserInteractionEvent) {\n              this.nextUserInteractionEvent = null;\n              this.backToNormal();\n            }\n            if (this.config.skipInactive && !this.nextUserInteractionEvent) {\n              for (const _event of this.service.state.context.events) {\n                if (_event.timestamp <= event.timestamp) {\n                  continue;\n                }\n                if (this.isUserInteraction(_event)) {\n                  if (\n                    // eslint-disable-next-line @typescript-eslint/no-non-null-assertion\n                    _event.delay - event.delay > this.config.inactivePeriodThreshold * this.speedService.state.context.timer.speed\n                  ) {\n                    this.nextUserInteractionEvent = _event;\n                  }\n                  break;\n                }\n              }\n              if (this.nextUserInteractionEvent) {\n                const skipTime = (\n                  // eslint-disable-next-line @typescript-eslint/no-non-null-assertion\n                  this.nextUserInteractionEvent.delay - event.delay\n                );\n                const payload = {\n                  speed: Math.min(\n                    Math.round(skipTime / SKIP_TIME_INTERVAL),\n                    this.config.maxSpeed\n                  )\n                };\n                this.speedService.send({ type: \"FAST_FORWARD\", payload });\n                this.emitter.emit(ReplayerEvents.SkipStart, payload);\n              }\n            }\n          };\n          break;\n      }\n      const wrappedCastFn = () => {\n        if (castFn) {\n          castFn();\n        }\n        for (const plugin of this.config.plugins || []) {\n          if (plugin.handler) plugin.handler(event, isSync, { replayer: this });\n        }\n        this.service.send({ type: \"CAST_EVENT\", payload: { event } });\n        const last_index = this.service.state.context.events.length - 1;\n        if (!this.config.liveMode && event === this.service.state.context.events[last_index]) {\n          const finish = () => {\n            if (last_index < this.service.state.context.events.length - 1) {\n              return;\n            }\n            this.backToNormal();\n            this.service.send(\"END\");\n            this.emitter.emit(ReplayerEvents.Finish);\n          };\n          let finish_buffer = 50;\n          if (event.type === EventType.IncrementalSnapshot && event.data.source === IncrementalSource.MouseMove && event.data.positions.length) {\n            finish_buffer += Math.max(0, -event.data.positions[0].timeOffset);\n          }\n          setTimeout$1(finish, finish_buffer);\n        }\n        this.emitter.emit(ReplayerEvents.EventCast, event);\n      };\n      return wrappedCastFn;\n    };\n    if (!config?.liveMode && events.length < 2) {\n      throw new Error(\"Replayer need at least 2 events.\");\n    }\n    const defaultConfig = {\n      speed: 1,\n      maxSpeed: 360,\n      root: document.body,\n      loadTimeout: 0,\n      skipInactive: false,\n      inactivePeriodThreshold: 10 * 1e3,\n      showWarning: true,\n      showDebug: false,\n      blockClass: \"rr-block\",\n      liveMode: false,\n      insertStyleRules: [],\n      triggerFocus: true,\n      UNSAFE_replayCanvas: false,\n      pauseAnimation: true,\n      mouseTail: defaultMouseTailConfig,\n      useVirtualDom: true,\n      // Virtual-dom optimization is enabled by default.\n      logger: console\n    };\n    this.config = Object.assign({}, defaultConfig, config);\n    this.handleResize = this.handleResize.bind(this);\n    this.getCastFn = this.getCastFn.bind(this);\n    this.applyEventsSynchronously = this.applyEventsSynchronously.bind(this);\n    this.emitter.on(ReplayerEvents.Resize, this.handleResize);\n    this.setupDom();\n    for (const plugin of this.config.plugins || []) {\n      if (plugin.getMirror) plugin.getMirror({ nodeMirror: this.mirror });\n    }\n    this.emitter.on(ReplayerEvents.Flush, () => {\n      if (this.usingVirtualDom) {\n        const replayerHandler = {\n          mirror: this.mirror,\n          applyCanvas: (canvasEvent, canvasMutationData2, target) => {\n            void canvasMutation({\n              event: canvasEvent,\n              mutation: canvasMutationData2,\n              target,\n              imageMap: this.imageMap,\n              canvasEventMap: this.canvasEventMap,\n              errorHandler: this.warnCanvasMutationFailed.bind(this)\n            });\n          },\n          applyInput: this.applyInput.bind(this),\n          applyScroll: this.applyScroll.bind(this),\n          applyStyleSheetMutation: (data, styleSheet) => {\n            if (data.source === IncrementalSource.StyleSheetRule)\n              this.applyStyleSheetRule(data, styleSheet);\n            else if (data.source === IncrementalSource.StyleDeclaration)\n              this.applyStyleDeclaration(data, styleSheet);\n          },\n          afterAppend: (node, id) => {\n            for (const plugin of this.config.plugins || []) {\n              if (plugin.onBuild) plugin.onBuild(node, { id, replayer: this });\n            }\n          }\n        };\n        const iframeDoc = getIFrameContentDocument(this.iframe);\n        if (iframeDoc)\n          try {\n            diff(\n              iframeDoc,\n              this.virtualDom,\n              replayerHandler,\n              this.virtualDom.mirror\n            );\n          } catch (e2) {\n            console.warn(e2);\n          }\n        this.virtualDom.destroyTree();\n        this.usingVirtualDom = false;\n        if (Object.keys(this.legacy_missingNodeRetryMap).length) {\n          for (const key in this.legacy_missingNodeRetryMap) {\n            try {\n              const value = this.legacy_missingNodeRetryMap[key];\n              const realNode = createOrGetNode(\n                value.node,\n                this.mirror,\n                this.virtualDom.mirror\n              );\n              diff(\n                realNode,\n                value.node,\n                replayerHandler,\n                this.virtualDom.mirror\n              );\n              value.node = realNode;\n            } catch (error) {\n              this.warn(error);\n            }\n          }\n        }\n        this.constructedStyleMutations.forEach((data) => {\n          this.applyStyleSheetMutation(data);\n        });\n        this.constructedStyleMutations = [];\n        this.adoptedStyleSheets.forEach((data) => {\n          this.applyAdoptedStyleSheet(data);\n        });\n        this.adoptedStyleSheets = [];\n      }\n      for (const [\n        pointerId,\n        { pointerPosition, touchActive }\n      ] of Object.entries(this.pointers)) {\n        const id = parseInt(pointerId);\n        const pointer = this.pointers[id];\n        if (pointerPosition) {\n          this.moveAndHover(\n            pointerPosition.x,\n            pointerPosition.y,\n            pointerPosition.id,\n            true,\n            pointerPosition.debugData,\n            id\n          );\n          pointer.pointerPosition = null;\n        }\n        if (touchActive === true) {\n          pointer.pointerEl.classList.add(\"touch-active\");\n        } else if (touchActive === false) {\n          pointer.pointerEl.classList.remove(\"touch-active\");\n        }\n        pointer.touchActive = null;\n      }\n      if (this.lastMouseDownEvent) {\n        const [target, event] = this.lastMouseDownEvent;\n        target.dispatchEvent(event);\n      }\n      this.lastMouseDownEvent = null;\n      if (this.lastSelectionData) {\n        this.applySelection(this.lastSelectionData);\n        this.lastSelectionData = null;\n      }\n    });\n    this.emitter.on(ReplayerEvents.PlayBack, () => {\n      this.firstFullSnapshot = null;\n      this.mirror.reset();\n      this.styleMirror.reset();\n    });\n    const timer = new Timer([], {\n      speed: this.config.speed\n    });\n    this.service = createPlayerService(\n      {\n        events: events.map((e2) => {\n          if (config && config.unpackFn) {\n            return config.unpackFn(e2);\n          }\n          return e2;\n        }).sort((a1, a2) => a1.timestamp - a2.timestamp),\n        timer,\n        timeOffset: 0,\n        baselineTime: 0,\n        lastPlayedEvent: null\n      },\n      {\n        getCastFn: this.getCastFn,\n        applyEventsSynchronously: this.applyEventsSynchronously,\n        emitter: this.emitter\n      }\n    );\n    this.service.start();\n    this.service.subscribe((state) => {\n      this.emitter.emit(ReplayerEvents.StateChange, {\n        player: state\n      });\n    });\n    this.speedService = createSpeedService({\n      normalSpeed: -1,\n      timer\n    });\n    this.speedService.start();\n    this.speedService.subscribe((state) => {\n      this.emitter.emit(ReplayerEvents.StateChange, {\n        speed: state\n      });\n    });\n    const firstMeta = this.service.state.context.events.find(\n      (e2) => e2.type === EventType.Meta\n    );\n    const firstFullsnapshot = this.service.state.context.events.find(\n      (e2) => e2.type === EventType.FullSnapshot\n    );\n    if (firstMeta) {\n      const { width, height } = firstMeta.data;\n      setTimeout$1(() => {\n        this.emitter.emit(ReplayerEvents.Resize, {\n          width,\n          height\n        });\n      }, 0);\n    }\n    if (firstFullsnapshot) {\n      setTimeout$1(() => {\n        if (this.firstFullSnapshot) {\n          return;\n        }\n        this.firstFullSnapshot = firstFullsnapshot;\n        this.rebuildFullSnapshot(\n          firstFullsnapshot\n        );\n        this.iframe.contentWindow?.scrollTo(\n          firstFullsnapshot.data.initialOffset\n        );\n      }, 1);\n    }\n  }\n  get timer() {\n    return this.service.state.context.timer;\n  }\n  createPointer(pointerId, event) {\n    const mouseTail = document.createElement(\"canvas\");\n    mouseTail.classList.add(\"replayer-mouse-tail\");\n    mouseTail.width = Number.parseFloat(this.iframe.width);\n    mouseTail.height = Number.parseFloat(this.iframe.height);\n    this.wrapper.insertBefore(mouseTail, this.iframe);\n    mouseTail.style.display = this.config.mouseTail === false ? \"none\" : \"inherit\";\n    const newMouse = document.createElement(\"div\");\n    newMouse.classList.add(\"replayer-mouse\");\n    this.pointers[pointerId] = {\n      touchActive: null,\n      pointerEl: newMouse,\n      tailPositions: [],\n      pointerPosition: null,\n      mouseTail\n    };\n    if (indicatesTouchDevice(event)) {\n      newMouse.classList.add(\"touch-device\");\n    }\n    this.wrapper.appendChild(newMouse);\n  }\n  on(event, handler) {\n    this.emitter.on(event, handler);\n    return this;\n  }\n  off(event, handler) {\n    this.emitter.off(event, handler);\n    return this;\n  }\n  setConfig(config) {\n    const previousSkipInactive = this.config.skipInactive;\n    Object.keys(config).forEach((key) => {\n      config[key];\n      this.config[key] = config[key];\n    });\n    if (!this.config.skipInactive) {\n      this.backToNormal();\n    } else if (previousSkipInactive === false && this.config.skipInactive === true) {\n      this.reevaluateFastForward();\n    }\n    if (typeof config.speed !== \"undefined\") {\n      this.speedService.send({\n        type: \"SET_SPEED\",\n        payload: {\n          speed: config.speed\n        }\n      });\n    }\n    if (typeof config.mouseTail !== \"undefined\") {\n      if (config.mouseTail === false) {\n        for (const { mouseTail } of Object.values(this.pointers)) {\n          if (mouseTail) {\n            mouseTail.style.display = \"none\";\n          }\n        }\n      } else {\n        for (let { mouseTail } of Object.values(this.pointers)) {\n          if (!mouseTail) {\n            mouseTail = document.createElement(\"canvas\");\n            mouseTail.width = Number.parseFloat(this.iframe.width);\n            mouseTail.height = Number.parseFloat(this.iframe.height);\n            mouseTail.classList.add(\"replayer-mouse-tail\");\n            this.wrapper.insertBefore(mouseTail, this.iframe);\n          }\n          mouseTail.style.display = \"inherit\";\n        }\n      }\n    }\n  }\n  getMetaData() {\n    const firstEvent = this.service.state.context.events[0];\n    const lastEvent = this.service.state.context.events[this.service.state.context.events.length - 1];\n    return {\n      startTime: firstEvent.timestamp,\n      endTime: lastEvent.timestamp,\n      totalTime: lastEvent.timestamp - firstEvent.timestamp\n    };\n  }\n  getCurrentTime() {\n    return this.timer.timeOffset + this.getTimeOffset();\n  }\n  getTimeOffset() {\n    const { baselineTime, events } = this.service.state.context;\n    return baselineTime - events[0].timestamp;\n  }\n  getMirror() {\n    return this.mirror;\n  }\n  /**\n   * This API was designed to be used as play at any time offset.\n   * Since we minimized the data collected from recorder, we do not\n   * have the ability of undo an event.\n   * So the implementation of play at any time offset will always iterate\n   * all of the events, cast event before the offset synchronously\n   * and cast event after the offset asynchronously with timer.\n   * @param timeOffset - number\n   */\n  play(timeOffset = 0) {\n    if (this.config.skipInactive && this.speedService.state.matches(\"skipping\")) {\n      this.backToNormal();\n    }\n    if (this.service.state.matches(\"paused\")) {\n      this.service.send({ type: \"PLAY\", payload: { timeOffset } });\n    } else {\n      this.service.send({ type: \"PAUSE\" });\n      this.service.send({ type: \"PLAY\", payload: { timeOffset } });\n    }\n    const iframeDoc = getIFrameContentDocument(this.iframe);\n    iframeDoc?.getElementsByTagName(\"html\")[0]?.classList.remove(\"rrweb-paused\");\n    this.emitter.emit(ReplayerEvents.Start);\n    if (this.config.skipInactive) {\n      this.reevaluateFastForward();\n    }\n  }\n  pause(timeOffset) {\n    if (timeOffset === void 0 && this.service.state.matches(\"playing\")) {\n      this.service.send({ type: \"PAUSE\" });\n    }\n    if (typeof timeOffset === \"number\") {\n      this.play(timeOffset);\n      this.service.send({ type: \"PAUSE\" });\n    }\n    const iframeDoc = getIFrameContentDocument(this.iframe);\n    iframeDoc?.getElementsByTagName(\"html\")[0]?.classList.add(\"rrweb-paused\");\n    this.emitter.emit(ReplayerEvents.Pause);\n  }\n  resume(timeOffset = 0) {\n    this.warn(\n      `The 'resume' was deprecated in 1.0. Please use 'play' method which has the same interface.`\n    );\n    this.play(timeOffset);\n    this.emitter.emit(ReplayerEvents.Resume);\n  }\n  /**\n   * Totally destroy this replayer and please be careful that this operation is irreversible.\n   * Memory occupation can be released by removing all references to this replayer.\n   */\n  destroy() {\n    this.pause();\n    this.config.root.removeChild(this.wrapper);\n    this.emitter.emit(ReplayerEvents.Destroy);\n  }\n  startLive(baselineTime) {\n    this.service.send({ type: \"TO_LIVE\", payload: { baselineTime } });\n  }\n  addEvent(rawEvent) {\n    const event = this.config.unpackFn ? this.config.unpackFn(rawEvent) : rawEvent;\n    void Promise.resolve().then(\n      () => this.service.send({ type: \"ADD_EVENT\", payload: { event } })\n    );\n  }\n  enableInteract() {\n    this.iframe.setAttribute(\"scrolling\", \"auto\");\n    this.iframe.style.pointerEvents = \"auto\";\n  }\n  disableInteract() {\n    this.iframe.setAttribute(\"scrolling\", \"no\");\n    this.iframe.style.pointerEvents = \"none\";\n  }\n  /**\n   * Empties the replayer's cache and reclaims memory.\n   * The replayer will use this cache to speed up the playback.\n   */\n  resetCache() {\n    this.cache = createCache();\n  }\n  reevaluateFastForward() {\n    if (!this.config.skipInactive) {\n      return;\n    }\n    this.nextUserInteractionEvent = null;\n    const events = this.service.state.context.events;\n    const firstEvent = events[0];\n    if (!firstEvent) {\n      return;\n    }\n    const currentEventTime = firstEvent.timestamp + this.getCurrentTime();\n    const currentEventIndex = getEventIndex(events, currentEventTime);\n    if (currentEventIndex === -1) {\n      return;\n    }\n    const currentEvent = events[currentEventIndex];\n    const threshold = this.config.inactivePeriodThreshold * this.speedService.state.context.timer.speed;\n    for (let i2 = currentEventIndex + 1; i2 < events.length; i2++) {\n      const event = events[i2];\n      if (this.isUserInteraction(event)) {\n        const gapTime = event.timestamp - currentEvent.timestamp;\n        if (gapTime > threshold) {\n          this.nextUserInteractionEvent = event;\n          const payload = {\n            speed: Math.min(\n              Math.round(gapTime / SKIP_TIME_INTERVAL),\n              this.config.maxSpeed\n            )\n          };\n          this.speedService.send({ type: \"FAST_FORWARD\", payload });\n          this.emitter.emit(ReplayerEvents.SkipStart, payload);\n        }\n        break;\n      }\n    }\n  }\n  setupDom() {\n    this.wrapper = document.createElement(\"div\");\n    this.wrapper.classList.add(\"replayer-wrapper\");\n    this.config.root.appendChild(this.wrapper);\n    this.iframe = document.createElement(\"iframe\");\n    const attributes2 = [\"allow-same-origin\"];\n    if (this.config.UNSAFE_replayCanvas) {\n      attributes2.push(\"allow-scripts\");\n    }\n    this.iframe.style.display = \"none\";\n    this.iframe.setAttribute(\"sandbox\", attributes2.join(\" \"));\n    this.disableInteract();\n    this.wrapper.appendChild(this.iframe);\n    const iframeDoc = getIFrameContentDocument(this.iframe);\n    const iframeWindow = getIFrameContentWindow(this.iframe);\n    if (iframeWindow && iframeDoc) {\n      polyfill(iframeWindow, iframeDoc);\n      polyfill$1(iframeWindow);\n    }\n  }\n  rebuildFullSnapshot(event, isSync = false) {\n    const iframeDoc = getIFrameContentDocument(this.iframe);\n    if (!iframeDoc) {\n      return this.warn(\"Looks like your replayer has been destroyed.\");\n    }\n    if (Object.keys(this.legacy_missingNodeRetryMap).length) {\n      this.warn(\n        \"Found unresolved missing node map\",\n        this.legacy_missingNodeRetryMap\n      );\n    }\n    this.legacy_missingNodeRetryMap = {};\n    const collected = [];\n    const afterAppend = (builtNode, id) => {\n      this.collectIframeAndAttachDocument(collected, builtNode);\n      for (const plugin of this.config.plugins || []) {\n        if (plugin.onBuild)\n          plugin.onBuild(builtNode, {\n            id,\n            replayer: this\n          });\n      }\n    };\n    if (this.usingVirtualDom) {\n      this.virtualDom.destroyTree();\n      this.usingVirtualDom = false;\n    }\n    this.mirror.reset();\n    rebuild(event.data.node, {\n      doc: iframeDoc,\n      afterAppend,\n      cache: this.cache,\n      mirror: this.mirror\n    });\n    afterAppend(iframeDoc, event.data.node.id);\n    for (const { mutationInQueue, builtNode } of collected) {\n      this.attachDocumentToIframe(mutationInQueue, builtNode);\n      this.newDocumentQueue = this.newDocumentQueue.filter(\n        (m) => m !== mutationInQueue\n      );\n    }\n    const { documentElement, head } = iframeDoc;\n    this.insertStyleRules(documentElement, head);\n    if (!this.service.state.matches(\"playing\")) {\n      const iframeHtmlElement = iframeDoc.getElementsByTagName(\"html\")[0];\n      iframeHtmlElement && iframeHtmlElement.classList.add(\"rrweb-paused\");\n    }\n    this.emitter.emit(ReplayerEvents.FullsnapshotRebuilded, event);\n    if (!isSync) {\n      this.waitForStylesheetLoad();\n    }\n    if (this.config.UNSAFE_replayCanvas) {\n      void this.preloadAllImages();\n    }\n  }\n  insertStyleRules(documentElement, head) {\n    const injectStylesRules = rules(\n      this.config.blockClass\n    ).concat(this.config.insertStyleRules);\n    if (this.config.pauseAnimation) {\n      injectStylesRules.push(\n        \"html.rrweb-paused *, html.rrweb-paused *:before, html.rrweb-paused *:after { animation-play-state: paused !important; }\"\n      );\n    }\n    if (this.usingVirtualDom) {\n      const styleEl = this.virtualDom.createElement(\"style\");\n      this.virtualDom.mirror.add(\n        styleEl,\n        getDefaultSN(styleEl, this.virtualDom.unserializedId)\n      );\n      documentElement.insertBefore(styleEl, head);\n      styleEl.rules.push({\n        source: IncrementalSource.StyleSheetRule,\n        adds: injectStylesRules.map((cssText, index) => ({\n          rule: cssText,\n          index\n        }))\n      });\n    } else {\n      const styleEl = document.createElement(\"style\");\n      documentElement.insertBefore(\n        styleEl,\n        head\n      );\n      for (let idx = 0; idx < injectStylesRules.length; idx++) {\n        styleEl.sheet?.insertRule(injectStylesRules[idx], idx);\n      }\n    }\n  }\n  attachDocumentToIframe(mutation, iframeEl) {\n    const mirror2 = this.usingVirtualDom ? this.virtualDom.mirror : this.mirror;\n    const iframeContentDoc = getIFrameContentDocument(\n      iframeEl\n    );\n    const collected = [];\n    const afterAppend = (builtNode, id) => {\n      this.collectIframeAndAttachDocument(collected, builtNode);\n      const sn = mirror2.getMeta(builtNode);\n      if (sn?.type === NodeType$2.Element && sn?.tagName.toUpperCase() === \"HTML\" && iframeContentDoc) {\n        const { documentElement, head } = iframeContentDoc;\n        this.insertStyleRules(\n          documentElement,\n          head\n        );\n      }\n      if (this.usingVirtualDom) return;\n      for (const plugin of this.config.plugins || []) {\n        if (plugin.onBuild)\n          plugin.onBuild(builtNode, {\n            id,\n            replayer: this\n          });\n      }\n    };\n    buildNodeWithSN(mutation.node, {\n      doc: iframeContentDoc,\n      mirror: mirror2,\n      hackCss: true,\n      skipChild: false,\n      afterAppend,\n      cache: this.cache\n    });\n    afterAppend(iframeContentDoc, mutation.node.id);\n    for (const { mutationInQueue, builtNode } of collected) {\n      this.attachDocumentToIframe(mutationInQueue, builtNode);\n      this.newDocumentQueue = this.newDocumentQueue.filter(\n        (m) => m !== mutationInQueue\n      );\n    }\n  }\n  collectIframeAndAttachDocument(collected, builtNode) {\n    if (isSerializedIframe(builtNode, this.mirror)) {\n      const mutationInQueue = this.newDocumentQueue.find(\n        (m) => m.parentId === this.mirror.getId(builtNode)\n      );\n      if (mutationInQueue) {\n        collected.push({\n          mutationInQueue,\n          builtNode\n        });\n      }\n    }\n  }\n  /**\n   * pause when loading style sheet, resume when loaded all timeout exceed\n   */\n  waitForStylesheetLoad() {\n    const iframeDoc = getIFrameContentDocument(this.iframe);\n    const head = iframeDoc?.head;\n    if (head) {\n      const unloadSheets = /* @__PURE__ */ new Set();\n      let timer;\n      let beforeLoadState = this.service.state;\n      const stateHandler = () => {\n        beforeLoadState = this.service.state;\n      };\n      this.emitter.on(ReplayerEvents.Start, stateHandler);\n      this.emitter.on(ReplayerEvents.Pause, stateHandler);\n      const unsubscribe = () => {\n        this.emitter.off(ReplayerEvents.Start, stateHandler);\n        this.emitter.off(ReplayerEvents.Pause, stateHandler);\n      };\n      head.querySelectorAll('link[rel=\"stylesheet\"]').forEach((css) => {\n        if (!css.sheet) {\n          unloadSheets.add(css);\n          css.addEventListener(\"load\", () => {\n            unloadSheets.delete(css);\n            if (unloadSheets.size === 0 && timer !== -1) {\n              if (beforeLoadState.matches(\"playing\")) {\n                this.play(this.getCurrentTime());\n              }\n              this.emitter.emit(ReplayerEvents.LoadStylesheetEnd);\n              if (timer) {\n                clearTimeout(timer);\n              }\n              unsubscribe();\n            }\n          });\n        }\n      });\n      if (unloadSheets.size > 0) {\n        this.service.send({ type: \"PAUSE\" });\n        this.emitter.emit(ReplayerEvents.LoadStylesheetStart);\n        timer = setTimeout$1(() => {\n          if (beforeLoadState.matches(\"playing\")) {\n            this.play(this.getCurrentTime());\n          }\n          timer = -1;\n          unsubscribe();\n        }, this.config.loadTimeout);\n      }\n    }\n  }\n  /**\n   * pause when there are some canvas drawImage args need to be loaded\n   */\n  async preloadAllImages() {\n    const promises = [];\n    for (const event of this.service.state.context.events) {\n      if (event.type === EventType.IncrementalSnapshot && event.data.source === IncrementalSource.CanvasMutation) {\n        promises.push(\n          this.deserializeAndPreloadCanvasEvents(event.data, event)\n        );\n        const commands = \"commands\" in event.data ? event.data.commands : [event.data];\n        commands.forEach((c2) => {\n          this.preloadImages(c2, event);\n        });\n      }\n    }\n    return Promise.all(promises);\n  }\n  preloadImages(data, event) {\n    if (data.property === \"drawImage\" && typeof data.args[0] === \"string\" && !this.imageMap.has(event)) {\n      const canvas = document.createElement(\"canvas\");\n      const ctx = canvas.getContext(\"2d\");\n      const imgd = ctx?.createImageData(canvas.width, canvas.height);\n      ctx?.putImageData(imgd, 0, 0);\n    }\n  }\n  async deserializeAndPreloadCanvasEvents(data, event) {\n    if (!this.canvasEventMap.has(event)) {\n      const status = {\n        isUnchanged: true\n      };\n      if (\"commands\" in data) {\n        const commands = await Promise.all(\n          data.commands.map(async (c2) => {\n            const args = await Promise.all(\n              c2.args.map(deserializeArg(this.imageMap, null, status))\n            );\n            return { ...c2, args };\n          })\n        );\n        if (status.isUnchanged === false)\n          this.canvasEventMap.set(event, { ...data, commands });\n      } else {\n        const args = await Promise.all(\n          data.args.map(deserializeArg(this.imageMap, null, status))\n        );\n        if (status.isUnchanged === false)\n          this.canvasEventMap.set(event, { ...data, args });\n      }\n    }\n  }\n  applyIncremental(e2, isSync) {\n    const { data: d } = e2;\n    switch (d.source) {\n      case IncrementalSource.Mutation: {\n        try {\n          this.applyMutation(d, isSync);\n        } catch (error) {\n          this.warn(`Exception in mutation ${error.message || error}`, d);\n        }\n        break;\n      }\n      case IncrementalSource.Drag:\n      case IncrementalSource.TouchMove:\n      case IncrementalSource.MouseMove: {\n        const pointerId = getPointerId(d);\n        if (!this.pointers[pointerId]) {\n          this.createPointer(pointerId, e2);\n        }\n        const pointer = this.pointers[pointerId];\n        if (isSync) {\n          const lastPosition = d.positions[d.positions.length - 1];\n          pointer.pointerPosition = {\n            x: lastPosition.x,\n            y: lastPosition.y,\n            id: lastPosition.id,\n            debugData: d\n          };\n        } else {\n          d.positions.forEach((p) => {\n            const action = {\n              doAction: () => {\n                this.moveAndHover(p.x, p.y, p.id, isSync, d, pointerId);\n              },\n              delay: p.timeOffset + e2.timestamp - this.service.state.context.baselineTime\n            };\n            this.timer.addAction(action);\n          });\n          this.timer.addAction({\n            doAction() {\n            },\n            // eslint-disable-next-line @typescript-eslint/no-non-null-assertion\n            delay: e2.delay - d.positions[0]?.timeOffset\n          });\n        }\n        break;\n      }\n      case IncrementalSource.MouseInteraction: {\n        const pointerId = getPointerId(d);\n        if (!this.pointers[pointerId]) {\n          this.createPointer(pointerId, e2);\n        }\n        const pointer = this.pointers[pointerId];\n        if (d.id === -1) {\n          break;\n        }\n        const event = new Event(toLowerCase(MouseInteractions[d.type]));\n        const target = this.mirror.getNode(d.id);\n        if (!target) {\n          return this.debugNodeNotFound(d, d.id);\n        }\n        this.emitter.emit(ReplayerEvents.MouseInteraction, {\n          type: d.type,\n          target\n        });\n        const { triggerFocus } = this.config;\n        switch (d.type) {\n          case MouseInteractions.Blur:\n            if (\"blur\" in target) {\n              target.blur();\n            }\n            break;\n          case MouseInteractions.Focus:\n            if (triggerFocus && target.focus) {\n              target.focus({\n                preventScroll: true\n              });\n            }\n            break;\n          case MouseInteractions.Click:\n          case MouseInteractions.TouchStart:\n          case MouseInteractions.TouchEnd:\n          case MouseInteractions.MouseDown:\n          case MouseInteractions.MouseUp:\n            if (isSync) {\n              if (d.type === MouseInteractions.TouchStart) {\n                pointer.touchActive = true;\n                Object.values(this.pointers).forEach((p) => {\n                  if (p !== pointer && !p.touchActive) {\n                    p.touchActive = false;\n                  }\n                });\n              } else if (d.type === MouseInteractions.TouchEnd) {\n                pointer.touchActive = false;\n                pointer.pointerEl.remove();\n                if (pointer.mouseTail) {\n                  pointer.mouseTail.remove();\n                }\n                delete this.pointers[pointerId];\n              }\n              if (d.type === MouseInteractions.MouseDown) {\n                this.lastMouseDownEvent = [target, event];\n              } else if (d.type === MouseInteractions.MouseUp) {\n                this.lastMouseDownEvent = null;\n              }\n              pointer.pointerPosition = {\n                x: d.x || 0,\n                y: d.y || 0,\n                id: d.id,\n                debugData: d\n              };\n            } else {\n              if (d.type === MouseInteractions.TouchStart) {\n                pointer.tailPositions.length = 0;\n              }\n              this.moveAndHover(d.x || 0, d.y || 0, d.id, isSync, d, pointerId);\n              if (d.type === MouseInteractions.Click) {\n                pointer.pointerEl.classList.remove(\"active\");\n                void pointer.pointerEl.offsetWidth;\n                pointer.pointerEl.classList.add(\"active\");\n              } else if (d.type === MouseInteractions.TouchStart) {\n                void pointer.pointerEl.offsetWidth;\n                pointer.pointerEl.classList.add(\"touch-active\");\n              } else if (d.type === MouseInteractions.TouchEnd) {\n                pointer.pointerEl.remove();\n                if (pointer.mouseTail) {\n                  pointer.mouseTail.remove();\n                }\n                delete this.pointers[pointerId];\n              } else {\n                target.dispatchEvent(event);\n              }\n            }\n            break;\n          case MouseInteractions.TouchCancel:\n            if (isSync) {\n              pointer.touchActive = false;\n            } else {\n              pointer.pointerEl.classList.remove(\"touch-active\");\n            }\n            break;\n          default:\n            target.dispatchEvent(event);\n        }\n        break;\n      }\n      case IncrementalSource.Scroll: {\n        if (d.id === -1) {\n          break;\n        }\n        if (this.usingVirtualDom) {\n          const target = this.virtualDom.mirror.getNode(d.id);\n          if (!target) {\n            return this.debugNodeNotFound(d, d.id);\n          }\n          target.scrollData = d;\n          break;\n        }\n        this.applyScroll(d, isSync);\n        break;\n      }\n      case IncrementalSource.ViewportResize:\n        this.emitter.emit(ReplayerEvents.Resize, {\n          width: d.width,\n          height: d.height\n        });\n        break;\n      case IncrementalSource.Input: {\n        if (d.id === -1) {\n          break;\n        }\n        if (this.usingVirtualDom) {\n          const target = this.virtualDom.mirror.getNode(d.id);\n          if (!target) {\n            return this.debugNodeNotFound(d, d.id);\n          }\n          target.inputData = d;\n          break;\n        }\n        this.applyInput(d);\n        break;\n      }\n      case IncrementalSource.MediaInteraction: {\n        const target = this.usingVirtualDom ? this.virtualDom.mirror.getNode(d.id) : this.mirror.getNode(d.id);\n        if (!target) {\n          return this.debugNodeNotFound(d, d.id);\n        }\n        const mediaEl = target;\n        try {\n          if (d.currentTime !== void 0) {\n            mediaEl.currentTime = d.currentTime;\n          }\n          if (d.volume !== void 0) {\n            mediaEl.volume = d.volume;\n          }\n          if (d.muted !== void 0) {\n            mediaEl.muted = d.muted;\n          }\n          if (d.type === MediaInteractions.Pause) {\n            mediaEl.pause();\n          }\n          if (d.type === MediaInteractions.Play) {\n            const maybePlayPromise = mediaEl.play();\n            if (typeof maybePlayPromise?.catch === \"function\") {\n              maybePlayPromise.catch((err) => {\n                console.warn(err);\n              });\n            }\n          }\n          if (d.type === MediaInteractions.RateChange) {\n            mediaEl.playbackRate = d.playbackRate;\n          }\n        } catch (error) {\n          this.warn(\n            // eslint-disable-next-line @typescript-eslint/no-unsafe-member-access, @typescript-eslint/restrict-template-expressions\n            `Failed to replay media interactions: ${error.message || error}`\n          );\n        }\n        break;\n      }\n      case IncrementalSource.StyleSheetRule:\n      case IncrementalSource.StyleDeclaration: {\n        if (this.usingVirtualDom) {\n          if (d.styleId) this.constructedStyleMutations.push(d);\n          else if (d.id)\n            this.virtualDom.mirror.getNode(d.id)?.rules?.push(d);\n        } else this.applyStyleSheetMutation(d);\n        break;\n      }\n      case IncrementalSource.CanvasMutation: {\n        if (!this.config.UNSAFE_replayCanvas) {\n          return;\n        }\n        if (this.usingVirtualDom) {\n          const target = this.virtualDom.mirror.getNode(\n            d.id\n          );\n          if (!target) {\n            return this.debugNodeNotFound(d, d.id);\n          }\n          target.canvasMutations.push({\n            event: e2,\n            mutation: d\n          });\n        } else {\n          const target = this.mirror.getNode(d.id);\n          if (!target) {\n            return this.debugNodeNotFound(d, d.id);\n          }\n          void canvasMutation({\n            event: e2,\n            mutation: d,\n            target,\n            imageMap: this.imageMap,\n            canvasEventMap: this.canvasEventMap,\n            errorHandler: this.warnCanvasMutationFailed.bind(this)\n          });\n        }\n        break;\n      }\n      case IncrementalSource.Font: {\n        try {\n          const fontFace = new FontFace(\n            d.family,\n            d.buffer ? new Uint8Array(JSON.parse(d.fontSource)) : d.fontSource,\n            d.descriptors\n          );\n          getIFrameContentDocument(this.iframe)?.fonts.add(fontFace);\n        } catch (error) {\n          this.warn(error);\n        }\n        break;\n      }\n      case IncrementalSource.Selection: {\n        if (isSync) {\n          this.lastSelectionData = d;\n          break;\n        }\n        this.applySelection(d);\n        break;\n      }\n      case IncrementalSource.AdoptedStyleSheet: {\n        if (this.usingVirtualDom) this.adoptedStyleSheets.push(d);\n        else this.applyAdoptedStyleSheet(d);\n        break;\n      }\n    }\n  }\n  applyMutation(d, isSync) {\n    if (this.config.useVirtualDom && !this.usingVirtualDom && isSync) {\n      this.usingVirtualDom = true;\n      const iframeDoc = getIFrameContentDocument(this.iframe);\n      if (iframeDoc) {\n        buildFromDom(iframeDoc, this.mirror, this.virtualDom);\n      }\n      if (Object.keys(this.legacy_missingNodeRetryMap).length) {\n        for (const key in this.legacy_missingNodeRetryMap) {\n          try {\n            const value = this.legacy_missingNodeRetryMap[key];\n            const virtualNode = buildFromNode(\n              value.node,\n              this.virtualDom,\n              this.mirror\n            );\n            if (virtualNode) value.node = virtualNode;\n          } catch (error) {\n            this.warn(error);\n          }\n        }\n      }\n    }\n    const mirror2 = this.usingVirtualDom ? this.virtualDom.mirror : this.mirror;\n    d.removes = d.removes.filter((mutation) => {\n      if (!mirror2.getNode(mutation.id)) {\n        this.warnNodeNotFound(d, mutation.id);\n        return false;\n      }\n      return true;\n    });\n    d.removes.forEach((mutation) => {\n      const target = mirror2.getNode(mutation.id);\n      if (!target) {\n        return;\n      }\n      let parent = mirror2.getNode(\n        mutation.parentId\n      );\n      if (!parent) {\n        return this.warnNodeNotFound(d, mutation.parentId);\n      }\n      if (mutation.isShadow && hasShadowRoot(parent)) {\n        parent = parent.shadowRoot;\n      }\n      mirror2.removeNodeFromMap(target);\n      if (parent)\n        try {\n          parent.removeChild(target);\n          if (this.usingVirtualDom && target.nodeName === \"#text\" && parent.nodeName === \"STYLE\" && parent.rules?.length > 0)\n            parent.rules = [];\n        } catch (error) {\n          if (error instanceof DOMException) {\n            this.warn(\n              \"parent could not remove child in mutation\",\n              parent,\n              target,\n              d\n            );\n          } else {\n            throw error;\n          }\n        }\n    });\n    const legacy_missingNodeMap = {\n      ...this.legacy_missingNodeRetryMap\n    };\n    const queue = [];\n    const nextNotInDOM = (mutation) => {\n      let next = null;\n      if (mutation.nextId) {\n        next = mirror2.getNode(mutation.nextId);\n      }\n      if (mutation.nextId !== null && mutation.nextId !== void 0 && mutation.nextId !== -1 && !next) {\n        return true;\n      }\n      return false;\n    };\n    const appendNode = (mutation) => {\n      const iframeDoc = getIFrameContentDocument(this.iframe);\n      if (!iframeDoc) {\n        return this.warn(\"Looks like your replayer has been destroyed.\");\n      }\n      let parent = mirror2.getNode(\n        mutation.parentId\n      );\n      if (!parent) {\n        if (mutation.node.type === NodeType$2.Document) {\n          return this.newDocumentQueue.push(mutation);\n        }\n        return queue.push(mutation);\n      }\n      if (mutation.node.isShadow) {\n        if (!hasShadowRoot(parent)) {\n          parent.attachShadow({ mode: \"open\" });\n          parent = parent.shadowRoot;\n        } else parent = parent.shadowRoot;\n      }\n      let previous = null;\n      let next = null;\n      if (mutation.previousId) {\n        previous = mirror2.getNode(mutation.previousId);\n      }\n      if (mutation.nextId) {\n        next = mirror2.getNode(mutation.nextId);\n      }\n      if (nextNotInDOM(mutation)) {\n        return queue.push(mutation);\n      }\n      if (mutation.node.rootId && !mirror2.getNode(mutation.node.rootId)) {\n        return;\n      }\n      const targetDoc = mutation.node.rootId ? mirror2.getNode(mutation.node.rootId) : this.usingVirtualDom ? this.virtualDom : iframeDoc;\n      if (isSerializedIframe(parent, mirror2)) {\n        this.attachDocumentToIframe(\n          mutation,\n          parent\n        );\n        return;\n      }\n      const afterAppend = (node, id) => {\n        if (this.usingVirtualDom) return;\n        for (const plugin of this.config.plugins || []) {\n          if (plugin.onBuild) plugin.onBuild(node, { id, replayer: this });\n        }\n      };\n      const target = buildNodeWithSN(mutation.node, {\n        doc: targetDoc,\n        // can be Document or RRDocument\n        mirror: mirror2,\n        // can be this.mirror or virtualDom.mirror\n        skipChild: true,\n        hackCss: true,\n        cache: this.cache,\n        /**\n         * caveat: `afterAppend` only gets called on child nodes of target\n         * we have to call it again below when this target was added to the DOM\n         */\n        afterAppend\n      });\n      if (mutation.previousId === -1 || mutation.nextId === -1) {\n        legacy_missingNodeMap[mutation.node.id] = {\n          node: target,\n          mutation\n        };\n        return;\n      }\n      const parentSn = mirror2.getMeta(parent);\n      if (parentSn && parentSn.type === NodeType$2.Element && parentSn.tagName === \"textarea\" && mutation.node.type === NodeType$2.Text) {\n        const childNodeArray = Array.isArray(parent.childNodes) ? parent.childNodes : Array.from(parent.childNodes);\n        for (const c2 of childNodeArray) {\n          if (c2.nodeType === parent.TEXT_NODE) {\n            parent.removeChild(c2);\n          }\n        }\n      } else if (parentSn?.type === NodeType$2.Document) {\n        const parentDoc = parent;\n        if (mutation.node.type === NodeType$2.DocumentType && parentDoc.childNodes[0]?.nodeType === Node.DOCUMENT_TYPE_NODE)\n          parentDoc.removeChild(parentDoc.childNodes[0]);\n        if (target.nodeName === \"HTML\" && parentDoc.documentElement)\n          parentDoc.removeChild(\n            parentDoc.documentElement\n          );\n      }\n      if (previous && previous.nextSibling && previous.nextSibling.parentNode) {\n        parent.insertBefore(\n          target,\n          previous.nextSibling\n        );\n      } else if (next && next.parentNode) {\n        parent.contains(next) ? parent.insertBefore(target, next) : parent.insertBefore(target, null);\n      } else {\n        parent.appendChild(target);\n      }\n      afterAppend(target, mutation.node.id);\n      if (this.usingVirtualDom && target.nodeName === \"#text\" && parent.nodeName === \"STYLE\" && parent.rules?.length > 0)\n        parent.rules = [];\n      if (isSerializedIframe(target, this.mirror)) {\n        const targetId = this.mirror.getId(target);\n        const mutationInQueue = this.newDocumentQueue.find(\n          (m) => m.parentId === targetId\n        );\n        if (mutationInQueue) {\n          this.attachDocumentToIframe(\n            mutationInQueue,\n            target\n          );\n          this.newDocumentQueue = this.newDocumentQueue.filter(\n            (m) => m !== mutationInQueue\n          );\n        }\n      }\n      if (mutation.previousId || mutation.nextId) {\n        this.legacy_resolveMissingNode(\n          legacy_missingNodeMap,\n          parent,\n          target,\n          mutation\n        );\n      }\n    };\n    d.adds.forEach((mutation) => {\n      appendNode(mutation);\n    });\n    const startTime = Date.now();\n    while (queue.length) {\n      const resolveTrees = queueToResolveTrees(queue);\n      queue.length = 0;\n      if (Date.now() - startTime > 500) {\n        this.warn(\n          \"Timeout in the loop, please check the resolve tree data:\",\n          resolveTrees\n        );\n        break;\n      }\n      for (const tree of resolveTrees) {\n        const parent = mirror2.getNode(tree.value.parentId);\n        if (!parent) {\n          this.debug(\n            \"Drop resolve tree since there is no parent for the root node.\",\n            tree\n          );\n        } else {\n          iterateResolveTree(tree, (mutation) => {\n            appendNode(mutation);\n          });\n        }\n      }\n    }\n    if (Object.keys(legacy_missingNodeMap).length) {\n      Object.assign(this.legacy_missingNodeRetryMap, legacy_missingNodeMap);\n    }\n    uniqueTextMutations(d.texts).forEach((mutation) => {\n      const target = mirror2.getNode(mutation.id);\n      if (!target) {\n        if (d.removes.find((r2) => r2.id === mutation.id)) {\n          return;\n        }\n        return this.warnNodeNotFound(d, mutation.id);\n      }\n      target.textContent = mutation.value;\n      if (this.usingVirtualDom) {\n        const parent = target.parentNode;\n        if (parent?.rules?.length > 0) parent.rules = [];\n      }\n    });\n    d.attributes.forEach((mutation) => {\n      const target = mirror2.getNode(mutation.id);\n      if (!target) {\n        if (d.removes.find((r2) => r2.id === mutation.id)) {\n          return;\n        }\n        return this.warnNodeNotFound(d, mutation.id);\n      }\n      for (const attributeName in mutation.attributes) {\n        if (typeof attributeName === \"string\") {\n          const value = mutation.attributes[attributeName];\n          if (value === null) {\n            target.removeAttribute(attributeName);\n          } else if (typeof value === \"string\") {\n            try {\n              if (attributeName === \"_cssText\" && (target.nodeName === \"LINK\" || target.nodeName === \"STYLE\")) {\n                try {\n                  const newSn = mirror2.getMeta(\n                    target\n                  );\n                  const newNode = buildNodeWithSN(\n                    {\n                      ...newSn,\n                      attributes: {\n                        ...newSn.attributes,\n                        ...mutation.attributes\n                      }\n                    },\n                    {\n                      doc: target.ownerDocument,\n                      // can be Document or RRDocument\n                      mirror: mirror2,\n                      skipChild: true,\n                      hackCss: true,\n                      cache: this.cache\n                    }\n                  );\n                  const siblingNode = target.nextSibling;\n                  const parentNode = target.parentNode;\n                  if (newNode && parentNode) {\n                    parentNode.removeChild(target);\n                    parentNode.insertBefore(\n                      newNode,\n                      siblingNode\n                    );\n                    mirror2.replace(mutation.id, newNode);\n                    break;\n                  }\n                } catch (e2) {\n                }\n              }\n              if (target.nodeType !== 3) {\n                target.setAttribute(\n                  attributeName,\n                  value\n                );\n              }\n            } catch (error) {\n              this.warn(\n                \"An error occurred may due to the checkout feature.\",\n                error\n              );\n            }\n          } else if (attributeName === \"style\") {\n            const styleValues = value;\n            const targetEl = target;\n            for (const s2 in styleValues) {\n              if (styleValues[s2] === false) {\n                targetEl.style.removeProperty(s2);\n              } else if (styleValues[s2] instanceof Array) {\n                const svp = styleValues[s2];\n                targetEl.style.setProperty(s2, svp[0], svp[1]);\n              } else {\n                const svs = styleValues[s2];\n                targetEl.style.setProperty(s2, svs);\n              }\n            }\n          }\n        }\n      }\n    });\n  }\n  /**\n   * Apply the scroll data on real elements.\n   * If the replayer is in sync mode, smooth scroll behavior should be disabled.\n   * @param d - the scroll data\n   * @param isSync - whether the replayer is in sync mode(fast-forward)\n   */\n  applyScroll(d, isSync) {\n    const target = this.mirror.getNode(d.id);\n    if (!target) {\n      return this.debugNodeNotFound(d, d.id);\n    }\n    const sn = this.mirror.getMeta(target);\n    const iframeDoc = getIFrameContentDocument(this.iframe);\n    if (target === iframeDoc) {\n      this.iframe.contentWindow?.scrollTo({\n        top: d.y,\n        left: d.x,\n        behavior: isSync ? \"auto\" : \"smooth\"\n      });\n    } else if (sn?.type === NodeType$2.Document) {\n      target.defaultView?.scrollTo({\n        top: d.y,\n        left: d.x,\n        behavior: isSync ? \"auto\" : \"smooth\"\n      });\n    } else {\n      try {\n        target.scrollTo({\n          top: d.y,\n          left: d.x,\n          behavior: isSync ? \"auto\" : \"smooth\"\n        });\n      } catch (error) {\n      }\n    }\n  }\n  applyInput(d) {\n    const target = this.mirror.getNode(d.id);\n    if (!target) {\n      return this.debugNodeNotFound(d, d.id);\n    }\n    try {\n      target.checked = d.isChecked;\n      target.value = d.text;\n    } catch (error) {\n    }\n  }\n  applySelection(d) {\n    try {\n      const selectionSet = /* @__PURE__ */ new Set();\n      const ranges = d.ranges.map(({ start, startOffset, end, endOffset }) => {\n        const startContainer = this.mirror.getNode(start);\n        const endContainer = this.mirror.getNode(end);\n        if (!startContainer || !endContainer) return;\n        const result = new Range();\n        result.setStart(startContainer, startOffset);\n        result.setEnd(endContainer, endOffset);\n        const doc = startContainer.ownerDocument;\n        const selection = doc?.getSelection();\n        selection && selectionSet.add(selection);\n        return {\n          range: result,\n          selection\n        };\n      });\n      selectionSet.forEach((s2) => s2.removeAllRanges());\n      ranges.forEach((r2) => r2 && r2.selection?.addRange(r2.range));\n    } catch (error) {\n    }\n  }\n  applyStyleSheetMutation(data) {\n    let styleSheet = null;\n    if (data.styleId) styleSheet = this.styleMirror.getStyle(data.styleId);\n    else if (data.id)\n      styleSheet = this.mirror.getNode(data.id)?.sheet || null;\n    if (!styleSheet) return;\n    if (data.source === IncrementalSource.StyleSheetRule)\n      this.applyStyleSheetRule(data, styleSheet);\n    else if (data.source === IncrementalSource.StyleDeclaration)\n      this.applyStyleDeclaration(data, styleSheet);\n  }\n  applyStyleSheetRule(data, styleSheet) {\n    data.adds?.forEach(({ rule, index: nestedIndex }) => {\n      try {\n        if (Array.isArray(nestedIndex)) {\n          const { positions, index } = getPositionsAndIndex(nestedIndex);\n          const nestedRule = getNestedRule(styleSheet.cssRules, positions);\n          nestedRule.insertRule(rule, index);\n        } else {\n          const index = nestedIndex === void 0 ? void 0 : Math.min(nestedIndex, styleSheet.cssRules.length);\n          styleSheet?.insertRule(rule, index);\n        }\n      } catch (e2) {\n      }\n    });\n    data.removes?.forEach(({ index: nestedIndex }) => {\n      try {\n        if (Array.isArray(nestedIndex)) {\n          const { positions, index } = getPositionsAndIndex(nestedIndex);\n          const nestedRule = getNestedRule(styleSheet.cssRules, positions);\n          nestedRule.deleteRule(index || 0);\n        } else {\n          styleSheet?.deleteRule(nestedIndex);\n        }\n      } catch (e2) {\n      }\n    });\n    if (data.replace)\n      try {\n        void styleSheet.replace?.(data.replace);\n      } catch (e2) {\n      }\n    if (data.replaceSync)\n      try {\n        styleSheet.replaceSync?.(data.replaceSync);\n      } catch (e2) {\n      }\n  }\n  applyStyleDeclaration(data, styleSheet) {\n    if (data.set) {\n      const rule = getNestedRule(\n        styleSheet.rules,\n        data.index\n      );\n      rule && rule.style && rule.style.setProperty(\n        data.set.property,\n        data.set.value,\n        data.set.priority\n      );\n    }\n    if (data.remove) {\n      const rule = getNestedRule(\n        styleSheet.rules,\n        data.index\n      );\n      rule && rule.style && rule.style.removeProperty(data.remove.property);\n    }\n  }\n  applyAdoptedStyleSheet(data) {\n    const targetHost = this.mirror.getNode(data.id);\n    if (!targetHost) return;\n    data.styles?.forEach((style) => {\n      let newStyleSheet = null;\n      let hostWindow = null;\n      if (hasShadowRoot(targetHost))\n        hostWindow = targetHost.ownerDocument?.defaultView || null;\n      else if (targetHost.nodeName === \"#document\")\n        hostWindow = targetHost.defaultView;\n      if (!hostWindow) return;\n      try {\n        newStyleSheet = new hostWindow.CSSStyleSheet();\n        this.styleMirror.add(newStyleSheet, style.styleId);\n        this.applyStyleSheetRule(\n          {\n            source: IncrementalSource.StyleSheetRule,\n            adds: style.rules\n          },\n          newStyleSheet\n        );\n      } catch (e2) {\n      }\n    });\n    const MAX_RETRY_TIME = 10;\n    let count = 0;\n    const adoptStyleSheets = (targetHost2, styleIds) => {\n      const stylesToAdopt = styleIds.map((styleId) => this.styleMirror.getStyle(styleId)).filter((style) => style !== null);\n      if (hasShadowRoot(targetHost2))\n        targetHost2.shadowRoot.adoptedStyleSheets = stylesToAdopt;\n      else if (targetHost2.nodeName === \"#document\")\n        targetHost2.adoptedStyleSheets = stylesToAdopt;\n      if (stylesToAdopt.length !== styleIds.length && count < MAX_RETRY_TIME) {\n        setTimeout$1(\n          () => adoptStyleSheets(targetHost2, styleIds),\n          0 + 100 * count\n        );\n        count++;\n      }\n    };\n    adoptStyleSheets(targetHost, data.styleIds);\n  }\n  legacy_resolveMissingNode(map, parent, target, targetMutation) {\n    const { previousId, nextId } = targetMutation;\n    const previousInMap = previousId && map[previousId];\n    const nextInMap = nextId && map[nextId];\n    if (previousInMap) {\n      const { node, mutation } = previousInMap;\n      parent.insertBefore(node, target);\n      delete map[mutation.node.id];\n      delete this.legacy_missingNodeRetryMap[mutation.node.id];\n      if (mutation.previousId || mutation.nextId) {\n        this.legacy_resolveMissingNode(map, parent, node, mutation);\n      }\n    }\n    if (nextInMap) {\n      const { node, mutation } = nextInMap;\n      parent.insertBefore(\n        node,\n        target.nextSibling\n      );\n      delete map[mutation.node.id];\n      delete this.legacy_missingNodeRetryMap[mutation.node.id];\n      if (mutation.previousId || mutation.nextId) {\n        this.legacy_resolveMissingNode(map, parent, node, mutation);\n      }\n    }\n  }\n  moveAndHover(x, y, id, isSync, debugData, pointerId) {\n    const target = this.mirror.getNode(id);\n    if (!target) {\n      return this.debugNodeNotFound(debugData, id);\n    }\n    const base = getBaseDimension(target, this.iframe);\n    const _x = x * base.absoluteScale + base.x;\n    const _y = y * base.absoluteScale + base.y;\n    const pointer = this.pointers[pointerId];\n    if (pointer && pointer.pointerEl) {\n      pointer.pointerEl.style.left = `${_x}px`;\n      pointer.pointerEl.style.top = `${_y}px`;\n    }\n    if (!isSync) {\n      this.drawMouseTail({ x: _x, y: _y }, pointerId);\n    }\n    this.hoverElements(target);\n  }\n  drawMouseTail(position, pointerId) {\n    const pointer = this.pointers[pointerId];\n    if (!pointer || !pointer.mouseTail) {\n      return;\n    }\n    const { lineCap, lineWidth, strokeStyle, duration } = this.config.mouseTail === true ? defaultMouseTailConfig : Object.assign({}, defaultMouseTailConfig, this.config.mouseTail);\n    const draw = () => {\n      if (!pointer || !pointer.mouseTail) {\n        return;\n      }\n      const mouseTail = pointer.mouseTail;\n      const ctx = mouseTail.getContext(\"2d\");\n      if (!ctx || !pointer.tailPositions.length) {\n        return;\n      }\n      ctx.clearRect(0, 0, mouseTail.width, mouseTail.height);\n      ctx.beginPath();\n      ctx.lineWidth = lineWidth;\n      ctx.lineCap = lineCap;\n      ctx.strokeStyle = strokeStyle;\n      ctx.moveTo(pointer.tailPositions[0].x, pointer.tailPositions[0].y);\n      pointer.tailPositions.forEach((p) => ctx.lineTo(p.x, p.y));\n      ctx.stroke();\n    };\n    pointer.tailPositions.push(position);\n    draw();\n    setTimeout$1(() => {\n      if (pointerId in this.pointers) {\n        pointer.tailPositions = pointer.tailPositions.filter(\n          (p) => p !== position\n        );\n        draw();\n      }\n    }, duration / this.speedService.state.context.timer.speed);\n  }\n  hoverElements(el) {\n    const iframeDoc = getIFrameContentDocument(this.iframe);\n    const rootElement = this.lastHoveredRootNode || iframeDoc;\n    if (rootElement && typeof rootElement.querySelectorAll === \"function\") {\n      rootElement.querySelectorAll(\".\\\\:hover\").forEach((hoveredEl) => {\n        hoveredEl.classList.remove(\":hover\");\n      });\n    }\n    this.lastHoveredRootNode = el.getRootNode();\n    let currentEl = el;\n    while (currentEl) {\n      if (currentEl.classList) {\n        currentEl.classList.add(\":hover\");\n      }\n      currentEl = currentEl.parentElement;\n    }\n  }\n  isUserInteraction(event) {\n    if (event.type !== EventType.IncrementalSnapshot) {\n      return false;\n    }\n    return event.data.source > IncrementalSource.Mutation && event.data.source <= IncrementalSource.Input;\n  }\n  backToNormal() {\n    this.nextUserInteractionEvent = null;\n    if (this.speedService.state.matches(\"normal\")) {\n      return;\n    }\n    this.speedService.send({ type: \"BACK_TO_NORMAL\" });\n    this.emitter.emit(ReplayerEvents.SkipEnd, {\n      speed: this.speedService.state.context.normalSpeed\n    });\n  }\n  warnNodeNotFound(d, id) {\n    this.warn(`Node with id '${id}' not found. `, d);\n  }\n  warnCanvasMutationFailed(d, error) {\n    this.warn(`Has error on canvas update`, error, \"canvas mutation:\", d);\n  }\n  debugNodeNotFound(d, id) {\n    this.debug(`Node with id '${id}' not found. `, d);\n  }\n  warn(...args) {\n    if (!this.config.showWarning) {\n      return;\n    }\n    this.config.logger.warn(REPLAY_CONSOLE_PREFIX, ...args);\n  }\n  debug(...args) {\n    if (!this.config.showDebug) {\n      return;\n    }\n    this.config.logger.log(REPLAY_CONSOLE_PREFIX, ...args);\n  }\n}\nexport {\n  a9 as CanvasManager,\n  EventType,\n  IncrementalSource,\n  MouseInteractions,\n  Replayer,\n  ReplayerEvents,\n  addCustomEvent,\n  canvasMutation,\n  deserializeArg,\n  freezePage,\n  record,\n  takeFullSnapshot,\n  aa as utils\n};\n//# sourceMappingURL=rrweb.js.map\n","import type { Integration, IntegrationFn } from '@sentry/core';\nimport { defineIntegration } from '@sentry/core';\nimport type { CanvasManagerInterface, CanvasManagerOptions } from '@sentry/replay';\nimport { CanvasManager } from '@sentry/rrweb';\n\ninterface SnapshotOptions {\n  skipRequestAnimationFrame?: boolean;\n}\n\ninterface ReplayCanvasIntegration extends Integration {\n  snapshot: (canvasElement?: HTMLCanvasElement, options?: SnapshotOptions) => Promise<void>;\n}\n\ninterface ReplayCanvasOptions {\n  enableManualSnapshot?: boolean;\n  maxCanvasSize?: [width: number, height: number];\n  quality: 'low' | 'medium' | 'high';\n}\n\ntype GetCanvasManager = (options: CanvasManagerOptions) => CanvasManagerInterface;\nexport interface ReplayCanvasIntegrationOptions {\n  enableManualSnapshot?: boolean;\n  maxCanvasSize?: number;\n  recordCanvas: true;\n  getCanvasManager: GetCanvasManager;\n  sampling: {\n    canvas: number;\n  };\n  dataURLOptions: {\n    type: string;\n    quality: number;\n  };\n}\n\nconst CANVAS_QUALITY = {\n  low: {\n    sampling: {\n      canvas: 1,\n    },\n    dataURLOptions: {\n      type: 'image/webp',\n      quality: 0.25,\n    },\n  },\n  medium: {\n    sampling: {\n      canvas: 2,\n    },\n    dataURLOptions: {\n      type: 'image/webp',\n      quality: 0.4,\n    },\n  },\n  high: {\n    sampling: {\n      canvas: 4,\n    },\n    dataURLOptions: {\n      type: 'image/webp',\n      quality: 0.5,\n    },\n  },\n};\n\nconst INTEGRATION_NAME = 'ReplayCanvas';\nconst DEFAULT_MAX_CANVAS_SIZE = 1280;\n\n/** Exported only for type safe tests. */\nexport const _replayCanvasIntegration = ((options: Partial<ReplayCanvasOptions> = {}) => {\n  const [maxCanvasWidth, maxCanvasHeight] = options.maxCanvasSize || [];\n  const _canvasOptions = {\n    quality: options.quality || 'medium',\n    enableManualSnapshot: options.enableManualSnapshot,\n    maxCanvasSize: [\n      maxCanvasWidth ? Math.min(maxCanvasWidth, DEFAULT_MAX_CANVAS_SIZE) : DEFAULT_MAX_CANVAS_SIZE,\n      maxCanvasHeight ? Math.min(maxCanvasHeight, DEFAULT_MAX_CANVAS_SIZE) : DEFAULT_MAX_CANVAS_SIZE,\n    ] as [number, number],\n  };\n\n  let currentCanvasManager: CanvasManager | undefined;\n  let canvasManagerResolve: (value: CanvasManager) => void;\n  const _canvasManager: Promise<CanvasManager> = new Promise(resolve => (canvasManagerResolve = resolve));\n\n  return {\n    name: INTEGRATION_NAME,\n    getOptions(): ReplayCanvasIntegrationOptions {\n      const { quality, enableManualSnapshot, maxCanvasSize } = _canvasOptions;\n\n      return {\n        enableManualSnapshot,\n        recordCanvas: true,\n        getCanvasManager: (getCanvasManagerOptions: CanvasManagerOptions) => {\n          const manager = new CanvasManager({\n            ...getCanvasManagerOptions,\n            enableManualSnapshot,\n            maxCanvasSize,\n            errorHandler: (err: unknown) => {\n              try {\n                if (typeof err === 'object') {\n                  (err as Error & { __rrweb__?: boolean }).__rrweb__ = true;\n                }\n              } catch {\n                // ignore errors here\n                // this can happen if the error is frozen or does not allow mutation for other reasons\n              }\n            },\n          });\n\n          currentCanvasManager = manager;\n\n          // Resolve promise on first call for backward compatibility\n          canvasManagerResolve(manager);\n\n          return manager;\n        },\n        ...(CANVAS_QUALITY[quality || 'medium'] || CANVAS_QUALITY.medium),\n      };\n    },\n    async snapshot(canvasElement?: HTMLCanvasElement, options?: SnapshotOptions) {\n      const canvasManager = currentCanvasManager || (await _canvasManager);\n\n      canvasManager.snapshot(canvasElement, options);\n    },\n  };\n}) satisfies IntegrationFn<ReplayCanvasIntegration>;\n\n/**\n * Add this in addition to `replayIntegration()` to enable canvas recording.\n */\nexport const replayCanvasIntegration = defineIntegration(\n  _replayCanvasIntegration,\n) as IntegrationFn<ReplayCanvasIntegration>;\n","/**\n * Converts a timestamp to ms, if it was in s, or keeps it as ms.\n */\nexport function timestampToMs(timestamp: number): number {\n  const isMs = timestamp > 9999999999;\n  return isMs ? timestamp : timestamp * 1000;\n}\n\n/**\n * Converts a timestamp to s, if it was in ms, or keeps it as s.\n */\nexport function timestampToS(timestamp: number): number {\n  const isMs = timestamp > 9999999999;\n  return isMs ? timestamp / 1000 : timestamp;\n}\n","import type { Breadcrumb } from '@sentry/core';\nimport { normalize } from '@sentry/core';\nimport { EventType } from '@sentry/rrweb';\nimport type { ReplayContainer } from '../../types';\n\n/**\n * Add a breadcrumb event to replay.\n */\nexport function addBreadcrumbEvent(replay: ReplayContainer, breadcrumb: Breadcrumb): void {\n  if (breadcrumb.category === 'sentry.transaction') {\n    return;\n  }\n\n  if (['ui.click', 'ui.input'].includes(breadcrumb.category as string)) {\n    replay.triggerUserActivity();\n  } else {\n    replay.checkAndHandleExpiredSession();\n  }\n\n  replay.addUpdate(() => {\n    // This should never reject\n    // eslint-disable-next-line @typescript-eslint/no-floating-promises\n    replay.throttledAddEvent({\n      type: EventType.Custom,\n      // TODO: We were converting from ms to seconds for breadcrumbs, spans,\n      // but maybe we should just keep them as milliseconds\n      timestamp: (breadcrumb.timestamp || 0) * 1000,\n      data: {\n        tag: 'breadcrumb',\n        // normalize to max. 10 depth and 1_000 properties per object\n        payload: normalize(breadcrumb, 10, 1_000),\n      },\n    });\n\n    // Do not flush after console log messages\n    return breadcrumb.category === 'console';\n  });\n}\n","import type { INode } from '@sentry/rrweb-snapshot';\nimport { isObjectLike } from '@sentry/core';\n\nconst INTERACTIVE_SELECTOR = 'button,a';\n\n/** Get the closest interactive parent element, or else return the given element. */\nexport function getClosestInteractive(element: Element): Element {\n  const closestInteractive = element.closest(INTERACTIVE_SELECTOR);\n  return closestInteractive || element;\n}\n\n/**\n * For clicks, we check if the target is inside of a button or link\n * If so, we use this as the target instead\n * This is useful because if you click on the image in <button><img></button>,\n * The target will be the image, not the button, which we don't want here\n */\nexport function getClickTargetNode(event: Event | MouseEvent | Node): Node | INode | null {\n  const target = getTargetNode(event);\n\n  if (!target || !(target instanceof Element)) {\n    return target;\n  }\n\n  return getClosestInteractive(target);\n}\n\n/** Get the event target node. */\nexport function getTargetNode(event: Node | { target: EventTarget | null }): Node | INode | null {\n  if (isEventWithTarget(event)) {\n    return event.target as Node | null;\n  }\n\n  return event;\n}\n\nfunction isEventWithTarget(event: unknown): event is { target: EventTarget | null } {\n  return isObjectLike(event) && 'target' in event;\n}\n","import { fill } from '@sentry/core';\nimport { WINDOW } from '../../constants';\n\ntype WindowOpenHandler = () => void;\n\nlet handlers: undefined | WindowOpenHandler[];\n\n/**\n * Register a handler to be called when `window.open()` is called.\n * Returns a cleanup function.\n */\nexport function onWindowOpen(cb: WindowOpenHandler): () => void {\n  // Ensure to only register this once\n  if (!handlers) {\n    handlers = [];\n    monkeyPatchWindowOpen();\n  }\n\n  handlers.push(cb);\n\n  return () => {\n    const pos = handlers ? handlers.indexOf(cb) : -1;\n    if (pos > -1) {\n      (handlers as WindowOpenHandler[]).splice(pos, 1);\n    }\n  };\n}\n\nfunction monkeyPatchWindowOpen(): void {\n  fill(WINDOW, 'open', function (originalWindowOpen: () => void): () => void {\n    return function (...args: unknown[]): void {\n      if (handlers) {\n        try {\n          handlers.forEach(handler => handler());\n        } catch {\n          // ignore errors in here\n        }\n      }\n\n      return originalWindowOpen.apply(WINDOW, args);\n    };\n  });\n}\n","import type { Breadcrumb } from '@sentry/core';\nimport { setTimeout } from '@sentry/browser-utils';\nimport { IncrementalSource, MouseInteractions, record } from '@sentry/rrweb';\nimport { WINDOW } from '../constants';\nimport type {\n  RecordingEvent,\n  ReplayClickDetector,\n  ReplayContainer,\n  ReplayMultiClickFrame,\n  ReplaySlowClickFrame,\n  SlowClickConfig,\n} from '../types';\nimport { ReplayEventTypeIncrementalSnapshot } from '../types';\nimport { timestampToS } from '../util/timestamp';\nimport { addBreadcrumbEvent } from './util/addBreadcrumbEvent';\nimport { getClosestInteractive } from './util/domUtils';\nimport { onWindowOpen } from './util/onWindowOpen';\n\ntype ClickBreadcrumb = Breadcrumb & {\n  timestamp: number;\n};\n\ninterface Click {\n  timestamp: number;\n  mutationAfter?: number;\n  scrollAfter?: number;\n  clickBreadcrumb: ClickBreadcrumb;\n  clickCount: number;\n  node: HTMLElement;\n}\n\ntype IncrementalRecordingEvent = RecordingEvent & {\n  type: typeof ReplayEventTypeIncrementalSnapshot;\n  data: { source: IncrementalSource };\n};\n\ntype IncrementalMouseInteractionRecordingEvent = IncrementalRecordingEvent & {\n  type: typeof ReplayEventTypeIncrementalSnapshot;\n  data: { type: MouseInteractions; id: number };\n};\n\n/** Any IncrementalSource for rrweb that we interpret as a kind of mutation. */\nconst IncrementalMutationSources = new Set([\n  IncrementalSource.Mutation,\n  IncrementalSource.StyleSheetRule,\n  IncrementalSource.StyleDeclaration,\n  IncrementalSource.AdoptedStyleSheet,\n  IncrementalSource.CanvasMutation,\n  IncrementalSource.Selection,\n  IncrementalSource.MediaInteraction,\n]);\n\n/** Handle a click. */\nexport function handleClick(clickDetector: ReplayClickDetector, clickBreadcrumb: Breadcrumb, node: HTMLElement): void {\n  clickDetector.handleClick(clickBreadcrumb, node);\n}\n\n/** A click detector class that can be used to detect slow or rage clicks on elements. */\nexport class ClickDetector implements ReplayClickDetector {\n  // protected for testing\n  protected _lastMutation: number;\n  protected _lastScroll: number;\n\n  private _clicks: Click[];\n  private _teardown: undefined | (() => void);\n\n  private _threshold: number;\n  private _scrollTimeout: number;\n  private _timeout: number;\n  private _ignoreSelector: string;\n\n  private _replay: ReplayContainer;\n  private _checkClickTimeout?: ReturnType<typeof setTimeout>;\n  private _addBreadcrumbEvent: typeof addBreadcrumbEvent;\n\n  public constructor(\n    replay: ReplayContainer,\n    slowClickConfig: SlowClickConfig,\n    // Just for easier testing\n    _addBreadcrumbEvent = addBreadcrumbEvent,\n  ) {\n    this._lastMutation = 0;\n    this._lastScroll = 0;\n    this._clicks = [];\n\n    // We want everything in s, but options are in ms\n    this._timeout = slowClickConfig.timeout / 1000;\n    this._threshold = slowClickConfig.threshold / 1000;\n    this._scrollTimeout = slowClickConfig.scrollTimeout / 1000;\n    this._replay = replay;\n    this._ignoreSelector = slowClickConfig.ignoreSelector;\n    this._addBreadcrumbEvent = _addBreadcrumbEvent;\n  }\n\n  /** Register click detection handlers on mutation or scroll. */\n  public addListeners(): void {\n    const cleanupWindowOpen = onWindowOpen(() => {\n      // Treat window.open as mutation\n      this._lastMutation = nowInSeconds();\n    });\n\n    this._teardown = () => {\n      cleanupWindowOpen();\n\n      this._clicks = [];\n      this._lastMutation = 0;\n      this._lastScroll = 0;\n    };\n  }\n\n  /** Clean up listeners. */\n  public removeListeners(): void {\n    if (this._teardown) {\n      this._teardown();\n    }\n\n    if (this._checkClickTimeout) {\n      clearTimeout(this._checkClickTimeout);\n    }\n  }\n\n  /** @inheritDoc */\n  public handleClick(breadcrumb: Breadcrumb, node: HTMLElement): void {\n    if (ignoreElement(node, this._ignoreSelector) || !isClickBreadcrumb(breadcrumb)) {\n      return;\n    }\n\n    const newClick: Click = {\n      timestamp: timestampToS(breadcrumb.timestamp),\n      clickBreadcrumb: breadcrumb,\n      // Set this to 0 so we know it originates from the click breadcrumb\n      clickCount: 0,\n      node,\n    };\n\n    // If there was a click in the last 1s on the same element, ignore it - only keep a single reference per second\n    if (\n      this._clicks.some(click => click.node === newClick.node && Math.abs(click.timestamp - newClick.timestamp) < 1)\n    ) {\n      return;\n    }\n\n    this._clicks.push(newClick);\n\n    // If this is the first new click, set a timeout to check for multi clicks\n    if (this._clicks.length === 1) {\n      this._scheduleCheckClicks();\n    }\n  }\n\n  /** @inheritDoc */\n  public registerMutation(timestamp = Date.now()): void {\n    this._lastMutation = timestampToS(timestamp);\n  }\n\n  /** @inheritDoc */\n  public registerScroll(timestamp = Date.now()): void {\n    this._lastScroll = timestampToS(timestamp);\n  }\n\n  /** @inheritDoc */\n  public registerClick(element: HTMLElement): void {\n    const node = getClosestInteractive(element);\n    this._handleMultiClick(node as HTMLElement);\n  }\n\n  /** Count multiple clicks on elements. */\n  private _handleMultiClick(node: HTMLElement): void {\n    this._getClicks(node).forEach(click => {\n      click.clickCount++;\n    });\n  }\n\n  /** Get all pending clicks for a given node. */\n  private _getClicks(node: HTMLElement): Click[] {\n    return this._clicks.filter(click => click.node === node);\n  }\n\n  /** Check the clicks that happened. */\n  private _checkClicks(): void {\n    const timedOutClicks: Click[] = [];\n\n    const now = nowInSeconds();\n\n    this._clicks.forEach(click => {\n      if (!click.mutationAfter && this._lastMutation) {\n        click.mutationAfter = click.timestamp <= this._lastMutation ? this._lastMutation - click.timestamp : undefined;\n      }\n      if (!click.scrollAfter && this._lastScroll) {\n        click.scrollAfter = click.timestamp <= this._lastScroll ? this._lastScroll - click.timestamp : undefined;\n      }\n\n      // All of these are in seconds!\n      if (click.timestamp + this._timeout <= now) {\n        timedOutClicks.push(click);\n      }\n    });\n\n    // Remove \"old\" clicks\n    for (const click of timedOutClicks) {\n      const pos = this._clicks.indexOf(click);\n\n      if (pos > -1) {\n        this._generateBreadcrumbs(click);\n        this._clicks.splice(pos, 1);\n      }\n    }\n\n    // Trigger new check, unless no clicks left\n    if (this._clicks.length) {\n      this._scheduleCheckClicks();\n    }\n  }\n\n  /** Generate matching breadcrumb(s) for the click. */\n  private _generateBreadcrumbs(click: Click): void {\n    const replay = this._replay;\n    const hadScroll = click.scrollAfter && click.scrollAfter <= this._scrollTimeout;\n    const hadMutation = click.mutationAfter && click.mutationAfter <= this._threshold;\n\n    const isSlowClick = !hadScroll && !hadMutation;\n    const { clickCount, clickBreadcrumb } = click;\n\n    // Slow click\n    if (isSlowClick) {\n      // If `mutationAfter` is set, it means a mutation happened after the threshold, but before the timeout\n      // If not, it means we just timed out without scroll & mutation\n      const timeAfterClickMs = Math.min(click.mutationAfter || this._timeout, this._timeout) * 1000;\n      const endReason = timeAfterClickMs < this._timeout * 1000 ? 'mutation' : 'timeout';\n\n      const breadcrumb: ReplaySlowClickFrame = {\n        type: 'default',\n        message: clickBreadcrumb.message,\n        timestamp: clickBreadcrumb.timestamp,\n        category: 'ui.slowClickDetected',\n        data: {\n          ...clickBreadcrumb.data,\n          url: WINDOW.location.href,\n          route: replay.getCurrentRoute(),\n          timeAfterClickMs,\n          endReason,\n          // If clickCount === 0, it means multiClick was not correctly captured here\n          // - we still want to send 1 in this case\n          clickCount: clickCount || 1,\n        },\n      };\n\n      this._addBreadcrumbEvent(replay, breadcrumb);\n      return;\n    }\n\n    // Multi click\n    if (clickCount > 1) {\n      const breadcrumb: ReplayMultiClickFrame = {\n        type: 'default',\n        message: clickBreadcrumb.message,\n        timestamp: clickBreadcrumb.timestamp,\n        category: 'ui.multiClick',\n        data: {\n          ...clickBreadcrumb.data,\n          url: WINDOW.location.href,\n          route: replay.getCurrentRoute(),\n          clickCount,\n          metric: true,\n        },\n      };\n\n      this._addBreadcrumbEvent(replay, breadcrumb);\n    }\n  }\n\n  /** Schedule to check current clicks. */\n  private _scheduleCheckClicks(): void {\n    if (this._checkClickTimeout) {\n      clearTimeout(this._checkClickTimeout);\n    }\n\n    this._checkClickTimeout = setTimeout(() => this._checkClicks(), 1000);\n  }\n}\n\nconst SLOW_CLICK_TAGS = ['A', 'BUTTON', 'INPUT'];\n\n/** exported for tests only */\nexport function ignoreElement(node: HTMLElement, ignoreSelector: string): boolean {\n  if (!SLOW_CLICK_TAGS.includes(node.tagName)) {\n    return true;\n  }\n\n  // If <input> tag, we only want to consider input[type='submit'] & input[type='button']\n  if (node.tagName === 'INPUT' && !['submit', 'button'].includes(node.getAttribute('type') || '')) {\n    return true;\n  }\n\n  // If <a> tag, detect special variants that may not lead to an action\n  // If target !== _self, we may open the link somewhere else, which would lead to no action\n  // Also, when downloading a file, we may not leave the page, but still not trigger an action\n  if (\n    node.tagName === 'A' &&\n    (node.hasAttribute('download') || (node.hasAttribute('target') && node.getAttribute('target') !== '_self'))\n  ) {\n    return true;\n  }\n\n  if (ignoreSelector && node.matches(ignoreSelector)) {\n    return true;\n  }\n\n  return false;\n}\n\nfunction isClickBreadcrumb(breadcrumb: Breadcrumb): breadcrumb is ClickBreadcrumb {\n  return !!(breadcrumb.data && typeof breadcrumb.data.nodeId === 'number' && breadcrumb.timestamp);\n}\n\n// This is good enough for us, and is easier to test/mock than `timestampInSeconds`\nfunction nowInSeconds(): number {\n  return Date.now() / 1000;\n}\n\n/** Update the click detector based on a recording event of rrweb. */\nexport function updateClickDetectorForRecordingEvent(clickDetector: ReplayClickDetector, event: RecordingEvent): void {\n  try {\n    // note: We only consider incremental snapshots here\n    // This means that any full snapshot is ignored for mutation detection - the reason is that we simply cannot know if a mutation happened here.\n    // E.g. think that we are buffering, an error happens and we take a full snapshot because we switched to session mode -\n    // in this scenario, we would not know if a dead click happened because of the error, which is a key dead click scenario.\n    // Instead, by ignoring full snapshots, we have the risk that we generate a false positive\n    // (if a mutation _did_ happen but was \"swallowed\" by the full snapshot)\n    // But this should be more unlikely as we'd generally capture the incremental snapshot right away\n\n    if (!isIncrementalEvent(event)) {\n      return;\n    }\n\n    const { source } = event.data;\n    if (IncrementalMutationSources.has(source)) {\n      clickDetector.registerMutation(event.timestamp);\n    }\n\n    if (source === IncrementalSource.Scroll) {\n      clickDetector.registerScroll(event.timestamp);\n    }\n\n    if (isIncrementalMouseInteraction(event)) {\n      const { type, id } = event.data;\n      const node = record.mirror.getNode(id);\n\n      if (node instanceof HTMLElement && type === MouseInteractions.Click) {\n        clickDetector.registerClick(node);\n      }\n    }\n  } catch {\n    // ignore errors here, e.g. if accessing something that does not exist\n  }\n}\n\nfunction isIncrementalEvent(event: RecordingEvent): event is IncrementalRecordingEvent {\n  return event.type === ReplayEventTypeIncrementalSnapshot;\n}\n\nfunction isIncrementalMouseInteraction(\n  event: IncrementalRecordingEvent,\n): event is IncrementalMouseInteractionRecordingEvent {\n  return event.data.source === IncrementalSource.MouseInteraction;\n}\n","import type { ReplayBreadcrumbFrame } from '../types/replayFrame';\n\n/**\n * Create a breadcrumb for a replay.\n */\nexport function createBreadcrumb(\n  breadcrumb: Omit<ReplayBreadcrumbFrame, 'timestamp' | 'type'> & Partial<Pick<ReplayBreadcrumbFrame, 'timestamp'>>,\n): ReplayBreadcrumbFrame {\n  return {\n    timestamp: Date.now() / 1000,\n    type: 'default',\n    ...breadcrumb,\n  };\n}\n","var __defProp = Object.defineProperty;\nvar __defNormalProp = (obj, key, value) => key in obj ? __defProp(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;\nvar __publicField = (obj, key, value) => __defNormalProp(obj, typeof key !== \"symbol\" ? key + \"\" : key, value);\nvar NodeType = /* @__PURE__ */ ((NodeType2) => {\n  NodeType2[NodeType2[\"Document\"] = 0] = \"Document\";\n  NodeType2[NodeType2[\"DocumentType\"] = 1] = \"DocumentType\";\n  NodeType2[NodeType2[\"Element\"] = 2] = \"Element\";\n  NodeType2[NodeType2[\"Text\"] = 3] = \"Text\";\n  NodeType2[NodeType2[\"CDATA\"] = 4] = \"CDATA\";\n  NodeType2[NodeType2[\"Comment\"] = 5] = \"Comment\";\n  return NodeType2;\n})(NodeType || {});\nfunction isElement(n) {\n  return n.nodeType === n.ELEMENT_NODE;\n}\nfunction isShadowRoot(n) {\n  const host = n?.host;\n  return Boolean(host?.shadowRoot === n);\n}\nfunction isNativeShadowDom(shadowRoot) {\n  return Object.prototype.toString.call(shadowRoot) === \"[object ShadowRoot]\";\n}\nfunction fixBrowserCompatibilityIssuesInCSS(cssText) {\n  if (cssText.includes(\" background-clip: text;\") && !cssText.includes(\" -webkit-background-clip: text;\")) {\n    cssText = cssText.replace(\n      /\\sbackground-clip:\\s*text;/g,\n      \" -webkit-background-clip: text; background-clip: text;\"\n    );\n  }\n  return cssText;\n}\nfunction escapeImportStatement(rule) {\n  const { cssText } = rule;\n  if (cssText.split('\"').length < 3) return cssText;\n  const statement = [\"@import\", `url(${JSON.stringify(rule.href)})`];\n  if (rule.layerName === \"\") {\n    statement.push(`layer`);\n  } else if (rule.layerName) {\n    statement.push(`layer(${rule.layerName})`);\n  }\n  if (rule.supportsText) {\n    statement.push(`supports(${rule.supportsText})`);\n  }\n  if (rule.media.length) {\n    statement.push(rule.media.mediaText);\n  }\n  return statement.join(\" \") + \";\";\n}\nfunction stringifyStylesheet(s) {\n  try {\n    const rules = s.rules || s.cssRules;\n    return rules ? fixBrowserCompatibilityIssuesInCSS(\n      Array.from(rules, stringifyRule).join(\"\")\n    ) : null;\n  } catch (error) {\n    return null;\n  }\n}\nfunction fixAllCssProperty(rule) {\n  let styles = \"\";\n  for (let i = 0; i < rule.style.length; i++) {\n    const styleDeclaration = rule.style;\n    const attribute = styleDeclaration[i];\n    const isImportant = styleDeclaration.getPropertyPriority(attribute);\n    styles += `${attribute}:${styleDeclaration.getPropertyValue(attribute)}${isImportant ? ` !important` : \"\"};`;\n  }\n  return `${rule.selectorText} { ${styles} }`;\n}\nfunction stringifyRule(rule) {\n  let importStringified;\n  if (isCSSImportRule(rule)) {\n    try {\n      importStringified = // for same-origin stylesheets,\n      // we can access the imported stylesheet rules directly\n      stringifyStylesheet(rule.styleSheet) || // work around browser issues with the raw string `@import url(...)` statement\n      escapeImportStatement(rule);\n    } catch (error) {\n    }\n  } else if (isCSSStyleRule(rule)) {\n    let cssText = rule.cssText;\n    const needsSafariColonFix = rule.selectorText.includes(\":\");\n    const needsAllFix = typeof rule.style[\"all\"] === \"string\" && rule.style[\"all\"];\n    if (needsAllFix) {\n      cssText = fixAllCssProperty(rule);\n    }\n    if (needsSafariColonFix) {\n      cssText = fixSafariColons(cssText);\n    }\n    if (needsSafariColonFix || needsAllFix) {\n      return cssText;\n    }\n  }\n  return importStringified || rule.cssText;\n}\nfunction fixSafariColons(cssStringified) {\n  const regex = /(\\[(?:[\\w-]+)[^\\\\])(:(?:[\\w-]+)\\])/gm;\n  return cssStringified.replace(regex, \"$1\\\\$2\");\n}\nfunction isCSSImportRule(rule) {\n  return \"styleSheet\" in rule;\n}\nfunction isCSSStyleRule(rule) {\n  return \"selectorText\" in rule;\n}\nclass Mirror {\n  constructor() {\n    __publicField(this, \"idNodeMap\", /* @__PURE__ */ new Map());\n    __publicField(this, \"nodeMetaMap\", /* @__PURE__ */ new WeakMap());\n  }\n  getId(n) {\n    if (!n) return -1;\n    const id = this.getMeta(n)?.id;\n    return id ?? -1;\n  }\n  getNode(id) {\n    return this.idNodeMap.get(id) || null;\n  }\n  getIds() {\n    return Array.from(this.idNodeMap.keys());\n  }\n  getMeta(n) {\n    return this.nodeMetaMap.get(n) || null;\n  }\n  // removes the node from idNodeMap\n  // doesn't remove the node from nodeMetaMap\n  removeNodeFromMap(n) {\n    const id = this.getId(n);\n    this.idNodeMap.delete(id);\n    if (n.childNodes) {\n      n.childNodes.forEach(\n        (childNode) => this.removeNodeFromMap(childNode)\n      );\n    }\n  }\n  has(id) {\n    return this.idNodeMap.has(id);\n  }\n  hasNode(node) {\n    return this.nodeMetaMap.has(node);\n  }\n  add(n, meta) {\n    const id = meta.id;\n    this.idNodeMap.set(id, n);\n    this.nodeMetaMap.set(n, meta);\n  }\n  replace(id, n) {\n    const oldNode = this.getNode(id);\n    if (oldNode) {\n      const meta = this.nodeMetaMap.get(oldNode);\n      if (meta) this.nodeMetaMap.set(n, meta);\n    }\n    this.idNodeMap.set(id, n);\n  }\n  reset() {\n    this.idNodeMap = /* @__PURE__ */ new Map();\n    this.nodeMetaMap = /* @__PURE__ */ new WeakMap();\n  }\n}\nfunction createMirror() {\n  return new Mirror();\n}\nfunction shouldMaskInput({\n  maskInputOptions,\n  tagName,\n  type\n}) {\n  if (tagName === \"OPTION\") {\n    tagName = \"SELECT\";\n  }\n  return Boolean(\n    maskInputOptions[tagName.toLowerCase()] || type && maskInputOptions[type] || type === \"password\" || // Default to \"text\" option for inputs without a \"type\" attribute defined\n    tagName === \"INPUT\" && !type && maskInputOptions[\"text\"]\n  );\n}\nfunction maskInputValue({\n  isMasked,\n  element,\n  value,\n  maskInputFn\n}) {\n  let text = value || \"\";\n  if (!isMasked) {\n    return text;\n  }\n  if (maskInputFn) {\n    text = maskInputFn(text, element);\n  }\n  return \"*\".repeat(text.length);\n}\nfunction toLowerCase(str) {\n  return str.toLowerCase();\n}\nfunction toUpperCase(str) {\n  return str.toUpperCase();\n}\nconst ORIGINAL_ATTRIBUTE_NAME = \"__rrweb_original__\";\nfunction is2DCanvasBlank(canvas) {\n  const ctx = canvas.getContext(\"2d\");\n  if (!ctx) return true;\n  const chunkSize = 50;\n  for (let x = 0; x < canvas.width; x += chunkSize) {\n    for (let y = 0; y < canvas.height; y += chunkSize) {\n      const getImageData = ctx.getImageData;\n      const originalGetImageData = ORIGINAL_ATTRIBUTE_NAME in getImageData ? getImageData[ORIGINAL_ATTRIBUTE_NAME] : getImageData;\n      const pixelBuffer = new Uint32Array(\n        // eslint-disable-next-line @typescript-eslint/no-unsafe-argument, @typescript-eslint/no-unsafe-member-access\n        originalGetImageData.call(\n          ctx,\n          x,\n          y,\n          Math.min(chunkSize, canvas.width - x),\n          Math.min(chunkSize, canvas.height - y)\n        ).data.buffer\n      );\n      if (pixelBuffer.some((pixel) => pixel !== 0)) return false;\n    }\n  }\n  return true;\n}\nfunction isNodeMetaEqual(a, b) {\n  if (!a || !b || a.type !== b.type) return false;\n  if (a.type === NodeType.Document)\n    return a.compatMode === b.compatMode;\n  else if (a.type === NodeType.DocumentType)\n    return a.name === b.name && a.publicId === b.publicId && a.systemId === b.systemId;\n  else if (a.type === NodeType.Comment || a.type === NodeType.Text || a.type === NodeType.CDATA)\n    return a.textContent === b.textContent;\n  else if (a.type === NodeType.Element)\n    return a.tagName === b.tagName && JSON.stringify(a.attributes) === JSON.stringify(b.attributes) && a.isSVG === b.isSVG && a.needBlock === b.needBlock;\n  return false;\n}\nfunction getInputType(element) {\n  const type = element.type;\n  return element.hasAttribute(\"data-rr-is-password\") ? \"password\" : type ? (\n    // eslint-disable-next-line @typescript-eslint/no-unnecessary-type-assertion\n    toLowerCase(type)\n  ) : null;\n}\nfunction getInputValue(el, tagName, type) {\n  if (tagName === \"INPUT\" && (type === \"radio\" || type === \"checkbox\")) {\n    return el.getAttribute(\"value\") || \"\";\n  }\n  return el.value;\n}\nfunction extractFileExtension(path, baseURL) {\n  let url;\n  try {\n    url = new URL(path, baseURL ?? window.location.href);\n  } catch (err) {\n    return null;\n  }\n  const regex = /\\.([0-9a-z]+)(?:$)/i;\n  const match = url.pathname.match(regex);\n  return match?.[1] ?? null;\n}\nconst cachedImplementations = {};\nfunction getImplementation(name) {\n  const cached = cachedImplementations[name];\n  if (cached) {\n    return cached;\n  }\n  const document = window.document;\n  let impl = window[name];\n  if (document && typeof document.createElement === \"function\") {\n    try {\n      const sandbox = document.createElement(\"iframe\");\n      sandbox.hidden = true;\n      document.head.appendChild(sandbox);\n      const contentWindow = sandbox.contentWindow;\n      if (contentWindow && contentWindow[name]) {\n        impl = // eslint-disable-next-line @typescript-eslint/unbound-method\n        contentWindow[name];\n      }\n      document.head.removeChild(sandbox);\n    } catch (e) {\n    }\n  }\n  return cachedImplementations[name] = impl.bind(\n    window\n  );\n}\nfunction onRequestAnimationFrame(...rest) {\n  return getImplementation(\"requestAnimationFrame\")(...rest);\n}\nfunction setTimeout(...rest) {\n  return getImplementation(\"setTimeout\")(...rest);\n}\nfunction clearTimeout(...rest) {\n  return getImplementation(\"clearTimeout\")(...rest);\n}\nfunction getIFrameContentDocument(iframe) {\n  try {\n    return iframe.contentDocument;\n  } catch {\n  }\n}\nfunction getIFrameContentWindow(iframe) {\n  try {\n    return iframe.contentWindow;\n  } catch {\n  }\n}\nlet _id = 1;\nconst tagNameRegex = new RegExp(\"[^a-z0-9-_:]\");\nconst IGNORED_NODE = -2;\nfunction genId() {\n  return _id++;\n}\nfunction getValidTagName(element) {\n  if (element instanceof HTMLFormElement) {\n    return \"form\";\n  }\n  const processedTagName = toLowerCase(element.tagName);\n  if (tagNameRegex.test(processedTagName)) {\n    return \"div\";\n  }\n  return processedTagName;\n}\nfunction extractOrigin(url) {\n  let origin = \"\";\n  if (url.indexOf(\"//\") > -1) {\n    origin = url.split(\"/\").slice(0, 3).join(\"/\");\n  } else {\n    origin = url.split(\"/\")[0];\n  }\n  origin = origin.split(\"?\")[0];\n  return origin;\n}\nlet canvasService;\nlet canvasCtx;\nconst URL_IN_CSS_REF = /url\\((?:(')([^']*)'|(\")(.*?)\"|([^)]*))\\)/gm;\nconst URL_PROTOCOL_MATCH = /^(?:[a-z+]+:)?\\/\\//i;\nconst URL_WWW_MATCH = /^www\\..*/i;\nconst DATA_URI = /^(data:)([^,]*),(.*)/i;\nfunction filterCSSPropertiesFromInlineStyle(cssText, ignoredProperties) {\n  if (!cssText || ignoredProperties.size === 0) {\n    return cssText;\n  }\n  try {\n    const properties = cssText.split(\";\");\n    const filteredProperties = [];\n    for (let property of properties) {\n      property = property.trim();\n      if (!property) continue;\n      const colonIndex = property.indexOf(\":\");\n      if (colonIndex === -1) {\n        filteredProperties.push(property);\n        continue;\n      }\n      const propertyName = property.slice(0, colonIndex).trim();\n      if (!ignoredProperties.has(propertyName)) {\n        filteredProperties.push(property);\n      }\n    }\n    return filteredProperties.join(\"; \") + (filteredProperties.length > 0 && cssText.endsWith(\";\") ? \";\" : \"\");\n  } catch (error) {\n    console.warn(\"Error filtering CSS properties:\", error);\n    return cssText;\n  }\n}\nfunction absoluteToStylesheet(cssText, href) {\n  return (cssText || \"\").replace(\n    URL_IN_CSS_REF,\n    (origin, quote1, path1, quote2, path2, path3) => {\n      const filePath = path1 || path2 || path3;\n      const maybeQuote = quote1 || quote2 || \"\";\n      if (!filePath) {\n        return origin;\n      }\n      if (URL_PROTOCOL_MATCH.test(filePath) || URL_WWW_MATCH.test(filePath)) {\n        return `url(${maybeQuote}${filePath}${maybeQuote})`;\n      }\n      if (DATA_URI.test(filePath)) {\n        return `url(${maybeQuote}${filePath}${maybeQuote})`;\n      }\n      if (filePath[0] === \"/\") {\n        return `url(${maybeQuote}${extractOrigin(href) + filePath}${maybeQuote})`;\n      }\n      const stack = href.split(\"/\");\n      const parts = filePath.split(\"/\");\n      stack.pop();\n      for (const part of parts) {\n        if (part === \".\") {\n          continue;\n        } else if (part === \"..\") {\n          stack.pop();\n        } else {\n          stack.push(part);\n        }\n      }\n      return `url(${maybeQuote}${stack.join(\"/\")}${maybeQuote})`;\n    }\n  );\n}\nconst SRCSET_NOT_SPACES = /^[^ \\t\\n\\r\\u000c]+/;\nconst SRCSET_COMMAS_OR_SPACES = /^[, \\t\\n\\r\\u000c]+/;\nfunction getAbsoluteSrcsetString(doc, attributeValue) {\n  if (attributeValue.trim() === \"\") {\n    return attributeValue;\n  }\n  let pos = 0;\n  function collectCharacters(regEx) {\n    let chars;\n    const match = regEx.exec(attributeValue.substring(pos));\n    if (match) {\n      chars = match[0];\n      pos += chars.length;\n      return chars;\n    }\n    return \"\";\n  }\n  const output = [];\n  while (true) {\n    collectCharacters(SRCSET_COMMAS_OR_SPACES);\n    if (pos >= attributeValue.length) {\n      break;\n    }\n    let url = collectCharacters(SRCSET_NOT_SPACES);\n    if (url.slice(-1) === \",\") {\n      url = absoluteToDoc(doc, url.substring(0, url.length - 1));\n      output.push(url);\n    } else {\n      let descriptorsStr = \"\";\n      url = absoluteToDoc(doc, url);\n      let inParens = false;\n      while (true) {\n        const c = attributeValue.charAt(pos);\n        if (c === \"\") {\n          output.push((url + descriptorsStr).trim());\n          break;\n        } else if (!inParens) {\n          if (c === \",\") {\n            pos += 1;\n            output.push((url + descriptorsStr).trim());\n            break;\n          } else if (c === \"(\") {\n            inParens = true;\n          }\n        } else {\n          if (c === \")\") {\n            inParens = false;\n          }\n        }\n        descriptorsStr += c;\n        pos += 1;\n      }\n    }\n  }\n  return output.join(\", \");\n}\nconst cachedDocument = /* @__PURE__ */ new WeakMap();\nfunction absoluteToDoc(doc, attributeValue) {\n  if (!attributeValue || attributeValue.trim() === \"\") {\n    return attributeValue;\n  }\n  return getHref(doc, attributeValue);\n}\nfunction isSVGElement(el) {\n  return Boolean(el.tagName === \"svg\" || el.ownerSVGElement);\n}\nfunction getHref(doc, customHref) {\n  let a = cachedDocument.get(doc);\n  if (!a) {\n    a = doc.createElement(\"a\");\n    cachedDocument.set(doc, a);\n  }\n  if (!customHref) {\n    customHref = \"\";\n  } else if (customHref.startsWith(\"blob:\") || customHref.startsWith(\"data:\")) {\n    return customHref;\n  }\n  a.setAttribute(\"href\", customHref);\n  return a.href;\n}\nfunction transformAttribute(doc, tagName, name, value, element, maskAttributeFn, ignoreCSSAttributes) {\n  if (!value) {\n    return value;\n  }\n  if (name === \"src\" || name === \"href\" && !(tagName === \"use\" && value[0] === \"#\")) {\n    return absoluteToDoc(doc, value);\n  } else if (name === \"xlink:href\" && value[0] !== \"#\") {\n    return absoluteToDoc(doc, value);\n  } else if (name === \"background\" && (tagName === \"table\" || tagName === \"td\" || tagName === \"th\")) {\n    return absoluteToDoc(doc, value);\n  } else if (name === \"srcset\") {\n    return getAbsoluteSrcsetString(doc, value);\n  } else if (name === \"style\") {\n    let processedStyle = absoluteToStylesheet(value, getHref(doc));\n    if (ignoreCSSAttributes && ignoreCSSAttributes.size > 0) {\n      processedStyle = filterCSSPropertiesFromInlineStyle(\n        processedStyle,\n        ignoreCSSAttributes\n      );\n    }\n    return processedStyle;\n  } else if (tagName === \"object\" && name === \"data\") {\n    return absoluteToDoc(doc, value);\n  }\n  if (typeof maskAttributeFn === \"function\") {\n    return maskAttributeFn(name, value, element);\n  }\n  return value;\n}\nfunction ignoreAttribute(tagName, name, _value) {\n  return (tagName === \"video\" || tagName === \"audio\") && name === \"autoplay\";\n}\nfunction _isBlockedElement(element, blockClass, blockSelector, unblockSelector) {\n  try {\n    if (unblockSelector && element.matches(unblockSelector)) {\n      return false;\n    }\n    if (typeof blockClass === \"string\") {\n      if (element.classList.contains(blockClass)) {\n        return true;\n      }\n    } else {\n      for (let eIndex = element.classList.length; eIndex--; ) {\n        const className = element.classList[eIndex];\n        if (blockClass.test(className)) {\n          return true;\n        }\n      }\n    }\n    if (blockSelector) {\n      return element.matches(blockSelector);\n    }\n  } catch (e) {\n  }\n  return false;\n}\nfunction elementClassMatchesRegex(el, regex) {\n  for (let eIndex = el.classList.length; eIndex--; ) {\n    const className = el.classList[eIndex];\n    if (regex.test(className)) {\n      return true;\n    }\n  }\n  return false;\n}\nfunction classMatchesRegex(node, regex, checkAncestors) {\n  if (!node) return false;\n  if (checkAncestors) {\n    return distanceToMatch(\n      node,\n      (node2) => elementClassMatchesRegex(node2, regex)\n    ) >= 0;\n  } else if (node.nodeType === node.ELEMENT_NODE) {\n    return elementClassMatchesRegex(node, regex);\n  }\n  return false;\n}\nfunction distanceToMatch(node, matchPredicate, limit = Infinity, distance = 0) {\n  if (!node) return -1;\n  if (node.nodeType !== node.ELEMENT_NODE) return -1;\n  if (distance > limit) return -1;\n  if (matchPredicate(node)) return distance;\n  return distanceToMatch(node.parentNode, matchPredicate, limit, distance + 1);\n}\nfunction createMatchPredicate(className, selector) {\n  return (node) => {\n    const el = node;\n    if (el === null) return false;\n    try {\n      if (className) {\n        if (typeof className === \"string\") {\n          if (el.matches(`.${className}`)) return true;\n        } else if (elementClassMatchesRegex(el, className)) {\n          return true;\n        }\n      }\n      if (selector && el.matches(selector)) return true;\n      return false;\n    } catch {\n      return false;\n    }\n  };\n}\nfunction needMaskingText(node, maskTextClass, maskTextSelector, unmaskTextClass, unmaskTextSelector, maskAllText) {\n  try {\n    const el = node.nodeType === node.ELEMENT_NODE ? node : node.parentElement;\n    if (el === null) return false;\n    if (el.tagName === \"INPUT\") {\n      const autocomplete = el.getAttribute(\"autocomplete\");\n      const disallowedAutocompleteValues = [\n        \"current-password\",\n        \"new-password\",\n        \"cc-number\",\n        \"cc-exp\",\n        \"cc-exp-month\",\n        \"cc-exp-year\",\n        \"cc-csc\"\n      ];\n      if (disallowedAutocompleteValues.includes(autocomplete)) {\n        return true;\n      }\n    }\n    let maskDistance = -1;\n    let unmaskDistance = -1;\n    if (maskAllText) {\n      unmaskDistance = distanceToMatch(\n        el,\n        createMatchPredicate(unmaskTextClass, unmaskTextSelector)\n      );\n      if (unmaskDistance < 0) {\n        return true;\n      }\n      maskDistance = distanceToMatch(\n        el,\n        createMatchPredicate(maskTextClass, maskTextSelector),\n        unmaskDistance >= 0 ? unmaskDistance : Infinity\n      );\n    } else {\n      maskDistance = distanceToMatch(\n        el,\n        createMatchPredicate(maskTextClass, maskTextSelector)\n      );\n      if (maskDistance < 0) {\n        return false;\n      }\n      unmaskDistance = distanceToMatch(\n        el,\n        createMatchPredicate(unmaskTextClass, unmaskTextSelector),\n        maskDistance >= 0 ? maskDistance : Infinity\n      );\n    }\n    return maskDistance >= 0 ? unmaskDistance >= 0 ? maskDistance <= unmaskDistance : true : unmaskDistance >= 0 ? false : !!maskAllText;\n  } catch (e) {\n  }\n  return !!maskAllText;\n}\nfunction onceIframeLoaded(iframeEl, listener, iframeLoadTimeout) {\n  const win = getIFrameContentWindow(iframeEl);\n  if (!win) {\n    return;\n  }\n  let fired = false;\n  let readyState;\n  try {\n    readyState = win.document.readyState;\n  } catch (error) {\n    return;\n  }\n  if (readyState !== \"complete\") {\n    const timer = setTimeout(() => {\n      if (!fired) {\n        listener();\n        fired = true;\n      }\n    }, iframeLoadTimeout);\n    iframeEl.addEventListener(\"load\", () => {\n      clearTimeout(timer);\n      fired = true;\n      listener();\n    });\n    return;\n  }\n  const blankUrl = \"about:blank\";\n  if (win.location.href !== blankUrl || iframeEl.src === blankUrl || iframeEl.src === \"\") {\n    setTimeout(listener, 0);\n    return iframeEl.addEventListener(\"load\", listener);\n  }\n  iframeEl.addEventListener(\"load\", listener);\n}\nfunction onceStylesheetLoaded(link, listener, styleSheetLoadTimeout) {\n  let fired = false;\n  let styleSheetLoaded;\n  try {\n    styleSheetLoaded = link.sheet;\n  } catch (error) {\n    styleSheetLoaded = null;\n  }\n  if (styleSheetLoaded) return;\n  const timer = setTimeout(() => {\n    if (!fired) {\n      listener();\n      fired = true;\n    }\n  }, styleSheetLoadTimeout);\n  link.addEventListener(\"load\", () => {\n    clearTimeout(timer);\n    fired = true;\n    listener();\n  });\n}\nfunction serializeNode(n, options) {\n  const {\n    doc,\n    mirror,\n    blockClass,\n    blockSelector,\n    unblockSelector,\n    maskAllText,\n    maskAttributeFn,\n    maskTextClass,\n    unmaskTextClass,\n    maskTextSelector,\n    unmaskTextSelector,\n    inlineStylesheet,\n    maskInputOptions = {},\n    maskTextFn,\n    maskInputFn,\n    dataURLOptions = {},\n    inlineImages,\n    recordCanvas,\n    keepIframeSrcFn,\n    newlyAddedElement = false,\n    ignoreCSSAttributes\n  } = options;\n  const rootId = getRootId(doc, mirror);\n  switch (n.nodeType) {\n    case n.DOCUMENT_NODE:\n      if (n.compatMode !== \"CSS1Compat\") {\n        return {\n          type: NodeType.Document,\n          childNodes: [],\n          compatMode: n.compatMode\n          // probably \"BackCompat\"\n        };\n      } else {\n        return {\n          type: NodeType.Document,\n          childNodes: []\n        };\n      }\n    case n.DOCUMENT_TYPE_NODE:\n      return {\n        type: NodeType.DocumentType,\n        name: n.name,\n        publicId: n.publicId,\n        systemId: n.systemId,\n        rootId\n      };\n    case n.ELEMENT_NODE:\n      return serializeElementNode(n, {\n        doc,\n        blockClass,\n        blockSelector,\n        unblockSelector,\n        inlineStylesheet,\n        maskAttributeFn,\n        maskInputOptions,\n        maskInputFn,\n        dataURLOptions,\n        inlineImages,\n        recordCanvas,\n        keepIframeSrcFn,\n        newlyAddedElement,\n        rootId,\n        maskTextClass,\n        unmaskTextClass,\n        maskTextSelector,\n        unmaskTextSelector,\n        ignoreCSSAttributes\n      });\n    case n.TEXT_NODE:\n      return serializeTextNode(n, {\n        doc,\n        maskAllText,\n        maskTextClass,\n        unmaskTextClass,\n        maskTextSelector,\n        unmaskTextSelector,\n        maskTextFn,\n        maskInputOptions,\n        maskInputFn,\n        rootId\n      });\n    case n.CDATA_SECTION_NODE:\n      return {\n        type: NodeType.CDATA,\n        textContent: \"\",\n        rootId\n      };\n    case n.COMMENT_NODE:\n      return {\n        type: NodeType.Comment,\n        textContent: n.textContent || \"\",\n        rootId\n      };\n    default:\n      return false;\n  }\n}\nfunction getRootId(doc, mirror) {\n  if (!mirror.hasNode(doc)) return void 0;\n  const docId = mirror.getId(doc);\n  return docId === 1 ? void 0 : docId;\n}\nfunction serializeTextNode(n, options) {\n  const {\n    maskAllText,\n    maskTextClass,\n    unmaskTextClass,\n    maskTextSelector,\n    unmaskTextSelector,\n    maskTextFn,\n    maskInputOptions,\n    maskInputFn,\n    rootId\n  } = options;\n  const parentTagName = n.parentNode && n.parentNode.tagName;\n  let textContent = n.textContent;\n  const isStyle = parentTagName === \"STYLE\" ? true : void 0;\n  const isScript = parentTagName === \"SCRIPT\" ? true : void 0;\n  const isTextarea = parentTagName === \"TEXTAREA\" ? true : void 0;\n  if (isStyle && textContent) {\n    try {\n      if (n.nextSibling || n.previousSibling) {\n      } else if (n.parentNode.sheet?.cssRules) {\n        textContent = stringifyStylesheet(\n          n.parentNode.sheet\n        );\n      }\n    } catch (err) {\n      console.warn(\n        `Cannot get CSS styles from text's parentNode. Error: ${err}`,\n        n\n      );\n    }\n    textContent = absoluteToStylesheet(textContent, getHref(options.doc));\n  }\n  if (isScript) {\n    textContent = \"SCRIPT_PLACEHOLDER\";\n  }\n  const forceMask = needMaskingText(\n    n,\n    maskTextClass,\n    maskTextSelector,\n    unmaskTextClass,\n    unmaskTextSelector,\n    maskAllText\n  );\n  if (!isStyle && !isScript && !isTextarea && textContent && forceMask) {\n    textContent = maskTextFn ? maskTextFn(textContent, n.parentElement) : textContent.replace(/[\\S]/g, \"*\");\n  }\n  if (isTextarea && textContent && (maskInputOptions.textarea || forceMask)) {\n    textContent = maskInputFn ? maskInputFn(textContent, n.parentNode) : textContent.replace(/[\\S]/g, \"*\");\n  }\n  if (parentTagName === \"OPTION\" && textContent) {\n    const isInputMasked = shouldMaskInput({\n      type: null,\n      tagName: parentTagName,\n      maskInputOptions\n    });\n    textContent = maskInputValue({\n      isMasked: needMaskingText(\n        n,\n        maskTextClass,\n        maskTextSelector,\n        unmaskTextClass,\n        unmaskTextSelector,\n        isInputMasked\n      ),\n      element: n,\n      value: textContent,\n      maskInputFn\n    });\n  }\n  return {\n    type: NodeType.Text,\n    textContent: textContent || \"\",\n    isStyle,\n    rootId\n  };\n}\nfunction serializeElementNode(n, options) {\n  const {\n    doc,\n    blockClass,\n    blockSelector,\n    unblockSelector,\n    inlineStylesheet,\n    maskInputOptions = {},\n    maskAttributeFn,\n    maskInputFn,\n    dataURLOptions = {},\n    inlineImages,\n    recordCanvas,\n    keepIframeSrcFn,\n    newlyAddedElement = false,\n    rootId,\n    maskTextClass,\n    unmaskTextClass,\n    maskTextSelector,\n    unmaskTextSelector,\n    ignoreCSSAttributes\n  } = options;\n  const needBlock = _isBlockedElement(\n    n,\n    blockClass,\n    blockSelector,\n    unblockSelector\n  );\n  const tagName = getValidTagName(n);\n  let attributes2 = {};\n  const len = n.attributes.length;\n  for (let i = 0; i < len; i++) {\n    const attr = n.attributes[i];\n    if (attr.name && !ignoreAttribute(tagName, attr.name, attr.value)) {\n      attributes2[attr.name] = transformAttribute(\n        doc,\n        tagName,\n        toLowerCase(attr.name),\n        attr.value,\n        n,\n        maskAttributeFn,\n        ignoreCSSAttributes\n      );\n    }\n  }\n  if (tagName === \"link\" && inlineStylesheet) {\n    const stylesheet = Array.from(doc.styleSheets).find((s) => {\n      return s.href === n.href;\n    });\n    let cssText = null;\n    if (stylesheet) {\n      cssText = stringifyStylesheet(stylesheet);\n    }\n    if (cssText) {\n      attributes2.rel = null;\n      attributes2.href = null;\n      attributes2.crossorigin = null;\n      attributes2._cssText = absoluteToStylesheet(cssText, stylesheet.href);\n    }\n  }\n  if (tagName === \"style\" && n.sheet && // TODO: Currently we only try to get dynamic stylesheet when it is an empty style element\n  !(n.innerText || n.textContent || \"\").trim().length) {\n    const cssText = stringifyStylesheet(\n      n.sheet\n    );\n    if (cssText) {\n      attributes2._cssText = absoluteToStylesheet(cssText, getHref(doc));\n    }\n  }\n  if (tagName === \"input\" || tagName === \"textarea\" || tagName === \"select\" || tagName === \"option\") {\n    const el = n;\n    const type = getInputType(el);\n    const value = getInputValue(el, toUpperCase(tagName), type);\n    const checked = el.checked;\n    if (type !== \"submit\" && type !== \"button\" && value) {\n      const forceMask = needMaskingText(\n        el,\n        maskTextClass,\n        maskTextSelector,\n        unmaskTextClass,\n        unmaskTextSelector,\n        shouldMaskInput({\n          type,\n          tagName: toUpperCase(tagName),\n          maskInputOptions\n        })\n      );\n      attributes2.value = maskInputValue({\n        isMasked: forceMask,\n        element: el,\n        value,\n        maskInputFn\n      });\n    }\n    if (checked) {\n      attributes2.checked = checked;\n    }\n  }\n  if (tagName === \"option\") {\n    if (n.selected && !maskInputOptions[\"select\"]) {\n      attributes2.selected = true;\n    } else {\n      delete attributes2.selected;\n    }\n  }\n  if (tagName === \"canvas\" && recordCanvas) {\n    if (n.__context === \"2d\") {\n      if (!is2DCanvasBlank(n)) {\n        attributes2.rr_dataURL = n.toDataURL(\n          dataURLOptions.type,\n          dataURLOptions.quality\n        );\n      }\n    } else if (!(\"__context\" in n)) {\n      const canvasDataURL = n.toDataURL(\n        dataURLOptions.type,\n        dataURLOptions.quality\n      );\n      const blankCanvas = doc.createElement(\"canvas\");\n      blankCanvas.width = n.width;\n      blankCanvas.height = n.height;\n      const blankCanvasDataURL = blankCanvas.toDataURL(\n        dataURLOptions.type,\n        dataURLOptions.quality\n      );\n      if (canvasDataURL !== blankCanvasDataURL) {\n        attributes2.rr_dataURL = canvasDataURL;\n      }\n    }\n  }\n  if (tagName === \"img\" && inlineImages) {\n    if (!canvasService) {\n      canvasService = doc.createElement(\"canvas\");\n      canvasCtx = canvasService.getContext(\"2d\");\n    }\n    const image = n;\n    const imageSrc = image.currentSrc || image.getAttribute(\"src\") || \"<unknown-src>\";\n    const priorCrossOrigin = image.crossOrigin;\n    const recordInlineImage = () => {\n      image.removeEventListener(\"load\", recordInlineImage);\n      try {\n        canvasService.width = image.naturalWidth;\n        canvasService.height = image.naturalHeight;\n        canvasCtx.drawImage(image, 0, 0);\n        attributes2.rr_dataURL = canvasService.toDataURL(\n          dataURLOptions.type,\n          dataURLOptions.quality\n        );\n      } catch (err) {\n        if (image.crossOrigin !== \"anonymous\") {\n          image.crossOrigin = \"anonymous\";\n          if (image.complete && image.naturalWidth !== 0)\n            recordInlineImage();\n          else image.addEventListener(\"load\", recordInlineImage);\n          return;\n        } else {\n          console.warn(\n            `Cannot inline img src=${imageSrc}! Error: ${err}`\n          );\n        }\n      }\n      if (image.crossOrigin === \"anonymous\") {\n        priorCrossOrigin ? attributes2.crossOrigin = priorCrossOrigin : image.removeAttribute(\"crossorigin\");\n      }\n    };\n    if (image.complete && image.naturalWidth !== 0) recordInlineImage();\n    else image.addEventListener(\"load\", recordInlineImage);\n  }\n  if (tagName === \"audio\" || tagName === \"video\") {\n    attributes2.rr_mediaState = n.paused ? \"paused\" : \"played\";\n    attributes2.rr_mediaCurrentTime = n.currentTime;\n  }\n  if (!newlyAddedElement) {\n    if (n.scrollLeft) {\n      attributes2.rr_scrollLeft = n.scrollLeft;\n    }\n    if (n.scrollTop) {\n      attributes2.rr_scrollTop = n.scrollTop;\n    }\n  }\n  if (needBlock) {\n    const { width, height } = n.getBoundingClientRect();\n    attributes2 = {\n      class: attributes2.class,\n      rr_width: `${width}px`,\n      rr_height: `${height}px`\n    };\n  }\n  if (tagName === \"iframe\" && !keepIframeSrcFn(attributes2.src)) {\n    if (!needBlock && !getIFrameContentDocument(n)) {\n      attributes2.rr_src = attributes2.src;\n    }\n    delete attributes2.src;\n  }\n  let isCustomElement;\n  try {\n    if (customElements.get(tagName)) isCustomElement = true;\n  } catch (e) {\n  }\n  return {\n    type: NodeType.Element,\n    tagName,\n    attributes: attributes2,\n    childNodes: [],\n    isSVG: isSVGElement(n) || void 0,\n    needBlock,\n    rootId,\n    isCustom: isCustomElement\n  };\n}\nfunction lowerIfExists(maybeAttr) {\n  if (maybeAttr === void 0 || maybeAttr === null) {\n    return \"\";\n  } else {\n    return maybeAttr.toLowerCase();\n  }\n}\nfunction slimDOMExcluded(sn, slimDOMOptions) {\n  if (slimDOMOptions.comment && sn.type === NodeType.Comment) {\n    return true;\n  } else if (sn.type === NodeType.Element) {\n    if (slimDOMOptions.script && // script tag\n    (sn.tagName === \"script\" || // (module)preload link\n    sn.tagName === \"link\" && (sn.attributes.rel === \"preload\" || sn.attributes.rel === \"modulepreload\") || // prefetch link\n    sn.tagName === \"link\" && sn.attributes.rel === \"prefetch\" && typeof sn.attributes.href === \"string\" && extractFileExtension(sn.attributes.href) === \"js\")) {\n      return true;\n    } else if (slimDOMOptions.headFavicon && (sn.tagName === \"link\" && sn.attributes.rel === \"shortcut icon\" || sn.tagName === \"meta\" && (lowerIfExists(sn.attributes.name).match(\n      /^msapplication-tile(image|color)$/\n    ) || lowerIfExists(sn.attributes.name) === \"application-name\" || lowerIfExists(sn.attributes.rel) === \"icon\" || lowerIfExists(sn.attributes.rel) === \"apple-touch-icon\" || lowerIfExists(sn.attributes.rel) === \"shortcut icon\"))) {\n      return true;\n    } else if (sn.tagName === \"meta\") {\n      if (slimDOMOptions.headMetaDescKeywords && lowerIfExists(sn.attributes.name).match(/^description|keywords$/)) {\n        return true;\n      } else if (slimDOMOptions.headMetaSocial && (lowerIfExists(sn.attributes.property).match(/^(og|twitter|fb):/) || // og = opengraph (facebook)\n      lowerIfExists(sn.attributes.name).match(/^(og|twitter):/) || lowerIfExists(sn.attributes.name) === \"pinterest\")) {\n        return true;\n      } else if (slimDOMOptions.headMetaRobots && (lowerIfExists(sn.attributes.name) === \"robots\" || lowerIfExists(sn.attributes.name) === \"googlebot\" || lowerIfExists(sn.attributes.name) === \"bingbot\")) {\n        return true;\n      } else if (slimDOMOptions.headMetaHttpEquiv && sn.attributes[\"http-equiv\"] !== void 0) {\n        return true;\n      } else if (slimDOMOptions.headMetaAuthorship && (lowerIfExists(sn.attributes.name) === \"author\" || lowerIfExists(sn.attributes.name) === \"generator\" || lowerIfExists(sn.attributes.name) === \"framework\" || lowerIfExists(sn.attributes.name) === \"publisher\" || lowerIfExists(sn.attributes.name) === \"progid\" || lowerIfExists(sn.attributes.property).match(/^article:/) || lowerIfExists(sn.attributes.property).match(/^product:/))) {\n        return true;\n      } else if (slimDOMOptions.headMetaVerification && (lowerIfExists(sn.attributes.name) === \"google-site-verification\" || lowerIfExists(sn.attributes.name) === \"yandex-verification\" || lowerIfExists(sn.attributes.name) === \"csrf-token\" || lowerIfExists(sn.attributes.name) === \"p:domain_verify\" || lowerIfExists(sn.attributes.name) === \"verify-v1\" || lowerIfExists(sn.attributes.name) === \"verification\" || lowerIfExists(sn.attributes.name) === \"shopify-checkout-api-token\")) {\n        return true;\n      }\n    }\n  }\n  return false;\n}\nfunction serializeNodeWithId(n, options) {\n  const {\n    doc,\n    mirror,\n    blockClass,\n    blockSelector,\n    unblockSelector,\n    maskAllText,\n    maskTextClass,\n    unmaskTextClass,\n    maskTextSelector,\n    unmaskTextSelector,\n    skipChild = false,\n    inlineStylesheet = true,\n    maskInputOptions = {},\n    maskAttributeFn,\n    maskTextFn,\n    maskInputFn,\n    slimDOMOptions,\n    dataURLOptions = {},\n    inlineImages = false,\n    recordCanvas = false,\n    onSerialize,\n    onIframeLoad,\n    iframeLoadTimeout = 5e3,\n    onBlockedImageLoad,\n    onStylesheetLoad,\n    stylesheetLoadTimeout = 5e3,\n    keepIframeSrcFn = () => false,\n    newlyAddedElement = false,\n    ignoreCSSAttributes\n  } = options;\n  let { preserveWhiteSpace = true } = options;\n  const _serializedNode = serializeNode(n, {\n    doc,\n    mirror,\n    blockClass,\n    blockSelector,\n    maskAllText,\n    unblockSelector,\n    maskTextClass,\n    unmaskTextClass,\n    maskTextSelector,\n    unmaskTextSelector,\n    inlineStylesheet,\n    maskInputOptions,\n    maskAttributeFn,\n    maskTextFn,\n    maskInputFn,\n    dataURLOptions,\n    inlineImages,\n    recordCanvas,\n    keepIframeSrcFn,\n    newlyAddedElement,\n    ignoreCSSAttributes\n  });\n  if (!_serializedNode) {\n    console.warn(n, \"not serialized\");\n    return null;\n  }\n  let id;\n  if (mirror.hasNode(n)) {\n    id = mirror.getId(n);\n  } else if (slimDOMExcluded(_serializedNode, slimDOMOptions) || !preserveWhiteSpace && _serializedNode.type === NodeType.Text && !_serializedNode.isStyle && !_serializedNode.textContent.trim().length) {\n    id = IGNORED_NODE;\n  } else {\n    id = genId();\n  }\n  const serializedNode2 = Object.assign(_serializedNode, { id });\n  mirror.add(n, serializedNode2);\n  if (id === IGNORED_NODE) {\n    return null;\n  }\n  if (onSerialize) {\n    onSerialize(n);\n  }\n  let recordChild = !skipChild;\n  if (serializedNode2.type === NodeType.Element) {\n    recordChild = recordChild && !serializedNode2.needBlock;\n    const shadowRoot = n.shadowRoot;\n    if (shadowRoot && isNativeShadowDom(shadowRoot))\n      serializedNode2.isShadowHost = true;\n  }\n  if ((serializedNode2.type === NodeType.Document || serializedNode2.type === NodeType.Element) && recordChild) {\n    if (slimDOMOptions.headWhitespace && serializedNode2.type === NodeType.Element && serializedNode2.tagName === \"head\") {\n      preserveWhiteSpace = false;\n    }\n    const bypassOptions = {\n      doc,\n      mirror,\n      blockClass,\n      blockSelector,\n      maskAllText,\n      unblockSelector,\n      maskTextClass,\n      unmaskTextClass,\n      maskTextSelector,\n      unmaskTextSelector,\n      skipChild,\n      inlineStylesheet,\n      maskInputOptions,\n      maskAttributeFn,\n      maskTextFn,\n      maskInputFn,\n      slimDOMOptions,\n      dataURLOptions,\n      inlineImages,\n      recordCanvas,\n      preserveWhiteSpace,\n      onSerialize,\n      onIframeLoad,\n      iframeLoadTimeout,\n      onBlockedImageLoad,\n      onStylesheetLoad,\n      stylesheetLoadTimeout,\n      keepIframeSrcFn,\n      ignoreCSSAttributes\n    };\n    const childNodes = n.childNodes ? Array.from(n.childNodes) : [];\n    for (const childN of childNodes) {\n      const serializedChildNode = serializeNodeWithId(childN, bypassOptions);\n      if (serializedChildNode) {\n        serializedNode2.childNodes.push(serializedChildNode);\n      }\n    }\n    if (isElement(n) && n.shadowRoot) {\n      for (const childN of Array.from(n.shadowRoot.childNodes)) {\n        const serializedChildNode = serializeNodeWithId(childN, bypassOptions);\n        if (serializedChildNode) {\n          isNativeShadowDom(n.shadowRoot) && (serializedChildNode.isShadow = true);\n          serializedNode2.childNodes.push(serializedChildNode);\n        }\n      }\n    }\n  }\n  if (n.parentNode && isShadowRoot(n.parentNode) && isNativeShadowDom(n.parentNode)) {\n    serializedNode2.isShadow = true;\n  }\n  if (serializedNode2.type === NodeType.Element && serializedNode2.tagName === \"iframe\" && !serializedNode2.needBlock) {\n    onceIframeLoaded(\n      n,\n      () => {\n        const iframeDoc = getIFrameContentDocument(n);\n        if (iframeDoc && onIframeLoad) {\n          const serializedIframeNode = serializeNodeWithId(iframeDoc, {\n            doc: iframeDoc,\n            mirror,\n            blockClass,\n            blockSelector,\n            unblockSelector,\n            maskAllText,\n            maskTextClass,\n            unmaskTextClass,\n            maskTextSelector,\n            unmaskTextSelector,\n            skipChild: false,\n            inlineStylesheet,\n            maskInputOptions,\n            maskAttributeFn,\n            maskTextFn,\n            maskInputFn,\n            slimDOMOptions,\n            dataURLOptions,\n            inlineImages,\n            recordCanvas,\n            preserveWhiteSpace,\n            onSerialize,\n            onIframeLoad,\n            iframeLoadTimeout,\n            onStylesheetLoad,\n            stylesheetLoadTimeout,\n            keepIframeSrcFn,\n            ignoreCSSAttributes\n          });\n          if (serializedIframeNode) {\n            onIframeLoad(\n              n,\n              serializedIframeNode\n            );\n          }\n        }\n      },\n      iframeLoadTimeout\n    );\n  }\n  if (serializedNode2.type === NodeType.Element && serializedNode2.tagName === \"img\" && !n.complete && serializedNode2.needBlock) {\n    const image = n;\n    const updateImageDimensions = () => {\n      if (image.isConnected && !image.complete && onBlockedImageLoad) {\n        try {\n          const rect = image.getBoundingClientRect();\n          if (rect.width > 0 && rect.height > 0) {\n            onBlockedImageLoad(image, serializedNode2, rect);\n          }\n        } catch (error) {\n        }\n      }\n      image.removeEventListener(\"load\", updateImageDimensions);\n    };\n    if (image.isConnected) {\n      image.addEventListener(\"load\", updateImageDimensions);\n    }\n  }\n  if (serializedNode2.type === NodeType.Element && serializedNode2.tagName === \"link\" && typeof serializedNode2.attributes.rel === \"string\" && (serializedNode2.attributes.rel === \"stylesheet\" || serializedNode2.attributes.rel === \"preload\" && typeof serializedNode2.attributes.href === \"string\" && extractFileExtension(serializedNode2.attributes.href) === \"css\")) {\n    onceStylesheetLoaded(\n      n,\n      () => {\n        if (onStylesheetLoad) {\n          const serializedLinkNode = serializeNodeWithId(n, {\n            doc,\n            mirror,\n            blockClass,\n            blockSelector,\n            unblockSelector,\n            maskAllText,\n            maskTextClass,\n            unmaskTextClass,\n            maskTextSelector,\n            unmaskTextSelector,\n            skipChild: false,\n            inlineStylesheet,\n            maskInputOptions,\n            maskAttributeFn,\n            maskTextFn,\n            maskInputFn,\n            slimDOMOptions,\n            dataURLOptions,\n            inlineImages,\n            recordCanvas,\n            preserveWhiteSpace,\n            onSerialize,\n            onIframeLoad,\n            iframeLoadTimeout,\n            onStylesheetLoad,\n            stylesheetLoadTimeout,\n            keepIframeSrcFn,\n            ignoreCSSAttributes\n          });\n          if (serializedLinkNode) {\n            onStylesheetLoad(\n              n,\n              serializedLinkNode\n            );\n          }\n        }\n      },\n      stylesheetLoadTimeout\n    );\n  }\n  if (serializedNode2.type === NodeType.Element) {\n    delete serializedNode2.needBlock;\n  }\n  return serializedNode2;\n}\nfunction snapshot(n, options) {\n  const {\n    mirror = new Mirror(),\n    blockClass = \"rr-block\",\n    blockSelector = null,\n    unblockSelector = null,\n    maskAllText = false,\n    maskTextClass = \"rr-mask\",\n    unmaskTextClass = null,\n    maskTextSelector = null,\n    unmaskTextSelector = null,\n    inlineStylesheet = true,\n    inlineImages = false,\n    recordCanvas = false,\n    maskAllInputs = false,\n    maskAttributeFn,\n    maskTextFn,\n    maskInputFn,\n    slimDOM = false,\n    dataURLOptions,\n    preserveWhiteSpace,\n    onSerialize,\n    onIframeLoad,\n    iframeLoadTimeout,\n    onBlockedImageLoad,\n    onStylesheetLoad,\n    stylesheetLoadTimeout,\n    keepIframeSrcFn = () => false,\n    ignoreCSSAttributes = /* @__PURE__ */ new Set([])\n  } = options || {};\n  const maskInputOptions = maskAllInputs === true ? {\n    color: true,\n    date: true,\n    \"datetime-local\": true,\n    email: true,\n    month: true,\n    number: true,\n    range: true,\n    search: true,\n    tel: true,\n    text: true,\n    time: true,\n    url: true,\n    week: true,\n    textarea: true,\n    select: true\n  } : maskAllInputs === false ? {} : maskAllInputs;\n  const slimDOMOptions = slimDOM === true || slimDOM === \"all\" ? (\n    // if true: set of sensible options that should not throw away any information\n    {\n      script: true,\n      comment: true,\n      headFavicon: true,\n      headWhitespace: true,\n      headMetaDescKeywords: slimDOM === \"all\",\n      // destructive\n      headMetaSocial: true,\n      headMetaRobots: true,\n      headMetaHttpEquiv: true,\n      headMetaAuthorship: true,\n      headMetaVerification: true\n    }\n  ) : slimDOM === false ? {} : slimDOM;\n  return serializeNodeWithId(n, {\n    doc: n,\n    mirror,\n    blockClass,\n    blockSelector,\n    unblockSelector,\n    maskAllText,\n    maskTextClass,\n    unmaskTextClass,\n    maskTextSelector,\n    unmaskTextSelector,\n    skipChild: false,\n    inlineStylesheet,\n    maskInputOptions,\n    maskAttributeFn,\n    maskTextFn,\n    maskInputFn,\n    slimDOMOptions,\n    dataURLOptions,\n    inlineImages,\n    recordCanvas,\n    preserveWhiteSpace,\n    onSerialize,\n    onIframeLoad,\n    iframeLoadTimeout,\n    onBlockedImageLoad,\n    onStylesheetLoad,\n    stylesheetLoadTimeout,\n    keepIframeSrcFn,\n    newlyAddedElement: false,\n    ignoreCSSAttributes\n  });\n}\nfunction visitSnapshot(node, onVisit) {\n  function walk(current) {\n    onVisit(current);\n    if (current.type === NodeType.Document || current.type === NodeType.Element) {\n      current.childNodes.forEach(walk);\n    }\n  }\n  walk(node);\n}\nfunction cleanupSnapshot() {\n  _id = 1;\n}\nconst commentre = /\\/\\*[^*]*\\*+([^/*][^*]*\\*+)*\\//g;\nfunction parse(css, options = {}) {\n  let lineno = 1;\n  let column = 1;\n  function updatePosition(str) {\n    const lines = str.match(/\\n/g);\n    if (lines) {\n      lineno += lines.length;\n    }\n    const i = str.lastIndexOf(\"\\n\");\n    column = i === -1 ? column + str.length : str.length - i;\n  }\n  function position() {\n    const start = { line: lineno, column };\n    return (node) => {\n      node.position = new Position(start);\n      whitespace();\n      return node;\n    };\n  }\n  const _Position = class _Position {\n    constructor(start) {\n      __publicField(this, \"content\");\n      __publicField(this, \"start\");\n      __publicField(this, \"end\");\n      __publicField(this, \"source\");\n      this.start = start;\n      this.end = { line: lineno, column };\n      this.source = options.source;\n      this.content = _Position.content;\n    }\n  };\n  __publicField(_Position, \"content\");\n  let Position = _Position;\n  Position.content = css;\n  const errorsList = [];\n  function error(msg) {\n    const err = new Error(\n      `${options.source || \"\"}:${lineno}:${column}: ${msg}`\n    );\n    err.reason = msg;\n    err.filename = options.source;\n    err.line = lineno;\n    err.column = column;\n    err.source = css;\n    if (options.silent) {\n      errorsList.push(err);\n    } else {\n      throw err;\n    }\n  }\n  function stylesheet() {\n    const rulesList = rules();\n    return {\n      type: \"stylesheet\",\n      stylesheet: {\n        source: options.source,\n        rules: rulesList,\n        parsingErrors: errorsList\n      }\n    };\n  }\n  function open() {\n    return match(/^{\\s*/);\n  }\n  function close() {\n    return match(/^}/);\n  }\n  function rules() {\n    let node;\n    const rules2 = [];\n    whitespace();\n    comments(rules2);\n    while (css.length && css.charAt(0) !== \"}\" && (node = atrule() || rule())) {\n      if (node) {\n        rules2.push(node);\n        comments(rules2);\n      }\n    }\n    return rules2;\n  }\n  function match(re) {\n    const m = re.exec(css);\n    if (!m) {\n      return;\n    }\n    const str = m[0];\n    updatePosition(str);\n    css = css.slice(str.length);\n    return m;\n  }\n  function whitespace() {\n    match(/^\\s*/);\n  }\n  function comments(rules2 = []) {\n    let c;\n    while (c = comment()) {\n      if (c) {\n        rules2.push(c);\n      }\n      c = comment();\n    }\n    return rules2;\n  }\n  function comment() {\n    const pos = position();\n    if (\"/\" !== css.charAt(0) || \"*\" !== css.charAt(1)) {\n      return;\n    }\n    let i = 2;\n    while (\"\" !== css.charAt(i) && (\"*\" !== css.charAt(i) || \"/\" !== css.charAt(i + 1))) {\n      ++i;\n    }\n    i += 2;\n    if (\"\" === css.charAt(i - 1)) {\n      return error(\"End of comment missing\");\n    }\n    const str = css.slice(2, i - 2);\n    column += 2;\n    updatePosition(str);\n    css = css.slice(i);\n    column += 2;\n    return pos({\n      type: \"comment\",\n      comment: str\n    });\n  }\n  function selector() {\n    const m = match(/^([^{]+)/);\n    if (!m) {\n      return;\n    }\n    const splitSelectors = trim(m[0]).replace(/\\/\\*[\\s\\S]*?\\*\\/+/g, \"\").replace(/\"(?:\\\\\"|[^\"])*\"|'(?:\\\\'|[^'])*'/g, (m2) => {\n      return m2.replace(/,/g, \"‌\");\n    }).split(/\\s*(?![^(]*\\)),\\s*/);\n    if (splitSelectors.length <= 1) {\n      return splitSelectors.map((s) => {\n        return s.replace(/\\u200C/g, \",\");\n      });\n    }\n    let i = 0;\n    let j = 0;\n    const len = splitSelectors.length;\n    const finalSelectors = [];\n    while (i < len) {\n      const openingParensCount = (splitSelectors[i].match(/\\(/g) || []).length;\n      const closingParensCount = (splitSelectors[i].match(/\\)/g) || []).length;\n      let unbalancedParens = openingParensCount - closingParensCount;\n      if (unbalancedParens >= 1) {\n        let foundClosingSelector = false;\n        j = i + 1;\n        while (j < len) {\n          const nextOpeningParensCount = (splitSelectors[j].match(/\\(/g) || []).length;\n          const nextClosingParensCount = (splitSelectors[j].match(/\\)/g) || []).length;\n          const nextUnbalancedParens = nextClosingParensCount - nextOpeningParensCount;\n          if (nextUnbalancedParens === unbalancedParens) {\n            finalSelectors.push(splitSelectors.slice(i, j + 1).join(\",\"));\n            i = j + 1;\n            foundClosingSelector = true;\n            break;\n          }\n          j++;\n          unbalancedParens -= nextUnbalancedParens;\n        }\n        if (foundClosingSelector) {\n          continue;\n        }\n        splitSelectors.slice(i, len).forEach((selector2) => selector2 && finalSelectors.push(selector2));\n        break;\n      }\n      splitSelectors[i] && finalSelectors.push(splitSelectors[i]);\n      i++;\n    }\n    return finalSelectors.map((s) => {\n      return s.replace(/\\u200C/g, \",\");\n    });\n  }\n  function declaration() {\n    const pos = position();\n    const propMatch = match(/^(\\*?[-#\\/\\*\\\\\\w]+(\\[[0-9a-z_-]+\\])?)\\s*/);\n    if (!propMatch) {\n      return;\n    }\n    const prop = trim(propMatch[0]);\n    if (!match(/^:\\s*/)) {\n      return error(`property missing ':'`);\n    }\n    const val = match(/^((?:'(?:\\\\'|.)*?'|\"(?:\\\\\"|.)*?\"|\\([^\\)]*?\\)|[^};])+)/);\n    const ret = pos({\n      type: \"declaration\",\n      property: prop.replace(commentre, \"\"),\n      value: val ? trim(val[0]).replace(commentre, \"\") : \"\"\n    });\n    match(/^[;\\s]*/);\n    return ret;\n  }\n  function declarations() {\n    const decls = [];\n    if (!open()) {\n      return error(`missing '{'`);\n    }\n    comments(decls);\n    let decl;\n    while (decl = declaration()) {\n      if (decl !== false) {\n        decls.push(decl);\n        comments(decls);\n      }\n      decl = declaration();\n    }\n    if (!close()) {\n      return error(`missing '}'`);\n    }\n    return decls;\n  }\n  function keyframe() {\n    let m;\n    const vals = [];\n    const pos = position();\n    while (m = match(/^((\\d+\\.\\d+|\\.\\d+|\\d+)%?|[a-z]+)\\s*/)) {\n      vals.push(m[1]);\n      match(/^,\\s*/);\n    }\n    if (!vals.length) {\n      return;\n    }\n    return pos({\n      type: \"keyframe\",\n      values: vals,\n      declarations: declarations()\n    });\n  }\n  function atkeyframes() {\n    const pos = position();\n    let m = match(/^@([-\\w]+)?keyframes\\s*/);\n    if (!m) {\n      return;\n    }\n    const vendor = m[1];\n    m = match(/^([-\\w]+)\\s*/);\n    if (!m) {\n      return error(\"@keyframes missing name\");\n    }\n    const name = m[1];\n    if (!open()) {\n      return error(`@keyframes missing '{'`);\n    }\n    let frame;\n    let frames = comments();\n    while (frame = keyframe()) {\n      frames.push(frame);\n      frames = frames.concat(comments());\n    }\n    if (!close()) {\n      return error(`@keyframes missing '}'`);\n    }\n    return pos({\n      type: \"keyframes\",\n      name,\n      vendor,\n      keyframes: frames\n    });\n  }\n  function atsupports() {\n    const pos = position();\n    const m = match(/^@supports *([^{]+)/);\n    if (!m) {\n      return;\n    }\n    const supports = trim(m[1]);\n    if (!open()) {\n      return error(`@supports missing '{'`);\n    }\n    const style = comments().concat(rules());\n    if (!close()) {\n      return error(`@supports missing '}'`);\n    }\n    return pos({\n      type: \"supports\",\n      supports,\n      rules: style\n    });\n  }\n  function athost() {\n    const pos = position();\n    const m = match(/^@host\\s*/);\n    if (!m) {\n      return;\n    }\n    if (!open()) {\n      return error(`@host missing '{'`);\n    }\n    const style = comments().concat(rules());\n    if (!close()) {\n      return error(`@host missing '}'`);\n    }\n    return pos({\n      type: \"host\",\n      rules: style\n    });\n  }\n  function atmedia() {\n    const pos = position();\n    const m = match(/^@media *([^{]+)/);\n    if (!m) {\n      return;\n    }\n    const media = trim(m[1]);\n    if (!open()) {\n      return error(`@media missing '{'`);\n    }\n    const style = comments().concat(rules());\n    if (!close()) {\n      return error(`@media missing '}'`);\n    }\n    return pos({\n      type: \"media\",\n      media,\n      rules: style\n    });\n  }\n  function atcustommedia() {\n    const pos = position();\n    const m = match(/^@custom-media\\s+(--[^\\s]+)\\s*([^{;]+);/);\n    if (!m) {\n      return;\n    }\n    return pos({\n      type: \"custom-media\",\n      name: trim(m[1]),\n      media: trim(m[2])\n    });\n  }\n  function atpage() {\n    const pos = position();\n    const m = match(/^@page */);\n    if (!m) {\n      return;\n    }\n    const sel = selector() || [];\n    if (!open()) {\n      return error(`@page missing '{'`);\n    }\n    let decls = comments();\n    let decl;\n    while (decl = declaration()) {\n      decls.push(decl);\n      decls = decls.concat(comments());\n    }\n    if (!close()) {\n      return error(`@page missing '}'`);\n    }\n    return pos({\n      type: \"page\",\n      selectors: sel,\n      declarations: decls\n    });\n  }\n  function atdocument() {\n    const pos = position();\n    const m = match(/^@([-\\w]+)?document *([^{]+)/);\n    if (!m) {\n      return;\n    }\n    const vendor = trim(m[1]);\n    const doc = trim(m[2]);\n    if (!open()) {\n      return error(`@document missing '{'`);\n    }\n    const style = comments().concat(rules());\n    if (!close()) {\n      return error(`@document missing '}'`);\n    }\n    return pos({\n      type: \"document\",\n      document: doc,\n      vendor,\n      rules: style\n    });\n  }\n  function atfontface() {\n    const pos = position();\n    const m = match(/^@font-face\\s*/);\n    if (!m) {\n      return;\n    }\n    if (!open()) {\n      return error(`@font-face missing '{'`);\n    }\n    let decls = comments();\n    let decl;\n    while (decl = declaration()) {\n      decls.push(decl);\n      decls = decls.concat(comments());\n    }\n    if (!close()) {\n      return error(`@font-face missing '}'`);\n    }\n    return pos({\n      type: \"font-face\",\n      declarations: decls\n    });\n  }\n  const atimport = _compileAtrule(\"import\");\n  const atcharset = _compileAtrule(\"charset\");\n  const atnamespace = _compileAtrule(\"namespace\");\n  function _compileAtrule(name) {\n    const re = new RegExp(\n      \"^@\" + name + \"\\\\s*((?:\" + [\n        /[^\\\\]\"(?:\\\\\"|[^\"])*\"/.source,\n        // consume any quoted parts (checking that the double quote isn't itself escaped)\n        /[^\\\\]'(?:\\\\'|[^'])*'/.source,\n        // same but for single quotes\n        \"[^;]\"\n      ].join(\"|\") + \")+);\"\n    );\n    return () => {\n      const pos = position();\n      const m = match(re);\n      if (!m) {\n        return;\n      }\n      const ret = { type: name };\n      ret[name] = m[1].trim();\n      return pos(ret);\n    };\n  }\n  function atrule() {\n    if (css[0] !== \"@\") {\n      return;\n    }\n    return atkeyframes() || atmedia() || atcustommedia() || atsupports() || atimport() || atcharset() || atnamespace() || atdocument() || atpage() || athost() || atfontface();\n  }\n  function rule() {\n    const pos = position();\n    const sel = selector();\n    if (!sel) {\n      return error(\"selector missing\");\n    }\n    comments();\n    return pos({\n      type: \"rule\",\n      selectors: sel,\n      declarations: declarations()\n    });\n  }\n  return addParent(stylesheet());\n}\nfunction trim(str) {\n  return str ? str.replace(/^\\s+|\\s+$/g, \"\") : \"\";\n}\nfunction addParent(obj, parent) {\n  const isNode = obj && typeof obj.type === \"string\";\n  const childParent = isNode ? obj : parent;\n  for (const k of Object.keys(obj)) {\n    const value = obj[k];\n    if (Array.isArray(value)) {\n      value.forEach((v) => {\n        addParent(v, childParent);\n      });\n    } else if (value && typeof value === \"object\") {\n      addParent(value, childParent);\n    }\n  }\n  if (isNode) {\n    Object.defineProperty(obj, \"parent\", {\n      configurable: true,\n      writable: true,\n      enumerable: false,\n      value: parent || null\n    });\n  }\n  return obj;\n}\nconst tagMap = {\n  script: \"noscript\",\n  // camel case svg element tag names\n  altglyph: \"altGlyph\",\n  altglyphdef: \"altGlyphDef\",\n  altglyphitem: \"altGlyphItem\",\n  animatecolor: \"animateColor\",\n  animatemotion: \"animateMotion\",\n  animatetransform: \"animateTransform\",\n  clippath: \"clipPath\",\n  feblend: \"feBlend\",\n  fecolormatrix: \"feColorMatrix\",\n  fecomponenttransfer: \"feComponentTransfer\",\n  fecomposite: \"feComposite\",\n  feconvolvematrix: \"feConvolveMatrix\",\n  fediffuselighting: \"feDiffuseLighting\",\n  fedisplacementmap: \"feDisplacementMap\",\n  fedistantlight: \"feDistantLight\",\n  fedropshadow: \"feDropShadow\",\n  feflood: \"feFlood\",\n  fefunca: \"feFuncA\",\n  fefuncb: \"feFuncB\",\n  fefuncg: \"feFuncG\",\n  fefuncr: \"feFuncR\",\n  fegaussianblur: \"feGaussianBlur\",\n  feimage: \"feImage\",\n  femerge: \"feMerge\",\n  femergenode: \"feMergeNode\",\n  femorphology: \"feMorphology\",\n  feoffset: \"feOffset\",\n  fepointlight: \"fePointLight\",\n  fespecularlighting: \"feSpecularLighting\",\n  fespotlight: \"feSpotLight\",\n  fetile: \"feTile\",\n  feturbulence: \"feTurbulence\",\n  foreignobject: \"foreignObject\",\n  glyphref: \"glyphRef\",\n  lineargradient: \"linearGradient\",\n  radialgradient: \"radialGradient\"\n};\nfunction getTagName(n) {\n  let tagName = tagMap[n.tagName] ? tagMap[n.tagName] : n.tagName;\n  if (tagName === \"link\" && n.attributes._cssText) {\n    tagName = \"style\";\n  }\n  return tagName;\n}\nfunction escapeRegExp(str) {\n  return str.replace(/[.*+?^${}()|[\\]\\\\]/g, \"\\\\$&\");\n}\nconst HOVER_SELECTOR = /([^\\\\]):hover/;\nconst HOVER_SELECTOR_GLOBAL = new RegExp(HOVER_SELECTOR.source, \"g\");\nfunction addHoverClass(cssText, cache) {\n  const cachedStyle = cache?.stylesWithHoverClass.get(cssText);\n  if (cachedStyle) return cachedStyle;\n  if (cssText.length >= 1e6) {\n    return cssText;\n  }\n  const ast = parse(cssText, {\n    silent: true\n  });\n  if (!ast.stylesheet) {\n    return cssText;\n  }\n  const selectors = [];\n  ast.stylesheet.rules.forEach((rule) => {\n    if (\"selectors\" in rule) {\n      (rule.selectors || []).forEach((selector) => {\n        if (HOVER_SELECTOR.test(selector)) {\n          selectors.push(selector);\n        }\n      });\n    }\n  });\n  if (selectors.length === 0) {\n    return cssText;\n  }\n  const selectorMatcher = new RegExp(\n    selectors.filter((selector, index) => selectors.indexOf(selector) === index).sort((a, b) => b.length - a.length).map((selector) => {\n      return escapeRegExp(selector);\n    }).join(\"|\"),\n    \"g\"\n  );\n  const result = cssText.replace(selectorMatcher, (selector) => {\n    const newSelector = selector.replace(HOVER_SELECTOR_GLOBAL, \"$1.\\\\:hover\");\n    return `${selector}, ${newSelector}`;\n  });\n  cache?.stylesWithHoverClass.set(cssText, result);\n  return result;\n}\nfunction createCache() {\n  const stylesWithHoverClass = /* @__PURE__ */ new Map();\n  return {\n    stylesWithHoverClass\n  };\n}\nfunction buildNode(n, options) {\n  const { doc, hackCss, cache } = options;\n  switch (n.type) {\n    case NodeType.Document:\n      return doc.implementation.createDocument(null, \"\", null);\n    case NodeType.DocumentType:\n      return doc.implementation.createDocumentType(\n        n.name || \"html\",\n        n.publicId,\n        n.systemId\n      );\n    case NodeType.Element: {\n      const tagName = getTagName(n);\n      let node;\n      if (n.isSVG) {\n        node = doc.createElementNS(\"http://www.w3.org/2000/svg\", tagName);\n      } else {\n        if (\n          // If the tag name is a custom element name\n          n.isCustom && // If the browser supports custom elements\n          doc.defaultView?.customElements && // If the custom element hasn't been defined yet\n          !doc.defaultView.customElements.get(n.tagName)\n        )\n          try {\n            doc.defaultView.customElements.define(\n              n.tagName,\n              class extends doc.defaultView.HTMLElement {\n              }\n            );\n          } catch (e) {\n            console.warn(\"Cannot define custom element\", e);\n          }\n        node = doc.createElement(tagName);\n      }\n      const specialAttributes = {};\n      for (const name in n.attributes) {\n        if (!Object.prototype.hasOwnProperty.call(n.attributes, name)) {\n          continue;\n        }\n        let value = n.attributes[name];\n        if (tagName === \"option\" && name === \"selected\" && value === false) {\n          continue;\n        }\n        if (value === null) {\n          continue;\n        }\n        if (value === true) value = \"\";\n        if (name.startsWith(\"rr_\")) {\n          specialAttributes[name] = value;\n          continue;\n        }\n        const isTextarea = tagName === \"textarea\" && name === \"value\";\n        const isRemoteOrDynamicCss = tagName === \"style\" && name === \"_cssText\";\n        if (isRemoteOrDynamicCss && hackCss && typeof value === \"string\") {\n          value = addHoverClass(value, cache);\n        }\n        if ((isTextarea || isRemoteOrDynamicCss) && typeof value === \"string\") {\n          const child = doc.createTextNode(value);\n          for (const c of Array.from(node.childNodes)) {\n            if (c.nodeType === node.TEXT_NODE) {\n              node.removeChild(c);\n            }\n          }\n          node.appendChild(child);\n          continue;\n        }\n        try {\n          if (n.isSVG && name === \"xlink:href\") {\n            node.setAttributeNS(\n              \"http://www.w3.org/1999/xlink\",\n              name,\n              value.toString()\n            );\n          } else if (name === \"onload\" || name === \"onclick\" || name.substring(0, 7) === \"onmouse\") {\n            node.setAttribute(\"_\" + name, value.toString());\n          } else if (tagName === \"meta\" && n.attributes[\"http-equiv\"] === \"Content-Security-Policy\" && name === \"content\") {\n            node.setAttribute(\"csp-content\", value.toString());\n            continue;\n          } else if (tagName === \"link\" && (n.attributes.rel === \"preload\" || n.attributes.rel === \"modulepreload\")) {\n          } else if (tagName === \"link\" && n.attributes.rel === \"prefetch\" && typeof n.attributes.href === \"string\" && extractFileExtension(n.attributes.href) === \"js\") {\n          } else if (tagName === \"img\" && n.attributes.srcset && n.attributes.rr_dataURL) {\n            node.setAttribute(\n              \"rrweb-original-srcset\",\n              n.attributes.srcset\n            );\n          } else {\n            node.setAttribute(name, value.toString());\n          }\n        } catch (error) {\n        }\n      }\n      for (const name in specialAttributes) {\n        const value = specialAttributes[name];\n        if (tagName === \"canvas\" && name === \"rr_dataURL\") {\n          const image = doc.createElement(\"img\");\n          image.onload = () => {\n            const ctx = node.getContext(\"2d\");\n            if (ctx) {\n              ctx.drawImage(image, 0, 0, image.width, image.height);\n            }\n          };\n          image.src = value.toString();\n          if (node.RRNodeType)\n            node.rr_dataURL = value.toString();\n        } else if (tagName === \"img\" && name === \"rr_dataURL\") {\n          const image = node;\n          if (!image.currentSrc.startsWith(\"data:\")) {\n            image.setAttribute(\n              \"rrweb-original-src\",\n              n.attributes.src\n            );\n            image.src = value.toString();\n          }\n        }\n        if (name === \"rr_width\") {\n          node.style.setProperty(\"width\", value.toString());\n        } else if (name === \"rr_height\") {\n          node.style.setProperty(\"height\", value.toString());\n        } else if (name === \"rr_mediaCurrentTime\" && typeof value === \"number\") {\n          node.currentTime = value;\n        } else if (name === \"rr_mediaState\") {\n          switch (value) {\n            case \"played\":\n              node.play().catch((e) => console.warn(\"media playback error\", e));\n              break;\n            case \"paused\":\n              node.pause();\n              break;\n          }\n        }\n      }\n      if (n.isShadowHost) {\n        if (!node.shadowRoot) {\n          node.attachShadow({ mode: \"open\" });\n        } else {\n          while (node.shadowRoot.firstChild) {\n            node.shadowRoot.removeChild(node.shadowRoot.firstChild);\n          }\n        }\n      }\n      return node;\n    }\n    case NodeType.Text:\n      return doc.createTextNode(\n        n.isStyle && hackCss ? addHoverClass(n.textContent, cache) : n.textContent\n      );\n    case NodeType.CDATA:\n      if (!(doc instanceof XMLDocument)) {\n        return null;\n      }\n      return doc.createCDATASection(n.textContent);\n    case NodeType.Comment:\n      return doc.createComment(n.textContent);\n    default:\n      return null;\n  }\n}\nfunction buildNodeWithSN(n, options) {\n  const {\n    doc,\n    mirror,\n    skipChild = false,\n    hackCss = true,\n    afterAppend,\n    cache\n  } = options;\n  if (mirror.has(n.id)) {\n    const nodeInMirror = mirror.getNode(n.id);\n    const meta = mirror.getMeta(nodeInMirror);\n    if (isNodeMetaEqual(meta, n)) return mirror.getNode(n.id);\n  }\n  let node = buildNode(n, { doc, hackCss, cache });\n  if (!node) {\n    return null;\n  }\n  if (n.rootId && mirror.getNode(n.rootId) !== doc) {\n    mirror.replace(n.rootId, doc);\n  }\n  if (n.type === NodeType.Document) {\n    doc.close();\n    doc.open();\n    if (n.compatMode === \"BackCompat\" && n.childNodes && n.childNodes[0].type !== NodeType.DocumentType) {\n      if (n.childNodes[0].type === NodeType.Element && \"xmlns\" in n.childNodes[0].attributes && n.childNodes[0].attributes.xmlns === \"http://www.w3.org/1999/xhtml\") {\n        doc.write(\n          '<!DOCTYPE html PUBLIC \"-//W3C//DTD XHTML 1.0 Transitional//EN\" \"\">'\n        );\n      } else {\n        doc.write(\n          '<!DOCTYPE html PUBLIC \"-//W3C//DTD HTML 4.0 Transitional//EN\" \"\">'\n        );\n      }\n    }\n    node = doc;\n  }\n  mirror.add(node, n);\n  if ((n.type === NodeType.Document || n.type === NodeType.Element) && !skipChild) {\n    for (const childN of n.childNodes) {\n      const childNode = buildNodeWithSN(childN, {\n        doc,\n        mirror,\n        skipChild: false,\n        hackCss,\n        afterAppend,\n        cache\n      });\n      if (!childNode) {\n        console.warn(\"Failed to rebuild\", childN);\n        continue;\n      }\n      if (childN.isShadow && isElement(node) && node.shadowRoot) {\n        node.shadowRoot.appendChild(childNode);\n      } else if (n.type === NodeType.Document && childN.type == NodeType.Element) {\n        const htmlElement = childNode;\n        let body = null;\n        htmlElement.childNodes.forEach((child) => {\n          if (child.nodeName === \"BODY\") body = child;\n        });\n        if (body) {\n          htmlElement.removeChild(body);\n          node.appendChild(childNode);\n          htmlElement.appendChild(body);\n        } else {\n          node.appendChild(childNode);\n        }\n      } else {\n        node.appendChild(childNode);\n      }\n      if (afterAppend) {\n        afterAppend(childNode, childN.id);\n      }\n    }\n  }\n  return node;\n}\nfunction visit(mirror, onVisit) {\n  function walk(node) {\n    onVisit(node);\n  }\n  for (const id of mirror.getIds()) {\n    if (mirror.has(id)) {\n      walk(mirror.getNode(id));\n    }\n  }\n}\nfunction handleScroll(node, mirror) {\n  const n = mirror.getMeta(node);\n  if (n?.type !== NodeType.Element) {\n    return;\n  }\n  const el = node;\n  for (const name in n.attributes) {\n    if (!(Object.prototype.hasOwnProperty.call(n.attributes, name) && name.startsWith(\"rr_\"))) {\n      continue;\n    }\n    const value = n.attributes[name];\n    if (name === \"rr_scrollLeft\") {\n      el.scrollLeft = value;\n    }\n    if (name === \"rr_scrollTop\") {\n      el.scrollTop = value;\n    }\n  }\n}\nfunction rebuild(n, options) {\n  const {\n    doc,\n    onVisit,\n    hackCss = true,\n    afterAppend,\n    cache,\n    mirror = new Mirror()\n  } = options;\n  const node = buildNodeWithSN(n, {\n    doc,\n    mirror,\n    skipChild: false,\n    hackCss,\n    afterAppend,\n    cache\n  });\n  visit(mirror, (visitedNode) => {\n    if (onVisit) {\n      onVisit(visitedNode);\n    }\n    handleScroll(visitedNode, mirror);\n  });\n  return node;\n}\nexport {\n  IGNORED_NODE,\n  Mirror,\n  NodeType,\n  addHoverClass,\n  buildNodeWithSN,\n  classMatchesRegex,\n  cleanupSnapshot,\n  clearTimeout,\n  createCache,\n  createMatchPredicate,\n  createMirror,\n  distanceToMatch,\n  escapeImportStatement,\n  extractFileExtension,\n  filterCSSPropertiesFromInlineStyle,\n  fixAllCssProperty,\n  fixSafariColons,\n  genId,\n  getIFrameContentDocument,\n  getIFrameContentWindow,\n  getInputType,\n  getInputValue,\n  ignoreAttribute,\n  is2DCanvasBlank,\n  isCSSImportRule,\n  isCSSStyleRule,\n  isElement,\n  isNativeShadowDom,\n  isNodeMetaEqual,\n  isShadowRoot,\n  maskInputValue,\n  needMaskingText,\n  onRequestAnimationFrame,\n  rebuild,\n  serializeNodeWithId,\n  setTimeout,\n  shouldMaskInput,\n  snapshot,\n  stringifyRule,\n  stringifyStylesheet,\n  toLowerCase,\n  toUpperCase,\n  transformAttribute,\n  visitSnapshot\n};\n//# sourceMappingURL=rrweb-snapshot.js.map\n","// Note that these are the serialized attributes and not attributes directly on\n// the DOM Node. Attributes we are interested in:\nconst ATTRIBUTES_TO_RECORD = new Set([\n  'id',\n  'class',\n  'aria-label',\n  'role',\n  'name',\n  'alt',\n  'title',\n  'data-test-id',\n  'data-testid',\n  'disabled',\n  'aria-disabled',\n  'data-sentry-component',\n]);\n\n/**\n * Inclusion list of attributes that we want to record from the DOM element\n */\nexport function getAttributesToRecord(attributes: Record<string, unknown>): Record<string, unknown> {\n  const obj: Record<string, unknown> = {};\n  if (!attributes['data-sentry-component'] && attributes['data-sentry-element']) {\n    attributes['data-sentry-component'] = attributes['data-sentry-element'];\n  }\n  for (const key in attributes) {\n    if (ATTRIBUTES_TO_RECORD.has(key)) {\n      let normalizedKey = key;\n\n      if (key === 'data-testid' || key === 'data-test-id') {\n        normalizedKey = 'testId';\n      }\n\n      obj[normalizedKey] = attributes[key];\n    }\n  }\n\n  return obj;\n}\n","import { htmlTreeAsString } from '@sentry/browser-utils';\nimport type { Breadcrumb, HandlerDataDom } from '@sentry/core';\nimport { record } from '@sentry/rrweb';\nimport type { serializedElementNodeWithId, serializedNodeWithId } from '@sentry/rrweb-snapshot';\nimport { NodeType } from '@sentry/rrweb-snapshot';\nimport type { ReplayContainer } from '../types';\nimport { createBreadcrumb } from '../util/createBreadcrumb';\nimport { handleClick } from './handleClick';\nimport { addBreadcrumbEvent } from './util/addBreadcrumbEvent';\nimport { getClickTargetNode, getTargetNode } from './util/domUtils';\nimport { getAttributesToRecord } from './util/getAttributesToRecord';\n\nexport const handleDomListener: (replay: ReplayContainer) => (handlerData: HandlerDataDom) => void = (\n  replay: ReplayContainer,\n) => {\n  return (handlerData: HandlerDataDom): void => {\n    if (!replay.isEnabled()) {\n      return;\n    }\n\n    const result = handleDom(handlerData);\n\n    if (!result) {\n      return;\n    }\n\n    const isClick = handlerData.name === 'click';\n    const event = isClick ? (handlerData.event as PointerEvent) : undefined;\n    // Ignore clicks if ctrl/alt/meta/shift keys are held down as they alter behavior of clicks (e.g. open in new tab)\n    if (\n      isClick &&\n      replay.clickDetector &&\n      event?.target &&\n      !event.altKey &&\n      !event.metaKey &&\n      !event.ctrlKey &&\n      !event.shiftKey\n    ) {\n      handleClick(\n        replay.clickDetector,\n        result as Breadcrumb & { timestamp: number; data: { nodeId: number } },\n        getClickTargetNode(handlerData.event as Event) as HTMLElement,\n      );\n    }\n\n    addBreadcrumbEvent(replay, result);\n  };\n};\n\n/** Get the base DOM breadcrumb. */\nexport function getBaseDomBreadcrumb(target: Node | null, message: string): Breadcrumb {\n  const nodeId = record.mirror.getId(target);\n  const node = nodeId && record.mirror.getNode(nodeId);\n  const meta = node && record.mirror.getMeta(node);\n  const element = meta && isElement(meta) ? meta : null;\n\n  return {\n    message,\n    data: element\n      ? {\n          nodeId,\n          node: {\n            id: nodeId,\n            tagName: element.tagName,\n            textContent: Array.from(element.childNodes)\n              .map((node: serializedNodeWithId) => node.type === NodeType.Text && node.textContent)\n              .filter(Boolean) // filter out empty values\n              .map(text => (text as string).trim())\n              .join(''),\n            attributes: getAttributesToRecord(element.attributes),\n          },\n        }\n      : {},\n  };\n}\n\n/**\n * An event handler to react to DOM events.\n * Exported for tests.\n */\nexport function handleDom(handlerData: HandlerDataDom): Breadcrumb | null {\n  const { target, message } = getDomTarget(handlerData);\n\n  return createBreadcrumb({\n    category: `ui.${handlerData.name}`,\n    ...getBaseDomBreadcrumb(target, message),\n  });\n}\n\nfunction getDomTarget(handlerData: HandlerDataDom): { target: Node | null; message: string } {\n  const isClick = handlerData.name === 'click';\n\n  let message: string | undefined;\n  let target: Node | null = null;\n\n  // Accessing event.target can throw (see getsentry/raven-js#838, #768)\n  try {\n    target = isClick ? getClickTargetNode(handlerData.event as Event) : getTargetNode(handlerData.event as Event);\n    message = htmlTreeAsString(target, { maxStringLength: 200 }) || '<unknown>';\n  } catch {\n    message = '<unknown>';\n  }\n\n  return { target, message };\n}\n\nfunction isElement(node: serializedNodeWithId): node is serializedElementNodeWithId {\n  return node.type === NodeType.Element;\n}\n","import { browserPerformanceTimeOrigin } from '@sentry/core';\nimport { record } from '@sentry/rrweb';\nimport { WINDOW } from '../constants';\nimport type {\n  AllPerformanceEntry,\n  AllPerformanceEntryData,\n  ExperimentalPerformanceResourceTiming,\n  NavigationData,\n  PaintData,\n  ReplayContainer,\n  ReplayPerformanceEntry,\n  ResourceData,\n  WebVitalData,\n} from '../types';\n\n// Map entryType -> function to normalize data for event\nconst ENTRY_TYPES: Record<\n  string,\n  (entry: AllPerformanceEntry) => null | ReplayPerformanceEntry<AllPerformanceEntryData>\n> = {\n  // @ts-expect-error TODO: entry type does not fit the create* functions entry type\n  resource: createResourceEntry,\n  paint: createPaintEntry,\n  // @ts-expect-error TODO: entry type does not fit the create* functions entry type\n  navigation: createNavigationEntry,\n};\n\nexport interface Metric {\n  /**\n   * The current value of the metric.\n   */\n  value: number;\n\n  /**\n   * The rating as to whether the metric value is within the \"good\",\n   * \"needs improvement\", or \"poor\" thresholds of the metric.\n   */\n  rating: 'good' | 'needs-improvement' | 'poor';\n\n  /**\n   * Any performance entries relevant to the metric value calculation.\n   * The array may also be empty if the metric value was not based on any\n   * entries (e.g. a CLS value of 0 given no layout shifts).\n   */\n  entries: PerformanceEntry[] | LayoutShift[];\n}\n\ninterface LayoutShift extends PerformanceEntry {\n  value: number;\n  sources: LayoutShiftAttribution[];\n  hadRecentInput: boolean;\n}\n\ninterface LayoutShiftAttribution {\n  node?: Node;\n  previousRect: DOMRectReadOnly;\n  currentRect: DOMRectReadOnly;\n}\n\n/**\n * Handler creater for web vitals\n */\nexport function webVitalHandler(\n  getter: (metric: Metric) => ReplayPerformanceEntry<AllPerformanceEntryData>,\n  replay: ReplayContainer,\n): (data: { metric: Metric }) => void {\n  return ({ metric }) => void replay.replayPerformanceEntries.push(getter(metric));\n}\n\n/**\n * Create replay performance entries from the browser performance entries.\n */\nexport function createPerformanceEntries(\n  entries: AllPerformanceEntry[],\n): ReplayPerformanceEntry<AllPerformanceEntryData>[] {\n  return entries.map(createPerformanceEntry).filter(Boolean) as ReplayPerformanceEntry<AllPerformanceEntryData>[];\n}\n\nfunction createPerformanceEntry(entry: AllPerformanceEntry): ReplayPerformanceEntry<AllPerformanceEntryData> | null {\n  const entryType = ENTRY_TYPES[entry.entryType];\n  if (!entryType) {\n    return null;\n  }\n\n  return entryType(entry);\n}\n\nfunction getAbsoluteTime(time: number): number {\n  // browserPerformanceTimeOrigin can be undefined if `performance` or\n  // `performance.now` doesn't exist, but this is already checked by this integration\n  return ((browserPerformanceTimeOrigin() || WINDOW.performance.timeOrigin) + time) / 1000;\n}\n\nfunction createPaintEntry(entry: PerformancePaintTiming): ReplayPerformanceEntry<PaintData> {\n  const { duration, entryType, name, startTime } = entry;\n\n  const start = getAbsoluteTime(startTime);\n  return {\n    type: entryType,\n    name,\n    start,\n    end: start + duration,\n    data: undefined,\n  };\n}\n\nfunction createNavigationEntry(entry: PerformanceNavigationTiming): ReplayPerformanceEntry<NavigationData> | null {\n  const {\n    entryType,\n    name,\n    decodedBodySize,\n    duration,\n    domComplete,\n    encodedBodySize,\n    domContentLoadedEventStart,\n    domContentLoadedEventEnd,\n    domInteractive,\n    loadEventStart,\n    loadEventEnd,\n    redirectCount,\n    startTime,\n    transferSize,\n    type,\n  } = entry;\n\n  // Ignore entries with no duration, they do not seem to be useful and cause dupes\n  if (duration === 0) {\n    return null;\n  }\n\n  return {\n    type: `${entryType}.${type}`,\n    start: getAbsoluteTime(startTime),\n    end: getAbsoluteTime(domComplete),\n    name,\n    data: {\n      size: transferSize,\n      decodedBodySize,\n      encodedBodySize,\n      duration,\n      domInteractive,\n      domContentLoadedEventStart,\n      domContentLoadedEventEnd,\n      loadEventStart,\n      loadEventEnd,\n      domComplete,\n      redirectCount,\n    },\n  };\n}\n\nfunction createResourceEntry(\n  entry: ExperimentalPerformanceResourceTiming,\n): ReplayPerformanceEntry<ResourceData> | null {\n  const {\n    entryType,\n    initiatorType,\n    name,\n    responseEnd,\n    startTime,\n    decodedBodySize,\n    encodedBodySize,\n    responseStatus,\n    transferSize,\n  } = entry;\n\n  // Core SDK handles these\n  if (['fetch', 'xmlhttprequest'].includes(initiatorType)) {\n    return null;\n  }\n\n  return {\n    type: `${entryType}.${initiatorType}`,\n    start: getAbsoluteTime(startTime),\n    end: getAbsoluteTime(responseEnd),\n    name,\n    data: {\n      size: transferSize,\n      statusCode: responseStatus,\n      decodedBodySize,\n      encodedBodySize,\n    },\n  };\n}\n\n/**\n * Add a LCP event to the replay based on a LCP metric.\n */\nexport function getLargestContentfulPaint(metric: Metric): ReplayPerformanceEntry<WebVitalData> {\n  const lastEntry = metric.entries[metric.entries.length - 1] as (PerformanceEntry & { element?: Node }) | undefined;\n  const node = lastEntry?.element ? [lastEntry.element] : undefined;\n  return getWebVital(metric, 'largest-contentful-paint', node);\n}\n\nfunction isLayoutShift(entry: PerformanceEntry): entry is LayoutShift {\n  return (entry as LayoutShift).sources !== undefined;\n}\n\n/**\n * Add a CLS event to the replay based on a CLS metric.\n */\nexport function getCumulativeLayoutShift(metric: Metric): ReplayPerformanceEntry<WebVitalData> {\n  const layoutShifts: WebVitalData['attributions'] = [];\n  const nodes: Node[] = [];\n  for (const entry of metric.entries) {\n    if (isLayoutShift(entry)) {\n      const nodeIds = [];\n      for (const source of entry.sources) {\n        if (source.node) {\n          nodes.push(source.node);\n          const nodeId = record.mirror.getId(source.node);\n          if (nodeId) {\n            nodeIds.push(nodeId);\n          }\n        }\n      }\n      layoutShifts.push({ value: entry.value, nodeIds: nodeIds.length ? nodeIds : undefined });\n    }\n  }\n\n  return getWebVital(metric, 'cumulative-layout-shift', nodes, layoutShifts);\n}\n\n/**\n * Add an INP event to the replay based on an INP metric.\n */\nexport function getInteractionToNextPaint(metric: Metric): ReplayPerformanceEntry<WebVitalData> {\n  const lastEntry = metric.entries[metric.entries.length - 1] as (PerformanceEntry & { target?: Node }) | undefined;\n  const node = lastEntry?.target ? [lastEntry.target] : undefined;\n  return getWebVital(metric, 'interaction-to-next-paint', node);\n}\n\n/**\n * Add an web vital event to the replay based on the web vital metric.\n */\nfunction getWebVital(\n  metric: Metric,\n  name: string,\n  nodes: Node[] | undefined,\n  attributions?: WebVitalData['attributions'],\n): ReplayPerformanceEntry<WebVitalData> {\n  const value = metric.value;\n  const rating = metric.rating;\n\n  const end = getAbsoluteTime(value);\n\n  return {\n    type: 'web-vital',\n    name,\n    start: end,\n    end,\n    data: {\n      value,\n      size: value,\n      rating,\n      nodeIds: nodes ? nodes.map(node => record.mirror.getId(node)) : undefined,\n      attributions,\n    },\n  };\n}\n","import type { ConsoleLevel, SeverityLevel } from '@sentry/core';\nimport { addBreadcrumb, captureException, debug as coreDebug, severityLevelFromString } from '@sentry/core';\nimport { DEBUG_BUILD } from '../debug-build';\n\ntype ReplayConsoleLevels = Extract<ConsoleLevel, 'log' | 'warn' | 'error'>;\nconst CONSOLE_LEVELS: readonly ReplayConsoleLevels[] = ['log', 'warn', 'error'] as const;\nconst PREFIX = '[Replay] ';\n\ninterface LoggerConfig {\n  captureExceptions: boolean;\n  traceInternals: boolean;\n}\n\ntype CoreDebugLogger = typeof coreDebug;\n\ninterface ReplayDebugLogger extends CoreDebugLogger {\n  /**\n   * Calls `debug.log` but saves breadcrumb in the next tick due to race\n   * conditions before replay is initialized.\n   */\n  infoTick: CoreDebugLogger['log'];\n  /**\n   * Captures exceptions (`Error`) if \"capture internal exceptions\" is enabled\n   */\n  exception: CoreDebugLogger['error'];\n  /**\n   * Configures the logger with additional debugging behavior\n   */\n  setConfig(config: Partial<LoggerConfig>): void;\n}\n\nfunction _addBreadcrumb(message: unknown, level: SeverityLevel = 'info'): void {\n  addBreadcrumb(\n    {\n      category: 'console',\n      data: {\n        logger: 'replay',\n      },\n      level,\n      message: `${PREFIX}${message}`,\n    },\n    { level },\n  );\n}\n\nfunction makeReplayDebugLogger(): ReplayDebugLogger {\n  let _capture = false;\n  let _trace = false;\n\n  const _debug: Partial<ReplayDebugLogger> = {\n    exception: () => undefined,\n    infoTick: () => undefined,\n    setConfig: (opts: Partial<LoggerConfig>) => {\n      _capture = !!opts.captureExceptions;\n      _trace = !!opts.traceInternals;\n    },\n  };\n\n  if (DEBUG_BUILD) {\n    CONSOLE_LEVELS.forEach(name => {\n      _debug[name] = (...args: unknown[]) => {\n        coreDebug[name](PREFIX, ...args);\n        if (_trace) {\n          _addBreadcrumb(args.join(''), severityLevelFromString(name));\n        }\n      };\n    });\n\n    _debug.exception = (error: unknown, ...message: unknown[]) => {\n      if (message.length && _debug.error) {\n        _debug.error(...message);\n      }\n\n      coreDebug.error(PREFIX, error);\n\n      if (_capture) {\n        captureException(error, {\n          mechanism: {\n            handled: true,\n            type: 'auto.function.replay.debug',\n          },\n        });\n      } else if (_trace) {\n        // No need for a breadcrumb if `_capture` is enabled since it should be\n        // captured as an exception\n        _addBreadcrumb(error, 'error');\n      }\n    };\n\n    _debug.infoTick = (...args: unknown[]) => {\n      coreDebug.log(PREFIX, ...args);\n      if (_trace) {\n        // Wait a tick here to avoid race conditions for some initial logs\n        // which may be added before replay is initialized\n        setTimeout(() => _addBreadcrumb(args[0]), 0);\n      }\n    };\n  } else {\n    CONSOLE_LEVELS.forEach(name => {\n      _debug[name] = () => undefined;\n    });\n  }\n\n  return _debug as ReplayDebugLogger;\n}\n\nexport const debug = makeReplayDebugLogger();\n","import { REPLAY_MAX_EVENT_BUFFER_SIZE } from '../constants';\n\n/** This error indicates that the event buffer size exceeded the limit.. */\nexport class EventBufferSizeExceededError extends Error {\n  public constructor() {\n    super(`Event buffer exceeded maximum size of ${REPLAY_MAX_EVENT_BUFFER_SIZE}.`);\n  }\n}\n\n/** This error indicates that the compression worker was intentionally destroyed (e.g. on session expiry). */\nexport class WorkerDestroyedError extends Error {\n  public constructor() {\n    super('Worker destroyed');\n  }\n}\n","import { REPLAY_MAX_EVENT_BUFFER_SIZE } from '../constants';\nimport type { AddEventResult, EventBuffer, EventBufferType, RecordingEvent } from '../types';\nimport { timestampToMs } from '../util/timestamp';\nimport { EventBufferSizeExceededError } from './error';\n\n/**\n * A basic event buffer that does not do any compression.\n * Used as fallback if the compression worker cannot be loaded or is disabled.\n */\nexport class EventBufferArray implements EventBuffer {\n  /** All the events that are buffered to be sent. */\n  public events: RecordingEvent[];\n\n  /** @inheritdoc */\n  public hasCheckout: boolean;\n\n  /** @inheritdoc */\n  public waitForCheckout: boolean;\n\n  private _totalSize: number;\n\n  public constructor() {\n    this.events = [];\n    this._totalSize = 0;\n    this.hasCheckout = false;\n    this.waitForCheckout = false;\n  }\n\n  /** @inheritdoc */\n  public get hasEvents(): boolean {\n    return this.events.length > 0;\n  }\n\n  /** @inheritdoc */\n  public get type(): EventBufferType {\n    return 'sync';\n  }\n\n  /** @inheritdoc */\n  public destroy(): void {\n    this.events = [];\n  }\n\n  /** @inheritdoc */\n  public async addEvent(event: RecordingEvent): Promise<AddEventResult> {\n    const eventSize = JSON.stringify(event).length;\n    this._totalSize += eventSize;\n    if (this._totalSize > REPLAY_MAX_EVENT_BUFFER_SIZE) {\n      throw new EventBufferSizeExceededError();\n    }\n\n    this.events.push(event);\n  }\n\n  /** @inheritdoc */\n  public finish(): Promise<string> {\n    return new Promise<string>(resolve => {\n      // Make a copy of the events array reference and immediately clear the\n      // events member so that we do not lose new events while uploading\n      // attachment.\n      const eventsRet = this.events;\n      this.clear();\n      resolve(JSON.stringify(eventsRet));\n    });\n  }\n\n  /** @inheritdoc */\n  public clear(): void {\n    this.events = [];\n    this._totalSize = 0;\n    this.hasCheckout = false;\n  }\n\n  /** @inheritdoc */\n  public getEarliestTimestamp(): number | null {\n    let ts: number | null = null;\n    for (const { timestamp } of this.events) {\n      if (ts === null || timestamp < ts) ts = timestamp;\n    }\n    return ts === null ? ts : timestampToMs(ts);\n  }\n}\n","import { DEBUG_BUILD } from '../debug-build';\nimport type { WorkerRequest, WorkerResponse } from '../types';\nimport { debug } from '../util/logger';\nimport { WorkerDestroyedError } from './error';\n\ninterface PendingRequest {\n  method: WorkerRequest['method'];\n  resolve: (value: unknown) => void;\n  reject: (reason: unknown) => void;\n}\n\n/**\n * Event buffer that uses a web worker to compress events.\n * Exported only for testing.\n */\nexport class WorkerHandler {\n  private _worker: Worker;\n  private _id: number;\n  private _ensureReadyPromise?: Promise<void>;\n  private _pending: Map<number, PendingRequest>;\n\n  public constructor(worker: Worker) {\n    this._worker = worker;\n    this._id = 0;\n    this._pending = new Map();\n    // A single long-lived listener routes responses by id. Per-request\n    // listeners would make worker dispatch O(n) per response, so a burst of N\n    // in-flight requests becomes O(n^2) main-thread work.\n    this._worker.addEventListener('message', this._onMessage);\n  }\n\n  /**\n   * Ensure the worker is ready (or not).\n   * This will either resolve when the worker is ready, or reject if an error occurred.\n   */\n  public ensureReady(): Promise<void> {\n    // Ensure we only check once\n    if (this._ensureReadyPromise) {\n      return this._ensureReadyPromise;\n    }\n\n    this._ensureReadyPromise = new Promise((resolve, reject) => {\n      this._worker.addEventListener(\n        'message',\n        ({ data }: MessageEvent) => {\n          if ((data as WorkerResponse).success) {\n            resolve();\n          } else {\n            DEBUG_BUILD && debug.warn('Received worker message with unsuccessful status', data);\n            reject(new Error('Received worker message with unsuccessful status'));\n          }\n        },\n        { once: true },\n      );\n\n      this._worker.addEventListener(\n        'error',\n        error => {\n          DEBUG_BUILD && debug.warn('Failed to load Replay compression worker', error);\n          reject(\n            new Error(\n              `Failed to load Replay compression worker: ${error instanceof ErrorEvent && error.message ? error.message : 'Unknown error. This can happen due to CSP policy restrictions, network issues, or the worker script failing to load.'}`,\n            ),\n          );\n        },\n        { once: true },\n      );\n    });\n\n    return this._ensureReadyPromise;\n  }\n\n  /**\n   * Destroy the worker.\n   */\n  public destroy(): void {\n    DEBUG_BUILD && debug.log('Destroying compression worker');\n    this._worker.removeEventListener('message', this._onMessage);\n    this._pending.forEach(pending => pending.reject(new WorkerDestroyedError()));\n    this._pending.clear();\n    this._worker.terminate();\n  }\n\n  /**\n   * Post message to worker and wait for response before resolving promise.\n   */\n  public postMessage<T>(method: WorkerRequest['method'], arg?: WorkerRequest['arg']): Promise<T> {\n    const id = this._getAndIncrementId();\n\n    return new Promise<T>((resolve, reject) => {\n      this._pending.set(id, {\n        method,\n        resolve: resolve as (value: unknown) => void,\n        reject,\n      });\n      try {\n        this._worker.postMessage({ id, method, arg });\n      } catch (error) {\n        // If postMessage throws synchronously (e.g. DataCloneError, worker\n        // already terminated), drop the pending entry so it doesn't leak.\n        this._pending.delete(id);\n        reject(error);\n      }\n    });\n  }\n\n  private _onMessage = ({ data }: MessageEvent): void => {\n    const response = data as WorkerResponse;\n    // The worker emits an init message with `id: undefined` on load, which is\n    // handled by `ensureReady()` via its own listener. Ignore anything that\n    // doesn't carry a numeric id we issued.\n    if (typeof response.id !== 'number') {\n      return;\n    }\n    const pending = this._pending.get(response.id);\n    if (!pending || pending.method !== response.method) {\n      return;\n    }\n\n    this._pending.delete(response.id);\n\n    if (!response.success) {\n      DEBUG_BUILD && debug.error('Error in compression worker: ', response.response);\n      pending.reject(new Error('Error in compression worker'));\n      return;\n    }\n\n    pending.resolve(response.response);\n  };\n\n  /** Get the current ID and increment it for the next call. */\n  private _getAndIncrementId(): number {\n    return this._id++;\n  }\n}\n","import type { ReplayRecordingData } from '@sentry/core';\nimport { REPLAY_MAX_EVENT_BUFFER_SIZE } from '../constants';\nimport { DEBUG_BUILD } from '../debug-build';\nimport type { AddEventResult, EventBuffer, EventBufferType, RecordingEvent } from '../types';\nimport { debug } from '../util/logger';\nimport { timestampToMs } from '../util/timestamp';\nimport { EventBufferSizeExceededError } from './error';\nimport { WorkerHandler } from './WorkerHandler';\n\n/**\n * Event buffer that uses a web worker to compress events.\n * Exported only for testing.\n */\nexport class EventBufferCompressionWorker implements EventBuffer {\n  /** @inheritdoc */\n  public hasCheckout: boolean;\n\n  /** @inheritdoc */\n  public waitForCheckout: boolean;\n\n  private _worker: WorkerHandler;\n  private _earliestTimestamp: number | null;\n  private _totalSize;\n\n  public constructor(worker: Worker) {\n    this._worker = new WorkerHandler(worker);\n    this._earliestTimestamp = null;\n    this._totalSize = 0;\n    this.hasCheckout = false;\n    this.waitForCheckout = false;\n  }\n\n  /** @inheritdoc */\n  public get hasEvents(): boolean {\n    return !!this._earliestTimestamp;\n  }\n\n  /** @inheritdoc */\n  public get type(): EventBufferType {\n    return 'worker';\n  }\n\n  /**\n   * Ensure the worker is ready (or not).\n   * This will either resolve when the worker is ready, or reject if an error occurred.\n   */\n  public ensureReady(): Promise<void> {\n    return this._worker.ensureReady();\n  }\n\n  /**\n   * Destroy the event buffer.\n   */\n  public destroy(): void {\n    this._worker.destroy();\n  }\n\n  /**\n   * Add an event to the event buffer.\n   *\n   * Returns true if event was successfully received and processed by worker.\n   */\n  public addEvent(event: RecordingEvent): Promise<AddEventResult> {\n    const timestamp = timestampToMs(event.timestamp);\n    if (!this._earliestTimestamp || timestamp < this._earliestTimestamp) {\n      this._earliestTimestamp = timestamp;\n    }\n\n    const data = JSON.stringify(event);\n    this._totalSize += data.length;\n\n    if (this._totalSize > REPLAY_MAX_EVENT_BUFFER_SIZE) {\n      return Promise.reject(new EventBufferSizeExceededError());\n    }\n\n    return this._sendEventToWorker(data);\n  }\n\n  /**\n   * Finish the event buffer and return the compressed data.\n   */\n  public finish(): Promise<ReplayRecordingData> {\n    return this._finishRequest();\n  }\n\n  /** @inheritdoc */\n  public clear(): void {\n    this._earliestTimestamp = null;\n    this._totalSize = 0;\n    this.hasCheckout = false;\n\n    // We do not wait on this, as we assume the order of messages is consistent for the worker\n    this._worker.postMessage('clear').then(null, e => {\n      DEBUG_BUILD && debug.exception(e, 'Sending \"clear\" message to worker failed', e);\n    });\n  }\n\n  /** @inheritdoc */\n  public getEarliestTimestamp(): number | null {\n    return this._earliestTimestamp;\n  }\n\n  /**\n   * Send the event to the worker.\n   */\n  private _sendEventToWorker(data: string): Promise<AddEventResult> {\n    return this._worker.postMessage<void>('addEvent', data);\n  }\n\n  /**\n   * Finish the request and return the compressed data from the worker.\n   */\n  private async _finishRequest(): Promise<Uint8Array> {\n    const response = await this._worker.postMessage<Uint8Array>('finish');\n\n    this._earliestTimestamp = null;\n    this._totalSize = 0;\n\n    return response;\n  }\n}\n","import type { ReplayRecordingData } from '@sentry/core';\nimport { DEBUG_BUILD } from '../debug-build';\nimport type { AddEventResult, EventBuffer, EventBufferType, RecordingEvent } from '../types';\nimport { debug } from '../util/logger';\nimport { EventBufferArray } from './EventBufferArray';\nimport { EventBufferCompressionWorker } from './EventBufferCompressionWorker';\nimport { WorkerDestroyedError } from './error';\n\n/**\n * This proxy will try to use the compression worker, and fall back to use the simple buffer if an error occurs there.\n * This can happen e.g. if the worker cannot be loaded.\n * Exported only for testing.\n */\nexport class EventBufferProxy implements EventBuffer {\n  private _fallback: EventBufferArray;\n  private _compression: EventBufferCompressionWorker;\n  private _used: EventBuffer;\n  private _ensureWorkerIsLoadedPromise: Promise<void>;\n\n  public constructor(worker: Worker) {\n    this._fallback = new EventBufferArray();\n    this._compression = new EventBufferCompressionWorker(worker);\n    this._used = this._fallback;\n\n    this._ensureWorkerIsLoadedPromise = this._ensureWorkerIsLoaded();\n  }\n\n  /** @inheritdoc */\n  public get waitForCheckout(): boolean {\n    return this._used.waitForCheckout;\n  }\n\n  /** @inheritdoc */\n  public get type(): EventBufferType {\n    return this._used.type;\n  }\n\n  /** @inheritDoc */\n  public get hasEvents(): boolean {\n    return this._used.hasEvents;\n  }\n\n  /** @inheritdoc */\n  public get hasCheckout(): boolean {\n    return this._used.hasCheckout;\n  }\n  /** @inheritdoc */\n  public set hasCheckout(value: boolean) {\n    this._used.hasCheckout = value;\n  }\n\n  /** @inheritdoc */\n  // eslint-disable-next-line @typescript-eslint/adjacent-overload-signatures\n  public set waitForCheckout(value: boolean) {\n    this._used.waitForCheckout = value;\n  }\n\n  /** @inheritDoc */\n  public destroy(): void {\n    this._fallback.destroy();\n    this._compression.destroy();\n  }\n\n  /** @inheritdoc */\n  public clear(): void {\n    return this._used.clear();\n  }\n\n  /** @inheritdoc */\n  public getEarliestTimestamp(): number | null {\n    return this._used.getEarliestTimestamp();\n  }\n\n  /**\n   * Add an event to the event buffer.\n   *\n   * Returns true if event was successfully added.\n   */\n  public addEvent(event: RecordingEvent): Promise<AddEventResult> {\n    return this._used.addEvent(event);\n  }\n\n  /** @inheritDoc */\n  public async finish(): Promise<ReplayRecordingData> {\n    // Ensure the worker is loaded, so the sent event is compressed\n    await this.ensureWorkerIsLoaded();\n\n    return this._used.finish();\n  }\n\n  /** Ensure the worker has loaded. */\n  public ensureWorkerIsLoaded(): Promise<void> {\n    return this._ensureWorkerIsLoadedPromise;\n  }\n\n  /** Actually check if the worker has been loaded. */\n  private async _ensureWorkerIsLoaded(): Promise<void> {\n    try {\n      await this._compression.ensureReady();\n    } catch (error) {\n      // If the worker fails to load, we fall back to the simple buffer.\n      // Nothing more to do from our side here\n      DEBUG_BUILD && debug.exception(error, 'Failed to load the compression worker, falling back to simple buffer');\n      return;\n    }\n\n    // Now we need to switch over the array buffer to the compression worker\n    await this._switchToCompressionWorker();\n  }\n\n  /** Switch the used buffer to the compression worker. */\n  private async _switchToCompressionWorker(): Promise<void> {\n    const { events, hasCheckout, waitForCheckout } = this._fallback;\n\n    const addEventPromises: Promise<void>[] = [];\n    for (const event of events) {\n      addEventPromises.push(this._compression.addEvent(event));\n    }\n\n    this._compression.hasCheckout = hasCheckout;\n    this._compression.waitForCheckout = waitForCheckout;\n\n    // We switch over to the new buffer immediately - any further events will be added\n    // after the previously buffered ones\n    this._used = this._compression;\n\n    // Wait for original events to be re-added before resolving\n    try {\n      await Promise.all(addEventPromises);\n\n      // Can now clear fallback buffer as it's no longer necessary\n      this._fallback.clear();\n    } catch (error) {\n      // Destroying the worker (e.g. when the session expires) rejects the\n      // in-flight requests. This is expected teardown, not a failure.\n      if (error instanceof WorkerDestroyedError) {\n        return;\n      }\n      DEBUG_BUILD && debug.exception(error, 'Failed to add events when switching buffers.');\n    }\n  }\n}\n","import { WINDOW } from '../constants';\n\n/** If sessionStorage is available. */\nexport function hasSessionStorage(): boolean {\n  try {\n    // This can throw, e.g. when being accessed in a sandboxed iframe\n    return 'sessionStorage' in WINDOW && !!WINDOW.sessionStorage;\n  } catch {\n    return false;\n  }\n}\n","/**\n * Given a sample rate, returns true if replay should be sampled.\n *\n * 1.0 = 100% sampling\n * 0.0 = 0% sampling\n */\nexport function isSampled(sampleRate?: number): boolean {\n  if (sampleRate === undefined) {\n    return false;\n  }\n\n  // Math.random() returns a number in range of 0 to 1 (inclusive of 0, but not 1)\n  return Math.random() < sampleRate;\n}\n","import { REPLAY_SESSION_KEY, WINDOW } from '../constants';\nimport type { Session } from '../types';\nimport { hasSessionStorage } from '../util/hasSessionStorage';\n\n/**\n * Save a session to session storage.\n */\nexport function saveSession(session: Session): void {\n  if (!hasSessionStorage()) {\n    return;\n  }\n\n  try {\n    WINDOW.sessionStorage.setItem(REPLAY_SESSION_KEY, JSON.stringify(session));\n  } catch {\n    // Ignore potential SecurityError exceptions\n  }\n}\n","import { uuid4 } from '@sentry/core';\nimport type { Sampled, Session } from '../types';\n\n/**\n * Get a session with defaults & applied sampling.\n */\nexport function makeSession(session: Partial<Session> & { sampled: Sampled }): Session {\n  const now = Date.now();\n  const id = session.id || uuid4();\n  // Note that this means we cannot set a started/lastActivity of `0`, but this should not be relevant outside of tests.\n  const started = session.started || now;\n  const lastActivity = session.lastActivity || now;\n  const segmentId = session.segmentId || 0;\n  const sampled = session.sampled;\n  const previousSessionId = session.previousSessionId;\n  const dirty = session.dirty || false;\n\n  return {\n    id,\n    started,\n    lastActivity,\n    segmentId,\n    sampled,\n    previousSessionId,\n    dirty,\n  };\n}\n","import type { Sampled, Session, SessionOptions } from '../types';\nimport { isSampled } from '../util/isSampled';\nimport { saveSession } from './saveSession';\nimport { makeSession } from './Session';\n\n/**\n * Get the sampled status for a session based on sample rates & current sampled status.\n */\nexport function getSessionSampleType(sessionSampleRate: number, allowBuffering: boolean): Sampled {\n  return isSampled(sessionSampleRate) ? 'session' : allowBuffering ? 'buffer' : false;\n}\n\n/**\n * Create a new session, which in its current implementation is a Sentry event\n * that all replays will be saved to as attachments. Currently, we only expect\n * one of these Sentry events per \"replay session\".\n */\nexport function createSession(\n  { sessionSampleRate, allowBuffering, stickySession = false }: SessionOptions,\n  { previousSessionId }: { previousSessionId?: string } = {},\n): Session {\n  const sampled = getSessionSampleType(sessionSampleRate, allowBuffering);\n  const session = makeSession({\n    sampled,\n    previousSessionId,\n  });\n\n  if (stickySession) {\n    saveSession(session);\n  }\n\n  return session;\n}\n","/**\n * Given an initial timestamp and an expiry duration, checks to see if current\n * time should be considered as expired.\n */\nexport function isExpired(\n  initialTime: null | number,\n  expiry: undefined | number,\n  targetTime: number = +new Date(),\n): boolean {\n  // Always expired if < 0\n  if (initialTime === null || expiry === undefined || expiry < 0) {\n    return true;\n  }\n\n  // Never expires if == 0\n  if (expiry === 0) {\n    return false;\n  }\n\n  return initialTime + expiry <= targetTime;\n}\n","import type { Session } from '../types';\nimport { isSessionExpired } from '../util/isSessionExpired';\n\n/** If the session should be refreshed or not. */\nexport function shouldRefreshSession(\n  session: Session,\n  { sessionIdleExpire, maxReplayDuration }: { sessionIdleExpire: number; maxReplayDuration: number },\n): boolean {\n  // If not expired, all good, just keep the session\n  if (!isSessionExpired(session, { sessionIdleExpire, maxReplayDuration })) {\n    return false;\n  }\n\n  // If we are buffering & haven't ever flushed yet, always continue\n  if (session.sampled === 'buffer' && session.segmentId === 0) {\n    return false;\n  }\n\n  return true;\n}\n","import type { Session } from '../types';\nimport { isExpired } from './isExpired';\n\n/**\n * Checks to see if session is expired\n */\nexport function isSessionExpired(\n  session: Session,\n  {\n    maxReplayDuration,\n    sessionIdleExpire,\n    targetTime = Date.now(),\n  }: { maxReplayDuration: number; sessionIdleExpire: number; targetTime?: number },\n): boolean {\n  return (\n    // First, check that maximum session length has not been exceeded\n    isExpired(session.started, maxReplayDuration, targetTime) ||\n    // check that the idle timeout has not been exceeded (i.e. user has\n    // performed an action within the last `sessionIdleExpire` ms)\n    isExpired(session.lastActivity, sessionIdleExpire, targetTime)\n  );\n}\n","import { DEBUG_BUILD } from '../debug-build';\nimport type { Session, SessionOptions } from '../types';\nimport { debug } from '../util/logger';\nimport { createSession } from './createSession';\nimport { fetchSession } from './fetchSession';\nimport { shouldRefreshSession } from './shouldRefreshSession';\n\n/**\n * Get or create a session, when initializing the replay.\n * Returns a session that may be unsampled.\n */\nexport function loadOrCreateSession(\n  {\n    sessionIdleExpire,\n    maxReplayDuration,\n    previousSessionId,\n  }: {\n    sessionIdleExpire: number;\n    maxReplayDuration: number;\n    previousSessionId?: string;\n  },\n  sessionOptions: SessionOptions,\n): Session {\n  const existingSession = sessionOptions.stickySession && fetchSession();\n\n  // No session exists yet, just create a new one\n  if (!existingSession) {\n    DEBUG_BUILD && debug.infoTick('Creating new session');\n    return createSession(sessionOptions, { previousSessionId });\n  }\n\n  if (!shouldRefreshSession(existingSession, { sessionIdleExpire, maxReplayDuration })) {\n    return existingSession;\n  }\n\n  DEBUG_BUILD && debug.infoTick('Session in sessionStorage is expired, creating new one...');\n  return createSession(sessionOptions, { previousSessionId: existingSession.id });\n}\n","import { REPLAY_SESSION_KEY, WINDOW } from '../constants';\nimport { DEBUG_BUILD } from '../debug-build';\nimport type { Session } from '../types';\nimport { hasSessionStorage } from '../util/hasSessionStorage';\nimport { debug } from '../util/logger';\nimport { makeSession } from './Session';\n\n/**\n * Fetches a session from storage\n */\nexport function fetchSession(): Session | null {\n  if (!hasSessionStorage()) {\n    return null;\n  }\n\n  try {\n    // This can throw if cookies are disabled\n    const sessionStringFromStorage = WINDOW.sessionStorage.getItem(REPLAY_SESSION_KEY);\n\n    if (!sessionStringFromStorage) {\n      return null;\n    }\n\n    const sessionObj = JSON.parse(sessionStringFromStorage) as Session;\n\n    DEBUG_BUILD && debug.infoTick('Loading existing session');\n\n    return makeSession(sessionObj);\n  } catch {\n    return null;\n  }\n}\n","import { getClient } from '@sentry/core';\nimport { EventType } from '@sentry/rrweb';\nimport { DEBUG_BUILD } from '../debug-build';\nimport { EventBufferSizeExceededError } from '../eventBuffer/error';\nimport type { AddEventResult, RecordingEvent, ReplayContainer, ReplayFrameEvent, ReplayPluginOptions } from '../types';\nimport { debug } from './logger';\nimport { timestampToMs } from './timestamp';\n\nfunction isCustomEvent(event: RecordingEvent): event is ReplayFrameEvent {\n  return event.type === EventType.Custom;\n}\n\n/**\n * Add an event to the event buffer.\n * In contrast to `addEvent`, this does not return a promise & does not wait for the adding of the event to succeed/fail.\n * Instead this returns `true` if we tried to add the event, else false.\n * It returns `false` e.g. if we are paused, disabled, or out of the max replay duration.\n *\n * `isCheckout` is true if this is either the very first event, or an event triggered by `checkoutEveryNms`.\n */\nexport function addEventSync(replay: ReplayContainer, event: RecordingEvent, isCheckout?: boolean): boolean {\n  if (!shouldAddEvent(replay, event)) {\n    return false;\n  }\n\n  // This should never reject\n  // eslint-disable-next-line @typescript-eslint/no-floating-promises\n  _addEvent(replay, event, isCheckout);\n\n  return true;\n}\n\n/**\n * Add an event to the event buffer.\n * Resolves to `null` if no event was added, else to `void`.\n *\n * `isCheckout` is true if this is either the very first event, or an event triggered by `checkoutEveryNms`.\n */\nexport function addEvent(\n  replay: ReplayContainer,\n  event: RecordingEvent,\n  isCheckout?: boolean,\n): Promise<AddEventResult | null> {\n  if (!shouldAddEvent(replay, event)) {\n    return Promise.resolve(null);\n  }\n\n  return _addEvent(replay, event, isCheckout);\n}\n\nasync function _addEvent(\n  replay: ReplayContainer,\n  event: RecordingEvent,\n  isCheckout?: boolean,\n): Promise<AddEventResult | null> {\n  const { eventBuffer } = replay;\n\n  if (!eventBuffer || (eventBuffer.waitForCheckout && !isCheckout)) {\n    return null;\n  }\n\n  const isBufferMode = replay.recordingMode === 'buffer';\n\n  try {\n    if (isCheckout && isBufferMode) {\n      eventBuffer.clear();\n    }\n\n    if (isCheckout) {\n      eventBuffer.hasCheckout = true;\n      eventBuffer.waitForCheckout = false;\n    }\n\n    const replayOptions = replay.getOptions();\n\n    const eventAfterPossibleCallback = maybeApplyCallback(event, replayOptions.beforeAddRecordingEvent);\n\n    if (!eventAfterPossibleCallback) {\n      return;\n    }\n\n    return await eventBuffer.addEvent(eventAfterPossibleCallback);\n  } catch (error) {\n    // If replay is no longer enabled, the buffer was torn down by `stop()`\n    // (session refresh, mutation limit, etc.), which rejects any in-flight\n    // `addEvent` with \"Worker destroyed\". Any error that is thrown after stopping\n    // should not result in a client report\n    if (!replay.isEnabled()) {\n      replay.handleException(error);\n      return null;\n    }\n\n    const isExceeded = error && error instanceof EventBufferSizeExceededError;\n    const reason = isExceeded ? 'eventBufferOverflow' : 'eventBufferError';\n    const client = getClient();\n\n    if (client) {\n      // We are limited in the drop reasons:\n      // https://github.com/getsentry/snuba/blob/6c73be60716c2fb1c30ca627883207887c733cbd/rust_snuba/src/processors/outcomes.rs#L39\n      const dropReason = isExceeded ? 'buffer_overflow' : 'internal_sdk_error';\n      client.recordDroppedEvent(dropReason, 'replay');\n    }\n\n    if (isExceeded && isBufferMode) {\n      // Clear buffer and wait for next checkout\n      eventBuffer.clear();\n      eventBuffer.waitForCheckout = true;\n\n      return null;\n    }\n\n    replay.handleException(error);\n\n    await replay.stop({ reason });\n  }\n}\n\n/** Exported only for tests. */\nexport function shouldAddEvent(replay: ReplayContainer, event: RecordingEvent): boolean {\n  if (!replay.eventBuffer || replay.isPaused() || !replay.isEnabled()) {\n    return false;\n  }\n\n  const timestampInMs = timestampToMs(event.timestamp);\n\n  // Throw out events that happen more than 5 minutes ago. This can happen if\n  // page has been left open and idle for a long period of time and user\n  // comes back to trigger a new session. The performance entries rely on\n  // `performance.timeOrigin`, which is when the page first opened.\n  if (timestampInMs + replay.timeouts.sessionIdlePause < Date.now()) {\n    return false;\n  }\n\n  // Throw out events that are +60min from the initial timestamp\n  if (timestampInMs > replay.getContext().initialTimestamp + replay.getOptions().maxReplayDuration) {\n    DEBUG_BUILD &&\n      debug.infoTick(`Skipping event with timestamp ${timestampInMs} because it is after maxReplayDuration`);\n    return false;\n  }\n\n  return true;\n}\n\nfunction maybeApplyCallback(\n  event: RecordingEvent,\n  callback: ReplayPluginOptions['beforeAddRecordingEvent'],\n): RecordingEvent | null | undefined {\n  try {\n    if (typeof callback === 'function' && isCustomEvent(event)) {\n      return callback(event);\n    }\n  } catch (error) {\n    DEBUG_BUILD &&\n      debug.exception(error, 'An error occurred in the `beforeAddRecordingEvent` callback, skipping the event...');\n    return null;\n  }\n\n  return event;\n}\n","import type { ReplayContainer } from '../../types';\n\nconst MAX_CONTEXT_VALUES = 100;\n\nexport function addSegmentDetailsToContext(replay: ReplayContainer, traceId?: string, segmentName?: string): void {\n  const replayContext = replay.getContext();\n  if (traceId && replayContext.traceIds.size < MAX_CONTEXT_VALUES) {\n    replayContext.traceIds.add(traceId);\n  }\n  if (segmentName && replayContext.segmentNames.size < MAX_CONTEXT_VALUES) {\n    replayContext.segmentNames.add(segmentName);\n  }\n}\n","import type { ErrorEvent, Event, FeedbackEvent, ReplayEvent, TransactionEvent } from '@sentry/core';\n\n/** If the event is an error event */\nexport function isErrorEvent(event: Event): event is ErrorEvent {\n  return !event.type;\n}\n\n/** If the event is a transaction event */\nexport function isTransactionEvent(event: Event): event is TransactionEvent {\n  return event.type === 'transaction';\n}\n\n/** If the event is an replay event */\nexport function isReplayEvent(event: Event): event is ReplayEvent {\n  return event.type === 'replay_event';\n}\n\n/** If the event is a feedback event */\nexport function isFeedbackEvent(event: Event): event is FeedbackEvent {\n  return event.type === 'feedback';\n}\n","import type { Breadcrumb } from '@sentry/core';\nimport { getClient, normalize } from '@sentry/core';\nimport { CONSOLE_ARG_MAX_SIZE } from '../constants';\nimport type { ReplayContainer } from '../types';\nimport type { ReplayFrame } from '../types/replayFrame';\nimport { createBreadcrumb } from '../util/createBreadcrumb';\nimport { addBreadcrumbEvent } from './util/addBreadcrumbEvent';\n\ntype BreadcrumbWithCategory = Required<Pick<Breadcrumb, 'category'>>;\n\n/**\n * Handle breadcrumbs that Sentry captures, and make sure to capture relevant breadcrumbs to Replay as well.\n */\nexport function handleBreadcrumbs(replay: ReplayContainer): void {\n  const client = getClient();\n\n  if (!client) {\n    return;\n  }\n\n  client.on('beforeAddBreadcrumb', breadcrumb => beforeAddBreadcrumb(replay, breadcrumb));\n}\n\nfunction beforeAddBreadcrumb(replay: ReplayContainer, breadcrumb: Breadcrumb): void {\n  if (!replay.isEnabled() || !isBreadcrumbWithCategory(breadcrumb)) {\n    return;\n  }\n\n  const result = normalizeBreadcrumb(breadcrumb);\n  if (result) {\n    addBreadcrumbEvent(replay, result);\n  }\n}\n\n/** Exported only for tests. */\nexport function normalizeBreadcrumb(breadcrumb: Breadcrumb): Breadcrumb | null {\n  if (\n    !isBreadcrumbWithCategory(breadcrumb) ||\n    [\n      // fetch & xhr are handled separately,in handleNetworkBreadcrumbs\n      'fetch',\n      'xhr',\n      // These two are breadcrumbs for emitted sentry events, we don't care about them\n      'sentry.event',\n      'sentry.transaction',\n    ].includes(breadcrumb.category) ||\n    // We capture UI breadcrumbs separately\n    breadcrumb.category.startsWith('ui.')\n  ) {\n    return null;\n  }\n\n  if (breadcrumb.category === 'console') {\n    return normalizeConsoleBreadcrumb(breadcrumb);\n  }\n\n  return createBreadcrumb(breadcrumb);\n}\n\n/** exported for tests only */\nexport function normalizeConsoleBreadcrumb(\n  breadcrumb: Omit<Breadcrumb, 'category'> & BreadcrumbWithCategory,\n): ReplayFrame {\n  const args = breadcrumb.data?.arguments;\n\n  if (!Array.isArray(args) || args.length === 0) {\n    return createBreadcrumb(breadcrumb);\n  }\n\n  let isTruncated = false;\n\n  // Avoid giant args captures\n  const normalizedArgs = args.map(arg => {\n    if (!arg) {\n      return arg;\n    }\n    if (typeof arg === 'string') {\n      if (arg.length > CONSOLE_ARG_MAX_SIZE) {\n        isTruncated = true;\n        return `${arg.slice(0, CONSOLE_ARG_MAX_SIZE)}…`;\n      }\n\n      return arg;\n    }\n    if (typeof arg === 'object') {\n      try {\n        const normalizedArg = normalize(arg, 7);\n        const stringified = JSON.stringify(normalizedArg);\n        if (stringified.length > CONSOLE_ARG_MAX_SIZE) {\n          isTruncated = true;\n          // We use the pretty printed JSON string here as a base\n          return `${JSON.stringify(normalizedArg, null, 2).slice(0, CONSOLE_ARG_MAX_SIZE)}…`;\n        }\n        return normalizedArg;\n      } catch {\n        // fall back to default\n      }\n    }\n\n    return arg;\n  });\n\n  return createBreadcrumb({\n    ...breadcrumb,\n    data: {\n      ...breadcrumb.data,\n      arguments: normalizedArgs,\n      ...(isTruncated ? { _meta: { warnings: ['CONSOLE_ARG_TRUNCATED'] } } : {}),\n    },\n  });\n}\n\nfunction isBreadcrumbWithCategory(breadcrumb: Breadcrumb): breadcrumb is BreadcrumbWithCategory {\n  return !!breadcrumb.category;\n}\n","import type { DynamicSamplingContext } from '@sentry/core';\nimport { getActiveSpan, getCurrentScope, getDynamicSamplingContextFromSpan } from '@sentry/core';\n\n/**\n * Reset the `replay_id` field on the DSC.\n */\nexport function resetReplayIdOnDynamicSamplingContext(): void {\n  // Reset DSC on the current scope, if there is one\n  const dsc = getCurrentScope().getPropagationContext().dsc;\n  if (dsc) {\n    delete dsc.replay_id;\n  }\n\n  // Clear it from frozen DSC on the active span\n  const activeSpan = getActiveSpan();\n  if (activeSpan) {\n    const dsc = getDynamicSamplingContextFromSpan(activeSpan);\n    delete (dsc as Partial<DynamicSamplingContext>).replay_id;\n  }\n}\n\n/**\n * Set the `replay_id` field on the cached DSC.\n * This is needed after a session refresh because the cached DSC on the scope\n * (set by browserTracingIntegration when the idle span ended) persists across\n * session boundaries. Without updating it, the new session's replay_id would\n * never appear in DSC since `getDynamicSamplingContextFromClient` (and its\n * `createDsc` hook) is not called when a cached DSC already exists.\n */\nexport function setReplayIdOnDynamicSamplingContext(replayId: string): void {\n  const dsc = getCurrentScope().getPropagationContext().dsc;\n  if (dsc) {\n    dsc.replay_id = replayId;\n  }\n\n  const activeSpan = getActiveSpan();\n  if (activeSpan) {\n    const dsc = getDynamicSamplingContextFromSpan(activeSpan);\n    (dsc as Partial<DynamicSamplingContext>).replay_id = replayId;\n  }\n}\n","import { EventType } from '@sentry/rrweb';\nimport type { AddEventResult, AllEntryData, ReplayContainer, ReplayPerformanceEntry } from '../types';\n\n/**\n * Create a \"span\" for each performance entry.\n */\nexport function createPerformanceSpans(\n  replay: ReplayContainer,\n  entries: ReplayPerformanceEntry<AllEntryData>[],\n): Promise<AddEventResult | null>[] {\n  return entries.map(({ type, start, end, name, data }) => {\n    const response = replay.throttledAddEvent({\n      type: EventType.Custom,\n      timestamp: start,\n      data: {\n        tag: 'performanceSpan',\n        payload: {\n          op: type,\n          description: name,\n          startTimestamp: start,\n          endTimestamp: end,\n          data,\n        },\n      },\n    });\n\n    // If response is a string, it means its either THROTTLED or SKIPPED\n    return typeof response === 'string' ? Promise.resolve(null) : response;\n  });\n}\n","import type { NetworkRequestData, ReplayContainer, ReplayPerformanceEntry } from '../../types';\nimport { createPerformanceSpans } from '../../util/createPerformanceSpans';\nimport { shouldFilterRequest } from '../../util/shouldFilterRequest';\n\n/** Add a performance entry breadcrumb */\nexport function addNetworkBreadcrumb(\n  replay: ReplayContainer,\n  result: ReplayPerformanceEntry<NetworkRequestData> | null,\n): void {\n  if (!replay.isEnabled()) {\n    return;\n  }\n\n  if (result === null) {\n    return;\n  }\n\n  if (shouldFilterRequest(replay, result.name)) {\n    return;\n  }\n\n  replay.addUpdate(() => {\n    // oxlint-disable-next-line typescript/no-floating-promises\n    createPerformanceSpans(replay, [result]);\n    // Returning true will cause `addUpdate` to not flush\n    // We do not want network requests to cause a flush. This will prevent\n    // recurring/polling requests from keeping the replay session alive.\n    return true;\n  });\n}\n","import { getClient, isSentryRequestUrl } from '@sentry/core';\nimport { DEBUG_BUILD } from '../debug-build';\nimport type { ReplayContainer } from '../types';\n\n/**\n * Check whether a given request URL should be filtered out. This is so we\n * don't log Sentry ingest requests.\n */\nexport function shouldFilterRequest(replay: ReplayContainer, url: string): boolean {\n  // If we enabled the `traceInternals` experiment, we want to trace everything\n  if (DEBUG_BUILD && replay.getOptions()._experiments.traceInternals) {\n    return false;\n  }\n\n  return isSentryRequestUrl(url, getClient());\n}\n","import { stringMatchesSomePattern } from '@sentry/core';\nimport type { NetworkMetaWarning } from '@sentry/browser-utils';\nimport { serializeFormData } from '@sentry/browser-utils';\nimport { NETWORK_BODY_MAX_SIZE, WINDOW } from '../../constants';\nimport type {\n  NetworkBody,\n  NetworkRequestData,\n  ReplayNetworkRequestData,\n  ReplayNetworkRequestOrResponse,\n  ReplayPerformanceEntry,\n} from '../../types';\n\n/** Get the size of a body. */\nexport function getBodySize(body: RequestInit['body']): number | undefined {\n  if (!body) {\n    return undefined;\n  }\n\n  const textEncoder = new TextEncoder();\n\n  try {\n    if (typeof body === 'string') {\n      return textEncoder.encode(body).length;\n    }\n\n    if (body instanceof URLSearchParams) {\n      return textEncoder.encode(body.toString()).length;\n    }\n\n    if (body instanceof FormData) {\n      const formDataStr = serializeFormData(body);\n      return textEncoder.encode(formDataStr).length;\n    }\n\n    if (body instanceof Blob) {\n      return body.size;\n    }\n\n    if (body instanceof ArrayBuffer) {\n      return body.byteLength;\n    }\n\n    // Currently unhandled types: ArrayBufferView, ReadableStream\n  } catch {\n    // just return undefined\n  }\n\n  return undefined;\n}\n\n/** Convert a Content-Length header to number/undefined.  */\nexport function parseContentLengthHeader(header: string | null | undefined): number | undefined {\n  if (!header) {\n    return undefined;\n  }\n\n  const size = parseInt(header, 10);\n  return isNaN(size) ? undefined : size;\n}\n\n/** Merge a warning into an existing network request/response. */\nexport function mergeWarning(\n  info: ReplayNetworkRequestOrResponse | undefined,\n  warning: NetworkMetaWarning,\n): ReplayNetworkRequestOrResponse {\n  if (!info) {\n    return {\n      headers: {},\n      size: undefined,\n      _meta: {\n        warnings: [warning],\n      },\n    };\n  }\n\n  const newMeta = { ...info._meta };\n  const existingWarnings = newMeta.warnings || [];\n  newMeta.warnings = [...existingWarnings, warning];\n\n  info._meta = newMeta;\n  return info;\n}\n\n/** Convert ReplayNetworkRequestData to a PerformanceEntry. */\nexport function makeNetworkReplayBreadcrumb(\n  type: string,\n  data: ReplayNetworkRequestData | null,\n): ReplayPerformanceEntry<NetworkRequestData> | null {\n  if (!data) {\n    return null;\n  }\n\n  const { startTimestamp, endTimestamp, url, method, statusCode, request, response } = data;\n\n  const result: ReplayPerformanceEntry<NetworkRequestData> = {\n    type,\n    start: startTimestamp / 1000,\n    end: endTimestamp / 1000,\n    name: url,\n    data: {\n      method,\n      statusCode,\n      request,\n      response,\n    },\n  };\n\n  return result;\n}\n\n/** Build the request or response part of a replay network breadcrumb that was skipped. */\nexport function buildSkippedNetworkRequestOrResponse(bodySize: number | undefined): ReplayNetworkRequestOrResponse {\n  return {\n    headers: {},\n    size: bodySize,\n    _meta: {\n      warnings: ['URL_SKIPPED'],\n    },\n  };\n}\n\n/** Build the request or response part of a replay network breadcrumb. */\nexport function buildNetworkRequestOrResponse(\n  headers: Record<string, string>,\n  bodySize: number | undefined,\n  body: string | undefined,\n): ReplayNetworkRequestOrResponse | undefined {\n  if (!bodySize && Object.keys(headers).length === 0) {\n    return undefined;\n  }\n\n  if (!bodySize) {\n    return {\n      headers,\n    };\n  }\n\n  if (!body) {\n    return {\n      headers,\n      size: bodySize,\n    };\n  }\n\n  const info: ReplayNetworkRequestOrResponse = {\n    headers,\n    size: bodySize,\n  };\n\n  const { body: normalizedBody, warnings } = normalizeNetworkBody(body);\n  info.body = normalizedBody;\n  if (warnings?.length) {\n    info._meta = {\n      warnings,\n    };\n  }\n\n  return info;\n}\n\n/** Filter a set of headers */\nexport function getAllowedHeaders(headers: Record<string, string>, allowedHeaders: string[]): Record<string, string> {\n  return Object.entries(headers).reduce((filteredHeaders: Record<string, string>, [key, value]) => {\n    const normalizedKey = key.toLowerCase();\n    // Avoid putting empty strings into the headers\n    if (allowedHeaders.includes(normalizedKey) && headers[key]) {\n      filteredHeaders[normalizedKey] = value;\n    }\n    return filteredHeaders;\n  }, {});\n}\n\nfunction normalizeNetworkBody(body: string | undefined): {\n  body: NetworkBody | undefined;\n  warnings?: NetworkMetaWarning[];\n} {\n  if (!body || typeof body !== 'string') {\n    return {\n      body,\n    };\n  }\n\n  const exceedsSizeLimit = body.length > NETWORK_BODY_MAX_SIZE;\n  const isProbablyJson = _strIsProbablyJson(body);\n\n  if (exceedsSizeLimit) {\n    const truncatedBody = body.slice(0, NETWORK_BODY_MAX_SIZE);\n\n    if (isProbablyJson) {\n      return {\n        body: truncatedBody,\n        warnings: ['MAYBE_JSON_TRUNCATED'],\n      };\n    }\n\n    return {\n      body: `${truncatedBody}…`,\n      warnings: ['TEXT_TRUNCATED'],\n    };\n  }\n\n  if (isProbablyJson) {\n    try {\n      const jsonBody = JSON.parse(body);\n      return {\n        body: jsonBody,\n      };\n    } catch {\n      // fall back to just send the body as string\n    }\n  }\n\n  return {\n    body,\n  };\n}\n\nfunction _strIsProbablyJson(str: string): boolean {\n  const first = str[0];\n  const last = str[str.length - 1];\n\n  // Simple check: If this does not start & end with {} or [], it's not JSON\n  return (first === '[' && last === ']') || (first === '{' && last === '}');\n}\n\n/** Match an URL against a list of strings/Regex. */\nexport function urlMatches(url: string, urls: (string | RegExp)[]): boolean {\n  const fullUrl = getFullUrl(url);\n\n  return stringMatchesSomePattern(fullUrl, urls);\n}\n\n/** exported for tests */\nexport function getFullUrl(url: string, baseURI = WINDOW.document.baseURI): string {\n  // Short circuit for common cases:\n  if (url.startsWith('http://') || url.startsWith('https://') || url.startsWith(WINDOW.location.origin)) {\n    return url;\n  }\n  const fixedUrl = new URL(url, baseURI);\n\n  // If these do not match, we are not dealing with a relative URL, so just return it\n  if (fixedUrl.origin !== new URL(baseURI).origin) {\n    return url;\n  }\n\n  const fullUrl = fixedUrl.href;\n\n  // Remove trailing slashes, if they don't match the original URL\n  if (!url.endsWith('/') && fullUrl.endsWith('/')) {\n    return fullUrl.slice(0, -1);\n  }\n\n  return fullUrl;\n}\n","import type { Breadcrumb, FetchBreadcrumbData } from '@sentry/core';\nimport type { FetchHint, NetworkMetaWarning } from '@sentry/browser-utils';\nimport { getBodyString, getFetchRequestArgBody, setTimeout } from '@sentry/browser-utils';\nimport { DEBUG_BUILD } from '../../debug-build';\nimport type {\n  ReplayContainer,\n  ReplayNetworkOptions,\n  ReplayNetworkRequestData,\n  ReplayNetworkRequestOrResponse,\n} from '../../types';\nimport { debug } from '../../util/logger';\nimport { addNetworkBreadcrumb } from './addNetworkBreadcrumb';\nimport {\n  buildNetworkRequestOrResponse,\n  buildSkippedNetworkRequestOrResponse,\n  getAllowedHeaders,\n  getBodySize,\n  makeNetworkReplayBreadcrumb,\n  mergeWarning,\n  parseContentLengthHeader,\n  urlMatches,\n} from './networkUtils';\n\n/**\n * Capture a fetch breadcrumb to a replay.\n * This adds additional data (where appropriate).\n */\nexport async function captureFetchBreadcrumbToReplay(\n  breadcrumb: Breadcrumb & { data: FetchBreadcrumbData },\n  hint: Partial<FetchHint>,\n  options: ReplayNetworkOptions & {\n    replay: ReplayContainer;\n  },\n): Promise<void> {\n  try {\n    const data = await _prepareFetchData(breadcrumb, hint, options);\n\n    // Create a replay performance entry from this breadcrumb\n    const result = makeNetworkReplayBreadcrumb('resource.fetch', data);\n    addNetworkBreadcrumb(options.replay, result);\n  } catch (error) {\n    DEBUG_BUILD && debug.exception(error, 'Failed to capture fetch breadcrumb');\n  }\n}\n\n/**\n * Enrich a breadcrumb with additional data.\n * This has to be sync & mutate the given breadcrumb,\n * as the breadcrumb is afterwards consumed by other handlers.\n */\nexport function enrichFetchBreadcrumb(\n  breadcrumb: Breadcrumb & { data: FetchBreadcrumbData },\n  hint: Partial<FetchHint>,\n): void {\n  const { input, response } = hint;\n\n  const body = input ? getFetchRequestArgBody(input) : undefined;\n  const reqSize = getBodySize(body);\n\n  const resSize = response ? parseContentLengthHeader(response.headers.get('content-length')) : undefined;\n\n  if (reqSize !== undefined) {\n    breadcrumb.data.request_body_size = reqSize;\n  }\n  if (resSize !== undefined) {\n    breadcrumb.data.response_body_size = resSize;\n  }\n}\n\nasync function _prepareFetchData(\n  breadcrumb: Breadcrumb & { data: FetchBreadcrumbData },\n  hint: Partial<FetchHint>,\n  options: ReplayNetworkOptions,\n): Promise<ReplayNetworkRequestData> {\n  const now = Date.now();\n  const { startTimestamp = now, endTimestamp = now } = hint;\n\n  const {\n    url,\n    method,\n    status_code: statusCode = 0,\n    request_body_size: requestBodySize,\n    response_body_size: responseBodySize,\n  } = breadcrumb.data;\n\n  const captureDetails =\n    urlMatches(url, options.networkDetailAllowUrls) && !urlMatches(url, options.networkDetailDenyUrls);\n\n  const request = captureDetails\n    ? _getRequestInfo(options, hint.input, requestBodySize)\n    : buildSkippedNetworkRequestOrResponse(requestBodySize);\n  const response = await _getResponseInfo(captureDetails, options, hint.response, responseBodySize);\n\n  return {\n    startTimestamp,\n    endTimestamp,\n    url,\n    method,\n    statusCode,\n    request,\n    response,\n  };\n}\n\nfunction _getRequestInfo(\n  { networkCaptureBodies, networkRequestHeaders }: ReplayNetworkOptions,\n  input: FetchHint['input'] | undefined,\n  requestBodySize?: number,\n): ReplayNetworkRequestOrResponse | undefined {\n  const headers = input ? getRequestHeaders(input, networkRequestHeaders) : {};\n\n  if (!networkCaptureBodies) {\n    return buildNetworkRequestOrResponse(headers, requestBodySize, undefined);\n  }\n\n  // We only want to transmit string or string-like bodies\n  const requestBody = getFetchRequestArgBody(input);\n  const [bodyStr, warning] = getBodyString(requestBody, debug);\n  const data = buildNetworkRequestOrResponse(headers, requestBodySize, bodyStr);\n\n  if (warning) {\n    return mergeWarning(data, warning);\n  }\n\n  return data;\n}\n\n/** Exported only for tests. */\nexport async function _getResponseInfo(\n  captureDetails: boolean,\n  {\n    networkCaptureBodies,\n    networkResponseHeaders,\n  }: Pick<ReplayNetworkOptions, 'networkCaptureBodies' | 'networkResponseHeaders'>,\n  response: Response | undefined,\n  responseBodySize?: number,\n): Promise<ReplayNetworkRequestOrResponse | undefined> {\n  if (!captureDetails && responseBodySize !== undefined) {\n    return buildSkippedNetworkRequestOrResponse(responseBodySize);\n  }\n\n  const headers = response ? getAllHeaders(response.headers, networkResponseHeaders) : {};\n\n  if (!response || (!networkCaptureBodies && responseBodySize !== undefined)) {\n    return buildNetworkRequestOrResponse(headers, responseBodySize, undefined);\n  }\n\n  const [bodyText, warning] = await _parseFetchResponseBody(response);\n  const result = getResponseData(bodyText, {\n    networkCaptureBodies,\n\n    responseBodySize,\n    captureDetails,\n    headers,\n  });\n\n  if (warning) {\n    return mergeWarning(result, warning);\n  }\n\n  return result;\n}\n\nfunction getResponseData(\n  bodyText: string | undefined,\n  {\n    networkCaptureBodies,\n    responseBodySize,\n    captureDetails,\n    headers,\n  }: {\n    captureDetails: boolean;\n    networkCaptureBodies: boolean;\n    responseBodySize: number | undefined;\n    headers: Record<string, string>;\n  },\n): ReplayNetworkRequestOrResponse | undefined {\n  try {\n    const size = bodyText?.length && responseBodySize === undefined ? getBodySize(bodyText) : responseBodySize;\n\n    if (!captureDetails) {\n      return buildSkippedNetworkRequestOrResponse(size);\n    }\n\n    if (networkCaptureBodies) {\n      return buildNetworkRequestOrResponse(headers, size, bodyText);\n    }\n\n    return buildNetworkRequestOrResponse(headers, size, undefined);\n  } catch (error) {\n    DEBUG_BUILD && debug.exception(error, 'Failed to serialize response body');\n    // fallback\n    return buildNetworkRequestOrResponse(headers, responseBodySize, undefined);\n  }\n}\n\nasync function _parseFetchResponseBody(response: Response): Promise<[string | undefined, NetworkMetaWarning?]> {\n  const res = _tryCloneResponse(response);\n\n  if (!res) {\n    return [undefined, 'BODY_PARSE_ERROR'];\n  }\n\n  try {\n    const text = await _tryGetResponseText(res);\n    return [text];\n  } catch (error) {\n    if (error instanceof Error && error.message.indexOf('Timeout') > -1) {\n      DEBUG_BUILD && debug.warn('Parsing text body from response timed out');\n      return [undefined, 'BODY_PARSE_TIMEOUT'];\n    }\n\n    DEBUG_BUILD && debug.exception(error, 'Failed to get text body from response');\n    return [undefined, 'BODY_PARSE_ERROR'];\n  }\n}\n\nfunction getAllHeaders(headers: Headers, allowedHeaders: string[]): Record<string, string> {\n  const allHeaders: Record<string, string> = {};\n\n  allowedHeaders.forEach(header => {\n    if (headers.get(header)) {\n      allHeaders[header] = headers.get(header) as string;\n    }\n  });\n\n  return allHeaders;\n}\n\nfunction getRequestHeaders(fetchArgs: unknown[], allowedHeaders: string[]): Record<string, string> {\n  if (fetchArgs.length === 1 && typeof fetchArgs[0] !== 'string') {\n    return getHeadersFromOptions(fetchArgs[0] as Request | RequestInit, allowedHeaders);\n  }\n\n  if (fetchArgs.length === 2) {\n    return getHeadersFromOptions(fetchArgs[1] as Request | RequestInit, allowedHeaders);\n  }\n\n  return {};\n}\n\nfunction getHeadersFromOptions(\n  input: Request | RequestInit | undefined,\n  allowedHeaders: string[],\n): Record<string, string> {\n  if (!input) {\n    return {};\n  }\n\n  const headers = input.headers;\n\n  if (!headers) {\n    return {};\n  }\n\n  if (headers instanceof Headers) {\n    return getAllHeaders(headers, allowedHeaders);\n  }\n\n  // We do not support this, as it is not really documented (anymore?)\n  if (Array.isArray(headers)) {\n    return {};\n  }\n\n  return getAllowedHeaders(headers, allowedHeaders);\n}\n\nfunction _tryCloneResponse(response: Response): Response | void {\n  try {\n    // We have to clone this, as the body can only be read once\n    return response.clone();\n  } catch (error) {\n    // this can throw if the response was already consumed before\n    DEBUG_BUILD && debug.exception(error, 'Failed to clone response body');\n  }\n}\n\n/**\n * Get the response body of a fetch request, or timeout after 500ms.\n * Fetch can return a streaming body, that may not resolve (or not for a long time).\n * If that happens, we rather abort after a short time than keep waiting for this.\n */\nfunction _tryGetResponseText(response: Response): Promise<string | undefined> {\n  return new Promise((resolve, reject) => {\n    const timeout = setTimeout(() => reject(new Error('Timeout while trying to read response body')), 500);\n\n    _getResponseText(response)\n      .then(\n        txt => resolve(txt),\n        reason => reject(reason),\n      )\n      .finally(() => clearTimeout(timeout));\n  });\n}\n\nasync function _getResponseText(response: Response): Promise<string> {\n  // Force this to be a promise, just to be safe\n  // eslint-disable-next-line no-return-await\n  return await response.text();\n}\n","import type { DynamicSamplingContext } from '@sentry/core';\nimport { addEventProcessor, getClient } from '@sentry/core';\nimport { addClickKeypressInstrumentationHandler, addHistoryInstrumentationHandler } from '@sentry/browser-utils';\nimport { handleProcessSegmentSpan } from '../coreHandlers/handleProcessSegmentSpan';\nimport { handleAfterSendEvent } from '../coreHandlers/handleAfterSendEvent';\nimport { handleBeforeSendEvent } from '../coreHandlers/handleBeforeSendEvent';\nimport { handleBreadcrumbs } from '../coreHandlers/handleBreadcrumbs';\nimport { handleDomListener } from '../coreHandlers/handleDom';\nimport { handleGlobalEventListener } from '../coreHandlers/handleGlobalEvent';\nimport { handleHistorySpanListener } from '../coreHandlers/handleHistory';\nimport { handleNetworkBreadcrumbs } from '../coreHandlers/handleNetworkBreadcrumbs';\nimport type { ReplayContainer } from '../types';\n\n/**\n * Add global listeners that cannot be removed.\n */\nexport function addGlobalListeners(replay: ReplayContainer): void {\n  // Listeners from core SDK //\n  const client = getClient();\n\n  addClickKeypressInstrumentationHandler(handleDomListener(replay));\n  addHistoryInstrumentationHandler(handleHistorySpanListener(replay));\n  handleBreadcrumbs(replay);\n  handleNetworkBreadcrumbs(replay);\n\n  // Tag all (non replay) events that get sent to Sentry with the current\n  // replay ID so that we can reference them later in the UI\n  const eventProcessor = handleGlobalEventListener(replay);\n  addEventProcessor(eventProcessor);\n\n  // If a custom client has no hooks yet, we continue to use the \"old\" implementation\n  if (client) {\n    client.on('beforeSendEvent', handleBeforeSendEvent(replay));\n    client.on('afterSendEvent', handleAfterSendEvent(replay));\n    client.on('createDsc', (dsc: DynamicSamplingContext) => {\n      const replayId = replay.getSessionId();\n      // We do not want to set the DSC when in buffer mode, as that means the replay has not been sent (yet)\n      if (replayId && replay.isEnabled() && replay.recordingMode === 'session') {\n        // Ensure to check that the session is still active - it could have expired in the meanwhile\n        const isSessionActive = replay.checkAndHandleExpiredSession();\n        if (isSessionActive) {\n          dsc.replay_id = replayId;\n        }\n      }\n    });\n\n    client.on('processSegmentSpan', handleProcessSegmentSpan(replay));\n\n    client.on('spanStart', span => {\n      replay.lastActiveSpan = span;\n    });\n\n    // We may be missing the initial spanStart due to timing issues,\n    // so we capture it on finish again.\n    client.on('spanEnd', span => {\n      replay.lastActiveSpan = span;\n    });\n\n    // We want to attach the replay id to the feedback event\n    client.on('beforeSendFeedback', async (feedbackEvent, options) => {\n      const replayId = replay.getSessionId();\n      if (options?.includeReplay && replay.isEnabled() && replayId && feedbackEvent.contexts?.feedback) {\n        // In case the feedback is sent via API and not through our widget, we want to flush replay\n        if (feedbackEvent.contexts.feedback.source === 'api') {\n          await replay.sendBufferedReplayOrFlush();\n        }\n        feedbackEvent.contexts.feedback.replay_id = replayId;\n      }\n    });\n\n    client.on('openFeedbackWidget', async () => {\n      await replay.sendBufferedReplayOrFlush();\n    });\n  }\n}\n","import type { HandlerDataHistory } from '@sentry/core';\nimport type { HistoryData, ReplayContainer, ReplayPerformanceEntry } from '../types';\nimport { createPerformanceSpans } from '../util/createPerformanceSpans';\n\nfunction handleHistory(handlerData: HandlerDataHistory): ReplayPerformanceEntry<HistoryData> {\n  const { from, to } = handlerData;\n\n  const now = Date.now() / 1000;\n\n  return {\n    type: 'navigation.push',\n    start: now,\n    end: now,\n    name: to,\n    data: {\n      previous: from,\n    },\n  };\n}\n\n/**\n * Returns a listener to be added to `addHistoryInstrumentationHandler(listener)`.\n */\nexport function handleHistorySpanListener(replay: ReplayContainer): (handlerData: HandlerDataHistory) => void {\n  return (handlerData: HandlerDataHistory) => {\n    if (!replay.isEnabled()) {\n      return;\n    }\n\n    const result = handleHistory(handlerData);\n\n    if (result === null) {\n      return;\n    }\n\n    // Need to collect visited URLs\n    replay.getContext().urls.push(result.name);\n    replay.triggerUserActivity();\n\n    replay.addUpdate(() => {\n      // oxlint-disable-next-line typescript/no-floating-promises\n      createPerformanceSpans(replay, [result]);\n      // Returning false to flush\n      return false;\n    });\n  };\n}\n","import type { Breadcrumb, BreadcrumbHint, FetchBreadcrumbData, XhrBreadcrumbData } from '@sentry/core';\nimport { getClient } from '@sentry/core';\nimport type { FetchHint, XhrHint } from '@sentry/browser-utils';\nimport { DEBUG_BUILD } from '../debug-build';\nimport type { ReplayContainer, ReplayNetworkOptions } from '../types';\nimport { debug } from '../util/logger';\nimport { captureFetchBreadcrumbToReplay, enrichFetchBreadcrumb } from './util/fetchUtils';\nimport { captureXhrBreadcrumbToReplay, enrichXhrBreadcrumb } from './util/xhrUtils';\n\ninterface ExtendedNetworkBreadcrumbsOptions extends ReplayNetworkOptions {\n  replay: ReplayContainer;\n}\n\n/**\n * This method does two things:\n * - It enriches the regular XHR/fetch breadcrumbs with request/response size data\n * - It captures the XHR/fetch breadcrumbs to the replay\n *   (enriching it with further data that is _not_ added to the regular breadcrumbs)\n */\nexport function handleNetworkBreadcrumbs(replay: ReplayContainer): void {\n  const client = getClient();\n\n  try {\n    const {\n      networkDetailAllowUrls,\n      networkDetailDenyUrls,\n      networkCaptureBodies,\n      networkRequestHeaders,\n      networkResponseHeaders,\n    } = replay.getOptions();\n\n    const options: ExtendedNetworkBreadcrumbsOptions = {\n      replay,\n      networkDetailAllowUrls,\n      networkDetailDenyUrls,\n      networkCaptureBodies,\n      networkRequestHeaders,\n      networkResponseHeaders,\n    };\n\n    if (client) {\n      client.on('beforeAddBreadcrumb', (breadcrumb, hint) => beforeAddNetworkBreadcrumb(options, breadcrumb, hint));\n    }\n  } catch {\n    // Do nothing\n  }\n}\n\n/** just exported for tests */\nexport function beforeAddNetworkBreadcrumb(\n  options: ExtendedNetworkBreadcrumbsOptions,\n  breadcrumb: Breadcrumb,\n  hint?: BreadcrumbHint,\n): void {\n  if (!breadcrumb.data) {\n    return;\n  }\n\n  try {\n    if (_isXhrBreadcrumb(breadcrumb) && _isXhrHint(hint)) {\n      // This has to be sync, as we need to ensure the breadcrumb is enriched in the same tick\n      // Because the hook runs synchronously, and the breadcrumb is afterwards passed on\n      // So any async mutations to it will not be reflected in the final breadcrumb\n      enrichXhrBreadcrumb(breadcrumb, hint);\n\n      // This call should not reject\n      // eslint-disable-next-line @typescript-eslint/no-floating-promises\n      captureXhrBreadcrumbToReplay(breadcrumb, hint, options);\n    }\n\n    if (_isFetchBreadcrumb(breadcrumb) && _isFetchHint(hint)) {\n      // This has to be sync, as we need to ensure the breadcrumb is enriched in the same tick\n      // Because the hook runs synchronously, and the breadcrumb is afterwards passed on\n      // So any async mutations to it will not be reflected in the final breadcrumb\n      enrichFetchBreadcrumb(breadcrumb, hint);\n\n      // This call should not reject\n      // eslint-disable-next-line @typescript-eslint/no-floating-promises\n      captureFetchBreadcrumbToReplay(breadcrumb, hint, options);\n    }\n  } catch (e) {\n    DEBUG_BUILD && debug.exception(e, 'Error when enriching network breadcrumb');\n  }\n}\n\nfunction _isXhrBreadcrumb(breadcrumb: Breadcrumb): breadcrumb is Breadcrumb & { data: XhrBreadcrumbData } {\n  return breadcrumb.category === 'xhr';\n}\n\nfunction _isFetchBreadcrumb(breadcrumb: Breadcrumb): breadcrumb is Breadcrumb & { data: FetchBreadcrumbData } {\n  return breadcrumb.category === 'fetch';\n}\n\nfunction _isXhrHint(hint?: BreadcrumbHint): hint is XhrHint {\n  return hint?.xhr;\n}\n\nfunction _isFetchHint(hint?: BreadcrumbHint): hint is Partial<FetchHint> {\n  return hint?.input !== undefined;\n}\n","import type { Breadcrumb, XhrBreadcrumbData } from '@sentry/core';\nimport { isObjectLike } from '@sentry/core';\nimport type { NetworkMetaWarning, XhrHint } from '@sentry/browser-utils';\nimport { getBodyString, parseXhrResponseHeaders, SENTRY_XHR_DATA_KEY } from '@sentry/browser-utils';\nimport { DEBUG_BUILD } from '../../debug-build';\nimport type { ReplayContainer, ReplayNetworkOptions, ReplayNetworkRequestData } from '../../types';\nimport { debug } from '../../util/logger';\nimport { addNetworkBreadcrumb } from './addNetworkBreadcrumb';\nimport {\n  buildNetworkRequestOrResponse,\n  buildSkippedNetworkRequestOrResponse,\n  getAllowedHeaders,\n  getBodySize,\n  makeNetworkReplayBreadcrumb,\n  mergeWarning,\n  parseContentLengthHeader,\n  urlMatches,\n} from './networkUtils';\n\n/**\n * Capture an XHR breadcrumb to a replay.\n * This adds additional data (where appropriate).\n */\nexport async function captureXhrBreadcrumbToReplay(\n  breadcrumb: Breadcrumb & { data: XhrBreadcrumbData },\n  hint: Partial<XhrHint>,\n  options: ReplayNetworkOptions & { replay: ReplayContainer },\n): Promise<void> {\n  try {\n    const data = _prepareXhrData(breadcrumb, hint, options);\n\n    // Create a replay performance entry from this breadcrumb\n    const result = makeNetworkReplayBreadcrumb('resource.xhr', data);\n    addNetworkBreadcrumb(options.replay, result);\n  } catch (error) {\n    DEBUG_BUILD && debug.exception(error, 'Failed to capture xhr breadcrumb');\n  }\n}\n\n/**\n * Enrich a breadcrumb with additional data.\n * This has to be sync & mutate the given breadcrumb,\n * as the breadcrumb is afterwards consumed by other handlers.\n */\nexport function enrichXhrBreadcrumb(\n  breadcrumb: Breadcrumb & { data: XhrBreadcrumbData },\n  hint: Partial<XhrHint>,\n): void {\n  const { xhr, input } = hint;\n\n  if (!xhr) {\n    return;\n  }\n\n  const reqSize = getBodySize(input);\n  const resSize = xhr.getResponseHeader('content-length')\n    ? parseContentLengthHeader(xhr.getResponseHeader('content-length'))\n    : _getBodySize(xhr.response, xhr.responseType);\n\n  if (reqSize !== undefined) {\n    breadcrumb.data.request_body_size = reqSize;\n  }\n  if (resSize !== undefined) {\n    breadcrumb.data.response_body_size = resSize;\n  }\n}\n\nfunction _prepareXhrData(\n  breadcrumb: Breadcrumb & { data: XhrBreadcrumbData },\n  hint: Partial<XhrHint>,\n  options: ReplayNetworkOptions,\n): ReplayNetworkRequestData | null {\n  const now = Date.now();\n  const { startTimestamp = now, endTimestamp = now, input, xhr } = hint;\n\n  const {\n    url,\n    method,\n    status_code: statusCode = 0,\n    request_body_size: requestBodySize,\n    response_body_size: responseBodySize,\n  } = breadcrumb.data;\n\n  if (!url) {\n    return null;\n  }\n\n  if (!xhr || !urlMatches(url, options.networkDetailAllowUrls) || urlMatches(url, options.networkDetailDenyUrls)) {\n    const request = buildSkippedNetworkRequestOrResponse(requestBodySize);\n    const response = buildSkippedNetworkRequestOrResponse(responseBodySize);\n    return {\n      startTimestamp,\n      endTimestamp,\n      url,\n      method,\n      statusCode,\n      request,\n      response,\n    };\n  }\n\n  // ---- This additional network data below is only captured for URLs defined in `networkDetailAllowUrls` ----\n\n  const xhrInfo = xhr[SENTRY_XHR_DATA_KEY];\n  const networkRequestHeaders = xhrInfo\n    ? getAllowedHeaders(xhrInfo.request_headers, options.networkRequestHeaders)\n    : {};\n  const networkResponseHeaders = getAllowedHeaders(parseXhrResponseHeaders(xhr), options.networkResponseHeaders);\n\n  const [requestBody, requestWarning] = options.networkCaptureBodies ? getBodyString(input, debug) : [undefined];\n  const [responseBody, responseWarning] = options.networkCaptureBodies ? _getXhrResponseBody(xhr) : [undefined];\n\n  const request = buildNetworkRequestOrResponse(networkRequestHeaders, requestBodySize, requestBody);\n  const response = buildNetworkRequestOrResponse(networkResponseHeaders, responseBodySize, responseBody);\n\n  return {\n    startTimestamp,\n    endTimestamp,\n    url,\n    method,\n    statusCode,\n    request: requestWarning ? mergeWarning(request, requestWarning) : request,\n    response: responseWarning ? mergeWarning(response, responseWarning) : response,\n  };\n}\n\nfunction _getXhrResponseBody(xhr: XMLHttpRequest): [string | undefined, NetworkMetaWarning?] {\n  // We collect errors that happen, but only log them if we can't get any response body\n  const errors: unknown[] = [];\n\n  try {\n    return [xhr.responseText];\n  } catch (e) {\n    errors.push(e);\n  }\n\n  // Try to manually parse the response body, if responseText fails\n  try {\n    return _parseXhrResponse(xhr.response, xhr.responseType);\n  } catch (e) {\n    errors.push(e);\n  }\n\n  DEBUG_BUILD && debug.warn('Failed to get xhr response body', ...errors);\n\n  return [undefined];\n}\n\n/**\n * Get the string representation of the XHR response.\n * Based on MDN, these are the possible types of the response:\n * string\n * ArrayBuffer\n * Blob\n * Document\n * POJO\n *\n * Exported only for tests.\n */\nexport function _parseXhrResponse(\n  body: XMLHttpRequest['response'],\n  responseType: XMLHttpRequest['responseType'],\n): [string | undefined, NetworkMetaWarning?] {\n  try {\n    if (typeof body === 'string') {\n      return [body];\n    }\n\n    if (body instanceof Document) {\n      return [body.body.outerHTML];\n    }\n\n    if (responseType === 'json' && isObjectLike(body)) {\n      return [JSON.stringify(body)];\n    }\n\n    if (!body) {\n      return [undefined];\n    }\n  } catch (error) {\n    DEBUG_BUILD && debug.exception(error, 'Failed to serialize body', body);\n    return [undefined, 'BODY_PARSE_ERROR'];\n  }\n\n  DEBUG_BUILD && debug.log('Skipping network body because of body type', body);\n\n  return [undefined, 'UNPARSEABLE_BODY_TYPE'];\n}\n\nfunction _getBodySize(\n  body: XMLHttpRequest['response'],\n  responseType: XMLHttpRequest['responseType'],\n): number | undefined {\n  try {\n    const bodyStr = responseType === 'json' && isObjectLike(body) ? JSON.stringify(body) : body;\n    return getBodySize(bodyStr);\n  } catch {\n    return undefined;\n  }\n}\n","import type { Event, EventHint } from '@sentry/core';\nimport { DEBUG_BUILD } from '../debug-build';\nimport { saveSession } from '../session/saveSession';\nimport type { ReplayContainer } from '../types';\nimport { isErrorEvent, isFeedbackEvent, isReplayEvent, isTransactionEvent } from '../util/eventUtils';\nimport { isRrwebError } from '../util/isRrwebError';\nimport { shouldRefreshSession } from '../session/shouldRefreshSession';\nimport { debug } from '../util/logger';\nimport { resetReplayIdOnDynamicSamplingContext } from '../util/resetReplayIdOnDynamicSamplingContext';\nimport { addFeedbackBreadcrumb } from './util/addFeedbackBreadcrumb';\nimport { shouldSampleForBufferEvent } from './util/shouldSampleForBufferEvent';\n\n/**\n * Returns a listener to be added to `addEventProcessor(listener)`.\n */\nexport function handleGlobalEventListener(replay: ReplayContainer): (event: Event, hint: EventHint) => Event | null {\n  return Object.assign(\n    (event: Event, hint: EventHint) => {\n      // Check for expired session and clean stale replay_id from DSC.\n      // This must run BEFORE the isEnabled/isPaused guards because when paused,\n      // the guards short-circuit without cleaning DSC. Uses shouldRefreshSession\n      // instead of isSessionExpired to respect the buffer-mode carve-out:\n      // buffer sessions with segmentId === 0 are kept alive even when time-expired.\n      if (\n        replay.session &&\n        shouldRefreshSession(replay.session, {\n          maxReplayDuration: replay.getOptions().maxReplayDuration,\n          sessionIdleExpire: replay.timeouts.sessionIdleExpire,\n        })\n      ) {\n        resetReplayIdOnDynamicSamplingContext();\n      }\n\n      // Do nothing if replay has been disabled or paused\n      if (!replay.isEnabled() || replay.isPaused()) {\n        return event;\n      }\n\n      if (isReplayEvent(event)) {\n        // Replays have separate set of breadcrumbs, do not include breadcrumbs\n        // from core SDK\n        delete event.breadcrumbs;\n        return event;\n      }\n\n      // We only want to handle errors, transactions, and feedbacks, nothing else\n      if (!isErrorEvent(event) && !isTransactionEvent(event) && !isFeedbackEvent(event)) {\n        return event;\n      }\n\n      // Ensure we do not add replay_id if the session is expired\n      const isSessionActive = replay.checkAndHandleExpiredSession();\n      if (!isSessionActive) {\n        // prevent exceeding replay durations by removing the expired replayId from the DSC\n        resetReplayIdOnDynamicSamplingContext();\n        return event;\n      }\n\n      if (isFeedbackEvent(event)) {\n        // This should never reject\n        // eslint-disable-next-line @typescript-eslint/no-floating-promises\n        replay.flush();\n        event.contexts.feedback.replay_id = replay.getSessionId();\n        // Add a replay breadcrumb for this piece of feedback\n        addFeedbackBreadcrumb(replay, event);\n        return event;\n      }\n\n      // Unless `captureExceptions` is enabled, we want to ignore errors coming from rrweb\n      // As there can be a bunch of stuff going wrong in internals there, that we don't want to bubble up to users\n      if (isRrwebError(event, hint) && !replay.getOptions()._experiments.captureExceptions) {\n        DEBUG_BUILD && debug.log('Ignoring error from rrweb internals', event);\n        return null;\n      }\n\n      // When in buffer mode, we decide to sample here.\n      // Later, in `handleAfterSendEvent`, if the replayId is set, we know that we sampled\n      // And convert the buffer session to a full session\n      const isErrorEventSampled = shouldSampleForBufferEvent(replay, event);\n\n      // Tag errors if it has been sampled in buffer mode, or if it is session mode\n      // Only tag transactions if in session mode\n      const shouldTagReplayId = isErrorEventSampled || replay.recordingMode === 'session';\n\n      if (shouldTagReplayId) {\n        event.tags = { ...event.tags, replayId: replay.getSessionId() };\n      }\n\n      // If we sampled this error in buffer mode, immediately mark the session as \"sampled\"\n      // by changing the sampled state from 'buffer' to 'session'. Otherwise, if the application is interrupte\n      // before `afterSendEvent` occurs, then the session would remain as \"buffer\" but we have an error event\n      // that is tagged with a replay id. This could end up creating replays w/ excessive durations because\n      // of the linked error.\n      if (isErrorEventSampled && replay.recordingMode === 'buffer' && replay.session?.sampled === 'buffer') {\n        const session = replay.session;\n        session.dirty = true;\n        // Save the session if sticky sessions are enabled to persist the state change\n        if (replay.getOptions().stickySession) {\n          saveSession(session);\n        }\n      }\n\n      return event;\n    },\n    { id: 'Replay' },\n  );\n}\n","import type { FeedbackEvent } from '@sentry/core';\nimport { EventType } from '@sentry/rrweb';\nimport type { ReplayBreadcrumbFrameEvent, ReplayContainer } from '../../types';\n\n/**\n * Add a feedback breadcrumb event to replay.\n */\nexport function addFeedbackBreadcrumb(replay: ReplayContainer, event: FeedbackEvent): void {\n  replay.triggerUserActivity();\n  replay.addUpdate(() => {\n    if (!event.timestamp) {\n      // Ignore events that don't have timestamps (this shouldn't happen, more of a typing issue)\n      // Return true here so that we don't flush\n      return true;\n    }\n\n    // This should never reject\n    // eslint-disable-next-line @typescript-eslint/no-floating-promises\n    replay.throttledAddEvent({\n      type: EventType.Custom,\n      timestamp: event.timestamp * 1000,\n      data: {\n        tag: 'breadcrumb',\n        payload: {\n          timestamp: event.timestamp,\n          type: 'default',\n          category: 'sentry.feedback',\n          data: {\n            feedbackId: event.event_id,\n          },\n        },\n      },\n    } as ReplayBreadcrumbFrameEvent);\n\n    return false;\n  });\n}\n","import type { Event, EventHint } from '@sentry/core';\n\n/**\n * Returns true if we think the given event is an error originating inside of rrweb.\n */\nexport function isRrwebError(event: Event, hint: EventHint): boolean {\n  if (event.type || !event.exception?.values?.length) {\n    return false;\n  }\n\n  // @ts-expect-error this may be set by rrweb when it finds errors\n  if (hint.originalException?.__rrweb__) {\n    return true;\n  }\n\n  return false;\n}\n","import type { Event } from '@sentry/core';\nimport { UNABLE_TO_SEND_REPLAY } from '../../constants';\nimport type { ReplayContainer } from '../../types';\nimport { isSampled } from '../../util/isSampled';\n\n/**\n * Determine if event should be sampled (only applies in buffer mode).\n * When an event is captured by `handleGlobalEvent`, when in buffer mode\n * we determine if we want to sample the error or not.\n */\nexport function shouldSampleForBufferEvent(replay: ReplayContainer, event: Event): boolean {\n  if (replay.recordingMode !== 'buffer') {\n    return false;\n  }\n\n  // ignore this error because otherwise we could loop indefinitely with\n  // trying to capture replay and failing\n  if (event.message === UNABLE_TO_SEND_REPLAY) {\n    return false;\n  }\n\n  // Require the event to be an error event & to have an exception\n  if (!event.exception || event.type) {\n    return false;\n  }\n\n  return isSampled(replay.getOptions().errorSampleRate);\n}\n","import type { ErrorEvent, Event } from '@sentry/core';\nimport { getLocationHref } from '@sentry/core';\nimport type { ReplayContainer } from '../types';\nimport { createBreadcrumb } from '../util/createBreadcrumb';\nimport { isErrorEvent } from '../util/eventUtils';\nimport { addBreadcrumbEvent } from './util/addBreadcrumbEvent';\n\ntype BeforeSendEventCallback = (event: Event) => void;\n\n/**\n * Returns a listener to be added to `client.on('afterSendErrorEvent, listener)`.\n */\nexport function handleBeforeSendEvent(replay: ReplayContainer): BeforeSendEventCallback {\n  return (event: Event) => {\n    if (!replay.isEnabled() || !isErrorEvent(event)) {\n      return;\n    }\n\n    handleHydrationError(replay, event);\n  };\n}\n\nfunction handleHydrationError(replay: ReplayContainer, event: ErrorEvent): void {\n  const exceptionValue = event.exception?.values?.[0]?.value;\n  if (typeof exceptionValue !== 'string') {\n    return;\n  }\n\n  if (\n    // Only matches errors in production builds of react-dom\n    // Example https://reactjs.org/docs/error-decoder.html?invariant=423\n    // With newer React versions, the messages changed to a different website https://react.dev/errors/418\n    exceptionValue.match(\n      /(reactjs\\.org\\/docs\\/error-decoder\\.html\\?invariant=|react\\.dev\\/errors\\/)(418|419|422|423|425)/,\n    ) ||\n    // Development builds of react-dom\n    // Error 1: Hydration failed because the initial UI does not match what was rendered on the server.\n    // Error 2: Text content does not match server-rendered HTML. Warning: Text content did not match.\n    exceptionValue.match(/(does not match server-rendered HTML|Hydration failed because)/i)\n  ) {\n    const breadcrumb = createBreadcrumb({\n      category: 'replay.hydrate-error',\n      data: {\n        url: getLocationHref(),\n      },\n    });\n    addBreadcrumbEvent(replay, breadcrumb);\n  }\n}\n","import type { ErrorEvent, Event, TransactionEvent, TransportMakeRequestResponse } from '@sentry/core';\nimport { setTimeout } from '@sentry/browser-utils';\nimport type { ReplayContainer } from '../types';\nimport { isErrorEvent, isTransactionEvent } from '../util/eventUtils';\nimport { addSegmentDetailsToContext } from './util/addSegmentDetailsToContext';\n\ntype AfterSendEventCallback = (event: Event, sendResponse: TransportMakeRequestResponse) => void;\n\n/**\n * Returns a listener to be added to `client.on('afterSendErrorEvent, listener)`.\n */\nexport function handleAfterSendEvent(replay: ReplayContainer): AfterSendEventCallback {\n  return (event: Event, sendResponse: TransportMakeRequestResponse) => {\n    if (!replay.isEnabled() || (!isErrorEvent(event) && !isTransactionEvent(event))) {\n      return;\n    }\n\n    const statusCode = sendResponse.statusCode;\n\n    // We only want to do stuff on successful error sending, otherwise you get error replays without errors attached\n    // We skip if we encountered an non-OK status code\n    if (!statusCode || statusCode < 200 || statusCode >= 300) {\n      return;\n    }\n\n    if (isTransactionEvent(event)) {\n      handleTransactionEvent(replay, event);\n      return;\n    }\n\n    handleErrorEvent(replay, event);\n  };\n}\n\nfunction handleTransactionEvent(replay: ReplayContainer, event: TransactionEvent): void {\n  addSegmentDetailsToContext(replay, event.contexts?.trace?.trace_id, event.transaction);\n}\n\nfunction handleErrorEvent(replay: ReplayContainer, event: ErrorEvent): void {\n  const replayContext = replay.getContext();\n\n  // Add error to list of errorIds of replay. This is ok to do even if not\n  // sampled because context will get reset at next checkout.\n  // XXX: There is also a race condition where it's possible to capture an\n  // error to Sentry before Replay SDK has loaded, but response returns after\n  // it was loaded, and this gets called.\n  // We limit to max. 100 errors linked\n  if (event.event_id && replayContext.errorIds.size < 100) {\n    replayContext.errorIds.add(event.event_id);\n  }\n\n  // If error event is tagged with replay id it means it was sampled (when in buffer mode)\n  // Need to be very careful that this does not cause an infinite loop\n  if (replay.recordingMode !== 'buffer' || !event.tags?.replayId) {\n    return;\n  }\n\n  const { beforeErrorSampling } = replay.getOptions();\n  if (typeof beforeErrorSampling === 'function' && !beforeErrorSampling(event)) {\n    return;\n  }\n\n  setTimeout(async () => {\n    try {\n      // Capture current event buffer as new replay\n      await replay.sendBufferedReplayOrFlush();\n    } catch (err) {\n      replay.handleException(err);\n    }\n  });\n}\n","import type { StreamedSpanJSON } from '@sentry/core';\nimport type { ReplayContainer } from '../types';\nimport { addSegmentDetailsToContext } from './util/addSegmentDetailsToContext';\n\ntype ProcessSegmentSpanCallback = (spanJSON: StreamedSpanJSON) => void;\n\nexport function handleProcessSegmentSpan(replay: ReplayContainer): ProcessSegmentSpanCallback {\n  return (spanJSON: StreamedSpanJSON) => {\n    if (!replay.isEnabled()) {\n      return;\n    }\n\n    addSegmentDetailsToContext(replay, spanJSON.trace_id, spanJSON.name || undefined);\n  };\n}\n","import { WINDOW } from '../constants';\nimport type { AddEventResult, MemoryData, ReplayContainer, ReplayPerformanceEntry } from '../types';\nimport { createPerformanceSpans } from './createPerformanceSpans';\n\ntype ReplayMemoryEntry = ReplayPerformanceEntry<MemoryData> & { data: { memory: MemoryInfo } };\n\ninterface MemoryInfo {\n  jsHeapSizeLimit: number;\n  totalJSHeapSize: number;\n  usedJSHeapSize: number;\n}\n\n/**\n * Create a \"span\" for the total amount of memory being used by JS objects\n * (including v8 internal objects).\n */\nexport async function addMemoryEntry(replay: ReplayContainer): Promise<Array<AddEventResult | null>> {\n  // window.performance.memory is a non-standard API and doesn't work on all browsers, so we try-catch this\n  try {\n    return Promise.all(\n      createPerformanceSpans(replay, [\n        // @ts-expect-error memory doesn't exist on type Performance as the API is non-standard (we check that it exists above)\n        createMemoryEntry(WINDOW.performance.memory),\n      ]),\n    );\n  } catch {\n    // Do nothing\n    return [];\n  }\n}\n\nfunction createMemoryEntry(memoryEntry: MemoryInfo): ReplayMemoryEntry {\n  const { jsHeapSizeLimit, totalJSHeapSize, usedJSHeapSize } = memoryEntry;\n  // we don't want to use `getAbsoluteTime` because it adds the event time to the\n  // time origin, so we get the current timestamp instead\n  const time = Date.now() / 1000;\n  return {\n    type: 'memory',\n    name: 'memory',\n    start: time,\n    end: time,\n    data: {\n      memory: {\n        jsHeapSizeLimit,\n        totalJSHeapSize,\n        usedJSHeapSize,\n      },\n    },\n  };\n}\n","import { GLOBAL_OBJ } from '@sentry/core';\n\nconst NAVIGATOR = GLOBAL_OBJ.navigator;\n\n/**\n *  Disable sampling mousemove events on iOS browsers as this can cause blocking the main thread\n *  https://github.com/getsentry/sentry-javascript/issues/14534\n */\nexport function getRecordingSamplingOptions(): Partial<{ sampling: { mousemove: boolean } }> {\n  if (\n    /iPhone|iPad|iPod/i.test(NAVIGATOR?.userAgent ?? '') ||\n    (/Macintosh/i.test(NAVIGATOR?.userAgent ?? '') && NAVIGATOR?.maxTouchPoints && NAVIGATOR?.maxTouchPoints > 1)\n  ) {\n    return {\n      sampling: {\n        mousemove: false,\n      },\n    };\n  }\n\n  return {};\n}\n","import { EventType, IncrementalSource, record } from '@sentry/rrweb';\nimport { NodeType } from '@sentry/rrweb-snapshot';\nimport { updateClickDetectorForRecordingEvent } from '../coreHandlers/handleClick';\nimport { DEBUG_BUILD } from '../debug-build';\nimport { saveSession } from '../session/saveSession';\nimport type { RecordingEvent, ReplayContainer, ReplayOptionFrameEvent } from '../types';\nimport { addEventSync } from './addEvent';\nimport { debug } from './logger';\n\ntype MutationAttributeData = {\n  id: number;\n  attributes: Record<string, string | number | true | null>;\n};\n\ntype RecordingEmitCallback = (event: RecordingEvent, isCheckout?: boolean) => void;\n\n/**\n * Handler for recording events.\n *\n * Adds to event buffer, and has varying flushing behaviors if the event was a checkout.\n */\nexport function getHandleRecordingEmit(replay: ReplayContainer): RecordingEmitCallback {\n  let hadFirstEvent = false;\n\n  return (event: RecordingEvent, _isCheckout?: boolean) => {\n    // This callback runs synchronously inside rrweb's observer / `takeFullSnapshot`\n    // call stack. If it throws, rrweb re-throws it (our `errorHandler` returns\n    // `undefined`) and can tear down recording — e.g. leaving the mutation buffer\n    // permanently locked. Never let an exception escape back into rrweb.\n    try {\n      // If this is false, it means session is expired, create and a new session and wait for checkout\n      if (!replay.checkAndHandleExpiredSession()) {\n        DEBUG_BUILD && debug.warn('Received replay event after session expired.');\n\n        return;\n      }\n\n      // `_isCheckout` is only set when the checkout is due to `checkoutEveryNms`\n      // We also want to treat the first event as a checkout, so we handle this specifically here\n      const isCheckout = _isCheckout || !hadFirstEvent;\n      hadFirstEvent = true;\n\n      syncMirrorAttributesFromMutationEvent(event);\n\n      if (replay.clickDetector) {\n        updateClickDetectorForRecordingEvent(replay.clickDetector, event);\n      }\n\n      // The handler returns `true` if we do not want to trigger debounced flush, `false` if we want to debounce flush.\n      replay.addUpdate(() => {\n        // The session is always started immediately on pageload/init, but for\n        // error-only replays, it should reflect the most recent checkout\n        // when an error occurs. Clear any state that happens before this current\n        // checkout. This needs to happen before `addEvent()` which updates state\n        // dependent on this reset.\n        if (replay.recordingMode === 'buffer' && isCheckout) {\n          replay.setInitialState();\n        }\n\n        // If the event is not added (e.g. due to being paused, disabled, or out of the max replay duration),\n        // Skip all further steps\n        if (!addEventSync(replay, event, isCheckout)) {\n          // Return true to skip scheduling a debounced flush\n          return true;\n        }\n\n        // Different behavior for full snapshots (type=2), ignore other event types\n        // See https://github.com/rrweb-io/rrweb/blob/d8f9290ca496712aa1e7d472549480c4e7876594/packages/rrweb/src/types.ts#L16\n        if (!isCheckout) {\n          return false;\n        }\n\n        const session = replay.session;\n\n        // Additionally, create a meta event that will capture certain SDK settings.\n        // In order to handle buffer mode, this needs to either be done when we\n        // receive checkout events or at flush time. We have an experimental mode\n        // to perform multiple checkouts a session (the idea is to improve\n        // seeking during playback), so also only include if segmentId is 0\n        // (handled in `addSettingsEvent`).\n        //\n        // `isCheckout` is always true, but want to be explicit that it should\n        // only be added for checkouts\n        addSettingsEvent(replay, isCheckout);\n\n        // When in buffer mode, make sure we adjust the session started date to the current earliest event of the buffer\n        // this should usually be the timestamp of the checkout event, but to be safe...\n        if (replay.recordingMode === 'buffer' && session && replay.eventBuffer && !session.dirty) {\n          const earliestEvent = replay.eventBuffer.getEarliestTimestamp();\n          if (earliestEvent) {\n            DEBUG_BUILD &&\n              debug.log(`Updating session start time to earliest event in buffer to ${new Date(earliestEvent)}`);\n\n            session.started = earliestEvent;\n\n            if (replay.getOptions().stickySession) {\n              saveSession(session);\n            }\n          }\n        }\n\n        // If there is a previousSessionId after a full snapshot occurs, then\n        // the replay session was started due to session expiration. The new session\n        // is started before triggering a new checkout and contains the id\n        // of the previous session. Do not immediately flush in this case\n        // to avoid capturing only the checkout and instead the replay will\n        // be captured if they perform any follow-up actions.\n        if (session?.previousSessionId) {\n          return true;\n        }\n\n        if (replay.recordingMode === 'session') {\n          // If the full snapshot is due to an initial load, we will not have\n          // a previous session ID. In this case, we want to buffer events\n          // for a set amount of time before flushing. This can help avoid\n          // capturing replays of users that immediately close the window.\n\n          // This should never reject\n          // eslint-disable-next-line @typescript-eslint/no-floating-promises\n          void replay.flush();\n        }\n\n        return true;\n      });\n    } catch (error) {\n      replay.handleException(error);\n    }\n  };\n}\n\nexport function syncMirrorAttributesFromMutationEvent(event: RecordingEvent): void {\n  const data = event.data;\n\n  if (\n    event.type !== EventType.IncrementalSnapshot ||\n    !data ||\n    typeof data !== 'object' ||\n    !('source' in data) ||\n    data.source !== IncrementalSource.Mutation ||\n    !('attributes' in data) ||\n    !Array.isArray(data.attributes)\n  ) {\n    return;\n  }\n\n  for (const mutation of data.attributes as MutationAttributeData[]) {\n    const node = record.mirror.getNode(mutation.id);\n    const meta = node && record.mirror.getMeta(node);\n\n    if (meta?.type !== NodeType.Element) {\n      continue;\n    }\n\n    for (const [attributeName, value] of Object.entries(mutation.attributes)) {\n      if (value === null) {\n        // oxlint-disable-next-line typescript/no-dynamic-delete\n        delete meta.attributes[attributeName];\n      } else {\n        meta.attributes[attributeName] = value;\n      }\n    }\n  }\n}\n\n/**\n * Exported for tests\n */\nexport function createOptionsEvent(replay: ReplayContainer): ReplayOptionFrameEvent {\n  const options = replay.getOptions();\n  return {\n    type: EventType.Custom,\n    timestamp: Date.now(),\n    data: {\n      tag: 'options',\n      payload: {\n        shouldRecordCanvas: replay.isRecordingCanvas(),\n        sessionSampleRate: options.sessionSampleRate,\n        errorSampleRate: options.errorSampleRate,\n        useCompressionOption: options.useCompression,\n        blockAllMedia: options.blockAllMedia,\n        maskAllText: options.maskAllText,\n        maskAllInputs: options.maskAllInputs,\n        useCompression: replay.eventBuffer ? replay.eventBuffer.type === 'worker' : false,\n        networkDetailHasUrls: options.networkDetailAllowUrls.length > 0,\n        networkCaptureBodies: options.networkCaptureBodies,\n        networkRequestHasHeaders: options.networkRequestHeaders.length > 0,\n        networkResponseHasHeaders: options.networkResponseHeaders.length > 0,\n      },\n    },\n  };\n}\n\n/**\n * Add a \"meta\" event that contains a simplified view on current configuration\n * options. This should only be included on the first segment of a recording.\n */\nfunction addSettingsEvent(replay: ReplayContainer, isCheckout?: boolean): void {\n  // Only need to add this event when sending the first segment\n  if (!isCheckout || replay.session?.segmentId !== 0) {\n    return;\n  }\n\n  addEventSync(replay, createOptionsEvent(replay), false);\n}\n","type ClassOption = string | RegExp;\n\n/** Duplicate this from @sentry/rrweb so we can export this as well. */\nexport const ReplayEventTypeDomContentLoaded = 0;\nexport const ReplayEventTypeLoad = 1;\nexport const ReplayEventTypeFullSnapshot = 2;\nexport const ReplayEventTypeIncrementalSnapshot = 3;\nexport const ReplayEventTypeMeta = 4;\nexport const ReplayEventTypeCustom = 5;\nexport const ReplayEventTypePlugin = 6;\n\nexport type ReplayEventType =\n  | typeof ReplayEventTypeDomContentLoaded\n  | typeof ReplayEventTypeLoad\n  | typeof ReplayEventTypeFullSnapshot\n  | typeof ReplayEventTypeIncrementalSnapshot\n  | typeof ReplayEventTypeMeta\n  | typeof ReplayEventTypeCustom\n  | typeof ReplayEventTypePlugin;\n\n/**\n * This is a partial copy of rrweb's eventWithTime type which only contains the properties\n * we specifically need in the SDK.\n */\nexport type ReplayEventWithTime = {\n  type: ReplayEventType;\n  data: unknown;\n  timestamp: number;\n  delay?: number;\n};\n\n/**\n * This is a partial copy of rrweb's recording options which only contains the properties\n * we specifically use in the SDK. Users can specify additional properties, hence we add the\n * Record<string, unknown> union type.\n */\nexport type RrwebRecordOptions = {\n  maskAllText?: boolean;\n  maskAllInputs?: boolean;\n  blockClass?: ClassOption;\n  ignoreClass?: string;\n  maskTextClass?: ClassOption;\n  maskTextSelector?: string;\n  blockSelector?: string;\n  maskInputOptions?: Record<string, boolean>;\n  recordCrossOriginIframes?: boolean;\n} & Record<string, unknown>;\n\nexport interface CanvasManagerInterface {\n  reset(): void;\n  freeze(): void;\n  unfreeze(): void;\n  lock(): void;\n  unlock(): void;\n  snapshot(): void;\n  addWindow(win: typeof globalThis & Window): void;\n  addShadowRoot(shadowRoot: ShadowRoot): void;\n  resetShadowRoots(): void;\n}\n\nexport interface CanvasManagerOptions {\n  recordCanvas: boolean;\n  enableManualSnapshot?: boolean;\n  blockClass: string | RegExp;\n  blockSelector: string | null;\n  unblockSelector: string | null;\n  sampling?: 'all' | number;\n  dataURLOptions: Partial<{\n    type: string;\n    quality: number;\n  }>;\n  // eslint-disable-next-line @typescript-eslint/no-explicit-any\n  mutationCb: (p: any) => void;\n  win: typeof globalThis & Window;\n  // eslint-disable-next-line @typescript-eslint/no-explicit-any\n  mirror: any;\n}\n","import type { RateLimits, ReplayEvent, TransportMakeRequestResponse } from '@sentry/core';\nimport { getClient, getCurrentScope, isRateLimited, updateRateLimits } from '@sentry/core';\nimport { REPLAY_EVENT_NAME, UNABLE_TO_SEND_REPLAY } from '../constants';\nimport { DEBUG_BUILD } from '../debug-build';\nimport type { SendReplayData } from '../types';\nimport { createReplayEnvelope } from './createReplayEnvelope';\nimport { debug } from './logger';\nimport { prepareRecordingData } from './prepareRecordingData';\nimport { prepareReplayEvent } from './prepareReplayEvent';\n\n/**\n * Send replay attachment using `fetch()`\n */\nexport async function sendReplayRequest({\n  recordingData,\n  replayId,\n  segmentId: segment_id,\n  eventContext,\n  timestamp,\n  session,\n}: SendReplayData): Promise<TransportMakeRequestResponse> {\n  const preparedRecordingData = prepareRecordingData({\n    recordingData,\n    headers: {\n      segment_id,\n    },\n  });\n\n  const { urls, errorIds, traceIds, segmentNames, initialTimestamp } = eventContext;\n\n  const client = getClient();\n  const scope = getCurrentScope();\n  const transport = client?.getTransport();\n  const dsn = client?.getDsn();\n\n  if (!client || !transport || !dsn || !session.sampled) {\n    return Promise.resolve({});\n  }\n\n  const baseEvent: ReplayEvent = {\n    type: REPLAY_EVENT_NAME,\n    replay_start_timestamp: initialTimestamp / 1000,\n    timestamp: timestamp / 1000,\n    error_ids: errorIds,\n    trace_ids: traceIds,\n    segment_names: segmentNames,\n    urls,\n    replay_id: replayId,\n    segment_id,\n    replay_type: session.sampled,\n  };\n\n  const replayEvent = await prepareReplayEvent({ scope, client, replayId, event: baseEvent });\n\n  if (!replayEvent) {\n    // Taken from baseclient's `_processEvent` method, where this is handled for errors/transactions\n    client.recordDroppedEvent('event_processor', 'replay');\n    DEBUG_BUILD && debug.log('An event processor returned `null`, will not send event.');\n    return Promise.resolve({});\n  }\n\n  /*\n  For reference, the fully built event looks something like this:\n  {\n      \"type\": \"replay_event\",\n      \"timestamp\": 1670837008.634,\n      \"error_ids\": [\n          \"errorId\"\n      ],\n      \"trace_ids\": [\n          \"traceId\"\n      ],\n      \"urls\": [\n          \"https://example.com\"\n      ],\n      \"replay_id\": \"eventId\",\n      \"segment_id\": 3,\n      \"replay_type\": \"error\",\n      \"platform\": \"javascript\",\n      \"event_id\": \"eventId\",\n      \"environment\": \"production\",\n      \"sdk\": {\n          \"integrations\": [\n              \"BrowserTracing\",\n              \"Replay\"\n          ],\n          \"name\": \"sentry.javascript.browser\",\n          \"version\": \"7.25.0\"\n      },\n      \"sdkProcessingMetadata\": {},\n      \"contexts\": {\n      },\n  }\n  */\n\n  // Prevent this data (which, if it exists, was used in earlier steps in the processing pipeline) from being sent to\n  // sentry. (Note: Our use of this property comes and goes with whatever we might be debugging, whatever hacks we may\n  // have temporarily added, etc. Even if we don't happen to be using it at some point in the future, let's not get rid\n  // of this `delete`, lest we miss putting it back in the next time the property is in use.)\n  delete replayEvent.sdkProcessingMetadata;\n\n  const envelope = createReplayEnvelope(replayEvent, preparedRecordingData, dsn, client.getOptions().tunnel);\n\n  let response: TransportMakeRequestResponse;\n\n  try {\n    response = await transport.send(envelope);\n  } catch (err) {\n    const error = new Error(UNABLE_TO_SEND_REPLAY);\n\n    try {\n      // In case browsers don't allow this property to be writable\n      // @ts-expect-error This needs lib es2022 and newer\n      error.cause = err;\n    } catch {\n      // nothing to do\n    }\n    throw error;\n  }\n\n  // Check for rate limiting first (handles 429 and rate limit headers)\n  const rateLimits = updateRateLimits({}, response);\n  if (isRateLimited(rateLimits, 'replay')) {\n    throw new RateLimitError(rateLimits);\n  }\n\n  // If the status code is invalid, we want to immediately stop & not retry\n  if (typeof response.statusCode === 'number' && (response.statusCode < 200 || response.statusCode >= 300)) {\n    throw new TransportStatusCodeError(response.statusCode);\n  }\n\n  return response;\n}\n\n/**\n * This error indicates that the transport returned an invalid status code.\n */\nexport class TransportStatusCodeError extends Error {\n  public constructor(statusCode: number) {\n    super(`Transport returned status code ${statusCode}`);\n  }\n}\n\n/**\n * This error indicates that we hit a rate limit API error.\n */\nexport class RateLimitError extends Error {\n  public rateLimits: RateLimits;\n\n  public constructor(rateLimits: RateLimits) {\n    super('Rate limit hit');\n    this.rateLimits = rateLimits;\n  }\n}\n\n/**\n * This error indicates that the replay duration limit was exceeded and the session is too long.\n *\n */\nexport class ReplayDurationLimitError extends Error {\n  public constructor() {\n    super('Session is too long, not sending replay');\n  }\n}\n","import { setContext } from '@sentry/core';\nimport { setTimeout } from '@sentry/browser-utils';\nimport { RETRY_BASE_INTERVAL, RETRY_MAX_COUNT, UNABLE_TO_SEND_REPLAY } from '../constants';\nimport type { SendReplayData } from '../types';\nimport { RateLimitError, sendReplayRequest, TransportStatusCodeError } from './sendReplayRequest';\n\n/**\n * Finalize and send the current replay event to Sentry\n */\nexport async function sendReplay(\n  replayData: SendReplayData,\n  retryConfig = {\n    count: 0,\n    interval: RETRY_BASE_INTERVAL,\n  },\n): Promise<unknown> {\n  const { recordingData, onError } = replayData;\n\n  // short circuit if there's no events to upload (this shouldn't happen as _runFlush makes this check)\n  if (!recordingData.length) {\n    return;\n  }\n\n  try {\n    await sendReplayRequest(replayData);\n    return true;\n  } catch (err) {\n    if (err instanceof TransportStatusCodeError || err instanceof RateLimitError) {\n      throw err;\n    }\n\n    // Capture error for every failed replay\n    setContext('Replays', {\n      _retryCount: retryConfig.count,\n    });\n\n    if (onError) {\n      onError(err);\n    }\n\n    // If an error happened here, it's likely that uploading the attachment\n    // failed, we'll can retry with the same events payload\n    if (retryConfig.count >= RETRY_MAX_COUNT) {\n      const error = new Error(`${UNABLE_TO_SEND_REPLAY} - max retries exceeded`);\n\n      try {\n        // In case browsers don't allow this property to be writable\n        // @ts-expect-error This needs lib es2022 and newer\n        error.cause = err;\n      } catch {\n        // nothing to do\n      }\n\n      throw error;\n    }\n\n    // will retry in intervals of 5, 10, 30\n    retryConfig.interval *= ++retryConfig.count;\n\n    return new Promise((resolve, reject) => {\n      setTimeout(async () => {\n        try {\n          await sendReplay(replayData, retryConfig);\n          resolve(true);\n        } catch (err) {\n          reject(err);\n        }\n      }, retryConfig.interval);\n    });\n  }\n}\n","import type { ReplayRecordingData } from '@sentry/core';\n\n/**\n * Prepare the recording data ready to be sent.\n */\nexport function prepareRecordingData({\n  recordingData,\n  headers,\n}: {\n  recordingData: ReplayRecordingData;\n  headers: Record<string, unknown>;\n}): ReplayRecordingData {\n  let payloadWithSequence;\n\n  // XXX: newline is needed to separate sequence id from events\n  const replayHeaders = `${JSON.stringify(headers)}\n`;\n\n  if (typeof recordingData === 'string') {\n    payloadWithSequence = `${replayHeaders}${recordingData}`;\n  } else {\n    const enc = new TextEncoder();\n    // XXX: newline is needed to separate sequence id from events\n    const sequence = enc.encode(replayHeaders);\n    // Merge the two Uint8Arrays\n    payloadWithSequence = new Uint8Array(sequence.length + recordingData.length);\n    payloadWithSequence.set(sequence);\n    payloadWithSequence.set(recordingData, sequence.length);\n  }\n\n  return payloadWithSequence;\n}\n","import type { Client, EventHint, ReplayEvent, Scope } from '@sentry/core';\nimport { getIsolationScope, prepareEvent } from '@sentry/core';\n\n/**\n * Prepare a replay event & enrich it with the SDK metadata.\n */\nexport async function prepareReplayEvent({\n  client,\n  scope,\n  replayId: event_id,\n  event,\n}: {\n  client: Client;\n  scope: Scope;\n  replayId: string;\n  event: ReplayEvent;\n}): Promise<ReplayEvent | null> {\n  const integrations =\n    typeof client['_integrations'] === 'object' &&\n    client['_integrations'] !== null &&\n    !Array.isArray(client['_integrations'])\n      ? Object.keys(client['_integrations'])\n      : undefined;\n\n  const eventHint: EventHint = { event_id, integrations };\n\n  client.emit('preprocessEvent', event, eventHint);\n\n  const preparedEvent = (await prepareEvent(\n    client.getOptions(),\n    event,\n    eventHint,\n    scope,\n    client,\n    getIsolationScope(),\n  )) as ReplayEvent | null;\n\n  // If e.g. a global event processor returned null\n  if (!preparedEvent) {\n    return null;\n  }\n\n  client.emit('postprocessEvent', preparedEvent, eventHint);\n\n  // This normally happens in browser client \"_prepareEvent\"\n  // but since we do not use this private method from the client, but rather the plain import\n  // we need to do this manually.\n  preparedEvent.platform = preparedEvent.platform || 'javascript';\n\n  // extract the SDK name because `client._prepareEvent` doesn't add it to the event\n  const metadata = client.getSdkMetadata();\n  const { name, version, settings } = metadata?.sdk || {};\n\n  preparedEvent.sdk = {\n    ...preparedEvent.sdk,\n    name: name || 'sentry.javascript.unknown',\n    version: version || '0.0.0',\n    settings,\n  };\n\n  return preparedEvent;\n}\n","import type { DsnComponents, ReplayEnvelope, ReplayEvent, ReplayRecordingData } from '@sentry/core';\nimport { createEnvelope, createEventEnvelopeHeaders, getSdkMetadataForEnvelopeHeader } from '@sentry/core';\n\n/**\n * Create a replay envelope ready to be sent.\n * This includes both the replay event, as well as the recording data.\n */\nexport function createReplayEnvelope(\n  replayEvent: ReplayEvent,\n  recordingData: ReplayRecordingData,\n  dsn: DsnComponents,\n  tunnel?: string,\n): ReplayEnvelope {\n  return createEnvelope<ReplayEnvelope>(\n    createEventEnvelopeHeaders(replayEvent, getSdkMetadataForEnvelopeHeader(replayEvent), tunnel, dsn),\n    [\n      [{ type: 'replay_event' }, replayEvent],\n      [\n        {\n          type: 'replay_recording',\n          // If string then we need to encode to UTF8, otherwise will have\n          // wrong size. TextEncoder has similar browser support to\n          // MutationObserver, although it does not accept IE11.\n          length:\n            typeof recordingData === 'string' ? new TextEncoder().encode(recordingData).length : recordingData.length,\n        },\n        recordingData,\n      ],\n    ],\n  );\n}\n","export const THROTTLED = '__THROTTLED';\nexport const SKIPPED = '__SKIPPED';\n\n/**\n * Create a throttled function off a given function.\n * When calling the throttled function, it will call the original function only\n * if it hasn't been called more than `maxCount` times in the last `durationSeconds`.\n *\n * Returns `THROTTLED` if throttled for the first time, after that `SKIPPED`,\n * or else the return value of the original function.\n */\n// eslint-disable-next-line @typescript-eslint/no-explicit-any\nexport function throttle<T extends (...rest: any[]) => any>(\n  fn: T,\n  maxCount: number,\n  durationSeconds: number,\n): (...rest: Parameters<T>) => ReturnType<T> | typeof THROTTLED | typeof SKIPPED {\n  const counter = new Map<number, number>();\n\n  const _cleanup = (now: number): void => {\n    const threshold = now - durationSeconds;\n    counter.forEach((_value, key) => {\n      if (key < threshold) {\n        counter.delete(key);\n      }\n    });\n  };\n\n  const _getTotalCount = (): number => {\n    return [...counter.values()].reduce((a, b) => a + b, 0);\n  };\n\n  let isThrottled = false;\n\n  return (...rest: Parameters<T>): ReturnType<T> | typeof THROTTLED | typeof SKIPPED => {\n    // Date in second-precision, which we use as basis for the throttling\n    const now = Math.floor(Date.now() / 1000);\n\n    // First, make sure to delete any old entries\n    _cleanup(now);\n\n    // If already over limit, do nothing\n    if (_getTotalCount() >= maxCount) {\n      const wasThrottled = isThrottled;\n      isThrottled = true;\n      return wasThrottled ? SKIPPED : THROTTLED;\n    }\n\n    isThrottled = false;\n    const count = counter.get(now) || 0;\n    counter.set(now, count + 1);\n\n    return fn(...rest);\n  };\n}\n","/* eslint-disable max-lines */ // TODO: We might want to split this file up\nimport type { ReplayRecordingMode, ReplayStopReason, Span } from '@sentry/core';\nimport { getActiveSpan, getClient, getRootSpan, SEMANTIC_ATTRIBUTE_SENTRY_SOURCE, spanToJSON } from '@sentry/core';\nimport { EventType, record } from '@sentry/rrweb';\nimport {\n  BUFFER_CHECKOUT_TIME,\n  SESSION_IDLE_EXPIRE_DURATION,\n  SESSION_IDLE_PAUSE_DURATION,\n  SLOW_CLICK_SCROLL_TIMEOUT,\n  SLOW_CLICK_THRESHOLD,\n  WINDOW,\n} from './constants';\nimport { ClickDetector } from './coreHandlers/handleClick';\nimport { handleKeyboardEvent } from './coreHandlers/handleKeyboardEvent';\nimport { setupPerformanceObserver } from './coreHandlers/performanceObserver';\nimport { DEBUG_BUILD } from './debug-build';\nimport { createEventBuffer } from './eventBuffer';\nimport { clearSession } from './session/clearSession';\nimport { loadOrCreateSession } from './session/loadOrCreateSession';\nimport { saveSession } from './session/saveSession';\nimport { shouldRefreshSession } from './session/shouldRefreshSession';\nimport type {\n  AddEventResult,\n  AddUpdateCallback,\n  AllPerformanceEntry,\n  AllPerformanceEntryData,\n  EventBuffer,\n  InternalEventContext,\n  PopEventContext,\n  RecordingEvent,\n  RecordingOptions,\n  ReplayBreadcrumbFrame,\n  ReplayCanvasIntegrationOptions,\n  ReplayContainer as ReplayContainerInterface,\n  ReplayPerformanceEntry,\n  ReplayPluginOptions,\n  SendBufferedReplayOptions,\n  Session,\n  SlowClickConfig,\n  Timeouts,\n} from './types';\nimport { ReplayEventTypeCustom } from './types';\nimport { addEvent, addEventSync } from './util/addEvent';\nimport { addGlobalListeners } from './util/addGlobalListeners';\nimport { addMemoryEntry } from './util/addMemoryEntry';\nimport { createBreadcrumb } from './util/createBreadcrumb';\nimport { createPerformanceEntries } from './util/createPerformanceEntries';\nimport { createPerformanceSpans } from './util/createPerformanceSpans';\nimport { debounce } from './util/debounce';\nimport { getRecordingSamplingOptions } from './util/getRecordingSamplingOptions';\nimport { getHandleRecordingEmit } from './util/handleRecordingEmit';\nimport { isExpired } from './util/isExpired';\nimport { debug } from './util/logger';\nimport {\n  resetReplayIdOnDynamicSamplingContext,\n  setReplayIdOnDynamicSamplingContext,\n} from './util/resetReplayIdOnDynamicSamplingContext';\nimport { closestElementOfNode } from './util/rrweb';\nimport { sendReplay } from './util/sendReplay';\nimport { RateLimitError, ReplayDurationLimitError } from './util/sendReplayRequest';\nimport type { SKIPPED } from './util/throttle';\nimport { throttle, THROTTLED } from './util/throttle';\n\n/**\n * The main replay container class, which holds all the state and methods for recording and sending replays.\n */\nexport class ReplayContainer implements ReplayContainerInterface {\n  public eventBuffer: EventBuffer | null;\n\n  public performanceEntries: AllPerformanceEntry[];\n\n  public replayPerformanceEntries: ReplayPerformanceEntry<AllPerformanceEntryData>[];\n\n  public session: Session | undefined;\n\n  public clickDetector: ClickDetector | undefined;\n\n  /**\n   * Recording can happen in one of two modes:\n   *   - session: Record the whole session, sending it continuously\n   *   - buffer: Always keep the last 60s of recording, requires:\n   *     - having replaysOnErrorSampleRate > 0 to capture replay when an error occurs\n   *     - or calling `flush()` to send the replay\n   */\n  public recordingMode: ReplayRecordingMode;\n\n  /**\n   * The current or last active span.\n   * This is only available when performance is enabled.\n   */\n  public lastActiveSpan?: Span;\n\n  /**\n   * These are here so we can overwrite them in tests etc.\n   * @hidden\n   */\n  public readonly timeouts: Timeouts;\n\n  /** The replay has to be manually started, because no sample rate (neither session or error) was provided. */\n  private _requiresManualStart: boolean;\n\n  private _throttledAddEvent: (\n    event: RecordingEvent,\n    isCheckout?: boolean,\n  ) => typeof THROTTLED | typeof SKIPPED | Promise<AddEventResult | null>;\n\n  /**\n   * Options to pass to `rrweb.record()`\n   */\n  private readonly _recordingOptions: RecordingOptions;\n\n  private readonly _options: ReplayPluginOptions;\n\n  private _performanceCleanupCallback?: () => void;\n\n  private _debouncedFlush: ReturnType<typeof debounce>;\n  private _flushLock: Promise<unknown> | undefined;\n\n  /**\n   * Timestamp of the last user activity. This lives across sessions.\n   */\n  private _lastActivity: number;\n\n  /**\n   * Is the integration currently active?\n   */\n  private _isEnabled: boolean;\n\n  /**\n   * Paused is a state where:\n   * - DOM Recording is not listening at all\n   * - Nothing will be added to event buffer (e.g. core SDK events)\n   */\n  private _isPaused: boolean;\n\n  /**\n   * Have we attached listeners to the core SDK?\n   * Note we have to track this as there is no way to remove instrumentation handlers.\n   */\n  private _hasInitializedCoreListeners: boolean;\n\n  /**\n   * Function to stop recording\n   */\n  private _stopRecording: ReturnType<typeof record> | undefined;\n\n  private _context: InternalEventContext;\n\n  /**\n   * Internal use for canvas recording options\n   */\n  private _canvas: ReplayCanvasIntegrationOptions | undefined;\n\n  /**\n   * Handle when visibility of the page content changes. Opening a new tab will\n   * cause the state to change to hidden because of content of current page will\n   * be hidden. Likewise, moving a different window to cover the contents of the\n   * page will also trigger a change to a hidden state.\n   */\n  private _handleVisibilityChange: () => void;\n\n  /**\n   * Handle when page is blurred\n   */\n  private _handleWindowBlur: () => void;\n\n  /**\n   * Handle when page is focused\n   */\n  private _handleWindowFocus: () => void;\n\n  /** Ensure page remains active when a key is pressed. */\n  private _handleKeyboardEvent: (event: KeyboardEvent) => void;\n\n  public constructor({\n    options,\n    recordingOptions,\n  }: {\n    options: ReplayPluginOptions;\n    recordingOptions: RecordingOptions;\n  }) {\n    this.eventBuffer = null;\n    this.performanceEntries = [];\n    this.replayPerformanceEntries = [];\n    this.recordingMode = 'session';\n    this.timeouts = {\n      sessionIdlePause: SESSION_IDLE_PAUSE_DURATION,\n      sessionIdleExpire: SESSION_IDLE_EXPIRE_DURATION,\n    } as const;\n    this._lastActivity = Date.now();\n    this._isEnabled = false;\n    this._isPaused = false;\n    this._requiresManualStart = false;\n    this._hasInitializedCoreListeners = false;\n    this._context = {\n      errorIds: new Set(),\n      traceIds: new Set(),\n      segmentNames: new Set(),\n      urls: [],\n      initialTimestamp: Date.now(),\n      initialUrl: '',\n    };\n\n    this._recordingOptions = recordingOptions;\n    this._options = options;\n\n    this._debouncedFlush = debounce(() => this._flush(), this._options.flushMinDelay, {\n      maxWait: this._options.flushMaxDelay,\n    });\n\n    this._throttledAddEvent = throttle(\n      (event: RecordingEvent, isCheckout?: boolean) => addEvent(this, event, isCheckout),\n      // Max 300 events...\n      300,\n      // ... per 5s\n      5,\n    );\n\n    const { slowClickTimeout, slowClickIgnoreSelectors } = this.getOptions();\n\n    const slowClickConfig: SlowClickConfig | undefined = slowClickTimeout\n      ? {\n          threshold: Math.min(SLOW_CLICK_THRESHOLD, slowClickTimeout),\n          timeout: slowClickTimeout,\n          scrollTimeout: SLOW_CLICK_SCROLL_TIMEOUT,\n          ignoreSelector: slowClickIgnoreSelectors ? slowClickIgnoreSelectors.join(',') : '',\n        }\n      : undefined;\n\n    if (slowClickConfig) {\n      this.clickDetector = new ClickDetector(this, slowClickConfig);\n    }\n\n    // Configure replay debug logger w/ experimental options\n    if (DEBUG_BUILD) {\n      const experiments = options._experiments;\n      debug.setConfig({\n        captureExceptions: !!experiments.captureExceptions,\n        traceInternals: !!experiments.traceInternals,\n      });\n    }\n\n    // We set these handler properties as class properties, to make binding/unbinding them easier\n    this._handleVisibilityChange = () => {\n      if (WINDOW.document.visibilityState === 'visible') {\n        this._doChangeToForegroundTasks();\n      } else {\n        this._doChangeToBackgroundTasks();\n      }\n    };\n\n    /**\n     * Handle when page is blurred\n     */\n    this._handleWindowBlur = () => {\n      const breadcrumb = createBreadcrumb({\n        category: 'ui.blur',\n      });\n\n      // Do not count blur as a user action -- it's part of the process of them\n      // leaving the page\n      this._doChangeToBackgroundTasks(breadcrumb);\n    };\n\n    this._handleWindowFocus = () => {\n      const breadcrumb = createBreadcrumb({\n        category: 'ui.focus',\n      });\n\n      // Do not count focus as a user action -- instead wait until they focus and\n      // interactive with page\n      this._doChangeToForegroundTasks(breadcrumb);\n    };\n\n    /** Ensure page remains active when a key is pressed. */\n    this._handleKeyboardEvent = (event: KeyboardEvent) => {\n      handleKeyboardEvent(this, event);\n    };\n  }\n\n  /** Get the event context. */\n  public getContext(): InternalEventContext {\n    return this._context;\n  }\n\n  /** If recording is currently enabled. */\n  public isEnabled(): boolean {\n    return this._isEnabled;\n  }\n\n  /** If recording is currently paused. */\n  public isPaused(): boolean {\n    return this._isPaused;\n  }\n\n  /**\n   * Determine if canvas recording is enabled\n   */\n  public isRecordingCanvas(): boolean {\n    return Boolean(this._canvas);\n  }\n\n  /** Get the replay integration options. */\n  public getOptions(): ReplayPluginOptions {\n    return this._options;\n  }\n\n  /** A wrapper to conditionally capture exceptions. */\n  public handleException(error: unknown): void {\n    DEBUG_BUILD && debug.exception(error);\n    if (this._options.onError) {\n      this._options.onError(error);\n    }\n  }\n\n  /**\n   * Initializes the plugin based on sampling configuration. Should not be\n   * called outside of constructor.\n   */\n  public initializeSampling(previousSessionId?: string): void {\n    const { errorSampleRate, sessionSampleRate } = this._options;\n\n    // If neither sample rate is > 0, then do nothing - user will need to call one of\n    // `start()` or `startBuffering` themselves.\n    const requiresManualStart = errorSampleRate <= 0 && sessionSampleRate <= 0;\n\n    this._requiresManualStart = requiresManualStart;\n\n    if (requiresManualStart) {\n      return;\n    }\n\n    // Otherwise if there is _any_ sample rate set, try to load an existing\n    // session, or create a new one.\n    this._initializeSessionForSampling(previousSessionId);\n\n    if (!this.session) {\n      // This should not happen, something wrong has occurred\n      DEBUG_BUILD && debug.exception(new Error('Unable to initialize and create session'));\n      return;\n    }\n\n    if (this.session.sampled === false) {\n      // This should only occur if `errorSampleRate` is 0 and was unsampled for\n      // session-based replay. In this case there is nothing to do.\n      return;\n    }\n\n    // If segmentId > 0, it means we've previously already captured this session\n    // In this case, we still want to continue in `session` recording mode\n    this.recordingMode = this.session.sampled === 'buffer' && this.session.segmentId === 0 ? 'buffer' : 'session';\n\n    DEBUG_BUILD && debug.infoTick(`Starting replay in ${this.recordingMode} mode`);\n\n    this._initializeRecording();\n  }\n\n  /**\n   * Start a replay regardless of sampling rate. Calling this will always\n   * create a new session. Will log a message if replay is already in progress.\n   *\n   * Creates or loads a session, attaches listeners to varying events (DOM,\n   * _performanceObserver, Recording, Sentry SDK, etc)\n   */\n  public start(): void {\n    if (this._isEnabled && this.recordingMode === 'session') {\n      DEBUG_BUILD && debug.log('Recording is already in progress');\n      return;\n    }\n\n    if (this._isEnabled && this.recordingMode === 'buffer') {\n      DEBUG_BUILD && debug.log('Buffering is in progress, call `flush()` to save the replay');\n      return;\n    }\n\n    DEBUG_BUILD && debug.infoTick('Starting replay in session mode');\n\n    // Required as user activity is initially set in\n    // constructor, so if `start()` is called after\n    // session idle expiration, a replay will not be\n    // created due to an idle timeout.\n    this._updateUserActivity();\n\n    const session = loadOrCreateSession(\n      {\n        maxReplayDuration: this._options.maxReplayDuration,\n        sessionIdleExpire: this.timeouts.sessionIdleExpire,\n      },\n      {\n        stickySession: this._options.stickySession,\n        // This is intentional: create a new session-based replay when calling `start()`\n        sessionSampleRate: 1,\n        allowBuffering: false,\n      },\n    );\n\n    this.session = session;\n    this.recordingMode = 'session';\n\n    this._initializeRecording();\n  }\n\n  /**\n   * Start replay buffering. Buffers until `flush()` is called or, if\n   * `replaysOnErrorSampleRate` > 0, an error occurs.\n   */\n  public startBuffering(): void {\n    if (this._isEnabled) {\n      DEBUG_BUILD && debug.log('Buffering is in progress, call `flush()` to save the replay');\n      return;\n    }\n\n    DEBUG_BUILD && debug.infoTick('Starting replay in buffer mode');\n\n    const session = loadOrCreateSession(\n      {\n        sessionIdleExpire: this.timeouts.sessionIdleExpire,\n        maxReplayDuration: this._options.maxReplayDuration,\n      },\n      {\n        stickySession: this._options.stickySession,\n        sessionSampleRate: 0,\n        allowBuffering: true,\n      },\n    );\n\n    this.session = session;\n\n    this.recordingMode = 'buffer';\n    this._initializeRecording();\n  }\n\n  /**\n   * Start recording.\n   *\n   * Note that this will cause a new DOM checkout\n   */\n  public startRecording(): void {\n    try {\n      const canvasOptions = this._canvas;\n\n      this._stopRecording = record({\n        ...this._recordingOptions,\n        // When running in error sampling mode, we need to overwrite `checkoutEveryNms`\n        // Without this, it would record forever, until an error happens, which we don't want\n        // instead, we'll always keep the last 60 seconds of replay before an error happened\n        ...(this.recordingMode === 'buffer'\n          ? { checkoutEveryNms: BUFFER_CHECKOUT_TIME }\n          : // Otherwise, use experimental option w/ min checkout time of 6 minutes\n            // This is to improve playback seeking as there could potentially be\n            // less mutations to process in the worse cases.\n            //\n            // checkout by \"N\" events is probably ideal, but means we have less\n            // control about the number of checkouts we make (which generally\n            // increases replay size)\n            this._options._experiments.continuousCheckout && {\n              // Minimum checkout time is 6 minutes\n              checkoutEveryNms: Math.max(360_000, this._options._experiments.continuousCheckout),\n            }),\n        emit: getHandleRecordingEmit(this),\n        ...getRecordingSamplingOptions(),\n        onMutation: this._onMutationHandler.bind(this),\n        ...(canvasOptions\n          ? {\n              recordCanvas: canvasOptions.recordCanvas,\n              getCanvasManager: canvasOptions.getCanvasManager,\n              sampling: canvasOptions.sampling,\n              dataURLOptions: canvasOptions.dataURLOptions,\n            }\n          : {}),\n      });\n    } catch (err) {\n      this.handleException(err);\n    }\n  }\n\n  /**\n   * Stops the recording, if it was running.\n   *\n   * Returns true if it was previously stopped, or is now stopped,\n   * otherwise false.\n   */\n  public stopRecording(): boolean {\n    try {\n      if (this._stopRecording) {\n        this._stopRecording();\n        this._stopRecording = undefined;\n      }\n\n      return true;\n    } catch (err) {\n      this.handleException(err);\n      return false;\n    }\n  }\n\n  /**\n   * Currently, this needs to be manually called (e.g. for tests). Sentry SDK\n   * does not support a teardown\n   */\n  public async stop({\n    forceFlush = false,\n    reason,\n  }: { forceFlush?: boolean; reason?: ReplayStopReason } = {}): Promise<void> {\n    if (!this._isEnabled) {\n      return;\n    }\n\n    // We can't move `_isEnabled` after awaiting a flush, otherwise we can\n    // enter into an infinite loop when `stop()` is called while flushing.\n    this._isEnabled = false;\n\n    // Make sure to reset `recordingMode` to `buffer` to avoid any additional\n    // breadcrumbs to trigger a flush (e.g. in `addUpdate()`)\n    this.recordingMode = 'buffer';\n\n    const stopReason: ReplayStopReason = reason ?? 'manual';\n    getClient()?.emit('replayEnd', { sessionId: this.session?.id, reason: stopReason });\n\n    try {\n      DEBUG_BUILD && debug.log(`Stopping Replay triggered by ${stopReason}`);\n\n      resetReplayIdOnDynamicSamplingContext();\n\n      this._removeListeners();\n      this.stopRecording();\n\n      this._debouncedFlush.cancel();\n      // See comment above re: `_isEnabled`, we \"force\" a flush, ignoring the\n      // `_isEnabled` state of the plugin since it was disabled above.\n      if (forceFlush) {\n        await this._flush({ force: true });\n      }\n\n      // After flush, destroy event buffer\n      this.eventBuffer?.destroy();\n      this.eventBuffer = null;\n\n      // Clear session from session storage, note this means if a new session\n      // is started after, it will not have `previousSessionId`\n      clearSession(this);\n    } catch (err) {\n      this.handleException(err);\n    }\n  }\n\n  /**\n   * Pause some replay functionality. See comments for `_isPaused`.\n   * This differs from stop as this only stops DOM recording, it is\n   * not as thorough of a shutdown as `stop()`.\n   */\n  public pause(): void {\n    if (this._isPaused) {\n      return;\n    }\n\n    this._isPaused = true;\n    this.stopRecording();\n\n    DEBUG_BUILD && debug.log('Pausing replay');\n  }\n\n  /**\n   * Resumes recording, see notes for `pause().\n   *\n   * Note that calling `startRecording()` here will cause a\n   * new DOM checkout.`\n   */\n  public resume(): void {\n    if (!this._isPaused || !this._checkSession()) {\n      return;\n    }\n\n    this._isPaused = false;\n    this.startRecording();\n\n    DEBUG_BUILD && debug.log('Resuming replay');\n  }\n\n  /**\n   * If not in \"session\" recording mode, flush event buffer which will create a new replay.\n   * Unless `continueRecording` is false, the replay will continue to record and\n   * behave as a \"session\"-based replay.\n   *\n   * Otherwise, queue up a flush.\n   */\n  public async sendBufferedReplayOrFlush({ continueRecording = true }: SendBufferedReplayOptions = {}): Promise<void> {\n    if (this.recordingMode === 'session') {\n      return this.flushImmediate();\n    }\n\n    const activityTime = Date.now();\n\n    DEBUG_BUILD && debug.log('Converting buffer to session');\n\n    // Allow flush to complete before resuming as a session recording, otherwise\n    // the checkout from `startRecording` may be included in the payload.\n    // Prefer to keep the error replay as a separate (and smaller) segment\n    // than the session replay.\n    await this.flushImmediate();\n\n    const hasStoppedRecording = this.stopRecording();\n\n    if (!continueRecording || !hasStoppedRecording) {\n      return;\n    }\n\n    // To avoid race conditions where this is called multiple times, we check here again that we are still buffering\n    if ((this.recordingMode as ReplayRecordingMode) === 'session') {\n      return;\n    }\n\n    // Re-start recording in session-mode\n    this.recordingMode = 'session';\n\n    // Once this session ends, we do not want to refresh it\n    if (this.session) {\n      this.session.dirty = false;\n      this._updateUserActivity(activityTime);\n      this._updateSessionActivity(activityTime);\n      this._maybeSaveSession();\n      setReplayIdOnDynamicSamplingContext(this.session.id);\n    }\n\n    this.startRecording();\n  }\n\n  /**\n   * We want to batch uploads of replay events. Save events only if\n   * `<flushMinDelay>` milliseconds have elapsed since the last event\n   * *OR* if `<flushMaxDelay>` milliseconds have elapsed.\n   *\n   * Accepts a callback to perform side-effects and returns true to stop batch\n   * processing and hand back control to caller.\n   */\n  public addUpdate(cb: AddUpdateCallback): void {\n    // We need to always run `cb` (e.g. in the case of `this.recordingMode == 'buffer'`)\n    const cbResult = cb();\n\n    // If this option is turned on then we will only want to call `flush`\n    // explicitly\n    if (this.recordingMode === 'buffer' || !this._isEnabled) {\n      return;\n    }\n\n    // If callback is true, we do not want to continue with flushing -- the\n    // caller will need to handle it.\n    if (cbResult === true) {\n      return;\n    }\n\n    // addUpdate is called quite frequently - use _debouncedFlush so that it\n    // respects the flush delays and does not flush immediately\n    this._debouncedFlush();\n  }\n\n  /**\n   * Updates the user activity timestamp and resumes recording. This should be\n   * called in an event handler for a user action that we consider as the user\n   * being \"active\" (e.g. a mouse click).\n   */\n  public triggerUserActivity(): void {\n    this._updateUserActivity();\n\n    // This case means that recording was once stopped due to inactivity.\n    // Ensure that recording is resumed.\n    if (!this._stopRecording) {\n      // Create a new session, otherwise when the user action is flushed, it\n      // will get rejected due to an expired session.\n      if (!this._checkSession()) {\n        return;\n      }\n\n      // Note: This will cause a new DOM checkout\n      this.resume();\n      return;\n    }\n\n    // Otherwise... recording was never suspended, continue as normalish\n    this.checkAndHandleExpiredSession();\n\n    this._updateSessionActivity();\n  }\n\n  /**\n   * Updates the user activity timestamp *without* resuming\n   * recording. Some user events (e.g. keydown) can be create\n   * low-value replays that only contain the keypress as a\n   * breadcrumb. Instead this would require other events to\n   * create a new replay after a session has expired.\n   */\n  public updateUserActivity(): void {\n    this._updateUserActivity();\n    this._updateSessionActivity();\n  }\n\n  /**\n   * Only flush if `this.recordingMode === 'session'`\n   */\n  public conditionalFlush(): Promise<void> {\n    if (this.recordingMode === 'buffer') {\n      return Promise.resolve();\n    }\n\n    return this.flushImmediate();\n  }\n\n  /**\n   * Flush using debounce flush\n   */\n  public flush(): Promise<void> {\n    return this._debouncedFlush() as Promise<void>;\n  }\n\n  /**\n   * Always flush via `_debouncedFlush` so that we do not have flushes triggered\n   * from calling both `flush` and `_debouncedFlush`. Otherwise, there could be\n   * cases of multiple flushes happening closely together.\n   */\n  public flushImmediate(): Promise<void> {\n    this._debouncedFlush();\n    // `.flush` is provided by the debounced function, analogously to lodash.debounce\n    return this._debouncedFlush.flush() as Promise<void>;\n  }\n\n  /**\n   * Cancels queued up flushes.\n   */\n  public cancelFlush(): void {\n    this._debouncedFlush.cancel();\n  }\n\n  /** Get the current session (=replay) ID\n   *\n   * @param onlyIfSampled - If true, will only return the session ID if the session is sampled.\n   */\n  public getSessionId(onlyIfSampled?: boolean): string | undefined {\n    if (onlyIfSampled && this.session?.sampled === false) {\n      return undefined;\n    }\n\n    return this.session?.id;\n  }\n\n  /**\n   * Checks if recording should be stopped due to user inactivity. Otherwise\n   * check if session is expired and create a new session if so. Triggers a new\n   * full snapshot on new session.\n   *\n   * Returns true if session is not expired, false otherwise.\n   * @hidden\n   */\n  public checkAndHandleExpiredSession(): boolean | void {\n    // Prevent starting a new session if the last user activity is older than\n    // SESSION_IDLE_PAUSE_DURATION. Otherwise non-user activity can trigger a new\n    // session+recording. This creates noisy replays that do not have much\n    // content in them.\n    if (\n      this._lastActivity &&\n      isExpired(this._lastActivity, this.timeouts.sessionIdlePause) &&\n      this.session?.sampled === 'session'\n    ) {\n      // Pause recording only for session-based replays. Otherwise, resuming\n      // will create a new replay and will conflict with users who only choose\n      // to record error-based replays only. (e.g. the resumed replay will not\n      // contain a reference to an error)\n      this.pause();\n      return;\n    }\n\n    // --- There is recent user activity --- //\n    // This will create a new session if expired, based on expiry length\n    if (!this._checkSession()) {\n      // Check session handles the refreshing itself\n      return false;\n    }\n\n    return true;\n  }\n\n  /**\n   * Capture some initial state that can change throughout the lifespan of the\n   * replay. This is required because otherwise they would be captured at the\n   * first flush.\n   */\n  public setInitialState(): void {\n    const urlPath = `${WINDOW.location.pathname}${WINDOW.location.hash}${WINDOW.location.search}`;\n    const url = `${WINDOW.location.origin}${urlPath}`;\n\n    this.performanceEntries = [];\n    this.replayPerformanceEntries = [];\n\n    // Reset _context as well\n    this._clearContext();\n\n    this._context.initialUrl = url;\n    this._context.initialTimestamp = Date.now();\n    this._context.urls.push(url);\n  }\n\n  /**\n   * Add a breadcrumb event, that may be throttled.\n   * If it was throttled, we add a custom breadcrumb to indicate that.\n   */\n  public throttledAddEvent(\n    event: RecordingEvent,\n    isCheckout?: boolean,\n  ): typeof THROTTLED | typeof SKIPPED | Promise<AddEventResult | null> {\n    const res = this._throttledAddEvent(event, isCheckout);\n\n    // If this is THROTTLED, it means we have throttled the event for the first time\n    // In this case, we want to add a breadcrumb indicating that something was skipped\n    if (res === THROTTLED) {\n      const breadcrumb = createBreadcrumb({\n        category: 'replay.throttled',\n      });\n\n      this.addUpdate(() => {\n        // Return `false` if the event _was_ added, as that means we schedule a flush\n        return !addEventSync(this, {\n          type: ReplayEventTypeCustom,\n          timestamp: breadcrumb.timestamp || 0,\n          data: {\n            tag: 'breadcrumb',\n            payload: breadcrumb,\n            metric: true,\n          },\n        });\n      });\n    }\n\n    return res;\n  }\n\n  /**\n   * This will get the parametrized route name of the current page.\n   * This is only available if performance is enabled, and if an instrumented router is used.\n   */\n  public getCurrentRoute(): string | undefined {\n    const lastActiveSpan = this.lastActiveSpan || getActiveSpan();\n    const lastRootSpan = lastActiveSpan && getRootSpan(lastActiveSpan);\n\n    const attributes = (lastRootSpan && spanToJSON(lastRootSpan).data) || {};\n    const source = attributes[SEMANTIC_ATTRIBUTE_SENTRY_SOURCE];\n    if (!lastRootSpan || !source || !['route', 'custom'].includes(source)) {\n      return undefined;\n    }\n\n    return spanToJSON(lastRootSpan).description;\n  }\n\n  /**\n   * Initialize and start all listeners to varying events (DOM,\n   * Performance Observer, Recording, Sentry SDK, etc)\n   */\n  private _initializeRecording(): void {\n    this.setInitialState();\n\n    // this method is generally called on page load or manually - in both cases\n    // we should treat it as an activity\n    this._updateSessionActivity();\n\n    this.eventBuffer = createEventBuffer({\n      useCompression: this._options.useCompression,\n      workerUrl: this._options.workerUrl,\n    });\n\n    this._removeListeners();\n    this._addListeners();\n\n    // Need to set as enabled before we start recording, as `record()` can trigger a flush with a new checkout\n    this._isEnabled = true;\n    this._isPaused = false;\n\n    if (this.session) {\n      getClient()?.emit('replayStart', {\n        sessionId: this.session.id,\n        recordingMode: this.recordingMode,\n      });\n    }\n\n    this.startRecording();\n\n    // Update the cached DSC with the new replay_id when in session mode.\n    // The cached DSC on the scope (set by browserTracingIntegration) persists\n    // across session refreshes, and the `createDsc` hook won't fire for it.\n    if (this.recordingMode === 'session' && this.session) {\n      setReplayIdOnDynamicSamplingContext(this.session.id);\n    }\n  }\n\n  /**\n   * Loads (or refreshes) the current session.\n   */\n  private _initializeSessionForSampling(previousSessionId?: string): void {\n    // Whenever there is _any_ error sample rate, we always allow buffering\n    // Because we decide on sampling when an error occurs, we need to buffer at all times if sampling for errors\n    const allowBuffering = this._options.errorSampleRate > 0;\n\n    const session = loadOrCreateSession(\n      {\n        sessionIdleExpire: this.timeouts.sessionIdleExpire,\n        maxReplayDuration: this._options.maxReplayDuration,\n        previousSessionId,\n      },\n      {\n        stickySession: this._options.stickySession,\n        sessionSampleRate: this._options.sessionSampleRate,\n        allowBuffering,\n      },\n    );\n\n    this.session = session;\n  }\n\n  /**\n   * Checks and potentially refreshes the current session.\n   * Returns false if session is not recorded.\n   */\n  private _checkSession(): boolean {\n    // If there is no session yet, we do not want to refresh anything\n    // This should generally not happen, but to be safe....\n    if (!this.session) {\n      return false;\n    }\n\n    const currentSession = this.session;\n\n    if (\n      shouldRefreshSession(currentSession, {\n        sessionIdleExpire: this.timeouts.sessionIdleExpire,\n        maxReplayDuration: this._options.maxReplayDuration,\n      })\n    ) {\n      // This should never reject\n      // eslint-disable-next-line @typescript-eslint/no-floating-promises\n      this._refreshSession(currentSession);\n      return false;\n    }\n\n    return true;\n  }\n\n  /**\n   * Refresh a session with a new one.\n   * This stops the current session (without forcing a flush, as that would never work since we are expired),\n   * and then does a new sampling based on the refreshed session.\n   */\n  private async _refreshSession(session: Session): Promise<void> {\n    if (!this._isEnabled) {\n      return;\n    }\n    await this.stop({ reason: 'sessionExpired' });\n    this.initializeSampling(session.id);\n  }\n\n  /**\n   * Adds listeners to record events for the replay\n   */\n  private _addListeners(): void {\n    try {\n      WINDOW.document.addEventListener('visibilitychange', this._handleVisibilityChange);\n      WINDOW.addEventListener('blur', this._handleWindowBlur);\n      WINDOW.addEventListener('focus', this._handleWindowFocus);\n      WINDOW.addEventListener('keydown', this._handleKeyboardEvent);\n\n      if (this.clickDetector) {\n        this.clickDetector.addListeners();\n      }\n\n      // There is no way to remove these listeners, so ensure they are only added once\n      if (!this._hasInitializedCoreListeners) {\n        addGlobalListeners(this);\n\n        this._hasInitializedCoreListeners = true;\n      }\n    } catch (err) {\n      this.handleException(err);\n    }\n\n    this._performanceCleanupCallback = setupPerformanceObserver(this);\n  }\n\n  /**\n   * Cleans up listeners that were created in `_addListeners`\n   */\n  private _removeListeners(): void {\n    try {\n      WINDOW.document.removeEventListener('visibilitychange', this._handleVisibilityChange);\n\n      WINDOW.removeEventListener('blur', this._handleWindowBlur);\n      WINDOW.removeEventListener('focus', this._handleWindowFocus);\n      WINDOW.removeEventListener('keydown', this._handleKeyboardEvent);\n\n      if (this.clickDetector) {\n        this.clickDetector.removeListeners();\n      }\n\n      if (this._performanceCleanupCallback) {\n        this._performanceCleanupCallback();\n      }\n    } catch (err) {\n      this.handleException(err);\n    }\n  }\n\n  /**\n   * Tasks to run when we consider a page to be hidden (via blurring and/or visibility)\n   */\n  private _doChangeToBackgroundTasks(breadcrumb?: ReplayBreadcrumbFrame): void {\n    if (!this.session) {\n      return;\n    }\n\n    const expired = shouldRefreshSession(this.session, {\n      maxReplayDuration: this._options.maxReplayDuration,\n      sessionIdleExpire: this.timeouts.sessionIdleExpire,\n    });\n\n    if (expired) {\n      resetReplayIdOnDynamicSamplingContext();\n      return;\n    }\n\n    if (breadcrumb) {\n      this._createCustomBreadcrumb(breadcrumb);\n    }\n\n    // Send replay when the page/tab becomes hidden. There is no reason to send\n    // replay if it becomes visible, since no actions we care about were done\n    // while it was hidden\n    // This should never reject\n    // eslint-disable-next-line @typescript-eslint/no-floating-promises\n    void this.conditionalFlush();\n  }\n\n  /**\n   * Tasks to run when we consider a page to be visible (via focus and/or visibility)\n   */\n  private _doChangeToForegroundTasks(breadcrumb?: ReplayBreadcrumbFrame): void {\n    if (!this.session) {\n      return;\n    }\n\n    const isSessionActive = this.checkAndHandleExpiredSession();\n\n    if (!isSessionActive) {\n      // If the user has come back to the page within SESSION_IDLE_PAUSE_DURATION\n      // ms, we will re-use the existing session, otherwise create a new\n      // session\n      DEBUG_BUILD && debug.log('Document has become active, but session has expired');\n      return;\n    }\n\n    if (breadcrumb) {\n      this._createCustomBreadcrumb(breadcrumb);\n    }\n  }\n\n  /**\n   * Update user activity (across session lifespans)\n   */\n  private _updateUserActivity(_lastActivity: number = Date.now()): void {\n    this._lastActivity = _lastActivity;\n  }\n\n  /**\n   * Updates the session's last activity timestamp\n   */\n  private _updateSessionActivity(_lastActivity: number = Date.now()): void {\n    if (this.session) {\n      this.session.lastActivity = _lastActivity;\n      this._maybeSaveSession();\n    }\n  }\n\n  /**\n   * Helper to create (and buffer) a replay breadcrumb from a core SDK breadcrumb\n   */\n  private _createCustomBreadcrumb(breadcrumb: ReplayBreadcrumbFrame): void {\n    this.addUpdate(() => {\n      // This should never reject\n      // eslint-disable-next-line @typescript-eslint/no-floating-promises\n      this.throttledAddEvent({\n        type: EventType.Custom,\n        timestamp: breadcrumb.timestamp || 0,\n        data: {\n          tag: 'breadcrumb',\n          payload: breadcrumb,\n        },\n      });\n    });\n  }\n\n  /**\n   * Observed performance events are added to `this.performanceEntries`. These\n   * are included in the replay event before it is finished and sent to Sentry.\n   */\n  private _addPerformanceEntries(): Promise<Array<AddEventResult | null>> {\n    let performanceEntries = createPerformanceEntries(this.performanceEntries).concat(this.replayPerformanceEntries);\n\n    this.performanceEntries = [];\n    this.replayPerformanceEntries = [];\n\n    // If we are manually starting, we want to ensure we only include performance entries\n    // that are after the initial timestamp\n    // The reason for this is that we may have performance entries from the page load, but may decide to start\n    // the replay later on, in which case we do not want to include these entries.\n    // without this, manually started replays can have events long before the actual replay recording starts,\n    // which messes with the timeline etc.\n    if (this._requiresManualStart) {\n      const initialTimestampInSeconds = this._context.initialTimestamp / 1000;\n      performanceEntries = performanceEntries.filter(entry => entry.start >= initialTimestampInSeconds);\n    }\n\n    return Promise.all(createPerformanceSpans(this, performanceEntries));\n  }\n\n  /**\n   * Clear _context\n   */\n  private _clearContext(): void {\n    // XXX: `initialTimestamp` and `initialUrl` do not get cleared\n    this._context.errorIds.clear();\n    this._context.traceIds.clear();\n    this._context.segmentNames.clear();\n    this._context.urls = [];\n  }\n\n  /** Update the initial timestamp based on the buffer content. */\n  private _updateInitialTimestampFromEventBuffer(): void {\n    const { session, eventBuffer } = this;\n    // If replay was started manually (=no sample rate was given),\n    // We do not want to back-port the initial timestamp\n    if (!session || !eventBuffer || this._requiresManualStart) {\n      return;\n    }\n\n    // we only ever update this on the initial segment\n    if (session.segmentId) {\n      return;\n    }\n\n    const earliestEvent = eventBuffer.getEarliestTimestamp();\n    if (earliestEvent && earliestEvent < this._context.initialTimestamp) {\n      this._context.initialTimestamp = earliestEvent;\n    }\n  }\n\n  /**\n   * Return and clear _context\n   */\n  private _popEventContext(): PopEventContext {\n    const _context = {\n      initialTimestamp: this._context.initialTimestamp,\n      initialUrl: this._context.initialUrl,\n      errorIds: Array.from(this._context.errorIds),\n      traceIds: Array.from(this._context.traceIds),\n      segmentNames: Array.from(this._context.segmentNames),\n      urls: this._context.urls,\n    };\n\n    this._clearContext();\n\n    return _context;\n  }\n\n  /**\n   * Flushes replay event buffer to Sentry.\n   *\n   * Performance events are only added right before flushing - this is\n   * due to the buffered performance observer events.\n   *\n   * Should never be called directly, only by `flush`\n   */\n  private async _runFlush(): Promise<void> {\n    const replayId = this.getSessionId();\n\n    if (!this.session || !this.eventBuffer || !replayId) {\n      DEBUG_BUILD && debug.error('No session or eventBuffer found to flush.');\n      return;\n    }\n\n    await this._addPerformanceEntries();\n\n    // Check eventBuffer again, as it could have been stopped in the meanwhile\n    if (!this.eventBuffer?.hasEvents) {\n      return;\n    }\n\n    // Only attach memory event if eventBuffer is not empty\n    await addMemoryEntry(this);\n\n    // Check eventBuffer again, as it could have been stopped in the meanwhile\n    if (!this.eventBuffer) {\n      return;\n    }\n\n    // if this changed in the meanwhile, e.g. because the session was refreshed or similar, we abort here\n    if (replayId !== this.getSessionId()) {\n      return;\n    }\n\n    try {\n      // This uses the data from the eventBuffer, so we need to call this before `finish()\n      this._updateInitialTimestampFromEventBuffer();\n\n      const timestamp = Date.now();\n\n      // Check total duration again, to avoid sending outdated stuff\n      // We leave 30s wiggle room to accommodate late flushing etc.\n      // This _could_ happen when the browser is suspended during flushing, in which case we just want to stop\n      if (timestamp - this._context.initialTimestamp > this._options.maxReplayDuration + 30_000) {\n        throw new ReplayDurationLimitError();\n      }\n\n      const eventContext = this._popEventContext();\n      // Always increment segmentId regardless of outcome of sending replay\n      const segmentId = this.session.segmentId++;\n      this._maybeSaveSession();\n\n      // Note this empties the event buffer regardless of outcome of sending replay\n      const recordingData = await this.eventBuffer.finish();\n\n      await sendReplay({\n        replayId,\n        recordingData,\n        segmentId,\n        eventContext,\n        session: this.session,\n        timestamp,\n        onError: err => this.handleException(err),\n      });\n    } catch (err) {\n      this.handleException(err);\n\n      // This means we retried 3 times and all of them failed,\n      // or we ran into a problem we don't want to retry, like rate limiting.\n      // In this case, we want to completely stop the replay - otherwise, we may get inconsistent segments\n      // This should never reject\n      // eslint-disable-next-line @typescript-eslint/no-floating-promises\n      this.stop({ reason: 'sendError' });\n\n      const client = getClient();\n\n      if (client) {\n        let dropReason: 'ratelimit_backoff' | 'send_error' | 'invalid';\n        if (err instanceof RateLimitError) {\n          dropReason = 'ratelimit_backoff';\n        } else if (err instanceof ReplayDurationLimitError) {\n          dropReason = 'invalid';\n        } else {\n          dropReason = 'send_error';\n        }\n        client.recordDroppedEvent(dropReason, 'replay');\n      }\n    }\n  }\n\n  /**\n   * Flush recording data to Sentry. Creates a lock so that only a single flush\n   * can be active at a time. Do not call this directly.\n   */\n  private async _flush({\n    force = false,\n  }: {\n    /**\n     * If true, flush while ignoring the `_isEnabled` state of\n     * Replay integration. (By default, flush is noop if integration\n     * is stopped).\n     */\n    force?: boolean;\n  } = {}): Promise<void> {\n    if (!this._isEnabled && !force) {\n      // This can happen if e.g. the replay was stopped because of exceeding the retry limit\n      return;\n    }\n\n    if (!this.checkAndHandleExpiredSession()) {\n      DEBUG_BUILD && debug.error('Attempting to finish replay event after session expired.');\n      return;\n    }\n\n    if (!this.session) {\n      // should never happen, as we would have bailed out before\n      return;\n    }\n\n    const start = this.session.started;\n    const now = Date.now();\n    const duration = now - start;\n\n    // A flush is about to happen, cancel any queued flushes\n    this._debouncedFlush.cancel();\n\n    // If session is too short, or too long (allow some wiggle room over maxReplayDuration), do not send it\n    // This _should_ not happen, but it may happen if flush is triggered due to a page activity change or similar\n    const tooShort = duration < this._options.minReplayDuration;\n    const tooLong = duration > this._options.maxReplayDuration + 5_000;\n    if (tooShort || tooLong) {\n      DEBUG_BUILD &&\n        debug.log(\n          `Session duration (${Math.floor(duration / 1000)}s) is too ${\n            tooShort ? 'short' : 'long'\n          }, not sending replay.`,\n        );\n\n      if (tooShort) {\n        this._debouncedFlush();\n      }\n      return;\n    }\n\n    const eventBuffer = this.eventBuffer;\n    if (eventBuffer && this.session.segmentId === 0 && !eventBuffer.hasCheckout) {\n      DEBUG_BUILD && debug.log('Flushing initial segment without checkout.');\n      // TODO FN: Evaluate if we want to stop here, or remove this again?\n    }\n\n    const _flushInProgress = !!this._flushLock;\n\n    // this._flushLock acts as a lock so that future calls to `_flush()` will\n    // be blocked until current flush is finished (i.e. this promise resolves)\n    if (!this._flushLock) {\n      this._flushLock = this._runFlush();\n    }\n\n    try {\n      await this._flushLock;\n    } catch (err) {\n      this.handleException(err);\n    } finally {\n      this._flushLock = undefined;\n\n      if (_flushInProgress) {\n        // Wait for previous flush to finish, then call the debounced\n        // `_flush()`. It's possible there are other flush requests queued and\n        // waiting for it to resolve. We want to reduce all outstanding\n        // requests (as well as any new flush requests that occur within a\n        // second of the locked flush completing) into a single flush.\n        this._debouncedFlush();\n      }\n    }\n  }\n\n  /** Save the session, if it is sticky */\n  private _maybeSaveSession(): void {\n    if (this.session && this._options.stickySession) {\n      saveSession(this.session);\n    }\n  }\n\n  /** Handler for rrweb.record.onMutation */\n  private _onMutationHandler(mutations: MutationRecord[]): boolean {\n    const { ignoreMutations } = this._options._experiments;\n    if (ignoreMutations?.length) {\n      if (\n        mutations.some(mutation => {\n          const el = closestElementOfNode(mutation.target);\n          const selector = ignoreMutations.join(',');\n          return el?.matches(selector);\n        })\n      ) {\n        return false;\n      }\n    }\n\n    const count = mutations.length;\n\n    const mutationLimit = this._options.mutationLimit;\n    const mutationBreadcrumbLimit = this._options.mutationBreadcrumbLimit;\n    const overMutationLimit = mutationLimit && count > mutationLimit;\n\n    // Create a breadcrumb if a lot of mutations happen at the same time\n    // We can show this in the UI as an information with potential performance improvements\n    if (count > mutationBreadcrumbLimit || overMutationLimit) {\n      const breadcrumb = createBreadcrumb({\n        category: 'replay.mutations',\n        data: {\n          count,\n          limit: overMutationLimit,\n        },\n      });\n      this._createCustomBreadcrumb(breadcrumb);\n    }\n\n    // Stop replay if over the mutation limit\n    if (overMutationLimit) {\n      // This should never reject\n      // eslint-disable-next-line @typescript-eslint/no-floating-promises\n      this.stop({ reason: 'mutationLimit', forceFlush: this.recordingMode === 'session' });\n      return false;\n    }\n\n    // `true` means we use the regular mutation handling by rrweb\n    return true;\n  }\n}\n\ninterface MutationRecord {\n  type: string;\n  target: Node;\n  oldValue: string | null;\n  addedNodes: NodeList;\n  removedNodes: NodeList;\n  attributeName: string | null;\n}\n","import { debounce as debounceCore } from '@sentry/core';\nimport { setTimeout } from '@sentry/browser-utils';\n\ntype DebouncedCallback = {\n  (): void | unknown;\n  flush: () => void | unknown;\n  cancel: () => void;\n};\ntype CallbackFunction = () => unknown;\ntype DebounceOptions = { maxWait?: number };\n\n/**\n * Heavily simplified debounce function based on lodash.debounce.\n *\n * This function takes a callback function (@param fun) and delays its invocation\n * by @param wait milliseconds. Optionally, a maxWait can be specified in @param options,\n * which ensures that the callback is invoked at least once after the specified max. wait time.\n *\n * @param func the function whose invocation is to be debounced\n * @param wait the minimum time until the function is invoked after it was called once\n * @param options the options object, which can contain the `maxWait` property\n *\n * @returns the debounced version of the function, which needs to be called at least once to start the\n *          debouncing process. Subsequent calls will reset the debouncing timer and, in case @paramfunc\n *          was already invoked in the meantime, return @param func's return value.\n *          The debounced function has two additional properties:\n *          - `flush`: Invokes the debounced function immediately and returns its return value\n *          - `cancel`: Cancels the debouncing process and resets the debouncing timer\n */\nexport function debounce(func: CallbackFunction, wait: number, options?: DebounceOptions): DebouncedCallback {\n  return debounceCore(func, wait, {\n    ...options,\n    // @ts-expect-error - Not quite sure why these types do not match, but this is fine\n    setTimeoutImpl: setTimeout,\n  });\n}\n","import { htmlTreeAsString } from '@sentry/browser-utils';\nimport type { Breadcrumb } from '@sentry/core';\nimport type { ReplayContainer } from '../types';\nimport { createBreadcrumb } from '../util/createBreadcrumb';\nimport { getBaseDomBreadcrumb } from './handleDom';\nimport { addBreadcrumbEvent } from './util/addBreadcrumbEvent';\n\n/** Handle keyboard events & create breadcrumbs. */\nexport function handleKeyboardEvent(replay: ReplayContainer, event: KeyboardEvent): void {\n  if (!replay.isEnabled()) {\n    return;\n  }\n\n  // Update user activity, but do not restart recording as it can create\n  // noisy/low-value replays (e.g. user comes back from idle, hits alt-tab, new\n  // session with a single \"keydown\" breadcrumb is created)\n  replay.updateUserActivity();\n\n  const breadcrumb = getKeyboardBreadcrumb(event);\n\n  if (!breadcrumb) {\n    return;\n  }\n\n  addBreadcrumbEvent(replay, breadcrumb);\n}\n\n/** exported only for tests */\nexport function getKeyboardBreadcrumb(event: KeyboardEvent): Breadcrumb | null {\n  const { metaKey, shiftKey, ctrlKey, altKey, key, target } = event;\n\n  // never capture for input fields\n  if (!target || isInputElement(target as HTMLElement) || !key) {\n    return null;\n  }\n\n  // Note: We do not consider shift here, as that means \"uppercase\"\n  const hasModifierKey = metaKey || ctrlKey || altKey;\n  const isCharacterKey = key.length === 1; // other keys like Escape, Tab, etc have a longer length\n\n  // Do not capture breadcrumb if only a word key is pressed\n  // This could leak e.g. user input\n  if (!hasModifierKey && isCharacterKey) {\n    return null;\n  }\n\n  const message = htmlTreeAsString(target, { maxStringLength: 200 }) || '<unknown>';\n  const baseBreadcrumb = getBaseDomBreadcrumb(target as Node, message);\n\n  return createBreadcrumb({\n    category: 'ui.keyDown',\n    message,\n    data: {\n      ...baseBreadcrumb.data,\n      metaKey,\n      shiftKey,\n      ctrlKey,\n      altKey,\n      key,\n    },\n  });\n}\n\nfunction isInputElement(target: HTMLElement): boolean {\n  return target.tagName === 'INPUT' || target.tagName === 'TEXTAREA' || target.isContentEditable;\n}\n","import { REPLAY_SESSION_KEY, WINDOW } from '../../src/constants';\nimport type { ReplayContainer } from '../../src/types';\nimport { hasSessionStorage } from '../util/hasSessionStorage';\n\n/**\n * Removes the session from Session Storage and unsets session in replay instance\n */\nexport function clearSession(replay: ReplayContainer): void {\n  deleteSession();\n  replay.session = undefined;\n}\n\n/**\n * Deletes a session from storage\n */\nfunction deleteSession(): void {\n  if (!hasSessionStorage()) {\n    return;\n  }\n\n  try {\n    WINDOW.sessionStorage.removeItem(REPLAY_SESSION_KEY);\n  } catch {\n    // Ignore potential SecurityError exceptions\n  }\n}\n","import { getWorkerURL } from '@sentry-internal/replay-worker';\nimport { DEBUG_BUILD } from '../debug-build';\nimport type { EventBuffer, ReplayWorkerURL } from '../types';\nimport { debug } from '../util/logger';\nimport { EventBufferArray } from './EventBufferArray';\nimport { EventBufferProxy } from './EventBufferProxy';\n\ninterface CreateEventBufferParams {\n  useCompression: boolean;\n  workerUrl?: ReplayWorkerURL;\n}\n\n// Treeshakable guard to remove the code of the included compression worker\ndeclare const __SENTRY_EXCLUDE_REPLAY_WORKER__: boolean;\n\n/**\n * Create an event buffer for replays.\n */\nexport function createEventBuffer({\n  useCompression,\n  workerUrl: customWorkerUrl,\n}: CreateEventBufferParams): EventBuffer {\n  if (\n    useCompression &&\n    // eslint-disable-next-line no-restricted-globals\n    window.Worker\n  ) {\n    const worker = _loadWorker(customWorkerUrl);\n\n    if (worker) {\n      return worker;\n    }\n  }\n\n  DEBUG_BUILD && debug.log('Using simple buffer');\n  return new EventBufferArray();\n}\n\nfunction _loadWorker(customWorkerUrl?: ReplayWorkerURL): EventBufferProxy | void {\n  try {\n    const workerUrl = customWorkerUrl || _getWorkerUrl();\n\n    if (!workerUrl) {\n      return;\n    }\n\n    DEBUG_BUILD && debug.log(`Using compression worker${customWorkerUrl ? ` from ${customWorkerUrl}` : ''}`);\n    const worker = new Worker(workerUrl);\n    return new EventBufferProxy(worker);\n  } catch (error) {\n    DEBUG_BUILD && debug.exception(error, 'Failed to create compression worker');\n    // Fall back to use simple event buffer array\n  }\n}\n\nfunction _getWorkerUrl(): string {\n  if (typeof __SENTRY_EXCLUDE_REPLAY_WORKER__ === 'undefined' || !__SENTRY_EXCLUDE_REPLAY_WORKER__) {\n    return getWorkerURL();\n  }\n\n  return '';\n}\n","import t from\"./worker\";function e(){const e=new Blob([t],{type:\"text/javascript\"});return URL.createObjectURL(e)}export{e as getWorkerURL};\n","export default `var t=Uint8Array,n=Uint16Array,r=Int32Array,e=new t([0,0,0,0,0,0,0,0,1,1,1,1,2,2,2,2,3,3,3,3,4,4,4,4,5,5,5,5,0,0,0,0]),i=new t([0,0,0,0,1,1,2,2,3,3,4,4,5,5,6,6,7,7,8,8,9,9,10,10,11,11,12,12,13,13,0,0]),s=new t([16,17,18,0,8,7,9,6,10,5,11,4,12,3,13,2,14,1,15]),a=function(t,e){for(var i=new n(31),s=0;s<31;++s)i[s]=e+=1<<t[s-1];var a=new r(i[30]);for(s=1;s<30;++s)for(var o=i[s];o<i[s+1];++o)a[o]=o-i[s]<<5|s;return{b:i,r:a}},o=a(e,2),h=o.b,f=o.r;h[28]=258,f[258]=28;for(var l=a(i,0).r,u=new n(32768),c=0;c<32768;++c){var v=(43690&c)>>1|(21845&c)<<1;v=(61680&(v=(52428&v)>>2|(13107&v)<<2))>>4|(3855&v)<<4,u[c]=((65280&v)>>8|(255&v)<<8)>>1}var d=function(t,r,e){for(var i=t.length,s=0,a=new n(r);s<i;++s)t[s]&&++a[t[s]-1];var o,h=new n(r);for(s=1;s<r;++s)h[s]=h[s-1]+a[s-1]<<1;if(e){o=new n(1<<r);var f=15-r;for(s=0;s<i;++s)if(t[s])for(var l=s<<4|t[s],c=r-t[s],v=h[t[s]-1]++<<c,d=v|(1<<c)-1;v<=d;++v)o[u[v]>>f]=l}else for(o=new n(i),s=0;s<i;++s)t[s]&&(o[s]=u[h[t[s]-1]++]>>15-t[s]);return o},p=new t(288);for(c=0;c<144;++c)p[c]=8;for(c=144;c<256;++c)p[c]=9;for(c=256;c<280;++c)p[c]=7;for(c=280;c<288;++c)p[c]=8;var g=new t(32);for(c=0;c<32;++c)g[c]=5;var w=d(p,9,0),y=d(g,5,0),m=function(t){return(t+7)/8|0},b=function(n,r,e){return(null==e||e>n.length)&&(e=n.length),new t(n.subarray(r,e))},M=[\"unexpected EOF\",\"invalid block type\",\"invalid length/literal\",\"invalid distance\",\"stream finished\",\"no stream handler\",,\"no callback\",\"invalid UTF-8 data\",\"extra field too long\",\"date not in range 1980-2099\",\"filename too long\",\"stream finishing\",\"invalid zip data\"],E=function(t,n,r){var e=new Error(n||M[t]);if(e.code=t,Error.captureStackTrace&&Error.captureStackTrace(e,E),!r)throw e;return e},z=function(t,n,r){r<<=7&n;var e=n/8|0;t[e]|=r,t[e+1]|=r>>8},_=function(t,n,r){r<<=7&n;var e=n/8|0;t[e]|=r,t[e+1]|=r>>8,t[e+2]|=r>>16},x=function(r,e){for(var i=[],s=0;s<r.length;++s)r[s]&&i.push({s:s,f:r[s]});var a=i.length,o=i.slice();if(!a)return{t:F,l:0};if(1==a){var h=new t(i[0].s+1);return h[i[0].s]=1,{t:h,l:1}}i.sort(function(t,n){return t.f-n.f}),i.push({s:-1,f:25001});var f=i[0],l=i[1],u=0,c=1,v=2;for(i[0]={s:-1,f:f.f+l.f,l:f,r:l};c!=a-1;)f=i[i[u].f<i[v].f?u++:v++],l=i[u!=c&&i[u].f<i[v].f?u++:v++],i[c++]={s:-1,f:f.f+l.f,l:f,r:l};var d=o[0].s;for(s=1;s<a;++s)o[s].s>d&&(d=o[s].s);var p=new n(d+1),g=A(i[c-1],p,0);if(g>e){s=0;var w=0,y=g-e,m=1<<y;for(o.sort(function(t,n){return p[n.s]-p[t.s]||t.f-n.f});s<a;++s){var b=o[s].s;if(!(p[b]>e))break;w+=m-(1<<g-p[b]),p[b]=e}for(w>>=y;w>0;){var M=o[s].s;p[M]<e?w-=1<<e-p[M]++-1:++s}for(;s>=0&&w;--s){var E=o[s].s;p[E]==e&&(--p[E],++w)}g=e}return{t:new t(p),l:g}},A=function(t,n,r){return-1==t.s?Math.max(A(t.l,n,r+1),A(t.r,n,r+1)):n[t.s]=r},D=function(t){for(var r=t.length;r&&!t[--r];);for(var e=new n(++r),i=0,s=t[0],a=1,o=function(t){e[i++]=t},h=1;h<=r;++h)if(t[h]==s&&h!=r)++a;else{if(!s&&a>2){for(;a>138;a-=138)o(32754);a>2&&(o(a>10?a-11<<5|28690:a-3<<5|12305),a=0)}else if(a>3){for(o(s),--a;a>6;a-=6)o(8304);a>2&&(o(a-3<<5|8208),a=0)}for(;a--;)o(s);a=1,s=t[h]}return{c:e.subarray(0,i),n:r}},T=function(t,n){for(var r=0,e=0;e<n.length;++e)r+=t[e]*n[e];return r},k=function(t,n,r){var e=r.length,i=m(n+2);t[i]=255&e,t[i+1]=e>>8,t[i+2]=255^t[i],t[i+3]=255^t[i+1];for(var s=0;s<e;++s)t[i+s+4]=r[s];return 8*(i+4+e)},U=function(t,r,a,o,h,f,l,u,c,v,m){z(r,m++,a),++h[256];for(var b=x(h,15),M=b.t,E=b.l,A=x(f,15),U=A.t,C=A.l,F=D(M),I=F.c,S=F.n,L=D(U),O=L.c,j=L.n,q=new n(19),B=0;B<I.length;++B)++q[31&I[B]];for(B=0;B<O.length;++B)++q[31&O[B]];for(var G=x(q,7),H=G.t,J=G.l,K=19;K>4&&!H[s[K-1]];--K);var N,P,Q,R,V=v+5<<3,W=T(h,p)+T(f,g)+l,X=T(h,M)+T(f,U)+l+14+3*K+T(q,H)+2*q[16]+3*q[17]+7*q[18];if(c>=0&&V<=W&&V<=X)return k(r,m,t.subarray(c,c+v));if(z(r,m,1+(X<W)),m+=2,X<W){N=d(M,E,0),P=M,Q=d(U,C,0),R=U;var Y=d(H,J,0);z(r,m,S-257),z(r,m+5,j-1),z(r,m+10,K-4),m+=14;for(B=0;B<K;++B)z(r,m+3*B,H[s[B]]);m+=3*K;for(var Z=[I,O],$=0;$<2;++$){var tt=Z[$];for(B=0;B<tt.length;++B){var nt=31&tt[B];z(r,m,Y[nt]),m+=H[nt],nt>15&&(z(r,m,tt[B]>>5&127),m+=tt[B]>>12)}}}else N=w,P=p,Q=y,R=g;for(B=0;B<u;++B){var rt=o[B];if(rt>255){_(r,m,N[(nt=rt>>18&31)+257]),m+=P[nt+257],nt>7&&(z(r,m,rt>>23&31),m+=e[nt]);var et=31&rt;_(r,m,Q[et]),m+=R[et],et>3&&(_(r,m,rt>>5&8191),m+=i[et])}else _(r,m,N[rt]),m+=P[rt]}return _(r,m,N[256]),m+P[256]},C=new r([65540,131080,131088,131104,262176,1048704,1048832,2114560,2117632]),F=new t(0),I=function(){for(var t=new Int32Array(256),n=0;n<256;++n){for(var r=n,e=9;--e;)r=(1&r&&-306674912)^r>>>1;t[n]=r}return t}(),S=function(){var t=1,n=0;return{p:function(r){for(var e=t,i=n,s=0|r.length,a=0;a!=s;){for(var o=Math.min(a+2655,s);a<o;++a)i+=e+=r[a];e=(65535&e)+15*(e>>16),i=(65535&i)+15*(i>>16)}t=e,n=i},d:function(){return(255&(t%=65521))<<24|(65280&t)<<8|(255&(n%=65521))<<8|n>>8}}},L=function(s,a,o,h,u){if(!u&&(u={l:1},a.dictionary)){var c=a.dictionary.subarray(-32768),v=new t(c.length+s.length);v.set(c),v.set(s,c.length),s=v,u.w=c.length}return function(s,a,o,h,u,c){var v=c.z||s.length,d=new t(h+v+5*(1+Math.ceil(v/7e3))+u),p=d.subarray(h,d.length-u),g=c.l,w=7&(c.r||0);if(a){w&&(p[0]=c.r>>3);for(var y=C[a-1],M=y>>13,E=8191&y,z=(1<<o)-1,_=c.p||new n(32768),x=c.h||new n(z+1),A=Math.ceil(o/3),D=2*A,T=function(t){return(s[t]^s[t+1]<<A^s[t+2]<<D)&z},F=new r(25e3),I=new n(288),S=new n(32),L=0,O=0,j=c.i||0,q=0,B=c.w||0,G=0;j+2<v;++j){var H=T(j),J=32767&j,K=x[H];if(_[J]=K,x[H]=J,B<=j){var N=v-j;if((L>7e3||q>24576)&&(N>423||!g)){w=U(s,p,0,F,I,S,O,q,G,j-G,w),q=L=O=0,G=j;for(var P=0;P<286;++P)I[P]=0;for(P=0;P<30;++P)S[P]=0}var Q=2,R=0,V=E,W=J-K&32767;if(N>2&&H==T(j-W))for(var X=Math.min(M,N)-1,Y=Math.min(32767,j),Z=Math.min(258,N);W<=Y&&--V&&J!=K;){if(s[j+Q]==s[j+Q-W]){for(var $=0;$<Z&&s[j+$]==s[j+$-W];++$);if($>Q){if(Q=$,R=W,$>X)break;var tt=Math.min(W,$-2),nt=0;for(P=0;P<tt;++P){var rt=j-W+P&32767,et=rt-_[rt]&32767;et>nt&&(nt=et,K=rt)}}}W+=(J=K)-(K=_[J])&32767}if(R){F[q++]=268435456|f[Q]<<18|l[R];var it=31&f[Q],st=31&l[R];O+=e[it]+i[st],++I[257+it],++S[st],B=j+Q,++L}else F[q++]=s[j],++I[s[j]]}}for(j=Math.max(j,B);j<v;++j)F[q++]=s[j],++I[s[j]];w=U(s,p,g,F,I,S,O,q,G,j-G,w),g||(c.r=7&w|p[w/8|0]<<3,w-=7,c.h=x,c.p=_,c.i=j,c.w=B)}else{for(j=c.w||0;j<v+g;j+=65535){var at=j+65535;at>=v&&(p[w/8|0]=g,at=v),w=k(p,w+1,s.subarray(j,at))}c.i=v}return b(d,0,h+m(w)+u)}(s,null==a.level?6:a.level,null==a.mem?u.l?Math.ceil(1.5*Math.max(8,Math.min(13,Math.log(s.length)))):20:12+a.mem,o,h,u)},O=function(t,n,r){for(;r;++n)t[n]=r,r>>>=8},j=function(){function n(n,r){if(\"function\"==typeof n&&(r=n,n={}),this.ondata=r,this.o=n||{},this.s={l:0,i:32768,w:32768,z:32768},this.b=new t(98304),this.o.dictionary){var e=this.o.dictionary.subarray(-32768);this.b.set(e,32768-e.length),this.s.i=32768-e.length}}return n.prototype.p=function(t,n){this.ondata(L(t,this.o,0,0,this.s),n)},n.prototype.push=function(n,r){this.ondata||E(5),this.s.l&&E(4);var e=n.length+this.s.z;if(e>this.b.length){if(e>2*this.b.length-32768){var i=new t(-32768&e);i.set(this.b.subarray(0,this.s.z)),this.b=i}var s=this.b.length-this.s.z;this.b.set(n.subarray(0,s),this.s.z),this.s.z=this.b.length,this.p(this.b,!1),this.b.set(this.b.subarray(-32768)),this.b.set(n.subarray(s),32768),this.s.z=n.length-s+32768,this.s.i=32766,this.s.w=32768}else this.b.set(n,this.s.z),this.s.z+=n.length;this.s.l=1&r,(this.s.z>this.s.w+8191||r)&&(this.p(this.b,r||!1),this.s.w=this.s.i,this.s.i-=2)},n.prototype.flush=function(){this.ondata||E(5),this.s.l&&E(4),this.p(this.b,!1),this.s.w=this.s.i,this.s.i-=2},n}();function q(t,n){n||(n={});var r=function(){var t=-1;return{p:function(n){for(var r=t,e=0;e<n.length;++e)r=I[255&r^n[e]]^r>>>8;t=r},d:function(){return~t}}}(),e=t.length;r.p(t);var i,s=L(t,n,10+((i=n).filename?i.filename.length+1:0),8),a=s.length;return function(t,n){var r=n.filename;if(t[0]=31,t[1]=139,t[2]=8,t[8]=n.level<2?4:9==n.level?2:0,t[9]=3,0!=n.mtime&&O(t,4,Math.floor(new Date(n.mtime||Date.now())/1e3)),r){t[3]=8;for(var e=0;e<=r.length;++e)t[e+10]=r.charCodeAt(e)}}(s,n),O(s,a-8,r.d()),O(s,a-4,e),s}var B=function(){function t(t,n){this.c=S(),this.v=1,j.call(this,t,n)}return t.prototype.push=function(t,n){this.c.p(t),j.prototype.push.call(this,t,n)},t.prototype.p=function(t,n){var r=L(t,this.o,this.v&&(this.o.dictionary?6:2),n&&4,this.s);this.v&&(function(t,n){var r=n.level,e=0==r?0:r<6?1:9==r?3:2;if(t[0]=120,t[1]=e<<6|(n.dictionary&&32),t[1]|=31-(t[0]<<8|t[1])%31,n.dictionary){var i=S();i.p(n.dictionary),O(t,2,i.d())}}(r,this.o),this.v=0),n&&O(r,r.length-4,this.c.d()),this.ondata(r,n)},t.prototype.flush=function(){j.prototype.flush.call(this)},t}(),G=\"undefined\"!=typeof TextEncoder&&new TextEncoder,H=\"undefined\"!=typeof TextDecoder&&new TextDecoder;try{H.decode(F,{stream:!0})}catch(t){}var J=function(){function t(t){this.ondata=t}return t.prototype.push=function(t,n){this.ondata||E(5),this.d&&E(4),this.ondata(K(t),this.d=n||!1)},t}();function K(n,r){if(G)return G.encode(n);for(var e=n.length,i=new t(n.length+(n.length>>1)),s=0,a=function(t){i[s++]=t},o=0;o<e;++o){if(s+5>i.length){var h=new t(s+8+(e-o<<1));h.set(i),i=h}var f=n.charCodeAt(o);f<128||r?a(f):f<2048?(a(192|f>>6),a(128|63&f)):f>55295&&f<57344?(a(240|(f=65536+(1047552&f)|1023&n.charCodeAt(++o))>>18),a(128|f>>12&63),a(128|f>>6&63),a(128|63&f)):(a(224|f>>12),a(128|f>>6&63),a(128|63&f))}return b(i,0,s)}const N=new class{constructor(){this._init()}clear(){this._init()}addEvent(t){if(!t)throw new Error(\"Adding invalid event\");const n=this._hasEvents?\",\":\"\";this.stream.push(n+t),this._hasEvents=!0}finish(){this.stream.push(\"]\",!0);const t=function(t){let n=0;for(const r of t)n+=r.length;const r=new Uint8Array(n);for(let n=0,e=0,i=t.length;n<i;n++){const i=t[n];r.set(i,e),e+=i.length}return r}(this._deflatedData);return this._init(),t}_init(){this._hasEvents=!1,this._deflatedData=[],this.deflate=new B,this.deflate.ondata=(t,n)=>{this._deflatedData.push(t)},this.stream=new J((t,n)=>{this.deflate.push(t,n)}),this.stream.push(\"[\")}},P={clear:()=>{N.clear()},addEvent:t=>N.addEvent(t),finish:()=>N.finish(),compress:t=>function(t){return q(K(t))}(t)};addEventListener(\"message\",function(t){const n=t.data.method,r=t.data.id,e=t.data.arg;if(n in P&&\"function\"==typeof P[n])try{const t=P[n](e);postMessage({id:r,method:n,success:!0,response:t})}catch(t){postMessage({id:r,method:n,success:!1,response:t.message}),console.error(t)}}),postMessage({id:void 0,method:\"init\",success:!0,response:void 0});`;\n","import {\n  addClsInstrumentationHandler,\n  addInpInstrumentationHandler,\n  addLcpInstrumentationHandler,\n  addPerformanceInstrumentationHandler,\n} from '@sentry/browser-utils';\nimport type { ReplayContainer } from '../types';\nimport {\n  getCumulativeLayoutShift,\n  getInteractionToNextPaint,\n  getLargestContentfulPaint,\n  webVitalHandler,\n} from '../util/createPerformanceEntries';\n\n/**\n * Sets up a PerformanceObserver to listen to all performance entry types.\n * Returns a callback to stop observing.\n */\nexport function setupPerformanceObserver(replay: ReplayContainer): () => void {\n  function addPerformanceEntry(entry: PerformanceEntry): void {\n    // It is possible for entries to come up multiple times\n    if (!replay.performanceEntries.includes(entry)) {\n      replay.performanceEntries.push(entry);\n    }\n  }\n\n  function onEntries({ entries }: { entries: PerformanceEntry[] }): void {\n    entries.forEach(addPerformanceEntry);\n  }\n\n  const clearCallbacks: (() => void)[] = [];\n\n  (['navigation', 'paint', 'resource'] as const).forEach(type => {\n    clearCallbacks.push(addPerformanceInstrumentationHandler(type, onEntries));\n  });\n\n  clearCallbacks.push(\n    addLcpInstrumentationHandler(webVitalHandler(getLargestContentfulPaint, replay)),\n    addClsInstrumentationHandler(webVitalHandler(getCumulativeLayoutShift, replay)),\n    addInpInstrumentationHandler(webVitalHandler(getInteractionToNextPaint, replay)),\n  );\n\n  // A callback to cleanup all handlers\n  return () => {\n    clearCallbacks.forEach(clearCallback => clearCallback());\n  };\n}\n","/**\n * Vendored in from @sentry/rrweb.\n *\n * This is a copy of the function from rrweb, it is not nicely exported there.\n */\nexport function closestElementOfNode(node: Node | null): HTMLElement | null {\n  if (!node) {\n    return null;\n  }\n\n  // Catch access to node properties to avoid Firefox \"permission denied\" errors\n  try {\n    const el: HTMLElement | null = node.nodeType === node.ELEMENT_NODE ? (node as HTMLElement) : node.parentElement;\n    return el;\n  } catch {\n    return null;\n  }\n}\n","import type { ReplayIntegrationPrivacyOptions } from '../types';\n\ntype GetPrivacyOptions = Required<Omit<ReplayIntegrationPrivacyOptions, 'maskFn'>>;\n\ninterface GetPrivacyReturn {\n  maskTextSelector: string;\n  unmaskTextSelector: string;\n  blockSelector: string;\n  unblockSelector: string;\n  ignoreSelector: string;\n\n  blockClass?: RegExp;\n  maskTextClass?: RegExp;\n}\n\nfunction getOption(selectors: string[], defaultSelectors: string[]): string {\n  return [\n    ...selectors,\n    // sentry defaults\n    ...defaultSelectors,\n  ].join(',');\n}\n\n/**\n * Returns privacy related configuration for use in rrweb\n */\nexport function getPrivacyOptions({ mask, unmask, block, unblock, ignore }: GetPrivacyOptions): GetPrivacyReturn {\n  const defaultBlockedElements = ['base', 'iframe[srcdoc]:not([src])'];\n\n  const maskSelector = getOption(mask, ['.sentry-mask', '[data-sentry-mask]']);\n  const unmaskSelector = getOption(unmask, []);\n\n  const options: GetPrivacyReturn = {\n    // We are making the decision to make text and input selectors the same\n    maskTextSelector: maskSelector,\n    unmaskTextSelector: unmaskSelector,\n\n    blockSelector: getOption(block, ['.sentry-block', '[data-sentry-block]', ...defaultBlockedElements]),\n    unblockSelector: getOption(unblock, []),\n    ignoreSelector: getOption(ignore, ['.sentry-ignore', '[data-sentry-ignore]', 'input[type=\"file\"]']),\n  };\n\n  return options;\n}\n","import type { getPrivacyOptions } from './getPrivacyOptions';\n\ninterface MaskAttributeParams {\n  maskAttributes: string[];\n  maskAllText: boolean;\n  privacyOptions: ReturnType<typeof getPrivacyOptions>;\n  key: string;\n  value: string;\n  el: HTMLElement;\n}\n\n/**\n * Masks an attribute if necessary, otherwise return attribute value as-is.\n * Keys listed in `maskAttributes` are masked even when `maskAllText` is false;\n * masking `value` on submit/button inputs without listing `value` still requires `maskAllText`.\n */\nexport function maskAttribute({\n  el,\n  key,\n  maskAttributes,\n  maskAllText,\n  privacyOptions,\n  value,\n}: MaskAttributeParams): string {\n  // unmaskTextSelector takes precedence\n  if (privacyOptions.unmaskTextSelector && el.matches(privacyOptions.unmaskTextSelector)) {\n    return value;\n  }\n\n  const masksNamedAttribute = maskAttributes.includes(key);\n  // When `maskAllText` is enabled, also mask `value` on button-like inputs even if `value` is not listed.\n  const masksSubmitButtonValue =\n    maskAllText &&\n    key === 'value' &&\n    el.tagName === 'INPUT' &&\n    ['submit', 'button'].includes(el.getAttribute('type') || '');\n\n  if (masksNamedAttribute || masksSubmitButtonValue) {\n    return value.replace(/[\\S]/g, '*');\n  }\n\n  return value;\n}\n","import { getClient } from '@sentry/core';\nimport type { replayIntegration } from '../integration';\n\n/**\n * This is a small utility to get a type-safe instance of the Replay integration.\n */\nexport function getReplay(): ReturnType<typeof replayIntegration> | undefined {\n  const client = getClient();\n  return client?.getIntegrationByName<ReturnType<typeof replayIntegration>>('Replay');\n}\n","import { macroCondition, getGlobalConfig } from '@embroider/macros';\nconst name = \"@warp-drive/core-types\";\nconst version = \"0.0.3\";\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 EmberData 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 EmberData 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\";\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 CacheHandler behavior for a request.\n *\n * @typedoc\n */\n\n/**\n * JavaScript's native Request class.\n *\n * EmberData provides our own typings due to incompleteness in the native typings.\n *\n * @typedoc\n */\n\n/**\n * Extends JavaScript's native {@link Request} object with additional\n * properties specific to the RequestManager's capabilities.\n *\n * @typedoc\n */\n\n/**\n * Immutable version of {@link RequestInfo}. This is what is passed to handlers.\n *\n * @typedoc\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/emberjs/data/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 * @typedoc\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\";\n\n/*\n * @module @warp-drive/core-types\n */\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, EmberData and 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 * @typedoc\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, EmberData and WarpDrive APIs can\n * take advantage of this to provide better type\n * safety and intellisense.\n *\n * @type {Symbol}\n * @typedoc\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 * @typedoc\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 * @typedoc\n */\nconst RequestSignature = getOrSetGlobal('RequestSignature', Symbol('RequestSignature'));\nexport { RecordStore, RequestSignature, ResourceType, TransformName, Type };","/**\n * --------------------------------------------------------------------------\n * Bootstrap (v4.6.2): util.js\n * Licensed under MIT (https://github.com/twbs/bootstrap/blob/main/LICENSE)\n * --------------------------------------------------------------------------\n */\n\nimport $ from 'jquery'\n\n/**\n * Private TransitionEnd Helpers\n */\n\nconst TRANSITION_END = 'transitionend'\nconst MAX_UID = 1000000\nconst MILLISECONDS_MULTIPLIER = 1000\n\n// Shoutout AngusCroll (https://goo.gl/pxwQGp)\nfunction toType(obj) {\n  if (obj === null || typeof obj === 'undefined') {\n    return `${obj}`\n  }\n\n  return {}.toString.call(obj).match(/\\s([a-z]+)/i)[1].toLowerCase()\n}\n\nfunction getSpecialTransitionEndEvent() {\n  return {\n    bindType: TRANSITION_END,\n    delegateType: TRANSITION_END,\n    handle(event) {\n      if ($(event.target).is(this)) {\n        return event.handleObj.handler.apply(this, arguments) // eslint-disable-line prefer-rest-params\n      }\n\n      return undefined\n    }\n  }\n}\n\nfunction transitionEndEmulator(duration) {\n  let called = false\n\n  $(this).one(Util.TRANSITION_END, () => {\n    called = true\n  })\n\n  setTimeout(() => {\n    if (!called) {\n      Util.triggerTransitionEnd(this)\n    }\n  }, duration)\n\n  return this\n}\n\nfunction setTransitionEndSupport() {\n  $.fn.emulateTransitionEnd = transitionEndEmulator\n  $.event.special[Util.TRANSITION_END] = getSpecialTransitionEndEvent()\n}\n\n/**\n * Public Util API\n */\n\nconst Util = {\n  TRANSITION_END: 'bsTransitionEnd',\n\n  getUID(prefix) {\n    do {\n      // eslint-disable-next-line no-bitwise\n      prefix += ~~(Math.random() * MAX_UID) // \"~~\" acts like a faster Math.floor() here\n    } while (document.getElementById(prefix))\n\n    return prefix\n  },\n\n  getSelectorFromElement(element) {\n    let selector = element.getAttribute('data-target')\n\n    if (!selector || selector === '#') {\n      const hrefAttr = element.getAttribute('href')\n      selector = hrefAttr && hrefAttr !== '#' ? hrefAttr.trim() : ''\n    }\n\n    try {\n      return document.querySelector(selector) ? selector : null\n    } catch (_) {\n      return null\n    }\n  },\n\n  getTransitionDurationFromElement(element) {\n    if (!element) {\n      return 0\n    }\n\n    // Get transition-duration of the element\n    let transitionDuration = $(element).css('transition-duration')\n    let transitionDelay = $(element).css('transition-delay')\n\n    const floatTransitionDuration = parseFloat(transitionDuration)\n    const floatTransitionDelay = parseFloat(transitionDelay)\n\n    // Return 0 if element or transition duration is not found\n    if (!floatTransitionDuration && !floatTransitionDelay) {\n      return 0\n    }\n\n    // If multiple durations are defined, take the first\n    transitionDuration = transitionDuration.split(',')[0]\n    transitionDelay = transitionDelay.split(',')[0]\n\n    return (parseFloat(transitionDuration) + parseFloat(transitionDelay)) * MILLISECONDS_MULTIPLIER\n  },\n\n  reflow(element) {\n    return element.offsetHeight\n  },\n\n  triggerTransitionEnd(element) {\n    $(element).trigger(TRANSITION_END)\n  },\n\n  supportsTransitionEnd() {\n    return Boolean(TRANSITION_END)\n  },\n\n  isElement(obj) {\n    return (obj[0] || obj).nodeType\n  },\n\n  typeCheckConfig(componentName, config, configTypes) {\n    for (const property in configTypes) {\n      if (Object.prototype.hasOwnProperty.call(configTypes, property)) {\n        const expectedTypes = configTypes[property]\n        const value = config[property]\n        const valueType = value && Util.isElement(value) ?\n          'element' : toType(value)\n\n        if (!new RegExp(expectedTypes).test(valueType)) {\n          throw new Error(\n            `${componentName.toUpperCase()}: ` +\n            `Option \"${property}\" provided type \"${valueType}\" ` +\n            `but expected type \"${expectedTypes}\".`)\n        }\n      }\n    }\n  },\n\n  findShadowRoot(element) {\n    if (!document.documentElement.attachShadow) {\n      return null\n    }\n\n    // Can find the shadow root otherwise it'll return the document\n    if (typeof element.getRootNode === 'function') {\n      const root = element.getRootNode()\n      return root instanceof ShadowRoot ? root : null\n    }\n\n    if (element instanceof ShadowRoot) {\n      return element\n    }\n\n    // when we don't find a shadow root\n    if (!element.parentNode) {\n      return null\n    }\n\n    return Util.findShadowRoot(element.parentNode)\n  },\n\n  jQueryDetection() {\n    if (typeof $ === 'undefined') {\n      throw new TypeError('Bootstrap\\'s JavaScript requires jQuery. jQuery must be included before Bootstrap\\'s JavaScript.')\n    }\n\n    const version = $.fn.jquery.split(' ')[0].split('.')\n    const minMajor = 1\n    const ltMajor = 2\n    const minMinor = 9\n    const minPatch = 1\n    const maxMajor = 4\n\n    if (version[0] < ltMajor && version[1] < minMinor || version[0] === minMajor && version[1] === minMinor && version[2] < minPatch || version[0] >= maxMajor) {\n      throw new Error('Bootstrap\\'s JavaScript requires at least jQuery v1.9.1 but less than v4.0.0')\n    }\n  }\n}\n\nUtil.jQueryDetection()\nsetTransitionEndSupport()\n\nexport default Util\n","/**\n * --------------------------------------------------------------------------\n * Bootstrap (v4.6.2): alert.js\n * Licensed under MIT (https://github.com/twbs/bootstrap/blob/main/LICENSE)\n * --------------------------------------------------------------------------\n */\n\nimport $ from 'jquery'\nimport Util from './util'\n\n/**\n * Constants\n */\n\nconst NAME = 'alert'\nconst VERSION = '4.6.2'\nconst DATA_KEY = 'bs.alert'\nconst EVENT_KEY = `.${DATA_KEY}`\nconst DATA_API_KEY = '.data-api'\nconst JQUERY_NO_CONFLICT = $.fn[NAME]\n\nconst CLASS_NAME_ALERT = 'alert'\nconst CLASS_NAME_FADE = 'fade'\nconst CLASS_NAME_SHOW = 'show'\n\nconst EVENT_CLOSE = `close${EVENT_KEY}`\nconst EVENT_CLOSED = `closed${EVENT_KEY}`\nconst EVENT_CLICK_DATA_API = `click${EVENT_KEY}${DATA_API_KEY}`\n\nconst SELECTOR_DISMISS = '[data-dismiss=\"alert\"]'\n\n/**\n * Class definition\n */\n\nclass Alert {\n  constructor(element) {\n    this._element = element\n  }\n\n  // Getters\n  static get VERSION() {\n    return VERSION\n  }\n\n  // Public\n  close(element) {\n    let rootElement = this._element\n    if (element) {\n      rootElement = this._getRootElement(element)\n    }\n\n    const customEvent = this._triggerCloseEvent(rootElement)\n\n    if (customEvent.isDefaultPrevented()) {\n      return\n    }\n\n    this._removeElement(rootElement)\n  }\n\n  dispose() {\n    $.removeData(this._element, DATA_KEY)\n    this._element = null\n  }\n\n  // Private\n  _getRootElement(element) {\n    const selector = Util.getSelectorFromElement(element)\n    let parent = false\n\n    if (selector) {\n      parent = document.querySelector(selector)\n    }\n\n    if (!parent) {\n      parent = $(element).closest(`.${CLASS_NAME_ALERT}`)[0]\n    }\n\n    return parent\n  }\n\n  _triggerCloseEvent(element) {\n    const closeEvent = $.Event(EVENT_CLOSE)\n\n    $(element).trigger(closeEvent)\n    return closeEvent\n  }\n\n  _removeElement(element) {\n    $(element).removeClass(CLASS_NAME_SHOW)\n\n    if (!$(element).hasClass(CLASS_NAME_FADE)) {\n      this._destroyElement(element)\n      return\n    }\n\n    const transitionDuration = Util.getTransitionDurationFromElement(element)\n\n    $(element)\n      .one(Util.TRANSITION_END, event => this._destroyElement(element, event))\n      .emulateTransitionEnd(transitionDuration)\n  }\n\n  _destroyElement(element) {\n    $(element)\n      .detach()\n      .trigger(EVENT_CLOSED)\n      .remove()\n  }\n\n  // Static\n  static _jQueryInterface(config) {\n    return this.each(function () {\n      const $element = $(this)\n      let data = $element.data(DATA_KEY)\n\n      if (!data) {\n        data = new Alert(this)\n        $element.data(DATA_KEY, data)\n      }\n\n      if (config === 'close') {\n        data[config](this)\n      }\n    })\n  }\n\n  static _handleDismiss(alertInstance) {\n    return function (event) {\n      if (event) {\n        event.preventDefault()\n      }\n\n      alertInstance.close(this)\n    }\n  }\n}\n\n/**\n * Data API implementation\n */\n\n$(document).on(\n  EVENT_CLICK_DATA_API,\n  SELECTOR_DISMISS,\n  Alert._handleDismiss(new Alert())\n)\n\n/**\n * jQuery\n */\n\n$.fn[NAME] = Alert._jQueryInterface\n$.fn[NAME].Constructor = Alert\n$.fn[NAME].noConflict = () => {\n  $.fn[NAME] = JQUERY_NO_CONFLICT\n  return Alert._jQueryInterface\n}\n\nexport default Alert\n","/**\n * --------------------------------------------------------------------------\n * Bootstrap (v4.6.2): button.js\n * Licensed under MIT (https://github.com/twbs/bootstrap/blob/main/LICENSE)\n * --------------------------------------------------------------------------\n */\n\nimport $ from 'jquery'\n\n/**\n * Constants\n */\n\nconst NAME = 'button'\nconst VERSION = '4.6.2'\nconst DATA_KEY = 'bs.button'\nconst EVENT_KEY = `.${DATA_KEY}`\nconst DATA_API_KEY = '.data-api'\nconst JQUERY_NO_CONFLICT = $.fn[NAME]\n\nconst CLASS_NAME_ACTIVE = 'active'\nconst CLASS_NAME_BUTTON = 'btn'\nconst CLASS_NAME_FOCUS = 'focus'\n\nconst EVENT_CLICK_DATA_API = `click${EVENT_KEY}${DATA_API_KEY}`\nconst EVENT_FOCUS_BLUR_DATA_API = `focus${EVENT_KEY}${DATA_API_KEY} ` +\n                          `blur${EVENT_KEY}${DATA_API_KEY}`\nconst EVENT_LOAD_DATA_API = `load${EVENT_KEY}${DATA_API_KEY}`\n\nconst SELECTOR_DATA_TOGGLE_CARROT = '[data-toggle^=\"button\"]'\nconst SELECTOR_DATA_TOGGLES = '[data-toggle=\"buttons\"]'\nconst SELECTOR_DATA_TOGGLE = '[data-toggle=\"button\"]'\nconst SELECTOR_DATA_TOGGLES_BUTTONS = '[data-toggle=\"buttons\"] .btn'\nconst SELECTOR_INPUT = 'input:not([type=\"hidden\"])'\nconst SELECTOR_ACTIVE = '.active'\nconst SELECTOR_BUTTON = '.btn'\n\n/**\n * Class definition\n */\n\nclass Button {\n  constructor(element) {\n    this._element = element\n    this.shouldAvoidTriggerChange = false\n  }\n\n  // Getters\n  static get VERSION() {\n    return VERSION\n  }\n\n  // Public\n  toggle() {\n    let triggerChangeEvent = true\n    let addAriaPressed = true\n    const rootElement = $(this._element).closest(SELECTOR_DATA_TOGGLES)[0]\n\n    if (rootElement) {\n      const input = this._element.querySelector(SELECTOR_INPUT)\n\n      if (input) {\n        if (input.type === 'radio') {\n          if (input.checked && this._element.classList.contains(CLASS_NAME_ACTIVE)) {\n            triggerChangeEvent = false\n          } else {\n            const activeElement = rootElement.querySelector(SELECTOR_ACTIVE)\n\n            if (activeElement) {\n              $(activeElement).removeClass(CLASS_NAME_ACTIVE)\n            }\n          }\n        }\n\n        if (triggerChangeEvent) {\n          // if it's not a radio button or checkbox don't add a pointless/invalid checked property to the input\n          if (input.type === 'checkbox' || input.type === 'radio') {\n            input.checked = !this._element.classList.contains(CLASS_NAME_ACTIVE)\n          }\n\n          if (!this.shouldAvoidTriggerChange) {\n            $(input).trigger('change')\n          }\n        }\n\n        input.focus()\n        addAriaPressed = false\n      }\n    }\n\n    if (!(this._element.hasAttribute('disabled') || this._element.classList.contains('disabled'))) {\n      if (addAriaPressed) {\n        this._element.setAttribute('aria-pressed', !this._element.classList.contains(CLASS_NAME_ACTIVE))\n      }\n\n      if (triggerChangeEvent) {\n        $(this._element).toggleClass(CLASS_NAME_ACTIVE)\n      }\n    }\n  }\n\n  dispose() {\n    $.removeData(this._element, DATA_KEY)\n    this._element = null\n  }\n\n  // Static\n  static _jQueryInterface(config, avoidTriggerChange) {\n    return this.each(function () {\n      const $element = $(this)\n      let data = $element.data(DATA_KEY)\n\n      if (!data) {\n        data = new Button(this)\n        $element.data(DATA_KEY, data)\n      }\n\n      data.shouldAvoidTriggerChange = avoidTriggerChange\n\n      if (config === 'toggle') {\n        data[config]()\n      }\n    })\n  }\n}\n\n/**\n * Data API implementation\n */\n\n$(document)\n  .on(EVENT_CLICK_DATA_API, SELECTOR_DATA_TOGGLE_CARROT, event => {\n    let button = event.target\n    const initialButton = button\n\n    if (!$(button).hasClass(CLASS_NAME_BUTTON)) {\n      button = $(button).closest(SELECTOR_BUTTON)[0]\n    }\n\n    if (!button || button.hasAttribute('disabled') || button.classList.contains('disabled')) {\n      event.preventDefault() // work around Firefox bug #1540995\n    } else {\n      const inputBtn = button.querySelector(SELECTOR_INPUT)\n\n      if (inputBtn && (inputBtn.hasAttribute('disabled') || inputBtn.classList.contains('disabled'))) {\n        event.preventDefault() // work around Firefox bug #1540995\n        return\n      }\n\n      if (initialButton.tagName === 'INPUT' || button.tagName !== 'LABEL') {\n        Button._jQueryInterface.call($(button), 'toggle', initialButton.tagName === 'INPUT')\n      }\n    }\n  })\n  .on(EVENT_FOCUS_BLUR_DATA_API, SELECTOR_DATA_TOGGLE_CARROT, event => {\n    const button = $(event.target).closest(SELECTOR_BUTTON)[0]\n    $(button).toggleClass(CLASS_NAME_FOCUS, /^focus(in)?$/.test(event.type))\n  })\n\n$(window).on(EVENT_LOAD_DATA_API, () => {\n  // ensure correct active class is set to match the controls' actual values/states\n\n  // find all checkboxes/readio buttons inside data-toggle groups\n  let buttons = [].slice.call(document.querySelectorAll(SELECTOR_DATA_TOGGLES_BUTTONS))\n  for (let i = 0, len = buttons.length; i < len; i++) {\n    const button = buttons[i]\n    const input = button.querySelector(SELECTOR_INPUT)\n    if (input.checked || input.hasAttribute('checked')) {\n      button.classList.add(CLASS_NAME_ACTIVE)\n    } else {\n      button.classList.remove(CLASS_NAME_ACTIVE)\n    }\n  }\n\n  // find all button toggles\n  buttons = [].slice.call(document.querySelectorAll(SELECTOR_DATA_TOGGLE))\n  for (let i = 0, len = buttons.length; i < len; i++) {\n    const button = buttons[i]\n    if (button.getAttribute('aria-pressed') === 'true') {\n      button.classList.add(CLASS_NAME_ACTIVE)\n    } else {\n      button.classList.remove(CLASS_NAME_ACTIVE)\n    }\n  }\n})\n\n/**\n * jQuery\n */\n\n$.fn[NAME] = Button._jQueryInterface\n$.fn[NAME].Constructor = Button\n$.fn[NAME].noConflict = () => {\n  $.fn[NAME] = JQUERY_NO_CONFLICT\n  return Button._jQueryInterface\n}\n\nexport default Button\n","/**\n * --------------------------------------------------------------------------\n * Bootstrap (v4.6.2): carousel.js\n * Licensed under MIT (https://github.com/twbs/bootstrap/blob/main/LICENSE)\n * --------------------------------------------------------------------------\n */\n\nimport $ from 'jquery'\nimport Util from './util'\n\n/**\n * Constants\n */\n\nconst NAME = 'carousel'\nconst VERSION = '4.6.2'\nconst DATA_KEY = 'bs.carousel'\nconst EVENT_KEY = `.${DATA_KEY}`\nconst DATA_API_KEY = '.data-api'\nconst JQUERY_NO_CONFLICT = $.fn[NAME]\nconst ARROW_LEFT_KEYCODE = 37 // KeyboardEvent.which value for left arrow key\nconst ARROW_RIGHT_KEYCODE = 39 // KeyboardEvent.which value for right arrow key\nconst TOUCHEVENT_COMPAT_WAIT = 500 // Time for mouse compat events to fire after touch\nconst SWIPE_THRESHOLD = 40\n\nconst CLASS_NAME_CAROUSEL = 'carousel'\nconst CLASS_NAME_ACTIVE = 'active'\nconst CLASS_NAME_SLIDE = 'slide'\nconst CLASS_NAME_RIGHT = 'carousel-item-right'\nconst CLASS_NAME_LEFT = 'carousel-item-left'\nconst CLASS_NAME_NEXT = 'carousel-item-next'\nconst CLASS_NAME_PREV = 'carousel-item-prev'\nconst CLASS_NAME_POINTER_EVENT = 'pointer-event'\n\nconst DIRECTION_NEXT = 'next'\nconst DIRECTION_PREV = 'prev'\nconst DIRECTION_LEFT = 'left'\nconst DIRECTION_RIGHT = 'right'\n\nconst EVENT_SLIDE = `slide${EVENT_KEY}`\nconst EVENT_SLID = `slid${EVENT_KEY}`\nconst EVENT_KEYDOWN = `keydown${EVENT_KEY}`\nconst EVENT_MOUSEENTER = `mouseenter${EVENT_KEY}`\nconst EVENT_MOUSELEAVE = `mouseleave${EVENT_KEY}`\nconst EVENT_TOUCHSTART = `touchstart${EVENT_KEY}`\nconst EVENT_TOUCHMOVE = `touchmove${EVENT_KEY}`\nconst EVENT_TOUCHEND = `touchend${EVENT_KEY}`\nconst EVENT_POINTERDOWN = `pointerdown${EVENT_KEY}`\nconst EVENT_POINTERUP = `pointerup${EVENT_KEY}`\nconst EVENT_DRAG_START = `dragstart${EVENT_KEY}`\nconst EVENT_LOAD_DATA_API = `load${EVENT_KEY}${DATA_API_KEY}`\nconst EVENT_CLICK_DATA_API = `click${EVENT_KEY}${DATA_API_KEY}`\n\nconst SELECTOR_ACTIVE = '.active'\nconst SELECTOR_ACTIVE_ITEM = '.active.carousel-item'\nconst SELECTOR_ITEM = '.carousel-item'\nconst SELECTOR_ITEM_IMG = '.carousel-item img'\nconst SELECTOR_NEXT_PREV = '.carousel-item-next, .carousel-item-prev'\nconst SELECTOR_INDICATORS = '.carousel-indicators'\nconst SELECTOR_DATA_SLIDE = '[data-slide], [data-slide-to]'\nconst SELECTOR_DATA_RIDE = '[data-ride=\"carousel\"]'\n\nconst Default = {\n  interval: 5000,\n  keyboard: true,\n  slide: false,\n  pause: 'hover',\n  wrap: true,\n  touch: true\n}\n\nconst DefaultType = {\n  interval: '(number|boolean)',\n  keyboard: 'boolean',\n  slide: '(boolean|string)',\n  pause: '(string|boolean)',\n  wrap: 'boolean',\n  touch: 'boolean'\n}\n\nconst PointerType = {\n  TOUCH: 'touch',\n  PEN: 'pen'\n}\n\n/**\n * Class definition\n */\n\nclass Carousel {\n  constructor(element, config) {\n    this._items = null\n    this._interval = null\n    this._activeElement = null\n    this._isPaused = false\n    this._isSliding = false\n    this.touchTimeout = null\n    this.touchStartX = 0\n    this.touchDeltaX = 0\n\n    this._config = this._getConfig(config)\n    this._element = element\n    this._indicatorsElement = this._element.querySelector(SELECTOR_INDICATORS)\n    this._touchSupported = 'ontouchstart' in document.documentElement || navigator.maxTouchPoints > 0\n    this._pointerEvent = Boolean(window.PointerEvent || window.MSPointerEvent)\n\n    this._addEventListeners()\n  }\n\n  // Getters\n  static get VERSION() {\n    return VERSION\n  }\n\n  static get Default() {\n    return Default\n  }\n\n  // Public\n  next() {\n    if (!this._isSliding) {\n      this._slide(DIRECTION_NEXT)\n    }\n  }\n\n  nextWhenVisible() {\n    const $element = $(this._element)\n    // Don't call next when the page isn't visible\n    // or the carousel or its parent isn't visible\n    if (!document.hidden &&\n      ($element.is(':visible') && $element.css('visibility') !== 'hidden')) {\n      this.next()\n    }\n  }\n\n  prev() {\n    if (!this._isSliding) {\n      this._slide(DIRECTION_PREV)\n    }\n  }\n\n  pause(event) {\n    if (!event) {\n      this._isPaused = true\n    }\n\n    if (this._element.querySelector(SELECTOR_NEXT_PREV)) {\n      Util.triggerTransitionEnd(this._element)\n      this.cycle(true)\n    }\n\n    clearInterval(this._interval)\n    this._interval = null\n  }\n\n  cycle(event) {\n    if (!event) {\n      this._isPaused = false\n    }\n\n    if (this._interval) {\n      clearInterval(this._interval)\n      this._interval = null\n    }\n\n    if (this._config.interval && !this._isPaused) {\n      this._updateInterval()\n\n      this._interval = setInterval(\n        (document.visibilityState ? this.nextWhenVisible : this.next).bind(this),\n        this._config.interval\n      )\n    }\n  }\n\n  to(index) {\n    this._activeElement = this._element.querySelector(SELECTOR_ACTIVE_ITEM)\n\n    const activeIndex = this._getItemIndex(this._activeElement)\n\n    if (index > this._items.length - 1 || index < 0) {\n      return\n    }\n\n    if (this._isSliding) {\n      $(this._element).one(EVENT_SLID, () => this.to(index))\n      return\n    }\n\n    if (activeIndex === index) {\n      this.pause()\n      this.cycle()\n      return\n    }\n\n    const direction = index > activeIndex ?\n      DIRECTION_NEXT :\n      DIRECTION_PREV\n\n    this._slide(direction, this._items[index])\n  }\n\n  dispose() {\n    $(this._element).off(EVENT_KEY)\n    $.removeData(this._element, DATA_KEY)\n\n    this._items = null\n    this._config = null\n    this._element = null\n    this._interval = null\n    this._isPaused = null\n    this._isSliding = null\n    this._activeElement = null\n    this._indicatorsElement = null\n  }\n\n  // Private\n  _getConfig(config) {\n    config = {\n      ...Default,\n      ...config\n    }\n    Util.typeCheckConfig(NAME, config, DefaultType)\n    return config\n  }\n\n  _handleSwipe() {\n    const absDeltax = Math.abs(this.touchDeltaX)\n\n    if (absDeltax <= SWIPE_THRESHOLD) {\n      return\n    }\n\n    const direction = absDeltax / this.touchDeltaX\n\n    this.touchDeltaX = 0\n\n    // swipe left\n    if (direction > 0) {\n      this.prev()\n    }\n\n    // swipe right\n    if (direction < 0) {\n      this.next()\n    }\n  }\n\n  _addEventListeners() {\n    if (this._config.keyboard) {\n      $(this._element).on(EVENT_KEYDOWN, event => this._keydown(event))\n    }\n\n    if (this._config.pause === 'hover') {\n      $(this._element)\n        .on(EVENT_MOUSEENTER, event => this.pause(event))\n        .on(EVENT_MOUSELEAVE, event => this.cycle(event))\n    }\n\n    if (this._config.touch) {\n      this._addTouchEventListeners()\n    }\n  }\n\n  _addTouchEventListeners() {\n    if (!this._touchSupported) {\n      return\n    }\n\n    const start = event => {\n      if (this._pointerEvent && PointerType[event.originalEvent.pointerType.toUpperCase()]) {\n        this.touchStartX = event.originalEvent.clientX\n      } else if (!this._pointerEvent) {\n        this.touchStartX = event.originalEvent.touches[0].clientX\n      }\n    }\n\n    const move = event => {\n      // ensure swiping with one touch and not pinching\n      this.touchDeltaX = event.originalEvent.touches && event.originalEvent.touches.length > 1 ?\n        0 :\n        event.originalEvent.touches[0].clientX - this.touchStartX\n    }\n\n    const end = event => {\n      if (this._pointerEvent && PointerType[event.originalEvent.pointerType.toUpperCase()]) {\n        this.touchDeltaX = event.originalEvent.clientX - this.touchStartX\n      }\n\n      this._handleSwipe()\n      if (this._config.pause === 'hover') {\n        // If it's a touch-enabled device, mouseenter/leave are fired as\n        // part of the mouse compatibility events on first tap - the carousel\n        // would stop cycling until user tapped out of it;\n        // here, we listen for touchend, explicitly pause the carousel\n        // (as if it's the second time we tap on it, mouseenter compat event\n        // is NOT fired) and after a timeout (to allow for mouse compatibility\n        // events to fire) we explicitly restart cycling\n\n        this.pause()\n        if (this.touchTimeout) {\n          clearTimeout(this.touchTimeout)\n        }\n\n        this.touchTimeout = setTimeout(event => this.cycle(event), TOUCHEVENT_COMPAT_WAIT + this._config.interval)\n      }\n    }\n\n    $(this._element.querySelectorAll(SELECTOR_ITEM_IMG))\n      .on(EVENT_DRAG_START, e => e.preventDefault())\n\n    if (this._pointerEvent) {\n      $(this._element).on(EVENT_POINTERDOWN, event => start(event))\n      $(this._element).on(EVENT_POINTERUP, event => end(event))\n\n      this._element.classList.add(CLASS_NAME_POINTER_EVENT)\n    } else {\n      $(this._element).on(EVENT_TOUCHSTART, event => start(event))\n      $(this._element).on(EVENT_TOUCHMOVE, event => move(event))\n      $(this._element).on(EVENT_TOUCHEND, event => end(event))\n    }\n  }\n\n  _keydown(event) {\n    if (/input|textarea/i.test(event.target.tagName)) {\n      return\n    }\n\n    switch (event.which) {\n      case ARROW_LEFT_KEYCODE:\n        event.preventDefault()\n        this.prev()\n        break\n      case ARROW_RIGHT_KEYCODE:\n        event.preventDefault()\n        this.next()\n        break\n      default:\n    }\n  }\n\n  _getItemIndex(element) {\n    this._items = element && element.parentNode ?\n      [].slice.call(element.parentNode.querySelectorAll(SELECTOR_ITEM)) :\n      []\n    return this._items.indexOf(element)\n  }\n\n  _getItemByDirection(direction, activeElement) {\n    const isNextDirection = direction === DIRECTION_NEXT\n    const isPrevDirection = direction === DIRECTION_PREV\n    const activeIndex = this._getItemIndex(activeElement)\n    const lastItemIndex = this._items.length - 1\n    const isGoingToWrap = isPrevDirection && activeIndex === 0 ||\n                            isNextDirection && activeIndex === lastItemIndex\n\n    if (isGoingToWrap && !this._config.wrap) {\n      return activeElement\n    }\n\n    const delta = direction === DIRECTION_PREV ? -1 : 1\n    const itemIndex = (activeIndex + delta) % this._items.length\n\n    return itemIndex === -1 ?\n      this._items[this._items.length - 1] : this._items[itemIndex]\n  }\n\n  _triggerSlideEvent(relatedTarget, eventDirectionName) {\n    const targetIndex = this._getItemIndex(relatedTarget)\n    const fromIndex = this._getItemIndex(this._element.querySelector(SELECTOR_ACTIVE_ITEM))\n    const slideEvent = $.Event(EVENT_SLIDE, {\n      relatedTarget,\n      direction: eventDirectionName,\n      from: fromIndex,\n      to: targetIndex\n    })\n\n    $(this._element).trigger(slideEvent)\n\n    return slideEvent\n  }\n\n  _setActiveIndicatorElement(element) {\n    if (this._indicatorsElement) {\n      const indicators = [].slice.call(this._indicatorsElement.querySelectorAll(SELECTOR_ACTIVE))\n      $(indicators).removeClass(CLASS_NAME_ACTIVE)\n\n      const nextIndicator = this._indicatorsElement.children[\n        this._getItemIndex(element)\n      ]\n\n      if (nextIndicator) {\n        $(nextIndicator).addClass(CLASS_NAME_ACTIVE)\n      }\n    }\n  }\n\n  _updateInterval() {\n    const element = this._activeElement || this._element.querySelector(SELECTOR_ACTIVE_ITEM)\n\n    if (!element) {\n      return\n    }\n\n    const elementInterval = parseInt(element.getAttribute('data-interval'), 10)\n\n    if (elementInterval) {\n      this._config.defaultInterval = this._config.defaultInterval || this._config.interval\n      this._config.interval = elementInterval\n    } else {\n      this._config.interval = this._config.defaultInterval || this._config.interval\n    }\n  }\n\n  _slide(direction, element) {\n    const activeElement = this._element.querySelector(SELECTOR_ACTIVE_ITEM)\n    const activeElementIndex = this._getItemIndex(activeElement)\n    const nextElement = element || activeElement &&\n      this._getItemByDirection(direction, activeElement)\n    const nextElementIndex = this._getItemIndex(nextElement)\n    const isCycling = Boolean(this._interval)\n\n    let directionalClassName\n    let orderClassName\n    let eventDirectionName\n\n    if (direction === DIRECTION_NEXT) {\n      directionalClassName = CLASS_NAME_LEFT\n      orderClassName = CLASS_NAME_NEXT\n      eventDirectionName = DIRECTION_LEFT\n    } else {\n      directionalClassName = CLASS_NAME_RIGHT\n      orderClassName = CLASS_NAME_PREV\n      eventDirectionName = DIRECTION_RIGHT\n    }\n\n    if (nextElement && $(nextElement).hasClass(CLASS_NAME_ACTIVE)) {\n      this._isSliding = false\n      return\n    }\n\n    const slideEvent = this._triggerSlideEvent(nextElement, eventDirectionName)\n    if (slideEvent.isDefaultPrevented()) {\n      return\n    }\n\n    if (!activeElement || !nextElement) {\n      // Some weirdness is happening, so we bail\n      return\n    }\n\n    this._isSliding = true\n\n    if (isCycling) {\n      this.pause()\n    }\n\n    this._setActiveIndicatorElement(nextElement)\n    this._activeElement = nextElement\n\n    const slidEvent = $.Event(EVENT_SLID, {\n      relatedTarget: nextElement,\n      direction: eventDirectionName,\n      from: activeElementIndex,\n      to: nextElementIndex\n    })\n\n    if ($(this._element).hasClass(CLASS_NAME_SLIDE)) {\n      $(nextElement).addClass(orderClassName)\n\n      Util.reflow(nextElement)\n\n      $(activeElement).addClass(directionalClassName)\n      $(nextElement).addClass(directionalClassName)\n\n      const transitionDuration = Util.getTransitionDurationFromElement(activeElement)\n\n      $(activeElement)\n        .one(Util.TRANSITION_END, () => {\n          $(nextElement)\n            .removeClass(`${directionalClassName} ${orderClassName}`)\n            .addClass(CLASS_NAME_ACTIVE)\n\n          $(activeElement).removeClass(`${CLASS_NAME_ACTIVE} ${orderClassName} ${directionalClassName}`)\n\n          this._isSliding = false\n\n          setTimeout(() => $(this._element).trigger(slidEvent), 0)\n        })\n        .emulateTransitionEnd(transitionDuration)\n    } else {\n      $(activeElement).removeClass(CLASS_NAME_ACTIVE)\n      $(nextElement).addClass(CLASS_NAME_ACTIVE)\n\n      this._isSliding = false\n      $(this._element).trigger(slidEvent)\n    }\n\n    if (isCycling) {\n      this.cycle()\n    }\n  }\n\n  // Static\n  static _jQueryInterface(config) {\n    return this.each(function () {\n      let data = $(this).data(DATA_KEY)\n      let _config = {\n        ...Default,\n        ...$(this).data()\n      }\n\n      if (typeof config === 'object') {\n        _config = {\n          ..._config,\n          ...config\n        }\n      }\n\n      const action = typeof config === 'string' ? config : _config.slide\n\n      if (!data) {\n        data = new Carousel(this, _config)\n        $(this).data(DATA_KEY, data)\n      }\n\n      if (typeof config === 'number') {\n        data.to(config)\n      } else if (typeof action === 'string') {\n        if (typeof data[action] === 'undefined') {\n          throw new TypeError(`No method named \"${action}\"`)\n        }\n\n        data[action]()\n      } else if (_config.interval && _config.ride) {\n        data.pause()\n        data.cycle()\n      }\n    })\n  }\n\n  static _dataApiClickHandler(event) {\n    const selector = Util.getSelectorFromElement(this)\n\n    if (!selector) {\n      return\n    }\n\n    const target = $(selector)[0]\n\n    if (!target || !$(target).hasClass(CLASS_NAME_CAROUSEL)) {\n      return\n    }\n\n    const config = {\n      ...$(target).data(),\n      ...$(this).data()\n    }\n    const slideIndex = this.getAttribute('data-slide-to')\n\n    if (slideIndex) {\n      config.interval = false\n    }\n\n    Carousel._jQueryInterface.call($(target), config)\n\n    if (slideIndex) {\n      $(target).data(DATA_KEY).to(slideIndex)\n    }\n\n    event.preventDefault()\n  }\n}\n\n/**\n * Data API implementation\n */\n\n$(document).on(EVENT_CLICK_DATA_API, SELECTOR_DATA_SLIDE, Carousel._dataApiClickHandler)\n\n$(window).on(EVENT_LOAD_DATA_API, () => {\n  const carousels = [].slice.call(document.querySelectorAll(SELECTOR_DATA_RIDE))\n  for (let i = 0, len = carousels.length; i < len; i++) {\n    const $carousel = $(carousels[i])\n    Carousel._jQueryInterface.call($carousel, $carousel.data())\n  }\n})\n\n/**\n * jQuery\n */\n\n$.fn[NAME] = Carousel._jQueryInterface\n$.fn[NAME].Constructor = Carousel\n$.fn[NAME].noConflict = () => {\n  $.fn[NAME] = JQUERY_NO_CONFLICT\n  return Carousel._jQueryInterface\n}\n\nexport default Carousel\n","/**\n * --------------------------------------------------------------------------\n * Bootstrap (v4.6.2): collapse.js\n * Licensed under MIT (https://github.com/twbs/bootstrap/blob/main/LICENSE)\n * --------------------------------------------------------------------------\n */\n\nimport $ from 'jquery'\nimport Util from './util'\n\n/**\n * Constants\n */\n\nconst NAME = 'collapse'\nconst VERSION = '4.6.2'\nconst DATA_KEY = 'bs.collapse'\nconst EVENT_KEY = `.${DATA_KEY}`\nconst DATA_API_KEY = '.data-api'\nconst JQUERY_NO_CONFLICT = $.fn[NAME]\n\nconst CLASS_NAME_SHOW = 'show'\nconst CLASS_NAME_COLLAPSE = 'collapse'\nconst CLASS_NAME_COLLAPSING = 'collapsing'\nconst CLASS_NAME_COLLAPSED = 'collapsed'\n\nconst DIMENSION_WIDTH = 'width'\nconst DIMENSION_HEIGHT = 'height'\n\nconst EVENT_SHOW = `show${EVENT_KEY}`\nconst EVENT_SHOWN = `shown${EVENT_KEY}`\nconst EVENT_HIDE = `hide${EVENT_KEY}`\nconst EVENT_HIDDEN = `hidden${EVENT_KEY}`\nconst EVENT_CLICK_DATA_API = `click${EVENT_KEY}${DATA_API_KEY}`\n\nconst SELECTOR_ACTIVES = '.show, .collapsing'\nconst SELECTOR_DATA_TOGGLE = '[data-toggle=\"collapse\"]'\n\nconst Default = {\n  toggle: true,\n  parent: ''\n}\n\nconst DefaultType = {\n  toggle: 'boolean',\n  parent: '(string|element)'\n}\n\n/**\n * Class definition\n */\n\nclass Collapse {\n  constructor(element, config) {\n    this._isTransitioning = false\n    this._element = element\n    this._config = this._getConfig(config)\n    this._triggerArray = [].slice.call(document.querySelectorAll(\n      `[data-toggle=\"collapse\"][href=\"#${element.id}\"],` +\n      `[data-toggle=\"collapse\"][data-target=\"#${element.id}\"]`\n    ))\n\n    const toggleList = [].slice.call(document.querySelectorAll(SELECTOR_DATA_TOGGLE))\n    for (let i = 0, len = toggleList.length; i < len; i++) {\n      const elem = toggleList[i]\n      const selector = Util.getSelectorFromElement(elem)\n      const filterElement = [].slice.call(document.querySelectorAll(selector))\n        .filter(foundElem => foundElem === element)\n\n      if (selector !== null && filterElement.length > 0) {\n        this._selector = selector\n        this._triggerArray.push(elem)\n      }\n    }\n\n    this._parent = this._config.parent ? this._getParent() : null\n\n    if (!this._config.parent) {\n      this._addAriaAndCollapsedClass(this._element, this._triggerArray)\n    }\n\n    if (this._config.toggle) {\n      this.toggle()\n    }\n  }\n\n  // Getters\n  static get VERSION() {\n    return VERSION\n  }\n\n  static get Default() {\n    return Default\n  }\n\n  // Public\n  toggle() {\n    if ($(this._element).hasClass(CLASS_NAME_SHOW)) {\n      this.hide()\n    } else {\n      this.show()\n    }\n  }\n\n  show() {\n    if (this._isTransitioning ||\n      $(this._element).hasClass(CLASS_NAME_SHOW)) {\n      return\n    }\n\n    let actives\n    let activesData\n\n    if (this._parent) {\n      actives = [].slice.call(this._parent.querySelectorAll(SELECTOR_ACTIVES))\n        .filter(elem => {\n          if (typeof this._config.parent === 'string') {\n            return elem.getAttribute('data-parent') === this._config.parent\n          }\n\n          return elem.classList.contains(CLASS_NAME_COLLAPSE)\n        })\n\n      if (actives.length === 0) {\n        actives = null\n      }\n    }\n\n    if (actives) {\n      activesData = $(actives).not(this._selector).data(DATA_KEY)\n      if (activesData && activesData._isTransitioning) {\n        return\n      }\n    }\n\n    const startEvent = $.Event(EVENT_SHOW)\n    $(this._element).trigger(startEvent)\n    if (startEvent.isDefaultPrevented()) {\n      return\n    }\n\n    if (actives) {\n      Collapse._jQueryInterface.call($(actives).not(this._selector), 'hide')\n      if (!activesData) {\n        $(actives).data(DATA_KEY, null)\n      }\n    }\n\n    const dimension = this._getDimension()\n\n    $(this._element)\n      .removeClass(CLASS_NAME_COLLAPSE)\n      .addClass(CLASS_NAME_COLLAPSING)\n\n    this._element.style[dimension] = 0\n\n    if (this._triggerArray.length) {\n      $(this._triggerArray)\n        .removeClass(CLASS_NAME_COLLAPSED)\n        .attr('aria-expanded', true)\n    }\n\n    this.setTransitioning(true)\n\n    const complete = () => {\n      $(this._element)\n        .removeClass(CLASS_NAME_COLLAPSING)\n        .addClass(`${CLASS_NAME_COLLAPSE} ${CLASS_NAME_SHOW}`)\n\n      this._element.style[dimension] = ''\n\n      this.setTransitioning(false)\n\n      $(this._element).trigger(EVENT_SHOWN)\n    }\n\n    const capitalizedDimension = dimension[0].toUpperCase() + dimension.slice(1)\n    const scrollSize = `scroll${capitalizedDimension}`\n    const transitionDuration = Util.getTransitionDurationFromElement(this._element)\n\n    $(this._element)\n      .one(Util.TRANSITION_END, complete)\n      .emulateTransitionEnd(transitionDuration)\n\n    this._element.style[dimension] = `${this._element[scrollSize]}px`\n  }\n\n  hide() {\n    if (this._isTransitioning ||\n      !$(this._element).hasClass(CLASS_NAME_SHOW)) {\n      return\n    }\n\n    const startEvent = $.Event(EVENT_HIDE)\n    $(this._element).trigger(startEvent)\n    if (startEvent.isDefaultPrevented()) {\n      return\n    }\n\n    const dimension = this._getDimension()\n\n    this._element.style[dimension] = `${this._element.getBoundingClientRect()[dimension]}px`\n\n    Util.reflow(this._element)\n\n    $(this._element)\n      .addClass(CLASS_NAME_COLLAPSING)\n      .removeClass(`${CLASS_NAME_COLLAPSE} ${CLASS_NAME_SHOW}`)\n\n    const triggerArrayLength = this._triggerArray.length\n    if (triggerArrayLength > 0) {\n      for (let i = 0; i < triggerArrayLength; i++) {\n        const trigger = this._triggerArray[i]\n        const selector = Util.getSelectorFromElement(trigger)\n\n        if (selector !== null) {\n          const $elem = $([].slice.call(document.querySelectorAll(selector)))\n          if (!$elem.hasClass(CLASS_NAME_SHOW)) {\n            $(trigger).addClass(CLASS_NAME_COLLAPSED)\n              .attr('aria-expanded', false)\n          }\n        }\n      }\n    }\n\n    this.setTransitioning(true)\n\n    const complete = () => {\n      this.setTransitioning(false)\n      $(this._element)\n        .removeClass(CLASS_NAME_COLLAPSING)\n        .addClass(CLASS_NAME_COLLAPSE)\n        .trigger(EVENT_HIDDEN)\n    }\n\n    this._element.style[dimension] = ''\n    const transitionDuration = Util.getTransitionDurationFromElement(this._element)\n\n    $(this._element)\n      .one(Util.TRANSITION_END, complete)\n      .emulateTransitionEnd(transitionDuration)\n  }\n\n  setTransitioning(isTransitioning) {\n    this._isTransitioning = isTransitioning\n  }\n\n  dispose() {\n    $.removeData(this._element, DATA_KEY)\n\n    this._config = null\n    this._parent = null\n    this._element = null\n    this._triggerArray = null\n    this._isTransitioning = null\n  }\n\n  // Private\n  _getConfig(config) {\n    config = {\n      ...Default,\n      ...config\n    }\n    config.toggle = Boolean(config.toggle) // Coerce string values\n    Util.typeCheckConfig(NAME, config, DefaultType)\n    return config\n  }\n\n  _getDimension() {\n    const hasWidth = $(this._element).hasClass(DIMENSION_WIDTH)\n    return hasWidth ? DIMENSION_WIDTH : DIMENSION_HEIGHT\n  }\n\n  _getParent() {\n    let parent\n\n    if (Util.isElement(this._config.parent)) {\n      parent = this._config.parent\n\n      // It's a jQuery object\n      if (typeof this._config.parent.jquery !== 'undefined') {\n        parent = this._config.parent[0]\n      }\n    } else {\n      parent = document.querySelector(this._config.parent)\n    }\n\n    const selector = `[data-toggle=\"collapse\"][data-parent=\"${this._config.parent}\"]`\n    const children = [].slice.call(parent.querySelectorAll(selector))\n\n    $(children).each((i, element) => {\n      this._addAriaAndCollapsedClass(\n        Collapse._getTargetFromElement(element),\n        [element]\n      )\n    })\n\n    return parent\n  }\n\n  _addAriaAndCollapsedClass(element, triggerArray) {\n    const isOpen = $(element).hasClass(CLASS_NAME_SHOW)\n\n    if (triggerArray.length) {\n      $(triggerArray)\n        .toggleClass(CLASS_NAME_COLLAPSED, !isOpen)\n        .attr('aria-expanded', isOpen)\n    }\n  }\n\n  // Static\n  static _getTargetFromElement(element) {\n    const selector = Util.getSelectorFromElement(element)\n    return selector ? document.querySelector(selector) : null\n  }\n\n  static _jQueryInterface(config) {\n    return this.each(function () {\n      const $element = $(this)\n      let data = $element.data(DATA_KEY)\n      const _config = {\n        ...Default,\n        ...$element.data(),\n        ...(typeof config === 'object' && config ? config : {})\n      }\n\n      if (!data && _config.toggle && typeof config === 'string' && /show|hide/.test(config)) {\n        _config.toggle = false\n      }\n\n      if (!data) {\n        data = new Collapse(this, _config)\n        $element.data(DATA_KEY, data)\n      }\n\n      if (typeof config === 'string') {\n        if (typeof data[config] === 'undefined') {\n          throw new TypeError(`No method named \"${config}\"`)\n        }\n\n        data[config]()\n      }\n    })\n  }\n}\n\n/**\n * Data API implementation\n */\n\n$(document).on(EVENT_CLICK_DATA_API, SELECTOR_DATA_TOGGLE, function (event) {\n  // preventDefault only for <a> elements (which change the URL) not inside the collapsible element\n  if (event.currentTarget.tagName === 'A') {\n    event.preventDefault()\n  }\n\n  const $trigger = $(this)\n  const selector = Util.getSelectorFromElement(this)\n  const selectors = [].slice.call(document.querySelectorAll(selector))\n\n  $(selectors).each(function () {\n    const $target = $(this)\n    const data = $target.data(DATA_KEY)\n    const config = data ? 'toggle' : $trigger.data()\n    Collapse._jQueryInterface.call($target, config)\n  })\n})\n\n/**\n * jQuery\n */\n\n$.fn[NAME] = Collapse._jQueryInterface\n$.fn[NAME].Constructor = Collapse\n$.fn[NAME].noConflict = () => {\n  $.fn[NAME] = JQUERY_NO_CONFLICT\n  return Collapse._jQueryInterface\n}\n\nexport default Collapse\n","/**\n * --------------------------------------------------------------------------\n * Bootstrap (v4.6.2): dropdown.js\n * Licensed under MIT (https://github.com/twbs/bootstrap/blob/main/LICENSE)\n * --------------------------------------------------------------------------\n */\n\nimport $ from 'jquery'\nimport Popper from 'popper.js'\nimport Util from './util'\n\n/**\n * Constants\n */\n\nconst NAME = 'dropdown'\nconst VERSION = '4.6.2'\nconst DATA_KEY = 'bs.dropdown'\nconst EVENT_KEY = `.${DATA_KEY}`\nconst DATA_API_KEY = '.data-api'\nconst JQUERY_NO_CONFLICT = $.fn[NAME]\nconst ESCAPE_KEYCODE = 27 // KeyboardEvent.which value for Escape (Esc) key\nconst SPACE_KEYCODE = 32 // KeyboardEvent.which value for space key\nconst TAB_KEYCODE = 9 // KeyboardEvent.which value for tab key\nconst ARROW_UP_KEYCODE = 38 // KeyboardEvent.which value for up arrow key\nconst ARROW_DOWN_KEYCODE = 40 // KeyboardEvent.which value for down arrow key\nconst RIGHT_MOUSE_BUTTON_WHICH = 3 // MouseEvent.which value for the right button (assuming a right-handed mouse)\nconst REGEXP_KEYDOWN = new RegExp(`${ARROW_UP_KEYCODE}|${ARROW_DOWN_KEYCODE}|${ESCAPE_KEYCODE}`)\n\nconst CLASS_NAME_DISABLED = 'disabled'\nconst CLASS_NAME_SHOW = 'show'\nconst CLASS_NAME_DROPUP = 'dropup'\nconst CLASS_NAME_DROPRIGHT = 'dropright'\nconst CLASS_NAME_DROPLEFT = 'dropleft'\nconst CLASS_NAME_MENURIGHT = 'dropdown-menu-right'\nconst CLASS_NAME_POSITION_STATIC = 'position-static'\n\nconst EVENT_HIDE = `hide${EVENT_KEY}`\nconst EVENT_HIDDEN = `hidden${EVENT_KEY}`\nconst EVENT_SHOW = `show${EVENT_KEY}`\nconst EVENT_SHOWN = `shown${EVENT_KEY}`\nconst EVENT_CLICK = `click${EVENT_KEY}`\nconst EVENT_CLICK_DATA_API = `click${EVENT_KEY}${DATA_API_KEY}`\nconst EVENT_KEYDOWN_DATA_API = `keydown${EVENT_KEY}${DATA_API_KEY}`\nconst EVENT_KEYUP_DATA_API = `keyup${EVENT_KEY}${DATA_API_KEY}`\n\nconst SELECTOR_DATA_TOGGLE = '[data-toggle=\"dropdown\"]'\nconst SELECTOR_FORM_CHILD = '.dropdown form'\nconst SELECTOR_MENU = '.dropdown-menu'\nconst SELECTOR_NAVBAR_NAV = '.navbar-nav'\nconst SELECTOR_VISIBLE_ITEMS = '.dropdown-menu .dropdown-item:not(.disabled):not(:disabled)'\n\nconst PLACEMENT_TOP = 'top-start'\nconst PLACEMENT_TOPEND = 'top-end'\nconst PLACEMENT_BOTTOM = 'bottom-start'\nconst PLACEMENT_BOTTOMEND = 'bottom-end'\nconst PLACEMENT_RIGHT = 'right-start'\nconst PLACEMENT_LEFT = 'left-start'\n\nconst Default = {\n  offset: 0,\n  flip: true,\n  boundary: 'scrollParent',\n  reference: 'toggle',\n  display: 'dynamic',\n  popperConfig: null\n}\n\nconst DefaultType = {\n  offset: '(number|string|function)',\n  flip: 'boolean',\n  boundary: '(string|element)',\n  reference: '(string|element)',\n  display: 'string',\n  popperConfig: '(null|object)'\n}\n\n/**\n * Class definition\n */\n\nclass Dropdown {\n  constructor(element, config) {\n    this._element = element\n    this._popper = null\n    this._config = this._getConfig(config)\n    this._menu = this._getMenuElement()\n    this._inNavbar = this._detectNavbar()\n\n    this._addEventListeners()\n  }\n\n  // Getters\n  static get VERSION() {\n    return VERSION\n  }\n\n  static get Default() {\n    return Default\n  }\n\n  static get DefaultType() {\n    return DefaultType\n  }\n\n  // Public\n  toggle() {\n    if (this._element.disabled || $(this._element).hasClass(CLASS_NAME_DISABLED)) {\n      return\n    }\n\n    const isActive = $(this._menu).hasClass(CLASS_NAME_SHOW)\n\n    Dropdown._clearMenus()\n\n    if (isActive) {\n      return\n    }\n\n    this.show(true)\n  }\n\n  show(usePopper = false) {\n    if (this._element.disabled || $(this._element).hasClass(CLASS_NAME_DISABLED) || $(this._menu).hasClass(CLASS_NAME_SHOW)) {\n      return\n    }\n\n    const relatedTarget = {\n      relatedTarget: this._element\n    }\n    const showEvent = $.Event(EVENT_SHOW, relatedTarget)\n    const parent = Dropdown._getParentFromElement(this._element)\n\n    $(parent).trigger(showEvent)\n\n    if (showEvent.isDefaultPrevented()) {\n      return\n    }\n\n    // Totally disable Popper for Dropdowns in Navbar\n    if (!this._inNavbar && usePopper) {\n      // Check for Popper dependency\n      if (typeof Popper === 'undefined') {\n        throw new TypeError('Bootstrap\\'s dropdowns require Popper (https://popper.js.org)')\n      }\n\n      let referenceElement = this._element\n\n      if (this._config.reference === 'parent') {\n        referenceElement = parent\n      } else if (Util.isElement(this._config.reference)) {\n        referenceElement = this._config.reference\n\n        // Check if it's jQuery element\n        if (typeof this._config.reference.jquery !== 'undefined') {\n          referenceElement = this._config.reference[0]\n        }\n      }\n\n      // If boundary is not `scrollParent`, then set position to `static`\n      // to allow the menu to \"escape\" the scroll parent's boundaries\n      // https://github.com/twbs/bootstrap/issues/24251\n      if (this._config.boundary !== 'scrollParent') {\n        $(parent).addClass(CLASS_NAME_POSITION_STATIC)\n      }\n\n      this._popper = new Popper(referenceElement, this._menu, this._getPopperConfig())\n    }\n\n    // If this is a touch-enabled device we add extra\n    // empty mouseover listeners to the body's immediate children;\n    // only needed because of broken event delegation on iOS\n    // https://www.quirksmode.org/blog/archives/2014/02/mouse_event_bub.html\n    if ('ontouchstart' in document.documentElement &&\n        $(parent).closest(SELECTOR_NAVBAR_NAV).length === 0) {\n      $(document.body).children().on('mouseover', null, $.noop)\n    }\n\n    this._element.focus()\n    this._element.setAttribute('aria-expanded', true)\n\n    $(this._menu).toggleClass(CLASS_NAME_SHOW)\n    $(parent)\n      .toggleClass(CLASS_NAME_SHOW)\n      .trigger($.Event(EVENT_SHOWN, relatedTarget))\n  }\n\n  hide() {\n    if (this._element.disabled || $(this._element).hasClass(CLASS_NAME_DISABLED) || !$(this._menu).hasClass(CLASS_NAME_SHOW)) {\n      return\n    }\n\n    const relatedTarget = {\n      relatedTarget: this._element\n    }\n    const hideEvent = $.Event(EVENT_HIDE, relatedTarget)\n    const parent = Dropdown._getParentFromElement(this._element)\n\n    $(parent).trigger(hideEvent)\n\n    if (hideEvent.isDefaultPrevented()) {\n      return\n    }\n\n    if (this._popper) {\n      this._popper.destroy()\n    }\n\n    $(this._menu).toggleClass(CLASS_NAME_SHOW)\n    $(parent)\n      .toggleClass(CLASS_NAME_SHOW)\n      .trigger($.Event(EVENT_HIDDEN, relatedTarget))\n  }\n\n  dispose() {\n    $.removeData(this._element, DATA_KEY)\n    $(this._element).off(EVENT_KEY)\n    this._element = null\n    this._menu = null\n    if (this._popper !== null) {\n      this._popper.destroy()\n      this._popper = null\n    }\n  }\n\n  update() {\n    this._inNavbar = this._detectNavbar()\n    if (this._popper !== null) {\n      this._popper.scheduleUpdate()\n    }\n  }\n\n  // Private\n  _addEventListeners() {\n    $(this._element).on(EVENT_CLICK, event => {\n      event.preventDefault()\n      event.stopPropagation()\n      this.toggle()\n    })\n  }\n\n  _getConfig(config) {\n    config = {\n      ...this.constructor.Default,\n      ...$(this._element).data(),\n      ...config\n    }\n\n    Util.typeCheckConfig(\n      NAME,\n      config,\n      this.constructor.DefaultType\n    )\n\n    return config\n  }\n\n  _getMenuElement() {\n    if (!this._menu) {\n      const parent = Dropdown._getParentFromElement(this._element)\n\n      if (parent) {\n        this._menu = parent.querySelector(SELECTOR_MENU)\n      }\n    }\n\n    return this._menu\n  }\n\n  _getPlacement() {\n    const $parentDropdown = $(this._element.parentNode)\n    let placement = PLACEMENT_BOTTOM\n\n    // Handle dropup\n    if ($parentDropdown.hasClass(CLASS_NAME_DROPUP)) {\n      placement = $(this._menu).hasClass(CLASS_NAME_MENURIGHT) ?\n        PLACEMENT_TOPEND :\n        PLACEMENT_TOP\n    } else if ($parentDropdown.hasClass(CLASS_NAME_DROPRIGHT)) {\n      placement = PLACEMENT_RIGHT\n    } else if ($parentDropdown.hasClass(CLASS_NAME_DROPLEFT)) {\n      placement = PLACEMENT_LEFT\n    } else if ($(this._menu).hasClass(CLASS_NAME_MENURIGHT)) {\n      placement = PLACEMENT_BOTTOMEND\n    }\n\n    return placement\n  }\n\n  _detectNavbar() {\n    return $(this._element).closest('.navbar').length > 0\n  }\n\n  _getOffset() {\n    const offset = {}\n\n    if (typeof this._config.offset === 'function') {\n      offset.fn = data => {\n        data.offsets = {\n          ...data.offsets,\n          ...this._config.offset(data.offsets, this._element)\n        }\n\n        return data\n      }\n    } else {\n      offset.offset = this._config.offset\n    }\n\n    return offset\n  }\n\n  _getPopperConfig() {\n    const popperConfig = {\n      placement: this._getPlacement(),\n      modifiers: {\n        offset: this._getOffset(),\n        flip: {\n          enabled: this._config.flip\n        },\n        preventOverflow: {\n          boundariesElement: this._config.boundary\n        }\n      }\n    }\n\n    // Disable Popper if we have a static display\n    if (this._config.display === 'static') {\n      popperConfig.modifiers.applyStyle = {\n        enabled: false\n      }\n    }\n\n    return {\n      ...popperConfig,\n      ...this._config.popperConfig\n    }\n  }\n\n  // Static\n  static _jQueryInterface(config) {\n    return this.each(function () {\n      let data = $(this).data(DATA_KEY)\n      const _config = typeof config === 'object' ? config : null\n\n      if (!data) {\n        data = new Dropdown(this, _config)\n        $(this).data(DATA_KEY, data)\n      }\n\n      if (typeof config === 'string') {\n        if (typeof data[config] === 'undefined') {\n          throw new TypeError(`No method named \"${config}\"`)\n        }\n\n        data[config]()\n      }\n    })\n  }\n\n  static _clearMenus(event) {\n    if (event && (event.which === RIGHT_MOUSE_BUTTON_WHICH ||\n      event.type === 'keyup' && event.which !== TAB_KEYCODE)) {\n      return\n    }\n\n    const toggles = [].slice.call(document.querySelectorAll(SELECTOR_DATA_TOGGLE))\n\n    for (let i = 0, len = toggles.length; i < len; i++) {\n      const parent = Dropdown._getParentFromElement(toggles[i])\n      const context = $(toggles[i]).data(DATA_KEY)\n      const relatedTarget = {\n        relatedTarget: toggles[i]\n      }\n\n      if (event && event.type === 'click') {\n        relatedTarget.clickEvent = event\n      }\n\n      if (!context) {\n        continue\n      }\n\n      const dropdownMenu = context._menu\n      if (!$(parent).hasClass(CLASS_NAME_SHOW)) {\n        continue\n      }\n\n      if (event && (event.type === 'click' &&\n          /input|textarea/i.test(event.target.tagName) || event.type === 'keyup' && event.which === TAB_KEYCODE) &&\n          $.contains(parent, event.target)) {\n        continue\n      }\n\n      const hideEvent = $.Event(EVENT_HIDE, relatedTarget)\n      $(parent).trigger(hideEvent)\n      if (hideEvent.isDefaultPrevented()) {\n        continue\n      }\n\n      // If this is a touch-enabled device we remove the extra\n      // empty mouseover listeners we added for iOS support\n      if ('ontouchstart' in document.documentElement) {\n        $(document.body).children().off('mouseover', null, $.noop)\n      }\n\n      toggles[i].setAttribute('aria-expanded', 'false')\n\n      if (context._popper) {\n        context._popper.destroy()\n      }\n\n      $(dropdownMenu).removeClass(CLASS_NAME_SHOW)\n      $(parent)\n        .removeClass(CLASS_NAME_SHOW)\n        .trigger($.Event(EVENT_HIDDEN, relatedTarget))\n    }\n  }\n\n  static _getParentFromElement(element) {\n    let parent\n    const selector = Util.getSelectorFromElement(element)\n\n    if (selector) {\n      parent = document.querySelector(selector)\n    }\n\n    return parent || element.parentNode\n  }\n\n  // eslint-disable-next-line complexity\n  static _dataApiKeydownHandler(event) {\n    // If not input/textarea:\n    //  - And not a key in REGEXP_KEYDOWN => not a dropdown command\n    // If input/textarea:\n    //  - If space key => not a dropdown command\n    //  - If key is other than escape\n    //    - If key is not up or down => not a dropdown command\n    //    - If trigger inside the menu => not a dropdown command\n    if (/input|textarea/i.test(event.target.tagName) ?\n      event.which === SPACE_KEYCODE || event.which !== ESCAPE_KEYCODE &&\n      (event.which !== ARROW_DOWN_KEYCODE && event.which !== ARROW_UP_KEYCODE ||\n        $(event.target).closest(SELECTOR_MENU).length) : !REGEXP_KEYDOWN.test(event.which)) {\n      return\n    }\n\n    if (this.disabled || $(this).hasClass(CLASS_NAME_DISABLED)) {\n      return\n    }\n\n    const parent = Dropdown._getParentFromElement(this)\n    const isActive = $(parent).hasClass(CLASS_NAME_SHOW)\n\n    if (!isActive && event.which === ESCAPE_KEYCODE) {\n      return\n    }\n\n    event.preventDefault()\n    event.stopPropagation()\n\n    if (!isActive || (event.which === ESCAPE_KEYCODE || event.which === SPACE_KEYCODE)) {\n      if (event.which === ESCAPE_KEYCODE) {\n        $(parent.querySelector(SELECTOR_DATA_TOGGLE)).trigger('focus')\n      }\n\n      $(this).trigger('click')\n      return\n    }\n\n    const items = [].slice.call(parent.querySelectorAll(SELECTOR_VISIBLE_ITEMS))\n      .filter(item => $(item).is(':visible'))\n\n    if (items.length === 0) {\n      return\n    }\n\n    let index = items.indexOf(event.target)\n\n    if (event.which === ARROW_UP_KEYCODE && index > 0) { // Up\n      index--\n    }\n\n    if (event.which === ARROW_DOWN_KEYCODE && index < items.length - 1) { // Down\n      index++\n    }\n\n    if (index < 0) {\n      index = 0\n    }\n\n    items[index].focus()\n  }\n}\n\n/**\n * Data API implementation\n */\n\n$(document)\n  .on(EVENT_KEYDOWN_DATA_API, SELECTOR_DATA_TOGGLE, Dropdown._dataApiKeydownHandler)\n  .on(EVENT_KEYDOWN_DATA_API, SELECTOR_MENU, Dropdown._dataApiKeydownHandler)\n  .on(`${EVENT_CLICK_DATA_API} ${EVENT_KEYUP_DATA_API}`, Dropdown._clearMenus)\n  .on(EVENT_CLICK_DATA_API, SELECTOR_DATA_TOGGLE, function (event) {\n    event.preventDefault()\n    event.stopPropagation()\n    Dropdown._jQueryInterface.call($(this), 'toggle')\n  })\n  .on(EVENT_CLICK_DATA_API, SELECTOR_FORM_CHILD, e => {\n    e.stopPropagation()\n  })\n\n/**\n * jQuery\n */\n\n$.fn[NAME] = Dropdown._jQueryInterface\n$.fn[NAME].Constructor = Dropdown\n$.fn[NAME].noConflict = () => {\n  $.fn[NAME] = JQUERY_NO_CONFLICT\n  return Dropdown._jQueryInterface\n}\n\nexport default Dropdown\n","/**\n * --------------------------------------------------------------------------\n * Bootstrap (v4.6.2): modal.js\n * Licensed under MIT (https://github.com/twbs/bootstrap/blob/main/LICENSE)\n * --------------------------------------------------------------------------\n */\n\nimport $ from 'jquery'\nimport Util from './util'\n\n/**\n * Constants\n */\n\nconst NAME = 'modal'\nconst VERSION = '4.6.2'\nconst DATA_KEY = 'bs.modal'\nconst EVENT_KEY = `.${DATA_KEY}`\nconst DATA_API_KEY = '.data-api'\nconst JQUERY_NO_CONFLICT = $.fn[NAME]\nconst ESCAPE_KEYCODE = 27 // KeyboardEvent.which value for Escape (Esc) key\n\nconst CLASS_NAME_SCROLLABLE = 'modal-dialog-scrollable'\nconst CLASS_NAME_SCROLLBAR_MEASURER = 'modal-scrollbar-measure'\nconst CLASS_NAME_BACKDROP = 'modal-backdrop'\nconst CLASS_NAME_OPEN = 'modal-open'\nconst CLASS_NAME_FADE = 'fade'\nconst CLASS_NAME_SHOW = 'show'\nconst CLASS_NAME_STATIC = 'modal-static'\n\nconst EVENT_HIDE = `hide${EVENT_KEY}`\nconst EVENT_HIDE_PREVENTED = `hidePrevented${EVENT_KEY}`\nconst EVENT_HIDDEN = `hidden${EVENT_KEY}`\nconst EVENT_SHOW = `show${EVENT_KEY}`\nconst EVENT_SHOWN = `shown${EVENT_KEY}`\nconst EVENT_FOCUSIN = `focusin${EVENT_KEY}`\nconst EVENT_RESIZE = `resize${EVENT_KEY}`\nconst EVENT_CLICK_DISMISS = `click.dismiss${EVENT_KEY}`\nconst EVENT_KEYDOWN_DISMISS = `keydown.dismiss${EVENT_KEY}`\nconst EVENT_MOUSEUP_DISMISS = `mouseup.dismiss${EVENT_KEY}`\nconst EVENT_MOUSEDOWN_DISMISS = `mousedown.dismiss${EVENT_KEY}`\nconst EVENT_CLICK_DATA_API = `click${EVENT_KEY}${DATA_API_KEY}`\n\nconst SELECTOR_DIALOG = '.modal-dialog'\nconst SELECTOR_MODAL_BODY = '.modal-body'\nconst SELECTOR_DATA_TOGGLE = '[data-toggle=\"modal\"]'\nconst SELECTOR_DATA_DISMISS = '[data-dismiss=\"modal\"]'\nconst SELECTOR_FIXED_CONTENT = '.fixed-top, .fixed-bottom, .is-fixed, .sticky-top'\nconst SELECTOR_STICKY_CONTENT = '.sticky-top'\n\nconst Default = {\n  backdrop: true,\n  keyboard: true,\n  focus: true,\n  show: true\n}\n\nconst DefaultType = {\n  backdrop: '(boolean|string)',\n  keyboard: 'boolean',\n  focus: 'boolean',\n  show: 'boolean'\n}\n\n/**\n * Class definition\n */\n\nclass Modal {\n  constructor(element, config) {\n    this._config = this._getConfig(config)\n    this._element = element\n    this._dialog = element.querySelector(SELECTOR_DIALOG)\n    this._backdrop = null\n    this._isShown = false\n    this._isBodyOverflowing = false\n    this._ignoreBackdropClick = false\n    this._isTransitioning = false\n    this._scrollbarWidth = 0\n  }\n\n  // Getters\n  static get VERSION() {\n    return VERSION\n  }\n\n  static get Default() {\n    return Default\n  }\n\n  // Public\n  toggle(relatedTarget) {\n    return this._isShown ? this.hide() : this.show(relatedTarget)\n  }\n\n  show(relatedTarget) {\n    if (this._isShown || this._isTransitioning) {\n      return\n    }\n\n    const showEvent = $.Event(EVENT_SHOW, {\n      relatedTarget\n    })\n\n    $(this._element).trigger(showEvent)\n\n    if (showEvent.isDefaultPrevented()) {\n      return\n    }\n\n    this._isShown = true\n\n    if ($(this._element).hasClass(CLASS_NAME_FADE)) {\n      this._isTransitioning = true\n    }\n\n    this._checkScrollbar()\n    this._setScrollbar()\n\n    this._adjustDialog()\n\n    this._setEscapeEvent()\n    this._setResizeEvent()\n\n    $(this._element).on(\n      EVENT_CLICK_DISMISS,\n      SELECTOR_DATA_DISMISS,\n      event => this.hide(event)\n    )\n\n    $(this._dialog).on(EVENT_MOUSEDOWN_DISMISS, () => {\n      $(this._element).one(EVENT_MOUSEUP_DISMISS, event => {\n        if ($(event.target).is(this._element)) {\n          this._ignoreBackdropClick = true\n        }\n      })\n    })\n\n    this._showBackdrop(() => this._showElement(relatedTarget))\n  }\n\n  hide(event) {\n    if (event) {\n      event.preventDefault()\n    }\n\n    if (!this._isShown || this._isTransitioning) {\n      return\n    }\n\n    const hideEvent = $.Event(EVENT_HIDE)\n\n    $(this._element).trigger(hideEvent)\n\n    if (!this._isShown || hideEvent.isDefaultPrevented()) {\n      return\n    }\n\n    this._isShown = false\n    const transition = $(this._element).hasClass(CLASS_NAME_FADE)\n\n    if (transition) {\n      this._isTransitioning = true\n    }\n\n    this._setEscapeEvent()\n    this._setResizeEvent()\n\n    $(document).off(EVENT_FOCUSIN)\n\n    $(this._element).removeClass(CLASS_NAME_SHOW)\n\n    $(this._element).off(EVENT_CLICK_DISMISS)\n    $(this._dialog).off(EVENT_MOUSEDOWN_DISMISS)\n\n    if (transition) {\n      const transitionDuration = Util.getTransitionDurationFromElement(this._element)\n\n      $(this._element)\n        .one(Util.TRANSITION_END, event => this._hideModal(event))\n        .emulateTransitionEnd(transitionDuration)\n    } else {\n      this._hideModal()\n    }\n  }\n\n  dispose() {\n    [window, this._element, this._dialog]\n      .forEach(htmlElement => $(htmlElement).off(EVENT_KEY))\n\n    /**\n     * `document` has 2 events `EVENT_FOCUSIN` and `EVENT_CLICK_DATA_API`\n     * Do not move `document` in `htmlElements` array\n     * It will remove `EVENT_CLICK_DATA_API` event that should remain\n     */\n    $(document).off(EVENT_FOCUSIN)\n\n    $.removeData(this._element, DATA_KEY)\n\n    this._config = null\n    this._element = null\n    this._dialog = null\n    this._backdrop = null\n    this._isShown = null\n    this._isBodyOverflowing = null\n    this._ignoreBackdropClick = null\n    this._isTransitioning = null\n    this._scrollbarWidth = null\n  }\n\n  handleUpdate() {\n    this._adjustDialog()\n  }\n\n  // Private\n  _getConfig(config) {\n    config = {\n      ...Default,\n      ...config\n    }\n    Util.typeCheckConfig(NAME, config, DefaultType)\n    return config\n  }\n\n  _triggerBackdropTransition() {\n    const hideEventPrevented = $.Event(EVENT_HIDE_PREVENTED)\n\n    $(this._element).trigger(hideEventPrevented)\n    if (hideEventPrevented.isDefaultPrevented()) {\n      return\n    }\n\n    const isModalOverflowing = this._element.scrollHeight > document.documentElement.clientHeight\n\n    if (!isModalOverflowing) {\n      this._element.style.overflowY = 'hidden'\n    }\n\n    this._element.classList.add(CLASS_NAME_STATIC)\n\n    const modalTransitionDuration = Util.getTransitionDurationFromElement(this._dialog)\n    $(this._element).off(Util.TRANSITION_END)\n\n    $(this._element).one(Util.TRANSITION_END, () => {\n      this._element.classList.remove(CLASS_NAME_STATIC)\n      if (!isModalOverflowing) {\n        $(this._element).one(Util.TRANSITION_END, () => {\n          this._element.style.overflowY = ''\n        })\n          .emulateTransitionEnd(this._element, modalTransitionDuration)\n      }\n    })\n      .emulateTransitionEnd(modalTransitionDuration)\n    this._element.focus()\n  }\n\n  _showElement(relatedTarget) {\n    const transition = $(this._element).hasClass(CLASS_NAME_FADE)\n    const modalBody = this._dialog ? this._dialog.querySelector(SELECTOR_MODAL_BODY) : null\n\n    if (!this._element.parentNode ||\n        this._element.parentNode.nodeType !== Node.ELEMENT_NODE) {\n      // Don't move modal's DOM position\n      document.body.appendChild(this._element)\n    }\n\n    this._element.style.display = 'block'\n    this._element.removeAttribute('aria-hidden')\n    this._element.setAttribute('aria-modal', true)\n    this._element.setAttribute('role', 'dialog')\n\n    if ($(this._dialog).hasClass(CLASS_NAME_SCROLLABLE) && modalBody) {\n      modalBody.scrollTop = 0\n    } else {\n      this._element.scrollTop = 0\n    }\n\n    if (transition) {\n      Util.reflow(this._element)\n    }\n\n    $(this._element).addClass(CLASS_NAME_SHOW)\n\n    if (this._config.focus) {\n      this._enforceFocus()\n    }\n\n    const shownEvent = $.Event(EVENT_SHOWN, {\n      relatedTarget\n    })\n\n    const transitionComplete = () => {\n      if (this._config.focus) {\n        this._element.focus()\n      }\n\n      this._isTransitioning = false\n      $(this._element).trigger(shownEvent)\n    }\n\n    if (transition) {\n      const transitionDuration = Util.getTransitionDurationFromElement(this._dialog)\n\n      $(this._dialog)\n        .one(Util.TRANSITION_END, transitionComplete)\n        .emulateTransitionEnd(transitionDuration)\n    } else {\n      transitionComplete()\n    }\n  }\n\n  _enforceFocus() {\n    $(document)\n      .off(EVENT_FOCUSIN) // Guard against infinite focus loop\n      .on(EVENT_FOCUSIN, event => {\n        if (document !== event.target &&\n            this._element !== event.target &&\n            $(this._element).has(event.target).length === 0) {\n          this._element.focus()\n        }\n      })\n  }\n\n  _setEscapeEvent() {\n    if (this._isShown) {\n      $(this._element).on(EVENT_KEYDOWN_DISMISS, event => {\n        if (this._config.keyboard && event.which === ESCAPE_KEYCODE) {\n          event.preventDefault()\n          this.hide()\n        } else if (!this._config.keyboard && event.which === ESCAPE_KEYCODE) {\n          this._triggerBackdropTransition()\n        }\n      })\n    } else if (!this._isShown) {\n      $(this._element).off(EVENT_KEYDOWN_DISMISS)\n    }\n  }\n\n  _setResizeEvent() {\n    if (this._isShown) {\n      $(window).on(EVENT_RESIZE, event => this.handleUpdate(event))\n    } else {\n      $(window).off(EVENT_RESIZE)\n    }\n  }\n\n  _hideModal() {\n    this._element.style.display = 'none'\n    this._element.setAttribute('aria-hidden', true)\n    this._element.removeAttribute('aria-modal')\n    this._element.removeAttribute('role')\n    this._isTransitioning = false\n    this._showBackdrop(() => {\n      $(document.body).removeClass(CLASS_NAME_OPEN)\n      this._resetAdjustments()\n      this._resetScrollbar()\n      $(this._element).trigger(EVENT_HIDDEN)\n    })\n  }\n\n  _removeBackdrop() {\n    if (this._backdrop) {\n      $(this._backdrop).remove()\n      this._backdrop = null\n    }\n  }\n\n  _showBackdrop(callback) {\n    const animate = $(this._element).hasClass(CLASS_NAME_FADE) ?\n      CLASS_NAME_FADE : ''\n\n    if (this._isShown && this._config.backdrop) {\n      this._backdrop = document.createElement('div')\n      this._backdrop.className = CLASS_NAME_BACKDROP\n\n      if (animate) {\n        this._backdrop.classList.add(animate)\n      }\n\n      $(this._backdrop).appendTo(document.body)\n\n      $(this._element).on(EVENT_CLICK_DISMISS, event => {\n        if (this._ignoreBackdropClick) {\n          this._ignoreBackdropClick = false\n          return\n        }\n\n        if (event.target !== event.currentTarget) {\n          return\n        }\n\n        if (this._config.backdrop === 'static') {\n          this._triggerBackdropTransition()\n        } else {\n          this.hide()\n        }\n      })\n\n      if (animate) {\n        Util.reflow(this._backdrop)\n      }\n\n      $(this._backdrop).addClass(CLASS_NAME_SHOW)\n\n      if (!callback) {\n        return\n      }\n\n      if (!animate) {\n        callback()\n        return\n      }\n\n      const backdropTransitionDuration = Util.getTransitionDurationFromElement(this._backdrop)\n\n      $(this._backdrop)\n        .one(Util.TRANSITION_END, callback)\n        .emulateTransitionEnd(backdropTransitionDuration)\n    } else if (!this._isShown && this._backdrop) {\n      $(this._backdrop).removeClass(CLASS_NAME_SHOW)\n\n      const callbackRemove = () => {\n        this._removeBackdrop()\n        if (callback) {\n          callback()\n        }\n      }\n\n      if ($(this._element).hasClass(CLASS_NAME_FADE)) {\n        const backdropTransitionDuration = Util.getTransitionDurationFromElement(this._backdrop)\n\n        $(this._backdrop)\n          .one(Util.TRANSITION_END, callbackRemove)\n          .emulateTransitionEnd(backdropTransitionDuration)\n      } else {\n        callbackRemove()\n      }\n    } else if (callback) {\n      callback()\n    }\n  }\n\n  // ----------------------------------------------------------------------\n  // the following methods are used to handle overflowing modals\n  // todo (fat): these should probably be refactored out of modal.js\n  // ----------------------------------------------------------------------\n\n  _adjustDialog() {\n    const isModalOverflowing = this._element.scrollHeight > document.documentElement.clientHeight\n\n    if (!this._isBodyOverflowing && isModalOverflowing) {\n      this._element.style.paddingLeft = `${this._scrollbarWidth}px`\n    }\n\n    if (this._isBodyOverflowing && !isModalOverflowing) {\n      this._element.style.paddingRight = `${this._scrollbarWidth}px`\n    }\n  }\n\n  _resetAdjustments() {\n    this._element.style.paddingLeft = ''\n    this._element.style.paddingRight = ''\n  }\n\n  _checkScrollbar() {\n    const rect = document.body.getBoundingClientRect()\n    this._isBodyOverflowing = Math.round(rect.left + rect.right) < window.innerWidth\n    this._scrollbarWidth = this._getScrollbarWidth()\n  }\n\n  _setScrollbar() {\n    if (this._isBodyOverflowing) {\n      // Note: DOMNode.style.paddingRight returns the actual value or '' if not set\n      //   while $(DOMNode).css('padding-right') returns the calculated value or 0 if not set\n      const fixedContent = [].slice.call(document.querySelectorAll(SELECTOR_FIXED_CONTENT))\n      const stickyContent = [].slice.call(document.querySelectorAll(SELECTOR_STICKY_CONTENT))\n\n      // Adjust fixed content padding\n      $(fixedContent).each((index, element) => {\n        const actualPadding = element.style.paddingRight\n        const calculatedPadding = $(element).css('padding-right')\n        $(element)\n          .data('padding-right', actualPadding)\n          .css('padding-right', `${parseFloat(calculatedPadding) + this._scrollbarWidth}px`)\n      })\n\n      // Adjust sticky content margin\n      $(stickyContent).each((index, element) => {\n        const actualMargin = element.style.marginRight\n        const calculatedMargin = $(element).css('margin-right')\n        $(element)\n          .data('margin-right', actualMargin)\n          .css('margin-right', `${parseFloat(calculatedMargin) - this._scrollbarWidth}px`)\n      })\n\n      // Adjust body padding\n      const actualPadding = document.body.style.paddingRight\n      const calculatedPadding = $(document.body).css('padding-right')\n      $(document.body)\n        .data('padding-right', actualPadding)\n        .css('padding-right', `${parseFloat(calculatedPadding) + this._scrollbarWidth}px`)\n    }\n\n    $(document.body).addClass(CLASS_NAME_OPEN)\n  }\n\n  _resetScrollbar() {\n    // Restore fixed content padding\n    const fixedContent = [].slice.call(document.querySelectorAll(SELECTOR_FIXED_CONTENT))\n    $(fixedContent).each((index, element) => {\n      const padding = $(element).data('padding-right')\n      $(element).removeData('padding-right')\n      element.style.paddingRight = padding ? padding : ''\n    })\n\n    // Restore sticky content\n    const elements = [].slice.call(document.querySelectorAll(`${SELECTOR_STICKY_CONTENT}`))\n    $(elements).each((index, element) => {\n      const margin = $(element).data('margin-right')\n      if (typeof margin !== 'undefined') {\n        $(element).css('margin-right', margin).removeData('margin-right')\n      }\n    })\n\n    // Restore body padding\n    const padding = $(document.body).data('padding-right')\n    $(document.body).removeData('padding-right')\n    document.body.style.paddingRight = padding ? padding : ''\n  }\n\n  _getScrollbarWidth() { // thx d.walsh\n    const scrollDiv = document.createElement('div')\n    scrollDiv.className = CLASS_NAME_SCROLLBAR_MEASURER\n    document.body.appendChild(scrollDiv)\n    const scrollbarWidth = scrollDiv.getBoundingClientRect().width - scrollDiv.clientWidth\n    document.body.removeChild(scrollDiv)\n    return scrollbarWidth\n  }\n\n  // Static\n  static _jQueryInterface(config, relatedTarget) {\n    return this.each(function () {\n      let data = $(this).data(DATA_KEY)\n      const _config = {\n        ...Default,\n        ...$(this).data(),\n        ...(typeof config === 'object' && config ? config : {})\n      }\n\n      if (!data) {\n        data = new Modal(this, _config)\n        $(this).data(DATA_KEY, data)\n      }\n\n      if (typeof config === 'string') {\n        if (typeof data[config] === 'undefined') {\n          throw new TypeError(`No method named \"${config}\"`)\n        }\n\n        data[config](relatedTarget)\n      } else if (_config.show) {\n        data.show(relatedTarget)\n      }\n    })\n  }\n}\n\n/**\n * Data API implementation\n */\n\n$(document).on(EVENT_CLICK_DATA_API, SELECTOR_DATA_TOGGLE, function (event) {\n  let target\n  const selector = Util.getSelectorFromElement(this)\n\n  if (selector) {\n    target = document.querySelector(selector)\n  }\n\n  const config = $(target).data(DATA_KEY) ?\n    'toggle' : {\n      ...$(target).data(),\n      ...$(this).data()\n    }\n\n  if (this.tagName === 'A' || this.tagName === 'AREA') {\n    event.preventDefault()\n  }\n\n  const $target = $(target).one(EVENT_SHOW, showEvent => {\n    if (showEvent.isDefaultPrevented()) {\n      // Only register focus restorer if modal will actually get shown\n      return\n    }\n\n    $target.one(EVENT_HIDDEN, () => {\n      if ($(this).is(':visible')) {\n        this.focus()\n      }\n    })\n  })\n\n  Modal._jQueryInterface.call($(target), config, this)\n})\n\n/**\n * jQuery\n */\n\n$.fn[NAME] = Modal._jQueryInterface\n$.fn[NAME].Constructor = Modal\n$.fn[NAME].noConflict = () => {\n  $.fn[NAME] = JQUERY_NO_CONFLICT\n  return Modal._jQueryInterface\n}\n\nexport default Modal\n","/**\n * --------------------------------------------------------------------------\n * Bootstrap (v4.6.2): tools/sanitizer.js\n * Licensed under MIT (https://github.com/twbs/bootstrap/blob/main/LICENSE)\n * --------------------------------------------------------------------------\n */\n\nconst uriAttrs = [\n  'background',\n  'cite',\n  'href',\n  'itemtype',\n  'longdesc',\n  'poster',\n  'src',\n  'xlink:href'\n]\n\nconst ARIA_ATTRIBUTE_PATTERN = /^aria-[\\w-]*$/i\n\nexport const DefaultWhitelist = {\n  // Global attributes allowed on any supplied element below.\n  '*': ['class', 'dir', 'id', 'lang', 'role', ARIA_ATTRIBUTE_PATTERN],\n  a: ['target', 'href', 'title', 'rel'],\n  area: [],\n  b: [],\n  br: [],\n  col: [],\n  code: [],\n  div: [],\n  em: [],\n  hr: [],\n  h1: [],\n  h2: [],\n  h3: [],\n  h4: [],\n  h5: [],\n  h6: [],\n  i: [],\n  img: ['src', 'srcset', 'alt', 'title', 'width', 'height'],\n  li: [],\n  ol: [],\n  p: [],\n  pre: [],\n  s: [],\n  small: [],\n  span: [],\n  sub: [],\n  sup: [],\n  strong: [],\n  u: [],\n  ul: []\n}\n\n/**\n * A pattern that recognizes a commonly useful subset of URLs that are safe.\n *\n * Shoutout to Angular https://github.com/angular/angular/blob/12.2.x/packages/core/src/sanitization/url_sanitizer.ts\n */\nconst SAFE_URL_PATTERN = /^(?:(?:https?|mailto|ftp|tel|file|sms):|[^#&/:?]*(?:[#/?]|$))/i\n\n/**\n * A pattern that matches safe data URLs. Only matches image, video and audio types.\n *\n * Shoutout to Angular https://github.com/angular/angular/blob/12.2.x/packages/core/src/sanitization/url_sanitizer.ts\n */\nconst DATA_URL_PATTERN = /^data:(?:image\\/(?:bmp|gif|jpeg|jpg|png|tiff|webp)|video\\/(?:mpeg|mp4|ogg|webm)|audio\\/(?:mp3|oga|ogg|opus));base64,[\\d+/a-z]+=*$/i\n\nfunction allowedAttribute(attr, allowedAttributeList) {\n  const attrName = attr.nodeName.toLowerCase()\n\n  if (allowedAttributeList.indexOf(attrName) !== -1) {\n    if (uriAttrs.indexOf(attrName) !== -1) {\n      return Boolean(SAFE_URL_PATTERN.test(attr.nodeValue) || DATA_URL_PATTERN.test(attr.nodeValue))\n    }\n\n    return true\n  }\n\n  const regExp = allowedAttributeList.filter(attrRegex => attrRegex instanceof RegExp)\n\n  // Check if a regular expression validates the attribute.\n  for (let i = 0, len = regExp.length; i < len; i++) {\n    if (regExp[i].test(attrName)) {\n      return true\n    }\n  }\n\n  return false\n}\n\nexport function sanitizeHtml(unsafeHtml, whiteList, sanitizeFn) {\n  if (unsafeHtml.length === 0) {\n    return unsafeHtml\n  }\n\n  if (sanitizeFn && typeof sanitizeFn === 'function') {\n    return sanitizeFn(unsafeHtml)\n  }\n\n  const domParser = new window.DOMParser()\n  const createdDocument = domParser.parseFromString(unsafeHtml, 'text/html')\n  const whitelistKeys = Object.keys(whiteList)\n  const elements = [].slice.call(createdDocument.body.querySelectorAll('*'))\n\n  for (let i = 0, len = elements.length; i < len; i++) {\n    const el = elements[i]\n    const elName = el.nodeName.toLowerCase()\n\n    if (whitelistKeys.indexOf(el.nodeName.toLowerCase()) === -1) {\n      el.parentNode.removeChild(el)\n\n      continue\n    }\n\n    const attributeList = [].slice.call(el.attributes)\n    // eslint-disable-next-line unicorn/prefer-spread\n    const whitelistedAttributes = [].concat(whiteList['*'] || [], whiteList[elName] || [])\n\n    attributeList.forEach(attr => {\n      if (!allowedAttribute(attr, whitelistedAttributes)) {\n        el.removeAttribute(attr.nodeName)\n      }\n    })\n  }\n\n  return createdDocument.body.innerHTML\n}\n","/**\n * --------------------------------------------------------------------------\n * Bootstrap (v4.6.2): tooltip.js\n * Licensed under MIT (https://github.com/twbs/bootstrap/blob/main/LICENSE)\n * --------------------------------------------------------------------------\n */\n\nimport { DefaultWhitelist, sanitizeHtml } from './tools/sanitizer'\nimport $ from 'jquery'\nimport Popper from 'popper.js'\nimport Util from './util'\n\n/**\n * Constants\n */\n\nconst NAME = 'tooltip'\nconst VERSION = '4.6.2'\nconst DATA_KEY = 'bs.tooltip'\nconst EVENT_KEY = `.${DATA_KEY}`\nconst JQUERY_NO_CONFLICT = $.fn[NAME]\nconst CLASS_PREFIX = 'bs-tooltip'\nconst BSCLS_PREFIX_REGEX = new RegExp(`(^|\\\\s)${CLASS_PREFIX}\\\\S+`, 'g')\nconst DISALLOWED_ATTRIBUTES = ['sanitize', 'whiteList', 'sanitizeFn']\n\nconst CLASS_NAME_FADE = 'fade'\nconst CLASS_NAME_SHOW = 'show'\n\nconst HOVER_STATE_SHOW = 'show'\nconst HOVER_STATE_OUT = 'out'\n\nconst SELECTOR_TOOLTIP_INNER = '.tooltip-inner'\nconst SELECTOR_ARROW = '.arrow'\n\nconst TRIGGER_HOVER = 'hover'\nconst TRIGGER_FOCUS = 'focus'\nconst TRIGGER_CLICK = 'click'\nconst TRIGGER_MANUAL = 'manual'\n\nconst AttachmentMap = {\n  AUTO: 'auto',\n  TOP: 'top',\n  RIGHT: 'right',\n  BOTTOM: 'bottom',\n  LEFT: 'left'\n}\n\nconst Default = {\n  animation: true,\n  template: '<div class=\"tooltip\" role=\"tooltip\">' +\n                    '<div class=\"arrow\"></div>' +\n                    '<div class=\"tooltip-inner\"></div></div>',\n  trigger: 'hover focus',\n  title: '',\n  delay: 0,\n  html: false,\n  selector: false,\n  placement: 'top',\n  offset: 0,\n  container: false,\n  fallbackPlacement: 'flip',\n  boundary: 'scrollParent',\n  customClass: '',\n  sanitize: true,\n  sanitizeFn: null,\n  whiteList: DefaultWhitelist,\n  popperConfig: null\n}\n\nconst DefaultType = {\n  animation: 'boolean',\n  template: 'string',\n  title: '(string|element|function)',\n  trigger: 'string',\n  delay: '(number|object)',\n  html: 'boolean',\n  selector: '(string|boolean)',\n  placement: '(string|function)',\n  offset: '(number|string|function)',\n  container: '(string|element|boolean)',\n  fallbackPlacement: '(string|array)',\n  boundary: '(string|element)',\n  customClass: '(string|function)',\n  sanitize: 'boolean',\n  sanitizeFn: '(null|function)',\n  whiteList: 'object',\n  popperConfig: '(null|object)'\n}\n\nconst Event = {\n  HIDE: `hide${EVENT_KEY}`,\n  HIDDEN: `hidden${EVENT_KEY}`,\n  SHOW: `show${EVENT_KEY}`,\n  SHOWN: `shown${EVENT_KEY}`,\n  INSERTED: `inserted${EVENT_KEY}`,\n  CLICK: `click${EVENT_KEY}`,\n  FOCUSIN: `focusin${EVENT_KEY}`,\n  FOCUSOUT: `focusout${EVENT_KEY}`,\n  MOUSEENTER: `mouseenter${EVENT_KEY}`,\n  MOUSELEAVE: `mouseleave${EVENT_KEY}`\n}\n\n/**\n * Class definition\n */\n\nclass Tooltip {\n  constructor(element, config) {\n    if (typeof Popper === 'undefined') {\n      throw new TypeError('Bootstrap\\'s tooltips require Popper (https://popper.js.org)')\n    }\n\n    // Private\n    this._isEnabled = true\n    this._timeout = 0\n    this._hoverState = ''\n    this._activeTrigger = {}\n    this._popper = null\n\n    // Protected\n    this.element = element\n    this.config = this._getConfig(config)\n    this.tip = null\n\n    this._setListeners()\n  }\n\n  // Getters\n  static get VERSION() {\n    return VERSION\n  }\n\n  static get Default() {\n    return Default\n  }\n\n  static get NAME() {\n    return NAME\n  }\n\n  static get DATA_KEY() {\n    return DATA_KEY\n  }\n\n  static get Event() {\n    return Event\n  }\n\n  static get EVENT_KEY() {\n    return EVENT_KEY\n  }\n\n  static get DefaultType() {\n    return DefaultType\n  }\n\n  // Public\n  enable() {\n    this._isEnabled = true\n  }\n\n  disable() {\n    this._isEnabled = false\n  }\n\n  toggleEnabled() {\n    this._isEnabled = !this._isEnabled\n  }\n\n  toggle(event) {\n    if (!this._isEnabled) {\n      return\n    }\n\n    if (event) {\n      const dataKey = this.constructor.DATA_KEY\n      let context = $(event.currentTarget).data(dataKey)\n\n      if (!context) {\n        context = new this.constructor(\n          event.currentTarget,\n          this._getDelegateConfig()\n        )\n        $(event.currentTarget).data(dataKey, context)\n      }\n\n      context._activeTrigger.click = !context._activeTrigger.click\n\n      if (context._isWithActiveTrigger()) {\n        context._enter(null, context)\n      } else {\n        context._leave(null, context)\n      }\n    } else {\n      if ($(this.getTipElement()).hasClass(CLASS_NAME_SHOW)) {\n        this._leave(null, this)\n        return\n      }\n\n      this._enter(null, this)\n    }\n  }\n\n  dispose() {\n    clearTimeout(this._timeout)\n\n    $.removeData(this.element, this.constructor.DATA_KEY)\n\n    $(this.element).off(this.constructor.EVENT_KEY)\n    $(this.element).closest('.modal').off('hide.bs.modal', this._hideModalHandler)\n\n    if (this.tip) {\n      $(this.tip).remove()\n    }\n\n    this._isEnabled = null\n    this._timeout = null\n    this._hoverState = null\n    this._activeTrigger = null\n    if (this._popper) {\n      this._popper.destroy()\n    }\n\n    this._popper = null\n    this.element = null\n    this.config = null\n    this.tip = null\n  }\n\n  show() {\n    if ($(this.element).css('display') === 'none') {\n      throw new Error('Please use show on visible elements')\n    }\n\n    const showEvent = $.Event(this.constructor.Event.SHOW)\n    if (this.isWithContent() && this._isEnabled) {\n      $(this.element).trigger(showEvent)\n\n      const shadowRoot = Util.findShadowRoot(this.element)\n      const isInTheDom = $.contains(\n        shadowRoot !== null ? shadowRoot : this.element.ownerDocument.documentElement,\n        this.element\n      )\n\n      if (showEvent.isDefaultPrevented() || !isInTheDom) {\n        return\n      }\n\n      const tip = this.getTipElement()\n      const tipId = Util.getUID(this.constructor.NAME)\n\n      tip.setAttribute('id', tipId)\n      this.element.setAttribute('aria-describedby', tipId)\n\n      this.setContent()\n\n      if (this.config.animation) {\n        $(tip).addClass(CLASS_NAME_FADE)\n      }\n\n      const placement = typeof this.config.placement === 'function' ?\n        this.config.placement.call(this, tip, this.element) :\n        this.config.placement\n\n      const attachment = this._getAttachment(placement)\n      this.addAttachmentClass(attachment)\n\n      const container = this._getContainer()\n      $(tip).data(this.constructor.DATA_KEY, this)\n\n      if (!$.contains(this.element.ownerDocument.documentElement, this.tip)) {\n        $(tip).appendTo(container)\n      }\n\n      $(this.element).trigger(this.constructor.Event.INSERTED)\n\n      this._popper = new Popper(this.element, tip, this._getPopperConfig(attachment))\n\n      $(tip).addClass(CLASS_NAME_SHOW)\n      $(tip).addClass(this.config.customClass)\n\n      // If this is a touch-enabled device we add extra\n      // empty mouseover listeners to the body's immediate children;\n      // only needed because of broken event delegation on iOS\n      // https://www.quirksmode.org/blog/archives/2014/02/mouse_event_bub.html\n      if ('ontouchstart' in document.documentElement) {\n        $(document.body).children().on('mouseover', null, $.noop)\n      }\n\n      const complete = () => {\n        if (this.config.animation) {\n          this._fixTransition()\n        }\n\n        const prevHoverState = this._hoverState\n        this._hoverState = null\n\n        $(this.element).trigger(this.constructor.Event.SHOWN)\n\n        if (prevHoverState === HOVER_STATE_OUT) {\n          this._leave(null, this)\n        }\n      }\n\n      if ($(this.tip).hasClass(CLASS_NAME_FADE)) {\n        const transitionDuration = Util.getTransitionDurationFromElement(this.tip)\n\n        $(this.tip)\n          .one(Util.TRANSITION_END, complete)\n          .emulateTransitionEnd(transitionDuration)\n      } else {\n        complete()\n      }\n    }\n  }\n\n  hide(callback) {\n    const tip = this.getTipElement()\n    const hideEvent = $.Event(this.constructor.Event.HIDE)\n    const complete = () => {\n      if (this._hoverState !== HOVER_STATE_SHOW && tip.parentNode) {\n        tip.parentNode.removeChild(tip)\n      }\n\n      this._cleanTipClass()\n      this.element.removeAttribute('aria-describedby')\n      $(this.element).trigger(this.constructor.Event.HIDDEN)\n      if (this._popper !== null) {\n        this._popper.destroy()\n      }\n\n      if (callback) {\n        callback()\n      }\n    }\n\n    $(this.element).trigger(hideEvent)\n\n    if (hideEvent.isDefaultPrevented()) {\n      return\n    }\n\n    $(tip).removeClass(CLASS_NAME_SHOW)\n\n    // If this is a touch-enabled device we remove the extra\n    // empty mouseover listeners we added for iOS support\n    if ('ontouchstart' in document.documentElement) {\n      $(document.body).children().off('mouseover', null, $.noop)\n    }\n\n    this._activeTrigger[TRIGGER_CLICK] = false\n    this._activeTrigger[TRIGGER_FOCUS] = false\n    this._activeTrigger[TRIGGER_HOVER] = false\n\n    if ($(this.tip).hasClass(CLASS_NAME_FADE)) {\n      const transitionDuration = Util.getTransitionDurationFromElement(tip)\n\n      $(tip)\n        .one(Util.TRANSITION_END, complete)\n        .emulateTransitionEnd(transitionDuration)\n    } else {\n      complete()\n    }\n\n    this._hoverState = ''\n  }\n\n  update() {\n    if (this._popper !== null) {\n      this._popper.scheduleUpdate()\n    }\n  }\n\n  // Protected\n  isWithContent() {\n    return Boolean(this.getTitle())\n  }\n\n  addAttachmentClass(attachment) {\n    $(this.getTipElement()).addClass(`${CLASS_PREFIX}-${attachment}`)\n  }\n\n  getTipElement() {\n    this.tip = this.tip || $(this.config.template)[0]\n    return this.tip\n  }\n\n  setContent() {\n    const tip = this.getTipElement()\n    this.setElementContent($(tip.querySelectorAll(SELECTOR_TOOLTIP_INNER)), this.getTitle())\n    $(tip).removeClass(`${CLASS_NAME_FADE} ${CLASS_NAME_SHOW}`)\n  }\n\n  setElementContent($element, content) {\n    if (typeof content === 'object' && (content.nodeType || content.jquery)) {\n      // Content is a DOM node or a jQuery\n      if (this.config.html) {\n        if (!$(content).parent().is($element)) {\n          $element.empty().append(content)\n        }\n      } else {\n        $element.text($(content).text())\n      }\n\n      return\n    }\n\n    if (this.config.html) {\n      if (this.config.sanitize) {\n        content = sanitizeHtml(content, this.config.whiteList, this.config.sanitizeFn)\n      }\n\n      $element.html(content)\n    } else {\n      $element.text(content)\n    }\n  }\n\n  getTitle() {\n    let title = this.element.getAttribute('data-original-title')\n\n    if (!title) {\n      title = typeof this.config.title === 'function' ?\n        this.config.title.call(this.element) :\n        this.config.title\n    }\n\n    return title\n  }\n\n  // Private\n  _getPopperConfig(attachment) {\n    const defaultBsConfig = {\n      placement: attachment,\n      modifiers: {\n        offset: this._getOffset(),\n        flip: {\n          behavior: this.config.fallbackPlacement\n        },\n        arrow: {\n          element: SELECTOR_ARROW\n        },\n        preventOverflow: {\n          boundariesElement: this.config.boundary\n        }\n      },\n      onCreate: data => {\n        if (data.originalPlacement !== data.placement) {\n          this._handlePopperPlacementChange(data)\n        }\n      },\n      onUpdate: data => this._handlePopperPlacementChange(data)\n    }\n\n    return {\n      ...defaultBsConfig,\n      ...this.config.popperConfig\n    }\n  }\n\n  _getOffset() {\n    const offset = {}\n\n    if (typeof this.config.offset === 'function') {\n      offset.fn = data => {\n        data.offsets = {\n          ...data.offsets,\n          ...this.config.offset(data.offsets, this.element)\n        }\n\n        return data\n      }\n    } else {\n      offset.offset = this.config.offset\n    }\n\n    return offset\n  }\n\n  _getContainer() {\n    if (this.config.container === false) {\n      return document.body\n    }\n\n    if (Util.isElement(this.config.container)) {\n      return $(this.config.container)\n    }\n\n    return $(document).find(this.config.container)\n  }\n\n  _getAttachment(placement) {\n    return AttachmentMap[placement.toUpperCase()]\n  }\n\n  _setListeners() {\n    const triggers = this.config.trigger.split(' ')\n\n    triggers.forEach(trigger => {\n      if (trigger === 'click') {\n        $(this.element).on(\n          this.constructor.Event.CLICK,\n          this.config.selector,\n          event => this.toggle(event)\n        )\n      } else if (trigger !== TRIGGER_MANUAL) {\n        const eventIn = trigger === TRIGGER_HOVER ?\n          this.constructor.Event.MOUSEENTER :\n          this.constructor.Event.FOCUSIN\n        const eventOut = trigger === TRIGGER_HOVER ?\n          this.constructor.Event.MOUSELEAVE :\n          this.constructor.Event.FOCUSOUT\n\n        $(this.element)\n          .on(eventIn, this.config.selector, event => this._enter(event))\n          .on(eventOut, this.config.selector, event => this._leave(event))\n      }\n    })\n\n    this._hideModalHandler = () => {\n      if (this.element) {\n        this.hide()\n      }\n    }\n\n    $(this.element).closest('.modal').on('hide.bs.modal', this._hideModalHandler)\n\n    if (this.config.selector) {\n      this.config = {\n        ...this.config,\n        trigger: 'manual',\n        selector: ''\n      }\n    } else {\n      this._fixTitle()\n    }\n  }\n\n  _fixTitle() {\n    const titleType = typeof this.element.getAttribute('data-original-title')\n\n    if (this.element.getAttribute('title') || titleType !== 'string') {\n      this.element.setAttribute(\n        'data-original-title',\n        this.element.getAttribute('title') || ''\n      )\n\n      this.element.setAttribute('title', '')\n    }\n  }\n\n  _enter(event, context) {\n    const dataKey = this.constructor.DATA_KEY\n    context = context || $(event.currentTarget).data(dataKey)\n\n    if (!context) {\n      context = new this.constructor(\n        event.currentTarget,\n        this._getDelegateConfig()\n      )\n      $(event.currentTarget).data(dataKey, context)\n    }\n\n    if (event) {\n      context._activeTrigger[\n        event.type === 'focusin' ? TRIGGER_FOCUS : TRIGGER_HOVER\n      ] = true\n    }\n\n    if ($(context.getTipElement()).hasClass(CLASS_NAME_SHOW) || context._hoverState === HOVER_STATE_SHOW) {\n      context._hoverState = HOVER_STATE_SHOW\n      return\n    }\n\n    clearTimeout(context._timeout)\n\n    context._hoverState = HOVER_STATE_SHOW\n\n    if (!context.config.delay || !context.config.delay.show) {\n      context.show()\n      return\n    }\n\n    context._timeout = setTimeout(() => {\n      if (context._hoverState === HOVER_STATE_SHOW) {\n        context.show()\n      }\n    }, context.config.delay.show)\n  }\n\n  _leave(event, context) {\n    const dataKey = this.constructor.DATA_KEY\n    context = context || $(event.currentTarget).data(dataKey)\n\n    if (!context) {\n      context = new this.constructor(\n        event.currentTarget,\n        this._getDelegateConfig()\n      )\n      $(event.currentTarget).data(dataKey, context)\n    }\n\n    if (event) {\n      context._activeTrigger[\n        event.type === 'focusout' ? TRIGGER_FOCUS : TRIGGER_HOVER\n      ] = false\n    }\n\n    if (context._isWithActiveTrigger()) {\n      return\n    }\n\n    clearTimeout(context._timeout)\n\n    context._hoverState = HOVER_STATE_OUT\n\n    if (!context.config.delay || !context.config.delay.hide) {\n      context.hide()\n      return\n    }\n\n    context._timeout = setTimeout(() => {\n      if (context._hoverState === HOVER_STATE_OUT) {\n        context.hide()\n      }\n    }, context.config.delay.hide)\n  }\n\n  _isWithActiveTrigger() {\n    for (const trigger in this._activeTrigger) {\n      if (this._activeTrigger[trigger]) {\n        return true\n      }\n    }\n\n    return false\n  }\n\n  _getConfig(config) {\n    const dataAttributes = $(this.element).data()\n\n    Object.keys(dataAttributes)\n      .forEach(dataAttr => {\n        if (DISALLOWED_ATTRIBUTES.indexOf(dataAttr) !== -1) {\n          delete dataAttributes[dataAttr]\n        }\n      })\n\n    config = {\n      ...this.constructor.Default,\n      ...dataAttributes,\n      ...(typeof config === 'object' && config ? config : {})\n    }\n\n    if (typeof config.delay === 'number') {\n      config.delay = {\n        show: config.delay,\n        hide: config.delay\n      }\n    }\n\n    if (typeof config.title === 'number') {\n      config.title = config.title.toString()\n    }\n\n    if (typeof config.content === 'number') {\n      config.content = config.content.toString()\n    }\n\n    Util.typeCheckConfig(\n      NAME,\n      config,\n      this.constructor.DefaultType\n    )\n\n    if (config.sanitize) {\n      config.template = sanitizeHtml(config.template, config.whiteList, config.sanitizeFn)\n    }\n\n    return config\n  }\n\n  _getDelegateConfig() {\n    const config = {}\n\n    if (this.config) {\n      for (const key in this.config) {\n        if (this.constructor.Default[key] !== this.config[key]) {\n          config[key] = this.config[key]\n        }\n      }\n    }\n\n    return config\n  }\n\n  _cleanTipClass() {\n    const $tip = $(this.getTipElement())\n    const tabClass = $tip.attr('class').match(BSCLS_PREFIX_REGEX)\n    if (tabClass !== null && tabClass.length) {\n      $tip.removeClass(tabClass.join(''))\n    }\n  }\n\n  _handlePopperPlacementChange(popperData) {\n    this.tip = popperData.instance.popper\n    this._cleanTipClass()\n    this.addAttachmentClass(this._getAttachment(popperData.placement))\n  }\n\n  _fixTransition() {\n    const tip = this.getTipElement()\n    const initConfigAnimation = this.config.animation\n\n    if (tip.getAttribute('x-placement') !== null) {\n      return\n    }\n\n    $(tip).removeClass(CLASS_NAME_FADE)\n    this.config.animation = false\n    this.hide()\n    this.show()\n    this.config.animation = initConfigAnimation\n  }\n\n  // Static\n  static _jQueryInterface(config) {\n    return this.each(function () {\n      const $element = $(this)\n      let data = $element.data(DATA_KEY)\n      const _config = typeof config === 'object' && config\n\n      if (!data && /dispose|hide/.test(config)) {\n        return\n      }\n\n      if (!data) {\n        data = new Tooltip(this, _config)\n        $element.data(DATA_KEY, data)\n      }\n\n      if (typeof config === 'string') {\n        if (typeof data[config] === 'undefined') {\n          throw new TypeError(`No method named \"${config}\"`)\n        }\n\n        data[config]()\n      }\n    })\n  }\n}\n\n/**\n * jQuery\n */\n\n$.fn[NAME] = Tooltip._jQueryInterface\n$.fn[NAME].Constructor = Tooltip\n$.fn[NAME].noConflict = () => {\n  $.fn[NAME] = JQUERY_NO_CONFLICT\n  return Tooltip._jQueryInterface\n}\n\nexport default Tooltip\n","/**\n * --------------------------------------------------------------------------\n * Bootstrap (v4.6.2): popover.js\n * Licensed under MIT (https://github.com/twbs/bootstrap/blob/main/LICENSE)\n * --------------------------------------------------------------------------\n */\n\nimport $ from 'jquery'\nimport Tooltip from './tooltip'\n\n/**\n * Constants\n */\n\nconst NAME = 'popover'\nconst VERSION = '4.6.2'\nconst DATA_KEY = 'bs.popover'\nconst EVENT_KEY = `.${DATA_KEY}`\nconst JQUERY_NO_CONFLICT = $.fn[NAME]\nconst CLASS_PREFIX = 'bs-popover'\nconst BSCLS_PREFIX_REGEX = new RegExp(`(^|\\\\s)${CLASS_PREFIX}\\\\S+`, 'g')\n\nconst CLASS_NAME_FADE = 'fade'\nconst CLASS_NAME_SHOW = 'show'\n\nconst SELECTOR_TITLE = '.popover-header'\nconst SELECTOR_CONTENT = '.popover-body'\n\nconst Default = {\n  ...Tooltip.Default,\n  placement: 'right',\n  trigger: 'click',\n  content: '',\n  template: '<div class=\"popover\" role=\"tooltip\">' +\n              '<div class=\"arrow\"></div>' +\n              '<h3 class=\"popover-header\"></h3>' +\n              '<div class=\"popover-body\"></div></div>'\n}\n\nconst DefaultType = {\n  ...Tooltip.DefaultType,\n  content: '(string|element|function)'\n}\n\nconst Event = {\n  HIDE: `hide${EVENT_KEY}`,\n  HIDDEN: `hidden${EVENT_KEY}`,\n  SHOW: `show${EVENT_KEY}`,\n  SHOWN: `shown${EVENT_KEY}`,\n  INSERTED: `inserted${EVENT_KEY}`,\n  CLICK: `click${EVENT_KEY}`,\n  FOCUSIN: `focusin${EVENT_KEY}`,\n  FOCUSOUT: `focusout${EVENT_KEY}`,\n  MOUSEENTER: `mouseenter${EVENT_KEY}`,\n  MOUSELEAVE: `mouseleave${EVENT_KEY}`\n}\n\n/**\n * Class definition\n */\n\nclass Popover extends Tooltip {\n  // Getters\n  static get VERSION() {\n    return VERSION\n  }\n\n  static get Default() {\n    return Default\n  }\n\n  static get NAME() {\n    return NAME\n  }\n\n  static get DATA_KEY() {\n    return DATA_KEY\n  }\n\n  static get Event() {\n    return Event\n  }\n\n  static get EVENT_KEY() {\n    return EVENT_KEY\n  }\n\n  static get DefaultType() {\n    return DefaultType\n  }\n\n  // Overrides\n  isWithContent() {\n    return this.getTitle() || this._getContent()\n  }\n\n  addAttachmentClass(attachment) {\n    $(this.getTipElement()).addClass(`${CLASS_PREFIX}-${attachment}`)\n  }\n\n  getTipElement() {\n    this.tip = this.tip || $(this.config.template)[0]\n    return this.tip\n  }\n\n  setContent() {\n    const $tip = $(this.getTipElement())\n\n    // We use append for html objects to maintain js events\n    this.setElementContent($tip.find(SELECTOR_TITLE), this.getTitle())\n    let content = this._getContent()\n    if (typeof content === 'function') {\n      content = content.call(this.element)\n    }\n\n    this.setElementContent($tip.find(SELECTOR_CONTENT), content)\n\n    $tip.removeClass(`${CLASS_NAME_FADE} ${CLASS_NAME_SHOW}`)\n  }\n\n  // Private\n  _getContent() {\n    return this.element.getAttribute('data-content') ||\n      this.config.content\n  }\n\n  _cleanTipClass() {\n    const $tip = $(this.getTipElement())\n    const tabClass = $tip.attr('class').match(BSCLS_PREFIX_REGEX)\n    if (tabClass !== null && tabClass.length > 0) {\n      $tip.removeClass(tabClass.join(''))\n    }\n  }\n\n  // Static\n  static _jQueryInterface(config) {\n    return this.each(function () {\n      let data = $(this).data(DATA_KEY)\n      const _config = typeof config === 'object' ? config : null\n\n      if (!data && /dispose|hide/.test(config)) {\n        return\n      }\n\n      if (!data) {\n        data = new Popover(this, _config)\n        $(this).data(DATA_KEY, data)\n      }\n\n      if (typeof config === 'string') {\n        if (typeof data[config] === 'undefined') {\n          throw new TypeError(`No method named \"${config}\"`)\n        }\n\n        data[config]()\n      }\n    })\n  }\n}\n\n/**\n * jQuery\n */\n\n$.fn[NAME] = Popover._jQueryInterface\n$.fn[NAME].Constructor = Popover\n$.fn[NAME].noConflict = () => {\n  $.fn[NAME] = JQUERY_NO_CONFLICT\n  return Popover._jQueryInterface\n}\n\nexport default Popover\n","/**\n * --------------------------------------------------------------------------\n * Bootstrap (v4.6.2): scrollspy.js\n * Licensed under MIT (https://github.com/twbs/bootstrap/blob/main/LICENSE)\n * --------------------------------------------------------------------------\n */\n\nimport $ from 'jquery'\nimport Util from './util'\n\n/**\n * Constants\n */\n\nconst NAME = 'scrollspy'\nconst VERSION = '4.6.2'\nconst DATA_KEY = 'bs.scrollspy'\nconst EVENT_KEY = `.${DATA_KEY}`\nconst DATA_API_KEY = '.data-api'\nconst JQUERY_NO_CONFLICT = $.fn[NAME]\n\nconst CLASS_NAME_DROPDOWN_ITEM = 'dropdown-item'\nconst CLASS_NAME_ACTIVE = 'active'\n\nconst EVENT_ACTIVATE = `activate${EVENT_KEY}`\nconst EVENT_SCROLL = `scroll${EVENT_KEY}`\nconst EVENT_LOAD_DATA_API = `load${EVENT_KEY}${DATA_API_KEY}`\n\nconst METHOD_OFFSET = 'offset'\nconst METHOD_POSITION = 'position'\n\nconst SELECTOR_DATA_SPY = '[data-spy=\"scroll\"]'\nconst SELECTOR_NAV_LIST_GROUP = '.nav, .list-group'\nconst SELECTOR_NAV_LINKS = '.nav-link'\nconst SELECTOR_NAV_ITEMS = '.nav-item'\nconst SELECTOR_LIST_ITEMS = '.list-group-item'\nconst SELECTOR_DROPDOWN = '.dropdown'\nconst SELECTOR_DROPDOWN_ITEMS = '.dropdown-item'\nconst SELECTOR_DROPDOWN_TOGGLE = '.dropdown-toggle'\n\nconst Default = {\n  offset: 10,\n  method: 'auto',\n  target: ''\n}\n\nconst DefaultType = {\n  offset: 'number',\n  method: 'string',\n  target: '(string|element)'\n}\n\n/**\n * Class definition\n */\n\nclass ScrollSpy {\n  constructor(element, config) {\n    this._element = element\n    this._scrollElement = element.tagName === 'BODY' ? window : element\n    this._config = this._getConfig(config)\n    this._selector = `${this._config.target} ${SELECTOR_NAV_LINKS},` +\n                          `${this._config.target} ${SELECTOR_LIST_ITEMS},` +\n                          `${this._config.target} ${SELECTOR_DROPDOWN_ITEMS}`\n    this._offsets = []\n    this._targets = []\n    this._activeTarget = null\n    this._scrollHeight = 0\n\n    $(this._scrollElement).on(EVENT_SCROLL, event => this._process(event))\n\n    this.refresh()\n    this._process()\n  }\n\n  // Getters\n  static get VERSION() {\n    return VERSION\n  }\n\n  static get Default() {\n    return Default\n  }\n\n  // Public\n  refresh() {\n    const autoMethod = this._scrollElement === this._scrollElement.window ?\n      METHOD_OFFSET : METHOD_POSITION\n\n    const offsetMethod = this._config.method === 'auto' ?\n      autoMethod : this._config.method\n\n    const offsetBase = offsetMethod === METHOD_POSITION ?\n      this._getScrollTop() : 0\n\n    this._offsets = []\n    this._targets = []\n\n    this._scrollHeight = this._getScrollHeight()\n\n    const targets = [].slice.call(document.querySelectorAll(this._selector))\n\n    targets\n      .map(element => {\n        let target\n        const targetSelector = Util.getSelectorFromElement(element)\n\n        if (targetSelector) {\n          target = document.querySelector(targetSelector)\n        }\n\n        if (target) {\n          const targetBCR = target.getBoundingClientRect()\n          if (targetBCR.width || targetBCR.height) {\n            // TODO (fat): remove sketch reliance on jQuery position/offset\n            return [\n              $(target)[offsetMethod]().top + offsetBase,\n              targetSelector\n            ]\n          }\n        }\n\n        return null\n      })\n      .filter(Boolean)\n      .sort((a, b) => a[0] - b[0])\n      .forEach(item => {\n        this._offsets.push(item[0])\n        this._targets.push(item[1])\n      })\n  }\n\n  dispose() {\n    $.removeData(this._element, DATA_KEY)\n    $(this._scrollElement).off(EVENT_KEY)\n\n    this._element = null\n    this._scrollElement = null\n    this._config = null\n    this._selector = null\n    this._offsets = null\n    this._targets = null\n    this._activeTarget = null\n    this._scrollHeight = null\n  }\n\n  // Private\n  _getConfig(config) {\n    config = {\n      ...Default,\n      ...(typeof config === 'object' && config ? config : {})\n    }\n\n    if (typeof config.target !== 'string' && Util.isElement(config.target)) {\n      let id = $(config.target).attr('id')\n      if (!id) {\n        id = Util.getUID(NAME)\n        $(config.target).attr('id', id)\n      }\n\n      config.target = `#${id}`\n    }\n\n    Util.typeCheckConfig(NAME, config, DefaultType)\n\n    return config\n  }\n\n  _getScrollTop() {\n    return this._scrollElement === window ?\n      this._scrollElement.pageYOffset : this._scrollElement.scrollTop\n  }\n\n  _getScrollHeight() {\n    return this._scrollElement.scrollHeight || Math.max(\n      document.body.scrollHeight,\n      document.documentElement.scrollHeight\n    )\n  }\n\n  _getOffsetHeight() {\n    return this._scrollElement === window ?\n      window.innerHeight : this._scrollElement.getBoundingClientRect().height\n  }\n\n  _process() {\n    const scrollTop = this._getScrollTop() + this._config.offset\n    const scrollHeight = this._getScrollHeight()\n    const maxScroll = this._config.offset + scrollHeight - this._getOffsetHeight()\n\n    if (this._scrollHeight !== scrollHeight) {\n      this.refresh()\n    }\n\n    if (scrollTop >= maxScroll) {\n      const target = this._targets[this._targets.length - 1]\n\n      if (this._activeTarget !== target) {\n        this._activate(target)\n      }\n\n      return\n    }\n\n    if (this._activeTarget && scrollTop < this._offsets[0] && this._offsets[0] > 0) {\n      this._activeTarget = null\n      this._clear()\n      return\n    }\n\n    for (let i = this._offsets.length; i--;) {\n      const isActiveTarget = this._activeTarget !== this._targets[i] &&\n          scrollTop >= this._offsets[i] &&\n          (typeof this._offsets[i + 1] === 'undefined' ||\n              scrollTop < this._offsets[i + 1])\n\n      if (isActiveTarget) {\n        this._activate(this._targets[i])\n      }\n    }\n  }\n\n  _activate(target) {\n    this._activeTarget = target\n\n    this._clear()\n\n    const queries = this._selector\n      .split(',')\n      .map(selector => `${selector}[data-target=\"${target}\"],${selector}[href=\"${target}\"]`)\n\n    const $link = $([].slice.call(document.querySelectorAll(queries.join(','))))\n\n    if ($link.hasClass(CLASS_NAME_DROPDOWN_ITEM)) {\n      $link.closest(SELECTOR_DROPDOWN)\n        .find(SELECTOR_DROPDOWN_TOGGLE)\n        .addClass(CLASS_NAME_ACTIVE)\n      $link.addClass(CLASS_NAME_ACTIVE)\n    } else {\n      // Set triggered link as active\n      $link.addClass(CLASS_NAME_ACTIVE)\n      // Set triggered links parents as active\n      // With both <ul> and <nav> markup a parent is the previous sibling of any nav ancestor\n      $link.parents(SELECTOR_NAV_LIST_GROUP)\n        .prev(`${SELECTOR_NAV_LINKS}, ${SELECTOR_LIST_ITEMS}`)\n        .addClass(CLASS_NAME_ACTIVE)\n      // Handle special case when .nav-link is inside .nav-item\n      $link.parents(SELECTOR_NAV_LIST_GROUP)\n        .prev(SELECTOR_NAV_ITEMS)\n        .children(SELECTOR_NAV_LINKS)\n        .addClass(CLASS_NAME_ACTIVE)\n    }\n\n    $(this._scrollElement).trigger(EVENT_ACTIVATE, {\n      relatedTarget: target\n    })\n  }\n\n  _clear() {\n    [].slice.call(document.querySelectorAll(this._selector))\n      .filter(node => node.classList.contains(CLASS_NAME_ACTIVE))\n      .forEach(node => node.classList.remove(CLASS_NAME_ACTIVE))\n  }\n\n  // Static\n  static _jQueryInterface(config) {\n    return this.each(function () {\n      let data = $(this).data(DATA_KEY)\n      const _config = typeof config === 'object' && config\n\n      if (!data) {\n        data = new ScrollSpy(this, _config)\n        $(this).data(DATA_KEY, data)\n      }\n\n      if (typeof config === 'string') {\n        if (typeof data[config] === 'undefined') {\n          throw new TypeError(`No method named \"${config}\"`)\n        }\n\n        data[config]()\n      }\n    })\n  }\n}\n\n/**\n * Data API implementation\n */\n\n$(window).on(EVENT_LOAD_DATA_API, () => {\n  const scrollSpys = [].slice.call(document.querySelectorAll(SELECTOR_DATA_SPY))\n  const scrollSpysLength = scrollSpys.length\n\n  for (let i = scrollSpysLength; i--;) {\n    const $spy = $(scrollSpys[i])\n    ScrollSpy._jQueryInterface.call($spy, $spy.data())\n  }\n})\n\n/**\n * jQuery\n */\n\n$.fn[NAME] = ScrollSpy._jQueryInterface\n$.fn[NAME].Constructor = ScrollSpy\n$.fn[NAME].noConflict = () => {\n  $.fn[NAME] = JQUERY_NO_CONFLICT\n  return ScrollSpy._jQueryInterface\n}\n\nexport default ScrollSpy\n","/**\n * --------------------------------------------------------------------------\n * Bootstrap (v4.6.2): tab.js\n * Licensed under MIT (https://github.com/twbs/bootstrap/blob/main/LICENSE)\n * --------------------------------------------------------------------------\n */\n\nimport $ from 'jquery'\nimport Util from './util'\n\n/**\n * Constants\n */\n\nconst NAME = 'tab'\nconst VERSION = '4.6.2'\nconst DATA_KEY = 'bs.tab'\nconst EVENT_KEY = `.${DATA_KEY}`\nconst DATA_API_KEY = '.data-api'\nconst JQUERY_NO_CONFLICT = $.fn[NAME]\n\nconst CLASS_NAME_DROPDOWN_MENU = 'dropdown-menu'\nconst CLASS_NAME_ACTIVE = 'active'\nconst CLASS_NAME_DISABLED = 'disabled'\nconst CLASS_NAME_FADE = 'fade'\nconst CLASS_NAME_SHOW = 'show'\n\nconst EVENT_HIDE = `hide${EVENT_KEY}`\nconst EVENT_HIDDEN = `hidden${EVENT_KEY}`\nconst EVENT_SHOW = `show${EVENT_KEY}`\nconst EVENT_SHOWN = `shown${EVENT_KEY}`\nconst EVENT_CLICK_DATA_API = `click${EVENT_KEY}${DATA_API_KEY}`\n\nconst SELECTOR_DROPDOWN = '.dropdown'\nconst SELECTOR_NAV_LIST_GROUP = '.nav, .list-group'\nconst SELECTOR_ACTIVE = '.active'\nconst SELECTOR_ACTIVE_UL = '> li > .active'\nconst SELECTOR_DATA_TOGGLE = '[data-toggle=\"tab\"], [data-toggle=\"pill\"], [data-toggle=\"list\"]'\nconst SELECTOR_DROPDOWN_TOGGLE = '.dropdown-toggle'\nconst SELECTOR_DROPDOWN_ACTIVE_CHILD = '> .dropdown-menu .active'\n\n/**\n * Class definition\n */\n\nclass Tab {\n  constructor(element) {\n    this._element = element\n  }\n\n  // Getters\n  static get VERSION() {\n    return VERSION\n  }\n\n  // Public\n  show() {\n    if (this._element.parentNode &&\n        this._element.parentNode.nodeType === Node.ELEMENT_NODE &&\n        $(this._element).hasClass(CLASS_NAME_ACTIVE) ||\n        $(this._element).hasClass(CLASS_NAME_DISABLED) ||\n        this._element.hasAttribute('disabled')) {\n      return\n    }\n\n    let target\n    let previous\n    const listElement = $(this._element).closest(SELECTOR_NAV_LIST_GROUP)[0]\n    const selector = Util.getSelectorFromElement(this._element)\n\n    if (listElement) {\n      const itemSelector = listElement.nodeName === 'UL' || listElement.nodeName === 'OL' ? SELECTOR_ACTIVE_UL : SELECTOR_ACTIVE\n      previous = $.makeArray($(listElement).find(itemSelector))\n      previous = previous[previous.length - 1]\n    }\n\n    const hideEvent = $.Event(EVENT_HIDE, {\n      relatedTarget: this._element\n    })\n\n    const showEvent = $.Event(EVENT_SHOW, {\n      relatedTarget: previous\n    })\n\n    if (previous) {\n      $(previous).trigger(hideEvent)\n    }\n\n    $(this._element).trigger(showEvent)\n\n    if (showEvent.isDefaultPrevented() ||\n        hideEvent.isDefaultPrevented()) {\n      return\n    }\n\n    if (selector) {\n      target = document.querySelector(selector)\n    }\n\n    this._activate(\n      this._element,\n      listElement\n    )\n\n    const complete = () => {\n      const hiddenEvent = $.Event(EVENT_HIDDEN, {\n        relatedTarget: this._element\n      })\n\n      const shownEvent = $.Event(EVENT_SHOWN, {\n        relatedTarget: previous\n      })\n\n      $(previous).trigger(hiddenEvent)\n      $(this._element).trigger(shownEvent)\n    }\n\n    if (target) {\n      this._activate(target, target.parentNode, complete)\n    } else {\n      complete()\n    }\n  }\n\n  dispose() {\n    $.removeData(this._element, DATA_KEY)\n    this._element = null\n  }\n\n  // Private\n  _activate(element, container, callback) {\n    const activeElements = container && (container.nodeName === 'UL' || container.nodeName === 'OL') ?\n      $(container).find(SELECTOR_ACTIVE_UL) :\n      $(container).children(SELECTOR_ACTIVE)\n\n    const active = activeElements[0]\n    const isTransitioning = callback && (active && $(active).hasClass(CLASS_NAME_FADE))\n    const complete = () => this._transitionComplete(\n      element,\n      active,\n      callback\n    )\n\n    if (active && isTransitioning) {\n      const transitionDuration = Util.getTransitionDurationFromElement(active)\n\n      $(active)\n        .removeClass(CLASS_NAME_SHOW)\n        .one(Util.TRANSITION_END, complete)\n        .emulateTransitionEnd(transitionDuration)\n    } else {\n      complete()\n    }\n  }\n\n  _transitionComplete(element, active, callback) {\n    if (active) {\n      $(active).removeClass(CLASS_NAME_ACTIVE)\n\n      const dropdownChild = $(active.parentNode).find(\n        SELECTOR_DROPDOWN_ACTIVE_CHILD\n      )[0]\n\n      if (dropdownChild) {\n        $(dropdownChild).removeClass(CLASS_NAME_ACTIVE)\n      }\n\n      if (active.getAttribute('role') === 'tab') {\n        active.setAttribute('aria-selected', false)\n      }\n    }\n\n    $(element).addClass(CLASS_NAME_ACTIVE)\n    if (element.getAttribute('role') === 'tab') {\n      element.setAttribute('aria-selected', true)\n    }\n\n    Util.reflow(element)\n\n    if (element.classList.contains(CLASS_NAME_FADE)) {\n      element.classList.add(CLASS_NAME_SHOW)\n    }\n\n    let parent = element.parentNode\n    if (parent && parent.nodeName === 'LI') {\n      parent = parent.parentNode\n    }\n\n    if (parent && $(parent).hasClass(CLASS_NAME_DROPDOWN_MENU)) {\n      const dropdownElement = $(element).closest(SELECTOR_DROPDOWN)[0]\n\n      if (dropdownElement) {\n        const dropdownToggleList = [].slice.call(dropdownElement.querySelectorAll(SELECTOR_DROPDOWN_TOGGLE))\n\n        $(dropdownToggleList).addClass(CLASS_NAME_ACTIVE)\n      }\n\n      element.setAttribute('aria-expanded', true)\n    }\n\n    if (callback) {\n      callback()\n    }\n  }\n\n  // Static\n  static _jQueryInterface(config) {\n    return this.each(function () {\n      const $this = $(this)\n      let data = $this.data(DATA_KEY)\n\n      if (!data) {\n        data = new Tab(this)\n        $this.data(DATA_KEY, data)\n      }\n\n      if (typeof config === 'string') {\n        if (typeof data[config] === 'undefined') {\n          throw new TypeError(`No method named \"${config}\"`)\n        }\n\n        data[config]()\n      }\n    })\n  }\n}\n\n/**\n * Data API implementation\n */\n\n$(document)\n  .on(EVENT_CLICK_DATA_API, SELECTOR_DATA_TOGGLE, function (event) {\n    event.preventDefault()\n    Tab._jQueryInterface.call($(this), 'show')\n  })\n\n/**\n * jQuery\n */\n\n$.fn[NAME] = Tab._jQueryInterface\n$.fn[NAME].Constructor = Tab\n$.fn[NAME].noConflict = () => {\n  $.fn[NAME] = JQUERY_NO_CONFLICT\n  return Tab._jQueryInterface\n}\n\nexport default Tab\n","/**\n * --------------------------------------------------------------------------\n * Bootstrap (v4.6.2): toast.js\n * Licensed under MIT (https://github.com/twbs/bootstrap/blob/main/LICENSE)\n * --------------------------------------------------------------------------\n */\n\nimport $ from 'jquery'\nimport Util from './util'\n\n/**\n * Constants\n */\n\nconst NAME = 'toast'\nconst VERSION = '4.6.2'\nconst DATA_KEY = 'bs.toast'\nconst EVENT_KEY = `.${DATA_KEY}`\nconst JQUERY_NO_CONFLICT = $.fn[NAME]\n\nconst CLASS_NAME_FADE = 'fade'\nconst CLASS_NAME_HIDE = 'hide'\nconst CLASS_NAME_SHOW = 'show'\nconst CLASS_NAME_SHOWING = 'showing'\n\nconst EVENT_CLICK_DISMISS = `click.dismiss${EVENT_KEY}`\nconst EVENT_HIDE = `hide${EVENT_KEY}`\nconst EVENT_HIDDEN = `hidden${EVENT_KEY}`\nconst EVENT_SHOW = `show${EVENT_KEY}`\nconst EVENT_SHOWN = `shown${EVENT_KEY}`\n\nconst SELECTOR_DATA_DISMISS = '[data-dismiss=\"toast\"]'\n\nconst Default = {\n  animation: true,\n  autohide: true,\n  delay: 500\n}\n\nconst DefaultType = {\n  animation: 'boolean',\n  autohide: 'boolean',\n  delay: 'number'\n}\n\n/**\n * Class definition\n */\n\nclass Toast {\n  constructor(element, config) {\n    this._element = element\n    this._config = this._getConfig(config)\n    this._timeout = null\n    this._setListeners()\n  }\n\n  // Getters\n  static get VERSION() {\n    return VERSION\n  }\n\n  static get DefaultType() {\n    return DefaultType\n  }\n\n  static get Default() {\n    return Default\n  }\n\n  // Public\n  show() {\n    const showEvent = $.Event(EVENT_SHOW)\n\n    $(this._element).trigger(showEvent)\n    if (showEvent.isDefaultPrevented()) {\n      return\n    }\n\n    this._clearTimeout()\n\n    if (this._config.animation) {\n      this._element.classList.add(CLASS_NAME_FADE)\n    }\n\n    const complete = () => {\n      this._element.classList.remove(CLASS_NAME_SHOWING)\n      this._element.classList.add(CLASS_NAME_SHOW)\n\n      $(this._element).trigger(EVENT_SHOWN)\n\n      if (this._config.autohide) {\n        this._timeout = setTimeout(() => {\n          this.hide()\n        }, this._config.delay)\n      }\n    }\n\n    this._element.classList.remove(CLASS_NAME_HIDE)\n    Util.reflow(this._element)\n    this._element.classList.add(CLASS_NAME_SHOWING)\n    if (this._config.animation) {\n      const transitionDuration = Util.getTransitionDurationFromElement(this._element)\n\n      $(this._element)\n        .one(Util.TRANSITION_END, complete)\n        .emulateTransitionEnd(transitionDuration)\n    } else {\n      complete()\n    }\n  }\n\n  hide() {\n    if (!this._element.classList.contains(CLASS_NAME_SHOW)) {\n      return\n    }\n\n    const hideEvent = $.Event(EVENT_HIDE)\n\n    $(this._element).trigger(hideEvent)\n    if (hideEvent.isDefaultPrevented()) {\n      return\n    }\n\n    this._close()\n  }\n\n  dispose() {\n    this._clearTimeout()\n\n    if (this._element.classList.contains(CLASS_NAME_SHOW)) {\n      this._element.classList.remove(CLASS_NAME_SHOW)\n    }\n\n    $(this._element).off(EVENT_CLICK_DISMISS)\n\n    $.removeData(this._element, DATA_KEY)\n    this._element = null\n    this._config = null\n  }\n\n  // Private\n  _getConfig(config) {\n    config = {\n      ...Default,\n      ...$(this._element).data(),\n      ...(typeof config === 'object' && config ? config : {})\n    }\n\n    Util.typeCheckConfig(\n      NAME,\n      config,\n      this.constructor.DefaultType\n    )\n\n    return config\n  }\n\n  _setListeners() {\n    $(this._element).on(EVENT_CLICK_DISMISS, SELECTOR_DATA_DISMISS, () => this.hide())\n  }\n\n  _close() {\n    const complete = () => {\n      this._element.classList.add(CLASS_NAME_HIDE)\n      $(this._element).trigger(EVENT_HIDDEN)\n    }\n\n    this._element.classList.remove(CLASS_NAME_SHOW)\n    if (this._config.animation) {\n      const transitionDuration = Util.getTransitionDurationFromElement(this._element)\n\n      $(this._element)\n        .one(Util.TRANSITION_END, complete)\n        .emulateTransitionEnd(transitionDuration)\n    } else {\n      complete()\n    }\n  }\n\n  _clearTimeout() {\n    clearTimeout(this._timeout)\n    this._timeout = null\n  }\n\n  // Static\n  static _jQueryInterface(config) {\n    return this.each(function () {\n      const $element = $(this)\n      let data = $element.data(DATA_KEY)\n      const _config = typeof config === 'object' && config\n\n      if (!data) {\n        data = new Toast(this, _config)\n        $element.data(DATA_KEY, data)\n      }\n\n      if (typeof config === 'string') {\n        if (typeof data[config] === 'undefined') {\n          throw new TypeError(`No method named \"${config}\"`)\n        }\n\n        data[config](this)\n      }\n    })\n  }\n}\n\n/**\n * jQuery\n */\n\n$.fn[NAME] = Toast._jQueryInterface\n$.fn[NAME].Constructor = Toast\n$.fn[NAME].noConflict = () => {\n  $.fn[NAME] = JQUERY_NO_CONFLICT\n  return Toast._jQueryInterface\n}\n\nexport default Toast\n",null,null,null,null,null,"export default function esCompat(m) {\n  return m?.__esModule ? m : { default: m, ...m };\n}\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, type ElementFromTagName } 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  T extends keyof HTMLElementTagNameMap = 'div',\n> {\n  Element: ElementFromTagName<T>;\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    defaultClass?: string;\n    overlay?: boolean;\n    htmlTag?: T | 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<\n  T extends keyof HTMLElementTagNameMap,\n> extends Component<BasicDropdownContentSignature<T>> {\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  get tag(): keyof HTMLElementTagNameMap {\n    return this.args.htmlTag || 'div';\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/ember-power-addons/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((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 (typeof this.args.dropdown?.actions?.getTriggerElement === 'function') {\n      triggerElement = this.args.dropdown?.actions?.getTriggerElement();\n    }\n    if (!triggerElement) {\n      triggerElement = document.querySelector(selector);\n    }\n    this.handleRootMouseDown = (e: MouseEvent | TouchEvent): void => {\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\n  initiallyReposition = modifier(() => {\n    // Escape autotracking frame and avoid backtracking re-render\n    void Promise.resolve().then(() => {\n      this.args.dropdown?.actions.reposition();\n    });\n  });\n\n  animateInAndOut = modifier((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\n  observeMutations = modifier((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\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 this.tag) 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              ...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 this.tag) 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                ...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, type ElementFromTagName } 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 {\n  Dropdown,\n  HorizontalPosition,\n  VerticalPosition,\n} from '../types.ts';\n\nexport interface BasicDropdownTriggerSignature<\n  T extends keyof HTMLElementTagNameMap = 'div',\n> {\n  Element: ElementFromTagName<T>;\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?: T | 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<\n  T extends keyof HTMLElementTagNameMap,\n> extends Component<BasicDropdownTriggerSignature<T>> {\n  get tag(): keyof HTMLElementTagNameMap {\n    return this.args.htmlTag || 'div';\n  }\n\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/ember-power-addons/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 this.tag) 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 { getConfig } from '../config.ts';\n\nexport interface BasicDropdownWormholeSignature {\n  Element: HTMLElement;\n}\n\nexport default class BasicDropdownWormhole extends Component<BasicDropdownWormholeSignature> {\n  get getDestinationId(): string {\n    const config = getConfig();\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 { 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 { isTesting } from '@embroider/macros';\nimport { getConfig } from '../config.ts';\nimport type Owner from '@ember/owner';\nimport type { ComponentLike } from '@glint/template';\nimport type {\n  CalculatePosition,\n  CalculatePositionResult,\n  HorizontalPosition,\n  VerticalPosition,\n} from '../utils/calculate-position.ts';\nimport type { BasicDropdownTriggerSignature } from './basic-dropdown-trigger.gts';\nimport type { BasicDropdownContentSignature } from './basic-dropdown-content.gts';\nimport type {\n  Dropdown,\n  DropdownActions,\n  RepositionChanges,\n  TRootEventType,\n} from '../types.ts';\n\nconst IGNORED_STYLES = ['top', 'left', 'right', 'width', 'height'];\n\nexport interface BasicDropdownDefaultBlock<\n  TriggerHtmlTag extends keyof HTMLElementTagNameMap = 'div',\n  ContentHtmlTag extends keyof HTMLElementTagNameMap = 'div',\n> {\n  uniqueId: string;\n  disabled: boolean;\n  isOpen: boolean;\n  actions: DropdownActions;\n  Trigger: ComponentLike<\n    Omit<BasicDropdownTriggerSignature<TriggerHtmlTag>, 'Args'> & {\n      Args: Omit<\n        BasicDropdownTriggerSignature<TriggerHtmlTag>['Args'],\n        'htmlTag' | 'dropdown' | 'hPosition' | 'vPosition' | 'renderInPlace'\n      >;\n    }\n  >;\n  Content: ComponentLike<\n    Omit<BasicDropdownContentSignature<ContentHtmlTag>, 'Args'> & {\n      Args: Omit<\n        BasicDropdownContentSignature<ContentHtmlTag>['Args'],\n        | 'htmlTag'\n        | 'dropdown'\n        | 'hPosition'\n        | 'vPosition'\n        | 'renderInPlace'\n        | 'destination'\n        | 'destinationElement'\n        | 'top'\n        | 'left'\n        | 'right'\n        | 'width'\n        | 'height'\n        | 'otherStyles'\n        | 'preventScroll'\n        | 'rootEventType'\n      >;\n    }\n  >;\n}\n\nexport interface BasicDropdownSignature<\n  TriggerHtmlTag extends keyof HTMLElementTagNameMap = 'div',\n  ContentHtmlTag extends keyof HTMLElementTagNameMap = 'div',\n> {\n  Element: HTMLElement;\n  Args: BasicDropdownArgs<TriggerHtmlTag, ContentHtmlTag>;\n  Blocks: {\n    default: [BasicDropdownDefaultBlock<TriggerHtmlTag, ContentHtmlTag>];\n  };\n}\n\nexport interface BasicDropdownArgs<\n  TriggerHtmlTag extends keyof HTMLElementTagNameMap = 'div',\n  ContentHtmlTag extends keyof HTMLElementTagNameMap = 'div',\n> {\n  initiallyOpened?: boolean;\n  renderInPlace?: boolean;\n  verticalPosition?: VerticalPosition;\n  horizontalPosition?: HorizontalPosition;\n  destination?: string;\n  destinationElement?: HTMLElement;\n  disabled?: boolean;\n  rootEventType?: TRootEventType;\n  preventScroll?: boolean;\n  matchTriggerWidth?: boolean;\n  triggerHtmlTag?: TriggerHtmlTag;\n  contentHtmlTag?: ContentHtmlTag;\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    | ComponentLike<BasicDropdownTriggerSignature<TriggerHtmlTag>>\n    | undefined;\n  contentComponent?:\n    | ComponentLike<BasicDropdownContentSignature<ContentHtmlTag>>\n    | undefined;\n  calculatePosition?: CalculatePosition;\n}\n\nexport default class BasicDropdown<\n  TriggerHtmlTag extends keyof HTMLElementTagNameMap = 'div',\n  ContentHtmlTag extends keyof HTMLElementTagNameMap = 'div',\n> extends Component<BasicDropdownSignature<TriggerHtmlTag, ContentHtmlTag>> {\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 renderInPlace =\n    this.args.renderInPlace !== undefined ? this.args.renderInPlace : false;\n  @tracked private _isOpen = this.args.initiallyOpened || false;\n\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 = `ember-basic-dropdown-content-${this._uid}`;\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    updatePublicApi: this.updatePublicApi.bind(this),\n    registerTriggerElement: this.registerTriggerElement.bind(this),\n    registerDropdownElement: this.registerDropdownElement.bind(this),\n    getTriggerElement: () => this.triggerElement,\n  };\n\n  private get horizontalPosition(): HorizontalPosition {\n    return this.args.horizontalPosition || 'auto'; // auto-right | right | center | left\n  }\n\n  private get verticalPosition(): VerticalPosition {\n    return this.args.verticalPosition || 'auto'; // above | below\n  }\n\n  get isOpen(): boolean {\n    return !this.disabled && this._isOpen;\n  }\n\n  set isOpen(v: boolean) {\n    this._isOpen = v;\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    return this.args.disabled || false;\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(\n    owner: Owner,\n    args: BasicDropdownArgs<TriggerHtmlTag, ContentHtmlTag>,\n  ) {\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\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      },\n    );\n    return this.applyReposition(triggerElement, dropdownElement, positionData);\n  }\n\n  @action\n  updatePublicApi() {\n    if (!this.args.registerAPI) {\n      return;\n    }\n\n    this.args.registerAPI(this.publicAPI);\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    const config = getConfig();\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<\n    BasicDropdownTriggerSignature<TriggerHtmlTag>\n  > {\n    return this.args.triggerComponent || BasicDropdownTrigger;\n  }\n\n  get contentComponent(): ComponentLike<\n    BasicDropdownContentSignature<ContentHtmlTag>\n  > {\n    return this.args.contentComponent || BasicDropdownContent;\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\nexport function setConfig(config: Config) {\n  _config = config;\n}\n\nexport function getConfig(): Config {\n  return _config;\n}\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  private _previousDisabled: boolean | undefined = 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\n    if (this._previousDisabled === undefined) {\n      this._previousDisabled = this.dropdown.disabled;\n    }\n\n    if (this.dropdown.disabled !== this._previousDisabled) {\n      this._previousDisabled = this.dropdown.disabled;\n\n      this.dropdown.actions.updatePublicApi();\n    }\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 { 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}\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: HTMLElement,\n  content: HTMLElement,\n  destination: HTMLElement,\n  options: CalculatePositionOptions,\n) => CalculatePositionResult;\n\ntype GetViewDataResult = {\n  scroll: { left: number; top: number };\n  triggerLeft: number;\n  triggerTop: number;\n  triggerWidth: number;\n  triggerHeight: number;\n  dropdownHeight: number;\n  dropdownWidth: number;\n  viewportWidth: number;\n  viewportBottom: number;\n};\n\ntype GetViewData = (\n  trigger: Element,\n  content: HTMLElement,\n  renderInPlace: boolean,\n) => GetViewDataResult;\n\nconst getViewData: GetViewData = (trigger, content, renderInPlace) => {\n  let scroll = { left: window.pageXOffset, top: window.pageYOffset };\n  if (renderInPlace) {\n    scroll = {\n      left: window.scrollX,\n      top: window.scrollY,\n    };\n  }\n\n  const {\n    left: triggerLeft,\n    top: triggerTop,\n    width: triggerWidth,\n    height: triggerHeight,\n  } = trigger.getBoundingClientRect();\n  const { height: dropdownHeight, width: dropdownWidth } =\n    content.getBoundingClientRect();\n  const viewportWidth = document.body.clientWidth || window.innerWidth;\n  const viewportBottom = scroll.top + window.innerHeight;\n\n  return {\n    scroll,\n    // The properties top and left of the trigger client rectangle need to be absolute to\n    // the top left corner of the document as the value it's compared to is also the total\n    // height and not only the viewport height (window client height + scroll offset).\n    triggerLeft: triggerLeft + (renderInPlace ? window.scrollX : 0),\n    triggerTop: triggerTop + (renderInPlace ? window.scrollY : 0),\n    triggerWidth,\n    triggerHeight,\n    dropdownHeight,\n    dropdownWidth,\n    viewportWidth,\n    viewportBottom,\n  };\n};\n\nexport function calculateWormholedPosition(\n  trigger: HTMLElement,\n  content: HTMLElement,\n  destination: HTMLElement,\n  {\n    horizontalPosition,\n    verticalPosition,\n    matchTriggerWidth,\n    previousHorizontalPosition,\n    previousVerticalPosition,\n  }: CalculatePositionOptions,\n): CalculatePositionResult {\n  // Collect information about all the involved DOM elements\n  const viewData = getViewData(trigger, content, false);\n  const {\n    scroll,\n    triggerWidth,\n    triggerHeight,\n    dropdownHeight,\n    viewportWidth,\n    viewportBottom,\n  } = viewData;\n  let { triggerLeft, triggerTop, dropdownWidth } = viewData;\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 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 function calculateInPlacePosition(\n  trigger: HTMLElement,\n  content: HTMLElement,\n  _destination: HTMLElement,\n  { horizontalPosition, verticalPosition }: CalculatePositionOptions,\n): CalculatePositionResult {\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 if (verticalPosition === 'below') {\n    positionData.verticalPosition = 'below';\n  } else {\n    // Automatically determine if there is enough space above or below\n    const { triggerTop, triggerHeight, dropdownHeight, viewportBottom } =\n      getViewData(trigger, content, true);\n\n    const enoughRoomBelow =\n      triggerTop + triggerHeight + dropdownHeight < viewportBottom;\n    const enoughRoomAbove = triggerTop > dropdownHeight;\n\n    if (enoughRoomBelow) {\n      verticalPosition = 'below';\n    } else if (enoughRoomAbove) {\n      verticalPosition = 'above';\n      dropdownRect = dropdownRect || content.getBoundingClientRect();\n      positionData.style.top = -dropdownRect.height;\n    } else {\n      // Not enough space above or below\n      verticalPosition = 'below';\n    }\n    positionData.verticalPosition = verticalPosition;\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}\n\nfunction calculatePosition(\n  trigger: HTMLElement,\n  content: HTMLElement,\n  destination: HTMLElement,\n  options: CalculatePositionOptions,\n): CalculatePositionResult {\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    (moveEvent.changedTouches[0] as unknown as { touchType: string })\n      .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 { 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 { 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","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","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 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 { 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","class BoundedPolicy {\n  constructor(maxConcurrency) {\n    this.maxConcurrency = maxConcurrency || 1;\n  }\n}\n\nexport default BoundedPolicy;\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 { 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","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 Ember from 'ember';\n\nimport { computed } from '@ember/object';\n\nimport DropSchedulerPolicy from './external/scheduler/policies/drop-policy';\nimport EnqueueSchedulerPolicy from './external/scheduler/policies/enqueued-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(async (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   * import Component from '@glimmer/component';\n   * import { task } from 'ember-concurrency';\n   * import { on } from '@ember/object/evented';\n   *\n   * export default class MyComponent extends Component {\n   *   uploadTask = task(async (file) => {\n   *     // ... file upload stuff\n   *   }).evented();\n   *\n   *   @on('uploadTask:started')\n   *   uploadedStarted(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   * import Component from '@glimmer/component';\n   * import { task } from 'ember-concurrency';\n   *\n   * export default class MyComponent extends Component {\n   *   pollForUpdates = task(async () => {\n   *     // ... this runs when the Component is first created\n   *     // because we specified .on('init')\n   *   }).on('init');\n   *\n   *   handleFoo = task(async (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;\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 {\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","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","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","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 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 { 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","import { GeneratorState } from '../generator-state';\nimport {\n  cancelableSymbol,\n  YIELDABLE_CANCEL,\n  YIELDABLE_CONTINUE,\n  YIELDABLE_RETURN,\n  YIELDABLE_THROW,\n  yieldableSymbol,\n} from '../yieldables';\nimport { INITIAL_STATE } from './initial-state';\n\nimport {\n  CANCEL_KIND_LIFESPAN_END,\n  CANCEL_KIND_PARENT_CANCEL,\n  CANCEL_KIND_YIELDABLE_CANCEL,\n  CancelRequest,\n  didCancel,\n  TASK_CANCELATION_NAME,\n} from './cancelation';\nimport {\n  COMPLETION_CANCEL,\n  COMPLETION_ERROR,\n  COMPLETION_SUCCESS,\n} from './completion-states';\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(async () => {\n   *   await 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 { 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 { Taskable } from './taskable';\n\nexport class TaskGroup extends Taskable {}\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","import { TaskFactory } from './task-factory';\n\nimport { deprecate } from '@ember/debug';\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  deprecate(\n    'Using @task decorator (or any of its variants) is deprecated. Please use modern `taskName = task(async () => {})` syntax instead',\n    false,\n    {\n      id: 'ember-concurrency.deprecate-decorator-task',\n      for: 'ember-concurrency',\n      since: '4.0.5',\n      until: '5.0.0',\n    },\n  );\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    deprecate(\n      '@lastValue is deprecated is deprecated along with all ember-concurrency decorators. Please use a getter that references taskName.lastSuccessful.value instead.',\n      false,\n      {\n        id: 'ember-concurrency.deprecate-decorator-last-value',\n        for: 'ember-concurrency',\n        since: '4.0.5',\n        until: '5.0.0',\n      },\n    );\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 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 { 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 { 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 { 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   * import Component from '@glimmer/component';\n   * import { task } from 'ember-concurrency';\n   * import { on } from '@ember/object/evented';\n   *\n   * export default class MyComponent extends Component {\n   *   doSomething = task(async () => {\n   *     // ... does something\n   *   });\n   *\n   *   @on('doSomething:started')\n   *   onDoSomethingStarted(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   * import Component from '@glimmer/component';\n   * import { task } from 'ember-concurrency';\n   * import { on } from '@ember/object/evented';\n   *\n   * export default class MyComponent extends Component {\n   *   doSomething = task(async () => {\n   *     // ... does something\n   *   });\n   *\n   *   @on('doSomething:succeeded')\n   *   onDoSomethingSucceeded(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   * import Component from '@glimmer/component';\n   * import { task } from 'ember-concurrency';\n   * import { on } from '@ember/object/evented';\n   *\n   * export default class MyComponent extends Component {\n   *   doSomething = task(async () => {\n   *     // ... does something\n   *   });\n   *\n   *   @on('doSomething:errored')\n   *   onDoSomethingErrored(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   * import Component from '@glimmer/component';\n   * import { task } from 'ember-concurrency';\n   * import { on } from '@ember/object/evented';\n   *\n   * export default class MyComponent extends Component {\n   *   doSomething = task(async () => {\n   *     // ... does something\n   *   });\n   *\n   *   @on('doSomething:canceled')\n   *   onDoSomethingCanceled(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","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 { 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","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 { assert, deprecate } 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  TaskFactory as BaseTaskFactory,\n  registerModifier,\n} from './external/task-factory';\n\nimport { EMBER_ENVIRONMENT } from './ember-environment';\nimport EmberScheduler from './scheduler/ember-scheduler';\nimport { EncapsulatedTask, Task } from './task';\nimport { TaskGroup } from './task-group';\nimport { TaskProperty } from './task-properties';\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\n    deprecate(\n      'Task Groups are deprecated. There is no direct replacement for Task Groups and some refactoring may be necessary.',\n      false,\n      {\n        id: 'ember-concurrency.deprecate-task-group',\n        for: 'ember-concurrency',\n        since: '4.0.5',\n        until: '5.0.0',\n      },\n    );\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 {\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 { assert, deprecate } from '@ember/debug';\nimport {\n  task as taskDecorator,\n  taskGroup as taskGroupDecorator,\n} from './task-decorators';\nimport { TaskFactory } from './task-factory';\nimport {\n  TaskGroupProperty,\n  TaskProperty,\n  taskComputed,\n  taskFactorySymbol,\n} from './task-properties';\n\n// eslint-disable-next-line no-unused-vars\nimport { TaskGroup } from './task-group';\n\n/**\n * A Task is a cancelable, restartable, asynchronous operation that\n * is driven by an async 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 * an async arrow function, which will be invoked when the task\n * is performed. Async functions with the await keyword 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` async\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 Component from '@glimmer/component';\n * import { task, timeout } from 'ember-concurrency';\n *\n * export default class MyComponent extends Component {\n *   myTask = task(async () => {\n *     console.log(\"Pausing for a second...\");\n *     await 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} taskFunction the async 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  deprecate(\n    \"Using task() in any form other than `taskName = task(async () => {})` is deprecated. Please use the modern syntax instead (and consider using one of ember-concurrency's codemods).\",\n    false,\n    {\n      id: 'ember-concurrency.deprecate-classic-task-api',\n      for: 'ember-concurrency',\n      since: '4.0.5',\n      until: '5.0.0',\n    },\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, deprecate } from '@ember/debug';\nimport { get } from '@ember/object';\nimport { addObserver, removeObserver } from '@ember/object/observers';\nimport { cancel, schedule } from '@ember/runloop';\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    deprecate(\n      'waitForProperty is deprecated due to its use of observers. Consider using a polling approach instead.',\n      false,\n      {\n        id: 'ember-concurrency.deprecate-wait-for-property',\n        for: 'ember-concurrency',\n        since: '4.0.5',\n        until: '5.0.0',\n      },\n    );\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 { 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 Component from '@glimmer/component';\nimport { tracked } from '@glimmer/tracking';\nimport { htmlSafe } from '@ember/template';\nimport { next, cancel } from '@ember/runloop';\nimport { on } from '@ember/modifier';\nimport { modifier } from 'ember-modifier';\n\nimport type { Timer } from '@ember/runloop';\nimport type FlashObject from '../flash/object.ts';\n\n// FlashObject with custom properties from T accessible in yielded block\ntype FlashWithCustomProps<T extends Record<string, unknown>> = FlashObject<T> &\n  T;\n\nexport interface FlashMessageSignature<\n  T extends Record<string, unknown> = Record<string, unknown>,\n> {\n  Args: {\n    flash: FlashObject<T>;\n    messageStyle?: 'bootstrap' | 'foundation';\n    messageStylePrefix?: string;\n    exitingClass?: string;\n  };\n  Element: HTMLDivElement;\n  Blocks: {\n    default: [FlashMessage<T>, FlashWithCustomProps<T>, onClose: () => void];\n  };\n}\n\nexport default class FlashMessage<\n  T extends Record<string, unknown> = Record<string, unknown>,\n> extends Component<FlashMessageSignature<T>> {\n  @tracked active = false;\n  @tracked pendingSet: Timer | undefined;\n  @tracked _mouseEnterHandler: ((event?: Event) => void) | undefined;\n  @tracked _mouseLeaveHandler: ((event?: Event) => void) | undefined;\n\n  get messageStyle() {\n    return this.args.messageStyle ?? 'bootstrap';\n  }\n\n  // Expose flash with custom properties typed (for yielding to blocks)\n  get flash(): FlashWithCustomProps<T> {\n    return this.args.flash as FlashWithCustomProps<T>;\n  }\n\n  get showProgress() {\n    return this.args.flash.showProgress;\n  }\n\n  get notExiting() {\n    return !this.exiting;\n  }\n\n  get showProgressBar() {\n    return this.showProgress && this.notExiting;\n  }\n\n  get exiting() {\n    return this.args.flash.exiting;\n  }\n\n  get exitingClass() {\n    return this.args.exitingClass || 'exiting';\n  }\n\n  get messageStylePrefix() {\n    return this.args.messageStylePrefix ?? this._defaultMessageStylePrefix;\n  }\n\n  get _defaultMessageStylePrefix() {\n    const isFoundation = this.messageStyle === 'foundation';\n    return isFoundation ? 'alert-box ' : 'alert alert-';\n  }\n\n  get alertType() {\n    const flashType = this.args.flash.type || '';\n    const prefix = this.messageStylePrefix;\n    return `${prefix}${flashType}`;\n  }\n\n  get flashType() {\n    const type = this.args.flash.type || '';\n    return type.charAt(0).toUpperCase() + type.slice(1);\n  }\n\n  get classNames() {\n    const classes = ['flash-message', this.alertType];\n\n    if (this.exiting) classes.push(this.exitingClass);\n    if (this.active) classes.push('active');\n\n    return classes.join(' ');\n  }\n\n  get progressDuration() {\n    if (!this.args.flash?.showProgress) {\n      return undefined;\n    }\n\n    const duration = this.args.flash?.timeout || 0;\n    return htmlSafe(`transition-duration: ${duration}ms`);\n  }\n\n  #mouseEnter = () => {\n    if (this.args.flash) {\n      this.args.flash.preventExit();\n    }\n  };\n\n  #mouseLeave = () => {\n    if (this.args.flash && !this.args.flash.exiting) {\n      this.args.flash.allowExit();\n    }\n  };\n\n  #destroyFlashMessage() {\n    if (this.args.flash) {\n      this.args.flash.destroyMessage();\n    }\n  }\n\n  onClick = () => {\n    const destroyOnClick = this.args.flash?.destroyOnClick ?? true;\n\n    if (destroyOnClick) {\n      this.#destroyFlashMessage();\n    }\n  };\n\n  onClose = () => {\n    this.#destroyFlashMessage();\n  };\n\n  bindEvents = modifier((element: Element) => {\n    // eslint-disable-next-line ember/no-runloop\n    const pendingSet = next(this, () => {\n      this.active = true;\n    });\n\n    this.pendingSet = pendingSet;\n    this._mouseEnterHandler = this.#mouseEnter;\n    this._mouseLeaveHandler = this.#mouseLeave;\n\n    element.addEventListener(\n      'mouseenter',\n      this._mouseEnterHandler as EventListener,\n    );\n\n    element.addEventListener(\n      'mouseleave',\n      this._mouseLeaveHandler as EventListener,\n    );\n\n    return () => {\n      element.removeEventListener(\n        'mouseenter',\n        this._mouseEnterHandler as EventListener,\n      );\n\n      element.removeEventListener(\n        'mouseleave',\n        this._mouseLeaveHandler as EventListener,\n      );\n\n      // eslint-disable-next-line ember/no-runloop\n      cancel(this.pendingSet);\n\n      this.#destroyFlashMessage();\n    };\n  });\n\n  <template>\n    <div\n      class={{this.classNames}}\n      role=\"alert\"\n      ...attributes\n      {{! template-lint-disable no-invalid-interactive }}\n      {{on \"click\" this.onClick}}\n      {{this.bindEvents}}\n    >\n      {{#if (has-block)}}\n        {{yield this this.flash this.onClose}}\n      {{else}}\n        {{@flash.message}}\n        {{#if this.showProgressBar}}\n          <div class=\"alert-progress\">\n            <div\n              class=\"alert-progress-bar\"\n              style={{this.progressDuration}}\n            ></div>\n          </div>\n        {{/if}}\n      {{/if}}\n    </div>\n  </template>\n}\n","import { tracked } from '@glimmer/tracking';\nimport { guidFor } from '@ember/object/internals';\nimport { cancel, later, type Timer } from '@ember/runloop';\nimport { destroy, isDestroyed, registerDestructor } from '@ember/destroyable';\nimport { isTesting, macroCondition } from '@embroider/macros';\n\nimport type { SafeString } from '@ember/template';\n\n// Disable timeout by default when running tests (backward compatible behavior)\nconst defaultDisableTimeout = macroCondition(isTesting()) ? true : false;\n\nexport type Message = string | SafeString;\n\ninterface FlashService<T extends Record<string, unknown>> {\n  queue?: FlashObject<T>[];\n  removeFromGuidSet?(guid: string): void;\n}\n\nexport type FlashObjectOptions<\n  T extends Record<string, unknown> = Record<string, unknown>,\n> = {\n  message?: Message;\n  type?: string;\n  priority?: number;\n  timeout?: number;\n  extendedTimeout?: number;\n  sticky?: boolean;\n  showProgress?: boolean;\n  destroyOnClick?: boolean;\n  preventDuplicates?: boolean;\n  testHelperDisableTimeout?: boolean;\n  flashService?: FlashService<T>;\n  onDestroy?: () => void;\n  onDidDestroyMessage?: () => void;\n  onDidExitMessage?: () => void;\n} & T;\n\nconst INTERNAL_KEYS = new Set([\n  // Lifecycle callbacks — already assigned to `this` above the loop, but\n  // listed here as a safety net in case future refactors change that order.\n  'onDestroy',\n  'onDidDestroyMessage',\n  'onDidExitMessage',\n  // Options consumed by the constructor but not stored as class properties.\n  'testHelperDisableTimeout',\n  // Stored in a private field (#flashService), so `key in this` won't catch it.\n  'flashService',\n]);\n\nexport default class FlashObject<\n  T extends Record<string, unknown> = Record<string, unknown>,\n> {\n  // Static property for test helper to control timeout behavior\n  // Defaults to true in test environment via @embroider/macros\n  static isTimeoutDisabled = defaultDisableTimeout;\n\n  // Note: Custom properties from T are copied at runtime in constructor\n  // TypeScript sees them via FlashObject<T> & T intersection in service/component\n\n  @tracked exiting = false;\n\n  // Core properties with defaults (message is tracked for reactivity)\n  @tracked message: Message;\n  type: string;\n  priority: number;\n  timeout: number;\n  extendedTimeout: number;\n  sticky: boolean;\n  showProgress: boolean;\n  destroyOnClick: boolean;\n  preventDuplicates: boolean;\n\n  // Internal state\n  #isExitable = true;\n  #initializedTime = 0;\n  #timerTask?: Timer;\n  #exitTask?: Timer;\n  #flashService?: FlashService<T>;\n\n  // Callbacks (settable from outside for tests)\n  onDestroy?: () => void;\n  onDidDestroyMessage?: () => void;\n  onDidExitMessage?: () => void;\n\n  get _guid() {\n    const msg = this.message;\n    // Handle SafeString (has toHTML) vs regular string\n    const msgString =\n      typeof msg === 'object' && msg !== null ? msg.toHTML() : String(msg);\n    return guidFor(msgString);\n  }\n\n  constructor(options: FlashObjectOptions<T>) {\n    // Set defaults, then override with options\n    this.message = options.message ?? '';\n    this.type = options.type ?? 'info';\n    this.priority = options.priority ?? 100;\n    // Only use default timeout when explicitly provided in options\n    this.timeout = options.timeout ?? 0;\n    this.extendedTimeout = options.extendedTimeout ?? 0;\n    this.sticky = options.sticky ?? false;\n    this.showProgress = options.showProgress ?? false;\n    this.destroyOnClick = options.destroyOnClick ?? true;\n    this.preventDuplicates = options.preventDuplicates ?? false;\n\n    // Store service reference and callbacks\n    this.#flashService = options.flashService;\n    this.onDestroy = options.onDestroy;\n    this.onDidDestroyMessage = options.onDidDestroyMessage;\n    this.onDidExitMessage = options.onDidExitMessage;\n\n    // Copy any custom properties from T\n    for (const [key, value] of Object.entries(options)) {\n      if (!(key in this) && !INTERNAL_KEYS.has(key)) {\n        (this as Record<string, unknown>)[key] = value;\n      }\n    }\n\n    // Check if timeout should be disabled (static property set by test helpers)\n    const shouldDisableTimeout =\n      options.testHelperDisableTimeout ?? FlashObject.isTimeoutDisabled;\n\n    registerDestructor(this, () => {\n      this.onDestroy?.();\n      this.#cancelAllTimers();\n    });\n\n    if (!shouldDisableTimeout && !this.sticky && this.timeout > 0) {\n      this.#startTimer();\n      this.#initializedTime = Date.now();\n    }\n  }\n\n  /** Destroy this flash message immediately, triggering exit animation. */\n  destroyMessage() {\n    this.#cancelAllTimers();\n    this.#timerTask = undefined;\n    this.#exitTask = undefined;\n\n    this.#startExitTimer();\n  }\n\n  /** Trigger the exit flow (respects isExitable). */\n  exitMessage() {\n    if (!this.#isExitable) return;\n\n    this.#startExitTimer();\n    this.onDidExitMessage?.();\n  }\n\n  /** Prevent the message from exiting (e.g., on mouse enter). */\n  preventExit() {\n    this.#isExitable = false;\n  }\n\n  /** Allow the message to exit again (e.g., on mouse leave). */\n  allowExit() {\n    this.#isExitable = true;\n    this.#checkIfShouldExit();\n  }\n\n  /** Pause the auto-dismiss timer. */\n  pauseTimer() {\n    if (this.#timerTask) {\n      // eslint-disable-next-line ember/no-runloop\n      cancel(this.#timerTask);\n      this.#timerTask = undefined;\n    }\n  }\n\n  /** Resume the auto-dismiss timer with remaining time. */\n  resumeTimer() {\n    if (this.sticky || this.exiting || this.#timerTask) return;\n\n    const elapsed = Date.now() - this.#initializedTime;\n    const remaining = this.timeout - elapsed;\n\n    if (remaining > 0) {\n      // eslint-disable-next-line ember/no-runloop\n      this.#timerTask = later(() => {\n        this.#timerTask = undefined;\n        this.exitMessage();\n      }, remaining);\n    } else {\n      this.exitMessage();\n    }\n  }\n\n  // Expose for component to check\n  get isExitable() {\n    return this.#isExitable;\n  }\n\n  // Expose for testing\n  get timerTaskInstance() {\n    return this.#timerTask;\n  }\n\n  #startTimer() {\n    if (!this.timeout) return;\n\n    // eslint-disable-next-line ember/no-runloop\n    this.#timerTask = later(() => {\n      this.#timerTask = undefined;\n      this.exitMessage();\n    }, this.timeout);\n  }\n\n  #startExitTimer() {\n    if (isDestroyed(this)) return;\n\n    this.exiting = true;\n\n    if (this.extendedTimeout) {\n      // eslint-disable-next-line ember/no-runloop\n      this.#exitTask = later(() => this.#teardown(), this.extendedTimeout);\n    } else {\n      this.#teardown();\n    }\n  }\n\n  #cancelAllTimers() {\n    // eslint-disable-next-line ember/no-runloop\n    if (this.#timerTask) cancel(this.#timerTask);\n    // eslint-disable-next-line ember/no-runloop\n    if (this.#exitTask) cancel(this.#exitTask);\n  }\n\n  #checkIfShouldExit() {\n    const elapsed = Date.now() - this.#initializedTime;\n    if (elapsed >= this.timeout && !this.sticky) {\n      this.#cancelAllTimers();\n      this.exitMessage();\n    }\n  }\n\n  #teardown() {\n    const guid = this._guid;\n\n    // Remove from service queue\n    if (this.#flashService?.queue) {\n      this.#flashService.queue = this.#flashService.queue.filter(\n        (flash) => flash !== this,\n      );\n    }\n\n    // Remove from guid set for duplicate tracking\n    this.#flashService?.removeFromGuidSet?.(guid);\n\n    destroy(this);\n    this.onDidDestroyMessage?.();\n  }\n}\n","import Service from '@ember/service';\nimport { tracked } from '@glimmer/tracking';\nimport { assert, warn } from '@ember/debug';\nimport {\n  registerDestructor,\n  associateDestroyableChild,\n} from '@ember/destroyable';\n\nimport FlashMessage from '../flash/object.ts';\n\nimport type { FlashObjectOptions, Message } from '../flash/object.ts';\nimport type Owner from '@ember/owner';\n\ntype FlashMessageDefaults = {\n  timeout: number;\n  extendedTimeout: number;\n  priority: number;\n  sticky: boolean;\n  showProgress: boolean;\n  type: string;\n  types: string[];\n  preventDuplicates: boolean;\n  destroyOnClick: boolean;\n};\n\ntype FlashMessageOptions<\n  T extends Record<string, unknown> = Record<string, unknown>,\n> = Partial<FlashMessageDefaults> & {\n  message?: Message;\n  onDestroy?: () => void;\n  onDidDestroyMessage?: () => void;\n  onDidExitMessage?: () => void;\n  testHelperDisableTimeout?: boolean;\n} & T;\n\ntype FlashMessageInstance<\n  T extends Record<string, unknown> = Record<string, unknown>,\n> = FlashMessage<T> &\n  T & {\n    _guid: string;\n    priority: number;\n    message: Message;\n    type: string;\n    preventDuplicates: boolean;\n  };\n\ntype FlashTypeFunction<\n  T extends Record<string, unknown> = Record<string, unknown>,\n> = (\n  message: Message,\n  options?: FlashMessageOptions<T>,\n) => FlashMessagesService<T>;\n\nconst DEFAULT_FLASH_MESSAGE_OPTIONS: FlashMessageDefaults = {\n  timeout: 3000,\n  extendedTimeout: 0,\n  priority: 100,\n  sticky: false,\n  showProgress: false,\n  type: 'info',\n  types: ['success', 'info', 'warning', 'danger', 'alert', 'secondary'],\n  preventDuplicates: false,\n  destroyOnClick: true,\n};\n\nexport default class FlashMessagesService<\n  T extends Record<string, unknown> = Record<string, unknown>,\n> extends Service {\n  @tracked queue: FlashMessageInstance<T>[] = [];\n\n  // Set for O(1) duplicate checking\n  #guidSet = new Set<string>();\n\n  // Default message type methods (registered dynamically)\n  declare success: FlashTypeFunction<T>;\n  declare info: FlashTypeFunction<T>;\n  declare warning: FlashTypeFunction<T>;\n  declare danger: FlashTypeFunction<T>;\n  declare alert: FlashTypeFunction<T>;\n  declare secondary: FlashTypeFunction<T>;\n\n  // Index signature for dynamically registered types\n  [key: string]: unknown;\n\n  get arrangedQueue() {\n    return this.queue.slice().sort((a, b) => b.priority - a.priority);\n  }\n\n  get isEmpty() {\n    return this.queue.length === 0;\n  }\n\n  // Backward-compatible getters for default properties (used by tests)\n  get defaultTimeout() {\n    return this.flashMessageDefaults.timeout;\n  }\n\n  get defaultExtendedTimeout() {\n    return this.flashMessageDefaults.extendedTimeout;\n  }\n\n  get defaultPriority() {\n    return this.flashMessageDefaults.priority;\n  }\n\n  get defaultSticky() {\n    return this.flashMessageDefaults.sticky;\n  }\n\n  get defaultShowProgress() {\n    return this.flashMessageDefaults.showProgress;\n  }\n\n  get defaultType() {\n    return this.flashMessageDefaults.type;\n  }\n\n  get defaultTypes() {\n    return this.flashMessageDefaults.types;\n  }\n\n  get defaultPreventDuplicates() {\n    return (\n      this.#overridePreventDuplicates ??\n      this.flashMessageDefaults.preventDuplicates\n    );\n  }\n\n  set defaultPreventDuplicates(value: boolean) {\n    // Allow tests to override default preventDuplicates\n    this.#overridePreventDuplicates = value;\n  }\n\n  // Override storage for tests\n  #overridePreventDuplicates?: boolean;\n\n  /**\n   * For backward compatibility - returns array of message guids\n   */\n  get _guids() {\n    return [...this.#guidSet];\n  }\n\n  constructor(owner: Owner) {\n    super(owner);\n\n    // Register default types\n    this.registerTypes(this.flashMessageDefaults.types);\n\n    registerDestructor(this, () => {\n      this.clearMessages();\n    });\n  }\n\n  /** Add a flash message to the queue. Returns the service for chaining. */\n  add(options: FlashMessageOptions<T> = {} as FlashMessageOptions<T>): this {\n    const flashInstance = this.#createFlashMessage(options);\n    this.#enqueue(flashInstance);\n    return this;\n  }\n\n  /** Clear all flash messages from the queue. */\n  clearMessages(): this | void {\n    if (!this.queue) {\n      return;\n    }\n\n    this.queue.forEach((flash) => flash.destroyMessage());\n    this.queue = [];\n    this.#guidSet.clear();\n\n    return this;\n  }\n\n  /** Register custom flash message types (e.g., 'custom' creates service.custom()). */\n  registerTypes(types: string[] = []): this {\n    types.forEach((type) => this.#registerType(type));\n    return this;\n  }\n\n  /** Get the first flash message in the queue. */\n  peekFirst() {\n    return this.queue[0];\n  }\n\n  /** Get the last flash message in the queue. */\n  peekLast() {\n    return this.queue[this.queue.length - 1];\n  }\n\n  /** Get the last flash message (throws if queue is empty). */\n  getFlashObject() {\n    const errorText = 'A flash message must be added before it can be returned';\n    assert(errorText, this.queue.length);\n    return this.peekLast() as FlashMessageInstance<T>;\n  }\n\n  /**\n   * Find a flash message by a custom field (e.g., 'id').\n   */\n  findBy<K extends keyof FlashMessageInstance<T>>(\n    key: K,\n    value: FlashMessageInstance<T>[K],\n  ): FlashMessageInstance<T> | undefined {\n    return this.queue.find((flash) => flash[key] === value);\n  }\n\n  /**\n   * Remove a flash message by a custom field (e.g., 'id').\n   */\n  removeBy<K extends keyof FlashMessageInstance<T>>(\n    key: K,\n    value: FlashMessageInstance<T>[K],\n  ): boolean {\n    const message = this.findBy(key, value);\n    if (message) {\n      // Remove from queue immediately so the message disappears from the UI\n      // without waiting for the extendedTimeout exit-animation delay.\n      // destroyMessage() still handles timer cleanup and destroyable teardown.\n      this.queue = this.queue.filter((flash) => flash !== message);\n      this.#guidSet.delete(message._guid);\n      message.destroyMessage();\n      return true;\n    }\n    return false;\n  }\n\n  /**\n   * Override this getter to customize defaults:\n   *\n   * ```typescript\n   * export default class MyFlashMessages extends FlashMessagesService {\n   *   get flashMessageDefaults() {\n   *     return { ...super.flashMessageDefaults, timeout: 5000 };\n   *   }\n   * }\n   * ```\n   */\n  get flashMessageDefaults() {\n    return DEFAULT_FLASH_MESSAGE_OPTIONS;\n  }\n\n  #createFlashMessage(\n    options: FlashMessageOptions<T>,\n  ): FlashMessageInstance<T> {\n    const defaults = this.flashMessageDefaults;\n    const preventDuplicates =\n      options.preventDuplicates ??\n      this.#overridePreventDuplicates ??\n      defaults.preventDuplicates;\n\n    assert(\n      'The flash message cannot be empty when preventDuplicates is enabled.',\n      !preventDuplicates || options.message,\n    );\n\n    // Merge defaults with options using spread (simple and clean)\n    const flashOptions: FlashObjectOptions<T> = {\n      timeout: defaults.timeout,\n      extendedTimeout: defaults.extendedTimeout,\n      priority: defaults.priority,\n      sticky: defaults.sticky,\n      showProgress: defaults.showProgress,\n      type: defaults.type,\n      destroyOnClick: defaults.destroyOnClick,\n      preventDuplicates, // Use calculated value, not defaults\n      ...options,\n      flashService: this,\n    } as FlashObjectOptions<T>;\n\n    const message = new FlashMessage<T>(flashOptions);\n    associateDestroyableChild(this, message);\n    return message as FlashMessageInstance<T>;\n  }\n\n  #registerType(type: string) {\n    assert('The flash type cannot be undefined', type);\n\n    (this as Record<string, FlashTypeFunction<T>>)[type] = (\n      message,\n      options = {} as FlashMessageOptions<T>,\n    ) => this.add({ ...options, message, type });\n  }\n\n  #enqueue(flashInstance: FlashMessageInstance<T>) {\n    const preventDuplicates =\n      flashInstance.preventDuplicates ??\n      this.#overridePreventDuplicates ??\n      this.flashMessageDefaults.preventDuplicates;\n\n    const guid = flashInstance._guid;\n\n    if (preventDuplicates && this.#guidSet.has(guid)) {\n      warn(\n        'Attempting to add a duplicate message to the Flash Messages Service',\n        false,\n        { id: 'ember-cli-flash.duplicate-message' },\n      );\n      return;\n    }\n\n    // Always track guid for _guids getter\n    this.#guidSet.add(guid);\n    this.queue = [...this.queue, flashInstance];\n  }\n\n  /**\n   * Called by FlashObject when it's destroyed to remove from guid set\n   */\n  removeFromGuidSet(guid: string) {\n    this.#guidSet.delete(guid);\n  }\n}\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 { graphFor, peekGraph, isBelongsTo } from '@ember-data/graph/-private';\nimport { logGroup, isStableIdentifier, isDocumentIdentifier } from '@ember-data/store/-private';\nimport Fuse from 'fuse.js';\nimport jsonToAst from 'json-to-ast';\nimport { macroCondition, getGlobalConfig } from '@embroider/macros';\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}\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 attrs = Array.from(allFields.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}\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}\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}\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 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 to not have its own resource data. 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 to not have its own resource data. 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}\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 (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\n/**\n * @module @ember-data/json-api\n */\n\nfunction isImplicit(relationship) {\n  return relationship.definition.isImplicit;\n}\nfunction upgradeCapabilities(obj) {}\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  A JSON:API Cache implementation.\n\n  What cache the store uses is configurable. Using a different\n  implementation can be achieved by implementing the store's\n  createCache hook.\n\n  This is the cache implementation used by `ember-data`.\n\n  ```js\n  import Cache from '@ember-data/json-api';\n  import Store from '@ember-data/store';\n\n  export default class extends Store {\n    createCache(wrapper) {\n      return new Cache(wrapper);\n    }\n  }\n  ```\n\n  @class Cache\n  @public\n */\n\nclass JSONAPICache {\n  /**\n   * The Cache Version that this implementation implements.\n   *\n   * @type {'2'}\n   * @public\n   * @property version\n   */\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  // 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   * @method put\n   * @param {StructuredDocument} doc\n   * @return {ResourceDocument}\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      identifierCache\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, identifierCache, 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, identifierCache, 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, identifierCache, jsonApiDoc.data);\n    return this._putDocument(doc, identifier, included);\n  }\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.identifierCache.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 && isStableIdentifier(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   * @method patch\n   * @public\n   * @param {Operation|Operation[]} op the operation or list of operations to perform\n   * @return {void}\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      upgradeCapabilities(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   * @method mutate\n   * @param {Mutation} mutation\n   * @return {void}\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   * @method peek\n   * @public\n   * @param {StableRecordIdentifier | StableDocumentIdentifier} identifier\n   * @return {ResourceDocument | ResourceObject | null} the known resource data\n   */\n\n  peek(identifier) {\n    if ('type' in 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 = 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      upgradeCapabilities(this._capabilities);\n      const store = this._capabilities._store;\n      const attrs = this._capabilities.schema.fields(identifier);\n      attrs.forEach((attr, key) => {\n        if (attr.kind === 'alias') {\n          return;\n        }\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  peekRemoteState(identifier) {\n    if ('type' in 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 = Object.assign({}, 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] = this.__graph.getData(identifier, key);\n          }\n        });\n      }\n      upgradeCapabilities(this._capabilities);\n      const store = this._capabilities._store;\n      const attrs = this._capabilities.schema.fields(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   * 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   * @method peekRequest\n   * @param {StableDocumentIdentifier}\n   * @return {StructuredDocument<ResourceDocument> | null}\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   * @method upsert\n   * @public\n   * @param identifier\n   * @param data\n   * @param hasRecord\n   * @return {void | string[]} if `hasRecord` is true then calculated key changes should be returned\n   */\n  upsert(identifier, data, calculateChanges) {\n    upgradeCapabilities(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  // 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   * @method fork\n   * @internal\n   * @return Promise<Cache>\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   * @method merge\n   * @param {Cache} cache\n   * @public\n   * @return Promise<void>\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: StableRecordIdentifier | StableDocumentIdentifier;\n   *  op: 'upsert' | 'remove';\n   *  patch?: unknown;\n   * }\n   * ```\n   *\n   * @method diff\n   * @public\n   */\n  diff() {\n    throw new Error(`Not Implemented`);\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   * @method dump\n   * @return {Promise<ReadableStream>}\n   * @public\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   * @method hydrate\n   * @param {ReadableStream} stream\n   * @return {Promise<void>}\n   * @public\n   */\n  hydrate(stream) {\n    throw new Error('Not Implemented');\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   * @method clientDidCreate\n   * @public\n   * @param identifier\n   * @param createArgs\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(`EmberData | Mutation - clientDidCreate ${identifier.lid}`, _data);\n        } catch {\n          // eslint-disable-next-line no-console\n          console.log(`EmberData | 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 storeWrapper = this._capabilities;\n      const fields = storeWrapper.schema.fields(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   * @method willCommit\n   * @public\n   * @param identifier\n   */\n  willCommit(identifier) {\n    const cached = this.__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 = this._capabilities.schema.fields(identifier);\n        fields.forEach((schema, name) => {\n          if (schema.kind === 'belongsTo') {\n            if (this.__graph._isDirty(identifier, name)) {\n              const relationshipData = this.__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\n  /**\n   * [LIFECYCLE] Signals to the cache that a resource\n   * was successfully updated as part of a save transaction.\n   *\n   * @method didCommit\n   * @public\n   * @param identifier\n   * @param data\n   */\n  didCommit(committedIdentifier, result) {\n    const payload = result.content;\n    const operation = result.request.op;\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(`EmberData | Payload - ${operation}`, payloadCopy);\n        } catch {\n          // eslint-disable-next-line no-console\n          console.log(`EmberData | Payload - ${operation}`, payload);\n        }\n      }\n    }\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      identifierCache\n    } = this._capabilities;\n    const existingId = committedIdentifier.id;\n    const identifier = operation !== 'deleteRecord' && data ? identifierCache.updateRecordIdentifier(committedIdentifier, data) : committedIdentifier;\n    const cached = this.__peek(identifier, false);\n    if (cached.isDeleted) {\n      this.__graph.push({\n        op: 'deleteRecord',\n        record: identifier,\n        isNew: false\n      });\n      cached.isDeletionCommitted = true;\n      this._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 = this._capabilities.schema.fields(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        this._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 ? this._capabilities.identifierCache.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(this.__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      this._capabilities.notifyChange(identifier, 'errors', null);\n    }\n    if (changedKeys?.size) notifyAttributes(this._capabilities, identifier, changedKeys);\n    this._capabilities.notifyChange(identifier, 'state', null);\n    const included = payload && payload.included;\n    if (included) {\n      for (let i = 0, length = included.length; i < length; i++) {\n        putOne(this, identifierCache, included[i]);\n      }\n    }\n    return {\n      data: identifier\n    };\n  }\n\n  /**\n   * [LIFECYCLE] Signals to the cache that a resource\n   * was update via a save transaction failed.\n   *\n   * @method commitWasRejected\n   * @public\n   * @param identifier\n   * @param errors\n   */\n  commitWasRejected(identifier, errors) {\n    const cached = this.__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    this._capabilities.notifyChange(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   * @method unloadRecord\n   * @public\n   * @param identifier\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  // Granular Resource Data APIs\n  // ===========================\n\n  /**\n   * Retrieve the data for an attribute from the cache\n   *\n   * @method getAttr\n   * @public\n   * @param identifier\n   * @param field\n   * @return {unknown}\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 = this._capabilities.schema.fields(identifier).get(attribute);\n        upgradeCapabilities(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 SchemaRecord\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  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 = this._capabilities.schema.fields(identifier).get(attribute);\n        upgradeCapabilities(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 SchemaRecord\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   * @method setAttr\n   * @public\n   * @param identifier\n   * @param field\n   * @param value\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   * @method changedAttrs\n   * @public\n   * @param identifier\n   * @return {ChangedAttributesHash} { <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   * @method hasChangedAttrs\n   * @public\n   * @param identifier\n   * @return {boolean}\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   * @method rollbackAttrs\n   * @public\n   * @param identifier\n   * @return {string[]} 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: StableRecordIdentifier[];\n        additions: Set<StableRecordIdentifier>;\n        removals: Set<StableRecordIdentifier>;\n        localState: StableRecordIdentifier[];\n        reordered: boolean;\n      }\n    | {\n        kind: 'resource';\n        remoteState: StableRecordIdentifier | null;\n        localState: StableRecordIdentifier | null;\n      };\n      ```\n     *\n     * @method changedRelationships\n     * @public\n     * @param {StableRecordIdentifier} identifier\n     * @return {Map<string, RelationshipDiff>}\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   * @method hasChangedRelationships\n   * @public\n   * @param {StableRecordIdentifier} identifier\n   * @return {boolean}\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   * @method rollbackRelationships\n   * @public\n   * @param {StableRecordIdentifier} identifier\n   * @return {string[]} the names of relationships that were restored\n   */\n  rollbackRelationships(identifier) {\n    upgradeCapabilities(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   * @method getRelationship\n   * @public\n   * @param identifier\n   * @param field\n   * @return resource relationship object\n   */\n  getRelationship(identifier, field) {\n    return this.__graph.getData(identifier, field);\n  }\n  getRemoteRelationship(identifier, field) {\n    return this.__graph.getRemoteData(identifier, field);\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   * @method setIsDeleted\n   * @public\n   * @param identifier\n   * @param isDeleted {boolean}\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   * @method getErrors\n   * @public\n   * @param identifier\n   * @return {JsonApiError[]}\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   * @method isEmpty\n   * @public\n   * @param identifier\n   * @return {boolean}\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   * @method isNew\n   * @public\n   * @param identifier\n   * @return {boolean}\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   * @method isDeleted\n   * @public\n   * @param identifier\n   * @return {boolean}\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   * @method isDeletionCommitted\n   * @public\n   * @param identifier\n   * @return {boolean}\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   * @method _createCache\n   * @internal\n   * @param {StableRecordIdentifier} identifier\n   * @return {CachedResource}\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   * @method __safePeek\n   * @param {StableRecordIdentifier} identifier\n   * @param {Boolean} allowDestroyed\n   * @internal\n   * @return {CachedResource | undefined}\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   * @method __Peek\n   * @param {StableRecordIdentifier} identifier\n   * @param {Boolean} allowDestroyed\n   * @internal\n   * @return {CachedResource}\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  macroCondition(getGlobalConfig().WarpDrive.env.DEBUG) ? (test => {\n    if (!test) {\n      throw new Error(`AliasFields should not be directly accessed from the cache`);\n    }\n  })(schema?.kind !== 'alias') : {};\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  // 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.peekRecordIdentifier(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 = cache._capabilities.schema.fields(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 = isStableIdentifier(op.record);\n  const isDocument = !isRecord && isDocumentIdentifier(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 = Cache._capabilities.schema.fields(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}\nexport { JSONAPICache as default };","import { getOwner } from '@ember/application';\nimport { recordIdentifierFor } from '@ember-data/store';\nimport { _deprecatingNormalize } from '@ember-data/store/-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-Dlia0pw1.js\";\nimport { macroCondition, getGlobalConfig, importSync } from '@embroider/macros';\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: Ember Data 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.`, `Ember Data 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  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  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  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      const {\n        waitForPromise\n      } = importSync('@ember/test-waiters');\n      promise = waitForPromise(promise);\n    }\n  }\n  return promise;\n}\nfunction query(context) {\n  const {\n    store,\n    data\n  } = context.request;\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 * @module @ember-data/store\n * @class Store\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    @method adapterFor\n    @public\n    @param {String} modelName\n    @return Adapter\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    @method serializerFor\n    @public\n    @param {String} modelName the record to serialize\n    @return {Serializer}\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 that\n    [push](../methods/push?anchor=push) expects.\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    @method normalize\n    @public\n    @param {String} modelName The name of the model type for this payload\n    @param {Object} payload\n    @return {Object} 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    ```app/serializers/application.js\n    import RESTSerializer from '@ember-data/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    ```app/serializers/application.js\n    import RESTSerializer from '@ember-data/serializer/rest';\n\n     export default class ApplicationSerializer extends RESTSerializer;\n    ```\n\n    ```app/serializers/post.js\n    import JSONSerializer from '@ember-data/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    @method pushPayload\n    @public\n    @param {String} modelName Optionally, a model type used to determine which serializer will be used\n    @param {Object} 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 { f as cloneResponseProperties } from \"./debug-nHWzWIMX.js\";\nimport { macroCondition, getGlobalConfig } from '@embroider/macros';\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 Fetch from '@ember-data/request/fetch';\n *\n * manager.use([Fetch]);\n * ```\n *\n * @module @ember-data/request/fetch\n * @main @ember-data/request/fetch\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 * A basic handler which converts a request into a\n * `fetch` call presuming the response to be `json`.\n *\n * ```ts\n * import Fetch from '@ember-data/request/fetch';\n *\n * manager.use([Fetch]);\n * ```\n *\n * @class Fetch\n * @public\n */\nconst Fetch = {\n  async request(context) {\n    let response;\n    try {\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        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}\nexport { Fetch as default };","import 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/hooks';\nimport RequestManager from '@ember-data/request';\nimport Fetch from '@ember-data/request/fetch';\nimport BaseStore, { CacheHandler } from '@ember-data/store';\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([LegacyNetworkHandler, 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(identifier, createRecordArgs) {\n    return instantiateRecord.call(this, identifier, createRecordArgs);\n  }\n  teardownRecord(record) {\n    teardownRecord.call(this, record);\n  }\n  modelFor(type) {\n    return modelFor.call(this, type) || super.modelFor(type);\n  }\n  adapterFor = adapterFor;\n  serializerFor = serializerFor;\n  pushPayload = pushPayload;\n  normalize = normalize;\n  serializeRecord = serializeRecord;\n  destroy() {\n    cleanup.call(this);\n    super.destroy();\n  }\n}\nexport { Store as default };","// 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","/* eslint-disable import/extensions */\nimport { Inflector, pluralize, singularize } from './lib/system';\n\nexport default Inflector;\n\nexport { pluralize, singularize };\n","import {\n  tabbable,\n  focusable,\n  isFocusable,\n  isTabbable,\n  getTabIndex,\n} from 'tabbable';\n\nconst activeFocusTraps = {\n  // Returns the trap from the top of the stack.\n  getActiveTrap(trapStack) {\n    if (trapStack?.length > 0) {\n      return trapStack[trapStack.length - 1];\n    }\n    return null;\n  },\n\n  // Pauses the currently active trap, then adds a new trap to the stack.\n  activateTrap(trapStack, trap) {\n    const activeTrap = activeFocusTraps.getActiveTrap(trapStack);\n\n    if (trap !== activeTrap) {\n      activeFocusTraps.pauseTrap(trapStack);\n    }\n\n    const trapIndex = trapStack.indexOf(trap);\n    if (trapIndex === -1) {\n      trapStack.push(trap);\n    } else {\n      // move this existing trap to the front of the queue\n      trapStack.splice(trapIndex, 1);\n      trapStack.push(trap);\n    }\n  },\n\n  // Removes the trap from the top of the stack, then unpauses the next trap down.\n  deactivateTrap(trapStack, trap) {\n    const trapIndex = trapStack.indexOf(trap);\n    if (trapIndex !== -1) {\n      trapStack.splice(trapIndex, 1);\n    }\n\n    activeFocusTraps.unpauseTrap(trapStack);\n  },\n\n  // Pauses the trap at the top of the stack.\n  pauseTrap(trapStack) {\n    const activeTrap = activeFocusTraps.getActiveTrap(trapStack);\n    activeTrap?._setPausedState(true);\n  },\n\n  // Unpauses the trap at the top of the stack.\n  unpauseTrap(trapStack) {\n    const activeTrap = activeFocusTraps.getActiveTrap(trapStack);\n\n    if (activeTrap && !activeTrap._isManuallyPaused()) {\n      activeTrap._setPausedState(false);\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\n// checks for TAB by default\nconst isKeyForward = function (e) {\n  return isTabEvent(e) && !e.shiftKey;\n};\n\n// checks for SHIFT+TAB by default\nconst isKeyBackward = function (e) {\n  return isTabEvent(e) && e.shiftKey;\n};\n\nconst delay = function (fn) {\n  return setTimeout(fn, 0);\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\n// NOTE: this must be _outside_ `createFocusTrap()` to make sure all traps in this\n//  current instance use the same stack if `userOptions.trapStack` isn't specified\nconst internalTrapStack = [];\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 trapStack = userOptions?.trapStack || internalTrapStack;\n\n  const config = {\n    returnFocusOnDeactivate: true,\n    escapeDeactivates: true,\n    delayInitialFocus: true,\n    isolateSubtrees: false,\n    isKeyForward,\n    isKeyBackward,\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     *    posTabIndexesFound: boolean,\n     *    firstTabbableNode: HTMLElement|undefined,\n     *    lastTabbableNode: HTMLElement|undefined,\n     *    firstDomTabbableNode: HTMLElement|undefined,\n     *    lastDomTabbableNode: HTMLElement|undefined,\n     *    nextTabbableNode: (node: HTMLElement, forward: boolean) => HTMLElement|undefined\n     *  }>}\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    // references to nodes that are siblings to the ancestors of this trap's containers.\n    /** @type {Set<HTMLElement>} */\n    adjacentElements: new Set(),\n\n    // references to nodes that were inert or aria-hidden before the trap was activated.\n    /** @type {Set<HTMLElement>} */\n    alreadySilent: new Set(),\n    nodeFocusedBeforeActivation: null,\n    mostRecentlyFocusedNode: null,\n    active: false,\n    paused: false,\n    manuallyPaused: 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    // the most recent KeyboardEvent for the configured nav key (typically [SHIFT+]TAB), if any\n    recentNavEvent: 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   * @param {Event} [event] If available, and `element` isn't directly found in any container,\n   *  the event's composed path is used to see if includes any known trap containers in the\n   *  case where the element is inside a Shadow DOM.\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, event) {\n    const composedPath =\n      typeof event?.composedPath === 'function'\n        ? event.composedPath()\n        : undefined;\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        composedPath?.includes(container) ||\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   * @param {Object} options\n   * @param {boolean} [options.hasFallback] True if the option could be a selector string\n   *  and the option allows for a fallback scenario in the case where the selector is\n   *  valid but does not match a node (i.e. the queried node doesn't exist in the DOM).\n   * @param {Array} [options.params] Params to pass to the option if it's a function.\n   * @returns {undefined | null | false | HTMLElement | SVGElement} Returns\n   *  `undefined` if the option is not specified; `null` if the option didn't resolve\n   *  to a node but `options.hasFallback=true`, `false` if the option resolved to `false`\n   *  (node explicitly not given); otherwise, the resolved DOM node.\n   * @throws {Error} If the option is set, not `false`, and is not, or does not\n   *  resolve to a node, unless the option is a selector string and `options.hasFallback=true`.\n   */\n  const getNodeForOption = function (\n    optionName,\n    { hasFallback = false, params = [] } = {}\n  ) {\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      try {\n        node = doc.querySelector(optionValue); // resolve to node, or null if fails\n      } catch (err) {\n        throw new Error(\n          `\\`${optionName}\\` appears to be an invalid selector; error=\"${err.message}\"`\n        );\n      }\n\n      if (!node) {\n        if (!hasFallback) {\n          throw new Error(\n            `\\`${optionName}\\` as selector refers to no known node`\n          );\n        }\n        // else, `node` MUST be `null` because that's what `Document.querySelector()` returns\n        //  if the selector is valid but doesn't match anything\n      }\n    }\n\n    return node;\n  };\n\n  const getInitialFocusNode = function () {\n    let node = getNodeForOption('initialFocus', { hasFallback: true });\n\n    // false explicitly indicates we want no initialFocus at all\n    if (node === false) {\n      return false;\n    }\n\n    if (\n      node === undefined ||\n      (node && !isFocusable(node, config.tabbableOptions))\n    ) {\n      // option not specified nor focusable: 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    } else if (node === null) {\n      // option is a VALID selector string that doesn't yield a node: use the `fallbackFocus`\n      //  option instead of the default behavior when the option isn't specified at all\n      node = getNodeForOption('fallbackFocus');\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 since nodes with negative `tabindex` attributes\n      //  are focusable but not tabbable\n      const focusableNodes = focusable(container, config.tabbableOptions);\n\n      const firstTabbableNode =\n        tabbableNodes.length > 0 ? tabbableNodes[0] : undefined;\n      const lastTabbableNode =\n        tabbableNodes.length > 0\n          ? tabbableNodes[tabbableNodes.length - 1]\n          : undefined;\n\n      const firstDomTabbableNode = focusableNodes.find((node) =>\n        isTabbable(node)\n      );\n      const lastDomTabbableNode = focusableNodes\n        .slice()\n        .reverse()\n        .find((node) => isTabbable(node));\n\n      const posTabIndexesFound = !!tabbableNodes.find(\n        (node) => getTabIndex(node) > 0\n      );\n\n      return {\n        container,\n        tabbableNodes,\n        focusableNodes,\n\n        /** True if at least one node with positive `tabindex` was found in this container. */\n        posTabIndexesFound,\n\n        /** First tabbable node in container, __tabindex__ order; `undefined` if none. */\n        firstTabbableNode,\n        /** Last tabbable node in container, __tabindex__ order; `undefined` if none. */\n        lastTabbableNode,\n\n        // NOTE: DOM order is NOT NECESSARILY \"document position\" order, but figuring that out\n        //  would require more than just https://developer.mozilla.org/en-US/docs/Web/API/Node/compareDocumentPosition\n        //  because that API doesn't work with Shadow DOM as well as it should (@see\n        //  https://github.com/whatwg/dom/issues/320) and since this first/last is only needed, so far,\n        //  to address an edge case related to positive tabindex support, this seems like a much easier,\n        //  \"close enough most of the time\" alternative for positive tabindexes which should generally\n        //  be avoided anyway...\n        /** First tabbable node in container, __DOM__ order; `undefined` if none. */\n        firstDomTabbableNode,\n        /** Last tabbable node in container, __DOM__ order; `undefined` if none. */\n        lastDomTabbableNode,\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          const nodeIdx = tabbableNodes.indexOf(node);\n          if (nodeIdx < 0) {\n            // either not tabbable nor focusable, or was focused but not tabbable (negative tabindex):\n            //  since `node` should at least have been focusable, we assume that's the case and mimic\n            //  what browsers do, which is set focus to the next node in __document position order__,\n            //  regardless of positive tabindexes, if any -- and for reasons explained in the NOTE\n            //  above related to `firstDomTabbable` and `lastDomTabbable` properties, we fall back to\n            //  basic DOM order\n            if (forward) {\n              return focusableNodes\n                .slice(focusableNodes.indexOf(node) + 1)\n                .find((el) => isTabbable(el));\n            }\n\n            return focusableNodes\n              .slice(0, focusableNodes.indexOf(node))\n              .reverse()\n              .find((el) => isTabbable(el));\n          }\n\n          return tabbableNodes[nodeIdx + (forward ? 1 : -1)];\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    // NOTE: Positive tabindexes are only properly supported in single-container traps because\n    //  doing it across multiple containers where tabindexes could be all over the place\n    //  would require Tabbable to support multiple containers, would require additional\n    //  specialized Shadow DOM support, and would require Tabbable's multi-container support\n    //  to look at those containers in document position order rather than user-provided\n    //  order (as they are treated in Focus-trap, for legacy reasons). See discussion on\n    //  https://github.com/focus-trap/focus-trap/issues/375 for more details.\n    if (\n      state.containerGroups.find((g) => g.posTabIndexesFound) &&\n      state.containerGroups.length > 1\n    ) {\n      throw new Error(\n        \"At least one node with a positive tabindex was found in one of your focus-trap's multiple containers. Positive tabindexes are only supported in single-container focus-traps.\"\n      );\n    }\n  };\n\n  /**\n   * Gets the current activeElement. If it's a web-component and has open shadow-root\n   * it will recursively search inside shadow roots for the \"true\" activeElement.\n   *\n   * @param {Document | ShadowRoot} el\n   *\n   * @returns {HTMLElement} The element that currently has the focus\n   **/\n  const getActiveElement = function (el) {\n    const activeElement = el.activeElement;\n\n    if (!activeElement) {\n      return;\n    }\n\n    if (\n      activeElement.shadowRoot &&\n      activeElement.shadowRoot.activeElement !== null\n    ) {\n      return getActiveElement(activeElement.shadowRoot);\n    }\n\n    return activeElement;\n  };\n\n  const tryFocus = function (node) {\n    if (node === false) {\n      return;\n    }\n\n    if (node === getActiveElement(document)) {\n      return;\n    }\n\n    if (!node || !node.focus) {\n      tryFocus(getInitialFocusNode());\n      return;\n    }\n\n    node.focus({ preventScroll: !!config.preventScroll });\n    // NOTE: focus() API does not trigger focusIn event so set MRU node manually\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', {\n      params: [previousActiveElement],\n    });\n    return node ? node : node === false ? false : previousActiveElement;\n  };\n\n  /**\n   * Finds the next node (in either direction) where focus should move according to a\n   *  keyboard focus-in event.\n   * @param {Object} params\n   * @param {Node} [params.target] Known target __from which__ to navigate, if any.\n   * @param {KeyboardEvent|FocusEvent} [params.event] Event to use if `target` isn't known (event\n   *  will be used to determine the `target`). Ignored if `target` is specified.\n   * @param {boolean} [params.isBackward] True if focus should move backward.\n   * @returns {Node|undefined} The next node, or `undefined` if a next node couldn't be\n   *  determined given the current state of the trap.\n   */\n  const findNextNavNode = function ({ target, event, isBackward = false }) {\n    target = target || getActualTarget(event);\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, event);\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 into...\n        if (isBackward) {\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 (isBackward) {\n        // REVERSE\n\n        // is the target the first tabbable node in a group?\n        let startOfGroupIndex = state.tabbableGroups.findIndex(\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\n          destinationNode =\n            getTabIndex(target) >= 0\n              ? destinationGroup.lastTabbableNode\n              : destinationGroup.lastDomTabbableNode;\n        } else if (!isTabEvent(event)) {\n          // user must have customized the nav keys so we have to move focus manually _within_\n          //  the active group: do this based on the order determined by tabbable()\n          destinationNode = containerGroup.nextTabbableNode(target, false);\n        }\n      } else {\n        // FORWARD\n\n        // is the target the last tabbable node in a group?\n        let lastOfGroupIndex = state.tabbableGroups.findIndex(\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\n          destinationNode =\n            getTabIndex(target) >= 0\n              ? destinationGroup.firstTabbableNode\n              : destinationGroup.firstDomTabbableNode;\n        } else if (!isTabEvent(event)) {\n          // user must have customized the nav keys so we have to move focus manually _within_\n          //  the active group: do this based on the order determined by tabbable()\n          destinationNode = containerGroup.nextTabbableNode(target);\n        }\n      }\n    } else {\n      // no groups available\n      // NOTE: the fallbackFocus option does not support returning false to opt-out\n      destinationNode = getNodeForOption('fallbackFocus');\n    }\n\n    return destinationNode;\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, e) >= 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        // 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 (and if not focusable, to \"nothing\"); by setting\n        //  `returnFocus: true`, we'll attempt to re-focus the node originally-focused\n        //  on activation (or the configured `setReturnFocus` node), whether the\n        //  outside click was on a focusable node or not\n        returnFocus: config.returnFocusOnDeactivate,\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  // NOTE: the focusIn event is NOT cancelable, so if focus escapes, it may cause unexpected\n  //  scrolling if the node that got focused was out of view; there's nothing we can do to\n  //  prevent that from happening by the time we discover that focus escaped\n  const checkFocusIn = function (event) {\n    const target = getActualTarget(event);\n    const targetContained = findContainerIndex(target, event) >= 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      event.stopImmediatePropagation();\n\n      // focus will escape if the MRU node had a positive tab index and user tried to nav forward;\n      //  it will also escape if the MRU node had a 0 tab index and user tried to nav backward\n      //  toward a node with a positive tab index\n      let nextNode; // next node to focus, if we find one\n      let navAcrossContainers = true;\n      if (state.mostRecentlyFocusedNode) {\n        if (getTabIndex(state.mostRecentlyFocusedNode) > 0) {\n          // MRU container index must be >=0 otherwise we wouldn't have it as an MRU node...\n          const mruContainerIdx = findContainerIndex(\n            state.mostRecentlyFocusedNode\n          );\n          // there MAY not be any tabbable nodes in the container if there are at least 2 containers\n          //  and the MRU node is focusable but not tabbable (focus-trap requires at least 1 container\n          //  with at least one tabbable node in order to function, so this could be the other container\n          //  with nothing tabbable in it)\n          const { tabbableNodes } = state.containerGroups[mruContainerIdx];\n          if (tabbableNodes.length > 0) {\n            // MRU tab index MAY not be found if the MRU node is focusable but not tabbable\n            const mruTabIdx = tabbableNodes.findIndex(\n              (node) => node === state.mostRecentlyFocusedNode\n            );\n            if (mruTabIdx >= 0) {\n              if (config.isKeyForward(state.recentNavEvent)) {\n                if (mruTabIdx + 1 < tabbableNodes.length) {\n                  nextNode = tabbableNodes[mruTabIdx + 1];\n                  navAcrossContainers = false;\n                }\n                // else, don't wrap within the container as focus should move to next/previous\n                //  container\n              } else {\n                if (mruTabIdx - 1 >= 0) {\n                  nextNode = tabbableNodes[mruTabIdx - 1];\n                  navAcrossContainers = false;\n                }\n                // else, don't wrap within the container as focus should move to next/previous\n                //  container\n              }\n              // else, don't find in container order without considering direction too\n            }\n          }\n          // else, no tabbable nodes in that container (which means we must have at least one other\n          //  container with at least one tabbable node in it, otherwise focus-trap would've thrown\n          //  an error the last time updateTabbableNodes() was run): find next node among all known\n          //  containers\n        } else {\n          // check to see if there's at least one tabbable node with a positive tab index inside\n          //  the trap because focus seems to escape when navigating backward from a tabbable node\n          //  with tabindex=0 when this is the case (instead of wrapping to the tabbable node with\n          //  the greatest positive tab index like it should)\n          if (\n            !state.containerGroups.some((g) =>\n              g.tabbableNodes.some((n) => getTabIndex(n) > 0)\n            )\n          ) {\n            // no containers with tabbable nodes with positive tab indexes which means the focus\n            //  escaped for some other reason and we should just execute the fallback to the\n            //  MRU node or initial focus node, if any\n            navAcrossContainers = false;\n          }\n        }\n      } else {\n        // no MRU node means we're likely in some initial condition when the trap has just\n        //  been activated and initial focus hasn't been given yet, in which case we should\n        //  fall through to trying to focus the initial focus node, which is what should\n        //  happen below at this point in the logic\n        navAcrossContainers = false;\n      }\n\n      if (navAcrossContainers) {\n        nextNode = findNextNavNode({\n          // move FROM the MRU node, not event-related node (which will be the node that is\n          //  outside the trap causing the focus escape we're trying to fix)\n          target: state.mostRecentlyFocusedNode,\n          isBackward: config.isKeyBackward(state.recentNavEvent),\n        });\n      }\n\n      if (nextNode) {\n        tryFocus(nextNode);\n      } else {\n        tryFocus(state.mostRecentlyFocusedNode || getInitialFocusNode());\n      }\n    }\n\n    state.recentNavEvent = undefined; // clear\n  };\n\n  // Hijack key nav 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 checkKeyNav = function (event, isBackward = false) {\n    state.recentNavEvent = event;\n\n    const destinationNode = findNextNavNode({ event, isBackward });\n    if (destinationNode) {\n      if (isTabEvent(event)) {\n        // since tab natively moves focus, we wouldn't have a destination node unless we\n        //  were on the edge of a container and had to move to the next/previous edge, in\n        //  which case we want to prevent default to keep the browser from moving focus\n        //  to where it normally would\n        event.preventDefault();\n      }\n      tryFocus(destinationNode);\n    }\n    // else, let the browser take care of [shift+]tab and move the focus\n  };\n\n  const checkTabKey = function (event) {\n    if (config.isKeyForward(event) || config.isKeyBackward(event)) {\n      checkKeyNav(event, config.isKeyBackward(event));\n    }\n  };\n\n  // we use a different event phase for the Escape key to allow canceling the event and checking for this in escapeDeactivates\n  const checkEscapeKey = function (event) {\n    if (\n      isEscapeEvent(event) &&\n      valueOrHandler(config.escapeDeactivates, event) !== false\n    ) {\n      event.preventDefault();\n      trap.deactivate();\n    }\n  };\n\n  const checkClick = function (e) {\n    const target = getActualTarget(e);\n\n    if (findContainerIndex(target, e) >= 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(trapStack, 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', checkTabKey, {\n      capture: true,\n      passive: false,\n    });\n    doc.addEventListener('keydown', checkEscapeKey);\n\n    return trap;\n  };\n\n  /**\n   * Traverses up the DOM from each of `containers`, collecting references to\n   * the elements that are siblings to `container` or an ancestor of `container`.\n   * @param {Array<HTMLElement>} containers\n   */\n  const collectAdjacentElements = function (containers) {\n    // Re-activate all adjacent elements & clear previous collection.\n    if (state.active && !state.paused) {\n      trap._setSubtreeIsolation(false);\n    }\n    state.adjacentElements.clear();\n    state.alreadySilent.clear();\n\n    // Collect all ancestors of all containers to avoid redundant processing.\n    const containerAncestors = new Set();\n\n    const adjacentElements = new Set();\n\n    // Compile all elements adjacent to the focus trap containers & lineage.\n    for (const container of containers) {\n      containerAncestors.add(container);\n      let insideShadowRoot =\n        typeof ShadowRoot !== 'undefined' &&\n        container.getRootNode() instanceof ShadowRoot;\n      let current = container;\n      while (current) {\n        containerAncestors.add(current);\n\n        let parent = current.parentElement;\n        let siblings = [];\n        if (parent) {\n          siblings = parent.children;\n        } else if (!parent && insideShadowRoot) {\n          siblings = current.getRootNode().children;\n          parent = current.getRootNode().host;\n          insideShadowRoot =\n            typeof ShadowRoot !== 'undefined' &&\n            parent.getRootNode() instanceof ShadowRoot;\n        }\n\n        // Add all the children, we'll remove container lineage later.\n        for (const child of siblings) {\n          adjacentElements.add(child);\n        }\n\n        current = parent;\n      }\n    }\n\n    // Multi-container traps may overlap.\n    // Remove elements within container lineages.\n    containerAncestors.forEach((el) => {\n      adjacentElements.delete(el);\n    });\n\n    state.adjacentElements = adjacentElements;\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', checkTabKey, true);\n    doc.removeEventListener('keydown', checkEscapeKey);\n\n    return trap;\n  };\n\n  //\n  // MUTATION OBSERVER\n  //\n\n  const checkDomRemoval = function (mutations) {\n    const isFocusedNodeRemoved = mutations.some(function (mutation) {\n      const removedNodes = Array.from(mutation.removedNodes);\n      return removedNodes.some(function (node) {\n        return node === state.mostRecentlyFocusedNode;\n      });\n    });\n\n    // If the currently focused is removed then browsers will move focus to the\n    // <body> element. If this happens, try to move focus back into the trap.\n    if (isFocusedNodeRemoved) {\n      tryFocus(getInitialFocusNode());\n    }\n  };\n\n  // Use MutationObserver - if supported - to detect if focused node is removed\n  // from the DOM.\n  const mutationObserver =\n    typeof window !== 'undefined' && 'MutationObserver' in window\n      ? new MutationObserver(checkDomRemoval)\n      : undefined;\n\n  const updateObservedNodes = function () {\n    if (!mutationObserver) {\n      return;\n    }\n\n    mutationObserver.disconnect();\n    if (state.active && !state.paused) {\n      state.containers.map(function (container) {\n        mutationObserver.observe(container, {\n          subtree: true,\n          childList: true,\n        });\n      });\n    }\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 a currently-active trap is isolating its subtree, we need to remove\n      // that isolation to allow the new trap to find tabbable nodes.\n      const preexistingTrap = activeFocusTraps.getActiveTrap(trapStack);\n      let revertState = false;\n      if (preexistingTrap && !preexistingTrap.paused) {\n        // [#1729] method MAY not exist if using `trapStack` option to share stack with older\n        //  versions of Focus-trap in the same DOM so use optional chaining here just in case\n        //  since this is a trap we may not have created from this instance of the library\n        preexistingTrap._setSubtreeIsolation?.(false);\n        revertState = true;\n      }\n\n      try {\n        if (!checkCanFocusTrap) {\n          updateTabbableNodes();\n        }\n\n        state.active = true;\n        state.paused = false;\n        state.nodeFocusedBeforeActivation = getActiveElement(doc);\n\n        onActivate?.();\n\n        const finishActivation = () => {\n          if (checkCanFocusTrap) {\n            updateTabbableNodes();\n          }\n          addListeners();\n          updateObservedNodes();\n          if (config.isolateSubtrees) {\n            trap._setSubtreeIsolation(true);\n          }\n          onPostActivate?.();\n        };\n\n        if (checkCanFocusTrap) {\n          checkCanFocusTrap(state.containers.concat()).then(\n            finishActivation,\n            finishActivation\n          );\n          return this;\n        }\n\n        finishActivation();\n      } catch (error) {\n        // If our activation throws an exception and the stack hasn't changed,\n        // we need to re-enable the prior trap's subtree isolation.\n        if (\n          preexistingTrap === activeFocusTraps.getActiveTrap(trapStack) &&\n          revertState\n        ) {\n          // [#1729] method MAY not exist if using `trapStack` option to share stack with older\n          //  versions of Focus-trap in the same DOM so use optional chaining here just in case\n          //  since this is a trap we may not have created from this instance of the library\n          preexistingTrap._setSubtreeIsolation?.(true);\n        }\n        throw error;\n      }\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      // Prior to removing this trap from the trapStack, we need to remove any applications of `inert`.\n      // This allows the next trap down to update its tabbable nodes properly.\n      //\n      // If this trap is not top of the stack, don't change any current isolation.\n      if (!state.paused) {\n        trap._setSubtreeIsolation(false);\n      }\n      state.alreadySilent.clear();\n      removeListeners();\n      state.active = false;\n      state.paused = false;\n      updateObservedNodes();\n\n      activeFocusTraps.deactivateTrap(trapStack, 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      onDeactivate?.();\n\n      const finishDeactivation = () => {\n        delay(() => {\n          if (returnFocus) {\n            tryFocus(getReturnFocusNode(state.nodeFocusedBeforeActivation));\n          }\n          onPostDeactivate?.();\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(pauseOptions) {\n      if (!state.active) {\n        return this;\n      }\n\n      state.manuallyPaused = true;\n\n      return this._setPausedState(true, pauseOptions);\n    },\n\n    unpause(unpauseOptions) {\n      if (!state.active) {\n        return this;\n      }\n\n      state.manuallyPaused = false;\n\n      if (trapStack[trapStack.length - 1] !== this) {\n        return this;\n      }\n\n      return this._setPausedState(false, unpauseOptions);\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 (config.isolateSubtrees) {\n        collectAdjacentElements(state.containers);\n      }\n\n      if (state.active) {\n        updateTabbableNodes();\n\n        if (config.isolateSubtrees && !state.paused) {\n          trap._setSubtreeIsolation(true);\n        }\n      }\n\n      updateObservedNodes();\n\n      return this;\n    },\n  };\n\n  Object.defineProperties(trap, {\n    _isManuallyPaused: {\n      value() {\n        return state.manuallyPaused;\n      },\n    },\n    _setPausedState: {\n      value(paused, options) {\n        if (state.paused === paused) {\n          return this;\n        }\n\n        state.paused = paused;\n\n        if (paused) {\n          const onPause = getOption(options, 'onPause');\n          const onPostPause = getOption(options, 'onPostPause');\n          onPause?.();\n\n          removeListeners();\n          updateObservedNodes();\n          trap._setSubtreeIsolation(false);\n\n          onPostPause?.();\n        } else {\n          const onUnpause = getOption(options, 'onUnpause');\n          const onPostUnpause = getOption(options, 'onPostUnpause');\n\n          onUnpause?.();\n\n          trap._setSubtreeIsolation(true);\n          updateTabbableNodes();\n          addListeners();\n          updateObservedNodes();\n\n          onPostUnpause?.();\n        }\n\n        return this;\n      },\n    },\n    _setSubtreeIsolation: {\n      value(isEnabled) {\n        if (config.isolateSubtrees) {\n          state.adjacentElements.forEach((el) => {\n            if (isEnabled) {\n              switch (config.isolateSubtrees) {\n                case 'aria-hidden':\n                  // check both attribute and property to ensure initial state is captured\n                  // correctly across different browsers and test environments (like JSDOM)\n                  if (\n                    el.ariaHidden === 'true' ||\n                    el.getAttribute('aria-hidden')?.toLowerCase() === 'true'\n                  ) {\n                    state.alreadySilent.add(el);\n                  }\n\n                  el.setAttribute('aria-hidden', 'true');\n                  break;\n\n                default:\n                  // check both attribute and property to ensure initial state is captured\n                  // correctly across different browsers and test environments (like JSDOM)\n                  if (el.inert || el.hasAttribute('inert')) {\n                    state.alreadySilent.add(el);\n                  }\n                  el.setAttribute('inert', true);\n                  break;\n              }\n            } else {\n              if (state.alreadySilent.has(el)) {\n                // do nothing\n              } else {\n                switch (config.isolateSubtrees) {\n                  case 'aria-hidden':\n                    el.removeAttribute('aria-hidden');\n                    break;\n\n                  default:\n                    el.removeAttribute('inert');\n                    break;\n                }\n              }\n            }\n          });\n        }\n      },\n    },\n  });\n\n  // initialize container elements\n  trap.updateContainerElements(elements);\n\n  return trap;\n};\n\nexport { createFocusTrap };\n","import { setModifierManager, capabilities } from '@ember/modifier';\nimport { createFocusTrap as CreateFocusTrap } from 'focus-trap';\nimport type { Options as FocusTrapOptions } from 'focus-trap';\n\nlet cap: ReturnType<typeof capabilities>;\ntry {\n  cap = capabilities('3.22');\n} catch {\n  // @ts-expect-error we support older versions of Ember\n  cap = capabilities('3.13');\n}\n\ninterface FocusTrapState {\n  focusTrapOptions: FocusTrapOptions;\n  isActive: boolean;\n  isPaused: boolean;\n  shouldSelfFocus: boolean;\n  focusTrap?: ReturnType<typeof CreateFocusTrap>;\n}\n\ninterface FocusTrapModifierArgs {\n  isActive?: boolean;\n  isPaused?: boolean;\n  shouldSelfFocus?: boolean;\n  focusTrapOptions?: FocusTrapOptions;\n  additionalElements?: HTMLElement[];\n  /**\n   * Optional custom function to create a focus trap.\n   */\n  _createFocusTrap?: typeof CreateFocusTrap;\n}\n\nfunction focusTrapModifier() {\n  return {};\n}\n\nsetModifierManager(() => {\n  return {\n    capabilities: cap,\n\n    createModifier(): FocusTrapState {\n      return {\n        focusTrapOptions: {},\n        isActive: true,\n        isPaused: false,\n        shouldSelfFocus: false,\n        focusTrap: undefined,\n      };\n    },\n\n    installModifier(\n      state: FocusTrapState,\n      element: HTMLElement,\n      { named }: { named: FocusTrapModifierArgs },\n    ): void {\n      const {\n        isActive,\n        isPaused,\n        shouldSelfFocus,\n        focusTrapOptions,\n        additionalElements,\n        _createFocusTrap,\n      } = named;\n\n      // Create a shallow copy of the options.\n      state.focusTrapOptions = { ...focusTrapOptions };\n      if (typeof isActive !== 'undefined') {\n        state.isActive = isActive;\n      }\n      if (typeof isPaused !== 'undefined') {\n        state.isPaused = isPaused;\n      }\n      if (\n        state.focusTrapOptions &&\n        typeof state.focusTrapOptions.initialFocus === 'undefined' &&\n        shouldSelfFocus\n      ) {\n        state.focusTrapOptions.initialFocus = element;\n      }\n\n      // Allow a custom focus trap creation function (e.g., for testing).\n      let createFocusTrap = CreateFocusTrap;\n      if (_createFocusTrap) {\n        createFocusTrap = _createFocusTrap;\n      }\n\n      // Ensure returnFocusOnDeactivate is true unless explicitly set to false.\n      if (state.focusTrapOptions.returnFocusOnDeactivate !== false) {\n        state.focusTrapOptions.returnFocusOnDeactivate = true;\n      }\n\n      state.focusTrap = createFocusTrap(\n        typeof additionalElements !== 'undefined'\n          ? [element, ...additionalElements]\n          : element,\n        state.focusTrapOptions,\n      );\n\n      if (state.isActive) {\n        state.focusTrap.activate();\n      }\n      if (state.isPaused) {\n        state.focusTrap.pause();\n      }\n    },\n\n    updateModifier(\n      state: FocusTrapState,\n      { named: params }: { named: FocusTrapModifierArgs },\n    ): void {\n      const focusTrapOptions: FocusTrapOptions = params.focusTrapOptions || {};\n\n      if (state.isActive && !params.isActive) {\n        const { returnFocusOnDeactivate } = focusTrapOptions;\n        const returnFocus =\n          typeof returnFocusOnDeactivate === 'undefined' ? true : false;\n        state.focusTrap?.deactivate({ returnFocus });\n      } else if (!state.isActive && params.isActive) {\n        state.focusTrap?.activate();\n      }\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 with new options.\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\n    destroyModifier(state: FocusTrapState): void {\n      if (state.focusTrap) {\n        state.focusTrap.deactivate();\n      }\n    },\n  };\n}, focusTrapModifier);\n\nexport default focusTrapModifier;\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","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","/**\n * @function getTask\n * @param obj\n * @param taskOrName\n * @param taskName\n */\nfunction getTask(obj, taskOrName, taskName) {\n  let type = typeof taskOrName;\n  let task;\n\n  if (type === 'function') {\n    task = taskOrName;\n  } else if (type === 'string') {\n    task = obj[taskOrName];\n\n    if (typeof task !== 'function') {\n      throw new TypeError(`The method name '${taskOrName}' passed to ${taskName} does not resolve to a valid function.`);\n    }\n  } else {\n    throw new TypeError(`You must pass a task function or method name to '${taskName}'.`);\n  }\n\n  return task;\n}\n\nexport { getTask as default };\n","import { cancel } from '@ember/runloop';\nimport { registerDestructor } from '@ember/destroyable';\n\nconst NULL_TIMER_ID = -1;\n/**\n * A map of instances/timers that allows us to\n * store cancelIds for scheduled timers per instance.\n *\n * @private\n */\n\nlet registeredTimers = new WeakMap();\n/**\n * Test use only. Allows for swapping out the WeakMap to a Map, giving\n * us the ability to detect whether the timers set is empty.\n *\n * @private\n * @param {*} mapForTesting A map used to ensure correctness when testing.\n */\n\nfunction _setRegisteredTimers(mapForTesting) {\n  registeredTimers = mapForTesting;\n}\nfunction getTimersDisposable(destroyable, timers) {\n  return function () {\n    timers.forEach(cancelId => {\n      cancelTask(destroyable, cancelId);\n    });\n    timers.clear();\n  };\n}\nfunction getTimers(destroyable) {\n  let timers = registeredTimers.get(destroyable);\n\n  if (!timers) {\n    timers = new Set();\n    registeredTimers.set(destroyable, timers);\n    registerDestructor(destroyable, getTimersDisposable(destroyable, timers));\n  }\n\n  return timers;\n}\n/**\n * Cancel a previously scheduled task.\n *\n * Example:\n *\n * ```js\n * import Component from '@glimmer/component';\n * import { runTask, cancelTask } from 'ember-lifeline';\n *\n * export default CancelableComponent extends Component {\n *   start() {\n *     this._cancelId = runTask(this, () => {\n *       console.log('This runs after 5 seconds if this component is still displayed');\n *     }, 5000)\n *   },\n *\n *   disable() {\n *     cancelTask(this, this._cancelId);\n *   },\n * }\n * ```\n *\n * @function cancelTask\n * @param { Destroyable } destroyable the entangled object that was provided with the original *Task call\n * @param { Number } cancelId the id returned from the *Task call\n * @public\n */\n\nfunction cancelTask(destroyable, cancelId) {\n  let timers = getTimers(destroyable);\n  timers.delete(cancelId);\n  cancel(cancelId);\n}\n\nexport { NULL_TIMER_ID, _setRegisteredTimers, cancelTask, getTimers, getTimersDisposable };\n","import { later } from '@ember/runloop';\nimport { isDestroying } from '@ember/destroyable';\nimport getTask from './utils/get-task.js';\nimport { NULL_TIMER_ID, getTimers } from './cancel-task.js';\n\n/**\n * Registers and runs the provided task function for the provided object at the specified\n * timeout (defaulting to 0). The timer is properly canceled if the object is destroyed\n * before it is invoked.\n *\n * Example:\n *\n * ```js\n * import Component from '@glimmer/component';\n * import { runTask } from 'ember-lifeline';\n *\n * export default RunComponent extends Component {\n *   start() {\n *     runTask(this, () => {\n *       console.log('This runs after 5 seconds if this component is still displayed');\n *     }, 5000)\n *   },\n * });\n * ```\n *\n * @function runTask\n * @param { Destroyable } destroyable the instance to register the task for\n * @param { Function | String } taskOrName a function representing the task, or string\n *                                         specifying a property representing the task,\n *                                         which is run at the provided time specified\n *                                         by timeout\n * @param { Number } [timeout=0] the time in the future to run the task\n * @public\n */\n\nfunction runTask(destroyable, taskOrName, timeout = 0) {\n  if (isDestroying(destroyable)) {\n    return NULL_TIMER_ID;\n  }\n\n  let task = getTask(destroyable, taskOrName, 'runTask');\n  let timers = getTimers(destroyable);\n  let cancelId = later(() => {\n    timers.delete(cancelId);\n    task.call(destroyable);\n  }, timeout);\n  timers.add(cancelId);\n  return cancelId;\n}\n\nexport { runTask };\n","import { assert } from '@ember/debug';\nimport { schedule } from '@ember/runloop';\nimport { isDestroying } from '@ember/destroyable';\nimport { NULL_TIMER_ID, getTimers } from './cancel-task.js';\nimport getTask from './utils/get-task.js';\n\n/**\n * Adds the provided function to the named queue for the provided object. The timer is\n * properly canceled if the object is destroyed before it is invoked.\n *\n * Example:\n *\n * ```js\n * import Component from '@glimmer/component';\n * import { scheduleTask } from 'ember-lifeline';\n *\n * export default ScheduledComponent extends Component {\n *   start() {\n *     scheduleTask(this, 'actions', () => {\n *       console.log('This runs at the end of the run loop (via the actions queue) if this component is still displayed');\n *     })\n *   },\n * });\n * ```\n *\n * @function scheduleTask\n * @param { Destroyable } destroyable the instance to register the task for\n * @param { String } queueName the queue to schedule the task into\n * @param { Function | String } taskOrName a function representing the task, or string\n *                                         specifying a property representing the task,\n *                                         which is run at the provided time specified\n *                                         by timeout\n * @param { ...* } args arguments to pass to the task\n * @public\n */\n\nfunction scheduleTask(destroyable, queueName, taskOrName, ...args) {\n  assert(`Called \\`scheduleTask\\` without a string as the first argument on ${destroyable}.`, typeof queueName === 'string');\n  assert(`Called \\`scheduleTask\\` while trying to schedule to the \\`afterRender\\` queue on ${destroyable}.`, queueName !== 'afterRender');\n\n  if (isDestroying(destroyable)) {\n    return NULL_TIMER_ID;\n  }\n\n  let task = getTask(destroyable, taskOrName, 'scheduleTask');\n  let timers = getTimers(destroyable);\n  let cancelId;\n\n  let taskWrapper = (...taskArgs) => {\n    timers.delete(cancelId);\n    task.call(destroyable, ...taskArgs);\n  };\n\n  cancelId = schedule(queueName, destroyable, taskWrapper, ...args);\n  timers.add(cancelId);\n  return cancelId;\n}\n\nexport { scheduleTask };\n","import { assert } from '@ember/debug';\nimport { throttle } from '@ember/runloop';\nimport { isDestroying } from '@ember/destroyable';\nimport { NULL_TIMER_ID, getTimers } from './cancel-task.js';\n\n/**\n * Runs the function with the provided name immediately, and only once in the time window\n * specified by the spacing argument.\n *\n * Example:\n *\n * ```js\n * import Component from '@glimmer/component';\n * import { throttleTask } from 'ember-lifeline';\n *\n * export default LoggerComponent extends Component {\n *   logMe() {\n *     console.log('This will run once immediately, then only once every 300ms.');\n *   },\n *\n *   click() {\n *     throttleTask(this, 'logMe', 300);\n *   },\n * });\n * ```\n *\n * @function throttleTask\n * @param { Destroyable } destroyable the instance to register the task for\n * @param { String } taskName the name of the task to throttle\n * @param { ...* } [throttleArgs] arguments to pass to the throttled method\n * @param { Number } spacing the time in the future to run the task\n * @param { Boolean } [immediate] Trigger the function on the leading instead of the trailing edge of the wait interval. Defaults to true.\n * @public\n */\n\nfunction throttleTask(destroyable, taskName, ...throttleArgs) {\n  assert(`Called \\`throttleTask\\` without a string as the first argument on ${destroyable}.`, typeof taskName === 'string');\n  assert(`Called \\`throttleTask('${taskName}')\\` where '${taskName}' is not a function.`, typeof destroyable[taskName] === 'function');\n\n  if (isDestroying(destroyable)) {\n    return NULL_TIMER_ID;\n  }\n\n  const lastArgument = throttleArgs[throttleArgs.length - 1];\n  const spacing = typeof lastArgument === 'boolean' ? throttleArgs[throttleArgs.length - 2] : lastArgument;\n  assert(`Called \\`throttleTask\\` with incorrect \\`spacing\\` argument. Expected Number and received \\`${spacing}\\``, typeof spacing === 'number');\n  let timers = getTimers(destroyable);\n  let cancelId = throttle(destroyable, // @ts-ignore Ignores type mismatch issues with passing rest arguments to throttle.\n  taskName, ...throttleArgs);\n  timers.add(cancelId);\n  return cancelId;\n}\n\nexport { throttleTask };\n","import Ember from 'ember';\nimport getTask from './utils/get-task.js';\nimport { registerDestructor } from '@ember/destroyable';\n\nfunction indexable(input) {\n  return input;\n}\n/**\n * A map of instances/poller functions that allows us to\n * store poller tokens per instance.\n *\n * @private\n *\n */\n\n\nlet registeredPollers = new WeakMap();\n/**\n * Test use only. Allows for swapping out the WeakMap to a Map, giving\n * us the ability to detect whether the pollers set is empty.\n *\n * @private\n * @param {*} mapForTesting A map used to ensure correctness when testing.\n */\n\nfunction _setRegisteredPollers(mapForTesting) {\n  registeredPollers = mapForTesting;\n}\nlet token = 0;\n\nlet _shouldPollOverride;\n\nfunction shouldPoll() {\n  if (_shouldPollOverride) {\n    return _shouldPollOverride();\n  }\n\n  return !Ember.testing;\n}\n/**\n * Allows for overriding of the polling behavior to explicitly control\n * whether polling should occur or not.\n *\n * @param { Function } callback\n * @public\n */\n\n\nfunction setShouldPoll(callback) {\n  _shouldPollOverride = callback;\n}\nfunction getQueuedPollTasks() {\n  let symbol = Symbol.for('LIFELINE_QUEUED_POLL_TASKS');\n  let globalObj = getGlobal();\n  let queuedPollTasks = globalObj[symbol];\n\n  if (!queuedPollTasks) {\n    queuedPollTasks = globalObj[symbol] = new Map();\n  }\n\n  return queuedPollTasks;\n}\n/**\n * Sets up a function that can perform polling logic in a testing safe way.\n * The task is invoked synchronously with an argument (generally called `next`).\n * In normal development/production when `next` is invoked, it will trigger the\n * task again (recursively). However, when in test mode the recursive polling\n * functionality is disabled, and usage of the `pollTaskFor` helper is required.\n *\n * Example:\n *\n * ```js\n * import Component from '@glimmer/component';\n * import { pollTask, runTask } from 'ember-lifeline';\n *\n * export default PollingComponent extends Component {\n *   api: injectService(),\n *\n *   init() {\n *     this._super(...arguments);\n *\n *     let token = pollTask(this, (next) => {\n *       this.get('api').request('get', 'some/path')\n *         .then(() => {\n *           runTask(this, next, 1800);\n *         })\n *     });\n *\n *     this._pollToken = token;\n *   },\n * });\n * ```\n *\n * Test Example:\n *\n * ```js\n * import { settled } from '@ember/test-helpers';\n * import { pollTaskFor } from 'ember-lifeline';\n *\n *\n * test('foo-bar watches things', async function(assert) {\n *   await render(hbs`{{foo-bar}}`);\n *\n *   assert.strictEqual(serverRequests, 1, 'called initially');\n *\n *   pollTaskFor(this._pollToken);\n *\n *   await settled();\n *\n *   assert.strictEqual(serverRequests, 2, 'called again');\n *\n *   await settled();\n * });\n * ```\n *\n * @method pollTask\n * @param { Destroyable } destroyable the entangled object that was provided with the original *Task call\n * @param { TaskOrName } taskOrName a function representing the task, or string\n *                                  specifying a property representing the task,\n *                                  which is run at the provided time specified\n *                                  by timeout\n * @param { Token } token the Token for the pollTask, either a string or number\n * @public\n */\n\nfunction pollTask(destroyable, taskOrName, token = getNextToken()) {\n  let next;\n  let task = getTask(destroyable, taskOrName, 'pollTask');\n\n  let tick = () => task.call(destroyable, next);\n\n  let pollers = registeredPollers.get(destroyable);\n\n  if (!pollers) {\n    pollers = new Set();\n    registeredPollers.set(destroyable, pollers);\n    registerDestructor(destroyable, getPollersDisposable(destroyable, pollers));\n  }\n\n  pollers.add(token);\n\n  if (shouldPoll()) {\n    next = tick;\n  } else {\n    next = () => {\n      getQueuedPollTasks().set(token, tick);\n    };\n  }\n\n  task.call(destroyable, next);\n  return token;\n}\n/**\n * Clears a previously setup polling task.\n *\n * NOTE: This does not cancel any nested `runTask` calls. You're required to cancel any\n * cancelable behaviors, including any calls to `runTask` using `cancelTask`.\n *\n * Example:\n *\n * ```js\n * import Component from '@glimmer/component';\n * import { inject as service } from '@ember/service';\n * import { pollTask, runTask } from 'ember-lifeline';\n *\n * export default AutoRefreshComponent extends Component {\n *   @service api;\n *\n *   enableAutoRefresh() {\n *     this._pollToken = pollTask(this, (next) => {\n *       this.get('api').request('get', 'some/path')\n *         .then(() => {\n *           runTask(this, next, 1800);\n *         })\n *     });\n *   },\n *\n *   disableAutoRefresh() {\n *     cancelPoll(this, this._pollToken);\n *   },\n * }\n * ```\n *\n * @method cancelPoll\n * @param { Destroyable } destroyable the entangled object that was provided with the original *Task call\n * @param { Token } token the Token for the pollTask to be cleared, either a string or number\n * @public\n */\n\nfunction cancelPoll(destroyable, token) {\n  let pollToken;\n  let pollers = registeredPollers.get(destroyable);\n  pollToken = token;\n\n  if (pollers !== undefined) {\n    pollers.delete(pollToken);\n  }\n\n  getQueuedPollTasks().delete(pollToken);\n}\n\nfunction getGlobal() {\n  // eslint-disable-next-line n/no-unsupported-features/es-builtins\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  if (typeof global !== 'undefined') return indexable(global);\n  throw new Error('unable to locate global object');\n}\n\nfunction getPollersDisposable(destroyable, pollers) {\n  return function () {\n    pollers.forEach(token => {\n      cancelPoll(destroyable, token);\n    });\n  };\n}\n\nfunction getNextToken() {\n  return token++;\n}\n\nexport { _setRegisteredPollers, cancelPoll, getQueuedPollTasks, pollTask, setShouldPoll };\n","import { assert } from '@ember/debug';\nimport { cancel, debounce } from '@ember/runloop';\nimport { registerDestructor } from '@ember/destroyable';\n\n/**\n * A map of instances/debounce functions that allows us to\n * store pending debounces per instance.\n *\n * @private\n */\n\nconst registeredDebounces = new WeakMap();\n/**\n * Runs the function with the provided name after the timeout has expired on the last\n * invocation. The timer is properly canceled if the object is destroyed before it is\n * invoked.\n *\n * Example:\n *\n * ```js\n * import Component from '@glimmer/component';\n * import { debounceTask } from 'ember-lifeline';\n *\n * export default LoggerComponent extends Component {\n *   logMe() {\n *     console.log('This will only run once every 300ms.');\n *   },\n *\n *   click() {\n *     debounceTask(this, 'logMe', 300);\n *   },\n * }\n * ```\n *\n * @function debounceTask\n * @param { Destroyable } destroyable the instance to register the task for\n * @param { String } name the name of the task to debounce\n * @param { ...* } debounceArgs arguments to pass to the debounced method\n * @param { Number } spacing the amount of time to wait before calling the method (in milliseconds)\n * @param { Boolean } [immediate] Trigger the function on the leading instead of the trailing edge of the wait interval. Defaults to false.\n * @public\n */\n\nfunction debounceTask(destroyable, name, ...debounceArgs) {\n  assert(`Called \\`debounceTask\\` without a string as the first argument on ${destroyable}.`, typeof name === 'string');\n  assert(`Called \\`destroyable.debounceTask('${name}', ...)\\` where 'destroyable.${name}' is not a function.`, typeof destroyable[name] === 'function');\n\n  if (destroyable.isDestroying) {\n    return;\n  }\n\n  const lastArgument = debounceArgs[debounceArgs.length - 1];\n  const spacing = typeof lastArgument === 'boolean' ? debounceArgs[debounceArgs.length - 2] : lastArgument;\n  assert(`Called \\`debounceTask\\` with incorrect \\`spacing\\` argument. Expected Number and received \\`${spacing}\\``, typeof spacing === 'number');\n  let pendingDebounces = registeredDebounces.get(destroyable);\n\n  if (!pendingDebounces) {\n    pendingDebounces = new Map();\n    registeredDebounces.set(destroyable, pendingDebounces);\n    registerDestructor(destroyable, getDebouncesDisposable(pendingDebounces));\n  }\n\n  let debouncedTask;\n\n  if (!pendingDebounces.has(name)) {\n    debouncedTask = (...args) => {\n      pendingDebounces.delete(name);\n      destroyable[name](...args);\n    };\n  } else {\n    debouncedTask = pendingDebounces.get(name).debouncedTask;\n  } // cancelId is new, even if the debounced function was already present\n\n\n  let cancelId = debounce(destroyable, debouncedTask, ...debounceArgs);\n  pendingDebounces.set(name, {\n    debouncedTask,\n    cancelId\n  });\n}\n/**\n * Cancel a previously debounced task.\n *\n * Example:\n *\n * ```js\n * import Component from '@glimmer/component';\n * import { debounceTask, cancelDebounce } from 'ember-lifeline';\n *\n * export default LoggerComponent extends Component {\n *   logMe() {\n *     console.log('This will only run once every 300ms.');\n *   },\n *\n *   click() {\n *     debounceTask(this, 'logMe', 300);\n *   },\n *\n *   disable() {\n *      cancelDebounce(this, 'logMe');\n *   },\n * }\n * ```\n *\n * @function cancelDebounce\n * @param { Destroyable } destroyable the instance to register the task for\n * @param { String } methodName the name of the debounced method to cancel\n * @public\n */\n\nfunction cancelDebounce(destroyable, methodName) {\n  if (!registeredDebounces.has(destroyable)) {\n    return;\n  }\n\n  const pendingDebounces = registeredDebounces.get(destroyable);\n\n  if (!pendingDebounces.has(methodName)) {\n    return;\n  }\n\n  const {\n    cancelId\n  } = pendingDebounces.get(methodName);\n  pendingDebounces.delete(methodName);\n  cancel(cancelId);\n}\n\nfunction getDebouncesDisposable(debounces) {\n  return function () {\n    if (debounces.size === 0) {\n      return;\n    }\n\n    debounces.forEach(p => cancel(p.cancelId));\n  };\n}\n\nexport { cancelDebounce, debounceTask };\n","import Ember from 'ember';\n\n/**\n * @function getTimeoutOrTestFallback\n * @param {number} timeout The timeout value that gets scaled down in case of the test environment.\n * @param {TestTimeoutOptions} [options]\n * @param {number} [options.timeout] The timeout value that needs to be set in the test environment if passed\n * @param {number} [options.scaling] The amount by which the timeout needs to be scaled down\n * @return {number} The adjusted timeout value depending on the environment and scaling factor.\n */\n\nfunction getTimeoutOrTestFallback(timeout, {\n  timeout: testTimeout,\n  scaling = 100\n} = {\n  scaling: 100\n} // Reducing timer value by 100x in test environment by default\n) {\n  if (Ember.testing) {\n    return testTimeout !== undefined ? testTimeout : timeout / scaling;\n  }\n\n  return timeout;\n}\n\nexport { getTimeoutOrTestFallback };\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 * as emberService from '@ember/service';\n\nconst service = emberService.service ?? emberService.inject;\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 { tracked } from '@glimmer/tracking';\nimport { action, get } from '@ember/object';\nimport { guidFor } from '@ember/object/internals';\nimport isEqual from '../utils/equal.ts';\nimport { assert } from '@ember/debug';\nimport {\n  indexOfOption,\n  filterOptions,\n  findOptionWithOffset,\n  countOptions,\n  defaultHighlighted,\n  advanceSelectableOption,\n  defaultMatcher,\n  defaultTypeAheadMatcher,\n  pathForOption,\n} from '../utils/group-utils.ts';\nimport isSelectedPresent from '../helpers/ember-power-select-is-selected-present.ts';\nimport { task, timeout } from 'ember-concurrency';\nimport { modifier } from 'ember-modifier';\nimport PowerSelectLabel from './power-select/label.gts';\nimport PowerSelectTrigger from './power-select/trigger.gts';\nimport PowerSelectPlaceholderComponent from './power-select/placeholder.gts';\nimport PowerSelectBeforeOptions from './power-select/before-options.gts';\nimport SearchMessageComponent from './power-select/search-message.gts';\nimport NoMatchesMessageComponent from './power-select/no-matches-message.gts';\nimport PowerSelectOptions from './power-select/options.gts';\nimport PowerSelectGroupComponent from './power-select/power-select-group.gts';\nimport type { BasicDropdownDefaultBlock } from 'ember-basic-dropdown/components/basic-dropdown';\nimport type { Dropdown, TRootEventType } from 'ember-basic-dropdown/types';\nimport type Owner from '@ember/owner';\nimport type {\n  CalculatePosition,\n  HorizontalPosition,\n  VerticalPosition,\n} from 'ember-basic-dropdown/utils/calculate-position';\nimport type { ComponentLike } from '@glint/template';\nimport type { PowerSelectPlaceholderSignature } from './power-select/placeholder.gts';\nimport type { PowerSelectSearchMessageSignature } from './power-select/search-message.gts';\nimport type { PowerSelectNoMatchesMessageSignature } from './power-select/no-matches-message.gts';\nimport type { BasicDropdownTriggerSignature } from 'ember-basic-dropdown/components/basic-dropdown-trigger';\nimport type { BasicDropdownContentSignature } from 'ember-basic-dropdown/components/basic-dropdown-content';\nimport type { PowerSelectLabelSignature } from './power-select/label.gts';\nimport type { PowerSelectTriggerSignature } from './power-select/trigger.gts';\nimport type { PowerSelectBeforeOptionsSignature } from './power-select/before-options.gts';\nimport type { PowerSelectOptionsSignature } from './power-select/options.gts';\nimport type { PowerSelectPowerSelectGroupSignature } from './power-select/power-select-group.gts';\nimport type {\n  DefaultHighlightedParams,\n  MatcherFn,\n  Option,\n  PowerSelectAfterOptionsSignature,\n  PowerSelectSelectedItemSignature,\n  Select,\n  Selected,\n  TLabelClickAction,\n  TSearchFieldPosition,\n} from '../types.ts';\nimport BasicDropdown from 'ember-basic-dropdown/components/basic-dropdown';\nimport { on } from '@ember/modifier';\nimport { or, and, not, notEq } from 'ember-truth-helpers';\nimport { concat } from '@ember/helper';\n\ninterface PromiseProxy<T = unknown> extends Promise<T> {\n  content: T;\n}\n\ninterface CancellablePromise<T> extends Promise<T> {\n  cancel: () => void;\n}\n\ninterface Sliceable<T> {\n  slice(): T[];\n}\n\n// Some args are not listed here because they are only accessed from the template. Should I list them?\nexport interface PowerSelectArgs<\n  T,\n  IsMultiple extends boolean = false,\n  TExtra = unknown,\n> {\n  highlightOnHover?: boolean;\n  placeholderComponent?:\n    | ComponentLike<\n        PowerSelectPlaceholderSignature<NoInfer<T>, TExtra, NoInfer<IsMultiple>>\n      >\n    | ComponentLike<PowerSelectPlaceholderSignature<unknown>>;\n  searchMessage?: string;\n  searchMessageComponent?:\n    | ComponentLike<\n        PowerSelectSearchMessageSignature<\n          NoInfer<T>,\n          TExtra,\n          NoInfer<IsMultiple>\n        >\n      >\n    | ComponentLike<PowerSelectSearchMessageSignature<unknown>>;\n  noMatchesMessage?: string;\n  noMatchesMessageComponent?:\n    | ComponentLike<\n        PowerSelectNoMatchesMessageSignature<\n          NoInfer<T>,\n          TExtra,\n          NoInfer<IsMultiple>\n        >\n      >\n    | ComponentLike<PowerSelectNoMatchesMessageSignature<unknown>>;\n  matchTriggerWidth?: boolean;\n  resultCountMessage?: (resultCount: number) => string;\n  options?: readonly T[] | Promise<readonly T[]>;\n  selected?: Selected<T, IsMultiple> | Promise<Selected<T, IsMultiple>>;\n  multiple?: IsMultiple;\n  destination?: string;\n  destinationElement?: HTMLElement;\n  closeOnSelect?: boolean;\n  renderInPlace?: boolean;\n  preventScroll?: boolean;\n  defaultHighlighted?:\n    | ((params: DefaultHighlightedParams<T>) => Option<T> | undefined)\n    | Option<T>\n    | undefined;\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?: VerticalPosition;\n  horizontalPosition?: HorizontalPosition;\n  triggerId?: string;\n  disabled?: boolean;\n  title?: string;\n  triggerRole?: string;\n  required?: string;\n  triggerClass?: string;\n  ariaInvalid?: string;\n  eventType?: BasicDropdownTriggerSignature['Args']['eventType'];\n  rootEventType?: TRootEventType;\n  ariaDescribedBy?: string;\n  calculatePosition?: CalculatePosition;\n  ebdTriggerComponent?: ComponentLike<BasicDropdownTriggerSignature>;\n  ebdContentComponent?: ComponentLike<BasicDropdownContentSignature>;\n  labelComponent?:\n    | ComponentLike<\n        PowerSelectLabelSignature<NoInfer<T>, TExtra, NoInfer<IsMultiple>>\n      >\n    | ComponentLike<PowerSelectLabelSignature<unknown>>;\n  triggerComponent?:\n    | ComponentLike<\n        PowerSelectTriggerSignature<NoInfer<T>, TExtra, NoInfer<IsMultiple>>\n      >\n    | ComponentLike<PowerSelectTriggerSignature<unknown>>;\n  selectedItemComponent?:\n    | ComponentLike<\n        PowerSelectSelectedItemSignature<\n          NoInfer<T>,\n          TExtra,\n          NoInfer<IsMultiple>\n        >\n      >\n    | ComponentLike<PowerSelectSelectedItemSignature<unknown>>;\n  beforeOptionsComponent?:\n    | ComponentLike<\n        PowerSelectBeforeOptionsSignature<\n          NoInfer<T>,\n          TExtra,\n          NoInfer<IsMultiple>\n        >\n      >\n    | ComponentLike<PowerSelectBeforeOptionsSignature<unknown>>;\n  optionsComponent?:\n    | ComponentLike<\n        PowerSelectOptionsSignature<NoInfer<T>, TExtra, NoInfer<IsMultiple>>\n      >\n    | ComponentLike<PowerSelectOptionsSignature<unknown>>;\n  groupComponent?:\n    | ComponentLike<\n        PowerSelectPowerSelectGroupSignature<\n          NoInfer<T>,\n          TExtra,\n          NoInfer<IsMultiple>\n        >\n      >\n    | ComponentLike<PowerSelectPowerSelectGroupSignature<unknown>>;\n  afterOptionsComponent?:\n    | ComponentLike<\n        PowerSelectAfterOptionsSignature<\n          NoInfer<T>,\n          TExtra,\n          NoInfer<IsMultiple>\n        >\n      >\n    | ComponentLike<PowerSelectAfterOptionsSignature<unknown>>;\n  extra?: TExtra;\n  matcher?: MatcherFn<T>;\n  initiallyOpened?: boolean;\n  typeAheadOptionMatcher?: MatcherFn<T>;\n  buildSelection?: (\n    selected: Option<T>,\n    select: Select<T, IsMultiple>,\n  ) => Selected<T, IsMultiple>;\n  onChange: (\n    selection: Selected<T, IsMultiple>,\n    select: Select<T, IsMultiple>,\n    event?: Event,\n  ) => void;\n  search?: (\n    term: string,\n    select: Select<T, IsMultiple>,\n  ) => readonly T[] | Promise<readonly T[]> | Promise<void> | void;\n  onOpen?: (\n    select: Select<T, IsMultiple>,\n    e: Event | undefined,\n  ) => boolean | void | undefined;\n  onClose?: (\n    select: Select<T, IsMultiple>,\n    e: Event | undefined,\n  ) => boolean | void | undefined;\n  onInput?: (\n    term: string,\n    select: Select<T, IsMultiple>,\n    e: Event,\n  ) => string | false | void | PromiseLike<void>;\n  onKeydown?: (\n    select: Select<T, IsMultiple>,\n    e: KeyboardEvent,\n  ) => boolean | void | undefined;\n  onFocus?: (select: Select<T, IsMultiple>, event: FocusEvent) => void;\n  onBlur?: (select: Select<T, IsMultiple>, event: FocusEvent) => void;\n  scrollTo?: (option: Selected<T>, select: Select<T, IsMultiple>) => void;\n  registerAPI?: (select: Select<T, IsMultiple>) => void;\n}\n\nexport interface PowerSelectSignature<\n  T,\n  IsMultiple extends boolean = false,\n  TExtra = undefined,\n> {\n  Element: Element;\n  Args: PowerSelectArgs<T, IsMultiple, TExtra>;\n  Blocks: {\n    default: [option: Option<T>, select: Select<T, IsMultiple>];\n  };\n}\n\nconst isSliceable = <T,>(coll: unknown): coll is Sliceable<T> => {\n  return Array.isArray(coll);\n};\n\nconst isPromiseLike = <T,>(thing: unknown): thing is Promise<T> => {\n  return (\n    typeof thing === 'object' &&\n    thing !== null &&\n    typeof (thing as { then?: unknown }).then === 'function'\n  );\n};\n\nconst isCancellablePromise = <T,>(\n  thing: unknown,\n): thing is CancellablePromise<T> => {\n  return (\n    typeof thing === 'object' &&\n    thing !== null &&\n    typeof (thing as { cancel?: unknown }).cancel === 'function'\n  );\n};\n\nconst toPlainArray = <T,>(collection: T | T[] | Sliceable<T>): T[] | T => {\n  if (isSliceable<T>(collection)) {\n    return collection.slice();\n  } else {\n    return collection;\n  }\n};\n\nfunction getOptionMatcher<T>(\n  matcher: MatcherFn<T>,\n  defaultMatcher: MatcherFn<T>,\n  searchField: string | undefined,\n): MatcherFn<T> {\n  if (searchField && matcher === defaultMatcher) {\n    return (option: T | undefined, text: string) =>\n      matcher(get(option, searchField) as T | undefined, text);\n  } else {\n    return (option: T | undefined, 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\nexport default class PowerSelect<\n  T,\n  IsMultiple extends boolean = false,\n  TExtra = undefined,\n> extends Component<PowerSelectSignature<T, IsMultiple, TExtra>> {\n  // Untracked properties\n  _publicAPIActions = {\n    search: this._search.bind(this),\n    highlight: this._highlight.bind(this),\n    select: this._select.bind(this),\n    choose: this._choose.bind(this),\n    scrollTo: this._scrollTo.bind(this),\n    labelClick: this._labelClick.bind(this),\n  };\n\n  // Tracked properties\n  @tracked private _resolvedOptions?: T | readonly T[];\n  @tracked private _resolvedSelected?: Selected<T, IsMultiple> | undefined;\n  @tracked private _repeatingChar = '';\n  @tracked private _expirableSearchText = '';\n  @tracked private _searchResult?: readonly T[];\n  @tracked isActive = false;\n  @tracked loading = false;\n  @tracked searchText = '';\n  @tracked lastSearchedText = '';\n  @tracked highlighted?: Option<T> | undefined;\n  storedAPI!: Select<T, IsMultiple>;\n\n  private _uid = guidFor(this);\n  private _lastOptionsPromise?: Promise<readonly T[]>;\n  private _lastSelectedPromise?:\n    | PromiseProxy<Selected<T, IsMultiple>>\n    | Promise<Selected<T, IsMultiple>>;\n  private _lastSearchPromise?:\n    | Promise<readonly T[]>\n    | CancellablePromise<readonly T[]>\n    | Promise<void>;\n  private _filterResultsCache: {\n    results: T[];\n    options: T[];\n    searchText: string;\n  } = { results: [], options: [], searchText: this.searchText };\n\n  // Lifecycle hooks\n  constructor(owner: Owner, args: PowerSelectArgs<T, IsMultiple, TExtra>) {\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    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(): T[] {\n    if (this.searchText.length > 0) {\n      if (this.args.search) {\n        return toPlainArray(this._searchResult || this.options) as T[];\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(): T[] {\n    if (this._resolvedOptions) {\n      return toPlainArray(this._resolvedOptions) as T[];\n    }\n    if (this.args.options) {\n      return toPlainArray(this.args.options as T[]) as T[];\n    } else {\n      return [];\n    }\n  }\n\n  get resultsCount(): number {\n    return countOptions(this.results);\n  }\n\n  get selected(): Selected<T, IsMultiple> | undefined {\n    if (isSelectedPresent(this._resolvedSelected)) {\n      return toPlainArray(this._resolvedSelected) as Selected<T, IsMultiple>;\n    } else if (\n      isSelectedPresent(this.args.selected) &&\n      !isPromiseLike(this.args.selected)\n    ) {\n      return toPlainArray(this.args.selected) as Selected<T, IsMultiple>;\n    }\n    return undefined;\n  }\n\n  get ariaMultiSelectable(): boolean {\n    return Array.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(): PowerSelectArgs<\n    T,\n    IsMultiple,\n    TExtra\n  >['buildSelection'] {\n    if (this.args.buildSelection) {\n      return this.args.buildSelection;\n    }\n\n    if (this.args.multiple) {\n      return this._defaultMultipleBuildSelection.bind(this);\n    }\n  }\n\n  get labelComponent(): ComponentLike<\n    PowerSelectLabelSignature<T, TExtra, IsMultiple>\n  > {\n    return (this.args.labelComponent ?? PowerSelectLabel) as ComponentLike<\n      PowerSelectLabelSignature<T, TExtra, IsMultiple>\n    >;\n  }\n\n  get triggerComponent(): ComponentLike<\n    PowerSelectTriggerSignature<T, TExtra, IsMultiple>\n  > {\n    return (this.args.triggerComponent ?? PowerSelectTrigger) as ComponentLike<\n      PowerSelectTriggerSignature<T, TExtra, IsMultiple>\n    >;\n  }\n\n  get placeholderComponent(): ComponentLike<\n    PowerSelectPlaceholderSignature<T, TExtra, IsMultiple>\n  > {\n    return (this.args.placeholderComponent ??\n      PowerSelectPlaceholderComponent) as ComponentLike<\n      PowerSelectPlaceholderSignature<T, TExtra, IsMultiple>\n    >;\n  }\n\n  get beforeOptionsComponent(): ComponentLike<\n    PowerSelectBeforeOptionsSignature<T, TExtra, IsMultiple>\n  > {\n    return (this.args.beforeOptionsComponent ??\n      PowerSelectBeforeOptions) as ComponentLike<\n      PowerSelectBeforeOptionsSignature<T, TExtra, IsMultiple>\n    >;\n  }\n\n  get searchMessageComponent(): ComponentLike<\n    PowerSelectSearchMessageSignature<T, TExtra, IsMultiple>\n  > {\n    return (this.args.searchMessageComponent ??\n      SearchMessageComponent) as ComponentLike<\n      PowerSelectSearchMessageSignature<T, TExtra, IsMultiple>\n    >;\n  }\n\n  get noMatchesMessageComponent(): ComponentLike<\n    PowerSelectNoMatchesMessageSignature<T, TExtra, IsMultiple>\n  > {\n    return (this.args.noMatchesMessageComponent ??\n      NoMatchesMessageComponent) as ComponentLike<\n      PowerSelectNoMatchesMessageSignature<T, TExtra, IsMultiple>\n    >;\n  }\n\n  get optionsComponent(): ComponentLike<\n    PowerSelectOptionsSignature<T, TExtra, IsMultiple>\n  > {\n    return (this.args.optionsComponent ?? PowerSelectOptions) as ComponentLike<\n      PowerSelectOptionsSignature<T, TExtra, IsMultiple>\n    >;\n  }\n\n  get groupComponent(): ComponentLike<\n    PowerSelectPowerSelectGroupSignature<T, TExtra, IsMultiple>\n  > {\n    return (this.args.groupComponent ??\n      PowerSelectGroupComponent) as ComponentLike<\n      PowerSelectPowerSelectGroupSignature<T, TExtra, IsMultiple>\n    >;\n  }\n\n  get selectedItemComponent():\n    | ComponentLike<PowerSelectSelectedItemSignature<T, TExtra, IsMultiple>>\n    | undefined {\n    return this.args.selectedItemComponent as\n      | ComponentLike<PowerSelectSelectedItemSignature<T, TExtra, IsMultiple>>\n      | undefined;\n  }\n\n  get afterOptionsComponent():\n    | ComponentLike<PowerSelectAfterOptionsSignature<T, TExtra, IsMultiple>>\n    | undefined {\n    return this.args.afterOptionsComponent as\n      | ComponentLike<PowerSelectAfterOptionsSignature<T, TExtra, IsMultiple>>\n      | undefined;\n  }\n\n  // Actions\n  @action\n  handleOpen(_select: Dropdown, e: Event | undefined): 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.key === 'ArrowUp' || e.key === 'ArrowDown')\n      ) {\n        e.preventDefault();\n      }\n    }\n    this._resetHighlighted();\n  }\n\n  @action\n  handleClose(_select: Dropdown, e: Event | undefined): boolean | void {\n    // Prevent closing, when somebody was in input field and has clicked into an other position of input field\n    if (\n      this.searchFieldPosition === 'trigger' &&\n      this.storedAPI.isOpen &&\n      e?.type === 'mousedown' &&\n      document.activeElement === e?.target &&\n      (e?.target as HTMLElement).tagName === 'INPUT' &&\n      (e?.target as HTMLElement)?.closest(\n        '[data-ebd-id=\"' + this.storedAPI.uniqueId + '-trigger\"]',\n      )\n    ) {\n      return false;\n    }\n\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): boolean | void {\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.key === 'Enter' && this.storedAPI.isOpen) {\n      e.stopPropagation();\n      if (this.storedAPI.highlighted !== undefined) {\n        if (\n          !Array.isArray(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.key !== 'Tab' && // TAB\n      e.key !== 'Enter' && // ENTER\n      e.key !== 'Escape' // 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.key?.length === 1 && /^[a-z0-9]$/i.test(e.key)) {\n      // Keys 0-9, a-z or numpad keys\n      void this.triggerTypingTask.perform(e);\n    } else if (e.key === ' ') {\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      void 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<HTMLInputElement>(\n          'input[type=\"search\"]',\n        );\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      void 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  _updateHighlighted(): void {\n    if (this.storedAPI.isOpen) {\n      this._resetHighlighted();\n    }\n  }\n\n  @action\n  _highlight(opt: Option<T> | undefined): void {\n    if (opt && typeof opt === 'object' && 'disabled' in opt && opt.disabled) {\n      return;\n    }\n    this.highlighted = opt;\n  }\n\n  @action\n  _select(selected: Selected<T, IsMultiple>, 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: Option<T>, 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 as Selected<T, IsMultiple>, 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: Selected<T>): 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  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<T, IsMultiple>]) => {\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      void Promise.resolve().then(() => {\n        this._resetHighlighted();\n      });\n    }\n  }\n\n  private __updateSelected(): void {\n    if (!isSelectedPresent(this.args.selected)) return;\n    if (isPromiseLike(this.args.selected)) {\n      if (this._lastSelectedPromise === this.args.selected) return; // promise is still the same\n      const currentSelectedPromise = this.args.selected;\n      this._lastSelectedPromise = currentSelectedPromise;\n      void this._lastSelectedPromise.then((resolvedSelected) => {\n        if (this._lastSelectedPromise === currentSelectedPromise) {\n          this._resolvedSelected = resolvedSelected;\n          if (!Array.isArray(resolvedSelected)) {\n            this._highlight(resolvedSelected as Option<T>);\n          }\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 as Option<T>);\n      }\n    }\n  }\n\n  private __registerAPI(\n    _: Element,\n    [publicAPI]: [Select<T, IsMultiple>],\n  ): void {\n    this.storedAPI = publicAPI;\n    if (this.args.registerAPI) {\n      void 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 || undefined;\n            this.loading = false;\n            this.lastSearchedText = term;\n            void 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 || undefined;\n      void Promise.resolve().then(() => {\n        this._resetHighlighted();\n      });\n    }\n  }\n\n  @action\n  private _defaultMultipleBuildSelection(\n    selected: Option<T>,\n    select: Select<T, IsMultiple>,\n  ): Selected<T, IsMultiple> {\n    if (!this.args.multiple) {\n      throw new Error('The defaultBuildSelection is only allowed for multiple');\n    }\n\n    const newSelection: Option<T>[] = Array.isArray(select.selected)\n      ? (select.selected as Option<T>[]).slice(0)\n      : [];\n    let idx = -1;\n    for (let i = 0; i < newSelection.length; i++) {\n      if (isEqual(newSelection[i], selected)) {\n        idx = i;\n        break;\n      }\n    }\n    if (idx > -1) {\n      newSelection.splice(idx, 1);\n    } else {\n      newSelection.push(selected);\n    }\n\n    return newSelection as Selected<T, IsMultiple>;\n  }\n\n  focusInput(select: Select<T, IsMultiple>) {\n    if (select) {\n      const input = document.querySelector(\n        `#ember-power-select-trigger-input-${select.uniqueId}`,\n      ) as HTMLElement;\n      if (input) {\n        input.focus();\n      }\n    }\n  }\n\n  _routeKeydown(\n    select: Select<T, IsMultiple>,\n    e: KeyboardEvent,\n  ): boolean | void {\n    if (e.key === 'ArrowUp' || e.key === 'ArrowDown') {\n      // Up & Down\n      return this._handleKeyUpDown(select, e);\n    } else if (e.key === 'Enter') {\n      // ENTER\n      return this._handleKeyEnter(select, e);\n    } else if (e.key === 'Tab') {\n      // Tab\n      return this._handleKeyTab(select, e);\n    } else if (e.key === 'Escape') {\n      // ESC\n      return this._handleKeyESC(select, e);\n    }\n  }\n\n  _handleKeyTab(select: Select<T, IsMultiple>, e: KeyboardEvent): void {\n    select.actions.close(e);\n  }\n\n  _handleKeyESC(select: Select<T, IsMultiple>, e: KeyboardEvent): void {\n    select.actions.close(e);\n  }\n\n  _handleKeyEnter(\n    select: Select<T, IsMultiple>,\n    e: KeyboardEvent,\n  ): 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<T, IsMultiple>, 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<T, IsMultiple>, e: KeyboardEvent): void {\n    if (select.isOpen) {\n      e.preventDefault();\n      e.stopPropagation();\n      const step: 1 | -1 = e.key === 'ArrowDown' ? 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: Option<T> | undefined;\n    const defHighlighted = this.args.defaultHighlighted || defaultHighlighted;\n    if (typeof defHighlighted === 'function') {\n      highlighted = (defHighlighted as typeof defaultHighlighted)({\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: T[], term: string, skipDisabled = false): T[] {\n    const matcher = this.args.matcher || defaultMatcher;\n    const optionMatcher = getOptionMatcher(\n      matcher as MatcherFn<T>,\n      defaultMatcher as MatcherFn<T>,\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 T[],\n    term: string,\n    offset: number,\n    skipDisabled = false,\n  ): Option<T> | undefined {\n    const typeAheadOptionMatcher = getOptionMatcher(\n      this.args.typeAheadOptionMatcher ||\n        (defaultTypeAheadMatcher as MatcherFn<T>),\n      defaultTypeAheadMatcher as MatcherFn<T>,\n      this.args.searchField,\n    );\n    return findOptionWithOffset(\n      options || [],\n      term,\n      typeAheadOptionMatcher,\n      offset,\n      skipDisabled,\n    );\n  }\n\n  publicAPI = (dropdown: BasicDropdownDefaultBlock): Select<T, IsMultiple> => {\n    return Object.assign({}, dropdown, {\n      selected: this.selected,\n      multiple: this.args.multiple ?? false,\n      highlighted: this.highlighted,\n      options: this.options,\n      results: this.results,\n      resultsCount: this.resultsCount,\n      loading: this.loading,\n      isActive: this.isActive,\n      searchText: this.searchText,\n      lastSearchedText: this.lastSearchedText,\n      actions: Object.assign({}, dropdown.actions, this._publicAPIActions),\n    }) as Select<T, IsMultiple>;\n  };\n\n  // Tasks\n  triggerTypingTask = task({ restartable: true }, 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 term;\n\n    // Check if user intends to cycle through results. _repeatingChar can only be the first character.\n    const c = e.key?.length === 1 ? e.key : '';\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 (\n      !this.storedAPI.isOpen &&\n      this.selected !== undefined &&\n      this.selected !== null\n    ) {\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    const 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        let selected: Option<T> | Option<T>[] = match;\n        if (this.args.multiple) {\n          selected = [match];\n        }\n\n        this.storedAPI.actions.select(selected as Selected<T, IsMultiple>, e);\n      }\n    }\n    await timeout(1000);\n    this._expirableSearchText = '';\n    this._repeatingChar = '';\n  });\n\n  <template>\n    {{#if (or @labelText @labelComponent)}}\n      <this.labelComponent\n        @select={{this.storedAPI}}\n        @labelText={{@labelText}}\n        @labelId={{this.labelId}}\n        @triggerId={{this.triggerId}}\n        @labelTag={{@labelTag}}\n        @extra={{@extra}}\n        class={{@labelClass}}\n      />\n    {{/if}}\n    <BasicDropdown\n      @horizontalPosition={{@horizontalPosition}}\n      @destinationElement={{@destinationElement}}\n      @destination={{@destination}}\n      @initiallyOpened={{@initiallyOpened}}\n      @matchTriggerWidth={{this.matchTriggerWidth}}\n      @preventScroll={{or @preventScroll false}}\n      @onClose={{this.handleClose}}\n      @onOpen={{this.handleOpen}}\n      @renderInPlace={{@renderInPlace}}\n      @verticalPosition={{@verticalPosition}}\n      @disabled={{@disabled}}\n      @calculatePosition={{@calculatePosition}}\n      @triggerComponent={{@ebdTriggerComponent}}\n      @contentComponent={{@ebdContentComponent}}\n      @rootEventType={{or @rootEventType \"mousedown\"}}\n      as |dropdown|\n    >\n      {{#let\n        (this.publicAPI dropdown)\n        (concat \"ember-power-select-options-\" dropdown.uniqueId)\n        as |publicAPI listboxId|\n      }}\n        {{! template-lint-disable no-positive-tabindex }}\n        <dropdown.Trigger\n          @eventType={{or @eventType \"mousedown\"}}\n          {{this.updateOptions @options}}\n          {{this.updateSelected @selected}}\n          {{this.updateRegisterAPI publicAPI}}\n          {{this.updatePerformSearch this.searchText}}\n          {{on \"keydown\" this.handleTriggerKeydown}}\n          {{on \"focus\" this.handleFocus}}\n          {{on \"blur\" this.handleBlur}}\n          class=\"ember-power-select-trigger\n            {{if @multiple ' ember-power-select-multiple-trigger'}}\n            {{@triggerClass}}{{if\n              publicAPI.isActive\n              ' ember-power-select-trigger--active'\n            }}\"\n          aria-activedescendant={{if\n            dropdown.isOpen\n            (unless\n              @searchEnabled\n              (concat publicAPI.uniqueId \"-\" this.highlightedIndex)\n            )\n          }}\n          aria-controls={{if\n            (and dropdown.isOpen (not @searchEnabled))\n            listboxId\n          }}\n          aria-describedby={{@ariaDescribedBy}}\n          aria-haspopup={{unless @searchEnabled \"listbox\"}}\n          aria-invalid={{@ariaInvalid}}\n          aria-label={{@ariaLabel}}\n          aria-labelledby={{this.ariaLabelledBy}}\n          aria-owns={{if (and dropdown.isOpen (not @searchEnabled)) listboxId}}\n          aria-required={{@required}}\n          aria-autocomplete={{if @searchEnabled \"list\"}}\n          role={{or @triggerRole \"combobox\"}}\n          title={{@title}}\n          id={{this.triggerId}}\n          tabindex={{and (not @disabled) (or this.tabindex \"0\")}}\n          ...attributes\n        >\n          <this.triggerComponent\n            @allowClear={{@allowClear}}\n            @buildSelection={{this.buildSelection}}\n            @loadingMessage={{or @loadingMessage \"Loading options...\"}}\n            @selectedItemComponent={{this.selectedItemComponent}}\n            @select={{publicAPI}}\n            @searchEnabled={{@searchEnabled}}\n            @searchField={{@searchField}}\n            @searchFieldPosition={{this.searchFieldPosition}}\n            @onFocus={{this.handleFocus}}\n            @onBlur={{this.handleBlur}}\n            @extra={{@extra}}\n            @listboxId={{listboxId}}\n            @onInput={{this.handleInput}}\n            @onKeydown={{this.handleKeydown}}\n            @placeholder={{@placeholder}}\n            @searchPlaceholder={{@searchPlaceholder}}\n            @placeholderComponent={{this.placeholderComponent}}\n            @ariaActiveDescendant={{concat\n              publicAPI.uniqueId\n              \"-\"\n              this.highlightedIndex\n            }}\n            @ariaLabelledBy={{this.ariaLabelledBy}}\n            @ariaDescribedBy={{@ariaDescribedBy}}\n            @ariaLabel={{@ariaLabel}}\n            @role={{@triggerRole}}\n            @tabindex={{@tabindex}}\n            as |opt select|\n          >\n            {{yield opt select}}\n          </this.triggerComponent>\n        </dropdown.Trigger>\n        <dropdown.Content\n          class=\"ember-power-select-dropdown{{if\n              publicAPI.isActive\n              ' ember-power-select-dropdown--active'\n            }}\n            {{@dropdownClass}}\"\n          @animationEnabled={{@animationEnabled}}\n        >\n          {{#if (notEq @beforeOptionsComponent null)}}\n            <this.beforeOptionsComponent\n              @select={{publicAPI}}\n              @searchEnabled={{@searchEnabled}}\n              @onInput={{this.handleInput}}\n              @onKeydown={{this.handleKeydown}}\n              @onFocus={{this.handleFocus}}\n              @onBlur={{this.handleBlur}}\n              @placeholder={{@placeholder}}\n              @placeholderComponent={{this.placeholderComponent}}\n              @extra={{@extra}}\n              @listboxId={{listboxId}}\n              @ariaActiveDescendant={{if\n                this.highlightedIndex\n                (concat publicAPI.uniqueId \"-\" this.highlightedIndex)\n              }}\n              @selectedItemComponent={{this.selectedItemComponent}}\n              @searchPlaceholder={{@searchPlaceholder}}\n              @searchFieldPosition={{this.searchFieldPosition}}\n              @ariaLabel={{@ariaLabel}}\n              @ariaLabelledBy={{this.ariaLabelledBy}}\n              @ariaDescribedBy={{@ariaDescribedBy}}\n              @triggerRole={{@triggerRole}}\n            />\n          {{/if}}\n          <div class=\"ember-power-select-options-wrapper\">\n            {{#if this.mustShowSearchMessage}}\n              <this.searchMessageComponent\n                @searchMessage={{this.searchMessage}}\n                @select={{publicAPI}}\n                @extra={{@extra}}\n                id={{listboxId}}\n                aria-label={{@ariaLabel}}\n                aria-labelledby={{this.ariaLabelledBy}}\n              />\n            {{else if this.mustShowNoMessages}}\n              <this.noMatchesMessageComponent\n                @noMatchesMessage={{this.noMatchesMessage}}\n                @select={{publicAPI}}\n                @extra={{@extra}}\n                id={{listboxId}}\n                aria-label={{@ariaLabel}}\n                aria-labelledby={{this.ariaLabelledBy}}\n              />\n            {{else}}\n              <this.optionsComponent\n                @loadingMessage={{or @loadingMessage \"Loading options...\"}}\n                @select={{publicAPI}}\n                @options={{publicAPI.results}}\n                @groupIndex=\"\"\n                @optionsComponent={{this.optionsComponent}}\n                @extra={{@extra}}\n                @highlightOnHover={{this.highlightOnHover}}\n                @groupComponent={{this.groupComponent}}\n                role=\"listbox\"\n                aria-multiselectable={{if this.ariaMultiSelectable \"true\"}}\n                id={{listboxId}}\n                class=\"ember-power-select-options\"\n                as |option select|\n              >\n                {{yield option select}}\n              </this.optionsComponent>\n            {{/if}}\n\n            {{#if this.afterOptionsComponent}}\n              {{#let this.afterOptionsComponent as |AfterOptions|}}\n                <AfterOptions @extra={{@extra}} @select={{publicAPI}} />\n              {{/let}}\n            {{/if}}\n            <div\n              role=\"status\"\n              aria-live=\"polite\"\n              aria-atomic=\"true\"\n              class=\"ember-power-select-visually-hidden\"\n            >\n              {{this.resultCountMessage}}\n            </div>\n          </div>\n        </dropdown.Content>\n      {{/let}}\n    </BasicDropdown>\n  </template>\n}\n","import Component from '@glimmer/component';\nimport { action } from '@ember/object';\nimport { modifier } from 'ember-modifier';\nimport { task, timeout } from 'ember-concurrency';\nimport { on } from '@ember/modifier';\nimport { and, eq, or } from 'ember-truth-helpers';\nimport type { ComponentLike } from '@glint/template';\nimport type { PowerSelectPlaceholderSignature } from './placeholder.gts';\nimport type {\n  PowerSelectSelectedItemSignature,\n  Select,\n  TSearchFieldPosition,\n} from '../../types';\n\nexport interface PowerSelectBeforeOptionsSignature<\n  T = unknown,\n  TExtra = unknown,\n  IsMultiple extends boolean = false,\n> {\n  Element: HTMLDivElement;\n  Args: {\n    select: Select<T, IsMultiple>;\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    placeholder?: string;\n    autofocus?: boolean;\n    extra?: TExtra;\n    triggerRole?: string;\n    onKeydown: (e: KeyboardEvent) => boolean | void;\n    onBlur: (e: FocusEvent) => void;\n    onFocus: (e: FocusEvent) => void;\n    onInput: (e: InputEvent) => boolean | void;\n    placeholderComponent?: ComponentLike<\n      PowerSelectPlaceholderSignature<T, TExtra, IsMultiple>\n    >;\n    selectedItemComponent?: ComponentLike<\n      PowerSelectSelectedItemSignature<T, TExtra, IsMultiple>\n    >;\n  };\n}\n\nexport default class PowerSelectBeforeOptions<\n  T = unknown,\n  TExtra = unknown,\n  IsMultiple extends boolean = false,\n> extends Component<PowerSelectBeforeOptionsSignature<T, TExtra, IsMultiple>> {\n  didSetup: boolean = false;\n\n  @action\n  handleKeydown(e: KeyboardEvent): false | void {\n    if (this.args.onKeydown(e) === false) {\n      return false;\n    }\n    if (e.key === 'Enter') {\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  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    void 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  <template>\n    {{#if\n      (and\n        @searchEnabled\n        (or\n          (eq @searchFieldPosition \"before-options\")\n          (eq @searchFieldPosition undefined)\n        )\n      )\n    }}\n      <div class=\"ember-power-select-search\">\n        {{! template-lint-disable require-input-label }}\n        <input\n          type=\"search\"\n          autocomplete=\"off\"\n          autocorrect=\"off\"\n          autocapitalize=\"off\"\n          spellcheck={{false}}\n          class=\"ember-power-select-search-input\"\n          value={{@select.searchText}}\n          role={{or @role \"combobox\"}}\n          aria-activedescendant={{@ariaActiveDescendant}}\n          aria-controls={{@listboxId}}\n          aria-owns={{@listboxId}}\n          aria-autocomplete=\"list\"\n          aria-haspopup=\"listbox\"\n          aria-expanded={{if @select.isOpen \"true\" \"false\"}}\n          placeholder={{@searchPlaceholder}}\n          aria-label={{@ariaLabel}}\n          aria-labelledby={{@ariaLabelledBy}}\n          aria-describedby={{@ariaDescribedBy}}\n          {{on \"input\" this.handleInput}}\n          {{on \"focus\" @onFocus}}\n          {{on \"blur\" @onBlur}}\n          {{on \"keydown\" this.handleKeydown}}\n          {{this.setupInput}}\n        />\n      </div>\n    {{/if}}\n  </template>\n}\n","import Component from '@glimmer/component';\nimport { action } from '@ember/object';\nimport { modifier } from 'ember-modifier';\nimport { assert } from '@ember/debug';\nimport { get } from '@ember/object';\nimport { task, timeout } from 'ember-concurrency';\nimport { on } from '@ember/modifier';\nimport { or } from 'ember-truth-helpers';\nimport type { ComponentLike } from '@glint/template';\nimport type { PowerSelectPlaceholderSignature } from './placeholder.gts';\nimport type { Select, Selected, TSearchFieldPosition } from '../../types';\nimport type { PowerSelectArgs } from '../power-select.gts';\n\nexport interface PowerSelectInputSignature<\n  T = unknown,\n  TExtra = unknown,\n  IsMultiple extends boolean = false,\n> {\n  Element: HTMLInputElement;\n  Args: {\n    select: Select<T, IsMultiple>;\n    ariaLabel?: string;\n    ariaLabelledBy?: string;\n    ariaDescribedBy?: string;\n    role?: string;\n    searchField?: string;\n    searchPlaceholder?: string;\n    searchFieldPosition?: TSearchFieldPosition;\n    ariaActiveDescendant?: string;\n    isDefaultPlaceholder?: boolean;\n    listboxId?: string;\n    autofocus?: boolean;\n    tabindex?: number | string;\n    extra?: TExtra;\n    placeholderComponent?: ComponentLike<\n      PowerSelectPlaceholderSignature<T, TExtra, IsMultiple>\n    >;\n    onKeydown?: (e: KeyboardEvent) => boolean | void;\n    onBlur?: (e: FocusEvent) => void;\n    onFocus?: (e: FocusEvent) => void;\n    onInput?: (e: InputEvent) => void | boolean;\n    buildSelection?: PowerSelectArgs<T, IsMultiple, TExtra>['buildSelection'];\n  };\n}\n\nexport default class PowerSelectInput<\n  T = unknown,\n  TExtra = unknown,\n  IsMultiple extends boolean = false,\n> extends Component<PowerSelectInputSignature<T, TExtra, IsMultiple>> {\n  didSetup: boolean = false;\n\n  private _lastIsOpen: boolean = this.args.select.isOpen;\n\n  get placeholder() {\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.searchPlaceholder || ''\n        : '';\n    }\n\n    return 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.key === 'Backspace') {\n        e.stopPropagation();\n        if (\n          !(e.target as HTMLInputElement).value.trim() &&\n          this.args.buildSelection &&\n          Array.isArray(this.args.select.selected)\n        ) {\n          const selected = this.args.select.selected as Selected<T, true>;\n          const lastSelection = selected[selected.length - 1];\n\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.key?.length === 1 && /[a-z0-9 ]/i.test(e.key)) {\n        // Keys 0-9, a-z or SPACE\n        e.stopPropagation();\n      }\n    } else if (e.key === 'Enter') {\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      void Promise.resolve().then(() => {\n        this.args.select.actions?.search('');\n      });\n    }\n    this._lastIsOpen = isOpen;\n  }\n\n  private _focusInput(el: HTMLElement) {\n    void 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  <template>\n    <div class=\"ember-power-select-input\">\n      {{! template-lint-disable require-input-label }}\n      {{! template-lint-disable no-positive-tabindex }}\n      {{! template-lint-disable require-aria-activedescendant-tabindex }}\n      <input\n        type=\"search\"\n        autocomplete=\"off\"\n        autocorrect=\"off\"\n        autocapitalize=\"off\"\n        spellcheck={{false}}\n        class={{if\n          @select.multiple\n          \"ember-power-select-trigger-multiple-input\"\n          \"ember-power-select-search-input-field\"\n        }}\n        value={{@select.searchText}}\n        role={{or @role \"combobox\"}}\n        aria-activedescendant={{if @select.isOpen @ariaActiveDescendant}}\n        aria-controls={{if @select.isOpen @listboxId}}\n        aria-owns={{if @select.isOpen @listboxId}}\n        aria-autocomplete=\"list\"\n        aria-haspopup=\"listbox\"\n        aria-expanded={{if @select.isOpen \"true\" \"false\"}}\n        placeholder={{this.placeholder}}\n        aria-label={{@ariaLabel}}\n        aria-labelledby={{@ariaLabelledBy}}\n        aria-describedby={{@ariaDescribedBy}}\n        disabled={{@select.disabled}}\n        tabindex={{@tabindex}}\n        form=\"power-select-fake-form\"\n        id=\"ember-power-select-trigger-input-{{@select.uniqueId}}\"\n        {{on \"input\" this.handleInput}}\n        {{on \"focus\" this.handleFocus}}\n        {{on \"blur\" this.handleBlur}}\n        {{on \"keydown\" this.handleKeydown}}\n        {{this.setupInput}}\n        {{this.openChange @select.isOpen}}\n        ...attributes\n      />\n    </div>\n  </template>\n}\n","import Component from '@glimmer/component';\nimport { action } from '@ember/object';\nimport { eq, or } from 'ember-truth-helpers';\nimport element from 'ember-element-helper/helpers/element';\nimport { on } from '@ember/modifier';\nimport type { Select } from '../../types.js';\n\nexport interface PowerSelectLabelArgs<\n  T = unknown,\n  TExtra = unknown,\n  IsMultiple extends boolean = false,\n> {\n  select: Select<T, IsMultiple>;\n  labelText?: string;\n  labelId: string;\n  triggerId: string;\n  labelTag?: keyof HTMLElementTagNameMap;\n  extra?: TExtra;\n}\n\nexport interface PowerSelectLabelSignature<\n  T = unknown,\n  TExtra = unknown,\n  IsMultiple extends boolean = false,\n> {\n  Element: HTMLElement;\n  Args: PowerSelectLabelArgs<T, TExtra, IsMultiple>;\n}\n\nexport default class PowerSelectLabel<\n  T = unknown,\n  TExtra = unknown,\n  IsMultiple extends boolean = false,\n> extends Component<PowerSelectLabelSignature<T, TExtra, IsMultiple>> {\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  <template>\n    {{#let\n      (or @labelTag \"div\") (element (or @labelTag \"div\"))\n      as |tagName LabelTag|\n    }}\n      <LabelTag\n        id={{@labelId}}\n        class=\"ember-power-select-label\"\n        ...attributes\n        for={{if (eq tagName \"label\") @triggerId}}\n        {{on \"click\" this.onLabelClick}}\n      >\n        {{@labelText}}\n      </LabelTag>\n    {{/let}}\n  </template>\n}\n","import Component from '@glimmer/component';\nimport type { Select } from '../../types.js';\n\nexport interface PowerSelectNoMatchesMessageSignature<\n  T = unknown,\n  TExtra = unknown,\n  IsMultiple extends boolean = false,\n> {\n  Element: HTMLUListElement;\n  Args: {\n    noMatchesMessage?: string;\n    select?: Select<T, IsMultiple>;\n    extra?: TExtra;\n  };\n}\n\nexport default class PowerSelectNoMatchesMessage<\n  T = unknown,\n  TExtra = unknown,\n  IsMultiple extends boolean = false,\n> extends Component<\n  PowerSelectNoMatchesMessageSignature<T, TExtra, IsMultiple>\n> {\n  <template>\n    {{#if @noMatchesMessage}}\n      <ul class=\"ember-power-select-options\" role=\"listbox\" ...attributes>\n        <li\n          class=\"ember-power-select-option ember-power-select-option--no-matches-message\"\n          role=\"option\"\n          aria-selected={{false}}\n        >\n          {{@noMatchesMessage}}\n        </li>\n      </ul>\n    {{/if}}\n  </template>\n}\n","import Component from '@glimmer/component';\nimport { modifier } from 'ember-modifier';\nimport emberPowerSelectIsGroup from '../../helpers/ember-power-select-is-group.ts';\nimport emberPowerSelectIsEqual from '../../helpers/ember-power-select-is-equal.ts';\nimport type { ComponentLike } from '@glint/template';\nimport type { PowerSelectPowerSelectGroupSignature } from './power-select-group.gts';\nimport type { GroupObject, Option, Select } from '../../types';\n\ndeclare const FastBoot: unknown;\n\nexport interface PowerSelectOptionsSignature<\n  T,\n  TExtra = unknown,\n  IsMultiple extends boolean = false,\n> {\n  Element: HTMLUListElement;\n  Args: PowerSelectOptionsArgs<T, TExtra, IsMultiple>;\n  Blocks: {\n    default: [opt: Option<T>, select: Select<T, IsMultiple>];\n  };\n}\n\ninterface PowerSelectOptionsArgs<\n  T,\n  TExtra = unknown,\n  IsMultiple extends boolean = false,\n> {\n  select: Select<T, IsMultiple>;\n  highlightOnHover?: boolean;\n  listboxId?: string;\n  groupIndex: string;\n  loadingMessage?: string;\n  options: readonly T[];\n  extra?: TExtra;\n  groupComponent?: ComponentLike<\n    PowerSelectPowerSelectGroupSignature<T, TExtra, IsMultiple>\n  >;\n  optionsComponent?: ComponentLike<\n    PowerSelectOptionsSignature<T, TExtra, IsMultiple>\n  >;\n}\n\nconst isTouchDevice = !!window && 'ontouchstart' in window;\nif (typeof FastBoot === 'undefined') {\n  (function (ElementProto) {\n    if (typeof ElementProto.matches !== 'function') {\n      // eslint-disable-next-line @typescript-eslint/no-unsafe-assignment\n      ElementProto.matches =\n        // @ts-expect-error Property 'msMatchesSelector' does not exist on type 'Element'.\n        ElementProto.msMatchesSelector ||\n        // @ts-expect-error Property 'mozMatchesSelector' does not exist on type 'Element'.\n        ElementProto.mozMatchesSelector ||\n        // eslint-disable-next-line @typescript-eslint/unbound-method\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 PowerSelectOptions<\n  T = unknown,\n  TExtra = unknown,\n  IsMultiple extends boolean = false,\n> extends Component<PowerSelectOptionsSignature<T, TExtra, IsMultiple>> {\n  <template>\n    {{! template-lint-disable require-context-role }}\n    <ul {{this.setupHandlers}} ...attributes>\n      {{#if @select.loading}}\n        {{#if @loadingMessage}}\n          <li\n            class=\"ember-power-select-option ember-power-select-option--loading-message\"\n            role=\"option\"\n            aria-selected={{false}}\n          >{{@loadingMessage}}</li>\n        {{/if}}\n      {{/if}}\n      {{#let @groupComponent @optionsComponent as |Group Options|}}\n        {{#each @options as |opt index|}}\n          {{#if (emberPowerSelectIsGroup opt)}}\n            {{#let (this.groupTyping opt) as |groupOpt|}}\n              <Group @group={{groupOpt}} @select={{@select}} @extra={{@extra}}>\n                <Options\n                  @options={{this.options groupOpt}}\n                  @select={{@select}}\n                  @groupIndex=\"{{@groupIndex}}{{index}}.\"\n                  @optionsComponent={{@optionsComponent}}\n                  @groupComponent={{@groupComponent}}\n                  @extra={{@extra}}\n                  role=\"presentation\"\n                  data-optgroup=\"true\"\n                  class=\"ember-power-select-options\"\n                  as |option|\n                >\n                  {{yield option @select}}\n                </Options>\n              </Group>\n            {{/let}}\n          {{else}}\n            <li\n              class=\"ember-power-select-option\"\n              id=\"{{@select.uniqueId}}-{{@groupIndex}}{{index}}\"\n              aria-selected=\"{{emberPowerSelectIsEqual opt @select.selected}}\"\n              aria-disabled={{if (this.isOptionDisabled opt) \"true\"}}\n              aria-current=\"{{emberPowerSelectIsEqual opt @select.highlighted}}\"\n              data-option-index=\"{{@groupIndex}}{{index}}\"\n              role=\"option\"\n            >\n              {{yield (this.optionTyping opt) @select}}\n            </li>\n          {{/if}}\n        {{/each}}\n      {{/let}}\n    </ul>\n  </template>\n  // extra._isTouchDevice is a workaround for test,!\n  private isTouchDevice =\n    (this.args.extra as (TExtra & { _isTouchDevice?: boolean }) | undefined)\n      ?._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  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  isOptionDisabled(option: T): boolean {\n    if (option && typeof option === 'object' && 'disabled' in option) {\n      return option.disabled as boolean;\n    }\n\n    return false;\n  }\n\n  options(group: GroupObject<T>): readonly T[] {\n    if (group && typeof group === 'object' && 'options' in group) {\n      return group.options as T[];\n    }\n\n    return [];\n  }\n\n  groupTyping(opt: T) {\n    return opt as GroupObject<T>;\n  }\n\n  optionTyping(opt: T) {\n    return opt as Option<T>;\n  }\n\n  _optionFromIndex(index: string): Option<T> {\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      if (\n        option &&\n        typeof option === 'object' &&\n        'options' in option &&\n        option.options\n      ) {\n        option = (option.options as T[])[parseInt(parts[i] ?? '', 10)];\n      }\n    }\n    return option as Option<T>;\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    const changedTouch = moveEvent.changedTouches[0];\n\n    if (\n      !endEvent.changedTouches?.[0] ||\n      // @ts-expect-error Property 'touchType' does not exist on type 'Touch'.\n      changedTouch?.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      (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    const findOptionAndPerform = (\n      action: (selected: Option<T> | undefined, e?: Event) => void,\n      e: MouseEvent,\n    ): 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 Component from '@glimmer/component';\nimport type { ComponentLike } from '@glint/template';\nimport type { PowerSelectInputSignature } from './input.gts';\nimport type { Select } from '../../types.ts';\n\nexport interface PowerSelectPlaceholderSignatureArgs<\n  T = unknown,\n  TExtra = unknown,\n  IsMultiple extends boolean = false,\n> {\n  select: Select<T, IsMultiple>;\n  isMultipleWithSearch?: boolean;\n  placeholder?: string;\n  displayPlaceholder?: boolean;\n  extra?: TExtra;\n  inputComponent?: ComponentLike<\n    PowerSelectInputSignature<T, TExtra, IsMultiple>\n  >;\n}\n\nexport interface PowerSelectPlaceholderSignature<\n  T = unknown,\n  TExtra = unknown,\n  IsMultiple extends boolean = false,\n> {\n  Element: HTMLSpanElement;\n  Args: PowerSelectPlaceholderSignatureArgs<T, TExtra, IsMultiple>;\n}\n\nexport default class PowerSelectPlaceholder<\n  T = unknown,\n  TExtra = unknown,\n  IsMultiple extends boolean = false,\n> extends Component<PowerSelectPlaceholderSignature<T, TExtra, IsMultiple>> {\n  <template>\n    {{#if @isMultipleWithSearch}}\n      {{#let @inputComponent as |InputComponent|}}\n        <InputComponent @isDefaultPlaceholder={{true}} @select={{@select}} />\n      {{/let}}\n    {{else if @placeholder}}\n      <span\n        class=\"ember-power-select-placeholder\"\n        ...attributes\n      >{{@placeholder}}</span>\n    {{/if}}\n  </template>\n}\n","import Component from '@glimmer/component';\nimport { guidFor } from '@ember/object/internals';\nimport type { GroupBase, GroupObject, Select } from '../../types.ts';\n\nexport interface PowerSelectPowerSelectGroupSignature<\n  T,\n  TExtra = unknown,\n  IsMultiple extends boolean = false,\n> {\n  Element: HTMLLIElement;\n  Args: {\n    group: GroupObject<T>;\n    select: Select<T, IsMultiple>;\n    extra?: TExtra;\n  };\n  Blocks: {\n    default: [];\n  };\n}\n\nexport default class PowerSelectPowerSelectGroup<\n  T extends GroupBase,\n  TExtra = unknown,\n  IsMultiple extends boolean = false,\n> extends Component<\n  PowerSelectPowerSelectGroupSignature<T, TExtra, IsMultiple>\n> {\n  uniqueId = guidFor(this);\n\n  <template>\n    <li\n      class=\"ember-power-select-group\"\n      aria-disabled={{if @group.disabled \"true\"}}\n      role=\"group\"\n      aria-labelledby={{this.uniqueId}}\n    >\n      <span\n        class=\"ember-power-select-group-name\"\n        id={{this.uniqueId}}\n      >{{@group.groupName}}</span>\n      {{yield}}\n    </li>\n  </template>\n}\n","import Component from '@glimmer/component';\nimport type { Select } from '../../types.ts';\n\nexport interface PowerSelectSearchMessageSignature<\n  T = unknown,\n  TExtra = unknown,\n  IsMultiple extends boolean = false,\n> {\n  Element: HTMLUListElement;\n  Args: {\n    searchMessage: string;\n    select?: Select<T, IsMultiple>;\n    extra?: TExtra;\n  };\n}\n\nexport default class PowerSelectSearchMessage<\n  T = unknown,\n  TExtra = unknown,\n  IsMultiple extends boolean = false,\n> extends Component<PowerSelectSearchMessageSignature<T, TExtra, IsMultiple>> {\n  <template>\n    <ul class=\"ember-power-select-options\" role=\"listbox\" ...attributes>\n      <li\n        class=\"ember-power-select-option ember-power-select-option--search-message\"\n        role=\"option\"\n        aria-selected={{false}}\n      >\n        {{@searchMessage}}\n      </li>\n    </ul>\n  </template>\n}\n","import Component from '@glimmer/component';\nimport { action } from '@ember/object';\nimport { get } from '@ember/object';\nimport { modifier } from 'ember-modifier';\nimport PowerSelectInput, { type PowerSelectInputSignature } from './input.gts';\nimport { and, eq, isEmpty, not, notEq, or } from 'ember-truth-helpers';\nimport { on } from '@ember/modifier';\nimport selectIsSelectedPresent from '../../helpers/ember-power-select-is-selected-present.ts';\nimport type { PowerSelectArgs } from '../power-select.gts';\nimport type { ComponentLike } from '@glint/template';\nimport type { PowerSelectPlaceholderSignature } from './placeholder.gts';\nimport type {\n  Option,\n  PowerSelectSelectedItemSignature,\n  Select,\n  Selected,\n  TSearchFieldPosition,\n} from '../../types.ts';\n\nexport interface PowerSelectTriggerSignature<\n  T = unknown,\n  TExtra = unknown,\n  IsMultiple extends boolean = false,\n> {\n  Element: HTMLUListElement;\n  Args: {\n    select: Select<T, IsMultiple>;\n    allowClear?: boolean;\n    searchEnabled?: boolean;\n    placeholder?: string;\n    searchPlaceholder?: string;\n    searchField?: string;\n    searchFieldPosition?: TSearchFieldPosition;\n    listboxId?: string;\n    tabindex?: number | string;\n    ariaLabel?: string;\n    ariaLabelledBy?: string;\n    ariaDescribedBy?: string;\n    loadingMessage?: string;\n    role?: string;\n    ariaActiveDescendant: string;\n    extra?: TExtra;\n    buildSelection?: PowerSelectArgs<T, IsMultiple, TExtra>['buildSelection'];\n    placeholderComponent?: ComponentLike<\n      PowerSelectPlaceholderSignature<T, TExtra, IsMultiple>\n    >;\n    selectedItemComponent?: ComponentLike<\n      PowerSelectSelectedItemSignature<T, TExtra, IsMultiple>\n    >;\n    onInput?: (e: InputEvent) => void | boolean;\n    onKeydown?: (e: KeyboardEvent) => void | boolean;\n    onFocus?: (e: FocusEvent) => void;\n    onBlur?: (e: FocusEvent) => void;\n  };\n  Blocks: {\n    default: [selected: Option<T>, select: Select<T, IsMultiple>];\n  };\n}\n\nexport default class PowerSelectTrigger<\n  T = unknown,\n  TExtra = unknown,\n  IsMultiple extends boolean = false,\n> extends Component<PowerSelectTriggerSignature<T, TExtra, IsMultiple>> {\n  private _lastIsOpen: boolean = this.args.select.isOpen;\n\n  get inputComponent(): ComponentLike<\n    PowerSelectInputSignature<T, TExtra, IsMultiple>\n  > {\n    return PowerSelectInput;\n  }\n\n  get selected() {\n    return this.args.select.selected as Selected<T, false>;\n  }\n\n  get selectedMultiple() {\n    return this.args.select.selected as Selected<T, true>;\n  }\n\n  @action\n  clear(e: Event): void {\n    e.stopPropagation();\n    const value = this.args.select.multiple ? [] : undefined;\n    this.args.select.actions.select(value as Selected<T, IsMultiple>);\n  }\n\n  isOptionDisabled(option: Option<T>): boolean {\n    if (option && typeof option === 'object' && 'disabled' in option) {\n      return option.disabled as boolean;\n    }\n\n    return false;\n  }\n\n  @action\n  chooseOption(e: Event) {\n    if (!this.args.select.multiple) {\n      return;\n    }\n\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(this.selectedMultiple, numericIndex);\n      this.args.select.actions.choose(object);\n    }\n  }\n\n  stopPropagation(e: Event): void {\n    e.stopPropagation();\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      void Promise.resolve().then(() => {\n        this.args.select.actions?.search('');\n      });\n    }\n    this._lastIsOpen = isOpen;\n  }\n\n  selectedObject<T>(\n    list: readonly Option<T>[] | undefined,\n    index: number,\n  ): Option<T> | undefined {\n    if (list && 'objectAt' in list && typeof list.objectAt === 'function') {\n      return (\n        list as readonly Option<T>[] & {\n          objectAt(index: number): T | undefined;\n        }\n      ).objectAt(index) as Option<T> | undefined;\n    } else if (list) {\n      return get(list, index);\n    }\n  }\n\n  <template>\n    {{#if @select.multiple}}\n      {{! template-lint-disable no-invalid-interactive }}\n      {{! template-lint-disable no-unsupported-role-attributes }}\n      {{! template-lint-disable require-aria-activedescendant-tabindex }}\n      <ul\n        id=\"ember-power-select-multiple-options-{{@select.uniqueId}}\"\n        aria-activedescendant={{if\n          (and @select.isOpen (not @searchEnabled))\n          @ariaActiveDescendant\n        }}\n        class=\"ember-power-select-multiple-options\"\n        {{this.openChange @select.isOpen}}\n        {{on \"click\" this.chooseOption}}\n        ...attributes\n      >\n        {{#if (selectIsSelectedPresent this.selectedMultiple)}}\n          {{#each this.selectedMultiple as |opt idx|}}\n            <li\n              class=\"ember-power-select-multiple-option\n                {{if\n                  (this.isOptionDisabled opt)\n                  'ember-power-select-multiple-option--disabled'\n                }}\"\n            >\n              {{#unless @select.disabled}}\n                {{! template-lint-disable no-pointer-down-event-binding }}\n                <span\n                  role=\"button\"\n                  aria-label=\"remove element\"\n                  class=\"ember-power-select-multiple-remove-btn\"\n                  data-selected-index={{idx}}\n                  {{on \"touchend\" this.stopPropagation}}\n                  {{on \"mousedown\" this.stopPropagation}}\n                >\n                  &times;\n                </span>\n              {{/unless}}\n              {{#if @selectedItemComponent}}\n                {{#let @selectedItemComponent as |SelectedItemComponent|}}\n                  <SelectedItemComponent\n                    @extra={{@extra}}\n                    @selected={{opt}}\n                    @select={{@select}}\n                  />\n                {{/let}}\n              {{else}}\n                {{yield opt @select}}\n              {{/if}}\n            </li>\n          {{/each}}\n        {{else}}\n          {{#if\n            (and\n              @placeholder\n              (or\n                (not @searchEnabled) (eq @searchFieldPosition \"before-options\")\n              )\n            )\n          }}\n            <li>\n              {{#let @placeholderComponent as |PlaceholderComponent|}}\n                <PlaceholderComponent\n                  @placeholder={{@placeholder}}\n                  @select={{@select}}\n                />\n              {{/let}}\n            </li>\n          {{/if}}\n        {{/if}}\n        {{#if (and @searchEnabled (eq @searchFieldPosition \"trigger\"))}}\n          <li class=\"ember-power-select-trigger-multiple-input-container\">\n            {{#let\n              (component\n                this.inputComponent\n                select=@select\n                extra=@extra\n                ariaActiveDescendant=@ariaActiveDescendant\n                ariaLabelledBy=@ariaLabelledBy\n                ariaDescribedBy=@ariaDescribedBy\n                role=@role\n                ariaLabel=@ariaLabel\n                listboxId=@listboxId\n                tabindex=@tabindex\n                buildSelection=@buildSelection\n                searchPlaceholder=(or @placeholder @searchPlaceholder)\n                placeholderComponent=@placeholderComponent\n                searchField=@searchField\n                searchFieldPosition=@searchFieldPosition\n                onFocus=@onFocus\n                onBlur=@onBlur\n                onKeydown=@onKeydown\n                onInput=@onInput\n              )\n              as |InputComponent|\n            }}\n              {{#let @placeholderComponent as |PlaceholderComponent|}}\n                <PlaceholderComponent\n                  @select={{@select}}\n                  @extra={{@extra}}\n                  @placeholder={{@placeholder}}\n                  @isMultipleWithSearch={{true}}\n                  @inputComponent={{InputComponent}}\n                  @displayPlaceholder={{and\n                    (not @select.searchText)\n                    (isEmpty @select.selected)\n                  }}\n                />\n              {{/let}}\n            {{/let}}\n          </li>\n        {{/if}}\n      </ul>\n    {{else}}\n      {{#if (selectIsSelectedPresent this.selected)}}\n        {{#if\n          (or (notEq @searchFieldPosition \"trigger\") (not @select.searchText))\n        }}\n          {{#if @selectedItemComponent}}\n            {{#let @selectedItemComponent as |SelectedItemComponent|}}\n              <SelectedItemComponent\n                @extra={{@extra}}\n                @selected={{this.selected}}\n                @select={{@select}}\n              />\n            {{/let}}\n          {{else}}\n            <span class=\"ember-power-select-selected-item\">\n              {{yield this.selected @select}}\n            </span>\n          {{/if}}\n        {{/if}}\n        {{#if (and @searchEnabled (eq @searchFieldPosition \"trigger\"))}}\n          <PowerSelectInput\n            @select={{@select}}\n            @extra={{@extra}}\n            @ariaActiveDescendant={{@ariaActiveDescendant}}\n            @ariaLabelledBy={{@ariaLabelledBy}}\n            @ariaDescribedBy={{@ariaDescribedBy}}\n            @role={{@role}}\n            @ariaLabel={{@ariaLabel}}\n            @listboxId={{@listboxId}}\n            @tabindex={{@tabindex}}\n            @buildSelection={{@buildSelection}}\n            @searchPlaceholder={{or @placeholder @searchPlaceholder}}\n            @placeholderComponent={{@placeholderComponent}}\n            @searchField={{@searchField}}\n            @onFocus={{@onFocus}}\n            @onBlur={{@onBlur}}\n            @onKeydown={{@onKeydown}}\n            @onInput={{@onInput}}\n            @searchFieldPosition={{@searchFieldPosition}}\n            @autofocus={{false}}\n          />\n        {{/if}}\n        {{#if (and @allowClear (not @select.disabled))}}\n          {{! template-lint-disable no-pointer-down-event-binding }}\n          <span\n            class=\"ember-power-select-clear-btn\"\n            role=\"button\"\n            {{on \"touchend\" this.stopPropagation}}\n            {{on \"mousedown\" this.stopPropagation}}\n            {{on \"click\" this.clear}}\n          >&times;</span>\n        {{/if}}\n      {{else}}\n        {{#if (and @searchEnabled (eq @searchFieldPosition \"trigger\"))}}\n          {{#let\n            (component\n              this.inputComponent\n              select=@select\n              extra=@extra\n              ariaActiveDescendant=@ariaActiveDescendant\n              ariaLabelledBy=@ariaLabelledBy\n              ariaDescribedBy=@ariaDescribedBy\n              role=@role\n              ariaLabel=@ariaLabel\n              listboxId=@listboxId\n              searchPlaceholder=(or @placeholder @searchPlaceholder)\n              onFocus=@onFocus\n              onBlur=@onBlur\n              onKeydown=@onKeydown\n              onInput=@onInput\n              searchFieldPosition=@searchFieldPosition\n              autofocus=false\n            )\n            as |InputComponent|\n          }}\n            {{#let @placeholderComponent as |PlaceholderComponent|}}\n              <PlaceholderComponent\n                @select={{@select}}\n                @placeholder={{@placeholder}}\n                @isMultipleWithSearch={{true}}\n                @inputComponent={{InputComponent}}\n                @extra={{@extra}}\n                @displayPlaceholder={{and\n                  (not @select.searchText)\n                  (isEmpty this.selected)\n                }}\n              />\n            {{/let}}\n          {{/let}}\n        {{else}}\n          {{#let @placeholderComponent as |PlaceholderComponent|}}\n            <PlaceholderComponent\n              @placeholder={{@placeholder}}\n              @select={{@select}}\n              @extra={{@extra}}\n            />\n          {{/let}}\n        {{/if}}\n      {{/if}}\n    {{/if}}\n    <span class=\"ember-power-select-status-icon\"></span>\n  </template>\n}\n","export default function emberPowerSelectIsArray<T>(\n  maybeArray: T | T[] | undefined,\n): maybeArray is T[] {\n  return Array.isArray(maybeArray);\n}\n","import isEqual from '../utils/equal.ts';\n\nexport default function emberPowerSelectIsEqual(\n  option: unknown,\n  selected: unknown,\n): boolean {\n  if (selected === undefined || selected === null) {\n    return false;\n  }\n  if (Array.isArray(selected)) {\n    for (let i = 0; i < selected.length; i++) {\n      if (isEqual(selected[i], option)) {\n        return true;\n      }\n    }\n    return false;\n  } else {\n    return isEqual(option, selected);\n  }\n}\n","import { isGroup } from '../utils/group-utils.ts';\nimport type { GroupBase } from '../types.ts';\n\nexport default function emberPowerSelectIsGroup<T>(\n  maybeGroup: unknown,\n): maybeGroup is GroupBase<T> {\n  return isGroup(maybeGroup);\n}\n","export default function emberPowerSelectIsSelectedPresent<T>(\n  value: T | undefined,\n): value is T {\n  return value !== null && value !== undefined && value !== '';\n}\n","export default function isEqual(a: unknown, b: unknown): boolean {\n  if (\n    a &&\n    typeof a === 'object' &&\n    'isEqual' in a &&\n    typeof (a as IsEqual).isEqual === 'function'\n  ) {\n    return (a as IsEqual).isEqual(b);\n  }\n\n  if (a instanceof Date && b instanceof Date) {\n    return a.getTime() === b.getTime();\n  }\n\n  return a === b;\n}\n\ninterface IsEqual {\n  isEqual(val: unknown): boolean;\n}\n","import isEqual from '../utils/equal.ts';\nimport type {\n  DefaultHighlightedParams,\n  GroupBase,\n  MatcherFn,\n  Option,\n  Selected,\n} from '../types';\n\nexport function isGroup<T>(entry: unknown): entry is GroupBase<T> {\n  return (\n    !!entry &&\n    typeof entry === 'object' &&\n    'groupName' in entry &&\n    'options' in entry &&\n    !!entry.groupName &&\n    !!entry.options\n  );\n}\n\nexport function countOptions<T = unknown>(collection: readonly T[]): 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[i];\n      if (isGroup(entry)) {\n        walk((entry as unknown as GroupBase<T>).options);\n      } else {\n        counter++;\n      }\n    }\n  })(collection);\n  return counter;\n}\n\nexport function indexOfOption<T, Option>(\n  collection: readonly T[],\n  option: Option,\n): 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[i];\n      if (isGroup(entry)) {\n        const result = walk((entry as unknown as GroupBase<T>).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<T = unknown>(\n  collection: readonly T[],\n  option: unknown,\n): 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[i];\n      if (isGroup(entry)) {\n        const result = walk((entry as unknown as GroupBase<T>).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<T>(\n  originalCollection: readonly T[],\n  index: number,\n): { disabled: boolean; option: Option<T> | undefined } {\n  let counter = 0;\n  return (\n    (function walk(\n      collection,\n      ancestorIsDisabled,\n    ): { disabled: boolean; option: Option<T> | undefined } | 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[localCounter];\n        if (isGroup(entry)) {\n          const found = walk(\n            (entry as unknown as GroupBase<T>).options,\n            ancestorIsDisabled ||\n              (typeof entry === 'object' &&\n                'disabled' in entry &&\n                !!(entry as unknown as GroupBase<T>).disabled),\n          );\n          if (found) {\n            return found;\n          }\n        } else if (counter === index) {\n          return {\n            disabled:\n              ancestorIsDisabled ||\n              (typeof entry === 'object' &&\n                'disabled' in (entry as GroupBase<T>) &&\n                !!(entry as unknown as GroupBase<T>).disabled),\n            option: entry as Option<T>,\n          };\n        } else {\n          counter++;\n        }\n        localCounter++;\n      }\n    })(originalCollection, false) || { disabled: false, option: undefined }\n  );\n}\n\nfunction copyGroup<T = unknown, IsMultiple extends boolean = false>(\n  group: GroupBase<Selected<T, IsMultiple>>,\n  subOptions: Selected<T, IsMultiple>[],\n): GroupBase<Selected<T, IsMultiple>> {\n  const groupCopy: GroupBase<Selected<T, IsMultiple>> = {\n    ...group,\n    options: subOptions,\n  };\n  if (Object.prototype.hasOwnProperty.call(group, 'disabled')) {\n    groupCopy.disabled = group.disabled;\n  }\n  return groupCopy;\n}\n\nexport function findOptionWithOffset<T>(\n  options: readonly T[],\n  text: string,\n  matcher: MatcherFn<T>,\n  offset: number,\n  skipDisabled = false,\n): Option<T> | undefined {\n  let counter = 0;\n  let foundBeforeOffset: Option<T> | undefined;\n  let foundAfterOffset: Option<T> | undefined | false = false;\n  const canStop = () => !!foundAfterOffset;\n\n  (function walk(options: readonly T[], ancestorIsDisabled: boolean): void {\n    const length = options.length;\n\n    for (let i = 0; i < length; i++) {\n      const entry = options[i];\n      const entryIsDisabled =\n        !!entry &&\n        typeof entry === 'object' &&\n        'disabled' in entry &&\n        !!entry.disabled;\n      if (!skipDisabled || !entryIsDisabled) {\n        if (isGroup(entry)) {\n          walk(\n            (entry as unknown as GroupBase<T>).options,\n            ancestorIsDisabled || entryIsDisabled,\n          );\n          if (canStop()) {\n            return;\n          }\n        } else if (matcher(entry, text) >= 0) {\n          if (counter < offset) {\n            if (!foundBeforeOffset) {\n              foundBeforeOffset = entry as Option<T>;\n            }\n          } else {\n            foundAfterOffset = entry as Option<T>;\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  T = unknown,\n  MT = unknown,\n  IsMultiple extends boolean = false,\n>(\n  options: readonly T[],\n  text: string,\n  matcher: MatcherFn<MT>,\n  skipDisabled = false,\n): T[] {\n  const opts: T[] = [];\n  const length = options.length;\n  for (let i = 0; i < length; i++) {\n    const entry = options[i];\n    if (\n      !skipDisabled ||\n      !(\n        entry &&\n        typeof entry === 'object' &&\n        'disabled' in entry &&\n        entry.disabled\n      )\n    ) {\n      if (isGroup(entry)) {\n        const suboptions = filterOptions(\n          (entry as unknown as GroupBase<Selected<T, IsMultiple>>).options,\n          text,\n          matcher,\n          skipDisabled,\n        );\n        if (suboptions.length > 0) {\n          opts.push(\n            copyGroup(\n              entry as GroupBase<Selected<T, IsMultiple>>,\n              suboptions,\n            ) as T,\n          );\n        }\n      } else if (entry && matcher(entry as MT, 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}: DefaultHighlightedParams<T>): Option<T> | undefined {\n  let option: Option<T> | undefined = highlighted;\n\n  if (!option) {\n    if (Array.isArray(selected)) {\n      option = undefined; // Maybe correct is selected[0], but tests do fail right now\n    } else {\n      option = selected;\n    }\n  }\n\n  if (option === undefined || indexOfOption(results, option) === -1) {\n    return advanceSelectableOption(results, option, 1);\n  }\n  return option;\n}\n\nexport function advanceSelectableOption<T, IsMultiple extends boolean = false>(\n  options: readonly T[],\n  currentOption: Selected<T, IsMultiple>,\n  step: 1 | -1,\n): Option<T> | undefined {\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  Ꜻ: 'AV',\n  Ꜽ: 'AY',\n  'Ⓑ': 'B',\n  Ｂ: 'B',\n  Ḃ: 'B',\n  Ḅ: 'B',\n  Ḇ: 'B',\n  Ƀ: 'B',\n  Ƃ: 'B',\n  Ɓ: 'B',\n  'Ⓒ': 'C',\n  Ｃ: 'C',\n  Ć: 'C',\n  Ĉ: 'C',\n  Ċ: 'C',\n  Č: 'C',\n  Ç: 'C',\n  Ḉ: 'C',\n  Ƈ: 'C',\n  Ȼ: 'C',\n  Ꜿ: 'C',\n  'Ⓓ': 'D',\n  Ｄ: 'D',\n  Ḋ: 'D',\n  Ď: 'D',\n  Ḍ: 'D',\n  Ḑ: 'D',\n  Ḓ: 'D',\n  Ḏ: 'D',\n  Đ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: 'Ε',\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): number {\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","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  useResolver: true,\n};\n\n/**\n  Ember Simple Auth's module-scoped configuration object, shared by session services.\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  /**\n    When `true`, the session service looks up `session:main`, session stores,\n    and authenticators from the resolver. When `false`, it constructs\n    `InternalSession` and the store via `createSessionStore`, and authenticators\n    via `createAuthenticators`.\n\n    @memberof Configuration\n    @property useResolver\n    @static\n    @type Boolean\n    @default true\n    @public\n  */\n  useResolver: DEFAULTS.useResolver,\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    this.useResolver = config.useResolver !== undefined ? config.useResolver : DEFAULTS.useResolver;\n    return this;\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 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 { useResolver = true } = ENV['ember-simple-auth'] || {};\n    if (!useResolver) {\n      return;\n    }\n\n    registry.register('session-store:adaptive', Adaptive);\n    registry.register('session-store:cookie', Cookie);\n    registry.register('session-store:local-storage', LocalStorage);\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","import { isEmpty, isNone } from '@ember/utils';\nimport EmberObject, { action, get, set } from '@ember/object';\nimport { debug, assert } from '@ember/debug';\nimport { getOwner, setOwner } from '@ember/application';\nimport { associateDestroyableChild } from '@ember/destroyable';\nimport { tracked } from '@glimmer/tracking';\nimport { isTesting, isDevelopingApp, macroCondition } from '@embroider/macros';\nimport Configuration from './configuration';\nimport EsaEventTarget from './-internals/event-target';\n\nclass SessionEventTarget extends EsaEventTarget {}\n\nconst authenticatorMatches = (authenticator, authenticatorRef) => {\n  if (authenticator === authenticatorRef) {\n    return true;\n  } else if (typeof authenticatorRef === 'function') {\n    return (\n      authenticator.constructor === authenticatorRef || authenticator instanceof authenticatorRef\n    );\n  } else if (typeof authenticatorRef === 'string') {\n    const id = authenticator.constructor.id;\n    return id === authenticatorRef || `authenticator:${id}` === authenticatorRef;\n  } else {\n    return false;\n  }\n};\n\nconst assertAuthenticators = authenticators => {\n  assert(\n    'Ember Simple Auth: createAuthenticators must return an array of authenticator instances.',\n    Array.isArray(authenticators)\n  );\n\n  const seen = new Set();\n  authenticators.forEach(authenticator => {\n    const id = authenticator?.constructor?.id;\n    assert(\n      'Ember Simple Auth: each authenticator returned from createAuthenticators must have a unique, non-empty static string id.',\n      typeof id === 'string' && !isEmpty(id) && !seen.has(id)\n    );\n    seen.add(id);\n  });\n};\n\n/**\n  __An internal implementation of Session. Communicates with stores and emits events.__\n\n  @class InternalSession\n  @extends EmberObject\n  @private\n*/\n\nexport default class InternalSession extends EmberObject {\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  @tracked content = { authenticated: {} };\n  @tracked store = null;\n  @tracked isAuthenticated = false;\n  @tracked attemptedTransition = null;\n  sessionEvents = null;\n  redirectTarget = null;\n\n  constructor(owner, sessionStore, options = {}) {\n    super(owner);\n\n    this.sessionEvents = new SessionEventTarget();\n    this._busy = false;\n    this._authenticators = null;\n    this._setAuthenticators(options.authenticators);\n\n    const store = sessionStore || this._lookupStore();\n    assert('Ember Simple Auth: InternalSession requires a session store.', store);\n    this.store = store;\n    if (sessionStore) {\n      associateDestroyableChild(this, sessionStore);\n    }\n    this._bindToStoreEvents();\n  }\n\n  _setAuthenticators(authenticators) {\n    if (!authenticators) {\n      return;\n    }\n\n    if (macroCondition(isDevelopingApp())) {\n      assertAuthenticators(authenticators);\n    }\n\n    const currentAuthenticators = new Set(this._authenticators || []);\n    this._authenticators = authenticators;\n    authenticators.forEach(authenticator => {\n      if (!currentAuthenticators.has(authenticator)) {\n        associateDestroyableChild(this, authenticator);\n      }\n    });\n  }\n\n  _lookupStore() {\n    if (!Configuration.useResolver) {\n      return null;\n    }\n\n    let storeFactory = isTesting() ? 'session-store:test' : 'session-store:application';\n    return getOwner(this).lookup(storeFactory);\n  }\n\n  authenticate(authenticatorFactory, ...args) {\n    this._busy = true;\n    assert(\n      `Session#authenticate requires the authenticator to be specified, was \"${authenticatorFactory}\"!`,\n      authenticatorFactory != null && authenticatorFactory !== ''\n    );\n    const authenticator = this._findAuthenticator(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._findAuthenticator(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._findAuthenticator(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        typeof authenticator === 'string'\n          ? authenticator\n          : this._findAuthenticator(authenticator).constructor.id,\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  // ObjectProxy shim for content key delegation.\n  unknownProperty(key) {\n    let content = get(this, 'content');\n    return content ? get(content, key) : undefined;\n  }\n\n  setUnknownProperty(key, value) {\n    let content = get(this, 'content');\n    assert(\n      `Cannot delegate set('${key}', ${value}) to the internal session: 'content' must be defined and \"authenticated\" is a reserved key used by Ember Simple Auth.`,\n      key !== 'authenticated' && content\n    );\n    let result = set(content, key, value);\n    this.notifyPropertyChange(key);\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._findAuthenticator(this.authenticator);\n    authenticator.on('sessionDataUpdated', this._onSessionDataUpdated);\n    authenticator.on('sessionDataInvalidated', this._onSessionDataInvalidated);\n  }\n\n  @action\n  _onSessionDataUpdated({ detail: content }) {\n    this._setup(this.authenticator, content);\n  }\n\n  @action\n  _onSessionDataInvalidated() {\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._findAuthenticator(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  _findAuthenticator(authenticatorRef) {\n    if (this._authenticators) {\n      const matches = this._authenticators.filter(authenticator =>\n        authenticatorMatches(authenticator, authenticatorRef)\n      );\n\n      if (typeof authenticatorRef === 'function') {\n        assert(\n          `Multiple authenticators returned from 'SessionService.createAuthenticators' matched factory \"${\n            authenticatorRef.name || authenticatorRef\n          }\".`,\n          matches.length <= 1\n        );\n      }\n\n      if (matches[0]) {\n        return matches[0];\n      }\n    }\n\n    if (\n      Configuration.useResolver &&\n      typeof authenticatorRef === 'string' &&\n      authenticatorRef.includes(':')\n    ) {\n      return this._lookupAuthenticator(authenticatorRef);\n    }\n\n    assert(`No authenticator for factory \"${authenticatorRef}\" could be found!`, false);\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","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, deprecate } from '@ember/debug';\nimport { associateDestroyableChild } from '@ember/destroyable';\nimport { isTesting } from '@embroider/macros';\nimport Configuration from '../configuration';\nimport InternalSession from '../internal-session';\nimport Ephemeral from '../session-stores/ephemeral';\nimport type EsaBaseAuthenticator from '../authenticators/base';\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 EsaBaseSessionStore, { setupStore } 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 | Transition;\n  on: (event: 'authenticationSucceeded' | 'invalidationSucceeded', cb: () => void) => void;\n  authenticate: (authenticator: AuthenticatorReference, ...args: any[]) => Promise<void>;\n  invalidate: (...args: any[]) => Promise<void>;\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 AuthenticatorClass = (new (...args: any[]) => EsaBaseAuthenticator) & {\n  id: string;\n};\n\nexport type AuthenticatorReference = string | EsaBaseAuthenticator | AuthenticatorClass;\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, Store = unknown> extends Service {\n  session!: InternalSessionMock<Data>;\n\n  constructor(owner: any) {\n    super(owner);\n\n    this.createConfiguration(owner);\n\n    if (!this.session) {\n      if (Configuration.useResolver) {\n        this.session = owner.lookup('session:main');\n        assert('Ember Simple Auth: session:main is not registered.', this.session);\n        deprecate('Ember Simple Auth: session:main resolver lookup is deprecated.', false, {\n          id: 'ember-simple-auth.session-main',\n          until: '9.0.0',\n          for: 'ember-simple-auth',\n          since: {\n            available: '8.4.0',\n            enabled: '8.4.0',\n          },\n          url: 'https://github.com/mainmatter/ember-simple-auth/blob/master/guides/upgrade-to-v9.md#resolver-registration',\n        });\n      } else {\n        assert(\n          'Ember Simple Auth: implement createAuthenticators on the session service.',\n          typeof this.createAuthenticators === 'function'\n        );\n        this.session = new InternalSession(owner, setupStore(this.createSessionStore(owner)), {\n          authenticators: this.createAuthenticators(owner),\n        }) as unknown as InternalSessionMock<Data>;\n      }\n\n      associateDestroyableChild(this, this.session);\n    }\n  }\n\n  /**\n    Loads the shared configuration before constructing the internal session.\n    Override this method to supply custom options to `Configuration.load`.\n\n    @memberof SessionService\n    @method createConfiguration\n    @param {Object} owner The application owner\n    @return {Configuration} The shared configuration object\n    @public\n  */\n  createConfiguration(owner: any): typeof Configuration {\n    const ENV = owner.resolveRegistration('config:environment');\n    const configuration = Configuration.load({\n      ...ENV['ember-simple-auth'],\n      rootURL: ENV.rootURL || ENV.baseURL,\n    });\n    deprecate(\n      'Ember Simple Auth: config:environment lookup with useResolver: true is deprecated. Override createConfiguration and return Configuration.load(options).',\n      !configuration.useResolver,\n      {\n        id: 'ember-simple-auth.configuration-resolver',\n        until: '9.0.0',\n        for: 'ember-simple-auth',\n        since: {\n          available: '8.4.0',\n          enabled: '8.4.0',\n        },\n        url: 'https://github.com/mainmatter/ember-simple-auth/blob/master/guides/upgrade-to-v9.md#configuration',\n      }\n    );\n    return configuration;\n  }\n\n  /**\n    Constructs the session store. Override this to use the session-store of your choice.\n    If you have a `app/session-stores/application`, you can import it directly and initialize in this method.\n\n    ```js\n    // app/services/session.js\n    import SessionService from 'ember-simple-auth/services/session';\n    import SessionStore from '../session-stores/application';\n\n    export default class Session extends SessionService {\n      createSessionStore(owner) {\n        return new SessionStore(owner);\n      }\n    }\n    ```\n\n    @memberof SessionService\n    @method createSessionStore\n    @param {Object} owner The application owner\n    @return {BaseStore} The session store instance\n    @public\n  */\n  createSessionStore(owner: any): EsaBaseSessionStore & Store {\n    if (isTesting()) {\n      const store: EsaBaseSessionStore = new Ephemeral(owner);\n      return store as EsaBaseSessionStore & Store;\n    }\n\n    assert('Ember Simple Auth: implement createSessionStore on the session service.', false);\n  }\n\n  /**\n    Constructs the authenticators used by this session. Declare this to use the\n    authenticators of your choice. Each instance needs a static id.\n\n    ```js\n    // app/services/session.js\n    import SessionService from 'ember-simple-auth/services/session';\n    import OAuth2 from '../authenticators/oauth2';\n\n    export default class Session extends SessionService {\n      createAuthenticators(owner) {\n        return [new OAuth2(owner)];\n      }\n    }\n    ```\n\n    @memberof SessionService\n    @method createAuthenticators\n    @param {Object} owner The application owner\n    @return {Array} Authenticator instances\n    @public\n  */\n  createAuthenticators?(owner: any): EsaBaseAuthenticator[];\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: Store;\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|BaseAuthenticator|Function} 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: AuthenticatorReference, ...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 `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 the session store 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.\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 { computed, notifyPropertyChange } from '@ember/object';\nimport { tracked } from '@glimmer/tracking';\nimport { service } from '@ember/service';\nimport { getOwner } from '@ember/application';\nimport { associateDestroyableChild } from '@ember/destroyable';\nimport { debug } from '@ember/debug';\nimport Base, { SESSION_STORE_SETUP, setupStore } from './base';\nimport Configuration from '../configuration';\nimport CookieStore from './cookie';\nimport LocalStorageStore from './local-storage';\nimport type CookiesService from 'ember-cookies/services/cookies';\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  @tracked _cookieExpirationTime: number | null = null;\n\n  get cookieExpirationTime(): number | null {\n    return this._cookieExpirationTime;\n  }\n\n  set cookieExpirationTime(value: number | null) {\n    this._cookieExpirationTime = value;\n    if (this._store) {\n      this._store.set('cookieExpirationTime', value);\n    }\n    notifyPropertyChange(this, 'cookieExpirationTime');\n  }\n\n  @service('cookies') declare _cookies: CookiesService;\n  declare _fastboot: any;\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    setupStore(this);\n  }\n\n  [SESSION_STORE_SETUP]() {\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 = this._createOrLookupStore(\n        owner,\n        'session-store:local-storage',\n        LocalStorageStore\n      );\n      localStorage.setProperties({ key: this.get('localStorageKey'), _isFastBoot: false });\n      store = localStorage;\n    } else {\n      const cookieStorage = this._createOrLookupStore(owner, 'session-store:cookie', CookieStore);\n      cookieStorage.setProperties(\n        this.getProperties(\n          'cookieDomain',\n          'cookieName',\n          'cookieExpirationTime',\n          'cookiePath',\n          'sameSite',\n          'partitioned'\n        )\n      );\n      this.set('cookieExpirationTime', cookieStorage.get('cookieExpirationTime'));\n      store = cookieStorage;\n    }\n\n    this.set('_store', store);\n    this._setupStoreEvents(store);\n  }\n\n  _createOrLookupStore(\n    owner: any,\n    factoryName: string,\n    Store: typeof CookieStore | typeof LocalStorageStore\n  ) {\n    if (Configuration.useResolver) {\n      return owner.lookup(factoryName);\n    }\n\n    const store = setupStore(new Store(owner));\n    associateDestroyableChild(this, store);\n    return 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 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\nconst initializedStores = new WeakSet<EsaBaseSessionStore>();\nexport const SESSION_STORE_SETUP = Symbol('ember-simple-auth-session-store-setup');\n\nexport function setupStore<T extends EsaBaseSessionStore>(store: T): T {\n  if (!initializedStores.has(store)) {\n    initializedStores.add(store);\n    store[SESSION_STORE_SETUP]();\n  }\n  return store;\n}\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  [SESSION_STORE_SETUP]() {}\n\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, notifyPropertyChange } from '@ember/object';\nimport { tracked } from '@glimmer/tracking';\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, { SESSION_STORE_SETUP, setupStore } 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\n    get rememberMe() {\n      return this.session.store.cookieExpirationTime !== null;\n    }\n\n    set rememberMe(value) {\n      let expirationTime = value ? (14 * 24 * 60 * 60) : null;\n      this.session.store.cookieExpirationTime = expirationTime;\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  @tracked _cookieExpirationTime: number | null = null;\n\n  get cookieExpirationTime(): number | null {\n    return this._cookieExpirationTime;\n  }\n\n  set cookieExpirationTime(value: number | null) {\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    this._cookieExpirationTime = value;\n    notifyPropertyChange(this, 'cookieExpirationTime');\n    scheduleOnce('actions', this, this.rewriteCookie);\n  }\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    setupStore(this);\n  }\n\n  [SESSION_STORE_SETUP]() {\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 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 { 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 { 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","/*!\n * jQuery JavaScript Library v3.7.1\n * https://jquery.com/\n *\n * Copyright OpenJS Foundation and other contributors\n * Released under the MIT license\n * https://jquery.org/license\n *\n * Date: 2023-08-28T13:37Z\n */\n( function( global, factory ) {\n\n\t\"use strict\";\n\n\tif ( typeof module === \"object\" && typeof module.exports === \"object\" ) {\n\n\t\t// For CommonJS and CommonJS-like environments where a proper `window`\n\t\t// is present, execute the factory and get jQuery.\n\t\t// For environments that do not have a `window` with a `document`\n\t\t// (such as Node.js), expose a factory as module.exports.\n\t\t// This accentuates the need for the creation of a real `window`.\n\t\t// e.g. var jQuery = require(\"jquery\")(window);\n\t\t// See ticket trac-14549 for more info.\n\t\tmodule.exports = global.document ?\n\t\t\tfactory( global, true ) :\n\t\t\tfunction( w ) {\n\t\t\t\tif ( !w.document ) {\n\t\t\t\t\tthrow new Error( \"jQuery requires a window with a document\" );\n\t\t\t\t}\n\t\t\t\treturn factory( w );\n\t\t\t};\n\t} else {\n\t\tfactory( global );\n\t}\n\n// Pass this if window is not defined yet\n} )( typeof window !== \"undefined\" ? window : this, function( window, noGlobal ) {\n\n// Edge <= 12 - 13+, Firefox <=18 - 45+, IE 10 - 11, Safari 5.1 - 9+, iOS 6 - 9.1\n// throw exceptions when non-strict code (e.g., ASP.NET 4.5) accesses strict mode\n// arguments.callee.caller (trac-13335). But as of jQuery 3.0 (2016), strict mode should be common\n// enough that all such attempts are guarded in a try block.\n\"use strict\";\n\nvar arr = [];\n\nvar getProto = Object.getPrototypeOf;\n\nvar slice = arr.slice;\n\nvar flat = arr.flat ? function( array ) {\n\treturn arr.flat.call( array );\n} : function( array ) {\n\treturn arr.concat.apply( [], array );\n};\n\n\nvar push = arr.push;\n\nvar indexOf = arr.indexOf;\n\nvar class2type = {};\n\nvar toString = class2type.toString;\n\nvar hasOwn = class2type.hasOwnProperty;\n\nvar fnToString = hasOwn.toString;\n\nvar ObjectFunctionString = fnToString.call( Object );\n\nvar support = {};\n\nvar isFunction = function isFunction( obj ) {\n\n\t\t// Support: Chrome <=57, Firefox <=52\n\t\t// In some browsers, typeof returns \"function\" for HTML <object> elements\n\t\t// (i.e., `typeof document.createElement( \"object\" ) === \"function\"`).\n\t\t// We don't want to classify *any* DOM node as a function.\n\t\t// Support: QtWeb <=3.8.5, WebKit <=534.34, wkhtmltopdf tool <=0.12.5\n\t\t// Plus for old WebKit, typeof returns \"function\" for HTML collections\n\t\t// (e.g., `typeof document.getElementsByTagName(\"div\") === \"function\"`). (gh-4756)\n\t\treturn typeof obj === \"function\" && typeof obj.nodeType !== \"number\" &&\n\t\t\ttypeof obj.item !== \"function\";\n\t};\n\n\nvar isWindow = function isWindow( obj ) {\n\t\treturn obj != null && obj === obj.window;\n\t};\n\n\nvar document = window.document;\n\n\n\n\tvar preservedScriptAttributes = {\n\t\ttype: true,\n\t\tsrc: true,\n\t\tnonce: true,\n\t\tnoModule: true\n\t};\n\n\tfunction DOMEval( code, node, doc ) {\n\t\tdoc = doc || document;\n\n\t\tvar i, val,\n\t\t\tscript = doc.createElement( \"script\" );\n\n\t\tscript.text = code;\n\t\tif ( node ) {\n\t\t\tfor ( i in preservedScriptAttributes ) {\n\n\t\t\t\t// Support: Firefox 64+, Edge 18+\n\t\t\t\t// Some browsers don't support the \"nonce\" property on scripts.\n\t\t\t\t// On the other hand, just using `getAttribute` is not enough as\n\t\t\t\t// the `nonce` attribute is reset to an empty string whenever it\n\t\t\t\t// becomes browsing-context connected.\n\t\t\t\t// See https://github.com/whatwg/html/issues/2369\n\t\t\t\t// See https://html.spec.whatwg.org/#nonce-attributes\n\t\t\t\t// The `node.getAttribute` check was added for the sake of\n\t\t\t\t// `jQuery.globalEval` so that it can fake a nonce-containing node\n\t\t\t\t// via an object.\n\t\t\t\tval = node[ i ] || node.getAttribute && node.getAttribute( i );\n\t\t\t\tif ( val ) {\n\t\t\t\t\tscript.setAttribute( i, val );\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\tdoc.head.appendChild( script ).parentNode.removeChild( script );\n\t}\n\n\nfunction toType( obj ) {\n\tif ( obj == null ) {\n\t\treturn obj + \"\";\n\t}\n\n\t// Support: Android <=2.3 only (functionish RegExp)\n\treturn typeof obj === \"object\" || typeof obj === \"function\" ?\n\t\tclass2type[ toString.call( obj ) ] || \"object\" :\n\t\ttypeof obj;\n}\n/* global Symbol */\n// Defining this global in .eslintrc.json would create a danger of using the global\n// unguarded in another place, it seems safer to define global only for this module\n\n\n\nvar version = \"3.7.1\",\n\n\trhtmlSuffix = /HTML$/i,\n\n\t// Define a local copy of jQuery\n\tjQuery = function( selector, context ) {\n\n\t\t// The jQuery object is actually just the init constructor 'enhanced'\n\t\t// Need init if jQuery is called (just allow error to be thrown if not included)\n\t\treturn new jQuery.fn.init( selector, context );\n\t};\n\njQuery.fn = jQuery.prototype = {\n\n\t// The current version of jQuery being used\n\tjquery: version,\n\n\tconstructor: jQuery,\n\n\t// The default length of a jQuery object is 0\n\tlength: 0,\n\n\ttoArray: function() {\n\t\treturn slice.call( this );\n\t},\n\n\t// Get the Nth element in the matched element set OR\n\t// Get the whole matched element set as a clean array\n\tget: function( num ) {\n\n\t\t// Return all the elements in a clean array\n\t\tif ( num == null ) {\n\t\t\treturn slice.call( this );\n\t\t}\n\n\t\t// Return just the one element from the set\n\t\treturn num < 0 ? this[ num + this.length ] : this[ num ];\n\t},\n\n\t// Take an array of elements and push it onto the stack\n\t// (returning the new matched element set)\n\tpushStack: function( elems ) {\n\n\t\t// Build a new jQuery matched element set\n\t\tvar ret = jQuery.merge( this.constructor(), elems );\n\n\t\t// Add the old object onto the stack (as a reference)\n\t\tret.prevObject = this;\n\n\t\t// Return the newly-formed element set\n\t\treturn ret;\n\t},\n\n\t// Execute a callback for every element in the matched set.\n\teach: function( callback ) {\n\t\treturn jQuery.each( this, callback );\n\t},\n\n\tmap: function( callback ) {\n\t\treturn this.pushStack( jQuery.map( this, function( elem, i ) {\n\t\t\treturn callback.call( elem, i, elem );\n\t\t} ) );\n\t},\n\n\tslice: function() {\n\t\treturn this.pushStack( slice.apply( this, arguments ) );\n\t},\n\n\tfirst: function() {\n\t\treturn this.eq( 0 );\n\t},\n\n\tlast: function() {\n\t\treturn this.eq( -1 );\n\t},\n\n\teven: function() {\n\t\treturn this.pushStack( jQuery.grep( this, function( _elem, i ) {\n\t\t\treturn ( i + 1 ) % 2;\n\t\t} ) );\n\t},\n\n\todd: function() {\n\t\treturn this.pushStack( jQuery.grep( this, function( _elem, i ) {\n\t\t\treturn i % 2;\n\t\t} ) );\n\t},\n\n\teq: function( i ) {\n\t\tvar len = this.length,\n\t\t\tj = +i + ( i < 0 ? len : 0 );\n\t\treturn this.pushStack( j >= 0 && j < len ? [ this[ j ] ] : [] );\n\t},\n\n\tend: function() {\n\t\treturn this.prevObject || this.constructor();\n\t},\n\n\t// For internal use only.\n\t// Behaves like an Array's method, not like a jQuery method.\n\tpush: push,\n\tsort: arr.sort,\n\tsplice: arr.splice\n};\n\njQuery.extend = jQuery.fn.extend = function() {\n\tvar options, name, src, copy, copyIsArray, clone,\n\t\ttarget = arguments[ 0 ] || {},\n\t\ti = 1,\n\t\tlength = arguments.length,\n\t\tdeep = false;\n\n\t// Handle a deep copy situation\n\tif ( typeof target === \"boolean\" ) {\n\t\tdeep = target;\n\n\t\t// Skip the boolean and the target\n\t\ttarget = arguments[ i ] || {};\n\t\ti++;\n\t}\n\n\t// Handle case when target is a string or something (possible in deep copy)\n\tif ( typeof target !== \"object\" && !isFunction( target ) ) {\n\t\ttarget = {};\n\t}\n\n\t// Extend jQuery itself if only one argument is passed\n\tif ( i === length ) {\n\t\ttarget = this;\n\t\ti--;\n\t}\n\n\tfor ( ; i < length; i++ ) {\n\n\t\t// Only deal with non-null/undefined values\n\t\tif ( ( options = arguments[ i ] ) != null ) {\n\n\t\t\t// Extend the base object\n\t\t\tfor ( name in options ) {\n\t\t\t\tcopy = options[ name ];\n\n\t\t\t\t// Prevent Object.prototype pollution\n\t\t\t\t// Prevent never-ending loop\n\t\t\t\tif ( name === \"__proto__\" || target === copy ) {\n\t\t\t\t\tcontinue;\n\t\t\t\t}\n\n\t\t\t\t// Recurse if we're merging plain objects or arrays\n\t\t\t\tif ( deep && copy && ( jQuery.isPlainObject( copy ) ||\n\t\t\t\t\t( copyIsArray = Array.isArray( copy ) ) ) ) {\n\t\t\t\t\tsrc = target[ name ];\n\n\t\t\t\t\t// Ensure proper type for the source value\n\t\t\t\t\tif ( copyIsArray && !Array.isArray( src ) ) {\n\t\t\t\t\t\tclone = [];\n\t\t\t\t\t} else if ( !copyIsArray && !jQuery.isPlainObject( src ) ) {\n\t\t\t\t\t\tclone = {};\n\t\t\t\t\t} else {\n\t\t\t\t\t\tclone = src;\n\t\t\t\t\t}\n\t\t\t\t\tcopyIsArray = false;\n\n\t\t\t\t\t// Never move original objects, clone them\n\t\t\t\t\ttarget[ name ] = jQuery.extend( deep, clone, copy );\n\n\t\t\t\t// Don't bring in undefined values\n\t\t\t\t} else if ( copy !== undefined ) {\n\t\t\t\t\ttarget[ name ] = copy;\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t}\n\n\t// Return the modified object\n\treturn target;\n};\n\njQuery.extend( {\n\n\t// Unique for each copy of jQuery on the page\n\texpando: \"jQuery\" + ( version + Math.random() ).replace( /\\D/g, \"\" ),\n\n\t// Assume jQuery is ready without the ready module\n\tisReady: true,\n\n\terror: function( msg ) {\n\t\tthrow new Error( msg );\n\t},\n\n\tnoop: function() {},\n\n\tisPlainObject: function( obj ) {\n\t\tvar proto, Ctor;\n\n\t\t// Detect obvious negatives\n\t\t// Use toString instead of jQuery.type to catch host objects\n\t\tif ( !obj || toString.call( obj ) !== \"[object Object]\" ) {\n\t\t\treturn false;\n\t\t}\n\n\t\tproto = getProto( obj );\n\n\t\t// Objects with no prototype (e.g., `Object.create( null )`) are plain\n\t\tif ( !proto ) {\n\t\t\treturn true;\n\t\t}\n\n\t\t// Objects with prototype are plain iff they were constructed by a global Object function\n\t\tCtor = hasOwn.call( proto, \"constructor\" ) && proto.constructor;\n\t\treturn typeof Ctor === \"function\" && fnToString.call( Ctor ) === ObjectFunctionString;\n\t},\n\n\tisEmptyObject: function( obj ) {\n\t\tvar name;\n\n\t\tfor ( name in obj ) {\n\t\t\treturn false;\n\t\t}\n\t\treturn true;\n\t},\n\n\t// Evaluates a script in a provided context; falls back to the global one\n\t// if not specified.\n\tglobalEval: function( code, options, doc ) {\n\t\tDOMEval( code, { nonce: options && options.nonce }, doc );\n\t},\n\n\teach: function( obj, callback ) {\n\t\tvar length, i = 0;\n\n\t\tif ( isArrayLike( obj ) ) {\n\t\t\tlength = obj.length;\n\t\t\tfor ( ; i < length; i++ ) {\n\t\t\t\tif ( callback.call( obj[ i ], i, obj[ i ] ) === false ) {\n\t\t\t\t\tbreak;\n\t\t\t\t}\n\t\t\t}\n\t\t} else {\n\t\t\tfor ( i in obj ) {\n\t\t\t\tif ( callback.call( obj[ i ], i, obj[ i ] ) === false ) {\n\t\t\t\t\tbreak;\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\n\t\treturn obj;\n\t},\n\n\n\t// Retrieve the text value of an array of DOM nodes\n\ttext: function( elem ) {\n\t\tvar node,\n\t\t\tret = \"\",\n\t\t\ti = 0,\n\t\t\tnodeType = elem.nodeType;\n\n\t\tif ( !nodeType ) {\n\n\t\t\t// If no nodeType, this is expected to be an array\n\t\t\twhile ( ( node = elem[ i++ ] ) ) {\n\n\t\t\t\t// Do not traverse comment nodes\n\t\t\t\tret += jQuery.text( node );\n\t\t\t}\n\t\t}\n\t\tif ( nodeType === 1 || nodeType === 11 ) {\n\t\t\treturn elem.textContent;\n\t\t}\n\t\tif ( nodeType === 9 ) {\n\t\t\treturn elem.documentElement.textContent;\n\t\t}\n\t\tif ( nodeType === 3 || nodeType === 4 ) {\n\t\t\treturn elem.nodeValue;\n\t\t}\n\n\t\t// Do not include comment or processing instruction nodes\n\n\t\treturn ret;\n\t},\n\n\t// results is for internal usage only\n\tmakeArray: function( arr, results ) {\n\t\tvar ret = results || [];\n\n\t\tif ( arr != null ) {\n\t\t\tif ( isArrayLike( Object( arr ) ) ) {\n\t\t\t\tjQuery.merge( ret,\n\t\t\t\t\ttypeof arr === \"string\" ?\n\t\t\t\t\t\t[ arr ] : arr\n\t\t\t\t);\n\t\t\t} else {\n\t\t\t\tpush.call( ret, arr );\n\t\t\t}\n\t\t}\n\n\t\treturn ret;\n\t},\n\n\tinArray: function( elem, arr, i ) {\n\t\treturn arr == null ? -1 : indexOf.call( arr, elem, i );\n\t},\n\n\tisXMLDoc: function( elem ) {\n\t\tvar namespace = elem && elem.namespaceURI,\n\t\t\tdocElem = elem && ( elem.ownerDocument || elem ).documentElement;\n\n\t\t// Assume HTML when documentElement doesn't yet exist, such as inside\n\t\t// document fragments.\n\t\treturn !rhtmlSuffix.test( namespace || docElem && docElem.nodeName || \"HTML\" );\n\t},\n\n\t// Support: Android <=4.0 only, PhantomJS 1 only\n\t// push.apply(_, arraylike) throws on ancient WebKit\n\tmerge: function( first, second ) {\n\t\tvar len = +second.length,\n\t\t\tj = 0,\n\t\t\ti = first.length;\n\n\t\tfor ( ; j < len; j++ ) {\n\t\t\tfirst[ i++ ] = second[ j ];\n\t\t}\n\n\t\tfirst.length = i;\n\n\t\treturn first;\n\t},\n\n\tgrep: function( elems, callback, invert ) {\n\t\tvar callbackInverse,\n\t\t\tmatches = [],\n\t\t\ti = 0,\n\t\t\tlength = elems.length,\n\t\t\tcallbackExpect = !invert;\n\n\t\t// Go through the array, only saving the items\n\t\t// that pass the validator function\n\t\tfor ( ; i < length; i++ ) {\n\t\t\tcallbackInverse = !callback( elems[ i ], i );\n\t\t\tif ( callbackInverse !== callbackExpect ) {\n\t\t\t\tmatches.push( elems[ i ] );\n\t\t\t}\n\t\t}\n\n\t\treturn matches;\n\t},\n\n\t// arg is for internal usage only\n\tmap: function( elems, callback, arg ) {\n\t\tvar length, value,\n\t\t\ti = 0,\n\t\t\tret = [];\n\n\t\t// Go through the array, translating each of the items to their new values\n\t\tif ( isArrayLike( elems ) ) {\n\t\t\tlength = elems.length;\n\t\t\tfor ( ; i < length; i++ ) {\n\t\t\t\tvalue = callback( elems[ i ], i, arg );\n\n\t\t\t\tif ( value != null ) {\n\t\t\t\t\tret.push( value );\n\t\t\t\t}\n\t\t\t}\n\n\t\t// Go through every key on the object,\n\t\t} else {\n\t\t\tfor ( i in elems ) {\n\t\t\t\tvalue = callback( elems[ i ], i, arg );\n\n\t\t\t\tif ( value != null ) {\n\t\t\t\t\tret.push( value );\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\n\t\t// Flatten any nested arrays\n\t\treturn flat( ret );\n\t},\n\n\t// A global GUID counter for objects\n\tguid: 1,\n\n\t// jQuery.support is not used in Core but other projects attach their\n\t// properties to it so it needs to exist.\n\tsupport: support\n} );\n\nif ( typeof Symbol === \"function\" ) {\n\tjQuery.fn[ Symbol.iterator ] = arr[ Symbol.iterator ];\n}\n\n// Populate the class2type map\njQuery.each( \"Boolean Number String Function Array Date RegExp Object Error Symbol\".split( \" \" ),\n\tfunction( _i, name ) {\n\t\tclass2type[ \"[object \" + name + \"]\" ] = name.toLowerCase();\n\t} );\n\nfunction isArrayLike( obj ) {\n\n\t// Support: real iOS 8.2 only (not reproducible in simulator)\n\t// `in` check used to prevent JIT error (gh-2145)\n\t// hasOwn isn't used here due to false negatives\n\t// regarding Nodelist length in IE\n\tvar length = !!obj && \"length\" in obj && obj.length,\n\t\ttype = toType( obj );\n\n\tif ( isFunction( obj ) || isWindow( obj ) ) {\n\t\treturn false;\n\t}\n\n\treturn type === \"array\" || length === 0 ||\n\t\ttypeof length === \"number\" && length > 0 && ( length - 1 ) in obj;\n}\n\n\nfunction nodeName( elem, name ) {\n\n\treturn elem.nodeName && elem.nodeName.toLowerCase() === name.toLowerCase();\n\n}\nvar pop = arr.pop;\n\n\nvar sort = arr.sort;\n\n\nvar splice = arr.splice;\n\n\nvar whitespace = \"[\\\\x20\\\\t\\\\r\\\\n\\\\f]\";\n\n\nvar rtrimCSS = new RegExp(\n\t\"^\" + whitespace + \"+|((?:^|[^\\\\\\\\])(?:\\\\\\\\.)*)\" + whitespace + \"+$\",\n\t\"g\"\n);\n\n\n\n\n// Note: an element does not contain itself\njQuery.contains = function( a, b ) {\n\tvar bup = b && b.parentNode;\n\n\treturn a === bup || !!( bup && bup.nodeType === 1 && (\n\n\t\t// Support: IE 9 - 11+\n\t\t// IE doesn't have `contains` on SVG.\n\t\ta.contains ?\n\t\t\ta.contains( bup ) :\n\t\t\ta.compareDocumentPosition && a.compareDocumentPosition( bup ) & 16\n\t) );\n};\n\n\n\n\n// CSS string/identifier serialization\n// https://drafts.csswg.org/cssom/#common-serializing-idioms\nvar rcssescape = /([\\0-\\x1f\\x7f]|^-?\\d)|^-$|[^\\x80-\\uFFFF\\w-]/g;\n\nfunction fcssescape( ch, asCodePoint ) {\n\tif ( asCodePoint ) {\n\n\t\t// U+0000 NULL becomes U+FFFD REPLACEMENT CHARACTER\n\t\tif ( ch === \"\\0\" ) {\n\t\t\treturn \"\\uFFFD\";\n\t\t}\n\n\t\t// Control characters and (dependent upon position) numbers get escaped as code points\n\t\treturn ch.slice( 0, -1 ) + \"\\\\\" + ch.charCodeAt( ch.length - 1 ).toString( 16 ) + \" \";\n\t}\n\n\t// Other potentially-special ASCII characters get backslash-escaped\n\treturn \"\\\\\" + ch;\n}\n\njQuery.escapeSelector = function( sel ) {\n\treturn ( sel + \"\" ).replace( rcssescape, fcssescape );\n};\n\n\n\n\nvar preferredDoc = document,\n\tpushNative = push;\n\n( function() {\n\nvar i,\n\tExpr,\n\toutermostContext,\n\tsortInput,\n\thasDuplicate,\n\tpush = pushNative,\n\n\t// Local document vars\n\tdocument,\n\tdocumentElement,\n\tdocumentIsHTML,\n\trbuggyQSA,\n\tmatches,\n\n\t// Instance-specific data\n\texpando = jQuery.expando,\n\tdirruns = 0,\n\tdone = 0,\n\tclassCache = createCache(),\n\ttokenCache = createCache(),\n\tcompilerCache = createCache(),\n\tnonnativeSelectorCache = createCache(),\n\tsortOrder = function( a, b ) {\n\t\tif ( a === b ) {\n\t\t\thasDuplicate = true;\n\t\t}\n\t\treturn 0;\n\t},\n\n\tbooleans = \"checked|selected|async|autofocus|autoplay|controls|defer|disabled|hidden|ismap|\" +\n\t\t\"loop|multiple|open|readonly|required|scoped\",\n\n\t// Regular expressions\n\n\t// https://www.w3.org/TR/css-syntax-3/#ident-token-diagram\n\tidentifier = \"(?:\\\\\\\\[\\\\da-fA-F]{1,6}\" + whitespace +\n\t\t\"?|\\\\\\\\[^\\\\r\\\\n\\\\f]|[\\\\w-]|[^\\0-\\\\x7f])+\",\n\n\t// Attribute selectors: https://www.w3.org/TR/selectors/#attribute-selectors\n\tattributes = \"\\\\[\" + whitespace + \"*(\" + identifier + \")(?:\" + whitespace +\n\n\t\t// Operator (capture 2)\n\t\t\"*([*^$|!~]?=)\" + whitespace +\n\n\t\t// \"Attribute values must be CSS identifiers [capture 5] or strings [capture 3 or capture 4]\"\n\t\t\"*(?:'((?:\\\\\\\\.|[^\\\\\\\\'])*)'|\\\"((?:\\\\\\\\.|[^\\\\\\\\\\\"])*)\\\"|(\" + identifier + \"))|)\" +\n\t\twhitespace + \"*\\\\]\",\n\n\tpseudos = \":(\" + identifier + \")(?:\\\\((\" +\n\n\t\t// To reduce the number of selectors needing tokenize in the preFilter, prefer arguments:\n\t\t// 1. quoted (capture 3; capture 4 or capture 5)\n\t\t\"('((?:\\\\\\\\.|[^\\\\\\\\'])*)'|\\\"((?:\\\\\\\\.|[^\\\\\\\\\\\"])*)\\\")|\" +\n\n\t\t// 2. simple (capture 6)\n\t\t\"((?:\\\\\\\\.|[^\\\\\\\\()[\\\\]]|\" + attributes + \")*)|\" +\n\n\t\t// 3. anything else (capture 2)\n\t\t\".*\" +\n\t\t\")\\\\)|)\",\n\n\t// Leading and non-escaped trailing whitespace, capturing some non-whitespace characters preceding the latter\n\trwhitespace = new RegExp( whitespace + \"+\", \"g\" ),\n\n\trcomma = new RegExp( \"^\" + whitespace + \"*,\" + whitespace + \"*\" ),\n\trleadingCombinator = new RegExp( \"^\" + whitespace + \"*([>+~]|\" + whitespace + \")\" +\n\t\twhitespace + \"*\" ),\n\trdescend = new RegExp( whitespace + \"|>\" ),\n\n\trpseudo = new RegExp( pseudos ),\n\tridentifier = new RegExp( \"^\" + identifier + \"$\" ),\n\n\tmatchExpr = {\n\t\tID: new RegExp( \"^#(\" + identifier + \")\" ),\n\t\tCLASS: new RegExp( \"^\\\\.(\" + identifier + \")\" ),\n\t\tTAG: new RegExp( \"^(\" + identifier + \"|[*])\" ),\n\t\tATTR: new RegExp( \"^\" + attributes ),\n\t\tPSEUDO: new RegExp( \"^\" + pseudos ),\n\t\tCHILD: new RegExp(\n\t\t\t\"^:(only|first|last|nth|nth-last)-(child|of-type)(?:\\\\(\" +\n\t\t\t\twhitespace + \"*(even|odd|(([+-]|)(\\\\d*)n|)\" + whitespace + \"*(?:([+-]|)\" +\n\t\t\t\twhitespace + \"*(\\\\d+)|))\" + whitespace + \"*\\\\)|)\", \"i\" ),\n\t\tbool: new RegExp( \"^(?:\" + booleans + \")$\", \"i\" ),\n\n\t\t// For use in libraries implementing .is()\n\t\t// We use this for POS matching in `select`\n\t\tneedsContext: new RegExp( \"^\" + whitespace +\n\t\t\t\"*[>+~]|:(even|odd|eq|gt|lt|nth|first|last)(?:\\\\(\" + whitespace +\n\t\t\t\"*((?:-\\\\d)?\\\\d*)\" + whitespace + \"*\\\\)|)(?=[^-]|$)\", \"i\" )\n\t},\n\n\trinputs = /^(?:input|select|textarea|button)$/i,\n\trheader = /^h\\d$/i,\n\n\t// Easily-parseable/retrievable ID or TAG or CLASS selectors\n\trquickExpr = /^(?:#([\\w-]+)|(\\w+)|\\.([\\w-]+))$/,\n\n\trsibling = /[+~]/,\n\n\t// CSS escapes\n\t// https://www.w3.org/TR/CSS21/syndata.html#escaped-characters\n\trunescape = new RegExp( \"\\\\\\\\[\\\\da-fA-F]{1,6}\" + whitespace +\n\t\t\"?|\\\\\\\\([^\\\\r\\\\n\\\\f])\", \"g\" ),\n\tfunescape = function( escape, nonHex ) {\n\t\tvar high = \"0x\" + escape.slice( 1 ) - 0x10000;\n\n\t\tif ( nonHex ) {\n\n\t\t\t// Strip the backslash prefix from a non-hex escape sequence\n\t\t\treturn nonHex;\n\t\t}\n\n\t\t// Replace a hexadecimal escape sequence with the encoded Unicode code point\n\t\t// Support: IE <=11+\n\t\t// For values outside the Basic Multilingual Plane (BMP), manually construct a\n\t\t// surrogate pair\n\t\treturn high < 0 ?\n\t\t\tString.fromCharCode( high + 0x10000 ) :\n\t\t\tString.fromCharCode( high >> 10 | 0xD800, high & 0x3FF | 0xDC00 );\n\t},\n\n\t// Used for iframes; see `setDocument`.\n\t// Support: IE 9 - 11+, Edge 12 - 18+\n\t// Removing the function wrapper causes a \"Permission Denied\"\n\t// error in IE/Edge.\n\tunloadHandler = function() {\n\t\tsetDocument();\n\t},\n\n\tinDisabledFieldset = addCombinator(\n\t\tfunction( elem ) {\n\t\t\treturn elem.disabled === true && nodeName( elem, \"fieldset\" );\n\t\t},\n\t\t{ dir: \"parentNode\", next: \"legend\" }\n\t);\n\n// Support: IE <=9 only\n// Accessing document.activeElement can throw unexpectedly\n// https://bugs.jquery.com/ticket/13393\nfunction safeActiveElement() {\n\ttry {\n\t\treturn document.activeElement;\n\t} catch ( err ) { }\n}\n\n// Optimize for push.apply( _, NodeList )\ntry {\n\tpush.apply(\n\t\t( arr = slice.call( preferredDoc.childNodes ) ),\n\t\tpreferredDoc.childNodes\n\t);\n\n\t// Support: Android <=4.0\n\t// Detect silently failing push.apply\n\t// eslint-disable-next-line no-unused-expressions\n\tarr[ preferredDoc.childNodes.length ].nodeType;\n} catch ( e ) {\n\tpush = {\n\t\tapply: function( target, els ) {\n\t\t\tpushNative.apply( target, slice.call( els ) );\n\t\t},\n\t\tcall: function( target ) {\n\t\t\tpushNative.apply( target, slice.call( arguments, 1 ) );\n\t\t}\n\t};\n}\n\nfunction find( selector, context, results, seed ) {\n\tvar m, i, elem, nid, match, groups, newSelector,\n\t\tnewContext = context && context.ownerDocument,\n\n\t\t// nodeType defaults to 9, since context defaults to document\n\t\tnodeType = context ? context.nodeType : 9;\n\n\tresults = results || [];\n\n\t// Return early from calls with invalid selector or context\n\tif ( typeof selector !== \"string\" || !selector ||\n\t\tnodeType !== 1 && nodeType !== 9 && nodeType !== 11 ) {\n\n\t\treturn results;\n\t}\n\n\t// Try to shortcut find operations (as opposed to filters) in HTML documents\n\tif ( !seed ) {\n\t\tsetDocument( context );\n\t\tcontext = context || document;\n\n\t\tif ( documentIsHTML ) {\n\n\t\t\t// If the selector is sufficiently simple, try using a \"get*By*\" DOM method\n\t\t\t// (excepting DocumentFragment context, where the methods don't exist)\n\t\t\tif ( nodeType !== 11 && ( match = rquickExpr.exec( selector ) ) ) {\n\n\t\t\t\t// ID selector\n\t\t\t\tif ( ( m = match[ 1 ] ) ) {\n\n\t\t\t\t\t// Document context\n\t\t\t\t\tif ( nodeType === 9 ) {\n\t\t\t\t\t\tif ( ( elem = context.getElementById( m ) ) ) {\n\n\t\t\t\t\t\t\t// Support: IE 9 only\n\t\t\t\t\t\t\t// getElementById can match elements by name instead of ID\n\t\t\t\t\t\t\tif ( elem.id === m ) {\n\t\t\t\t\t\t\t\tpush.call( results, elem );\n\t\t\t\t\t\t\t\treturn results;\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\treturn results;\n\t\t\t\t\t\t}\n\n\t\t\t\t\t// Element context\n\t\t\t\t\t} else {\n\n\t\t\t\t\t\t// Support: IE 9 only\n\t\t\t\t\t\t// getElementById can match elements by name instead of ID\n\t\t\t\t\t\tif ( newContext && ( elem = newContext.getElementById( m ) ) &&\n\t\t\t\t\t\t\tfind.contains( context, elem ) &&\n\t\t\t\t\t\t\telem.id === m ) {\n\n\t\t\t\t\t\t\tpush.call( results, elem );\n\t\t\t\t\t\t\treturn results;\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\n\t\t\t\t// Type selector\n\t\t\t\t} else if ( match[ 2 ] ) {\n\t\t\t\t\tpush.apply( results, context.getElementsByTagName( selector ) );\n\t\t\t\t\treturn results;\n\n\t\t\t\t// Class selector\n\t\t\t\t} else if ( ( m = match[ 3 ] ) && context.getElementsByClassName ) {\n\t\t\t\t\tpush.apply( results, context.getElementsByClassName( m ) );\n\t\t\t\t\treturn results;\n\t\t\t\t}\n\t\t\t}\n\n\t\t\t// Take advantage of querySelectorAll\n\t\t\tif ( !nonnativeSelectorCache[ selector + \" \" ] &&\n\t\t\t\t( !rbuggyQSA || !rbuggyQSA.test( selector ) ) ) {\n\n\t\t\t\tnewSelector = selector;\n\t\t\t\tnewContext = context;\n\n\t\t\t\t// qSA considers elements outside a scoping root when evaluating child or\n\t\t\t\t// descendant combinators, which is not what we want.\n\t\t\t\t// In such cases, we work around the behavior by prefixing every selector in the\n\t\t\t\t// list with an ID selector referencing the scope context.\n\t\t\t\t// The technique has to be used as well when a leading combinator is used\n\t\t\t\t// as such selectors are not recognized by querySelectorAll.\n\t\t\t\t// Thanks to Andrew Dupont for this technique.\n\t\t\t\tif ( nodeType === 1 &&\n\t\t\t\t\t( rdescend.test( selector ) || rleadingCombinator.test( selector ) ) ) {\n\n\t\t\t\t\t// Expand context for sibling selectors\n\t\t\t\t\tnewContext = rsibling.test( selector ) && testContext( context.parentNode ) ||\n\t\t\t\t\t\tcontext;\n\n\t\t\t\t\t// We can use :scope instead of the ID hack if the browser\n\t\t\t\t\t// supports it & if we're not changing the context.\n\t\t\t\t\t// Support: IE 11+, Edge 17 - 18+\n\t\t\t\t\t// IE/Edge sometimes throw a \"Permission denied\" error when\n\t\t\t\t\t// strict-comparing two documents; shallow comparisons work.\n\t\t\t\t\t// eslint-disable-next-line eqeqeq\n\t\t\t\t\tif ( newContext != context || !support.scope ) {\n\n\t\t\t\t\t\t// Capture the context ID, setting it first if necessary\n\t\t\t\t\t\tif ( ( nid = context.getAttribute( \"id\" ) ) ) {\n\t\t\t\t\t\t\tnid = jQuery.escapeSelector( nid );\n\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\tcontext.setAttribute( \"id\", ( nid = expando ) );\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\n\t\t\t\t\t// Prefix every selector in the list\n\t\t\t\t\tgroups = tokenize( selector );\n\t\t\t\t\ti = groups.length;\n\t\t\t\t\twhile ( i-- ) {\n\t\t\t\t\t\tgroups[ i ] = ( nid ? \"#\" + nid : \":scope\" ) + \" \" +\n\t\t\t\t\t\t\ttoSelector( groups[ i ] );\n\t\t\t\t\t}\n\t\t\t\t\tnewSelector = groups.join( \",\" );\n\t\t\t\t}\n\n\t\t\t\ttry {\n\t\t\t\t\tpush.apply( results,\n\t\t\t\t\t\tnewContext.querySelectorAll( newSelector )\n\t\t\t\t\t);\n\t\t\t\t\treturn results;\n\t\t\t\t} catch ( qsaError ) {\n\t\t\t\t\tnonnativeSelectorCache( selector, true );\n\t\t\t\t} finally {\n\t\t\t\t\tif ( nid === expando ) {\n\t\t\t\t\t\tcontext.removeAttribute( \"id\" );\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t}\n\n\t// All others\n\treturn select( selector.replace( rtrimCSS, \"$1\" ), context, results, seed );\n}\n\n/**\n * Create key-value caches of limited size\n * @returns {function(string, object)} Returns the Object data after storing it on itself with\n *\tproperty name the (space-suffixed) string and (if the cache is larger than Expr.cacheLength)\n *\tdeleting the oldest entry\n */\nfunction createCache() {\n\tvar keys = [];\n\n\tfunction cache( key, value ) {\n\n\t\t// Use (key + \" \") to avoid collision with native prototype properties\n\t\t// (see https://github.com/jquery/sizzle/issues/157)\n\t\tif ( keys.push( key + \" \" ) > Expr.cacheLength ) {\n\n\t\t\t// Only keep the most recent entries\n\t\t\tdelete cache[ keys.shift() ];\n\t\t}\n\t\treturn ( cache[ key + \" \" ] = value );\n\t}\n\treturn cache;\n}\n\n/**\n * Mark a function for special use by jQuery selector module\n * @param {Function} fn The function to mark\n */\nfunction markFunction( fn ) {\n\tfn[ expando ] = true;\n\treturn fn;\n}\n\n/**\n * Support testing using an element\n * @param {Function} fn Passed the created element and returns a boolean result\n */\nfunction assert( fn ) {\n\tvar el = document.createElement( \"fieldset\" );\n\n\ttry {\n\t\treturn !!fn( el );\n\t} catch ( e ) {\n\t\treturn false;\n\t} finally {\n\n\t\t// Remove from its parent by default\n\t\tif ( el.parentNode ) {\n\t\t\tel.parentNode.removeChild( el );\n\t\t}\n\n\t\t// release memory in IE\n\t\tel = null;\n\t}\n}\n\n/**\n * Returns a function to use in pseudos for input types\n * @param {String} type\n */\nfunction createInputPseudo( type ) {\n\treturn function( elem ) {\n\t\treturn nodeName( elem, \"input\" ) && elem.type === type;\n\t};\n}\n\n/**\n * Returns a function to use in pseudos for buttons\n * @param {String} type\n */\nfunction createButtonPseudo( type ) {\n\treturn function( elem ) {\n\t\treturn ( nodeName( elem, \"input\" ) || nodeName( elem, \"button\" ) ) &&\n\t\t\telem.type === type;\n\t};\n}\n\n/**\n * Returns a function to use in pseudos for :enabled/:disabled\n * @param {Boolean} disabled true for :disabled; false for :enabled\n */\nfunction createDisabledPseudo( disabled ) {\n\n\t// Known :disabled false positives: fieldset[disabled] > legend:nth-of-type(n+2) :can-disable\n\treturn function( elem ) {\n\n\t\t// Only certain elements can match :enabled or :disabled\n\t\t// https://html.spec.whatwg.org/multipage/scripting.html#selector-enabled\n\t\t// https://html.spec.whatwg.org/multipage/scripting.html#selector-disabled\n\t\tif ( \"form\" in elem ) {\n\n\t\t\t// Check for inherited disabledness on relevant non-disabled elements:\n\t\t\t// * listed form-associated elements in a disabled fieldset\n\t\t\t//   https://html.spec.whatwg.org/multipage/forms.html#category-listed\n\t\t\t//   https://html.spec.whatwg.org/multipage/forms.html#concept-fe-disabled\n\t\t\t// * option elements in a disabled optgroup\n\t\t\t//   https://html.spec.whatwg.org/multipage/forms.html#concept-option-disabled\n\t\t\t// All such elements have a \"form\" property.\n\t\t\tif ( elem.parentNode && elem.disabled === false ) {\n\n\t\t\t\t// Option elements defer to a parent optgroup if present\n\t\t\t\tif ( \"label\" in elem ) {\n\t\t\t\t\tif ( \"label\" in elem.parentNode ) {\n\t\t\t\t\t\treturn elem.parentNode.disabled === disabled;\n\t\t\t\t\t} else {\n\t\t\t\t\t\treturn elem.disabled === disabled;\n\t\t\t\t\t}\n\t\t\t\t}\n\n\t\t\t\t// Support: IE 6 - 11+\n\t\t\t\t// Use the isDisabled shortcut property to check for disabled fieldset ancestors\n\t\t\t\treturn elem.isDisabled === disabled ||\n\n\t\t\t\t\t// Where there is no isDisabled, check manually\n\t\t\t\t\telem.isDisabled !== !disabled &&\n\t\t\t\t\t\tinDisabledFieldset( elem ) === disabled;\n\t\t\t}\n\n\t\t\treturn elem.disabled === disabled;\n\n\t\t// Try to winnow out elements that can't be disabled before trusting the disabled property.\n\t\t// Some victims get caught in our net (label, legend, menu, track), but it shouldn't\n\t\t// even exist on them, let alone have a boolean value.\n\t\t} else if ( \"label\" in elem ) {\n\t\t\treturn elem.disabled === disabled;\n\t\t}\n\n\t\t// Remaining elements are neither :enabled nor :disabled\n\t\treturn false;\n\t};\n}\n\n/**\n * Returns a function to use in pseudos for positionals\n * @param {Function} fn\n */\nfunction createPositionalPseudo( fn ) {\n\treturn markFunction( function( argument ) {\n\t\targument = +argument;\n\t\treturn markFunction( function( seed, matches ) {\n\t\t\tvar j,\n\t\t\t\tmatchIndexes = fn( [], seed.length, argument ),\n\t\t\t\ti = matchIndexes.length;\n\n\t\t\t// Match elements found at the specified indexes\n\t\t\twhile ( i-- ) {\n\t\t\t\tif ( seed[ ( j = matchIndexes[ i ] ) ] ) {\n\t\t\t\t\tseed[ j ] = !( matches[ j ] = seed[ j ] );\n\t\t\t\t}\n\t\t\t}\n\t\t} );\n\t} );\n}\n\n/**\n * Checks a node for validity as a jQuery selector context\n * @param {Element|Object=} context\n * @returns {Element|Object|Boolean} The input node if acceptable, otherwise a falsy value\n */\nfunction testContext( context ) {\n\treturn context && typeof context.getElementsByTagName !== \"undefined\" && context;\n}\n\n/**\n * Sets document-related variables once based on the current document\n * @param {Element|Object} [node] An element or document object to use to set the document\n * @returns {Object} Returns the current document\n */\nfunction setDocument( node ) {\n\tvar subWindow,\n\t\tdoc = node ? node.ownerDocument || node : preferredDoc;\n\n\t// Return early if doc is invalid or already selected\n\t// Support: IE 11+, Edge 17 - 18+\n\t// IE/Edge sometimes throw a \"Permission denied\" error when strict-comparing\n\t// two documents; shallow comparisons work.\n\t// eslint-disable-next-line eqeqeq\n\tif ( doc == document || doc.nodeType !== 9 || !doc.documentElement ) {\n\t\treturn document;\n\t}\n\n\t// Update global variables\n\tdocument = doc;\n\tdocumentElement = document.documentElement;\n\tdocumentIsHTML = !jQuery.isXMLDoc( document );\n\n\t// Support: iOS 7 only, IE 9 - 11+\n\t// Older browsers didn't support unprefixed `matches`.\n\tmatches = documentElement.matches ||\n\t\tdocumentElement.webkitMatchesSelector ||\n\t\tdocumentElement.msMatchesSelector;\n\n\t// Support: IE 9 - 11+, Edge 12 - 18+\n\t// Accessing iframe documents after unload throws \"permission denied\" errors\n\t// (see trac-13936).\n\t// Limit the fix to IE & Edge Legacy; despite Edge 15+ implementing `matches`,\n\t// all IE 9+ and Edge Legacy versions implement `msMatchesSelector` as well.\n\tif ( documentElement.msMatchesSelector &&\n\n\t\t// Support: IE 11+, Edge 17 - 18+\n\t\t// IE/Edge sometimes throw a \"Permission denied\" error when strict-comparing\n\t\t// two documents; shallow comparisons work.\n\t\t// eslint-disable-next-line eqeqeq\n\t\tpreferredDoc != document &&\n\t\t( subWindow = document.defaultView ) && subWindow.top !== subWindow ) {\n\n\t\t// Support: IE 9 - 11+, Edge 12 - 18+\n\t\tsubWindow.addEventListener( \"unload\", unloadHandler );\n\t}\n\n\t// Support: IE <10\n\t// Check if getElementById returns elements by name\n\t// The broken getElementById methods don't pick up programmatically-set names,\n\t// so use a roundabout getElementsByName test\n\tsupport.getById = assert( function( el ) {\n\t\tdocumentElement.appendChild( el ).id = jQuery.expando;\n\t\treturn !document.getElementsByName ||\n\t\t\t!document.getElementsByName( jQuery.expando ).length;\n\t} );\n\n\t// Support: IE 9 only\n\t// Check to see if it's possible to do matchesSelector\n\t// on a disconnected node.\n\tsupport.disconnectedMatch = assert( function( el ) {\n\t\treturn matches.call( el, \"*\" );\n\t} );\n\n\t// Support: IE 9 - 11+, Edge 12 - 18+\n\t// IE/Edge don't support the :scope pseudo-class.\n\tsupport.scope = assert( function() {\n\t\treturn document.querySelectorAll( \":scope\" );\n\t} );\n\n\t// Support: Chrome 105 - 111 only, Safari 15.4 - 16.3 only\n\t// Make sure the `:has()` argument is parsed unforgivingly.\n\t// We include `*` in the test to detect buggy implementations that are\n\t// _selectively_ forgiving (specifically when the list includes at least\n\t// one valid selector).\n\t// Note that we treat complete lack of support for `:has()` as if it were\n\t// spec-compliant support, which is fine because use of `:has()` in such\n\t// environments will fail in the qSA path and fall back to jQuery traversal\n\t// anyway.\n\tsupport.cssHas = assert( function() {\n\t\ttry {\n\t\t\tdocument.querySelector( \":has(*,:jqfake)\" );\n\t\t\treturn false;\n\t\t} catch ( e ) {\n\t\t\treturn true;\n\t\t}\n\t} );\n\n\t// ID filter and find\n\tif ( support.getById ) {\n\t\tExpr.filter.ID = function( id ) {\n\t\t\tvar attrId = id.replace( runescape, funescape );\n\t\t\treturn function( elem ) {\n\t\t\t\treturn elem.getAttribute( \"id\" ) === attrId;\n\t\t\t};\n\t\t};\n\t\tExpr.find.ID = function( id, context ) {\n\t\t\tif ( typeof context.getElementById !== \"undefined\" && documentIsHTML ) {\n\t\t\t\tvar elem = context.getElementById( id );\n\t\t\t\treturn elem ? [ elem ] : [];\n\t\t\t}\n\t\t};\n\t} else {\n\t\tExpr.filter.ID =  function( id ) {\n\t\t\tvar attrId = id.replace( runescape, funescape );\n\t\t\treturn function( elem ) {\n\t\t\t\tvar node = typeof elem.getAttributeNode !== \"undefined\" &&\n\t\t\t\t\telem.getAttributeNode( \"id\" );\n\t\t\t\treturn node && node.value === attrId;\n\t\t\t};\n\t\t};\n\n\t\t// Support: IE 6 - 7 only\n\t\t// getElementById is not reliable as a find shortcut\n\t\tExpr.find.ID = function( id, context ) {\n\t\t\tif ( typeof context.getElementById !== \"undefined\" && documentIsHTML ) {\n\t\t\t\tvar node, i, elems,\n\t\t\t\t\telem = context.getElementById( id );\n\n\t\t\t\tif ( elem ) {\n\n\t\t\t\t\t// Verify the id attribute\n\t\t\t\t\tnode = elem.getAttributeNode( \"id\" );\n\t\t\t\t\tif ( node && node.value === id ) {\n\t\t\t\t\t\treturn [ elem ];\n\t\t\t\t\t}\n\n\t\t\t\t\t// Fall back on getElementsByName\n\t\t\t\t\telems = context.getElementsByName( id );\n\t\t\t\t\ti = 0;\n\t\t\t\t\twhile ( ( elem = elems[ i++ ] ) ) {\n\t\t\t\t\t\tnode = elem.getAttributeNode( \"id\" );\n\t\t\t\t\t\tif ( node && node.value === id ) {\n\t\t\t\t\t\t\treturn [ elem ];\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t}\n\n\t\t\t\treturn [];\n\t\t\t}\n\t\t};\n\t}\n\n\t// Tag\n\tExpr.find.TAG = function( tag, context ) {\n\t\tif ( typeof context.getElementsByTagName !== \"undefined\" ) {\n\t\t\treturn context.getElementsByTagName( tag );\n\n\t\t// DocumentFragment nodes don't have gEBTN\n\t\t} else {\n\t\t\treturn context.querySelectorAll( tag );\n\t\t}\n\t};\n\n\t// Class\n\tExpr.find.CLASS = function( className, context ) {\n\t\tif ( typeof context.getElementsByClassName !== \"undefined\" && documentIsHTML ) {\n\t\t\treturn context.getElementsByClassName( className );\n\t\t}\n\t};\n\n\t/* QSA/matchesSelector\n\t---------------------------------------------------------------------- */\n\n\t// QSA and matchesSelector support\n\n\trbuggyQSA = [];\n\n\t// Build QSA regex\n\t// Regex strategy adopted from Diego Perini\n\tassert( function( el ) {\n\n\t\tvar input;\n\n\t\tdocumentElement.appendChild( el ).innerHTML =\n\t\t\t\"<a id='\" + expando + \"' href='' disabled='disabled'></a>\" +\n\t\t\t\"<select id='\" + expando + \"-\\r\\\\' disabled='disabled'>\" +\n\t\t\t\"<option selected=''></option></select>\";\n\n\t\t// Support: iOS <=7 - 8 only\n\t\t// Boolean attributes and \"value\" are not treated correctly in some XML documents\n\t\tif ( !el.querySelectorAll( \"[selected]\" ).length ) {\n\t\t\trbuggyQSA.push( \"\\\\[\" + whitespace + \"*(?:value|\" + booleans + \")\" );\n\t\t}\n\n\t\t// Support: iOS <=7 - 8 only\n\t\tif ( !el.querySelectorAll( \"[id~=\" + expando + \"-]\" ).length ) {\n\t\t\trbuggyQSA.push( \"~=\" );\n\t\t}\n\n\t\t// Support: iOS 8 only\n\t\t// https://bugs.webkit.org/show_bug.cgi?id=136851\n\t\t// In-page `selector#id sibling-combinator selector` fails\n\t\tif ( !el.querySelectorAll( \"a#\" + expando + \"+*\" ).length ) {\n\t\t\trbuggyQSA.push( \".#.+[+~]\" );\n\t\t}\n\n\t\t// Support: Chrome <=105+, Firefox <=104+, Safari <=15.4+\n\t\t// In some of the document kinds, these selectors wouldn't work natively.\n\t\t// This is probably OK but for backwards compatibility we want to maintain\n\t\t// handling them through jQuery traversal in jQuery 3.x.\n\t\tif ( !el.querySelectorAll( \":checked\" ).length ) {\n\t\t\trbuggyQSA.push( \":checked\" );\n\t\t}\n\n\t\t// Support: Windows 8 Native Apps\n\t\t// The type and name attributes are restricted during .innerHTML assignment\n\t\tinput = document.createElement( \"input\" );\n\t\tinput.setAttribute( \"type\", \"hidden\" );\n\t\tel.appendChild( input ).setAttribute( \"name\", \"D\" );\n\n\t\t// Support: IE 9 - 11+\n\t\t// IE's :disabled selector does not pick up the children of disabled fieldsets\n\t\t// Support: Chrome <=105+, Firefox <=104+, Safari <=15.4+\n\t\t// In some of the document kinds, these selectors wouldn't work natively.\n\t\t// This is probably OK but for backwards compatibility we want to maintain\n\t\t// handling them through jQuery traversal in jQuery 3.x.\n\t\tdocumentElement.appendChild( el ).disabled = true;\n\t\tif ( el.querySelectorAll( \":disabled\" ).length !== 2 ) {\n\t\t\trbuggyQSA.push( \":enabled\", \":disabled\" );\n\t\t}\n\n\t\t// Support: IE 11+, Edge 15 - 18+\n\t\t// IE 11/Edge don't find elements on a `[name='']` query in some cases.\n\t\t// Adding a temporary attribute to the document before the selection works\n\t\t// around the issue.\n\t\t// Interestingly, IE 10 & older don't seem to have the issue.\n\t\tinput = document.createElement( \"input\" );\n\t\tinput.setAttribute( \"name\", \"\" );\n\t\tel.appendChild( input );\n\t\tif ( !el.querySelectorAll( \"[name='']\" ).length ) {\n\t\t\trbuggyQSA.push( \"\\\\[\" + whitespace + \"*name\" + whitespace + \"*=\" +\n\t\t\t\twhitespace + \"*(?:''|\\\"\\\")\" );\n\t\t}\n\t} );\n\n\tif ( !support.cssHas ) {\n\n\t\t// Support: Chrome 105 - 110+, Safari 15.4 - 16.3+\n\t\t// Our regular `try-catch` mechanism fails to detect natively-unsupported\n\t\t// pseudo-classes inside `:has()` (such as `:has(:contains(\"Foo\"))`)\n\t\t// in browsers that parse the `:has()` argument as a forgiving selector list.\n\t\t// https://drafts.csswg.org/selectors/#relational now requires the argument\n\t\t// to be parsed unforgivingly, but browsers have not yet fully adjusted.\n\t\trbuggyQSA.push( \":has\" );\n\t}\n\n\trbuggyQSA = rbuggyQSA.length && new RegExp( rbuggyQSA.join( \"|\" ) );\n\n\t/* Sorting\n\t---------------------------------------------------------------------- */\n\n\t// Document order sorting\n\tsortOrder = function( a, b ) {\n\n\t\t// Flag for duplicate removal\n\t\tif ( a === b ) {\n\t\t\thasDuplicate = true;\n\t\t\treturn 0;\n\t\t}\n\n\t\t// Sort on method existence if only one input has compareDocumentPosition\n\t\tvar compare = !a.compareDocumentPosition - !b.compareDocumentPosition;\n\t\tif ( compare ) {\n\t\t\treturn compare;\n\t\t}\n\n\t\t// Calculate position if both inputs belong to the same document\n\t\t// Support: IE 11+, Edge 17 - 18+\n\t\t// IE/Edge sometimes throw a \"Permission denied\" error when strict-comparing\n\t\t// two documents; shallow comparisons work.\n\t\t// eslint-disable-next-line eqeqeq\n\t\tcompare = ( a.ownerDocument || a ) == ( b.ownerDocument || b ) ?\n\t\t\ta.compareDocumentPosition( b ) :\n\n\t\t\t// Otherwise we know they are disconnected\n\t\t\t1;\n\n\t\t// Disconnected nodes\n\t\tif ( compare & 1 ||\n\t\t\t( !support.sortDetached && b.compareDocumentPosition( a ) === compare ) ) {\n\n\t\t\t// Choose the first element that is related to our preferred document\n\t\t\t// Support: IE 11+, Edge 17 - 18+\n\t\t\t// IE/Edge sometimes throw a \"Permission denied\" error when strict-comparing\n\t\t\t// two documents; shallow comparisons work.\n\t\t\t// eslint-disable-next-line eqeqeq\n\t\t\tif ( a === document || a.ownerDocument == preferredDoc &&\n\t\t\t\tfind.contains( preferredDoc, a ) ) {\n\t\t\t\treturn -1;\n\t\t\t}\n\n\t\t\t// Support: IE 11+, Edge 17 - 18+\n\t\t\t// IE/Edge sometimes throw a \"Permission denied\" error when strict-comparing\n\t\t\t// two documents; shallow comparisons work.\n\t\t\t// eslint-disable-next-line eqeqeq\n\t\t\tif ( b === document || b.ownerDocument == preferredDoc &&\n\t\t\t\tfind.contains( preferredDoc, b ) ) {\n\t\t\t\treturn 1;\n\t\t\t}\n\n\t\t\t// Maintain original order\n\t\t\treturn sortInput ?\n\t\t\t\t( indexOf.call( sortInput, a ) - indexOf.call( sortInput, b ) ) :\n\t\t\t\t0;\n\t\t}\n\n\t\treturn compare & 4 ? -1 : 1;\n\t};\n\n\treturn document;\n}\n\nfind.matches = function( expr, elements ) {\n\treturn find( expr, null, null, elements );\n};\n\nfind.matchesSelector = function( elem, expr ) {\n\tsetDocument( elem );\n\n\tif ( documentIsHTML &&\n\t\t!nonnativeSelectorCache[ expr + \" \" ] &&\n\t\t( !rbuggyQSA || !rbuggyQSA.test( expr ) ) ) {\n\n\t\ttry {\n\t\t\tvar ret = matches.call( elem, expr );\n\n\t\t\t// IE 9's matchesSelector returns false on disconnected nodes\n\t\t\tif ( ret || support.disconnectedMatch ||\n\n\t\t\t\t\t// As well, disconnected nodes are said to be in a document\n\t\t\t\t\t// fragment in IE 9\n\t\t\t\t\telem.document && elem.document.nodeType !== 11 ) {\n\t\t\t\treturn ret;\n\t\t\t}\n\t\t} catch ( e ) {\n\t\t\tnonnativeSelectorCache( expr, true );\n\t\t}\n\t}\n\n\treturn find( expr, document, null, [ elem ] ).length > 0;\n};\n\nfind.contains = function( context, elem ) {\n\n\t// Set document vars if needed\n\t// Support: IE 11+, Edge 17 - 18+\n\t// IE/Edge sometimes throw a \"Permission denied\" error when strict-comparing\n\t// two documents; shallow comparisons work.\n\t// eslint-disable-next-line eqeqeq\n\tif ( ( context.ownerDocument || context ) != document ) {\n\t\tsetDocument( context );\n\t}\n\treturn jQuery.contains( context, elem );\n};\n\n\nfind.attr = function( elem, name ) {\n\n\t// Set document vars if needed\n\t// Support: IE 11+, Edge 17 - 18+\n\t// IE/Edge sometimes throw a \"Permission denied\" error when strict-comparing\n\t// two documents; shallow comparisons work.\n\t// eslint-disable-next-line eqeqeq\n\tif ( ( elem.ownerDocument || elem ) != document ) {\n\t\tsetDocument( elem );\n\t}\n\n\tvar fn = Expr.attrHandle[ name.toLowerCase() ],\n\n\t\t// Don't get fooled by Object.prototype properties (see trac-13807)\n\t\tval = fn && hasOwn.call( Expr.attrHandle, name.toLowerCase() ) ?\n\t\t\tfn( elem, name, !documentIsHTML ) :\n\t\t\tundefined;\n\n\tif ( val !== undefined ) {\n\t\treturn val;\n\t}\n\n\treturn elem.getAttribute( name );\n};\n\nfind.error = function( msg ) {\n\tthrow new Error( \"Syntax error, unrecognized expression: \" + msg );\n};\n\n/**\n * Document sorting and removing duplicates\n * @param {ArrayLike} results\n */\njQuery.uniqueSort = function( results ) {\n\tvar elem,\n\t\tduplicates = [],\n\t\tj = 0,\n\t\ti = 0;\n\n\t// Unless we *know* we can detect duplicates, assume their presence\n\t//\n\t// Support: Android <=4.0+\n\t// Testing for detecting duplicates is unpredictable so instead assume we can't\n\t// depend on duplicate detection in all browsers without a stable sort.\n\thasDuplicate = !support.sortStable;\n\tsortInput = !support.sortStable && slice.call( results, 0 );\n\tsort.call( results, sortOrder );\n\n\tif ( hasDuplicate ) {\n\t\twhile ( ( elem = results[ i++ ] ) ) {\n\t\t\tif ( elem === results[ i ] ) {\n\t\t\t\tj = duplicates.push( i );\n\t\t\t}\n\t\t}\n\t\twhile ( j-- ) {\n\t\t\tsplice.call( results, duplicates[ j ], 1 );\n\t\t}\n\t}\n\n\t// Clear input after sorting to release objects\n\t// See https://github.com/jquery/sizzle/pull/225\n\tsortInput = null;\n\n\treturn results;\n};\n\njQuery.fn.uniqueSort = function() {\n\treturn this.pushStack( jQuery.uniqueSort( slice.apply( this ) ) );\n};\n\nExpr = jQuery.expr = {\n\n\t// Can be adjusted by the user\n\tcacheLength: 50,\n\n\tcreatePseudo: markFunction,\n\n\tmatch: matchExpr,\n\n\tattrHandle: {},\n\n\tfind: {},\n\n\trelative: {\n\t\t\">\": { dir: \"parentNode\", first: true },\n\t\t\" \": { dir: \"parentNode\" },\n\t\t\"+\": { dir: \"previousSibling\", first: true },\n\t\t\"~\": { dir: \"previousSibling\" }\n\t},\n\n\tpreFilter: {\n\t\tATTR: function( match ) {\n\t\t\tmatch[ 1 ] = match[ 1 ].replace( runescape, funescape );\n\n\t\t\t// Move the given value to match[3] whether quoted or unquoted\n\t\t\tmatch[ 3 ] = ( match[ 3 ] || match[ 4 ] || match[ 5 ] || \"\" )\n\t\t\t\t.replace( runescape, funescape );\n\n\t\t\tif ( match[ 2 ] === \"~=\" ) {\n\t\t\t\tmatch[ 3 ] = \" \" + match[ 3 ] + \" \";\n\t\t\t}\n\n\t\t\treturn match.slice( 0, 4 );\n\t\t},\n\n\t\tCHILD: function( match ) {\n\n\t\t\t/* matches from matchExpr[\"CHILD\"]\n\t\t\t\t1 type (only|nth|...)\n\t\t\t\t2 what (child|of-type)\n\t\t\t\t3 argument (even|odd|\\d*|\\d*n([+-]\\d+)?|...)\n\t\t\t\t4 xn-component of xn+y argument ([+-]?\\d*n|)\n\t\t\t\t5 sign of xn-component\n\t\t\t\t6 x of xn-component\n\t\t\t\t7 sign of y-component\n\t\t\t\t8 y of y-component\n\t\t\t*/\n\t\t\tmatch[ 1 ] = match[ 1 ].toLowerCase();\n\n\t\t\tif ( match[ 1 ].slice( 0, 3 ) === \"nth\" ) {\n\n\t\t\t\t// nth-* requires argument\n\t\t\t\tif ( !match[ 3 ] ) {\n\t\t\t\t\tfind.error( match[ 0 ] );\n\t\t\t\t}\n\n\t\t\t\t// numeric x and y parameters for Expr.filter.CHILD\n\t\t\t\t// remember that false/true cast respectively to 0/1\n\t\t\t\tmatch[ 4 ] = +( match[ 4 ] ?\n\t\t\t\t\tmatch[ 5 ] + ( match[ 6 ] || 1 ) :\n\t\t\t\t\t2 * ( match[ 3 ] === \"even\" || match[ 3 ] === \"odd\" )\n\t\t\t\t);\n\t\t\t\tmatch[ 5 ] = +( ( match[ 7 ] + match[ 8 ] ) || match[ 3 ] === \"odd\" );\n\n\t\t\t// other types prohibit arguments\n\t\t\t} else if ( match[ 3 ] ) {\n\t\t\t\tfind.error( match[ 0 ] );\n\t\t\t}\n\n\t\t\treturn match;\n\t\t},\n\n\t\tPSEUDO: function( match ) {\n\t\t\tvar excess,\n\t\t\t\tunquoted = !match[ 6 ] && match[ 2 ];\n\n\t\t\tif ( matchExpr.CHILD.test( match[ 0 ] ) ) {\n\t\t\t\treturn null;\n\t\t\t}\n\n\t\t\t// Accept quoted arguments as-is\n\t\t\tif ( match[ 3 ] ) {\n\t\t\t\tmatch[ 2 ] = match[ 4 ] || match[ 5 ] || \"\";\n\n\t\t\t// Strip excess characters from unquoted arguments\n\t\t\t} else if ( unquoted && rpseudo.test( unquoted ) &&\n\n\t\t\t\t// Get excess from tokenize (recursively)\n\t\t\t\t( excess = tokenize( unquoted, true ) ) &&\n\n\t\t\t\t// advance to the next closing parenthesis\n\t\t\t\t( excess = unquoted.indexOf( \")\", unquoted.length - excess ) - unquoted.length ) ) {\n\n\t\t\t\t// excess is a negative index\n\t\t\t\tmatch[ 0 ] = match[ 0 ].slice( 0, excess );\n\t\t\t\tmatch[ 2 ] = unquoted.slice( 0, excess );\n\t\t\t}\n\n\t\t\t// Return only captures needed by the pseudo filter method (type and argument)\n\t\t\treturn match.slice( 0, 3 );\n\t\t}\n\t},\n\n\tfilter: {\n\n\t\tTAG: function( nodeNameSelector ) {\n\t\t\tvar expectedNodeName = nodeNameSelector.replace( runescape, funescape ).toLowerCase();\n\t\t\treturn nodeNameSelector === \"*\" ?\n\t\t\t\tfunction() {\n\t\t\t\t\treturn true;\n\t\t\t\t} :\n\t\t\t\tfunction( elem ) {\n\t\t\t\t\treturn nodeName( elem, expectedNodeName );\n\t\t\t\t};\n\t\t},\n\n\t\tCLASS: function( className ) {\n\t\t\tvar pattern = classCache[ className + \" \" ];\n\n\t\t\treturn pattern ||\n\t\t\t\t( pattern = new RegExp( \"(^|\" + whitespace + \")\" + className +\n\t\t\t\t\t\"(\" + whitespace + \"|$)\" ) ) &&\n\t\t\t\tclassCache( className, function( elem ) {\n\t\t\t\t\treturn pattern.test(\n\t\t\t\t\t\ttypeof elem.className === \"string\" && elem.className ||\n\t\t\t\t\t\t\ttypeof elem.getAttribute !== \"undefined\" &&\n\t\t\t\t\t\t\t\telem.getAttribute( \"class\" ) ||\n\t\t\t\t\t\t\t\"\"\n\t\t\t\t\t);\n\t\t\t\t} );\n\t\t},\n\n\t\tATTR: function( name, operator, check ) {\n\t\t\treturn function( elem ) {\n\t\t\t\tvar result = find.attr( elem, name );\n\n\t\t\t\tif ( result == null ) {\n\t\t\t\t\treturn operator === \"!=\";\n\t\t\t\t}\n\t\t\t\tif ( !operator ) {\n\t\t\t\t\treturn true;\n\t\t\t\t}\n\n\t\t\t\tresult += \"\";\n\n\t\t\t\tif ( operator === \"=\" ) {\n\t\t\t\t\treturn result === check;\n\t\t\t\t}\n\t\t\t\tif ( operator === \"!=\" ) {\n\t\t\t\t\treturn result !== check;\n\t\t\t\t}\n\t\t\t\tif ( operator === \"^=\" ) {\n\t\t\t\t\treturn check && result.indexOf( check ) === 0;\n\t\t\t\t}\n\t\t\t\tif ( operator === \"*=\" ) {\n\t\t\t\t\treturn check && result.indexOf( check ) > -1;\n\t\t\t\t}\n\t\t\t\tif ( operator === \"$=\" ) {\n\t\t\t\t\treturn check && result.slice( -check.length ) === check;\n\t\t\t\t}\n\t\t\t\tif ( operator === \"~=\" ) {\n\t\t\t\t\treturn ( \" \" + result.replace( rwhitespace, \" \" ) + \" \" )\n\t\t\t\t\t\t.indexOf( check ) > -1;\n\t\t\t\t}\n\t\t\t\tif ( operator === \"|=\" ) {\n\t\t\t\t\treturn result === check || result.slice( 0, check.length + 1 ) === check + \"-\";\n\t\t\t\t}\n\n\t\t\t\treturn false;\n\t\t\t};\n\t\t},\n\n\t\tCHILD: function( type, what, _argument, first, last ) {\n\t\t\tvar simple = type.slice( 0, 3 ) !== \"nth\",\n\t\t\t\tforward = type.slice( -4 ) !== \"last\",\n\t\t\t\tofType = what === \"of-type\";\n\n\t\t\treturn first === 1 && last === 0 ?\n\n\t\t\t\t// Shortcut for :nth-*(n)\n\t\t\t\tfunction( elem ) {\n\t\t\t\t\treturn !!elem.parentNode;\n\t\t\t\t} :\n\n\t\t\t\tfunction( elem, _context, xml ) {\n\t\t\t\t\tvar cache, outerCache, node, nodeIndex, start,\n\t\t\t\t\t\tdir = simple !== forward ? \"nextSibling\" : \"previousSibling\",\n\t\t\t\t\t\tparent = elem.parentNode,\n\t\t\t\t\t\tname = ofType && elem.nodeName.toLowerCase(),\n\t\t\t\t\t\tuseCache = !xml && !ofType,\n\t\t\t\t\t\tdiff = false;\n\n\t\t\t\t\tif ( parent ) {\n\n\t\t\t\t\t\t// :(first|last|only)-(child|of-type)\n\t\t\t\t\t\tif ( simple ) {\n\t\t\t\t\t\t\twhile ( dir ) {\n\t\t\t\t\t\t\t\tnode = elem;\n\t\t\t\t\t\t\t\twhile ( ( node = node[ dir ] ) ) {\n\t\t\t\t\t\t\t\t\tif ( ofType ?\n\t\t\t\t\t\t\t\t\t\tnodeName( node, name ) :\n\t\t\t\t\t\t\t\t\t\tnode.nodeType === 1 ) {\n\n\t\t\t\t\t\t\t\t\t\treturn false;\n\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t}\n\n\t\t\t\t\t\t\t\t// Reverse direction for :only-* (if we haven't yet done so)\n\t\t\t\t\t\t\t\tstart = dir = type === \"only\" && !start && \"nextSibling\";\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\treturn true;\n\t\t\t\t\t\t}\n\n\t\t\t\t\t\tstart = [ forward ? parent.firstChild : parent.lastChild ];\n\n\t\t\t\t\t\t// non-xml :nth-child(...) stores cache data on `parent`\n\t\t\t\t\t\tif ( forward && useCache ) {\n\n\t\t\t\t\t\t\t// Seek `elem` from a previously-cached index\n\t\t\t\t\t\t\touterCache = parent[ expando ] || ( parent[ expando ] = {} );\n\t\t\t\t\t\t\tcache = outerCache[ type ] || [];\n\t\t\t\t\t\t\tnodeIndex = cache[ 0 ] === dirruns && cache[ 1 ];\n\t\t\t\t\t\t\tdiff = nodeIndex && cache[ 2 ];\n\t\t\t\t\t\t\tnode = nodeIndex && parent.childNodes[ nodeIndex ];\n\n\t\t\t\t\t\t\twhile ( ( node = ++nodeIndex && node && node[ dir ] ||\n\n\t\t\t\t\t\t\t\t// Fallback to seeking `elem` from the start\n\t\t\t\t\t\t\t\t( diff = nodeIndex = 0 ) || start.pop() ) ) {\n\n\t\t\t\t\t\t\t\t// When found, cache indexes on `parent` and break\n\t\t\t\t\t\t\t\tif ( node.nodeType === 1 && ++diff && node === elem ) {\n\t\t\t\t\t\t\t\t\touterCache[ type ] = [ dirruns, nodeIndex, diff ];\n\t\t\t\t\t\t\t\t\tbreak;\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t}\n\n\t\t\t\t\t\t} else {\n\n\t\t\t\t\t\t\t// Use previously-cached element index if available\n\t\t\t\t\t\t\tif ( useCache ) {\n\t\t\t\t\t\t\t\touterCache = elem[ expando ] || ( elem[ expando ] = {} );\n\t\t\t\t\t\t\t\tcache = outerCache[ type ] || [];\n\t\t\t\t\t\t\t\tnodeIndex = cache[ 0 ] === dirruns && cache[ 1 ];\n\t\t\t\t\t\t\t\tdiff = nodeIndex;\n\t\t\t\t\t\t\t}\n\n\t\t\t\t\t\t\t// xml :nth-child(...)\n\t\t\t\t\t\t\t// or :nth-last-child(...) or :nth(-last)?-of-type(...)\n\t\t\t\t\t\t\tif ( diff === false ) {\n\n\t\t\t\t\t\t\t\t// Use the same loop as above to seek `elem` from the start\n\t\t\t\t\t\t\t\twhile ( ( node = ++nodeIndex && node && node[ dir ] ||\n\t\t\t\t\t\t\t\t\t( diff = nodeIndex = 0 ) || start.pop() ) ) {\n\n\t\t\t\t\t\t\t\t\tif ( ( ofType ?\n\t\t\t\t\t\t\t\t\t\tnodeName( node, name ) :\n\t\t\t\t\t\t\t\t\t\tnode.nodeType === 1 ) &&\n\t\t\t\t\t\t\t\t\t\t++diff ) {\n\n\t\t\t\t\t\t\t\t\t\t// Cache the index of each encountered element\n\t\t\t\t\t\t\t\t\t\tif ( useCache ) {\n\t\t\t\t\t\t\t\t\t\t\touterCache = node[ expando ] ||\n\t\t\t\t\t\t\t\t\t\t\t\t( node[ expando ] = {} );\n\t\t\t\t\t\t\t\t\t\t\touterCache[ type ] = [ dirruns, diff ];\n\t\t\t\t\t\t\t\t\t\t}\n\n\t\t\t\t\t\t\t\t\t\tif ( node === elem ) {\n\t\t\t\t\t\t\t\t\t\t\tbreak;\n\t\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t}\n\n\t\t\t\t\t\t// Incorporate the offset, then check against cycle size\n\t\t\t\t\t\tdiff -= last;\n\t\t\t\t\t\treturn diff === first || ( diff % first === 0 && diff / first >= 0 );\n\t\t\t\t\t}\n\t\t\t\t};\n\t\t},\n\n\t\tPSEUDO: function( pseudo, argument ) {\n\n\t\t\t// pseudo-class names are case-insensitive\n\t\t\t// https://www.w3.org/TR/selectors/#pseudo-classes\n\t\t\t// Prioritize by case sensitivity in case custom pseudos are added with uppercase letters\n\t\t\t// Remember that setFilters inherits from pseudos\n\t\t\tvar args,\n\t\t\t\tfn = Expr.pseudos[ pseudo ] || Expr.setFilters[ pseudo.toLowerCase() ] ||\n\t\t\t\t\tfind.error( \"unsupported pseudo: \" + pseudo );\n\n\t\t\t// The user may use createPseudo to indicate that\n\t\t\t// arguments are needed to create the filter function\n\t\t\t// just as jQuery does\n\t\t\tif ( fn[ expando ] ) {\n\t\t\t\treturn fn( argument );\n\t\t\t}\n\n\t\t\t// But maintain support for old signatures\n\t\t\tif ( fn.length > 1 ) {\n\t\t\t\targs = [ pseudo, pseudo, \"\", argument ];\n\t\t\t\treturn Expr.setFilters.hasOwnProperty( pseudo.toLowerCase() ) ?\n\t\t\t\t\tmarkFunction( function( seed, matches ) {\n\t\t\t\t\t\tvar idx,\n\t\t\t\t\t\t\tmatched = fn( seed, argument ),\n\t\t\t\t\t\t\ti = matched.length;\n\t\t\t\t\t\twhile ( i-- ) {\n\t\t\t\t\t\t\tidx = indexOf.call( seed, matched[ i ] );\n\t\t\t\t\t\t\tseed[ idx ] = !( matches[ idx ] = matched[ i ] );\n\t\t\t\t\t\t}\n\t\t\t\t\t} ) :\n\t\t\t\t\tfunction( elem ) {\n\t\t\t\t\t\treturn fn( elem, 0, args );\n\t\t\t\t\t};\n\t\t\t}\n\n\t\t\treturn fn;\n\t\t}\n\t},\n\n\tpseudos: {\n\n\t\t// Potentially complex pseudos\n\t\tnot: markFunction( function( selector ) {\n\n\t\t\t// Trim the selector passed to compile\n\t\t\t// to avoid treating leading and trailing\n\t\t\t// spaces as combinators\n\t\t\tvar input = [],\n\t\t\t\tresults = [],\n\t\t\t\tmatcher = compile( selector.replace( rtrimCSS, \"$1\" ) );\n\n\t\t\treturn matcher[ expando ] ?\n\t\t\t\tmarkFunction( function( seed, matches, _context, xml ) {\n\t\t\t\t\tvar elem,\n\t\t\t\t\t\tunmatched = matcher( seed, null, xml, [] ),\n\t\t\t\t\t\ti = seed.length;\n\n\t\t\t\t\t// Match elements unmatched by `matcher`\n\t\t\t\t\twhile ( i-- ) {\n\t\t\t\t\t\tif ( ( elem = unmatched[ i ] ) ) {\n\t\t\t\t\t\t\tseed[ i ] = !( matches[ i ] = elem );\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t} ) :\n\t\t\t\tfunction( elem, _context, xml ) {\n\t\t\t\t\tinput[ 0 ] = elem;\n\t\t\t\t\tmatcher( input, null, xml, results );\n\n\t\t\t\t\t// Don't keep the element\n\t\t\t\t\t// (see https://github.com/jquery/sizzle/issues/299)\n\t\t\t\t\tinput[ 0 ] = null;\n\t\t\t\t\treturn !results.pop();\n\t\t\t\t};\n\t\t} ),\n\n\t\thas: markFunction( function( selector ) {\n\t\t\treturn function( elem ) {\n\t\t\t\treturn find( selector, elem ).length > 0;\n\t\t\t};\n\t\t} ),\n\n\t\tcontains: markFunction( function( text ) {\n\t\t\ttext = text.replace( runescape, funescape );\n\t\t\treturn function( elem ) {\n\t\t\t\treturn ( elem.textContent || jQuery.text( elem ) ).indexOf( text ) > -1;\n\t\t\t};\n\t\t} ),\n\n\t\t// \"Whether an element is represented by a :lang() selector\n\t\t// is based solely on the element's language value\n\t\t// being equal to the identifier C,\n\t\t// or beginning with the identifier C immediately followed by \"-\".\n\t\t// The matching of C against the element's language value is performed case-insensitively.\n\t\t// The identifier C does not have to be a valid language name.\"\n\t\t// https://www.w3.org/TR/selectors/#lang-pseudo\n\t\tlang: markFunction( function( lang ) {\n\n\t\t\t// lang value must be a valid identifier\n\t\t\tif ( !ridentifier.test( lang || \"\" ) ) {\n\t\t\t\tfind.error( \"unsupported lang: \" + lang );\n\t\t\t}\n\t\t\tlang = lang.replace( runescape, funescape ).toLowerCase();\n\t\t\treturn function( elem ) {\n\t\t\t\tvar elemLang;\n\t\t\t\tdo {\n\t\t\t\t\tif ( ( elemLang = documentIsHTML ?\n\t\t\t\t\t\telem.lang :\n\t\t\t\t\t\telem.getAttribute( \"xml:lang\" ) || elem.getAttribute( \"lang\" ) ) ) {\n\n\t\t\t\t\t\telemLang = elemLang.toLowerCase();\n\t\t\t\t\t\treturn elemLang === lang || elemLang.indexOf( lang + \"-\" ) === 0;\n\t\t\t\t\t}\n\t\t\t\t} while ( ( elem = elem.parentNode ) && elem.nodeType === 1 );\n\t\t\t\treturn false;\n\t\t\t};\n\t\t} ),\n\n\t\t// Miscellaneous\n\t\ttarget: function( elem ) {\n\t\t\tvar hash = window.location && window.location.hash;\n\t\t\treturn hash && hash.slice( 1 ) === elem.id;\n\t\t},\n\n\t\troot: function( elem ) {\n\t\t\treturn elem === documentElement;\n\t\t},\n\n\t\tfocus: function( elem ) {\n\t\t\treturn elem === safeActiveElement() &&\n\t\t\t\tdocument.hasFocus() &&\n\t\t\t\t!!( elem.type || elem.href || ~elem.tabIndex );\n\t\t},\n\n\t\t// Boolean properties\n\t\tenabled: createDisabledPseudo( false ),\n\t\tdisabled: createDisabledPseudo( true ),\n\n\t\tchecked: function( elem ) {\n\n\t\t\t// In CSS3, :checked should return both checked and selected elements\n\t\t\t// https://www.w3.org/TR/2011/REC-css3-selectors-20110929/#checked\n\t\t\treturn ( nodeName( elem, \"input\" ) && !!elem.checked ) ||\n\t\t\t\t( nodeName( elem, \"option\" ) && !!elem.selected );\n\t\t},\n\n\t\tselected: function( elem ) {\n\n\t\t\t// Support: IE <=11+\n\t\t\t// Accessing the selectedIndex property\n\t\t\t// forces the browser to treat the default option as\n\t\t\t// selected when in an optgroup.\n\t\t\tif ( elem.parentNode ) {\n\t\t\t\t// eslint-disable-next-line no-unused-expressions\n\t\t\t\telem.parentNode.selectedIndex;\n\t\t\t}\n\n\t\t\treturn elem.selected === true;\n\t\t},\n\n\t\t// Contents\n\t\tempty: function( elem ) {\n\n\t\t\t// https://www.w3.org/TR/selectors/#empty-pseudo\n\t\t\t// :empty is negated by element (1) or content nodes (text: 3; cdata: 4; entity ref: 5),\n\t\t\t//   but not by others (comment: 8; processing instruction: 7; etc.)\n\t\t\t// nodeType < 6 works because attributes (2) do not appear as children\n\t\t\tfor ( elem = elem.firstChild; elem; elem = elem.nextSibling ) {\n\t\t\t\tif ( elem.nodeType < 6 ) {\n\t\t\t\t\treturn false;\n\t\t\t\t}\n\t\t\t}\n\t\t\treturn true;\n\t\t},\n\n\t\tparent: function( elem ) {\n\t\t\treturn !Expr.pseudos.empty( elem );\n\t\t},\n\n\t\t// Element/input types\n\t\theader: function( elem ) {\n\t\t\treturn rheader.test( elem.nodeName );\n\t\t},\n\n\t\tinput: function( elem ) {\n\t\t\treturn rinputs.test( elem.nodeName );\n\t\t},\n\n\t\tbutton: function( elem ) {\n\t\t\treturn nodeName( elem, \"input\" ) && elem.type === \"button\" ||\n\t\t\t\tnodeName( elem, \"button\" );\n\t\t},\n\n\t\ttext: function( elem ) {\n\t\t\tvar attr;\n\t\t\treturn nodeName( elem, \"input\" ) && elem.type === \"text\" &&\n\n\t\t\t\t// Support: IE <10 only\n\t\t\t\t// New HTML5 attribute values (e.g., \"search\") appear\n\t\t\t\t// with elem.type === \"text\"\n\t\t\t\t( ( attr = elem.getAttribute( \"type\" ) ) == null ||\n\t\t\t\t\tattr.toLowerCase() === \"text\" );\n\t\t},\n\n\t\t// Position-in-collection\n\t\tfirst: createPositionalPseudo( function() {\n\t\t\treturn [ 0 ];\n\t\t} ),\n\n\t\tlast: createPositionalPseudo( function( _matchIndexes, length ) {\n\t\t\treturn [ length - 1 ];\n\t\t} ),\n\n\t\teq: createPositionalPseudo( function( _matchIndexes, length, argument ) {\n\t\t\treturn [ argument < 0 ? argument + length : argument ];\n\t\t} ),\n\n\t\teven: createPositionalPseudo( function( matchIndexes, length ) {\n\t\t\tvar i = 0;\n\t\t\tfor ( ; i < length; i += 2 ) {\n\t\t\t\tmatchIndexes.push( i );\n\t\t\t}\n\t\t\treturn matchIndexes;\n\t\t} ),\n\n\t\todd: createPositionalPseudo( function( matchIndexes, length ) {\n\t\t\tvar i = 1;\n\t\t\tfor ( ; i < length; i += 2 ) {\n\t\t\t\tmatchIndexes.push( i );\n\t\t\t}\n\t\t\treturn matchIndexes;\n\t\t} ),\n\n\t\tlt: createPositionalPseudo( function( matchIndexes, length, argument ) {\n\t\t\tvar i;\n\n\t\t\tif ( argument < 0 ) {\n\t\t\t\ti = argument + length;\n\t\t\t} else if ( argument > length ) {\n\t\t\t\ti = length;\n\t\t\t} else {\n\t\t\t\ti = argument;\n\t\t\t}\n\n\t\t\tfor ( ; --i >= 0; ) {\n\t\t\t\tmatchIndexes.push( i );\n\t\t\t}\n\t\t\treturn matchIndexes;\n\t\t} ),\n\n\t\tgt: createPositionalPseudo( function( matchIndexes, length, argument ) {\n\t\t\tvar i = argument < 0 ? argument + length : argument;\n\t\t\tfor ( ; ++i < length; ) {\n\t\t\t\tmatchIndexes.push( i );\n\t\t\t}\n\t\t\treturn matchIndexes;\n\t\t} )\n\t}\n};\n\nExpr.pseudos.nth = Expr.pseudos.eq;\n\n// Add button/input type pseudos\nfor ( i in { radio: true, checkbox: true, file: true, password: true, image: true } ) {\n\tExpr.pseudos[ i ] = createInputPseudo( i );\n}\nfor ( i in { submit: true, reset: true } ) {\n\tExpr.pseudos[ i ] = createButtonPseudo( i );\n}\n\n// Easy API for creating new setFilters\nfunction setFilters() {}\nsetFilters.prototype = Expr.filters = Expr.pseudos;\nExpr.setFilters = new setFilters();\n\nfunction tokenize( selector, parseOnly ) {\n\tvar matched, match, tokens, type,\n\t\tsoFar, groups, preFilters,\n\t\tcached = tokenCache[ selector + \" \" ];\n\n\tif ( cached ) {\n\t\treturn parseOnly ? 0 : cached.slice( 0 );\n\t}\n\n\tsoFar = selector;\n\tgroups = [];\n\tpreFilters = Expr.preFilter;\n\n\twhile ( soFar ) {\n\n\t\t// Comma and first run\n\t\tif ( !matched || ( match = rcomma.exec( soFar ) ) ) {\n\t\t\tif ( match ) {\n\n\t\t\t\t// Don't consume trailing commas as valid\n\t\t\t\tsoFar = soFar.slice( match[ 0 ].length ) || soFar;\n\t\t\t}\n\t\t\tgroups.push( ( tokens = [] ) );\n\t\t}\n\n\t\tmatched = false;\n\n\t\t// Combinators\n\t\tif ( ( match = rleadingCombinator.exec( soFar ) ) ) {\n\t\t\tmatched = match.shift();\n\t\t\ttokens.push( {\n\t\t\t\tvalue: matched,\n\n\t\t\t\t// Cast descendant combinators to space\n\t\t\t\ttype: match[ 0 ].replace( rtrimCSS, \" \" )\n\t\t\t} );\n\t\t\tsoFar = soFar.slice( matched.length );\n\t\t}\n\n\t\t// Filters\n\t\tfor ( type in Expr.filter ) {\n\t\t\tif ( ( match = matchExpr[ type ].exec( soFar ) ) && ( !preFilters[ type ] ||\n\t\t\t\t( match = preFilters[ type ]( match ) ) ) ) {\n\t\t\t\tmatched = match.shift();\n\t\t\t\ttokens.push( {\n\t\t\t\t\tvalue: matched,\n\t\t\t\t\ttype: type,\n\t\t\t\t\tmatches: match\n\t\t\t\t} );\n\t\t\t\tsoFar = soFar.slice( matched.length );\n\t\t\t}\n\t\t}\n\n\t\tif ( !matched ) {\n\t\t\tbreak;\n\t\t}\n\t}\n\n\t// Return the length of the invalid excess\n\t// if we're just parsing\n\t// Otherwise, throw an error or return tokens\n\tif ( parseOnly ) {\n\t\treturn soFar.length;\n\t}\n\n\treturn soFar ?\n\t\tfind.error( selector ) :\n\n\t\t// Cache the tokens\n\t\ttokenCache( selector, groups ).slice( 0 );\n}\n\nfunction toSelector( tokens ) {\n\tvar i = 0,\n\t\tlen = tokens.length,\n\t\tselector = \"\";\n\tfor ( ; i < len; i++ ) {\n\t\tselector += tokens[ i ].value;\n\t}\n\treturn selector;\n}\n\nfunction addCombinator( matcher, combinator, base ) {\n\tvar dir = combinator.dir,\n\t\tskip = combinator.next,\n\t\tkey = skip || dir,\n\t\tcheckNonElements = base && key === \"parentNode\",\n\t\tdoneName = done++;\n\n\treturn combinator.first ?\n\n\t\t// Check against closest ancestor/preceding element\n\t\tfunction( elem, context, xml ) {\n\t\t\twhile ( ( elem = elem[ dir ] ) ) {\n\t\t\t\tif ( elem.nodeType === 1 || checkNonElements ) {\n\t\t\t\t\treturn matcher( elem, context, xml );\n\t\t\t\t}\n\t\t\t}\n\t\t\treturn false;\n\t\t} :\n\n\t\t// Check against all ancestor/preceding elements\n\t\tfunction( elem, context, xml ) {\n\t\t\tvar oldCache, outerCache,\n\t\t\t\tnewCache = [ dirruns, doneName ];\n\n\t\t\t// We can't set arbitrary data on XML nodes, so they don't benefit from combinator caching\n\t\t\tif ( xml ) {\n\t\t\t\twhile ( ( elem = elem[ dir ] ) ) {\n\t\t\t\t\tif ( elem.nodeType === 1 || checkNonElements ) {\n\t\t\t\t\t\tif ( matcher( elem, context, xml ) ) {\n\t\t\t\t\t\t\treturn true;\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t} else {\n\t\t\t\twhile ( ( elem = elem[ dir ] ) ) {\n\t\t\t\t\tif ( elem.nodeType === 1 || checkNonElements ) {\n\t\t\t\t\t\touterCache = elem[ expando ] || ( elem[ expando ] = {} );\n\n\t\t\t\t\t\tif ( skip && nodeName( elem, skip ) ) {\n\t\t\t\t\t\t\telem = elem[ dir ] || elem;\n\t\t\t\t\t\t} else if ( ( oldCache = outerCache[ key ] ) &&\n\t\t\t\t\t\t\toldCache[ 0 ] === dirruns && oldCache[ 1 ] === doneName ) {\n\n\t\t\t\t\t\t\t// Assign to newCache so results back-propagate to previous elements\n\t\t\t\t\t\t\treturn ( newCache[ 2 ] = oldCache[ 2 ] );\n\t\t\t\t\t\t} else {\n\n\t\t\t\t\t\t\t// Reuse newcache so results back-propagate to previous elements\n\t\t\t\t\t\t\touterCache[ key ] = newCache;\n\n\t\t\t\t\t\t\t// A match means we're done; a fail means we have to keep checking\n\t\t\t\t\t\t\tif ( ( newCache[ 2 ] = matcher( elem, context, xml ) ) ) {\n\t\t\t\t\t\t\t\treturn true;\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t\treturn false;\n\t\t};\n}\n\nfunction elementMatcher( matchers ) {\n\treturn matchers.length > 1 ?\n\t\tfunction( elem, context, xml ) {\n\t\t\tvar i = matchers.length;\n\t\t\twhile ( i-- ) {\n\t\t\t\tif ( !matchers[ i ]( elem, context, xml ) ) {\n\t\t\t\t\treturn false;\n\t\t\t\t}\n\t\t\t}\n\t\t\treturn true;\n\t\t} :\n\t\tmatchers[ 0 ];\n}\n\nfunction multipleContexts( selector, contexts, results ) {\n\tvar i = 0,\n\t\tlen = contexts.length;\n\tfor ( ; i < len; i++ ) {\n\t\tfind( selector, contexts[ i ], results );\n\t}\n\treturn results;\n}\n\nfunction condense( unmatched, map, filter, context, xml ) {\n\tvar elem,\n\t\tnewUnmatched = [],\n\t\ti = 0,\n\t\tlen = unmatched.length,\n\t\tmapped = map != null;\n\n\tfor ( ; i < len; i++ ) {\n\t\tif ( ( elem = unmatched[ i ] ) ) {\n\t\t\tif ( !filter || filter( elem, context, xml ) ) {\n\t\t\t\tnewUnmatched.push( elem );\n\t\t\t\tif ( mapped ) {\n\t\t\t\t\tmap.push( i );\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t}\n\n\treturn newUnmatched;\n}\n\nfunction setMatcher( preFilter, selector, matcher, postFilter, postFinder, postSelector ) {\n\tif ( postFilter && !postFilter[ expando ] ) {\n\t\tpostFilter = setMatcher( postFilter );\n\t}\n\tif ( postFinder && !postFinder[ expando ] ) {\n\t\tpostFinder = setMatcher( postFinder, postSelector );\n\t}\n\treturn markFunction( function( seed, results, context, xml ) {\n\t\tvar temp, i, elem, matcherOut,\n\t\t\tpreMap = [],\n\t\t\tpostMap = [],\n\t\t\tpreexisting = results.length,\n\n\t\t\t// Get initial elements from seed or context\n\t\t\telems = seed ||\n\t\t\t\tmultipleContexts( selector || \"*\",\n\t\t\t\t\tcontext.nodeType ? [ context ] : context, [] ),\n\n\t\t\t// Prefilter to get matcher input, preserving a map for seed-results synchronization\n\t\t\tmatcherIn = preFilter && ( seed || !selector ) ?\n\t\t\t\tcondense( elems, preMap, preFilter, context, xml ) :\n\t\t\t\telems;\n\n\t\tif ( matcher ) {\n\n\t\t\t// If we have a postFinder, or filtered seed, or non-seed postFilter\n\t\t\t// or preexisting results,\n\t\t\tmatcherOut = postFinder || ( seed ? preFilter : preexisting || postFilter ) ?\n\n\t\t\t\t// ...intermediate processing is necessary\n\t\t\t\t[] :\n\n\t\t\t\t// ...otherwise use results directly\n\t\t\t\tresults;\n\n\t\t\t// Find primary matches\n\t\t\tmatcher( matcherIn, matcherOut, context, xml );\n\t\t} else {\n\t\t\tmatcherOut = matcherIn;\n\t\t}\n\n\t\t// Apply postFilter\n\t\tif ( postFilter ) {\n\t\t\ttemp = condense( matcherOut, postMap );\n\t\t\tpostFilter( temp, [], context, xml );\n\n\t\t\t// Un-match failing elements by moving them back to matcherIn\n\t\t\ti = temp.length;\n\t\t\twhile ( i-- ) {\n\t\t\t\tif ( ( elem = temp[ i ] ) ) {\n\t\t\t\t\tmatcherOut[ postMap[ i ] ] = !( matcherIn[ postMap[ i ] ] = elem );\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\n\t\tif ( seed ) {\n\t\t\tif ( postFinder || preFilter ) {\n\t\t\t\tif ( postFinder ) {\n\n\t\t\t\t\t// Get the final matcherOut by condensing this intermediate into postFinder contexts\n\t\t\t\t\ttemp = [];\n\t\t\t\t\ti = matcherOut.length;\n\t\t\t\t\twhile ( i-- ) {\n\t\t\t\t\t\tif ( ( elem = matcherOut[ i ] ) ) {\n\n\t\t\t\t\t\t\t// Restore matcherIn since elem is not yet a final match\n\t\t\t\t\t\t\ttemp.push( ( matcherIn[ i ] = elem ) );\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t\tpostFinder( null, ( matcherOut = [] ), temp, xml );\n\t\t\t\t}\n\n\t\t\t\t// Move matched elements from seed to results to keep them synchronized\n\t\t\t\ti = matcherOut.length;\n\t\t\t\twhile ( i-- ) {\n\t\t\t\t\tif ( ( elem = matcherOut[ i ] ) &&\n\t\t\t\t\t\t( temp = postFinder ? indexOf.call( seed, elem ) : preMap[ i ] ) > -1 ) {\n\n\t\t\t\t\t\tseed[ temp ] = !( results[ temp ] = elem );\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\n\t\t// Add elements to results, through postFinder if defined\n\t\t} else {\n\t\t\tmatcherOut = condense(\n\t\t\t\tmatcherOut === results ?\n\t\t\t\t\tmatcherOut.splice( preexisting, matcherOut.length ) :\n\t\t\t\t\tmatcherOut\n\t\t\t);\n\t\t\tif ( postFinder ) {\n\t\t\t\tpostFinder( null, results, matcherOut, xml );\n\t\t\t} else {\n\t\t\t\tpush.apply( results, matcherOut );\n\t\t\t}\n\t\t}\n\t} );\n}\n\nfunction matcherFromTokens( tokens ) {\n\tvar checkContext, matcher, j,\n\t\tlen = tokens.length,\n\t\tleadingRelative = Expr.relative[ tokens[ 0 ].type ],\n\t\timplicitRelative = leadingRelative || Expr.relative[ \" \" ],\n\t\ti = leadingRelative ? 1 : 0,\n\n\t\t// The foundational matcher ensures that elements are reachable from top-level context(s)\n\t\tmatchContext = addCombinator( function( elem ) {\n\t\t\treturn elem === checkContext;\n\t\t}, implicitRelative, true ),\n\t\tmatchAnyContext = addCombinator( function( elem ) {\n\t\t\treturn indexOf.call( checkContext, elem ) > -1;\n\t\t}, implicitRelative, true ),\n\t\tmatchers = [ function( elem, context, xml ) {\n\n\t\t\t// Support: IE 11+, Edge 17 - 18+\n\t\t\t// IE/Edge sometimes throw a \"Permission denied\" error when strict-comparing\n\t\t\t// two documents; shallow comparisons work.\n\t\t\t// eslint-disable-next-line eqeqeq\n\t\t\tvar ret = ( !leadingRelative && ( xml || context != outermostContext ) ) || (\n\t\t\t\t( checkContext = context ).nodeType ?\n\t\t\t\t\tmatchContext( elem, context, xml ) :\n\t\t\t\t\tmatchAnyContext( elem, context, xml ) );\n\n\t\t\t// Avoid hanging onto element\n\t\t\t// (see https://github.com/jquery/sizzle/issues/299)\n\t\t\tcheckContext = null;\n\t\t\treturn ret;\n\t\t} ];\n\n\tfor ( ; i < len; i++ ) {\n\t\tif ( ( matcher = Expr.relative[ tokens[ i ].type ] ) ) {\n\t\t\tmatchers = [ addCombinator( elementMatcher( matchers ), matcher ) ];\n\t\t} else {\n\t\t\tmatcher = Expr.filter[ tokens[ i ].type ].apply( null, tokens[ i ].matches );\n\n\t\t\t// Return special upon seeing a positional matcher\n\t\t\tif ( matcher[ expando ] ) {\n\n\t\t\t\t// Find the next relative operator (if any) for proper handling\n\t\t\t\tj = ++i;\n\t\t\t\tfor ( ; j < len; j++ ) {\n\t\t\t\t\tif ( Expr.relative[ tokens[ j ].type ] ) {\n\t\t\t\t\t\tbreak;\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\treturn setMatcher(\n\t\t\t\t\ti > 1 && elementMatcher( matchers ),\n\t\t\t\t\ti > 1 && toSelector(\n\n\t\t\t\t\t\t// If the preceding token was a descendant combinator, insert an implicit any-element `*`\n\t\t\t\t\t\ttokens.slice( 0, i - 1 )\n\t\t\t\t\t\t\t.concat( { value: tokens[ i - 2 ].type === \" \" ? \"*\" : \"\" } )\n\t\t\t\t\t).replace( rtrimCSS, \"$1\" ),\n\t\t\t\t\tmatcher,\n\t\t\t\t\ti < j && matcherFromTokens( tokens.slice( i, j ) ),\n\t\t\t\t\tj < len && matcherFromTokens( ( tokens = tokens.slice( j ) ) ),\n\t\t\t\t\tj < len && toSelector( tokens )\n\t\t\t\t);\n\t\t\t}\n\t\t\tmatchers.push( matcher );\n\t\t}\n\t}\n\n\treturn elementMatcher( matchers );\n}\n\nfunction matcherFromGroupMatchers( elementMatchers, setMatchers ) {\n\tvar bySet = setMatchers.length > 0,\n\t\tbyElement = elementMatchers.length > 0,\n\t\tsuperMatcher = function( seed, context, xml, results, outermost ) {\n\t\t\tvar elem, j, matcher,\n\t\t\t\tmatchedCount = 0,\n\t\t\t\ti = \"0\",\n\t\t\t\tunmatched = seed && [],\n\t\t\t\tsetMatched = [],\n\t\t\t\tcontextBackup = outermostContext,\n\n\t\t\t\t// We must always have either seed elements or outermost context\n\t\t\t\telems = seed || byElement && Expr.find.TAG( \"*\", outermost ),\n\n\t\t\t\t// Use integer dirruns iff this is the outermost matcher\n\t\t\t\tdirrunsUnique = ( dirruns += contextBackup == null ? 1 : Math.random() || 0.1 ),\n\t\t\t\tlen = elems.length;\n\n\t\t\tif ( outermost ) {\n\n\t\t\t\t// Support: IE 11+, Edge 17 - 18+\n\t\t\t\t// IE/Edge sometimes throw a \"Permission denied\" error when strict-comparing\n\t\t\t\t// two documents; shallow comparisons work.\n\t\t\t\t// eslint-disable-next-line eqeqeq\n\t\t\t\toutermostContext = context == document || context || outermost;\n\t\t\t}\n\n\t\t\t// Add elements passing elementMatchers directly to results\n\t\t\t// Support: iOS <=7 - 9 only\n\t\t\t// Tolerate NodeList properties (IE: \"length\"; Safari: <number>) matching\n\t\t\t// elements by id. (see trac-14142)\n\t\t\tfor ( ; i !== len && ( elem = elems[ i ] ) != null; i++ ) {\n\t\t\t\tif ( byElement && elem ) {\n\t\t\t\t\tj = 0;\n\n\t\t\t\t\t// Support: IE 11+, Edge 17 - 18+\n\t\t\t\t\t// IE/Edge sometimes throw a \"Permission denied\" error when strict-comparing\n\t\t\t\t\t// two documents; shallow comparisons work.\n\t\t\t\t\t// eslint-disable-next-line eqeqeq\n\t\t\t\t\tif ( !context && elem.ownerDocument != document ) {\n\t\t\t\t\t\tsetDocument( elem );\n\t\t\t\t\t\txml = !documentIsHTML;\n\t\t\t\t\t}\n\t\t\t\t\twhile ( ( matcher = elementMatchers[ j++ ] ) ) {\n\t\t\t\t\t\tif ( matcher( elem, context || document, xml ) ) {\n\t\t\t\t\t\t\tpush.call( results, elem );\n\t\t\t\t\t\t\tbreak;\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t\tif ( outermost ) {\n\t\t\t\t\t\tdirruns = dirrunsUnique;\n\t\t\t\t\t}\n\t\t\t\t}\n\n\t\t\t\t// Track unmatched elements for set filters\n\t\t\t\tif ( bySet ) {\n\n\t\t\t\t\t// They will have gone through all possible matchers\n\t\t\t\t\tif ( ( elem = !matcher && elem ) ) {\n\t\t\t\t\t\tmatchedCount--;\n\t\t\t\t\t}\n\n\t\t\t\t\t// Lengthen the array for every element, matched or not\n\t\t\t\t\tif ( seed ) {\n\t\t\t\t\t\tunmatched.push( elem );\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\n\t\t\t// `i` is now the count of elements visited above, and adding it to `matchedCount`\n\t\t\t// makes the latter nonnegative.\n\t\t\tmatchedCount += i;\n\n\t\t\t// Apply set filters to unmatched elements\n\t\t\t// NOTE: This can be skipped if there are no unmatched elements (i.e., `matchedCount`\n\t\t\t// equals `i`), unless we didn't visit _any_ elements in the above loop because we have\n\t\t\t// no element matchers and no seed.\n\t\t\t// Incrementing an initially-string \"0\" `i` allows `i` to remain a string only in that\n\t\t\t// case, which will result in a \"00\" `matchedCount` that differs from `i` but is also\n\t\t\t// numerically zero.\n\t\t\tif ( bySet && i !== matchedCount ) {\n\t\t\t\tj = 0;\n\t\t\t\twhile ( ( matcher = setMatchers[ j++ ] ) ) {\n\t\t\t\t\tmatcher( unmatched, setMatched, context, xml );\n\t\t\t\t}\n\n\t\t\t\tif ( seed ) {\n\n\t\t\t\t\t// Reintegrate element matches to eliminate the need for sorting\n\t\t\t\t\tif ( matchedCount > 0 ) {\n\t\t\t\t\t\twhile ( i-- ) {\n\t\t\t\t\t\t\tif ( !( unmatched[ i ] || setMatched[ i ] ) ) {\n\t\t\t\t\t\t\t\tsetMatched[ i ] = pop.call( results );\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\n\t\t\t\t\t// Discard index placeholder values to get only actual matches\n\t\t\t\t\tsetMatched = condense( setMatched );\n\t\t\t\t}\n\n\t\t\t\t// Add matches to results\n\t\t\t\tpush.apply( results, setMatched );\n\n\t\t\t\t// Seedless set matches succeeding multiple successful matchers stipulate sorting\n\t\t\t\tif ( outermost && !seed && setMatched.length > 0 &&\n\t\t\t\t\t( matchedCount + setMatchers.length ) > 1 ) {\n\n\t\t\t\t\tjQuery.uniqueSort( results );\n\t\t\t\t}\n\t\t\t}\n\n\t\t\t// Override manipulation of globals by nested matchers\n\t\t\tif ( outermost ) {\n\t\t\t\tdirruns = dirrunsUnique;\n\t\t\t\toutermostContext = contextBackup;\n\t\t\t}\n\n\t\t\treturn unmatched;\n\t\t};\n\n\treturn bySet ?\n\t\tmarkFunction( superMatcher ) :\n\t\tsuperMatcher;\n}\n\nfunction compile( selector, match /* Internal Use Only */ ) {\n\tvar i,\n\t\tsetMatchers = [],\n\t\telementMatchers = [],\n\t\tcached = compilerCache[ selector + \" \" ];\n\n\tif ( !cached ) {\n\n\t\t// Generate a function of recursive functions that can be used to check each element\n\t\tif ( !match ) {\n\t\t\tmatch = tokenize( selector );\n\t\t}\n\t\ti = match.length;\n\t\twhile ( i-- ) {\n\t\t\tcached = matcherFromTokens( match[ i ] );\n\t\t\tif ( cached[ expando ] ) {\n\t\t\t\tsetMatchers.push( cached );\n\t\t\t} else {\n\t\t\t\telementMatchers.push( cached );\n\t\t\t}\n\t\t}\n\n\t\t// Cache the compiled function\n\t\tcached = compilerCache( selector,\n\t\t\tmatcherFromGroupMatchers( elementMatchers, setMatchers ) );\n\n\t\t// Save selector and tokenization\n\t\tcached.selector = selector;\n\t}\n\treturn cached;\n}\n\n/**\n * A low-level selection function that works with jQuery's compiled\n *  selector functions\n * @param {String|Function} selector A selector or a pre-compiled\n *  selector function built with jQuery selector compile\n * @param {Element} context\n * @param {Array} [results]\n * @param {Array} [seed] A set of elements to match against\n */\nfunction select( selector, context, results, seed ) {\n\tvar i, tokens, token, type, find,\n\t\tcompiled = typeof selector === \"function\" && selector,\n\t\tmatch = !seed && tokenize( ( selector = compiled.selector || selector ) );\n\n\tresults = results || [];\n\n\t// Try to minimize operations if there is only one selector in the list and no seed\n\t// (the latter of which guarantees us context)\n\tif ( match.length === 1 ) {\n\n\t\t// Reduce context if the leading compound selector is an ID\n\t\ttokens = match[ 0 ] = match[ 0 ].slice( 0 );\n\t\tif ( tokens.length > 2 && ( token = tokens[ 0 ] ).type === \"ID\" &&\n\t\t\t\tcontext.nodeType === 9 && documentIsHTML && Expr.relative[ tokens[ 1 ].type ] ) {\n\n\t\t\tcontext = ( Expr.find.ID(\n\t\t\t\ttoken.matches[ 0 ].replace( runescape, funescape ),\n\t\t\t\tcontext\n\t\t\t) || [] )[ 0 ];\n\t\t\tif ( !context ) {\n\t\t\t\treturn results;\n\n\t\t\t// Precompiled matchers will still verify ancestry, so step up a level\n\t\t\t} else if ( compiled ) {\n\t\t\t\tcontext = context.parentNode;\n\t\t\t}\n\n\t\t\tselector = selector.slice( tokens.shift().value.length );\n\t\t}\n\n\t\t// Fetch a seed set for right-to-left matching\n\t\ti = matchExpr.needsContext.test( selector ) ? 0 : tokens.length;\n\t\twhile ( i-- ) {\n\t\t\ttoken = tokens[ i ];\n\n\t\t\t// Abort if we hit a combinator\n\t\t\tif ( Expr.relative[ ( type = token.type ) ] ) {\n\t\t\t\tbreak;\n\t\t\t}\n\t\t\tif ( ( find = Expr.find[ type ] ) ) {\n\n\t\t\t\t// Search, expanding context for leading sibling combinators\n\t\t\t\tif ( ( seed = find(\n\t\t\t\t\ttoken.matches[ 0 ].replace( runescape, funescape ),\n\t\t\t\t\trsibling.test( tokens[ 0 ].type ) &&\n\t\t\t\t\t\ttestContext( context.parentNode ) || context\n\t\t\t\t) ) ) {\n\n\t\t\t\t\t// If seed is empty or no tokens remain, we can return early\n\t\t\t\t\ttokens.splice( i, 1 );\n\t\t\t\t\tselector = seed.length && toSelector( tokens );\n\t\t\t\t\tif ( !selector ) {\n\t\t\t\t\t\tpush.apply( results, seed );\n\t\t\t\t\t\treturn results;\n\t\t\t\t\t}\n\n\t\t\t\t\tbreak;\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t}\n\n\t// Compile and execute a filtering function if one is not provided\n\t// Provide `match` to avoid retokenization if we modified the selector above\n\t( compiled || compile( selector, match ) )(\n\t\tseed,\n\t\tcontext,\n\t\t!documentIsHTML,\n\t\tresults,\n\t\t!context || rsibling.test( selector ) && testContext( context.parentNode ) || context\n\t);\n\treturn results;\n}\n\n// One-time assignments\n\n// Support: Android <=4.0 - 4.1+\n// Sort stability\nsupport.sortStable = expando.split( \"\" ).sort( sortOrder ).join( \"\" ) === expando;\n\n// Initialize against the default document\nsetDocument();\n\n// Support: Android <=4.0 - 4.1+\n// Detached nodes confoundingly follow *each other*\nsupport.sortDetached = assert( function( el ) {\n\n\t// Should return 1, but returns 4 (following)\n\treturn el.compareDocumentPosition( document.createElement( \"fieldset\" ) ) & 1;\n} );\n\njQuery.find = find;\n\n// Deprecated\njQuery.expr[ \":\" ] = jQuery.expr.pseudos;\njQuery.unique = jQuery.uniqueSort;\n\n// These have always been private, but they used to be documented as part of\n// Sizzle so let's maintain them for now for backwards compatibility purposes.\nfind.compile = compile;\nfind.select = select;\nfind.setDocument = setDocument;\nfind.tokenize = tokenize;\n\nfind.escape = jQuery.escapeSelector;\nfind.getText = jQuery.text;\nfind.isXML = jQuery.isXMLDoc;\nfind.selectors = jQuery.expr;\nfind.support = jQuery.support;\nfind.uniqueSort = jQuery.uniqueSort;\n\n\t/* eslint-enable */\n\n} )();\n\n\nvar dir = function( elem, dir, until ) {\n\tvar matched = [],\n\t\ttruncate = until !== undefined;\n\n\twhile ( ( elem = elem[ dir ] ) && elem.nodeType !== 9 ) {\n\t\tif ( elem.nodeType === 1 ) {\n\t\t\tif ( truncate && jQuery( elem ).is( until ) ) {\n\t\t\t\tbreak;\n\t\t\t}\n\t\t\tmatched.push( elem );\n\t\t}\n\t}\n\treturn matched;\n};\n\n\nvar siblings = function( n, elem ) {\n\tvar matched = [];\n\n\tfor ( ; n; n = n.nextSibling ) {\n\t\tif ( n.nodeType === 1 && n !== elem ) {\n\t\t\tmatched.push( n );\n\t\t}\n\t}\n\n\treturn matched;\n};\n\n\nvar rneedsContext = jQuery.expr.match.needsContext;\n\nvar rsingleTag = ( /^<([a-z][^\\/\\0>:\\x20\\t\\r\\n\\f]*)[\\x20\\t\\r\\n\\f]*\\/?>(?:<\\/\\1>|)$/i );\n\n\n\n// Implement the identical functionality for filter and not\nfunction winnow( elements, qualifier, not ) {\n\tif ( isFunction( qualifier ) ) {\n\t\treturn jQuery.grep( elements, function( elem, i ) {\n\t\t\treturn !!qualifier.call( elem, i, elem ) !== not;\n\t\t} );\n\t}\n\n\t// Single element\n\tif ( qualifier.nodeType ) {\n\t\treturn jQuery.grep( elements, function( elem ) {\n\t\t\treturn ( elem === qualifier ) !== not;\n\t\t} );\n\t}\n\n\t// Arraylike of elements (jQuery, arguments, Array)\n\tif ( typeof qualifier !== \"string\" ) {\n\t\treturn jQuery.grep( elements, function( elem ) {\n\t\t\treturn ( indexOf.call( qualifier, elem ) > -1 ) !== not;\n\t\t} );\n\t}\n\n\t// Filtered directly for both simple and complex selectors\n\treturn jQuery.filter( qualifier, elements, not );\n}\n\njQuery.filter = function( expr, elems, not ) {\n\tvar elem = elems[ 0 ];\n\n\tif ( not ) {\n\t\texpr = \":not(\" + expr + \")\";\n\t}\n\n\tif ( elems.length === 1 && elem.nodeType === 1 ) {\n\t\treturn jQuery.find.matchesSelector( elem, expr ) ? [ elem ] : [];\n\t}\n\n\treturn jQuery.find.matches( expr, jQuery.grep( elems, function( elem ) {\n\t\treturn elem.nodeType === 1;\n\t} ) );\n};\n\njQuery.fn.extend( {\n\tfind: function( selector ) {\n\t\tvar i, ret,\n\t\t\tlen = this.length,\n\t\t\tself = this;\n\n\t\tif ( typeof selector !== \"string\" ) {\n\t\t\treturn this.pushStack( jQuery( selector ).filter( function() {\n\t\t\t\tfor ( i = 0; i < len; i++ ) {\n\t\t\t\t\tif ( jQuery.contains( self[ i ], this ) ) {\n\t\t\t\t\t\treturn true;\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t} ) );\n\t\t}\n\n\t\tret = this.pushStack( [] );\n\n\t\tfor ( i = 0; i < len; i++ ) {\n\t\t\tjQuery.find( selector, self[ i ], ret );\n\t\t}\n\n\t\treturn len > 1 ? jQuery.uniqueSort( ret ) : ret;\n\t},\n\tfilter: function( selector ) {\n\t\treturn this.pushStack( winnow( this, selector || [], false ) );\n\t},\n\tnot: function( selector ) {\n\t\treturn this.pushStack( winnow( this, selector || [], true ) );\n\t},\n\tis: function( selector ) {\n\t\treturn !!winnow(\n\t\t\tthis,\n\n\t\t\t// If this is a positional/relative selector, check membership in the returned set\n\t\t\t// so $(\"p:first\").is(\"p:last\") won't return true for a doc with two \"p\".\n\t\t\ttypeof selector === \"string\" && rneedsContext.test( selector ) ?\n\t\t\t\tjQuery( selector ) :\n\t\t\t\tselector || [],\n\t\t\tfalse\n\t\t).length;\n\t}\n} );\n\n\n// Initialize a jQuery object\n\n\n// A central reference to the root jQuery(document)\nvar rootjQuery,\n\n\t// A simple way to check for HTML strings\n\t// Prioritize #id over <tag> to avoid XSS via location.hash (trac-9521)\n\t// Strict HTML recognition (trac-11290: must start with <)\n\t// Shortcut simple #id case for speed\n\trquickExpr = /^(?:\\s*(<[\\w\\W]+>)[^>]*|#([\\w-]+))$/,\n\n\tinit = jQuery.fn.init = function( selector, context, root ) {\n\t\tvar match, elem;\n\n\t\t// HANDLE: $(\"\"), $(null), $(undefined), $(false)\n\t\tif ( !selector ) {\n\t\t\treturn this;\n\t\t}\n\n\t\t// Method init() accepts an alternate rootjQuery\n\t\t// so migrate can support jQuery.sub (gh-2101)\n\t\troot = root || rootjQuery;\n\n\t\t// Handle HTML strings\n\t\tif ( typeof selector === \"string\" ) {\n\t\t\tif ( selector[ 0 ] === \"<\" &&\n\t\t\t\tselector[ selector.length - 1 ] === \">\" &&\n\t\t\t\tselector.length >= 3 ) {\n\n\t\t\t\t// Assume that strings that start and end with <> are HTML and skip the regex check\n\t\t\t\tmatch = [ null, selector, null ];\n\n\t\t\t} else {\n\t\t\t\tmatch = rquickExpr.exec( selector );\n\t\t\t}\n\n\t\t\t// Match html or make sure no context is specified for #id\n\t\t\tif ( match && ( match[ 1 ] || !context ) ) {\n\n\t\t\t\t// HANDLE: $(html) -> $(array)\n\t\t\t\tif ( match[ 1 ] ) {\n\t\t\t\t\tcontext = context instanceof jQuery ? context[ 0 ] : context;\n\n\t\t\t\t\t// Option to run scripts is true for back-compat\n\t\t\t\t\t// Intentionally let the error be thrown if parseHTML is not present\n\t\t\t\t\tjQuery.merge( this, jQuery.parseHTML(\n\t\t\t\t\t\tmatch[ 1 ],\n\t\t\t\t\t\tcontext && context.nodeType ? context.ownerDocument || context : document,\n\t\t\t\t\t\ttrue\n\t\t\t\t\t) );\n\n\t\t\t\t\t// HANDLE: $(html, props)\n\t\t\t\t\tif ( rsingleTag.test( match[ 1 ] ) && jQuery.isPlainObject( context ) ) {\n\t\t\t\t\t\tfor ( match in context ) {\n\n\t\t\t\t\t\t\t// Properties of context are called as methods if possible\n\t\t\t\t\t\t\tif ( isFunction( this[ match ] ) ) {\n\t\t\t\t\t\t\t\tthis[ match ]( context[ match ] );\n\n\t\t\t\t\t\t\t// ...and otherwise set as attributes\n\t\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\t\tthis.attr( match, context[ match ] );\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\n\t\t\t\t\treturn this;\n\n\t\t\t\t// HANDLE: $(#id)\n\t\t\t\t} else {\n\t\t\t\t\telem = document.getElementById( match[ 2 ] );\n\n\t\t\t\t\tif ( elem ) {\n\n\t\t\t\t\t\t// Inject the element directly into the jQuery object\n\t\t\t\t\t\tthis[ 0 ] = elem;\n\t\t\t\t\t\tthis.length = 1;\n\t\t\t\t\t}\n\t\t\t\t\treturn this;\n\t\t\t\t}\n\n\t\t\t// HANDLE: $(expr, $(...))\n\t\t\t} else if ( !context || context.jquery ) {\n\t\t\t\treturn ( context || root ).find( selector );\n\n\t\t\t// HANDLE: $(expr, context)\n\t\t\t// (which is just equivalent to: $(context).find(expr)\n\t\t\t} else {\n\t\t\t\treturn this.constructor( context ).find( selector );\n\t\t\t}\n\n\t\t// HANDLE: $(DOMElement)\n\t\t} else if ( selector.nodeType ) {\n\t\t\tthis[ 0 ] = selector;\n\t\t\tthis.length = 1;\n\t\t\treturn this;\n\n\t\t// HANDLE: $(function)\n\t\t// Shortcut for document ready\n\t\t} else if ( isFunction( selector ) ) {\n\t\t\treturn root.ready !== undefined ?\n\t\t\t\troot.ready( selector ) :\n\n\t\t\t\t// Execute immediately if ready is not present\n\t\t\t\tselector( jQuery );\n\t\t}\n\n\t\treturn jQuery.makeArray( selector, this );\n\t};\n\n// Give the init function the jQuery prototype for later instantiation\ninit.prototype = jQuery.fn;\n\n// Initialize central reference\nrootjQuery = jQuery( document );\n\n\nvar rparentsprev = /^(?:parents|prev(?:Until|All))/,\n\n\t// Methods guaranteed to produce a unique set when starting from a unique set\n\tguaranteedUnique = {\n\t\tchildren: true,\n\t\tcontents: true,\n\t\tnext: true,\n\t\tprev: true\n\t};\n\njQuery.fn.extend( {\n\thas: function( target ) {\n\t\tvar targets = jQuery( target, this ),\n\t\t\tl = targets.length;\n\n\t\treturn this.filter( function() {\n\t\t\tvar i = 0;\n\t\t\tfor ( ; i < l; i++ ) {\n\t\t\t\tif ( jQuery.contains( this, targets[ i ] ) ) {\n\t\t\t\t\treturn true;\n\t\t\t\t}\n\t\t\t}\n\t\t} );\n\t},\n\n\tclosest: function( selectors, context ) {\n\t\tvar cur,\n\t\t\ti = 0,\n\t\t\tl = this.length,\n\t\t\tmatched = [],\n\t\t\ttargets = typeof selectors !== \"string\" && jQuery( selectors );\n\n\t\t// Positional selectors never match, since there's no _selection_ context\n\t\tif ( !rneedsContext.test( selectors ) ) {\n\t\t\tfor ( ; i < l; i++ ) {\n\t\t\t\tfor ( cur = this[ i ]; cur && cur !== context; cur = cur.parentNode ) {\n\n\t\t\t\t\t// Always skip document fragments\n\t\t\t\t\tif ( cur.nodeType < 11 && ( targets ?\n\t\t\t\t\t\ttargets.index( cur ) > -1 :\n\n\t\t\t\t\t\t// Don't pass non-elements to jQuery#find\n\t\t\t\t\t\tcur.nodeType === 1 &&\n\t\t\t\t\t\t\tjQuery.find.matchesSelector( cur, selectors ) ) ) {\n\n\t\t\t\t\t\tmatched.push( cur );\n\t\t\t\t\t\tbreak;\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\n\t\treturn this.pushStack( matched.length > 1 ? jQuery.uniqueSort( matched ) : matched );\n\t},\n\n\t// Determine the position of an element within the set\n\tindex: function( elem ) {\n\n\t\t// No argument, return index in parent\n\t\tif ( !elem ) {\n\t\t\treturn ( this[ 0 ] && this[ 0 ].parentNode ) ? this.first().prevAll().length : -1;\n\t\t}\n\n\t\t// Index in selector\n\t\tif ( typeof elem === \"string\" ) {\n\t\t\treturn indexOf.call( jQuery( elem ), this[ 0 ] );\n\t\t}\n\n\t\t// Locate the position of the desired element\n\t\treturn indexOf.call( this,\n\n\t\t\t// If it receives a jQuery object, the first element is used\n\t\t\telem.jquery ? elem[ 0 ] : elem\n\t\t);\n\t},\n\n\tadd: function( selector, context ) {\n\t\treturn this.pushStack(\n\t\t\tjQuery.uniqueSort(\n\t\t\t\tjQuery.merge( this.get(), jQuery( selector, context ) )\n\t\t\t)\n\t\t);\n\t},\n\n\taddBack: function( selector ) {\n\t\treturn this.add( selector == null ?\n\t\t\tthis.prevObject : this.prevObject.filter( selector )\n\t\t);\n\t}\n} );\n\nfunction sibling( cur, dir ) {\n\twhile ( ( cur = cur[ dir ] ) && cur.nodeType !== 1 ) {}\n\treturn cur;\n}\n\njQuery.each( {\n\tparent: function( elem ) {\n\t\tvar parent = elem.parentNode;\n\t\treturn parent && parent.nodeType !== 11 ? parent : null;\n\t},\n\tparents: function( elem ) {\n\t\treturn dir( elem, \"parentNode\" );\n\t},\n\tparentsUntil: function( elem, _i, until ) {\n\t\treturn dir( elem, \"parentNode\", until );\n\t},\n\tnext: function( elem ) {\n\t\treturn sibling( elem, \"nextSibling\" );\n\t},\n\tprev: function( elem ) {\n\t\treturn sibling( elem, \"previousSibling\" );\n\t},\n\tnextAll: function( elem ) {\n\t\treturn dir( elem, \"nextSibling\" );\n\t},\n\tprevAll: function( elem ) {\n\t\treturn dir( elem, \"previousSibling\" );\n\t},\n\tnextUntil: function( elem, _i, until ) {\n\t\treturn dir( elem, \"nextSibling\", until );\n\t},\n\tprevUntil: function( elem, _i, until ) {\n\t\treturn dir( elem, \"previousSibling\", until );\n\t},\n\tsiblings: function( elem ) {\n\t\treturn siblings( ( elem.parentNode || {} ).firstChild, elem );\n\t},\n\tchildren: function( elem ) {\n\t\treturn siblings( elem.firstChild );\n\t},\n\tcontents: function( elem ) {\n\t\tif ( elem.contentDocument != null &&\n\n\t\t\t// Support: IE 11+\n\t\t\t// <object> elements with no `data` attribute has an object\n\t\t\t// `contentDocument` with a `null` prototype.\n\t\t\tgetProto( elem.contentDocument ) ) {\n\n\t\t\treturn elem.contentDocument;\n\t\t}\n\n\t\t// Support: IE 9 - 11 only, iOS 7 only, Android Browser <=4.3 only\n\t\t// Treat the template element as a regular one in browsers that\n\t\t// don't support it.\n\t\tif ( nodeName( elem, \"template\" ) ) {\n\t\t\telem = elem.content || elem;\n\t\t}\n\n\t\treturn jQuery.merge( [], elem.childNodes );\n\t}\n}, function( name, fn ) {\n\tjQuery.fn[ name ] = function( until, selector ) {\n\t\tvar matched = jQuery.map( this, fn, until );\n\n\t\tif ( name.slice( -5 ) !== \"Until\" ) {\n\t\t\tselector = until;\n\t\t}\n\n\t\tif ( selector && typeof selector === \"string\" ) {\n\t\t\tmatched = jQuery.filter( selector, matched );\n\t\t}\n\n\t\tif ( this.length > 1 ) {\n\n\t\t\t// Remove duplicates\n\t\t\tif ( !guaranteedUnique[ name ] ) {\n\t\t\t\tjQuery.uniqueSort( matched );\n\t\t\t}\n\n\t\t\t// Reverse order for parents* and prev-derivatives\n\t\t\tif ( rparentsprev.test( name ) ) {\n\t\t\t\tmatched.reverse();\n\t\t\t}\n\t\t}\n\n\t\treturn this.pushStack( matched );\n\t};\n} );\nvar rnothtmlwhite = ( /[^\\x20\\t\\r\\n\\f]+/g );\n\n\n\n// Convert String-formatted options into Object-formatted ones\nfunction createOptions( options ) {\n\tvar object = {};\n\tjQuery.each( options.match( rnothtmlwhite ) || [], function( _, flag ) {\n\t\tobject[ flag ] = true;\n\t} );\n\treturn object;\n}\n\n/*\n * Create a callback list using the following parameters:\n *\n *\toptions: an optional list of space-separated options that will change how\n *\t\t\tthe callback list behaves or a more traditional option object\n *\n * By default a callback list will act like an event callback list and can be\n * \"fired\" multiple times.\n *\n * Possible options:\n *\n *\tonce:\t\t\twill ensure the callback list can only be fired once (like a Deferred)\n *\n *\tmemory:\t\t\twill keep track of previous values and will call any callback added\n *\t\t\t\t\tafter the list has been fired right away with the latest \"memorized\"\n *\t\t\t\t\tvalues (like a Deferred)\n *\n *\tunique:\t\t\twill ensure a callback can only be added once (no duplicate in the list)\n *\n *\tstopOnFalse:\tinterrupt callings when a callback returns false\n *\n */\njQuery.Callbacks = function( options ) {\n\n\t// Convert options from String-formatted to Object-formatted if needed\n\t// (we check in cache first)\n\toptions = typeof options === \"string\" ?\n\t\tcreateOptions( options ) :\n\t\tjQuery.extend( {}, options );\n\n\tvar // Flag to know if list is currently firing\n\t\tfiring,\n\n\t\t// Last fire value for non-forgettable lists\n\t\tmemory,\n\n\t\t// Flag to know if list was already fired\n\t\tfired,\n\n\t\t// Flag to prevent firing\n\t\tlocked,\n\n\t\t// Actual callback list\n\t\tlist = [],\n\n\t\t// Queue of execution data for repeatable lists\n\t\tqueue = [],\n\n\t\t// Index of currently firing callback (modified by add/remove as needed)\n\t\tfiringIndex = -1,\n\n\t\t// Fire callbacks\n\t\tfire = function() {\n\n\t\t\t// Enforce single-firing\n\t\t\tlocked = locked || options.once;\n\n\t\t\t// Execute callbacks for all pending executions,\n\t\t\t// respecting firingIndex overrides and runtime changes\n\t\t\tfired = firing = true;\n\t\t\tfor ( ; queue.length; firingIndex = -1 ) {\n\t\t\t\tmemory = queue.shift();\n\t\t\t\twhile ( ++firingIndex < list.length ) {\n\n\t\t\t\t\t// Run callback and check for early termination\n\t\t\t\t\tif ( list[ firingIndex ].apply( memory[ 0 ], memory[ 1 ] ) === false &&\n\t\t\t\t\t\toptions.stopOnFalse ) {\n\n\t\t\t\t\t\t// Jump to end and forget the data so .add doesn't re-fire\n\t\t\t\t\t\tfiringIndex = list.length;\n\t\t\t\t\t\tmemory = false;\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\n\t\t\t// Forget the data if we're done with it\n\t\t\tif ( !options.memory ) {\n\t\t\t\tmemory = false;\n\t\t\t}\n\n\t\t\tfiring = false;\n\n\t\t\t// Clean up if we're done firing for good\n\t\t\tif ( locked ) {\n\n\t\t\t\t// Keep an empty list if we have data for future add calls\n\t\t\t\tif ( memory ) {\n\t\t\t\t\tlist = [];\n\n\t\t\t\t// Otherwise, this object is spent\n\t\t\t\t} else {\n\t\t\t\t\tlist = \"\";\n\t\t\t\t}\n\t\t\t}\n\t\t},\n\n\t\t// Actual Callbacks object\n\t\tself = {\n\n\t\t\t// Add a callback or a collection of callbacks to the list\n\t\t\tadd: function() {\n\t\t\t\tif ( list ) {\n\n\t\t\t\t\t// If we have memory from a past run, we should fire after adding\n\t\t\t\t\tif ( memory && !firing ) {\n\t\t\t\t\t\tfiringIndex = list.length - 1;\n\t\t\t\t\t\tqueue.push( memory );\n\t\t\t\t\t}\n\n\t\t\t\t\t( function add( args ) {\n\t\t\t\t\t\tjQuery.each( args, function( _, arg ) {\n\t\t\t\t\t\t\tif ( isFunction( arg ) ) {\n\t\t\t\t\t\t\t\tif ( !options.unique || !self.has( arg ) ) {\n\t\t\t\t\t\t\t\t\tlist.push( arg );\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t} else if ( arg && arg.length && toType( arg ) !== \"string\" ) {\n\n\t\t\t\t\t\t\t\t// Inspect recursively\n\t\t\t\t\t\t\t\tadd( arg );\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t} );\n\t\t\t\t\t} )( arguments );\n\n\t\t\t\t\tif ( memory && !firing ) {\n\t\t\t\t\t\tfire();\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\treturn this;\n\t\t\t},\n\n\t\t\t// Remove a callback from the list\n\t\t\tremove: function() {\n\t\t\t\tjQuery.each( arguments, function( _, arg ) {\n\t\t\t\t\tvar index;\n\t\t\t\t\twhile ( ( index = jQuery.inArray( arg, list, index ) ) > -1 ) {\n\t\t\t\t\t\tlist.splice( index, 1 );\n\n\t\t\t\t\t\t// Handle firing indexes\n\t\t\t\t\t\tif ( index <= firingIndex ) {\n\t\t\t\t\t\t\tfiringIndex--;\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t} );\n\t\t\t\treturn this;\n\t\t\t},\n\n\t\t\t// Check if a given callback is in the list.\n\t\t\t// If no argument is given, return whether or not list has callbacks attached.\n\t\t\thas: function( fn ) {\n\t\t\t\treturn fn ?\n\t\t\t\t\tjQuery.inArray( fn, list ) > -1 :\n\t\t\t\t\tlist.length > 0;\n\t\t\t},\n\n\t\t\t// Remove all callbacks from the list\n\t\t\tempty: function() {\n\t\t\t\tif ( list ) {\n\t\t\t\t\tlist = [];\n\t\t\t\t}\n\t\t\t\treturn this;\n\t\t\t},\n\n\t\t\t// Disable .fire and .add\n\t\t\t// Abort any current/pending executions\n\t\t\t// Clear all callbacks and values\n\t\t\tdisable: function() {\n\t\t\t\tlocked = queue = [];\n\t\t\t\tlist = memory = \"\";\n\t\t\t\treturn this;\n\t\t\t},\n\t\t\tdisabled: function() {\n\t\t\t\treturn !list;\n\t\t\t},\n\n\t\t\t// Disable .fire\n\t\t\t// Also disable .add unless we have memory (since it would have no effect)\n\t\t\t// Abort any pending executions\n\t\t\tlock: function() {\n\t\t\t\tlocked = queue = [];\n\t\t\t\tif ( !memory && !firing ) {\n\t\t\t\t\tlist = memory = \"\";\n\t\t\t\t}\n\t\t\t\treturn this;\n\t\t\t},\n\t\t\tlocked: function() {\n\t\t\t\treturn !!locked;\n\t\t\t},\n\n\t\t\t// Call all callbacks with the given context and arguments\n\t\t\tfireWith: function( context, args ) {\n\t\t\t\tif ( !locked ) {\n\t\t\t\t\targs = args || [];\n\t\t\t\t\targs = [ context, args.slice ? args.slice() : args ];\n\t\t\t\t\tqueue.push( args );\n\t\t\t\t\tif ( !firing ) {\n\t\t\t\t\t\tfire();\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\treturn this;\n\t\t\t},\n\n\t\t\t// Call all the callbacks with the given arguments\n\t\t\tfire: function() {\n\t\t\t\tself.fireWith( this, arguments );\n\t\t\t\treturn this;\n\t\t\t},\n\n\t\t\t// To know if the callbacks have already been called at least once\n\t\t\tfired: function() {\n\t\t\t\treturn !!fired;\n\t\t\t}\n\t\t};\n\n\treturn self;\n};\n\n\nfunction Identity( v ) {\n\treturn v;\n}\nfunction Thrower( ex ) {\n\tthrow ex;\n}\n\nfunction adoptValue( value, resolve, reject, noValue ) {\n\tvar method;\n\n\ttry {\n\n\t\t// Check for promise aspect first to privilege synchronous behavior\n\t\tif ( value && isFunction( ( method = value.promise ) ) ) {\n\t\t\tmethod.call( value ).done( resolve ).fail( reject );\n\n\t\t// Other thenables\n\t\t} else if ( value && isFunction( ( method = value.then ) ) ) {\n\t\t\tmethod.call( value, resolve, reject );\n\n\t\t// Other non-thenables\n\t\t} else {\n\n\t\t\t// Control `resolve` arguments by letting Array#slice cast boolean `noValue` to integer:\n\t\t\t// * false: [ value ].slice( 0 ) => resolve( value )\n\t\t\t// * true: [ value ].slice( 1 ) => resolve()\n\t\t\tresolve.apply( undefined, [ value ].slice( noValue ) );\n\t\t}\n\n\t// For Promises/A+, convert exceptions into rejections\n\t// Since jQuery.when doesn't unwrap thenables, we can skip the extra checks appearing in\n\t// Deferred#then to conditionally suppress rejection.\n\t} catch ( value ) {\n\n\t\t// Support: Android 4.0 only\n\t\t// Strict mode functions invoked without .call/.apply get global-object context\n\t\treject.apply( undefined, [ value ] );\n\t}\n}\n\njQuery.extend( {\n\n\tDeferred: function( func ) {\n\t\tvar tuples = [\n\n\t\t\t\t// action, add listener, callbacks,\n\t\t\t\t// ... .then handlers, argument index, [final state]\n\t\t\t\t[ \"notify\", \"progress\", jQuery.Callbacks( \"memory\" ),\n\t\t\t\t\tjQuery.Callbacks( \"memory\" ), 2 ],\n\t\t\t\t[ \"resolve\", \"done\", jQuery.Callbacks( \"once memory\" ),\n\t\t\t\t\tjQuery.Callbacks( \"once memory\" ), 0, \"resolved\" ],\n\t\t\t\t[ \"reject\", \"fail\", jQuery.Callbacks( \"once memory\" ),\n\t\t\t\t\tjQuery.Callbacks( \"once memory\" ), 1, \"rejected\" ]\n\t\t\t],\n\t\t\tstate = \"pending\",\n\t\t\tpromise = {\n\t\t\t\tstate: function() {\n\t\t\t\t\treturn state;\n\t\t\t\t},\n\t\t\t\talways: function() {\n\t\t\t\t\tdeferred.done( arguments ).fail( arguments );\n\t\t\t\t\treturn this;\n\t\t\t\t},\n\t\t\t\t\"catch\": function( fn ) {\n\t\t\t\t\treturn promise.then( null, fn );\n\t\t\t\t},\n\n\t\t\t\t// Keep pipe for back-compat\n\t\t\t\tpipe: function( /* fnDone, fnFail, fnProgress */ ) {\n\t\t\t\t\tvar fns = arguments;\n\n\t\t\t\t\treturn jQuery.Deferred( function( newDefer ) {\n\t\t\t\t\t\tjQuery.each( tuples, function( _i, tuple ) {\n\n\t\t\t\t\t\t\t// Map tuples (progress, done, fail) to arguments (done, fail, progress)\n\t\t\t\t\t\t\tvar fn = isFunction( fns[ tuple[ 4 ] ] ) && fns[ tuple[ 4 ] ];\n\n\t\t\t\t\t\t\t// deferred.progress(function() { bind to newDefer or newDefer.notify })\n\t\t\t\t\t\t\t// deferred.done(function() { bind to newDefer or newDefer.resolve })\n\t\t\t\t\t\t\t// deferred.fail(function() { bind to newDefer or newDefer.reject })\n\t\t\t\t\t\t\tdeferred[ tuple[ 1 ] ]( function() {\n\t\t\t\t\t\t\t\tvar returned = fn && fn.apply( this, arguments );\n\t\t\t\t\t\t\t\tif ( returned && isFunction( returned.promise ) ) {\n\t\t\t\t\t\t\t\t\treturned.promise()\n\t\t\t\t\t\t\t\t\t\t.progress( newDefer.notify )\n\t\t\t\t\t\t\t\t\t\t.done( newDefer.resolve )\n\t\t\t\t\t\t\t\t\t\t.fail( newDefer.reject );\n\t\t\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\t\t\tnewDefer[ tuple[ 0 ] + \"With\" ](\n\t\t\t\t\t\t\t\t\t\tthis,\n\t\t\t\t\t\t\t\t\t\tfn ? [ returned ] : arguments\n\t\t\t\t\t\t\t\t\t);\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t} );\n\t\t\t\t\t\t} );\n\t\t\t\t\t\tfns = null;\n\t\t\t\t\t} ).promise();\n\t\t\t\t},\n\t\t\t\tthen: function( onFulfilled, onRejected, onProgress ) {\n\t\t\t\t\tvar maxDepth = 0;\n\t\t\t\t\tfunction resolve( depth, deferred, handler, special ) {\n\t\t\t\t\t\treturn function() {\n\t\t\t\t\t\t\tvar that = this,\n\t\t\t\t\t\t\t\targs = arguments,\n\t\t\t\t\t\t\t\tmightThrow = function() {\n\t\t\t\t\t\t\t\t\tvar returned, then;\n\n\t\t\t\t\t\t\t\t\t// Support: Promises/A+ section 2.3.3.3.3\n\t\t\t\t\t\t\t\t\t// https://promisesaplus.com/#point-59\n\t\t\t\t\t\t\t\t\t// Ignore double-resolution attempts\n\t\t\t\t\t\t\t\t\tif ( depth < maxDepth ) {\n\t\t\t\t\t\t\t\t\t\treturn;\n\t\t\t\t\t\t\t\t\t}\n\n\t\t\t\t\t\t\t\t\treturned = handler.apply( that, args );\n\n\t\t\t\t\t\t\t\t\t// Support: Promises/A+ section 2.3.1\n\t\t\t\t\t\t\t\t\t// https://promisesaplus.com/#point-48\n\t\t\t\t\t\t\t\t\tif ( returned === deferred.promise() ) {\n\t\t\t\t\t\t\t\t\t\tthrow new TypeError( \"Thenable self-resolution\" );\n\t\t\t\t\t\t\t\t\t}\n\n\t\t\t\t\t\t\t\t\t// Support: Promises/A+ sections 2.3.3.1, 3.5\n\t\t\t\t\t\t\t\t\t// https://promisesaplus.com/#point-54\n\t\t\t\t\t\t\t\t\t// https://promisesaplus.com/#point-75\n\t\t\t\t\t\t\t\t\t// Retrieve `then` only once\n\t\t\t\t\t\t\t\t\tthen = returned &&\n\n\t\t\t\t\t\t\t\t\t\t// Support: Promises/A+ section 2.3.4\n\t\t\t\t\t\t\t\t\t\t// https://promisesaplus.com/#point-64\n\t\t\t\t\t\t\t\t\t\t// Only check objects and functions for thenability\n\t\t\t\t\t\t\t\t\t\t( typeof returned === \"object\" ||\n\t\t\t\t\t\t\t\t\t\t\ttypeof returned === \"function\" ) &&\n\t\t\t\t\t\t\t\t\t\treturned.then;\n\n\t\t\t\t\t\t\t\t\t// Handle a returned thenable\n\t\t\t\t\t\t\t\t\tif ( isFunction( then ) ) {\n\n\t\t\t\t\t\t\t\t\t\t// Special processors (notify) just wait for resolution\n\t\t\t\t\t\t\t\t\t\tif ( special ) {\n\t\t\t\t\t\t\t\t\t\t\tthen.call(\n\t\t\t\t\t\t\t\t\t\t\t\treturned,\n\t\t\t\t\t\t\t\t\t\t\t\tresolve( maxDepth, deferred, Identity, special ),\n\t\t\t\t\t\t\t\t\t\t\t\tresolve( maxDepth, deferred, Thrower, special )\n\t\t\t\t\t\t\t\t\t\t\t);\n\n\t\t\t\t\t\t\t\t\t\t// Normal processors (resolve) also hook into progress\n\t\t\t\t\t\t\t\t\t\t} else {\n\n\t\t\t\t\t\t\t\t\t\t\t// ...and disregard older resolution values\n\t\t\t\t\t\t\t\t\t\t\tmaxDepth++;\n\n\t\t\t\t\t\t\t\t\t\t\tthen.call(\n\t\t\t\t\t\t\t\t\t\t\t\treturned,\n\t\t\t\t\t\t\t\t\t\t\t\tresolve( maxDepth, deferred, Identity, special ),\n\t\t\t\t\t\t\t\t\t\t\t\tresolve( maxDepth, deferred, Thrower, special ),\n\t\t\t\t\t\t\t\t\t\t\t\tresolve( maxDepth, deferred, Identity,\n\t\t\t\t\t\t\t\t\t\t\t\t\tdeferred.notifyWith )\n\t\t\t\t\t\t\t\t\t\t\t);\n\t\t\t\t\t\t\t\t\t\t}\n\n\t\t\t\t\t\t\t\t\t// Handle all other returned values\n\t\t\t\t\t\t\t\t\t} else {\n\n\t\t\t\t\t\t\t\t\t\t// Only substitute handlers pass on context\n\t\t\t\t\t\t\t\t\t\t// and multiple values (non-spec behavior)\n\t\t\t\t\t\t\t\t\t\tif ( handler !== Identity ) {\n\t\t\t\t\t\t\t\t\t\t\tthat = undefined;\n\t\t\t\t\t\t\t\t\t\t\targs = [ returned ];\n\t\t\t\t\t\t\t\t\t\t}\n\n\t\t\t\t\t\t\t\t\t\t// Process the value(s)\n\t\t\t\t\t\t\t\t\t\t// Default process is resolve\n\t\t\t\t\t\t\t\t\t\t( special || deferred.resolveWith )( that, args );\n\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t},\n\n\t\t\t\t\t\t\t\t// Only normal processors (resolve) catch and reject exceptions\n\t\t\t\t\t\t\t\tprocess = special ?\n\t\t\t\t\t\t\t\t\tmightThrow :\n\t\t\t\t\t\t\t\t\tfunction() {\n\t\t\t\t\t\t\t\t\t\ttry {\n\t\t\t\t\t\t\t\t\t\t\tmightThrow();\n\t\t\t\t\t\t\t\t\t\t} catch ( e ) {\n\n\t\t\t\t\t\t\t\t\t\t\tif ( jQuery.Deferred.exceptionHook ) {\n\t\t\t\t\t\t\t\t\t\t\t\tjQuery.Deferred.exceptionHook( e,\n\t\t\t\t\t\t\t\t\t\t\t\t\tprocess.error );\n\t\t\t\t\t\t\t\t\t\t\t}\n\n\t\t\t\t\t\t\t\t\t\t\t// Support: Promises/A+ section 2.3.3.3.4.1\n\t\t\t\t\t\t\t\t\t\t\t// https://promisesaplus.com/#point-61\n\t\t\t\t\t\t\t\t\t\t\t// Ignore post-resolution exceptions\n\t\t\t\t\t\t\t\t\t\t\tif ( depth + 1 >= maxDepth ) {\n\n\t\t\t\t\t\t\t\t\t\t\t\t// Only substitute handlers pass on context\n\t\t\t\t\t\t\t\t\t\t\t\t// and multiple values (non-spec behavior)\n\t\t\t\t\t\t\t\t\t\t\t\tif ( handler !== Thrower ) {\n\t\t\t\t\t\t\t\t\t\t\t\t\tthat = undefined;\n\t\t\t\t\t\t\t\t\t\t\t\t\targs = [ e ];\n\t\t\t\t\t\t\t\t\t\t\t\t}\n\n\t\t\t\t\t\t\t\t\t\t\t\tdeferred.rejectWith( that, args );\n\t\t\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t};\n\n\t\t\t\t\t\t\t// Support: Promises/A+ section 2.3.3.3.1\n\t\t\t\t\t\t\t// https://promisesaplus.com/#point-57\n\t\t\t\t\t\t\t// Re-resolve promises immediately to dodge false rejection from\n\t\t\t\t\t\t\t// subsequent errors\n\t\t\t\t\t\t\tif ( depth ) {\n\t\t\t\t\t\t\t\tprocess();\n\t\t\t\t\t\t\t} else {\n\n\t\t\t\t\t\t\t\t// Call an optional hook to record the error, in case of exception\n\t\t\t\t\t\t\t\t// since it's otherwise lost when execution goes async\n\t\t\t\t\t\t\t\tif ( jQuery.Deferred.getErrorHook ) {\n\t\t\t\t\t\t\t\t\tprocess.error = jQuery.Deferred.getErrorHook();\n\n\t\t\t\t\t\t\t\t// The deprecated alias of the above. While the name suggests\n\t\t\t\t\t\t\t\t// returning the stack, not an error instance, jQuery just passes\n\t\t\t\t\t\t\t\t// it directly to `console.warn` so both will work; an instance\n\t\t\t\t\t\t\t\t// just better cooperates with source maps.\n\t\t\t\t\t\t\t\t} else if ( jQuery.Deferred.getStackHook ) {\n\t\t\t\t\t\t\t\t\tprocess.error = jQuery.Deferred.getStackHook();\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\twindow.setTimeout( process );\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t};\n\t\t\t\t\t}\n\n\t\t\t\t\treturn jQuery.Deferred( function( newDefer ) {\n\n\t\t\t\t\t\t// progress_handlers.add( ... )\n\t\t\t\t\t\ttuples[ 0 ][ 3 ].add(\n\t\t\t\t\t\t\tresolve(\n\t\t\t\t\t\t\t\t0,\n\t\t\t\t\t\t\t\tnewDefer,\n\t\t\t\t\t\t\t\tisFunction( onProgress ) ?\n\t\t\t\t\t\t\t\t\tonProgress :\n\t\t\t\t\t\t\t\t\tIdentity,\n\t\t\t\t\t\t\t\tnewDefer.notifyWith\n\t\t\t\t\t\t\t)\n\t\t\t\t\t\t);\n\n\t\t\t\t\t\t// fulfilled_handlers.add( ... )\n\t\t\t\t\t\ttuples[ 1 ][ 3 ].add(\n\t\t\t\t\t\t\tresolve(\n\t\t\t\t\t\t\t\t0,\n\t\t\t\t\t\t\t\tnewDefer,\n\t\t\t\t\t\t\t\tisFunction( onFulfilled ) ?\n\t\t\t\t\t\t\t\t\tonFulfilled :\n\t\t\t\t\t\t\t\t\tIdentity\n\t\t\t\t\t\t\t)\n\t\t\t\t\t\t);\n\n\t\t\t\t\t\t// rejected_handlers.add( ... )\n\t\t\t\t\t\ttuples[ 2 ][ 3 ].add(\n\t\t\t\t\t\t\tresolve(\n\t\t\t\t\t\t\t\t0,\n\t\t\t\t\t\t\t\tnewDefer,\n\t\t\t\t\t\t\t\tisFunction( onRejected ) ?\n\t\t\t\t\t\t\t\t\tonRejected :\n\t\t\t\t\t\t\t\t\tThrower\n\t\t\t\t\t\t\t)\n\t\t\t\t\t\t);\n\t\t\t\t\t} ).promise();\n\t\t\t\t},\n\n\t\t\t\t// Get a promise for this deferred\n\t\t\t\t// If obj is provided, the promise aspect is added to the object\n\t\t\t\tpromise: function( obj ) {\n\t\t\t\t\treturn obj != null ? jQuery.extend( obj, promise ) : promise;\n\t\t\t\t}\n\t\t\t},\n\t\t\tdeferred = {};\n\n\t\t// Add list-specific methods\n\t\tjQuery.each( tuples, function( i, tuple ) {\n\t\t\tvar list = tuple[ 2 ],\n\t\t\t\tstateString = tuple[ 5 ];\n\n\t\t\t// promise.progress = list.add\n\t\t\t// promise.done = list.add\n\t\t\t// promise.fail = list.add\n\t\t\tpromise[ tuple[ 1 ] ] = list.add;\n\n\t\t\t// Handle state\n\t\t\tif ( stateString ) {\n\t\t\t\tlist.add(\n\t\t\t\t\tfunction() {\n\n\t\t\t\t\t\t// state = \"resolved\" (i.e., fulfilled)\n\t\t\t\t\t\t// state = \"rejected\"\n\t\t\t\t\t\tstate = stateString;\n\t\t\t\t\t},\n\n\t\t\t\t\t// rejected_callbacks.disable\n\t\t\t\t\t// fulfilled_callbacks.disable\n\t\t\t\t\ttuples[ 3 - i ][ 2 ].disable,\n\n\t\t\t\t\t// rejected_handlers.disable\n\t\t\t\t\t// fulfilled_handlers.disable\n\t\t\t\t\ttuples[ 3 - i ][ 3 ].disable,\n\n\t\t\t\t\t// progress_callbacks.lock\n\t\t\t\t\ttuples[ 0 ][ 2 ].lock,\n\n\t\t\t\t\t// progress_handlers.lock\n\t\t\t\t\ttuples[ 0 ][ 3 ].lock\n\t\t\t\t);\n\t\t\t}\n\n\t\t\t// progress_handlers.fire\n\t\t\t// fulfilled_handlers.fire\n\t\t\t// rejected_handlers.fire\n\t\t\tlist.add( tuple[ 3 ].fire );\n\n\t\t\t// deferred.notify = function() { deferred.notifyWith(...) }\n\t\t\t// deferred.resolve = function() { deferred.resolveWith(...) }\n\t\t\t// deferred.reject = function() { deferred.rejectWith(...) }\n\t\t\tdeferred[ tuple[ 0 ] ] = function() {\n\t\t\t\tdeferred[ tuple[ 0 ] + \"With\" ]( this === deferred ? undefined : this, arguments );\n\t\t\t\treturn this;\n\t\t\t};\n\n\t\t\t// deferred.notifyWith = list.fireWith\n\t\t\t// deferred.resolveWith = list.fireWith\n\t\t\t// deferred.rejectWith = list.fireWith\n\t\t\tdeferred[ tuple[ 0 ] + \"With\" ] = list.fireWith;\n\t\t} );\n\n\t\t// Make the deferred a promise\n\t\tpromise.promise( deferred );\n\n\t\t// Call given func if any\n\t\tif ( func ) {\n\t\t\tfunc.call( deferred, deferred );\n\t\t}\n\n\t\t// All done!\n\t\treturn deferred;\n\t},\n\n\t// Deferred helper\n\twhen: function( singleValue ) {\n\t\tvar\n\n\t\t\t// count of uncompleted subordinates\n\t\t\tremaining = arguments.length,\n\n\t\t\t// count of unprocessed arguments\n\t\t\ti = remaining,\n\n\t\t\t// subordinate fulfillment data\n\t\t\tresolveContexts = Array( i ),\n\t\t\tresolveValues = slice.call( arguments ),\n\n\t\t\t// the primary Deferred\n\t\t\tprimary = jQuery.Deferred(),\n\n\t\t\t// subordinate callback factory\n\t\t\tupdateFunc = function( i ) {\n\t\t\t\treturn function( value ) {\n\t\t\t\t\tresolveContexts[ i ] = this;\n\t\t\t\t\tresolveValues[ i ] = arguments.length > 1 ? slice.call( arguments ) : value;\n\t\t\t\t\tif ( !( --remaining ) ) {\n\t\t\t\t\t\tprimary.resolveWith( resolveContexts, resolveValues );\n\t\t\t\t\t}\n\t\t\t\t};\n\t\t\t};\n\n\t\t// Single- and empty arguments are adopted like Promise.resolve\n\t\tif ( remaining <= 1 ) {\n\t\t\tadoptValue( singleValue, primary.done( updateFunc( i ) ).resolve, primary.reject,\n\t\t\t\t!remaining );\n\n\t\t\t// Use .then() to unwrap secondary thenables (cf. gh-3000)\n\t\t\tif ( primary.state() === \"pending\" ||\n\t\t\t\tisFunction( resolveValues[ i ] && resolveValues[ i ].then ) ) {\n\n\t\t\t\treturn primary.then();\n\t\t\t}\n\t\t}\n\n\t\t// Multiple arguments are aggregated like Promise.all array elements\n\t\twhile ( i-- ) {\n\t\t\tadoptValue( resolveValues[ i ], updateFunc( i ), primary.reject );\n\t\t}\n\n\t\treturn primary.promise();\n\t}\n} );\n\n\n// These usually indicate a programmer mistake during development,\n// warn about them ASAP rather than swallowing them by default.\nvar rerrorNames = /^(Eval|Internal|Range|Reference|Syntax|Type|URI)Error$/;\n\n// If `jQuery.Deferred.getErrorHook` is defined, `asyncError` is an error\n// captured before the async barrier to get the original error cause\n// which may otherwise be hidden.\njQuery.Deferred.exceptionHook = function( error, asyncError ) {\n\n\t// Support: IE 8 - 9 only\n\t// Console exists when dev tools are open, which can happen at any time\n\tif ( window.console && window.console.warn && error && rerrorNames.test( error.name ) ) {\n\t\twindow.console.warn( \"jQuery.Deferred exception: \" + error.message,\n\t\t\terror.stack, asyncError );\n\t}\n};\n\n\n\n\njQuery.readyException = function( error ) {\n\twindow.setTimeout( function() {\n\t\tthrow error;\n\t} );\n};\n\n\n\n\n// The deferred used on DOM ready\nvar readyList = jQuery.Deferred();\n\njQuery.fn.ready = function( fn ) {\n\n\treadyList\n\t\t.then( fn )\n\n\t\t// Wrap jQuery.readyException in a function so that the lookup\n\t\t// happens at the time of error handling instead of callback\n\t\t// registration.\n\t\t.catch( function( error ) {\n\t\t\tjQuery.readyException( error );\n\t\t} );\n\n\treturn this;\n};\n\njQuery.extend( {\n\n\t// Is the DOM ready to be used? Set to true once it occurs.\n\tisReady: false,\n\n\t// A counter to track how many items to wait for before\n\t// the ready event fires. See trac-6781\n\treadyWait: 1,\n\n\t// Handle when the DOM is ready\n\tready: function( wait ) {\n\n\t\t// Abort if there are pending holds or we're already ready\n\t\tif ( wait === true ? --jQuery.readyWait : jQuery.isReady ) {\n\t\t\treturn;\n\t\t}\n\n\t\t// Remember that the DOM is ready\n\t\tjQuery.isReady = true;\n\n\t\t// If a normal DOM Ready event fired, decrement, and wait if need be\n\t\tif ( wait !== true && --jQuery.readyWait > 0 ) {\n\t\t\treturn;\n\t\t}\n\n\t\t// If there are functions bound, to execute\n\t\treadyList.resolveWith( document, [ jQuery ] );\n\t}\n} );\n\njQuery.ready.then = readyList.then;\n\n// The ready event handler and self cleanup method\nfunction completed() {\n\tdocument.removeEventListener( \"DOMContentLoaded\", completed );\n\twindow.removeEventListener( \"load\", completed );\n\tjQuery.ready();\n}\n\n// Catch cases where $(document).ready() is called\n// after the browser event has already occurred.\n// Support: IE <=9 - 10 only\n// Older IE sometimes signals \"interactive\" too soon\nif ( document.readyState === \"complete\" ||\n\t( document.readyState !== \"loading\" && !document.documentElement.doScroll ) ) {\n\n\t// Handle it asynchronously to allow scripts the opportunity to delay ready\n\twindow.setTimeout( jQuery.ready );\n\n} else {\n\n\t// Use the handy event callback\n\tdocument.addEventListener( \"DOMContentLoaded\", completed );\n\n\t// A fallback to window.onload, that will always work\n\twindow.addEventListener( \"load\", completed );\n}\n\n\n\n\n// Multifunctional method to get and set values of a collection\n// The value/s can optionally be executed if it's a function\nvar access = function( elems, fn, key, value, chainable, emptyGet, raw ) {\n\tvar i = 0,\n\t\tlen = elems.length,\n\t\tbulk = key == null;\n\n\t// Sets many values\n\tif ( toType( key ) === \"object\" ) {\n\t\tchainable = true;\n\t\tfor ( i in key ) {\n\t\t\taccess( elems, fn, i, key[ i ], true, emptyGet, raw );\n\t\t}\n\n\t// Sets one value\n\t} else if ( value !== undefined ) {\n\t\tchainable = true;\n\n\t\tif ( !isFunction( value ) ) {\n\t\t\traw = true;\n\t\t}\n\n\t\tif ( bulk ) {\n\n\t\t\t// Bulk operations run against the entire set\n\t\t\tif ( raw ) {\n\t\t\t\tfn.call( elems, value );\n\t\t\t\tfn = null;\n\n\t\t\t// ...except when executing function values\n\t\t\t} else {\n\t\t\t\tbulk = fn;\n\t\t\t\tfn = function( elem, _key, value ) {\n\t\t\t\t\treturn bulk.call( jQuery( elem ), value );\n\t\t\t\t};\n\t\t\t}\n\t\t}\n\n\t\tif ( fn ) {\n\t\t\tfor ( ; i < len; i++ ) {\n\t\t\t\tfn(\n\t\t\t\t\telems[ i ], key, raw ?\n\t\t\t\t\t\tvalue :\n\t\t\t\t\t\tvalue.call( elems[ i ], i, fn( elems[ i ], key ) )\n\t\t\t\t);\n\t\t\t}\n\t\t}\n\t}\n\n\tif ( chainable ) {\n\t\treturn elems;\n\t}\n\n\t// Gets\n\tif ( bulk ) {\n\t\treturn fn.call( elems );\n\t}\n\n\treturn len ? fn( elems[ 0 ], key ) : emptyGet;\n};\n\n\n// Matches dashed string for camelizing\nvar rmsPrefix = /^-ms-/,\n\trdashAlpha = /-([a-z])/g;\n\n// Used by camelCase as callback to replace()\nfunction fcamelCase( _all, letter ) {\n\treturn letter.toUpperCase();\n}\n\n// Convert dashed to camelCase; used by the css and data modules\n// Support: IE <=9 - 11, Edge 12 - 15\n// Microsoft forgot to hump their vendor prefix (trac-9572)\nfunction camelCase( string ) {\n\treturn string.replace( rmsPrefix, \"ms-\" ).replace( rdashAlpha, fcamelCase );\n}\nvar acceptData = function( owner ) {\n\n\t// Accepts only:\n\t//  - Node\n\t//    - Node.ELEMENT_NODE\n\t//    - Node.DOCUMENT_NODE\n\t//  - Object\n\t//    - Any\n\treturn owner.nodeType === 1 || owner.nodeType === 9 || !( +owner.nodeType );\n};\n\n\n\n\nfunction Data() {\n\tthis.expando = jQuery.expando + Data.uid++;\n}\n\nData.uid = 1;\n\nData.prototype = {\n\n\tcache: function( owner ) {\n\n\t\t// Check if the owner object already has a cache\n\t\tvar value = owner[ this.expando ];\n\n\t\t// If not, create one\n\t\tif ( !value ) {\n\t\t\tvalue = {};\n\n\t\t\t// We can accept data for non-element nodes in modern browsers,\n\t\t\t// but we should not, see trac-8335.\n\t\t\t// Always return an empty object.\n\t\t\tif ( acceptData( owner ) ) {\n\n\t\t\t\t// If it is a node unlikely to be stringify-ed or looped over\n\t\t\t\t// use plain assignment\n\t\t\t\tif ( owner.nodeType ) {\n\t\t\t\t\towner[ this.expando ] = value;\n\n\t\t\t\t// Otherwise secure it in a non-enumerable property\n\t\t\t\t// configurable must be true to allow the property to be\n\t\t\t\t// deleted when data is removed\n\t\t\t\t} else {\n\t\t\t\t\tObject.defineProperty( owner, this.expando, {\n\t\t\t\t\t\tvalue: value,\n\t\t\t\t\t\tconfigurable: true\n\t\t\t\t\t} );\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\n\t\treturn value;\n\t},\n\tset: function( owner, data, value ) {\n\t\tvar prop,\n\t\t\tcache = this.cache( owner );\n\n\t\t// Handle: [ owner, key, value ] args\n\t\t// Always use camelCase key (gh-2257)\n\t\tif ( typeof data === \"string\" ) {\n\t\t\tcache[ camelCase( data ) ] = value;\n\n\t\t// Handle: [ owner, { properties } ] args\n\t\t} else {\n\n\t\t\t// Copy the properties one-by-one to the cache object\n\t\t\tfor ( prop in data ) {\n\t\t\t\tcache[ camelCase( prop ) ] = data[ prop ];\n\t\t\t}\n\t\t}\n\t\treturn cache;\n\t},\n\tget: function( owner, key ) {\n\t\treturn key === undefined ?\n\t\t\tthis.cache( owner ) :\n\n\t\t\t// Always use camelCase key (gh-2257)\n\t\t\towner[ this.expando ] && owner[ this.expando ][ camelCase( key ) ];\n\t},\n\taccess: function( owner, key, value ) {\n\n\t\t// In cases where either:\n\t\t//\n\t\t//   1. No key was specified\n\t\t//   2. A string key was specified, but no value provided\n\t\t//\n\t\t// Take the \"read\" path and allow the get method to determine\n\t\t// which value to return, respectively either:\n\t\t//\n\t\t//   1. The entire cache object\n\t\t//   2. The data stored at the key\n\t\t//\n\t\tif ( key === undefined ||\n\t\t\t\t( ( key && typeof key === \"string\" ) && value === undefined ) ) {\n\n\t\t\treturn this.get( owner, key );\n\t\t}\n\n\t\t// When the key is not a string, or both a key and value\n\t\t// are specified, set or extend (existing objects) with either:\n\t\t//\n\t\t//   1. An object of properties\n\t\t//   2. A key and value\n\t\t//\n\t\tthis.set( owner, key, value );\n\n\t\t// Since the \"set\" path can have two possible entry points\n\t\t// return the expected data based on which path was taken[*]\n\t\treturn value !== undefined ? value : key;\n\t},\n\tremove: function( owner, key ) {\n\t\tvar i,\n\t\t\tcache = owner[ this.expando ];\n\n\t\tif ( cache === undefined ) {\n\t\t\treturn;\n\t\t}\n\n\t\tif ( key !== undefined ) {\n\n\t\t\t// Support array or space separated string of keys\n\t\t\tif ( Array.isArray( key ) ) {\n\n\t\t\t\t// If key is an array of keys...\n\t\t\t\t// We always set camelCase keys, so remove that.\n\t\t\t\tkey = key.map( camelCase );\n\t\t\t} else {\n\t\t\t\tkey = camelCase( key );\n\n\t\t\t\t// If a key with the spaces exists, use it.\n\t\t\t\t// Otherwise, create an array by matching non-whitespace\n\t\t\t\tkey = key in cache ?\n\t\t\t\t\t[ key ] :\n\t\t\t\t\t( key.match( rnothtmlwhite ) || [] );\n\t\t\t}\n\n\t\t\ti = key.length;\n\n\t\t\twhile ( i-- ) {\n\t\t\t\tdelete cache[ key[ i ] ];\n\t\t\t}\n\t\t}\n\n\t\t// Remove the expando if there's no more data\n\t\tif ( key === undefined || jQuery.isEmptyObject( cache ) ) {\n\n\t\t\t// Support: Chrome <=35 - 45\n\t\t\t// Webkit & Blink performance suffers when deleting properties\n\t\t\t// from DOM nodes, so set to undefined instead\n\t\t\t// https://bugs.chromium.org/p/chromium/issues/detail?id=378607 (bug restricted)\n\t\t\tif ( owner.nodeType ) {\n\t\t\t\towner[ this.expando ] = undefined;\n\t\t\t} else {\n\t\t\t\tdelete owner[ this.expando ];\n\t\t\t}\n\t\t}\n\t},\n\thasData: function( owner ) {\n\t\tvar cache = owner[ this.expando ];\n\t\treturn cache !== undefined && !jQuery.isEmptyObject( cache );\n\t}\n};\nvar dataPriv = new Data();\n\nvar dataUser = new Data();\n\n\n\n//\tImplementation Summary\n//\n//\t1. Enforce API surface and semantic compatibility with 1.9.x branch\n//\t2. Improve the module's maintainability by reducing the storage\n//\t\tpaths to a single mechanism.\n//\t3. Use the same single mechanism to support \"private\" and \"user\" data.\n//\t4. _Never_ expose \"private\" data to user code (TODO: Drop _data, _removeData)\n//\t5. Avoid exposing implementation details on user objects (eg. expando properties)\n//\t6. Provide a clear path for implementation upgrade to WeakMap in 2014\n\nvar rbrace = /^(?:\\{[\\w\\W]*\\}|\\[[\\w\\W]*\\])$/,\n\trmultiDash = /[A-Z]/g;\n\nfunction getData( data ) {\n\tif ( data === \"true\" ) {\n\t\treturn true;\n\t}\n\n\tif ( data === \"false\" ) {\n\t\treturn false;\n\t}\n\n\tif ( data === \"null\" ) {\n\t\treturn null;\n\t}\n\n\t// Only convert to a number if it doesn't change the string\n\tif ( data === +data + \"\" ) {\n\t\treturn +data;\n\t}\n\n\tif ( rbrace.test( data ) ) {\n\t\treturn JSON.parse( data );\n\t}\n\n\treturn data;\n}\n\nfunction dataAttr( elem, key, data ) {\n\tvar name;\n\n\t// If nothing was found internally, try to fetch any\n\t// data from the HTML5 data-* attribute\n\tif ( data === undefined && elem.nodeType === 1 ) {\n\t\tname = \"data-\" + key.replace( rmultiDash, \"-$&\" ).toLowerCase();\n\t\tdata = elem.getAttribute( name );\n\n\t\tif ( typeof data === \"string\" ) {\n\t\t\ttry {\n\t\t\t\tdata = getData( data );\n\t\t\t} catch ( e ) {}\n\n\t\t\t// Make sure we set the data so it isn't changed later\n\t\t\tdataUser.set( elem, key, data );\n\t\t} else {\n\t\t\tdata = undefined;\n\t\t}\n\t}\n\treturn data;\n}\n\njQuery.extend( {\n\thasData: function( elem ) {\n\t\treturn dataUser.hasData( elem ) || dataPriv.hasData( elem );\n\t},\n\n\tdata: function( elem, name, data ) {\n\t\treturn dataUser.access( elem, name, data );\n\t},\n\n\tremoveData: function( elem, name ) {\n\t\tdataUser.remove( elem, name );\n\t},\n\n\t// TODO: Now that all calls to _data and _removeData have been replaced\n\t// with direct calls to dataPriv methods, these can be deprecated.\n\t_data: function( elem, name, data ) {\n\t\treturn dataPriv.access( elem, name, data );\n\t},\n\n\t_removeData: function( elem, name ) {\n\t\tdataPriv.remove( elem, name );\n\t}\n} );\n\njQuery.fn.extend( {\n\tdata: function( key, value ) {\n\t\tvar i, name, data,\n\t\t\telem = this[ 0 ],\n\t\t\tattrs = elem && elem.attributes;\n\n\t\t// Gets all values\n\t\tif ( key === undefined ) {\n\t\t\tif ( this.length ) {\n\t\t\t\tdata = dataUser.get( elem );\n\n\t\t\t\tif ( elem.nodeType === 1 && !dataPriv.get( elem, \"hasDataAttrs\" ) ) {\n\t\t\t\t\ti = attrs.length;\n\t\t\t\t\twhile ( i-- ) {\n\n\t\t\t\t\t\t// Support: IE 11 only\n\t\t\t\t\t\t// The attrs elements can be null (trac-14894)\n\t\t\t\t\t\tif ( attrs[ i ] ) {\n\t\t\t\t\t\t\tname = attrs[ i ].name;\n\t\t\t\t\t\t\tif ( name.indexOf( \"data-\" ) === 0 ) {\n\t\t\t\t\t\t\t\tname = camelCase( name.slice( 5 ) );\n\t\t\t\t\t\t\t\tdataAttr( elem, name, data[ name ] );\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t\tdataPriv.set( elem, \"hasDataAttrs\", true );\n\t\t\t\t}\n\t\t\t}\n\n\t\t\treturn data;\n\t\t}\n\n\t\t// Sets multiple values\n\t\tif ( typeof key === \"object\" ) {\n\t\t\treturn this.each( function() {\n\t\t\t\tdataUser.set( this, key );\n\t\t\t} );\n\t\t}\n\n\t\treturn access( this, function( value ) {\n\t\t\tvar data;\n\n\t\t\t// The calling jQuery object (element matches) is not empty\n\t\t\t// (and therefore has an element appears at this[ 0 ]) and the\n\t\t\t// `value` parameter was not undefined. An empty jQuery object\n\t\t\t// will result in `undefined` for elem = this[ 0 ] which will\n\t\t\t// throw an exception if an attempt to read a data cache is made.\n\t\t\tif ( elem && value === undefined ) {\n\n\t\t\t\t// Attempt to get data from the cache\n\t\t\t\t// The key will always be camelCased in Data\n\t\t\t\tdata = dataUser.get( elem, key );\n\t\t\t\tif ( data !== undefined ) {\n\t\t\t\t\treturn data;\n\t\t\t\t}\n\n\t\t\t\t// Attempt to \"discover\" the data in\n\t\t\t\t// HTML5 custom data-* attrs\n\t\t\t\tdata = dataAttr( elem, key );\n\t\t\t\tif ( data !== undefined ) {\n\t\t\t\t\treturn data;\n\t\t\t\t}\n\n\t\t\t\t// We tried really hard, but the data doesn't exist.\n\t\t\t\treturn;\n\t\t\t}\n\n\t\t\t// Set the data...\n\t\t\tthis.each( function() {\n\n\t\t\t\t// We always store the camelCased key\n\t\t\t\tdataUser.set( this, key, value );\n\t\t\t} );\n\t\t}, null, value, arguments.length > 1, null, true );\n\t},\n\n\tremoveData: function( key ) {\n\t\treturn this.each( function() {\n\t\t\tdataUser.remove( this, key );\n\t\t} );\n\t}\n} );\n\n\njQuery.extend( {\n\tqueue: function( elem, type, data ) {\n\t\tvar queue;\n\n\t\tif ( elem ) {\n\t\t\ttype = ( type || \"fx\" ) + \"queue\";\n\t\t\tqueue = dataPriv.get( elem, type );\n\n\t\t\t// Speed up dequeue by getting out quickly if this is just a lookup\n\t\t\tif ( data ) {\n\t\t\t\tif ( !queue || Array.isArray( data ) ) {\n\t\t\t\t\tqueue = dataPriv.access( elem, type, jQuery.makeArray( data ) );\n\t\t\t\t} else {\n\t\t\t\t\tqueue.push( data );\n\t\t\t\t}\n\t\t\t}\n\t\t\treturn queue || [];\n\t\t}\n\t},\n\n\tdequeue: function( elem, type ) {\n\t\ttype = type || \"fx\";\n\n\t\tvar queue = jQuery.queue( elem, type ),\n\t\t\tstartLength = queue.length,\n\t\t\tfn = queue.shift(),\n\t\t\thooks = jQuery._queueHooks( elem, type ),\n\t\t\tnext = function() {\n\t\t\t\tjQuery.dequeue( elem, type );\n\t\t\t};\n\n\t\t// If the fx queue is dequeued, always remove the progress sentinel\n\t\tif ( fn === \"inprogress\" ) {\n\t\t\tfn = queue.shift();\n\t\t\tstartLength--;\n\t\t}\n\n\t\tif ( fn ) {\n\n\t\t\t// Add a progress sentinel to prevent the fx queue from being\n\t\t\t// automatically dequeued\n\t\t\tif ( type === \"fx\" ) {\n\t\t\t\tqueue.unshift( \"inprogress\" );\n\t\t\t}\n\n\t\t\t// Clear up the last queue stop function\n\t\t\tdelete hooks.stop;\n\t\t\tfn.call( elem, next, hooks );\n\t\t}\n\n\t\tif ( !startLength && hooks ) {\n\t\t\thooks.empty.fire();\n\t\t}\n\t},\n\n\t// Not public - generate a queueHooks object, or return the current one\n\t_queueHooks: function( elem, type ) {\n\t\tvar key = type + \"queueHooks\";\n\t\treturn dataPriv.get( elem, key ) || dataPriv.access( elem, key, {\n\t\t\tempty: jQuery.Callbacks( \"once memory\" ).add( function() {\n\t\t\t\tdataPriv.remove( elem, [ type + \"queue\", key ] );\n\t\t\t} )\n\t\t} );\n\t}\n} );\n\njQuery.fn.extend( {\n\tqueue: function( type, data ) {\n\t\tvar setter = 2;\n\n\t\tif ( typeof type !== \"string\" ) {\n\t\t\tdata = type;\n\t\t\ttype = \"fx\";\n\t\t\tsetter--;\n\t\t}\n\n\t\tif ( arguments.length < setter ) {\n\t\t\treturn jQuery.queue( this[ 0 ], type );\n\t\t}\n\n\t\treturn data === undefined ?\n\t\t\tthis :\n\t\t\tthis.each( function() {\n\t\t\t\tvar queue = jQuery.queue( this, type, data );\n\n\t\t\t\t// Ensure a hooks for this queue\n\t\t\t\tjQuery._queueHooks( this, type );\n\n\t\t\t\tif ( type === \"fx\" && queue[ 0 ] !== \"inprogress\" ) {\n\t\t\t\t\tjQuery.dequeue( this, type );\n\t\t\t\t}\n\t\t\t} );\n\t},\n\tdequeue: function( type ) {\n\t\treturn this.each( function() {\n\t\t\tjQuery.dequeue( this, type );\n\t\t} );\n\t},\n\tclearQueue: function( type ) {\n\t\treturn this.queue( type || \"fx\", [] );\n\t},\n\n\t// Get a promise resolved when queues of a certain type\n\t// are emptied (fx is the type by default)\n\tpromise: function( type, obj ) {\n\t\tvar tmp,\n\t\t\tcount = 1,\n\t\t\tdefer = jQuery.Deferred(),\n\t\t\telements = this,\n\t\t\ti = this.length,\n\t\t\tresolve = function() {\n\t\t\t\tif ( !( --count ) ) {\n\t\t\t\t\tdefer.resolveWith( elements, [ elements ] );\n\t\t\t\t}\n\t\t\t};\n\n\t\tif ( typeof type !== \"string\" ) {\n\t\t\tobj = type;\n\t\t\ttype = undefined;\n\t\t}\n\t\ttype = type || \"fx\";\n\n\t\twhile ( i-- ) {\n\t\t\ttmp = dataPriv.get( elements[ i ], type + \"queueHooks\" );\n\t\t\tif ( tmp && tmp.empty ) {\n\t\t\t\tcount++;\n\t\t\t\ttmp.empty.add( resolve );\n\t\t\t}\n\t\t}\n\t\tresolve();\n\t\treturn defer.promise( obj );\n\t}\n} );\nvar pnum = ( /[+-]?(?:\\d*\\.|)\\d+(?:[eE][+-]?\\d+|)/ ).source;\n\nvar rcssNum = new RegExp( \"^(?:([+-])=|)(\" + pnum + \")([a-z%]*)$\", \"i\" );\n\n\nvar cssExpand = [ \"Top\", \"Right\", \"Bottom\", \"Left\" ];\n\nvar documentElement = document.documentElement;\n\n\n\n\tvar isAttached = function( elem ) {\n\t\t\treturn jQuery.contains( elem.ownerDocument, elem );\n\t\t},\n\t\tcomposed = { composed: true };\n\n\t// Support: IE 9 - 11+, Edge 12 - 18+, iOS 10.0 - 10.2 only\n\t// Check attachment across shadow DOM boundaries when possible (gh-3504)\n\t// Support: iOS 10.0-10.2 only\n\t// Early iOS 10 versions support `attachShadow` but not `getRootNode`,\n\t// leading to errors. We need to check for `getRootNode`.\n\tif ( documentElement.getRootNode ) {\n\t\tisAttached = function( elem ) {\n\t\t\treturn jQuery.contains( elem.ownerDocument, elem ) ||\n\t\t\t\telem.getRootNode( composed ) === elem.ownerDocument;\n\t\t};\n\t}\nvar isHiddenWithinTree = function( elem, el ) {\n\n\t\t// isHiddenWithinTree might be called from jQuery#filter function;\n\t\t// in that case, element will be second argument\n\t\telem = el || elem;\n\n\t\t// Inline style trumps all\n\t\treturn elem.style.display === \"none\" ||\n\t\t\telem.style.display === \"\" &&\n\n\t\t\t// Otherwise, check computed style\n\t\t\t// Support: Firefox <=43 - 45\n\t\t\t// Disconnected elements can have computed display: none, so first confirm that elem is\n\t\t\t// in the document.\n\t\t\tisAttached( elem ) &&\n\n\t\t\tjQuery.css( elem, \"display\" ) === \"none\";\n\t};\n\n\n\nfunction adjustCSS( elem, prop, valueParts, tween ) {\n\tvar adjusted, scale,\n\t\tmaxIterations = 20,\n\t\tcurrentValue = tween ?\n\t\t\tfunction() {\n\t\t\t\treturn tween.cur();\n\t\t\t} :\n\t\t\tfunction() {\n\t\t\t\treturn jQuery.css( elem, prop, \"\" );\n\t\t\t},\n\t\tinitial = currentValue(),\n\t\tunit = valueParts && valueParts[ 3 ] || ( jQuery.cssNumber[ prop ] ? \"\" : \"px\" ),\n\n\t\t// Starting value computation is required for potential unit mismatches\n\t\tinitialInUnit = elem.nodeType &&\n\t\t\t( jQuery.cssNumber[ prop ] || unit !== \"px\" && +initial ) &&\n\t\t\trcssNum.exec( jQuery.css( elem, prop ) );\n\n\tif ( initialInUnit && initialInUnit[ 3 ] !== unit ) {\n\n\t\t// Support: Firefox <=54\n\t\t// Halve the iteration target value to prevent interference from CSS upper bounds (gh-2144)\n\t\tinitial = initial / 2;\n\n\t\t// Trust units reported by jQuery.css\n\t\tunit = unit || initialInUnit[ 3 ];\n\n\t\t// Iteratively approximate from a nonzero starting point\n\t\tinitialInUnit = +initial || 1;\n\n\t\twhile ( maxIterations-- ) {\n\n\t\t\t// Evaluate and update our best guess (doubling guesses that zero out).\n\t\t\t// Finish if the scale equals or crosses 1 (making the old*new product non-positive).\n\t\t\tjQuery.style( elem, prop, initialInUnit + unit );\n\t\t\tif ( ( 1 - scale ) * ( 1 - ( scale = currentValue() / initial || 0.5 ) ) <= 0 ) {\n\t\t\t\tmaxIterations = 0;\n\t\t\t}\n\t\t\tinitialInUnit = initialInUnit / scale;\n\n\t\t}\n\n\t\tinitialInUnit = initialInUnit * 2;\n\t\tjQuery.style( elem, prop, initialInUnit + unit );\n\n\t\t// Make sure we update the tween properties later on\n\t\tvalueParts = valueParts || [];\n\t}\n\n\tif ( valueParts ) {\n\t\tinitialInUnit = +initialInUnit || +initial || 0;\n\n\t\t// Apply relative offset (+=/-=) if specified\n\t\tadjusted = valueParts[ 1 ] ?\n\t\t\tinitialInUnit + ( valueParts[ 1 ] + 1 ) * valueParts[ 2 ] :\n\t\t\t+valueParts[ 2 ];\n\t\tif ( tween ) {\n\t\t\ttween.unit = unit;\n\t\t\ttween.start = initialInUnit;\n\t\t\ttween.end = adjusted;\n\t\t}\n\t}\n\treturn adjusted;\n}\n\n\nvar defaultDisplayMap = {};\n\nfunction getDefaultDisplay( elem ) {\n\tvar temp,\n\t\tdoc = elem.ownerDocument,\n\t\tnodeName = elem.nodeName,\n\t\tdisplay = defaultDisplayMap[ nodeName ];\n\n\tif ( display ) {\n\t\treturn display;\n\t}\n\n\ttemp = doc.body.appendChild( doc.createElement( nodeName ) );\n\tdisplay = jQuery.css( temp, \"display\" );\n\n\ttemp.parentNode.removeChild( temp );\n\n\tif ( display === \"none\" ) {\n\t\tdisplay = \"block\";\n\t}\n\tdefaultDisplayMap[ nodeName ] = display;\n\n\treturn display;\n}\n\nfunction showHide( elements, show ) {\n\tvar display, elem,\n\t\tvalues = [],\n\t\tindex = 0,\n\t\tlength = elements.length;\n\n\t// Determine new display value for elements that need to change\n\tfor ( ; index < length; index++ ) {\n\t\telem = elements[ index ];\n\t\tif ( !elem.style ) {\n\t\t\tcontinue;\n\t\t}\n\n\t\tdisplay = elem.style.display;\n\t\tif ( show ) {\n\n\t\t\t// Since we force visibility upon cascade-hidden elements, an immediate (and slow)\n\t\t\t// check is required in this first loop unless we have a nonempty display value (either\n\t\t\t// inline or about-to-be-restored)\n\t\t\tif ( display === \"none\" ) {\n\t\t\t\tvalues[ index ] = dataPriv.get( elem, \"display\" ) || null;\n\t\t\t\tif ( !values[ index ] ) {\n\t\t\t\t\telem.style.display = \"\";\n\t\t\t\t}\n\t\t\t}\n\t\t\tif ( elem.style.display === \"\" && isHiddenWithinTree( elem ) ) {\n\t\t\t\tvalues[ index ] = getDefaultDisplay( elem );\n\t\t\t}\n\t\t} else {\n\t\t\tif ( display !== \"none\" ) {\n\t\t\t\tvalues[ index ] = \"none\";\n\n\t\t\t\t// Remember what we're overwriting\n\t\t\t\tdataPriv.set( elem, \"display\", display );\n\t\t\t}\n\t\t}\n\t}\n\n\t// Set the display of the elements in a second loop to avoid constant reflow\n\tfor ( index = 0; index < length; index++ ) {\n\t\tif ( values[ index ] != null ) {\n\t\t\telements[ index ].style.display = values[ index ];\n\t\t}\n\t}\n\n\treturn elements;\n}\n\njQuery.fn.extend( {\n\tshow: function() {\n\t\treturn showHide( this, true );\n\t},\n\thide: function() {\n\t\treturn showHide( this );\n\t},\n\ttoggle: function( state ) {\n\t\tif ( typeof state === \"boolean\" ) {\n\t\t\treturn state ? this.show() : this.hide();\n\t\t}\n\n\t\treturn this.each( function() {\n\t\t\tif ( isHiddenWithinTree( this ) ) {\n\t\t\t\tjQuery( this ).show();\n\t\t\t} else {\n\t\t\t\tjQuery( this ).hide();\n\t\t\t}\n\t\t} );\n\t}\n} );\nvar rcheckableType = ( /^(?:checkbox|radio)$/i );\n\nvar rtagName = ( /<([a-z][^\\/\\0>\\x20\\t\\r\\n\\f]*)/i );\n\nvar rscriptType = ( /^$|^module$|\\/(?:java|ecma)script/i );\n\n\n\n( function() {\n\tvar fragment = document.createDocumentFragment(),\n\t\tdiv = fragment.appendChild( document.createElement( \"div\" ) ),\n\t\tinput = document.createElement( \"input\" );\n\n\t// Support: Android 4.0 - 4.3 only\n\t// Check state lost if the name is set (trac-11217)\n\t// Support: Windows Web Apps (WWA)\n\t// `name` and `type` must use .setAttribute for WWA (trac-14901)\n\tinput.setAttribute( \"type\", \"radio\" );\n\tinput.setAttribute( \"checked\", \"checked\" );\n\tinput.setAttribute( \"name\", \"t\" );\n\n\tdiv.appendChild( input );\n\n\t// Support: Android <=4.1 only\n\t// Older WebKit doesn't clone checked state correctly in fragments\n\tsupport.checkClone = div.cloneNode( true ).cloneNode( true ).lastChild.checked;\n\n\t// Support: IE <=11 only\n\t// Make sure textarea (and checkbox) defaultValue is properly cloned\n\tdiv.innerHTML = \"<textarea>x</textarea>\";\n\tsupport.noCloneChecked = !!div.cloneNode( true ).lastChild.defaultValue;\n\n\t// Support: IE <=9 only\n\t// IE <=9 replaces <option> tags with their contents when inserted outside of\n\t// the select element.\n\tdiv.innerHTML = \"<option></option>\";\n\tsupport.option = !!div.lastChild;\n} )();\n\n\n// We have to close these tags to support XHTML (trac-13200)\nvar wrapMap = {\n\n\t// XHTML parsers do not magically insert elements in the\n\t// same way that tag soup parsers do. So we cannot shorten\n\t// this by omitting <tbody> or other required elements.\n\tthead: [ 1, \"<table>\", \"</table>\" ],\n\tcol: [ 2, \"<table><colgroup>\", \"</colgroup></table>\" ],\n\ttr: [ 2, \"<table><tbody>\", \"</tbody></table>\" ],\n\ttd: [ 3, \"<table><tbody><tr>\", \"</tr></tbody></table>\" ],\n\n\t_default: [ 0, \"\", \"\" ]\n};\n\nwrapMap.tbody = wrapMap.tfoot = wrapMap.colgroup = wrapMap.caption = wrapMap.thead;\nwrapMap.th = wrapMap.td;\n\n// Support: IE <=9 only\nif ( !support.option ) {\n\twrapMap.optgroup = wrapMap.option = [ 1, \"<select multiple='multiple'>\", \"</select>\" ];\n}\n\n\nfunction getAll( context, tag ) {\n\n\t// Support: IE <=9 - 11 only\n\t// Use typeof to avoid zero-argument method invocation on host objects (trac-15151)\n\tvar ret;\n\n\tif ( typeof context.getElementsByTagName !== \"undefined\" ) {\n\t\tret = context.getElementsByTagName( tag || \"*\" );\n\n\t} else if ( typeof context.querySelectorAll !== \"undefined\" ) {\n\t\tret = context.querySelectorAll( tag || \"*\" );\n\n\t} else {\n\t\tret = [];\n\t}\n\n\tif ( tag === undefined || tag && nodeName( context, tag ) ) {\n\t\treturn jQuery.merge( [ context ], ret );\n\t}\n\n\treturn ret;\n}\n\n\n// Mark scripts as having already been evaluated\nfunction setGlobalEval( elems, refElements ) {\n\tvar i = 0,\n\t\tl = elems.length;\n\n\tfor ( ; i < l; i++ ) {\n\t\tdataPriv.set(\n\t\t\telems[ i ],\n\t\t\t\"globalEval\",\n\t\t\t!refElements || dataPriv.get( refElements[ i ], \"globalEval\" )\n\t\t);\n\t}\n}\n\n\nvar rhtml = /<|&#?\\w+;/;\n\nfunction buildFragment( elems, context, scripts, selection, ignored ) {\n\tvar elem, tmp, tag, wrap, attached, j,\n\t\tfragment = context.createDocumentFragment(),\n\t\tnodes = [],\n\t\ti = 0,\n\t\tl = elems.length;\n\n\tfor ( ; i < l; i++ ) {\n\t\telem = elems[ i ];\n\n\t\tif ( elem || elem === 0 ) {\n\n\t\t\t// Add nodes directly\n\t\t\tif ( toType( elem ) === \"object\" ) {\n\n\t\t\t\t// Support: Android <=4.0 only, PhantomJS 1 only\n\t\t\t\t// push.apply(_, arraylike) throws on ancient WebKit\n\t\t\t\tjQuery.merge( nodes, elem.nodeType ? [ elem ] : elem );\n\n\t\t\t// Convert non-html into a text node\n\t\t\t} else if ( !rhtml.test( elem ) ) {\n\t\t\t\tnodes.push( context.createTextNode( elem ) );\n\n\t\t\t// Convert html into DOM nodes\n\t\t\t} else {\n\t\t\t\ttmp = tmp || fragment.appendChild( context.createElement( \"div\" ) );\n\n\t\t\t\t// Deserialize a standard representation\n\t\t\t\ttag = ( rtagName.exec( elem ) || [ \"\", \"\" ] )[ 1 ].toLowerCase();\n\t\t\t\twrap = wrapMap[ tag ] || wrapMap._default;\n\t\t\t\ttmp.innerHTML = wrap[ 1 ] + jQuery.htmlPrefilter( elem ) + wrap[ 2 ];\n\n\t\t\t\t// Descend through wrappers to the right content\n\t\t\t\tj = wrap[ 0 ];\n\t\t\t\twhile ( j-- ) {\n\t\t\t\t\ttmp = tmp.lastChild;\n\t\t\t\t}\n\n\t\t\t\t// Support: Android <=4.0 only, PhantomJS 1 only\n\t\t\t\t// push.apply(_, arraylike) throws on ancient WebKit\n\t\t\t\tjQuery.merge( nodes, tmp.childNodes );\n\n\t\t\t\t// Remember the top-level container\n\t\t\t\ttmp = fragment.firstChild;\n\n\t\t\t\t// Ensure the created nodes are orphaned (trac-12392)\n\t\t\t\ttmp.textContent = \"\";\n\t\t\t}\n\t\t}\n\t}\n\n\t// Remove wrapper from fragment\n\tfragment.textContent = \"\";\n\n\ti = 0;\n\twhile ( ( elem = nodes[ i++ ] ) ) {\n\n\t\t// Skip elements already in the context collection (trac-4087)\n\t\tif ( selection && jQuery.inArray( elem, selection ) > -1 ) {\n\t\t\tif ( ignored ) {\n\t\t\t\tignored.push( elem );\n\t\t\t}\n\t\t\tcontinue;\n\t\t}\n\n\t\tattached = isAttached( elem );\n\n\t\t// Append to fragment\n\t\ttmp = getAll( fragment.appendChild( elem ), \"script\" );\n\n\t\t// Preserve script evaluation history\n\t\tif ( attached ) {\n\t\t\tsetGlobalEval( tmp );\n\t\t}\n\n\t\t// Capture executables\n\t\tif ( scripts ) {\n\t\t\tj = 0;\n\t\t\twhile ( ( elem = tmp[ j++ ] ) ) {\n\t\t\t\tif ( rscriptType.test( elem.type || \"\" ) ) {\n\t\t\t\t\tscripts.push( elem );\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t}\n\n\treturn fragment;\n}\n\n\nvar rtypenamespace = /^([^.]*)(?:\\.(.+)|)/;\n\nfunction returnTrue() {\n\treturn true;\n}\n\nfunction returnFalse() {\n\treturn false;\n}\n\nfunction on( elem, types, selector, data, fn, one ) {\n\tvar origFn, type;\n\n\t// Types can be a map of types/handlers\n\tif ( typeof types === \"object\" ) {\n\n\t\t// ( types-Object, selector, data )\n\t\tif ( typeof selector !== \"string\" ) {\n\n\t\t\t// ( types-Object, data )\n\t\t\tdata = data || selector;\n\t\t\tselector = undefined;\n\t\t}\n\t\tfor ( type in types ) {\n\t\t\ton( elem, type, selector, data, types[ type ], one );\n\t\t}\n\t\treturn elem;\n\t}\n\n\tif ( data == null && fn == null ) {\n\n\t\t// ( types, fn )\n\t\tfn = selector;\n\t\tdata = selector = undefined;\n\t} else if ( fn == null ) {\n\t\tif ( typeof selector === \"string\" ) {\n\n\t\t\t// ( types, selector, fn )\n\t\t\tfn = data;\n\t\t\tdata = undefined;\n\t\t} else {\n\n\t\t\t// ( types, data, fn )\n\t\t\tfn = data;\n\t\t\tdata = selector;\n\t\t\tselector = undefined;\n\t\t}\n\t}\n\tif ( fn === false ) {\n\t\tfn = returnFalse;\n\t} else if ( !fn ) {\n\t\treturn elem;\n\t}\n\n\tif ( one === 1 ) {\n\t\torigFn = fn;\n\t\tfn = function( event ) {\n\n\t\t\t// Can use an empty set, since event contains the info\n\t\t\tjQuery().off( event );\n\t\t\treturn origFn.apply( this, arguments );\n\t\t};\n\n\t\t// Use same guid so caller can remove using origFn\n\t\tfn.guid = origFn.guid || ( origFn.guid = jQuery.guid++ );\n\t}\n\treturn elem.each( function() {\n\t\tjQuery.event.add( this, types, fn, data, selector );\n\t} );\n}\n\n/*\n * Helper functions for managing events -- not part of the public interface.\n * Props to Dean Edwards' addEvent library for many of the ideas.\n */\njQuery.event = {\n\n\tglobal: {},\n\n\tadd: function( elem, types, handler, data, selector ) {\n\n\t\tvar handleObjIn, eventHandle, tmp,\n\t\t\tevents, t, handleObj,\n\t\t\tspecial, handlers, type, namespaces, origType,\n\t\t\telemData = dataPriv.get( elem );\n\n\t\t// Only attach events to objects that accept data\n\t\tif ( !acceptData( elem ) ) {\n\t\t\treturn;\n\t\t}\n\n\t\t// Caller can pass in an object of custom data in lieu of the handler\n\t\tif ( handler.handler ) {\n\t\t\thandleObjIn = handler;\n\t\t\thandler = handleObjIn.handler;\n\t\t\tselector = handleObjIn.selector;\n\t\t}\n\n\t\t// Ensure that invalid selectors throw exceptions at attach time\n\t\t// Evaluate against documentElement in case elem is a non-element node (e.g., document)\n\t\tif ( selector ) {\n\t\t\tjQuery.find.matchesSelector( documentElement, selector );\n\t\t}\n\n\t\t// Make sure that the handler has a unique ID, used to find/remove it later\n\t\tif ( !handler.guid ) {\n\t\t\thandler.guid = jQuery.guid++;\n\t\t}\n\n\t\t// Init the element's event structure and main handler, if this is the first\n\t\tif ( !( events = elemData.events ) ) {\n\t\t\tevents = elemData.events = Object.create( null );\n\t\t}\n\t\tif ( !( eventHandle = elemData.handle ) ) {\n\t\t\teventHandle = elemData.handle = function( e ) {\n\n\t\t\t\t// Discard the second event of a jQuery.event.trigger() and\n\t\t\t\t// when an event is called after a page has unloaded\n\t\t\t\treturn typeof jQuery !== \"undefined\" && jQuery.event.triggered !== e.type ?\n\t\t\t\t\tjQuery.event.dispatch.apply( elem, arguments ) : undefined;\n\t\t\t};\n\t\t}\n\n\t\t// Handle multiple events separated by a space\n\t\ttypes = ( types || \"\" ).match( rnothtmlwhite ) || [ \"\" ];\n\t\tt = types.length;\n\t\twhile ( t-- ) {\n\t\t\ttmp = rtypenamespace.exec( types[ t ] ) || [];\n\t\t\ttype = origType = tmp[ 1 ];\n\t\t\tnamespaces = ( tmp[ 2 ] || \"\" ).split( \".\" ).sort();\n\n\t\t\t// There *must* be a type, no attaching namespace-only handlers\n\t\t\tif ( !type ) {\n\t\t\t\tcontinue;\n\t\t\t}\n\n\t\t\t// If event changes its type, use the special event handlers for the changed type\n\t\t\tspecial = jQuery.event.special[ type ] || {};\n\n\t\t\t// If selector defined, determine special event api type, otherwise given type\n\t\t\ttype = ( selector ? special.delegateType : special.bindType ) || type;\n\n\t\t\t// Update special based on newly reset type\n\t\t\tspecial = jQuery.event.special[ type ] || {};\n\n\t\t\t// handleObj is passed to all event handlers\n\t\t\thandleObj = jQuery.extend( {\n\t\t\t\ttype: type,\n\t\t\t\torigType: origType,\n\t\t\t\tdata: data,\n\t\t\t\thandler: handler,\n\t\t\t\tguid: handler.guid,\n\t\t\t\tselector: selector,\n\t\t\t\tneedsContext: selector && jQuery.expr.match.needsContext.test( selector ),\n\t\t\t\tnamespace: namespaces.join( \".\" )\n\t\t\t}, handleObjIn );\n\n\t\t\t// Init the event handler queue if we're the first\n\t\t\tif ( !( handlers = events[ type ] ) ) {\n\t\t\t\thandlers = events[ type ] = [];\n\t\t\t\thandlers.delegateCount = 0;\n\n\t\t\t\t// Only use addEventListener if the special events handler returns false\n\t\t\t\tif ( !special.setup ||\n\t\t\t\t\tspecial.setup.call( elem, data, namespaces, eventHandle ) === false ) {\n\n\t\t\t\t\tif ( elem.addEventListener ) {\n\t\t\t\t\t\telem.addEventListener( type, eventHandle );\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\n\t\t\tif ( special.add ) {\n\t\t\t\tspecial.add.call( elem, handleObj );\n\n\t\t\t\tif ( !handleObj.handler.guid ) {\n\t\t\t\t\thandleObj.handler.guid = handler.guid;\n\t\t\t\t}\n\t\t\t}\n\n\t\t\t// Add to the element's handler list, delegates in front\n\t\t\tif ( selector ) {\n\t\t\t\thandlers.splice( handlers.delegateCount++, 0, handleObj );\n\t\t\t} else {\n\t\t\t\thandlers.push( handleObj );\n\t\t\t}\n\n\t\t\t// Keep track of which events have ever been used, for event optimization\n\t\t\tjQuery.event.global[ type ] = true;\n\t\t}\n\n\t},\n\n\t// Detach an event or set of events from an element\n\tremove: function( elem, types, handler, selector, mappedTypes ) {\n\n\t\tvar j, origCount, tmp,\n\t\t\tevents, t, handleObj,\n\t\t\tspecial, handlers, type, namespaces, origType,\n\t\t\telemData = dataPriv.hasData( elem ) && dataPriv.get( elem );\n\n\t\tif ( !elemData || !( events = elemData.events ) ) {\n\t\t\treturn;\n\t\t}\n\n\t\t// Once for each type.namespace in types; type may be omitted\n\t\ttypes = ( types || \"\" ).match( rnothtmlwhite ) || [ \"\" ];\n\t\tt = types.length;\n\t\twhile ( t-- ) {\n\t\t\ttmp = rtypenamespace.exec( types[ t ] ) || [];\n\t\t\ttype = origType = tmp[ 1 ];\n\t\t\tnamespaces = ( tmp[ 2 ] || \"\" ).split( \".\" ).sort();\n\n\t\t\t// Unbind all events (on this namespace, if provided) for the element\n\t\t\tif ( !type ) {\n\t\t\t\tfor ( type in events ) {\n\t\t\t\t\tjQuery.event.remove( elem, type + types[ t ], handler, selector, true );\n\t\t\t\t}\n\t\t\t\tcontinue;\n\t\t\t}\n\n\t\t\tspecial = jQuery.event.special[ type ] || {};\n\t\t\ttype = ( selector ? special.delegateType : special.bindType ) || type;\n\t\t\thandlers = events[ type ] || [];\n\t\t\ttmp = tmp[ 2 ] &&\n\t\t\t\tnew RegExp( \"(^|\\\\.)\" + namespaces.join( \"\\\\.(?:.*\\\\.|)\" ) + \"(\\\\.|$)\" );\n\n\t\t\t// Remove matching events\n\t\t\torigCount = j = handlers.length;\n\t\t\twhile ( j-- ) {\n\t\t\t\thandleObj = handlers[ j ];\n\n\t\t\t\tif ( ( mappedTypes || origType === handleObj.origType ) &&\n\t\t\t\t\t( !handler || handler.guid === handleObj.guid ) &&\n\t\t\t\t\t( !tmp || tmp.test( handleObj.namespace ) ) &&\n\t\t\t\t\t( !selector || selector === handleObj.selector ||\n\t\t\t\t\t\tselector === \"**\" && handleObj.selector ) ) {\n\t\t\t\t\thandlers.splice( j, 1 );\n\n\t\t\t\t\tif ( handleObj.selector ) {\n\t\t\t\t\t\thandlers.delegateCount--;\n\t\t\t\t\t}\n\t\t\t\t\tif ( special.remove ) {\n\t\t\t\t\t\tspecial.remove.call( elem, handleObj );\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\n\t\t\t// Remove generic event handler if we removed something and no more handlers exist\n\t\t\t// (avoids potential for endless recursion during removal of special event handlers)\n\t\t\tif ( origCount && !handlers.length ) {\n\t\t\t\tif ( !special.teardown ||\n\t\t\t\t\tspecial.teardown.call( elem, namespaces, elemData.handle ) === false ) {\n\n\t\t\t\t\tjQuery.removeEvent( elem, type, elemData.handle );\n\t\t\t\t}\n\n\t\t\t\tdelete events[ type ];\n\t\t\t}\n\t\t}\n\n\t\t// Remove data and the expando if it's no longer used\n\t\tif ( jQuery.isEmptyObject( events ) ) {\n\t\t\tdataPriv.remove( elem, \"handle events\" );\n\t\t}\n\t},\n\n\tdispatch: function( nativeEvent ) {\n\n\t\tvar i, j, ret, matched, handleObj, handlerQueue,\n\t\t\targs = new Array( arguments.length ),\n\n\t\t\t// Make a writable jQuery.Event from the native event object\n\t\t\tevent = jQuery.event.fix( nativeEvent ),\n\n\t\t\thandlers = (\n\t\t\t\tdataPriv.get( this, \"events\" ) || Object.create( null )\n\t\t\t)[ event.type ] || [],\n\t\t\tspecial = jQuery.event.special[ event.type ] || {};\n\n\t\t// Use the fix-ed jQuery.Event rather than the (read-only) native event\n\t\targs[ 0 ] = event;\n\n\t\tfor ( i = 1; i < arguments.length; i++ ) {\n\t\t\targs[ i ] = arguments[ i ];\n\t\t}\n\n\t\tevent.delegateTarget = this;\n\n\t\t// Call the preDispatch hook for the mapped type, and let it bail if desired\n\t\tif ( special.preDispatch && special.preDispatch.call( this, event ) === false ) {\n\t\t\treturn;\n\t\t}\n\n\t\t// Determine handlers\n\t\thandlerQueue = jQuery.event.handlers.call( this, event, handlers );\n\n\t\t// Run delegates first; they may want to stop propagation beneath us\n\t\ti = 0;\n\t\twhile ( ( matched = handlerQueue[ i++ ] ) && !event.isPropagationStopped() ) {\n\t\t\tevent.currentTarget = matched.elem;\n\n\t\t\tj = 0;\n\t\t\twhile ( ( handleObj = matched.handlers[ j++ ] ) &&\n\t\t\t\t!event.isImmediatePropagationStopped() ) {\n\n\t\t\t\t// If the event is namespaced, then each handler is only invoked if it is\n\t\t\t\t// specially universal or its namespaces are a superset of the event's.\n\t\t\t\tif ( !event.rnamespace || handleObj.namespace === false ||\n\t\t\t\t\tevent.rnamespace.test( handleObj.namespace ) ) {\n\n\t\t\t\t\tevent.handleObj = handleObj;\n\t\t\t\t\tevent.data = handleObj.data;\n\n\t\t\t\t\tret = ( ( jQuery.event.special[ handleObj.origType ] || {} ).handle ||\n\t\t\t\t\t\thandleObj.handler ).apply( matched.elem, args );\n\n\t\t\t\t\tif ( ret !== undefined ) {\n\t\t\t\t\t\tif ( ( event.result = ret ) === false ) {\n\t\t\t\t\t\t\tevent.preventDefault();\n\t\t\t\t\t\t\tevent.stopPropagation();\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\n\t\t// Call the postDispatch hook for the mapped type\n\t\tif ( special.postDispatch ) {\n\t\t\tspecial.postDispatch.call( this, event );\n\t\t}\n\n\t\treturn event.result;\n\t},\n\n\thandlers: function( event, handlers ) {\n\t\tvar i, handleObj, sel, matchedHandlers, matchedSelectors,\n\t\t\thandlerQueue = [],\n\t\t\tdelegateCount = handlers.delegateCount,\n\t\t\tcur = event.target;\n\n\t\t// Find delegate handlers\n\t\tif ( delegateCount &&\n\n\t\t\t// Support: IE <=9\n\t\t\t// Black-hole SVG <use> instance trees (trac-13180)\n\t\t\tcur.nodeType &&\n\n\t\t\t// Support: Firefox <=42\n\t\t\t// Suppress spec-violating clicks indicating a non-primary pointer button (trac-3861)\n\t\t\t// https://www.w3.org/TR/DOM-Level-3-Events/#event-type-click\n\t\t\t// Support: IE 11 only\n\t\t\t// ...but not arrow key \"clicks\" of radio inputs, which can have `button` -1 (gh-2343)\n\t\t\t!( event.type === \"click\" && event.button >= 1 ) ) {\n\n\t\t\tfor ( ; cur !== this; cur = cur.parentNode || this ) {\n\n\t\t\t\t// Don't check non-elements (trac-13208)\n\t\t\t\t// Don't process clicks on disabled elements (trac-6911, trac-8165, trac-11382, trac-11764)\n\t\t\t\tif ( cur.nodeType === 1 && !( event.type === \"click\" && cur.disabled === true ) ) {\n\t\t\t\t\tmatchedHandlers = [];\n\t\t\t\t\tmatchedSelectors = {};\n\t\t\t\t\tfor ( i = 0; i < delegateCount; i++ ) {\n\t\t\t\t\t\thandleObj = handlers[ i ];\n\n\t\t\t\t\t\t// Don't conflict with Object.prototype properties (trac-13203)\n\t\t\t\t\t\tsel = handleObj.selector + \" \";\n\n\t\t\t\t\t\tif ( matchedSelectors[ sel ] === undefined ) {\n\t\t\t\t\t\t\tmatchedSelectors[ sel ] = handleObj.needsContext ?\n\t\t\t\t\t\t\t\tjQuery( sel, this ).index( cur ) > -1 :\n\t\t\t\t\t\t\t\tjQuery.find( sel, this, null, [ cur ] ).length;\n\t\t\t\t\t\t}\n\t\t\t\t\t\tif ( matchedSelectors[ sel ] ) {\n\t\t\t\t\t\t\tmatchedHandlers.push( handleObj );\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t\tif ( matchedHandlers.length ) {\n\t\t\t\t\t\thandlerQueue.push( { elem: cur, handlers: matchedHandlers } );\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\n\t\t// Add the remaining (directly-bound) handlers\n\t\tcur = this;\n\t\tif ( delegateCount < handlers.length ) {\n\t\t\thandlerQueue.push( { elem: cur, handlers: handlers.slice( delegateCount ) } );\n\t\t}\n\n\t\treturn handlerQueue;\n\t},\n\n\taddProp: function( name, hook ) {\n\t\tObject.defineProperty( jQuery.Event.prototype, name, {\n\t\t\tenumerable: true,\n\t\t\tconfigurable: true,\n\n\t\t\tget: isFunction( hook ) ?\n\t\t\t\tfunction() {\n\t\t\t\t\tif ( this.originalEvent ) {\n\t\t\t\t\t\treturn hook( this.originalEvent );\n\t\t\t\t\t}\n\t\t\t\t} :\n\t\t\t\tfunction() {\n\t\t\t\t\tif ( this.originalEvent ) {\n\t\t\t\t\t\treturn this.originalEvent[ name ];\n\t\t\t\t\t}\n\t\t\t\t},\n\n\t\t\tset: function( value ) {\n\t\t\t\tObject.defineProperty( this, name, {\n\t\t\t\t\tenumerable: true,\n\t\t\t\t\tconfigurable: true,\n\t\t\t\t\twritable: true,\n\t\t\t\t\tvalue: value\n\t\t\t\t} );\n\t\t\t}\n\t\t} );\n\t},\n\n\tfix: function( originalEvent ) {\n\t\treturn originalEvent[ jQuery.expando ] ?\n\t\t\toriginalEvent :\n\t\t\tnew jQuery.Event( originalEvent );\n\t},\n\n\tspecial: {\n\t\tload: {\n\n\t\t\t// Prevent triggered image.load events from bubbling to window.load\n\t\t\tnoBubble: true\n\t\t},\n\t\tclick: {\n\n\t\t\t// Utilize native event to ensure correct state for checkable inputs\n\t\t\tsetup: function( data ) {\n\n\t\t\t\t// For mutual compressibility with _default, replace `this` access with a local var.\n\t\t\t\t// `|| data` is dead code meant only to preserve the variable through minification.\n\t\t\t\tvar el = this || data;\n\n\t\t\t\t// Claim the first handler\n\t\t\t\tif ( rcheckableType.test( el.type ) &&\n\t\t\t\t\tel.click && nodeName( el, \"input\" ) ) {\n\n\t\t\t\t\t// dataPriv.set( el, \"click\", ... )\n\t\t\t\t\tleverageNative( el, \"click\", true );\n\t\t\t\t}\n\n\t\t\t\t// Return false to allow normal processing in the caller\n\t\t\t\treturn false;\n\t\t\t},\n\t\t\ttrigger: function( data ) {\n\n\t\t\t\t// For mutual compressibility with _default, replace `this` access with a local var.\n\t\t\t\t// `|| data` is dead code meant only to preserve the variable through minification.\n\t\t\t\tvar el = this || data;\n\n\t\t\t\t// Force setup before triggering a click\n\t\t\t\tif ( rcheckableType.test( el.type ) &&\n\t\t\t\t\tel.click && nodeName( el, \"input\" ) ) {\n\n\t\t\t\t\tleverageNative( el, \"click\" );\n\t\t\t\t}\n\n\t\t\t\t// Return non-false to allow normal event-path propagation\n\t\t\t\treturn true;\n\t\t\t},\n\n\t\t\t// For cross-browser consistency, suppress native .click() on links\n\t\t\t// Also prevent it if we're currently inside a leveraged native-event stack\n\t\t\t_default: function( event ) {\n\t\t\t\tvar target = event.target;\n\t\t\t\treturn rcheckableType.test( target.type ) &&\n\t\t\t\t\ttarget.click && nodeName( target, \"input\" ) &&\n\t\t\t\t\tdataPriv.get( target, \"click\" ) ||\n\t\t\t\t\tnodeName( target, \"a\" );\n\t\t\t}\n\t\t},\n\n\t\tbeforeunload: {\n\t\t\tpostDispatch: function( event ) {\n\n\t\t\t\t// Support: Firefox 20+\n\t\t\t\t// Firefox doesn't alert if the returnValue field is not set.\n\t\t\t\tif ( event.result !== undefined && event.originalEvent ) {\n\t\t\t\t\tevent.originalEvent.returnValue = event.result;\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t}\n};\n\n// Ensure the presence of an event listener that handles manually-triggered\n// synthetic events by interrupting progress until reinvoked in response to\n// *native* events that it fires directly, ensuring that state changes have\n// already occurred before other listeners are invoked.\nfunction leverageNative( el, type, isSetup ) {\n\n\t// Missing `isSetup` indicates a trigger call, which must force setup through jQuery.event.add\n\tif ( !isSetup ) {\n\t\tif ( dataPriv.get( el, type ) === undefined ) {\n\t\t\tjQuery.event.add( el, type, returnTrue );\n\t\t}\n\t\treturn;\n\t}\n\n\t// Register the controller as a special universal handler for all event namespaces\n\tdataPriv.set( el, type, false );\n\tjQuery.event.add( el, type, {\n\t\tnamespace: false,\n\t\thandler: function( event ) {\n\t\t\tvar result,\n\t\t\t\tsaved = dataPriv.get( this, type );\n\n\t\t\tif ( ( event.isTrigger & 1 ) && this[ type ] ) {\n\n\t\t\t\t// Interrupt processing of the outer synthetic .trigger()ed event\n\t\t\t\tif ( !saved ) {\n\n\t\t\t\t\t// Store arguments for use when handling the inner native event\n\t\t\t\t\t// There will always be at least one argument (an event object), so this array\n\t\t\t\t\t// will not be confused with a leftover capture object.\n\t\t\t\t\tsaved = slice.call( arguments );\n\t\t\t\t\tdataPriv.set( this, type, saved );\n\n\t\t\t\t\t// Trigger the native event and capture its result\n\t\t\t\t\tthis[ type ]();\n\t\t\t\t\tresult = dataPriv.get( this, type );\n\t\t\t\t\tdataPriv.set( this, type, false );\n\n\t\t\t\t\tif ( saved !== result ) {\n\n\t\t\t\t\t\t// Cancel the outer synthetic event\n\t\t\t\t\t\tevent.stopImmediatePropagation();\n\t\t\t\t\t\tevent.preventDefault();\n\n\t\t\t\t\t\treturn result;\n\t\t\t\t\t}\n\n\t\t\t\t// If this is an inner synthetic event for an event with a bubbling surrogate\n\t\t\t\t// (focus or blur), assume that the surrogate already propagated from triggering\n\t\t\t\t// the native event and prevent that from happening again here.\n\t\t\t\t// This technically gets the ordering wrong w.r.t. to `.trigger()` (in which the\n\t\t\t\t// bubbling surrogate propagates *after* the non-bubbling base), but that seems\n\t\t\t\t// less bad than duplication.\n\t\t\t\t} else if ( ( jQuery.event.special[ type ] || {} ).delegateType ) {\n\t\t\t\t\tevent.stopPropagation();\n\t\t\t\t}\n\n\t\t\t// If this is a native event triggered above, everything is now in order\n\t\t\t// Fire an inner synthetic event with the original arguments\n\t\t\t} else if ( saved ) {\n\n\t\t\t\t// ...and capture the result\n\t\t\t\tdataPriv.set( this, type, jQuery.event.trigger(\n\t\t\t\t\tsaved[ 0 ],\n\t\t\t\t\tsaved.slice( 1 ),\n\t\t\t\t\tthis\n\t\t\t\t) );\n\n\t\t\t\t// Abort handling of the native event by all jQuery handlers while allowing\n\t\t\t\t// native handlers on the same element to run. On target, this is achieved\n\t\t\t\t// by stopping immediate propagation just on the jQuery event. However,\n\t\t\t\t// the native event is re-wrapped by a jQuery one on each level of the\n\t\t\t\t// propagation so the only way to stop it for jQuery is to stop it for\n\t\t\t\t// everyone via native `stopPropagation()`. This is not a problem for\n\t\t\t\t// focus/blur which don't bubble, but it does also stop click on checkboxes\n\t\t\t\t// and radios. We accept this limitation.\n\t\t\t\tevent.stopPropagation();\n\t\t\t\tevent.isImmediatePropagationStopped = returnTrue;\n\t\t\t}\n\t\t}\n\t} );\n}\n\njQuery.removeEvent = function( elem, type, handle ) {\n\n\t// This \"if\" is needed for plain objects\n\tif ( elem.removeEventListener ) {\n\t\telem.removeEventListener( type, handle );\n\t}\n};\n\njQuery.Event = function( src, props ) {\n\n\t// Allow instantiation without the 'new' keyword\n\tif ( !( this instanceof jQuery.Event ) ) {\n\t\treturn new jQuery.Event( src, props );\n\t}\n\n\t// Event object\n\tif ( src && src.type ) {\n\t\tthis.originalEvent = src;\n\t\tthis.type = src.type;\n\n\t\t// Events bubbling up the document may have been marked as prevented\n\t\t// by a handler lower down the tree; reflect the correct value.\n\t\tthis.isDefaultPrevented = src.defaultPrevented ||\n\t\t\t\tsrc.defaultPrevented === undefined &&\n\n\t\t\t\t// Support: Android <=2.3 only\n\t\t\t\tsrc.returnValue === false ?\n\t\t\treturnTrue :\n\t\t\treturnFalse;\n\n\t\t// Create target properties\n\t\t// Support: Safari <=6 - 7 only\n\t\t// Target should not be a text node (trac-504, trac-13143)\n\t\tthis.target = ( src.target && src.target.nodeType === 3 ) ?\n\t\t\tsrc.target.parentNode :\n\t\t\tsrc.target;\n\n\t\tthis.currentTarget = src.currentTarget;\n\t\tthis.relatedTarget = src.relatedTarget;\n\n\t// Event type\n\t} else {\n\t\tthis.type = src;\n\t}\n\n\t// Put explicitly provided properties onto the event object\n\tif ( props ) {\n\t\tjQuery.extend( this, props );\n\t}\n\n\t// Create a timestamp if incoming event doesn't have one\n\tthis.timeStamp = src && src.timeStamp || Date.now();\n\n\t// Mark it as fixed\n\tthis[ jQuery.expando ] = true;\n};\n\n// jQuery.Event is based on DOM3 Events as specified by the ECMAScript Language Binding\n// https://www.w3.org/TR/2003/WD-DOM-Level-3-Events-20030331/ecma-script-binding.html\njQuery.Event.prototype = {\n\tconstructor: jQuery.Event,\n\tisDefaultPrevented: returnFalse,\n\tisPropagationStopped: returnFalse,\n\tisImmediatePropagationStopped: returnFalse,\n\tisSimulated: false,\n\n\tpreventDefault: function() {\n\t\tvar e = this.originalEvent;\n\n\t\tthis.isDefaultPrevented = returnTrue;\n\n\t\tif ( e && !this.isSimulated ) {\n\t\t\te.preventDefault();\n\t\t}\n\t},\n\tstopPropagation: function() {\n\t\tvar e = this.originalEvent;\n\n\t\tthis.isPropagationStopped = returnTrue;\n\n\t\tif ( e && !this.isSimulated ) {\n\t\t\te.stopPropagation();\n\t\t}\n\t},\n\tstopImmediatePropagation: function() {\n\t\tvar e = this.originalEvent;\n\n\t\tthis.isImmediatePropagationStopped = returnTrue;\n\n\t\tif ( e && !this.isSimulated ) {\n\t\t\te.stopImmediatePropagation();\n\t\t}\n\n\t\tthis.stopPropagation();\n\t}\n};\n\n// Includes all common event props including KeyEvent and MouseEvent specific props\njQuery.each( {\n\taltKey: true,\n\tbubbles: true,\n\tcancelable: true,\n\tchangedTouches: true,\n\tctrlKey: true,\n\tdetail: true,\n\teventPhase: true,\n\tmetaKey: true,\n\tpageX: true,\n\tpageY: true,\n\tshiftKey: true,\n\tview: true,\n\t\"char\": true,\n\tcode: true,\n\tcharCode: true,\n\tkey: true,\n\tkeyCode: true,\n\tbutton: true,\n\tbuttons: true,\n\tclientX: true,\n\tclientY: true,\n\toffsetX: true,\n\toffsetY: true,\n\tpointerId: true,\n\tpointerType: true,\n\tscreenX: true,\n\tscreenY: true,\n\ttargetTouches: true,\n\ttoElement: true,\n\ttouches: true,\n\twhich: true\n}, jQuery.event.addProp );\n\njQuery.each( { focus: \"focusin\", blur: \"focusout\" }, function( type, delegateType ) {\n\n\tfunction focusMappedHandler( nativeEvent ) {\n\t\tif ( document.documentMode ) {\n\n\t\t\t// Support: IE 11+\n\t\t\t// Attach a single focusin/focusout handler on the document while someone wants\n\t\t\t// focus/blur. This is because the former are synchronous in IE while the latter\n\t\t\t// are async. In other browsers, all those handlers are invoked synchronously.\n\n\t\t\t// `handle` from private data would already wrap the event, but we need\n\t\t\t// to change the `type` here.\n\t\t\tvar handle = dataPriv.get( this, \"handle\" ),\n\t\t\t\tevent = jQuery.event.fix( nativeEvent );\n\t\t\tevent.type = nativeEvent.type === \"focusin\" ? \"focus\" : \"blur\";\n\t\t\tevent.isSimulated = true;\n\n\t\t\t// First, handle focusin/focusout\n\t\t\thandle( nativeEvent );\n\n\t\t\t// ...then, handle focus/blur\n\t\t\t//\n\t\t\t// focus/blur don't bubble while focusin/focusout do; simulate the former by only\n\t\t\t// invoking the handler at the lower level.\n\t\t\tif ( event.target === event.currentTarget ) {\n\n\t\t\t\t// The setup part calls `leverageNative`, which, in turn, calls\n\t\t\t\t// `jQuery.event.add`, so event handle will already have been set\n\t\t\t\t// by this point.\n\t\t\t\thandle( event );\n\t\t\t}\n\t\t} else {\n\n\t\t\t// For non-IE browsers, attach a single capturing handler on the document\n\t\t\t// while someone wants focusin/focusout.\n\t\t\tjQuery.event.simulate( delegateType, nativeEvent.target,\n\t\t\t\tjQuery.event.fix( nativeEvent ) );\n\t\t}\n\t}\n\n\tjQuery.event.special[ type ] = {\n\n\t\t// Utilize native event if possible so blur/focus sequence is correct\n\t\tsetup: function() {\n\n\t\t\tvar attaches;\n\n\t\t\t// Claim the first handler\n\t\t\t// dataPriv.set( this, \"focus\", ... )\n\t\t\t// dataPriv.set( this, \"blur\", ... )\n\t\t\tleverageNative( this, type, true );\n\n\t\t\tif ( document.documentMode ) {\n\n\t\t\t\t// Support: IE 9 - 11+\n\t\t\t\t// We use the same native handler for focusin & focus (and focusout & blur)\n\t\t\t\t// so we need to coordinate setup & teardown parts between those events.\n\t\t\t\t// Use `delegateType` as the key as `type` is already used by `leverageNative`.\n\t\t\t\tattaches = dataPriv.get( this, delegateType );\n\t\t\t\tif ( !attaches ) {\n\t\t\t\t\tthis.addEventListener( delegateType, focusMappedHandler );\n\t\t\t\t}\n\t\t\t\tdataPriv.set( this, delegateType, ( attaches || 0 ) + 1 );\n\t\t\t} else {\n\n\t\t\t\t// Return false to allow normal processing in the caller\n\t\t\t\treturn false;\n\t\t\t}\n\t\t},\n\t\ttrigger: function() {\n\n\t\t\t// Force setup before trigger\n\t\t\tleverageNative( this, type );\n\n\t\t\t// Return non-false to allow normal event-path propagation\n\t\t\treturn true;\n\t\t},\n\n\t\tteardown: function() {\n\t\t\tvar attaches;\n\n\t\t\tif ( document.documentMode ) {\n\t\t\t\tattaches = dataPriv.get( this, delegateType ) - 1;\n\t\t\t\tif ( !attaches ) {\n\t\t\t\t\tthis.removeEventListener( delegateType, focusMappedHandler );\n\t\t\t\t\tdataPriv.remove( this, delegateType );\n\t\t\t\t} else {\n\t\t\t\t\tdataPriv.set( this, delegateType, attaches );\n\t\t\t\t}\n\t\t\t} else {\n\n\t\t\t\t// Return false to indicate standard teardown should be applied\n\t\t\t\treturn false;\n\t\t\t}\n\t\t},\n\n\t\t// Suppress native focus or blur if we're currently inside\n\t\t// a leveraged native-event stack\n\t\t_default: function( event ) {\n\t\t\treturn dataPriv.get( event.target, type );\n\t\t},\n\n\t\tdelegateType: delegateType\n\t};\n\n\t// Support: Firefox <=44\n\t// Firefox doesn't have focus(in | out) events\n\t// Related ticket - https://bugzilla.mozilla.org/show_bug.cgi?id=687787\n\t//\n\t// Support: Chrome <=48 - 49, Safari <=9.0 - 9.1\n\t// focus(in | out) events fire after focus & blur events,\n\t// which is spec violation - http://www.w3.org/TR/DOM-Level-3-Events/#events-focusevent-event-order\n\t// Related ticket - https://bugs.chromium.org/p/chromium/issues/detail?id=449857\n\t//\n\t// Support: IE 9 - 11+\n\t// To preserve relative focusin/focus & focusout/blur event order guaranteed on the 3.x branch,\n\t// attach a single handler for both events in IE.\n\tjQuery.event.special[ delegateType ] = {\n\t\tsetup: function() {\n\n\t\t\t// Handle: regular nodes (via `this.ownerDocument`), window\n\t\t\t// (via `this.document`) & document (via `this`).\n\t\t\tvar doc = this.ownerDocument || this.document || this,\n\t\t\t\tdataHolder = document.documentMode ? this : doc,\n\t\t\t\tattaches = dataPriv.get( dataHolder, delegateType );\n\n\t\t\t// Support: IE 9 - 11+\n\t\t\t// We use the same native handler for focusin & focus (and focusout & blur)\n\t\t\t// so we need to coordinate setup & teardown parts between those events.\n\t\t\t// Use `delegateType` as the key as `type` is already used by `leverageNative`.\n\t\t\tif ( !attaches ) {\n\t\t\t\tif ( document.documentMode ) {\n\t\t\t\t\tthis.addEventListener( delegateType, focusMappedHandler );\n\t\t\t\t} else {\n\t\t\t\t\tdoc.addEventListener( type, focusMappedHandler, true );\n\t\t\t\t}\n\t\t\t}\n\t\t\tdataPriv.set( dataHolder, delegateType, ( attaches || 0 ) + 1 );\n\t\t},\n\t\tteardown: function() {\n\t\t\tvar doc = this.ownerDocument || this.document || this,\n\t\t\t\tdataHolder = document.documentMode ? this : doc,\n\t\t\t\tattaches = dataPriv.get( dataHolder, delegateType ) - 1;\n\n\t\t\tif ( !attaches ) {\n\t\t\t\tif ( document.documentMode ) {\n\t\t\t\t\tthis.removeEventListener( delegateType, focusMappedHandler );\n\t\t\t\t} else {\n\t\t\t\t\tdoc.removeEventListener( type, focusMappedHandler, true );\n\t\t\t\t}\n\t\t\t\tdataPriv.remove( dataHolder, delegateType );\n\t\t\t} else {\n\t\t\t\tdataPriv.set( dataHolder, delegateType, attaches );\n\t\t\t}\n\t\t}\n\t};\n} );\n\n// Create mouseenter/leave events using mouseover/out and event-time checks\n// so that event delegation works in jQuery.\n// Do the same for pointerenter/pointerleave and pointerover/pointerout\n//\n// Support: Safari 7 only\n// Safari sends mouseenter too often; see:\n// https://bugs.chromium.org/p/chromium/issues/detail?id=470258\n// for the description of the bug (it existed in older Chrome versions as well).\njQuery.each( {\n\tmouseenter: \"mouseover\",\n\tmouseleave: \"mouseout\",\n\tpointerenter: \"pointerover\",\n\tpointerleave: \"pointerout\"\n}, function( orig, fix ) {\n\tjQuery.event.special[ orig ] = {\n\t\tdelegateType: fix,\n\t\tbindType: fix,\n\n\t\thandle: function( event ) {\n\t\t\tvar ret,\n\t\t\t\ttarget = this,\n\t\t\t\trelated = event.relatedTarget,\n\t\t\t\thandleObj = event.handleObj;\n\n\t\t\t// For mouseenter/leave call the handler if related is outside the target.\n\t\t\t// NB: No relatedTarget if the mouse left/entered the browser window\n\t\t\tif ( !related || ( related !== target && !jQuery.contains( target, related ) ) ) {\n\t\t\t\tevent.type = handleObj.origType;\n\t\t\t\tret = handleObj.handler.apply( this, arguments );\n\t\t\t\tevent.type = fix;\n\t\t\t}\n\t\t\treturn ret;\n\t\t}\n\t};\n} );\n\njQuery.fn.extend( {\n\n\ton: function( types, selector, data, fn ) {\n\t\treturn on( this, types, selector, data, fn );\n\t},\n\tone: function( types, selector, data, fn ) {\n\t\treturn on( this, types, selector, data, fn, 1 );\n\t},\n\toff: function( types, selector, fn ) {\n\t\tvar handleObj, type;\n\t\tif ( types && types.preventDefault && types.handleObj ) {\n\n\t\t\t// ( event )  dispatched jQuery.Event\n\t\t\thandleObj = types.handleObj;\n\t\t\tjQuery( types.delegateTarget ).off(\n\t\t\t\thandleObj.namespace ?\n\t\t\t\t\thandleObj.origType + \".\" + handleObj.namespace :\n\t\t\t\t\thandleObj.origType,\n\t\t\t\thandleObj.selector,\n\t\t\t\thandleObj.handler\n\t\t\t);\n\t\t\treturn this;\n\t\t}\n\t\tif ( typeof types === \"object\" ) {\n\n\t\t\t// ( types-object [, selector] )\n\t\t\tfor ( type in types ) {\n\t\t\t\tthis.off( type, selector, types[ type ] );\n\t\t\t}\n\t\t\treturn this;\n\t\t}\n\t\tif ( selector === false || typeof selector === \"function\" ) {\n\n\t\t\t// ( types [, fn] )\n\t\t\tfn = selector;\n\t\t\tselector = undefined;\n\t\t}\n\t\tif ( fn === false ) {\n\t\t\tfn = returnFalse;\n\t\t}\n\t\treturn this.each( function() {\n\t\t\tjQuery.event.remove( this, types, fn, selector );\n\t\t} );\n\t}\n} );\n\n\nvar\n\n\t// Support: IE <=10 - 11, Edge 12 - 13 only\n\t// In IE/Edge using regex groups here causes severe slowdowns.\n\t// See https://connect.microsoft.com/IE/feedback/details/1736512/\n\trnoInnerhtml = /<script|<style|<link/i,\n\n\t// checked=\"checked\" or checked\n\trchecked = /checked\\s*(?:[^=]|=\\s*.checked.)/i,\n\n\trcleanScript = /^\\s*<!\\[CDATA\\[|\\]\\]>\\s*$/g;\n\n// Prefer a tbody over its parent table for containing new rows\nfunction manipulationTarget( elem, content ) {\n\tif ( nodeName( elem, \"table\" ) &&\n\t\tnodeName( content.nodeType !== 11 ? content : content.firstChild, \"tr\" ) ) {\n\n\t\treturn jQuery( elem ).children( \"tbody\" )[ 0 ] || elem;\n\t}\n\n\treturn elem;\n}\n\n// Replace/restore the type attribute of script elements for safe DOM manipulation\nfunction disableScript( elem ) {\n\telem.type = ( elem.getAttribute( \"type\" ) !== null ) + \"/\" + elem.type;\n\treturn elem;\n}\nfunction restoreScript( elem ) {\n\tif ( ( elem.type || \"\" ).slice( 0, 5 ) === \"true/\" ) {\n\t\telem.type = elem.type.slice( 5 );\n\t} else {\n\t\telem.removeAttribute( \"type\" );\n\t}\n\n\treturn elem;\n}\n\nfunction cloneCopyEvent( src, dest ) {\n\tvar i, l, type, pdataOld, udataOld, udataCur, events;\n\n\tif ( dest.nodeType !== 1 ) {\n\t\treturn;\n\t}\n\n\t// 1. Copy private data: events, handlers, etc.\n\tif ( dataPriv.hasData( src ) ) {\n\t\tpdataOld = dataPriv.get( src );\n\t\tevents = pdataOld.events;\n\n\t\tif ( events ) {\n\t\t\tdataPriv.remove( dest, \"handle events\" );\n\n\t\t\tfor ( type in events ) {\n\t\t\t\tfor ( i = 0, l = events[ type ].length; i < l; i++ ) {\n\t\t\t\t\tjQuery.event.add( dest, type, events[ type ][ i ] );\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t}\n\n\t// 2. Copy user data\n\tif ( dataUser.hasData( src ) ) {\n\t\tudataOld = dataUser.access( src );\n\t\tudataCur = jQuery.extend( {}, udataOld );\n\n\t\tdataUser.set( dest, udataCur );\n\t}\n}\n\n// Fix IE bugs, see support tests\nfunction fixInput( src, dest ) {\n\tvar nodeName = dest.nodeName.toLowerCase();\n\n\t// Fails to persist the checked state of a cloned checkbox or radio button.\n\tif ( nodeName === \"input\" && rcheckableType.test( src.type ) ) {\n\t\tdest.checked = src.checked;\n\n\t// Fails to return the selected option to the default selected state when cloning options\n\t} else if ( nodeName === \"input\" || nodeName === \"textarea\" ) {\n\t\tdest.defaultValue = src.defaultValue;\n\t}\n}\n\nfunction domManip( collection, args, callback, ignored ) {\n\n\t// Flatten any nested arrays\n\targs = flat( args );\n\n\tvar fragment, first, scripts, hasScripts, node, doc,\n\t\ti = 0,\n\t\tl = collection.length,\n\t\tiNoClone = l - 1,\n\t\tvalue = args[ 0 ],\n\t\tvalueIsFunction = isFunction( value );\n\n\t// We can't cloneNode fragments that contain checked, in WebKit\n\tif ( valueIsFunction ||\n\t\t\t( l > 1 && typeof value === \"string\" &&\n\t\t\t\t!support.checkClone && rchecked.test( value ) ) ) {\n\t\treturn collection.each( function( index ) {\n\t\t\tvar self = collection.eq( index );\n\t\t\tif ( valueIsFunction ) {\n\t\t\t\targs[ 0 ] = value.call( this, index, self.html() );\n\t\t\t}\n\t\t\tdomManip( self, args, callback, ignored );\n\t\t} );\n\t}\n\n\tif ( l ) {\n\t\tfragment = buildFragment( args, collection[ 0 ].ownerDocument, false, collection, ignored );\n\t\tfirst = fragment.firstChild;\n\n\t\tif ( fragment.childNodes.length === 1 ) {\n\t\t\tfragment = first;\n\t\t}\n\n\t\t// Require either new content or an interest in ignored elements to invoke the callback\n\t\tif ( first || ignored ) {\n\t\t\tscripts = jQuery.map( getAll( fragment, \"script\" ), disableScript );\n\t\t\thasScripts = scripts.length;\n\n\t\t\t// Use the original fragment for the last item\n\t\t\t// instead of the first because it can end up\n\t\t\t// being emptied incorrectly in certain situations (trac-8070).\n\t\t\tfor ( ; i < l; i++ ) {\n\t\t\t\tnode = fragment;\n\n\t\t\t\tif ( i !== iNoClone ) {\n\t\t\t\t\tnode = jQuery.clone( node, true, true );\n\n\t\t\t\t\t// Keep references to cloned scripts for later restoration\n\t\t\t\t\tif ( hasScripts ) {\n\n\t\t\t\t\t\t// Support: Android <=4.0 only, PhantomJS 1 only\n\t\t\t\t\t\t// push.apply(_, arraylike) throws on ancient WebKit\n\t\t\t\t\t\tjQuery.merge( scripts, getAll( node, \"script\" ) );\n\t\t\t\t\t}\n\t\t\t\t}\n\n\t\t\t\tcallback.call( collection[ i ], node, i );\n\t\t\t}\n\n\t\t\tif ( hasScripts ) {\n\t\t\t\tdoc = scripts[ scripts.length - 1 ].ownerDocument;\n\n\t\t\t\t// Re-enable scripts\n\t\t\t\tjQuery.map( scripts, restoreScript );\n\n\t\t\t\t// Evaluate executable scripts on first document insertion\n\t\t\t\tfor ( i = 0; i < hasScripts; i++ ) {\n\t\t\t\t\tnode = scripts[ i ];\n\t\t\t\t\tif ( rscriptType.test( node.type || \"\" ) &&\n\t\t\t\t\t\t!dataPriv.access( node, \"globalEval\" ) &&\n\t\t\t\t\t\tjQuery.contains( doc, node ) ) {\n\n\t\t\t\t\t\tif ( node.src && ( node.type || \"\" ).toLowerCase()  !== \"module\" ) {\n\n\t\t\t\t\t\t\t// Optional AJAX dependency, but won't run scripts if not present\n\t\t\t\t\t\t\tif ( jQuery._evalUrl && !node.noModule ) {\n\t\t\t\t\t\t\t\tjQuery._evalUrl( node.src, {\n\t\t\t\t\t\t\t\t\tnonce: node.nonce || node.getAttribute( \"nonce\" )\n\t\t\t\t\t\t\t\t}, doc );\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t} else {\n\n\t\t\t\t\t\t\t// Unwrap a CDATA section containing script contents. This shouldn't be\n\t\t\t\t\t\t\t// needed as in XML documents they're already not visible when\n\t\t\t\t\t\t\t// inspecting element contents and in HTML documents they have no\n\t\t\t\t\t\t\t// meaning but we're preserving that logic for backwards compatibility.\n\t\t\t\t\t\t\t// This will be removed completely in 4.0. See gh-4904.\n\t\t\t\t\t\t\tDOMEval( node.textContent.replace( rcleanScript, \"\" ), node, doc );\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t}\n\n\treturn collection;\n}\n\nfunction remove( elem, selector, keepData ) {\n\tvar node,\n\t\tnodes = selector ? jQuery.filter( selector, elem ) : elem,\n\t\ti = 0;\n\n\tfor ( ; ( node = nodes[ i ] ) != null; i++ ) {\n\t\tif ( !keepData && node.nodeType === 1 ) {\n\t\t\tjQuery.cleanData( getAll( node ) );\n\t\t}\n\n\t\tif ( node.parentNode ) {\n\t\t\tif ( keepData && isAttached( node ) ) {\n\t\t\t\tsetGlobalEval( getAll( node, \"script\" ) );\n\t\t\t}\n\t\t\tnode.parentNode.removeChild( node );\n\t\t}\n\t}\n\n\treturn elem;\n}\n\njQuery.extend( {\n\thtmlPrefilter: function( html ) {\n\t\treturn html;\n\t},\n\n\tclone: function( elem, dataAndEvents, deepDataAndEvents ) {\n\t\tvar i, l, srcElements, destElements,\n\t\t\tclone = elem.cloneNode( true ),\n\t\t\tinPage = isAttached( elem );\n\n\t\t// Fix IE cloning issues\n\t\tif ( !support.noCloneChecked && ( elem.nodeType === 1 || elem.nodeType === 11 ) &&\n\t\t\t\t!jQuery.isXMLDoc( elem ) ) {\n\n\t\t\t// We eschew jQuery#find here for performance reasons:\n\t\t\t// https://jsperf.com/getall-vs-sizzle/2\n\t\t\tdestElements = getAll( clone );\n\t\t\tsrcElements = getAll( elem );\n\n\t\t\tfor ( i = 0, l = srcElements.length; i < l; i++ ) {\n\t\t\t\tfixInput( srcElements[ i ], destElements[ i ] );\n\t\t\t}\n\t\t}\n\n\t\t// Copy the events from the original to the clone\n\t\tif ( dataAndEvents ) {\n\t\t\tif ( deepDataAndEvents ) {\n\t\t\t\tsrcElements = srcElements || getAll( elem );\n\t\t\t\tdestElements = destElements || getAll( clone );\n\n\t\t\t\tfor ( i = 0, l = srcElements.length; i < l; i++ ) {\n\t\t\t\t\tcloneCopyEvent( srcElements[ i ], destElements[ i ] );\n\t\t\t\t}\n\t\t\t} else {\n\t\t\t\tcloneCopyEvent( elem, clone );\n\t\t\t}\n\t\t}\n\n\t\t// Preserve script evaluation history\n\t\tdestElements = getAll( clone, \"script\" );\n\t\tif ( destElements.length > 0 ) {\n\t\t\tsetGlobalEval( destElements, !inPage && getAll( elem, \"script\" ) );\n\t\t}\n\n\t\t// Return the cloned set\n\t\treturn clone;\n\t},\n\n\tcleanData: function( elems ) {\n\t\tvar data, elem, type,\n\t\t\tspecial = jQuery.event.special,\n\t\t\ti = 0;\n\n\t\tfor ( ; ( elem = elems[ i ] ) !== undefined; i++ ) {\n\t\t\tif ( acceptData( elem ) ) {\n\t\t\t\tif ( ( data = elem[ dataPriv.expando ] ) ) {\n\t\t\t\t\tif ( data.events ) {\n\t\t\t\t\t\tfor ( type in data.events ) {\n\t\t\t\t\t\t\tif ( special[ type ] ) {\n\t\t\t\t\t\t\t\tjQuery.event.remove( elem, type );\n\n\t\t\t\t\t\t\t// This is a shortcut to avoid jQuery.event.remove's overhead\n\t\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\t\tjQuery.removeEvent( elem, type, data.handle );\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\n\t\t\t\t\t// Support: Chrome <=35 - 45+\n\t\t\t\t\t// Assign undefined instead of using delete, see Data#remove\n\t\t\t\t\telem[ dataPriv.expando ] = undefined;\n\t\t\t\t}\n\t\t\t\tif ( elem[ dataUser.expando ] ) {\n\n\t\t\t\t\t// Support: Chrome <=35 - 45+\n\t\t\t\t\t// Assign undefined instead of using delete, see Data#remove\n\t\t\t\t\telem[ dataUser.expando ] = undefined;\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t}\n} );\n\njQuery.fn.extend( {\n\tdetach: function( selector ) {\n\t\treturn remove( this, selector, true );\n\t},\n\n\tremove: function( selector ) {\n\t\treturn remove( this, selector );\n\t},\n\n\ttext: function( value ) {\n\t\treturn access( this, function( value ) {\n\t\t\treturn value === undefined ?\n\t\t\t\tjQuery.text( this ) :\n\t\t\t\tthis.empty().each( function() {\n\t\t\t\t\tif ( this.nodeType === 1 || this.nodeType === 11 || this.nodeType === 9 ) {\n\t\t\t\t\t\tthis.textContent = value;\n\t\t\t\t\t}\n\t\t\t\t} );\n\t\t}, null, value, arguments.length );\n\t},\n\n\tappend: function() {\n\t\treturn domManip( this, arguments, function( elem ) {\n\t\t\tif ( this.nodeType === 1 || this.nodeType === 11 || this.nodeType === 9 ) {\n\t\t\t\tvar target = manipulationTarget( this, elem );\n\t\t\t\ttarget.appendChild( elem );\n\t\t\t}\n\t\t} );\n\t},\n\n\tprepend: function() {\n\t\treturn domManip( this, arguments, function( elem ) {\n\t\t\tif ( this.nodeType === 1 || this.nodeType === 11 || this.nodeType === 9 ) {\n\t\t\t\tvar target = manipulationTarget( this, elem );\n\t\t\t\ttarget.insertBefore( elem, target.firstChild );\n\t\t\t}\n\t\t} );\n\t},\n\n\tbefore: function() {\n\t\treturn domManip( this, arguments, function( elem ) {\n\t\t\tif ( this.parentNode ) {\n\t\t\t\tthis.parentNode.insertBefore( elem, this );\n\t\t\t}\n\t\t} );\n\t},\n\n\tafter: function() {\n\t\treturn domManip( this, arguments, function( elem ) {\n\t\t\tif ( this.parentNode ) {\n\t\t\t\tthis.parentNode.insertBefore( elem, this.nextSibling );\n\t\t\t}\n\t\t} );\n\t},\n\n\tempty: function() {\n\t\tvar elem,\n\t\t\ti = 0;\n\n\t\tfor ( ; ( elem = this[ i ] ) != null; i++ ) {\n\t\t\tif ( elem.nodeType === 1 ) {\n\n\t\t\t\t// Prevent memory leaks\n\t\t\t\tjQuery.cleanData( getAll( elem, false ) );\n\n\t\t\t\t// Remove any remaining nodes\n\t\t\t\telem.textContent = \"\";\n\t\t\t}\n\t\t}\n\n\t\treturn this;\n\t},\n\n\tclone: function( dataAndEvents, deepDataAndEvents ) {\n\t\tdataAndEvents = dataAndEvents == null ? false : dataAndEvents;\n\t\tdeepDataAndEvents = deepDataAndEvents == null ? dataAndEvents : deepDataAndEvents;\n\n\t\treturn this.map( function() {\n\t\t\treturn jQuery.clone( this, dataAndEvents, deepDataAndEvents );\n\t\t} );\n\t},\n\n\thtml: function( value ) {\n\t\treturn access( this, function( value ) {\n\t\t\tvar elem = this[ 0 ] || {},\n\t\t\t\ti = 0,\n\t\t\t\tl = this.length;\n\n\t\t\tif ( value === undefined && elem.nodeType === 1 ) {\n\t\t\t\treturn elem.innerHTML;\n\t\t\t}\n\n\t\t\t// See if we can take a shortcut and just use innerHTML\n\t\t\tif ( typeof value === \"string\" && !rnoInnerhtml.test( value ) &&\n\t\t\t\t!wrapMap[ ( rtagName.exec( value ) || [ \"\", \"\" ] )[ 1 ].toLowerCase() ] ) {\n\n\t\t\t\tvalue = jQuery.htmlPrefilter( value );\n\n\t\t\t\ttry {\n\t\t\t\t\tfor ( ; i < l; i++ ) {\n\t\t\t\t\t\telem = this[ i ] || {};\n\n\t\t\t\t\t\t// Remove element nodes and prevent memory leaks\n\t\t\t\t\t\tif ( elem.nodeType === 1 ) {\n\t\t\t\t\t\t\tjQuery.cleanData( getAll( elem, false ) );\n\t\t\t\t\t\t\telem.innerHTML = value;\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\n\t\t\t\t\telem = 0;\n\n\t\t\t\t// If using innerHTML throws an exception, use the fallback method\n\t\t\t\t} catch ( e ) {}\n\t\t\t}\n\n\t\t\tif ( elem ) {\n\t\t\t\tthis.empty().append( value );\n\t\t\t}\n\t\t}, null, value, arguments.length );\n\t},\n\n\treplaceWith: function() {\n\t\tvar ignored = [];\n\n\t\t// Make the changes, replacing each non-ignored context element with the new content\n\t\treturn domManip( this, arguments, function( elem ) {\n\t\t\tvar parent = this.parentNode;\n\n\t\t\tif ( jQuery.inArray( this, ignored ) < 0 ) {\n\t\t\t\tjQuery.cleanData( getAll( this ) );\n\t\t\t\tif ( parent ) {\n\t\t\t\t\tparent.replaceChild( elem, this );\n\t\t\t\t}\n\t\t\t}\n\n\t\t// Force callback invocation\n\t\t}, ignored );\n\t}\n} );\n\njQuery.each( {\n\tappendTo: \"append\",\n\tprependTo: \"prepend\",\n\tinsertBefore: \"before\",\n\tinsertAfter: \"after\",\n\treplaceAll: \"replaceWith\"\n}, function( name, original ) {\n\tjQuery.fn[ name ] = function( selector ) {\n\t\tvar elems,\n\t\t\tret = [],\n\t\t\tinsert = jQuery( selector ),\n\t\t\tlast = insert.length - 1,\n\t\t\ti = 0;\n\n\t\tfor ( ; i <= last; i++ ) {\n\t\t\telems = i === last ? this : this.clone( true );\n\t\t\tjQuery( insert[ i ] )[ original ]( elems );\n\n\t\t\t// Support: Android <=4.0 only, PhantomJS 1 only\n\t\t\t// .get() because push.apply(_, arraylike) throws on ancient WebKit\n\t\t\tpush.apply( ret, elems.get() );\n\t\t}\n\n\t\treturn this.pushStack( ret );\n\t};\n} );\nvar rnumnonpx = new RegExp( \"^(\" + pnum + \")(?!px)[a-z%]+$\", \"i\" );\n\nvar rcustomProp = /^--/;\n\n\nvar getStyles = function( elem ) {\n\n\t\t// Support: IE <=11 only, Firefox <=30 (trac-15098, trac-14150)\n\t\t// IE throws on elements created in popups\n\t\t// FF meanwhile throws on frame elements through \"defaultView.getComputedStyle\"\n\t\tvar view = elem.ownerDocument.defaultView;\n\n\t\tif ( !view || !view.opener ) {\n\t\t\tview = window;\n\t\t}\n\n\t\treturn view.getComputedStyle( elem );\n\t};\n\nvar swap = function( elem, options, callback ) {\n\tvar ret, name,\n\t\told = {};\n\n\t// Remember the old values, and insert the new ones\n\tfor ( name in options ) {\n\t\told[ name ] = elem.style[ name ];\n\t\telem.style[ name ] = options[ name ];\n\t}\n\n\tret = callback.call( elem );\n\n\t// Revert the old values\n\tfor ( name in options ) {\n\t\telem.style[ name ] = old[ name ];\n\t}\n\n\treturn ret;\n};\n\n\nvar rboxStyle = new RegExp( cssExpand.join( \"|\" ), \"i\" );\n\n\n\n( function() {\n\n\t// Executing both pixelPosition & boxSizingReliable tests require only one layout\n\t// so they're executed at the same time to save the second computation.\n\tfunction computeStyleTests() {\n\n\t\t// This is a singleton, we need to execute it only once\n\t\tif ( !div ) {\n\t\t\treturn;\n\t\t}\n\n\t\tcontainer.style.cssText = \"position:absolute;left:-11111px;width:60px;\" +\n\t\t\t\"margin-top:1px;padding:0;border:0\";\n\t\tdiv.style.cssText =\n\t\t\t\"position:relative;display:block;box-sizing:border-box;overflow:scroll;\" +\n\t\t\t\"margin:auto;border:1px;padding:1px;\" +\n\t\t\t\"width:60%;top:1%\";\n\t\tdocumentElement.appendChild( container ).appendChild( div );\n\n\t\tvar divStyle = window.getComputedStyle( div );\n\t\tpixelPositionVal = divStyle.top !== \"1%\";\n\n\t\t// Support: Android 4.0 - 4.3 only, Firefox <=3 - 44\n\t\treliableMarginLeftVal = roundPixelMeasures( divStyle.marginLeft ) === 12;\n\n\t\t// Support: Android 4.0 - 4.3 only, Safari <=9.1 - 10.1, iOS <=7.0 - 9.3\n\t\t// Some styles come back with percentage values, even though they shouldn't\n\t\tdiv.style.right = \"60%\";\n\t\tpixelBoxStylesVal = roundPixelMeasures( divStyle.right ) === 36;\n\n\t\t// Support: IE 9 - 11 only\n\t\t// Detect misreporting of content dimensions for box-sizing:border-box elements\n\t\tboxSizingReliableVal = roundPixelMeasures( divStyle.width ) === 36;\n\n\t\t// Support: IE 9 only\n\t\t// Detect overflow:scroll screwiness (gh-3699)\n\t\t// Support: Chrome <=64\n\t\t// Don't get tricked when zoom affects offsetWidth (gh-4029)\n\t\tdiv.style.position = \"absolute\";\n\t\tscrollboxSizeVal = roundPixelMeasures( div.offsetWidth / 3 ) === 12;\n\n\t\tdocumentElement.removeChild( container );\n\n\t\t// Nullify the div so it wouldn't be stored in the memory and\n\t\t// it will also be a sign that checks already performed\n\t\tdiv = null;\n\t}\n\n\tfunction roundPixelMeasures( measure ) {\n\t\treturn Math.round( parseFloat( measure ) );\n\t}\n\n\tvar pixelPositionVal, boxSizingReliableVal, scrollboxSizeVal, pixelBoxStylesVal,\n\t\treliableTrDimensionsVal, reliableMarginLeftVal,\n\t\tcontainer = document.createElement( \"div\" ),\n\t\tdiv = document.createElement( \"div\" );\n\n\t// Finish early in limited (non-browser) environments\n\tif ( !div.style ) {\n\t\treturn;\n\t}\n\n\t// Support: IE <=9 - 11 only\n\t// Style of cloned element affects source element cloned (trac-8908)\n\tdiv.style.backgroundClip = \"content-box\";\n\tdiv.cloneNode( true ).style.backgroundClip = \"\";\n\tsupport.clearCloneStyle = div.style.backgroundClip === \"content-box\";\n\n\tjQuery.extend( support, {\n\t\tboxSizingReliable: function() {\n\t\t\tcomputeStyleTests();\n\t\t\treturn boxSizingReliableVal;\n\t\t},\n\t\tpixelBoxStyles: function() {\n\t\t\tcomputeStyleTests();\n\t\t\treturn pixelBoxStylesVal;\n\t\t},\n\t\tpixelPosition: function() {\n\t\t\tcomputeStyleTests();\n\t\t\treturn pixelPositionVal;\n\t\t},\n\t\treliableMarginLeft: function() {\n\t\t\tcomputeStyleTests();\n\t\t\treturn reliableMarginLeftVal;\n\t\t},\n\t\tscrollboxSize: function() {\n\t\t\tcomputeStyleTests();\n\t\t\treturn scrollboxSizeVal;\n\t\t},\n\n\t\t// Support: IE 9 - 11+, Edge 15 - 18+\n\t\t// IE/Edge misreport `getComputedStyle` of table rows with width/height\n\t\t// set in CSS while `offset*` properties report correct values.\n\t\t// Behavior in IE 9 is more subtle than in newer versions & it passes\n\t\t// some versions of this test; make sure not to make it pass there!\n\t\t//\n\t\t// Support: Firefox 70+\n\t\t// Only Firefox includes border widths\n\t\t// in computed dimensions. (gh-4529)\n\t\treliableTrDimensions: function() {\n\t\t\tvar table, tr, trChild, trStyle;\n\t\t\tif ( reliableTrDimensionsVal == null ) {\n\t\t\t\ttable = document.createElement( \"table\" );\n\t\t\t\ttr = document.createElement( \"tr\" );\n\t\t\t\ttrChild = document.createElement( \"div\" );\n\n\t\t\t\ttable.style.cssText = \"position:absolute;left:-11111px;border-collapse:separate\";\n\t\t\t\ttr.style.cssText = \"box-sizing:content-box;border:1px solid\";\n\n\t\t\t\t// Support: Chrome 86+\n\t\t\t\t// Height set through cssText does not get applied.\n\t\t\t\t// Computed height then comes back as 0.\n\t\t\t\ttr.style.height = \"1px\";\n\t\t\t\ttrChild.style.height = \"9px\";\n\n\t\t\t\t// Support: Android 8 Chrome 86+\n\t\t\t\t// In our bodyBackground.html iframe,\n\t\t\t\t// display for all div elements is set to \"inline\",\n\t\t\t\t// which causes a problem only in Android 8 Chrome 86.\n\t\t\t\t// Ensuring the div is `display: block`\n\t\t\t\t// gets around this issue.\n\t\t\t\ttrChild.style.display = \"block\";\n\n\t\t\t\tdocumentElement\n\t\t\t\t\t.appendChild( table )\n\t\t\t\t\t.appendChild( tr )\n\t\t\t\t\t.appendChild( trChild );\n\n\t\t\t\ttrStyle = window.getComputedStyle( tr );\n\t\t\t\treliableTrDimensionsVal = ( parseInt( trStyle.height, 10 ) +\n\t\t\t\t\tparseInt( trStyle.borderTopWidth, 10 ) +\n\t\t\t\t\tparseInt( trStyle.borderBottomWidth, 10 ) ) === tr.offsetHeight;\n\n\t\t\t\tdocumentElement.removeChild( table );\n\t\t\t}\n\t\t\treturn reliableTrDimensionsVal;\n\t\t}\n\t} );\n} )();\n\n\nfunction curCSS( elem, name, computed ) {\n\tvar width, minWidth, maxWidth, ret,\n\t\tisCustomProp = rcustomProp.test( name ),\n\n\t\t// Support: Firefox 51+\n\t\t// Retrieving style before computed somehow\n\t\t// fixes an issue with getting wrong values\n\t\t// on detached elements\n\t\tstyle = elem.style;\n\n\tcomputed = computed || getStyles( elem );\n\n\t// getPropertyValue is needed for:\n\t//   .css('filter') (IE 9 only, trac-12537)\n\t//   .css('--customProperty) (gh-3144)\n\tif ( computed ) {\n\n\t\t// Support: IE <=9 - 11+\n\t\t// IE only supports `\"float\"` in `getPropertyValue`; in computed styles\n\t\t// it's only available as `\"cssFloat\"`. We no longer modify properties\n\t\t// sent to `.css()` apart from camelCasing, so we need to check both.\n\t\t// Normally, this would create difference in behavior: if\n\t\t// `getPropertyValue` returns an empty string, the value returned\n\t\t// by `.css()` would be `undefined`. This is usually the case for\n\t\t// disconnected elements. However, in IE even disconnected elements\n\t\t// with no styles return `\"none\"` for `getPropertyValue( \"float\" )`\n\t\tret = computed.getPropertyValue( name ) || computed[ name ];\n\n\t\tif ( isCustomProp && ret ) {\n\n\t\t\t// Support: Firefox 105+, Chrome <=105+\n\t\t\t// Spec requires trimming whitespace for custom properties (gh-4926).\n\t\t\t// Firefox only trims leading whitespace. Chrome just collapses\n\t\t\t// both leading & trailing whitespace to a single space.\n\t\t\t//\n\t\t\t// Fall back to `undefined` if empty string returned.\n\t\t\t// This collapses a missing definition with property defined\n\t\t\t// and set to an empty string but there's no standard API\n\t\t\t// allowing us to differentiate them without a performance penalty\n\t\t\t// and returning `undefined` aligns with older jQuery.\n\t\t\t//\n\t\t\t// rtrimCSS treats U+000D CARRIAGE RETURN and U+000C FORM FEED\n\t\t\t// as whitespace while CSS does not, but this is not a problem\n\t\t\t// because CSS preprocessing replaces them with U+000A LINE FEED\n\t\t\t// (which *is* CSS whitespace)\n\t\t\t// https://www.w3.org/TR/css-syntax-3/#input-preprocessing\n\t\t\tret = ret.replace( rtrimCSS, \"$1\" ) || undefined;\n\t\t}\n\n\t\tif ( ret === \"\" && !isAttached( elem ) ) {\n\t\t\tret = jQuery.style( elem, name );\n\t\t}\n\n\t\t// A tribute to the \"awesome hack by Dean Edwards\"\n\t\t// Android Browser returns percentage for some values,\n\t\t// but width seems to be reliably pixels.\n\t\t// This is against the CSSOM draft spec:\n\t\t// https://drafts.csswg.org/cssom/#resolved-values\n\t\tif ( !support.pixelBoxStyles() && rnumnonpx.test( ret ) && rboxStyle.test( name ) ) {\n\n\t\t\t// Remember the original values\n\t\t\twidth = style.width;\n\t\t\tminWidth = style.minWidth;\n\t\t\tmaxWidth = style.maxWidth;\n\n\t\t\t// Put in the new values to get a computed value out\n\t\t\tstyle.minWidth = style.maxWidth = style.width = ret;\n\t\t\tret = computed.width;\n\n\t\t\t// Revert the changed values\n\t\t\tstyle.width = width;\n\t\t\tstyle.minWidth = minWidth;\n\t\t\tstyle.maxWidth = maxWidth;\n\t\t}\n\t}\n\n\treturn ret !== undefined ?\n\n\t\t// Support: IE <=9 - 11 only\n\t\t// IE returns zIndex value as an integer.\n\t\tret + \"\" :\n\t\tret;\n}\n\n\nfunction addGetHookIf( conditionFn, hookFn ) {\n\n\t// Define the hook, we'll check on the first run if it's really needed.\n\treturn {\n\t\tget: function() {\n\t\t\tif ( conditionFn() ) {\n\n\t\t\t\t// Hook not needed (or it's not possible to use it due\n\t\t\t\t// to missing dependency), remove it.\n\t\t\t\tdelete this.get;\n\t\t\t\treturn;\n\t\t\t}\n\n\t\t\t// Hook needed; redefine it so that the support test is not executed again.\n\t\t\treturn ( this.get = hookFn ).apply( this, arguments );\n\t\t}\n\t};\n}\n\n\nvar cssPrefixes = [ \"Webkit\", \"Moz\", \"ms\" ],\n\temptyStyle = document.createElement( \"div\" ).style,\n\tvendorProps = {};\n\n// Return a vendor-prefixed property or undefined\nfunction vendorPropName( name ) {\n\n\t// Check for vendor prefixed names\n\tvar capName = name[ 0 ].toUpperCase() + name.slice( 1 ),\n\t\ti = cssPrefixes.length;\n\n\twhile ( i-- ) {\n\t\tname = cssPrefixes[ i ] + capName;\n\t\tif ( name in emptyStyle ) {\n\t\t\treturn name;\n\t\t}\n\t}\n}\n\n// Return a potentially-mapped jQuery.cssProps or vendor prefixed property\nfunction finalPropName( name ) {\n\tvar final = jQuery.cssProps[ name ] || vendorProps[ name ];\n\n\tif ( final ) {\n\t\treturn final;\n\t}\n\tif ( name in emptyStyle ) {\n\t\treturn name;\n\t}\n\treturn vendorProps[ name ] = vendorPropName( name ) || name;\n}\n\n\nvar\n\n\t// Swappable if display is none or starts with table\n\t// except \"table\", \"table-cell\", or \"table-caption\"\n\t// See here for display values: https://developer.mozilla.org/en-US/docs/CSS/display\n\trdisplayswap = /^(none|table(?!-c[ea]).+)/,\n\tcssShow = { position: \"absolute\", visibility: \"hidden\", display: \"block\" },\n\tcssNormalTransform = {\n\t\tletterSpacing: \"0\",\n\t\tfontWeight: \"400\"\n\t};\n\nfunction setPositiveNumber( _elem, value, subtract ) {\n\n\t// Any relative (+/-) values have already been\n\t// normalized at this point\n\tvar matches = rcssNum.exec( value );\n\treturn matches ?\n\n\t\t// Guard against undefined \"subtract\", e.g., when used as in cssHooks\n\t\tMath.max( 0, matches[ 2 ] - ( subtract || 0 ) ) + ( matches[ 3 ] || \"px\" ) :\n\t\tvalue;\n}\n\nfunction boxModelAdjustment( elem, dimension, box, isBorderBox, styles, computedVal ) {\n\tvar i = dimension === \"width\" ? 1 : 0,\n\t\textra = 0,\n\t\tdelta = 0,\n\t\tmarginDelta = 0;\n\n\t// Adjustment may not be necessary\n\tif ( box === ( isBorderBox ? \"border\" : \"content\" ) ) {\n\t\treturn 0;\n\t}\n\n\tfor ( ; i < 4; i += 2 ) {\n\n\t\t// Both box models exclude margin\n\t\t// Count margin delta separately to only add it after scroll gutter adjustment.\n\t\t// This is needed to make negative margins work with `outerHeight( true )` (gh-3982).\n\t\tif ( box === \"margin\" ) {\n\t\t\tmarginDelta += jQuery.css( elem, box + cssExpand[ i ], true, styles );\n\t\t}\n\n\t\t// If we get here with a content-box, we're seeking \"padding\" or \"border\" or \"margin\"\n\t\tif ( !isBorderBox ) {\n\n\t\t\t// Add padding\n\t\t\tdelta += jQuery.css( elem, \"padding\" + cssExpand[ i ], true, styles );\n\n\t\t\t// For \"border\" or \"margin\", add border\n\t\t\tif ( box !== \"padding\" ) {\n\t\t\t\tdelta += jQuery.css( elem, \"border\" + cssExpand[ i ] + \"Width\", true, styles );\n\n\t\t\t// But still keep track of it otherwise\n\t\t\t} else {\n\t\t\t\textra += jQuery.css( elem, \"border\" + cssExpand[ i ] + \"Width\", true, styles );\n\t\t\t}\n\n\t\t// If we get here with a border-box (content + padding + border), we're seeking \"content\" or\n\t\t// \"padding\" or \"margin\"\n\t\t} else {\n\n\t\t\t// For \"content\", subtract padding\n\t\t\tif ( box === \"content\" ) {\n\t\t\t\tdelta -= jQuery.css( elem, \"padding\" + cssExpand[ i ], true, styles );\n\t\t\t}\n\n\t\t\t// For \"content\" or \"padding\", subtract border\n\t\t\tif ( box !== \"margin\" ) {\n\t\t\t\tdelta -= jQuery.css( elem, \"border\" + cssExpand[ i ] + \"Width\", true, styles );\n\t\t\t}\n\t\t}\n\t}\n\n\t// Account for positive content-box scroll gutter when requested by providing computedVal\n\tif ( !isBorderBox && computedVal >= 0 ) {\n\n\t\t// offsetWidth/offsetHeight is a rounded sum of content, padding, scroll gutter, and border\n\t\t// Assuming integer scroll gutter, subtract the rest and round down\n\t\tdelta += Math.max( 0, Math.ceil(\n\t\t\telem[ \"offset\" + dimension[ 0 ].toUpperCase() + dimension.slice( 1 ) ] -\n\t\t\tcomputedVal -\n\t\t\tdelta -\n\t\t\textra -\n\t\t\t0.5\n\n\t\t// If offsetWidth/offsetHeight is unknown, then we can't determine content-box scroll gutter\n\t\t// Use an explicit zero to avoid NaN (gh-3964)\n\t\t) ) || 0;\n\t}\n\n\treturn delta + marginDelta;\n}\n\nfunction getWidthOrHeight( elem, dimension, extra ) {\n\n\t// Start with computed style\n\tvar styles = getStyles( elem ),\n\n\t\t// To avoid forcing a reflow, only fetch boxSizing if we need it (gh-4322).\n\t\t// Fake content-box until we know it's needed to know the true value.\n\t\tboxSizingNeeded = !support.boxSizingReliable() || extra,\n\t\tisBorderBox = boxSizingNeeded &&\n\t\t\tjQuery.css( elem, \"boxSizing\", false, styles ) === \"border-box\",\n\t\tvalueIsBorderBox = isBorderBox,\n\n\t\tval = curCSS( elem, dimension, styles ),\n\t\toffsetProp = \"offset\" + dimension[ 0 ].toUpperCase() + dimension.slice( 1 );\n\n\t// Support: Firefox <=54\n\t// Return a confounding non-pixel value or feign ignorance, as appropriate.\n\tif ( rnumnonpx.test( val ) ) {\n\t\tif ( !extra ) {\n\t\t\treturn val;\n\t\t}\n\t\tval = \"auto\";\n\t}\n\n\n\t// Support: IE 9 - 11 only\n\t// Use offsetWidth/offsetHeight for when box sizing is unreliable.\n\t// In those cases, the computed value can be trusted to be border-box.\n\tif ( ( !support.boxSizingReliable() && isBorderBox ||\n\n\t\t// Support: IE 10 - 11+, Edge 15 - 18+\n\t\t// IE/Edge misreport `getComputedStyle` of table rows with width/height\n\t\t// set in CSS while `offset*` properties report correct values.\n\t\t// Interestingly, in some cases IE 9 doesn't suffer from this issue.\n\t\t!support.reliableTrDimensions() && nodeName( elem, \"tr\" ) ||\n\n\t\t// Fall back to offsetWidth/offsetHeight when value is \"auto\"\n\t\t// This happens for inline elements with no explicit setting (gh-3571)\n\t\tval === \"auto\" ||\n\n\t\t// Support: Android <=4.1 - 4.3 only\n\t\t// Also use offsetWidth/offsetHeight for misreported inline dimensions (gh-3602)\n\t\t!parseFloat( val ) && jQuery.css( elem, \"display\", false, styles ) === \"inline\" ) &&\n\n\t\t// Make sure the element is visible & connected\n\t\telem.getClientRects().length ) {\n\n\t\tisBorderBox = jQuery.css( elem, \"boxSizing\", false, styles ) === \"border-box\";\n\n\t\t// Where available, offsetWidth/offsetHeight approximate border box dimensions.\n\t\t// Where not available (e.g., SVG), assume unreliable box-sizing and interpret the\n\t\t// retrieved value as a content box dimension.\n\t\tvalueIsBorderBox = offsetProp in elem;\n\t\tif ( valueIsBorderBox ) {\n\t\t\tval = elem[ offsetProp ];\n\t\t}\n\t}\n\n\t// Normalize \"\" and auto\n\tval = parseFloat( val ) || 0;\n\n\t// Adjust for the element's box model\n\treturn ( val +\n\t\tboxModelAdjustment(\n\t\t\telem,\n\t\t\tdimension,\n\t\t\textra || ( isBorderBox ? \"border\" : \"content\" ),\n\t\t\tvalueIsBorderBox,\n\t\t\tstyles,\n\n\t\t\t// Provide the current computed size to request scroll gutter calculation (gh-3589)\n\t\t\tval\n\t\t)\n\t) + \"px\";\n}\n\njQuery.extend( {\n\n\t// Add in style property hooks for overriding the default\n\t// behavior of getting and setting a style property\n\tcssHooks: {\n\t\topacity: {\n\t\t\tget: function( elem, computed ) {\n\t\t\t\tif ( computed ) {\n\n\t\t\t\t\t// We should always get a number back from opacity\n\t\t\t\t\tvar ret = curCSS( elem, \"opacity\" );\n\t\t\t\t\treturn ret === \"\" ? \"1\" : ret;\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t},\n\n\t// Don't automatically add \"px\" to these possibly-unitless properties\n\tcssNumber: {\n\t\tanimationIterationCount: true,\n\t\taspectRatio: true,\n\t\tborderImageSlice: true,\n\t\tcolumnCount: true,\n\t\tflexGrow: true,\n\t\tflexShrink: true,\n\t\tfontWeight: true,\n\t\tgridArea: true,\n\t\tgridColumn: true,\n\t\tgridColumnEnd: true,\n\t\tgridColumnStart: true,\n\t\tgridRow: true,\n\t\tgridRowEnd: true,\n\t\tgridRowStart: true,\n\t\tlineHeight: true,\n\t\topacity: true,\n\t\torder: true,\n\t\torphans: true,\n\t\tscale: true,\n\t\twidows: true,\n\t\tzIndex: true,\n\t\tzoom: true,\n\n\t\t// SVG-related\n\t\tfillOpacity: true,\n\t\tfloodOpacity: true,\n\t\tstopOpacity: true,\n\t\tstrokeMiterlimit: true,\n\t\tstrokeOpacity: true\n\t},\n\n\t// Add in properties whose names you wish to fix before\n\t// setting or getting the value\n\tcssProps: {},\n\n\t// Get and set the style property on a DOM Node\n\tstyle: function( elem, name, value, extra ) {\n\n\t\t// Don't set styles on text and comment nodes\n\t\tif ( !elem || elem.nodeType === 3 || elem.nodeType === 8 || !elem.style ) {\n\t\t\treturn;\n\t\t}\n\n\t\t// Make sure that we're working with the right name\n\t\tvar ret, type, hooks,\n\t\t\torigName = camelCase( name ),\n\t\t\tisCustomProp = rcustomProp.test( name ),\n\t\t\tstyle = elem.style;\n\n\t\t// Make sure that we're working with the right name. We don't\n\t\t// want to query the value if it is a CSS custom property\n\t\t// since they are user-defined.\n\t\tif ( !isCustomProp ) {\n\t\t\tname = finalPropName( origName );\n\t\t}\n\n\t\t// Gets hook for the prefixed version, then unprefixed version\n\t\thooks = jQuery.cssHooks[ name ] || jQuery.cssHooks[ origName ];\n\n\t\t// Check if we're setting a value\n\t\tif ( value !== undefined ) {\n\t\t\ttype = typeof value;\n\n\t\t\t// Convert \"+=\" or \"-=\" to relative numbers (trac-7345)\n\t\t\tif ( type === \"string\" && ( ret = rcssNum.exec( value ) ) && ret[ 1 ] ) {\n\t\t\t\tvalue = adjustCSS( elem, name, ret );\n\n\t\t\t\t// Fixes bug trac-9237\n\t\t\t\ttype = \"number\";\n\t\t\t}\n\n\t\t\t// Make sure that null and NaN values aren't set (trac-7116)\n\t\t\tif ( value == null || value !== value ) {\n\t\t\t\treturn;\n\t\t\t}\n\n\t\t\t// If a number was passed in, add the unit (except for certain CSS properties)\n\t\t\t// The isCustomProp check can be removed in jQuery 4.0 when we only auto-append\n\t\t\t// \"px\" to a few hardcoded values.\n\t\t\tif ( type === \"number\" && !isCustomProp ) {\n\t\t\t\tvalue += ret && ret[ 3 ] || ( jQuery.cssNumber[ origName ] ? \"\" : \"px\" );\n\t\t\t}\n\n\t\t\t// background-* props affect original clone's values\n\t\t\tif ( !support.clearCloneStyle && value === \"\" && name.indexOf( \"background\" ) === 0 ) {\n\t\t\t\tstyle[ name ] = \"inherit\";\n\t\t\t}\n\n\t\t\t// If a hook was provided, use that value, otherwise just set the specified value\n\t\t\tif ( !hooks || !( \"set\" in hooks ) ||\n\t\t\t\t( value = hooks.set( elem, value, extra ) ) !== undefined ) {\n\n\t\t\t\tif ( isCustomProp ) {\n\t\t\t\t\tstyle.setProperty( name, value );\n\t\t\t\t} else {\n\t\t\t\t\tstyle[ name ] = value;\n\t\t\t\t}\n\t\t\t}\n\n\t\t} else {\n\n\t\t\t// If a hook was provided get the non-computed value from there\n\t\t\tif ( hooks && \"get\" in hooks &&\n\t\t\t\t( ret = hooks.get( elem, false, extra ) ) !== undefined ) {\n\n\t\t\t\treturn ret;\n\t\t\t}\n\n\t\t\t// Otherwise just get the value from the style object\n\t\t\treturn style[ name ];\n\t\t}\n\t},\n\n\tcss: function( elem, name, extra, styles ) {\n\t\tvar val, num, hooks,\n\t\t\torigName = camelCase( name ),\n\t\t\tisCustomProp = rcustomProp.test( name );\n\n\t\t// Make sure that we're working with the right name. We don't\n\t\t// want to modify the value if it is a CSS custom property\n\t\t// since they are user-defined.\n\t\tif ( !isCustomProp ) {\n\t\t\tname = finalPropName( origName );\n\t\t}\n\n\t\t// Try prefixed name followed by the unprefixed name\n\t\thooks = jQuery.cssHooks[ name ] || jQuery.cssHooks[ origName ];\n\n\t\t// If a hook was provided get the computed value from there\n\t\tif ( hooks && \"get\" in hooks ) {\n\t\t\tval = hooks.get( elem, true, extra );\n\t\t}\n\n\t\t// Otherwise, if a way to get the computed value exists, use that\n\t\tif ( val === undefined ) {\n\t\t\tval = curCSS( elem, name, styles );\n\t\t}\n\n\t\t// Convert \"normal\" to computed value\n\t\tif ( val === \"normal\" && name in cssNormalTransform ) {\n\t\t\tval = cssNormalTransform[ name ];\n\t\t}\n\n\t\t// Make numeric if forced or a qualifier was provided and val looks numeric\n\t\tif ( extra === \"\" || extra ) {\n\t\t\tnum = parseFloat( val );\n\t\t\treturn extra === true || isFinite( num ) ? num || 0 : val;\n\t\t}\n\n\t\treturn val;\n\t}\n} );\n\njQuery.each( [ \"height\", \"width\" ], function( _i, dimension ) {\n\tjQuery.cssHooks[ dimension ] = {\n\t\tget: function( elem, computed, extra ) {\n\t\t\tif ( computed ) {\n\n\t\t\t\t// Certain elements can have dimension info if we invisibly show them\n\t\t\t\t// but it must have a current display style that would benefit\n\t\t\t\treturn rdisplayswap.test( jQuery.css( elem, \"display\" ) ) &&\n\n\t\t\t\t\t// Support: Safari 8+\n\t\t\t\t\t// Table columns in Safari have non-zero offsetWidth & zero\n\t\t\t\t\t// getBoundingClientRect().width unless display is changed.\n\t\t\t\t\t// Support: IE <=11 only\n\t\t\t\t\t// Running getBoundingClientRect on a disconnected node\n\t\t\t\t\t// in IE throws an error.\n\t\t\t\t\t( !elem.getClientRects().length || !elem.getBoundingClientRect().width ) ?\n\t\t\t\t\tswap( elem, cssShow, function() {\n\t\t\t\t\t\treturn getWidthOrHeight( elem, dimension, extra );\n\t\t\t\t\t} ) :\n\t\t\t\t\tgetWidthOrHeight( elem, dimension, extra );\n\t\t\t}\n\t\t},\n\n\t\tset: function( elem, value, extra ) {\n\t\t\tvar matches,\n\t\t\t\tstyles = getStyles( elem ),\n\n\t\t\t\t// Only read styles.position if the test has a chance to fail\n\t\t\t\t// to avoid forcing a reflow.\n\t\t\t\tscrollboxSizeBuggy = !support.scrollboxSize() &&\n\t\t\t\t\tstyles.position === \"absolute\",\n\n\t\t\t\t// To avoid forcing a reflow, only fetch boxSizing if we need it (gh-3991)\n\t\t\t\tboxSizingNeeded = scrollboxSizeBuggy || extra,\n\t\t\t\tisBorderBox = boxSizingNeeded &&\n\t\t\t\t\tjQuery.css( elem, \"boxSizing\", false, styles ) === \"border-box\",\n\t\t\t\tsubtract = extra ?\n\t\t\t\t\tboxModelAdjustment(\n\t\t\t\t\t\telem,\n\t\t\t\t\t\tdimension,\n\t\t\t\t\t\textra,\n\t\t\t\t\t\tisBorderBox,\n\t\t\t\t\t\tstyles\n\t\t\t\t\t) :\n\t\t\t\t\t0;\n\n\t\t\t// Account for unreliable border-box dimensions by comparing offset* to computed and\n\t\t\t// faking a content-box to get border and padding (gh-3699)\n\t\t\tif ( isBorderBox && scrollboxSizeBuggy ) {\n\t\t\t\tsubtract -= Math.ceil(\n\t\t\t\t\telem[ \"offset\" + dimension[ 0 ].toUpperCase() + dimension.slice( 1 ) ] -\n\t\t\t\t\tparseFloat( styles[ dimension ] ) -\n\t\t\t\t\tboxModelAdjustment( elem, dimension, \"border\", false, styles ) -\n\t\t\t\t\t0.5\n\t\t\t\t);\n\t\t\t}\n\n\t\t\t// Convert to pixels if value adjustment is needed\n\t\t\tif ( subtract && ( matches = rcssNum.exec( value ) ) &&\n\t\t\t\t( matches[ 3 ] || \"px\" ) !== \"px\" ) {\n\n\t\t\t\telem.style[ dimension ] = value;\n\t\t\t\tvalue = jQuery.css( elem, dimension );\n\t\t\t}\n\n\t\t\treturn setPositiveNumber( elem, value, subtract );\n\t\t}\n\t};\n} );\n\njQuery.cssHooks.marginLeft = addGetHookIf( support.reliableMarginLeft,\n\tfunction( elem, computed ) {\n\t\tif ( computed ) {\n\t\t\treturn ( parseFloat( curCSS( elem, \"marginLeft\" ) ) ||\n\t\t\t\telem.getBoundingClientRect().left -\n\t\t\t\t\tswap( elem, { marginLeft: 0 }, function() {\n\t\t\t\t\t\treturn elem.getBoundingClientRect().left;\n\t\t\t\t\t} )\n\t\t\t) + \"px\";\n\t\t}\n\t}\n);\n\n// These hooks are used by animate to expand properties\njQuery.each( {\n\tmargin: \"\",\n\tpadding: \"\",\n\tborder: \"Width\"\n}, function( prefix, suffix ) {\n\tjQuery.cssHooks[ prefix + suffix ] = {\n\t\texpand: function( value ) {\n\t\t\tvar i = 0,\n\t\t\t\texpanded = {},\n\n\t\t\t\t// Assumes a single number if not a string\n\t\t\t\tparts = typeof value === \"string\" ? value.split( \" \" ) : [ value ];\n\n\t\t\tfor ( ; i < 4; i++ ) {\n\t\t\t\texpanded[ prefix + cssExpand[ i ] + suffix ] =\n\t\t\t\t\tparts[ i ] || parts[ i - 2 ] || parts[ 0 ];\n\t\t\t}\n\n\t\t\treturn expanded;\n\t\t}\n\t};\n\n\tif ( prefix !== \"margin\" ) {\n\t\tjQuery.cssHooks[ prefix + suffix ].set = setPositiveNumber;\n\t}\n} );\n\njQuery.fn.extend( {\n\tcss: function( name, value ) {\n\t\treturn access( this, function( elem, name, value ) {\n\t\t\tvar styles, len,\n\t\t\t\tmap = {},\n\t\t\t\ti = 0;\n\n\t\t\tif ( Array.isArray( name ) ) {\n\t\t\t\tstyles = getStyles( elem );\n\t\t\t\tlen = name.length;\n\n\t\t\t\tfor ( ; i < len; i++ ) {\n\t\t\t\t\tmap[ name[ i ] ] = jQuery.css( elem, name[ i ], false, styles );\n\t\t\t\t}\n\n\t\t\t\treturn map;\n\t\t\t}\n\n\t\t\treturn value !== undefined ?\n\t\t\t\tjQuery.style( elem, name, value ) :\n\t\t\t\tjQuery.css( elem, name );\n\t\t}, name, value, arguments.length > 1 );\n\t}\n} );\n\n\nfunction Tween( elem, options, prop, end, easing ) {\n\treturn new Tween.prototype.init( elem, options, prop, end, easing );\n}\njQuery.Tween = Tween;\n\nTween.prototype = {\n\tconstructor: Tween,\n\tinit: function( elem, options, prop, end, easing, unit ) {\n\t\tthis.elem = elem;\n\t\tthis.prop = prop;\n\t\tthis.easing = easing || jQuery.easing._default;\n\t\tthis.options = options;\n\t\tthis.start = this.now = this.cur();\n\t\tthis.end = end;\n\t\tthis.unit = unit || ( jQuery.cssNumber[ prop ] ? \"\" : \"px\" );\n\t},\n\tcur: function() {\n\t\tvar hooks = Tween.propHooks[ this.prop ];\n\n\t\treturn hooks && hooks.get ?\n\t\t\thooks.get( this ) :\n\t\t\tTween.propHooks._default.get( this );\n\t},\n\trun: function( percent ) {\n\t\tvar eased,\n\t\t\thooks = Tween.propHooks[ this.prop ];\n\n\t\tif ( this.options.duration ) {\n\t\t\tthis.pos = eased = jQuery.easing[ this.easing ](\n\t\t\t\tpercent, this.options.duration * percent, 0, 1, this.options.duration\n\t\t\t);\n\t\t} else {\n\t\t\tthis.pos = eased = percent;\n\t\t}\n\t\tthis.now = ( this.end - this.start ) * eased + this.start;\n\n\t\tif ( this.options.step ) {\n\t\t\tthis.options.step.call( this.elem, this.now, this );\n\t\t}\n\n\t\tif ( hooks && hooks.set ) {\n\t\t\thooks.set( this );\n\t\t} else {\n\t\t\tTween.propHooks._default.set( this );\n\t\t}\n\t\treturn this;\n\t}\n};\n\nTween.prototype.init.prototype = Tween.prototype;\n\nTween.propHooks = {\n\t_default: {\n\t\tget: function( tween ) {\n\t\t\tvar result;\n\n\t\t\t// Use a property on the element directly when it is not a DOM element,\n\t\t\t// or when there is no matching style property that exists.\n\t\t\tif ( tween.elem.nodeType !== 1 ||\n\t\t\t\ttween.elem[ tween.prop ] != null && tween.elem.style[ tween.prop ] == null ) {\n\t\t\t\treturn tween.elem[ tween.prop ];\n\t\t\t}\n\n\t\t\t// Passing an empty string as a 3rd parameter to .css will automatically\n\t\t\t// attempt a parseFloat and fallback to a string if the parse fails.\n\t\t\t// Simple values such as \"10px\" are parsed to Float;\n\t\t\t// complex values such as \"rotate(1rad)\" are returned as-is.\n\t\t\tresult = jQuery.css( tween.elem, tween.prop, \"\" );\n\n\t\t\t// Empty strings, null, undefined and \"auto\" are converted to 0.\n\t\t\treturn !result || result === \"auto\" ? 0 : result;\n\t\t},\n\t\tset: function( tween ) {\n\n\t\t\t// Use step hook for back compat.\n\t\t\t// Use cssHook if its there.\n\t\t\t// Use .style if available and use plain properties where available.\n\t\t\tif ( jQuery.fx.step[ tween.prop ] ) {\n\t\t\t\tjQuery.fx.step[ tween.prop ]( tween );\n\t\t\t} else if ( tween.elem.nodeType === 1 && (\n\t\t\t\tjQuery.cssHooks[ tween.prop ] ||\n\t\t\t\t\ttween.elem.style[ finalPropName( tween.prop ) ] != null ) ) {\n\t\t\t\tjQuery.style( tween.elem, tween.prop, tween.now + tween.unit );\n\t\t\t} else {\n\t\t\t\ttween.elem[ tween.prop ] = tween.now;\n\t\t\t}\n\t\t}\n\t}\n};\n\n// Support: IE <=9 only\n// Panic based approach to setting things on disconnected nodes\nTween.propHooks.scrollTop = Tween.propHooks.scrollLeft = {\n\tset: function( tween ) {\n\t\tif ( tween.elem.nodeType && tween.elem.parentNode ) {\n\t\t\ttween.elem[ tween.prop ] = tween.now;\n\t\t}\n\t}\n};\n\njQuery.easing = {\n\tlinear: function( p ) {\n\t\treturn p;\n\t},\n\tswing: function( p ) {\n\t\treturn 0.5 - Math.cos( p * Math.PI ) / 2;\n\t},\n\t_default: \"swing\"\n};\n\njQuery.fx = Tween.prototype.init;\n\n// Back compat <1.8 extension point\njQuery.fx.step = {};\n\n\n\n\nvar\n\tfxNow, inProgress,\n\trfxtypes = /^(?:toggle|show|hide)$/,\n\trrun = /queueHooks$/;\n\nfunction schedule() {\n\tif ( inProgress ) {\n\t\tif ( document.hidden === false && window.requestAnimationFrame ) {\n\t\t\twindow.requestAnimationFrame( schedule );\n\t\t} else {\n\t\t\twindow.setTimeout( schedule, jQuery.fx.interval );\n\t\t}\n\n\t\tjQuery.fx.tick();\n\t}\n}\n\n// Animations created synchronously will run synchronously\nfunction createFxNow() {\n\twindow.setTimeout( function() {\n\t\tfxNow = undefined;\n\t} );\n\treturn ( fxNow = Date.now() );\n}\n\n// Generate parameters to create a standard animation\nfunction genFx( type, includeWidth ) {\n\tvar which,\n\t\ti = 0,\n\t\tattrs = { height: type };\n\n\t// If we include width, step value is 1 to do all cssExpand values,\n\t// otherwise step value is 2 to skip over Left and Right\n\tincludeWidth = includeWidth ? 1 : 0;\n\tfor ( ; i < 4; i += 2 - includeWidth ) {\n\t\twhich = cssExpand[ i ];\n\t\tattrs[ \"margin\" + which ] = attrs[ \"padding\" + which ] = type;\n\t}\n\n\tif ( includeWidth ) {\n\t\tattrs.opacity = attrs.width = type;\n\t}\n\n\treturn attrs;\n}\n\nfunction createTween( value, prop, animation ) {\n\tvar tween,\n\t\tcollection = ( Animation.tweeners[ prop ] || [] ).concat( Animation.tweeners[ \"*\" ] ),\n\t\tindex = 0,\n\t\tlength = collection.length;\n\tfor ( ; index < length; index++ ) {\n\t\tif ( ( tween = collection[ index ].call( animation, prop, value ) ) ) {\n\n\t\t\t// We're done with this property\n\t\t\treturn tween;\n\t\t}\n\t}\n}\n\nfunction defaultPrefilter( elem, props, opts ) {\n\tvar prop, value, toggle, hooks, oldfire, propTween, restoreDisplay, display,\n\t\tisBox = \"width\" in props || \"height\" in props,\n\t\tanim = this,\n\t\torig = {},\n\t\tstyle = elem.style,\n\t\thidden = elem.nodeType && isHiddenWithinTree( elem ),\n\t\tdataShow = dataPriv.get( elem, \"fxshow\" );\n\n\t// Queue-skipping animations hijack the fx hooks\n\tif ( !opts.queue ) {\n\t\thooks = jQuery._queueHooks( elem, \"fx\" );\n\t\tif ( hooks.unqueued == null ) {\n\t\t\thooks.unqueued = 0;\n\t\t\toldfire = hooks.empty.fire;\n\t\t\thooks.empty.fire = function() {\n\t\t\t\tif ( !hooks.unqueued ) {\n\t\t\t\t\toldfire();\n\t\t\t\t}\n\t\t\t};\n\t\t}\n\t\thooks.unqueued++;\n\n\t\tanim.always( function() {\n\n\t\t\t// Ensure the complete handler is called before this completes\n\t\t\tanim.always( function() {\n\t\t\t\thooks.unqueued--;\n\t\t\t\tif ( !jQuery.queue( elem, \"fx\" ).length ) {\n\t\t\t\t\thooks.empty.fire();\n\t\t\t\t}\n\t\t\t} );\n\t\t} );\n\t}\n\n\t// Detect show/hide animations\n\tfor ( prop in props ) {\n\t\tvalue = props[ prop ];\n\t\tif ( rfxtypes.test( value ) ) {\n\t\t\tdelete props[ prop ];\n\t\t\ttoggle = toggle || value === \"toggle\";\n\t\t\tif ( value === ( hidden ? \"hide\" : \"show\" ) ) {\n\n\t\t\t\t// Pretend to be hidden if this is a \"show\" and\n\t\t\t\t// there is still data from a stopped show/hide\n\t\t\t\tif ( value === \"show\" && dataShow && dataShow[ prop ] !== undefined ) {\n\t\t\t\t\thidden = true;\n\n\t\t\t\t// Ignore all other no-op show/hide data\n\t\t\t\t} else {\n\t\t\t\t\tcontinue;\n\t\t\t\t}\n\t\t\t}\n\t\t\torig[ prop ] = dataShow && dataShow[ prop ] || jQuery.style( elem, prop );\n\t\t}\n\t}\n\n\t// Bail out if this is a no-op like .hide().hide()\n\tpropTween = !jQuery.isEmptyObject( props );\n\tif ( !propTween && jQuery.isEmptyObject( orig ) ) {\n\t\treturn;\n\t}\n\n\t// Restrict \"overflow\" and \"display\" styles during box animations\n\tif ( isBox && elem.nodeType === 1 ) {\n\n\t\t// Support: IE <=9 - 11, Edge 12 - 15\n\t\t// Record all 3 overflow attributes because IE does not infer the shorthand\n\t\t// from identically-valued overflowX and overflowY and Edge just mirrors\n\t\t// the overflowX value there.\n\t\topts.overflow = [ style.overflow, style.overflowX, style.overflowY ];\n\n\t\t// Identify a display type, preferring old show/hide data over the CSS cascade\n\t\trestoreDisplay = dataShow && dataShow.display;\n\t\tif ( restoreDisplay == null ) {\n\t\t\trestoreDisplay = dataPriv.get( elem, \"display\" );\n\t\t}\n\t\tdisplay = jQuery.css( elem, \"display\" );\n\t\tif ( display === \"none\" ) {\n\t\t\tif ( restoreDisplay ) {\n\t\t\t\tdisplay = restoreDisplay;\n\t\t\t} else {\n\n\t\t\t\t// Get nonempty value(s) by temporarily forcing visibility\n\t\t\t\tshowHide( [ elem ], true );\n\t\t\t\trestoreDisplay = elem.style.display || restoreDisplay;\n\t\t\t\tdisplay = jQuery.css( elem, \"display\" );\n\t\t\t\tshowHide( [ elem ] );\n\t\t\t}\n\t\t}\n\n\t\t// Animate inline elements as inline-block\n\t\tif ( display === \"inline\" || display === \"inline-block\" && restoreDisplay != null ) {\n\t\t\tif ( jQuery.css( elem, \"float\" ) === \"none\" ) {\n\n\t\t\t\t// Restore the original display value at the end of pure show/hide animations\n\t\t\t\tif ( !propTween ) {\n\t\t\t\t\tanim.done( function() {\n\t\t\t\t\t\tstyle.display = restoreDisplay;\n\t\t\t\t\t} );\n\t\t\t\t\tif ( restoreDisplay == null ) {\n\t\t\t\t\t\tdisplay = style.display;\n\t\t\t\t\t\trestoreDisplay = display === \"none\" ? \"\" : display;\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\tstyle.display = \"inline-block\";\n\t\t\t}\n\t\t}\n\t}\n\n\tif ( opts.overflow ) {\n\t\tstyle.overflow = \"hidden\";\n\t\tanim.always( function() {\n\t\t\tstyle.overflow = opts.overflow[ 0 ];\n\t\t\tstyle.overflowX = opts.overflow[ 1 ];\n\t\t\tstyle.overflowY = opts.overflow[ 2 ];\n\t\t} );\n\t}\n\n\t// Implement show/hide animations\n\tpropTween = false;\n\tfor ( prop in orig ) {\n\n\t\t// General show/hide setup for this element animation\n\t\tif ( !propTween ) {\n\t\t\tif ( dataShow ) {\n\t\t\t\tif ( \"hidden\" in dataShow ) {\n\t\t\t\t\thidden = dataShow.hidden;\n\t\t\t\t}\n\t\t\t} else {\n\t\t\t\tdataShow = dataPriv.access( elem, \"fxshow\", { display: restoreDisplay } );\n\t\t\t}\n\n\t\t\t// Store hidden/visible for toggle so `.stop().toggle()` \"reverses\"\n\t\t\tif ( toggle ) {\n\t\t\t\tdataShow.hidden = !hidden;\n\t\t\t}\n\n\t\t\t// Show elements before animating them\n\t\t\tif ( hidden ) {\n\t\t\t\tshowHide( [ elem ], true );\n\t\t\t}\n\n\t\t\t/* eslint-disable no-loop-func */\n\n\t\t\tanim.done( function() {\n\n\t\t\t\t/* eslint-enable no-loop-func */\n\n\t\t\t\t// The final step of a \"hide\" animation is actually hiding the element\n\t\t\t\tif ( !hidden ) {\n\t\t\t\t\tshowHide( [ elem ] );\n\t\t\t\t}\n\t\t\t\tdataPriv.remove( elem, \"fxshow\" );\n\t\t\t\tfor ( prop in orig ) {\n\t\t\t\t\tjQuery.style( elem, prop, orig[ prop ] );\n\t\t\t\t}\n\t\t\t} );\n\t\t}\n\n\t\t// Per-property setup\n\t\tpropTween = createTween( hidden ? dataShow[ prop ] : 0, prop, anim );\n\t\tif ( !( prop in dataShow ) ) {\n\t\t\tdataShow[ prop ] = propTween.start;\n\t\t\tif ( hidden ) {\n\t\t\t\tpropTween.end = propTween.start;\n\t\t\t\tpropTween.start = 0;\n\t\t\t}\n\t\t}\n\t}\n}\n\nfunction propFilter( props, specialEasing ) {\n\tvar index, name, easing, value, hooks;\n\n\t// camelCase, specialEasing and expand cssHook pass\n\tfor ( index in props ) {\n\t\tname = camelCase( index );\n\t\teasing = specialEasing[ name ];\n\t\tvalue = props[ index ];\n\t\tif ( Array.isArray( value ) ) {\n\t\t\teasing = value[ 1 ];\n\t\t\tvalue = props[ index ] = value[ 0 ];\n\t\t}\n\n\t\tif ( index !== name ) {\n\t\t\tprops[ name ] = value;\n\t\t\tdelete props[ index ];\n\t\t}\n\n\t\thooks = jQuery.cssHooks[ name ];\n\t\tif ( hooks && \"expand\" in hooks ) {\n\t\t\tvalue = hooks.expand( value );\n\t\t\tdelete props[ name ];\n\n\t\t\t// Not quite $.extend, this won't overwrite existing keys.\n\t\t\t// Reusing 'index' because we have the correct \"name\"\n\t\t\tfor ( index in value ) {\n\t\t\t\tif ( !( index in props ) ) {\n\t\t\t\t\tprops[ index ] = value[ index ];\n\t\t\t\t\tspecialEasing[ index ] = easing;\n\t\t\t\t}\n\t\t\t}\n\t\t} else {\n\t\t\tspecialEasing[ name ] = easing;\n\t\t}\n\t}\n}\n\nfunction Animation( elem, properties, options ) {\n\tvar result,\n\t\tstopped,\n\t\tindex = 0,\n\t\tlength = Animation.prefilters.length,\n\t\tdeferred = jQuery.Deferred().always( function() {\n\n\t\t\t// Don't match elem in the :animated selector\n\t\t\tdelete tick.elem;\n\t\t} ),\n\t\ttick = function() {\n\t\t\tif ( stopped ) {\n\t\t\t\treturn false;\n\t\t\t}\n\t\t\tvar currentTime = fxNow || createFxNow(),\n\t\t\t\tremaining = Math.max( 0, animation.startTime + animation.duration - currentTime ),\n\n\t\t\t\t// Support: Android 2.3 only\n\t\t\t\t// Archaic crash bug won't allow us to use `1 - ( 0.5 || 0 )` (trac-12497)\n\t\t\t\ttemp = remaining / animation.duration || 0,\n\t\t\t\tpercent = 1 - temp,\n\t\t\t\tindex = 0,\n\t\t\t\tlength = animation.tweens.length;\n\n\t\t\tfor ( ; index < length; index++ ) {\n\t\t\t\tanimation.tweens[ index ].run( percent );\n\t\t\t}\n\n\t\t\tdeferred.notifyWith( elem, [ animation, percent, remaining ] );\n\n\t\t\t// If there's more to do, yield\n\t\t\tif ( percent < 1 && length ) {\n\t\t\t\treturn remaining;\n\t\t\t}\n\n\t\t\t// If this was an empty animation, synthesize a final progress notification\n\t\t\tif ( !length ) {\n\t\t\t\tdeferred.notifyWith( elem, [ animation, 1, 0 ] );\n\t\t\t}\n\n\t\t\t// Resolve the animation and report its conclusion\n\t\t\tdeferred.resolveWith( elem, [ animation ] );\n\t\t\treturn false;\n\t\t},\n\t\tanimation = deferred.promise( {\n\t\t\telem: elem,\n\t\t\tprops: jQuery.extend( {}, properties ),\n\t\t\topts: jQuery.extend( true, {\n\t\t\t\tspecialEasing: {},\n\t\t\t\teasing: jQuery.easing._default\n\t\t\t}, options ),\n\t\t\toriginalProperties: properties,\n\t\t\toriginalOptions: options,\n\t\t\tstartTime: fxNow || createFxNow(),\n\t\t\tduration: options.duration,\n\t\t\ttweens: [],\n\t\t\tcreateTween: function( prop, end ) {\n\t\t\t\tvar tween = jQuery.Tween( elem, animation.opts, prop, end,\n\t\t\t\t\tanimation.opts.specialEasing[ prop ] || animation.opts.easing );\n\t\t\t\tanimation.tweens.push( tween );\n\t\t\t\treturn tween;\n\t\t\t},\n\t\t\tstop: function( gotoEnd ) {\n\t\t\t\tvar index = 0,\n\n\t\t\t\t\t// If we are going to the end, we want to run all the tweens\n\t\t\t\t\t// otherwise we skip this part\n\t\t\t\t\tlength = gotoEnd ? animation.tweens.length : 0;\n\t\t\t\tif ( stopped ) {\n\t\t\t\t\treturn this;\n\t\t\t\t}\n\t\t\t\tstopped = true;\n\t\t\t\tfor ( ; index < length; index++ ) {\n\t\t\t\t\tanimation.tweens[ index ].run( 1 );\n\t\t\t\t}\n\n\t\t\t\t// Resolve when we played the last frame; otherwise, reject\n\t\t\t\tif ( gotoEnd ) {\n\t\t\t\t\tdeferred.notifyWith( elem, [ animation, 1, 0 ] );\n\t\t\t\t\tdeferred.resolveWith( elem, [ animation, gotoEnd ] );\n\t\t\t\t} else {\n\t\t\t\t\tdeferred.rejectWith( elem, [ animation, gotoEnd ] );\n\t\t\t\t}\n\t\t\t\treturn this;\n\t\t\t}\n\t\t} ),\n\t\tprops = animation.props;\n\n\tpropFilter( props, animation.opts.specialEasing );\n\n\tfor ( ; index < length; index++ ) {\n\t\tresult = Animation.prefilters[ index ].call( animation, elem, props, animation.opts );\n\t\tif ( result ) {\n\t\t\tif ( isFunction( result.stop ) ) {\n\t\t\t\tjQuery._queueHooks( animation.elem, animation.opts.queue ).stop =\n\t\t\t\t\tresult.stop.bind( result );\n\t\t\t}\n\t\t\treturn result;\n\t\t}\n\t}\n\n\tjQuery.map( props, createTween, animation );\n\n\tif ( isFunction( animation.opts.start ) ) {\n\t\tanimation.opts.start.call( elem, animation );\n\t}\n\n\t// Attach callbacks from options\n\tanimation\n\t\t.progress( animation.opts.progress )\n\t\t.done( animation.opts.done, animation.opts.complete )\n\t\t.fail( animation.opts.fail )\n\t\t.always( animation.opts.always );\n\n\tjQuery.fx.timer(\n\t\tjQuery.extend( tick, {\n\t\t\telem: elem,\n\t\t\tanim: animation,\n\t\t\tqueue: animation.opts.queue\n\t\t} )\n\t);\n\n\treturn animation;\n}\n\njQuery.Animation = jQuery.extend( Animation, {\n\n\ttweeners: {\n\t\t\"*\": [ function( prop, value ) {\n\t\t\tvar tween = this.createTween( prop, value );\n\t\t\tadjustCSS( tween.elem, prop, rcssNum.exec( value ), tween );\n\t\t\treturn tween;\n\t\t} ]\n\t},\n\n\ttweener: function( props, callback ) {\n\t\tif ( isFunction( props ) ) {\n\t\t\tcallback = props;\n\t\t\tprops = [ \"*\" ];\n\t\t} else {\n\t\t\tprops = props.match( rnothtmlwhite );\n\t\t}\n\n\t\tvar prop,\n\t\t\tindex = 0,\n\t\t\tlength = props.length;\n\n\t\tfor ( ; index < length; index++ ) {\n\t\t\tprop = props[ index ];\n\t\t\tAnimation.tweeners[ prop ] = Animation.tweeners[ prop ] || [];\n\t\t\tAnimation.tweeners[ prop ].unshift( callback );\n\t\t}\n\t},\n\n\tprefilters: [ defaultPrefilter ],\n\n\tprefilter: function( callback, prepend ) {\n\t\tif ( prepend ) {\n\t\t\tAnimation.prefilters.unshift( callback );\n\t\t} else {\n\t\t\tAnimation.prefilters.push( callback );\n\t\t}\n\t}\n} );\n\njQuery.speed = function( speed, easing, fn ) {\n\tvar opt = speed && typeof speed === \"object\" ? jQuery.extend( {}, speed ) : {\n\t\tcomplete: fn || !fn && easing ||\n\t\t\tisFunction( speed ) && speed,\n\t\tduration: speed,\n\t\teasing: fn && easing || easing && !isFunction( easing ) && easing\n\t};\n\n\t// Go to the end state if fx are off\n\tif ( jQuery.fx.off ) {\n\t\topt.duration = 0;\n\n\t} else {\n\t\tif ( typeof opt.duration !== \"number\" ) {\n\t\t\tif ( opt.duration in jQuery.fx.speeds ) {\n\t\t\t\topt.duration = jQuery.fx.speeds[ opt.duration ];\n\n\t\t\t} else {\n\t\t\t\topt.duration = jQuery.fx.speeds._default;\n\t\t\t}\n\t\t}\n\t}\n\n\t// Normalize opt.queue - true/undefined/null -> \"fx\"\n\tif ( opt.queue == null || opt.queue === true ) {\n\t\topt.queue = \"fx\";\n\t}\n\n\t// Queueing\n\topt.old = opt.complete;\n\n\topt.complete = function() {\n\t\tif ( isFunction( opt.old ) ) {\n\t\t\topt.old.call( this );\n\t\t}\n\n\t\tif ( opt.queue ) {\n\t\t\tjQuery.dequeue( this, opt.queue );\n\t\t}\n\t};\n\n\treturn opt;\n};\n\njQuery.fn.extend( {\n\tfadeTo: function( speed, to, easing, callback ) {\n\n\t\t// Show any hidden elements after setting opacity to 0\n\t\treturn this.filter( isHiddenWithinTree ).css( \"opacity\", 0 ).show()\n\n\t\t\t// Animate to the value specified\n\t\t\t.end().animate( { opacity: to }, speed, easing, callback );\n\t},\n\tanimate: function( prop, speed, easing, callback ) {\n\t\tvar empty = jQuery.isEmptyObject( prop ),\n\t\t\toptall = jQuery.speed( speed, easing, callback ),\n\t\t\tdoAnimation = function() {\n\n\t\t\t\t// Operate on a copy of prop so per-property easing won't be lost\n\t\t\t\tvar anim = Animation( this, jQuery.extend( {}, prop ), optall );\n\n\t\t\t\t// Empty animations, or finishing resolves immediately\n\t\t\t\tif ( empty || dataPriv.get( this, \"finish\" ) ) {\n\t\t\t\t\tanim.stop( true );\n\t\t\t\t}\n\t\t\t};\n\n\t\tdoAnimation.finish = doAnimation;\n\n\t\treturn empty || optall.queue === false ?\n\t\t\tthis.each( doAnimation ) :\n\t\t\tthis.queue( optall.queue, doAnimation );\n\t},\n\tstop: function( type, clearQueue, gotoEnd ) {\n\t\tvar stopQueue = function( hooks ) {\n\t\t\tvar stop = hooks.stop;\n\t\t\tdelete hooks.stop;\n\t\t\tstop( gotoEnd );\n\t\t};\n\n\t\tif ( typeof type !== \"string\" ) {\n\t\t\tgotoEnd = clearQueue;\n\t\t\tclearQueue = type;\n\t\t\ttype = undefined;\n\t\t}\n\t\tif ( clearQueue ) {\n\t\t\tthis.queue( type || \"fx\", [] );\n\t\t}\n\n\t\treturn this.each( function() {\n\t\t\tvar dequeue = true,\n\t\t\t\tindex = type != null && type + \"queueHooks\",\n\t\t\t\ttimers = jQuery.timers,\n\t\t\t\tdata = dataPriv.get( this );\n\n\t\t\tif ( index ) {\n\t\t\t\tif ( data[ index ] && data[ index ].stop ) {\n\t\t\t\t\tstopQueue( data[ index ] );\n\t\t\t\t}\n\t\t\t} else {\n\t\t\t\tfor ( index in data ) {\n\t\t\t\t\tif ( data[ index ] && data[ index ].stop && rrun.test( index ) ) {\n\t\t\t\t\t\tstopQueue( data[ index ] );\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\n\t\t\tfor ( index = timers.length; index--; ) {\n\t\t\t\tif ( timers[ index ].elem === this &&\n\t\t\t\t\t( type == null || timers[ index ].queue === type ) ) {\n\n\t\t\t\t\ttimers[ index ].anim.stop( gotoEnd );\n\t\t\t\t\tdequeue = false;\n\t\t\t\t\ttimers.splice( index, 1 );\n\t\t\t\t}\n\t\t\t}\n\n\t\t\t// Start the next in the queue if the last step wasn't forced.\n\t\t\t// Timers currently will call their complete callbacks, which\n\t\t\t// will dequeue but only if they were gotoEnd.\n\t\t\tif ( dequeue || !gotoEnd ) {\n\t\t\t\tjQuery.dequeue( this, type );\n\t\t\t}\n\t\t} );\n\t},\n\tfinish: function( type ) {\n\t\tif ( type !== false ) {\n\t\t\ttype = type || \"fx\";\n\t\t}\n\t\treturn this.each( function() {\n\t\t\tvar index,\n\t\t\t\tdata = dataPriv.get( this ),\n\t\t\t\tqueue = data[ type + \"queue\" ],\n\t\t\t\thooks = data[ type + \"queueHooks\" ],\n\t\t\t\ttimers = jQuery.timers,\n\t\t\t\tlength = queue ? queue.length : 0;\n\n\t\t\t// Enable finishing flag on private data\n\t\t\tdata.finish = true;\n\n\t\t\t// Empty the queue first\n\t\t\tjQuery.queue( this, type, [] );\n\n\t\t\tif ( hooks && hooks.stop ) {\n\t\t\t\thooks.stop.call( this, true );\n\t\t\t}\n\n\t\t\t// Look for any active animations, and finish them\n\t\t\tfor ( index = timers.length; index--; ) {\n\t\t\t\tif ( timers[ index ].elem === this && timers[ index ].queue === type ) {\n\t\t\t\t\ttimers[ index ].anim.stop( true );\n\t\t\t\t\ttimers.splice( index, 1 );\n\t\t\t\t}\n\t\t\t}\n\n\t\t\t// Look for any animations in the old queue and finish them\n\t\t\tfor ( index = 0; index < length; index++ ) {\n\t\t\t\tif ( queue[ index ] && queue[ index ].finish ) {\n\t\t\t\t\tqueue[ index ].finish.call( this );\n\t\t\t\t}\n\t\t\t}\n\n\t\t\t// Turn off finishing flag\n\t\t\tdelete data.finish;\n\t\t} );\n\t}\n} );\n\njQuery.each( [ \"toggle\", \"show\", \"hide\" ], function( _i, name ) {\n\tvar cssFn = jQuery.fn[ name ];\n\tjQuery.fn[ name ] = function( speed, easing, callback ) {\n\t\treturn speed == null || typeof speed === \"boolean\" ?\n\t\t\tcssFn.apply( this, arguments ) :\n\t\t\tthis.animate( genFx( name, true ), speed, easing, callback );\n\t};\n} );\n\n// Generate shortcuts for custom animations\njQuery.each( {\n\tslideDown: genFx( \"show\" ),\n\tslideUp: genFx( \"hide\" ),\n\tslideToggle: genFx( \"toggle\" ),\n\tfadeIn: { opacity: \"show\" },\n\tfadeOut: { opacity: \"hide\" },\n\tfadeToggle: { opacity: \"toggle\" }\n}, function( name, props ) {\n\tjQuery.fn[ name ] = function( speed, easing, callback ) {\n\t\treturn this.animate( props, speed, easing, callback );\n\t};\n} );\n\njQuery.timers = [];\njQuery.fx.tick = function() {\n\tvar timer,\n\t\ti = 0,\n\t\ttimers = jQuery.timers;\n\n\tfxNow = Date.now();\n\n\tfor ( ; i < timers.length; i++ ) {\n\t\ttimer = timers[ i ];\n\n\t\t// Run the timer and safely remove it when done (allowing for external removal)\n\t\tif ( !timer() && timers[ i ] === timer ) {\n\t\t\ttimers.splice( i--, 1 );\n\t\t}\n\t}\n\n\tif ( !timers.length ) {\n\t\tjQuery.fx.stop();\n\t}\n\tfxNow = undefined;\n};\n\njQuery.fx.timer = function( timer ) {\n\tjQuery.timers.push( timer );\n\tjQuery.fx.start();\n};\n\njQuery.fx.interval = 13;\njQuery.fx.start = function() {\n\tif ( inProgress ) {\n\t\treturn;\n\t}\n\n\tinProgress = true;\n\tschedule();\n};\n\njQuery.fx.stop = function() {\n\tinProgress = null;\n};\n\njQuery.fx.speeds = {\n\tslow: 600,\n\tfast: 200,\n\n\t// Default speed\n\t_default: 400\n};\n\n\n// Based off of the plugin by Clint Helfers, with permission.\njQuery.fn.delay = function( time, type ) {\n\ttime = jQuery.fx ? jQuery.fx.speeds[ time ] || time : time;\n\ttype = type || \"fx\";\n\n\treturn this.queue( type, function( next, hooks ) {\n\t\tvar timeout = window.setTimeout( next, time );\n\t\thooks.stop = function() {\n\t\t\twindow.clearTimeout( timeout );\n\t\t};\n\t} );\n};\n\n\n( function() {\n\tvar input = document.createElement( \"input\" ),\n\t\tselect = document.createElement( \"select\" ),\n\t\topt = select.appendChild( document.createElement( \"option\" ) );\n\n\tinput.type = \"checkbox\";\n\n\t// Support: Android <=4.3 only\n\t// Default value for a checkbox should be \"on\"\n\tsupport.checkOn = input.value !== \"\";\n\n\t// Support: IE <=11 only\n\t// Must access selectedIndex to make default options select\n\tsupport.optSelected = opt.selected;\n\n\t// Support: IE <=11 only\n\t// An input loses its value after becoming a radio\n\tinput = document.createElement( \"input\" );\n\tinput.value = \"t\";\n\tinput.type = \"radio\";\n\tsupport.radioValue = input.value === \"t\";\n} )();\n\n\nvar boolHook,\n\tattrHandle = jQuery.expr.attrHandle;\n\njQuery.fn.extend( {\n\tattr: function( name, value ) {\n\t\treturn access( this, jQuery.attr, name, value, arguments.length > 1 );\n\t},\n\n\tremoveAttr: function( name ) {\n\t\treturn this.each( function() {\n\t\t\tjQuery.removeAttr( this, name );\n\t\t} );\n\t}\n} );\n\njQuery.extend( {\n\tattr: function( elem, name, value ) {\n\t\tvar ret, hooks,\n\t\t\tnType = elem.nodeType;\n\n\t\t// Don't get/set attributes on text, comment and attribute nodes\n\t\tif ( nType === 3 || nType === 8 || nType === 2 ) {\n\t\t\treturn;\n\t\t}\n\n\t\t// Fallback to prop when attributes are not supported\n\t\tif ( typeof elem.getAttribute === \"undefined\" ) {\n\t\t\treturn jQuery.prop( elem, name, value );\n\t\t}\n\n\t\t// Attribute hooks are determined by the lowercase version\n\t\t// Grab necessary hook if one is defined\n\t\tif ( nType !== 1 || !jQuery.isXMLDoc( elem ) ) {\n\t\t\thooks = jQuery.attrHooks[ name.toLowerCase() ] ||\n\t\t\t\t( jQuery.expr.match.bool.test( name ) ? boolHook : undefined );\n\t\t}\n\n\t\tif ( value !== undefined ) {\n\t\t\tif ( value === null ) {\n\t\t\t\tjQuery.removeAttr( elem, name );\n\t\t\t\treturn;\n\t\t\t}\n\n\t\t\tif ( hooks && \"set\" in hooks &&\n\t\t\t\t( ret = hooks.set( elem, value, name ) ) !== undefined ) {\n\t\t\t\treturn ret;\n\t\t\t}\n\n\t\t\telem.setAttribute( name, value + \"\" );\n\t\t\treturn value;\n\t\t}\n\n\t\tif ( hooks && \"get\" in hooks && ( ret = hooks.get( elem, name ) ) !== null ) {\n\t\t\treturn ret;\n\t\t}\n\n\t\tret = jQuery.find.attr( elem, name );\n\n\t\t// Non-existent attributes return null, we normalize to undefined\n\t\treturn ret == null ? undefined : ret;\n\t},\n\n\tattrHooks: {\n\t\ttype: {\n\t\t\tset: function( elem, value ) {\n\t\t\t\tif ( !support.radioValue && value === \"radio\" &&\n\t\t\t\t\tnodeName( elem, \"input\" ) ) {\n\t\t\t\t\tvar val = elem.value;\n\t\t\t\t\telem.setAttribute( \"type\", value );\n\t\t\t\t\tif ( val ) {\n\t\t\t\t\t\telem.value = val;\n\t\t\t\t\t}\n\t\t\t\t\treturn value;\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t},\n\n\tremoveAttr: function( elem, value ) {\n\t\tvar name,\n\t\t\ti = 0,\n\n\t\t\t// Attribute names can contain non-HTML whitespace characters\n\t\t\t// https://html.spec.whatwg.org/multipage/syntax.html#attributes-2\n\t\t\tattrNames = value && value.match( rnothtmlwhite );\n\n\t\tif ( attrNames && elem.nodeType === 1 ) {\n\t\t\twhile ( ( name = attrNames[ i++ ] ) ) {\n\t\t\t\telem.removeAttribute( name );\n\t\t\t}\n\t\t}\n\t}\n} );\n\n// Hooks for boolean attributes\nboolHook = {\n\tset: function( elem, value, name ) {\n\t\tif ( value === false ) {\n\n\t\t\t// Remove boolean attributes when set to false\n\t\t\tjQuery.removeAttr( elem, name );\n\t\t} else {\n\t\t\telem.setAttribute( name, name );\n\t\t}\n\t\treturn name;\n\t}\n};\n\njQuery.each( jQuery.expr.match.bool.source.match( /\\w+/g ), function( _i, name ) {\n\tvar getter = attrHandle[ name ] || jQuery.find.attr;\n\n\tattrHandle[ name ] = function( elem, name, isXML ) {\n\t\tvar ret, handle,\n\t\t\tlowercaseName = name.toLowerCase();\n\n\t\tif ( !isXML ) {\n\n\t\t\t// Avoid an infinite loop by temporarily removing this function from the getter\n\t\t\thandle = attrHandle[ lowercaseName ];\n\t\t\tattrHandle[ lowercaseName ] = ret;\n\t\t\tret = getter( elem, name, isXML ) != null ?\n\t\t\t\tlowercaseName :\n\t\t\t\tnull;\n\t\t\tattrHandle[ lowercaseName ] = handle;\n\t\t}\n\t\treturn ret;\n\t};\n} );\n\n\n\n\nvar rfocusable = /^(?:input|select|textarea|button)$/i,\n\trclickable = /^(?:a|area)$/i;\n\njQuery.fn.extend( {\n\tprop: function( name, value ) {\n\t\treturn access( this, jQuery.prop, name, value, arguments.length > 1 );\n\t},\n\n\tremoveProp: function( name ) {\n\t\treturn this.each( function() {\n\t\t\tdelete this[ jQuery.propFix[ name ] || name ];\n\t\t} );\n\t}\n} );\n\njQuery.extend( {\n\tprop: function( elem, name, value ) {\n\t\tvar ret, hooks,\n\t\t\tnType = elem.nodeType;\n\n\t\t// Don't get/set properties on text, comment and attribute nodes\n\t\tif ( nType === 3 || nType === 8 || nType === 2 ) {\n\t\t\treturn;\n\t\t}\n\n\t\tif ( nType !== 1 || !jQuery.isXMLDoc( elem ) ) {\n\n\t\t\t// Fix name and attach hooks\n\t\t\tname = jQuery.propFix[ name ] || name;\n\t\t\thooks = jQuery.propHooks[ name ];\n\t\t}\n\n\t\tif ( value !== undefined ) {\n\t\t\tif ( hooks && \"set\" in hooks &&\n\t\t\t\t( ret = hooks.set( elem, value, name ) ) !== undefined ) {\n\t\t\t\treturn ret;\n\t\t\t}\n\n\t\t\treturn ( elem[ name ] = value );\n\t\t}\n\n\t\tif ( hooks && \"get\" in hooks && ( ret = hooks.get( elem, name ) ) !== null ) {\n\t\t\treturn ret;\n\t\t}\n\n\t\treturn elem[ name ];\n\t},\n\n\tpropHooks: {\n\t\ttabIndex: {\n\t\t\tget: function( elem ) {\n\n\t\t\t\t// Support: IE <=9 - 11 only\n\t\t\t\t// elem.tabIndex doesn't always return the\n\t\t\t\t// correct value when it hasn't been explicitly set\n\t\t\t\t// Use proper attribute retrieval (trac-12072)\n\t\t\t\tvar tabindex = jQuery.find.attr( elem, \"tabindex\" );\n\n\t\t\t\tif ( tabindex ) {\n\t\t\t\t\treturn parseInt( tabindex, 10 );\n\t\t\t\t}\n\n\t\t\t\tif (\n\t\t\t\t\trfocusable.test( elem.nodeName ) ||\n\t\t\t\t\trclickable.test( elem.nodeName ) &&\n\t\t\t\t\telem.href\n\t\t\t\t) {\n\t\t\t\t\treturn 0;\n\t\t\t\t}\n\n\t\t\t\treturn -1;\n\t\t\t}\n\t\t}\n\t},\n\n\tpropFix: {\n\t\t\"for\": \"htmlFor\",\n\t\t\"class\": \"className\"\n\t}\n} );\n\n// Support: IE <=11 only\n// Accessing the selectedIndex property\n// forces the browser to respect setting selected\n// on the option\n// The getter ensures a default option is selected\n// when in an optgroup\n// eslint rule \"no-unused-expressions\" is disabled for this code\n// since it considers such accessions noop\nif ( !support.optSelected ) {\n\tjQuery.propHooks.selected = {\n\t\tget: function( elem ) {\n\n\t\t\t/* eslint no-unused-expressions: \"off\" */\n\n\t\t\tvar parent = elem.parentNode;\n\t\t\tif ( parent && parent.parentNode ) {\n\t\t\t\tparent.parentNode.selectedIndex;\n\t\t\t}\n\t\t\treturn null;\n\t\t},\n\t\tset: function( elem ) {\n\n\t\t\t/* eslint no-unused-expressions: \"off\" */\n\n\t\t\tvar parent = elem.parentNode;\n\t\t\tif ( parent ) {\n\t\t\t\tparent.selectedIndex;\n\n\t\t\t\tif ( parent.parentNode ) {\n\t\t\t\t\tparent.parentNode.selectedIndex;\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t};\n}\n\njQuery.each( [\n\t\"tabIndex\",\n\t\"readOnly\",\n\t\"maxLength\",\n\t\"cellSpacing\",\n\t\"cellPadding\",\n\t\"rowSpan\",\n\t\"colSpan\",\n\t\"useMap\",\n\t\"frameBorder\",\n\t\"contentEditable\"\n], function() {\n\tjQuery.propFix[ this.toLowerCase() ] = this;\n} );\n\n\n\n\n\t// Strip and collapse whitespace according to HTML spec\n\t// https://infra.spec.whatwg.org/#strip-and-collapse-ascii-whitespace\n\tfunction stripAndCollapse( value ) {\n\t\tvar tokens = value.match( rnothtmlwhite ) || [];\n\t\treturn tokens.join( \" \" );\n\t}\n\n\nfunction getClass( elem ) {\n\treturn elem.getAttribute && elem.getAttribute( \"class\" ) || \"\";\n}\n\nfunction classesToArray( value ) {\n\tif ( Array.isArray( value ) ) {\n\t\treturn value;\n\t}\n\tif ( typeof value === \"string\" ) {\n\t\treturn value.match( rnothtmlwhite ) || [];\n\t}\n\treturn [];\n}\n\njQuery.fn.extend( {\n\taddClass: function( value ) {\n\t\tvar classNames, cur, curValue, className, i, finalValue;\n\n\t\tif ( isFunction( value ) ) {\n\t\t\treturn this.each( function( j ) {\n\t\t\t\tjQuery( this ).addClass( value.call( this, j, getClass( this ) ) );\n\t\t\t} );\n\t\t}\n\n\t\tclassNames = classesToArray( value );\n\n\t\tif ( classNames.length ) {\n\t\t\treturn this.each( function() {\n\t\t\t\tcurValue = getClass( this );\n\t\t\t\tcur = this.nodeType === 1 && ( \" \" + stripAndCollapse( curValue ) + \" \" );\n\n\t\t\t\tif ( cur ) {\n\t\t\t\t\tfor ( i = 0; i < classNames.length; i++ ) {\n\t\t\t\t\t\tclassName = classNames[ i ];\n\t\t\t\t\t\tif ( cur.indexOf( \" \" + className + \" \" ) < 0 ) {\n\t\t\t\t\t\t\tcur += className + \" \";\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\n\t\t\t\t\t// Only assign if different to avoid unneeded rendering.\n\t\t\t\t\tfinalValue = stripAndCollapse( cur );\n\t\t\t\t\tif ( curValue !== finalValue ) {\n\t\t\t\t\t\tthis.setAttribute( \"class\", finalValue );\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t} );\n\t\t}\n\n\t\treturn this;\n\t},\n\n\tremoveClass: function( value ) {\n\t\tvar classNames, cur, curValue, className, i, finalValue;\n\n\t\tif ( isFunction( value ) ) {\n\t\t\treturn this.each( function( j ) {\n\t\t\t\tjQuery( this ).removeClass( value.call( this, j, getClass( this ) ) );\n\t\t\t} );\n\t\t}\n\n\t\tif ( !arguments.length ) {\n\t\t\treturn this.attr( \"class\", \"\" );\n\t\t}\n\n\t\tclassNames = classesToArray( value );\n\n\t\tif ( classNames.length ) {\n\t\t\treturn this.each( function() {\n\t\t\t\tcurValue = getClass( this );\n\n\t\t\t\t// This expression is here for better compressibility (see addClass)\n\t\t\t\tcur = this.nodeType === 1 && ( \" \" + stripAndCollapse( curValue ) + \" \" );\n\n\t\t\t\tif ( cur ) {\n\t\t\t\t\tfor ( i = 0; i < classNames.length; i++ ) {\n\t\t\t\t\t\tclassName = classNames[ i ];\n\n\t\t\t\t\t\t// Remove *all* instances\n\t\t\t\t\t\twhile ( cur.indexOf( \" \" + className + \" \" ) > -1 ) {\n\t\t\t\t\t\t\tcur = cur.replace( \" \" + className + \" \", \" \" );\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\n\t\t\t\t\t// Only assign if different to avoid unneeded rendering.\n\t\t\t\t\tfinalValue = stripAndCollapse( cur );\n\t\t\t\t\tif ( curValue !== finalValue ) {\n\t\t\t\t\t\tthis.setAttribute( \"class\", finalValue );\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t} );\n\t\t}\n\n\t\treturn this;\n\t},\n\n\ttoggleClass: function( value, stateVal ) {\n\t\tvar classNames, className, i, self,\n\t\t\ttype = typeof value,\n\t\t\tisValidValue = type === \"string\" || Array.isArray( value );\n\n\t\tif ( isFunction( value ) ) {\n\t\t\treturn this.each( function( i ) {\n\t\t\t\tjQuery( this ).toggleClass(\n\t\t\t\t\tvalue.call( this, i, getClass( this ), stateVal ),\n\t\t\t\t\tstateVal\n\t\t\t\t);\n\t\t\t} );\n\t\t}\n\n\t\tif ( typeof stateVal === \"boolean\" && isValidValue ) {\n\t\t\treturn stateVal ? this.addClass( value ) : this.removeClass( value );\n\t\t}\n\n\t\tclassNames = classesToArray( value );\n\n\t\treturn this.each( function() {\n\t\t\tif ( isValidValue ) {\n\n\t\t\t\t// Toggle individual class names\n\t\t\t\tself = jQuery( this );\n\n\t\t\t\tfor ( i = 0; i < classNames.length; i++ ) {\n\t\t\t\t\tclassName = classNames[ i ];\n\n\t\t\t\t\t// Check each className given, space separated list\n\t\t\t\t\tif ( self.hasClass( className ) ) {\n\t\t\t\t\t\tself.removeClass( className );\n\t\t\t\t\t} else {\n\t\t\t\t\t\tself.addClass( className );\n\t\t\t\t\t}\n\t\t\t\t}\n\n\t\t\t// Toggle whole class name\n\t\t\t} else if ( value === undefined || type === \"boolean\" ) {\n\t\t\t\tclassName = getClass( this );\n\t\t\t\tif ( className ) {\n\n\t\t\t\t\t// Store className if set\n\t\t\t\t\tdataPriv.set( this, \"__className__\", className );\n\t\t\t\t}\n\n\t\t\t\t// If the element has a class name or if we're passed `false`,\n\t\t\t\t// then remove the whole classname (if there was one, the above saved it).\n\t\t\t\t// Otherwise bring back whatever was previously saved (if anything),\n\t\t\t\t// falling back to the empty string if nothing was stored.\n\t\t\t\tif ( this.setAttribute ) {\n\t\t\t\t\tthis.setAttribute( \"class\",\n\t\t\t\t\t\tclassName || value === false ?\n\t\t\t\t\t\t\t\"\" :\n\t\t\t\t\t\t\tdataPriv.get( this, \"__className__\" ) || \"\"\n\t\t\t\t\t);\n\t\t\t\t}\n\t\t\t}\n\t\t} );\n\t},\n\n\thasClass: function( selector ) {\n\t\tvar className, elem,\n\t\t\ti = 0;\n\n\t\tclassName = \" \" + selector + \" \";\n\t\twhile ( ( elem = this[ i++ ] ) ) {\n\t\t\tif ( elem.nodeType === 1 &&\n\t\t\t\t( \" \" + stripAndCollapse( getClass( elem ) ) + \" \" ).indexOf( className ) > -1 ) {\n\t\t\t\treturn true;\n\t\t\t}\n\t\t}\n\n\t\treturn false;\n\t}\n} );\n\n\n\n\nvar rreturn = /\\r/g;\n\njQuery.fn.extend( {\n\tval: function( value ) {\n\t\tvar hooks, ret, valueIsFunction,\n\t\t\telem = this[ 0 ];\n\n\t\tif ( !arguments.length ) {\n\t\t\tif ( elem ) {\n\t\t\t\thooks = jQuery.valHooks[ elem.type ] ||\n\t\t\t\t\tjQuery.valHooks[ elem.nodeName.toLowerCase() ];\n\n\t\t\t\tif ( hooks &&\n\t\t\t\t\t\"get\" in hooks &&\n\t\t\t\t\t( ret = hooks.get( elem, \"value\" ) ) !== undefined\n\t\t\t\t) {\n\t\t\t\t\treturn ret;\n\t\t\t\t}\n\n\t\t\t\tret = elem.value;\n\n\t\t\t\t// Handle most common string cases\n\t\t\t\tif ( typeof ret === \"string\" ) {\n\t\t\t\t\treturn ret.replace( rreturn, \"\" );\n\t\t\t\t}\n\n\t\t\t\t// Handle cases where value is null/undef or number\n\t\t\t\treturn ret == null ? \"\" : ret;\n\t\t\t}\n\n\t\t\treturn;\n\t\t}\n\n\t\tvalueIsFunction = isFunction( value );\n\n\t\treturn this.each( function( i ) {\n\t\t\tvar val;\n\n\t\t\tif ( this.nodeType !== 1 ) {\n\t\t\t\treturn;\n\t\t\t}\n\n\t\t\tif ( valueIsFunction ) {\n\t\t\t\tval = value.call( this, i, jQuery( this ).val() );\n\t\t\t} else {\n\t\t\t\tval = value;\n\t\t\t}\n\n\t\t\t// Treat null/undefined as \"\"; convert numbers to string\n\t\t\tif ( val == null ) {\n\t\t\t\tval = \"\";\n\n\t\t\t} else if ( typeof val === \"number\" ) {\n\t\t\t\tval += \"\";\n\n\t\t\t} else if ( Array.isArray( val ) ) {\n\t\t\t\tval = jQuery.map( val, function( value ) {\n\t\t\t\t\treturn value == null ? \"\" : value + \"\";\n\t\t\t\t} );\n\t\t\t}\n\n\t\t\thooks = jQuery.valHooks[ this.type ] || jQuery.valHooks[ this.nodeName.toLowerCase() ];\n\n\t\t\t// If set returns undefined, fall back to normal setting\n\t\t\tif ( !hooks || !( \"set\" in hooks ) || hooks.set( this, val, \"value\" ) === undefined ) {\n\t\t\t\tthis.value = val;\n\t\t\t}\n\t\t} );\n\t}\n} );\n\njQuery.extend( {\n\tvalHooks: {\n\t\toption: {\n\t\t\tget: function( elem ) {\n\n\t\t\t\tvar val = jQuery.find.attr( elem, \"value\" );\n\t\t\t\treturn val != null ?\n\t\t\t\t\tval :\n\n\t\t\t\t\t// Support: IE <=10 - 11 only\n\t\t\t\t\t// option.text throws exceptions (trac-14686, trac-14858)\n\t\t\t\t\t// Strip and collapse whitespace\n\t\t\t\t\t// https://html.spec.whatwg.org/#strip-and-collapse-whitespace\n\t\t\t\t\tstripAndCollapse( jQuery.text( elem ) );\n\t\t\t}\n\t\t},\n\t\tselect: {\n\t\t\tget: function( elem ) {\n\t\t\t\tvar value, option, i,\n\t\t\t\t\toptions = elem.options,\n\t\t\t\t\tindex = elem.selectedIndex,\n\t\t\t\t\tone = elem.type === \"select-one\",\n\t\t\t\t\tvalues = one ? null : [],\n\t\t\t\t\tmax = one ? index + 1 : options.length;\n\n\t\t\t\tif ( index < 0 ) {\n\t\t\t\t\ti = max;\n\n\t\t\t\t} else {\n\t\t\t\t\ti = one ? index : 0;\n\t\t\t\t}\n\n\t\t\t\t// Loop through all the selected options\n\t\t\t\tfor ( ; i < max; i++ ) {\n\t\t\t\t\toption = options[ i ];\n\n\t\t\t\t\t// Support: IE <=9 only\n\t\t\t\t\t// IE8-9 doesn't update selected after form reset (trac-2551)\n\t\t\t\t\tif ( ( option.selected || i === index ) &&\n\n\t\t\t\t\t\t\t// Don't return options that are disabled or in a disabled optgroup\n\t\t\t\t\t\t\t!option.disabled &&\n\t\t\t\t\t\t\t( !option.parentNode.disabled ||\n\t\t\t\t\t\t\t\t!nodeName( option.parentNode, \"optgroup\" ) ) ) {\n\n\t\t\t\t\t\t// Get the specific value for the option\n\t\t\t\t\t\tvalue = jQuery( option ).val();\n\n\t\t\t\t\t\t// We don't need an array for one selects\n\t\t\t\t\t\tif ( one ) {\n\t\t\t\t\t\t\treturn value;\n\t\t\t\t\t\t}\n\n\t\t\t\t\t\t// Multi-Selects return an array\n\t\t\t\t\t\tvalues.push( value );\n\t\t\t\t\t}\n\t\t\t\t}\n\n\t\t\t\treturn values;\n\t\t\t},\n\n\t\t\tset: function( elem, value ) {\n\t\t\t\tvar optionSet, option,\n\t\t\t\t\toptions = elem.options,\n\t\t\t\t\tvalues = jQuery.makeArray( value ),\n\t\t\t\t\ti = options.length;\n\n\t\t\t\twhile ( i-- ) {\n\t\t\t\t\toption = options[ i ];\n\n\t\t\t\t\t/* eslint-disable no-cond-assign */\n\n\t\t\t\t\tif ( option.selected =\n\t\t\t\t\t\tjQuery.inArray( jQuery.valHooks.option.get( option ), values ) > -1\n\t\t\t\t\t) {\n\t\t\t\t\t\toptionSet = true;\n\t\t\t\t\t}\n\n\t\t\t\t\t/* eslint-enable no-cond-assign */\n\t\t\t\t}\n\n\t\t\t\t// Force browsers to behave consistently when non-matching value is set\n\t\t\t\tif ( !optionSet ) {\n\t\t\t\t\telem.selectedIndex = -1;\n\t\t\t\t}\n\t\t\t\treturn values;\n\t\t\t}\n\t\t}\n\t}\n} );\n\n// Radios and checkboxes getter/setter\njQuery.each( [ \"radio\", \"checkbox\" ], function() {\n\tjQuery.valHooks[ this ] = {\n\t\tset: function( elem, value ) {\n\t\t\tif ( Array.isArray( value ) ) {\n\t\t\t\treturn ( elem.checked = jQuery.inArray( jQuery( elem ).val(), value ) > -1 );\n\t\t\t}\n\t\t}\n\t};\n\tif ( !support.checkOn ) {\n\t\tjQuery.valHooks[ this ].get = function( elem ) {\n\t\t\treturn elem.getAttribute( \"value\" ) === null ? \"on\" : elem.value;\n\t\t};\n\t}\n} );\n\n\n\n\n// Return jQuery for attributes-only inclusion\nvar location = window.location;\n\nvar nonce = { guid: Date.now() };\n\nvar rquery = ( /\\?/ );\n\n\n\n// Cross-browser xml parsing\njQuery.parseXML = function( data ) {\n\tvar xml, parserErrorElem;\n\tif ( !data || typeof data !== \"string\" ) {\n\t\treturn null;\n\t}\n\n\t// Support: IE 9 - 11 only\n\t// IE throws on parseFromString with invalid input.\n\ttry {\n\t\txml = ( new window.DOMParser() ).parseFromString( data, \"text/xml\" );\n\t} catch ( e ) {}\n\n\tparserErrorElem = xml && xml.getElementsByTagName( \"parsererror\" )[ 0 ];\n\tif ( !xml || parserErrorElem ) {\n\t\tjQuery.error( \"Invalid XML: \" + (\n\t\t\tparserErrorElem ?\n\t\t\t\tjQuery.map( parserErrorElem.childNodes, function( el ) {\n\t\t\t\t\treturn el.textContent;\n\t\t\t\t} ).join( \"\\n\" ) :\n\t\t\t\tdata\n\t\t) );\n\t}\n\treturn xml;\n};\n\n\nvar rfocusMorph = /^(?:focusinfocus|focusoutblur)$/,\n\tstopPropagationCallback = function( e ) {\n\t\te.stopPropagation();\n\t};\n\njQuery.extend( jQuery.event, {\n\n\ttrigger: function( event, data, elem, onlyHandlers ) {\n\n\t\tvar i, cur, tmp, bubbleType, ontype, handle, special, lastElement,\n\t\t\teventPath = [ elem || document ],\n\t\t\ttype = hasOwn.call( event, \"type\" ) ? event.type : event,\n\t\t\tnamespaces = hasOwn.call( event, \"namespace\" ) ? event.namespace.split( \".\" ) : [];\n\n\t\tcur = lastElement = tmp = elem = elem || document;\n\n\t\t// Don't do events on text and comment nodes\n\t\tif ( elem.nodeType === 3 || elem.nodeType === 8 ) {\n\t\t\treturn;\n\t\t}\n\n\t\t// focus/blur morphs to focusin/out; ensure we're not firing them right now\n\t\tif ( rfocusMorph.test( type + jQuery.event.triggered ) ) {\n\t\t\treturn;\n\t\t}\n\n\t\tif ( type.indexOf( \".\" ) > -1 ) {\n\n\t\t\t// Namespaced trigger; create a regexp to match event type in handle()\n\t\t\tnamespaces = type.split( \".\" );\n\t\t\ttype = namespaces.shift();\n\t\t\tnamespaces.sort();\n\t\t}\n\t\tontype = type.indexOf( \":\" ) < 0 && \"on\" + type;\n\n\t\t// Caller can pass in a jQuery.Event object, Object, or just an event type string\n\t\tevent = event[ jQuery.expando ] ?\n\t\t\tevent :\n\t\t\tnew jQuery.Event( type, typeof event === \"object\" && event );\n\n\t\t// Trigger bitmask: & 1 for native handlers; & 2 for jQuery (always true)\n\t\tevent.isTrigger = onlyHandlers ? 2 : 3;\n\t\tevent.namespace = namespaces.join( \".\" );\n\t\tevent.rnamespace = event.namespace ?\n\t\t\tnew RegExp( \"(^|\\\\.)\" + namespaces.join( \"\\\\.(?:.*\\\\.|)\" ) + \"(\\\\.|$)\" ) :\n\t\t\tnull;\n\n\t\t// Clean up the event in case it is being reused\n\t\tevent.result = undefined;\n\t\tif ( !event.target ) {\n\t\t\tevent.target = elem;\n\t\t}\n\n\t\t// Clone any incoming data and prepend the event, creating the handler arg list\n\t\tdata = data == null ?\n\t\t\t[ event ] :\n\t\t\tjQuery.makeArray( data, [ event ] );\n\n\t\t// Allow special events to draw outside the lines\n\t\tspecial = jQuery.event.special[ type ] || {};\n\t\tif ( !onlyHandlers && special.trigger && special.trigger.apply( elem, data ) === false ) {\n\t\t\treturn;\n\t\t}\n\n\t\t// Determine event propagation path in advance, per W3C events spec (trac-9951)\n\t\t// Bubble up to document, then to window; watch for a global ownerDocument var (trac-9724)\n\t\tif ( !onlyHandlers && !special.noBubble && !isWindow( elem ) ) {\n\n\t\t\tbubbleType = special.delegateType || type;\n\t\t\tif ( !rfocusMorph.test( bubbleType + type ) ) {\n\t\t\t\tcur = cur.parentNode;\n\t\t\t}\n\t\t\tfor ( ; cur; cur = cur.parentNode ) {\n\t\t\t\teventPath.push( cur );\n\t\t\t\ttmp = cur;\n\t\t\t}\n\n\t\t\t// Only add window if we got to document (e.g., not plain obj or detached DOM)\n\t\t\tif ( tmp === ( elem.ownerDocument || document ) ) {\n\t\t\t\teventPath.push( tmp.defaultView || tmp.parentWindow || window );\n\t\t\t}\n\t\t}\n\n\t\t// Fire handlers on the event path\n\t\ti = 0;\n\t\twhile ( ( cur = eventPath[ i++ ] ) && !event.isPropagationStopped() ) {\n\t\t\tlastElement = cur;\n\t\t\tevent.type = i > 1 ?\n\t\t\t\tbubbleType :\n\t\t\t\tspecial.bindType || type;\n\n\t\t\t// jQuery handler\n\t\t\thandle = ( dataPriv.get( cur, \"events\" ) || Object.create( null ) )[ event.type ] &&\n\t\t\t\tdataPriv.get( cur, \"handle\" );\n\t\t\tif ( handle ) {\n\t\t\t\thandle.apply( cur, data );\n\t\t\t}\n\n\t\t\t// Native handler\n\t\t\thandle = ontype && cur[ ontype ];\n\t\t\tif ( handle && handle.apply && acceptData( cur ) ) {\n\t\t\t\tevent.result = handle.apply( cur, data );\n\t\t\t\tif ( event.result === false ) {\n\t\t\t\t\tevent.preventDefault();\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\tevent.type = type;\n\n\t\t// If nobody prevented the default action, do it now\n\t\tif ( !onlyHandlers && !event.isDefaultPrevented() ) {\n\n\t\t\tif ( ( !special._default ||\n\t\t\t\tspecial._default.apply( eventPath.pop(), data ) === false ) &&\n\t\t\t\tacceptData( elem ) ) {\n\n\t\t\t\t// Call a native DOM method on the target with the same name as the event.\n\t\t\t\t// Don't do default actions on window, that's where global variables be (trac-6170)\n\t\t\t\tif ( ontype && isFunction( elem[ type ] ) && !isWindow( elem ) ) {\n\n\t\t\t\t\t// Don't re-trigger an onFOO event when we call its FOO() method\n\t\t\t\t\ttmp = elem[ ontype ];\n\n\t\t\t\t\tif ( tmp ) {\n\t\t\t\t\t\telem[ ontype ] = null;\n\t\t\t\t\t}\n\n\t\t\t\t\t// Prevent re-triggering of the same event, since we already bubbled it above\n\t\t\t\t\tjQuery.event.triggered = type;\n\n\t\t\t\t\tif ( event.isPropagationStopped() ) {\n\t\t\t\t\t\tlastElement.addEventListener( type, stopPropagationCallback );\n\t\t\t\t\t}\n\n\t\t\t\t\telem[ type ]();\n\n\t\t\t\t\tif ( event.isPropagationStopped() ) {\n\t\t\t\t\t\tlastElement.removeEventListener( type, stopPropagationCallback );\n\t\t\t\t\t}\n\n\t\t\t\t\tjQuery.event.triggered = undefined;\n\n\t\t\t\t\tif ( tmp ) {\n\t\t\t\t\t\telem[ ontype ] = tmp;\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\n\t\treturn event.result;\n\t},\n\n\t// Piggyback on a donor event to simulate a different one\n\t// Used only for `focus(in | out)` events\n\tsimulate: function( type, elem, event ) {\n\t\tvar e = jQuery.extend(\n\t\t\tnew jQuery.Event(),\n\t\t\tevent,\n\t\t\t{\n\t\t\t\ttype: type,\n\t\t\t\tisSimulated: true\n\t\t\t}\n\t\t);\n\n\t\tjQuery.event.trigger( e, null, elem );\n\t}\n\n} );\n\njQuery.fn.extend( {\n\n\ttrigger: function( type, data ) {\n\t\treturn this.each( function() {\n\t\t\tjQuery.event.trigger( type, data, this );\n\t\t} );\n\t},\n\ttriggerHandler: function( type, data ) {\n\t\tvar elem = this[ 0 ];\n\t\tif ( elem ) {\n\t\t\treturn jQuery.event.trigger( type, data, elem, true );\n\t\t}\n\t}\n} );\n\n\nvar\n\trbracket = /\\[\\]$/,\n\trCRLF = /\\r?\\n/g,\n\trsubmitterTypes = /^(?:submit|button|image|reset|file)$/i,\n\trsubmittable = /^(?:input|select|textarea|keygen)/i;\n\nfunction buildParams( prefix, obj, traditional, add ) {\n\tvar name;\n\n\tif ( Array.isArray( obj ) ) {\n\n\t\t// Serialize array item.\n\t\tjQuery.each( obj, function( i, v ) {\n\t\t\tif ( traditional || rbracket.test( prefix ) ) {\n\n\t\t\t\t// Treat each array item as a scalar.\n\t\t\t\tadd( prefix, v );\n\n\t\t\t} else {\n\n\t\t\t\t// Item is non-scalar (array or object), encode its numeric index.\n\t\t\t\tbuildParams(\n\t\t\t\t\tprefix + \"[\" + ( typeof v === \"object\" && v != null ? i : \"\" ) + \"]\",\n\t\t\t\t\tv,\n\t\t\t\t\ttraditional,\n\t\t\t\t\tadd\n\t\t\t\t);\n\t\t\t}\n\t\t} );\n\n\t} else if ( !traditional && toType( obj ) === \"object\" ) {\n\n\t\t// Serialize object item.\n\t\tfor ( name in obj ) {\n\t\t\tbuildParams( prefix + \"[\" + name + \"]\", obj[ name ], traditional, add );\n\t\t}\n\n\t} else {\n\n\t\t// Serialize scalar item.\n\t\tadd( prefix, obj );\n\t}\n}\n\n// Serialize an array of form elements or a set of\n// key/values into a query string\njQuery.param = function( a, traditional ) {\n\tvar prefix,\n\t\ts = [],\n\t\tadd = function( key, valueOrFunction ) {\n\n\t\t\t// If value is a function, invoke it and use its return value\n\t\t\tvar value = isFunction( valueOrFunction ) ?\n\t\t\t\tvalueOrFunction() :\n\t\t\t\tvalueOrFunction;\n\n\t\t\ts[ s.length ] = encodeURIComponent( key ) + \"=\" +\n\t\t\t\tencodeURIComponent( value == null ? \"\" : value );\n\t\t};\n\n\tif ( a == null ) {\n\t\treturn \"\";\n\t}\n\n\t// If an array was passed in, assume that it is an array of form elements.\n\tif ( Array.isArray( a ) || ( a.jquery && !jQuery.isPlainObject( a ) ) ) {\n\n\t\t// Serialize the form elements\n\t\tjQuery.each( a, function() {\n\t\t\tadd( this.name, this.value );\n\t\t} );\n\n\t} else {\n\n\t\t// If traditional, encode the \"old\" way (the way 1.3.2 or older\n\t\t// did it), otherwise encode params recursively.\n\t\tfor ( prefix in a ) {\n\t\t\tbuildParams( prefix, a[ prefix ], traditional, add );\n\t\t}\n\t}\n\n\t// Return the resulting serialization\n\treturn s.join( \"&\" );\n};\n\njQuery.fn.extend( {\n\tserialize: function() {\n\t\treturn jQuery.param( this.serializeArray() );\n\t},\n\tserializeArray: function() {\n\t\treturn this.map( function() {\n\n\t\t\t// Can add propHook for \"elements\" to filter or add form elements\n\t\t\tvar elements = jQuery.prop( this, \"elements\" );\n\t\t\treturn elements ? jQuery.makeArray( elements ) : this;\n\t\t} ).filter( function() {\n\t\t\tvar type = this.type;\n\n\t\t\t// Use .is( \":disabled\" ) so that fieldset[disabled] works\n\t\t\treturn this.name && !jQuery( this ).is( \":disabled\" ) &&\n\t\t\t\trsubmittable.test( this.nodeName ) && !rsubmitterTypes.test( type ) &&\n\t\t\t\t( this.checked || !rcheckableType.test( type ) );\n\t\t} ).map( function( _i, elem ) {\n\t\t\tvar val = jQuery( this ).val();\n\n\t\t\tif ( val == null ) {\n\t\t\t\treturn null;\n\t\t\t}\n\n\t\t\tif ( Array.isArray( val ) ) {\n\t\t\t\treturn jQuery.map( val, function( val ) {\n\t\t\t\t\treturn { name: elem.name, value: val.replace( rCRLF, \"\\r\\n\" ) };\n\t\t\t\t} );\n\t\t\t}\n\n\t\t\treturn { name: elem.name, value: val.replace( rCRLF, \"\\r\\n\" ) };\n\t\t} ).get();\n\t}\n} );\n\n\nvar\n\tr20 = /%20/g,\n\trhash = /#.*$/,\n\trantiCache = /([?&])_=[^&]*/,\n\trheaders = /^(.*?):[ \\t]*([^\\r\\n]*)$/mg,\n\n\t// trac-7653, trac-8125, trac-8152: local protocol detection\n\trlocalProtocol = /^(?:about|app|app-storage|.+-extension|file|res|widget):$/,\n\trnoContent = /^(?:GET|HEAD)$/,\n\trprotocol = /^\\/\\//,\n\n\t/* Prefilters\n\t * 1) They are useful to introduce custom dataTypes (see ajax/jsonp.js for an example)\n\t * 2) These are called:\n\t *    - BEFORE asking for a transport\n\t *    - AFTER param serialization (s.data is a string if s.processData is true)\n\t * 3) key is the dataType\n\t * 4) the catchall symbol \"*\" can be used\n\t * 5) execution will start with transport dataType and THEN continue down to \"*\" if needed\n\t */\n\tprefilters = {},\n\n\t/* Transports bindings\n\t * 1) key is the dataType\n\t * 2) the catchall symbol \"*\" can be used\n\t * 3) selection will start with transport dataType and THEN go to \"*\" if needed\n\t */\n\ttransports = {},\n\n\t// Avoid comment-prolog char sequence (trac-10098); must appease lint and evade compression\n\tallTypes = \"*/\".concat( \"*\" ),\n\n\t// Anchor tag for parsing the document origin\n\toriginAnchor = document.createElement( \"a\" );\n\noriginAnchor.href = location.href;\n\n// Base \"constructor\" for jQuery.ajaxPrefilter and jQuery.ajaxTransport\nfunction addToPrefiltersOrTransports( structure ) {\n\n\t// dataTypeExpression is optional and defaults to \"*\"\n\treturn function( dataTypeExpression, func ) {\n\n\t\tif ( typeof dataTypeExpression !== \"string\" ) {\n\t\t\tfunc = dataTypeExpression;\n\t\t\tdataTypeExpression = \"*\";\n\t\t}\n\n\t\tvar dataType,\n\t\t\ti = 0,\n\t\t\tdataTypes = dataTypeExpression.toLowerCase().match( rnothtmlwhite ) || [];\n\n\t\tif ( isFunction( func ) ) {\n\n\t\t\t// For each dataType in the dataTypeExpression\n\t\t\twhile ( ( dataType = dataTypes[ i++ ] ) ) {\n\n\t\t\t\t// Prepend if requested\n\t\t\t\tif ( dataType[ 0 ] === \"+\" ) {\n\t\t\t\t\tdataType = dataType.slice( 1 ) || \"*\";\n\t\t\t\t\t( structure[ dataType ] = structure[ dataType ] || [] ).unshift( func );\n\n\t\t\t\t// Otherwise append\n\t\t\t\t} else {\n\t\t\t\t\t( structure[ dataType ] = structure[ dataType ] || [] ).push( func );\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t};\n}\n\n// Base inspection function for prefilters and transports\nfunction inspectPrefiltersOrTransports( structure, options, originalOptions, jqXHR ) {\n\n\tvar inspected = {},\n\t\tseekingTransport = ( structure === transports );\n\n\tfunction inspect( dataType ) {\n\t\tvar selected;\n\t\tinspected[ dataType ] = true;\n\t\tjQuery.each( structure[ dataType ] || [], function( _, prefilterOrFactory ) {\n\t\t\tvar dataTypeOrTransport = prefilterOrFactory( options, originalOptions, jqXHR );\n\t\t\tif ( typeof dataTypeOrTransport === \"string\" &&\n\t\t\t\t!seekingTransport && !inspected[ dataTypeOrTransport ] ) {\n\n\t\t\t\toptions.dataTypes.unshift( dataTypeOrTransport );\n\t\t\t\tinspect( dataTypeOrTransport );\n\t\t\t\treturn false;\n\t\t\t} else if ( seekingTransport ) {\n\t\t\t\treturn !( selected = dataTypeOrTransport );\n\t\t\t}\n\t\t} );\n\t\treturn selected;\n\t}\n\n\treturn inspect( options.dataTypes[ 0 ] ) || !inspected[ \"*\" ] && inspect( \"*\" );\n}\n\n// A special extend for ajax options\n// that takes \"flat\" options (not to be deep extended)\n// Fixes trac-9887\nfunction ajaxExtend( target, src ) {\n\tvar key, deep,\n\t\tflatOptions = jQuery.ajaxSettings.flatOptions || {};\n\n\tfor ( key in src ) {\n\t\tif ( src[ key ] !== undefined ) {\n\t\t\t( flatOptions[ key ] ? target : ( deep || ( deep = {} ) ) )[ key ] = src[ key ];\n\t\t}\n\t}\n\tif ( deep ) {\n\t\tjQuery.extend( true, target, deep );\n\t}\n\n\treturn target;\n}\n\n/* Handles responses to an ajax request:\n * - finds the right dataType (mediates between content-type and expected dataType)\n * - returns the corresponding response\n */\nfunction ajaxHandleResponses( s, jqXHR, responses ) {\n\n\tvar ct, type, finalDataType, firstDataType,\n\t\tcontents = s.contents,\n\t\tdataTypes = s.dataTypes;\n\n\t// Remove auto dataType and get content-type in the process\n\twhile ( dataTypes[ 0 ] === \"*\" ) {\n\t\tdataTypes.shift();\n\t\tif ( ct === undefined ) {\n\t\t\tct = s.mimeType || jqXHR.getResponseHeader( \"Content-Type\" );\n\t\t}\n\t}\n\n\t// Check if we're dealing with a known content-type\n\tif ( ct ) {\n\t\tfor ( type in contents ) {\n\t\t\tif ( contents[ type ] && contents[ type ].test( ct ) ) {\n\t\t\t\tdataTypes.unshift( type );\n\t\t\t\tbreak;\n\t\t\t}\n\t\t}\n\t}\n\n\t// Check to see if we have a response for the expected dataType\n\tif ( dataTypes[ 0 ] in responses ) {\n\t\tfinalDataType = dataTypes[ 0 ];\n\t} else {\n\n\t\t// Try convertible dataTypes\n\t\tfor ( type in responses ) {\n\t\t\tif ( !dataTypes[ 0 ] || s.converters[ type + \" \" + dataTypes[ 0 ] ] ) {\n\t\t\t\tfinalDataType = type;\n\t\t\t\tbreak;\n\t\t\t}\n\t\t\tif ( !firstDataType ) {\n\t\t\t\tfirstDataType = type;\n\t\t\t}\n\t\t}\n\n\t\t// Or just use first one\n\t\tfinalDataType = finalDataType || firstDataType;\n\t}\n\n\t// If we found a dataType\n\t// We add the dataType to the list if needed\n\t// and return the corresponding response\n\tif ( finalDataType ) {\n\t\tif ( finalDataType !== dataTypes[ 0 ] ) {\n\t\t\tdataTypes.unshift( finalDataType );\n\t\t}\n\t\treturn responses[ finalDataType ];\n\t}\n}\n\n/* Chain conversions given the request and the original response\n * Also sets the responseXXX fields on the jqXHR instance\n */\nfunction ajaxConvert( s, response, jqXHR, isSuccess ) {\n\tvar conv2, current, conv, tmp, prev,\n\t\tconverters = {},\n\n\t\t// Work with a copy of dataTypes in case we need to modify it for conversion\n\t\tdataTypes = s.dataTypes.slice();\n\n\t// Create converters map with lowercased keys\n\tif ( dataTypes[ 1 ] ) {\n\t\tfor ( conv in s.converters ) {\n\t\t\tconverters[ conv.toLowerCase() ] = s.converters[ conv ];\n\t\t}\n\t}\n\n\tcurrent = dataTypes.shift();\n\n\t// Convert to each sequential dataType\n\twhile ( current ) {\n\n\t\tif ( s.responseFields[ current ] ) {\n\t\t\tjqXHR[ s.responseFields[ current ] ] = response;\n\t\t}\n\n\t\t// Apply the dataFilter if provided\n\t\tif ( !prev && isSuccess && s.dataFilter ) {\n\t\t\tresponse = s.dataFilter( response, s.dataType );\n\t\t}\n\n\t\tprev = current;\n\t\tcurrent = dataTypes.shift();\n\n\t\tif ( current ) {\n\n\t\t\t// There's only work to do if current dataType is non-auto\n\t\t\tif ( current === \"*\" ) {\n\n\t\t\t\tcurrent = prev;\n\n\t\t\t// Convert response if prev dataType is non-auto and differs from current\n\t\t\t} else if ( prev !== \"*\" && prev !== current ) {\n\n\t\t\t\t// Seek a direct converter\n\t\t\t\tconv = converters[ prev + \" \" + current ] || converters[ \"* \" + current ];\n\n\t\t\t\t// If none found, seek a pair\n\t\t\t\tif ( !conv ) {\n\t\t\t\t\tfor ( conv2 in converters ) {\n\n\t\t\t\t\t\t// If conv2 outputs current\n\t\t\t\t\t\ttmp = conv2.split( \" \" );\n\t\t\t\t\t\tif ( tmp[ 1 ] === current ) {\n\n\t\t\t\t\t\t\t// If prev can be converted to accepted input\n\t\t\t\t\t\t\tconv = converters[ prev + \" \" + tmp[ 0 ] ] ||\n\t\t\t\t\t\t\t\tconverters[ \"* \" + tmp[ 0 ] ];\n\t\t\t\t\t\t\tif ( conv ) {\n\n\t\t\t\t\t\t\t\t// Condense equivalence converters\n\t\t\t\t\t\t\t\tif ( conv === true ) {\n\t\t\t\t\t\t\t\t\tconv = converters[ conv2 ];\n\n\t\t\t\t\t\t\t\t// Otherwise, insert the intermediate dataType\n\t\t\t\t\t\t\t\t} else if ( converters[ conv2 ] !== true ) {\n\t\t\t\t\t\t\t\t\tcurrent = tmp[ 0 ];\n\t\t\t\t\t\t\t\t\tdataTypes.unshift( tmp[ 1 ] );\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\tbreak;\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t}\n\n\t\t\t\t// Apply converter (if not an equivalence)\n\t\t\t\tif ( conv !== true ) {\n\n\t\t\t\t\t// Unless errors are allowed to bubble, catch and return them\n\t\t\t\t\tif ( conv && s.throws ) {\n\t\t\t\t\t\tresponse = conv( response );\n\t\t\t\t\t} else {\n\t\t\t\t\t\ttry {\n\t\t\t\t\t\t\tresponse = conv( response );\n\t\t\t\t\t\t} catch ( e ) {\n\t\t\t\t\t\t\treturn {\n\t\t\t\t\t\t\t\tstate: \"parsererror\",\n\t\t\t\t\t\t\t\terror: conv ? e : \"No conversion from \" + prev + \" to \" + current\n\t\t\t\t\t\t\t};\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t}\n\n\treturn { state: \"success\", data: response };\n}\n\njQuery.extend( {\n\n\t// Counter for holding the number of active queries\n\tactive: 0,\n\n\t// Last-Modified header cache for next request\n\tlastModified: {},\n\tetag: {},\n\n\tajaxSettings: {\n\t\turl: location.href,\n\t\ttype: \"GET\",\n\t\tisLocal: rlocalProtocol.test( location.protocol ),\n\t\tglobal: true,\n\t\tprocessData: true,\n\t\tasync: true,\n\t\tcontentType: \"application/x-www-form-urlencoded; charset=UTF-8\",\n\n\t\t/*\n\t\ttimeout: 0,\n\t\tdata: null,\n\t\tdataType: null,\n\t\tusername: null,\n\t\tpassword: null,\n\t\tcache: null,\n\t\tthrows: false,\n\t\ttraditional: false,\n\t\theaders: {},\n\t\t*/\n\n\t\taccepts: {\n\t\t\t\"*\": allTypes,\n\t\t\ttext: \"text/plain\",\n\t\t\thtml: \"text/html\",\n\t\t\txml: \"application/xml, text/xml\",\n\t\t\tjson: \"application/json, text/javascript\"\n\t\t},\n\n\t\tcontents: {\n\t\t\txml: /\\bxml\\b/,\n\t\t\thtml: /\\bhtml/,\n\t\t\tjson: /\\bjson\\b/\n\t\t},\n\n\t\tresponseFields: {\n\t\t\txml: \"responseXML\",\n\t\t\ttext: \"responseText\",\n\t\t\tjson: \"responseJSON\"\n\t\t},\n\n\t\t// Data converters\n\t\t// Keys separate source (or catchall \"*\") and destination types with a single space\n\t\tconverters: {\n\n\t\t\t// Convert anything to text\n\t\t\t\"* text\": String,\n\n\t\t\t// Text to html (true = no transformation)\n\t\t\t\"text html\": true,\n\n\t\t\t// Evaluate text as a json expression\n\t\t\t\"text json\": JSON.parse,\n\n\t\t\t// Parse text as xml\n\t\t\t\"text xml\": jQuery.parseXML\n\t\t},\n\n\t\t// For options that shouldn't be deep extended:\n\t\t// you can add your own custom options here if\n\t\t// and when you create one that shouldn't be\n\t\t// deep extended (see ajaxExtend)\n\t\tflatOptions: {\n\t\t\turl: true,\n\t\t\tcontext: true\n\t\t}\n\t},\n\n\t// Creates a full fledged settings object into target\n\t// with both ajaxSettings and settings fields.\n\t// If target is omitted, writes into ajaxSettings.\n\tajaxSetup: function( target, settings ) {\n\t\treturn settings ?\n\n\t\t\t// Building a settings object\n\t\t\tajaxExtend( ajaxExtend( target, jQuery.ajaxSettings ), settings ) :\n\n\t\t\t// Extending ajaxSettings\n\t\t\tajaxExtend( jQuery.ajaxSettings, target );\n\t},\n\n\tajaxPrefilter: addToPrefiltersOrTransports( prefilters ),\n\tajaxTransport: addToPrefiltersOrTransports( transports ),\n\n\t// Main method\n\tajax: function( url, options ) {\n\n\t\t// If url is an object, simulate pre-1.5 signature\n\t\tif ( typeof url === \"object\" ) {\n\t\t\toptions = url;\n\t\t\turl = undefined;\n\t\t}\n\n\t\t// Force options to be an object\n\t\toptions = options || {};\n\n\t\tvar transport,\n\n\t\t\t// URL without anti-cache param\n\t\t\tcacheURL,\n\n\t\t\t// Response headers\n\t\t\tresponseHeadersString,\n\t\t\tresponseHeaders,\n\n\t\t\t// timeout handle\n\t\t\ttimeoutTimer,\n\n\t\t\t// Url cleanup var\n\t\t\turlAnchor,\n\n\t\t\t// Request state (becomes false upon send and true upon completion)\n\t\t\tcompleted,\n\n\t\t\t// To know if global events are to be dispatched\n\t\t\tfireGlobals,\n\n\t\t\t// Loop variable\n\t\t\ti,\n\n\t\t\t// uncached part of the url\n\t\t\tuncached,\n\n\t\t\t// Create the final options object\n\t\t\ts = jQuery.ajaxSetup( {}, options ),\n\n\t\t\t// Callbacks context\n\t\t\tcallbackContext = s.context || s,\n\n\t\t\t// Context for global events is callbackContext if it is a DOM node or jQuery collection\n\t\t\tglobalEventContext = s.context &&\n\t\t\t\t( callbackContext.nodeType || callbackContext.jquery ) ?\n\t\t\t\tjQuery( callbackContext ) :\n\t\t\t\tjQuery.event,\n\n\t\t\t// Deferreds\n\t\t\tdeferred = jQuery.Deferred(),\n\t\t\tcompleteDeferred = jQuery.Callbacks( \"once memory\" ),\n\n\t\t\t// Status-dependent callbacks\n\t\t\tstatusCode = s.statusCode || {},\n\n\t\t\t// Headers (they are sent all at once)\n\t\t\trequestHeaders = {},\n\t\t\trequestHeadersNames = {},\n\n\t\t\t// Default abort message\n\t\t\tstrAbort = \"canceled\",\n\n\t\t\t// Fake xhr\n\t\t\tjqXHR = {\n\t\t\t\treadyState: 0,\n\n\t\t\t\t// Builds headers hashtable if needed\n\t\t\t\tgetResponseHeader: function( key ) {\n\t\t\t\t\tvar match;\n\t\t\t\t\tif ( completed ) {\n\t\t\t\t\t\tif ( !responseHeaders ) {\n\t\t\t\t\t\t\tresponseHeaders = {};\n\t\t\t\t\t\t\twhile ( ( match = rheaders.exec( responseHeadersString ) ) ) {\n\t\t\t\t\t\t\t\tresponseHeaders[ match[ 1 ].toLowerCase() + \" \" ] =\n\t\t\t\t\t\t\t\t\t( responseHeaders[ match[ 1 ].toLowerCase() + \" \" ] || [] )\n\t\t\t\t\t\t\t\t\t\t.concat( match[ 2 ] );\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t}\n\t\t\t\t\t\tmatch = responseHeaders[ key.toLowerCase() + \" \" ];\n\t\t\t\t\t}\n\t\t\t\t\treturn match == null ? null : match.join( \", \" );\n\t\t\t\t},\n\n\t\t\t\t// Raw string\n\t\t\t\tgetAllResponseHeaders: function() {\n\t\t\t\t\treturn completed ? responseHeadersString : null;\n\t\t\t\t},\n\n\t\t\t\t// Caches the header\n\t\t\t\tsetRequestHeader: function( name, value ) {\n\t\t\t\t\tif ( completed == null ) {\n\t\t\t\t\t\tname = requestHeadersNames[ name.toLowerCase() ] =\n\t\t\t\t\t\t\trequestHeadersNames[ name.toLowerCase() ] || name;\n\t\t\t\t\t\trequestHeaders[ name ] = value;\n\t\t\t\t\t}\n\t\t\t\t\treturn this;\n\t\t\t\t},\n\n\t\t\t\t// Overrides response content-type header\n\t\t\t\toverrideMimeType: function( type ) {\n\t\t\t\t\tif ( completed == null ) {\n\t\t\t\t\t\ts.mimeType = type;\n\t\t\t\t\t}\n\t\t\t\t\treturn this;\n\t\t\t\t},\n\n\t\t\t\t// Status-dependent callbacks\n\t\t\t\tstatusCode: function( map ) {\n\t\t\t\t\tvar code;\n\t\t\t\t\tif ( map ) {\n\t\t\t\t\t\tif ( completed ) {\n\n\t\t\t\t\t\t\t// Execute the appropriate callbacks\n\t\t\t\t\t\t\tjqXHR.always( map[ jqXHR.status ] );\n\t\t\t\t\t\t} else {\n\n\t\t\t\t\t\t\t// Lazy-add the new callbacks in a way that preserves old ones\n\t\t\t\t\t\t\tfor ( code in map ) {\n\t\t\t\t\t\t\t\tstatusCode[ code ] = [ statusCode[ code ], map[ code ] ];\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t\treturn this;\n\t\t\t\t},\n\n\t\t\t\t// Cancel the request\n\t\t\t\tabort: function( statusText ) {\n\t\t\t\t\tvar finalText = statusText || strAbort;\n\t\t\t\t\tif ( transport ) {\n\t\t\t\t\t\ttransport.abort( finalText );\n\t\t\t\t\t}\n\t\t\t\t\tdone( 0, finalText );\n\t\t\t\t\treturn this;\n\t\t\t\t}\n\t\t\t};\n\n\t\t// Attach deferreds\n\t\tdeferred.promise( jqXHR );\n\n\t\t// Add protocol if not provided (prefilters might expect it)\n\t\t// Handle falsy url in the settings object (trac-10093: consistency with old signature)\n\t\t// We also use the url parameter if available\n\t\ts.url = ( ( url || s.url || location.href ) + \"\" )\n\t\t\t.replace( rprotocol, location.protocol + \"//\" );\n\n\t\t// Alias method option to type as per ticket trac-12004\n\t\ts.type = options.method || options.type || s.method || s.type;\n\n\t\t// Extract dataTypes list\n\t\ts.dataTypes = ( s.dataType || \"*\" ).toLowerCase().match( rnothtmlwhite ) || [ \"\" ];\n\n\t\t// A cross-domain request is in order when the origin doesn't match the current origin.\n\t\tif ( s.crossDomain == null ) {\n\t\t\turlAnchor = document.createElement( \"a\" );\n\n\t\t\t// Support: IE <=8 - 11, Edge 12 - 15\n\t\t\t// IE throws exception on accessing the href property if url is malformed,\n\t\t\t// e.g. http://example.com:80x/\n\t\t\ttry {\n\t\t\t\turlAnchor.href = s.url;\n\n\t\t\t\t// Support: IE <=8 - 11 only\n\t\t\t\t// Anchor's host property isn't correctly set when s.url is relative\n\t\t\t\turlAnchor.href = urlAnchor.href;\n\t\t\t\ts.crossDomain = originAnchor.protocol + \"//\" + originAnchor.host !==\n\t\t\t\t\turlAnchor.protocol + \"//\" + urlAnchor.host;\n\t\t\t} catch ( e ) {\n\n\t\t\t\t// If there is an error parsing the URL, assume it is crossDomain,\n\t\t\t\t// it can be rejected by the transport if it is invalid\n\t\t\t\ts.crossDomain = true;\n\t\t\t}\n\t\t}\n\n\t\t// Convert data if not already a string\n\t\tif ( s.data && s.processData && typeof s.data !== \"string\" ) {\n\t\t\ts.data = jQuery.param( s.data, s.traditional );\n\t\t}\n\n\t\t// Apply prefilters\n\t\tinspectPrefiltersOrTransports( prefilters, s, options, jqXHR );\n\n\t\t// If request was aborted inside a prefilter, stop there\n\t\tif ( completed ) {\n\t\t\treturn jqXHR;\n\t\t}\n\n\t\t// We can fire global events as of now if asked to\n\t\t// Don't fire events if jQuery.event is undefined in an AMD-usage scenario (trac-15118)\n\t\tfireGlobals = jQuery.event && s.global;\n\n\t\t// Watch for a new set of requests\n\t\tif ( fireGlobals && jQuery.active++ === 0 ) {\n\t\t\tjQuery.event.trigger( \"ajaxStart\" );\n\t\t}\n\n\t\t// Uppercase the type\n\t\ts.type = s.type.toUpperCase();\n\n\t\t// Determine if request has content\n\t\ts.hasContent = !rnoContent.test( s.type );\n\n\t\t// Save the URL in case we're toying with the If-Modified-Since\n\t\t// and/or If-None-Match header later on\n\t\t// Remove hash to simplify url manipulation\n\t\tcacheURL = s.url.replace( rhash, \"\" );\n\n\t\t// More options handling for requests with no content\n\t\tif ( !s.hasContent ) {\n\n\t\t\t// Remember the hash so we can put it back\n\t\t\tuncached = s.url.slice( cacheURL.length );\n\n\t\t\t// If data is available and should be processed, append data to url\n\t\t\tif ( s.data && ( s.processData || typeof s.data === \"string\" ) ) {\n\t\t\t\tcacheURL += ( rquery.test( cacheURL ) ? \"&\" : \"?\" ) + s.data;\n\n\t\t\t\t// trac-9682: remove data so that it's not used in an eventual retry\n\t\t\t\tdelete s.data;\n\t\t\t}\n\n\t\t\t// Add or update anti-cache param if needed\n\t\t\tif ( s.cache === false ) {\n\t\t\t\tcacheURL = cacheURL.replace( rantiCache, \"$1\" );\n\t\t\t\tuncached = ( rquery.test( cacheURL ) ? \"&\" : \"?\" ) + \"_=\" + ( nonce.guid++ ) +\n\t\t\t\t\tuncached;\n\t\t\t}\n\n\t\t\t// Put hash and anti-cache on the URL that will be requested (gh-1732)\n\t\t\ts.url = cacheURL + uncached;\n\n\t\t// Change '%20' to '+' if this is encoded form body content (gh-2658)\n\t\t} else if ( s.data && s.processData &&\n\t\t\t( s.contentType || \"\" ).indexOf( \"application/x-www-form-urlencoded\" ) === 0 ) {\n\t\t\ts.data = s.data.replace( r20, \"+\" );\n\t\t}\n\n\t\t// Set the If-Modified-Since and/or If-None-Match header, if in ifModified mode.\n\t\tif ( s.ifModified ) {\n\t\t\tif ( jQuery.lastModified[ cacheURL ] ) {\n\t\t\t\tjqXHR.setRequestHeader( \"If-Modified-Since\", jQuery.lastModified[ cacheURL ] );\n\t\t\t}\n\t\t\tif ( jQuery.etag[ cacheURL ] ) {\n\t\t\t\tjqXHR.setRequestHeader( \"If-None-Match\", jQuery.etag[ cacheURL ] );\n\t\t\t}\n\t\t}\n\n\t\t// Set the correct header, if data is being sent\n\t\tif ( s.data && s.hasContent && s.contentType !== false || options.contentType ) {\n\t\t\tjqXHR.setRequestHeader( \"Content-Type\", s.contentType );\n\t\t}\n\n\t\t// Set the Accepts header for the server, depending on the dataType\n\t\tjqXHR.setRequestHeader(\n\t\t\t\"Accept\",\n\t\t\ts.dataTypes[ 0 ] && s.accepts[ s.dataTypes[ 0 ] ] ?\n\t\t\t\ts.accepts[ s.dataTypes[ 0 ] ] +\n\t\t\t\t\t( s.dataTypes[ 0 ] !== \"*\" ? \", \" + allTypes + \"; q=0.01\" : \"\" ) :\n\t\t\t\ts.accepts[ \"*\" ]\n\t\t);\n\n\t\t// Check for headers option\n\t\tfor ( i in s.headers ) {\n\t\t\tjqXHR.setRequestHeader( i, s.headers[ i ] );\n\t\t}\n\n\t\t// Allow custom headers/mimetypes and early abort\n\t\tif ( s.beforeSend &&\n\t\t\t( s.beforeSend.call( callbackContext, jqXHR, s ) === false || completed ) ) {\n\n\t\t\t// Abort if not done already and return\n\t\t\treturn jqXHR.abort();\n\t\t}\n\n\t\t// Aborting is no longer a cancellation\n\t\tstrAbort = \"abort\";\n\n\t\t// Install callbacks on deferreds\n\t\tcompleteDeferred.add( s.complete );\n\t\tjqXHR.done( s.success );\n\t\tjqXHR.fail( s.error );\n\n\t\t// Get transport\n\t\ttransport = inspectPrefiltersOrTransports( transports, s, options, jqXHR );\n\n\t\t// If no transport, we auto-abort\n\t\tif ( !transport ) {\n\t\t\tdone( -1, \"No Transport\" );\n\t\t} else {\n\t\t\tjqXHR.readyState = 1;\n\n\t\t\t// Send global event\n\t\t\tif ( fireGlobals ) {\n\t\t\t\tglobalEventContext.trigger( \"ajaxSend\", [ jqXHR, s ] );\n\t\t\t}\n\n\t\t\t// If request was aborted inside ajaxSend, stop there\n\t\t\tif ( completed ) {\n\t\t\t\treturn jqXHR;\n\t\t\t}\n\n\t\t\t// Timeout\n\t\t\tif ( s.async && s.timeout > 0 ) {\n\t\t\t\ttimeoutTimer = window.setTimeout( function() {\n\t\t\t\t\tjqXHR.abort( \"timeout\" );\n\t\t\t\t}, s.timeout );\n\t\t\t}\n\n\t\t\ttry {\n\t\t\t\tcompleted = false;\n\t\t\t\ttransport.send( requestHeaders, done );\n\t\t\t} catch ( e ) {\n\n\t\t\t\t// Rethrow post-completion exceptions\n\t\t\t\tif ( completed ) {\n\t\t\t\t\tthrow e;\n\t\t\t\t}\n\n\t\t\t\t// Propagate others as results\n\t\t\t\tdone( -1, e );\n\t\t\t}\n\t\t}\n\n\t\t// Callback for when everything is done\n\t\tfunction done( status, nativeStatusText, responses, headers ) {\n\t\t\tvar isSuccess, success, error, response, modified,\n\t\t\t\tstatusText = nativeStatusText;\n\n\t\t\t// Ignore repeat invocations\n\t\t\tif ( completed ) {\n\t\t\t\treturn;\n\t\t\t}\n\n\t\t\tcompleted = true;\n\n\t\t\t// Clear timeout if it exists\n\t\t\tif ( timeoutTimer ) {\n\t\t\t\twindow.clearTimeout( timeoutTimer );\n\t\t\t}\n\n\t\t\t// Dereference transport for early garbage collection\n\t\t\t// (no matter how long the jqXHR object will be used)\n\t\t\ttransport = undefined;\n\n\t\t\t// Cache response headers\n\t\t\tresponseHeadersString = headers || \"\";\n\n\t\t\t// Set readyState\n\t\t\tjqXHR.readyState = status > 0 ? 4 : 0;\n\n\t\t\t// Determine if successful\n\t\t\tisSuccess = status >= 200 && status < 300 || status === 304;\n\n\t\t\t// Get response data\n\t\t\tif ( responses ) {\n\t\t\t\tresponse = ajaxHandleResponses( s, jqXHR, responses );\n\t\t\t}\n\n\t\t\t// Use a noop converter for missing script but not if jsonp\n\t\t\tif ( !isSuccess &&\n\t\t\t\tjQuery.inArray( \"script\", s.dataTypes ) > -1 &&\n\t\t\t\tjQuery.inArray( \"json\", s.dataTypes ) < 0 ) {\n\t\t\t\ts.converters[ \"text script\" ] = function() {};\n\t\t\t}\n\n\t\t\t// Convert no matter what (that way responseXXX fields are always set)\n\t\t\tresponse = ajaxConvert( s, response, jqXHR, isSuccess );\n\n\t\t\t// If successful, handle type chaining\n\t\t\tif ( isSuccess ) {\n\n\t\t\t\t// Set the If-Modified-Since and/or If-None-Match header, if in ifModified mode.\n\t\t\t\tif ( s.ifModified ) {\n\t\t\t\t\tmodified = jqXHR.getResponseHeader( \"Last-Modified\" );\n\t\t\t\t\tif ( modified ) {\n\t\t\t\t\t\tjQuery.lastModified[ cacheURL ] = modified;\n\t\t\t\t\t}\n\t\t\t\t\tmodified = jqXHR.getResponseHeader( \"etag\" );\n\t\t\t\t\tif ( modified ) {\n\t\t\t\t\t\tjQuery.etag[ cacheURL ] = modified;\n\t\t\t\t\t}\n\t\t\t\t}\n\n\t\t\t\t// if no content\n\t\t\t\tif ( status === 204 || s.type === \"HEAD\" ) {\n\t\t\t\t\tstatusText = \"nocontent\";\n\n\t\t\t\t// if not modified\n\t\t\t\t} else if ( status === 304 ) {\n\t\t\t\t\tstatusText = \"notmodified\";\n\n\t\t\t\t// If we have data, let's convert it\n\t\t\t\t} else {\n\t\t\t\t\tstatusText = response.state;\n\t\t\t\t\tsuccess = response.data;\n\t\t\t\t\terror = response.error;\n\t\t\t\t\tisSuccess = !error;\n\t\t\t\t}\n\t\t\t} else {\n\n\t\t\t\t// Extract error from statusText and normalize for non-aborts\n\t\t\t\terror = statusText;\n\t\t\t\tif ( status || !statusText ) {\n\t\t\t\t\tstatusText = \"error\";\n\t\t\t\t\tif ( status < 0 ) {\n\t\t\t\t\t\tstatus = 0;\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\n\t\t\t// Set data for the fake xhr object\n\t\t\tjqXHR.status = status;\n\t\t\tjqXHR.statusText = ( nativeStatusText || statusText ) + \"\";\n\n\t\t\t// Success/Error\n\t\t\tif ( isSuccess ) {\n\t\t\t\tdeferred.resolveWith( callbackContext, [ success, statusText, jqXHR ] );\n\t\t\t} else {\n\t\t\t\tdeferred.rejectWith( callbackContext, [ jqXHR, statusText, error ] );\n\t\t\t}\n\n\t\t\t// Status-dependent callbacks\n\t\t\tjqXHR.statusCode( statusCode );\n\t\t\tstatusCode = undefined;\n\n\t\t\tif ( fireGlobals ) {\n\t\t\t\tglobalEventContext.trigger( isSuccess ? \"ajaxSuccess\" : \"ajaxError\",\n\t\t\t\t\t[ jqXHR, s, isSuccess ? success : error ] );\n\t\t\t}\n\n\t\t\t// Complete\n\t\t\tcompleteDeferred.fireWith( callbackContext, [ jqXHR, statusText ] );\n\n\t\t\tif ( fireGlobals ) {\n\t\t\t\tglobalEventContext.trigger( \"ajaxComplete\", [ jqXHR, s ] );\n\n\t\t\t\t// Handle the global AJAX counter\n\t\t\t\tif ( !( --jQuery.active ) ) {\n\t\t\t\t\tjQuery.event.trigger( \"ajaxStop\" );\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\n\t\treturn jqXHR;\n\t},\n\n\tgetJSON: function( url, data, callback ) {\n\t\treturn jQuery.get( url, data, callback, \"json\" );\n\t},\n\n\tgetScript: function( url, callback ) {\n\t\treturn jQuery.get( url, undefined, callback, \"script\" );\n\t}\n} );\n\njQuery.each( [ \"get\", \"post\" ], function( _i, method ) {\n\tjQuery[ method ] = function( url, data, callback, type ) {\n\n\t\t// Shift arguments if data argument was omitted\n\t\tif ( isFunction( data ) ) {\n\t\t\ttype = type || callback;\n\t\t\tcallback = data;\n\t\t\tdata = undefined;\n\t\t}\n\n\t\t// The url can be an options object (which then must have .url)\n\t\treturn jQuery.ajax( jQuery.extend( {\n\t\t\turl: url,\n\t\t\ttype: method,\n\t\t\tdataType: type,\n\t\t\tdata: data,\n\t\t\tsuccess: callback\n\t\t}, jQuery.isPlainObject( url ) && url ) );\n\t};\n} );\n\njQuery.ajaxPrefilter( function( s ) {\n\tvar i;\n\tfor ( i in s.headers ) {\n\t\tif ( i.toLowerCase() === \"content-type\" ) {\n\t\t\ts.contentType = s.headers[ i ] || \"\";\n\t\t}\n\t}\n} );\n\n\njQuery._evalUrl = function( url, options, doc ) {\n\treturn jQuery.ajax( {\n\t\turl: url,\n\n\t\t// Make this explicit, since user can override this through ajaxSetup (trac-11264)\n\t\ttype: \"GET\",\n\t\tdataType: \"script\",\n\t\tcache: true,\n\t\tasync: false,\n\t\tglobal: false,\n\n\t\t// Only evaluate the response if it is successful (gh-4126)\n\t\t// dataFilter is not invoked for failure responses, so using it instead\n\t\t// of the default converter is kludgy but it works.\n\t\tconverters: {\n\t\t\t\"text script\": function() {}\n\t\t},\n\t\tdataFilter: function( response ) {\n\t\t\tjQuery.globalEval( response, options, doc );\n\t\t}\n\t} );\n};\n\n\njQuery.fn.extend( {\n\twrapAll: function( html ) {\n\t\tvar wrap;\n\n\t\tif ( this[ 0 ] ) {\n\t\t\tif ( isFunction( html ) ) {\n\t\t\t\thtml = html.call( this[ 0 ] );\n\t\t\t}\n\n\t\t\t// The elements to wrap the target around\n\t\t\twrap = jQuery( html, this[ 0 ].ownerDocument ).eq( 0 ).clone( true );\n\n\t\t\tif ( this[ 0 ].parentNode ) {\n\t\t\t\twrap.insertBefore( this[ 0 ] );\n\t\t\t}\n\n\t\t\twrap.map( function() {\n\t\t\t\tvar elem = this;\n\n\t\t\t\twhile ( elem.firstElementChild ) {\n\t\t\t\t\telem = elem.firstElementChild;\n\t\t\t\t}\n\n\t\t\t\treturn elem;\n\t\t\t} ).append( this );\n\t\t}\n\n\t\treturn this;\n\t},\n\n\twrapInner: function( html ) {\n\t\tif ( isFunction( html ) ) {\n\t\t\treturn this.each( function( i ) {\n\t\t\t\tjQuery( this ).wrapInner( html.call( this, i ) );\n\t\t\t} );\n\t\t}\n\n\t\treturn this.each( function() {\n\t\t\tvar self = jQuery( this ),\n\t\t\t\tcontents = self.contents();\n\n\t\t\tif ( contents.length ) {\n\t\t\t\tcontents.wrapAll( html );\n\n\t\t\t} else {\n\t\t\t\tself.append( html );\n\t\t\t}\n\t\t} );\n\t},\n\n\twrap: function( html ) {\n\t\tvar htmlIsFunction = isFunction( html );\n\n\t\treturn this.each( function( i ) {\n\t\t\tjQuery( this ).wrapAll( htmlIsFunction ? html.call( this, i ) : html );\n\t\t} );\n\t},\n\n\tunwrap: function( selector ) {\n\t\tthis.parent( selector ).not( \"body\" ).each( function() {\n\t\t\tjQuery( this ).replaceWith( this.childNodes );\n\t\t} );\n\t\treturn this;\n\t}\n} );\n\n\njQuery.expr.pseudos.hidden = function( elem ) {\n\treturn !jQuery.expr.pseudos.visible( elem );\n};\njQuery.expr.pseudos.visible = function( elem ) {\n\treturn !!( elem.offsetWidth || elem.offsetHeight || elem.getClientRects().length );\n};\n\n\n\n\njQuery.ajaxSettings.xhr = function() {\n\ttry {\n\t\treturn new window.XMLHttpRequest();\n\t} catch ( e ) {}\n};\n\nvar xhrSuccessStatus = {\n\n\t\t// File protocol always yields status code 0, assume 200\n\t\t0: 200,\n\n\t\t// Support: IE <=9 only\n\t\t// trac-1450: sometimes IE returns 1223 when it should be 204\n\t\t1223: 204\n\t},\n\txhrSupported = jQuery.ajaxSettings.xhr();\n\nsupport.cors = !!xhrSupported && ( \"withCredentials\" in xhrSupported );\nsupport.ajax = xhrSupported = !!xhrSupported;\n\njQuery.ajaxTransport( function( options ) {\n\tvar callback, errorCallback;\n\n\t// Cross domain only allowed if supported through XMLHttpRequest\n\tif ( support.cors || xhrSupported && !options.crossDomain ) {\n\t\treturn {\n\t\t\tsend: function( headers, complete ) {\n\t\t\t\tvar i,\n\t\t\t\t\txhr = options.xhr();\n\n\t\t\t\txhr.open(\n\t\t\t\t\toptions.type,\n\t\t\t\t\toptions.url,\n\t\t\t\t\toptions.async,\n\t\t\t\t\toptions.username,\n\t\t\t\t\toptions.password\n\t\t\t\t);\n\n\t\t\t\t// Apply custom fields if provided\n\t\t\t\tif ( options.xhrFields ) {\n\t\t\t\t\tfor ( i in options.xhrFields ) {\n\t\t\t\t\t\txhr[ i ] = options.xhrFields[ i ];\n\t\t\t\t\t}\n\t\t\t\t}\n\n\t\t\t\t// Override mime type if needed\n\t\t\t\tif ( options.mimeType && xhr.overrideMimeType ) {\n\t\t\t\t\txhr.overrideMimeType( options.mimeType );\n\t\t\t\t}\n\n\t\t\t\t// X-Requested-With header\n\t\t\t\t// For cross-domain requests, seeing as conditions for a preflight are\n\t\t\t\t// akin to a jigsaw puzzle, we simply never set it to be sure.\n\t\t\t\t// (it can always be set on a per-request basis or even using ajaxSetup)\n\t\t\t\t// For same-domain requests, won't change header if already provided.\n\t\t\t\tif ( !options.crossDomain && !headers[ \"X-Requested-With\" ] ) {\n\t\t\t\t\theaders[ \"X-Requested-With\" ] = \"XMLHttpRequest\";\n\t\t\t\t}\n\n\t\t\t\t// Set headers\n\t\t\t\tfor ( i in headers ) {\n\t\t\t\t\txhr.setRequestHeader( i, headers[ i ] );\n\t\t\t\t}\n\n\t\t\t\t// Callback\n\t\t\t\tcallback = function( type ) {\n\t\t\t\t\treturn function() {\n\t\t\t\t\t\tif ( callback ) {\n\t\t\t\t\t\t\tcallback = errorCallback = xhr.onload =\n\t\t\t\t\t\t\t\txhr.onerror = xhr.onabort = xhr.ontimeout =\n\t\t\t\t\t\t\t\t\txhr.onreadystatechange = null;\n\n\t\t\t\t\t\t\tif ( type === \"abort\" ) {\n\t\t\t\t\t\t\t\txhr.abort();\n\t\t\t\t\t\t\t} else if ( type === \"error\" ) {\n\n\t\t\t\t\t\t\t\t// Support: IE <=9 only\n\t\t\t\t\t\t\t\t// On a manual native abort, IE9 throws\n\t\t\t\t\t\t\t\t// errors on any property access that is not readyState\n\t\t\t\t\t\t\t\tif ( typeof xhr.status !== \"number\" ) {\n\t\t\t\t\t\t\t\t\tcomplete( 0, \"error\" );\n\t\t\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\t\t\tcomplete(\n\n\t\t\t\t\t\t\t\t\t\t// File: protocol always yields status 0; see trac-8605, trac-14207\n\t\t\t\t\t\t\t\t\t\txhr.status,\n\t\t\t\t\t\t\t\t\t\txhr.statusText\n\t\t\t\t\t\t\t\t\t);\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\t\tcomplete(\n\t\t\t\t\t\t\t\t\txhrSuccessStatus[ xhr.status ] || xhr.status,\n\t\t\t\t\t\t\t\t\txhr.statusText,\n\n\t\t\t\t\t\t\t\t\t// Support: IE <=9 only\n\t\t\t\t\t\t\t\t\t// IE9 has no XHR2 but throws on binary (trac-11426)\n\t\t\t\t\t\t\t\t\t// For XHR2 non-text, let the caller handle it (gh-2498)\n\t\t\t\t\t\t\t\t\t( xhr.responseType || \"text\" ) !== \"text\"  ||\n\t\t\t\t\t\t\t\t\ttypeof xhr.responseText !== \"string\" ?\n\t\t\t\t\t\t\t\t\t\t{ binary: xhr.response } :\n\t\t\t\t\t\t\t\t\t\t{ text: xhr.responseText },\n\t\t\t\t\t\t\t\t\txhr.getAllResponseHeaders()\n\t\t\t\t\t\t\t\t);\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t}\n\t\t\t\t\t};\n\t\t\t\t};\n\n\t\t\t\t// Listen to events\n\t\t\t\txhr.onload = callback();\n\t\t\t\terrorCallback = xhr.onerror = xhr.ontimeout = callback( \"error\" );\n\n\t\t\t\t// Support: IE 9 only\n\t\t\t\t// Use onreadystatechange to replace onabort\n\t\t\t\t// to handle uncaught aborts\n\t\t\t\tif ( xhr.onabort !== undefined ) {\n\t\t\t\t\txhr.onabort = errorCallback;\n\t\t\t\t} else {\n\t\t\t\t\txhr.onreadystatechange = function() {\n\n\t\t\t\t\t\t// Check readyState before timeout as it changes\n\t\t\t\t\t\tif ( xhr.readyState === 4 ) {\n\n\t\t\t\t\t\t\t// Allow onerror to be called first,\n\t\t\t\t\t\t\t// but that will not handle a native abort\n\t\t\t\t\t\t\t// Also, save errorCallback to a variable\n\t\t\t\t\t\t\t// as xhr.onerror cannot be accessed\n\t\t\t\t\t\t\twindow.setTimeout( function() {\n\t\t\t\t\t\t\t\tif ( callback ) {\n\t\t\t\t\t\t\t\t\terrorCallback();\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t} );\n\t\t\t\t\t\t}\n\t\t\t\t\t};\n\t\t\t\t}\n\n\t\t\t\t// Create the abort callback\n\t\t\t\tcallback = callback( \"abort\" );\n\n\t\t\t\ttry {\n\n\t\t\t\t\t// Do send the request (this may raise an exception)\n\t\t\t\t\txhr.send( options.hasContent && options.data || null );\n\t\t\t\t} catch ( e ) {\n\n\t\t\t\t\t// trac-14683: Only rethrow if this hasn't been notified as an error yet\n\t\t\t\t\tif ( callback ) {\n\t\t\t\t\t\tthrow e;\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t},\n\n\t\t\tabort: function() {\n\t\t\t\tif ( callback ) {\n\t\t\t\t\tcallback();\n\t\t\t\t}\n\t\t\t}\n\t\t};\n\t}\n} );\n\n\n\n\n// Prevent auto-execution of scripts when no explicit dataType was provided (See gh-2432)\njQuery.ajaxPrefilter( function( s ) {\n\tif ( s.crossDomain ) {\n\t\ts.contents.script = false;\n\t}\n} );\n\n// Install script dataType\njQuery.ajaxSetup( {\n\taccepts: {\n\t\tscript: \"text/javascript, application/javascript, \" +\n\t\t\t\"application/ecmascript, application/x-ecmascript\"\n\t},\n\tcontents: {\n\t\tscript: /\\b(?:java|ecma)script\\b/\n\t},\n\tconverters: {\n\t\t\"text script\": function( text ) {\n\t\t\tjQuery.globalEval( text );\n\t\t\treturn text;\n\t\t}\n\t}\n} );\n\n// Handle cache's special case and crossDomain\njQuery.ajaxPrefilter( \"script\", function( s ) {\n\tif ( s.cache === undefined ) {\n\t\ts.cache = false;\n\t}\n\tif ( s.crossDomain ) {\n\t\ts.type = \"GET\";\n\t}\n} );\n\n// Bind script tag hack transport\njQuery.ajaxTransport( \"script\", function( s ) {\n\n\t// This transport only deals with cross domain or forced-by-attrs requests\n\tif ( s.crossDomain || s.scriptAttrs ) {\n\t\tvar script, callback;\n\t\treturn {\n\t\t\tsend: function( _, complete ) {\n\t\t\t\tscript = jQuery( \"<script>\" )\n\t\t\t\t\t.attr( s.scriptAttrs || {} )\n\t\t\t\t\t.prop( { charset: s.scriptCharset, src: s.url } )\n\t\t\t\t\t.on( \"load error\", callback = function( evt ) {\n\t\t\t\t\t\tscript.remove();\n\t\t\t\t\t\tcallback = null;\n\t\t\t\t\t\tif ( evt ) {\n\t\t\t\t\t\t\tcomplete( evt.type === \"error\" ? 404 : 200, evt.type );\n\t\t\t\t\t\t}\n\t\t\t\t\t} );\n\n\t\t\t\t// Use native DOM manipulation to avoid our domManip AJAX trickery\n\t\t\t\tdocument.head.appendChild( script[ 0 ] );\n\t\t\t},\n\t\t\tabort: function() {\n\t\t\t\tif ( callback ) {\n\t\t\t\t\tcallback();\n\t\t\t\t}\n\t\t\t}\n\t\t};\n\t}\n} );\n\n\n\n\nvar oldCallbacks = [],\n\trjsonp = /(=)\\?(?=&|$)|\\?\\?/;\n\n// Default jsonp settings\njQuery.ajaxSetup( {\n\tjsonp: \"callback\",\n\tjsonpCallback: function() {\n\t\tvar callback = oldCallbacks.pop() || ( jQuery.expando + \"_\" + ( nonce.guid++ ) );\n\t\tthis[ callback ] = true;\n\t\treturn callback;\n\t}\n} );\n\n// Detect, normalize options and install callbacks for jsonp requests\njQuery.ajaxPrefilter( \"json jsonp\", function( s, originalSettings, jqXHR ) {\n\n\tvar callbackName, overwritten, responseContainer,\n\t\tjsonProp = s.jsonp !== false && ( rjsonp.test( s.url ) ?\n\t\t\t\"url\" :\n\t\t\ttypeof s.data === \"string\" &&\n\t\t\t\t( s.contentType || \"\" )\n\t\t\t\t\t.indexOf( \"application/x-www-form-urlencoded\" ) === 0 &&\n\t\t\t\trjsonp.test( s.data ) && \"data\"\n\t\t);\n\n\t// Handle iff the expected data type is \"jsonp\" or we have a parameter to set\n\tif ( jsonProp || s.dataTypes[ 0 ] === \"jsonp\" ) {\n\n\t\t// Get callback name, remembering preexisting value associated with it\n\t\tcallbackName = s.jsonpCallback = isFunction( s.jsonpCallback ) ?\n\t\t\ts.jsonpCallback() :\n\t\t\ts.jsonpCallback;\n\n\t\t// Insert callback into url or form data\n\t\tif ( jsonProp ) {\n\t\t\ts[ jsonProp ] = s[ jsonProp ].replace( rjsonp, \"$1\" + callbackName );\n\t\t} else if ( s.jsonp !== false ) {\n\t\t\ts.url += ( rquery.test( s.url ) ? \"&\" : \"?\" ) + s.jsonp + \"=\" + callbackName;\n\t\t}\n\n\t\t// Use data converter to retrieve json after script execution\n\t\ts.converters[ \"script json\" ] = function() {\n\t\t\tif ( !responseContainer ) {\n\t\t\t\tjQuery.error( callbackName + \" was not called\" );\n\t\t\t}\n\t\t\treturn responseContainer[ 0 ];\n\t\t};\n\n\t\t// Force json dataType\n\t\ts.dataTypes[ 0 ] = \"json\";\n\n\t\t// Install callback\n\t\toverwritten = window[ callbackName ];\n\t\twindow[ callbackName ] = function() {\n\t\t\tresponseContainer = arguments;\n\t\t};\n\n\t\t// Clean-up function (fires after converters)\n\t\tjqXHR.always( function() {\n\n\t\t\t// If previous value didn't exist - remove it\n\t\t\tif ( overwritten === undefined ) {\n\t\t\t\tjQuery( window ).removeProp( callbackName );\n\n\t\t\t// Otherwise restore preexisting value\n\t\t\t} else {\n\t\t\t\twindow[ callbackName ] = overwritten;\n\t\t\t}\n\n\t\t\t// Save back as free\n\t\t\tif ( s[ callbackName ] ) {\n\n\t\t\t\t// Make sure that re-using the options doesn't screw things around\n\t\t\t\ts.jsonpCallback = originalSettings.jsonpCallback;\n\n\t\t\t\t// Save the callback name for future use\n\t\t\t\toldCallbacks.push( callbackName );\n\t\t\t}\n\n\t\t\t// Call if it was a function and we have a response\n\t\t\tif ( responseContainer && isFunction( overwritten ) ) {\n\t\t\t\toverwritten( responseContainer[ 0 ] );\n\t\t\t}\n\n\t\t\tresponseContainer = overwritten = undefined;\n\t\t} );\n\n\t\t// Delegate to script\n\t\treturn \"script\";\n\t}\n} );\n\n\n\n\n// Support: Safari 8 only\n// In Safari 8 documents created via document.implementation.createHTMLDocument\n// collapse sibling forms: the second one becomes a child of the first one.\n// Because of that, this security measure has to be disabled in Safari 8.\n// https://bugs.webkit.org/show_bug.cgi?id=137337\nsupport.createHTMLDocument = ( function() {\n\tvar body = document.implementation.createHTMLDocument( \"\" ).body;\n\tbody.innerHTML = \"<form></form><form></form>\";\n\treturn body.childNodes.length === 2;\n} )();\n\n\n// Argument \"data\" should be string of html\n// context (optional): If specified, the fragment will be created in this context,\n// defaults to document\n// keepScripts (optional): If true, will include scripts passed in the html string\njQuery.parseHTML = function( data, context, keepScripts ) {\n\tif ( typeof data !== \"string\" ) {\n\t\treturn [];\n\t}\n\tif ( typeof context === \"boolean\" ) {\n\t\tkeepScripts = context;\n\t\tcontext = false;\n\t}\n\n\tvar base, parsed, scripts;\n\n\tif ( !context ) {\n\n\t\t// Stop scripts or inline event handlers from being executed immediately\n\t\t// by using document.implementation\n\t\tif ( support.createHTMLDocument ) {\n\t\t\tcontext = document.implementation.createHTMLDocument( \"\" );\n\n\t\t\t// Set the base href for the created document\n\t\t\t// so any parsed elements with URLs\n\t\t\t// are based on the document's URL (gh-2965)\n\t\t\tbase = context.createElement( \"base\" );\n\t\t\tbase.href = document.location.href;\n\t\t\tcontext.head.appendChild( base );\n\t\t} else {\n\t\t\tcontext = document;\n\t\t}\n\t}\n\n\tparsed = rsingleTag.exec( data );\n\tscripts = !keepScripts && [];\n\n\t// Single tag\n\tif ( parsed ) {\n\t\treturn [ context.createElement( parsed[ 1 ] ) ];\n\t}\n\n\tparsed = buildFragment( [ data ], context, scripts );\n\n\tif ( scripts && scripts.length ) {\n\t\tjQuery( scripts ).remove();\n\t}\n\n\treturn jQuery.merge( [], parsed.childNodes );\n};\n\n\n/**\n * Load a url into a page\n */\njQuery.fn.load = function( url, params, callback ) {\n\tvar selector, type, response,\n\t\tself = this,\n\t\toff = url.indexOf( \" \" );\n\n\tif ( off > -1 ) {\n\t\tselector = stripAndCollapse( url.slice( off ) );\n\t\turl = url.slice( 0, off );\n\t}\n\n\t// If it's a function\n\tif ( isFunction( params ) ) {\n\n\t\t// We assume that it's the callback\n\t\tcallback = params;\n\t\tparams = undefined;\n\n\t// Otherwise, build a param string\n\t} else if ( params && typeof params === \"object\" ) {\n\t\ttype = \"POST\";\n\t}\n\n\t// If we have elements to modify, make the request\n\tif ( self.length > 0 ) {\n\t\tjQuery.ajax( {\n\t\t\turl: url,\n\n\t\t\t// If \"type\" variable is undefined, then \"GET\" method will be used.\n\t\t\t// Make value of this field explicit since\n\t\t\t// user can override it through ajaxSetup method\n\t\t\ttype: type || \"GET\",\n\t\t\tdataType: \"html\",\n\t\t\tdata: params\n\t\t} ).done( function( responseText ) {\n\n\t\t\t// Save response for use in complete callback\n\t\t\tresponse = arguments;\n\n\t\t\tself.html( selector ?\n\n\t\t\t\t// If a selector was specified, locate the right elements in a dummy div\n\t\t\t\t// Exclude scripts to avoid IE 'Permission Denied' errors\n\t\t\t\tjQuery( \"<div>\" ).append( jQuery.parseHTML( responseText ) ).find( selector ) :\n\n\t\t\t\t// Otherwise use the full result\n\t\t\t\tresponseText );\n\n\t\t// If the request succeeds, this function gets \"data\", \"status\", \"jqXHR\"\n\t\t// but they are ignored because response was set above.\n\t\t// If it fails, this function gets \"jqXHR\", \"status\", \"error\"\n\t\t} ).always( callback && function( jqXHR, status ) {\n\t\t\tself.each( function() {\n\t\t\t\tcallback.apply( this, response || [ jqXHR.responseText, status, jqXHR ] );\n\t\t\t} );\n\t\t} );\n\t}\n\n\treturn this;\n};\n\n\n\n\njQuery.expr.pseudos.animated = function( elem ) {\n\treturn jQuery.grep( jQuery.timers, function( fn ) {\n\t\treturn elem === fn.elem;\n\t} ).length;\n};\n\n\n\n\njQuery.offset = {\n\tsetOffset: function( elem, options, i ) {\n\t\tvar curPosition, curLeft, curCSSTop, curTop, curOffset, curCSSLeft, calculatePosition,\n\t\t\tposition = jQuery.css( elem, \"position\" ),\n\t\t\tcurElem = jQuery( elem ),\n\t\t\tprops = {};\n\n\t\t// Set position first, in-case top/left are set even on static elem\n\t\tif ( position === \"static\" ) {\n\t\t\telem.style.position = \"relative\";\n\t\t}\n\n\t\tcurOffset = curElem.offset();\n\t\tcurCSSTop = jQuery.css( elem, \"top\" );\n\t\tcurCSSLeft = jQuery.css( elem, \"left\" );\n\t\tcalculatePosition = ( position === \"absolute\" || position === \"fixed\" ) &&\n\t\t\t( curCSSTop + curCSSLeft ).indexOf( \"auto\" ) > -1;\n\n\t\t// Need to be able to calculate position if either\n\t\t// top or left is auto and position is either absolute or fixed\n\t\tif ( calculatePosition ) {\n\t\t\tcurPosition = curElem.position();\n\t\t\tcurTop = curPosition.top;\n\t\t\tcurLeft = curPosition.left;\n\n\t\t} else {\n\t\t\tcurTop = parseFloat( curCSSTop ) || 0;\n\t\t\tcurLeft = parseFloat( curCSSLeft ) || 0;\n\t\t}\n\n\t\tif ( isFunction( options ) ) {\n\n\t\t\t// Use jQuery.extend here to allow modification of coordinates argument (gh-1848)\n\t\t\toptions = options.call( elem, i, jQuery.extend( {}, curOffset ) );\n\t\t}\n\n\t\tif ( options.top != null ) {\n\t\t\tprops.top = ( options.top - curOffset.top ) + curTop;\n\t\t}\n\t\tif ( options.left != null ) {\n\t\t\tprops.left = ( options.left - curOffset.left ) + curLeft;\n\t\t}\n\n\t\tif ( \"using\" in options ) {\n\t\t\toptions.using.call( elem, props );\n\n\t\t} else {\n\t\t\tcurElem.css( props );\n\t\t}\n\t}\n};\n\njQuery.fn.extend( {\n\n\t// offset() relates an element's border box to the document origin\n\toffset: function( options ) {\n\n\t\t// Preserve chaining for setter\n\t\tif ( arguments.length ) {\n\t\t\treturn options === undefined ?\n\t\t\t\tthis :\n\t\t\t\tthis.each( function( i ) {\n\t\t\t\t\tjQuery.offset.setOffset( this, options, i );\n\t\t\t\t} );\n\t\t}\n\n\t\tvar rect, win,\n\t\t\telem = this[ 0 ];\n\n\t\tif ( !elem ) {\n\t\t\treturn;\n\t\t}\n\n\t\t// Return zeros for disconnected and hidden (display: none) elements (gh-2310)\n\t\t// Support: IE <=11 only\n\t\t// Running getBoundingClientRect on a\n\t\t// disconnected node in IE throws an error\n\t\tif ( !elem.getClientRects().length ) {\n\t\t\treturn { top: 0, left: 0 };\n\t\t}\n\n\t\t// Get document-relative position by adding viewport scroll to viewport-relative gBCR\n\t\trect = elem.getBoundingClientRect();\n\t\twin = elem.ownerDocument.defaultView;\n\t\treturn {\n\t\t\ttop: rect.top + win.pageYOffset,\n\t\t\tleft: rect.left + win.pageXOffset\n\t\t};\n\t},\n\n\t// position() relates an element's margin box to its offset parent's padding box\n\t// This corresponds to the behavior of CSS absolute positioning\n\tposition: function() {\n\t\tif ( !this[ 0 ] ) {\n\t\t\treturn;\n\t\t}\n\n\t\tvar offsetParent, offset, doc,\n\t\t\telem = this[ 0 ],\n\t\t\tparentOffset = { top: 0, left: 0 };\n\n\t\t// position:fixed elements are offset from the viewport, which itself always has zero offset\n\t\tif ( jQuery.css( elem, \"position\" ) === \"fixed\" ) {\n\n\t\t\t// Assume position:fixed implies availability of getBoundingClientRect\n\t\t\toffset = elem.getBoundingClientRect();\n\n\t\t} else {\n\t\t\toffset = this.offset();\n\n\t\t\t// Account for the *real* offset parent, which can be the document or its root element\n\t\t\t// when a statically positioned element is identified\n\t\t\tdoc = elem.ownerDocument;\n\t\t\toffsetParent = elem.offsetParent || doc.documentElement;\n\t\t\twhile ( offsetParent &&\n\t\t\t\t( offsetParent === doc.body || offsetParent === doc.documentElement ) &&\n\t\t\t\tjQuery.css( offsetParent, \"position\" ) === \"static\" ) {\n\n\t\t\t\toffsetParent = offsetParent.parentNode;\n\t\t\t}\n\t\t\tif ( offsetParent && offsetParent !== elem && offsetParent.nodeType === 1 ) {\n\n\t\t\t\t// Incorporate borders into its offset, since they are outside its content origin\n\t\t\t\tparentOffset = jQuery( offsetParent ).offset();\n\t\t\t\tparentOffset.top += jQuery.css( offsetParent, \"borderTopWidth\", true );\n\t\t\t\tparentOffset.left += jQuery.css( offsetParent, \"borderLeftWidth\", true );\n\t\t\t}\n\t\t}\n\n\t\t// Subtract parent offsets and element margins\n\t\treturn {\n\t\t\ttop: offset.top - parentOffset.top - jQuery.css( elem, \"marginTop\", true ),\n\t\t\tleft: offset.left - parentOffset.left - jQuery.css( elem, \"marginLeft\", true )\n\t\t};\n\t},\n\n\t// This method will return documentElement in the following cases:\n\t// 1) For the element inside the iframe without offsetParent, this method will return\n\t//    documentElement of the parent window\n\t// 2) For the hidden or detached element\n\t// 3) For body or html element, i.e. in case of the html node - it will return itself\n\t//\n\t// but those exceptions were never presented as a real life use-cases\n\t// and might be considered as more preferable results.\n\t//\n\t// This logic, however, is not guaranteed and can change at any point in the future\n\toffsetParent: function() {\n\t\treturn this.map( function() {\n\t\t\tvar offsetParent = this.offsetParent;\n\n\t\t\twhile ( offsetParent && jQuery.css( offsetParent, \"position\" ) === \"static\" ) {\n\t\t\t\toffsetParent = offsetParent.offsetParent;\n\t\t\t}\n\n\t\t\treturn offsetParent || documentElement;\n\t\t} );\n\t}\n} );\n\n// Create scrollLeft and scrollTop methods\njQuery.each( { scrollLeft: \"pageXOffset\", scrollTop: \"pageYOffset\" }, function( method, prop ) {\n\tvar top = \"pageYOffset\" === prop;\n\n\tjQuery.fn[ method ] = function( val ) {\n\t\treturn access( this, function( elem, method, val ) {\n\n\t\t\t// Coalesce documents and windows\n\t\t\tvar win;\n\t\t\tif ( isWindow( elem ) ) {\n\t\t\t\twin = elem;\n\t\t\t} else if ( elem.nodeType === 9 ) {\n\t\t\t\twin = elem.defaultView;\n\t\t\t}\n\n\t\t\tif ( val === undefined ) {\n\t\t\t\treturn win ? win[ prop ] : elem[ method ];\n\t\t\t}\n\n\t\t\tif ( win ) {\n\t\t\t\twin.scrollTo(\n\t\t\t\t\t!top ? val : win.pageXOffset,\n\t\t\t\t\ttop ? val : win.pageYOffset\n\t\t\t\t);\n\n\t\t\t} else {\n\t\t\t\telem[ method ] = val;\n\t\t\t}\n\t\t}, method, val, arguments.length );\n\t};\n} );\n\n// Support: Safari <=7 - 9.1, Chrome <=37 - 49\n// Add the top/left cssHooks using jQuery.fn.position\n// Webkit bug: https://bugs.webkit.org/show_bug.cgi?id=29084\n// Blink bug: https://bugs.chromium.org/p/chromium/issues/detail?id=589347\n// getComputedStyle returns percent when specified for top/left/bottom/right;\n// rather than make the css module depend on the offset module, just check for it here\njQuery.each( [ \"top\", \"left\" ], function( _i, prop ) {\n\tjQuery.cssHooks[ prop ] = addGetHookIf( support.pixelPosition,\n\t\tfunction( elem, computed ) {\n\t\t\tif ( computed ) {\n\t\t\t\tcomputed = curCSS( elem, prop );\n\n\t\t\t\t// If curCSS returns percentage, fallback to offset\n\t\t\t\treturn rnumnonpx.test( computed ) ?\n\t\t\t\t\tjQuery( elem ).position()[ prop ] + \"px\" :\n\t\t\t\t\tcomputed;\n\t\t\t}\n\t\t}\n\t);\n} );\n\n\n// Create innerHeight, innerWidth, height, width, outerHeight and outerWidth methods\njQuery.each( { Height: \"height\", Width: \"width\" }, function( name, type ) {\n\tjQuery.each( {\n\t\tpadding: \"inner\" + name,\n\t\tcontent: type,\n\t\t\"\": \"outer\" + name\n\t}, function( defaultExtra, funcName ) {\n\n\t\t// Margin is only for outerHeight, outerWidth\n\t\tjQuery.fn[ funcName ] = function( margin, value ) {\n\t\t\tvar chainable = arguments.length && ( defaultExtra || typeof margin !== \"boolean\" ),\n\t\t\t\textra = defaultExtra || ( margin === true || value === true ? \"margin\" : \"border\" );\n\n\t\t\treturn access( this, function( elem, type, value ) {\n\t\t\t\tvar doc;\n\n\t\t\t\tif ( isWindow( elem ) ) {\n\n\t\t\t\t\t// $( window ).outerWidth/Height return w/h including scrollbars (gh-1729)\n\t\t\t\t\treturn funcName.indexOf( \"outer\" ) === 0 ?\n\t\t\t\t\t\telem[ \"inner\" + name ] :\n\t\t\t\t\t\telem.document.documentElement[ \"client\" + name ];\n\t\t\t\t}\n\n\t\t\t\t// Get document width or height\n\t\t\t\tif ( elem.nodeType === 9 ) {\n\t\t\t\t\tdoc = elem.documentElement;\n\n\t\t\t\t\t// Either scroll[Width/Height] or offset[Width/Height] or client[Width/Height],\n\t\t\t\t\t// whichever is greatest\n\t\t\t\t\treturn Math.max(\n\t\t\t\t\t\telem.body[ \"scroll\" + name ], doc[ \"scroll\" + name ],\n\t\t\t\t\t\telem.body[ \"offset\" + name ], doc[ \"offset\" + name ],\n\t\t\t\t\t\tdoc[ \"client\" + name ]\n\t\t\t\t\t);\n\t\t\t\t}\n\n\t\t\t\treturn value === undefined ?\n\n\t\t\t\t\t// Get width or height on the element, requesting but not forcing parseFloat\n\t\t\t\t\tjQuery.css( elem, type, extra ) :\n\n\t\t\t\t\t// Set width or height on the element\n\t\t\t\t\tjQuery.style( elem, type, value, extra );\n\t\t\t}, type, chainable ? margin : undefined, chainable );\n\t\t};\n\t} );\n} );\n\n\njQuery.each( [\n\t\"ajaxStart\",\n\t\"ajaxStop\",\n\t\"ajaxComplete\",\n\t\"ajaxError\",\n\t\"ajaxSuccess\",\n\t\"ajaxSend\"\n], function( _i, type ) {\n\tjQuery.fn[ type ] = function( fn ) {\n\t\treturn this.on( type, fn );\n\t};\n} );\n\n\n\n\njQuery.fn.extend( {\n\n\tbind: function( types, data, fn ) {\n\t\treturn this.on( types, null, data, fn );\n\t},\n\tunbind: function( types, fn ) {\n\t\treturn this.off( types, null, fn );\n\t},\n\n\tdelegate: function( selector, types, data, fn ) {\n\t\treturn this.on( types, selector, data, fn );\n\t},\n\tundelegate: function( selector, types, fn ) {\n\n\t\t// ( namespace ) or ( selector, types [, fn] )\n\t\treturn arguments.length === 1 ?\n\t\t\tthis.off( selector, \"**\" ) :\n\t\t\tthis.off( types, selector || \"**\", fn );\n\t},\n\n\thover: function( fnOver, fnOut ) {\n\t\treturn this\n\t\t\t.on( \"mouseenter\", fnOver )\n\t\t\t.on( \"mouseleave\", fnOut || fnOver );\n\t}\n} );\n\njQuery.each(\n\t( \"blur focus focusin focusout resize scroll click dblclick \" +\n\t\"mousedown mouseup mousemove mouseover mouseout mouseenter mouseleave \" +\n\t\"change select submit keydown keypress keyup contextmenu\" ).split( \" \" ),\n\tfunction( _i, name ) {\n\n\t\t// Handle event binding\n\t\tjQuery.fn[ name ] = function( data, fn ) {\n\t\t\treturn arguments.length > 0 ?\n\t\t\t\tthis.on( name, null, data, fn ) :\n\t\t\t\tthis.trigger( name );\n\t\t};\n\t}\n);\n\n\n\n\n// Support: Android <=4.0 only\n// Make sure we trim BOM and NBSP\n// Require that the \"whitespace run\" starts from a non-whitespace\n// to avoid O(N^2) behavior when the engine would try matching \"\\s+$\" at each space position.\nvar rtrim = /^[\\s\\uFEFF\\xA0]+|([^\\s\\uFEFF\\xA0])[\\s\\uFEFF\\xA0]+$/g;\n\n// Bind a function to a context, optionally partially applying any\n// arguments.\n// jQuery.proxy is deprecated to promote standards (specifically Function#bind)\n// However, it is not slated for removal any time soon\njQuery.proxy = function( fn, context ) {\n\tvar tmp, args, proxy;\n\n\tif ( typeof context === \"string\" ) {\n\t\ttmp = fn[ context ];\n\t\tcontext = fn;\n\t\tfn = tmp;\n\t}\n\n\t// Quick check to determine if target is callable, in the spec\n\t// this throws a TypeError, but we will just return undefined.\n\tif ( !isFunction( fn ) ) {\n\t\treturn undefined;\n\t}\n\n\t// Simulated bind\n\targs = slice.call( arguments, 2 );\n\tproxy = function() {\n\t\treturn fn.apply( context || this, args.concat( slice.call( arguments ) ) );\n\t};\n\n\t// Set the guid of unique handler to the same of original handler, so it can be removed\n\tproxy.guid = fn.guid = fn.guid || jQuery.guid++;\n\n\treturn proxy;\n};\n\njQuery.holdReady = function( hold ) {\n\tif ( hold ) {\n\t\tjQuery.readyWait++;\n\t} else {\n\t\tjQuery.ready( true );\n\t}\n};\njQuery.isArray = Array.isArray;\njQuery.parseJSON = JSON.parse;\njQuery.nodeName = nodeName;\njQuery.isFunction = isFunction;\njQuery.isWindow = isWindow;\njQuery.camelCase = camelCase;\njQuery.type = toType;\n\njQuery.now = Date.now;\n\njQuery.isNumeric = function( obj ) {\n\n\t// As of jQuery 3.0, isNumeric is limited to\n\t// strings and numbers (primitives or objects)\n\t// that can be coerced to finite numbers (gh-2662)\n\tvar type = jQuery.type( obj );\n\treturn ( type === \"number\" || type === \"string\" ) &&\n\n\t\t// parseFloat NaNs numeric-cast false positives (\"\")\n\t\t// ...but misinterprets leading-number strings, particularly hex literals (\"0x...\")\n\t\t// subtraction forces infinities to NaN\n\t\t!isNaN( obj - parseFloat( obj ) );\n};\n\njQuery.trim = function( text ) {\n\treturn text == null ?\n\t\t\"\" :\n\t\t( text + \"\" ).replace( rtrim, \"$1\" );\n};\n\n\n\n// Register as a named AMD module, since jQuery can be concatenated with other\n// files that may use define, but not via a proper concatenation script that\n// understands anonymous AMD modules. A named AMD is safest and most robust\n// way to register. Lowercase jquery is used because AMD module names are\n// derived from file names, and jQuery is normally delivered in a lowercase\n// file name. Do this after creating the global so that if an AMD module wants\n// to call noConflict to hide this version of jQuery, it will work.\n\n// Note that for maximum portability, libraries that are not jQuery should\n// declare themselves as anonymous modules, and avoid setting a global if an\n// AMD loader is present. jQuery is a special case. For more information, see\n// https://github.com/jrburke/requirejs/wiki/Updating-existing-libraries#wiki-anon\n\nif ( typeof define === \"function\" && define.amd ) {\n\tdefine( \"jquery\", [], function() {\n\t\treturn jQuery;\n\t} );\n}\n\n\n\n\nvar\n\n\t// Map over jQuery in case of overwrite\n\t_jQuery = window.jQuery,\n\n\t// Map over the $ in case of overwrite\n\t_$ = window.$;\n\njQuery.noConflict = function( deep ) {\n\tif ( window.$ === jQuery ) {\n\t\twindow.$ = _$;\n\t}\n\n\tif ( deep && window.jQuery === jQuery ) {\n\t\twindow.jQuery = _jQuery;\n\t}\n\n\treturn jQuery;\n};\n\n// Expose jQuery and $ identifiers, even in AMD\n// (trac-7102#comment:10, https://github.com/jquery/jquery/pull/557)\n// and CommonJS for browser emulators (trac-13566)\nif ( typeof noGlobal === \"undefined\" ) {\n\twindow.jQuery = window.$ = jQuery;\n}\n\n\n\n\nreturn jQuery;\n} );\n","(function (global, factory) {\n\ttypeof exports === 'object' && typeof module !== 'undefined' ? module.exports = factory() :\n\ttypeof define === 'function' && define.amd ? define(factory) :\n\t(global.jsonToAst = factory());\n}(this, (function () { 'use strict';\n\nvar commonjsGlobal = typeof window !== 'undefined' ? window : typeof global !== 'undefined' ? global : typeof self !== 'undefined' ? self : {};\n\n\n\n\n\nfunction createCommonjsModule(fn, module) {\n\treturn module = { exports: {} }, fn(module, module.exports), module.exports;\n}\n\nvar graphemeSplitter = createCommonjsModule(function (module) {\n\t/*\r\n Breaks a Javascript string into individual user-perceived \"characters\" \r\n called extended grapheme clusters by implementing the Unicode UAX-29 standard, version 10.0.0\r\n \r\n Usage:\r\n var splitter = new GraphemeSplitter();\r\n //returns an array of strings, one string for each grapheme cluster\r\n var graphemes = splitter.splitGraphemes(string); \r\n \r\n */\n\tfunction GraphemeSplitter() {\n\t\tvar CR = 0,\n\t\t    LF = 1,\n\t\t    Control = 2,\n\t\t    Extend = 3,\n\t\t    Regional_Indicator = 4,\n\t\t    SpacingMark = 5,\n\t\t    L = 6,\n\t\t    V = 7,\n\t\t    T = 8,\n\t\t    LV = 9,\n\t\t    LVT = 10,\n\t\t    Other = 11,\n\t\t    Prepend = 12,\n\t\t    E_Base = 13,\n\t\t    E_Modifier = 14,\n\t\t    ZWJ = 15,\n\t\t    Glue_After_Zwj = 16,\n\t\t    E_Base_GAZ = 17;\n\n\t\t// BreakTypes\n\t\tvar NotBreak = 0,\n\t\t    BreakStart = 1,\n\t\t    Break = 2,\n\t\t    BreakLastRegional = 3,\n\t\t    BreakPenultimateRegional = 4;\n\n\t\tfunction isSurrogate(str, pos) {\n\t\t\treturn 0xd800 <= str.charCodeAt(pos) && str.charCodeAt(pos) <= 0xdbff && 0xdc00 <= str.charCodeAt(pos + 1) && str.charCodeAt(pos + 1) <= 0xdfff;\n\t\t}\n\n\t\t// Private function, gets a Unicode code point from a JavaScript UTF-16 string\n\t\t// handling surrogate pairs appropriately\n\t\tfunction codePointAt(str, idx) {\n\t\t\tif (idx === undefined) {\n\t\t\t\tidx = 0;\n\t\t\t}\n\t\t\tvar code = str.charCodeAt(idx);\n\n\t\t\t// if a high surrogate\n\t\t\tif (0xD800 <= code && code <= 0xDBFF && idx < str.length - 1) {\n\t\t\t\tvar hi = code;\n\t\t\t\tvar low = str.charCodeAt(idx + 1);\n\t\t\t\tif (0xDC00 <= low && low <= 0xDFFF) {\n\t\t\t\t\treturn (hi - 0xD800) * 0x400 + (low - 0xDC00) + 0x10000;\n\t\t\t\t}\n\t\t\t\treturn hi;\n\t\t\t}\n\n\t\t\t// if a low surrogate\n\t\t\tif (0xDC00 <= code && code <= 0xDFFF && idx >= 1) {\n\t\t\t\tvar hi = str.charCodeAt(idx - 1);\n\t\t\t\tvar low = code;\n\t\t\t\tif (0xD800 <= hi && hi <= 0xDBFF) {\n\t\t\t\t\treturn (hi - 0xD800) * 0x400 + (low - 0xDC00) + 0x10000;\n\t\t\t\t}\n\t\t\t\treturn low;\n\t\t\t}\n\n\t\t\t//just return the char if an unmatched surrogate half or a \n\t\t\t//single-char codepoint\n\t\t\treturn code;\n\t\t}\n\n\t\t// Private function, returns whether a break is allowed between the \n\t\t// two given grapheme breaking classes\n\t\tfunction shouldBreak(start, mid, end) {\n\t\t\tvar all = [start].concat(mid).concat([end]);\n\t\t\tvar previous = all[all.length - 2];\n\t\t\tvar next = end;\n\n\t\t\t// Lookahead termintor for:\n\t\t\t// GB10. (E_Base | EBG) Extend* ?\tE_Modifier\n\t\t\tvar eModifierIndex = all.lastIndexOf(E_Modifier);\n\t\t\tif (eModifierIndex > 1 && all.slice(1, eModifierIndex).every(function (c) {\n\t\t\t\treturn c == Extend;\n\t\t\t}) && [Extend, E_Base, E_Base_GAZ].indexOf(start) == -1) {\n\t\t\t\treturn Break;\n\t\t\t}\n\n\t\t\t// Lookahead termintor for:\n\t\t\t// GB12. ^ (RI RI)* RI\t?\tRI\n\t\t\t// GB13. [^RI] (RI RI)* RI\t?\tRI\n\t\t\tvar rIIndex = all.lastIndexOf(Regional_Indicator);\n\t\t\tif (rIIndex > 0 && all.slice(1, rIIndex).every(function (c) {\n\t\t\t\treturn c == Regional_Indicator;\n\t\t\t}) && [Prepend, Regional_Indicator].indexOf(previous) == -1) {\n\t\t\t\tif (all.filter(function (c) {\n\t\t\t\t\treturn c == Regional_Indicator;\n\t\t\t\t}).length % 2 == 1) {\n\t\t\t\t\treturn BreakLastRegional;\n\t\t\t\t} else {\n\t\t\t\t\treturn BreakPenultimateRegional;\n\t\t\t\t}\n\t\t\t}\n\n\t\t\t// GB3. CR X LF\n\t\t\tif (previous == CR && next == LF) {\n\t\t\t\treturn NotBreak;\n\t\t\t}\n\t\t\t// GB4. (Control|CR|LF) ÷\n\t\t\telse if (previous == Control || previous == CR || previous == LF) {\n\t\t\t\t\tif (next == E_Modifier && mid.every(function (c) {\n\t\t\t\t\t\treturn c == Extend;\n\t\t\t\t\t})) {\n\t\t\t\t\t\treturn Break;\n\t\t\t\t\t} else {\n\t\t\t\t\t\treturn BreakStart;\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\t// GB5. ÷ (Control|CR|LF)\n\t\t\t\telse if (next == Control || next == CR || next == LF) {\n\t\t\t\t\t\treturn BreakStart;\n\t\t\t\t\t}\n\t\t\t\t\t// GB6. L X (L|V|LV|LVT)\n\t\t\t\t\telse if (previous == L && (next == L || next == V || next == LV || next == LVT)) {\n\t\t\t\t\t\t\treturn NotBreak;\n\t\t\t\t\t\t}\n\t\t\t\t\t\t// GB7. (LV|V) X (V|T)\n\t\t\t\t\t\telse if ((previous == LV || previous == V) && (next == V || next == T)) {\n\t\t\t\t\t\t\t\treturn NotBreak;\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t// GB8. (LVT|T) X (T)\n\t\t\t\t\t\t\telse if ((previous == LVT || previous == T) && next == T) {\n\t\t\t\t\t\t\t\t\treturn NotBreak;\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t// GB9. X (Extend|ZWJ)\n\t\t\t\t\t\t\t\telse if (next == Extend || next == ZWJ) {\n\t\t\t\t\t\t\t\t\t\treturn NotBreak;\n\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t// GB9a. X SpacingMark\n\t\t\t\t\t\t\t\t\telse if (next == SpacingMark) {\n\t\t\t\t\t\t\t\t\t\t\treturn NotBreak;\n\t\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t\t// GB9b. Prepend X\n\t\t\t\t\t\t\t\t\t\telse if (previous == Prepend) {\n\t\t\t\t\t\t\t\t\t\t\t\treturn NotBreak;\n\t\t\t\t\t\t\t\t\t\t\t}\n\n\t\t\t// GB10. (E_Base | EBG) Extend* ?\tE_Modifier\n\t\t\tvar previousNonExtendIndex = all.indexOf(Extend) != -1 ? all.lastIndexOf(Extend) - 1 : all.length - 2;\n\t\t\tif ([E_Base, E_Base_GAZ].indexOf(all[previousNonExtendIndex]) != -1 && all.slice(previousNonExtendIndex + 1, -1).every(function (c) {\n\t\t\t\treturn c == Extend;\n\t\t\t}) && next == E_Modifier) {\n\t\t\t\treturn NotBreak;\n\t\t\t}\n\n\t\t\t// GB11. ZWJ ? (Glue_After_Zwj | EBG)\n\t\t\tif (previous == ZWJ && [Glue_After_Zwj, E_Base_GAZ].indexOf(next) != -1) {\n\t\t\t\treturn NotBreak;\n\t\t\t}\n\n\t\t\t// GB12. ^ (RI RI)* RI ? RI\n\t\t\t// GB13. [^RI] (RI RI)* RI ? RI\n\t\t\tif (mid.indexOf(Regional_Indicator) != -1) {\n\t\t\t\treturn Break;\n\t\t\t}\n\t\t\tif (previous == Regional_Indicator && next == Regional_Indicator) {\n\t\t\t\treturn NotBreak;\n\t\t\t}\n\n\t\t\t// GB999. Any ? Any\n\t\t\treturn BreakStart;\n\t\t}\n\n\t\t// Returns the next grapheme break in the string after the given index\n\t\tthis.nextBreak = function (string, index) {\n\t\t\tif (index === undefined) {\n\t\t\t\tindex = 0;\n\t\t\t}\n\t\t\tif (index < 0) {\n\t\t\t\treturn 0;\n\t\t\t}\n\t\t\tif (index >= string.length - 1) {\n\t\t\t\treturn string.length;\n\t\t\t}\n\t\t\tvar prev = getGraphemeBreakProperty(codePointAt(string, index));\n\t\t\tvar mid = [];\n\t\t\tfor (var i = index + 1; i < string.length; i++) {\n\t\t\t\t// check for already processed low surrogates\n\t\t\t\tif (isSurrogate(string, i - 1)) {\n\t\t\t\t\tcontinue;\n\t\t\t\t}\n\n\t\t\t\tvar next = getGraphemeBreakProperty(codePointAt(string, i));\n\t\t\t\tif (shouldBreak(prev, mid, next)) {\n\t\t\t\t\treturn i;\n\t\t\t\t}\n\n\t\t\t\tmid.push(next);\n\t\t\t}\n\t\t\treturn string.length;\n\t\t};\n\n\t\t// Breaks the given string into an array of grapheme cluster strings\n\t\tthis.splitGraphemes = function (str) {\n\t\t\tvar res = [];\n\t\t\tvar index = 0;\n\t\t\tvar brk;\n\t\t\twhile ((brk = this.nextBreak(str, index)) < str.length) {\n\t\t\t\tres.push(str.slice(index, brk));\n\t\t\t\tindex = brk;\n\t\t\t}\n\t\t\tif (index < str.length) {\n\t\t\t\tres.push(str.slice(index));\n\t\t\t}\n\t\t\treturn res;\n\t\t};\n\n\t\t// Returns the iterator of grapheme clusters there are in the given string\n\t\tthis.iterateGraphemes = function (str) {\n\t\t\tvar index = 0;\n\t\t\tvar res = {\n\t\t\t\tnext: function () {\n\t\t\t\t\tvar value;\n\t\t\t\t\tvar brk;\n\t\t\t\t\tif ((brk = this.nextBreak(str, index)) < str.length) {\n\t\t\t\t\t\tvalue = str.slice(index, brk);\n\t\t\t\t\t\tindex = brk;\n\t\t\t\t\t\treturn { value: value, done: false };\n\t\t\t\t\t}\n\t\t\t\t\tif (index < str.length) {\n\t\t\t\t\t\tvalue = str.slice(index);\n\t\t\t\t\t\tindex = str.length;\n\t\t\t\t\t\treturn { value: value, done: false };\n\t\t\t\t\t}\n\t\t\t\t\treturn { value: undefined, done: true };\n\t\t\t\t}.bind(this)\n\t\t\t};\n\t\t\t// ES2015 @@iterator method (iterable) for spread syntax and for...of statement\n\t\t\tif (typeof Symbol !== 'undefined' && Symbol.iterator) {\n\t\t\t\tres[Symbol.iterator] = function () {\n\t\t\t\t\treturn res;\n\t\t\t\t};\n\t\t\t}\n\t\t\treturn res;\n\t\t};\n\n\t\t// Returns the number of grapheme clusters there are in the given string\n\t\tthis.countGraphemes = function (str) {\n\t\t\tvar count = 0;\n\t\t\tvar index = 0;\n\t\t\tvar brk;\n\t\t\twhile ((brk = this.nextBreak(str, index)) < str.length) {\n\t\t\t\tindex = brk;\n\t\t\t\tcount++;\n\t\t\t}\n\t\t\tif (index < str.length) {\n\t\t\t\tcount++;\n\t\t\t}\n\t\t\treturn count;\n\t\t};\n\n\t\t//given a Unicode code point, determines this symbol's grapheme break property\n\t\tfunction getGraphemeBreakProperty(code) {\n\n\t\t\t//grapheme break property for Unicode 10.0.0, \n\t\t\t//taken from http://www.unicode.org/Public/10.0.0/ucd/auxiliary/GraphemeBreakProperty.txt\n\t\t\t//and adapted to JavaScript rules\n\n\t\t\tif (0x0600 <= code && code <= 0x0605 || // Cf   [6] ARABIC NUMBER SIGN..ARABIC NUMBER MARK ABOVE\n\t\t\t0x06DD == code || // Cf       ARABIC END OF AYAH\n\t\t\t0x070F == code || // Cf       SYRIAC ABBREVIATION MARK\n\t\t\t0x08E2 == code || // Cf       ARABIC DISPUTED END OF AYAH\n\t\t\t0x0D4E == code || // Lo       MALAYALAM LETTER DOT REPH\n\t\t\t0x110BD == code || // Cf       KAITHI NUMBER SIGN\n\t\t\t0x111C2 <= code && code <= 0x111C3 || // Lo   [2] SHARADA SIGN JIHVAMULIYA..SHARADA SIGN UPADHMANIYA\n\t\t\t0x11A3A == code || // Lo       ZANABAZAR SQUARE CLUSTER-INITIAL LETTER RA\n\t\t\t0x11A86 <= code && code <= 0x11A89 || // Lo   [4] SOYOMBO CLUSTER-INITIAL LETTER RA..SOYOMBO CLUSTER-INITIAL LETTER SA\n\t\t\t0x11D46 == code // Lo       MASARAM GONDI REPHA\n\t\t\t) {\n\t\t\t\t\treturn Prepend;\n\t\t\t\t}\n\t\t\tif (0x000D == code // Cc       <control-000D>\n\t\t\t) {\n\t\t\t\t\treturn CR;\n\t\t\t\t}\n\n\t\t\tif (0x000A == code // Cc       <control-000A>\n\t\t\t) {\n\t\t\t\t\treturn LF;\n\t\t\t\t}\n\n\t\t\tif (0x0000 <= code && code <= 0x0009 || // Cc  [10] <control-0000>..<control-0009>\n\t\t\t0x000B <= code && code <= 0x000C || // Cc   [2] <control-000B>..<control-000C>\n\t\t\t0x000E <= code && code <= 0x001F || // Cc  [18] <control-000E>..<control-001F>\n\t\t\t0x007F <= code && code <= 0x009F || // Cc  [33] <control-007F>..<control-009F>\n\t\t\t0x00AD == code || // Cf       SOFT HYPHEN\n\t\t\t0x061C == code || // Cf       ARABIC LETTER MARK\n\n\t\t\t0x180E == code || // Cf       MONGOLIAN VOWEL SEPARATOR\n\t\t\t0x200B == code || // Cf       ZERO WIDTH SPACE\n\t\t\t0x200E <= code && code <= 0x200F || // Cf   [2] LEFT-TO-RIGHT MARK..RIGHT-TO-LEFT MARK\n\t\t\t0x2028 == code || // Zl       LINE SEPARATOR\n\t\t\t0x2029 == code || // Zp       PARAGRAPH SEPARATOR\n\t\t\t0x202A <= code && code <= 0x202E || // Cf   [5] LEFT-TO-RIGHT EMBEDDING..RIGHT-TO-LEFT OVERRIDE\n\t\t\t0x2060 <= code && code <= 0x2064 || // Cf   [5] WORD JOINER..INVISIBLE PLUS\n\t\t\t0x2065 == code || // Cn       <reserved-2065>\n\t\t\t0x2066 <= code && code <= 0x206F || // Cf  [10] LEFT-TO-RIGHT ISOLATE..NOMINAL DIGIT SHAPES\n\t\t\t0xD800 <= code && code <= 0xDFFF || // Cs [2048] <surrogate-D800>..<surrogate-DFFF>\n\t\t\t0xFEFF == code || // Cf       ZERO WIDTH NO-BREAK SPACE\n\t\t\t0xFFF0 <= code && code <= 0xFFF8 || // Cn   [9] <reserved-FFF0>..<reserved-FFF8>\n\t\t\t0xFFF9 <= code && code <= 0xFFFB || // Cf   [3] INTERLINEAR ANNOTATION ANCHOR..INTERLINEAR ANNOTATION TERMINATOR\n\t\t\t0x1BCA0 <= code && code <= 0x1BCA3 || // Cf   [4] SHORTHAND FORMAT LETTER OVERLAP..SHORTHAND FORMAT UP STEP\n\t\t\t0x1D173 <= code && code <= 0x1D17A || // Cf   [8] MUSICAL SYMBOL BEGIN BEAM..MUSICAL SYMBOL END PHRASE\n\t\t\t0xE0000 == code || // Cn       <reserved-E0000>\n\t\t\t0xE0001 == code || // Cf       LANGUAGE TAG\n\t\t\t0xE0002 <= code && code <= 0xE001F || // Cn  [30] <reserved-E0002>..<reserved-E001F>\n\t\t\t0xE0080 <= code && code <= 0xE00FF || // Cn [128] <reserved-E0080>..<reserved-E00FF>\n\t\t\t0xE01F0 <= code && code <= 0xE0FFF // Cn [3600] <reserved-E01F0>..<reserved-E0FFF>\n\t\t\t) {\n\t\t\t\t\treturn Control;\n\t\t\t\t}\n\n\t\t\tif (0x0300 <= code && code <= 0x036F || // Mn [112] COMBINING GRAVE ACCENT..COMBINING LATIN SMALL LETTER X\n\t\t\t0x0483 <= code && code <= 0x0487 || // Mn   [5] COMBINING CYRILLIC TITLO..COMBINING CYRILLIC POKRYTIE\n\t\t\t0x0488 <= code && code <= 0x0489 || // Me   [2] COMBINING CYRILLIC HUNDRED THOUSANDS SIGN..COMBINING CYRILLIC MILLIONS SIGN\n\t\t\t0x0591 <= code && code <= 0x05BD || // Mn  [45] HEBREW ACCENT ETNAHTA..HEBREW POINT METEG\n\t\t\t0x05BF == code || // Mn       HEBREW POINT RAFE\n\t\t\t0x05C1 <= code && code <= 0x05C2 || // Mn   [2] HEBREW POINT SHIN DOT..HEBREW POINT SIN DOT\n\t\t\t0x05C4 <= code && code <= 0x05C5 || // Mn   [2] HEBREW MARK UPPER DOT..HEBREW MARK LOWER DOT\n\t\t\t0x05C7 == code || // Mn       HEBREW POINT QAMATS QATAN\n\t\t\t0x0610 <= code && code <= 0x061A || // Mn  [11] ARABIC SIGN SALLALLAHOU ALAYHE WASSALLAM..ARABIC SMALL KASRA\n\t\t\t0x064B <= code && code <= 0x065F || // Mn  [21] ARABIC FATHATAN..ARABIC WAVY HAMZA BELOW\n\t\t\t0x0670 == code || // Mn       ARABIC LETTER SUPERSCRIPT ALEF\n\t\t\t0x06D6 <= code && code <= 0x06DC || // Mn   [7] ARABIC SMALL HIGH LIGATURE SAD WITH LAM WITH ALEF MAKSURA..ARABIC SMALL HIGH SEEN\n\t\t\t0x06DF <= code && code <= 0x06E4 || // Mn   [6] ARABIC SMALL HIGH ROUNDED ZERO..ARABIC SMALL HIGH MADDA\n\t\t\t0x06E7 <= code && code <= 0x06E8 || // Mn   [2] ARABIC SMALL HIGH YEH..ARABIC SMALL HIGH NOON\n\t\t\t0x06EA <= code && code <= 0x06ED || // Mn   [4] ARABIC EMPTY CENTRE LOW STOP..ARABIC SMALL LOW MEEM\n\t\t\t0x0711 == code || // Mn       SYRIAC LETTER SUPERSCRIPT ALAPH\n\t\t\t0x0730 <= code && code <= 0x074A || // Mn  [27] SYRIAC PTHAHA ABOVE..SYRIAC BARREKH\n\t\t\t0x07A6 <= code && code <= 0x07B0 || // Mn  [11] THAANA ABAFILI..THAANA SUKUN\n\t\t\t0x07EB <= code && code <= 0x07F3 || // Mn   [9] NKO COMBINING SHORT HIGH TONE..NKO COMBINING DOUBLE DOT ABOVE\n\t\t\t0x0816 <= code && code <= 0x0819 || // Mn   [4] SAMARITAN MARK IN..SAMARITAN MARK DAGESH\n\t\t\t0x081B <= code && code <= 0x0823 || // Mn   [9] SAMARITAN MARK EPENTHETIC YUT..SAMARITAN VOWEL SIGN A\n\t\t\t0x0825 <= code && code <= 0x0827 || // Mn   [3] SAMARITAN VOWEL SIGN SHORT A..SAMARITAN VOWEL SIGN U\n\t\t\t0x0829 <= code && code <= 0x082D || // Mn   [5] SAMARITAN VOWEL SIGN LONG I..SAMARITAN MARK NEQUDAA\n\t\t\t0x0859 <= code && code <= 0x085B || // Mn   [3] MANDAIC AFFRICATION MARK..MANDAIC GEMINATION MARK\n\t\t\t0x08D4 <= code && code <= 0x08E1 || // Mn  [14] ARABIC SMALL HIGH WORD AR-RUB..ARABIC SMALL HIGH SIGN SAFHA\n\t\t\t0x08E3 <= code && code <= 0x0902 || // Mn  [32] ARABIC TURNED DAMMA BELOW..DEVANAGARI SIGN ANUSVARA\n\t\t\t0x093A == code || // Mn       DEVANAGARI VOWEL SIGN OE\n\t\t\t0x093C == code || // Mn       DEVANAGARI SIGN NUKTA\n\t\t\t0x0941 <= code && code <= 0x0948 || // Mn   [8] DEVANAGARI VOWEL SIGN U..DEVANAGARI VOWEL SIGN AI\n\t\t\t0x094D == code || // Mn       DEVANAGARI SIGN VIRAMA\n\t\t\t0x0951 <= code && code <= 0x0957 || // Mn   [7] DEVANAGARI STRESS SIGN UDATTA..DEVANAGARI VOWEL SIGN UUE\n\t\t\t0x0962 <= code && code <= 0x0963 || // Mn   [2] DEVANAGARI VOWEL SIGN VOCALIC L..DEVANAGARI VOWEL SIGN VOCALIC LL\n\t\t\t0x0981 == code || // Mn       BENGALI SIGN CANDRABINDU\n\t\t\t0x09BC == code || // Mn       BENGALI SIGN NUKTA\n\t\t\t0x09BE == code || // Mc       BENGALI VOWEL SIGN AA\n\t\t\t0x09C1 <= code && code <= 0x09C4 || // Mn   [4] BENGALI VOWEL SIGN U..BENGALI VOWEL SIGN VOCALIC RR\n\t\t\t0x09CD == code || // Mn       BENGALI SIGN VIRAMA\n\t\t\t0x09D7 == code || // Mc       BENGALI AU LENGTH MARK\n\t\t\t0x09E2 <= code && code <= 0x09E3 || // Mn   [2] BENGALI VOWEL SIGN VOCALIC L..BENGALI VOWEL SIGN VOCALIC LL\n\t\t\t0x0A01 <= code && code <= 0x0A02 || // Mn   [2] GURMUKHI SIGN ADAK BINDI..GURMUKHI SIGN BINDI\n\t\t\t0x0A3C == code || // Mn       GURMUKHI SIGN NUKTA\n\t\t\t0x0A41 <= code && code <= 0x0A42 || // Mn   [2] GURMUKHI VOWEL SIGN U..GURMUKHI VOWEL SIGN UU\n\t\t\t0x0A47 <= code && code <= 0x0A48 || // Mn   [2] GURMUKHI VOWEL SIGN EE..GURMUKHI VOWEL SIGN AI\n\t\t\t0x0A4B <= code && code <= 0x0A4D || // Mn   [3] GURMUKHI VOWEL SIGN OO..GURMUKHI SIGN VIRAMA\n\t\t\t0x0A51 == code || // Mn       GURMUKHI SIGN UDAAT\n\t\t\t0x0A70 <= code && code <= 0x0A71 || // Mn   [2] GURMUKHI TIPPI..GURMUKHI ADDAK\n\t\t\t0x0A75 == code || // Mn       GURMUKHI SIGN YAKASH\n\t\t\t0x0A81 <= code && code <= 0x0A82 || // Mn   [2] GUJARATI SIGN CANDRABINDU..GUJARATI SIGN ANUSVARA\n\t\t\t0x0ABC == code || // Mn       GUJARATI SIGN NUKTA\n\t\t\t0x0AC1 <= code && code <= 0x0AC5 || // Mn   [5] GUJARATI VOWEL SIGN U..GUJARATI VOWEL SIGN CANDRA E\n\t\t\t0x0AC7 <= code && code <= 0x0AC8 || // Mn   [2] GUJARATI VOWEL SIGN E..GUJARATI VOWEL SIGN AI\n\t\t\t0x0ACD == code || // Mn       GUJARATI SIGN VIRAMA\n\t\t\t0x0AE2 <= code && code <= 0x0AE3 || // Mn   [2] GUJARATI VOWEL SIGN VOCALIC L..GUJARATI VOWEL SIGN VOCALIC LL\n\t\t\t0x0AFA <= code && code <= 0x0AFF || // Mn   [6] GUJARATI SIGN SUKUN..GUJARATI SIGN TWO-CIRCLE NUKTA ABOVE\n\t\t\t0x0B01 == code || // Mn       ORIYA SIGN CANDRABINDU\n\t\t\t0x0B3C == code || // Mn       ORIYA SIGN NUKTA\n\t\t\t0x0B3E == code || // Mc       ORIYA VOWEL SIGN AA\n\t\t\t0x0B3F == code || // Mn       ORIYA VOWEL SIGN I\n\t\t\t0x0B41 <= code && code <= 0x0B44 || // Mn   [4] ORIYA VOWEL SIGN U..ORIYA VOWEL SIGN VOCALIC RR\n\t\t\t0x0B4D == code || // Mn       ORIYA SIGN VIRAMA\n\t\t\t0x0B56 == code || // Mn       ORIYA AI LENGTH MARK\n\t\t\t0x0B57 == code || // Mc       ORIYA AU LENGTH MARK\n\t\t\t0x0B62 <= code && code <= 0x0B63 || // Mn   [2] ORIYA VOWEL SIGN VOCALIC L..ORIYA VOWEL SIGN VOCALIC LL\n\t\t\t0x0B82 == code || // Mn       TAMIL SIGN ANUSVARA\n\t\t\t0x0BBE == code || // Mc       TAMIL VOWEL SIGN AA\n\t\t\t0x0BC0 == code || // Mn       TAMIL VOWEL SIGN II\n\t\t\t0x0BCD == code || // Mn       TAMIL SIGN VIRAMA\n\t\t\t0x0BD7 == code || // Mc       TAMIL AU LENGTH MARK\n\t\t\t0x0C00 == code || // Mn       TELUGU SIGN COMBINING CANDRABINDU ABOVE\n\t\t\t0x0C3E <= code && code <= 0x0C40 || // Mn   [3] TELUGU VOWEL SIGN AA..TELUGU VOWEL SIGN II\n\t\t\t0x0C46 <= code && code <= 0x0C48 || // Mn   [3] TELUGU VOWEL SIGN E..TELUGU VOWEL SIGN AI\n\t\t\t0x0C4A <= code && code <= 0x0C4D || // Mn   [4] TELUGU VOWEL SIGN O..TELUGU SIGN VIRAMA\n\t\t\t0x0C55 <= code && code <= 0x0C56 || // Mn   [2] TELUGU LENGTH MARK..TELUGU AI LENGTH MARK\n\t\t\t0x0C62 <= code && code <= 0x0C63 || // Mn   [2] TELUGU VOWEL SIGN VOCALIC L..TELUGU VOWEL SIGN VOCALIC LL\n\t\t\t0x0C81 == code || // Mn       KANNADA SIGN CANDRABINDU\n\t\t\t0x0CBC == code || // Mn       KANNADA SIGN NUKTA\n\t\t\t0x0CBF == code || // Mn       KANNADA VOWEL SIGN I\n\t\t\t0x0CC2 == code || // Mc       KANNADA VOWEL SIGN UU\n\t\t\t0x0CC6 == code || // Mn       KANNADA VOWEL SIGN E\n\t\t\t0x0CCC <= code && code <= 0x0CCD || // Mn   [2] KANNADA VOWEL SIGN AU..KANNADA SIGN VIRAMA\n\t\t\t0x0CD5 <= code && code <= 0x0CD6 || // Mc   [2] KANNADA LENGTH MARK..KANNADA AI LENGTH MARK\n\t\t\t0x0CE2 <= code && code <= 0x0CE3 || // Mn   [2] KANNADA VOWEL SIGN VOCALIC L..KANNADA VOWEL SIGN VOCALIC LL\n\t\t\t0x0D00 <= code && code <= 0x0D01 || // Mn   [2] MALAYALAM SIGN COMBINING ANUSVARA ABOVE..MALAYALAM SIGN CANDRABINDU\n\t\t\t0x0D3B <= code && code <= 0x0D3C || // Mn   [2] MALAYALAM SIGN VERTICAL BAR VIRAMA..MALAYALAM SIGN CIRCULAR VIRAMA\n\t\t\t0x0D3E == code || // Mc       MALAYALAM VOWEL SIGN AA\n\t\t\t0x0D41 <= code && code <= 0x0D44 || // Mn   [4] MALAYALAM VOWEL SIGN U..MALAYALAM VOWEL SIGN VOCALIC RR\n\t\t\t0x0D4D == code || // Mn       MALAYALAM SIGN VIRAMA\n\t\t\t0x0D57 == code || // Mc       MALAYALAM AU LENGTH MARK\n\t\t\t0x0D62 <= code && code <= 0x0D63 || // Mn   [2] MALAYALAM VOWEL SIGN VOCALIC L..MALAYALAM VOWEL SIGN VOCALIC LL\n\t\t\t0x0DCA == code || // Mn       SINHALA SIGN AL-LAKUNA\n\t\t\t0x0DCF == code || // Mc       SINHALA VOWEL SIGN AELA-PILLA\n\t\t\t0x0DD2 <= code && code <= 0x0DD4 || // Mn   [3] SINHALA VOWEL SIGN KETTI IS-PILLA..SINHALA VOWEL SIGN KETTI PAA-PILLA\n\t\t\t0x0DD6 == code || // Mn       SINHALA VOWEL SIGN DIGA PAA-PILLA\n\t\t\t0x0DDF == code || // Mc       SINHALA VOWEL SIGN GAYANUKITTA\n\t\t\t0x0E31 == code || // Mn       THAI CHARACTER MAI HAN-AKAT\n\t\t\t0x0E34 <= code && code <= 0x0E3A || // Mn   [7] THAI CHARACTER SARA I..THAI CHARACTER PHINTHU\n\t\t\t0x0E47 <= code && code <= 0x0E4E || // Mn   [8] THAI CHARACTER MAITAIKHU..THAI CHARACTER YAMAKKAN\n\t\t\t0x0EB1 == code || // Mn       LAO VOWEL SIGN MAI KAN\n\t\t\t0x0EB4 <= code && code <= 0x0EB9 || // Mn   [6] LAO VOWEL SIGN I..LAO VOWEL SIGN UU\n\t\t\t0x0EBB <= code && code <= 0x0EBC || // Mn   [2] LAO VOWEL SIGN MAI KON..LAO SEMIVOWEL SIGN LO\n\t\t\t0x0EC8 <= code && code <= 0x0ECD || // Mn   [6] LAO TONE MAI EK..LAO NIGGAHITA\n\t\t\t0x0F18 <= code && code <= 0x0F19 || // Mn   [2] TIBETAN ASTROLOGICAL SIGN -KHYUD PA..TIBETAN ASTROLOGICAL SIGN SDONG TSHUGS\n\t\t\t0x0F35 == code || // Mn       TIBETAN MARK NGAS BZUNG NYI ZLA\n\t\t\t0x0F37 == code || // Mn       TIBETAN MARK NGAS BZUNG SGOR RTAGS\n\t\t\t0x0F39 == code || // Mn       TIBETAN MARK TSA -PHRU\n\t\t\t0x0F71 <= code && code <= 0x0F7E || // Mn  [14] TIBETAN VOWEL SIGN AA..TIBETAN SIGN RJES SU NGA RO\n\t\t\t0x0F80 <= code && code <= 0x0F84 || // Mn   [5] TIBETAN VOWEL SIGN REVERSED I..TIBETAN MARK HALANTA\n\t\t\t0x0F86 <= code && code <= 0x0F87 || // Mn   [2] TIBETAN SIGN LCI RTAGS..TIBETAN SIGN YANG RTAGS\n\t\t\t0x0F8D <= code && code <= 0x0F97 || // Mn  [11] TIBETAN SUBJOINED SIGN LCE TSA CAN..TIBETAN SUBJOINED LETTER JA\n\t\t\t0x0F99 <= code && code <= 0x0FBC || // Mn  [36] TIBETAN SUBJOINED LETTER NYA..TIBETAN SUBJOINED LETTER FIXED-FORM RA\n\t\t\t0x0FC6 == code || // Mn       TIBETAN SYMBOL PADMA GDAN\n\t\t\t0x102D <= code && code <= 0x1030 || // Mn   [4] MYANMAR VOWEL SIGN I..MYANMAR VOWEL SIGN UU\n\t\t\t0x1032 <= code && code <= 0x1037 || // Mn   [6] MYANMAR VOWEL SIGN AI..MYANMAR SIGN DOT BELOW\n\t\t\t0x1039 <= code && code <= 0x103A || // Mn   [2] MYANMAR SIGN VIRAMA..MYANMAR SIGN ASAT\n\t\t\t0x103D <= code && code <= 0x103E || // Mn   [2] MYANMAR CONSONANT SIGN MEDIAL WA..MYANMAR CONSONANT SIGN MEDIAL HA\n\t\t\t0x1058 <= code && code <= 0x1059 || // Mn   [2] MYANMAR VOWEL SIGN VOCALIC L..MYANMAR VOWEL SIGN VOCALIC LL\n\t\t\t0x105E <= code && code <= 0x1060 || // Mn   [3] MYANMAR CONSONANT SIGN MON MEDIAL NA..MYANMAR CONSONANT SIGN MON MEDIAL LA\n\t\t\t0x1071 <= code && code <= 0x1074 || // Mn   [4] MYANMAR VOWEL SIGN GEBA KAREN I..MYANMAR VOWEL SIGN KAYAH EE\n\t\t\t0x1082 == code || // Mn       MYANMAR CONSONANT SIGN SHAN MEDIAL WA\n\t\t\t0x1085 <= code && code <= 0x1086 || // Mn   [2] MYANMAR VOWEL SIGN SHAN E ABOVE..MYANMAR VOWEL SIGN SHAN FINAL Y\n\t\t\t0x108D == code || // Mn       MYANMAR SIGN SHAN COUNCIL EMPHATIC TONE\n\t\t\t0x109D == code || // Mn       MYANMAR VOWEL SIGN AITON AI\n\t\t\t0x135D <= code && code <= 0x135F || // Mn   [3] ETHIOPIC COMBINING GEMINATION AND VOWEL LENGTH MARK..ETHIOPIC COMBINING GEMINATION MARK\n\t\t\t0x1712 <= code && code <= 0x1714 || // Mn   [3] TAGALOG VOWEL SIGN I..TAGALOG SIGN VIRAMA\n\t\t\t0x1732 <= code && code <= 0x1734 || // Mn   [3] HANUNOO VOWEL SIGN I..HANUNOO SIGN PAMUDPOD\n\t\t\t0x1752 <= code && code <= 0x1753 || // Mn   [2] BUHID VOWEL SIGN I..BUHID VOWEL SIGN U\n\t\t\t0x1772 <= code && code <= 0x1773 || // Mn   [2] TAGBANWA VOWEL SIGN I..TAGBANWA VOWEL SIGN U\n\t\t\t0x17B4 <= code && code <= 0x17B5 || // Mn   [2] KHMER VOWEL INHERENT AQ..KHMER VOWEL INHERENT AA\n\t\t\t0x17B7 <= code && code <= 0x17BD || // Mn   [7] KHMER VOWEL SIGN I..KHMER VOWEL SIGN UA\n\t\t\t0x17C6 == code || // Mn       KHMER SIGN NIKAHIT\n\t\t\t0x17C9 <= code && code <= 0x17D3 || // Mn  [11] KHMER SIGN MUUSIKATOAN..KHMER SIGN BATHAMASAT\n\t\t\t0x17DD == code || // Mn       KHMER SIGN ATTHACAN\n\t\t\t0x180B <= code && code <= 0x180D || // Mn   [3] MONGOLIAN FREE VARIATION SELECTOR ONE..MONGOLIAN FREE VARIATION SELECTOR THREE\n\t\t\t0x1885 <= code && code <= 0x1886 || // Mn   [2] MONGOLIAN LETTER ALI GALI BALUDA..MONGOLIAN LETTER ALI GALI THREE BALUDA\n\t\t\t0x18A9 == code || // Mn       MONGOLIAN LETTER ALI GALI DAGALGA\n\t\t\t0x1920 <= code && code <= 0x1922 || // Mn   [3] LIMBU VOWEL SIGN A..LIMBU VOWEL SIGN U\n\t\t\t0x1927 <= code && code <= 0x1928 || // Mn   [2] LIMBU VOWEL SIGN E..LIMBU VOWEL SIGN O\n\t\t\t0x1932 == code || // Mn       LIMBU SMALL LETTER ANUSVARA\n\t\t\t0x1939 <= code && code <= 0x193B || // Mn   [3] LIMBU SIGN MUKPHRENG..LIMBU SIGN SA-I\n\t\t\t0x1A17 <= code && code <= 0x1A18 || // Mn   [2] BUGINESE VOWEL SIGN I..BUGINESE VOWEL SIGN U\n\t\t\t0x1A1B == code || // Mn       BUGINESE VOWEL SIGN AE\n\t\t\t0x1A56 == code || // Mn       TAI THAM CONSONANT SIGN MEDIAL LA\n\t\t\t0x1A58 <= code && code <= 0x1A5E || // Mn   [7] TAI THAM SIGN MAI KANG LAI..TAI THAM CONSONANT SIGN SA\n\t\t\t0x1A60 == code || // Mn       TAI THAM SIGN SAKOT\n\t\t\t0x1A62 == code || // Mn       TAI THAM VOWEL SIGN MAI SAT\n\t\t\t0x1A65 <= code && code <= 0x1A6C || // Mn   [8] TAI THAM VOWEL SIGN I..TAI THAM VOWEL SIGN OA BELOW\n\t\t\t0x1A73 <= code && code <= 0x1A7C || // Mn  [10] TAI THAM VOWEL SIGN OA ABOVE..TAI THAM SIGN KHUEN-LUE KARAN\n\t\t\t0x1A7F == code || // Mn       TAI THAM COMBINING CRYPTOGRAMMIC DOT\n\t\t\t0x1AB0 <= code && code <= 0x1ABD || // Mn  [14] COMBINING DOUBLED CIRCUMFLEX ACCENT..COMBINING PARENTHESES BELOW\n\t\t\t0x1ABE == code || // Me       COMBINING PARENTHESES OVERLAY\n\t\t\t0x1B00 <= code && code <= 0x1B03 || // Mn   [4] BALINESE SIGN ULU RICEM..BALINESE SIGN SURANG\n\t\t\t0x1B34 == code || // Mn       BALINESE SIGN REREKAN\n\t\t\t0x1B36 <= code && code <= 0x1B3A || // Mn   [5] BALINESE VOWEL SIGN ULU..BALINESE VOWEL SIGN RA REPA\n\t\t\t0x1B3C == code || // Mn       BALINESE VOWEL SIGN LA LENGA\n\t\t\t0x1B42 == code || // Mn       BALINESE VOWEL SIGN PEPET\n\t\t\t0x1B6B <= code && code <= 0x1B73 || // Mn   [9] BALINESE MUSICAL SYMBOL COMBINING TEGEH..BALINESE MUSICAL SYMBOL COMBINING GONG\n\t\t\t0x1B80 <= code && code <= 0x1B81 || // Mn   [2] SUNDANESE SIGN PANYECEK..SUNDANESE SIGN PANGLAYAR\n\t\t\t0x1BA2 <= code && code <= 0x1BA5 || // Mn   [4] SUNDANESE CONSONANT SIGN PANYAKRA..SUNDANESE VOWEL SIGN PANYUKU\n\t\t\t0x1BA8 <= code && code <= 0x1BA9 || // Mn   [2] SUNDANESE VOWEL SIGN PAMEPET..SUNDANESE VOWEL SIGN PANEULEUNG\n\t\t\t0x1BAB <= code && code <= 0x1BAD || // Mn   [3] SUNDANESE SIGN VIRAMA..SUNDANESE CONSONANT SIGN PASANGAN WA\n\t\t\t0x1BE6 == code || // Mn       BATAK SIGN TOMPI\n\t\t\t0x1BE8 <= code && code <= 0x1BE9 || // Mn   [2] BATAK VOWEL SIGN PAKPAK E..BATAK VOWEL SIGN EE\n\t\t\t0x1BED == code || // Mn       BATAK VOWEL SIGN KARO O\n\t\t\t0x1BEF <= code && code <= 0x1BF1 || // Mn   [3] BATAK VOWEL SIGN U FOR SIMALUNGUN SA..BATAK CONSONANT SIGN H\n\t\t\t0x1C2C <= code && code <= 0x1C33 || // Mn   [8] LEPCHA VOWEL SIGN E..LEPCHA CONSONANT SIGN T\n\t\t\t0x1C36 <= code && code <= 0x1C37 || // Mn   [2] LEPCHA SIGN RAN..LEPCHA SIGN NUKTA\n\t\t\t0x1CD0 <= code && code <= 0x1CD2 || // Mn   [3] VEDIC TONE KARSHANA..VEDIC TONE PRENKHA\n\t\t\t0x1CD4 <= code && code <= 0x1CE0 || // Mn  [13] VEDIC SIGN YAJURVEDIC MIDLINE SVARITA..VEDIC TONE RIGVEDIC KASHMIRI INDEPENDENT SVARITA\n\t\t\t0x1CE2 <= code && code <= 0x1CE8 || // Mn   [7] VEDIC SIGN VISARGA SVARITA..VEDIC SIGN VISARGA ANUDATTA WITH TAIL\n\t\t\t0x1CED == code || // Mn       VEDIC SIGN TIRYAK\n\t\t\t0x1CF4 == code || // Mn       VEDIC TONE CANDRA ABOVE\n\t\t\t0x1CF8 <= code && code <= 0x1CF9 || // Mn   [2] VEDIC TONE RING ABOVE..VEDIC TONE DOUBLE RING ABOVE\n\t\t\t0x1DC0 <= code && code <= 0x1DF9 || // Mn  [58] COMBINING DOTTED GRAVE ACCENT..COMBINING WIDE INVERTED BRIDGE BELOW\n\t\t\t0x1DFB <= code && code <= 0x1DFF || // Mn   [5] COMBINING DELETION MARK..COMBINING RIGHT ARROWHEAD AND DOWN ARROWHEAD BELOW\n\t\t\t0x200C == code || // Cf       ZERO WIDTH NON-JOINER\n\t\t\t0x20D0 <= code && code <= 0x20DC || // Mn  [13] COMBINING LEFT HARPOON ABOVE..COMBINING FOUR DOTS ABOVE\n\t\t\t0x20DD <= code && code <= 0x20E0 || // Me   [4] COMBINING ENCLOSING CIRCLE..COMBINING ENCLOSING CIRCLE BACKSLASH\n\t\t\t0x20E1 == code || // Mn       COMBINING LEFT RIGHT ARROW ABOVE\n\t\t\t0x20E2 <= code && code <= 0x20E4 || // Me   [3] COMBINING ENCLOSING SCREEN..COMBINING ENCLOSING UPWARD POINTING TRIANGLE\n\t\t\t0x20E5 <= code && code <= 0x20F0 || // Mn  [12] COMBINING REVERSE SOLIDUS OVERLAY..COMBINING ASTERISK ABOVE\n\t\t\t0x2CEF <= code && code <= 0x2CF1 || // Mn   [3] COPTIC COMBINING NI ABOVE..COPTIC COMBINING SPIRITUS LENIS\n\t\t\t0x2D7F == code || // Mn       TIFINAGH CONSONANT JOINER\n\t\t\t0x2DE0 <= code && code <= 0x2DFF || // Mn  [32] COMBINING CYRILLIC LETTER BE..COMBINING CYRILLIC LETTER IOTIFIED BIG YUS\n\t\t\t0x302A <= code && code <= 0x302D || // Mn   [4] IDEOGRAPHIC LEVEL TONE MARK..IDEOGRAPHIC ENTERING TONE MARK\n\t\t\t0x302E <= code && code <= 0x302F || // Mc   [2] HANGUL SINGLE DOT TONE MARK..HANGUL DOUBLE DOT TONE MARK\n\t\t\t0x3099 <= code && code <= 0x309A || // Mn   [2] COMBINING KATAKANA-HIRAGANA VOICED SOUND MARK..COMBINING KATAKANA-HIRAGANA SEMI-VOICED SOUND MARK\n\t\t\t0xA66F == code || // Mn       COMBINING CYRILLIC VZMET\n\t\t\t0xA670 <= code && code <= 0xA672 || // Me   [3] COMBINING CYRILLIC TEN MILLIONS SIGN..COMBINING CYRILLIC THOUSAND MILLIONS SIGN\n\t\t\t0xA674 <= code && code <= 0xA67D || // Mn  [10] COMBINING CYRILLIC LETTER UKRAINIAN IE..COMBINING CYRILLIC PAYEROK\n\t\t\t0xA69E <= code && code <= 0xA69F || // Mn   [2] COMBINING CYRILLIC LETTER EF..COMBINING CYRILLIC LETTER IOTIFIED E\n\t\t\t0xA6F0 <= code && code <= 0xA6F1 || // Mn   [2] BAMUM COMBINING MARK KOQNDON..BAMUM COMBINING MARK TUKWENTIS\n\t\t\t0xA802 == code || // Mn       SYLOTI NAGRI SIGN DVISVARA\n\t\t\t0xA806 == code || // Mn       SYLOTI NAGRI SIGN HASANTA\n\t\t\t0xA80B == code || // Mn       SYLOTI NAGRI SIGN ANUSVARA\n\t\t\t0xA825 <= code && code <= 0xA826 || // Mn   [2] SYLOTI NAGRI VOWEL SIGN U..SYLOTI NAGRI VOWEL SIGN E\n\t\t\t0xA8C4 <= code && code <= 0xA8C5 || // Mn   [2] SAURASHTRA SIGN VIRAMA..SAURASHTRA SIGN CANDRABINDU\n\t\t\t0xA8E0 <= code && code <= 0xA8F1 || // Mn  [18] COMBINING DEVANAGARI DIGIT ZERO..COMBINING DEVANAGARI SIGN AVAGRAHA\n\t\t\t0xA926 <= code && code <= 0xA92D || // Mn   [8] KAYAH LI VOWEL UE..KAYAH LI TONE CALYA PLOPHU\n\t\t\t0xA947 <= code && code <= 0xA951 || // Mn  [11] REJANG VOWEL SIGN I..REJANG CONSONANT SIGN R\n\t\t\t0xA980 <= code && code <= 0xA982 || // Mn   [3] JAVANESE SIGN PANYANGGA..JAVANESE SIGN LAYAR\n\t\t\t0xA9B3 == code || // Mn       JAVANESE SIGN CECAK TELU\n\t\t\t0xA9B6 <= code && code <= 0xA9B9 || // Mn   [4] JAVANESE VOWEL SIGN WULU..JAVANESE VOWEL SIGN SUKU MENDUT\n\t\t\t0xA9BC == code || // Mn       JAVANESE VOWEL SIGN PEPET\n\t\t\t0xA9E5 == code || // Mn       MYANMAR SIGN SHAN SAW\n\t\t\t0xAA29 <= code && code <= 0xAA2E || // Mn   [6] CHAM VOWEL SIGN AA..CHAM VOWEL SIGN OE\n\t\t\t0xAA31 <= code && code <= 0xAA32 || // Mn   [2] CHAM VOWEL SIGN AU..CHAM VOWEL SIGN UE\n\t\t\t0xAA35 <= code && code <= 0xAA36 || // Mn   [2] CHAM CONSONANT SIGN LA..CHAM CONSONANT SIGN WA\n\t\t\t0xAA43 == code || // Mn       CHAM CONSONANT SIGN FINAL NG\n\t\t\t0xAA4C == code || // Mn       CHAM CONSONANT SIGN FINAL M\n\t\t\t0xAA7C == code || // Mn       MYANMAR SIGN TAI LAING TONE-2\n\t\t\t0xAAB0 == code || // Mn       TAI VIET MAI KANG\n\t\t\t0xAAB2 <= code && code <= 0xAAB4 || // Mn   [3] TAI VIET VOWEL I..TAI VIET VOWEL U\n\t\t\t0xAAB7 <= code && code <= 0xAAB8 || // Mn   [2] TAI VIET MAI KHIT..TAI VIET VOWEL IA\n\t\t\t0xAABE <= code && code <= 0xAABF || // Mn   [2] TAI VIET VOWEL AM..TAI VIET TONE MAI EK\n\t\t\t0xAAC1 == code || // Mn       TAI VIET TONE MAI THO\n\t\t\t0xAAEC <= code && code <= 0xAAED || // Mn   [2] MEETEI MAYEK VOWEL SIGN UU..MEETEI MAYEK VOWEL SIGN AAI\n\t\t\t0xAAF6 == code || // Mn       MEETEI MAYEK VIRAMA\n\t\t\t0xABE5 == code || // Mn       MEETEI MAYEK VOWEL SIGN ANAP\n\t\t\t0xABE8 == code || // Mn       MEETEI MAYEK VOWEL SIGN UNAP\n\t\t\t0xABED == code || // Mn       MEETEI MAYEK APUN IYEK\n\t\t\t0xFB1E == code || // Mn       HEBREW POINT JUDEO-SPANISH VARIKA\n\t\t\t0xFE00 <= code && code <= 0xFE0F || // Mn  [16] VARIATION SELECTOR-1..VARIATION SELECTOR-16\n\t\t\t0xFE20 <= code && code <= 0xFE2F || // Mn  [16] COMBINING LIGATURE LEFT HALF..COMBINING CYRILLIC TITLO RIGHT HALF\n\t\t\t0xFF9E <= code && code <= 0xFF9F || // Lm   [2] HALFWIDTH KATAKANA VOICED SOUND MARK..HALFWIDTH KATAKANA SEMI-VOICED SOUND MARK\n\t\t\t0x101FD == code || // Mn       PHAISTOS DISC SIGN COMBINING OBLIQUE STROKE\n\t\t\t0x102E0 == code || // Mn       COPTIC EPACT THOUSANDS MARK\n\t\t\t0x10376 <= code && code <= 0x1037A || // Mn   [5] COMBINING OLD PERMIC LETTER AN..COMBINING OLD PERMIC LETTER SII\n\t\t\t0x10A01 <= code && code <= 0x10A03 || // Mn   [3] KHAROSHTHI VOWEL SIGN I..KHAROSHTHI VOWEL SIGN VOCALIC R\n\t\t\t0x10A05 <= code && code <= 0x10A06 || // Mn   [2] KHAROSHTHI VOWEL SIGN E..KHAROSHTHI VOWEL SIGN O\n\t\t\t0x10A0C <= code && code <= 0x10A0F || // Mn   [4] KHAROSHTHI VOWEL LENGTH MARK..KHAROSHTHI SIGN VISARGA\n\t\t\t0x10A38 <= code && code <= 0x10A3A || // Mn   [3] KHAROSHTHI SIGN BAR ABOVE..KHAROSHTHI SIGN DOT BELOW\n\t\t\t0x10A3F == code || // Mn       KHAROSHTHI VIRAMA\n\t\t\t0x10AE5 <= code && code <= 0x10AE6 || // Mn   [2] MANICHAEAN ABBREVIATION MARK ABOVE..MANICHAEAN ABBREVIATION MARK BELOW\n\t\t\t0x11001 == code || // Mn       BRAHMI SIGN ANUSVARA\n\t\t\t0x11038 <= code && code <= 0x11046 || // Mn  [15] BRAHMI VOWEL SIGN AA..BRAHMI VIRAMA\n\t\t\t0x1107F <= code && code <= 0x11081 || // Mn   [3] BRAHMI NUMBER JOINER..KAITHI SIGN ANUSVARA\n\t\t\t0x110B3 <= code && code <= 0x110B6 || // Mn   [4] KAITHI VOWEL SIGN U..KAITHI VOWEL SIGN AI\n\t\t\t0x110B9 <= code && code <= 0x110BA || // Mn   [2] KAITHI SIGN VIRAMA..KAITHI SIGN NUKTA\n\t\t\t0x11100 <= code && code <= 0x11102 || // Mn   [3] CHAKMA SIGN CANDRABINDU..CHAKMA SIGN VISARGA\n\t\t\t0x11127 <= code && code <= 0x1112B || // Mn   [5] CHAKMA VOWEL SIGN A..CHAKMA VOWEL SIGN UU\n\t\t\t0x1112D <= code && code <= 0x11134 || // Mn   [8] CHAKMA VOWEL SIGN AI..CHAKMA MAAYYAA\n\t\t\t0x11173 == code || // Mn       MAHAJANI SIGN NUKTA\n\t\t\t0x11180 <= code && code <= 0x11181 || // Mn   [2] SHARADA SIGN CANDRABINDU..SHARADA SIGN ANUSVARA\n\t\t\t0x111B6 <= code && code <= 0x111BE || // Mn   [9] SHARADA VOWEL SIGN U..SHARADA VOWEL SIGN O\n\t\t\t0x111CA <= code && code <= 0x111CC || // Mn   [3] SHARADA SIGN NUKTA..SHARADA EXTRA SHORT VOWEL MARK\n\t\t\t0x1122F <= code && code <= 0x11231 || // Mn   [3] KHOJKI VOWEL SIGN U..KHOJKI VOWEL SIGN AI\n\t\t\t0x11234 == code || // Mn       KHOJKI SIGN ANUSVARA\n\t\t\t0x11236 <= code && code <= 0x11237 || // Mn   [2] KHOJKI SIGN NUKTA..KHOJKI SIGN SHADDA\n\t\t\t0x1123E == code || // Mn       KHOJKI SIGN SUKUN\n\t\t\t0x112DF == code || // Mn       KHUDAWADI SIGN ANUSVARA\n\t\t\t0x112E3 <= code && code <= 0x112EA || // Mn   [8] KHUDAWADI VOWEL SIGN U..KHUDAWADI SIGN VIRAMA\n\t\t\t0x11300 <= code && code <= 0x11301 || // Mn   [2] GRANTHA SIGN COMBINING ANUSVARA ABOVE..GRANTHA SIGN CANDRABINDU\n\t\t\t0x1133C == code || // Mn       GRANTHA SIGN NUKTA\n\t\t\t0x1133E == code || // Mc       GRANTHA VOWEL SIGN AA\n\t\t\t0x11340 == code || // Mn       GRANTHA VOWEL SIGN II\n\t\t\t0x11357 == code || // Mc       GRANTHA AU LENGTH MARK\n\t\t\t0x11366 <= code && code <= 0x1136C || // Mn   [7] COMBINING GRANTHA DIGIT ZERO..COMBINING GRANTHA DIGIT SIX\n\t\t\t0x11370 <= code && code <= 0x11374 || // Mn   [5] COMBINING GRANTHA LETTER A..COMBINING GRANTHA LETTER PA\n\t\t\t0x11438 <= code && code <= 0x1143F || // Mn   [8] NEWA VOWEL SIGN U..NEWA VOWEL SIGN AI\n\t\t\t0x11442 <= code && code <= 0x11444 || // Mn   [3] NEWA SIGN VIRAMA..NEWA SIGN ANUSVARA\n\t\t\t0x11446 == code || // Mn       NEWA SIGN NUKTA\n\t\t\t0x114B0 == code || // Mc       TIRHUTA VOWEL SIGN AA\n\t\t\t0x114B3 <= code && code <= 0x114B8 || // Mn   [6] TIRHUTA VOWEL SIGN U..TIRHUTA VOWEL SIGN VOCALIC LL\n\t\t\t0x114BA == code || // Mn       TIRHUTA VOWEL SIGN SHORT E\n\t\t\t0x114BD == code || // Mc       TIRHUTA VOWEL SIGN SHORT O\n\t\t\t0x114BF <= code && code <= 0x114C0 || // Mn   [2] TIRHUTA SIGN CANDRABINDU..TIRHUTA SIGN ANUSVARA\n\t\t\t0x114C2 <= code && code <= 0x114C3 || // Mn   [2] TIRHUTA SIGN VIRAMA..TIRHUTA SIGN NUKTA\n\t\t\t0x115AF == code || // Mc       SIDDHAM VOWEL SIGN AA\n\t\t\t0x115B2 <= code && code <= 0x115B5 || // Mn   [4] SIDDHAM VOWEL SIGN U..SIDDHAM VOWEL SIGN VOCALIC RR\n\t\t\t0x115BC <= code && code <= 0x115BD || // Mn   [2] SIDDHAM SIGN CANDRABINDU..SIDDHAM SIGN ANUSVARA\n\t\t\t0x115BF <= code && code <= 0x115C0 || // Mn   [2] SIDDHAM SIGN VIRAMA..SIDDHAM SIGN NUKTA\n\t\t\t0x115DC <= code && code <= 0x115DD || // Mn   [2] SIDDHAM VOWEL SIGN ALTERNATE U..SIDDHAM VOWEL SIGN ALTERNATE UU\n\t\t\t0x11633 <= code && code <= 0x1163A || // Mn   [8] MODI VOWEL SIGN U..MODI VOWEL SIGN AI\n\t\t\t0x1163D == code || // Mn       MODI SIGN ANUSVARA\n\t\t\t0x1163F <= code && code <= 0x11640 || // Mn   [2] MODI SIGN VIRAMA..MODI SIGN ARDHACANDRA\n\t\t\t0x116AB == code || // Mn       TAKRI SIGN ANUSVARA\n\t\t\t0x116AD == code || // Mn       TAKRI VOWEL SIGN AA\n\t\t\t0x116B0 <= code && code <= 0x116B5 || // Mn   [6] TAKRI VOWEL SIGN U..TAKRI VOWEL SIGN AU\n\t\t\t0x116B7 == code || // Mn       TAKRI SIGN NUKTA\n\t\t\t0x1171D <= code && code <= 0x1171F || // Mn   [3] AHOM CONSONANT SIGN MEDIAL LA..AHOM CONSONANT SIGN MEDIAL LIGATING RA\n\t\t\t0x11722 <= code && code <= 0x11725 || // Mn   [4] AHOM VOWEL SIGN I..AHOM VOWEL SIGN UU\n\t\t\t0x11727 <= code && code <= 0x1172B || // Mn   [5] AHOM VOWEL SIGN AW..AHOM SIGN KILLER\n\t\t\t0x11A01 <= code && code <= 0x11A06 || // Mn   [6] ZANABAZAR SQUARE VOWEL SIGN I..ZANABAZAR SQUARE VOWEL SIGN O\n\t\t\t0x11A09 <= code && code <= 0x11A0A || // Mn   [2] ZANABAZAR SQUARE VOWEL SIGN REVERSED I..ZANABAZAR SQUARE VOWEL LENGTH MARK\n\t\t\t0x11A33 <= code && code <= 0x11A38 || // Mn   [6] ZANABAZAR SQUARE FINAL CONSONANT MARK..ZANABAZAR SQUARE SIGN ANUSVARA\n\t\t\t0x11A3B <= code && code <= 0x11A3E || // Mn   [4] ZANABAZAR SQUARE CLUSTER-FINAL LETTER YA..ZANABAZAR SQUARE CLUSTER-FINAL LETTER VA\n\t\t\t0x11A47 == code || // Mn       ZANABAZAR SQUARE SUBJOINER\n\t\t\t0x11A51 <= code && code <= 0x11A56 || // Mn   [6] SOYOMBO VOWEL SIGN I..SOYOMBO VOWEL SIGN OE\n\t\t\t0x11A59 <= code && code <= 0x11A5B || // Mn   [3] SOYOMBO VOWEL SIGN VOCALIC R..SOYOMBO VOWEL LENGTH MARK\n\t\t\t0x11A8A <= code && code <= 0x11A96 || // Mn  [13] SOYOMBO FINAL CONSONANT SIGN G..SOYOMBO SIGN ANUSVARA\n\t\t\t0x11A98 <= code && code <= 0x11A99 || // Mn   [2] SOYOMBO GEMINATION MARK..SOYOMBO SUBJOINER\n\t\t\t0x11C30 <= code && code <= 0x11C36 || // Mn   [7] BHAIKSUKI VOWEL SIGN I..BHAIKSUKI VOWEL SIGN VOCALIC L\n\t\t\t0x11C38 <= code && code <= 0x11C3D || // Mn   [6] BHAIKSUKI VOWEL SIGN E..BHAIKSUKI SIGN ANUSVARA\n\t\t\t0x11C3F == code || // Mn       BHAIKSUKI SIGN VIRAMA\n\t\t\t0x11C92 <= code && code <= 0x11CA7 || // Mn  [22] MARCHEN SUBJOINED LETTER KA..MARCHEN SUBJOINED LETTER ZA\n\t\t\t0x11CAA <= code && code <= 0x11CB0 || // Mn   [7] MARCHEN SUBJOINED LETTER RA..MARCHEN VOWEL SIGN AA\n\t\t\t0x11CB2 <= code && code <= 0x11CB3 || // Mn   [2] MARCHEN VOWEL SIGN U..MARCHEN VOWEL SIGN E\n\t\t\t0x11CB5 <= code && code <= 0x11CB6 || // Mn   [2] MARCHEN SIGN ANUSVARA..MARCHEN SIGN CANDRABINDU\n\t\t\t0x11D31 <= code && code <= 0x11D36 || // Mn   [6] MASARAM GONDI VOWEL SIGN AA..MASARAM GONDI VOWEL SIGN VOCALIC R\n\t\t\t0x11D3A == code || // Mn       MASARAM GONDI VOWEL SIGN E\n\t\t\t0x11D3C <= code && code <= 0x11D3D || // Mn   [2] MASARAM GONDI VOWEL SIGN AI..MASARAM GONDI VOWEL SIGN O\n\t\t\t0x11D3F <= code && code <= 0x11D45 || // Mn   [7] MASARAM GONDI VOWEL SIGN AU..MASARAM GONDI VIRAMA\n\t\t\t0x11D47 == code || // Mn       MASARAM GONDI RA-KARA\n\t\t\t0x16AF0 <= code && code <= 0x16AF4 || // Mn   [5] BASSA VAH COMBINING HIGH TONE..BASSA VAH COMBINING HIGH-LOW TONE\n\t\t\t0x16B30 <= code && code <= 0x16B36 || // Mn   [7] PAHAWH HMONG MARK CIM TUB..PAHAWH HMONG MARK CIM TAUM\n\t\t\t0x16F8F <= code && code <= 0x16F92 || // Mn   [4] MIAO TONE RIGHT..MIAO TONE BELOW\n\t\t\t0x1BC9D <= code && code <= 0x1BC9E || // Mn   [2] DUPLOYAN THICK LETTER SELECTOR..DUPLOYAN DOUBLE MARK\n\t\t\t0x1D165 == code || // Mc       MUSICAL SYMBOL COMBINING STEM\n\t\t\t0x1D167 <= code && code <= 0x1D169 || // Mn   [3] MUSICAL SYMBOL COMBINING TREMOLO-1..MUSICAL SYMBOL COMBINING TREMOLO-3\n\t\t\t0x1D16E <= code && code <= 0x1D172 || // Mc   [5] MUSICAL SYMBOL COMBINING FLAG-1..MUSICAL SYMBOL COMBINING FLAG-5\n\t\t\t0x1D17B <= code && code <= 0x1D182 || // Mn   [8] MUSICAL SYMBOL COMBINING ACCENT..MUSICAL SYMBOL COMBINING LOURE\n\t\t\t0x1D185 <= code && code <= 0x1D18B || // Mn   [7] MUSICAL SYMBOL COMBINING DOIT..MUSICAL SYMBOL COMBINING TRIPLE TONGUE\n\t\t\t0x1D1AA <= code && code <= 0x1D1AD || // Mn   [4] MUSICAL SYMBOL COMBINING DOWN BOW..MUSICAL SYMBOL COMBINING SNAP PIZZICATO\n\t\t\t0x1D242 <= code && code <= 0x1D244 || // Mn   [3] COMBINING GREEK MUSICAL TRISEME..COMBINING GREEK MUSICAL PENTASEME\n\t\t\t0x1DA00 <= code && code <= 0x1DA36 || // Mn  [55] SIGNWRITING HEAD RIM..SIGNWRITING AIR SUCKING IN\n\t\t\t0x1DA3B <= code && code <= 0x1DA6C || // Mn  [50] SIGNWRITING MOUTH CLOSED NEUTRAL..SIGNWRITING EXCITEMENT\n\t\t\t0x1DA75 == code || // Mn       SIGNWRITING UPPER BODY TILTING FROM HIP JOINTS\n\t\t\t0x1DA84 == code || // Mn       SIGNWRITING LOCATION HEAD NECK\n\t\t\t0x1DA9B <= code && code <= 0x1DA9F || // Mn   [5] SIGNWRITING FILL MODIFIER-2..SIGNWRITING FILL MODIFIER-6\n\t\t\t0x1DAA1 <= code && code <= 0x1DAAF || // Mn  [15] SIGNWRITING ROTATION MODIFIER-2..SIGNWRITING ROTATION MODIFIER-16\n\t\t\t0x1E000 <= code && code <= 0x1E006 || // Mn   [7] COMBINING GLAGOLITIC LETTER AZU..COMBINING GLAGOLITIC LETTER ZHIVETE\n\t\t\t0x1E008 <= code && code <= 0x1E018 || // Mn  [17] COMBINING GLAGOLITIC LETTER ZEMLJA..COMBINING GLAGOLITIC LETTER HERU\n\t\t\t0x1E01B <= code && code <= 0x1E021 || // Mn   [7] COMBINING GLAGOLITIC LETTER SHTA..COMBINING GLAGOLITIC LETTER YATI\n\t\t\t0x1E023 <= code && code <= 0x1E024 || // Mn   [2] COMBINING GLAGOLITIC LETTER YU..COMBINING GLAGOLITIC LETTER SMALL YUS\n\t\t\t0x1E026 <= code && code <= 0x1E02A || // Mn   [5] COMBINING GLAGOLITIC LETTER YO..COMBINING GLAGOLITIC LETTER FITA\n\t\t\t0x1E8D0 <= code && code <= 0x1E8D6 || // Mn   [7] MENDE KIKAKUI COMBINING NUMBER TEENS..MENDE KIKAKUI COMBINING NUMBER MILLIONS\n\t\t\t0x1E944 <= code && code <= 0x1E94A || // Mn   [7] ADLAM ALIF LENGTHENER..ADLAM NUKTA\n\t\t\t0xE0020 <= code && code <= 0xE007F || // Cf  [96] TAG SPACE..CANCEL TAG\n\t\t\t0xE0100 <= code && code <= 0xE01EF // Mn [240] VARIATION SELECTOR-17..VARIATION SELECTOR-256\n\t\t\t) {\n\t\t\t\t\treturn Extend;\n\t\t\t\t}\n\n\t\t\tif (0x1F1E6 <= code && code <= 0x1F1FF) // So  [26] REGIONAL INDICATOR SYMBOL LETTER A..REGIONAL INDICATOR SYMBOL LETTER Z\n\t\t\t\t{\n\t\t\t\t\treturn Regional_Indicator;\n\t\t\t\t}\n\n\t\t\tif (0x0903 == code || // Mc       DEVANAGARI SIGN VISARGA\n\t\t\t0x093B == code || // Mc       DEVANAGARI VOWEL SIGN OOE\n\t\t\t0x093E <= code && code <= 0x0940 || // Mc   [3] DEVANAGARI VOWEL SIGN AA..DEVANAGARI VOWEL SIGN II\n\t\t\t0x0949 <= code && code <= 0x094C || // Mc   [4] DEVANAGARI VOWEL SIGN CANDRA O..DEVANAGARI VOWEL SIGN AU\n\t\t\t0x094E <= code && code <= 0x094F || // Mc   [2] DEVANAGARI VOWEL SIGN PRISHTHAMATRA E..DEVANAGARI VOWEL SIGN AW\n\t\t\t0x0982 <= code && code <= 0x0983 || // Mc   [2] BENGALI SIGN ANUSVARA..BENGALI SIGN VISARGA\n\t\t\t0x09BF <= code && code <= 0x09C0 || // Mc   [2] BENGALI VOWEL SIGN I..BENGALI VOWEL SIGN II\n\t\t\t0x09C7 <= code && code <= 0x09C8 || // Mc   [2] BENGALI VOWEL SIGN E..BENGALI VOWEL SIGN AI\n\t\t\t0x09CB <= code && code <= 0x09CC || // Mc   [2] BENGALI VOWEL SIGN O..BENGALI VOWEL SIGN AU\n\t\t\t0x0A03 == code || // Mc       GURMUKHI SIGN VISARGA\n\t\t\t0x0A3E <= code && code <= 0x0A40 || // Mc   [3] GURMUKHI VOWEL SIGN AA..GURMUKHI VOWEL SIGN II\n\t\t\t0x0A83 == code || // Mc       GUJARATI SIGN VISARGA\n\t\t\t0x0ABE <= code && code <= 0x0AC0 || // Mc   [3] GUJARATI VOWEL SIGN AA..GUJARATI VOWEL SIGN II\n\t\t\t0x0AC9 == code || // Mc       GUJARATI VOWEL SIGN CANDRA O\n\t\t\t0x0ACB <= code && code <= 0x0ACC || // Mc   [2] GUJARATI VOWEL SIGN O..GUJARATI VOWEL SIGN AU\n\t\t\t0x0B02 <= code && code <= 0x0B03 || // Mc   [2] ORIYA SIGN ANUSVARA..ORIYA SIGN VISARGA\n\t\t\t0x0B40 == code || // Mc       ORIYA VOWEL SIGN II\n\t\t\t0x0B47 <= code && code <= 0x0B48 || // Mc   [2] ORIYA VOWEL SIGN E..ORIYA VOWEL SIGN AI\n\t\t\t0x0B4B <= code && code <= 0x0B4C || // Mc   [2] ORIYA VOWEL SIGN O..ORIYA VOWEL SIGN AU\n\t\t\t0x0BBF == code || // Mc       TAMIL VOWEL SIGN I\n\t\t\t0x0BC1 <= code && code <= 0x0BC2 || // Mc   [2] TAMIL VOWEL SIGN U..TAMIL VOWEL SIGN UU\n\t\t\t0x0BC6 <= code && code <= 0x0BC8 || // Mc   [3] TAMIL VOWEL SIGN E..TAMIL VOWEL SIGN AI\n\t\t\t0x0BCA <= code && code <= 0x0BCC || // Mc   [3] TAMIL VOWEL SIGN O..TAMIL VOWEL SIGN AU\n\t\t\t0x0C01 <= code && code <= 0x0C03 || // Mc   [3] TELUGU SIGN CANDRABINDU..TELUGU SIGN VISARGA\n\t\t\t0x0C41 <= code && code <= 0x0C44 || // Mc   [4] TELUGU VOWEL SIGN U..TELUGU VOWEL SIGN VOCALIC RR\n\t\t\t0x0C82 <= code && code <= 0x0C83 || // Mc   [2] KANNADA SIGN ANUSVARA..KANNADA SIGN VISARGA\n\t\t\t0x0CBE == code || // Mc       KANNADA VOWEL SIGN AA\n\t\t\t0x0CC0 <= code && code <= 0x0CC1 || // Mc   [2] KANNADA VOWEL SIGN II..KANNADA VOWEL SIGN U\n\t\t\t0x0CC3 <= code && code <= 0x0CC4 || // Mc   [2] KANNADA VOWEL SIGN VOCALIC R..KANNADA VOWEL SIGN VOCALIC RR\n\t\t\t0x0CC7 <= code && code <= 0x0CC8 || // Mc   [2] KANNADA VOWEL SIGN EE..KANNADA VOWEL SIGN AI\n\t\t\t0x0CCA <= code && code <= 0x0CCB || // Mc   [2] KANNADA VOWEL SIGN O..KANNADA VOWEL SIGN OO\n\t\t\t0x0D02 <= code && code <= 0x0D03 || // Mc   [2] MALAYALAM SIGN ANUSVARA..MALAYALAM SIGN VISARGA\n\t\t\t0x0D3F <= code && code <= 0x0D40 || // Mc   [2] MALAYALAM VOWEL SIGN I..MALAYALAM VOWEL SIGN II\n\t\t\t0x0D46 <= code && code <= 0x0D48 || // Mc   [3] MALAYALAM VOWEL SIGN E..MALAYALAM VOWEL SIGN AI\n\t\t\t0x0D4A <= code && code <= 0x0D4C || // Mc   [3] MALAYALAM VOWEL SIGN O..MALAYALAM VOWEL SIGN AU\n\t\t\t0x0D82 <= code && code <= 0x0D83 || // Mc   [2] SINHALA SIGN ANUSVARAYA..SINHALA SIGN VISARGAYA\n\t\t\t0x0DD0 <= code && code <= 0x0DD1 || // Mc   [2] SINHALA VOWEL SIGN KETTI AEDA-PILLA..SINHALA VOWEL SIGN DIGA AEDA-PILLA\n\t\t\t0x0DD8 <= code && code <= 0x0DDE || // Mc   [7] SINHALA VOWEL SIGN GAETTA-PILLA..SINHALA VOWEL SIGN KOMBUVA HAA GAYANUKITTA\n\t\t\t0x0DF2 <= code && code <= 0x0DF3 || // Mc   [2] SINHALA VOWEL SIGN DIGA GAETTA-PILLA..SINHALA VOWEL SIGN DIGA GAYANUKITTA\n\t\t\t0x0E33 == code || // Lo       THAI CHARACTER SARA AM\n\t\t\t0x0EB3 == code || // Lo       LAO VOWEL SIGN AM\n\t\t\t0x0F3E <= code && code <= 0x0F3F || // Mc   [2] TIBETAN SIGN YAR TSHES..TIBETAN SIGN MAR TSHES\n\t\t\t0x0F7F == code || // Mc       TIBETAN SIGN RNAM BCAD\n\t\t\t0x1031 == code || // Mc       MYANMAR VOWEL SIGN E\n\t\t\t0x103B <= code && code <= 0x103C || // Mc   [2] MYANMAR CONSONANT SIGN MEDIAL YA..MYANMAR CONSONANT SIGN MEDIAL RA\n\t\t\t0x1056 <= code && code <= 0x1057 || // Mc   [2] MYANMAR VOWEL SIGN VOCALIC R..MYANMAR VOWEL SIGN VOCALIC RR\n\t\t\t0x1084 == code || // Mc       MYANMAR VOWEL SIGN SHAN E\n\t\t\t0x17B6 == code || // Mc       KHMER VOWEL SIGN AA\n\t\t\t0x17BE <= code && code <= 0x17C5 || // Mc   [8] KHMER VOWEL SIGN OE..KHMER VOWEL SIGN AU\n\t\t\t0x17C7 <= code && code <= 0x17C8 || // Mc   [2] KHMER SIGN REAHMUK..KHMER SIGN YUUKALEAPINTU\n\t\t\t0x1923 <= code && code <= 0x1926 || // Mc   [4] LIMBU VOWEL SIGN EE..LIMBU VOWEL SIGN AU\n\t\t\t0x1929 <= code && code <= 0x192B || // Mc   [3] LIMBU SUBJOINED LETTER YA..LIMBU SUBJOINED LETTER WA\n\t\t\t0x1930 <= code && code <= 0x1931 || // Mc   [2] LIMBU SMALL LETTER KA..LIMBU SMALL LETTER NGA\n\t\t\t0x1933 <= code && code <= 0x1938 || // Mc   [6] LIMBU SMALL LETTER TA..LIMBU SMALL LETTER LA\n\t\t\t0x1A19 <= code && code <= 0x1A1A || // Mc   [2] BUGINESE VOWEL SIGN E..BUGINESE VOWEL SIGN O\n\t\t\t0x1A55 == code || // Mc       TAI THAM CONSONANT SIGN MEDIAL RA\n\t\t\t0x1A57 == code || // Mc       TAI THAM CONSONANT SIGN LA TANG LAI\n\t\t\t0x1A6D <= code && code <= 0x1A72 || // Mc   [6] TAI THAM VOWEL SIGN OY..TAI THAM VOWEL SIGN THAM AI\n\t\t\t0x1B04 == code || // Mc       BALINESE SIGN BISAH\n\t\t\t0x1B35 == code || // Mc       BALINESE VOWEL SIGN TEDUNG\n\t\t\t0x1B3B == code || // Mc       BALINESE VOWEL SIGN RA REPA TEDUNG\n\t\t\t0x1B3D <= code && code <= 0x1B41 || // Mc   [5] BALINESE VOWEL SIGN LA LENGA TEDUNG..BALINESE VOWEL SIGN TALING REPA TEDUNG\n\t\t\t0x1B43 <= code && code <= 0x1B44 || // Mc   [2] BALINESE VOWEL SIGN PEPET TEDUNG..BALINESE ADEG ADEG\n\t\t\t0x1B82 == code || // Mc       SUNDANESE SIGN PANGWISAD\n\t\t\t0x1BA1 == code || // Mc       SUNDANESE CONSONANT SIGN PAMINGKAL\n\t\t\t0x1BA6 <= code && code <= 0x1BA7 || // Mc   [2] SUNDANESE VOWEL SIGN PANAELAENG..SUNDANESE VOWEL SIGN PANOLONG\n\t\t\t0x1BAA == code || // Mc       SUNDANESE SIGN PAMAAEH\n\t\t\t0x1BE7 == code || // Mc       BATAK VOWEL SIGN E\n\t\t\t0x1BEA <= code && code <= 0x1BEC || // Mc   [3] BATAK VOWEL SIGN I..BATAK VOWEL SIGN O\n\t\t\t0x1BEE == code || // Mc       BATAK VOWEL SIGN U\n\t\t\t0x1BF2 <= code && code <= 0x1BF3 || // Mc   [2] BATAK PANGOLAT..BATAK PANONGONAN\n\t\t\t0x1C24 <= code && code <= 0x1C2B || // Mc   [8] LEPCHA SUBJOINED LETTER YA..LEPCHA VOWEL SIGN UU\n\t\t\t0x1C34 <= code && code <= 0x1C35 || // Mc   [2] LEPCHA CONSONANT SIGN NYIN-DO..LEPCHA CONSONANT SIGN KANG\n\t\t\t0x1CE1 == code || // Mc       VEDIC TONE ATHARVAVEDIC INDEPENDENT SVARITA\n\t\t\t0x1CF2 <= code && code <= 0x1CF3 || // Mc   [2] VEDIC SIGN ARDHAVISARGA..VEDIC SIGN ROTATED ARDHAVISARGA\n\t\t\t0x1CF7 == code || // Mc       VEDIC SIGN ATIKRAMA\n\t\t\t0xA823 <= code && code <= 0xA824 || // Mc   [2] SYLOTI NAGRI VOWEL SIGN A..SYLOTI NAGRI VOWEL SIGN I\n\t\t\t0xA827 == code || // Mc       SYLOTI NAGRI VOWEL SIGN OO\n\t\t\t0xA880 <= code && code <= 0xA881 || // Mc   [2] SAURASHTRA SIGN ANUSVARA..SAURASHTRA SIGN VISARGA\n\t\t\t0xA8B4 <= code && code <= 0xA8C3 || // Mc  [16] SAURASHTRA CONSONANT SIGN HAARU..SAURASHTRA VOWEL SIGN AU\n\t\t\t0xA952 <= code && code <= 0xA953 || // Mc   [2] REJANG CONSONANT SIGN H..REJANG VIRAMA\n\t\t\t0xA983 == code || // Mc       JAVANESE SIGN WIGNYAN\n\t\t\t0xA9B4 <= code && code <= 0xA9B5 || // Mc   [2] JAVANESE VOWEL SIGN TARUNG..JAVANESE VOWEL SIGN TOLONG\n\t\t\t0xA9BA <= code && code <= 0xA9BB || // Mc   [2] JAVANESE VOWEL SIGN TALING..JAVANESE VOWEL SIGN DIRGA MURE\n\t\t\t0xA9BD <= code && code <= 0xA9C0 || // Mc   [4] JAVANESE CONSONANT SIGN KERET..JAVANESE PANGKON\n\t\t\t0xAA2F <= code && code <= 0xAA30 || // Mc   [2] CHAM VOWEL SIGN O..CHAM VOWEL SIGN AI\n\t\t\t0xAA33 <= code && code <= 0xAA34 || // Mc   [2] CHAM CONSONANT SIGN YA..CHAM CONSONANT SIGN RA\n\t\t\t0xAA4D == code || // Mc       CHAM CONSONANT SIGN FINAL H\n\t\t\t0xAAEB == code || // Mc       MEETEI MAYEK VOWEL SIGN II\n\t\t\t0xAAEE <= code && code <= 0xAAEF || // Mc   [2] MEETEI MAYEK VOWEL SIGN AU..MEETEI MAYEK VOWEL SIGN AAU\n\t\t\t0xAAF5 == code || // Mc       MEETEI MAYEK VOWEL SIGN VISARGA\n\t\t\t0xABE3 <= code && code <= 0xABE4 || // Mc   [2] MEETEI MAYEK VOWEL SIGN ONAP..MEETEI MAYEK VOWEL SIGN INAP\n\t\t\t0xABE6 <= code && code <= 0xABE7 || // Mc   [2] MEETEI MAYEK VOWEL SIGN YENAP..MEETEI MAYEK VOWEL SIGN SOUNAP\n\t\t\t0xABE9 <= code && code <= 0xABEA || // Mc   [2] MEETEI MAYEK VOWEL SIGN CHEINAP..MEETEI MAYEK VOWEL SIGN NUNG\n\t\t\t0xABEC == code || // Mc       MEETEI MAYEK LUM IYEK\n\t\t\t0x11000 == code || // Mc       BRAHMI SIGN CANDRABINDU\n\t\t\t0x11002 == code || // Mc       BRAHMI SIGN VISARGA\n\t\t\t0x11082 == code || // Mc       KAITHI SIGN VISARGA\n\t\t\t0x110B0 <= code && code <= 0x110B2 || // Mc   [3] KAITHI VOWEL SIGN AA..KAITHI VOWEL SIGN II\n\t\t\t0x110B7 <= code && code <= 0x110B8 || // Mc   [2] KAITHI VOWEL SIGN O..KAITHI VOWEL SIGN AU\n\t\t\t0x1112C == code || // Mc       CHAKMA VOWEL SIGN E\n\t\t\t0x11182 == code || // Mc       SHARADA SIGN VISARGA\n\t\t\t0x111B3 <= code && code <= 0x111B5 || // Mc   [3] SHARADA VOWEL SIGN AA..SHARADA VOWEL SIGN II\n\t\t\t0x111BF <= code && code <= 0x111C0 || // Mc   [2] SHARADA VOWEL SIGN AU..SHARADA SIGN VIRAMA\n\t\t\t0x1122C <= code && code <= 0x1122E || // Mc   [3] KHOJKI VOWEL SIGN AA..KHOJKI VOWEL SIGN II\n\t\t\t0x11232 <= code && code <= 0x11233 || // Mc   [2] KHOJKI VOWEL SIGN O..KHOJKI VOWEL SIGN AU\n\t\t\t0x11235 == code || // Mc       KHOJKI SIGN VIRAMA\n\t\t\t0x112E0 <= code && code <= 0x112E2 || // Mc   [3] KHUDAWADI VOWEL SIGN AA..KHUDAWADI VOWEL SIGN II\n\t\t\t0x11302 <= code && code <= 0x11303 || // Mc   [2] GRANTHA SIGN ANUSVARA..GRANTHA SIGN VISARGA\n\t\t\t0x1133F == code || // Mc       GRANTHA VOWEL SIGN I\n\t\t\t0x11341 <= code && code <= 0x11344 || // Mc   [4] GRANTHA VOWEL SIGN U..GRANTHA VOWEL SIGN VOCALIC RR\n\t\t\t0x11347 <= code && code <= 0x11348 || // Mc   [2] GRANTHA VOWEL SIGN EE..GRANTHA VOWEL SIGN AI\n\t\t\t0x1134B <= code && code <= 0x1134D || // Mc   [3] GRANTHA VOWEL SIGN OO..GRANTHA SIGN VIRAMA\n\t\t\t0x11362 <= code && code <= 0x11363 || // Mc   [2] GRANTHA VOWEL SIGN VOCALIC L..GRANTHA VOWEL SIGN VOCALIC LL\n\t\t\t0x11435 <= code && code <= 0x11437 || // Mc   [3] NEWA VOWEL SIGN AA..NEWA VOWEL SIGN II\n\t\t\t0x11440 <= code && code <= 0x11441 || // Mc   [2] NEWA VOWEL SIGN O..NEWA VOWEL SIGN AU\n\t\t\t0x11445 == code || // Mc       NEWA SIGN VISARGA\n\t\t\t0x114B1 <= code && code <= 0x114B2 || // Mc   [2] TIRHUTA VOWEL SIGN I..TIRHUTA VOWEL SIGN II\n\t\t\t0x114B9 == code || // Mc       TIRHUTA VOWEL SIGN E\n\t\t\t0x114BB <= code && code <= 0x114BC || // Mc   [2] TIRHUTA VOWEL SIGN AI..TIRHUTA VOWEL SIGN O\n\t\t\t0x114BE == code || // Mc       TIRHUTA VOWEL SIGN AU\n\t\t\t0x114C1 == code || // Mc       TIRHUTA SIGN VISARGA\n\t\t\t0x115B0 <= code && code <= 0x115B1 || // Mc   [2] SIDDHAM VOWEL SIGN I..SIDDHAM VOWEL SIGN II\n\t\t\t0x115B8 <= code && code <= 0x115BB || // Mc   [4] SIDDHAM VOWEL SIGN E..SIDDHAM VOWEL SIGN AU\n\t\t\t0x115BE == code || // Mc       SIDDHAM SIGN VISARGA\n\t\t\t0x11630 <= code && code <= 0x11632 || // Mc   [3] MODI VOWEL SIGN AA..MODI VOWEL SIGN II\n\t\t\t0x1163B <= code && code <= 0x1163C || // Mc   [2] MODI VOWEL SIGN O..MODI VOWEL SIGN AU\n\t\t\t0x1163E == code || // Mc       MODI SIGN VISARGA\n\t\t\t0x116AC == code || // Mc       TAKRI SIGN VISARGA\n\t\t\t0x116AE <= code && code <= 0x116AF || // Mc   [2] TAKRI VOWEL SIGN I..TAKRI VOWEL SIGN II\n\t\t\t0x116B6 == code || // Mc       TAKRI SIGN VIRAMA\n\t\t\t0x11720 <= code && code <= 0x11721 || // Mc   [2] AHOM VOWEL SIGN A..AHOM VOWEL SIGN AA\n\t\t\t0x11726 == code || // Mc       AHOM VOWEL SIGN E\n\t\t\t0x11A07 <= code && code <= 0x11A08 || // Mc   [2] ZANABAZAR SQUARE VOWEL SIGN AI..ZANABAZAR SQUARE VOWEL SIGN AU\n\t\t\t0x11A39 == code || // Mc       ZANABAZAR SQUARE SIGN VISARGA\n\t\t\t0x11A57 <= code && code <= 0x11A58 || // Mc   [2] SOYOMBO VOWEL SIGN AI..SOYOMBO VOWEL SIGN AU\n\t\t\t0x11A97 == code || // Mc       SOYOMBO SIGN VISARGA\n\t\t\t0x11C2F == code || // Mc       BHAIKSUKI VOWEL SIGN AA\n\t\t\t0x11C3E == code || // Mc       BHAIKSUKI SIGN VISARGA\n\t\t\t0x11CA9 == code || // Mc       MARCHEN SUBJOINED LETTER YA\n\t\t\t0x11CB1 == code || // Mc       MARCHEN VOWEL SIGN I\n\t\t\t0x11CB4 == code || // Mc       MARCHEN VOWEL SIGN O\n\t\t\t0x16F51 <= code && code <= 0x16F7E || // Mc  [46] MIAO SIGN ASPIRATION..MIAO VOWEL SIGN NG\n\t\t\t0x1D166 == code || // Mc       MUSICAL SYMBOL COMBINING SPRECHGESANG STEM\n\t\t\t0x1D16D == code // Mc       MUSICAL SYMBOL COMBINING AUGMENTATION DOT\n\t\t\t) {\n\t\t\t\t\treturn SpacingMark;\n\t\t\t\t}\n\n\t\t\tif (0x1100 <= code && code <= 0x115F || // Lo  [96] HANGUL CHOSEONG KIYEOK..HANGUL CHOSEONG FILLER\n\t\t\t0xA960 <= code && code <= 0xA97C // Lo  [29] HANGUL CHOSEONG TIKEUT-MIEUM..HANGUL CHOSEONG SSANGYEORINHIEUH\n\t\t\t) {\n\t\t\t\t\treturn L;\n\t\t\t\t}\n\n\t\t\tif (0x1160 <= code && code <= 0x11A7 || // Lo  [72] HANGUL JUNGSEONG FILLER..HANGUL JUNGSEONG O-YAE\n\t\t\t0xD7B0 <= code && code <= 0xD7C6 // Lo  [23] HANGUL JUNGSEONG O-YEO..HANGUL JUNGSEONG ARAEA-E\n\t\t\t) {\n\t\t\t\t\treturn V;\n\t\t\t\t}\n\n\t\t\tif (0x11A8 <= code && code <= 0x11FF || // Lo  [88] HANGUL JONGSEONG KIYEOK..HANGUL JONGSEONG SSANGNIEUN\n\t\t\t0xD7CB <= code && code <= 0xD7FB // Lo  [49] HANGUL JONGSEONG NIEUN-RIEUL..HANGUL JONGSEONG PHIEUPH-THIEUTH\n\t\t\t) {\n\t\t\t\t\treturn T;\n\t\t\t\t}\n\n\t\t\tif (0xAC00 == code || // Lo       HANGUL SYLLABLE GA\n\t\t\t0xAC1C == code || // Lo       HANGUL SYLLABLE GAE\n\t\t\t0xAC38 == code || // Lo       HANGUL SYLLABLE GYA\n\t\t\t0xAC54 == code || // Lo       HANGUL SYLLABLE GYAE\n\t\t\t0xAC70 == code || // Lo       HANGUL SYLLABLE GEO\n\t\t\t0xAC8C == code || // Lo       HANGUL SYLLABLE GE\n\t\t\t0xACA8 == code || // Lo       HANGUL SYLLABLE GYEO\n\t\t\t0xACC4 == code || // Lo       HANGUL SYLLABLE GYE\n\t\t\t0xACE0 == code || // Lo       HANGUL SYLLABLE GO\n\t\t\t0xACFC == code || // Lo       HANGUL SYLLABLE GWA\n\t\t\t0xAD18 == code || // Lo       HANGUL SYLLABLE GWAE\n\t\t\t0xAD34 == code || // Lo       HANGUL SYLLABLE GOE\n\t\t\t0xAD50 == code || // Lo       HANGUL SYLLABLE GYO\n\t\t\t0xAD6C == code || // Lo       HANGUL SYLLABLE GU\n\t\t\t0xAD88 == code || // Lo       HANGUL SYLLABLE GWEO\n\t\t\t0xADA4 == code || // Lo       HANGUL SYLLABLE GWE\n\t\t\t0xADC0 == code || // Lo       HANGUL SYLLABLE GWI\n\t\t\t0xADDC == code || // Lo       HANGUL SYLLABLE GYU\n\t\t\t0xADF8 == code || // Lo       HANGUL SYLLABLE GEU\n\t\t\t0xAE14 == code || // Lo       HANGUL SYLLABLE GYI\n\t\t\t0xAE30 == code || // Lo       HANGUL SYLLABLE GI\n\t\t\t0xAE4C == code || // Lo       HANGUL SYLLABLE GGA\n\t\t\t0xAE68 == code || // Lo       HANGUL SYLLABLE GGAE\n\t\t\t0xAE84 == code || // Lo       HANGUL SYLLABLE GGYA\n\t\t\t0xAEA0 == code || // Lo       HANGUL SYLLABLE GGYAE\n\t\t\t0xAEBC == code || // Lo       HANGUL SYLLABLE GGEO\n\t\t\t0xAED8 == code || // Lo       HANGUL SYLLABLE GGE\n\t\t\t0xAEF4 == code || // Lo       HANGUL SYLLABLE GGYEO\n\t\t\t0xAF10 == code || // Lo       HANGUL SYLLABLE GGYE\n\t\t\t0xAF2C == code || // Lo       HANGUL SYLLABLE GGO\n\t\t\t0xAF48 == code || // Lo       HANGUL SYLLABLE GGWA\n\t\t\t0xAF64 == code || // Lo       HANGUL SYLLABLE GGWAE\n\t\t\t0xAF80 == code || // Lo       HANGUL SYLLABLE GGOE\n\t\t\t0xAF9C == code || // Lo       HANGUL SYLLABLE GGYO\n\t\t\t0xAFB8 == code || // Lo       HANGUL SYLLABLE GGU\n\t\t\t0xAFD4 == code || // Lo       HANGUL SYLLABLE GGWEO\n\t\t\t0xAFF0 == code || // Lo       HANGUL SYLLABLE GGWE\n\t\t\t0xB00C == code || // Lo       HANGUL SYLLABLE GGWI\n\t\t\t0xB028 == code || // Lo       HANGUL SYLLABLE GGYU\n\t\t\t0xB044 == code || // Lo       HANGUL SYLLABLE GGEU\n\t\t\t0xB060 == code || // Lo       HANGUL SYLLABLE GGYI\n\t\t\t0xB07C == code || // Lo       HANGUL SYLLABLE GGI\n\t\t\t0xB098 == code || // Lo       HANGUL SYLLABLE NA\n\t\t\t0xB0B4 == code || // Lo       HANGUL SYLLABLE NAE\n\t\t\t0xB0D0 == code || // Lo       HANGUL SYLLABLE NYA\n\t\t\t0xB0EC == code || // Lo       HANGUL SYLLABLE NYAE\n\t\t\t0xB108 == code || // Lo       HANGUL SYLLABLE NEO\n\t\t\t0xB124 == code || // Lo       HANGUL SYLLABLE NE\n\t\t\t0xB140 == code || // Lo       HANGUL SYLLABLE NYEO\n\t\t\t0xB15C == code || // Lo       HANGUL SYLLABLE NYE\n\t\t\t0xB178 == code || // Lo       HANGUL SYLLABLE NO\n\t\t\t0xB194 == code || // Lo       HANGUL SYLLABLE NWA\n\t\t\t0xB1B0 == code || // Lo       HANGUL SYLLABLE NWAE\n\t\t\t0xB1CC == code || // Lo       HANGUL SYLLABLE NOE\n\t\t\t0xB1E8 == code || // Lo       HANGUL SYLLABLE NYO\n\t\t\t0xB204 == code || // Lo       HANGUL SYLLABLE NU\n\t\t\t0xB220 == code || // Lo       HANGUL SYLLABLE NWEO\n\t\t\t0xB23C == code || // Lo       HANGUL SYLLABLE NWE\n\t\t\t0xB258 == code || // Lo       HANGUL SYLLABLE NWI\n\t\t\t0xB274 == code || // Lo       HANGUL SYLLABLE NYU\n\t\t\t0xB290 == code || // Lo       HANGUL SYLLABLE NEU\n\t\t\t0xB2AC == code || // Lo       HANGUL SYLLABLE NYI\n\t\t\t0xB2C8 == code || // Lo       HANGUL SYLLABLE NI\n\t\t\t0xB2E4 == code || // Lo       HANGUL SYLLABLE DA\n\t\t\t0xB300 == code || // Lo       HANGUL SYLLABLE DAE\n\t\t\t0xB31C == code || // Lo       HANGUL SYLLABLE DYA\n\t\t\t0xB338 == code || // Lo       HANGUL SYLLABLE DYAE\n\t\t\t0xB354 == code || // Lo       HANGUL SYLLABLE DEO\n\t\t\t0xB370 == code || // Lo       HANGUL SYLLABLE DE\n\t\t\t0xB38C == code || // Lo       HANGUL SYLLABLE DYEO\n\t\t\t0xB3A8 == code || // Lo       HANGUL SYLLABLE DYE\n\t\t\t0xB3C4 == code || // Lo       HANGUL SYLLABLE DO\n\t\t\t0xB3E0 == code || // Lo       HANGUL SYLLABLE DWA\n\t\t\t0xB3FC == code || // Lo       HANGUL SYLLABLE DWAE\n\t\t\t0xB418 == code || // Lo       HANGUL SYLLABLE DOE\n\t\t\t0xB434 == code || // Lo       HANGUL SYLLABLE DYO\n\t\t\t0xB450 == code || // Lo       HANGUL SYLLABLE DU\n\t\t\t0xB46C == code || // Lo       HANGUL SYLLABLE DWEO\n\t\t\t0xB488 == code || // Lo       HANGUL SYLLABLE DWE\n\t\t\t0xB4A4 == code || // Lo       HANGUL SYLLABLE DWI\n\t\t\t0xB4C0 == code || // Lo       HANGUL SYLLABLE DYU\n\t\t\t0xB4DC == code || // Lo       HANGUL SYLLABLE DEU\n\t\t\t0xB4F8 == code || // Lo       HANGUL SYLLABLE DYI\n\t\t\t0xB514 == code || // Lo       HANGUL SYLLABLE DI\n\t\t\t0xB530 == code || // Lo       HANGUL SYLLABLE DDA\n\t\t\t0xB54C == code || // Lo       HANGUL SYLLABLE DDAE\n\t\t\t0xB568 == code || // Lo       HANGUL SYLLABLE DDYA\n\t\t\t0xB584 == code || // Lo       HANGUL SYLLABLE DDYAE\n\t\t\t0xB5A0 == code || // Lo       HANGUL SYLLABLE DDEO\n\t\t\t0xB5BC == code || // Lo       HANGUL SYLLABLE DDE\n\t\t\t0xB5D8 == code || // Lo       HANGUL SYLLABLE DDYEO\n\t\t\t0xB5F4 == code || // Lo       HANGUL SYLLABLE DDYE\n\t\t\t0xB610 == code || // Lo       HANGUL SYLLABLE DDO\n\t\t\t0xB62C == code || // Lo       HANGUL SYLLABLE DDWA\n\t\t\t0xB648 == code || // Lo       HANGUL SYLLABLE DDWAE\n\t\t\t0xB664 == code || // Lo       HANGUL SYLLABLE DDOE\n\t\t\t0xB680 == code || // Lo       HANGUL SYLLABLE DDYO\n\t\t\t0xB69C == code || // Lo       HANGUL SYLLABLE DDU\n\t\t\t0xB6B8 == code || // Lo       HANGUL SYLLABLE DDWEO\n\t\t\t0xB6D4 == code || // Lo       HANGUL SYLLABLE DDWE\n\t\t\t0xB6F0 == code || // Lo       HANGUL SYLLABLE DDWI\n\t\t\t0xB70C == code || // Lo       HANGUL SYLLABLE DDYU\n\t\t\t0xB728 == code || // Lo       HANGUL SYLLABLE DDEU\n\t\t\t0xB744 == code || // Lo       HANGUL SYLLABLE DDYI\n\t\t\t0xB760 == code || // Lo       HANGUL SYLLABLE DDI\n\t\t\t0xB77C == code || // Lo       HANGUL SYLLABLE RA\n\t\t\t0xB798 == code || // Lo       HANGUL SYLLABLE RAE\n\t\t\t0xB7B4 == code || // Lo       HANGUL SYLLABLE RYA\n\t\t\t0xB7D0 == code || // Lo       HANGUL SYLLABLE RYAE\n\t\t\t0xB7EC == code || // Lo       HANGUL SYLLABLE REO\n\t\t\t0xB808 == code || // Lo       HANGUL SYLLABLE RE\n\t\t\t0xB824 == code || // Lo       HANGUL SYLLABLE RYEO\n\t\t\t0xB840 == code || // Lo       HANGUL SYLLABLE RYE\n\t\t\t0xB85C == code || // Lo       HANGUL SYLLABLE RO\n\t\t\t0xB878 == code || // Lo       HANGUL SYLLABLE RWA\n\t\t\t0xB894 == code || // Lo       HANGUL SYLLABLE RWAE\n\t\t\t0xB8B0 == code || // Lo       HANGUL SYLLABLE ROE\n\t\t\t0xB8CC == code || // Lo       HANGUL SYLLABLE RYO\n\t\t\t0xB8E8 == code || // Lo       HANGUL SYLLABLE RU\n\t\t\t0xB904 == code || // Lo       HANGUL SYLLABLE RWEO\n\t\t\t0xB920 == code || // Lo       HANGUL SYLLABLE RWE\n\t\t\t0xB93C == code || // Lo       HANGUL SYLLABLE RWI\n\t\t\t0xB958 == code || // Lo       HANGUL SYLLABLE RYU\n\t\t\t0xB974 == code || // Lo       HANGUL SYLLABLE REU\n\t\t\t0xB990 == code || // Lo       HANGUL SYLLABLE RYI\n\t\t\t0xB9AC == code || // Lo       HANGUL SYLLABLE RI\n\t\t\t0xB9C8 == code || // Lo       HANGUL SYLLABLE MA\n\t\t\t0xB9E4 == code || // Lo       HANGUL SYLLABLE MAE\n\t\t\t0xBA00 == code || // Lo       HANGUL SYLLABLE MYA\n\t\t\t0xBA1C == code || // Lo       HANGUL SYLLABLE MYAE\n\t\t\t0xBA38 == code || // Lo       HANGUL SYLLABLE MEO\n\t\t\t0xBA54 == code || // Lo       HANGUL SYLLABLE ME\n\t\t\t0xBA70 == code || // Lo       HANGUL SYLLABLE MYEO\n\t\t\t0xBA8C == code || // Lo       HANGUL SYLLABLE MYE\n\t\t\t0xBAA8 == code || // Lo       HANGUL SYLLABLE MO\n\t\t\t0xBAC4 == code || // Lo       HANGUL SYLLABLE MWA\n\t\t\t0xBAE0 == code || // Lo       HANGUL SYLLABLE MWAE\n\t\t\t0xBAFC == code || // Lo       HANGUL SYLLABLE MOE\n\t\t\t0xBB18 == code || // Lo       HANGUL SYLLABLE MYO\n\t\t\t0xBB34 == code || // Lo       HANGUL SYLLABLE MU\n\t\t\t0xBB50 == code || // Lo       HANGUL SYLLABLE MWEO\n\t\t\t0xBB6C == code || // Lo       HANGUL SYLLABLE MWE\n\t\t\t0xBB88 == code || // Lo       HANGUL SYLLABLE MWI\n\t\t\t0xBBA4 == code || // Lo       HANGUL SYLLABLE MYU\n\t\t\t0xBBC0 == code || // Lo       HANGUL SYLLABLE MEU\n\t\t\t0xBBDC == code || // Lo       HANGUL SYLLABLE MYI\n\t\t\t0xBBF8 == code || // Lo       HANGUL SYLLABLE MI\n\t\t\t0xBC14 == code || // Lo       HANGUL SYLLABLE BA\n\t\t\t0xBC30 == code || // Lo       HANGUL SYLLABLE BAE\n\t\t\t0xBC4C == code || // Lo       HANGUL SYLLABLE BYA\n\t\t\t0xBC68 == code || // Lo       HANGUL SYLLABLE BYAE\n\t\t\t0xBC84 == code || // Lo       HANGUL SYLLABLE BEO\n\t\t\t0xBCA0 == code || // Lo       HANGUL SYLLABLE BE\n\t\t\t0xBCBC == code || // Lo       HANGUL SYLLABLE BYEO\n\t\t\t0xBCD8 == code || // Lo       HANGUL SYLLABLE BYE\n\t\t\t0xBCF4 == code || // Lo       HANGUL SYLLABLE BO\n\t\t\t0xBD10 == code || // Lo       HANGUL SYLLABLE BWA\n\t\t\t0xBD2C == code || // Lo       HANGUL SYLLABLE BWAE\n\t\t\t0xBD48 == code || // Lo       HANGUL SYLLABLE BOE\n\t\t\t0xBD64 == code || // Lo       HANGUL SYLLABLE BYO\n\t\t\t0xBD80 == code || // Lo       HANGUL SYLLABLE BU\n\t\t\t0xBD9C == code || // Lo       HANGUL SYLLABLE BWEO\n\t\t\t0xBDB8 == code || // Lo       HANGUL SYLLABLE BWE\n\t\t\t0xBDD4 == code || // Lo       HANGUL SYLLABLE BWI\n\t\t\t0xBDF0 == code || // Lo       HANGUL SYLLABLE BYU\n\t\t\t0xBE0C == code || // Lo       HANGUL SYLLABLE BEU\n\t\t\t0xBE28 == code || // Lo       HANGUL SYLLABLE BYI\n\t\t\t0xBE44 == code || // Lo       HANGUL SYLLABLE BI\n\t\t\t0xBE60 == code || // Lo       HANGUL SYLLABLE BBA\n\t\t\t0xBE7C == code || // Lo       HANGUL SYLLABLE BBAE\n\t\t\t0xBE98 == code || // Lo       HANGUL SYLLABLE BBYA\n\t\t\t0xBEB4 == code || // Lo       HANGUL SYLLABLE BBYAE\n\t\t\t0xBED0 == code || // Lo       HANGUL SYLLABLE BBEO\n\t\t\t0xBEEC == code || // Lo       HANGUL SYLLABLE BBE\n\t\t\t0xBF08 == code || // Lo       HANGUL SYLLABLE BBYEO\n\t\t\t0xBF24 == code || // Lo       HANGUL SYLLABLE BBYE\n\t\t\t0xBF40 == code || // Lo       HANGUL SYLLABLE BBO\n\t\t\t0xBF5C == code || // Lo       HANGUL SYLLABLE BBWA\n\t\t\t0xBF78 == code || // Lo       HANGUL SYLLABLE BBWAE\n\t\t\t0xBF94 == code || // Lo       HANGUL SYLLABLE BBOE\n\t\t\t0xBFB0 == code || // Lo       HANGUL SYLLABLE BBYO\n\t\t\t0xBFCC == code || // Lo       HANGUL SYLLABLE BBU\n\t\t\t0xBFE8 == code || // Lo       HANGUL SYLLABLE BBWEO\n\t\t\t0xC004 == code || // Lo       HANGUL SYLLABLE BBWE\n\t\t\t0xC020 == code || // Lo       HANGUL SYLLABLE BBWI\n\t\t\t0xC03C == code || // Lo       HANGUL SYLLABLE BBYU\n\t\t\t0xC058 == code || // Lo       HANGUL SYLLABLE BBEU\n\t\t\t0xC074 == code || // Lo       HANGUL SYLLABLE BBYI\n\t\t\t0xC090 == code || // Lo       HANGUL SYLLABLE BBI\n\t\t\t0xC0AC == code || // Lo       HANGUL SYLLABLE SA\n\t\t\t0xC0C8 == code || // Lo       HANGUL SYLLABLE SAE\n\t\t\t0xC0E4 == code || // Lo       HANGUL SYLLABLE SYA\n\t\t\t0xC100 == code || // Lo       HANGUL SYLLABLE SYAE\n\t\t\t0xC11C == code || // Lo       HANGUL SYLLABLE SEO\n\t\t\t0xC138 == code || // Lo       HANGUL SYLLABLE SE\n\t\t\t0xC154 == code || // Lo       HANGUL SYLLABLE SYEO\n\t\t\t0xC170 == code || // Lo       HANGUL SYLLABLE SYE\n\t\t\t0xC18C == code || // Lo       HANGUL SYLLABLE SO\n\t\t\t0xC1A8 == code || // Lo       HANGUL SYLLABLE SWA\n\t\t\t0xC1C4 == code || // Lo       HANGUL SYLLABLE SWAE\n\t\t\t0xC1E0 == code || // Lo       HANGUL SYLLABLE SOE\n\t\t\t0xC1FC == code || // Lo       HANGUL SYLLABLE SYO\n\t\t\t0xC218 == code || // Lo       HANGUL SYLLABLE SU\n\t\t\t0xC234 == code || // Lo       HANGUL SYLLABLE SWEO\n\t\t\t0xC250 == code || // Lo       HANGUL SYLLABLE SWE\n\t\t\t0xC26C == code || // Lo       HANGUL SYLLABLE SWI\n\t\t\t0xC288 == code || // Lo       HANGUL SYLLABLE SYU\n\t\t\t0xC2A4 == code || // Lo       HANGUL SYLLABLE SEU\n\t\t\t0xC2C0 == code || // Lo       HANGUL SYLLABLE SYI\n\t\t\t0xC2DC == code || // Lo       HANGUL SYLLABLE SI\n\t\t\t0xC2F8 == code || // Lo       HANGUL SYLLABLE SSA\n\t\t\t0xC314 == code || // Lo       HANGUL SYLLABLE SSAE\n\t\t\t0xC330 == code || // Lo       HANGUL SYLLABLE SSYA\n\t\t\t0xC34C == code || // Lo       HANGUL SYLLABLE SSYAE\n\t\t\t0xC368 == code || // Lo       HANGUL SYLLABLE SSEO\n\t\t\t0xC384 == code || // Lo       HANGUL SYLLABLE SSE\n\t\t\t0xC3A0 == code || // Lo       HANGUL SYLLABLE SSYEO\n\t\t\t0xC3BC == code || // Lo       HANGUL SYLLABLE SSYE\n\t\t\t0xC3D8 == code || // Lo       HANGUL SYLLABLE SSO\n\t\t\t0xC3F4 == code || // Lo       HANGUL SYLLABLE SSWA\n\t\t\t0xC410 == code || // Lo       HANGUL SYLLABLE SSWAE\n\t\t\t0xC42C == code || // Lo       HANGUL SYLLABLE SSOE\n\t\t\t0xC448 == code || // Lo       HANGUL SYLLABLE SSYO\n\t\t\t0xC464 == code || // Lo       HANGUL SYLLABLE SSU\n\t\t\t0xC480 == code || // Lo       HANGUL SYLLABLE SSWEO\n\t\t\t0xC49C == code || // Lo       HANGUL SYLLABLE SSWE\n\t\t\t0xC4B8 == code || // Lo       HANGUL SYLLABLE SSWI\n\t\t\t0xC4D4 == code || // Lo       HANGUL SYLLABLE SSYU\n\t\t\t0xC4F0 == code || // Lo       HANGUL SYLLABLE SSEU\n\t\t\t0xC50C == code || // Lo       HANGUL SYLLABLE SSYI\n\t\t\t0xC528 == code || // Lo       HANGUL SYLLABLE SSI\n\t\t\t0xC544 == code || // Lo       HANGUL SYLLABLE A\n\t\t\t0xC560 == code || // Lo       HANGUL SYLLABLE AE\n\t\t\t0xC57C == code || // Lo       HANGUL SYLLABLE YA\n\t\t\t0xC598 == code || // Lo       HANGUL SYLLABLE YAE\n\t\t\t0xC5B4 == code || // Lo       HANGUL SYLLABLE EO\n\t\t\t0xC5D0 == code || // Lo       HANGUL SYLLABLE E\n\t\t\t0xC5EC == code || // Lo       HANGUL SYLLABLE YEO\n\t\t\t0xC608 == code || // Lo       HANGUL SYLLABLE YE\n\t\t\t0xC624 == code || // Lo       HANGUL SYLLABLE O\n\t\t\t0xC640 == code || // Lo       HANGUL SYLLABLE WA\n\t\t\t0xC65C == code || // Lo       HANGUL SYLLABLE WAE\n\t\t\t0xC678 == code || // Lo       HANGUL SYLLABLE OE\n\t\t\t0xC694 == code || // Lo       HANGUL SYLLABLE YO\n\t\t\t0xC6B0 == code || // Lo       HANGUL SYLLABLE U\n\t\t\t0xC6CC == code || // Lo       HANGUL SYLLABLE WEO\n\t\t\t0xC6E8 == code || // Lo       HANGUL SYLLABLE WE\n\t\t\t0xC704 == code || // Lo       HANGUL SYLLABLE WI\n\t\t\t0xC720 == code || // Lo       HANGUL SYLLABLE YU\n\t\t\t0xC73C == code || // Lo       HANGUL SYLLABLE EU\n\t\t\t0xC758 == code || // Lo       HANGUL SYLLABLE YI\n\t\t\t0xC774 == code || // Lo       HANGUL SYLLABLE I\n\t\t\t0xC790 == code || // Lo       HANGUL SYLLABLE JA\n\t\t\t0xC7AC == code || // Lo       HANGUL SYLLABLE JAE\n\t\t\t0xC7C8 == code || // Lo       HANGUL SYLLABLE JYA\n\t\t\t0xC7E4 == code || // Lo       HANGUL SYLLABLE JYAE\n\t\t\t0xC800 == code || // Lo       HANGUL SYLLABLE JEO\n\t\t\t0xC81C == code || // Lo       HANGUL SYLLABLE JE\n\t\t\t0xC838 == code || // Lo       HANGUL SYLLABLE JYEO\n\t\t\t0xC854 == code || // Lo       HANGUL SYLLABLE JYE\n\t\t\t0xC870 == code || // Lo       HANGUL SYLLABLE JO\n\t\t\t0xC88C == code || // Lo       HANGUL SYLLABLE JWA\n\t\t\t0xC8A8 == code || // Lo       HANGUL SYLLABLE JWAE\n\t\t\t0xC8C4 == code || // Lo       HANGUL SYLLABLE JOE\n\t\t\t0xC8E0 == code || // Lo       HANGUL SYLLABLE JYO\n\t\t\t0xC8FC == code || // Lo       HANGUL SYLLABLE JU\n\t\t\t0xC918 == code || // Lo       HANGUL SYLLABLE JWEO\n\t\t\t0xC934 == code || // Lo       HANGUL SYLLABLE JWE\n\t\t\t0xC950 == code || // Lo       HANGUL SYLLABLE JWI\n\t\t\t0xC96C == code || // Lo       HANGUL SYLLABLE JYU\n\t\t\t0xC988 == code || // Lo       HANGUL SYLLABLE JEU\n\t\t\t0xC9A4 == code || // Lo       HANGUL SYLLABLE JYI\n\t\t\t0xC9C0 == code || // Lo       HANGUL SYLLABLE JI\n\t\t\t0xC9DC == code || // Lo       HANGUL SYLLABLE JJA\n\t\t\t0xC9F8 == code || // Lo       HANGUL SYLLABLE JJAE\n\t\t\t0xCA14 == code || // Lo       HANGUL SYLLABLE JJYA\n\t\t\t0xCA30 == code || // Lo       HANGUL SYLLABLE JJYAE\n\t\t\t0xCA4C == code || // Lo       HANGUL SYLLABLE JJEO\n\t\t\t0xCA68 == code || // Lo       HANGUL SYLLABLE JJE\n\t\t\t0xCA84 == code || // Lo       HANGUL SYLLABLE JJYEO\n\t\t\t0xCAA0 == code || // Lo       HANGUL SYLLABLE JJYE\n\t\t\t0xCABC == code || // Lo       HANGUL SYLLABLE JJO\n\t\t\t0xCAD8 == code || // Lo       HANGUL SYLLABLE JJWA\n\t\t\t0xCAF4 == code || // Lo       HANGUL SYLLABLE JJWAE\n\t\t\t0xCB10 == code || // Lo       HANGUL SYLLABLE JJOE\n\t\t\t0xCB2C == code || // Lo       HANGUL SYLLABLE JJYO\n\t\t\t0xCB48 == code || // Lo       HANGUL SYLLABLE JJU\n\t\t\t0xCB64 == code || // Lo       HANGUL SYLLABLE JJWEO\n\t\t\t0xCB80 == code || // Lo       HANGUL SYLLABLE JJWE\n\t\t\t0xCB9C == code || // Lo       HANGUL SYLLABLE JJWI\n\t\t\t0xCBB8 == code || // Lo       HANGUL SYLLABLE JJYU\n\t\t\t0xCBD4 == code || // Lo       HANGUL SYLLABLE JJEU\n\t\t\t0xCBF0 == code || // Lo       HANGUL SYLLABLE JJYI\n\t\t\t0xCC0C == code || // Lo       HANGUL SYLLABLE JJI\n\t\t\t0xCC28 == code || // Lo       HANGUL SYLLABLE CA\n\t\t\t0xCC44 == code || // Lo       HANGUL SYLLABLE CAE\n\t\t\t0xCC60 == code || // Lo       HANGUL SYLLABLE CYA\n\t\t\t0xCC7C == code || // Lo       HANGUL SYLLABLE CYAE\n\t\t\t0xCC98 == code || // Lo       HANGUL SYLLABLE CEO\n\t\t\t0xCCB4 == code || // Lo       HANGUL SYLLABLE CE\n\t\t\t0xCCD0 == code || // Lo       HANGUL SYLLABLE CYEO\n\t\t\t0xCCEC == code || // Lo       HANGUL SYLLABLE CYE\n\t\t\t0xCD08 == code || // Lo       HANGUL SYLLABLE CO\n\t\t\t0xCD24 == code || // Lo       HANGUL SYLLABLE CWA\n\t\t\t0xCD40 == code || // Lo       HANGUL SYLLABLE CWAE\n\t\t\t0xCD5C == code || // Lo       HANGUL SYLLABLE COE\n\t\t\t0xCD78 == code || // Lo       HANGUL SYLLABLE CYO\n\t\t\t0xCD94 == code || // Lo       HANGUL SYLLABLE CU\n\t\t\t0xCDB0 == code || // Lo       HANGUL SYLLABLE CWEO\n\t\t\t0xCDCC == code || // Lo       HANGUL SYLLABLE CWE\n\t\t\t0xCDE8 == code || // Lo       HANGUL SYLLABLE CWI\n\t\t\t0xCE04 == code || // Lo       HANGUL SYLLABLE CYU\n\t\t\t0xCE20 == code || // Lo       HANGUL SYLLABLE CEU\n\t\t\t0xCE3C == code || // Lo       HANGUL SYLLABLE CYI\n\t\t\t0xCE58 == code || // Lo       HANGUL SYLLABLE CI\n\t\t\t0xCE74 == code || // Lo       HANGUL SYLLABLE KA\n\t\t\t0xCE90 == code || // Lo       HANGUL SYLLABLE KAE\n\t\t\t0xCEAC == code || // Lo       HANGUL SYLLABLE KYA\n\t\t\t0xCEC8 == code || // Lo       HANGUL SYLLABLE KYAE\n\t\t\t0xCEE4 == code || // Lo       HANGUL SYLLABLE KEO\n\t\t\t0xCF00 == code || // Lo       HANGUL SYLLABLE KE\n\t\t\t0xCF1C == code || // Lo       HANGUL SYLLABLE KYEO\n\t\t\t0xCF38 == code || // Lo       HANGUL SYLLABLE KYE\n\t\t\t0xCF54 == code || // Lo       HANGUL SYLLABLE KO\n\t\t\t0xCF70 == code || // Lo       HANGUL SYLLABLE KWA\n\t\t\t0xCF8C == code || // Lo       HANGUL SYLLABLE KWAE\n\t\t\t0xCFA8 == code || // Lo       HANGUL SYLLABLE KOE\n\t\t\t0xCFC4 == code || // Lo       HANGUL SYLLABLE KYO\n\t\t\t0xCFE0 == code || // Lo       HANGUL SYLLABLE KU\n\t\t\t0xCFFC == code || // Lo       HANGUL SYLLABLE KWEO\n\t\t\t0xD018 == code || // Lo       HANGUL SYLLABLE KWE\n\t\t\t0xD034 == code || // Lo       HANGUL SYLLABLE KWI\n\t\t\t0xD050 == code || // Lo       HANGUL SYLLABLE KYU\n\t\t\t0xD06C == code || // Lo       HANGUL SYLLABLE KEU\n\t\t\t0xD088 == code || // Lo       HANGUL SYLLABLE KYI\n\t\t\t0xD0A4 == code || // Lo       HANGUL SYLLABLE KI\n\t\t\t0xD0C0 == code || // Lo       HANGUL SYLLABLE TA\n\t\t\t0xD0DC == code || // Lo       HANGUL SYLLABLE TAE\n\t\t\t0xD0F8 == code || // Lo       HANGUL SYLLABLE TYA\n\t\t\t0xD114 == code || // Lo       HANGUL SYLLABLE TYAE\n\t\t\t0xD130 == code || // Lo       HANGUL SYLLABLE TEO\n\t\t\t0xD14C == code || // Lo       HANGUL SYLLABLE TE\n\t\t\t0xD168 == code || // Lo       HANGUL SYLLABLE TYEO\n\t\t\t0xD184 == code || // Lo       HANGUL SYLLABLE TYE\n\t\t\t0xD1A0 == code || // Lo       HANGUL SYLLABLE TO\n\t\t\t0xD1BC == code || // Lo       HANGUL SYLLABLE TWA\n\t\t\t0xD1D8 == code || // Lo       HANGUL SYLLABLE TWAE\n\t\t\t0xD1F4 == code || // Lo       HANGUL SYLLABLE TOE\n\t\t\t0xD210 == code || // Lo       HANGUL SYLLABLE TYO\n\t\t\t0xD22C == code || // Lo       HANGUL SYLLABLE TU\n\t\t\t0xD248 == code || // Lo       HANGUL SYLLABLE TWEO\n\t\t\t0xD264 == code || // Lo       HANGUL SYLLABLE TWE\n\t\t\t0xD280 == code || // Lo       HANGUL SYLLABLE TWI\n\t\t\t0xD29C == code || // Lo       HANGUL SYLLABLE TYU\n\t\t\t0xD2B8 == code || // Lo       HANGUL SYLLABLE TEU\n\t\t\t0xD2D4 == code || // Lo       HANGUL SYLLABLE TYI\n\t\t\t0xD2F0 == code || // Lo       HANGUL SYLLABLE TI\n\t\t\t0xD30C == code || // Lo       HANGUL SYLLABLE PA\n\t\t\t0xD328 == code || // Lo       HANGUL SYLLABLE PAE\n\t\t\t0xD344 == code || // Lo       HANGUL SYLLABLE PYA\n\t\t\t0xD360 == code || // Lo       HANGUL SYLLABLE PYAE\n\t\t\t0xD37C == code || // Lo       HANGUL SYLLABLE PEO\n\t\t\t0xD398 == code || // Lo       HANGUL SYLLABLE PE\n\t\t\t0xD3B4 == code || // Lo       HANGUL SYLLABLE PYEO\n\t\t\t0xD3D0 == code || // Lo       HANGUL SYLLABLE PYE\n\t\t\t0xD3EC == code || // Lo       HANGUL SYLLABLE PO\n\t\t\t0xD408 == code || // Lo       HANGUL SYLLABLE PWA\n\t\t\t0xD424 == code || // Lo       HANGUL SYLLABLE PWAE\n\t\t\t0xD440 == code || // Lo       HANGUL SYLLABLE POE\n\t\t\t0xD45C == code || // Lo       HANGUL SYLLABLE PYO\n\t\t\t0xD478 == code || // Lo       HANGUL SYLLABLE PU\n\t\t\t0xD494 == code || // Lo       HANGUL SYLLABLE PWEO\n\t\t\t0xD4B0 == code || // Lo       HANGUL SYLLABLE PWE\n\t\t\t0xD4CC == code || // Lo       HANGUL SYLLABLE PWI\n\t\t\t0xD4E8 == code || // Lo       HANGUL SYLLABLE PYU\n\t\t\t0xD504 == code || // Lo       HANGUL SYLLABLE PEU\n\t\t\t0xD520 == code || // Lo       HANGUL SYLLABLE PYI\n\t\t\t0xD53C == code || // Lo       HANGUL SYLLABLE PI\n\t\t\t0xD558 == code || // Lo       HANGUL SYLLABLE HA\n\t\t\t0xD574 == code || // Lo       HANGUL SYLLABLE HAE\n\t\t\t0xD590 == code || // Lo       HANGUL SYLLABLE HYA\n\t\t\t0xD5AC == code || // Lo       HANGUL SYLLABLE HYAE\n\t\t\t0xD5C8 == code || // Lo       HANGUL SYLLABLE HEO\n\t\t\t0xD5E4 == code || // Lo       HANGUL SYLLABLE HE\n\t\t\t0xD600 == code || // Lo       HANGUL SYLLABLE HYEO\n\t\t\t0xD61C == code || // Lo       HANGUL SYLLABLE HYE\n\t\t\t0xD638 == code || // Lo       HANGUL SYLLABLE HO\n\t\t\t0xD654 == code || // Lo       HANGUL SYLLABLE HWA\n\t\t\t0xD670 == code || // Lo       HANGUL SYLLABLE HWAE\n\t\t\t0xD68C == code || // Lo       HANGUL SYLLABLE HOE\n\t\t\t0xD6A8 == code || // Lo       HANGUL SYLLABLE HYO\n\t\t\t0xD6C4 == code || // Lo       HANGUL SYLLABLE HU\n\t\t\t0xD6E0 == code || // Lo       HANGUL SYLLABLE HWEO\n\t\t\t0xD6FC == code || // Lo       HANGUL SYLLABLE HWE\n\t\t\t0xD718 == code || // Lo       HANGUL SYLLABLE HWI\n\t\t\t0xD734 == code || // Lo       HANGUL SYLLABLE HYU\n\t\t\t0xD750 == code || // Lo       HANGUL SYLLABLE HEU\n\t\t\t0xD76C == code || // Lo       HANGUL SYLLABLE HYI\n\t\t\t0xD788 == code // Lo       HANGUL SYLLABLE HI\n\t\t\t) {\n\t\t\t\t\treturn LV;\n\t\t\t\t}\n\n\t\t\tif (0xAC01 <= code && code <= 0xAC1B || // Lo  [27] HANGUL SYLLABLE GAG..HANGUL SYLLABLE GAH\n\t\t\t0xAC1D <= code && code <= 0xAC37 || // Lo  [27] HANGUL SYLLABLE GAEG..HANGUL SYLLABLE GAEH\n\t\t\t0xAC39 <= code && code <= 0xAC53 || // Lo  [27] HANGUL SYLLABLE GYAG..HANGUL SYLLABLE GYAH\n\t\t\t0xAC55 <= code && code <= 0xAC6F || // Lo  [27] HANGUL SYLLABLE GYAEG..HANGUL SYLLABLE GYAEH\n\t\t\t0xAC71 <= code && code <= 0xAC8B || // Lo  [27] HANGUL SYLLABLE GEOG..HANGUL SYLLABLE GEOH\n\t\t\t0xAC8D <= code && code <= 0xACA7 || // Lo  [27] HANGUL SYLLABLE GEG..HANGUL SYLLABLE GEH\n\t\t\t0xACA9 <= code && code <= 0xACC3 || // Lo  [27] HANGUL SYLLABLE GYEOG..HANGUL SYLLABLE GYEOH\n\t\t\t0xACC5 <= code && code <= 0xACDF || // Lo  [27] HANGUL SYLLABLE GYEG..HANGUL SYLLABLE GYEH\n\t\t\t0xACE1 <= code && code <= 0xACFB || // Lo  [27] HANGUL SYLLABLE GOG..HANGUL SYLLABLE GOH\n\t\t\t0xACFD <= code && code <= 0xAD17 || // Lo  [27] HANGUL SYLLABLE GWAG..HANGUL SYLLABLE GWAH\n\t\t\t0xAD19 <= code && code <= 0xAD33 || // Lo  [27] HANGUL SYLLABLE GWAEG..HANGUL SYLLABLE GWAEH\n\t\t\t0xAD35 <= code && code <= 0xAD4F || // Lo  [27] HANGUL SYLLABLE GOEG..HANGUL SYLLABLE GOEH\n\t\t\t0xAD51 <= code && code <= 0xAD6B || // Lo  [27] HANGUL SYLLABLE GYOG..HANGUL SYLLABLE GYOH\n\t\t\t0xAD6D <= code && code <= 0xAD87 || // Lo  [27] HANGUL SYLLABLE GUG..HANGUL SYLLABLE GUH\n\t\t\t0xAD89 <= code && code <= 0xADA3 || // Lo  [27] HANGUL SYLLABLE GWEOG..HANGUL SYLLABLE GWEOH\n\t\t\t0xADA5 <= code && code <= 0xADBF || // Lo  [27] HANGUL SYLLABLE GWEG..HANGUL SYLLABLE GWEH\n\t\t\t0xADC1 <= code && code <= 0xADDB || // Lo  [27] HANGUL SYLLABLE GWIG..HANGUL SYLLABLE GWIH\n\t\t\t0xADDD <= code && code <= 0xADF7 || // Lo  [27] HANGUL SYLLABLE GYUG..HANGUL SYLLABLE GYUH\n\t\t\t0xADF9 <= code && code <= 0xAE13 || // Lo  [27] HANGUL SYLLABLE GEUG..HANGUL SYLLABLE GEUH\n\t\t\t0xAE15 <= code && code <= 0xAE2F || // Lo  [27] HANGUL SYLLABLE GYIG..HANGUL SYLLABLE GYIH\n\t\t\t0xAE31 <= code && code <= 0xAE4B || // Lo  [27] HANGUL SYLLABLE GIG..HANGUL SYLLABLE GIH\n\t\t\t0xAE4D <= code && code <= 0xAE67 || // Lo  [27] HANGUL SYLLABLE GGAG..HANGUL SYLLABLE GGAH\n\t\t\t0xAE69 <= code && code <= 0xAE83 || // Lo  [27] HANGUL SYLLABLE GGAEG..HANGUL SYLLABLE GGAEH\n\t\t\t0xAE85 <= code && code <= 0xAE9F || // Lo  [27] HANGUL SYLLABLE GGYAG..HANGUL SYLLABLE GGYAH\n\t\t\t0xAEA1 <= code && code <= 0xAEBB || // Lo  [27] HANGUL SYLLABLE GGYAEG..HANGUL SYLLABLE GGYAEH\n\t\t\t0xAEBD <= code && code <= 0xAED7 || // Lo  [27] HANGUL SYLLABLE GGEOG..HANGUL SYLLABLE GGEOH\n\t\t\t0xAED9 <= code && code <= 0xAEF3 || // Lo  [27] HANGUL SYLLABLE GGEG..HANGUL SYLLABLE GGEH\n\t\t\t0xAEF5 <= code && code <= 0xAF0F || // Lo  [27] HANGUL SYLLABLE GGYEOG..HANGUL SYLLABLE GGYEOH\n\t\t\t0xAF11 <= code && code <= 0xAF2B || // Lo  [27] HANGUL SYLLABLE GGYEG..HANGUL SYLLABLE GGYEH\n\t\t\t0xAF2D <= code && code <= 0xAF47 || // Lo  [27] HANGUL SYLLABLE GGOG..HANGUL SYLLABLE GGOH\n\t\t\t0xAF49 <= code && code <= 0xAF63 || // Lo  [27] HANGUL SYLLABLE GGWAG..HANGUL SYLLABLE GGWAH\n\t\t\t0xAF65 <= code && code <= 0xAF7F || // Lo  [27] HANGUL SYLLABLE GGWAEG..HANGUL SYLLABLE GGWAEH\n\t\t\t0xAF81 <= code && code <= 0xAF9B || // Lo  [27] HANGUL SYLLABLE GGOEG..HANGUL SYLLABLE GGOEH\n\t\t\t0xAF9D <= code && code <= 0xAFB7 || // Lo  [27] HANGUL SYLLABLE GGYOG..HANGUL SYLLABLE GGYOH\n\t\t\t0xAFB9 <= code && code <= 0xAFD3 || // Lo  [27] HANGUL SYLLABLE GGUG..HANGUL SYLLABLE GGUH\n\t\t\t0xAFD5 <= code && code <= 0xAFEF || // Lo  [27] HANGUL SYLLABLE GGWEOG..HANGUL SYLLABLE GGWEOH\n\t\t\t0xAFF1 <= code && code <= 0xB00B || // Lo  [27] HANGUL SYLLABLE GGWEG..HANGUL SYLLABLE GGWEH\n\t\t\t0xB00D <= code && code <= 0xB027 || // Lo  [27] HANGUL SYLLABLE GGWIG..HANGUL SYLLABLE GGWIH\n\t\t\t0xB029 <= code && code <= 0xB043 || // Lo  [27] HANGUL SYLLABLE GGYUG..HANGUL SYLLABLE GGYUH\n\t\t\t0xB045 <= code && code <= 0xB05F || // Lo  [27] HANGUL SYLLABLE GGEUG..HANGUL SYLLABLE GGEUH\n\t\t\t0xB061 <= code && code <= 0xB07B || // Lo  [27] HANGUL SYLLABLE GGYIG..HANGUL SYLLABLE GGYIH\n\t\t\t0xB07D <= code && code <= 0xB097 || // Lo  [27] HANGUL SYLLABLE GGIG..HANGUL SYLLABLE GGIH\n\t\t\t0xB099 <= code && code <= 0xB0B3 || // Lo  [27] HANGUL SYLLABLE NAG..HANGUL SYLLABLE NAH\n\t\t\t0xB0B5 <= code && code <= 0xB0CF || // Lo  [27] HANGUL SYLLABLE NAEG..HANGUL SYLLABLE NAEH\n\t\t\t0xB0D1 <= code && code <= 0xB0EB || // Lo  [27] HANGUL SYLLABLE NYAG..HANGUL SYLLABLE NYAH\n\t\t\t0xB0ED <= code && code <= 0xB107 || // Lo  [27] HANGUL SYLLABLE NYAEG..HANGUL SYLLABLE NYAEH\n\t\t\t0xB109 <= code && code <= 0xB123 || // Lo  [27] HANGUL SYLLABLE NEOG..HANGUL SYLLABLE NEOH\n\t\t\t0xB125 <= code && code <= 0xB13F || // Lo  [27] HANGUL SYLLABLE NEG..HANGUL SYLLABLE NEH\n\t\t\t0xB141 <= code && code <= 0xB15B || // Lo  [27] HANGUL SYLLABLE NYEOG..HANGUL SYLLABLE NYEOH\n\t\t\t0xB15D <= code && code <= 0xB177 || // Lo  [27] HANGUL SYLLABLE NYEG..HANGUL SYLLABLE NYEH\n\t\t\t0xB179 <= code && code <= 0xB193 || // Lo  [27] HANGUL SYLLABLE NOG..HANGUL SYLLABLE NOH\n\t\t\t0xB195 <= code && code <= 0xB1AF || // Lo  [27] HANGUL SYLLABLE NWAG..HANGUL SYLLABLE NWAH\n\t\t\t0xB1B1 <= code && code <= 0xB1CB || // Lo  [27] HANGUL SYLLABLE NWAEG..HANGUL SYLLABLE NWAEH\n\t\t\t0xB1CD <= code && code <= 0xB1E7 || // Lo  [27] HANGUL SYLLABLE NOEG..HANGUL SYLLABLE NOEH\n\t\t\t0xB1E9 <= code && code <= 0xB203 || // Lo  [27] HANGUL SYLLABLE NYOG..HANGUL SYLLABLE NYOH\n\t\t\t0xB205 <= code && code <= 0xB21F || // Lo  [27] HANGUL SYLLABLE NUG..HANGUL SYLLABLE NUH\n\t\t\t0xB221 <= code && code <= 0xB23B || // Lo  [27] HANGUL SYLLABLE NWEOG..HANGUL SYLLABLE NWEOH\n\t\t\t0xB23D <= code && code <= 0xB257 || // Lo  [27] HANGUL SYLLABLE NWEG..HANGUL SYLLABLE NWEH\n\t\t\t0xB259 <= code && code <= 0xB273 || // Lo  [27] HANGUL SYLLABLE NWIG..HANGUL SYLLABLE NWIH\n\t\t\t0xB275 <= code && code <= 0xB28F || // Lo  [27] HANGUL SYLLABLE NYUG..HANGUL SYLLABLE NYUH\n\t\t\t0xB291 <= code && code <= 0xB2AB || // Lo  [27] HANGUL SYLLABLE NEUG..HANGUL SYLLABLE NEUH\n\t\t\t0xB2AD <= code && code <= 0xB2C7 || // Lo  [27] HANGUL SYLLABLE NYIG..HANGUL SYLLABLE NYIH\n\t\t\t0xB2C9 <= code && code <= 0xB2E3 || // Lo  [27] HANGUL SYLLABLE NIG..HANGUL SYLLABLE NIH\n\t\t\t0xB2E5 <= code && code <= 0xB2FF || // Lo  [27] HANGUL SYLLABLE DAG..HANGUL SYLLABLE DAH\n\t\t\t0xB301 <= code && code <= 0xB31B || // Lo  [27] HANGUL SYLLABLE DAEG..HANGUL SYLLABLE DAEH\n\t\t\t0xB31D <= code && code <= 0xB337 || // Lo  [27] HANGUL SYLLABLE DYAG..HANGUL SYLLABLE DYAH\n\t\t\t0xB339 <= code && code <= 0xB353 || // Lo  [27] HANGUL SYLLABLE DYAEG..HANGUL SYLLABLE DYAEH\n\t\t\t0xB355 <= code && code <= 0xB36F || // Lo  [27] HANGUL SYLLABLE DEOG..HANGUL SYLLABLE DEOH\n\t\t\t0xB371 <= code && code <= 0xB38B || // Lo  [27] HANGUL SYLLABLE DEG..HANGUL SYLLABLE DEH\n\t\t\t0xB38D <= code && code <= 0xB3A7 || // Lo  [27] HANGUL SYLLABLE DYEOG..HANGUL SYLLABLE DYEOH\n\t\t\t0xB3A9 <= code && code <= 0xB3C3 || // Lo  [27] HANGUL SYLLABLE DYEG..HANGUL SYLLABLE DYEH\n\t\t\t0xB3C5 <= code && code <= 0xB3DF || // Lo  [27] HANGUL SYLLABLE DOG..HANGUL SYLLABLE DOH\n\t\t\t0xB3E1 <= code && code <= 0xB3FB || // Lo  [27] HANGUL SYLLABLE DWAG..HANGUL SYLLABLE DWAH\n\t\t\t0xB3FD <= code && code <= 0xB417 || // Lo  [27] HANGUL SYLLABLE DWAEG..HANGUL SYLLABLE DWAEH\n\t\t\t0xB419 <= code && code <= 0xB433 || // Lo  [27] HANGUL SYLLABLE DOEG..HANGUL SYLLABLE DOEH\n\t\t\t0xB435 <= code && code <= 0xB44F || // Lo  [27] HANGUL SYLLABLE DYOG..HANGUL SYLLABLE DYOH\n\t\t\t0xB451 <= code && code <= 0xB46B || // Lo  [27] HANGUL SYLLABLE DUG..HANGUL SYLLABLE DUH\n\t\t\t0xB46D <= code && code <= 0xB487 || // Lo  [27] HANGUL SYLLABLE DWEOG..HANGUL SYLLABLE DWEOH\n\t\t\t0xB489 <= code && code <= 0xB4A3 || // Lo  [27] HANGUL SYLLABLE DWEG..HANGUL SYLLABLE DWEH\n\t\t\t0xB4A5 <= code && code <= 0xB4BF || // Lo  [27] HANGUL SYLLABLE DWIG..HANGUL SYLLABLE DWIH\n\t\t\t0xB4C1 <= code && code <= 0xB4DB || // Lo  [27] HANGUL SYLLABLE DYUG..HANGUL SYLLABLE DYUH\n\t\t\t0xB4DD <= code && code <= 0xB4F7 || // Lo  [27] HANGUL SYLLABLE DEUG..HANGUL SYLLABLE DEUH\n\t\t\t0xB4F9 <= code && code <= 0xB513 || // Lo  [27] HANGUL SYLLABLE DYIG..HANGUL SYLLABLE DYIH\n\t\t\t0xB515 <= code && code <= 0xB52F || // Lo  [27] HANGUL SYLLABLE DIG..HANGUL SYLLABLE DIH\n\t\t\t0xB531 <= code && code <= 0xB54B || // Lo  [27] HANGUL SYLLABLE DDAG..HANGUL SYLLABLE DDAH\n\t\t\t0xB54D <= code && code <= 0xB567 || // Lo  [27] HANGUL SYLLABLE DDAEG..HANGUL SYLLABLE DDAEH\n\t\t\t0xB569 <= code && code <= 0xB583 || // Lo  [27] HANGUL SYLLABLE DDYAG..HANGUL SYLLABLE DDYAH\n\t\t\t0xB585 <= code && code <= 0xB59F || // Lo  [27] HANGUL SYLLABLE DDYAEG..HANGUL SYLLABLE DDYAEH\n\t\t\t0xB5A1 <= code && code <= 0xB5BB || // Lo  [27] HANGUL SYLLABLE DDEOG..HANGUL SYLLABLE DDEOH\n\t\t\t0xB5BD <= code && code <= 0xB5D7 || // Lo  [27] HANGUL SYLLABLE DDEG..HANGUL SYLLABLE DDEH\n\t\t\t0xB5D9 <= code && code <= 0xB5F3 || // Lo  [27] HANGUL SYLLABLE DDYEOG..HANGUL SYLLABLE DDYEOH\n\t\t\t0xB5F5 <= code && code <= 0xB60F || // Lo  [27] HANGUL SYLLABLE DDYEG..HANGUL SYLLABLE DDYEH\n\t\t\t0xB611 <= code && code <= 0xB62B || // Lo  [27] HANGUL SYLLABLE DDOG..HANGUL SYLLABLE DDOH\n\t\t\t0xB62D <= code && code <= 0xB647 || // Lo  [27] HANGUL SYLLABLE DDWAG..HANGUL SYLLABLE DDWAH\n\t\t\t0xB649 <= code && code <= 0xB663 || // Lo  [27] HANGUL SYLLABLE DDWAEG..HANGUL SYLLABLE DDWAEH\n\t\t\t0xB665 <= code && code <= 0xB67F || // Lo  [27] HANGUL SYLLABLE DDOEG..HANGUL SYLLABLE DDOEH\n\t\t\t0xB681 <= code && code <= 0xB69B || // Lo  [27] HANGUL SYLLABLE DDYOG..HANGUL SYLLABLE DDYOH\n\t\t\t0xB69D <= code && code <= 0xB6B7 || // Lo  [27] HANGUL SYLLABLE DDUG..HANGUL SYLLABLE DDUH\n\t\t\t0xB6B9 <= code && code <= 0xB6D3 || // Lo  [27] HANGUL SYLLABLE DDWEOG..HANGUL SYLLABLE DDWEOH\n\t\t\t0xB6D5 <= code && code <= 0xB6EF || // Lo  [27] HANGUL SYLLABLE DDWEG..HANGUL SYLLABLE DDWEH\n\t\t\t0xB6F1 <= code && code <= 0xB70B || // Lo  [27] HANGUL SYLLABLE DDWIG..HANGUL SYLLABLE DDWIH\n\t\t\t0xB70D <= code && code <= 0xB727 || // Lo  [27] HANGUL SYLLABLE DDYUG..HANGUL SYLLABLE DDYUH\n\t\t\t0xB729 <= code && code <= 0xB743 || // Lo  [27] HANGUL SYLLABLE DDEUG..HANGUL SYLLABLE DDEUH\n\t\t\t0xB745 <= code && code <= 0xB75F || // Lo  [27] HANGUL SYLLABLE DDYIG..HANGUL SYLLABLE DDYIH\n\t\t\t0xB761 <= code && code <= 0xB77B || // Lo  [27] HANGUL SYLLABLE DDIG..HANGUL SYLLABLE DDIH\n\t\t\t0xB77D <= code && code <= 0xB797 || // Lo  [27] HANGUL SYLLABLE RAG..HANGUL SYLLABLE RAH\n\t\t\t0xB799 <= code && code <= 0xB7B3 || // Lo  [27] HANGUL SYLLABLE RAEG..HANGUL SYLLABLE RAEH\n\t\t\t0xB7B5 <= code && code <= 0xB7CF || // Lo  [27] HANGUL SYLLABLE RYAG..HANGUL SYLLABLE RYAH\n\t\t\t0xB7D1 <= code && code <= 0xB7EB || // Lo  [27] HANGUL SYLLABLE RYAEG..HANGUL SYLLABLE RYAEH\n\t\t\t0xB7ED <= code && code <= 0xB807 || // Lo  [27] HANGUL SYLLABLE REOG..HANGUL SYLLABLE REOH\n\t\t\t0xB809 <= code && code <= 0xB823 || // Lo  [27] HANGUL SYLLABLE REG..HANGUL SYLLABLE REH\n\t\t\t0xB825 <= code && code <= 0xB83F || // Lo  [27] HANGUL SYLLABLE RYEOG..HANGUL SYLLABLE RYEOH\n\t\t\t0xB841 <= code && code <= 0xB85B || // Lo  [27] HANGUL SYLLABLE RYEG..HANGUL SYLLABLE RYEH\n\t\t\t0xB85D <= code && code <= 0xB877 || // Lo  [27] HANGUL SYLLABLE ROG..HANGUL SYLLABLE ROH\n\t\t\t0xB879 <= code && code <= 0xB893 || // Lo  [27] HANGUL SYLLABLE RWAG..HANGUL SYLLABLE RWAH\n\t\t\t0xB895 <= code && code <= 0xB8AF || // Lo  [27] HANGUL SYLLABLE RWAEG..HANGUL SYLLABLE RWAEH\n\t\t\t0xB8B1 <= code && code <= 0xB8CB || // Lo  [27] HANGUL SYLLABLE ROEG..HANGUL SYLLABLE ROEH\n\t\t\t0xB8CD <= code && code <= 0xB8E7 || // Lo  [27] HANGUL SYLLABLE RYOG..HANGUL SYLLABLE RYOH\n\t\t\t0xB8E9 <= code && code <= 0xB903 || // Lo  [27] HANGUL SYLLABLE RUG..HANGUL SYLLABLE RUH\n\t\t\t0xB905 <= code && code <= 0xB91F || // Lo  [27] HANGUL SYLLABLE RWEOG..HANGUL SYLLABLE RWEOH\n\t\t\t0xB921 <= code && code <= 0xB93B || // Lo  [27] HANGUL SYLLABLE RWEG..HANGUL SYLLABLE RWEH\n\t\t\t0xB93D <= code && code <= 0xB957 || // Lo  [27] HANGUL SYLLABLE RWIG..HANGUL SYLLABLE RWIH\n\t\t\t0xB959 <= code && code <= 0xB973 || // Lo  [27] HANGUL SYLLABLE RYUG..HANGUL SYLLABLE RYUH\n\t\t\t0xB975 <= code && code <= 0xB98F || // Lo  [27] HANGUL SYLLABLE REUG..HANGUL SYLLABLE REUH\n\t\t\t0xB991 <= code && code <= 0xB9AB || // Lo  [27] HANGUL SYLLABLE RYIG..HANGUL SYLLABLE RYIH\n\t\t\t0xB9AD <= code && code <= 0xB9C7 || // Lo  [27] HANGUL SYLLABLE RIG..HANGUL SYLLABLE RIH\n\t\t\t0xB9C9 <= code && code <= 0xB9E3 || // Lo  [27] HANGUL SYLLABLE MAG..HANGUL SYLLABLE MAH\n\t\t\t0xB9E5 <= code && code <= 0xB9FF || // Lo  [27] HANGUL SYLLABLE MAEG..HANGUL SYLLABLE MAEH\n\t\t\t0xBA01 <= code && code <= 0xBA1B || // Lo  [27] HANGUL SYLLABLE MYAG..HANGUL SYLLABLE MYAH\n\t\t\t0xBA1D <= code && code <= 0xBA37 || // Lo  [27] HANGUL SYLLABLE MYAEG..HANGUL SYLLABLE MYAEH\n\t\t\t0xBA39 <= code && code <= 0xBA53 || // Lo  [27] HANGUL SYLLABLE MEOG..HANGUL SYLLABLE MEOH\n\t\t\t0xBA55 <= code && code <= 0xBA6F || // Lo  [27] HANGUL SYLLABLE MEG..HANGUL SYLLABLE MEH\n\t\t\t0xBA71 <= code && code <= 0xBA8B || // Lo  [27] HANGUL SYLLABLE MYEOG..HANGUL SYLLABLE MYEOH\n\t\t\t0xBA8D <= code && code <= 0xBAA7 || // Lo  [27] HANGUL SYLLABLE MYEG..HANGUL SYLLABLE MYEH\n\t\t\t0xBAA9 <= code && code <= 0xBAC3 || // Lo  [27] HANGUL SYLLABLE MOG..HANGUL SYLLABLE MOH\n\t\t\t0xBAC5 <= code && code <= 0xBADF || // Lo  [27] HANGUL SYLLABLE MWAG..HANGUL SYLLABLE MWAH\n\t\t\t0xBAE1 <= code && code <= 0xBAFB || // Lo  [27] HANGUL SYLLABLE MWAEG..HANGUL SYLLABLE MWAEH\n\t\t\t0xBAFD <= code && code <= 0xBB17 || // Lo  [27] HANGUL SYLLABLE MOEG..HANGUL SYLLABLE MOEH\n\t\t\t0xBB19 <= code && code <= 0xBB33 || // Lo  [27] HANGUL SYLLABLE MYOG..HANGUL SYLLABLE MYOH\n\t\t\t0xBB35 <= code && code <= 0xBB4F || // Lo  [27] HANGUL SYLLABLE MUG..HANGUL SYLLABLE MUH\n\t\t\t0xBB51 <= code && code <= 0xBB6B || // Lo  [27] HANGUL SYLLABLE MWEOG..HANGUL SYLLABLE MWEOH\n\t\t\t0xBB6D <= code && code <= 0xBB87 || // Lo  [27] HANGUL SYLLABLE MWEG..HANGUL SYLLABLE MWEH\n\t\t\t0xBB89 <= code && code <= 0xBBA3 || // Lo  [27] HANGUL SYLLABLE MWIG..HANGUL SYLLABLE MWIH\n\t\t\t0xBBA5 <= code && code <= 0xBBBF || // Lo  [27] HANGUL SYLLABLE MYUG..HANGUL SYLLABLE MYUH\n\t\t\t0xBBC1 <= code && code <= 0xBBDB || // Lo  [27] HANGUL SYLLABLE MEUG..HANGUL SYLLABLE MEUH\n\t\t\t0xBBDD <= code && code <= 0xBBF7 || // Lo  [27] HANGUL SYLLABLE MYIG..HANGUL SYLLABLE MYIH\n\t\t\t0xBBF9 <= code && code <= 0xBC13 || // Lo  [27] HANGUL SYLLABLE MIG..HANGUL SYLLABLE MIH\n\t\t\t0xBC15 <= code && code <= 0xBC2F || // Lo  [27] HANGUL SYLLABLE BAG..HANGUL SYLLABLE BAH\n\t\t\t0xBC31 <= code && code <= 0xBC4B || // Lo  [27] HANGUL SYLLABLE BAEG..HANGUL SYLLABLE BAEH\n\t\t\t0xBC4D <= code && code <= 0xBC67 || // Lo  [27] HANGUL SYLLABLE BYAG..HANGUL SYLLABLE BYAH\n\t\t\t0xBC69 <= code && code <= 0xBC83 || // Lo  [27] HANGUL SYLLABLE BYAEG..HANGUL SYLLABLE BYAEH\n\t\t\t0xBC85 <= code && code <= 0xBC9F || // Lo  [27] HANGUL SYLLABLE BEOG..HANGUL SYLLABLE BEOH\n\t\t\t0xBCA1 <= code && code <= 0xBCBB || // Lo  [27] HANGUL SYLLABLE BEG..HANGUL SYLLABLE BEH\n\t\t\t0xBCBD <= code && code <= 0xBCD7 || // Lo  [27] HANGUL SYLLABLE BYEOG..HANGUL SYLLABLE BYEOH\n\t\t\t0xBCD9 <= code && code <= 0xBCF3 || // Lo  [27] HANGUL SYLLABLE BYEG..HANGUL SYLLABLE BYEH\n\t\t\t0xBCF5 <= code && code <= 0xBD0F || // Lo  [27] HANGUL SYLLABLE BOG..HANGUL SYLLABLE BOH\n\t\t\t0xBD11 <= code && code <= 0xBD2B || // Lo  [27] HANGUL SYLLABLE BWAG..HANGUL SYLLABLE BWAH\n\t\t\t0xBD2D <= code && code <= 0xBD47 || // Lo  [27] HANGUL SYLLABLE BWAEG..HANGUL SYLLABLE BWAEH\n\t\t\t0xBD49 <= code && code <= 0xBD63 || // Lo  [27] HANGUL SYLLABLE BOEG..HANGUL SYLLABLE BOEH\n\t\t\t0xBD65 <= code && code <= 0xBD7F || // Lo  [27] HANGUL SYLLABLE BYOG..HANGUL SYLLABLE BYOH\n\t\t\t0xBD81 <= code && code <= 0xBD9B || // Lo  [27] HANGUL SYLLABLE BUG..HANGUL SYLLABLE BUH\n\t\t\t0xBD9D <= code && code <= 0xBDB7 || // Lo  [27] HANGUL SYLLABLE BWEOG..HANGUL SYLLABLE BWEOH\n\t\t\t0xBDB9 <= code && code <= 0xBDD3 || // Lo  [27] HANGUL SYLLABLE BWEG..HANGUL SYLLABLE BWEH\n\t\t\t0xBDD5 <= code && code <= 0xBDEF || // Lo  [27] HANGUL SYLLABLE BWIG..HANGUL SYLLABLE BWIH\n\t\t\t0xBDF1 <= code && code <= 0xBE0B || // Lo  [27] HANGUL SYLLABLE BYUG..HANGUL SYLLABLE BYUH\n\t\t\t0xBE0D <= code && code <= 0xBE27 || // Lo  [27] HANGUL SYLLABLE BEUG..HANGUL SYLLABLE BEUH\n\t\t\t0xBE29 <= code && code <= 0xBE43 || // Lo  [27] HANGUL SYLLABLE BYIG..HANGUL SYLLABLE BYIH\n\t\t\t0xBE45 <= code && code <= 0xBE5F || // Lo  [27] HANGUL SYLLABLE BIG..HANGUL SYLLABLE BIH\n\t\t\t0xBE61 <= code && code <= 0xBE7B || // Lo  [27] HANGUL SYLLABLE BBAG..HANGUL SYLLABLE BBAH\n\t\t\t0xBE7D <= code && code <= 0xBE97 || // Lo  [27] HANGUL SYLLABLE BBAEG..HANGUL SYLLABLE BBAEH\n\t\t\t0xBE99 <= code && code <= 0xBEB3 || // Lo  [27] HANGUL SYLLABLE BBYAG..HANGUL SYLLABLE BBYAH\n\t\t\t0xBEB5 <= code && code <= 0xBECF || // Lo  [27] HANGUL SYLLABLE BBYAEG..HANGUL SYLLABLE BBYAEH\n\t\t\t0xBED1 <= code && code <= 0xBEEB || // Lo  [27] HANGUL SYLLABLE BBEOG..HANGUL SYLLABLE BBEOH\n\t\t\t0xBEED <= code && code <= 0xBF07 || // Lo  [27] HANGUL SYLLABLE BBEG..HANGUL SYLLABLE BBEH\n\t\t\t0xBF09 <= code && code <= 0xBF23 || // Lo  [27] HANGUL SYLLABLE BBYEOG..HANGUL SYLLABLE BBYEOH\n\t\t\t0xBF25 <= code && code <= 0xBF3F || // Lo  [27] HANGUL SYLLABLE BBYEG..HANGUL SYLLABLE BBYEH\n\t\t\t0xBF41 <= code && code <= 0xBF5B || // Lo  [27] HANGUL SYLLABLE BBOG..HANGUL SYLLABLE BBOH\n\t\t\t0xBF5D <= code && code <= 0xBF77 || // Lo  [27] HANGUL SYLLABLE BBWAG..HANGUL SYLLABLE BBWAH\n\t\t\t0xBF79 <= code && code <= 0xBF93 || // Lo  [27] HANGUL SYLLABLE BBWAEG..HANGUL SYLLABLE BBWAEH\n\t\t\t0xBF95 <= code && code <= 0xBFAF || // Lo  [27] HANGUL SYLLABLE BBOEG..HANGUL SYLLABLE BBOEH\n\t\t\t0xBFB1 <= code && code <= 0xBFCB || // Lo  [27] HANGUL SYLLABLE BBYOG..HANGUL SYLLABLE BBYOH\n\t\t\t0xBFCD <= code && code <= 0xBFE7 || // Lo  [27] HANGUL SYLLABLE BBUG..HANGUL SYLLABLE BBUH\n\t\t\t0xBFE9 <= code && code <= 0xC003 || // Lo  [27] HANGUL SYLLABLE BBWEOG..HANGUL SYLLABLE BBWEOH\n\t\t\t0xC005 <= code && code <= 0xC01F || // Lo  [27] HANGUL SYLLABLE BBWEG..HANGUL SYLLABLE BBWEH\n\t\t\t0xC021 <= code && code <= 0xC03B || // Lo  [27] HANGUL SYLLABLE BBWIG..HANGUL SYLLABLE BBWIH\n\t\t\t0xC03D <= code && code <= 0xC057 || // Lo  [27] HANGUL SYLLABLE BBYUG..HANGUL SYLLABLE BBYUH\n\t\t\t0xC059 <= code && code <= 0xC073 || // Lo  [27] HANGUL SYLLABLE BBEUG..HANGUL SYLLABLE BBEUH\n\t\t\t0xC075 <= code && code <= 0xC08F || // Lo  [27] HANGUL SYLLABLE BBYIG..HANGUL SYLLABLE BBYIH\n\t\t\t0xC091 <= code && code <= 0xC0AB || // Lo  [27] HANGUL SYLLABLE BBIG..HANGUL SYLLABLE BBIH\n\t\t\t0xC0AD <= code && code <= 0xC0C7 || // Lo  [27] HANGUL SYLLABLE SAG..HANGUL SYLLABLE SAH\n\t\t\t0xC0C9 <= code && code <= 0xC0E3 || // Lo  [27] HANGUL SYLLABLE SAEG..HANGUL SYLLABLE SAEH\n\t\t\t0xC0E5 <= code && code <= 0xC0FF || // Lo  [27] HANGUL SYLLABLE SYAG..HANGUL SYLLABLE SYAH\n\t\t\t0xC101 <= code && code <= 0xC11B || // Lo  [27] HANGUL SYLLABLE SYAEG..HANGUL SYLLABLE SYAEH\n\t\t\t0xC11D <= code && code <= 0xC137 || // Lo  [27] HANGUL SYLLABLE SEOG..HANGUL SYLLABLE SEOH\n\t\t\t0xC139 <= code && code <= 0xC153 || // Lo  [27] HANGUL SYLLABLE SEG..HANGUL SYLLABLE SEH\n\t\t\t0xC155 <= code && code <= 0xC16F || // Lo  [27] HANGUL SYLLABLE SYEOG..HANGUL SYLLABLE SYEOH\n\t\t\t0xC171 <= code && code <= 0xC18B || // Lo  [27] HANGUL SYLLABLE SYEG..HANGUL SYLLABLE SYEH\n\t\t\t0xC18D <= code && code <= 0xC1A7 || // Lo  [27] HANGUL SYLLABLE SOG..HANGUL SYLLABLE SOH\n\t\t\t0xC1A9 <= code && code <= 0xC1C3 || // Lo  [27] HANGUL SYLLABLE SWAG..HANGUL SYLLABLE SWAH\n\t\t\t0xC1C5 <= code && code <= 0xC1DF || // Lo  [27] HANGUL SYLLABLE SWAEG..HANGUL SYLLABLE SWAEH\n\t\t\t0xC1E1 <= code && code <= 0xC1FB || // Lo  [27] HANGUL SYLLABLE SOEG..HANGUL SYLLABLE SOEH\n\t\t\t0xC1FD <= code && code <= 0xC217 || // Lo  [27] HANGUL SYLLABLE SYOG..HANGUL SYLLABLE SYOH\n\t\t\t0xC219 <= code && code <= 0xC233 || // Lo  [27] HANGUL SYLLABLE SUG..HANGUL SYLLABLE SUH\n\t\t\t0xC235 <= code && code <= 0xC24F || // Lo  [27] HANGUL SYLLABLE SWEOG..HANGUL SYLLABLE SWEOH\n\t\t\t0xC251 <= code && code <= 0xC26B || // Lo  [27] HANGUL SYLLABLE SWEG..HANGUL SYLLABLE SWEH\n\t\t\t0xC26D <= code && code <= 0xC287 || // Lo  [27] HANGUL SYLLABLE SWIG..HANGUL SYLLABLE SWIH\n\t\t\t0xC289 <= code && code <= 0xC2A3 || // Lo  [27] HANGUL SYLLABLE SYUG..HANGUL SYLLABLE SYUH\n\t\t\t0xC2A5 <= code && code <= 0xC2BF || // Lo  [27] HANGUL SYLLABLE SEUG..HANGUL SYLLABLE SEUH\n\t\t\t0xC2C1 <= code && code <= 0xC2DB || // Lo  [27] HANGUL SYLLABLE SYIG..HANGUL SYLLABLE SYIH\n\t\t\t0xC2DD <= code && code <= 0xC2F7 || // Lo  [27] HANGUL SYLLABLE SIG..HANGUL SYLLABLE SIH\n\t\t\t0xC2F9 <= code && code <= 0xC313 || // Lo  [27] HANGUL SYLLABLE SSAG..HANGUL SYLLABLE SSAH\n\t\t\t0xC315 <= code && code <= 0xC32F || // Lo  [27] HANGUL SYLLABLE SSAEG..HANGUL SYLLABLE SSAEH\n\t\t\t0xC331 <= code && code <= 0xC34B || // Lo  [27] HANGUL SYLLABLE SSYAG..HANGUL SYLLABLE SSYAH\n\t\t\t0xC34D <= code && code <= 0xC367 || // Lo  [27] HANGUL SYLLABLE SSYAEG..HANGUL SYLLABLE SSYAEH\n\t\t\t0xC369 <= code && code <= 0xC383 || // Lo  [27] HANGUL SYLLABLE SSEOG..HANGUL SYLLABLE SSEOH\n\t\t\t0xC385 <= code && code <= 0xC39F || // Lo  [27] HANGUL SYLLABLE SSEG..HANGUL SYLLABLE SSEH\n\t\t\t0xC3A1 <= code && code <= 0xC3BB || // Lo  [27] HANGUL SYLLABLE SSYEOG..HANGUL SYLLABLE SSYEOH\n\t\t\t0xC3BD <= code && code <= 0xC3D7 || // Lo  [27] HANGUL SYLLABLE SSYEG..HANGUL SYLLABLE SSYEH\n\t\t\t0xC3D9 <= code && code <= 0xC3F3 || // Lo  [27] HANGUL SYLLABLE SSOG..HANGUL SYLLABLE SSOH\n\t\t\t0xC3F5 <= code && code <= 0xC40F || // Lo  [27] HANGUL SYLLABLE SSWAG..HANGUL SYLLABLE SSWAH\n\t\t\t0xC411 <= code && code <= 0xC42B || // Lo  [27] HANGUL SYLLABLE SSWAEG..HANGUL SYLLABLE SSWAEH\n\t\t\t0xC42D <= code && code <= 0xC447 || // Lo  [27] HANGUL SYLLABLE SSOEG..HANGUL SYLLABLE SSOEH\n\t\t\t0xC449 <= code && code <= 0xC463 || // Lo  [27] HANGUL SYLLABLE SSYOG..HANGUL SYLLABLE SSYOH\n\t\t\t0xC465 <= code && code <= 0xC47F || // Lo  [27] HANGUL SYLLABLE SSUG..HANGUL SYLLABLE SSUH\n\t\t\t0xC481 <= code && code <= 0xC49B || // Lo  [27] HANGUL SYLLABLE SSWEOG..HANGUL SYLLABLE SSWEOH\n\t\t\t0xC49D <= code && code <= 0xC4B7 || // Lo  [27] HANGUL SYLLABLE SSWEG..HANGUL SYLLABLE SSWEH\n\t\t\t0xC4B9 <= code && code <= 0xC4D3 || // Lo  [27] HANGUL SYLLABLE SSWIG..HANGUL SYLLABLE SSWIH\n\t\t\t0xC4D5 <= code && code <= 0xC4EF || // Lo  [27] HANGUL SYLLABLE SSYUG..HANGUL SYLLABLE SSYUH\n\t\t\t0xC4F1 <= code && code <= 0xC50B || // Lo  [27] HANGUL SYLLABLE SSEUG..HANGUL SYLLABLE SSEUH\n\t\t\t0xC50D <= code && code <= 0xC527 || // Lo  [27] HANGUL SYLLABLE SSYIG..HANGUL SYLLABLE SSYIH\n\t\t\t0xC529 <= code && code <= 0xC543 || // Lo  [27] HANGUL SYLLABLE SSIG..HANGUL SYLLABLE SSIH\n\t\t\t0xC545 <= code && code <= 0xC55F || // Lo  [27] HANGUL SYLLABLE AG..HANGUL SYLLABLE AH\n\t\t\t0xC561 <= code && code <= 0xC57B || // Lo  [27] HANGUL SYLLABLE AEG..HANGUL SYLLABLE AEH\n\t\t\t0xC57D <= code && code <= 0xC597 || // Lo  [27] HANGUL SYLLABLE YAG..HANGUL SYLLABLE YAH\n\t\t\t0xC599 <= code && code <= 0xC5B3 || // Lo  [27] HANGUL SYLLABLE YAEG..HANGUL SYLLABLE YAEH\n\t\t\t0xC5B5 <= code && code <= 0xC5CF || // Lo  [27] HANGUL SYLLABLE EOG..HANGUL SYLLABLE EOH\n\t\t\t0xC5D1 <= code && code <= 0xC5EB || // Lo  [27] HANGUL SYLLABLE EG..HANGUL SYLLABLE EH\n\t\t\t0xC5ED <= code && code <= 0xC607 || // Lo  [27] HANGUL SYLLABLE YEOG..HANGUL SYLLABLE YEOH\n\t\t\t0xC609 <= code && code <= 0xC623 || // Lo  [27] HANGUL SYLLABLE YEG..HANGUL SYLLABLE YEH\n\t\t\t0xC625 <= code && code <= 0xC63F || // Lo  [27] HANGUL SYLLABLE OG..HANGUL SYLLABLE OH\n\t\t\t0xC641 <= code && code <= 0xC65B || // Lo  [27] HANGUL SYLLABLE WAG..HANGUL SYLLABLE WAH\n\t\t\t0xC65D <= code && code <= 0xC677 || // Lo  [27] HANGUL SYLLABLE WAEG..HANGUL SYLLABLE WAEH\n\t\t\t0xC679 <= code && code <= 0xC693 || // Lo  [27] HANGUL SYLLABLE OEG..HANGUL SYLLABLE OEH\n\t\t\t0xC695 <= code && code <= 0xC6AF || // Lo  [27] HANGUL SYLLABLE YOG..HANGUL SYLLABLE YOH\n\t\t\t0xC6B1 <= code && code <= 0xC6CB || // Lo  [27] HANGUL SYLLABLE UG..HANGUL SYLLABLE UH\n\t\t\t0xC6CD <= code && code <= 0xC6E7 || // Lo  [27] HANGUL SYLLABLE WEOG..HANGUL SYLLABLE WEOH\n\t\t\t0xC6E9 <= code && code <= 0xC703 || // Lo  [27] HANGUL SYLLABLE WEG..HANGUL SYLLABLE WEH\n\t\t\t0xC705 <= code && code <= 0xC71F || // Lo  [27] HANGUL SYLLABLE WIG..HANGUL SYLLABLE WIH\n\t\t\t0xC721 <= code && code <= 0xC73B || // Lo  [27] HANGUL SYLLABLE YUG..HANGUL SYLLABLE YUH\n\t\t\t0xC73D <= code && code <= 0xC757 || // Lo  [27] HANGUL SYLLABLE EUG..HANGUL SYLLABLE EUH\n\t\t\t0xC759 <= code && code <= 0xC773 || // Lo  [27] HANGUL SYLLABLE YIG..HANGUL SYLLABLE YIH\n\t\t\t0xC775 <= code && code <= 0xC78F || // Lo  [27] HANGUL SYLLABLE IG..HANGUL SYLLABLE IH\n\t\t\t0xC791 <= code && code <= 0xC7AB || // Lo  [27] HANGUL SYLLABLE JAG..HANGUL SYLLABLE JAH\n\t\t\t0xC7AD <= code && code <= 0xC7C7 || // Lo  [27] HANGUL SYLLABLE JAEG..HANGUL SYLLABLE JAEH\n\t\t\t0xC7C9 <= code && code <= 0xC7E3 || // Lo  [27] HANGUL SYLLABLE JYAG..HANGUL SYLLABLE JYAH\n\t\t\t0xC7E5 <= code && code <= 0xC7FF || // Lo  [27] HANGUL SYLLABLE JYAEG..HANGUL SYLLABLE JYAEH\n\t\t\t0xC801 <= code && code <= 0xC81B || // Lo  [27] HANGUL SYLLABLE JEOG..HANGUL SYLLABLE JEOH\n\t\t\t0xC81D <= code && code <= 0xC837 || // Lo  [27] HANGUL SYLLABLE JEG..HANGUL SYLLABLE JEH\n\t\t\t0xC839 <= code && code <= 0xC853 || // Lo  [27] HANGUL SYLLABLE JYEOG..HANGUL SYLLABLE JYEOH\n\t\t\t0xC855 <= code && code <= 0xC86F || // Lo  [27] HANGUL SYLLABLE JYEG..HANGUL SYLLABLE JYEH\n\t\t\t0xC871 <= code && code <= 0xC88B || // Lo  [27] HANGUL SYLLABLE JOG..HANGUL SYLLABLE JOH\n\t\t\t0xC88D <= code && code <= 0xC8A7 || // Lo  [27] HANGUL SYLLABLE JWAG..HANGUL SYLLABLE JWAH\n\t\t\t0xC8A9 <= code && code <= 0xC8C3 || // Lo  [27] HANGUL SYLLABLE JWAEG..HANGUL SYLLABLE JWAEH\n\t\t\t0xC8C5 <= code && code <= 0xC8DF || // Lo  [27] HANGUL SYLLABLE JOEG..HANGUL SYLLABLE JOEH\n\t\t\t0xC8E1 <= code && code <= 0xC8FB || // Lo  [27] HANGUL SYLLABLE JYOG..HANGUL SYLLABLE JYOH\n\t\t\t0xC8FD <= code && code <= 0xC917 || // Lo  [27] HANGUL SYLLABLE JUG..HANGUL SYLLABLE JUH\n\t\t\t0xC919 <= code && code <= 0xC933 || // Lo  [27] HANGUL SYLLABLE JWEOG..HANGUL SYLLABLE JWEOH\n\t\t\t0xC935 <= code && code <= 0xC94F || // Lo  [27] HANGUL SYLLABLE JWEG..HANGUL SYLLABLE JWEH\n\t\t\t0xC951 <= code && code <= 0xC96B || // Lo  [27] HANGUL SYLLABLE JWIG..HANGUL SYLLABLE JWIH\n\t\t\t0xC96D <= code && code <= 0xC987 || // Lo  [27] HANGUL SYLLABLE JYUG..HANGUL SYLLABLE JYUH\n\t\t\t0xC989 <= code && code <= 0xC9A3 || // Lo  [27] HANGUL SYLLABLE JEUG..HANGUL SYLLABLE JEUH\n\t\t\t0xC9A5 <= code && code <= 0xC9BF || // Lo  [27] HANGUL SYLLABLE JYIG..HANGUL SYLLABLE JYIH\n\t\t\t0xC9C1 <= code && code <= 0xC9DB || // Lo  [27] HANGUL SYLLABLE JIG..HANGUL SYLLABLE JIH\n\t\t\t0xC9DD <= code && code <= 0xC9F7 || // Lo  [27] HANGUL SYLLABLE JJAG..HANGUL SYLLABLE JJAH\n\t\t\t0xC9F9 <= code && code <= 0xCA13 || // Lo  [27] HANGUL SYLLABLE JJAEG..HANGUL SYLLABLE JJAEH\n\t\t\t0xCA15 <= code && code <= 0xCA2F || // Lo  [27] HANGUL SYLLABLE JJYAG..HANGUL SYLLABLE JJYAH\n\t\t\t0xCA31 <= code && code <= 0xCA4B || // Lo  [27] HANGUL SYLLABLE JJYAEG..HANGUL SYLLABLE JJYAEH\n\t\t\t0xCA4D <= code && code <= 0xCA67 || // Lo  [27] HANGUL SYLLABLE JJEOG..HANGUL SYLLABLE JJEOH\n\t\t\t0xCA69 <= code && code <= 0xCA83 || // Lo  [27] HANGUL SYLLABLE JJEG..HANGUL SYLLABLE JJEH\n\t\t\t0xCA85 <= code && code <= 0xCA9F || // Lo  [27] HANGUL SYLLABLE JJYEOG..HANGUL SYLLABLE JJYEOH\n\t\t\t0xCAA1 <= code && code <= 0xCABB || // Lo  [27] HANGUL SYLLABLE JJYEG..HANGUL SYLLABLE JJYEH\n\t\t\t0xCABD <= code && code <= 0xCAD7 || // Lo  [27] HANGUL SYLLABLE JJOG..HANGUL SYLLABLE JJOH\n\t\t\t0xCAD9 <= code && code <= 0xCAF3 || // Lo  [27] HANGUL SYLLABLE JJWAG..HANGUL SYLLABLE JJWAH\n\t\t\t0xCAF5 <= code && code <= 0xCB0F || // Lo  [27] HANGUL SYLLABLE JJWAEG..HANGUL SYLLABLE JJWAEH\n\t\t\t0xCB11 <= code && code <= 0xCB2B || // Lo  [27] HANGUL SYLLABLE JJOEG..HANGUL SYLLABLE JJOEH\n\t\t\t0xCB2D <= code && code <= 0xCB47 || // Lo  [27] HANGUL SYLLABLE JJYOG..HANGUL SYLLABLE JJYOH\n\t\t\t0xCB49 <= code && code <= 0xCB63 || // Lo  [27] HANGUL SYLLABLE JJUG..HANGUL SYLLABLE JJUH\n\t\t\t0xCB65 <= code && code <= 0xCB7F || // Lo  [27] HANGUL SYLLABLE JJWEOG..HANGUL SYLLABLE JJWEOH\n\t\t\t0xCB81 <= code && code <= 0xCB9B || // Lo  [27] HANGUL SYLLABLE JJWEG..HANGUL SYLLABLE JJWEH\n\t\t\t0xCB9D <= code && code <= 0xCBB7 || // Lo  [27] HANGUL SYLLABLE JJWIG..HANGUL SYLLABLE JJWIH\n\t\t\t0xCBB9 <= code && code <= 0xCBD3 || // Lo  [27] HANGUL SYLLABLE JJYUG..HANGUL SYLLABLE JJYUH\n\t\t\t0xCBD5 <= code && code <= 0xCBEF || // Lo  [27] HANGUL SYLLABLE JJEUG..HANGUL SYLLABLE JJEUH\n\t\t\t0xCBF1 <= code && code <= 0xCC0B || // Lo  [27] HANGUL SYLLABLE JJYIG..HANGUL SYLLABLE JJYIH\n\t\t\t0xCC0D <= code && code <= 0xCC27 || // Lo  [27] HANGUL SYLLABLE JJIG..HANGUL SYLLABLE JJIH\n\t\t\t0xCC29 <= code && code <= 0xCC43 || // Lo  [27] HANGUL SYLLABLE CAG..HANGUL SYLLABLE CAH\n\t\t\t0xCC45 <= code && code <= 0xCC5F || // Lo  [27] HANGUL SYLLABLE CAEG..HANGUL SYLLABLE CAEH\n\t\t\t0xCC61 <= code && code <= 0xCC7B || // Lo  [27] HANGUL SYLLABLE CYAG..HANGUL SYLLABLE CYAH\n\t\t\t0xCC7D <= code && code <= 0xCC97 || // Lo  [27] HANGUL SYLLABLE CYAEG..HANGUL SYLLABLE CYAEH\n\t\t\t0xCC99 <= code && code <= 0xCCB3 || // Lo  [27] HANGUL SYLLABLE CEOG..HANGUL SYLLABLE CEOH\n\t\t\t0xCCB5 <= code && code <= 0xCCCF || // Lo  [27] HANGUL SYLLABLE CEG..HANGUL SYLLABLE CEH\n\t\t\t0xCCD1 <= code && code <= 0xCCEB || // Lo  [27] HANGUL SYLLABLE CYEOG..HANGUL SYLLABLE CYEOH\n\t\t\t0xCCED <= code && code <= 0xCD07 || // Lo  [27] HANGUL SYLLABLE CYEG..HANGUL SYLLABLE CYEH\n\t\t\t0xCD09 <= code && code <= 0xCD23 || // Lo  [27] HANGUL SYLLABLE COG..HANGUL SYLLABLE COH\n\t\t\t0xCD25 <= code && code <= 0xCD3F || // Lo  [27] HANGUL SYLLABLE CWAG..HANGUL SYLLABLE CWAH\n\t\t\t0xCD41 <= code && code <= 0xCD5B || // Lo  [27] HANGUL SYLLABLE CWAEG..HANGUL SYLLABLE CWAEH\n\t\t\t0xCD5D <= code && code <= 0xCD77 || // Lo  [27] HANGUL SYLLABLE COEG..HANGUL SYLLABLE COEH\n\t\t\t0xCD79 <= code && code <= 0xCD93 || // Lo  [27] HANGUL SYLLABLE CYOG..HANGUL SYLLABLE CYOH\n\t\t\t0xCD95 <= code && code <= 0xCDAF || // Lo  [27] HANGUL SYLLABLE CUG..HANGUL SYLLABLE CUH\n\t\t\t0xCDB1 <= code && code <= 0xCDCB || // Lo  [27] HANGUL SYLLABLE CWEOG..HANGUL SYLLABLE CWEOH\n\t\t\t0xCDCD <= code && code <= 0xCDE7 || // Lo  [27] HANGUL SYLLABLE CWEG..HANGUL SYLLABLE CWEH\n\t\t\t0xCDE9 <= code && code <= 0xCE03 || // Lo  [27] HANGUL SYLLABLE CWIG..HANGUL SYLLABLE CWIH\n\t\t\t0xCE05 <= code && code <= 0xCE1F || // Lo  [27] HANGUL SYLLABLE CYUG..HANGUL SYLLABLE CYUH\n\t\t\t0xCE21 <= code && code <= 0xCE3B || // Lo  [27] HANGUL SYLLABLE CEUG..HANGUL SYLLABLE CEUH\n\t\t\t0xCE3D <= code && code <= 0xCE57 || // Lo  [27] HANGUL SYLLABLE CYIG..HANGUL SYLLABLE CYIH\n\t\t\t0xCE59 <= code && code <= 0xCE73 || // Lo  [27] HANGUL SYLLABLE CIG..HANGUL SYLLABLE CIH\n\t\t\t0xCE75 <= code && code <= 0xCE8F || // Lo  [27] HANGUL SYLLABLE KAG..HANGUL SYLLABLE KAH\n\t\t\t0xCE91 <= code && code <= 0xCEAB || // Lo  [27] HANGUL SYLLABLE KAEG..HANGUL SYLLABLE KAEH\n\t\t\t0xCEAD <= code && code <= 0xCEC7 || // Lo  [27] HANGUL SYLLABLE KYAG..HANGUL SYLLABLE KYAH\n\t\t\t0xCEC9 <= code && code <= 0xCEE3 || // Lo  [27] HANGUL SYLLABLE KYAEG..HANGUL SYLLABLE KYAEH\n\t\t\t0xCEE5 <= code && code <= 0xCEFF || // Lo  [27] HANGUL SYLLABLE KEOG..HANGUL SYLLABLE KEOH\n\t\t\t0xCF01 <= code && code <= 0xCF1B || // Lo  [27] HANGUL SYLLABLE KEG..HANGUL SYLLABLE KEH\n\t\t\t0xCF1D <= code && code <= 0xCF37 || // Lo  [27] HANGUL SYLLABLE KYEOG..HANGUL SYLLABLE KYEOH\n\t\t\t0xCF39 <= code && code <= 0xCF53 || // Lo  [27] HANGUL SYLLABLE KYEG..HANGUL SYLLABLE KYEH\n\t\t\t0xCF55 <= code && code <= 0xCF6F || // Lo  [27] HANGUL SYLLABLE KOG..HANGUL SYLLABLE KOH\n\t\t\t0xCF71 <= code && code <= 0xCF8B || // Lo  [27] HANGUL SYLLABLE KWAG..HANGUL SYLLABLE KWAH\n\t\t\t0xCF8D <= code && code <= 0xCFA7 || // Lo  [27] HANGUL SYLLABLE KWAEG..HANGUL SYLLABLE KWAEH\n\t\t\t0xCFA9 <= code && code <= 0xCFC3 || // Lo  [27] HANGUL SYLLABLE KOEG..HANGUL SYLLABLE KOEH\n\t\t\t0xCFC5 <= code && code <= 0xCFDF || // Lo  [27] HANGUL SYLLABLE KYOG..HANGUL SYLLABLE KYOH\n\t\t\t0xCFE1 <= code && code <= 0xCFFB || // Lo  [27] HANGUL SYLLABLE KUG..HANGUL SYLLABLE KUH\n\t\t\t0xCFFD <= code && code <= 0xD017 || // Lo  [27] HANGUL SYLLABLE KWEOG..HANGUL SYLLABLE KWEOH\n\t\t\t0xD019 <= code && code <= 0xD033 || // Lo  [27] HANGUL SYLLABLE KWEG..HANGUL SYLLABLE KWEH\n\t\t\t0xD035 <= code && code <= 0xD04F || // Lo  [27] HANGUL SYLLABLE KWIG..HANGUL SYLLABLE KWIH\n\t\t\t0xD051 <= code && code <= 0xD06B || // Lo  [27] HANGUL SYLLABLE KYUG..HANGUL SYLLABLE KYUH\n\t\t\t0xD06D <= code && code <= 0xD087 || // Lo  [27] HANGUL SYLLABLE KEUG..HANGUL SYLLABLE KEUH\n\t\t\t0xD089 <= code && code <= 0xD0A3 || // Lo  [27] HANGUL SYLLABLE KYIG..HANGUL SYLLABLE KYIH\n\t\t\t0xD0A5 <= code && code <= 0xD0BF || // Lo  [27] HANGUL SYLLABLE KIG..HANGUL SYLLABLE KIH\n\t\t\t0xD0C1 <= code && code <= 0xD0DB || // Lo  [27] HANGUL SYLLABLE TAG..HANGUL SYLLABLE TAH\n\t\t\t0xD0DD <= code && code <= 0xD0F7 || // Lo  [27] HANGUL SYLLABLE TAEG..HANGUL SYLLABLE TAEH\n\t\t\t0xD0F9 <= code && code <= 0xD113 || // Lo  [27] HANGUL SYLLABLE TYAG..HANGUL SYLLABLE TYAH\n\t\t\t0xD115 <= code && code <= 0xD12F || // Lo  [27] HANGUL SYLLABLE TYAEG..HANGUL SYLLABLE TYAEH\n\t\t\t0xD131 <= code && code <= 0xD14B || // Lo  [27] HANGUL SYLLABLE TEOG..HANGUL SYLLABLE TEOH\n\t\t\t0xD14D <= code && code <= 0xD167 || // Lo  [27] HANGUL SYLLABLE TEG..HANGUL SYLLABLE TEH\n\t\t\t0xD169 <= code && code <= 0xD183 || // Lo  [27] HANGUL SYLLABLE TYEOG..HANGUL SYLLABLE TYEOH\n\t\t\t0xD185 <= code && code <= 0xD19F || // Lo  [27] HANGUL SYLLABLE TYEG..HANGUL SYLLABLE TYEH\n\t\t\t0xD1A1 <= code && code <= 0xD1BB || // Lo  [27] HANGUL SYLLABLE TOG..HANGUL SYLLABLE TOH\n\t\t\t0xD1BD <= code && code <= 0xD1D7 || // Lo  [27] HANGUL SYLLABLE TWAG..HANGUL SYLLABLE TWAH\n\t\t\t0xD1D9 <= code && code <= 0xD1F3 || // Lo  [27] HANGUL SYLLABLE TWAEG..HANGUL SYLLABLE TWAEH\n\t\t\t0xD1F5 <= code && code <= 0xD20F || // Lo  [27] HANGUL SYLLABLE TOEG..HANGUL SYLLABLE TOEH\n\t\t\t0xD211 <= code && code <= 0xD22B || // Lo  [27] HANGUL SYLLABLE TYOG..HANGUL SYLLABLE TYOH\n\t\t\t0xD22D <= code && code <= 0xD247 || // Lo  [27] HANGUL SYLLABLE TUG..HANGUL SYLLABLE TUH\n\t\t\t0xD249 <= code && code <= 0xD263 || // Lo  [27] HANGUL SYLLABLE TWEOG..HANGUL SYLLABLE TWEOH\n\t\t\t0xD265 <= code && code <= 0xD27F || // Lo  [27] HANGUL SYLLABLE TWEG..HANGUL SYLLABLE TWEH\n\t\t\t0xD281 <= code && code <= 0xD29B || // Lo  [27] HANGUL SYLLABLE TWIG..HANGUL SYLLABLE TWIH\n\t\t\t0xD29D <= code && code <= 0xD2B7 || // Lo  [27] HANGUL SYLLABLE TYUG..HANGUL SYLLABLE TYUH\n\t\t\t0xD2B9 <= code && code <= 0xD2D3 || // Lo  [27] HANGUL SYLLABLE TEUG..HANGUL SYLLABLE TEUH\n\t\t\t0xD2D5 <= code && code <= 0xD2EF || // Lo  [27] HANGUL SYLLABLE TYIG..HANGUL SYLLABLE TYIH\n\t\t\t0xD2F1 <= code && code <= 0xD30B || // Lo  [27] HANGUL SYLLABLE TIG..HANGUL SYLLABLE TIH\n\t\t\t0xD30D <= code && code <= 0xD327 || // Lo  [27] HANGUL SYLLABLE PAG..HANGUL SYLLABLE PAH\n\t\t\t0xD329 <= code && code <= 0xD343 || // Lo  [27] HANGUL SYLLABLE PAEG..HANGUL SYLLABLE PAEH\n\t\t\t0xD345 <= code && code <= 0xD35F || // Lo  [27] HANGUL SYLLABLE PYAG..HANGUL SYLLABLE PYAH\n\t\t\t0xD361 <= code && code <= 0xD37B || // Lo  [27] HANGUL SYLLABLE PYAEG..HANGUL SYLLABLE PYAEH\n\t\t\t0xD37D <= code && code <= 0xD397 || // Lo  [27] HANGUL SYLLABLE PEOG..HANGUL SYLLABLE PEOH\n\t\t\t0xD399 <= code && code <= 0xD3B3 || // Lo  [27] HANGUL SYLLABLE PEG..HANGUL SYLLABLE PEH\n\t\t\t0xD3B5 <= code && code <= 0xD3CF || // Lo  [27] HANGUL SYLLABLE PYEOG..HANGUL SYLLABLE PYEOH\n\t\t\t0xD3D1 <= code && code <= 0xD3EB || // Lo  [27] HANGUL SYLLABLE PYEG..HANGUL SYLLABLE PYEH\n\t\t\t0xD3ED <= code && code <= 0xD407 || // Lo  [27] HANGUL SYLLABLE POG..HANGUL SYLLABLE POH\n\t\t\t0xD409 <= code && code <= 0xD423 || // Lo  [27] HANGUL SYLLABLE PWAG..HANGUL SYLLABLE PWAH\n\t\t\t0xD425 <= code && code <= 0xD43F || // Lo  [27] HANGUL SYLLABLE PWAEG..HANGUL SYLLABLE PWAEH\n\t\t\t0xD441 <= code && code <= 0xD45B || // Lo  [27] HANGUL SYLLABLE POEG..HANGUL SYLLABLE POEH\n\t\t\t0xD45D <= code && code <= 0xD477 || // Lo  [27] HANGUL SYLLABLE PYOG..HANGUL SYLLABLE PYOH\n\t\t\t0xD479 <= code && code <= 0xD493 || // Lo  [27] HANGUL SYLLABLE PUG..HANGUL SYLLABLE PUH\n\t\t\t0xD495 <= code && code <= 0xD4AF || // Lo  [27] HANGUL SYLLABLE PWEOG..HANGUL SYLLABLE PWEOH\n\t\t\t0xD4B1 <= code && code <= 0xD4CB || // Lo  [27] HANGUL SYLLABLE PWEG..HANGUL SYLLABLE PWEH\n\t\t\t0xD4CD <= code && code <= 0xD4E7 || // Lo  [27] HANGUL SYLLABLE PWIG..HANGUL SYLLABLE PWIH\n\t\t\t0xD4E9 <= code && code <= 0xD503 || // Lo  [27] HANGUL SYLLABLE PYUG..HANGUL SYLLABLE PYUH\n\t\t\t0xD505 <= code && code <= 0xD51F || // Lo  [27] HANGUL SYLLABLE PEUG..HANGUL SYLLABLE PEUH\n\t\t\t0xD521 <= code && code <= 0xD53B || // Lo  [27] HANGUL SYLLABLE PYIG..HANGUL SYLLABLE PYIH\n\t\t\t0xD53D <= code && code <= 0xD557 || // Lo  [27] HANGUL SYLLABLE PIG..HANGUL SYLLABLE PIH\n\t\t\t0xD559 <= code && code <= 0xD573 || // Lo  [27] HANGUL SYLLABLE HAG..HANGUL SYLLABLE HAH\n\t\t\t0xD575 <= code && code <= 0xD58F || // Lo  [27] HANGUL SYLLABLE HAEG..HANGUL SYLLABLE HAEH\n\t\t\t0xD591 <= code && code <= 0xD5AB || // Lo  [27] HANGUL SYLLABLE HYAG..HANGUL SYLLABLE HYAH\n\t\t\t0xD5AD <= code && code <= 0xD5C7 || // Lo  [27] HANGUL SYLLABLE HYAEG..HANGUL SYLLABLE HYAEH\n\t\t\t0xD5C9 <= code && code <= 0xD5E3 || // Lo  [27] HANGUL SYLLABLE HEOG..HANGUL SYLLABLE HEOH\n\t\t\t0xD5E5 <= code && code <= 0xD5FF || // Lo  [27] HANGUL SYLLABLE HEG..HANGUL SYLLABLE HEH\n\t\t\t0xD601 <= code && code <= 0xD61B || // Lo  [27] HANGUL SYLLABLE HYEOG..HANGUL SYLLABLE HYEOH\n\t\t\t0xD61D <= code && code <= 0xD637 || // Lo  [27] HANGUL SYLLABLE HYEG..HANGUL SYLLABLE HYEH\n\t\t\t0xD639 <= code && code <= 0xD653 || // Lo  [27] HANGUL SYLLABLE HOG..HANGUL SYLLABLE HOH\n\t\t\t0xD655 <= code && code <= 0xD66F || // Lo  [27] HANGUL SYLLABLE HWAG..HANGUL SYLLABLE HWAH\n\t\t\t0xD671 <= code && code <= 0xD68B || // Lo  [27] HANGUL SYLLABLE HWAEG..HANGUL SYLLABLE HWAEH\n\t\t\t0xD68D <= code && code <= 0xD6A7 || // Lo  [27] HANGUL SYLLABLE HOEG..HANGUL SYLLABLE HOEH\n\t\t\t0xD6A9 <= code && code <= 0xD6C3 || // Lo  [27] HANGUL SYLLABLE HYOG..HANGUL SYLLABLE HYOH\n\t\t\t0xD6C5 <= code && code <= 0xD6DF || // Lo  [27] HANGUL SYLLABLE HUG..HANGUL SYLLABLE HUH\n\t\t\t0xD6E1 <= code && code <= 0xD6FB || // Lo  [27] HANGUL SYLLABLE HWEOG..HANGUL SYLLABLE HWEOH\n\t\t\t0xD6FD <= code && code <= 0xD717 || // Lo  [27] HANGUL SYLLABLE HWEG..HANGUL SYLLABLE HWEH\n\t\t\t0xD719 <= code && code <= 0xD733 || // Lo  [27] HANGUL SYLLABLE HWIG..HANGUL SYLLABLE HWIH\n\t\t\t0xD735 <= code && code <= 0xD74F || // Lo  [27] HANGUL SYLLABLE HYUG..HANGUL SYLLABLE HYUH\n\t\t\t0xD751 <= code && code <= 0xD76B || // Lo  [27] HANGUL SYLLABLE HEUG..HANGUL SYLLABLE HEUH\n\t\t\t0xD76D <= code && code <= 0xD787 || // Lo  [27] HANGUL SYLLABLE HYIG..HANGUL SYLLABLE HYIH\n\t\t\t0xD789 <= code && code <= 0xD7A3 // Lo  [27] HANGUL SYLLABLE HIG..HANGUL SYLLABLE HIH\n\t\t\t) {\n\t\t\t\t\treturn LVT;\n\t\t\t\t}\n\n\t\t\tif (0x261D == code || // So       WHITE UP POINTING INDEX\n\t\t\t0x26F9 == code || // So       PERSON WITH BALL\n\t\t\t0x270A <= code && code <= 0x270D || // So   [4] RAISED FIST..WRITING HAND\n\t\t\t0x1F385 == code || // So       FATHER CHRISTMAS\n\t\t\t0x1F3C2 <= code && code <= 0x1F3C4 || // So   [3] SNOWBOARDER..SURFER\n\t\t\t0x1F3C7 == code || // So       HORSE RACING\n\t\t\t0x1F3CA <= code && code <= 0x1F3CC || // So   [3] SWIMMER..GOLFER\n\t\t\t0x1F442 <= code && code <= 0x1F443 || // So   [2] EAR..NOSE\n\t\t\t0x1F446 <= code && code <= 0x1F450 || // So  [11] WHITE UP POINTING BACKHAND INDEX..OPEN HANDS SIGN\n\t\t\t0x1F46E == code || // So       POLICE OFFICER\n\t\t\t0x1F470 <= code && code <= 0x1F478 || // So   [9] BRIDE WITH VEIL..PRINCESS\n\t\t\t0x1F47C == code || // So       BABY ANGEL\n\t\t\t0x1F481 <= code && code <= 0x1F483 || // So   [3] INFORMATION DESK PERSON..DANCER\n\t\t\t0x1F485 <= code && code <= 0x1F487 || // So   [3] NAIL POLISH..HAIRCUT\n\t\t\t0x1F4AA == code || // So       FLEXED BICEPS\n\t\t\t0x1F574 <= code && code <= 0x1F575 || // So   [2] MAN IN BUSINESS SUIT LEVITATING..SLEUTH OR SPY\n\t\t\t0x1F57A == code || // So       MAN DANCING\n\t\t\t0x1F590 == code || // So       RAISED HAND WITH FINGERS SPLAYED\n\t\t\t0x1F595 <= code && code <= 0x1F596 || // So   [2] REVERSED HAND WITH MIDDLE FINGER EXTENDED..RAISED HAND WITH PART BETWEEN MIDDLE AND RING FINGERS\n\t\t\t0x1F645 <= code && code <= 0x1F647 || // So   [3] FACE WITH NO GOOD GESTURE..PERSON BOWING DEEPLY\n\t\t\t0x1F64B <= code && code <= 0x1F64F || // So   [5] HAPPY PERSON RAISING ONE HAND..PERSON WITH FOLDED HANDS\n\t\t\t0x1F6A3 == code || // So       ROWBOAT\n\t\t\t0x1F6B4 <= code && code <= 0x1F6B6 || // So   [3] BICYCLIST..PEDESTRIAN\n\t\t\t0x1F6C0 == code || // So       BATH\n\t\t\t0x1F6CC == code || // So       SLEEPING ACCOMMODATION\n\t\t\t0x1F918 <= code && code <= 0x1F91C || // So   [5] SIGN OF THE HORNS..RIGHT-FACING FIST\n\t\t\t0x1F91E <= code && code <= 0x1F91F || // So   [2] HAND WITH INDEX AND MIDDLE FINGERS CROSSED..I LOVE YOU HAND SIGN\n\t\t\t0x1F926 == code || // So       FACE PALM\n\t\t\t0x1F930 <= code && code <= 0x1F939 || // So  [10] PREGNANT WOMAN..JUGGLING\n\t\t\t0x1F93D <= code && code <= 0x1F93E || // So   [2] WATER POLO..HANDBALL\n\t\t\t0x1F9D1 <= code && code <= 0x1F9DD // So  [13] ADULT..ELF\n\t\t\t) {\n\t\t\t\t\treturn E_Base;\n\t\t\t\t}\n\n\t\t\tif (0x1F3FB <= code && code <= 0x1F3FF) // Sk   [5] EMOJI MODIFIER FITZPATRICK TYPE-1-2..EMOJI MODIFIER FITZPATRICK TYPE-6\n\t\t\t\t{\n\t\t\t\t\treturn E_Modifier;\n\t\t\t\t}\n\n\t\t\tif (0x200D == code // Cf       ZERO WIDTH JOINER\n\t\t\t) {\n\t\t\t\t\treturn ZWJ;\n\t\t\t\t}\n\n\t\t\tif (0x2640 == code || // So       FEMALE SIGN\n\t\t\t0x2642 == code || // So       MALE SIGN\n\t\t\t0x2695 <= code && code <= 0x2696 || // So   [2] STAFF OF AESCULAPIUS..SCALES\n\t\t\t0x2708 == code || // So       AIRPLANE\n\t\t\t0x2764 == code || // So       HEAVY BLACK HEART\n\t\t\t0x1F308 == code || // So       RAINBOW\n\t\t\t0x1F33E == code || // So       EAR OF RICE\n\t\t\t0x1F373 == code || // So       COOKING\n\t\t\t0x1F393 == code || // So       GRADUATION CAP\n\t\t\t0x1F3A4 == code || // So       MICROPHONE\n\t\t\t0x1F3A8 == code || // So       ARTIST PALETTE\n\t\t\t0x1F3EB == code || // So       SCHOOL\n\t\t\t0x1F3ED == code || // So       FACTORY\n\t\t\t0x1F48B == code || // So       KISS MARK\n\t\t\t0x1F4BB <= code && code <= 0x1F4BC || // So   [2] PERSONAL COMPUTER..BRIEFCASE\n\t\t\t0x1F527 == code || // So       WRENCH\n\t\t\t0x1F52C == code || // So       MICROSCOPE\n\t\t\t0x1F5E8 == code || // So       LEFT SPEECH BUBBLE\n\t\t\t0x1F680 == code || // So       ROCKET\n\t\t\t0x1F692 == code // So       FIRE ENGINE\n\t\t\t) {\n\t\t\t\t\treturn Glue_After_Zwj;\n\t\t\t\t}\n\n\t\t\tif (0x1F466 <= code && code <= 0x1F469) // So   [4] BOY..WOMAN\n\t\t\t\t{\n\t\t\t\t\treturn E_Base_GAZ;\n\t\t\t\t}\n\n\t\t\t//all unlisted characters have a grapheme break property of \"Other\"\n\t\t\treturn Other;\n\t\t}\n\t\treturn this;\n\t}\n\n\tif ('object' != 'undefined' && module.exports) {\n\t\tmodule.exports = GraphemeSplitter;\n\t}\n});\n\nvar splitter = new graphemeSplitter();\n\nvar substring = function substring(str, start, end) {\n\tvar iterator = splitter.iterateGraphemes(str.substring(start));\n\n\tvar value = '';\n\n\tfor (var pos = 0; pos < end - start; pos++) {\n\t\tvar next = iterator.next();\n\n\t\tvalue += next.value;\n\n\t\tif (next.done) {\n\t\t\tbreak;\n\t\t}\n\t}\n\n\treturn value;\n};\n\nvar location = (function (startLine, startColumn, startOffset, endLine, endColumn, endOffset, source) {\n\treturn {\n\t\tstart: {\n\t\t\tline: startLine,\n\t\t\tcolumn: startColumn,\n\t\t\toffset: startOffset\n\t\t},\n\t\tend: {\n\t\t\tline: endLine,\n\t\t\tcolumn: endColumn,\n\t\t\toffset: endOffset\n\t\t},\n\t\tsource: source || null\n\t};\n});\n\nvar build = createCommonjsModule(function (module, exports) {\n  (function (global, factory) {\n    module.exports = factory();\n  })(commonjsGlobal, function () {\n    'use strict';\n\n    /*!\n     * repeat-string <https://github.com/jonschlinkert/repeat-string>\n     *\n     * Copyright (c) 2014-2015, Jon Schlinkert.\n     * Licensed under the MIT License.\n     */\n\n    'use strict';\n\n    /**\n     * Results cache\n     */\n\n    var res = '';\n    var cache;\n\n    /**\n     * Expose `repeat`\n     */\n\n    var repeatString = repeat;\n\n    /**\n     * Repeat the given `string` the specified `number`\n     * of times.\n     *\n     * **Example:**\n     *\n     * ```js\n     * var repeat = require('repeat-string');\n     * repeat('A', 5);\n     * //=> AAAAA\n     * ```\n     *\n     * @param {String} `string` The string to repeat\n     * @param {Number} `number` The number of times to repeat the string\n     * @return {String} Repeated string\n     * @api public\n     */\n\n    function repeat(str, num) {\n      if (typeof str !== 'string') {\n        throw new TypeError('expected a string');\n      }\n\n      // cover common, quick use cases\n      if (num === 1) return str;\n      if (num === 2) return str + str;\n\n      var max = str.length * num;\n      if (cache !== str || typeof cache === 'undefined') {\n        cache = str;\n        res = '';\n      } else if (res.length >= max) {\n        return res.substr(0, max);\n      }\n\n      while (max > res.length && num > 1) {\n        if (num & 1) {\n          res += str;\n        }\n\n        num >>= 1;\n        str += str;\n      }\n\n      res += str;\n      res = res.substr(0, max);\n      return res;\n    }\n\n    'use strict';\n\n    var padStart = function padStart(string, maxLength, fillString) {\n\n      if (string == null || maxLength == null) {\n        return string;\n      }\n\n      var result = String(string);\n      var targetLen = typeof maxLength === 'number' ? maxLength : parseInt(maxLength, 10);\n\n      if (isNaN(targetLen) || !isFinite(targetLen)) {\n        return result;\n      }\n\n      var length = result.length;\n      if (length >= targetLen) {\n        return result;\n      }\n\n      var fill = fillString == null ? '' : String(fillString);\n      if (fill === '') {\n        fill = ' ';\n      }\n\n      var fillLen = targetLen - length;\n\n      while (fill.length < fillLen) {\n        fill += fill;\n      }\n\n      var truncated = fill.length > fillLen ? fill.substr(0, fillLen) : fill;\n\n      return truncated + result;\n    };\n\n    var _extends = Object.assign || function (target) {\n      for (var i = 1; i < arguments.length; i++) {\n        var source = arguments[i];\n\n        for (var key in source) {\n          if (Object.prototype.hasOwnProperty.call(source, key)) {\n            target[key] = source[key];\n          }\n        }\n      }\n\n      return target;\n    };\n\n    function printLine(line, position, maxNumLength, settings) {\n      var num = String(position);\n      var formattedNum = padStart(num, maxNumLength, ' ');\n      var tabReplacement = repeatString(' ', settings.tabSize);\n\n      return formattedNum + ' | ' + line.replace(/\\t/g, tabReplacement);\n    }\n\n    function printLines(lines, start, end, maxNumLength, settings) {\n      return lines.slice(start, end).map(function (line, i) {\n        return printLine(line, start + i + 1, maxNumLength, settings);\n      }).join('\\n');\n    }\n\n    var defaultSettings = {\n      extraLines: 2,\n      tabSize: 4\n    };\n\n    var index = function index(input, linePos, columnPos, settings) {\n      settings = _extends({}, defaultSettings, settings);\n\n      var lines = input.split(/\\r\\n?|\\n|\\f/);\n      var startLinePos = Math.max(1, linePos - settings.extraLines) - 1;\n      var endLinePos = Math.min(linePos + settings.extraLines, lines.length);\n      var maxNumLength = String(endLinePos).length;\n      var prevLines = printLines(lines, startLinePos, linePos, maxNumLength, settings);\n      var targetLineBeforeCursor = printLine(lines[linePos - 1].substring(0, columnPos - 1), linePos, maxNumLength, settings);\n      var cursorLine = repeatString(' ', targetLineBeforeCursor.length) + '^';\n      var nextLines = printLines(lines, linePos, endLinePos, maxNumLength, settings);\n\n      return [prevLines, cursorLine, nextLines].filter(Boolean).join('\\n');\n    };\n\n    return index;\n  });\n});\n\nvar errorStack = new Error().stack;\n\nvar createError = (function (props) {\n\t// use Object.create(), because some VMs prevent setting line/column otherwise\n\t// (iOS Safari 10 even throws an exception)\n\tvar error = Object.create(SyntaxError.prototype);\n\n\tObject.assign(error, props, {\n\t\tname: 'SyntaxError'\n\t});\n\n\tObject.defineProperty(error, 'stack', {\n\t\tget: function get() {\n\t\t\treturn errorStack ? errorStack.replace(/^(.+\\n){1,3}/, String(error) + '\\n') : '';\n\t\t}\n\t});\n\n\treturn error;\n});\n\nvar error = (function (message, input, source, line, column) {\n\tthrow createError({\n\t\tmessage: line ? message + '\\n' + build(input, line, column) : message,\n\t\trawMessage: message,\n\t\tsource: source,\n\t\tline: line,\n\t\tcolumn: column\n\t});\n});\n\nvar parseErrorTypes = {\n\tunexpectedEnd: function unexpectedEnd() {\n\t\treturn 'Unexpected end of input';\n\t},\n\tunexpectedToken: function unexpectedToken(token) {\n\t\tfor (var _len = arguments.length, position = Array(_len > 1 ? _len - 1 : 0), _key = 1; _key < _len; _key++) {\n\t\t\tposition[_key - 1] = arguments[_key];\n\t\t}\n\n\t\treturn 'Unexpected token <' + token + '> at ' + position.filter(Boolean).join(':');\n\t}\n};\n\nvar tokenizeErrorTypes = {\n\tunexpectedSymbol: function unexpectedSymbol(symbol) {\n\t\tfor (var _len = arguments.length, position = Array(_len > 1 ? _len - 1 : 0), _key = 1; _key < _len; _key++) {\n\t\t\tposition[_key - 1] = arguments[_key];\n\t\t}\n\n\t\treturn 'Unexpected symbol <' + symbol + '> at ' + position.filter(Boolean).join(':');\n\t}\n};\n\nvar tokenTypes = {\n\tLEFT_BRACE: 0, // {\n\tRIGHT_BRACE: 1, // }\n\tLEFT_BRACKET: 2, // [\n\tRIGHT_BRACKET: 3, // ]\n\tCOLON: 4, // :\n\tCOMMA: 5, // ,\n\tSTRING: 6, //\n\tNUMBER: 7, //\n\tTRUE: 8, // true\n\tFALSE: 9, // false\n\tNULL: 10 // null\n};\n\nvar punctuatorTokensMap = { // Lexeme: Token\n\t'{': tokenTypes.LEFT_BRACE,\n\t'}': tokenTypes.RIGHT_BRACE,\n\t'[': tokenTypes.LEFT_BRACKET,\n\t']': tokenTypes.RIGHT_BRACKET,\n\t':': tokenTypes.COLON,\n\t',': tokenTypes.COMMA\n};\n\nvar keywordTokensMap = { // Lexeme: Token\n\t'true': tokenTypes.TRUE,\n\t'false': tokenTypes.FALSE,\n\t'null': tokenTypes.NULL\n};\n\nvar stringStates = {\n\t_START_: 0,\n\tSTART_QUOTE_OR_CHAR: 1,\n\tESCAPE: 2\n};\n\nvar escapes$1 = {\n\t'\"': 0, // Quotation mask\n\t'\\\\': 1, // Reverse solidus\n\t'/': 2, // Solidus\n\t'b': 3, // Backspace\n\t'f': 4, // Form feed\n\t'n': 5, // New line\n\t'r': 6, // Carriage return\n\t't': 7, // Horizontal tab\n\t'u': 8 // 4 hexadecimal digits\n};\n\nvar numberStates = {\n\t_START_: 0,\n\tMINUS: 1,\n\tZERO: 2,\n\tDIGIT: 3,\n\tPOINT: 4,\n\tDIGIT_FRACTION: 5,\n\tEXP: 6,\n\tEXP_DIGIT_OR_SIGN: 7\n};\n\n// HELPERS\n\nfunction isDigit1to9(char) {\n\treturn char >= '1' && char <= '9';\n}\n\nfunction isDigit(char) {\n\treturn char >= '0' && char <= '9';\n}\n\nfunction isHex(char) {\n\treturn isDigit(char) || char >= 'a' && char <= 'f' || char >= 'A' && char <= 'F';\n}\n\nfunction isExp(char) {\n\treturn char === 'e' || char === 'E';\n}\n\n// PARSERS\n\nfunction parseWhitespace(input, index, line, column) {\n\tvar char = input.charAt(index);\n\n\tif (char === '\\r') {\n\t\t// CR (Unix)\n\t\tindex++;\n\t\tline++;\n\t\tcolumn = 1;\n\t\tif (input.charAt(index) === '\\n') {\n\t\t\t// CRLF (Windows)\n\t\t\tindex++;\n\t\t}\n\t} else if (char === '\\n') {\n\t\t// LF (MacOS)\n\t\tindex++;\n\t\tline++;\n\t\tcolumn = 1;\n\t} else if (char === '\\t' || char === ' ') {\n\t\tindex++;\n\t\tcolumn++;\n\t} else {\n\t\treturn null;\n\t}\n\n\treturn {\n\t\tindex: index,\n\t\tline: line,\n\t\tcolumn: column\n\t};\n}\n\nfunction parseChar(input, index, line, column) {\n\tvar char = input.charAt(index);\n\n\tif (char in punctuatorTokensMap) {\n\t\treturn {\n\t\t\ttype: punctuatorTokensMap[char],\n\t\t\tline: line,\n\t\t\tcolumn: column + 1,\n\t\t\tindex: index + 1,\n\t\t\tvalue: null\n\t\t};\n\t}\n\n\treturn null;\n}\n\nfunction parseKeyword(input, index, line, column) {\n\tfor (var name in keywordTokensMap) {\n\t\tif (keywordTokensMap.hasOwnProperty(name) && input.substr(index, name.length) === name) {\n\t\t\treturn {\n\t\t\t\ttype: keywordTokensMap[name],\n\t\t\t\tline: line,\n\t\t\t\tcolumn: column + name.length,\n\t\t\t\tindex: index + name.length,\n\t\t\t\tvalue: name\n\t\t\t};\n\t\t}\n\t}\n\n\treturn null;\n}\n\nfunction parseString$1(input, index, line, column) {\n\tvar startIndex = index;\n\tvar state = stringStates._START_;\n\n\twhile (index < input.length) {\n\t\tvar char = input.charAt(index);\n\n\t\tswitch (state) {\n\t\t\tcase stringStates._START_:\n\t\t\t\t{\n\t\t\t\t\tif (char === '\"') {\n\t\t\t\t\t\tindex++;\n\t\t\t\t\t\tstate = stringStates.START_QUOTE_OR_CHAR;\n\t\t\t\t\t} else {\n\t\t\t\t\t\treturn null;\n\t\t\t\t\t}\n\t\t\t\t\tbreak;\n\t\t\t\t}\n\n\t\t\tcase stringStates.START_QUOTE_OR_CHAR:\n\t\t\t\t{\n\t\t\t\t\tif (char === '\\\\') {\n\t\t\t\t\t\tindex++;\n\t\t\t\t\t\tstate = stringStates.ESCAPE;\n\t\t\t\t\t} else if (char === '\"') {\n\t\t\t\t\t\tindex++;\n\t\t\t\t\t\treturn {\n\t\t\t\t\t\t\ttype: tokenTypes.STRING,\n\t\t\t\t\t\t\tline: line,\n\t\t\t\t\t\t\tcolumn: column + index - startIndex,\n\t\t\t\t\t\t\tindex: index,\n\t\t\t\t\t\t\tvalue: input.slice(startIndex, index)\n\t\t\t\t\t\t};\n\t\t\t\t\t} else {\n\t\t\t\t\t\tindex++;\n\t\t\t\t\t}\n\t\t\t\t\tbreak;\n\t\t\t\t}\n\n\t\t\tcase stringStates.ESCAPE:\n\t\t\t\t{\n\t\t\t\t\tif (char in escapes$1) {\n\t\t\t\t\t\tindex++;\n\t\t\t\t\t\tif (char === 'u') {\n\t\t\t\t\t\t\tfor (var i = 0; i < 4; i++) {\n\t\t\t\t\t\t\t\tvar curChar = input.charAt(index);\n\t\t\t\t\t\t\t\tif (curChar && isHex(curChar)) {\n\t\t\t\t\t\t\t\t\tindex++;\n\t\t\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\t\t\treturn null;\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t}\n\t\t\t\t\t\tstate = stringStates.START_QUOTE_OR_CHAR;\n\t\t\t\t\t} else {\n\t\t\t\t\t\treturn null;\n\t\t\t\t\t}\n\t\t\t\t\tbreak;\n\t\t\t\t}\n\t\t}\n\t}\n}\n\nfunction parseNumber(input, index, line, column) {\n\tvar startIndex = index;\n\tvar passedValueIndex = index;\n\tvar state = numberStates._START_;\n\n\titerator: while (index < input.length) {\n\t\tvar char = input.charAt(index);\n\n\t\tswitch (state) {\n\t\t\tcase numberStates._START_:\n\t\t\t\t{\n\t\t\t\t\tif (char === '-') {\n\t\t\t\t\t\tstate = numberStates.MINUS;\n\t\t\t\t\t} else if (char === '0') {\n\t\t\t\t\t\tpassedValueIndex = index + 1;\n\t\t\t\t\t\tstate = numberStates.ZERO;\n\t\t\t\t\t} else if (isDigit1to9(char)) {\n\t\t\t\t\t\tpassedValueIndex = index + 1;\n\t\t\t\t\t\tstate = numberStates.DIGIT;\n\t\t\t\t\t} else {\n\t\t\t\t\t\treturn null;\n\t\t\t\t\t}\n\t\t\t\t\tbreak;\n\t\t\t\t}\n\n\t\t\tcase numberStates.MINUS:\n\t\t\t\t{\n\t\t\t\t\tif (char === '0') {\n\t\t\t\t\t\tpassedValueIndex = index + 1;\n\t\t\t\t\t\tstate = numberStates.ZERO;\n\t\t\t\t\t} else if (isDigit1to9(char)) {\n\t\t\t\t\t\tpassedValueIndex = index + 1;\n\t\t\t\t\t\tstate = numberStates.DIGIT;\n\t\t\t\t\t} else {\n\t\t\t\t\t\treturn null;\n\t\t\t\t\t}\n\t\t\t\t\tbreak;\n\t\t\t\t}\n\n\t\t\tcase numberStates.ZERO:\n\t\t\t\t{\n\t\t\t\t\tif (char === '.') {\n\t\t\t\t\t\tstate = numberStates.POINT;\n\t\t\t\t\t} else if (isExp(char)) {\n\t\t\t\t\t\tstate = numberStates.EXP;\n\t\t\t\t\t} else {\n\t\t\t\t\t\tbreak iterator;\n\t\t\t\t\t}\n\t\t\t\t\tbreak;\n\t\t\t\t}\n\n\t\t\tcase numberStates.DIGIT:\n\t\t\t\t{\n\t\t\t\t\tif (isDigit(char)) {\n\t\t\t\t\t\tpassedValueIndex = index + 1;\n\t\t\t\t\t} else if (char === '.') {\n\t\t\t\t\t\tstate = numberStates.POINT;\n\t\t\t\t\t} else if (isExp(char)) {\n\t\t\t\t\t\tstate = numberStates.EXP;\n\t\t\t\t\t} else {\n\t\t\t\t\t\tbreak iterator;\n\t\t\t\t\t}\n\t\t\t\t\tbreak;\n\t\t\t\t}\n\n\t\t\tcase numberStates.POINT:\n\t\t\t\t{\n\t\t\t\t\tif (isDigit(char)) {\n\t\t\t\t\t\tpassedValueIndex = index + 1;\n\t\t\t\t\t\tstate = numberStates.DIGIT_FRACTION;\n\t\t\t\t\t} else {\n\t\t\t\t\t\tbreak iterator;\n\t\t\t\t\t}\n\t\t\t\t\tbreak;\n\t\t\t\t}\n\n\t\t\tcase numberStates.DIGIT_FRACTION:\n\t\t\t\t{\n\t\t\t\t\tif (isDigit(char)) {\n\t\t\t\t\t\tpassedValueIndex = index + 1;\n\t\t\t\t\t} else if (isExp(char)) {\n\t\t\t\t\t\tstate = numberStates.EXP;\n\t\t\t\t\t} else {\n\t\t\t\t\t\tbreak iterator;\n\t\t\t\t\t}\n\t\t\t\t\tbreak;\n\t\t\t\t}\n\n\t\t\tcase numberStates.EXP:\n\t\t\t\t{\n\t\t\t\t\tif (char === '+' || char === '-') {\n\t\t\t\t\t\tstate = numberStates.EXP_DIGIT_OR_SIGN;\n\t\t\t\t\t} else if (isDigit(char)) {\n\t\t\t\t\t\tpassedValueIndex = index + 1;\n\t\t\t\t\t\tstate = numberStates.EXP_DIGIT_OR_SIGN;\n\t\t\t\t\t} else {\n\t\t\t\t\t\tbreak iterator;\n\t\t\t\t\t}\n\t\t\t\t\tbreak;\n\t\t\t\t}\n\n\t\t\tcase numberStates.EXP_DIGIT_OR_SIGN:\n\t\t\t\t{\n\t\t\t\t\tif (isDigit(char)) {\n\t\t\t\t\t\tpassedValueIndex = index + 1;\n\t\t\t\t\t} else {\n\t\t\t\t\t\tbreak iterator;\n\t\t\t\t\t}\n\t\t\t\t\tbreak;\n\t\t\t\t}\n\t\t}\n\n\t\tindex++;\n\t}\n\n\tif (passedValueIndex > 0) {\n\t\treturn {\n\t\t\ttype: tokenTypes.NUMBER,\n\t\t\tline: line,\n\t\t\tcolumn: column + passedValueIndex - startIndex,\n\t\t\tindex: passedValueIndex,\n\t\t\tvalue: input.slice(startIndex, passedValueIndex)\n\t\t};\n\t}\n\n\treturn null;\n}\n\nvar tokenize = function tokenize(input, settings) {\n\tvar line = 1;\n\tvar column = 1;\n\tvar index = 0;\n\tvar tokens = [];\n\n\twhile (index < input.length) {\n\t\tvar args = [input, index, line, column];\n\t\tvar whitespace = parseWhitespace.apply(undefined, args);\n\n\t\tif (whitespace) {\n\t\t\tindex = whitespace.index;\n\t\t\tline = whitespace.line;\n\t\t\tcolumn = whitespace.column;\n\t\t\tcontinue;\n\t\t}\n\n\t\tvar matched = parseChar.apply(undefined, args) || parseKeyword.apply(undefined, args) || parseString$1.apply(undefined, args) || parseNumber.apply(undefined, args);\n\n\t\tif (matched) {\n\t\t\tvar token = {\n\t\t\t\ttype: matched.type,\n\t\t\t\tvalue: matched.value,\n\t\t\t\tloc: location(line, column, index, matched.line, matched.column, matched.index, settings.source)\n\t\t\t};\n\n\t\t\ttokens.push(token);\n\t\t\tindex = matched.index;\n\t\t\tline = matched.line;\n\t\t\tcolumn = matched.column;\n\t\t} else {\n\t\t\terror(tokenizeErrorTypes.unexpectedSymbol(substring(input, index, index + 1), settings.source, line, column), input, settings.source, line, column);\n\t\t}\n\t}\n\n\treturn tokens;\n};\n\nvar objectStates = {\n\t_START_: 0,\n\tOPEN_OBJECT: 1,\n\tPROPERTY: 2,\n\tCOMMA: 3\n};\n\nvar propertyStates = {\n\t_START_: 0,\n\tKEY: 1,\n\tCOLON: 2\n};\n\nvar arrayStates = {\n\t_START_: 0,\n\tOPEN_ARRAY: 1,\n\tVALUE: 2,\n\tCOMMA: 3\n};\n\nvar defaultSettings = {\n\tloc: true,\n\tsource: null\n};\n\nfunction errorEof(input, tokenList, settings) {\n\tvar loc = tokenList.length > 0 ? tokenList[tokenList.length - 1].loc.end : { line: 1, column: 1 };\n\n\terror(parseErrorTypes.unexpectedEnd(), input, settings.source, loc.line, loc.column);\n}\n\n/** @param hexCode {string} hexCode without '\\u' prefix */\nfunction parseHexEscape(hexCode) {\n\tvar charCode = 0;\n\n\tfor (var i = 0; i < 4; i++) {\n\t\tcharCode = charCode * 16 + parseInt(hexCode[i], 16);\n\t}\n\n\treturn String.fromCharCode(charCode);\n}\n\nvar escapes = {\n\t'b': '\\b', // Backspace\n\t'f': '\\f', // Form feed\n\t'n': '\\n', // New line\n\t'r': '\\r', // Carriage return\n\t't': '\\t' // Horizontal tab\n};\n\nvar passEscapes = ['\"', '\\\\', '/'];\n\nfunction parseString( /** string */string) {\n\tvar result = '';\n\n\tfor (var i = 0; i < string.length; i++) {\n\t\tvar char = string.charAt(i);\n\n\t\tif (char === '\\\\') {\n\t\t\ti++;\n\t\t\tvar nextChar = string.charAt(i);\n\t\t\tif (nextChar === 'u') {\n\t\t\t\tresult += parseHexEscape(string.substr(i + 1, 4));\n\t\t\t\ti += 4;\n\t\t\t} else if (passEscapes.indexOf(nextChar) !== -1) {\n\t\t\t\tresult += nextChar;\n\t\t\t} else if (nextChar in escapes) {\n\t\t\t\tresult += escapes[nextChar];\n\t\t\t} else {\n\t\t\t\tbreak;\n\t\t\t}\n\t\t} else {\n\t\t\tresult += char;\n\t\t}\n\t}\n\n\treturn result;\n}\n\nfunction parseObject(input, tokenList, index, settings) {\n\t// object: LEFT_BRACE (property (COMMA property)*)? RIGHT_BRACE\n\tvar startToken = void 0;\n\tvar object = {\n\t\ttype: 'Object',\n\t\tchildren: []\n\t};\n\tvar state = objectStates._START_;\n\n\twhile (index < tokenList.length) {\n\t\tvar token = tokenList[index];\n\n\t\tswitch (state) {\n\t\t\tcase objectStates._START_:\n\t\t\t\t{\n\t\t\t\t\tif (token.type === tokenTypes.LEFT_BRACE) {\n\t\t\t\t\t\tstartToken = token;\n\t\t\t\t\t\tstate = objectStates.OPEN_OBJECT;\n\t\t\t\t\t\tindex++;\n\t\t\t\t\t} else {\n\t\t\t\t\t\treturn null;\n\t\t\t\t\t}\n\t\t\t\t\tbreak;\n\t\t\t\t}\n\n\t\t\tcase objectStates.OPEN_OBJECT:\n\t\t\t\t{\n\t\t\t\t\tif (token.type === tokenTypes.RIGHT_BRACE) {\n\t\t\t\t\t\tif (settings.loc) {\n\t\t\t\t\t\t\tobject.loc = location(startToken.loc.start.line, startToken.loc.start.column, startToken.loc.start.offset, token.loc.end.line, token.loc.end.column, token.loc.end.offset, settings.source);\n\t\t\t\t\t\t}\n\t\t\t\t\t\treturn {\n\t\t\t\t\t\t\tvalue: object,\n\t\t\t\t\t\t\tindex: index + 1\n\t\t\t\t\t\t};\n\t\t\t\t\t} else {\n\t\t\t\t\t\tvar property = parseProperty(input, tokenList, index, settings);\n\t\t\t\t\t\tobject.children.push(property.value);\n\t\t\t\t\t\tstate = objectStates.PROPERTY;\n\t\t\t\t\t\tindex = property.index;\n\t\t\t\t\t}\n\t\t\t\t\tbreak;\n\t\t\t\t}\n\n\t\t\tcase objectStates.PROPERTY:\n\t\t\t\t{\n\t\t\t\t\tif (token.type === tokenTypes.RIGHT_BRACE) {\n\t\t\t\t\t\tif (settings.loc) {\n\t\t\t\t\t\t\tobject.loc = location(startToken.loc.start.line, startToken.loc.start.column, startToken.loc.start.offset, token.loc.end.line, token.loc.end.column, token.loc.end.offset, settings.source);\n\t\t\t\t\t\t}\n\t\t\t\t\t\treturn {\n\t\t\t\t\t\t\tvalue: object,\n\t\t\t\t\t\t\tindex: index + 1\n\t\t\t\t\t\t};\n\t\t\t\t\t} else if (token.type === tokenTypes.COMMA) {\n\t\t\t\t\t\tstate = objectStates.COMMA;\n\t\t\t\t\t\tindex++;\n\t\t\t\t\t} else {\n\t\t\t\t\t\terror(parseErrorTypes.unexpectedToken(substring(input, token.loc.start.offset, token.loc.end.offset), settings.source, token.loc.start.line, token.loc.start.column), input, settings.source, token.loc.start.line, token.loc.start.column);\n\t\t\t\t\t}\n\t\t\t\t\tbreak;\n\t\t\t\t}\n\n\t\t\tcase objectStates.COMMA:\n\t\t\t\t{\n\t\t\t\t\tvar _property = parseProperty(input, tokenList, index, settings);\n\t\t\t\t\tif (_property) {\n\t\t\t\t\t\tindex = _property.index;\n\t\t\t\t\t\tobject.children.push(_property.value);\n\t\t\t\t\t\tstate = objectStates.PROPERTY;\n\t\t\t\t\t} else {\n\t\t\t\t\t\terror(parseErrorTypes.unexpectedToken(substring(input, token.loc.start.offset, token.loc.end.offset), settings.source, token.loc.start.line, token.loc.start.column), input, settings.source, token.loc.start.line, token.loc.start.column);\n\t\t\t\t\t}\n\t\t\t\t\tbreak;\n\t\t\t\t}\n\t\t}\n\t}\n\n\terrorEof(input, tokenList, settings);\n}\n\nfunction parseProperty(input, tokenList, index, settings) {\n\t// property: STRING COLON value\n\tvar startToken = void 0;\n\tvar property = {\n\t\ttype: 'Property',\n\t\tkey: null,\n\t\tvalue: null\n\t};\n\tvar state = propertyStates._START_;\n\n\twhile (index < tokenList.length) {\n\t\tvar token = tokenList[index];\n\n\t\tswitch (state) {\n\t\t\tcase propertyStates._START_:\n\t\t\t\t{\n\t\t\t\t\tif (token.type === tokenTypes.STRING) {\n\t\t\t\t\t\tvar key = {\n\t\t\t\t\t\t\ttype: 'Identifier',\n\t\t\t\t\t\t\tvalue: parseString(input.slice(token.loc.start.offset + 1, token.loc.end.offset - 1)),\n\t\t\t\t\t\t\traw: token.value\n\t\t\t\t\t\t};\n\t\t\t\t\t\tif (settings.loc) {\n\t\t\t\t\t\t\tkey.loc = token.loc;\n\t\t\t\t\t\t}\n\t\t\t\t\t\tstartToken = token;\n\t\t\t\t\t\tproperty.key = key;\n\t\t\t\t\t\tstate = propertyStates.KEY;\n\t\t\t\t\t\tindex++;\n\t\t\t\t\t} else {\n\t\t\t\t\t\treturn null;\n\t\t\t\t\t}\n\t\t\t\t\tbreak;\n\t\t\t\t}\n\n\t\t\tcase propertyStates.KEY:\n\t\t\t\t{\n\t\t\t\t\tif (token.type === tokenTypes.COLON) {\n\t\t\t\t\t\tstate = propertyStates.COLON;\n\t\t\t\t\t\tindex++;\n\t\t\t\t\t} else {\n\t\t\t\t\t\terror(parseErrorTypes.unexpectedToken(substring(input, token.loc.start.offset, token.loc.end.offset), settings.source, token.loc.start.line, token.loc.start.column), input, settings.source, token.loc.start.line, token.loc.start.column);\n\t\t\t\t\t}\n\t\t\t\t\tbreak;\n\t\t\t\t}\n\n\t\t\tcase propertyStates.COLON:\n\t\t\t\t{\n\t\t\t\t\tvar value = parseValue(input, tokenList, index, settings);\n\t\t\t\t\tproperty.value = value.value;\n\t\t\t\t\tif (settings.loc) {\n\t\t\t\t\t\tproperty.loc = location(startToken.loc.start.line, startToken.loc.start.column, startToken.loc.start.offset, value.value.loc.end.line, value.value.loc.end.column, value.value.loc.end.offset, settings.source);\n\t\t\t\t\t}\n\t\t\t\t\treturn {\n\t\t\t\t\t\tvalue: property,\n\t\t\t\t\t\tindex: value.index\n\t\t\t\t\t};\n\t\t\t\t}\n\n\t\t}\n\t}\n}\n\nfunction parseArray(input, tokenList, index, settings) {\n\t// array: LEFT_BRACKET (value (COMMA value)*)? RIGHT_BRACKET\n\tvar startToken = void 0;\n\tvar array = {\n\t\ttype: 'Array',\n\t\tchildren: []\n\t};\n\tvar state = arrayStates._START_;\n\tvar token = void 0;\n\n\twhile (index < tokenList.length) {\n\t\ttoken = tokenList[index];\n\n\t\tswitch (state) {\n\t\t\tcase arrayStates._START_:\n\t\t\t\t{\n\t\t\t\t\tif (token.type === tokenTypes.LEFT_BRACKET) {\n\t\t\t\t\t\tstartToken = token;\n\t\t\t\t\t\tstate = arrayStates.OPEN_ARRAY;\n\t\t\t\t\t\tindex++;\n\t\t\t\t\t} else {\n\t\t\t\t\t\treturn null;\n\t\t\t\t\t}\n\t\t\t\t\tbreak;\n\t\t\t\t}\n\n\t\t\tcase arrayStates.OPEN_ARRAY:\n\t\t\t\t{\n\t\t\t\t\tif (token.type === tokenTypes.RIGHT_BRACKET) {\n\t\t\t\t\t\tif (settings.loc) {\n\t\t\t\t\t\t\tarray.loc = location(startToken.loc.start.line, startToken.loc.start.column, startToken.loc.start.offset, token.loc.end.line, token.loc.end.column, token.loc.end.offset, settings.source);\n\t\t\t\t\t\t}\n\t\t\t\t\t\treturn {\n\t\t\t\t\t\t\tvalue: array,\n\t\t\t\t\t\t\tindex: index + 1\n\t\t\t\t\t\t};\n\t\t\t\t\t} else {\n\t\t\t\t\t\tvar value = parseValue(input, tokenList, index, settings);\n\t\t\t\t\t\tindex = value.index;\n\t\t\t\t\t\tarray.children.push(value.value);\n\t\t\t\t\t\tstate = arrayStates.VALUE;\n\t\t\t\t\t}\n\t\t\t\t\tbreak;\n\t\t\t\t}\n\n\t\t\tcase arrayStates.VALUE:\n\t\t\t\t{\n\t\t\t\t\tif (token.type === tokenTypes.RIGHT_BRACKET) {\n\t\t\t\t\t\tif (settings.loc) {\n\t\t\t\t\t\t\tarray.loc = location(startToken.loc.start.line, startToken.loc.start.column, startToken.loc.start.offset, token.loc.end.line, token.loc.end.column, token.loc.end.offset, settings.source);\n\t\t\t\t\t\t}\n\t\t\t\t\t\treturn {\n\t\t\t\t\t\t\tvalue: array,\n\t\t\t\t\t\t\tindex: index + 1\n\t\t\t\t\t\t};\n\t\t\t\t\t} else if (token.type === tokenTypes.COMMA) {\n\t\t\t\t\t\tstate = arrayStates.COMMA;\n\t\t\t\t\t\tindex++;\n\t\t\t\t\t} else {\n\t\t\t\t\t\terror(parseErrorTypes.unexpectedToken(substring(input, token.loc.start.offset, token.loc.end.offset), settings.source, token.loc.start.line, token.loc.start.column), input, settings.source, token.loc.start.line, token.loc.start.column);\n\t\t\t\t\t}\n\t\t\t\t\tbreak;\n\t\t\t\t}\n\n\t\t\tcase arrayStates.COMMA:\n\t\t\t\t{\n\t\t\t\t\tvar _value = parseValue(input, tokenList, index, settings);\n\t\t\t\t\tindex = _value.index;\n\t\t\t\t\tarray.children.push(_value.value);\n\t\t\t\t\tstate = arrayStates.VALUE;\n\t\t\t\t\tbreak;\n\t\t\t\t}\n\t\t}\n\t}\n\n\terrorEof(input, tokenList, settings);\n}\n\nfunction parseLiteral(input, tokenList, index, settings) {\n\t// literal: STRING | NUMBER | TRUE | FALSE | NULL\n\tvar token = tokenList[index];\n\tvar value = null;\n\n\tswitch (token.type) {\n\t\tcase tokenTypes.STRING:\n\t\t\t{\n\t\t\t\tvalue = parseString(input.slice(token.loc.start.offset + 1, token.loc.end.offset - 1));\n\t\t\t\tbreak;\n\t\t\t}\n\t\tcase tokenTypes.NUMBER:\n\t\t\t{\n\t\t\t\tvalue = Number(token.value);\n\t\t\t\tbreak;\n\t\t\t}\n\t\tcase tokenTypes.TRUE:\n\t\t\t{\n\t\t\t\tvalue = true;\n\t\t\t\tbreak;\n\t\t\t}\n\t\tcase tokenTypes.FALSE:\n\t\t\t{\n\t\t\t\tvalue = false;\n\t\t\t\tbreak;\n\t\t\t}\n\t\tcase tokenTypes.NULL:\n\t\t\t{\n\t\t\t\tvalue = null;\n\t\t\t\tbreak;\n\t\t\t}\n\t\tdefault:\n\t\t\t{\n\t\t\t\treturn null;\n\t\t\t}\n\t}\n\n\tvar literal = {\n\t\ttype: 'Literal',\n\t\tvalue: value,\n\t\traw: token.value\n\t};\n\tif (settings.loc) {\n\t\tliteral.loc = token.loc;\n\t}\n\treturn {\n\t\tvalue: literal,\n\t\tindex: index + 1\n\t};\n}\n\nfunction parseValue(input, tokenList, index, settings) {\n\t// value: literal | object | array\n\tvar token = tokenList[index];\n\n\tvar value = parseLiteral.apply(undefined, arguments) || parseObject.apply(undefined, arguments) || parseArray.apply(undefined, arguments);\n\n\tif (value) {\n\t\treturn value;\n\t} else {\n\t\terror(parseErrorTypes.unexpectedToken(substring(input, token.loc.start.offset, token.loc.end.offset), settings.source, token.loc.start.line, token.loc.start.column), input, settings.source, token.loc.start.line, token.loc.start.column);\n\t}\n}\n\nvar parse$1 = (function (input, settings) {\n\tsettings = Object.assign({}, defaultSettings, settings);\n\n\tvar tokenList = tokenize(input, settings);\n\n\tif (tokenList.length === 0) {\n\t\terrorEof(input, tokenList, settings);\n\t}\n\n\tvar value = parseValue(input, tokenList, 0, settings);\n\n\tif (value.index === tokenList.length) {\n\t\treturn value.value;\n\t}\n\n\tvar token = tokenList[value.index];\n\n\terror(parseErrorTypes.unexpectedToken(substring(input, token.loc.start.offset, token.loc.end.offset), settings.source, token.loc.start.line, token.loc.start.column), input, settings.source, token.loc.start.line, token.loc.start.column);\n});\n\nreturn parse$1;\n\n})));\n","var moment = module.exports = require(\"./moment-timezone\");\nmoment.tz.load(require('./data/packed/latest.json'));\n","//! moment-timezone.js\n//! version : 0.5.48\n//! Copyright (c) JS Foundation and other contributors\n//! license : MIT\n//! github.com/moment/moment-timezone\n\n(function (root, factory) {\n\t\"use strict\";\n\n\t/*global define*/\n\tif (typeof module === 'object' && module.exports) {\n\t\tmodule.exports = factory(require('moment')); // Node\n\t} else if (typeof define === 'function' && define.amd) {\n\t\tdefine(['moment'], factory);                 // AMD\n\t} else {\n\t\tfactory(root.moment);                        // Browser\n\t}\n}(this, function (moment) {\n\t\"use strict\";\n\n\t// Resolves es6 module loading issue\n\tif (moment.version === undefined && moment.default) {\n\t\tmoment = moment.default;\n\t}\n\n\t// Do not load moment-timezone a second time.\n\t// if (moment.tz !== undefined) {\n\t// \tlogError('Moment Timezone ' + moment.tz.version + ' was already loaded ' + (moment.tz.dataVersion ? 'with data from ' : 'without any data') + moment.tz.dataVersion);\n\t// \treturn moment;\n\t// }\n\n\tvar VERSION = \"0.5.48\",\n\t\tzones = {},\n\t\tlinks = {},\n\t\tcountries = {},\n\t\tnames = {},\n\t\tguesses = {},\n\t\tcachedGuess;\n\n\tif (!moment || typeof moment.version !== 'string') {\n\t\tlogError('Moment Timezone requires Moment.js. See https://momentjs.com/timezone/docs/#/use-it/browser/');\n\t}\n\n\tvar momentVersion = moment.version.split('.'),\n\t\tmajor = +momentVersion[0],\n\t\tminor = +momentVersion[1];\n\n\t// Moment.js version check\n\tif (major < 2 || (major === 2 && minor < 6)) {\n\t\tlogError('Moment Timezone requires Moment.js >= 2.6.0. You are using Moment.js ' + moment.version + '. See momentjs.com');\n\t}\n\n\t/************************************\n\t\tUnpacking\n\t************************************/\n\n\tfunction charCodeToInt(charCode) {\n\t\tif (charCode > 96) {\n\t\t\treturn charCode - 87;\n\t\t} else if (charCode > 64) {\n\t\t\treturn charCode - 29;\n\t\t}\n\t\treturn charCode - 48;\n\t}\n\n\tfunction unpackBase60(string) {\n\t\tvar i = 0,\n\t\t\tparts = string.split('.'),\n\t\t\twhole = parts[0],\n\t\t\tfractional = parts[1] || '',\n\t\t\tmultiplier = 1,\n\t\t\tnum,\n\t\t\tout = 0,\n\t\t\tsign = 1;\n\n\t\t// handle negative numbers\n\t\tif (string.charCodeAt(0) === 45) {\n\t\t\ti = 1;\n\t\t\tsign = -1;\n\t\t}\n\n\t\t// handle digits before the decimal\n\t\tfor (i; i < whole.length; i++) {\n\t\t\tnum = charCodeToInt(whole.charCodeAt(i));\n\t\t\tout = 60 * out + num;\n\t\t}\n\n\t\t// handle digits after the decimal\n\t\tfor (i = 0; i < fractional.length; i++) {\n\t\t\tmultiplier = multiplier / 60;\n\t\t\tnum = charCodeToInt(fractional.charCodeAt(i));\n\t\t\tout += num * multiplier;\n\t\t}\n\n\t\treturn out * sign;\n\t}\n\n\tfunction arrayToInt (array) {\n\t\tfor (var i = 0; i < array.length; i++) {\n\t\t\tarray[i] = unpackBase60(array[i]);\n\t\t}\n\t}\n\n\tfunction intToUntil (array, length) {\n\t\tfor (var i = 0; i < length; i++) {\n\t\t\tarray[i] = Math.round((array[i - 1] || 0) + (array[i] * 60000)); // minutes to milliseconds\n\t\t}\n\n\t\tarray[length - 1] = Infinity;\n\t}\n\n\tfunction mapIndices (source, indices) {\n\t\tvar out = [], i;\n\n\t\tfor (i = 0; i < indices.length; i++) {\n\t\t\tout[i] = source[indices[i]];\n\t\t}\n\n\t\treturn out;\n\t}\n\n\tfunction unpack (string) {\n\t\tvar data = string.split('|'),\n\t\t\toffsets = data[2].split(' '),\n\t\t\tindices = data[3].split(''),\n\t\t\tuntils  = data[4].split(' ');\n\n\t\tarrayToInt(offsets);\n\t\tarrayToInt(indices);\n\t\tarrayToInt(untils);\n\n\t\tintToUntil(untils, indices.length);\n\n\t\treturn {\n\t\t\tname       : data[0],\n\t\t\tabbrs      : mapIndices(data[1].split(' '), indices),\n\t\t\toffsets    : mapIndices(offsets, indices),\n\t\t\tuntils     : untils,\n\t\t\tpopulation : data[5] | 0\n\t\t};\n\t}\n\n\t/************************************\n\t\tZone object\n\t************************************/\n\n\tfunction Zone (packedString) {\n\t\tif (packedString) {\n\t\t\tthis._set(unpack(packedString));\n\t\t}\n\t}\n\n\tfunction closest (num, arr) {\n\t\tvar len = arr.length;\n\t\tif (num < arr[0]) {\n\t\t\treturn 0;\n\t\t} else if (len > 1 && arr[len - 1] === Infinity && num >= arr[len - 2]) {\n\t\t\treturn len - 1;\n\t\t} else if (num >= arr[len - 1]) {\n\t\t\treturn -1;\n\t\t}\n\n\t\tvar mid;\n\t\tvar lo = 0;\n\t\tvar hi = len - 1;\n\t\twhile (hi - lo > 1) {\n\t\t\tmid = Math.floor((lo + hi) / 2);\n\t\t\tif (arr[mid] <= num) {\n\t\t\t\tlo = mid;\n\t\t\t} else {\n\t\t\t\thi = mid;\n\t\t\t}\n\t\t}\n\t\treturn hi;\n\t}\n\n\tZone.prototype = {\n\t\t_set : function (unpacked) {\n\t\t\tthis.name       = unpacked.name;\n\t\t\tthis.abbrs      = unpacked.abbrs;\n\t\t\tthis.untils     = unpacked.untils;\n\t\t\tthis.offsets    = unpacked.offsets;\n\t\t\tthis.population = unpacked.population;\n\t\t},\n\n\t\t_index : function (timestamp) {\n\t\t\tvar target = +timestamp,\n\t\t\t\tuntils = this.untils,\n\t\t\t\ti;\n\n\t\t\ti = closest(target, untils);\n\t\t\tif (i >= 0) {\n\t\t\t\treturn i;\n\t\t\t}\n\t\t},\n\n\t\tcountries : function () {\n\t\t\tvar zone_name = this.name;\n\t\t\treturn Object.keys(countries).filter(function (country_code) {\n\t\t\t\treturn countries[country_code].zones.indexOf(zone_name) !== -1;\n\t\t\t});\n\t\t},\n\n\t\tparse : function (timestamp) {\n\t\t\tvar target  = +timestamp,\n\t\t\t\toffsets = this.offsets,\n\t\t\t\tuntils  = this.untils,\n\t\t\t\tmax     = untils.length - 1,\n\t\t\t\toffset, offsetNext, offsetPrev, i;\n\n\t\t\tfor (i = 0; i < max; i++) {\n\t\t\t\toffset     = offsets[i];\n\t\t\t\toffsetNext = offsets[i + 1];\n\t\t\t\toffsetPrev = offsets[i ? i - 1 : i];\n\n\t\t\t\tif (offset < offsetNext && tz.moveAmbiguousForward) {\n\t\t\t\t\toffset = offsetNext;\n\t\t\t\t} else if (offset > offsetPrev && tz.moveInvalidForward) {\n\t\t\t\t\toffset = offsetPrev;\n\t\t\t\t}\n\n\t\t\t\tif (target < untils[i] - (offset * 60000)) {\n\t\t\t\t\treturn offsets[i];\n\t\t\t\t}\n\t\t\t}\n\n\t\t\treturn offsets[max];\n\t\t},\n\n\t\tabbr : function (mom) {\n\t\t\treturn this.abbrs[this._index(mom)];\n\t\t},\n\n\t\toffset : function (mom) {\n\t\t\tlogError(\"zone.offset has been deprecated in favor of zone.utcOffset\");\n\t\t\treturn this.offsets[this._index(mom)];\n\t\t},\n\n\t\tutcOffset : function (mom) {\n\t\t\treturn this.offsets[this._index(mom)];\n\t\t}\n\t};\n\n\t/************************************\n\t\tCountry object\n\t************************************/\n\n\tfunction Country (country_name, zone_names) {\n\t\tthis.name = country_name;\n\t\tthis.zones = zone_names;\n\t}\n\n\t/************************************\n\t\tCurrent Timezone\n\t************************************/\n\n\tfunction OffsetAt(at) {\n\t\tvar timeString = at.toTimeString();\n\t\tvar abbr = timeString.match(/\\([a-z ]+\\)/i);\n\t\tif (abbr && abbr[0]) {\n\t\t\t// 17:56:31 GMT-0600 (CST)\n\t\t\t// 17:56:31 GMT-0600 (Central Standard Time)\n\t\t\tabbr = abbr[0].match(/[A-Z]/g);\n\t\t\tabbr = abbr ? abbr.join('') : undefined;\n\t\t} else {\n\t\t\t// 17:56:31 CST\n\t\t\t// 17:56:31 GMT+0800 (台北標準時間)\n\t\t\tabbr = timeString.match(/[A-Z]{3,5}/g);\n\t\t\tabbr = abbr ? abbr[0] : undefined;\n\t\t}\n\n\t\tif (abbr === 'GMT') {\n\t\t\tabbr = undefined;\n\t\t}\n\n\t\tthis.at = +at;\n\t\tthis.abbr = abbr;\n\t\tthis.offset = at.getTimezoneOffset();\n\t}\n\n\tfunction ZoneScore(zone) {\n\t\tthis.zone = zone;\n\t\tthis.offsetScore = 0;\n\t\tthis.abbrScore = 0;\n\t}\n\n\tZoneScore.prototype.scoreOffsetAt = function (offsetAt) {\n\t\tthis.offsetScore += Math.abs(this.zone.utcOffset(offsetAt.at) - offsetAt.offset);\n\t\tif (this.zone.abbr(offsetAt.at).replace(/[^A-Z]/g, '') !== offsetAt.abbr) {\n\t\t\tthis.abbrScore++;\n\t\t}\n\t};\n\n\tfunction findChange(low, high) {\n\t\tvar mid, diff;\n\n\t\twhile ((diff = ((high.at - low.at) / 12e4 | 0) * 6e4)) {\n\t\t\tmid = new OffsetAt(new Date(low.at + diff));\n\t\t\tif (mid.offset === low.offset) {\n\t\t\t\tlow = mid;\n\t\t\t} else {\n\t\t\t\thigh = mid;\n\t\t\t}\n\t\t}\n\n\t\treturn low;\n\t}\n\n\tfunction userOffsets() {\n\t\tvar startYear = new Date().getFullYear() - 2,\n\t\t\tlast = new OffsetAt(new Date(startYear, 0, 1)),\n\t\t\tlastOffset = last.offset,\n\t\t\toffsets = [last],\n\t\t\tchange, next, nextOffset, i;\n\n\t\tfor (i = 1; i < 48; i++) {\n\t\t\tnextOffset = new Date(startYear, i, 1).getTimezoneOffset();\n\t\t\tif (nextOffset !== lastOffset) {\n\t\t\t\t// Create OffsetAt here to avoid unnecessary abbr parsing before checking offsets\n\t\t\t\tnext = new OffsetAt(new Date(startYear, i, 1));\n\t\t\t\tchange = findChange(last, next);\n\t\t\t\toffsets.push(change);\n\t\t\t\toffsets.push(new OffsetAt(new Date(change.at + 6e4)));\n\t\t\t\tlast = next;\n\t\t\t\tlastOffset = nextOffset;\n\t\t\t}\n\t\t}\n\n\t\tfor (i = 0; i < 4; i++) {\n\t\t\toffsets.push(new OffsetAt(new Date(startYear + i, 0, 1)));\n\t\t\toffsets.push(new OffsetAt(new Date(startYear + i, 6, 1)));\n\t\t}\n\n\t\treturn offsets;\n\t}\n\n\tfunction sortZoneScores (a, b) {\n\t\tif (a.offsetScore !== b.offsetScore) {\n\t\t\treturn a.offsetScore - b.offsetScore;\n\t\t}\n\t\tif (a.abbrScore !== b.abbrScore) {\n\t\t\treturn a.abbrScore - b.abbrScore;\n\t\t}\n\t\tif (a.zone.population !== b.zone.population) {\n\t\t\treturn b.zone.population - a.zone.population;\n\t\t}\n\t\treturn b.zone.name.localeCompare(a.zone.name);\n\t}\n\n\tfunction addToGuesses (name, offsets) {\n\t\tvar i, offset;\n\t\tarrayToInt(offsets);\n\t\tfor (i = 0; i < offsets.length; i++) {\n\t\t\toffset = offsets[i];\n\t\t\tguesses[offset] = guesses[offset] || {};\n\t\t\tguesses[offset][name] = true;\n\t\t}\n\t}\n\n\tfunction guessesForUserOffsets (offsets) {\n\t\tvar offsetsLength = offsets.length,\n\t\t\tfilteredGuesses = {},\n\t\t\tout = [],\n\t\t\tcheckedOffsets = {},\n\t\t\ti, j, offset, guessesOffset;\n\n\t\tfor (i = 0; i < offsetsLength; i++) {\n\t\t\toffset = offsets[i].offset;\n\t\t\tif (checkedOffsets.hasOwnProperty(offset)) {\n\t\t\t\tcontinue;\n\t\t\t}\n\t\t\tguessesOffset = guesses[offset] || {};\n\t\t\tfor (j in guessesOffset) {\n\t\t\t\tif (guessesOffset.hasOwnProperty(j)) {\n\t\t\t\t\tfilteredGuesses[j] = true;\n\t\t\t\t}\n\t\t\t}\n\t\t\tcheckedOffsets[offset] = true;\n\t\t}\n\n\t\tfor (i in filteredGuesses) {\n\t\t\tif (filteredGuesses.hasOwnProperty(i)) {\n\t\t\t\tout.push(names[i]);\n\t\t\t}\n\t\t}\n\n\t\treturn out;\n\t}\n\n\tfunction rebuildGuess () {\n\n\t\t// use Intl API when available and returning valid time zone\n\t\ttry {\n\t\t\tvar intlName = Intl.DateTimeFormat().resolvedOptions().timeZone;\n\t\t\tif (intlName && intlName.length > 3) {\n\t\t\t\tvar name = names[normalizeName(intlName)];\n\t\t\t\tif (name) {\n\t\t\t\t\treturn name;\n\t\t\t\t}\n\t\t\t\tlogError(\"Moment Timezone found \" + intlName + \" from the Intl api, but did not have that data loaded.\");\n\t\t\t}\n\t\t} catch (e) {\n\t\t\t// Intl unavailable, fall back to manual guessing.\n\t\t}\n\n\t\tvar offsets = userOffsets(),\n\t\t\toffsetsLength = offsets.length,\n\t\t\tguesses = guessesForUserOffsets(offsets),\n\t\t\tzoneScores = [],\n\t\t\tzoneScore, i, j;\n\n\t\tfor (i = 0; i < guesses.length; i++) {\n\t\t\tzoneScore = new ZoneScore(getZone(guesses[i]), offsetsLength);\n\t\t\tfor (j = 0; j < offsetsLength; j++) {\n\t\t\t\tzoneScore.scoreOffsetAt(offsets[j]);\n\t\t\t}\n\t\t\tzoneScores.push(zoneScore);\n\t\t}\n\n\t\tzoneScores.sort(sortZoneScores);\n\n\t\treturn zoneScores.length > 0 ? zoneScores[0].zone.name : undefined;\n\t}\n\n\tfunction guess (ignoreCache) {\n\t\tif (!cachedGuess || ignoreCache) {\n\t\t\tcachedGuess = rebuildGuess();\n\t\t}\n\t\treturn cachedGuess;\n\t}\n\n\t/************************************\n\t\tGlobal Methods\n\t************************************/\n\n\tfunction normalizeName (name) {\n\t\treturn (name || '').toLowerCase().replace(/\\//g, '_');\n\t}\n\n\tfunction addZone (packed) {\n\t\tvar i, name, split, normalized;\n\n\t\tif (typeof packed === \"string\") {\n\t\t\tpacked = [packed];\n\t\t}\n\n\t\tfor (i = 0; i < packed.length; i++) {\n\t\t\tsplit = packed[i].split('|');\n\t\t\tname = split[0];\n\t\t\tnormalized = normalizeName(name);\n\t\t\tzones[normalized] = packed[i];\n\t\t\tnames[normalized] = name;\n\t\t\taddToGuesses(normalized, split[2].split(' '));\n\t\t}\n\t}\n\n\tfunction getZone (name, caller) {\n\n\t\tname = normalizeName(name);\n\n\t\tvar zone = zones[name];\n\t\tvar link;\n\n\t\tif (zone instanceof Zone) {\n\t\t\treturn zone;\n\t\t}\n\n\t\tif (typeof zone === 'string') {\n\t\t\tzone = new Zone(zone);\n\t\t\tzones[name] = zone;\n\t\t\treturn zone;\n\t\t}\n\n\t\t// Pass getZone to prevent recursion more than 1 level deep\n\t\tif (links[name] && caller !== getZone && (link = getZone(links[name], getZone))) {\n\t\t\tzone = zones[name] = new Zone();\n\t\t\tzone._set(link);\n\t\t\tzone.name = names[name];\n\t\t\treturn zone;\n\t\t}\n\n\t\treturn null;\n\t}\n\n\tfunction getNames () {\n\t\tvar i, out = [];\n\n\t\tfor (i in names) {\n\t\t\tif (names.hasOwnProperty(i) && (zones[i] || zones[links[i]]) && names[i]) {\n\t\t\t\tout.push(names[i]);\n\t\t\t}\n\t\t}\n\n\t\treturn out.sort();\n\t}\n\n\tfunction getCountryNames () {\n\t\treturn Object.keys(countries);\n\t}\n\n\tfunction addLink (aliases) {\n\t\tvar i, alias, normal0, normal1;\n\n\t\tif (typeof aliases === \"string\") {\n\t\t\taliases = [aliases];\n\t\t}\n\n\t\tfor (i = 0; i < aliases.length; i++) {\n\t\t\talias = aliases[i].split('|');\n\n\t\t\tnormal0 = normalizeName(alias[0]);\n\t\t\tnormal1 = normalizeName(alias[1]);\n\n\t\t\tlinks[normal0] = normal1;\n\t\t\tnames[normal0] = alias[0];\n\n\t\t\tlinks[normal1] = normal0;\n\t\t\tnames[normal1] = alias[1];\n\t\t}\n\t}\n\n\tfunction addCountries (data) {\n\t\tvar i, country_code, country_zones, split;\n\t\tif (!data || !data.length) return;\n\t\tfor (i = 0; i < data.length; i++) {\n\t\t\tsplit = data[i].split('|');\n\t\t\tcountry_code = split[0].toUpperCase();\n\t\t\tcountry_zones = split[1].split(' ');\n\t\t\tcountries[country_code] = new Country(\n\t\t\t\tcountry_code,\n\t\t\t\tcountry_zones\n\t\t\t);\n\t\t}\n\t}\n\n\tfunction getCountry (name) {\n\t\tname = name.toUpperCase();\n\t\treturn countries[name] || null;\n\t}\n\n\tfunction zonesForCountry(country, with_offset) {\n\t\tcountry = getCountry(country);\n\n\t\tif (!country) return null;\n\n\t\tvar zones = country.zones.sort();\n\n\t\tif (with_offset) {\n\t\t\treturn zones.map(function (zone_name) {\n\t\t\t\tvar zone = getZone(zone_name);\n\t\t\t\treturn {\n\t\t\t\t\tname: zone_name,\n\t\t\t\t\toffset: zone.utcOffset(new Date())\n\t\t\t\t};\n\t\t\t});\n\t\t}\n\n\t\treturn zones;\n\t}\n\n\tfunction loadData (data) {\n\t\taddZone(data.zones);\n\t\taddLink(data.links);\n\t\taddCountries(data.countries);\n\t\ttz.dataVersion = data.version;\n\t}\n\n\tfunction zoneExists (name) {\n\t\tif (!zoneExists.didShowError) {\n\t\t\tzoneExists.didShowError = true;\n\t\t\t\tlogError(\"moment.tz.zoneExists('\" + name + \"') has been deprecated in favor of !moment.tz.zone('\" + name + \"')\");\n\t\t}\n\t\treturn !!getZone(name);\n\t}\n\n\tfunction needsOffset (m) {\n\t\tvar isUnixTimestamp = (m._f === 'X' || m._f === 'x');\n\t\treturn !!(m._a && (m._tzm === undefined) && !isUnixTimestamp);\n\t}\n\n\tfunction logError (message) {\n\t\tif (typeof console !== 'undefined' && typeof console.error === 'function') {\n\t\t\tconsole.error(message);\n\t\t}\n\t}\n\n\t/************************************\n\t\tmoment.tz namespace\n\t************************************/\n\n\tfunction tz (input) {\n\t\tvar args = Array.prototype.slice.call(arguments, 0, -1),\n\t\t\tname = arguments[arguments.length - 1],\n\t\t\tout  = moment.utc.apply(null, args),\n\t\t\tzone;\n\n\t\tif (!moment.isMoment(input) && needsOffset(out) && (zone = getZone(name))) {\n\t\t\tout.add(zone.parse(out), 'minutes');\n\t\t}\n\n\t\tout.tz(name);\n\n\t\treturn out;\n\t}\n\n\ttz.version      = VERSION;\n\ttz.dataVersion  = '';\n\ttz._zones       = zones;\n\ttz._links       = links;\n\ttz._names       = names;\n\ttz._countries\t= countries;\n\ttz.add          = addZone;\n\ttz.link         = addLink;\n\ttz.load         = loadData;\n\ttz.zone         = getZone;\n\ttz.zoneExists   = zoneExists; // deprecated in 0.1.0\n\ttz.guess        = guess;\n\ttz.names        = getNames;\n\ttz.Zone         = Zone;\n\ttz.unpack       = unpack;\n\ttz.unpackBase60 = unpackBase60;\n\ttz.needsOffset  = needsOffset;\n\ttz.moveInvalidForward   = true;\n\ttz.moveAmbiguousForward = false;\n\ttz.countries    = getCountryNames;\n\ttz.zonesForCountry = zonesForCountry;\n\n\t/************************************\n\t\tInterface with Moment.js\n\t************************************/\n\n\tvar fn = moment.fn;\n\n\tmoment.tz = tz;\n\n\tmoment.defaultZone = null;\n\n\tmoment.updateOffset = function (mom, keepTime) {\n\t\tvar zone = moment.defaultZone,\n\t\t\toffset;\n\n\t\tif (mom._z === undefined) {\n\t\t\tif (zone && needsOffset(mom) && !mom._isUTC && mom.isValid()) {\n\t\t\t\tmom._d = moment.utc(mom._a)._d;\n\t\t\t\tmom.utc().add(zone.parse(mom), 'minutes');\n\t\t\t}\n\t\t\tmom._z = zone;\n\t\t}\n\t\tif (mom._z) {\n\t\t\toffset = mom._z.utcOffset(mom);\n\t\t\tif (Math.abs(offset) < 16) {\n\t\t\t\toffset = offset / 60;\n\t\t\t}\n\t\t\tif (mom.utcOffset !== undefined) {\n\t\t\t\tvar z = mom._z;\n\t\t\t\tmom.utcOffset(-offset, keepTime);\n\t\t\t\tmom._z = z;\n\t\t\t} else {\n\t\t\t\tmom.zone(offset, keepTime);\n\t\t\t}\n\t\t}\n\t};\n\n\tfn.tz = function (name, keepTime) {\n\t\tif (name) {\n\t\t\tif (typeof name !== 'string') {\n\t\t\t\tthrow new Error('Time zone name must be a string, got ' + name + ' [' + typeof name + ']');\n\t\t\t}\n\t\t\tthis._z = getZone(name);\n\t\t\tif (this._z) {\n\t\t\t\tmoment.updateOffset(this, keepTime);\n\t\t\t} else {\n\t\t\t\tlogError(\"Moment Timezone has no data for \" + name + \". See http://momentjs.com/timezone/docs/#/data-loading/.\");\n\t\t\t}\n\t\t\treturn this;\n\t\t}\n\t\tif (this._z) { return this._z.name; }\n\t};\n\n\tfunction abbrWrap (old) {\n\t\treturn function () {\n\t\t\tif (this._z) { return this._z.abbr(this); }\n\t\t\treturn old.call(this);\n\t\t};\n\t}\n\n\tfunction resetZoneWrap (old) {\n\t\treturn function () {\n\t\t\tthis._z = null;\n\t\t\treturn old.apply(this, arguments);\n\t\t};\n\t}\n\n\tfunction resetZoneWrap2 (old) {\n\t\treturn function () {\n\t\t\tif (arguments.length > 0) this._z = null;\n\t\t\treturn old.apply(this, arguments);\n\t\t};\n\t}\n\n\tfn.zoneName  = abbrWrap(fn.zoneName);\n\tfn.zoneAbbr  = abbrWrap(fn.zoneAbbr);\n\tfn.utc       = resetZoneWrap(fn.utc);\n\tfn.local     = resetZoneWrap(fn.local);\n\tfn.utcOffset = resetZoneWrap2(fn.utcOffset);\n\n\tmoment.tz.setDefault = function(name) {\n\t\tif (major < 2 || (major === 2 && minor < 9)) {\n\t\t\tlogError('Moment Timezone setDefault() requires Moment.js >= 2.9.0. You are using Moment.js ' + moment.version + '.');\n\t\t}\n\t\tmoment.defaultZone = name ? getZone(name) : null;\n\t\treturn moment;\n\t};\n\n\t// Cloning a moment should include the _z property.\n\tvar momentProperties = moment.momentProperties;\n\tif (Object.prototype.toString.call(momentProperties) === '[object Array]') {\n\t\t// moment 2.8.1+\n\t\tmomentProperties.push('_z');\n\t\tmomentProperties.push('_a');\n\t} else if (momentProperties) {\n\t\t// moment 2.7.0\n\t\tmomentProperties._z = null;\n\t}\n\n\t// INJECT DATA\n\n\treturn moment;\n}));\n","//! moment.js locale configuration\n//! locale : Afrikaans [af]\n//! author : Werner Mollentze : https://github.com/wernerm\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 af = moment.defineLocale('af', {\n        months: 'Januarie_Februarie_Maart_April_Mei_Junie_Julie_Augustus_September_Oktober_November_Desember'.split(\n            '_'\n        ),\n        monthsShort: 'Jan_Feb_Mrt_Apr_Mei_Jun_Jul_Aug_Sep_Okt_Nov_Des'.split('_'),\n        weekdays: 'Sondag_Maandag_Dinsdag_Woensdag_Donderdag_Vrydag_Saterdag'.split(\n            '_'\n        ),\n        weekdaysShort: 'Son_Maa_Din_Woe_Don_Vry_Sat'.split('_'),\n        weekdaysMin: 'So_Ma_Di_Wo_Do_Vr_Sa'.split('_'),\n        meridiemParse: /vm|nm/i,\n        isPM: function (input) {\n            return /^nm$/i.test(input);\n        },\n        meridiem: function (hours, minutes, isLower) {\n            if (hours < 12) {\n                return isLower ? 'vm' : 'VM';\n            } else {\n                return isLower ? 'nm' : 'NM';\n            }\n        },\n        longDateFormat: {\n            LT: 'HH:mm',\n            LTS: 'HH:mm:ss',\n            L: 'DD/MM/YYYY',\n            LL: 'D MMMM YYYY',\n            LLL: 'D MMMM YYYY HH:mm',\n            LLLL: 'dddd, D MMMM YYYY HH:mm',\n        },\n        calendar: {\n            sameDay: '[Vandag om] LT',\n            nextDay: '[Môre om] LT',\n            nextWeek: 'dddd [om] LT',\n            lastDay: '[Gister om] LT',\n            lastWeek: '[Laas] dddd [om] LT',\n            sameElse: 'L',\n        },\n        relativeTime: {\n            future: 'oor %s',\n            past: '%s gelede',\n            s: \"'n paar sekondes\",\n            ss: '%d sekondes',\n            m: \"'n minuut\",\n            mm: '%d minute',\n            h: \"'n uur\",\n            hh: '%d ure',\n            d: \"'n dag\",\n            dd: '%d dae',\n            M: \"'n maand\",\n            MM: '%d maande',\n            y: \"'n jaar\",\n            yy: '%d jaar',\n        },\n        dayOfMonthOrdinalParse: /\\d{1,2}(ste|de)/,\n        ordinal: function (number) {\n            return (\n                number +\n                (number === 1 || number === 8 || number >= 20 ? 'ste' : 'de')\n            ); // Thanks to Joris Röling : https://github.com/jjupiter\n        },\n        week: {\n            dow: 1, // Maandag is die eerste dag van die week.\n            doy: 4, // Die week wat die 4de Januarie bevat is die eerste week van die jaar.\n        },\n    });\n\n    return af;\n\n})));\n","//! moment.js locale configuration\n//! locale : Arabic (Algeria) [ar-dz]\n//! author : Amine Roukh: https://github.com/Amine27\n//! author : Abdel Said: https://github.com/abdelsaid\n//! author : Ahmed Elkhatib\n//! author : forabi https://github.com/forabi\n//! author : Noureddine LOUAHEDJ : https://github.com/noureddinem\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 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 arDz = moment.defineLocale('ar-dz', {\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        postformat: function (string) {\n            return string.replace(/,/g, '،');\n        },\n        week: {\n            dow: 0, // Sunday is the first day of the week.\n            doy: 4, // The week that contains Jan 4th is the first week of the year.\n        },\n    });\n\n    return arDz;\n\n})));\n","//! moment.js locale configuration\n//! locale : Arabic (Kuwait) [ar-kw]\n//! author : Nusret Parlak: https://github.com/nusretparlak\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 arKw = moment.defineLocale('ar-kw', {\n        months: 'يناير_فبراير_مارس_أبريل_ماي_يونيو_يوليوز_غشت_شتنبر_أكتوبر_نونبر_دجنبر'.split(\n            '_'\n        ),\n        monthsShort:\n            'يناير_فبراير_مارس_أبريل_ماي_يونيو_يوليوز_غشت_شتنبر_أكتوبر_نونبر_دجنبر'.split(\n                '_'\n            ),\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: 'DD/MM/YYYY',\n            LL: 'D MMMM YYYY',\n            LLL: 'D MMMM YYYY HH:mm',\n            LLLL: 'dddd D MMMM YYYY HH:mm',\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: 'ثوان',\n            ss: '%d ثانية',\n            m: 'دقيقة',\n            mm: '%d دقائق',\n            h: 'ساعة',\n            hh: '%d ساعات',\n            d: 'يوم',\n            dd: '%d أيام',\n            M: 'شهر',\n            MM: '%d أشهر',\n            y: 'سنة',\n            yy: '%d سنوات',\n        },\n        week: {\n            dow: 0, // Sunday 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 arKw;\n\n})));\n","//! moment.js locale configuration\n//! locale : Arabic (Libya) [ar-ly]\n//! author : Ali Hmer: https://github.com/kikoanis\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: '1',\n            2: '2',\n            3: '3',\n            4: '4',\n            5: '5',\n            6: '6',\n            7: '7',\n            8: '8',\n            9: '9',\n            0: '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 arLy = moment.defineLocale('ar-ly', {\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.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 arLy;\n\n})));\n","//! moment.js locale configuration\n//! locale : Arabic (Morocco) [ar-ma]\n//! author : ElFadili Yassine : https://github.com/ElFadiliY\n//! author : Abdel Said : https://github.com/abdelsaid\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 arMa = moment.defineLocale('ar-ma', {\n        months: 'يناير_فبراير_مارس_أبريل_ماي_يونيو_يوليوز_غشت_شتنبر_أكتوبر_نونبر_دجنبر'.split(\n            '_'\n        ),\n        monthsShort:\n            'يناير_فبراير_مارس_أبريل_ماي_يونيو_يوليوز_غشت_شتنبر_أكتوبر_نونبر_دجنبر'.split(\n                '_'\n            ),\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: 'DD/MM/YYYY',\n            LL: 'D MMMM YYYY',\n            LLL: 'D MMMM YYYY HH:mm',\n            LLLL: 'dddd D MMMM YYYY HH:mm',\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: 'ثوان',\n            ss: '%d ثانية',\n            m: 'دقيقة',\n            mm: '%d دقائق',\n            h: 'ساعة',\n            hh: '%d ساعات',\n            d: 'يوم',\n            dd: '%d أيام',\n            M: 'شهر',\n            MM: '%d أشهر',\n            y: 'سنة',\n            yy: '%d سنوات',\n        },\n        week: {\n            dow: 1, // Monday is the first day of the week.\n            doy: 4, // The week that contains Jan 4th is the first week of the year.\n        },\n    });\n\n    return arMa;\n\n})));\n","//! moment.js locale configuration\n//! locale : Arabic (Palestine) [ar-ps]\n//! author : Majd Al-Shihabi : https://github.com/majdal\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\n    var arPs = moment.defineLocale('ar-ps', {\n        months: 'كانون الثاني_شباط_آذار_نيسان_أيّار_حزيران_تمّوز_آب_أيلول_تشري الأوّل_تشرين الثاني_كانون الأوّل'.split(\n            '_'\n        ),\n        monthsShort:\n            'ك٢_شباط_آذار_نيسان_أيّار_حزيران_تمّوز_آب_أيلول_ت١_ت٢_ك١'.split('_'),\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: 'DD/MM/YYYY',\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: 'ثوان',\n            ss: '%d ثانية',\n            m: 'دقيقة',\n            mm: '%d دقائق',\n            h: 'ساعة',\n            hh: '%d ساعات',\n            d: 'يوم',\n            dd: '%d أيام',\n            M: 'شهر',\n            MM: '%d أشهر',\n            y: 'سنة',\n            yy: '%d سنوات',\n        },\n        preparse: function (string) {\n            return string\n                .replace(/[٣٤٥٦٧٨٩٠]/g, function (match) {\n                    return numberMap[match];\n                })\n                .split('') // reversed since negative lookbehind not supported everywhere\n                .reverse()\n                .join('')\n                .replace(/[١٢](?![\\u062a\\u0643])/g, function (match) {\n                    return numberMap[match];\n                })\n                .split('')\n                .reverse()\n                .join('')\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: 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\n    return arPs;\n\n})));\n","//! moment.js locale configuration\n//! locale : Arabic (Saudi Arabia) [ar-sa]\n//! author : Suhail Alkowaileet : https://github.com/xsoh\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\n    var arSa = moment.defineLocale('ar-sa', {\n        months: 'يناير_فبراير_مارس_أبريل_مايو_يونيو_يوليو_أغسطس_سبتمبر_أكتوبر_نوفمبر_ديسمبر'.split(\n            '_'\n        ),\n        monthsShort:\n            'يناير_فبراير_مارس_أبريل_مايو_يونيو_يوليو_أغسطس_سبتمبر_أكتوبر_نوفمبر_ديسمبر'.split(\n                '_'\n            ),\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: 'DD/MM/YYYY',\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: 'ثوان',\n            ss: '%d ثانية',\n            m: 'دقيقة',\n            mm: '%d دقائق',\n            h: 'ساعة',\n            hh: '%d ساعات',\n            d: 'يوم',\n            dd: '%d أيام',\n            M: 'شهر',\n            MM: '%d أشهر',\n            y: 'سنة',\n            yy: '%d سنوات',\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: 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\n    return arSa;\n\n})));\n","//! moment.js locale configuration\n//! locale  :  Arabic (Tunisia) [ar-tn]\n//! author : Nader Toukabri : https://github.com/naderio\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 arTn = moment.defineLocale('ar-tn', {\n        months: 'جانفي_فيفري_مارس_أفريل_ماي_جوان_جويلية_أوت_سبتمبر_أكتوبر_نوفمبر_ديسمبر'.split(\n            '_'\n        ),\n        monthsShort:\n            'جانفي_فيفري_مارس_أفريل_ماي_جوان_جويلية_أوت_سبتمبر_أكتوبر_نوفمبر_ديسمبر'.split(\n                '_'\n            ),\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: 'DD/MM/YYYY',\n            LL: 'D MMMM YYYY',\n            LLL: 'D MMMM YYYY HH:mm',\n            LLLL: 'dddd D MMMM YYYY HH:mm',\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: 'ثوان',\n            ss: '%d ثانية',\n            m: 'دقيقة',\n            mm: '%d دقائق',\n            h: 'ساعة',\n            hh: '%d ساعات',\n            d: 'يوم',\n            dd: '%d أيام',\n            M: 'شهر',\n            MM: '%d أشهر',\n            y: 'سنة',\n            yy: '%d سنوات',\n        },\n        week: {\n            dow: 1, // Monday is the first day of the week.\n            doy: 4, // The week that contains Jan 4th is the first week of the year.\n        },\n    });\n\n    return arTn;\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 locale configuration\n//! locale : Azerbaijani [az]\n//! author : topchiyev : https://github.com/topchiyev\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 suffixes = {\n        1: '-inci',\n        5: '-inci',\n        8: '-inci',\n        70: '-inci',\n        80: '-inci',\n        2: '-nci',\n        7: '-nci',\n        20: '-nci',\n        50: '-nci',\n        3: '-üncü',\n        4: '-üncü',\n        100: '-üncü',\n        6: '-ncı',\n        9: '-uncu',\n        10: '-uncu',\n        30: '-uncu',\n        60: '-ıncı',\n        90: '-ıncı',\n    };\n\n    var az = moment.defineLocale('az', {\n        months: 'yanvar_fevral_mart_aprel_may_iyun_iyul_avqust_sentyabr_oktyabr_noyabr_dekabr'.split(\n            '_'\n        ),\n        monthsShort: 'yan_fev_mar_apr_may_iyn_iyl_avq_sen_okt_noy_dek'.split('_'),\n        weekdays:\n            'Bazar_Bazar ertəsi_Çərşənbə axşamı_Çərşənbə_Cümə axşamı_Cümə_Şənbə'.split(\n                '_'\n            ),\n        weekdaysShort: 'Baz_BzE_ÇAx_Çər_CAx_Cüm_Şən'.split('_'),\n        weekdaysMin: 'Bz_BE_ÇA_Çə_CA_Cü_Şə'.split('_'),\n        weekdaysParseExact: true,\n        longDateFormat: {\n            LT: 'HH:mm',\n            LTS: 'HH:mm:ss',\n            L: 'DD.MM.YYYY',\n            LL: 'D MMMM YYYY',\n            LLL: 'D MMMM YYYY HH:mm',\n            LLLL: 'dddd, D MMMM YYYY HH:mm',\n        },\n        calendar: {\n            sameDay: '[bugün saat] LT',\n            nextDay: '[sabah saat] LT',\n            nextWeek: '[gələn həftə] dddd [saat] LT',\n            lastDay: '[dünən] LT',\n            lastWeek: '[keçən həftə] dddd [saat] LT',\n            sameElse: 'L',\n        },\n        relativeTime: {\n            future: '%s sonra',\n            past: '%s əvvəl',\n            s: 'bir neçə saniyə',\n            ss: '%d saniyə',\n            m: 'bir dəqiqə',\n            mm: '%d dəqiqə',\n            h: 'bir saat',\n            hh: '%d saat',\n            d: 'bir gün',\n            dd: '%d gün',\n            M: 'bir ay',\n            MM: '%d ay',\n            y: 'bir il',\n            yy: '%d il',\n        },\n        meridiemParse: /gecə|səhər|gündüz|axşam/,\n        isPM: function (input) {\n            return /^(gündüz|axşam)$/.test(input);\n        },\n        meridiem: function (hour, minute, isLower) {\n            if (hour < 4) {\n                return 'gecə';\n            } else if (hour < 12) {\n                return 'səhər';\n            } else if (hour < 17) {\n                return 'gündüz';\n            } else {\n                return 'axşam';\n            }\n        },\n        dayOfMonthOrdinalParse: /\\d{1,2}-(ıncı|inci|nci|üncü|ncı|uncu)/,\n        ordinal: function (number) {\n            if (number === 0) {\n                // special case for zero\n                return number + '-ıncı';\n            }\n            var a = number % 10,\n                b = (number % 100) - a,\n                c = number >= 100 ? 100 : null;\n            return number + (suffixes[a] || suffixes[b] || suffixes[c]);\n        },\n        week: {\n            dow: 1, // Monday is the first day of the week.\n            doy: 7, // The week that contains Jan 7th is the first week of the year.\n        },\n    });\n\n    return az;\n\n})));\n","//! moment.js locale configuration\n//! locale : Belarusian [be]\n//! author : Dmitry Demidov : https://github.com/demidov91\n//! author: Praleska: http://praleska.pro/\n//! Author : Menelion Elensúle : https://github.com/Oire\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    function plural(word, num) {\n        var forms = word.split('_');\n        return num % 10 === 1 && num % 100 !== 11\n            ? forms[0]\n            : num % 10 >= 2 && num % 10 <= 4 && (num % 100 < 10 || num % 100 >= 20)\n              ? forms[1]\n              : forms[2];\n    }\n    function relativeTimeWithPlural(number, withoutSuffix, key) {\n        var format = {\n            ss: withoutSuffix ? 'секунда_секунды_секунд' : 'секунду_секунды_секунд',\n            mm: withoutSuffix ? 'хвіліна_хвіліны_хвілін' : 'хвіліну_хвіліны_хвілін',\n            hh: withoutSuffix ? 'гадзіна_гадзіны_гадзін' : 'гадзіну_гадзіны_гадзін',\n            dd: 'дзень_дні_дзён',\n            MM: 'месяц_месяцы_месяцаў',\n            yy: 'год_гады_гадоў',\n        };\n        if (key === 'm') {\n            return withoutSuffix ? 'хвіліна' : 'хвіліну';\n        } else if (key === 'h') {\n            return withoutSuffix ? 'гадзіна' : 'гадзіну';\n        } else {\n            return number + ' ' + plural(format[key], +number);\n        }\n    }\n\n    var be = moment.defineLocale('be', {\n        months: {\n            format: 'студзеня_лютага_сакавіка_красавіка_траўня_чэрвеня_ліпеня_жніўня_верасня_кастрычніка_лістапада_снежня'.split(\n                '_'\n            ),\n            standalone:\n                'студзень_люты_сакавік_красавік_травень_чэрвень_ліпень_жнівень_верасень_кастрычнік_лістапад_снежань'.split(\n                    '_'\n                ),\n        },\n        monthsShort:\n            'студ_лют_сак_крас_трав_чэрв_ліп_жнів_вер_каст_ліст_снеж'.split('_'),\n        weekdays: {\n            format: 'нядзелю_панядзелак_аўторак_сераду_чацвер_пятніцу_суботу'.split(\n                '_'\n            ),\n            standalone:\n                'нядзеля_панядзелак_аўторак_серада_чацвер_пятніца_субота'.split(\n                    '_'\n                ),\n            isFormat: /\\[ ?[Ууў] ?(?:мінулую|наступную)? ?\\] ?dddd/,\n        },\n        weekdaysShort: 'нд_пн_ат_ср_чц_пт_сб'.split('_'),\n        weekdaysMin: 'нд_пн_ат_ср_чц_пт_сб'.split('_'),\n        longDateFormat: {\n            LT: 'HH:mm',\n            LTS: 'HH:mm:ss',\n            L: 'DD.MM.YYYY',\n            LL: 'D MMMM YYYY г.',\n            LLL: 'D MMMM YYYY г., HH:mm',\n            LLLL: 'dddd, D MMMM YYYY г., HH:mm',\n        },\n        calendar: {\n            sameDay: '[Сёння ў] LT',\n            nextDay: '[Заўтра ў] LT',\n            lastDay: '[Учора ў] LT',\n            nextWeek: function () {\n                return '[У] dddd [ў] LT';\n            },\n            lastWeek: function () {\n                switch (this.day()) {\n                    case 0:\n                    case 3:\n                    case 5:\n                    case 6:\n                        return '[У мінулую] dddd [ў] LT';\n                    case 1:\n                    case 2:\n                    case 4:\n                        return '[У мінулы] dddd [ў] LT';\n                }\n            },\n            sameElse: 'L',\n        },\n        relativeTime: {\n            future: 'праз %s',\n            past: '%s таму',\n            s: 'некалькі секунд',\n            m: relativeTimeWithPlural,\n            mm: relativeTimeWithPlural,\n            h: relativeTimeWithPlural,\n            hh: relativeTimeWithPlural,\n            d: 'дзень',\n            dd: relativeTimeWithPlural,\n            M: 'месяц',\n            MM: relativeTimeWithPlural,\n            y: 'год',\n            yy: relativeTimeWithPlural,\n        },\n        meridiemParse: /ночы|раніцы|дня|вечара/,\n        isPM: function (input) {\n            return /^(дня|вечара)$/.test(input);\n        },\n        meridiem: function (hour, minute, isLower) {\n            if (hour < 4) {\n                return 'ночы';\n            } else if (hour < 12) {\n                return 'раніцы';\n            } else if (hour < 17) {\n                return 'дня';\n            } else {\n                return 'вечара';\n            }\n        },\n        dayOfMonthOrdinalParse: /\\d{1,2}-(і|ы|га)/,\n        ordinal: function (number, period) {\n            switch (period) {\n                case 'M':\n                case 'd':\n                case 'DDD':\n                case 'w':\n                case 'W':\n                    return (number % 10 === 2 || number % 10 === 3) &&\n                        number % 100 !== 12 &&\n                        number % 100 !== 13\n                        ? number + '-і'\n                        : number + '-ы';\n                case 'D':\n                    return number + '-га';\n                default:\n                    return number;\n            }\n        },\n        week: {\n            dow: 1, // Monday is the first day of the week.\n            doy: 7, // The week that contains Jan 7th is the first week of the year.\n        },\n    });\n\n    return be;\n\n})));\n","//! moment.js locale configuration\n//! locale : Bulgarian [bg]\n//! author : Krasen Borisov : https://github.com/kraz\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 bg = moment.defineLocale('bg', {\n        months: 'януари_февруари_март_април_май_юни_юли_август_септември_октомври_ноември_декември'.split(\n            '_'\n        ),\n        monthsShort: 'яну_фев_мар_апр_май_юни_юли_авг_сеп_окт_ное_дек'.split('_'),\n        weekdays: 'неделя_понеделник_вторник_сряда_четвъртък_петък_събота'.split(\n            '_'\n        ),\n        weekdaysShort: 'нед_пон_вто_сря_чет_пет_съб'.split('_'),\n        weekdaysMin: 'нд_пн_вт_ср_чт_пт_сб'.split('_'),\n        longDateFormat: {\n            LT: 'H:mm',\n            LTS: 'H:mm:ss',\n            L: 'D.MM.YYYY',\n            LL: 'D MMMM YYYY',\n            LLL: 'D MMMM YYYY H:mm',\n            LLLL: 'dddd, D MMMM YYYY H:mm',\n        },\n        calendar: {\n            sameDay: '[Днес в] LT',\n            nextDay: '[Утре в] LT',\n            nextWeek: 'dddd [в] LT',\n            lastDay: '[Вчера в] LT',\n            lastWeek: function () {\n                switch (this.day()) {\n                    case 0:\n                    case 3:\n                    case 6:\n                        return '[Миналата] dddd [в] LT';\n                    case 1:\n                    case 2:\n                    case 4:\n                    case 5:\n                        return '[Миналия] dddd [в] LT';\n                }\n            },\n            sameElse: 'L',\n        },\n        relativeTime: {\n            future: 'след %s',\n            past: 'преди %s',\n            s: 'няколко секунди',\n            ss: '%d секунди',\n            m: 'минута',\n            mm: '%d минути',\n            h: 'час',\n            hh: '%d часа',\n            d: 'ден',\n            dd: '%d дена',\n            w: 'седмица',\n            ww: '%d седмици',\n            M: 'месец',\n            MM: '%d месеца',\n            y: 'година',\n            yy: '%d години',\n        },\n        dayOfMonthOrdinalParse: /\\d{1,2}-(ев|ен|ти|ви|ри|ми)/,\n        ordinal: function (number) {\n            var lastDigit = number % 10,\n                last2Digits = number % 100;\n            if (number === 0) {\n                return number + '-ев';\n            } else if (last2Digits === 0) {\n                return number + '-ен';\n            } else if (last2Digits > 10 && last2Digits < 20) {\n                return number + '-ти';\n            } else if (lastDigit === 1) {\n                return number + '-ви';\n            } else if (lastDigit === 2) {\n                return number + '-ри';\n            } else if (lastDigit === 7 || lastDigit === 8) {\n                return number + '-ми';\n            } else {\n                return number + '-ти';\n            }\n        },\n        week: {\n            dow: 1, // Monday is the first day of the week.\n            doy: 7, // The week that contains Jan 7th is the first week of the year.\n        },\n    });\n\n    return bg;\n\n})));\n","//! moment.js locale configuration\n//! locale : Bambara [bm]\n//! author : Estelle Comment : https://github.com/estellecomment\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 bm = moment.defineLocale('bm', {\n        months: 'Zanwuyekalo_Fewuruyekalo_Marisikalo_Awirilikalo_Mɛkalo_Zuwɛnkalo_Zuluyekalo_Utikalo_Sɛtanburukalo_ɔkutɔburukalo_Nowanburukalo_Desanburukalo'.split(\n            '_'\n        ),\n        monthsShort: 'Zan_Few_Mar_Awi_Mɛ_Zuw_Zul_Uti_Sɛt_ɔku_Now_Des'.split('_'),\n        weekdays: 'Kari_Ntɛnɛn_Tarata_Araba_Alamisa_Juma_Sibiri'.split('_'),\n        weekdaysShort: 'Kar_Ntɛ_Tar_Ara_Ala_Jum_Sib'.split('_'),\n        weekdaysMin: 'Ka_Nt_Ta_Ar_Al_Ju_Si'.split('_'),\n        longDateFormat: {\n            LT: 'HH:mm',\n            LTS: 'HH:mm:ss',\n            L: 'DD/MM/YYYY',\n            LL: 'MMMM [tile] D [san] YYYY',\n            LLL: 'MMMM [tile] D [san] YYYY [lɛrɛ] HH:mm',\n            LLLL: 'dddd MMMM [tile] D [san] YYYY [lɛrɛ] HH:mm',\n        },\n        calendar: {\n            sameDay: '[Bi lɛrɛ] LT',\n            nextDay: '[Sini lɛrɛ] LT',\n            nextWeek: 'dddd [don lɛrɛ] LT',\n            lastDay: '[Kunu lɛrɛ] LT',\n            lastWeek: 'dddd [tɛmɛnen lɛrɛ] LT',\n            sameElse: 'L',\n        },\n        relativeTime: {\n            future: '%s kɔnɔ',\n            past: 'a bɛ %s bɔ',\n            s: 'sanga dama dama',\n            ss: 'sekondi %d',\n            m: 'miniti kelen',\n            mm: 'miniti %d',\n            h: 'lɛrɛ kelen',\n            hh: 'lɛrɛ %d',\n            d: 'tile kelen',\n            dd: 'tile %d',\n            M: 'kalo kelen',\n            MM: 'kalo %d',\n            y: 'san kelen',\n            yy: 'san %d',\n        },\n        week: {\n            dow: 1, // Monday is the first day of the week.\n            doy: 4, // The week that contains Jan 4th is the first week of the year.\n        },\n    });\n\n    return bm;\n\n})));\n","//! moment.js locale configuration\n//! locale : Bengali (Bangladesh) [bn-bd]\n//! author : Asraf Hossain Patoary : https://github.com/ashwoolford\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\n    var bnBd = moment.defineLocale('bn-bd', {\n        months: 'জানুয়ারি_ফেব্রুয়ারি_মার্চ_এপ্রিল_মে_জুন_জুলাই_আগস্ট_সেপ্টেম্বর_অক্টোবর_নভেম্বর_ডিসেম্বর'.split(\n            '_'\n        ),\n        monthsShort:\n            'জানু_ফেব্রু_মার্চ_এপ্রিল_মে_জুন_জুলাই_আগস্ট_সেপ্ট_অক্টো_নভে_ডিসে'.split(\n                '_'\n            ),\n        weekdays: 'রবিবার_সোমবার_মঙ্গলবার_বুধবার_বৃহস্পতিবার_শুক্রবার_শনিবার'.split(\n            '_'\n        ),\n        weekdaysShort: 'রবি_সোম_মঙ্গল_বুধ_বৃহস্পতি_শুক্র_শনি'.split('_'),\n        weekdaysMin: 'রবি_সোম_মঙ্গল_বুধ_বৃহ_শুক্র_শনি'.split('_'),\n        longDateFormat: {\n            LT: 'A h:mm সময়',\n            LTS: 'A h:mm:ss সময়',\n            L: 'DD/MM/YYYY',\n            LL: 'D MMMM YYYY',\n            LLL: 'D MMMM YYYY, A h:mm সময়',\n            LLLL: 'dddd, D MMMM YYYY, A h:mm সময়',\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: 'কয়েক সেকেন্ড',\n            ss: '%d সেকেন্ড',\n            m: 'এক মিনিট',\n            mm: '%d মিনিট',\n            h: 'এক ঘন্টা',\n            hh: '%d ঘন্টা',\n            d: 'এক দিন',\n            dd: '%d দিন',\n            M: 'এক মাস',\n            MM: '%d মাস',\n            y: 'এক বছর',\n            yy: '%d বছর',\n        },\n        preparse: function (string) {\n            return string.replace(/[১২৩৪৫৬৭৮৯০]/g, function (match) {\n                return numberMap[match];\n            });\n        },\n        postformat: function (string) {\n            return string.replace(/\\d/g, function (match) {\n                return symbolMap[match];\n            });\n        },\n\n        meridiemParse: /রাত|ভোর|সকাল|দুপুর|বিকাল|সন্ধ্যা|রাত/,\n        meridiemHour: function (hour, meridiem) {\n            if (hour === 12) {\n                hour = 0;\n            }\n            if (meridiem === 'রাত') {\n                return hour < 4 ? hour : hour + 12;\n            } else if (meridiem === 'ভোর') {\n                return hour;\n            } else if (meridiem === 'সকাল') {\n                return hour;\n            } else if (meridiem === 'দুপুর') {\n                return hour >= 3 ? hour : hour + 12;\n            } else if (meridiem === 'বিকাল') {\n                return hour + 12;\n            } else if (meridiem === 'সন্ধ্যা') {\n                return hour + 12;\n            }\n        },\n\n        meridiem: function (hour, minute, isLower) {\n            if (hour < 4) {\n                return 'রাত';\n            } else if (hour < 6) {\n                return 'ভোর';\n            } else if (hour < 12) {\n                return 'সকাল';\n            } else if (hour < 15) {\n                return 'দুপুর';\n            } else if (hour < 18) {\n                return 'বিকাল';\n            } else if (hour < 20) {\n                return 'সন্ধ্যা';\n            } else {\n                return 'রাত';\n            }\n        },\n        week: {\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\n    return bnBd;\n\n})));\n","//! moment.js locale configuration\n//! locale : Bengali [bn]\n//! author : Kaushik Gandhi : https://github.com/kaushikgandhi\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\n    var bn = moment.defineLocale('bn', {\n        months: 'জানুয়ারি_ফেব্রুয়ারি_মার্চ_এপ্রিল_মে_জুন_জুলাই_আগস্ট_সেপ্টেম্বর_অক্টোবর_নভেম্বর_ডিসেম্বর'.split(\n            '_'\n        ),\n        monthsShort:\n            'জানু_ফেব্রু_মার্চ_এপ্রিল_মে_জুন_জুলাই_আগস্ট_সেপ্ট_অক্টো_নভে_ডিসে'.split(\n                '_'\n            ),\n        weekdays: 'রবিবার_সোমবার_মঙ্গলবার_বুধবার_বৃহস্পতিবার_শুক্রবার_শনিবার'.split(\n            '_'\n        ),\n        weekdaysShort: 'রবি_সোম_মঙ্গল_বুধ_বৃহস্পতি_শুক্র_শনি'.split('_'),\n        weekdaysMin: 'রবি_সোম_মঙ্গল_বুধ_বৃহ_শুক্র_শনি'.split('_'),\n        longDateFormat: {\n            LT: 'A h:mm সময়',\n            LTS: 'A h:mm:ss সময়',\n            L: 'DD/MM/YYYY',\n            LL: 'D MMMM YYYY',\n            LLL: 'D MMMM YYYY, A h:mm সময়',\n            LLLL: 'dddd, D MMMM YYYY, A h:mm সময়',\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: 'কয়েক সেকেন্ড',\n            ss: '%d সেকেন্ড',\n            m: 'এক মিনিট',\n            mm: '%d মিনিট',\n            h: 'এক ঘন্টা',\n            hh: '%d ঘন্টা',\n            d: 'এক দিন',\n            dd: '%d দিন',\n            M: 'এক মাস',\n            MM: '%d মাস',\n            y: 'এক বছর',\n            yy: '%d বছর',\n        },\n        preparse: function (string) {\n            return string.replace(/[১২৩৪৫৬৭৮৯০]/g, function (match) {\n                return numberMap[match];\n            });\n        },\n        postformat: function (string) {\n            return string.replace(/\\d/g, function (match) {\n                return symbolMap[match];\n            });\n        },\n        meridiemParse: /রাত|সকাল|দুপুর|বিকাল|রাত/,\n        meridiemHour: function (hour, meridiem) {\n            if (hour === 12) {\n                hour = 0;\n            }\n            if (\n                (meridiem === 'রাত' && hour >= 4) ||\n                (meridiem === 'দুপুর' && hour < 5) ||\n                meridiem === 'বিকাল'\n            ) {\n                return hour + 12;\n            } else {\n                return hour;\n            }\n        },\n        meridiem: function (hour, minute, isLower) {\n            if (hour < 4) {\n                return 'রাত';\n            } else if (hour < 10) {\n                return 'সকাল';\n            } else if (hour < 17) {\n                return 'দুপুর';\n            } else if (hour < 20) {\n                return 'বিকাল';\n            } else {\n                return 'রাত';\n            }\n        },\n        week: {\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\n    return bn;\n\n})));\n","//! moment.js locale configuration\n//! locale : Tibetan [bo]\n//! author : Thupten N. Chakrishar : https://github.com/vajradog\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\n    var bo = moment.defineLocale('bo', {\n        months: 'ཟླ་བ་དང་པོ_ཟླ་བ་གཉིས་པ_ཟླ་བ་གསུམ་པ_ཟླ་བ་བཞི་པ_ཟླ་བ་ལྔ་པ_ཟླ་བ་དྲུག་པ_ཟླ་བ་བདུན་པ_ཟླ་བ་བརྒྱད་པ_ཟླ་བ་དགུ་པ_ཟླ་བ་བཅུ་པ_ཟླ་བ་བཅུ་གཅིག་པ_ཟླ་བ་བཅུ་གཉིས་པ'.split(\n            '_'\n        ),\n        monthsShort:\n            'ཟླ་1_ཟླ་2_ཟླ་3_ཟླ་4_ཟླ་5_ཟླ་6_ཟླ་7_ཟླ་8_ཟླ་9_ཟླ་10_ཟླ་11_ཟླ་12'.split(\n                '_'\n            ),\n        monthsShortRegex: /^(ཟླ་\\d{1,2})/,\n        monthsParseExact: true,\n        weekdays:\n            'གཟའ་ཉི་མ་_གཟའ་ཟླ་བ་_གཟའ་མིག་དམར་_གཟའ་ལྷག་པ་_གཟའ་ཕུར་བུ_གཟའ་པ་སངས་_གཟའ་སྤེན་པ་'.split(\n                '_'\n            ),\n        weekdaysShort: 'ཉི་མ་_ཟླ་བ་_མིག་དམར་_ལྷག་པ་_ཕུར་བུ_པ་སངས་_སྤེན་པ་'.split(\n            '_'\n        ),\n        weekdaysMin: 'ཉི_ཟླ_མིག_ལྷག_ཕུར_སངས_སྤེན'.split('_'),\n        longDateFormat: {\n            LT: 'A h:mm',\n            LTS: 'A h:mm:ss',\n            L: 'DD/MM/YYYY',\n            LL: 'D MMMM YYYY',\n            LLL: 'D MMMM YYYY, A h:mm',\n            LLLL: 'dddd, D MMMM YYYY, A h:mm',\n        },\n        calendar: {\n            sameDay: '[དི་རིང] LT',\n            nextDay: '[སང་ཉིན] LT',\n            nextWeek: '[བདུན་ཕྲག་རྗེས་མ], LT',\n            lastDay: '[ཁ་སང] LT',\n            lastWeek: '[བདུན་ཕྲག་མཐའ་མ] dddd, LT',\n            sameElse: 'L',\n        },\n        relativeTime: {\n            future: '%s ལ་',\n            past: '%s སྔན་ལ',\n            s: 'ལམ་སང',\n            ss: '%d སྐར་ཆ།',\n            m: 'སྐར་མ་གཅིག',\n            mm: '%d སྐར་མ',\n            h: 'ཆུ་ཚོད་གཅིག',\n            hh: '%d ཆུ་ཚོད',\n            d: 'ཉིན་གཅིག',\n            dd: '%d ཉིན་',\n            M: 'ཟླ་བ་གཅིག',\n            MM: '%d ཟླ་བ',\n            y: 'ལོ་གཅིག',\n            yy: '%d ལོ',\n        },\n        preparse: function (string) {\n            return string.replace(/[༡༢༣༤༥༦༧༨༩༠]/g, function (match) {\n                return numberMap[match];\n            });\n        },\n        postformat: function (string) {\n            return string.replace(/\\d/g, function (match) {\n                return symbolMap[match];\n            });\n        },\n        meridiemParse: /མཚན་མོ|ཞོགས་ཀས|ཉིན་གུང|དགོང་དག|མཚན་མོ/,\n        meridiemHour: function (hour, meridiem) {\n            if (hour === 12) {\n                hour = 0;\n            }\n            if (\n                (meridiem === 'མཚན་མོ' && hour >= 4) ||\n                (meridiem === 'ཉིན་གུང' && hour < 5) ||\n                meridiem === 'དགོང་དག'\n            ) {\n                return hour + 12;\n            } else {\n                return hour;\n            }\n        },\n        meridiem: function (hour, minute, isLower) {\n            if (hour < 4) {\n                return 'མཚན་མོ';\n            } else if (hour < 10) {\n                return 'ཞོགས་ཀས';\n            } else if (hour < 17) {\n                return 'ཉིན་གུང';\n            } else if (hour < 20) {\n                return 'དགོང་དག';\n            } else {\n                return 'མཚན་མོ';\n            }\n        },\n        week: {\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\n    return bo;\n\n})));\n","//! moment.js locale configuration\n//! locale : Breton [br]\n//! author : Jean-Baptiste Le Duigou : https://github.com/jbleduigou\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    function relativeTimeWithMutation(number, withoutSuffix, key) {\n        var format = {\n            mm: 'munutenn',\n            MM: 'miz',\n            dd: 'devezh',\n        };\n        return number + ' ' + mutation(format[key], number);\n    }\n    function specialMutationForYears(number) {\n        switch (lastNumber(number)) {\n            case 1:\n            case 3:\n            case 4:\n            case 5:\n            case 9:\n                return number + ' bloaz';\n            default:\n                return number + ' vloaz';\n        }\n    }\n    function lastNumber(number) {\n        if (number > 9) {\n            return lastNumber(number % 10);\n        }\n        return number;\n    }\n    function mutation(text, number) {\n        if (number === 2) {\n            return softMutation(text);\n        }\n        return text;\n    }\n    function softMutation(text) {\n        var mutationTable = {\n            m: 'v',\n            b: 'v',\n            d: 'z',\n        };\n        if (mutationTable[text.charAt(0)] === undefined) {\n            return text;\n        }\n        return mutationTable[text.charAt(0)] + text.substring(1);\n    }\n\n    var monthsParse = [\n            /^gen/i,\n            /^c[ʼ\\']hwe/i,\n            /^meu/i,\n            /^ebr/i,\n            /^mae/i,\n            /^(mez|eve)/i,\n            /^gou/i,\n            /^eos/i,\n            /^gwe/i,\n            /^her/i,\n            /^du/i,\n            /^ker/i,\n        ],\n        monthsRegex =\n            /^(genver|c[ʼ\\']hwevrer|meurzh|ebrel|mae|mezheven|gouere|eost|gwengolo|here|du|kerzu|gen|c[ʼ\\']hwe|meu|ebr|mae|eve|gou|eos|gwe|her|du|ker)/i,\n        monthsStrictRegex =\n            /^(genver|c[ʼ\\']hwevrer|meurzh|ebrel|mae|mezheven|gouere|eost|gwengolo|here|du|kerzu)/i,\n        monthsShortStrictRegex =\n            /^(gen|c[ʼ\\']hwe|meu|ebr|mae|eve|gou|eos|gwe|her|du|ker)/i,\n        fullWeekdaysParse = [\n            /^sul/i,\n            /^lun/i,\n            /^meurzh/i,\n            /^merc[ʼ\\']her/i,\n            /^yaou/i,\n            /^gwener/i,\n            /^sadorn/i,\n        ],\n        shortWeekdaysParse = [\n            /^Sul/i,\n            /^Lun/i,\n            /^Meu/i,\n            /^Mer/i,\n            /^Yao/i,\n            /^Gwe/i,\n            /^Sad/i,\n        ],\n        minWeekdaysParse = [\n            /^Su/i,\n            /^Lu/i,\n            /^Me([^r]|$)/i,\n            /^Mer/i,\n            /^Ya/i,\n            /^Gw/i,\n            /^Sa/i,\n        ];\n\n    var br = moment.defineLocale('br', {\n        months: 'Genver_Cʼhwevrer_Meurzh_Ebrel_Mae_Mezheven_Gouere_Eost_Gwengolo_Here_Du_Kerzu'.split(\n            '_'\n        ),\n        monthsShort: 'Gen_Cʼhwe_Meu_Ebr_Mae_Eve_Gou_Eos_Gwe_Her_Du_Ker'.split('_'),\n        weekdays: 'Sul_Lun_Meurzh_Mercʼher_Yaou_Gwener_Sadorn'.split('_'),\n        weekdaysShort: 'Sul_Lun_Meu_Mer_Yao_Gwe_Sad'.split('_'),\n        weekdaysMin: 'Su_Lu_Me_Mer_Ya_Gw_Sa'.split('_'),\n        weekdaysParse: minWeekdaysParse,\n        fullWeekdaysParse: fullWeekdaysParse,\n        shortWeekdaysParse: shortWeekdaysParse,\n        minWeekdaysParse: minWeekdaysParse,\n\n        monthsRegex: monthsRegex,\n        monthsShortRegex: monthsRegex,\n        monthsStrictRegex: monthsStrictRegex,\n        monthsShortStrictRegex: monthsShortStrictRegex,\n        monthsParse: monthsParse,\n        longMonthsParse: monthsParse,\n        shortMonthsParse: monthsParse,\n\n        longDateFormat: {\n            LT: 'HH:mm',\n            LTS: 'HH:mm:ss',\n            L: 'DD/MM/YYYY',\n            LL: 'D [a viz] MMMM YYYY',\n            LLL: 'D [a viz] MMMM YYYY HH:mm',\n            LLLL: 'dddd, D [a viz] MMMM YYYY HH:mm',\n        },\n        calendar: {\n            sameDay: '[Hiziv da] LT',\n            nextDay: '[Warcʼhoazh da] LT',\n            nextWeek: 'dddd [da] LT',\n            lastDay: '[Decʼh da] LT',\n            lastWeek: 'dddd [paset da] LT',\n            sameElse: 'L',\n        },\n        relativeTime: {\n            future: 'a-benn %s',\n            past: '%s ʼzo',\n            s: 'un nebeud segondennoù',\n            ss: '%d eilenn',\n            m: 'ur vunutenn',\n            mm: relativeTimeWithMutation,\n            h: 'un eur',\n            hh: '%d eur',\n            d: 'un devezh',\n            dd: relativeTimeWithMutation,\n            M: 'ur miz',\n            MM: relativeTimeWithMutation,\n            y: 'ur bloaz',\n            yy: specialMutationForYears,\n        },\n        dayOfMonthOrdinalParse: /\\d{1,2}(añ|vet)/,\n        ordinal: function (number) {\n            var output = number === 1 ? 'añ' : 'vet';\n            return number + output;\n        },\n        week: {\n            dow: 1, // Monday is the first day of the week.\n            doy: 4, // The week that contains Jan 4th is the first week of the year.\n        },\n        meridiemParse: /a.m.|g.m./, // goude merenn | a-raok merenn\n        isPM: function (token) {\n            return token === 'g.m.';\n        },\n        meridiem: function (hour, minute, isLower) {\n            return hour < 12 ? 'a.m.' : 'g.m.';\n        },\n    });\n\n    return br;\n\n})));\n","//! moment.js locale configuration\n//! locale : Bosnian [bs]\n//! author : Nedim Cholich : https://github.com/frontyard\n//! author : Rasid Redzic : https://github.com/rasidre\n//! based on (hr) translation by Bojan Marković\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    function processRelativeTime(number, withoutSuffix, key, isFuture) {\n        switch (key) {\n            case 'm':\n                return withoutSuffix\n                    ? 'jedna minuta'\n                    : isFuture\n                      ? 'jednu minutu'\n                      : 'jedne minute';\n        }\n    }\n\n    function translate(number, withoutSuffix, key) {\n        var result = number + ' ';\n        switch (key) {\n            case 'ss':\n                if (number === 1) {\n                    result += 'sekunda';\n                } else if (number === 2 || number === 3 || number === 4) {\n                    result += 'sekunde';\n                } else {\n                    result += 'sekundi';\n                }\n                return result;\n            case 'mm':\n                if (number === 1) {\n                    result += 'minuta';\n                } else if (number === 2 || number === 3 || number === 4) {\n                    result += 'minute';\n                } else {\n                    result += 'minuta';\n                }\n                return result;\n            case 'h':\n                return withoutSuffix ? 'jedan sat' : 'jedan sat';\n            case 'hh':\n                if (number === 1) {\n                    result += 'sat';\n                } else if (number === 2 || number === 3 || number === 4) {\n                    result += 'sata';\n                } else {\n                    result += 'sati';\n                }\n                return result;\n            case 'dd':\n                if (number === 1) {\n                    result += 'dan';\n                } else {\n                    result += 'dana';\n                }\n                return result;\n            case 'MM':\n                if (number === 1) {\n                    result += 'mjesec';\n                } else if (number === 2 || number === 3 || number === 4) {\n                    result += 'mjeseca';\n                } else {\n                    result += 'mjeseci';\n                }\n                return result;\n            case 'yy':\n                if (number === 1) {\n                    result += 'godina';\n                } else if (number === 2 || number === 3 || number === 4) {\n                    result += 'godine';\n                } else {\n                    result += 'godina';\n                }\n                return result;\n        }\n    }\n\n    var bs = moment.defineLocale('bs', {\n        months: 'januar_februar_mart_april_maj_juni_juli_august_septembar_oktobar_novembar_decembar'.split(\n            '_'\n        ),\n        monthsShort:\n            'jan._feb._mar._apr._maj._jun._jul._aug._sep._okt._nov._dec.'.split(\n                '_'\n            ),\n        monthsParseExact: true,\n        weekdays: 'nedjelja_ponedjeljak_utorak_srijeda_četvrtak_petak_subota'.split(\n            '_'\n        ),\n        weekdaysShort: 'ned._pon._uto._sri._čet._pet._sub.'.split('_'),\n        weekdaysMin: 'ne_po_ut_sr_če_pe_su'.split('_'),\n        weekdaysParseExact: true,\n        longDateFormat: {\n            LT: 'H:mm',\n            LTS: 'H:mm:ss',\n            L: 'DD.MM.YYYY',\n            LL: 'D. MMMM YYYY',\n            LLL: 'D. MMMM YYYY H:mm',\n            LLLL: 'dddd, D. MMMM YYYY H:mm',\n        },\n        calendar: {\n            sameDay: '[danas u] LT',\n            nextDay: '[sutra u] LT',\n            nextWeek: function () {\n                switch (this.day()) {\n                    case 0:\n                        return '[u] [nedjelju] [u] LT';\n                    case 3:\n                        return '[u] [srijedu] [u] LT';\n                    case 6:\n                        return '[u] [subotu] [u] LT';\n                    case 1:\n                    case 2:\n                    case 4:\n                    case 5:\n                        return '[u] dddd [u] LT';\n                }\n            },\n            lastDay: '[jučer u] LT',\n            lastWeek: function () {\n                switch (this.day()) {\n                    case 0:\n                    case 3:\n                        return '[prošlu] dddd [u] LT';\n                    case 6:\n                        return '[prošle] [subote] [u] LT';\n                    case 1:\n                    case 2:\n                    case 4:\n                    case 5:\n                        return '[prošli] dddd [u] LT';\n                }\n            },\n            sameElse: 'L',\n        },\n        relativeTime: {\n            future: 'za %s',\n            past: 'prije %s',\n            s: 'par sekundi',\n            ss: translate,\n            m: processRelativeTime,\n            mm: translate,\n            h: translate,\n            hh: translate,\n            d: 'dan',\n            dd: translate,\n            M: 'mjesec',\n            MM: translate,\n            y: 'godinu',\n            yy: translate,\n        },\n        dayOfMonthOrdinalParse: /\\d{1,2}\\./,\n        ordinal: '%d.',\n        week: {\n            dow: 1, // Monday is the first day of the week.\n            doy: 7, // The week that contains Jan 7th is the first week of the year.\n        },\n    });\n\n    return bs;\n\n})));\n","//! moment.js locale configuration\n//! locale : Catalan [ca]\n//! author : Juan G. Hurtado : https://github.com/juanghurtado\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 ca = moment.defineLocale('ca', {\n        months: {\n            standalone:\n                'gener_febrer_març_abril_maig_juny_juliol_agost_setembre_octubre_novembre_desembre'.split(\n                    '_'\n                ),\n            format: \"de gener_de febrer_de març_d'abril_de maig_de juny_de juliol_d'agost_de setembre_d'octubre_de novembre_de desembre\".split(\n                '_'\n            ),\n            isFormat: /D[oD]?(\\s)+MMMM/,\n        },\n        monthsShort:\n            'gen._febr._març_abr._maig_juny_jul._ag._set._oct._nov._des.'.split(\n                '_'\n            ),\n        monthsParseExact: true,\n        weekdays:\n            'diumenge_dilluns_dimarts_dimecres_dijous_divendres_dissabte'.split(\n                '_'\n            ),\n        weekdaysShort: 'dg._dl._dt._dc._dj._dv._ds.'.split('_'),\n        weekdaysMin: 'dg_dl_dt_dc_dj_dv_ds'.split('_'),\n        weekdaysParseExact: true,\n        longDateFormat: {\n            LT: 'H:mm',\n            LTS: 'H:mm:ss',\n            L: 'DD/MM/YYYY',\n            LL: 'D MMMM [de] YYYY',\n            ll: 'D MMM YYYY',\n            LLL: 'D MMMM [de] YYYY [a les] H:mm',\n            lll: 'D MMM YYYY, H:mm',\n            LLLL: 'dddd D MMMM [de] YYYY [a les] H:mm',\n            llll: 'ddd D MMM YYYY, H:mm',\n        },\n        calendar: {\n            sameDay: function () {\n                return '[avui a ' + (this.hours() !== 1 ? 'les' : 'la') + '] LT';\n            },\n            nextDay: function () {\n                return '[demà a ' + (this.hours() !== 1 ? 'les' : 'la') + '] LT';\n            },\n            nextWeek: function () {\n                return 'dddd [a ' + (this.hours() !== 1 ? 'les' : 'la') + '] LT';\n            },\n            lastDay: function () {\n                return '[ahir a ' + (this.hours() !== 1 ? 'les' : 'la') + '] LT';\n            },\n            lastWeek: function () {\n                return (\n                    '[el] dddd [passat a ' +\n                    (this.hours() !== 1 ? 'les' : 'la') +\n                    '] LT'\n                );\n            },\n            sameElse: 'L',\n        },\n        relativeTime: {\n            future: \"d'aquí %s\",\n            past: 'fa %s',\n            s: 'uns segons',\n            ss: '%d segons',\n            m: 'un minut',\n            mm: '%d minuts',\n            h: 'una hora',\n            hh: '%d hores',\n            d: 'un dia',\n            dd: '%d dies',\n            M: 'un mes',\n            MM: '%d mesos',\n            y: 'un any',\n            yy: '%d anys',\n        },\n        dayOfMonthOrdinalParse: /\\d{1,2}(r|n|t|è|a)/,\n        ordinal: function (number, period) {\n            var output =\n                number === 1\n                    ? 'r'\n                    : number === 2\n                      ? 'n'\n                      : number === 3\n                        ? 'r'\n                        : number === 4\n                          ? 't'\n                          : 'è';\n            if (period === 'w' || period === 'W') {\n                output = 'a';\n            }\n            return number + output;\n        },\n        week: {\n            dow: 1, // Monday is the first day of the week.\n            doy: 4, // The week that contains Jan 4th is the first week of the year.\n        },\n    });\n\n    return ca;\n\n})));\n","//! moment.js locale configuration\n//! locale : Czech [cs]\n//! author : petrbela : https://github.com/petrbela\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 months = {\n            standalone:\n                'leden_únor_březen_duben_květen_červen_červenec_srpen_září_říjen_listopad_prosinec'.split(\n                    '_'\n                ),\n            format: 'ledna_února_března_dubna_května_června_července_srpna_září_října_listopadu_prosince'.split(\n                '_'\n            ),\n            isFormat: /DD?[o.]?(\\[[^\\[\\]]*\\]|\\s)+MMMM/,\n        },\n        monthsShort = 'led_úno_bře_dub_kvě_čvn_čvc_srp_zář_říj_lis_pro'.split('_'),\n        monthsParse = [\n            /^led/i,\n            /^úno/i,\n            /^bře/i,\n            /^dub/i,\n            /^kvě/i,\n            /^(čvn|červen$|června)/i,\n            /^(čvc|červenec|července)/i,\n            /^srp/i,\n            /^zář/i,\n            /^říj/i,\n            /^lis/i,\n            /^pro/i,\n        ],\n        // NOTE: 'červen' is substring of 'červenec'; therefore 'červenec' must precede 'červen' in the regex to be fully matched.\n        // Otherwise parser matches '1. červenec' as '1. červen' + 'ec'.\n        monthsRegex =\n            /^(leden|únor|březen|duben|květen|červenec|července|červen|června|srpen|září|říjen|listopad|prosinec|led|úno|bře|dub|kvě|čvn|čvc|srp|zář|říj|lis|pro)/i;\n\n    function plural(n) {\n        return n > 1 && n < 5 && ~~(n / 10) !== 1;\n    }\n    function translate(number, withoutSuffix, key, isFuture) {\n        var result = number + ' ';\n        switch (key) {\n            case 's': // a few seconds / in a few seconds / a few seconds ago\n                return withoutSuffix || isFuture ? 'pár sekund' : 'pár sekundami';\n            case 'ss': // 9 seconds / in 9 seconds / 9 seconds ago\n                if (withoutSuffix || isFuture) {\n                    return result + (plural(number) ? 'sekundy' : 'sekund');\n                } else {\n                    return result + 'sekundami';\n                }\n            case 'm': // a minute / in a minute / a minute ago\n                return withoutSuffix ? 'minuta' : isFuture ? 'minutu' : 'minutou';\n            case 'mm': // 9 minutes / in 9 minutes / 9 minutes ago\n                if (withoutSuffix || isFuture) {\n                    return result + (plural(number) ? 'minuty' : 'minut');\n                } else {\n                    return result + 'minutami';\n                }\n            case 'h': // an hour / in an hour / an hour ago\n                return withoutSuffix ? 'hodina' : isFuture ? 'hodinu' : 'hodinou';\n            case 'hh': // 9 hours / in 9 hours / 9 hours ago\n                if (withoutSuffix || isFuture) {\n                    return result + (plural(number) ? 'hodiny' : 'hodin');\n                } else {\n                    return result + 'hodinami';\n                }\n            case 'd': // a day / in a day / a day ago\n                return withoutSuffix || isFuture ? 'den' : 'dnem';\n            case 'dd': // 9 days / in 9 days / 9 days ago\n                if (withoutSuffix || isFuture) {\n                    return result + (plural(number) ? 'dny' : 'dní');\n                } else {\n                    return result + 'dny';\n                }\n            case 'M': // a month / in a month / a month ago\n                return withoutSuffix || isFuture ? 'měsíc' : 'měsícem';\n            case 'MM': // 9 months / in 9 months / 9 months ago\n                if (withoutSuffix || isFuture) {\n                    return result + (plural(number) ? 'měsíce' : 'měsíců');\n                } else {\n                    return result + 'měsíci';\n                }\n            case 'y': // a year / in a year / a year ago\n                return withoutSuffix || isFuture ? 'rok' : 'rokem';\n            case 'yy': // 9 years / in 9 years / 9 years ago\n                if (withoutSuffix || isFuture) {\n                    return result + (plural(number) ? 'roky' : 'let');\n                } else {\n                    return result + 'lety';\n                }\n        }\n    }\n\n    var cs = moment.defineLocale('cs', {\n        months: months,\n        monthsShort: monthsShort,\n        monthsRegex: monthsRegex,\n        monthsShortRegex: monthsRegex,\n        // NOTE: 'červen' is substring of 'červenec'; therefore 'červenec' must precede 'červen' in the regex to be fully matched.\n        // Otherwise parser matches '1. červenec' as '1. červen' + 'ec'.\n        monthsStrictRegex:\n            /^(leden|ledna|února|únor|březen|března|duben|dubna|květen|května|červenec|července|červen|června|srpen|srpna|září|říjen|října|listopadu|listopad|prosinec|prosince)/i,\n        monthsShortStrictRegex:\n            /^(led|úno|bře|dub|kvě|čvn|čvc|srp|zář|říj|lis|pro)/i,\n        monthsParse: monthsParse,\n        longMonthsParse: monthsParse,\n        shortMonthsParse: monthsParse,\n        weekdays: 'neděle_pondělí_úterý_středa_čtvrtek_pátek_sobota'.split('_'),\n        weekdaysShort: 'ne_po_út_st_čt_pá_so'.split('_'),\n        weekdaysMin: 'ne_po_út_st_čt_pá_so'.split('_'),\n        longDateFormat: {\n            LT: 'H:mm',\n            LTS: 'H:mm:ss',\n            L: 'DD.MM.YYYY',\n            LL: 'D. MMMM YYYY',\n            LLL: 'D. MMMM YYYY H:mm',\n            LLLL: 'dddd D. MMMM YYYY H:mm',\n            l: 'D. M. YYYY',\n        },\n        calendar: {\n            sameDay: '[dnes v] LT',\n            nextDay: '[zítra v] LT',\n            nextWeek: function () {\n                switch (this.day()) {\n                    case 0:\n                        return '[v neděli v] LT';\n                    case 1:\n                    case 2:\n                        return '[v] dddd [v] LT';\n                    case 3:\n                        return '[ve středu v] LT';\n                    case 4:\n                        return '[ve čtvrtek v] LT';\n                    case 5:\n                        return '[v pátek v] LT';\n                    case 6:\n                        return '[v sobotu v] LT';\n                }\n            },\n            lastDay: '[včera v] LT',\n            lastWeek: function () {\n                switch (this.day()) {\n                    case 0:\n                        return '[minulou neděli v] LT';\n                    case 1:\n                    case 2:\n                        return '[minulé] dddd [v] LT';\n                    case 3:\n                        return '[minulou středu v] LT';\n                    case 4:\n                    case 5:\n                        return '[minulý] dddd [v] LT';\n                    case 6:\n                        return '[minulou sobotu v] LT';\n                }\n            },\n            sameElse: 'L',\n        },\n        relativeTime: {\n            future: 'za %s',\n            past: 'před %s',\n            s: translate,\n            ss: translate,\n            m: translate,\n            mm: translate,\n            h: translate,\n            hh: translate,\n            d: translate,\n            dd: translate,\n            M: translate,\n            MM: translate,\n            y: translate,\n            yy: translate,\n        },\n        dayOfMonthOrdinalParse: /\\d{1,2}\\./,\n        ordinal: '%d.',\n        week: {\n            dow: 1, // Monday is the first day of the week.\n            doy: 4, // The week that contains Jan 4th is the first week of the year.\n        },\n    });\n\n    return cs;\n\n})));\n","//! moment.js locale configuration\n//! locale : Chuvash [cv]\n//! author : Anatoly Mironov : https://github.com/mirontoli\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 cv = moment.defineLocale('cv', {\n        months: 'кӑрлач_нарӑс_пуш_ака_май_ҫӗртме_утӑ_ҫурла_авӑн_юпа_чӳк_раштав'.split(\n            '_'\n        ),\n        monthsShort: 'кӑр_нар_пуш_ака_май_ҫӗр_утӑ_ҫур_авн_юпа_чӳк_раш'.split('_'),\n        weekdays:\n            'вырсарникун_тунтикун_ытларикун_юнкун_кӗҫнерникун_эрнекун_шӑматкун'.split(\n                '_'\n            ),\n        weekdaysShort: 'выр_тун_ытл_юн_кӗҫ_эрн_шӑм'.split('_'),\n        weekdaysMin: 'вр_тн_ыт_юн_кҫ_эр_шм'.split('_'),\n        longDateFormat: {\n            LT: 'HH:mm',\n            LTS: 'HH:mm:ss',\n            L: 'DD-MM-YYYY',\n            LL: 'YYYY [ҫулхи] MMMM [уйӑхӗн] D[-мӗшӗ]',\n            LLL: 'YYYY [ҫулхи] MMMM [уйӑхӗн] D[-мӗшӗ], HH:mm',\n            LLLL: 'dddd, YYYY [ҫулхи] MMMM [уйӑхӗн] D[-мӗшӗ], HH:mm',\n        },\n        calendar: {\n            sameDay: '[Паян] LT [сехетре]',\n            nextDay: '[Ыран] LT [сехетре]',\n            lastDay: '[Ӗнер] LT [сехетре]',\n            nextWeek: '[Ҫитес] dddd LT [сехетре]',\n            lastWeek: '[Иртнӗ] dddd LT [сехетре]',\n            sameElse: 'L',\n        },\n        relativeTime: {\n            future: function (output) {\n                var affix = /сехет$/i.exec(output)\n                    ? 'рен'\n                    : /ҫул$/i.exec(output)\n                      ? 'тан'\n                      : 'ран';\n                return output + affix;\n            },\n            past: '%s каялла',\n            s: 'пӗр-ик ҫеккунт',\n            ss: '%d ҫеккунт',\n            m: 'пӗр минут',\n            mm: '%d минут',\n            h: 'пӗр сехет',\n            hh: '%d сехет',\n            d: 'пӗр кун',\n            dd: '%d кун',\n            M: 'пӗр уйӑх',\n            MM: '%d уйӑх',\n            y: 'пӗр ҫул',\n            yy: '%d ҫул',\n        },\n        dayOfMonthOrdinalParse: /\\d{1,2}-мӗш/,\n        ordinal: '%d-мӗш',\n        week: {\n            dow: 1, // Monday is the first day of the week.\n            doy: 7, // The week that contains Jan 7th is the first week of the year.\n        },\n    });\n\n    return cv;\n\n})));\n","//! moment.js locale configuration\n//! locale : Welsh [cy]\n//! author : Robert Allen : https://github.com/robgallen\n//! author : https://github.com/ryangreaves\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 cy = moment.defineLocale('cy', {\n        months: 'Ionawr_Chwefror_Mawrth_Ebrill_Mai_Mehefin_Gorffennaf_Awst_Medi_Hydref_Tachwedd_Rhagfyr'.split(\n            '_'\n        ),\n        monthsShort: 'Ion_Chwe_Maw_Ebr_Mai_Meh_Gor_Aws_Med_Hyd_Tach_Rhag'.split(\n            '_'\n        ),\n        weekdays:\n            'Dydd Sul_Dydd Llun_Dydd Mawrth_Dydd Mercher_Dydd Iau_Dydd Gwener_Dydd Sadwrn'.split(\n                '_'\n            ),\n        weekdaysShort: 'Sul_Llun_Maw_Mer_Iau_Gwe_Sad'.split('_'),\n        weekdaysMin: 'Su_Ll_Ma_Me_Ia_Gw_Sa'.split('_'),\n        weekdaysParseExact: true,\n        // time formats are the same as en-gb\n        longDateFormat: {\n            LT: 'HH:mm',\n            LTS: 'HH:mm:ss',\n            L: 'DD/MM/YYYY',\n            LL: 'D MMMM YYYY',\n            LLL: 'D MMMM YYYY HH:mm',\n            LLLL: 'dddd, D MMMM YYYY HH:mm',\n        },\n        calendar: {\n            sameDay: '[Heddiw am] LT',\n            nextDay: '[Yfory am] LT',\n            nextWeek: 'dddd [am] LT',\n            lastDay: '[Ddoe am] LT',\n            lastWeek: 'dddd [diwethaf am] LT',\n            sameElse: 'L',\n        },\n        relativeTime: {\n            future: 'mewn %s',\n            past: '%s yn ôl',\n            s: 'ychydig eiliadau',\n            ss: '%d eiliad',\n            m: 'munud',\n            mm: '%d munud',\n            h: 'awr',\n            hh: '%d awr',\n            d: 'diwrnod',\n            dd: '%d diwrnod',\n            M: 'mis',\n            MM: '%d mis',\n            y: 'blwyddyn',\n            yy: '%d flynedd',\n        },\n        dayOfMonthOrdinalParse: /\\d{1,2}(fed|ain|af|il|ydd|ed|eg)/,\n        // traditional ordinal numbers above 31 are not commonly used in colloquial Welsh\n        ordinal: function (number) {\n            var b = number,\n                output = '',\n                lookup = [\n                    '',\n                    'af',\n                    'il',\n                    'ydd',\n                    'ydd',\n                    'ed',\n                    'ed',\n                    'ed',\n                    'fed',\n                    'fed',\n                    'fed', // 1af to 10fed\n                    'eg',\n                    'fed',\n                    'eg',\n                    'eg',\n                    'fed',\n                    'eg',\n                    'eg',\n                    'fed',\n                    'eg',\n                    'fed', // 11eg to 20fed\n                ];\n            if (b > 20) {\n                if (b === 40 || b === 50 || b === 60 || b === 80 || b === 100) {\n                    output = 'fed'; // not 30ain, 70ain or 90ain\n                } else {\n                    output = 'ain';\n                }\n            } else if (b > 0) {\n                output = lookup[b];\n            }\n            return number + output;\n        },\n        week: {\n            dow: 1, // Monday is the first day of the week.\n            doy: 4, // The week that contains Jan 4th is the first week of the year.\n        },\n    });\n\n    return cy;\n\n})));\n","//! moment.js locale configuration\n//! locale : Danish [da]\n//! author : Ulrik Nielsen : https://github.com/mrbase\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 da = moment.defineLocale('da', {\n        months: 'januar_februar_marts_april_maj_juni_juli_august_september_oktober_november_december'.split(\n            '_'\n        ),\n        monthsShort: 'jan_feb_mar_apr_maj_jun_jul_aug_sep_okt_nov_dec'.split('_'),\n        weekdays: 'søndag_mandag_tirsdag_onsdag_torsdag_fredag_lørdag'.split('_'),\n        weekdaysShort: 'søn_man_tir_ons_tor_fre_lør'.split('_'),\n        weekdaysMin: 'sø_ma_ti_on_to_fr_lø'.split('_'),\n        longDateFormat: {\n            LT: 'HH:mm',\n            LTS: 'HH:mm:ss',\n            L: 'DD.MM.YYYY',\n            LL: 'D. MMMM YYYY',\n            LLL: 'D. MMMM YYYY HH:mm',\n            LLLL: 'dddd [d.] D. MMMM YYYY [kl.] HH:mm',\n        },\n        calendar: {\n            sameDay: '[i dag kl.] LT',\n            nextDay: '[i morgen kl.] LT',\n            nextWeek: 'på dddd [kl.] LT',\n            lastDay: '[i går kl.] LT',\n            lastWeek: '[i] dddd[s kl.] LT',\n            sameElse: 'L',\n        },\n        relativeTime: {\n            future: 'om %s',\n            past: '%s siden',\n            s: 'få sekunder',\n            ss: '%d sekunder',\n            m: 'et minut',\n            mm: '%d minutter',\n            h: 'en time',\n            hh: '%d timer',\n            d: 'en dag',\n            dd: '%d dage',\n            M: 'en måned',\n            MM: '%d måneder',\n            y: 'et år',\n            yy: '%d år',\n        },\n        dayOfMonthOrdinalParse: /\\d{1,2}\\./,\n        ordinal: '%d.',\n        week: {\n            dow: 1, // Monday is the first day of the week.\n            doy: 4, // The week that contains Jan 4th is the first week of the year.\n        },\n    });\n\n    return da;\n\n})));\n","//! moment.js locale configuration\n//! locale : German (Austria) [de-at]\n//! author : lluchs : https://github.com/lluchs\n//! author: Menelion Elensúle: https://github.com/Oire\n//! author : Martin Groller : https://github.com/MadMG\n//! author : Mikolaj Dadela : https://github.com/mik01aj\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    function processRelativeTime(number, withoutSuffix, key, isFuture) {\n        var format = {\n            m: ['eine Minute', 'einer Minute'],\n            h: ['eine Stunde', 'einer Stunde'],\n            d: ['ein Tag', 'einem Tag'],\n            dd: [number + ' Tage', number + ' Tagen'],\n            w: ['eine Woche', 'einer Woche'],\n            M: ['ein Monat', 'einem Monat'],\n            MM: [number + ' Monate', number + ' Monaten'],\n            y: ['ein Jahr', 'einem Jahr'],\n            yy: [number + ' Jahre', number + ' Jahren'],\n        };\n        return withoutSuffix ? format[key][0] : format[key][1];\n    }\n\n    var deAt = moment.defineLocale('de-at', {\n        months: 'Jänner_Februar_März_April_Mai_Juni_Juli_August_September_Oktober_November_Dezember'.split(\n            '_'\n        ),\n        monthsShort:\n            'Jän._Feb._März_Apr._Mai_Juni_Juli_Aug._Sep._Okt._Nov._Dez.'.split('_'),\n        monthsParseExact: true,\n        weekdays:\n            'Sonntag_Montag_Dienstag_Mittwoch_Donnerstag_Freitag_Samstag'.split(\n                '_'\n            ),\n        weekdaysShort: 'So._Mo._Di._Mi._Do._Fr._Sa.'.split('_'),\n        weekdaysMin: 'So_Mo_Di_Mi_Do_Fr_Sa'.split('_'),\n        weekdaysParseExact: true,\n        longDateFormat: {\n            LT: 'HH:mm',\n            LTS: 'HH:mm:ss',\n            L: 'DD.MM.YYYY',\n            LL: 'D. MMMM YYYY',\n            LLL: 'D. MMMM YYYY HH:mm',\n            LLLL: 'dddd, D. MMMM YYYY HH:mm',\n        },\n        calendar: {\n            sameDay: '[heute um] LT [Uhr]',\n            sameElse: 'L',\n            nextDay: '[morgen um] LT [Uhr]',\n            nextWeek: 'dddd [um] LT [Uhr]',\n            lastDay: '[gestern um] LT [Uhr]',\n            lastWeek: '[letzten] dddd [um] LT [Uhr]',\n        },\n        relativeTime: {\n            future: 'in %s',\n            past: 'vor %s',\n            s: 'ein paar Sekunden',\n            ss: '%d Sekunden',\n            m: processRelativeTime,\n            mm: '%d Minuten',\n            h: processRelativeTime,\n            hh: '%d Stunden',\n            d: processRelativeTime,\n            dd: processRelativeTime,\n            w: processRelativeTime,\n            ww: '%d Wochen',\n            M: processRelativeTime,\n            MM: processRelativeTime,\n            y: processRelativeTime,\n            yy: processRelativeTime,\n        },\n        dayOfMonthOrdinalParse: /\\d{1,2}\\./,\n        ordinal: '%d.',\n        week: {\n            dow: 1, // Monday is the first day of the week.\n            doy: 4, // The week that contains Jan 4th is the first week of the year.\n        },\n    });\n\n    return deAt;\n\n})));\n","//! moment.js locale configuration\n//! locale : German (Switzerland) [de-ch]\n//! author : sschueller : https://github.com/sschueller\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    function processRelativeTime(number, withoutSuffix, key, isFuture) {\n        var format = {\n            m: ['eine Minute', 'einer Minute'],\n            h: ['eine Stunde', 'einer Stunde'],\n            d: ['ein Tag', 'einem Tag'],\n            dd: [number + ' Tage', number + ' Tagen'],\n            w: ['eine Woche', 'einer Woche'],\n            M: ['ein Monat', 'einem Monat'],\n            MM: [number + ' Monate', number + ' Monaten'],\n            y: ['ein Jahr', 'einem Jahr'],\n            yy: [number + ' Jahre', number + ' Jahren'],\n        };\n        return withoutSuffix ? format[key][0] : format[key][1];\n    }\n\n    var deCh = moment.defineLocale('de-ch', {\n        months: 'Januar_Februar_März_April_Mai_Juni_Juli_August_September_Oktober_November_Dezember'.split(\n            '_'\n        ),\n        monthsShort:\n            'Jan._Feb._März_Apr._Mai_Juni_Juli_Aug._Sep._Okt._Nov._Dez.'.split('_'),\n        monthsParseExact: true,\n        weekdays:\n            'Sonntag_Montag_Dienstag_Mittwoch_Donnerstag_Freitag_Samstag'.split(\n                '_'\n            ),\n        weekdaysShort: 'So_Mo_Di_Mi_Do_Fr_Sa'.split('_'),\n        weekdaysMin: 'So_Mo_Di_Mi_Do_Fr_Sa'.split('_'),\n        weekdaysParseExact: true,\n        longDateFormat: {\n            LT: 'HH:mm',\n            LTS: 'HH:mm:ss',\n            L: 'DD.MM.YYYY',\n            LL: 'D. MMMM YYYY',\n            LLL: 'D. MMMM YYYY HH:mm',\n            LLLL: 'dddd, D. MMMM YYYY HH:mm',\n        },\n        calendar: {\n            sameDay: '[heute um] LT [Uhr]',\n            sameElse: 'L',\n            nextDay: '[morgen um] LT [Uhr]',\n            nextWeek: 'dddd [um] LT [Uhr]',\n            lastDay: '[gestern um] LT [Uhr]',\n            lastWeek: '[letzten] dddd [um] LT [Uhr]',\n        },\n        relativeTime: {\n            future: 'in %s',\n            past: 'vor %s',\n            s: 'ein paar Sekunden',\n            ss: '%d Sekunden',\n            m: processRelativeTime,\n            mm: '%d Minuten',\n            h: processRelativeTime,\n            hh: '%d Stunden',\n            d: processRelativeTime,\n            dd: processRelativeTime,\n            w: processRelativeTime,\n            ww: '%d Wochen',\n            M: processRelativeTime,\n            MM: processRelativeTime,\n            y: processRelativeTime,\n            yy: processRelativeTime,\n        },\n        dayOfMonthOrdinalParse: /\\d{1,2}\\./,\n        ordinal: '%d.',\n        week: {\n            dow: 1, // Monday is the first day of the week.\n            doy: 4, // The week that contains Jan 4th is the first week of the year.\n        },\n    });\n\n    return deCh;\n\n})));\n","//! moment.js locale configuration\n//! locale : German [de]\n//! author : lluchs : https://github.com/lluchs\n//! author: Menelion Elensúle: https://github.com/Oire\n//! author : Mikolaj Dadela : https://github.com/mik01aj\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    function processRelativeTime(number, withoutSuffix, key, isFuture) {\n        var format = {\n            m: ['eine Minute', 'einer Minute'],\n            h: ['eine Stunde', 'einer Stunde'],\n            d: ['ein Tag', 'einem Tag'],\n            dd: [number + ' Tage', number + ' Tagen'],\n            w: ['eine Woche', 'einer Woche'],\n            M: ['ein Monat', 'einem Monat'],\n            MM: [number + ' Monate', number + ' Monaten'],\n            y: ['ein Jahr', 'einem Jahr'],\n            yy: [number + ' Jahre', number + ' Jahren'],\n        };\n        return withoutSuffix ? format[key][0] : format[key][1];\n    }\n\n    var de = moment.defineLocale('de', {\n        months: 'Januar_Februar_März_April_Mai_Juni_Juli_August_September_Oktober_November_Dezember'.split(\n            '_'\n        ),\n        monthsShort:\n            'Jan._Feb._März_Apr._Mai_Juni_Juli_Aug._Sep._Okt._Nov._Dez.'.split('_'),\n        monthsParseExact: true,\n        weekdays:\n            'Sonntag_Montag_Dienstag_Mittwoch_Donnerstag_Freitag_Samstag'.split(\n                '_'\n            ),\n        weekdaysShort: 'So._Mo._Di._Mi._Do._Fr._Sa.'.split('_'),\n        weekdaysMin: 'So_Mo_Di_Mi_Do_Fr_Sa'.split('_'),\n        weekdaysParseExact: true,\n        longDateFormat: {\n            LT: 'HH:mm',\n            LTS: 'HH:mm:ss',\n            L: 'DD.MM.YYYY',\n            LL: 'D. MMMM YYYY',\n            LLL: 'D. MMMM YYYY HH:mm',\n            LLLL: 'dddd, D. MMMM YYYY HH:mm',\n        },\n        calendar: {\n            sameDay: '[heute um] LT [Uhr]',\n            sameElse: 'L',\n            nextDay: '[morgen um] LT [Uhr]',\n            nextWeek: 'dddd [um] LT [Uhr]',\n            lastDay: '[gestern um] LT [Uhr]',\n            lastWeek: '[letzten] dddd [um] LT [Uhr]',\n        },\n        relativeTime: {\n            future: 'in %s',\n            past: 'vor %s',\n            s: 'ein paar Sekunden',\n            ss: '%d Sekunden',\n            m: processRelativeTime,\n            mm: '%d Minuten',\n            h: processRelativeTime,\n            hh: '%d Stunden',\n            d: processRelativeTime,\n            dd: processRelativeTime,\n            w: processRelativeTime,\n            ww: '%d Wochen',\n            M: processRelativeTime,\n            MM: processRelativeTime,\n            y: processRelativeTime,\n            yy: processRelativeTime,\n        },\n        dayOfMonthOrdinalParse: /\\d{1,2}\\./,\n        ordinal: '%d.',\n        week: {\n            dow: 1, // Monday is the first day of the week.\n            doy: 4, // The week that contains Jan 4th is the first week of the year.\n        },\n    });\n\n    return de;\n\n})));\n","//! moment.js locale configuration\n//! locale : Maldivian [dv]\n//! author : Jawish Hameed : https://github.com/jawish\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 months = [\n            'ޖެނުއަރީ',\n            'ފެބްރުއަރީ',\n            'މާރިޗު',\n            'އޭޕްރީލު',\n            'މޭ',\n            'ޖޫން',\n            'ޖުލައި',\n            'އޯގަސްޓު',\n            'ސެޕްޓެމްބަރު',\n            'އޮކްޓޯބަރު',\n            'ނޮވެމްބަރު',\n            'ޑިސެމްބަރު',\n        ],\n        weekdays = [\n            'އާދިއްތަ',\n            'ހޯމަ',\n            'އަންގާރަ',\n            'ބުދަ',\n            'ބުރާސްފަތި',\n            'ހުކުރު',\n            'ހޮނިހިރު',\n        ];\n\n    var dv = moment.defineLocale('dv', {\n        months: months,\n        monthsShort: months,\n        weekdays: weekdays,\n        weekdaysShort: weekdays,\n        weekdaysMin: 'އާދި_ހޯމަ_އަން_ބުދަ_ބުރާ_ހުކު_ހޮނި'.split('_'),\n        longDateFormat: {\n            LT: 'HH:mm',\n            LTS: 'HH:mm:ss',\n            L: 'D/M/YYYY',\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: 'ސިކުންތުކޮޅެއް',\n            ss: 'd% ސިކުންތު',\n            m: 'މިނިޓެއް',\n            mm: 'މިނިޓު %d',\n            h: 'ގަޑިއިރެއް',\n            hh: 'ގަޑިއިރު %d',\n            d: 'ދުވަހެއް',\n            dd: 'ދުވަސް %d',\n            M: 'މަހެއް',\n            MM: 'މަސް %d',\n            y: 'އަހަރެއް',\n            yy: 'އަހަރު %d',\n        },\n        preparse: function (string) {\n            return string.replace(/،/g, ',');\n        },\n        postformat: function (string) {\n            return string.replace(/,/g, '،');\n        },\n        week: {\n            dow: 7, // Sunday 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 dv;\n\n})));\n","//! moment.js locale configuration\n//! locale : Greek [el]\n//! author : Aggelos Karalias : https://github.com/mehiel\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    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 el = moment.defineLocale('el', {\n        monthsNominativeEl:\n            'Ιανουάριος_Φεβρουάριος_Μάρτιος_Απρίλιος_Μάιος_Ιούνιος_Ιούλιος_Αύγουστος_Σεπτέμβριος_Οκτώβριος_Νοέμβριος_Δεκέμβριος'.split(\n                '_'\n            ),\n        monthsGenitiveEl:\n            'Ιανουαρίου_Φεβρουαρίου_Μαρτίου_Απριλίου_Μαΐου_Ιουνίου_Ιουλίου_Αυγούστου_Σεπτεμβρίου_Οκτωβρίου_Νοεμβρίου_Δεκεμβρίου'.split(\n                '_'\n            ),\n        months: function (momentToFormat, format) {\n            if (!momentToFormat) {\n                return this._monthsNominativeEl;\n            } else if (\n                typeof format === 'string' &&\n                /D/.test(format.substring(0, format.indexOf('MMMM')))\n            ) {\n                // if there is a day number before 'MMMM'\n                return this._monthsGenitiveEl[momentToFormat.month()];\n            } else {\n                return this._monthsNominativeEl[momentToFormat.month()];\n            }\n        },\n        monthsShort: 'Ιαν_Φεβ_Μαρ_Απρ_Μαϊ_Ιουν_Ιουλ_Αυγ_Σεπ_Οκτ_Νοε_Δεκ'.split('_'),\n        weekdays: 'Κυριακή_Δευτέρα_Τρίτη_Τετάρτη_Πέμπτη_Παρασκευή_Σάββατο'.split(\n            '_'\n        ),\n        weekdaysShort: 'Κυρ_Δευ_Τρι_Τετ_Πεμ_Παρ_Σαβ'.split('_'),\n        weekdaysMin: 'Κυ_Δε_Τρ_Τε_Πε_Πα_Σα'.split('_'),\n        meridiem: function (hours, minutes, isLower) {\n            if (hours > 11) {\n                return isLower ? 'μμ' : 'ΜΜ';\n            } else {\n                return isLower ? 'πμ' : 'ΠΜ';\n            }\n        },\n        isPM: function (input) {\n            return (input + '').toLowerCase()[0] === 'μ';\n        },\n        meridiemParse: /[ΠΜ]\\.?Μ?\\.?/i,\n        longDateFormat: {\n            LT: 'h:mm A',\n            LTS: 'h:mm:ss A',\n            L: 'DD/MM/YYYY',\n            LL: 'D MMMM YYYY',\n            LLL: 'D MMMM YYYY h:mm A',\n            LLLL: 'dddd, D MMMM YYYY h:mm A',\n        },\n        calendarEl: {\n            sameDay: '[Σήμερα {}] LT',\n            nextDay: '[Αύριο {}] LT',\n            nextWeek: 'dddd [{}] LT',\n            lastDay: '[Χθες {}] LT',\n            lastWeek: function () {\n                switch (this.day()) {\n                    case 6:\n                        return '[το προηγούμενο] dddd [{}] LT';\n                    default:\n                        return '[την προηγούμενη] dddd [{}] LT';\n                }\n            },\n            sameElse: 'L',\n        },\n        calendar: function (key, mom) {\n            var output = this._calendarEl[key],\n                hours = mom && mom.hours();\n            if (isFunction(output)) {\n                output = output.apply(mom);\n            }\n            return output.replace('{}', hours % 12 === 1 ? 'στη' : 'στις');\n        },\n        relativeTime: {\n            future: 'σε %s',\n            past: '%s πριν',\n            s: 'λίγα δευτερόλεπτα',\n            ss: '%d δευτερόλεπτα',\n            m: 'ένα λεπτό',\n            mm: '%d λεπτά',\n            h: 'μία ώρα',\n            hh: '%d ώρες',\n            d: 'μία μέρα',\n            dd: '%d μέρες',\n            M: 'ένας μήνας',\n            MM: '%d μήνες',\n            y: 'ένας χρόνος',\n            yy: '%d χρόνια',\n        },\n        dayOfMonthOrdinalParse: /\\d{1,2}η/,\n        ordinal: '%dη',\n        week: {\n            dow: 1, // Monday is the first day of the week.\n            doy: 4, // The week that contains Jan 4st is the first week of the year.\n        },\n    });\n\n    return el;\n\n})));\n","//! moment.js locale configuration\n//! locale : English (Australia) [en-au]\n//! author : Jared Morse : https://github.com/jarcoal\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 enAu = moment.defineLocale('en-au', {\n        months: 'January_February_March_April_May_June_July_August_September_October_November_December'.split(\n            '_'\n        ),\n        monthsShort: 'Jan_Feb_Mar_Apr_May_Jun_Jul_Aug_Sep_Oct_Nov_Dec'.split('_'),\n        weekdays: 'Sunday_Monday_Tuesday_Wednesday_Thursday_Friday_Saturday'.split(\n            '_'\n        ),\n        weekdaysShort: 'Sun_Mon_Tue_Wed_Thu_Fri_Sat'.split('_'),\n        weekdaysMin: 'Su_Mo_Tu_We_Th_Fr_Sa'.split('_'),\n        longDateFormat: {\n            LT: 'h:mm A',\n            LTS: 'h:mm:ss A',\n            L: 'DD/MM/YYYY',\n            LL: 'D MMMM YYYY',\n            LLL: 'D MMMM YYYY h:mm A',\n            LLLL: 'dddd, D MMMM YYYY h:mm A',\n        },\n        calendar: {\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        relativeTime: {\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            M: 'a month',\n            MM: '%d months',\n            y: 'a year',\n            yy: '%d years',\n        },\n        dayOfMonthOrdinalParse: /\\d{1,2}(st|nd|rd|th)/,\n        ordinal: function (number) {\n            var b = number % 10,\n                output =\n                    ~~((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        week: {\n            dow: 0, // Sunday is the first day of the week.\n            doy: 4, // The week that contains Jan 4th is the first week of the year.\n        },\n    });\n\n    return enAu;\n\n})));\n","//! moment.js locale configuration\n//! locale : English (Canada) [en-ca]\n//! author : Jonathan Abourbih : https://github.com/jonbca\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 enCa = moment.defineLocale('en-ca', {\n        months: 'January_February_March_April_May_June_July_August_September_October_November_December'.split(\n            '_'\n        ),\n        monthsShort: 'Jan_Feb_Mar_Apr_May_Jun_Jul_Aug_Sep_Oct_Nov_Dec'.split('_'),\n        weekdays: 'Sunday_Monday_Tuesday_Wednesday_Thursday_Friday_Saturday'.split(\n            '_'\n        ),\n        weekdaysShort: 'Sun_Mon_Tue_Wed_Thu_Fri_Sat'.split('_'),\n        weekdaysMin: 'Su_Mo_Tu_We_Th_Fr_Sa'.split('_'),\n        longDateFormat: {\n            LT: 'h:mm A',\n            LTS: 'h:mm:ss A',\n            L: 'YYYY-MM-DD',\n            LL: 'MMMM D, YYYY',\n            LLL: 'MMMM D, YYYY h:mm A',\n            LLLL: 'dddd, MMMM D, YYYY h:mm A',\n        },\n        calendar: {\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        relativeTime: {\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            M: 'a month',\n            MM: '%d months',\n            y: 'a year',\n            yy: '%d years',\n        },\n        dayOfMonthOrdinalParse: /\\d{1,2}(st|nd|rd|th)/,\n        ordinal: function (number) {\n            var b = number % 10,\n                output =\n                    ~~((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    return enCa;\n\n})));\n","//! moment.js locale configuration\n//! locale : English (United Kingdom) [en-gb]\n//! author : Chris Gedrim : https://github.com/chrisgedrim\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 enGb = moment.defineLocale('en-gb', {\n        months: 'January_February_March_April_May_June_July_August_September_October_November_December'.split(\n            '_'\n        ),\n        monthsShort: 'Jan_Feb_Mar_Apr_May_Jun_Jul_Aug_Sep_Oct_Nov_Dec'.split('_'),\n        weekdays: 'Sunday_Monday_Tuesday_Wednesday_Thursday_Friday_Saturday'.split(\n            '_'\n        ),\n        weekdaysShort: 'Sun_Mon_Tue_Wed_Thu_Fri_Sat'.split('_'),\n        weekdaysMin: 'Su_Mo_Tu_We_Th_Fr_Sa'.split('_'),\n        longDateFormat: {\n            LT: 'HH:mm',\n            LTS: 'HH:mm:ss',\n            L: 'DD/MM/YYYY',\n            LL: 'D MMMM YYYY',\n            LLL: 'D MMMM YYYY HH:mm',\n            LLLL: 'dddd, D MMMM YYYY HH:mm',\n        },\n        calendar: {\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        relativeTime: {\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            M: 'a month',\n            MM: '%d months',\n            y: 'a year',\n            yy: '%d years',\n        },\n        dayOfMonthOrdinalParse: /\\d{1,2}(st|nd|rd|th)/,\n        ordinal: function (number) {\n            var b = number % 10,\n                output =\n                    ~~((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        week: {\n            dow: 1, // Monday is the first day of the week.\n            doy: 4, // The week that contains Jan 4th is the first week of the year.\n        },\n    });\n\n    return enGb;\n\n})));\n","//! moment.js locale configuration\n//! locale : English (Ireland) [en-ie]\n//! author : Chris Cartlidge : https://github.com/chriscartlidge\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 enIe = moment.defineLocale('en-ie', {\n        months: 'January_February_March_April_May_June_July_August_September_October_November_December'.split(\n            '_'\n        ),\n        monthsShort: 'Jan_Feb_Mar_Apr_May_Jun_Jul_Aug_Sep_Oct_Nov_Dec'.split('_'),\n        weekdays: 'Sunday_Monday_Tuesday_Wednesday_Thursday_Friday_Saturday'.split(\n            '_'\n        ),\n        weekdaysShort: 'Sun_Mon_Tue_Wed_Thu_Fri_Sat'.split('_'),\n        weekdaysMin: 'Su_Mo_Tu_We_Th_Fr_Sa'.split('_'),\n        longDateFormat: {\n            LT: 'HH:mm',\n            LTS: 'HH:mm:ss',\n            L: 'DD/MM/YYYY',\n            LL: 'D MMMM YYYY',\n            LLL: 'D MMMM YYYY HH:mm',\n            LLLL: 'dddd D MMMM YYYY HH:mm',\n        },\n        calendar: {\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        relativeTime: {\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            M: 'a month',\n            MM: '%d months',\n            y: 'a year',\n            yy: '%d years',\n        },\n        dayOfMonthOrdinalParse: /\\d{1,2}(st|nd|rd|th)/,\n        ordinal: function (number) {\n            var b = number % 10,\n                output =\n                    ~~((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        week: {\n            dow: 1, // Monday is the first day of the week.\n            doy: 4, // The week that contains Jan 4th is the first week of the year.\n        },\n    });\n\n    return enIe;\n\n})));\n","//! moment.js locale configuration\n//! locale : English (Israel) [en-il]\n//! author : Chris Gedrim : https://github.com/chrisgedrim\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 enIl = moment.defineLocale('en-il', {\n        months: 'January_February_March_April_May_June_July_August_September_October_November_December'.split(\n            '_'\n        ),\n        monthsShort: 'Jan_Feb_Mar_Apr_May_Jun_Jul_Aug_Sep_Oct_Nov_Dec'.split('_'),\n        weekdays: 'Sunday_Monday_Tuesday_Wednesday_Thursday_Friday_Saturday'.split(\n            '_'\n        ),\n        weekdaysShort: 'Sun_Mon_Tue_Wed_Thu_Fri_Sat'.split('_'),\n        weekdaysMin: 'Su_Mo_Tu_We_Th_Fr_Sa'.split('_'),\n        longDateFormat: {\n            LT: 'HH:mm',\n            LTS: 'HH:mm:ss',\n            L: 'DD/MM/YYYY',\n            LL: 'D MMMM YYYY',\n            LLL: 'D MMMM YYYY HH:mm',\n            LLLL: 'dddd, D MMMM YYYY HH:mm',\n        },\n        calendar: {\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        relativeTime: {\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            M: 'a month',\n            MM: '%d months',\n            y: 'a year',\n            yy: '%d years',\n        },\n        dayOfMonthOrdinalParse: /\\d{1,2}(st|nd|rd|th)/,\n        ordinal: function (number) {\n            var b = number % 10,\n                output =\n                    ~~((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    return enIl;\n\n})));\n","//! moment.js locale configuration\n//! locale : English (India) [en-in]\n//! author : Jatin Agrawal : https://github.com/jatinag22\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 enIn = moment.defineLocale('en-in', {\n        months: 'January_February_March_April_May_June_July_August_September_October_November_December'.split(\n            '_'\n        ),\n        monthsShort: 'Jan_Feb_Mar_Apr_May_Jun_Jul_Aug_Sep_Oct_Nov_Dec'.split('_'),\n        weekdays: 'Sunday_Monday_Tuesday_Wednesday_Thursday_Friday_Saturday'.split(\n            '_'\n        ),\n        weekdaysShort: 'Sun_Mon_Tue_Wed_Thu_Fri_Sat'.split('_'),\n        weekdaysMin: 'Su_Mo_Tu_We_Th_Fr_Sa'.split('_'),\n        longDateFormat: {\n            LT: 'h:mm A',\n            LTS: 'h:mm:ss A',\n            L: 'DD/MM/YYYY',\n            LL: 'D MMMM YYYY',\n            LLL: 'D MMMM YYYY h:mm A',\n            LLLL: 'dddd, D MMMM YYYY h:mm A',\n        },\n        calendar: {\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        relativeTime: {\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            M: 'a month',\n            MM: '%d months',\n            y: 'a year',\n            yy: '%d years',\n        },\n        dayOfMonthOrdinalParse: /\\d{1,2}(st|nd|rd|th)/,\n        ordinal: function (number) {\n            var b = number % 10,\n                output =\n                    ~~((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        week: {\n            dow: 0, // Sunday is the first day of the week.\n            doy: 6, // The week that contains Jan 1st is the first week of the year.\n        },\n    });\n\n    return enIn;\n\n})));\n","//! moment.js locale configuration\n//! locale : English (New Zealand) [en-nz]\n//! author : Luke McGregor : https://github.com/lukemcgregor\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 enNz = moment.defineLocale('en-nz', {\n        months: 'January_February_March_April_May_June_July_August_September_October_November_December'.split(\n            '_'\n        ),\n        monthsShort: 'Jan_Feb_Mar_Apr_May_Jun_Jul_Aug_Sep_Oct_Nov_Dec'.split('_'),\n        weekdays: 'Sunday_Monday_Tuesday_Wednesday_Thursday_Friday_Saturday'.split(\n            '_'\n        ),\n        weekdaysShort: 'Sun_Mon_Tue_Wed_Thu_Fri_Sat'.split('_'),\n        weekdaysMin: 'Su_Mo_Tu_We_Th_Fr_Sa'.split('_'),\n        longDateFormat: {\n            LT: 'h:mm A',\n            LTS: 'h:mm:ss A',\n            L: 'DD/MM/YYYY',\n            LL: 'D MMMM YYYY',\n            LLL: 'D MMMM YYYY h:mm A',\n            LLLL: 'dddd, D MMMM YYYY h:mm A',\n        },\n        calendar: {\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        relativeTime: {\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            M: 'a month',\n            MM: '%d months',\n            y: 'a year',\n            yy: '%d years',\n        },\n        dayOfMonthOrdinalParse: /\\d{1,2}(st|nd|rd|th)/,\n        ordinal: function (number) {\n            var b = number % 10,\n                output =\n                    ~~((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        week: {\n            dow: 1, // Monday is the first day of the week.\n            doy: 4, // The week that contains Jan 4th is the first week of the year.\n        },\n    });\n\n    return enNz;\n\n})));\n","//! moment.js locale configuration\n//! locale : English (Singapore) [en-sg]\n//! author : Matthew Castrillon-Madrigal : https://github.com/techdimension\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 enSg = moment.defineLocale('en-sg', {\n        months: 'January_February_March_April_May_June_July_August_September_October_November_December'.split(\n            '_'\n        ),\n        monthsShort: 'Jan_Feb_Mar_Apr_May_Jun_Jul_Aug_Sep_Oct_Nov_Dec'.split('_'),\n        weekdays: 'Sunday_Monday_Tuesday_Wednesday_Thursday_Friday_Saturday'.split(\n            '_'\n        ),\n        weekdaysShort: 'Sun_Mon_Tue_Wed_Thu_Fri_Sat'.split('_'),\n        weekdaysMin: 'Su_Mo_Tu_We_Th_Fr_Sa'.split('_'),\n        longDateFormat: {\n            LT: 'HH:mm',\n            LTS: 'HH:mm:ss',\n            L: 'DD/MM/YYYY',\n            LL: 'D MMMM YYYY',\n            LLL: 'D MMMM YYYY HH:mm',\n            LLLL: 'dddd, D MMMM YYYY HH:mm',\n        },\n        calendar: {\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        relativeTime: {\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            M: 'a month',\n            MM: '%d months',\n            y: 'a year',\n            yy: '%d years',\n        },\n        dayOfMonthOrdinalParse: /\\d{1,2}(st|nd|rd|th)/,\n        ordinal: function (number) {\n            var b = number % 10,\n                output =\n                    ~~((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        week: {\n            dow: 1, // Monday is the first day of the week.\n            doy: 4, // The week that contains Jan 4th is the first week of the year.\n        },\n    });\n\n    return enSg;\n\n})));\n","//! moment.js locale configuration\n//! locale : Esperanto [eo]\n//! author : Colin Dean : https://github.com/colindean\n//! author : Mia Nordentoft Imperatori : https://github.com/miestasmia\n//! comment : miestasmia corrected the translation by colindean\n//! comment : Vivakvo corrected the translation by colindean and miestasmia\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 eo = moment.defineLocale('eo', {\n        months: 'januaro_februaro_marto_aprilo_majo_junio_julio_aŭgusto_septembro_oktobro_novembro_decembro'.split(\n            '_'\n        ),\n        monthsShort: 'jan_feb_mart_apr_maj_jun_jul_aŭg_sept_okt_nov_dec'.split('_'),\n        weekdays: 'dimanĉo_lundo_mardo_merkredo_ĵaŭdo_vendredo_sabato'.split('_'),\n        weekdaysShort: 'dim_lun_mard_merk_ĵaŭ_ven_sab'.split('_'),\n        weekdaysMin: 'di_lu_ma_me_ĵa_ve_sa'.split('_'),\n        longDateFormat: {\n            LT: 'HH:mm',\n            LTS: 'HH:mm:ss',\n            L: 'YYYY-MM-DD',\n            LL: '[la] D[-an de] MMMM, YYYY',\n            LLL: '[la] D[-an de] MMMM, YYYY HH:mm',\n            LLLL: 'dddd[n], [la] D[-an de] MMMM, YYYY HH:mm',\n            llll: 'ddd, [la] D[-an de] MMM, YYYY HH:mm',\n        },\n        meridiemParse: /[ap]\\.t\\.m/i,\n        isPM: function (input) {\n            return input.charAt(0).toLowerCase() === 'p';\n        },\n        meridiem: function (hours, minutes, isLower) {\n            if (hours > 11) {\n                return isLower ? 'p.t.m.' : 'P.T.M.';\n            } else {\n                return isLower ? 'a.t.m.' : 'A.T.M.';\n            }\n        },\n        calendar: {\n            sameDay: '[Hodiaŭ je] LT',\n            nextDay: '[Morgaŭ je] LT',\n            nextWeek: 'dddd[n je] LT',\n            lastDay: '[Hieraŭ je] LT',\n            lastWeek: '[pasintan] dddd[n je] LT',\n            sameElse: 'L',\n        },\n        relativeTime: {\n            future: 'post %s',\n            past: 'antaŭ %s',\n            s: 'kelkaj sekundoj',\n            ss: '%d sekundoj',\n            m: 'unu minuto',\n            mm: '%d minutoj',\n            h: 'unu horo',\n            hh: '%d horoj',\n            d: 'unu tago', //ne 'diurno', ĉar estas uzita por proksimumo\n            dd: '%d tagoj',\n            M: 'unu monato',\n            MM: '%d monatoj',\n            y: 'unu jaro',\n            yy: '%d jaroj',\n        },\n        dayOfMonthOrdinalParse: /\\d{1,2}a/,\n        ordinal: '%da',\n        week: {\n            dow: 1, // Monday is the first day of the week.\n            doy: 7, // The week that contains Jan 7th is the first week of the year.\n        },\n    });\n\n    return eo;\n\n})));\n","//! moment.js locale configuration\n//! locale : Spanish (Dominican Republic) [es-do]\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 monthsShortDot =\n            'ene._feb._mar._abr._may._jun._jul._ago._sep._oct._nov._dic.'.split(\n                '_'\n            ),\n        monthsShort = 'ene_feb_mar_abr_may_jun_jul_ago_sep_oct_nov_dic'.split('_'),\n        monthsParse = [\n            /^ene/i,\n            /^feb/i,\n            /^mar/i,\n            /^abr/i,\n            /^may/i,\n            /^jun/i,\n            /^jul/i,\n            /^ago/i,\n            /^sep/i,\n            /^oct/i,\n            /^nov/i,\n            /^dic/i,\n        ],\n        monthsRegex =\n            /^(enero|febrero|marzo|abril|mayo|junio|julio|agosto|septiembre|octubre|noviembre|diciembre|ene\\.?|feb\\.?|mar\\.?|abr\\.?|may\\.?|jun\\.?|jul\\.?|ago\\.?|sep\\.?|oct\\.?|nov\\.?|dic\\.?)/i;\n\n    var esDo = moment.defineLocale('es-do', {\n        months: 'enero_febrero_marzo_abril_mayo_junio_julio_agosto_septiembre_octubre_noviembre_diciembre'.split(\n            '_'\n        ),\n        monthsShort: function (m, format) {\n            if (!m) {\n                return monthsShortDot;\n            } else if (/-MMM-/.test(format)) {\n                return monthsShort[m.month()];\n            } else {\n                return monthsShortDot[m.month()];\n            }\n        },\n        monthsRegex: monthsRegex,\n        monthsShortRegex: monthsRegex,\n        monthsStrictRegex:\n            /^(enero|febrero|marzo|abril|mayo|junio|julio|agosto|septiembre|octubre|noviembre|diciembre)/i,\n        monthsShortStrictRegex:\n            /^(ene\\.?|feb\\.?|mar\\.?|abr\\.?|may\\.?|jun\\.?|jul\\.?|ago\\.?|sep\\.?|oct\\.?|nov\\.?|dic\\.?)/i,\n        monthsParse: monthsParse,\n        longMonthsParse: monthsParse,\n        shortMonthsParse: monthsParse,\n        weekdays: 'domingo_lunes_martes_miércoles_jueves_viernes_sábado'.split('_'),\n        weekdaysShort: 'dom._lun._mar._mié._jue._vie._sáb.'.split('_'),\n        weekdaysMin: 'do_lu_ma_mi_ju_vi_sá'.split('_'),\n        weekdaysParseExact: true,\n        longDateFormat: {\n            LT: 'h:mm A',\n            LTS: 'h:mm:ss A',\n            L: 'DD/MM/YYYY',\n            LL: 'D [de] MMMM [de] YYYY',\n            LLL: 'D [de] MMMM [de] YYYY h:mm A',\n            LLLL: 'dddd, D [de] MMMM [de] YYYY h:mm A',\n        },\n        calendar: {\n            sameDay: function () {\n                return '[hoy a la' + (this.hours() !== 1 ? 's' : '') + '] LT';\n            },\n            nextDay: function () {\n                return '[mañana a la' + (this.hours() !== 1 ? 's' : '') + '] LT';\n            },\n            nextWeek: function () {\n                return 'dddd [a la' + (this.hours() !== 1 ? 's' : '') + '] LT';\n            },\n            lastDay: function () {\n                return '[ayer a la' + (this.hours() !== 1 ? 's' : '') + '] LT';\n            },\n            lastWeek: function () {\n                return (\n                    '[el] dddd [pasado a la' +\n                    (this.hours() !== 1 ? 's' : '') +\n                    '] LT'\n                );\n            },\n            sameElse: 'L',\n        },\n        relativeTime: {\n            future: 'en %s',\n            past: 'hace %s',\n            s: 'unos segundos',\n            ss: '%d segundos',\n            m: 'un minuto',\n            mm: '%d minutos',\n            h: 'una hora',\n            hh: '%d horas',\n            d: 'un día',\n            dd: '%d días',\n            w: 'una semana',\n            ww: '%d semanas',\n            M: 'un mes',\n            MM: '%d meses',\n            y: 'un año',\n            yy: '%d años',\n        },\n        dayOfMonthOrdinalParse: /\\d{1,2}º/,\n        ordinal: '%dº',\n        week: {\n            dow: 1, // Monday is the first day of the week.\n            doy: 4, // The week that contains Jan 4th is the first week of the year.\n        },\n    });\n\n    return esDo;\n\n})));\n","//! moment.js locale configuration\n//! locale : Spanish (Mexico) [es-mx]\n//! author : JC Franco : https://github.com/jcfranco\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 monthsShortDot =\n            'ene._feb._mar._abr._may._jun._jul._ago._sep._oct._nov._dic.'.split(\n                '_'\n            ),\n        monthsShort = 'ene_feb_mar_abr_may_jun_jul_ago_sep_oct_nov_dic'.split('_'),\n        monthsParse = [\n            /^ene/i,\n            /^feb/i,\n            /^mar/i,\n            /^abr/i,\n            /^may/i,\n            /^jun/i,\n            /^jul/i,\n            /^ago/i,\n            /^sep/i,\n            /^oct/i,\n            /^nov/i,\n            /^dic/i,\n        ],\n        monthsRegex =\n            /^(enero|febrero|marzo|abril|mayo|junio|julio|agosto|septiembre|octubre|noviembre|diciembre|ene\\.?|feb\\.?|mar\\.?|abr\\.?|may\\.?|jun\\.?|jul\\.?|ago\\.?|sep\\.?|oct\\.?|nov\\.?|dic\\.?)/i;\n\n    var esMx = moment.defineLocale('es-mx', {\n        months: 'enero_febrero_marzo_abril_mayo_junio_julio_agosto_septiembre_octubre_noviembre_diciembre'.split(\n            '_'\n        ),\n        monthsShort: function (m, format) {\n            if (!m) {\n                return monthsShortDot;\n            } else if (/-MMM-/.test(format)) {\n                return monthsShort[m.month()];\n            } else {\n                return monthsShortDot[m.month()];\n            }\n        },\n        monthsRegex: monthsRegex,\n        monthsShortRegex: monthsRegex,\n        monthsStrictRegex:\n            /^(enero|febrero|marzo|abril|mayo|junio|julio|agosto|septiembre|octubre|noviembre|diciembre)/i,\n        monthsShortStrictRegex:\n            /^(ene\\.?|feb\\.?|mar\\.?|abr\\.?|may\\.?|jun\\.?|jul\\.?|ago\\.?|sep\\.?|oct\\.?|nov\\.?|dic\\.?)/i,\n        monthsParse: monthsParse,\n        longMonthsParse: monthsParse,\n        shortMonthsParse: monthsParse,\n        weekdays: 'domingo_lunes_martes_miércoles_jueves_viernes_sábado'.split('_'),\n        weekdaysShort: 'dom._lun._mar._mié._jue._vie._sáb.'.split('_'),\n        weekdaysMin: 'do_lu_ma_mi_ju_vi_sá'.split('_'),\n        weekdaysParseExact: true,\n        longDateFormat: {\n            LT: 'H:mm',\n            LTS: 'H:mm:ss',\n            L: 'DD/MM/YYYY',\n            LL: 'D [de] MMMM [de] YYYY',\n            LLL: 'D [de] MMMM [de] YYYY H:mm',\n            LLLL: 'dddd, D [de] MMMM [de] YYYY H:mm',\n        },\n        calendar: {\n            sameDay: function () {\n                return '[hoy a la' + (this.hours() !== 1 ? 's' : '') + '] LT';\n            },\n            nextDay: function () {\n                return '[mañana a la' + (this.hours() !== 1 ? 's' : '') + '] LT';\n            },\n            nextWeek: function () {\n                return 'dddd [a la' + (this.hours() !== 1 ? 's' : '') + '] LT';\n            },\n            lastDay: function () {\n                return '[ayer a la' + (this.hours() !== 1 ? 's' : '') + '] LT';\n            },\n            lastWeek: function () {\n                return (\n                    '[el] dddd [pasado a la' +\n                    (this.hours() !== 1 ? 's' : '') +\n                    '] LT'\n                );\n            },\n            sameElse: 'L',\n        },\n        relativeTime: {\n            future: 'en %s',\n            past: 'hace %s',\n            s: 'unos segundos',\n            ss: '%d segundos',\n            m: 'un minuto',\n            mm: '%d minutos',\n            h: 'una hora',\n            hh: '%d horas',\n            d: 'un día',\n            dd: '%d días',\n            w: 'una semana',\n            ww: '%d semanas',\n            M: 'un mes',\n            MM: '%d meses',\n            y: 'un año',\n            yy: '%d años',\n        },\n        dayOfMonthOrdinalParse: /\\d{1,2}º/,\n        ordinal: '%dº',\n        week: {\n            dow: 0, // Sunday is the first day of the week.\n            doy: 4, // The week that contains Jan 4th is the first week of the year.\n        },\n        invalidDate: 'Fecha inválida',\n    });\n\n    return esMx;\n\n})));\n","//! moment.js locale configuration\n//! locale : Spanish (United States) [es-us]\n//! author : bustta : https://github.com/bustta\n//! author : chrisrodz : https://github.com/chrisrodz\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 monthsShortDot =\n            'ene._feb._mar._abr._may._jun._jul._ago._sep._oct._nov._dic.'.split(\n                '_'\n            ),\n        monthsShort = 'ene_feb_mar_abr_may_jun_jul_ago_sep_oct_nov_dic'.split('_'),\n        monthsParse = [\n            /^ene/i,\n            /^feb/i,\n            /^mar/i,\n            /^abr/i,\n            /^may/i,\n            /^jun/i,\n            /^jul/i,\n            /^ago/i,\n            /^sep/i,\n            /^oct/i,\n            /^nov/i,\n            /^dic/i,\n        ],\n        monthsRegex =\n            /^(enero|febrero|marzo|abril|mayo|junio|julio|agosto|septiembre|octubre|noviembre|diciembre|ene\\.?|feb\\.?|mar\\.?|abr\\.?|may\\.?|jun\\.?|jul\\.?|ago\\.?|sep\\.?|oct\\.?|nov\\.?|dic\\.?)/i;\n\n    var esUs = moment.defineLocale('es-us', {\n        months: 'enero_febrero_marzo_abril_mayo_junio_julio_agosto_septiembre_octubre_noviembre_diciembre'.split(\n            '_'\n        ),\n        monthsShort: function (m, format) {\n            if (!m) {\n                return monthsShortDot;\n            } else if (/-MMM-/.test(format)) {\n                return monthsShort[m.month()];\n            } else {\n                return monthsShortDot[m.month()];\n            }\n        },\n        monthsRegex: monthsRegex,\n        monthsShortRegex: monthsRegex,\n        monthsStrictRegex:\n            /^(enero|febrero|marzo|abril|mayo|junio|julio|agosto|septiembre|octubre|noviembre|diciembre)/i,\n        monthsShortStrictRegex:\n            /^(ene\\.?|feb\\.?|mar\\.?|abr\\.?|may\\.?|jun\\.?|jul\\.?|ago\\.?|sep\\.?|oct\\.?|nov\\.?|dic\\.?)/i,\n        monthsParse: monthsParse,\n        longMonthsParse: monthsParse,\n        shortMonthsParse: monthsParse,\n        weekdays: 'domingo_lunes_martes_miércoles_jueves_viernes_sábado'.split('_'),\n        weekdaysShort: 'dom._lun._mar._mié._jue._vie._sáb.'.split('_'),\n        weekdaysMin: 'do_lu_ma_mi_ju_vi_sá'.split('_'),\n        weekdaysParseExact: true,\n        longDateFormat: {\n            LT: 'h:mm A',\n            LTS: 'h:mm:ss A',\n            L: 'MM/DD/YYYY',\n            LL: 'D [de] MMMM [de] YYYY',\n            LLL: 'D [de] MMMM [de] YYYY h:mm A',\n            LLLL: 'dddd, D [de] MMMM [de] YYYY h:mm A',\n        },\n        calendar: {\n            sameDay: function () {\n                return '[hoy a la' + (this.hours() !== 1 ? 's' : '') + '] LT';\n            },\n            nextDay: function () {\n                return '[mañana a la' + (this.hours() !== 1 ? 's' : '') + '] LT';\n            },\n            nextWeek: function () {\n                return 'dddd [a la' + (this.hours() !== 1 ? 's' : '') + '] LT';\n            },\n            lastDay: function () {\n                return '[ayer a la' + (this.hours() !== 1 ? 's' : '') + '] LT';\n            },\n            lastWeek: function () {\n                return (\n                    '[el] dddd [pasado a la' +\n                    (this.hours() !== 1 ? 's' : '') +\n                    '] LT'\n                );\n            },\n            sameElse: 'L',\n        },\n        relativeTime: {\n            future: 'en %s',\n            past: 'hace %s',\n            s: 'unos segundos',\n            ss: '%d segundos',\n            m: 'un minuto',\n            mm: '%d minutos',\n            h: 'una hora',\n            hh: '%d horas',\n            d: 'un día',\n            dd: '%d días',\n            w: 'una semana',\n            ww: '%d semanas',\n            M: 'un mes',\n            MM: '%d meses',\n            y: 'un año',\n            yy: '%d años',\n        },\n        dayOfMonthOrdinalParse: /\\d{1,2}º/,\n        ordinal: '%dº',\n        week: {\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\n    return esUs;\n\n})));\n","//! moment.js locale configuration\n//! locale : Spanish [es]\n//! author : Julio Napurí : https://github.com/julionc\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 monthsShortDot =\n            'ene._feb._mar._abr._may._jun._jul._ago._sep._oct._nov._dic.'.split(\n                '_'\n            ),\n        monthsShort = 'ene_feb_mar_abr_may_jun_jul_ago_sep_oct_nov_dic'.split('_'),\n        monthsParse = [\n            /^ene/i,\n            /^feb/i,\n            /^mar/i,\n            /^abr/i,\n            /^may/i,\n            /^jun/i,\n            /^jul/i,\n            /^ago/i,\n            /^sep/i,\n            /^oct/i,\n            /^nov/i,\n            /^dic/i,\n        ],\n        monthsRegex =\n            /^(enero|febrero|marzo|abril|mayo|junio|julio|agosto|septiembre|octubre|noviembre|diciembre|ene\\.?|feb\\.?|mar\\.?|abr\\.?|may\\.?|jun\\.?|jul\\.?|ago\\.?|sep\\.?|oct\\.?|nov\\.?|dic\\.?)/i;\n\n    var es = moment.defineLocale('es', {\n        months: 'enero_febrero_marzo_abril_mayo_junio_julio_agosto_septiembre_octubre_noviembre_diciembre'.split(\n            '_'\n        ),\n        monthsShort: function (m, format) {\n            if (!m) {\n                return monthsShortDot;\n            } else if (/-MMM-/.test(format)) {\n                return monthsShort[m.month()];\n            } else {\n                return monthsShortDot[m.month()];\n            }\n        },\n        monthsRegex: monthsRegex,\n        monthsShortRegex: monthsRegex,\n        monthsStrictRegex:\n            /^(enero|febrero|marzo|abril|mayo|junio|julio|agosto|septiembre|octubre|noviembre|diciembre)/i,\n        monthsShortStrictRegex:\n            /^(ene\\.?|feb\\.?|mar\\.?|abr\\.?|may\\.?|jun\\.?|jul\\.?|ago\\.?|sep\\.?|oct\\.?|nov\\.?|dic\\.?)/i,\n        monthsParse: monthsParse,\n        longMonthsParse: monthsParse,\n        shortMonthsParse: monthsParse,\n        weekdays: 'domingo_lunes_martes_miércoles_jueves_viernes_sábado'.split('_'),\n        weekdaysShort: 'dom._lun._mar._mié._jue._vie._sáb.'.split('_'),\n        weekdaysMin: 'do_lu_ma_mi_ju_vi_sá'.split('_'),\n        weekdaysParseExact: true,\n        longDateFormat: {\n            LT: 'H:mm',\n            LTS: 'H:mm:ss',\n            L: 'DD/MM/YYYY',\n            LL: 'D [de] MMMM [de] YYYY',\n            LLL: 'D [de] MMMM [de] YYYY H:mm',\n            LLLL: 'dddd, D [de] MMMM [de] YYYY H:mm',\n        },\n        calendar: {\n            sameDay: function () {\n                return '[hoy a la' + (this.hours() !== 1 ? 's' : '') + '] LT';\n            },\n            nextDay: function () {\n                return '[mañana a la' + (this.hours() !== 1 ? 's' : '') + '] LT';\n            },\n            nextWeek: function () {\n                return 'dddd [a la' + (this.hours() !== 1 ? 's' : '') + '] LT';\n            },\n            lastDay: function () {\n                return '[ayer a la' + (this.hours() !== 1 ? 's' : '') + '] LT';\n            },\n            lastWeek: function () {\n                return (\n                    '[el] dddd [pasado a la' +\n                    (this.hours() !== 1 ? 's' : '') +\n                    '] LT'\n                );\n            },\n            sameElse: 'L',\n        },\n        relativeTime: {\n            future: 'en %s',\n            past: 'hace %s',\n            s: 'unos segundos',\n            ss: '%d segundos',\n            m: 'un minuto',\n            mm: '%d minutos',\n            h: 'una hora',\n            hh: '%d horas',\n            d: 'un día',\n            dd: '%d días',\n            w: 'una semana',\n            ww: '%d semanas',\n            M: 'un mes',\n            MM: '%d meses',\n            y: 'un año',\n            yy: '%d años',\n        },\n        dayOfMonthOrdinalParse: /\\d{1,2}º/,\n        ordinal: '%dº',\n        week: {\n            dow: 1, // Monday is the first day of the week.\n            doy: 4, // The week that contains Jan 4th is the first week of the year.\n        },\n        invalidDate: 'Fecha inválida',\n    });\n\n    return es;\n\n})));\n","//! moment.js locale configuration\n//! locale : Estonian [et]\n//! author : Henry Kehlmann : https://github.com/madhenry\n//! improvements : Illimar Tambek : https://github.com/ragulka\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    function processRelativeTime(number, withoutSuffix, key, isFuture) {\n        var format = {\n            s: ['mõne sekundi', 'mõni sekund', 'paar sekundit'],\n            ss: [number + 'sekundi', number + 'sekundit'],\n            m: ['ühe minuti', 'üks minut'],\n            mm: [number + ' minuti', number + ' minutit'],\n            h: ['ühe tunni', 'tund aega', 'üks tund'],\n            hh: [number + ' tunni', number + ' tundi'],\n            d: ['ühe päeva', 'üks päev'],\n            M: ['kuu aja', 'kuu aega', 'üks kuu'],\n            MM: [number + ' kuu', number + ' kuud'],\n            y: ['ühe aasta', 'aasta', 'üks aasta'],\n            yy: [number + ' aasta', number + ' aastat'],\n        };\n        if (withoutSuffix) {\n            return format[key][2] ? format[key][2] : format[key][1];\n        }\n        return isFuture ? format[key][0] : format[key][1];\n    }\n\n    var et = moment.defineLocale('et', {\n        months: 'jaanuar_veebruar_märts_aprill_mai_juuni_juuli_august_september_oktoober_november_detsember'.split(\n            '_'\n        ),\n        monthsShort:\n            'jaan_veebr_märts_apr_mai_juuni_juuli_aug_sept_okt_nov_dets'.split('_'),\n        weekdays:\n            'pühapäev_esmaspäev_teisipäev_kolmapäev_neljapäev_reede_laupäev'.split(\n                '_'\n            ),\n        weekdaysShort: 'P_E_T_K_N_R_L'.split('_'),\n        weekdaysMin: 'P_E_T_K_N_R_L'.split('_'),\n        longDateFormat: {\n            LT: 'H:mm',\n            LTS: 'H:mm:ss',\n            L: 'DD.MM.YYYY',\n            LL: 'D. MMMM YYYY',\n            LLL: 'D. MMMM YYYY H:mm',\n            LLLL: 'dddd, D. MMMM YYYY H:mm',\n        },\n        calendar: {\n            sameDay: '[Täna,] LT',\n            nextDay: '[Homme,] LT',\n            nextWeek: '[Järgmine] dddd LT',\n            lastDay: '[Eile,] LT',\n            lastWeek: '[Eelmine] dddd LT',\n            sameElse: 'L',\n        },\n        relativeTime: {\n            future: '%s pärast',\n            past: '%s tagasi',\n            s: processRelativeTime,\n            ss: processRelativeTime,\n            m: processRelativeTime,\n            mm: processRelativeTime,\n            h: processRelativeTime,\n            hh: processRelativeTime,\n            d: processRelativeTime,\n            dd: '%d päeva',\n            M: processRelativeTime,\n            MM: processRelativeTime,\n            y: processRelativeTime,\n            yy: processRelativeTime,\n        },\n        dayOfMonthOrdinalParse: /\\d{1,2}\\./,\n        ordinal: '%d.',\n        week: {\n            dow: 1, // Monday is the first day of the week.\n            doy: 4, // The week that contains Jan 4th is the first week of the year.\n        },\n    });\n\n    return et;\n\n})));\n","//! moment.js locale configuration\n//! locale : Basque [eu]\n//! author : Eneko Illarramendi : https://github.com/eillarra\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 eu = moment.defineLocale('eu', {\n        months: 'urtarrila_otsaila_martxoa_apirila_maiatza_ekaina_uztaila_abuztua_iraila_urria_azaroa_abendua'.split(\n            '_'\n        ),\n        monthsShort:\n            'urt._ots._mar._api._mai._eka._uzt._abu._ira._urr._aza._abe.'.split(\n                '_'\n            ),\n        monthsParseExact: true,\n        weekdays:\n            'igandea_astelehena_asteartea_asteazkena_osteguna_ostirala_larunbata'.split(\n                '_'\n            ),\n        weekdaysShort: 'ig._al._ar._az._og._ol._lr.'.split('_'),\n        weekdaysMin: 'ig_al_ar_az_og_ol_lr'.split('_'),\n        weekdaysParseExact: true,\n        longDateFormat: {\n            LT: 'HH:mm',\n            LTS: 'HH:mm:ss',\n            L: 'YYYY-MM-DD',\n            LL: 'YYYY[ko] MMMM[ren] D[a]',\n            LLL: 'YYYY[ko] MMMM[ren] D[a] HH:mm',\n            LLLL: 'dddd, YYYY[ko] MMMM[ren] D[a] HH:mm',\n            l: 'YYYY-M-D',\n            ll: 'YYYY[ko] MMM D[a]',\n            lll: 'YYYY[ko] MMM D[a] HH:mm',\n            llll: 'ddd, YYYY[ko] MMM D[a] HH:mm',\n        },\n        calendar: {\n            sameDay: '[gaur] LT[etan]',\n            nextDay: '[bihar] LT[etan]',\n            nextWeek: 'dddd LT[etan]',\n            lastDay: '[atzo] LT[etan]',\n            lastWeek: '[aurreko] dddd LT[etan]',\n            sameElse: 'L',\n        },\n        relativeTime: {\n            future: '%s barru',\n            past: 'duela %s',\n            s: 'segundo batzuk',\n            ss: '%d segundo',\n            m: 'minutu bat',\n            mm: '%d minutu',\n            h: 'ordu bat',\n            hh: '%d ordu',\n            d: 'egun bat',\n            dd: '%d egun',\n            M: 'hilabete bat',\n            MM: '%d hilabete',\n            y: 'urte bat',\n            yy: '%d urte',\n        },\n        dayOfMonthOrdinalParse: /\\d{1,2}\\./,\n        ordinal: '%d.',\n        week: {\n            dow: 1, // Monday is the first day of the week.\n            doy: 7, // The week that contains Jan 7th is the first week of the year.\n        },\n    });\n\n    return eu;\n\n})));\n","//! moment.js locale configuration\n//! locale : Persian [fa]\n//! author : Ebrahim Byagowi : https://github.com/ebraminio\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\n    var fa = moment.defineLocale('fa', {\n        months: 'ژانویه_فوریه_مارس_آوریل_مه_ژوئن_ژوئیه_اوت_سپتامبر_اکتبر_نوامبر_دسامبر'.split(\n            '_'\n        ),\n        monthsShort:\n            'ژانویه_فوریه_مارس_آوریل_مه_ژوئن_ژوئیه_اوت_سپتامبر_اکتبر_نوامبر_دسامبر'.split(\n                '_'\n            ),\n        weekdays:\n            'یک\\u200cشنبه_دوشنبه_سه\\u200cشنبه_چهارشنبه_پنج\\u200cشنبه_جمعه_شنبه'.split(\n                '_'\n            ),\n        weekdaysShort:\n            'یک\\u200cشنبه_دوشنبه_سه\\u200cشنبه_چهارشنبه_پنج\\u200cشنبه_جمعه_شنبه'.split(\n                '_'\n            ),\n        weekdaysMin: 'ی_د_س_چ_پ_ج_ش'.split('_'),\n        weekdaysParseExact: true,\n        longDateFormat: {\n            LT: 'HH:mm',\n            LTS: 'HH:mm:ss',\n            L: 'DD/MM/YYYY',\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 /بعد از ظهر/.test(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: 'چند ثانیه',\n            ss: '%d ثانیه',\n            m: 'یک دقیقه',\n            mm: '%d دقیقه',\n            h: 'یک ساعت',\n            hh: '%d ساعت',\n            d: 'یک روز',\n            dd: '%d روز',\n            M: 'یک ماه',\n            MM: '%d ماه',\n            y: 'یک سال',\n            yy: '%d سال',\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        dayOfMonthOrdinalParse: /\\d{1,2}م/,\n        ordinal: '%dم',\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 fa;\n\n})));\n","//! moment.js locale configuration\n//! locale : Finnish [fi]\n//! author : Tarmo Aidantausta : https://github.com/bleadof\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 numbersPast =\n            'nolla yksi kaksi kolme neljä viisi kuusi seitsemän kahdeksan yhdeksän'.split(\n                ' '\n            ),\n        numbersFuture = [\n            'nolla',\n            'yhden',\n            'kahden',\n            'kolmen',\n            'neljän',\n            'viiden',\n            'kuuden',\n            numbersPast[7],\n            numbersPast[8],\n            numbersPast[9],\n        ];\n    function translate(number, withoutSuffix, key, isFuture) {\n        var result = '';\n        switch (key) {\n            case 's':\n                return isFuture ? 'muutaman sekunnin' : 'muutama sekunti';\n            case 'ss':\n                result = isFuture ? 'sekunnin' : 'sekuntia';\n                break;\n            case 'm':\n                return isFuture ? 'minuutin' : 'minuutti';\n            case 'mm':\n                result = isFuture ? 'minuutin' : 'minuuttia';\n                break;\n            case 'h':\n                return isFuture ? 'tunnin' : 'tunti';\n            case 'hh':\n                result = isFuture ? 'tunnin' : 'tuntia';\n                break;\n            case 'd':\n                return isFuture ? 'päivän' : 'päivä';\n            case 'dd':\n                result = isFuture ? 'päivän' : 'päivää';\n                break;\n            case 'M':\n                return isFuture ? 'kuukauden' : 'kuukausi';\n            case 'MM':\n                result = isFuture ? 'kuukauden' : 'kuukautta';\n                break;\n            case 'y':\n                return isFuture ? 'vuoden' : 'vuosi';\n            case 'yy':\n                result = isFuture ? 'vuoden' : 'vuotta';\n                break;\n        }\n        result = verbalNumber(number, isFuture) + ' ' + result;\n        return result;\n    }\n    function verbalNumber(number, isFuture) {\n        return number < 10\n            ? isFuture\n                ? numbersFuture[number]\n                : numbersPast[number]\n            : number;\n    }\n\n    var fi = moment.defineLocale('fi', {\n        months: 'tammikuu_helmikuu_maaliskuu_huhtikuu_toukokuu_kesäkuu_heinäkuu_elokuu_syyskuu_lokakuu_marraskuu_joulukuu'.split(\n            '_'\n        ),\n        monthsShort:\n            'tammi_helmi_maalis_huhti_touko_kesä_heinä_elo_syys_loka_marras_joulu'.split(\n                '_'\n            ),\n        weekdays:\n            'sunnuntai_maanantai_tiistai_keskiviikko_torstai_perjantai_lauantai'.split(\n                '_'\n            ),\n        weekdaysShort: 'su_ma_ti_ke_to_pe_la'.split('_'),\n        weekdaysMin: 'su_ma_ti_ke_to_pe_la'.split('_'),\n        longDateFormat: {\n            LT: 'HH.mm',\n            LTS: 'HH.mm.ss',\n            L: 'DD.MM.YYYY',\n            LL: 'Do MMMM[ta] YYYY',\n            LLL: 'Do MMMM[ta] YYYY, [klo] HH.mm',\n            LLLL: 'dddd, Do MMMM[ta] YYYY, [klo] HH.mm',\n            l: 'D.M.YYYY',\n            ll: 'Do MMM YYYY',\n            lll: 'Do MMM YYYY, [klo] HH.mm',\n            llll: 'ddd, Do MMM YYYY, [klo] HH.mm',\n        },\n        calendar: {\n            sameDay: '[tänään] [klo] LT',\n            nextDay: '[huomenna] [klo] LT',\n            nextWeek: 'dddd [klo] LT',\n            lastDay: '[eilen] [klo] LT',\n            lastWeek: '[viime] dddd[na] [klo] LT',\n            sameElse: 'L',\n        },\n        relativeTime: {\n            future: '%s päästä',\n            past: '%s sitten',\n            s: translate,\n            ss: translate,\n            m: translate,\n            mm: translate,\n            h: translate,\n            hh: translate,\n            d: translate,\n            dd: translate,\n            M: translate,\n            MM: translate,\n            y: translate,\n            yy: translate,\n        },\n        dayOfMonthOrdinalParse: /\\d{1,2}\\./,\n        ordinal: '%d.',\n        week: {\n            dow: 1, // Monday is the first day of the week.\n            doy: 4, // The week that contains Jan 4th is the first week of the year.\n        },\n    });\n\n    return fi;\n\n})));\n","//! moment.js locale configuration\n//! locale : Filipino [fil]\n//! author : Dan Hagman : https://github.com/hagmandan\n//! author : Matthew Co : https://github.com/matthewdeeco\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 fil = moment.defineLocale('fil', {\n        months: 'Enero_Pebrero_Marso_Abril_Mayo_Hunyo_Hulyo_Agosto_Setyembre_Oktubre_Nobyembre_Disyembre'.split(\n            '_'\n        ),\n        monthsShort: 'Ene_Peb_Mar_Abr_May_Hun_Hul_Ago_Set_Okt_Nob_Dis'.split('_'),\n        weekdays: 'Linggo_Lunes_Martes_Miyerkules_Huwebes_Biyernes_Sabado'.split(\n            '_'\n        ),\n        weekdaysShort: 'Lin_Lun_Mar_Miy_Huw_Biy_Sab'.split('_'),\n        weekdaysMin: 'Li_Lu_Ma_Mi_Hu_Bi_Sab'.split('_'),\n        longDateFormat: {\n            LT: 'HH:mm',\n            LTS: 'HH:mm:ss',\n            L: 'MM/D/YYYY',\n            LL: 'MMMM D, YYYY',\n            LLL: 'MMMM D, YYYY HH:mm',\n            LLLL: 'dddd, MMMM DD, YYYY HH:mm',\n        },\n        calendar: {\n            sameDay: 'LT [ngayong araw]',\n            nextDay: '[Bukas ng] LT',\n            nextWeek: 'LT [sa susunod na] dddd',\n            lastDay: 'LT [kahapon]',\n            lastWeek: 'LT [noong nakaraang] dddd',\n            sameElse: 'L',\n        },\n        relativeTime: {\n            future: 'sa loob ng %s',\n            past: '%s ang nakalipas',\n            s: 'ilang segundo',\n            ss: '%d segundo',\n            m: 'isang minuto',\n            mm: '%d minuto',\n            h: 'isang oras',\n            hh: '%d oras',\n            d: 'isang araw',\n            dd: '%d araw',\n            M: 'isang buwan',\n            MM: '%d buwan',\n            y: 'isang taon',\n            yy: '%d taon',\n        },\n        dayOfMonthOrdinalParse: /\\d{1,2}/,\n        ordinal: function (number) {\n            return number;\n        },\n        week: {\n            dow: 1, // Monday is the first day of the week.\n            doy: 4, // The week that contains Jan 4th is the first week of the year.\n        },\n    });\n\n    return fil;\n\n})));\n","//! moment.js locale configuration\n//! locale : Faroese [fo]\n//! author : Ragnar Johannesen : https://github.com/ragnar123\n//! author : Kristian Sakarisson : https://github.com/sakarisson\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 fo = moment.defineLocale('fo', {\n        months: 'januar_februar_mars_apríl_mai_juni_juli_august_september_oktober_november_desember'.split(\n            '_'\n        ),\n        monthsShort: 'jan_feb_mar_apr_mai_jun_jul_aug_sep_okt_nov_des'.split('_'),\n        weekdays:\n            'sunnudagur_mánadagur_týsdagur_mikudagur_hósdagur_fríggjadagur_leygardagur'.split(\n                '_'\n            ),\n        weekdaysShort: 'sun_mán_týs_mik_hós_frí_ley'.split('_'),\n        weekdaysMin: 'su_má_tý_mi_hó_fr_le'.split('_'),\n        longDateFormat: {\n            LT: 'HH:mm',\n            LTS: 'HH:mm:ss',\n            L: 'DD/MM/YYYY',\n            LL: 'D MMMM YYYY',\n            LLL: 'D MMMM YYYY HH:mm',\n            LLLL: 'dddd D. MMMM, YYYY HH:mm',\n        },\n        calendar: {\n            sameDay: '[Í dag kl.] LT',\n            nextDay: '[Í morgin kl.] LT',\n            nextWeek: 'dddd [kl.] LT',\n            lastDay: '[Í gjár kl.] LT',\n            lastWeek: '[síðstu] dddd [kl] LT',\n            sameElse: 'L',\n        },\n        relativeTime: {\n            future: 'um %s',\n            past: '%s síðani',\n            s: 'fá sekund',\n            ss: '%d sekundir',\n            m: 'ein minuttur',\n            mm: '%d minuttir',\n            h: 'ein tími',\n            hh: '%d tímar',\n            d: 'ein dagur',\n            dd: '%d dagar',\n            M: 'ein mánaður',\n            MM: '%d mánaðir',\n            y: 'eitt ár',\n            yy: '%d ár',\n        },\n        dayOfMonthOrdinalParse: /\\d{1,2}\\./,\n        ordinal: '%d.',\n        week: {\n            dow: 1, // Monday is the first day of the week.\n            doy: 4, // The week that contains Jan 4th is the first week of the year.\n        },\n    });\n\n    return fo;\n\n})));\n","//! moment.js locale configuration\n//! locale : French (Canada) [fr-ca]\n//! author : Jonathan Abourbih : https://github.com/jonbca\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 frCa = moment.defineLocale('fr-ca', {\n        months: 'janvier_février_mars_avril_mai_juin_juillet_août_septembre_octobre_novembre_décembre'.split(\n            '_'\n        ),\n        monthsShort:\n            'janv._févr._mars_avr._mai_juin_juil._août_sept._oct._nov._déc.'.split(\n                '_'\n            ),\n        monthsParseExact: true,\n        weekdays: 'dimanche_lundi_mardi_mercredi_jeudi_vendredi_samedi'.split('_'),\n        weekdaysShort: 'dim._lun._mar._mer._jeu._ven._sam.'.split('_'),\n        weekdaysMin: 'di_lu_ma_me_je_ve_sa'.split('_'),\n        weekdaysParseExact: true,\n        longDateFormat: {\n            LT: 'HH:mm',\n            LTS: 'HH:mm:ss',\n            L: 'YYYY-MM-DD',\n            LL: 'D MMMM YYYY',\n            LLL: 'D MMMM YYYY HH:mm',\n            LLLL: 'dddd D MMMM YYYY HH:mm',\n        },\n        calendar: {\n            sameDay: '[Aujourd’hui à] LT',\n            nextDay: '[Demain à] LT',\n            nextWeek: 'dddd [à] LT',\n            lastDay: '[Hier à] LT',\n            lastWeek: 'dddd [dernier à] LT',\n            sameElse: 'L',\n        },\n        relativeTime: {\n            future: 'dans %s',\n            past: 'il y a %s',\n            s: 'quelques secondes',\n            ss: '%d secondes',\n            m: 'une minute',\n            mm: '%d minutes',\n            h: 'une heure',\n            hh: '%d heures',\n            d: 'un jour',\n            dd: '%d jours',\n            M: 'un mois',\n            MM: '%d mois',\n            y: 'un an',\n            yy: '%d ans',\n        },\n        dayOfMonthOrdinalParse: /\\d{1,2}(er|e)/,\n        ordinal: function (number, period) {\n            switch (period) {\n                // Words with masculine grammatical gender: mois, trimestre, jour\n                default:\n                case 'M':\n                case 'Q':\n                case 'D':\n                case 'DDD':\n                case 'd':\n                    return number + (number === 1 ? 'er' : 'e');\n\n                // Words with feminine grammatical gender: semaine\n                case 'w':\n                case 'W':\n                    return number + (number === 1 ? 're' : 'e');\n            }\n        },\n    });\n\n    return frCa;\n\n})));\n","//! moment.js locale configuration\n//! locale : French (Switzerland) [fr-ch]\n//! author : Gaspard Bucher : https://github.com/gaspard\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 frCh = moment.defineLocale('fr-ch', {\n        months: 'janvier_février_mars_avril_mai_juin_juillet_août_septembre_octobre_novembre_décembre'.split(\n            '_'\n        ),\n        monthsShort:\n            'janv._févr._mars_avr._mai_juin_juil._août_sept._oct._nov._déc.'.split(\n                '_'\n            ),\n        monthsParseExact: true,\n        weekdays: 'dimanche_lundi_mardi_mercredi_jeudi_vendredi_samedi'.split('_'),\n        weekdaysShort: 'dim._lun._mar._mer._jeu._ven._sam.'.split('_'),\n        weekdaysMin: 'di_lu_ma_me_je_ve_sa'.split('_'),\n        weekdaysParseExact: true,\n        longDateFormat: {\n            LT: 'HH:mm',\n            LTS: 'HH:mm:ss',\n            L: 'DD.MM.YYYY',\n            LL: 'D MMMM YYYY',\n            LLL: 'D MMMM YYYY HH:mm',\n            LLLL: 'dddd D MMMM YYYY HH:mm',\n        },\n        calendar: {\n            sameDay: '[Aujourd’hui à] LT',\n            nextDay: '[Demain à] LT',\n            nextWeek: 'dddd [à] LT',\n            lastDay: '[Hier à] LT',\n            lastWeek: 'dddd [dernier à] LT',\n            sameElse: 'L',\n        },\n        relativeTime: {\n            future: 'dans %s',\n            past: 'il y a %s',\n            s: 'quelques secondes',\n            ss: '%d secondes',\n            m: 'une minute',\n            mm: '%d minutes',\n            h: 'une heure',\n            hh: '%d heures',\n            d: 'un jour',\n            dd: '%d jours',\n            M: 'un mois',\n            MM: '%d mois',\n            y: 'un an',\n            yy: '%d ans',\n        },\n        dayOfMonthOrdinalParse: /\\d{1,2}(er|e)/,\n        ordinal: function (number, period) {\n            switch (period) {\n                // Words with masculine grammatical gender: mois, trimestre, jour\n                default:\n                case 'M':\n                case 'Q':\n                case 'D':\n                case 'DDD':\n                case 'd':\n                    return number + (number === 1 ? 'er' : 'e');\n\n                // Words with feminine grammatical gender: semaine\n                case 'w':\n                case 'W':\n                    return number + (number === 1 ? 're' : 'e');\n            }\n        },\n        week: {\n            dow: 1, // Monday is the first day of the week.\n            doy: 4, // The week that contains Jan 4th is the first week of the year.\n        },\n    });\n\n    return frCh;\n\n})));\n","//! moment.js locale configuration\n//! locale : French [fr]\n//! author : John Fischer : https://github.com/jfroffice\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 monthsStrictRegex =\n            /^(janvier|février|mars|avril|mai|juin|juillet|août|septembre|octobre|novembre|décembre)/i,\n        monthsShortStrictRegex =\n            /(janv\\.?|févr\\.?|mars|avr\\.?|mai|juin|juil\\.?|août|sept\\.?|oct\\.?|nov\\.?|déc\\.?)/i,\n        monthsRegex =\n            /(janv\\.?|févr\\.?|mars|avr\\.?|mai|juin|juil\\.?|août|sept\\.?|oct\\.?|nov\\.?|déc\\.?|janvier|février|mars|avril|mai|juin|juillet|août|septembre|octobre|novembre|décembre)/i,\n        monthsParse = [\n            /^janv/i,\n            /^févr/i,\n            /^mars/i,\n            /^avr/i,\n            /^mai/i,\n            /^juin/i,\n            /^juil/i,\n            /^août/i,\n            /^sept/i,\n            /^oct/i,\n            /^nov/i,\n            /^déc/i,\n        ];\n\n    var fr = moment.defineLocale('fr', {\n        months: 'janvier_février_mars_avril_mai_juin_juillet_août_septembre_octobre_novembre_décembre'.split(\n            '_'\n        ),\n        monthsShort:\n            'janv._févr._mars_avr._mai_juin_juil._août_sept._oct._nov._déc.'.split(\n                '_'\n            ),\n        monthsRegex: monthsRegex,\n        monthsShortRegex: monthsRegex,\n        monthsStrictRegex: monthsStrictRegex,\n        monthsShortStrictRegex: monthsShortStrictRegex,\n        monthsParse: monthsParse,\n        longMonthsParse: monthsParse,\n        shortMonthsParse: monthsParse,\n        weekdays: 'dimanche_lundi_mardi_mercredi_jeudi_vendredi_samedi'.split('_'),\n        weekdaysShort: 'dim._lun._mar._mer._jeu._ven._sam.'.split('_'),\n        weekdaysMin: 'di_lu_ma_me_je_ve_sa'.split('_'),\n        weekdaysParseExact: true,\n        longDateFormat: {\n            LT: 'HH:mm',\n            LTS: 'HH:mm:ss',\n            L: 'DD/MM/YYYY',\n            LL: 'D MMMM YYYY',\n            LLL: 'D MMMM YYYY HH:mm',\n            LLLL: 'dddd D MMMM YYYY HH:mm',\n        },\n        calendar: {\n            sameDay: '[Aujourd’hui à] LT',\n            nextDay: '[Demain à] LT',\n            nextWeek: 'dddd [à] LT',\n            lastDay: '[Hier à] LT',\n            lastWeek: 'dddd [dernier à] LT',\n            sameElse: 'L',\n        },\n        relativeTime: {\n            future: 'dans %s',\n            past: 'il y a %s',\n            s: 'quelques secondes',\n            ss: '%d secondes',\n            m: 'une minute',\n            mm: '%d minutes',\n            h: 'une heure',\n            hh: '%d heures',\n            d: 'un jour',\n            dd: '%d jours',\n            w: 'une semaine',\n            ww: '%d semaines',\n            M: 'un mois',\n            MM: '%d mois',\n            y: 'un an',\n            yy: '%d ans',\n        },\n        dayOfMonthOrdinalParse: /\\d{1,2}(er|)/,\n        ordinal: function (number, period) {\n            switch (period) {\n                // TODO: Return 'e' when day of month > 1. Move this case inside\n                // block for masculine words below.\n                // See https://github.com/moment/moment/issues/3375\n                case 'D':\n                    return number + (number === 1 ? 'er' : '');\n\n                // Words with masculine grammatical gender: mois, trimestre, jour\n                default:\n                case 'M':\n                case 'Q':\n                case 'DDD':\n                case 'd':\n                    return number + (number === 1 ? 'er' : 'e');\n\n                // Words with feminine grammatical gender: semaine\n                case 'w':\n                case 'W':\n                    return number + (number === 1 ? 're' : 'e');\n            }\n        },\n        week: {\n            dow: 1, // Monday is the first day of the week.\n            doy: 4, // The week that contains Jan 4th is the first week of the year.\n        },\n    });\n\n    return fr;\n\n})));\n","//! moment.js locale configuration\n//! locale : Frisian [fy]\n//! author : Robin van der Vliet : https://github.com/robin0van0der0v\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 monthsShortWithDots =\n            'jan._feb._mrt._apr._mai_jun._jul._aug._sep._okt._nov._des.'.split('_'),\n        monthsShortWithoutDots =\n            'jan_feb_mrt_apr_mai_jun_jul_aug_sep_okt_nov_des'.split('_');\n\n    var fy = moment.defineLocale('fy', {\n        months: 'jannewaris_febrewaris_maart_april_maaie_juny_july_augustus_septimber_oktober_novimber_desimber'.split(\n            '_'\n        ),\n        monthsShort: function (m, format) {\n            if (!m) {\n                return monthsShortWithDots;\n            } else if (/-MMM-/.test(format)) {\n                return monthsShortWithoutDots[m.month()];\n            } else {\n                return monthsShortWithDots[m.month()];\n            }\n        },\n        monthsParseExact: true,\n        weekdays: 'snein_moandei_tiisdei_woansdei_tongersdei_freed_sneon'.split(\n            '_'\n        ),\n        weekdaysShort: 'si._mo._ti._wo._to._fr._so.'.split('_'),\n        weekdaysMin: 'Si_Mo_Ti_Wo_To_Fr_So'.split('_'),\n        weekdaysParseExact: true,\n        longDateFormat: {\n            LT: 'HH:mm',\n            LTS: 'HH:mm:ss',\n            L: 'DD-MM-YYYY',\n            LL: 'D MMMM YYYY',\n            LLL: 'D MMMM YYYY HH:mm',\n            LLLL: 'dddd D MMMM YYYY HH:mm',\n        },\n        calendar: {\n            sameDay: '[hjoed om] LT',\n            nextDay: '[moarn om] LT',\n            nextWeek: 'dddd [om] LT',\n            lastDay: '[juster om] LT',\n            lastWeek: '[ôfrûne] dddd [om] LT',\n            sameElse: 'L',\n        },\n        relativeTime: {\n            future: 'oer %s',\n            past: '%s lyn',\n            s: 'in pear sekonden',\n            ss: '%d sekonden',\n            m: 'ien minút',\n            mm: '%d minuten',\n            h: 'ien oere',\n            hh: '%d oeren',\n            d: 'ien dei',\n            dd: '%d dagen',\n            M: 'ien moanne',\n            MM: '%d moannen',\n            y: 'ien jier',\n            yy: '%d jierren',\n        },\n        dayOfMonthOrdinalParse: /\\d{1,2}(ste|de)/,\n        ordinal: function (number) {\n            return (\n                number +\n                (number === 1 || number === 8 || number >= 20 ? 'ste' : 'de')\n            );\n        },\n        week: {\n            dow: 1, // Monday is the first day of the week.\n            doy: 4, // The week that contains Jan 4th is the first week of the year.\n        },\n    });\n\n    return fy;\n\n})));\n","//! moment.js locale configuration\n//! locale : Irish or Irish Gaelic [ga]\n//! author : André Silva : https://github.com/askpt\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 months = [\n            'Eanáir',\n            'Feabhra',\n            'Márta',\n            'Aibreán',\n            'Bealtaine',\n            'Meitheamh',\n            'Iúil',\n            'Lúnasa',\n            'Meán Fómhair',\n            'Deireadh Fómhair',\n            'Samhain',\n            'Nollaig',\n        ],\n        monthsShort = [\n            'Ean',\n            'Feabh',\n            'Márt',\n            'Aib',\n            'Beal',\n            'Meith',\n            'Iúil',\n            'Lún',\n            'M.F.',\n            'D.F.',\n            'Samh',\n            'Noll',\n        ],\n        weekdays = [\n            'Dé Domhnaigh',\n            'Dé Luain',\n            'Dé Máirt',\n            'Dé Céadaoin',\n            'Déardaoin',\n            'Dé hAoine',\n            'Dé Sathairn',\n        ],\n        weekdaysShort = ['Domh', 'Luan', 'Máirt', 'Céad', 'Déar', 'Aoine', 'Sath'],\n        weekdaysMin = ['Do', 'Lu', 'Má', 'Cé', 'Dé', 'A', 'Sa'];\n\n    var ga = moment.defineLocale('ga', {\n        months: months,\n        monthsShort: monthsShort,\n        monthsParseExact: true,\n        weekdays: weekdays,\n        weekdaysShort: weekdaysShort,\n        weekdaysMin: weekdaysMin,\n        longDateFormat: {\n            LT: 'HH:mm',\n            LTS: 'HH:mm:ss',\n            L: 'DD/MM/YYYY',\n            LL: 'D MMMM YYYY',\n            LLL: 'D MMMM YYYY HH:mm',\n            LLLL: 'dddd, D MMMM YYYY HH:mm',\n        },\n        calendar: {\n            sameDay: '[Inniu ag] LT',\n            nextDay: '[Amárach ag] LT',\n            nextWeek: 'dddd [ag] LT',\n            lastDay: '[Inné ag] LT',\n            lastWeek: 'dddd [seo caite] [ag] LT',\n            sameElse: 'L',\n        },\n        relativeTime: {\n            future: 'i %s',\n            past: '%s ó shin',\n            s: 'cúpla soicind',\n            ss: '%d soicind',\n            m: 'nóiméad',\n            mm: '%d nóiméad',\n            h: 'uair an chloig',\n            hh: '%d uair an chloig',\n            d: 'lá',\n            dd: '%d lá',\n            M: 'mí',\n            MM: '%d míonna',\n            y: 'bliain',\n            yy: '%d bliain',\n        },\n        dayOfMonthOrdinalParse: /\\d{1,2}(d|na|mh)/,\n        ordinal: function (number) {\n            var output = number === 1 ? 'd' : number % 10 === 2 ? 'na' : 'mh';\n            return number + output;\n        },\n        week: {\n            dow: 1, // Monday is the first day of the week.\n            doy: 4, // The week that contains Jan 4th is the first week of the year.\n        },\n    });\n\n    return ga;\n\n})));\n","//! moment.js locale configuration\n//! locale : Scottish Gaelic [gd]\n//! author : Jon Ashdown : https://github.com/jonashdown\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 months = [\n            'Am Faoilleach',\n            'An Gearran',\n            'Am Màrt',\n            'An Giblean',\n            'An Cèitean',\n            'An t-Ògmhios',\n            'An t-Iuchar',\n            'An Lùnastal',\n            'An t-Sultain',\n            'An Dàmhair',\n            'An t-Samhain',\n            'An Dùbhlachd',\n        ],\n        monthsShort = [\n            'Faoi',\n            'Gear',\n            'Màrt',\n            'Gibl',\n            'Cèit',\n            'Ògmh',\n            'Iuch',\n            'Lùn',\n            'Sult',\n            'Dàmh',\n            'Samh',\n            'Dùbh',\n        ],\n        weekdays = [\n            'Didòmhnaich',\n            'Diluain',\n            'Dimàirt',\n            'Diciadain',\n            'Diardaoin',\n            'Dihaoine',\n            'Disathairne',\n        ],\n        weekdaysShort = ['Did', 'Dil', 'Dim', 'Dic', 'Dia', 'Dih', 'Dis'],\n        weekdaysMin = ['Dò', 'Lu', 'Mà', 'Ci', 'Ar', 'Ha', 'Sa'];\n\n    var gd = moment.defineLocale('gd', {\n        months: months,\n        monthsShort: monthsShort,\n        monthsParseExact: true,\n        weekdays: weekdays,\n        weekdaysShort: weekdaysShort,\n        weekdaysMin: weekdaysMin,\n        longDateFormat: {\n            LT: 'HH:mm',\n            LTS: 'HH:mm:ss',\n            L: 'DD/MM/YYYY',\n            LL: 'D MMMM YYYY',\n            LLL: 'D MMMM YYYY HH:mm',\n            LLLL: 'dddd, D MMMM YYYY HH:mm',\n        },\n        calendar: {\n            sameDay: '[An-diugh aig] LT',\n            nextDay: '[A-màireach aig] LT',\n            nextWeek: 'dddd [aig] LT',\n            lastDay: '[An-dè aig] LT',\n            lastWeek: 'dddd [seo chaidh] [aig] LT',\n            sameElse: 'L',\n        },\n        relativeTime: {\n            future: 'ann an %s',\n            past: 'bho chionn %s',\n            s: 'beagan diogan',\n            ss: '%d diogan',\n            m: 'mionaid',\n            mm: '%d mionaidean',\n            h: 'uair',\n            hh: '%d uairean',\n            d: 'latha',\n            dd: '%d latha',\n            M: 'mìos',\n            MM: '%d mìosan',\n            y: 'bliadhna',\n            yy: '%d bliadhna',\n        },\n        dayOfMonthOrdinalParse: /\\d{1,2}(d|na|mh)/,\n        ordinal: function (number) {\n            var output = number === 1 ? 'd' : number % 10 === 2 ? 'na' : 'mh';\n            return number + output;\n        },\n        week: {\n            dow: 1, // Monday is the first day of the week.\n            doy: 4, // The week that contains Jan 4th is the first week of the year.\n        },\n    });\n\n    return gd;\n\n})));\n","//! moment.js locale configuration\n//! locale : Galician [gl]\n//! author : Juan G. Hurtado : https://github.com/juanghurtado\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 gl = moment.defineLocale('gl', {\n        months: 'xaneiro_febreiro_marzo_abril_maio_xuño_xullo_agosto_setembro_outubro_novembro_decembro'.split(\n            '_'\n        ),\n        monthsShort:\n            'xan._feb._mar._abr._mai._xuñ._xul._ago._set._out._nov._dec.'.split(\n                '_'\n            ),\n        monthsParseExact: true,\n        weekdays: 'domingo_luns_martes_mércores_xoves_venres_sábado'.split('_'),\n        weekdaysShort: 'dom._lun._mar._mér._xov._ven._sáb.'.split('_'),\n        weekdaysMin: 'do_lu_ma_mé_xo_ve_sá'.split('_'),\n        weekdaysParseExact: true,\n        longDateFormat: {\n            LT: 'H:mm',\n            LTS: 'H:mm:ss',\n            L: 'DD/MM/YYYY',\n            LL: 'D [de] MMMM [de] YYYY',\n            LLL: 'D [de] MMMM [de] YYYY H:mm',\n            LLLL: 'dddd, D [de] MMMM [de] YYYY H:mm',\n        },\n        calendar: {\n            sameDay: function () {\n                return '[hoxe ' + (this.hours() !== 1 ? 'ás' : 'á') + '] LT';\n            },\n            nextDay: function () {\n                return '[mañá ' + (this.hours() !== 1 ? 'ás' : 'á') + '] LT';\n            },\n            nextWeek: function () {\n                return 'dddd [' + (this.hours() !== 1 ? 'ás' : 'a') + '] LT';\n            },\n            lastDay: function () {\n                return '[onte ' + (this.hours() !== 1 ? 'á' : 'a') + '] LT';\n            },\n            lastWeek: function () {\n                return (\n                    '[o] dddd [pasado ' + (this.hours() !== 1 ? 'ás' : 'a') + '] LT'\n                );\n            },\n            sameElse: 'L',\n        },\n        relativeTime: {\n            future: function (str) {\n                if (str.indexOf('un') === 0) {\n                    return 'n' + str;\n                }\n                return 'en ' + str;\n            },\n            past: 'hai %s',\n            s: 'uns segundos',\n            ss: '%d segundos',\n            m: 'un minuto',\n            mm: '%d minutos',\n            h: 'unha hora',\n            hh: '%d horas',\n            d: 'un día',\n            dd: '%d días',\n            M: 'un mes',\n            MM: '%d meses',\n            y: 'un ano',\n            yy: '%d anos',\n        },\n        dayOfMonthOrdinalParse: /\\d{1,2}º/,\n        ordinal: '%dº',\n        week: {\n            dow: 1, // Monday is the first day of the week.\n            doy: 4, // The week that contains Jan 4th is the first week of the year.\n        },\n    });\n\n    return gl;\n\n})));\n","//! moment.js locale configuration\n//! locale : Konkani Devanagari script [gom-deva]\n//! author : The Discoverer : https://github.com/WikiDiscoverer\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    function processRelativeTime(number, withoutSuffix, key, isFuture) {\n        var format = {\n            s: ['थोडया सॅकंडांनी', 'थोडे सॅकंड'],\n            ss: [number + ' सॅकंडांनी', number + ' सॅकंड'],\n            m: ['एका मिणटान', 'एक मिनूट'],\n            mm: [number + ' मिणटांनी', number + ' मिणटां'],\n            h: ['एका वरान', 'एक वर'],\n            hh: [number + ' वरांनी', number + ' वरां'],\n            d: ['एका दिसान', 'एक दीस'],\n            dd: [number + ' दिसांनी', number + ' दीस'],\n            M: ['एका म्हयन्यान', 'एक म्हयनो'],\n            MM: [number + ' म्हयन्यानी', number + ' म्हयने'],\n            y: ['एका वर्सान', 'एक वर्स'],\n            yy: [number + ' वर्सांनी', number + ' वर्सां'],\n        };\n        return isFuture ? format[key][0] : format[key][1];\n    }\n\n    var gomDeva = moment.defineLocale('gom-deva', {\n        months: {\n            standalone:\n                'जानेवारी_फेब्रुवारी_मार्च_एप्रील_मे_जून_जुलय_ऑगस्ट_सप्टेंबर_ऑक्टोबर_नोव्हेंबर_डिसेंबर'.split(\n                    '_'\n                ),\n            format: 'जानेवारीच्या_फेब्रुवारीच्या_मार्चाच्या_एप्रीलाच्या_मेयाच्या_जूनाच्या_जुलयाच्या_ऑगस्टाच्या_सप्टेंबराच्या_ऑक्टोबराच्या_नोव्हेंबराच्या_डिसेंबराच्या'.split(\n                '_'\n            ),\n            isFormat: /MMMM(\\s)+D[oD]?/,\n        },\n        monthsShort:\n            'जाने._फेब्रु._मार्च_एप्री._मे_जून_जुल._ऑग._सप्टें._ऑक्टो._नोव्हें._डिसें.'.split(\n                '_'\n            ),\n        monthsParseExact: true,\n        weekdays: 'आयतार_सोमार_मंगळार_बुधवार_बिरेस्तार_सुक्रार_शेनवार'.split('_'),\n        weekdaysShort: 'आयत._सोम._मंगळ._बुध._ब्रेस्त._सुक्र._शेन.'.split('_'),\n        weekdaysMin: 'आ_सो_मं_बु_ब्रे_सु_शे'.split('_'),\n        weekdaysParseExact: true,\n        longDateFormat: {\n            LT: 'A h:mm [वाजतां]',\n            LTS: 'A h:mm:ss [वाजतां]',\n            L: 'DD-MM-YYYY',\n            LL: 'D MMMM YYYY',\n            LLL: 'D MMMM YYYY A h:mm [वाजतां]',\n            LLLL: 'dddd, MMMM Do, YYYY, A h:mm [वाजतां]',\n            llll: 'ddd, D MMM YYYY, A h:mm [वाजतां]',\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: processRelativeTime,\n            ss: processRelativeTime,\n            m: processRelativeTime,\n            mm: processRelativeTime,\n            h: processRelativeTime,\n            hh: processRelativeTime,\n            d: processRelativeTime,\n            dd: processRelativeTime,\n            M: processRelativeTime,\n            MM: processRelativeTime,\n            y: processRelativeTime,\n            yy: processRelativeTime,\n        },\n        dayOfMonthOrdinalParse: /\\d{1,2}(वेर)/,\n        ordinal: function (number, period) {\n            switch (period) {\n                // the ordinal 'वेर' only applies to day of the month\n                case 'D':\n                    return number + 'वेर';\n                default:\n                case 'M':\n                case 'Q':\n                case 'DDD':\n                case 'd':\n                case 'w':\n                case 'W':\n                    return number;\n            }\n        },\n        week: {\n            dow: 0, // Sunday is the first day of the week\n            doy: 3, // The week that contains Jan 4th is the first week of the year (7 + 0 - 4)\n        },\n        meridiemParse: /राती|सकाळीं|दनपारां|सांजे/,\n        meridiemHour: function (hour, meridiem) {\n            if (hour === 12) {\n                hour = 0;\n            }\n            if (meridiem === 'राती') {\n                return hour < 4 ? hour : hour + 12;\n            } else if (meridiem === 'सकाळीं') {\n                return hour;\n            } else if (meridiem === 'दनपारां') {\n                return hour > 12 ? hour : hour + 12;\n            } else if (meridiem === 'सांजे') {\n                return hour + 12;\n            }\n        },\n        meridiem: function (hour, minute, isLower) {\n            if (hour < 4) {\n                return 'राती';\n            } else if (hour < 12) {\n                return 'सकाळीं';\n            } else if (hour < 16) {\n                return 'दनपारां';\n            } else if (hour < 20) {\n                return 'सांजे';\n            } else {\n                return 'राती';\n            }\n        },\n    });\n\n    return gomDeva;\n\n})));\n","//! moment.js locale configuration\n//! locale : Konkani Latin script [gom-latn]\n//! author : The Discoverer : https://github.com/WikiDiscoverer\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    function processRelativeTime(number, withoutSuffix, key, isFuture) {\n        var format = {\n            s: ['thoddea sekondamni', 'thodde sekond'],\n            ss: [number + ' sekondamni', number + ' sekond'],\n            m: ['eka mintan', 'ek minut'],\n            mm: [number + ' mintamni', number + ' mintam'],\n            h: ['eka voran', 'ek vor'],\n            hh: [number + ' voramni', number + ' voram'],\n            d: ['eka disan', 'ek dis'],\n            dd: [number + ' disamni', number + ' dis'],\n            M: ['eka mhoinean', 'ek mhoino'],\n            MM: [number + ' mhoineamni', number + ' mhoine'],\n            y: ['eka vorsan', 'ek voros'],\n            yy: [number + ' vorsamni', number + ' vorsam'],\n        };\n        return isFuture ? format[key][0] : format[key][1];\n    }\n\n    var gomLatn = moment.defineLocale('gom-latn', {\n        months: {\n            standalone:\n                'Janer_Febrer_Mars_Abril_Mai_Jun_Julai_Agost_Setembr_Otubr_Novembr_Dezembr'.split(\n                    '_'\n                ),\n            format: 'Janerachea_Febrerachea_Marsachea_Abrilachea_Maiachea_Junachea_Julaiachea_Agostachea_Setembrachea_Otubrachea_Novembrachea_Dezembrachea'.split(\n                '_'\n            ),\n            isFormat: /MMMM(\\s)+D[oD]?/,\n        },\n        monthsShort:\n            'Jan._Feb._Mars_Abr._Mai_Jun_Jul._Ago._Set._Otu._Nov._Dez.'.split('_'),\n        monthsParseExact: true,\n        weekdays: \"Aitar_Somar_Mongllar_Budhvar_Birestar_Sukrar_Son'var\".split('_'),\n        weekdaysShort: 'Ait._Som._Mon._Bud._Bre._Suk._Son.'.split('_'),\n        weekdaysMin: 'Ai_Sm_Mo_Bu_Br_Su_Sn'.split('_'),\n        weekdaysParseExact: true,\n        longDateFormat: {\n            LT: 'A h:mm [vazta]',\n            LTS: 'A h:mm:ss [vazta]',\n            L: 'DD-MM-YYYY',\n            LL: 'D MMMM YYYY',\n            LLL: 'D MMMM YYYY A h:mm [vazta]',\n            LLLL: 'dddd, MMMM Do, YYYY, A h:mm [vazta]',\n            llll: 'ddd, D MMM YYYY, A h:mm [vazta]',\n        },\n        calendar: {\n            sameDay: '[Aiz] LT',\n            nextDay: '[Faleam] LT',\n            nextWeek: '[Fuddlo] dddd[,] LT',\n            lastDay: '[Kal] LT',\n            lastWeek: '[Fattlo] dddd[,] LT',\n            sameElse: 'L',\n        },\n        relativeTime: {\n            future: '%s',\n            past: '%s adim',\n            s: processRelativeTime,\n            ss: processRelativeTime,\n            m: processRelativeTime,\n            mm: processRelativeTime,\n            h: processRelativeTime,\n            hh: processRelativeTime,\n            d: processRelativeTime,\n            dd: processRelativeTime,\n            M: processRelativeTime,\n            MM: processRelativeTime,\n            y: processRelativeTime,\n            yy: processRelativeTime,\n        },\n        dayOfMonthOrdinalParse: /\\d{1,2}(er)/,\n        ordinal: function (number, period) {\n            switch (period) {\n                // the ordinal 'er' only applies to day of the month\n                case 'D':\n                    return number + 'er';\n                default:\n                case 'M':\n                case 'Q':\n                case 'DDD':\n                case 'd':\n                case 'w':\n                case 'W':\n                    return number;\n            }\n        },\n        week: {\n            dow: 0, // Sunday is the first day of the week\n            doy: 3, // The week that contains Jan 4th is the first week of the year (7 + 0 - 4)\n        },\n        meridiemParse: /rati|sokallim|donparam|sanje/,\n        meridiemHour: function (hour, meridiem) {\n            if (hour === 12) {\n                hour = 0;\n            }\n            if (meridiem === 'rati') {\n                return hour < 4 ? hour : hour + 12;\n            } else if (meridiem === 'sokallim') {\n                return hour;\n            } else if (meridiem === 'donparam') {\n                return hour > 12 ? hour : hour + 12;\n            } else if (meridiem === 'sanje') {\n                return hour + 12;\n            }\n        },\n        meridiem: function (hour, minute, isLower) {\n            if (hour < 4) {\n                return 'rati';\n            } else if (hour < 12) {\n                return 'sokallim';\n            } else if (hour < 16) {\n                return 'donparam';\n            } else if (hour < 20) {\n                return 'sanje';\n            } else {\n                return 'rati';\n            }\n        },\n    });\n\n    return gomLatn;\n\n})));\n","//! moment.js locale configuration\n//! locale : Gujarati [gu]\n//! author : Kaushik Thanki : https://github.com/Kaushik1987\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\n    var gu = moment.defineLocale('gu', {\n        months: 'જાન્યુઆરી_ફેબ્રુઆરી_માર્ચ_એપ્રિલ_મે_જૂન_જુલાઈ_ઑગસ્ટ_સપ્ટેમ્બર_ઑક્ટ્બર_નવેમ્બર_ડિસેમ્બર'.split(\n            '_'\n        ),\n        monthsShort:\n            'જાન્યુ._ફેબ્રુ._માર્ચ_એપ્રિ._મે_જૂન_જુલા._ઑગ._સપ્ટે._ઑક્ટ્._નવે._ડિસે.'.split(\n                '_'\n            ),\n        monthsParseExact: true,\n        weekdays: 'રવિવાર_સોમવાર_મંગળવાર_બુધ્વાર_ગુરુવાર_શુક્રવાર_શનિવાર'.split(\n            '_'\n        ),\n        weekdaysShort: 'રવિ_સોમ_મંગળ_બુધ્_ગુરુ_શુક્ર_શનિ'.split('_'),\n        weekdaysMin: 'ર_સો_મં_બુ_ગુ_શુ_શ'.split('_'),\n        longDateFormat: {\n            LT: 'A h:mm વાગ્યે',\n            LTS: 'A h:mm:ss વાગ્યે',\n            L: 'DD/MM/YYYY',\n            LL: 'D MMMM YYYY',\n            LLL: 'D MMMM YYYY, A h:mm વાગ્યે',\n            LLLL: 'dddd, D MMMM YYYY, A h:mm વાગ્યે',\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: 'અમુક પળો',\n            ss: '%d સેકંડ',\n            m: 'એક મિનિટ',\n            mm: '%d મિનિટ',\n            h: 'એક કલાક',\n            hh: '%d કલાક',\n            d: 'એક દિવસ',\n            dd: '%d દિવસ',\n            M: 'એક મહિનો',\n            MM: '%d મહિનો',\n            y: 'એક વર્ષ',\n            yy: '%d વર્ષ',\n        },\n        preparse: function (string) {\n            return string.replace(/[૧૨૩૪૫૬૭૮૯૦]/g, function (match) {\n                return numberMap[match];\n            });\n        },\n        postformat: function (string) {\n            return string.replace(/\\d/g, function (match) {\n                return symbolMap[match];\n            });\n        },\n        // Gujarati notation for meridiems are quite fuzzy in practice. While there exists\n        // a rigid notion of a 'Pahar' it is not used as rigidly in modern Gujarati.\n        meridiemParse: /રાત|બપોર|સવાર|સાંજ/,\n        meridiemHour: function (hour, meridiem) {\n            if (hour === 12) {\n                hour = 0;\n            }\n            if (meridiem === 'રાત') {\n                return hour < 4 ? hour : hour + 12;\n            } else if (meridiem === 'સવાર') {\n                return hour;\n            } else if (meridiem === 'બપોર') {\n                return hour >= 10 ? hour : hour + 12;\n            } else if (meridiem === 'સાંજ') {\n                return hour + 12;\n            }\n        },\n        meridiem: function (hour, minute, isLower) {\n            if (hour < 4) {\n                return 'રાત';\n            } else if (hour < 10) {\n                return 'સવાર';\n            } else if (hour < 17) {\n                return 'બપોર';\n            } else if (hour < 20) {\n                return 'સાંજ';\n            } else {\n                return 'રાત';\n            }\n        },\n        week: {\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\n    return gu;\n\n})));\n","//! moment.js locale configuration\n//! locale : Hebrew [he]\n//! author : Tomer Cohen : https://github.com/tomer\n//! author : Moshe Simantov : https://github.com/DevelopmentIL\n//! author : Tal Ater : https://github.com/TalAter\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 he = moment.defineLocale('he', {\n        months: 'ינואר_פברואר_מרץ_אפריל_מאי_יוני_יולי_אוגוסט_ספטמבר_אוקטובר_נובמבר_דצמבר'.split(\n            '_'\n        ),\n        monthsShort:\n            'ינו׳_פבר׳_מרץ_אפר׳_מאי_יוני_יולי_אוג׳_ספט׳_אוק׳_נוב׳_דצמ׳'.split('_'),\n        weekdays: 'ראשון_שני_שלישי_רביעי_חמישי_שישי_שבת'.split('_'),\n        weekdaysShort: 'א׳_ב׳_ג׳_ד׳_ה׳_ו׳_ש׳'.split('_'),\n        weekdaysMin: 'א_ב_ג_ד_ה_ו_ש'.split('_'),\n        longDateFormat: {\n            LT: 'HH:mm',\n            LTS: 'HH:mm:ss',\n            L: 'DD/MM/YYYY',\n            LL: 'D [ב]MMMM YYYY',\n            LLL: 'D [ב]MMMM YYYY HH:mm',\n            LLLL: 'dddd, D [ב]MMMM YYYY HH:mm',\n            l: 'D/M/YYYY',\n            ll: 'D MMM YYYY',\n            lll: 'D MMM YYYY HH:mm',\n            llll: 'ddd, D MMM YYYY HH:mm',\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: 'מספר שניות',\n            ss: '%d שניות',\n            m: 'דקה',\n            mm: '%d דקות',\n            h: 'שעה',\n            hh: function (number) {\n                if (number === 2) {\n                    return 'שעתיים';\n                }\n                return number + ' שעות';\n            },\n            d: 'יום',\n            dd: function (number) {\n                if (number === 2) {\n                    return 'יומיים';\n                }\n                return number + ' ימים';\n            },\n            M: 'חודש',\n            MM: function (number) {\n                if (number === 2) {\n                    return 'חודשיים';\n                }\n                return number + ' חודשים';\n            },\n            y: 'שנה',\n            yy: function (number) {\n                if (number === 2) {\n                    return 'שנתיים';\n                } else if (number % 10 === 0 && number !== 10) {\n                    return number + ' שנה';\n                }\n                return number + ' שנים';\n            },\n        },\n        meridiemParse:\n            /אחה\"צ|לפנה\"צ|אחרי הצהריים|לפני הצהריים|לפנות בוקר|בבוקר|בערב/i,\n        isPM: function (input) {\n            return /^(אחה\"צ|אחרי הצהריים|בערב)$/.test(input);\n        },\n        meridiem: function (hour, minute, isLower) {\n            if (hour < 5) {\n                return 'לפנות בוקר';\n            } else if (hour < 10) {\n                return 'בבוקר';\n            } else if (hour < 12) {\n                return isLower ? 'לפנה\"צ' : 'לפני הצהריים';\n            } else if (hour < 18) {\n                return isLower ? 'אחה\"צ' : 'אחרי הצהריים';\n            } else {\n                return 'בערב';\n            }\n        },\n    });\n\n    return he;\n\n})));\n","//! moment.js locale configuration\n//! locale : Hindi [hi]\n//! author : Mayank Singhal : https://github.com/mayanksinghal\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        monthsParse = [\n            /^जन/i,\n            /^फ़र|फर/i,\n            /^मार्च/i,\n            /^अप्रै/i,\n            /^मई/i,\n            /^जून/i,\n            /^जुल/i,\n            /^अग/i,\n            /^सितं|सित/i,\n            /^अक्टू/i,\n            /^नव|नवं/i,\n            /^दिसं|दिस/i,\n        ],\n        shortMonthsParse = [\n            /^जन/i,\n            /^फ़र/i,\n            /^मार्च/i,\n            /^अप्रै/i,\n            /^मई/i,\n            /^जून/i,\n            /^जुल/i,\n            /^अग/i,\n            /^सित/i,\n            /^अक्टू/i,\n            /^नव/i,\n            /^दिस/i,\n        ];\n\n    var hi = moment.defineLocale('hi', {\n        months: {\n            format: 'जनवरी_फ़रवरी_मार्च_अप्रैल_मई_जून_जुलाई_अगस्त_सितम्बर_अक्टूबर_नवम्बर_दिसम्बर'.split(\n                '_'\n            ),\n            standalone:\n                'जनवरी_फरवरी_मार्च_अप्रैल_मई_जून_जुलाई_अगस्त_सितंबर_अक्टूबर_नवंबर_दिसंबर'.split(\n                    '_'\n                ),\n        },\n        monthsShort:\n            'जन._फ़र._मार्च_अप्रै._मई_जून_जुल._अग._सित._अक्टू._नव._दिस.'.split('_'),\n        weekdays: 'रविवार_सोमवार_मंगलवार_बुधवार_गुरूवार_शुक्रवार_शनिवार'.split('_'),\n        weekdaysShort: 'रवि_सोम_मंगल_बुध_गुरू_शुक्र_शनि'.split('_'),\n        weekdaysMin: 'र_सो_मं_बु_गु_शु_श'.split('_'),\n        longDateFormat: {\n            LT: 'A h:mm बजे',\n            LTS: 'A h:mm:ss बजे',\n            L: 'DD/MM/YYYY',\n            LL: 'D MMMM YYYY',\n            LLL: 'D MMMM YYYY, A h:mm बजे',\n            LLLL: 'dddd, D MMMM YYYY, A h:mm बजे',\n        },\n\n        monthsParse: monthsParse,\n        longMonthsParse: monthsParse,\n        shortMonthsParse: shortMonthsParse,\n\n        monthsRegex:\n            /^(जनवरी|जन\\.?|फ़रवरी|फरवरी|फ़र\\.?|मार्च?|अप्रैल|अप्रै\\.?|मई?|जून?|जुलाई|जुल\\.?|अगस्त|अग\\.?|सितम्बर|सितंबर|सित\\.?|अक्टूबर|अक्टू\\.?|नवम्बर|नवंबर|नव\\.?|दिसम्बर|दिसंबर|दिस\\.?)/i,\n\n        monthsShortRegex:\n            /^(जनवरी|जन\\.?|फ़रवरी|फरवरी|फ़र\\.?|मार्च?|अप्रैल|अप्रै\\.?|मई?|जून?|जुलाई|जुल\\.?|अगस्त|अग\\.?|सितम्बर|सितंबर|सित\\.?|अक्टूबर|अक्टू\\.?|नवम्बर|नवंबर|नव\\.?|दिसम्बर|दिसंबर|दिस\\.?)/i,\n\n        monthsStrictRegex:\n            /^(जनवरी?|फ़रवरी|फरवरी?|मार्च?|अप्रैल?|मई?|जून?|जुलाई?|अगस्त?|सितम्बर|सितंबर|सित?\\.?|अक्टूबर|अक्टू\\.?|नवम्बर|नवंबर?|दिसम्बर|दिसंबर?)/i,\n\n        monthsShortStrictRegex:\n            /^(जन\\.?|फ़र\\.?|मार्च?|अप्रै\\.?|मई?|जून?|जुल\\.?|अग\\.?|सित\\.?|अक्टू\\.?|नव\\.?|दिस\\.?)/i,\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: 'कुछ ही क्षण',\n            ss: '%d सेकंड',\n            m: 'एक मिनट',\n            mm: '%d मिनट',\n            h: 'एक घंटा',\n            hh: '%d घंटे',\n            d: 'एक दिन',\n            dd: '%d दिन',\n            M: 'एक महीने',\n            MM: '%d महीने',\n            y: 'एक वर्ष',\n            yy: '%d वर्ष',\n        },\n        preparse: function (string) {\n            return string.replace(/[१२३४५६७८९०]/g, function (match) {\n                return numberMap[match];\n            });\n        },\n        postformat: function (string) {\n            return string.replace(/\\d/g, function (match) {\n                return symbolMap[match];\n            });\n        },\n        // Hindi notation for meridiems are quite fuzzy in practice. While there exists\n        // a rigid notion of a 'Pahar' it is not used as rigidly in modern Hindi.\n        meridiemParse: /रात|सुबह|दोपहर|शाम/,\n        meridiemHour: function (hour, meridiem) {\n            if (hour === 12) {\n                hour = 0;\n            }\n            if (meridiem === 'रात') {\n                return hour < 4 ? hour : hour + 12;\n            } else if (meridiem === 'सुबह') {\n                return hour;\n            } else if (meridiem === 'दोपहर') {\n                return hour >= 10 ? hour : hour + 12;\n            } else if (meridiem === 'शाम') {\n                return hour + 12;\n            }\n        },\n        meridiem: function (hour, minute, isLower) {\n            if (hour < 4) {\n                return 'रात';\n            } else if (hour < 10) {\n                return 'सुबह';\n            } else if (hour < 17) {\n                return 'दोपहर';\n            } else if (hour < 20) {\n                return 'शाम';\n            } else {\n                return 'रात';\n            }\n        },\n        week: {\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\n    return hi;\n\n})));\n","//! moment.js locale configuration\n//! locale : Croatian [hr]\n//! author : Bojan Marković : https://github.com/bmarkovic\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    function translate(number, withoutSuffix, key) {\n        var result = number + ' ';\n        switch (key) {\n            case 'ss':\n                if (number === 1) {\n                    result += 'sekunda';\n                } else if (number === 2 || number === 3 || number === 4) {\n                    result += 'sekunde';\n                } else {\n                    result += 'sekundi';\n                }\n                return result;\n            case 'm':\n                return withoutSuffix ? 'jedna minuta' : 'jedne minute';\n            case 'mm':\n                if (number === 1) {\n                    result += 'minuta';\n                } else if (number === 2 || number === 3 || number === 4) {\n                    result += 'minute';\n                } else {\n                    result += 'minuta';\n                }\n                return result;\n            case 'h':\n                return withoutSuffix ? 'jedan sat' : 'jednog sata';\n            case 'hh':\n                if (number === 1) {\n                    result += 'sat';\n                } else if (number === 2 || number === 3 || number === 4) {\n                    result += 'sata';\n                } else {\n                    result += 'sati';\n                }\n                return result;\n            case 'dd':\n                if (number === 1) {\n                    result += 'dan';\n                } else {\n                    result += 'dana';\n                }\n                return result;\n            case 'MM':\n                if (number === 1) {\n                    result += 'mjesec';\n                } else if (number === 2 || number === 3 || number === 4) {\n                    result += 'mjeseca';\n                } else {\n                    result += 'mjeseci';\n                }\n                return result;\n            case 'yy':\n                if (number === 1) {\n                    result += 'godina';\n                } else if (number === 2 || number === 3 || number === 4) {\n                    result += 'godine';\n                } else {\n                    result += 'godina';\n                }\n                return result;\n        }\n    }\n\n    var hr = moment.defineLocale('hr', {\n        months: {\n            format: 'siječnja_veljače_ožujka_travnja_svibnja_lipnja_srpnja_kolovoza_rujna_listopada_studenoga_prosinca'.split(\n                '_'\n            ),\n            standalone:\n                'siječanj_veljača_ožujak_travanj_svibanj_lipanj_srpanj_kolovoz_rujan_listopad_studeni_prosinac'.split(\n                    '_'\n                ),\n        },\n        monthsShort:\n            'sij._velj._ožu._tra._svi._lip._srp._kol._ruj._lis._stu._pro.'.split(\n                '_'\n            ),\n        monthsParseExact: true,\n        weekdays: 'nedjelja_ponedjeljak_utorak_srijeda_četvrtak_petak_subota'.split(\n            '_'\n        ),\n        weekdaysShort: 'ned._pon._uto._sri._čet._pet._sub.'.split('_'),\n        weekdaysMin: 'ne_po_ut_sr_če_pe_su'.split('_'),\n        weekdaysParseExact: true,\n        longDateFormat: {\n            LT: 'H:mm',\n            LTS: 'H:mm:ss',\n            L: 'DD.MM.YYYY',\n            LL: 'Do MMMM YYYY',\n            LLL: 'Do MMMM YYYY H:mm',\n            LLLL: 'dddd, Do MMMM YYYY H:mm',\n        },\n        calendar: {\n            sameDay: '[danas u] LT',\n            nextDay: '[sutra u] LT',\n            nextWeek: function () {\n                switch (this.day()) {\n                    case 0:\n                        return '[u] [nedjelju] [u] LT';\n                    case 3:\n                        return '[u] [srijedu] [u] LT';\n                    case 6:\n                        return '[u] [subotu] [u] LT';\n                    case 1:\n                    case 2:\n                    case 4:\n                    case 5:\n                        return '[u] dddd [u] LT';\n                }\n            },\n            lastDay: '[jučer u] LT',\n            lastWeek: function () {\n                switch (this.day()) {\n                    case 0:\n                        return '[prošlu] [nedjelju] [u] LT';\n                    case 3:\n                        return '[prošlu] [srijedu] [u] LT';\n                    case 6:\n                        return '[prošle] [subote] [u] LT';\n                    case 1:\n                    case 2:\n                    case 4:\n                    case 5:\n                        return '[prošli] dddd [u] LT';\n                }\n            },\n            sameElse: 'L',\n        },\n        relativeTime: {\n            future: 'za %s',\n            past: 'prije %s',\n            s: 'par sekundi',\n            ss: translate,\n            m: translate,\n            mm: translate,\n            h: translate,\n            hh: translate,\n            d: 'dan',\n            dd: translate,\n            M: 'mjesec',\n            MM: translate,\n            y: 'godinu',\n            yy: translate,\n        },\n        dayOfMonthOrdinalParse: /\\d{1,2}\\./,\n        ordinal: '%d.',\n        week: {\n            dow: 1, // Monday is the first day of the week.\n            doy: 7, // The week that contains Jan 7th is the first week of the year.\n        },\n    });\n\n    return hr;\n\n})));\n","//! moment.js locale configuration\n//! locale : Hungarian [hu]\n//! author : Adam Brunner : https://github.com/adambrunner\n//! author : Peter Viszt  : https://github.com/passatgt\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 weekEndings =\n        'vasárnap hétfőn kedden szerdán csütörtökön pénteken szombaton'.split(' ');\n    function translate(number, withoutSuffix, key, isFuture) {\n        var num = number;\n        switch (key) {\n            case 's':\n                return isFuture || withoutSuffix\n                    ? 'néhány másodperc'\n                    : 'néhány másodperce';\n            case 'ss':\n                return num + (isFuture || withoutSuffix)\n                    ? ' másodperc'\n                    : ' másodperce';\n            case 'm':\n                return 'egy' + (isFuture || withoutSuffix ? ' perc' : ' perce');\n            case 'mm':\n                return num + (isFuture || withoutSuffix ? ' perc' : ' perce');\n            case 'h':\n                return 'egy' + (isFuture || withoutSuffix ? ' óra' : ' órája');\n            case 'hh':\n                return num + (isFuture || withoutSuffix ? ' óra' : ' órája');\n            case 'd':\n                return 'egy' + (isFuture || withoutSuffix ? ' nap' : ' napja');\n            case 'dd':\n                return num + (isFuture || withoutSuffix ? ' nap' : ' napja');\n            case 'M':\n                return 'egy' + (isFuture || withoutSuffix ? ' hónap' : ' hónapja');\n            case 'MM':\n                return num + (isFuture || withoutSuffix ? ' hónap' : ' hónapja');\n            case 'y':\n                return 'egy' + (isFuture || withoutSuffix ? ' év' : ' éve');\n            case 'yy':\n                return num + (isFuture || withoutSuffix ? ' év' : ' éve');\n        }\n        return '';\n    }\n    function week(isFuture) {\n        return (\n            (isFuture ? '' : '[múlt] ') +\n            '[' +\n            weekEndings[this.day()] +\n            '] LT[-kor]'\n        );\n    }\n\n    var hu = moment.defineLocale('hu', {\n        months: 'január_február_március_április_május_június_július_augusztus_szeptember_október_november_december'.split(\n            '_'\n        ),\n        monthsShort:\n            'jan._feb._márc._ápr._máj._jún._júl._aug._szept._okt._nov._dec.'.split(\n                '_'\n            ),\n        monthsParseExact: true,\n        weekdays: 'vasárnap_hétfő_kedd_szerda_csütörtök_péntek_szombat'.split('_'),\n        weekdaysShort: 'vas_hét_kedd_sze_csüt_pén_szo'.split('_'),\n        weekdaysMin: 'v_h_k_sze_cs_p_szo'.split('_'),\n        longDateFormat: {\n            LT: 'H:mm',\n            LTS: 'H:mm:ss',\n            L: 'YYYY.MM.DD.',\n            LL: 'YYYY. MMMM D.',\n            LLL: 'YYYY. MMMM D. H:mm',\n            LLLL: 'YYYY. MMMM D., dddd H:mm',\n        },\n        meridiemParse: /de|du/i,\n        isPM: function (input) {\n            return input.charAt(1).toLowerCase() === 'u';\n        },\n        meridiem: function (hours, minutes, isLower) {\n            if (hours < 12) {\n                return isLower === true ? 'de' : 'DE';\n            } else {\n                return isLower === true ? 'du' : 'DU';\n            }\n        },\n        calendar: {\n            sameDay: '[ma] LT[-kor]',\n            nextDay: '[holnap] LT[-kor]',\n            nextWeek: function () {\n                return week.call(this, true);\n            },\n            lastDay: '[tegnap] LT[-kor]',\n            lastWeek: function () {\n                return week.call(this, false);\n            },\n            sameElse: 'L',\n        },\n        relativeTime: {\n            future: '%s múlva',\n            past: '%s',\n            s: translate,\n            ss: translate,\n            m: translate,\n            mm: translate,\n            h: translate,\n            hh: translate,\n            d: translate,\n            dd: translate,\n            M: translate,\n            MM: translate,\n            y: translate,\n            yy: translate,\n        },\n        dayOfMonthOrdinalParse: /\\d{1,2}\\./,\n        ordinal: '%d.',\n        week: {\n            dow: 1, // Monday is the first day of the week.\n            doy: 4, // The week that contains Jan 4th is the first week of the year.\n        },\n    });\n\n    return hu;\n\n})));\n","//! moment.js locale configuration\n//! locale : Armenian [hy-am]\n//! author : Armendarabyan : https://github.com/armendarabyan\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 hyAm = moment.defineLocale('hy-am', {\n        months: {\n            format: 'հունվարի_փետրվարի_մարտի_ապրիլի_մայիսի_հունիսի_հուլիսի_օգոստոսի_սեպտեմբերի_հոկտեմբերի_նոյեմբերի_դեկտեմբերի'.split(\n                '_'\n            ),\n            standalone:\n                'հունվար_փետրվար_մարտ_ապրիլ_մայիս_հունիս_հուլիս_օգոստոս_սեպտեմբեր_հոկտեմբեր_նոյեմբեր_դեկտեմբեր'.split(\n                    '_'\n                ),\n        },\n        monthsShort: 'հնվ_փտր_մրտ_ապր_մյս_հնս_հլս_օգս_սպտ_հկտ_նմբ_դկտ'.split('_'),\n        weekdays:\n            'կիրակի_երկուշաբթի_երեքշաբթի_չորեքշաբթի_հինգշաբթի_ուրբաթ_շաբաթ'.split(\n                '_'\n            ),\n        weekdaysShort: 'կրկ_երկ_երք_չրք_հնգ_ուրբ_շբթ'.split('_'),\n        weekdaysMin: 'կրկ_երկ_երք_չրք_հնգ_ուրբ_շբթ'.split('_'),\n        longDateFormat: {\n            LT: 'HH:mm',\n            LTS: 'HH:mm:ss',\n            L: 'DD.MM.YYYY',\n            LL: 'D MMMM YYYY թ.',\n            LLL: 'D MMMM YYYY թ., HH:mm',\n            LLLL: 'dddd, D MMMM YYYY թ., HH:mm',\n        },\n        calendar: {\n            sameDay: '[այսօր] LT',\n            nextDay: '[վաղը] LT',\n            lastDay: '[երեկ] LT',\n            nextWeek: function () {\n                return 'dddd [օրը ժամը] LT';\n            },\n            lastWeek: function () {\n                return '[անցած] dddd [օրը ժամը] LT';\n            },\n            sameElse: 'L',\n        },\n        relativeTime: {\n            future: '%s հետո',\n            past: '%s առաջ',\n            s: 'մի քանի վայրկյան',\n            ss: '%d վայրկյան',\n            m: 'րոպե',\n            mm: '%d րոպե',\n            h: 'ժամ',\n            hh: '%d ժամ',\n            d: 'օր',\n            dd: '%d օր',\n            M: 'ամիս',\n            MM: '%d ամիս',\n            y: 'տարի',\n            yy: '%d տարի',\n        },\n        meridiemParse: /գիշերվա|առավոտվա|ցերեկվա|երեկոյան/,\n        isPM: function (input) {\n            return /^(ցերեկվա|երեկոյան)$/.test(input);\n        },\n        meridiem: function (hour) {\n            if (hour < 4) {\n                return 'գիշերվա';\n            } else if (hour < 12) {\n                return 'առավոտվա';\n            } else if (hour < 17) {\n                return 'ցերեկվա';\n            } else {\n                return 'երեկոյան';\n            }\n        },\n        dayOfMonthOrdinalParse: /\\d{1,2}|\\d{1,2}-(ին|րդ)/,\n        ordinal: function (number, period) {\n            switch (period) {\n                case 'DDD':\n                case 'w':\n                case 'W':\n                case 'DDDo':\n                    if (number === 1) {\n                        return number + '-ին';\n                    }\n                    return number + '-րդ';\n                default:\n                    return number;\n            }\n        },\n        week: {\n            dow: 1, // Monday is the first day of the week.\n            doy: 7, // The week that contains Jan 7th is the first week of the year.\n        },\n    });\n\n    return hyAm;\n\n})));\n","//! moment.js locale configuration\n//! locale : Indonesian [id]\n//! author : Mohammad Satrio Utomo : https://github.com/tyok\n//! reference: http://id.wikisource.org/wiki/Pedoman_Umum_Ejaan_Bahasa_Indonesia_yang_Disempurnakan\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 id = moment.defineLocale('id', {\n        months: 'Januari_Februari_Maret_April_Mei_Juni_Juli_Agustus_September_Oktober_November_Desember'.split(\n            '_'\n        ),\n        monthsShort: 'Jan_Feb_Mar_Apr_Mei_Jun_Jul_Agt_Sep_Okt_Nov_Des'.split('_'),\n        weekdays: 'Minggu_Senin_Selasa_Rabu_Kamis_Jumat_Sabtu'.split('_'),\n        weekdaysShort: 'Min_Sen_Sel_Rab_Kam_Jum_Sab'.split('_'),\n        weekdaysMin: 'Mg_Sn_Sl_Rb_Km_Jm_Sb'.split('_'),\n        longDateFormat: {\n            LT: 'HH.mm',\n            LTS: 'HH.mm.ss',\n            L: 'DD/MM/YYYY',\n            LL: 'D MMMM YYYY',\n            LLL: 'D MMMM YYYY [pukul] HH.mm',\n            LLLL: 'dddd, D MMMM YYYY [pukul] HH.mm',\n        },\n        meridiemParse: /pagi|siang|sore|malam/,\n        meridiemHour: function (hour, meridiem) {\n            if (hour === 12) {\n                hour = 0;\n            }\n            if (meridiem === 'pagi') {\n                return hour;\n            } else if (meridiem === 'siang') {\n                return hour >= 11 ? hour : hour + 12;\n            } else if (meridiem === 'sore' || meridiem === 'malam') {\n                return hour + 12;\n            }\n        },\n        meridiem: function (hours, minutes, isLower) {\n            if (hours < 11) {\n                return 'pagi';\n            } else if (hours < 15) {\n                return 'siang';\n            } else if (hours < 19) {\n                return 'sore';\n            } else {\n                return 'malam';\n            }\n        },\n        calendar: {\n            sameDay: '[Hari ini pukul] LT',\n            nextDay: '[Besok pukul] LT',\n            nextWeek: 'dddd [pukul] LT',\n            lastDay: '[Kemarin pukul] LT',\n            lastWeek: 'dddd [lalu pukul] LT',\n            sameElse: 'L',\n        },\n        relativeTime: {\n            future: 'dalam %s',\n            past: '%s yang lalu',\n            s: 'beberapa detik',\n            ss: '%d detik',\n            m: 'semenit',\n            mm: '%d menit',\n            h: 'sejam',\n            hh: '%d jam',\n            d: 'sehari',\n            dd: '%d hari',\n            M: 'sebulan',\n            MM: '%d bulan',\n            y: 'setahun',\n            yy: '%d tahun',\n        },\n        week: {\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\n    return id;\n\n})));\n","//! moment.js locale configuration\n//! locale : Icelandic [is]\n//! author : Hinrik Örn Sigurðsson : https://github.com/hinrik\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    function plural(n) {\n        if (n % 100 === 11) {\n            return true;\n        } else if (n % 10 === 1) {\n            return false;\n        }\n        return true;\n    }\n    function translate(number, withoutSuffix, key, isFuture) {\n        var result = number + ' ';\n        switch (key) {\n            case 's':\n                return withoutSuffix || isFuture\n                    ? 'nokkrar sekúndur'\n                    : 'nokkrum sekúndum';\n            case 'ss':\n                if (plural(number)) {\n                    return (\n                        result +\n                        (withoutSuffix || isFuture ? 'sekúndur' : 'sekúndum')\n                    );\n                }\n                return result + 'sekúnda';\n            case 'm':\n                return withoutSuffix ? 'mínúta' : 'mínútu';\n            case 'mm':\n                if (plural(number)) {\n                    return (\n                        result + (withoutSuffix || isFuture ? 'mínútur' : 'mínútum')\n                    );\n                } else if (withoutSuffix) {\n                    return result + 'mínúta';\n                }\n                return result + 'mínútu';\n            case 'hh':\n                if (plural(number)) {\n                    return (\n                        result +\n                        (withoutSuffix || isFuture\n                            ? 'klukkustundir'\n                            : 'klukkustundum')\n                    );\n                }\n                return result + 'klukkustund';\n            case 'd':\n                if (withoutSuffix) {\n                    return 'dagur';\n                }\n                return isFuture ? 'dag' : 'degi';\n            case 'dd':\n                if (plural(number)) {\n                    if (withoutSuffix) {\n                        return result + 'dagar';\n                    }\n                    return result + (isFuture ? 'daga' : 'dögum');\n                } else if (withoutSuffix) {\n                    return result + 'dagur';\n                }\n                return result + (isFuture ? 'dag' : 'degi');\n            case 'M':\n                if (withoutSuffix) {\n                    return 'mánuður';\n                }\n                return isFuture ? 'mánuð' : 'mánuði';\n            case 'MM':\n                if (plural(number)) {\n                    if (withoutSuffix) {\n                        return result + 'mánuðir';\n                    }\n                    return result + (isFuture ? 'mánuði' : 'mánuðum');\n                } else if (withoutSuffix) {\n                    return result + 'mánuður';\n                }\n                return result + (isFuture ? 'mánuð' : 'mánuði');\n            case 'y':\n                return withoutSuffix || isFuture ? 'ár' : 'ári';\n            case 'yy':\n                if (plural(number)) {\n                    return result + (withoutSuffix || isFuture ? 'ár' : 'árum');\n                }\n                return result + (withoutSuffix || isFuture ? 'ár' : 'ári');\n        }\n    }\n\n    var is = moment.defineLocale('is', {\n        months: 'janúar_febrúar_mars_apríl_maí_júní_júlí_ágúst_september_október_nóvember_desember'.split(\n            '_'\n        ),\n        monthsShort: 'jan_feb_mar_apr_maí_jún_júl_ágú_sep_okt_nóv_des'.split('_'),\n        weekdays:\n            'sunnudagur_mánudagur_þriðjudagur_miðvikudagur_fimmtudagur_föstudagur_laugardagur'.split(\n                '_'\n            ),\n        weekdaysShort: 'sun_mán_þri_mið_fim_fös_lau'.split('_'),\n        weekdaysMin: 'Su_Má_Þr_Mi_Fi_Fö_La'.split('_'),\n        longDateFormat: {\n            LT: 'H:mm',\n            LTS: 'H:mm:ss',\n            L: 'DD.MM.YYYY',\n            LL: 'D. MMMM YYYY',\n            LLL: 'D. MMMM YYYY [kl.] H:mm',\n            LLLL: 'dddd, D. MMMM YYYY [kl.] H:mm',\n        },\n        calendar: {\n            sameDay: '[í dag kl.] LT',\n            nextDay: '[á morgun kl.] LT',\n            nextWeek: 'dddd [kl.] LT',\n            lastDay: '[í gær kl.] LT',\n            lastWeek: '[síðasta] dddd [kl.] LT',\n            sameElse: 'L',\n        },\n        relativeTime: {\n            future: 'eftir %s',\n            past: 'fyrir %s síðan',\n            s: translate,\n            ss: translate,\n            m: translate,\n            mm: translate,\n            h: 'klukkustund',\n            hh: translate,\n            d: translate,\n            dd: translate,\n            M: translate,\n            MM: translate,\n            y: translate,\n            yy: translate,\n        },\n        dayOfMonthOrdinalParse: /\\d{1,2}\\./,\n        ordinal: '%d.',\n        week: {\n            dow: 1, // Monday is the first day of the week.\n            doy: 4, // The week that contains Jan 4th is the first week of the year.\n        },\n    });\n\n    return is;\n\n})));\n","//! moment.js locale configuration\n//! locale : Italian (Switzerland) [it-ch]\n//! author : xfh : https://github.com/xfh\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 itCh = moment.defineLocale('it-ch', {\n        months: 'gennaio_febbraio_marzo_aprile_maggio_giugno_luglio_agosto_settembre_ottobre_novembre_dicembre'.split(\n            '_'\n        ),\n        monthsShort: 'gen_feb_mar_apr_mag_giu_lug_ago_set_ott_nov_dic'.split('_'),\n        weekdays: 'domenica_lunedì_martedì_mercoledì_giovedì_venerdì_sabato'.split(\n            '_'\n        ),\n        weekdaysShort: 'dom_lun_mar_mer_gio_ven_sab'.split('_'),\n        weekdaysMin: 'do_lu_ma_me_gi_ve_sa'.split('_'),\n        longDateFormat: {\n            LT: 'HH:mm',\n            LTS: 'HH:mm:ss',\n            L: 'DD.MM.YYYY',\n            LL: 'D MMMM YYYY',\n            LLL: 'D MMMM YYYY HH:mm',\n            LLLL: 'dddd D MMMM YYYY HH:mm',\n        },\n        calendar: {\n            sameDay: '[Oggi alle] LT',\n            nextDay: '[Domani alle] LT',\n            nextWeek: 'dddd [alle] LT',\n            lastDay: '[Ieri alle] LT',\n            lastWeek: function () {\n                switch (this.day()) {\n                    case 0:\n                        return '[la scorsa] dddd [alle] LT';\n                    default:\n                        return '[lo scorso] dddd [alle] LT';\n                }\n            },\n            sameElse: 'L',\n        },\n        relativeTime: {\n            future: function (s) {\n                return (/^[0-9].+$/.test(s) ? 'tra' : 'in') + ' ' + s;\n            },\n            past: '%s fa',\n            s: 'alcuni secondi',\n            ss: '%d secondi',\n            m: 'un minuto',\n            mm: '%d minuti',\n            h: \"un'ora\",\n            hh: '%d ore',\n            d: 'un giorno',\n            dd: '%d giorni',\n            M: 'un mese',\n            MM: '%d mesi',\n            y: 'un anno',\n            yy: '%d anni',\n        },\n        dayOfMonthOrdinalParse: /\\d{1,2}º/,\n        ordinal: '%dº',\n        week: {\n            dow: 1, // Monday is the first day of the week.\n            doy: 4, // The week that contains Jan 4th is the first week of the year.\n        },\n    });\n\n    return itCh;\n\n})));\n","//! moment.js locale configuration\n//! locale : Italian [it]\n//! author : Lorenzo : https://github.com/aliem\n//! author: Mattia Larentis: https://github.com/nostalgiaz\n//! author: Marco : https://github.com/Manfre98\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 it = moment.defineLocale('it', {\n        months: 'gennaio_febbraio_marzo_aprile_maggio_giugno_luglio_agosto_settembre_ottobre_novembre_dicembre'.split(\n            '_'\n        ),\n        monthsShort: 'gen_feb_mar_apr_mag_giu_lug_ago_set_ott_nov_dic'.split('_'),\n        weekdays: 'domenica_lunedì_martedì_mercoledì_giovedì_venerdì_sabato'.split(\n            '_'\n        ),\n        weekdaysShort: 'dom_lun_mar_mer_gio_ven_sab'.split('_'),\n        weekdaysMin: 'do_lu_ma_me_gi_ve_sa'.split('_'),\n        longDateFormat: {\n            LT: 'HH:mm',\n            LTS: 'HH:mm:ss',\n            L: 'DD/MM/YYYY',\n            LL: 'D MMMM YYYY',\n            LLL: 'D MMMM YYYY HH:mm',\n            LLLL: 'dddd D MMMM YYYY HH:mm',\n        },\n        calendar: {\n            sameDay: function () {\n                return (\n                    '[Oggi a' +\n                    (this.hours() > 1 ? 'lle ' : this.hours() === 0 ? ' ' : \"ll'\") +\n                    ']LT'\n                );\n            },\n            nextDay: function () {\n                return (\n                    '[Domani a' +\n                    (this.hours() > 1 ? 'lle ' : this.hours() === 0 ? ' ' : \"ll'\") +\n                    ']LT'\n                );\n            },\n            nextWeek: function () {\n                return (\n                    'dddd [a' +\n                    (this.hours() > 1 ? 'lle ' : this.hours() === 0 ? ' ' : \"ll'\") +\n                    ']LT'\n                );\n            },\n            lastDay: function () {\n                return (\n                    '[Ieri a' +\n                    (this.hours() > 1 ? 'lle ' : this.hours() === 0 ? ' ' : \"ll'\") +\n                    ']LT'\n                );\n            },\n            lastWeek: function () {\n                switch (this.day()) {\n                    case 0:\n                        return (\n                            '[La scorsa] dddd [a' +\n                            (this.hours() > 1\n                                ? 'lle '\n                                : this.hours() === 0\n                                  ? ' '\n                                  : \"ll'\") +\n                            ']LT'\n                        );\n                    default:\n                        return (\n                            '[Lo scorso] dddd [a' +\n                            (this.hours() > 1\n                                ? 'lle '\n                                : this.hours() === 0\n                                  ? ' '\n                                  : \"ll'\") +\n                            ']LT'\n                        );\n                }\n            },\n            sameElse: 'L',\n        },\n        relativeTime: {\n            future: 'tra %s',\n            past: '%s fa',\n            s: 'alcuni secondi',\n            ss: '%d secondi',\n            m: 'un minuto',\n            mm: '%d minuti',\n            h: \"un'ora\",\n            hh: '%d ore',\n            d: 'un giorno',\n            dd: '%d giorni',\n            w: 'una settimana',\n            ww: '%d settimane',\n            M: 'un mese',\n            MM: '%d mesi',\n            y: 'un anno',\n            yy: '%d anni',\n        },\n        dayOfMonthOrdinalParse: /\\d{1,2}º/,\n        ordinal: '%dº',\n        week: {\n            dow: 1, // Monday is the first day of the week.\n            doy: 4, // The week that contains Jan 4th is the first week of the year.\n        },\n    });\n\n    return it;\n\n})));\n","//! moment.js locale configuration\n//! locale : Japanese [ja]\n//! author : LI Long : https://github.com/baryon\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 ja = moment.defineLocale('ja', {\n        eras: [\n            {\n                since: '2019-05-01',\n                offset: 1,\n                name: '令和',\n                narrow: '㋿',\n                abbr: 'R',\n            },\n            {\n                since: '1989-01-08',\n                until: '2019-04-30',\n                offset: 1,\n                name: '平成',\n                narrow: '㍻',\n                abbr: 'H',\n            },\n            {\n                since: '1926-12-25',\n                until: '1989-01-07',\n                offset: 1,\n                name: '昭和',\n                narrow: '㍼',\n                abbr: 'S',\n            },\n            {\n                since: '1912-07-30',\n                until: '1926-12-24',\n                offset: 1,\n                name: '大正',\n                narrow: '㍽',\n                abbr: 'T',\n            },\n            {\n                since: '1873-01-01',\n                until: '1912-07-29',\n                offset: 6,\n                name: '明治',\n                narrow: '㍾',\n                abbr: 'M',\n            },\n            {\n                since: '0001-01-01',\n                until: '1873-12-31',\n                offset: 1,\n                name: '西暦',\n                narrow: 'AD',\n                abbr: 'AD',\n            },\n            {\n                since: '0000-12-31',\n                until: -Infinity,\n                offset: 1,\n                name: '紀元前',\n                narrow: 'BC',\n                abbr: 'BC',\n            },\n        ],\n        eraYearOrdinalRegex: /(元|\\d+)年/,\n        eraYearOrdinalParse: function (input, match) {\n            return match[1] === '元' ? 1 : parseInt(match[1] || input, 10);\n        },\n        months: '1月_2月_3月_4月_5月_6月_7月_8月_9月_10月_11月_12月'.split('_'),\n        monthsShort: '1月_2月_3月_4月_5月_6月_7月_8月_9月_10月_11月_12月'.split(\n            '_'\n        ),\n        weekdays: '日曜日_月曜日_火曜日_水曜日_木曜日_金曜日_土曜日'.split('_'),\n        weekdaysShort: '日_月_火_水_木_金_土'.split('_'),\n        weekdaysMin: '日_月_火_水_木_金_土'.split('_'),\n        longDateFormat: {\n            LT: 'HH:mm',\n            LTS: 'HH:mm:ss',\n            L: 'YYYY/MM/DD',\n            LL: 'YYYY年M月D日',\n            LLL: 'YYYY年M月D日 HH:mm',\n            LLLL: 'YYYY年M月D日 dddd HH:mm',\n            l: 'YYYY/MM/DD',\n            ll: 'YYYY年M月D日',\n            lll: 'YYYY年M月D日 HH:mm',\n            llll: 'YYYY年M月D日(ddd) HH:mm',\n        },\n        meridiemParse: /午前|午後/i,\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: function (now) {\n                if (now.week() !== this.week()) {\n                    return '[来週]dddd LT';\n                } else {\n                    return 'dddd LT';\n                }\n            },\n            lastDay: '[昨日] LT',\n            lastWeek: function (now) {\n                if (this.week() !== now.week()) {\n                    return '[先週]dddd LT';\n                } else {\n                    return 'dddd LT';\n                }\n            },\n            sameElse: 'L',\n        },\n        dayOfMonthOrdinalParse: /\\d{1,2}日/,\n        ordinal: function (number, period) {\n            switch (period) {\n                case 'y':\n                    return number === 1 ? '元年' : number + '年';\n                case 'd':\n                case 'D':\n                case 'DDD':\n                    return number + '日';\n                default:\n                    return number;\n            }\n        },\n        relativeTime: {\n            future: '%s後',\n            past: '%s前',\n            s: '数秒',\n            ss: '%d秒',\n            m: '1分',\n            mm: '%d分',\n            h: '1時間',\n            hh: '%d時間',\n            d: '1日',\n            dd: '%d日',\n            M: '1ヶ月',\n            MM: '%dヶ月',\n            y: '1年',\n            yy: '%d年',\n        },\n    });\n\n    return ja;\n\n})));\n","//! moment.js locale configuration\n//! locale : Javanese [jv]\n//! author : Rony Lantip : https://github.com/lantip\n//! reference: http://jv.wikipedia.org/wiki/Basa_Jawa\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 jv = moment.defineLocale('jv', {\n        months: 'Januari_Februari_Maret_April_Mei_Juni_Juli_Agustus_September_Oktober_Nopember_Desember'.split(\n            '_'\n        ),\n        monthsShort: 'Jan_Feb_Mar_Apr_Mei_Jun_Jul_Ags_Sep_Okt_Nop_Des'.split('_'),\n        weekdays: 'Minggu_Senen_Seloso_Rebu_Kemis_Jemuwah_Septu'.split('_'),\n        weekdaysShort: 'Min_Sen_Sel_Reb_Kem_Jem_Sep'.split('_'),\n        weekdaysMin: 'Mg_Sn_Sl_Rb_Km_Jm_Sp'.split('_'),\n        longDateFormat: {\n            LT: 'HH.mm',\n            LTS: 'HH.mm.ss',\n            L: 'DD/MM/YYYY',\n            LL: 'D MMMM YYYY',\n            LLL: 'D MMMM YYYY [pukul] HH.mm',\n            LLLL: 'dddd, D MMMM YYYY [pukul] HH.mm',\n        },\n        meridiemParse: /enjing|siyang|sonten|ndalu/,\n        meridiemHour: function (hour, meridiem) {\n            if (hour === 12) {\n                hour = 0;\n            }\n            if (meridiem === 'enjing') {\n                return hour;\n            } else if (meridiem === 'siyang') {\n                return hour >= 11 ? hour : hour + 12;\n            } else if (meridiem === 'sonten' || meridiem === 'ndalu') {\n                return hour + 12;\n            }\n        },\n        meridiem: function (hours, minutes, isLower) {\n            if (hours < 11) {\n                return 'enjing';\n            } else if (hours < 15) {\n                return 'siyang';\n            } else if (hours < 19) {\n                return 'sonten';\n            } else {\n                return 'ndalu';\n            }\n        },\n        calendar: {\n            sameDay: '[Dinten puniko pukul] LT',\n            nextDay: '[Mbenjang pukul] LT',\n            nextWeek: 'dddd [pukul] LT',\n            lastDay: '[Kala wingi pukul] LT',\n            lastWeek: 'dddd [kepengker pukul] LT',\n            sameElse: 'L',\n        },\n        relativeTime: {\n            future: 'wonten ing %s',\n            past: '%s ingkang kepengker',\n            s: 'sawetawis detik',\n            ss: '%d detik',\n            m: 'setunggal menit',\n            mm: '%d menit',\n            h: 'setunggal jam',\n            hh: '%d jam',\n            d: 'sedinten',\n            dd: '%d dinten',\n            M: 'sewulan',\n            MM: '%d wulan',\n            y: 'setaun',\n            yy: '%d taun',\n        },\n        week: {\n            dow: 1, // Monday is the first day of the week.\n            doy: 7, // The week that contains Jan 7th is the first week of the year.\n        },\n    });\n\n    return jv;\n\n})));\n","//! moment.js locale configuration\n//! locale : Georgian [ka]\n//! author : Irakli Janiashvili : https://github.com/IrakliJani\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 ka = moment.defineLocale('ka', {\n        months: 'იანვარი_თებერვალი_მარტი_აპრილი_მაისი_ივნისი_ივლისი_აგვისტო_სექტემბერი_ოქტომბერი_ნოემბერი_დეკემბერი'.split(\n            '_'\n        ),\n        monthsShort: 'იან_თებ_მარ_აპრ_მაი_ივნ_ივლ_აგვ_სექ_ოქტ_ნოე_დეკ'.split('_'),\n        weekdays: {\n            standalone:\n                'კვირა_ორშაბათი_სამშაბათი_ოთხშაბათი_ხუთშაბათი_პარასკევი_შაბათი'.split(\n                    '_'\n                ),\n            format: 'კვირას_ორშაბათს_სამშაბათს_ოთხშაბათს_ხუთშაბათს_პარასკევს_შაბათს'.split(\n                '_'\n            ),\n            isFormat: /(წინა|შემდეგ)/,\n        },\n        weekdaysShort: 'კვი_ორშ_სამ_ოთხ_ხუთ_პარ_შაბ'.split('_'),\n        weekdaysMin: 'კვ_ორ_სა_ოთ_ხუ_პა_შა'.split('_'),\n        longDateFormat: {\n            LT: 'HH:mm',\n            LTS: 'HH:mm:ss',\n            L: 'DD/MM/YYYY',\n            LL: 'D MMMM YYYY',\n            LLL: 'D MMMM YYYY HH:mm',\n            LLLL: 'dddd, D MMMM YYYY HH:mm',\n        },\n        calendar: {\n            sameDay: '[დღეს] LT[-ზე]',\n            nextDay: '[ხვალ] LT[-ზე]',\n            lastDay: '[გუშინ] LT[-ზე]',\n            nextWeek: '[შემდეგ] dddd LT[-ზე]',\n            lastWeek: '[წინა] dddd LT-ზე',\n            sameElse: 'L',\n        },\n        relativeTime: {\n            future: function (s) {\n                return s.replace(\n                    /(წამ|წუთ|საათ|წელ|დღ|თვ)(ი|ე)/,\n                    function ($0, $1, $2) {\n                        return $2 === 'ი' ? $1 + 'ში' : $1 + $2 + 'ში';\n                    }\n                );\n            },\n            past: function (s) {\n                if (/(წამი|წუთი|საათი|დღე|თვე)/.test(s)) {\n                    return s.replace(/(ი|ე)$/, 'ის წინ');\n                }\n                if (/წელი/.test(s)) {\n                    return s.replace(/წელი$/, 'წლის წინ');\n                }\n                return s;\n            },\n            s: 'რამდენიმე წამი',\n            ss: '%d წამი',\n            m: 'წუთი',\n            mm: '%d წუთი',\n            h: 'საათი',\n            hh: '%d საათი',\n            d: 'დღე',\n            dd: '%d დღე',\n            M: 'თვე',\n            MM: '%d თვე',\n            y: 'წელი',\n            yy: '%d წელი',\n        },\n        dayOfMonthOrdinalParse: /0|1-ლი|მე-\\d{1,2}|\\d{1,2}-ე/,\n        ordinal: function (number) {\n            if (number === 0) {\n                return number;\n            }\n            if (number === 1) {\n                return number + '-ლი';\n            }\n            if (\n                number < 20 ||\n                (number <= 100 && number % 20 === 0) ||\n                number % 100 === 0\n            ) {\n                return 'მე-' + number;\n            }\n            return number + '-ე';\n        },\n        week: {\n            dow: 1,\n            doy: 7,\n        },\n    });\n\n    return ka;\n\n})));\n","//! moment.js locale configuration\n//! locale : Kazakh [kk]\n//! authors : Nurlan Rakhimzhanov : https://github.com/nurlan\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 suffixes = {\n        0: '-ші',\n        1: '-ші',\n        2: '-ші',\n        3: '-ші',\n        4: '-ші',\n        5: '-ші',\n        6: '-шы',\n        7: '-ші',\n        8: '-ші',\n        9: '-шы',\n        10: '-шы',\n        20: '-шы',\n        30: '-шы',\n        40: '-шы',\n        50: '-ші',\n        60: '-шы',\n        70: '-ші',\n        80: '-ші',\n        90: '-шы',\n        100: '-ші',\n    };\n\n    var kk = moment.defineLocale('kk', {\n        months: 'қаңтар_ақпан_наурыз_сәуір_мамыр_маусым_шілде_тамыз_қыркүйек_қазан_қараша_желтоқсан'.split(\n            '_'\n        ),\n        monthsShort: 'қаң_ақп_нау_сәу_мам_мау_шіл_там_қыр_қаз_қар_жел'.split('_'),\n        weekdays: 'жексенбі_дүйсенбі_сейсенбі_сәрсенбі_бейсенбі_жұма_сенбі'.split(\n            '_'\n        ),\n        weekdaysShort: 'жек_дүй_сей_сәр_бей_жұм_сен'.split('_'),\n        weekdaysMin: 'жк_дй_сй_ср_бй_жм_сн'.split('_'),\n        longDateFormat: {\n            LT: 'HH:mm',\n            LTS: 'HH:mm:ss',\n            L: 'DD.MM.YYYY',\n            LL: 'D MMMM YYYY',\n            LLL: 'D MMMM YYYY HH:mm',\n            LLLL: 'dddd, D MMMM YYYY HH:mm',\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: 'бірнеше секунд',\n            ss: '%d секунд',\n            m: 'бір минут',\n            mm: '%d минут',\n            h: 'бір сағат',\n            hh: '%d сағат',\n            d: 'бір күн',\n            dd: '%d күн',\n            M: 'бір ай',\n            MM: '%d ай',\n            y: 'бір жыл',\n            yy: '%d жыл',\n        },\n        dayOfMonthOrdinalParse: /\\d{1,2}-(ші|шы)/,\n        ordinal: function (number) {\n            var a = number % 10,\n                b = number >= 100 ? 100 : null;\n            return number + (suffixes[number] || suffixes[a] || suffixes[b]);\n        },\n        week: {\n            dow: 1, // Monday is the first day of the week.\n            doy: 7, // The week that contains Jan 7th is the first week of the year.\n        },\n    });\n\n    return kk;\n\n})));\n","//! moment.js locale configuration\n//! locale : Cambodian [km]\n//! author : Kruy Vanna : https://github.com/kruyvanna\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\n    var km = moment.defineLocale('km', {\n        months: 'មករា_កុម្ភៈ_មីនា_មេសា_ឧសភា_មិថុនា_កក្កដា_សីហា_កញ្ញា_តុលា_វិច្ឆិកា_ធ្នូ'.split(\n            '_'\n        ),\n        monthsShort:\n            'មករា_កុម្ភៈ_មីនា_មេសា_ឧសភា_មិថុនា_កក្កដា_សីហា_កញ្ញា_តុលា_វិច្ឆិកា_ធ្នូ'.split(\n                '_'\n            ),\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: 'DD/MM/YYYY',\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: 'ប៉ុន្មានវិនាទី',\n            ss: '%d វិនាទី',\n            m: 'មួយនាទី',\n            mm: '%d នាទី',\n            h: 'មួយម៉ោង',\n            hh: '%d ម៉ោង',\n            d: 'មួយថ្ងៃ',\n            dd: '%d ថ្ងៃ',\n            M: 'មួយខែ',\n            MM: '%d ខែ',\n            y: 'មួយឆ្នាំ',\n            yy: '%d ឆ្នាំ',\n        },\n        dayOfMonthOrdinalParse: /ទី\\d{1,2}/,\n        ordinal: 'ទី%d',\n        preparse: function (string) {\n            return string.replace(/[១២៣៤៥៦៧៨៩០]/g, function (match) {\n                return numberMap[match];\n            });\n        },\n        postformat: function (string) {\n            return string.replace(/\\d/g, function (match) {\n                return symbolMap[match];\n            });\n        },\n        week: {\n            dow: 1, // Monday is the first day of the week.\n            doy: 4, // The week that contains Jan 4th is the first week of the year.\n        },\n    });\n\n    return km;\n\n})));\n","//! moment.js locale configuration\n//! locale : Kannada [kn]\n//! author : Rajeev Naik : https://github.com/rajeevnaikte\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\n    var kn = moment.defineLocale('kn', {\n        months: 'ಜನವರಿ_ಫೆಬ್ರವರಿ_ಮಾರ್ಚ್_ಏಪ್ರಿಲ್_ಮೇ_ಜೂನ್_ಜುಲೈ_ಆಗಸ್ಟ್_ಸೆಪ್ಟೆಂಬರ್_ಅಕ್ಟೋಬರ್_ನವೆಂಬರ್_ಡಿಸೆಂಬರ್'.split(\n            '_'\n        ),\n        monthsShort:\n            'ಜನ_ಫೆಬ್ರ_ಮಾರ್ಚ್_ಏಪ್ರಿಲ್_ಮೇ_ಜೂನ್_ಜುಲೈ_ಆಗಸ್ಟ್_ಸೆಪ್ಟೆಂ_ಅಕ್ಟೋ_ನವೆಂ_ಡಿಸೆಂ'.split(\n                '_'\n            ),\n        monthsParseExact: true,\n        weekdays: 'ಭಾನುವಾರ_ಸೋಮವಾರ_ಮಂಗಳವಾರ_ಬುಧವಾರ_ಗುರುವಾರ_ಶುಕ್ರವಾರ_ಶನಿವಾರ'.split(\n            '_'\n        ),\n        weekdaysShort: 'ಭಾನು_ಸೋಮ_ಮಂಗಳ_ಬುಧ_ಗುರು_ಶುಕ್ರ_ಶನಿ'.split('_'),\n        weekdaysMin: 'ಭಾ_ಸೋ_ಮಂ_ಬು_ಗು_ಶು_ಶ'.split('_'),\n        longDateFormat: {\n            LT: 'A h:mm',\n            LTS: 'A h:mm:ss',\n            L: 'DD/MM/YYYY',\n            LL: 'D MMMM YYYY',\n            LLL: 'D MMMM YYYY, A h:mm',\n            LLLL: 'dddd, D MMMM YYYY, A h:mm',\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: 'ಕೆಲವು ಕ್ಷಣಗಳು',\n            ss: '%d ಸೆಕೆಂಡುಗಳು',\n            m: 'ಒಂದು ನಿಮಿಷ',\n            mm: '%d ನಿಮಿಷ',\n            h: 'ಒಂದು ಗಂಟೆ',\n            hh: '%d ಗಂಟೆ',\n            d: 'ಒಂದು ದಿನ',\n            dd: '%d ದಿನ',\n            M: 'ಒಂದು ತಿಂಗಳು',\n            MM: '%d ತಿಂಗಳು',\n            y: 'ಒಂದು ವರ್ಷ',\n            yy: '%d ವರ್ಷ',\n        },\n        preparse: function (string) {\n            return string.replace(/[೧೨೩೪೫೬೭೮೯೦]/g, function (match) {\n                return numberMap[match];\n            });\n        },\n        postformat: function (string) {\n            return string.replace(/\\d/g, function (match) {\n                return symbolMap[match];\n            });\n        },\n        meridiemParse: /ರಾತ್ರಿ|ಬೆಳಿಗ್ಗೆ|ಮಧ್ಯಾಹ್ನ|ಸಂಜೆ/,\n        meridiemHour: function (hour, meridiem) {\n            if (hour === 12) {\n                hour = 0;\n            }\n            if (meridiem === 'ರಾತ್ರಿ') {\n                return hour < 4 ? hour : hour + 12;\n            } else if (meridiem === 'ಬೆಳಿಗ್ಗೆ') {\n                return hour;\n            } else if (meridiem === 'ಮಧ್ಯಾಹ್ನ') {\n                return hour >= 10 ? hour : hour + 12;\n            } else if (meridiem === 'ಸಂಜೆ') {\n                return hour + 12;\n            }\n        },\n        meridiem: function (hour, minute, isLower) {\n            if (hour < 4) {\n                return 'ರಾತ್ರಿ';\n            } else if (hour < 10) {\n                return 'ಬೆಳಿಗ್ಗೆ';\n            } else if (hour < 17) {\n                return 'ಮಧ್ಯಾಹ್ನ';\n            } else if (hour < 20) {\n                return 'ಸಂಜೆ';\n            } else {\n                return 'ರಾತ್ರಿ';\n            }\n        },\n        dayOfMonthOrdinalParse: /\\d{1,2}(ನೇ)/,\n        ordinal: function (number) {\n            return number + 'ನೇ';\n        },\n        week: {\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\n    return kn;\n\n})));\n","//! moment.js locale configuration\n//! locale : Korean [ko]\n//! author : Kyungwook, Park : https://github.com/kyungw00k\n//! author : Jeeeyul Lee <jeeeyul@gmail.com>\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 ko = moment.defineLocale('ko', {\n        months: '1월_2월_3월_4월_5월_6월_7월_8월_9월_10월_11월_12월'.split('_'),\n        monthsShort: '1월_2월_3월_4월_5월_6월_7월_8월_9월_10월_11월_12월'.split(\n            '_'\n        ),\n        weekdays: '일요일_월요일_화요일_수요일_목요일_금요일_토요일'.split('_'),\n        weekdaysShort: '일_월_화_수_목_금_토'.split('_'),\n        weekdaysMin: '일_월_화_수_목_금_토'.split('_'),\n        longDateFormat: {\n            LT: 'A h:mm',\n            LTS: 'A h:mm:ss',\n            L: 'YYYY.MM.DD.',\n            LL: 'YYYY년 MMMM D일',\n            LLL: 'YYYY년 MMMM D일 A h:mm',\n            LLLL: 'YYYY년 MMMM D일 dddd A h:mm',\n            l: 'YYYY.MM.DD.',\n            ll: 'YYYY년 MMMM D일',\n            lll: 'YYYY년 MMMM D일 A h:mm',\n            llll: 'YYYY년 MMMM D일 dddd A h:mm',\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: '몇 초',\n            ss: '%d초',\n            m: '1분',\n            mm: '%d분',\n            h: '한 시간',\n            hh: '%d시간',\n            d: '하루',\n            dd: '%d일',\n            M: '한 달',\n            MM: '%d달',\n            y: '일 년',\n            yy: '%d년',\n        },\n        dayOfMonthOrdinalParse: /\\d{1,2}(일|월|주)/,\n        ordinal: function (number, period) {\n            switch (period) {\n                case 'd':\n                case 'D':\n                case 'DDD':\n                    return number + '일';\n                case 'M':\n                    return number + '월';\n                case 'w':\n                case 'W':\n                    return number + '주';\n                default:\n                    return number;\n            }\n        },\n        meridiemParse: /오전|오후/,\n        isPM: function (token) {\n            return token === '오후';\n        },\n        meridiem: function (hour, minute, isUpper) {\n            return hour < 12 ? '오전' : '오후';\n        },\n    });\n\n    return ko;\n\n})));\n","//! moment.js locale configuration\n//! locale : Northern Kurdish [ku-kmr]\n//! authors : Mazlum Özdogan : https://github.com/mergehez\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    function processRelativeTime(num, withoutSuffix, key, isFuture) {\n        var format = {\n            s: ['çend sanîye', 'çend sanîyeyan'],\n            ss: [num + ' sanîye', num + ' sanîyeyan'],\n            m: ['deqîqeyek', 'deqîqeyekê'],\n            mm: [num + ' deqîqe', num + ' deqîqeyan'],\n            h: ['saetek', 'saetekê'],\n            hh: [num + ' saet', num + ' saetan'],\n            d: ['rojek', 'rojekê'],\n            dd: [num + ' roj', num + ' rojan'],\n            w: ['hefteyek', 'hefteyekê'],\n            ww: [num + ' hefte', num + ' hefteyan'],\n            M: ['mehek', 'mehekê'],\n            MM: [num + ' meh', num + ' mehan'],\n            y: ['salek', 'salekê'],\n            yy: [num + ' sal', num + ' salan'],\n        };\n        return withoutSuffix ? format[key][0] : format[key][1];\n    }\n    // function obliqueNumSuffix(num) {\n    //     if(num.includes(':'))\n    //         num = parseInt(num.split(':')[0]);\n    //     else\n    //         num = parseInt(num);\n    //     return num == 0 || num % 10 == 1 ? 'ê'\n    //                         : (num > 10 && num % 10 == 0 ? 'î' : 'an');\n    // }\n    function ezafeNumSuffix(num) {\n        num = '' + num;\n        var l = num.substring(num.length - 1),\n            ll = num.length > 1 ? num.substring(num.length - 2) : '';\n        if (\n            !(ll == 12 || ll == 13) &&\n            (l == '2' || l == '3' || ll == '50' || l == '70' || l == '80')\n        )\n            return 'yê';\n        return 'ê';\n    }\n\n    var kuKmr = moment.defineLocale('ku-kmr', {\n        // According to the spelling rules defined by the work group of Weqfa Mezopotamyayê (Mesopotamia Foundation)\n        // this should be: 'Kanûna Paşîn_Sibat_Adar_Nîsan_Gulan_Hezîran_Tîrmeh_Tebax_Îlon_Çirîya Pêşîn_Çirîya Paşîn_Kanûna Pêşîn'\n        // But the names below are more well known and handy\n        months: 'Rêbendan_Sibat_Adar_Nîsan_Gulan_Hezîran_Tîrmeh_Tebax_Îlon_Cotmeh_Mijdar_Berfanbar'.split(\n            '_'\n        ),\n        monthsShort: 'Rêb_Sib_Ada_Nîs_Gul_Hez_Tîr_Teb_Îlo_Cot_Mij_Ber'.split('_'),\n        monthsParseExact: true,\n        weekdays: 'Yekşem_Duşem_Sêşem_Çarşem_Pêncşem_În_Şemî'.split('_'),\n        weekdaysShort: 'Yek_Du_Sê_Çar_Pên_În_Şem'.split('_'),\n        weekdaysMin: 'Ye_Du_Sê_Ça_Pê_În_Şe'.split('_'),\n        meridiem: function (hours, minutes, isLower) {\n            if (hours < 12) {\n                return isLower ? 'bn' : 'BN';\n            } else {\n                return isLower ? 'pn' : 'PN';\n            }\n        },\n        meridiemParse: /bn|BN|pn|PN/,\n        longDateFormat: {\n            LT: 'HH:mm',\n            LTS: 'HH:mm:ss',\n            L: 'DD.MM.YYYY',\n            LL: 'Do MMMM[a] YYYY[an]',\n            LLL: 'Do MMMM[a] YYYY[an] HH:mm',\n            LLLL: 'dddd, Do MMMM[a] YYYY[an] HH:mm',\n            ll: 'Do MMM[.] YYYY[an]',\n            lll: 'Do MMM[.] YYYY[an] HH:mm',\n            llll: 'ddd[.], Do MMM[.] YYYY[an] HH:mm',\n        },\n        calendar: {\n            sameDay: '[Îro di saet] LT [de]',\n            nextDay: '[Sibê di saet] LT [de]',\n            nextWeek: 'dddd [di saet] LT [de]',\n            lastDay: '[Duh di saet] LT [de]',\n            lastWeek: 'dddd[a borî di saet] LT [de]',\n            sameElse: 'L',\n        },\n        relativeTime: {\n            future: 'di %s de',\n            past: 'berî %s',\n            s: processRelativeTime,\n            ss: processRelativeTime,\n            m: processRelativeTime,\n            mm: processRelativeTime,\n            h: processRelativeTime,\n            hh: processRelativeTime,\n            d: processRelativeTime,\n            dd: processRelativeTime,\n            w: processRelativeTime,\n            ww: processRelativeTime,\n            M: processRelativeTime,\n            MM: processRelativeTime,\n            y: processRelativeTime,\n            yy: processRelativeTime,\n        },\n        dayOfMonthOrdinalParse: /\\d{1,2}(?:yê|ê|\\.)/,\n        ordinal: function (num, period) {\n            var p = period.toLowerCase();\n            if (p.includes('w') || p.includes('m')) return num + '.';\n\n            return num + ezafeNumSuffix(num);\n        },\n        week: {\n            dow: 1, // Monday is the first day of the week.\n            doy: 4, // The week that contains Jan 4th is the first week of the year.\n        },\n    });\n\n    return kuKmr;\n\n})));\n","//! moment.js locale configuration\n//! locale : Kurdish [ku]\n//! author : Shahram Mebashar : https://github.com/ShahramMebashar\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        months = [\n            'کانونی دووەم',\n            'شوبات',\n            'ئازار',\n            'نیسان',\n            'ئایار',\n            'حوزەیران',\n            'تەمموز',\n            'ئاب',\n            'ئەیلوول',\n            'تشرینی یەكەم',\n            'تشرینی دووەم',\n            'كانونی یەکەم',\n        ];\n\n    var ku = moment.defineLocale('ku', {\n        months: months,\n        monthsShort: months,\n        weekdays:\n            'یه‌كشه‌ممه‌_دووشه‌ممه‌_سێشه‌ممه‌_چوارشه‌ممه‌_پێنجشه‌ممه‌_هه‌ینی_شه‌ممه‌'.split(\n                '_'\n            ),\n        weekdaysShort:\n            'یه‌كشه‌م_دووشه‌م_سێشه‌م_چوارشه‌م_پێنجشه‌م_هه‌ینی_شه‌ممه‌'.split('_'),\n        weekdaysMin: 'ی_د_س_چ_پ_ه_ش'.split('_'),\n        weekdaysParseExact: true,\n        longDateFormat: {\n            LT: 'HH:mm',\n            LTS: 'HH:mm:ss',\n            L: 'DD/MM/YYYY',\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 /ئێواره‌/.test(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: 'چه‌ند چركه‌یه‌ك',\n            ss: 'چركه‌ %d',\n            m: 'یه‌ك خوله‌ك',\n            mm: '%d خوله‌ك',\n            h: 'یه‌ك كاتژمێر',\n            hh: '%d كاتژمێر',\n            d: 'یه‌ك ڕۆژ',\n            dd: '%d ڕۆژ',\n            M: 'یه‌ك مانگ',\n            MM: '%d مانگ',\n            y: 'یه‌ك ساڵ',\n            yy: '%d ساڵ',\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 ku;\n\n})));\n","//! moment.js locale configuration\n//! locale : Kyrgyz [ky]\n//! author : Chyngyz Arystan uulu : https://github.com/chyngyz\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 suffixes = {\n        0: '-чү',\n        1: '-чи',\n        2: '-чи',\n        3: '-чү',\n        4: '-чү',\n        5: '-чи',\n        6: '-чы',\n        7: '-чи',\n        8: '-чи',\n        9: '-чу',\n        10: '-чу',\n        20: '-чы',\n        30: '-чу',\n        40: '-чы',\n        50: '-чү',\n        60: '-чы',\n        70: '-чи',\n        80: '-чи',\n        90: '-чу',\n        100: '-чү',\n    };\n\n    var ky = moment.defineLocale('ky', {\n        months: 'январь_февраль_март_апрель_май_июнь_июль_август_сентябрь_октябрь_ноябрь_декабрь'.split(\n            '_'\n        ),\n        monthsShort: 'янв_фев_март_апр_май_июнь_июль_авг_сен_окт_ноя_дек'.split(\n            '_'\n        ),\n        weekdays: 'Жекшемби_Дүйшөмбү_Шейшемби_Шаршемби_Бейшемби_Жума_Ишемби'.split(\n            '_'\n        ),\n        weekdaysShort: 'Жек_Дүй_Шей_Шар_Бей_Жум_Ише'.split('_'),\n        weekdaysMin: 'Жк_Дй_Шй_Шр_Бй_Жм_Иш'.split('_'),\n        longDateFormat: {\n            LT: 'HH:mm',\n            LTS: 'HH:mm:ss',\n            L: 'DD.MM.YYYY',\n            LL: 'D MMMM YYYY',\n            LLL: 'D MMMM YYYY HH:mm',\n            LLLL: 'dddd, D MMMM YYYY HH:mm',\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: 'бирнече секунд',\n            ss: '%d секунд',\n            m: 'бир мүнөт',\n            mm: '%d мүнөт',\n            h: 'бир саат',\n            hh: '%d саат',\n            d: 'бир күн',\n            dd: '%d күн',\n            M: 'бир ай',\n            MM: '%d ай',\n            y: 'бир жыл',\n            yy: '%d жыл',\n        },\n        dayOfMonthOrdinalParse: /\\d{1,2}-(чи|чы|чү|чу)/,\n        ordinal: function (number) {\n            var a = number % 10,\n                b = number >= 100 ? 100 : null;\n            return number + (suffixes[number] || suffixes[a] || suffixes[b]);\n        },\n        week: {\n            dow: 1, // Monday is the first day of the week.\n            doy: 7, // The week that contains Jan 7th is the first week of the year.\n        },\n    });\n\n    return ky;\n\n})));\n","//! moment.js locale configuration\n//! locale : Luxembourgish [lb]\n//! author : mweimerskirch : https://github.com/mweimerskirch\n//! author : David Raison : https://github.com/kwisatz\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    function processRelativeTime(number, withoutSuffix, key, isFuture) {\n        var format = {\n            m: ['eng Minutt', 'enger Minutt'],\n            h: ['eng Stonn', 'enger Stonn'],\n            d: ['een Dag', 'engem Dag'],\n            M: ['ee Mount', 'engem Mount'],\n            y: ['ee Joer', 'engem Joer'],\n        };\n        return withoutSuffix ? format[key][0] : format[key][1];\n    }\n    function processFutureTime(string) {\n        var number = string.substr(0, string.indexOf(' '));\n        if (eifelerRegelAppliesToNumber(number)) {\n            return 'a ' + string;\n        }\n        return 'an ' + string;\n    }\n    function processPastTime(string) {\n        var number = string.substr(0, string.indexOf(' '));\n        if (eifelerRegelAppliesToNumber(number)) {\n            return 'viru ' + string;\n        }\n        return 'virun ' + string;\n    }\n    /**\n     * Returns true if the word before the given number loses the '-n' ending.\n     * e.g. 'an 10 Deeg' but 'a 5 Deeg'\n     *\n     * @param number {integer}\n     * @returns {boolean}\n     */\n    function eifelerRegelAppliesToNumber(number) {\n        number = parseInt(number, 10);\n        if (isNaN(number)) {\n            return false;\n        }\n        if (number < 0) {\n            // Negative Number --> always true\n            return true;\n        } else if (number < 10) {\n            // Only 1 digit\n            if (4 <= number && number <= 7) {\n                return true;\n            }\n            return false;\n        } else if (number < 100) {\n            // 2 digits\n            var lastDigit = number % 10,\n                firstDigit = number / 10;\n            if (lastDigit === 0) {\n                return eifelerRegelAppliesToNumber(firstDigit);\n            }\n            return eifelerRegelAppliesToNumber(lastDigit);\n        } else if (number < 10000) {\n            // 3 or 4 digits --> recursively check first digit\n            while (number >= 10) {\n                number = number / 10;\n            }\n            return eifelerRegelAppliesToNumber(number);\n        } else {\n            // Anything larger than 4 digits: recursively check first n-3 digits\n            number = number / 1000;\n            return eifelerRegelAppliesToNumber(number);\n        }\n    }\n\n    var lb = moment.defineLocale('lb', {\n        months: 'Januar_Februar_Mäerz_Abrëll_Mee_Juni_Juli_August_September_Oktober_November_Dezember'.split(\n            '_'\n        ),\n        monthsShort:\n            'Jan._Febr._Mrz._Abr._Mee_Jun._Jul._Aug._Sept._Okt._Nov._Dez.'.split(\n                '_'\n            ),\n        monthsParseExact: true,\n        weekdays:\n            'Sonndeg_Méindeg_Dënschdeg_Mëttwoch_Donneschdeg_Freideg_Samschdeg'.split(\n                '_'\n            ),\n        weekdaysShort: 'So._Mé._Dë._Më._Do._Fr._Sa.'.split('_'),\n        weekdaysMin: 'So_Mé_Dë_Më_Do_Fr_Sa'.split('_'),\n        weekdaysParseExact: true,\n        longDateFormat: {\n            LT: 'H:mm [Auer]',\n            LTS: 'H:mm:ss [Auer]',\n            L: 'DD.MM.YYYY',\n            LL: 'D. MMMM YYYY',\n            LLL: 'D. MMMM YYYY H:mm [Auer]',\n            LLLL: 'dddd, D. MMMM YYYY H:mm [Auer]',\n        },\n        calendar: {\n            sameDay: '[Haut um] LT',\n            sameElse: 'L',\n            nextDay: '[Muer um] LT',\n            nextWeek: 'dddd [um] LT',\n            lastDay: '[Gëschter um] LT',\n            lastWeek: function () {\n                // Different date string for 'Dënschdeg' (Tuesday) and 'Donneschdeg' (Thursday) due to phonological rule\n                switch (this.day()) {\n                    case 2:\n                    case 4:\n                        return '[Leschten] dddd [um] LT';\n                    default:\n                        return '[Leschte] dddd [um] LT';\n                }\n            },\n        },\n        relativeTime: {\n            future: processFutureTime,\n            past: processPastTime,\n            s: 'e puer Sekonnen',\n            ss: '%d Sekonnen',\n            m: processRelativeTime,\n            mm: '%d Minutten',\n            h: processRelativeTime,\n            hh: '%d Stonnen',\n            d: processRelativeTime,\n            dd: '%d Deeg',\n            M: processRelativeTime,\n            MM: '%d Méint',\n            y: processRelativeTime,\n            yy: '%d Joer',\n        },\n        dayOfMonthOrdinalParse: /\\d{1,2}\\./,\n        ordinal: '%d.',\n        week: {\n            dow: 1, // Monday is the first day of the week.\n            doy: 4, // The week that contains Jan 4th is the first week of the year.\n        },\n    });\n\n    return lb;\n\n})));\n","//! moment.js locale configuration\n//! locale : Lao [lo]\n//! author : Ryan Hart : https://github.com/ryanhart2\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 lo = moment.defineLocale('lo', {\n        months: 'ມັງກອນ_ກຸມພາ_ມີນາ_ເມສາ_ພຶດສະພາ_ມິຖຸນາ_ກໍລະກົດ_ສິງຫາ_ກັນຍາ_ຕຸລາ_ພະຈິກ_ທັນວາ'.split(\n            '_'\n        ),\n        monthsShort:\n            'ມັງກອນ_ກຸມພາ_ມີນາ_ເມສາ_ພຶດສະພາ_ມິຖຸນາ_ກໍລະກົດ_ສິງຫາ_ກັນຍາ_ຕຸລາ_ພະຈິກ_ທັນວາ'.split(\n                '_'\n            ),\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: 'DD/MM/YYYY',\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: 'ບໍ່ເທົ່າໃດວິນາທີ',\n            ss: '%d ວິນາທີ',\n            m: '1 ນາທີ',\n            mm: '%d ນາທີ',\n            h: '1 ຊົ່ວໂມງ',\n            hh: '%d ຊົ່ວໂມງ',\n            d: '1 ມື້',\n            dd: '%d ມື້',\n            M: '1 ເດືອນ',\n            MM: '%d ເດືອນ',\n            y: '1 ປີ',\n            yy: '%d ປີ',\n        },\n        dayOfMonthOrdinalParse: /(ທີ່)\\d{1,2}/,\n        ordinal: function (number) {\n            return 'ທີ່' + number;\n        },\n    });\n\n    return lo;\n\n})));\n","//! moment.js locale configuration\n//! locale : Lithuanian [lt]\n//! author : Mindaugas Mozūras : https://github.com/mmozuras\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 units = {\n        ss: 'sekundė_sekundžių_sekundes',\n        m: 'minutė_minutės_minutę',\n        mm: 'minutės_minučių_minutes',\n        h: 'valanda_valandos_valandą',\n        hh: 'valandos_valandų_valandas',\n        d: 'diena_dienos_dieną',\n        dd: 'dienos_dienų_dienas',\n        M: 'mėnuo_mėnesio_mėnesį',\n        MM: 'mėnesiai_mėnesių_mėnesius',\n        y: 'metai_metų_metus',\n        yy: 'metai_metų_metus',\n    };\n    function translateSeconds(number, withoutSuffix, key, isFuture) {\n        if (withoutSuffix) {\n            return 'kelios sekundės';\n        } else {\n            return isFuture ? 'kelių sekundžių' : 'kelias sekundes';\n        }\n    }\n    function translateSingular(number, withoutSuffix, key, isFuture) {\n        return withoutSuffix\n            ? forms(key)[0]\n            : isFuture\n              ? forms(key)[1]\n              : forms(key)[2];\n    }\n    function special(number) {\n        return number % 10 === 0 || (number > 10 && number < 20);\n    }\n    function forms(key) {\n        return units[key].split('_');\n    }\n    function translate(number, withoutSuffix, key, isFuture) {\n        var result = number + ' ';\n        if (number === 1) {\n            return (\n                result + translateSingular(number, withoutSuffix, key[0], isFuture)\n            );\n        } else if (withoutSuffix) {\n            return result + (special(number) ? forms(key)[1] : forms(key)[0]);\n        } else {\n            if (isFuture) {\n                return result + forms(key)[1];\n            } else {\n                return result + (special(number) ? forms(key)[1] : forms(key)[2]);\n            }\n        }\n    }\n    var lt = moment.defineLocale('lt', {\n        months: {\n            format: 'sausio_vasario_kovo_balandžio_gegužės_birželio_liepos_rugpjūčio_rugsėjo_spalio_lapkričio_gruodžio'.split(\n                '_'\n            ),\n            standalone:\n                'sausis_vasaris_kovas_balandis_gegužė_birželis_liepa_rugpjūtis_rugsėjis_spalis_lapkritis_gruodis'.split(\n                    '_'\n                ),\n            isFormat: /D[oD]?(\\[[^\\[\\]]*\\]|\\s)+MMMM?|MMMM?(\\[[^\\[\\]]*\\]|\\s)+D[oD]?/,\n        },\n        monthsShort: 'sau_vas_kov_bal_geg_bir_lie_rgp_rgs_spa_lap_grd'.split('_'),\n        weekdays: {\n            format: 'sekmadienį_pirmadienį_antradienį_trečiadienį_ketvirtadienį_penktadienį_šeštadienį'.split(\n                '_'\n            ),\n            standalone:\n                'sekmadienis_pirmadienis_antradienis_trečiadienis_ketvirtadienis_penktadienis_šeštadienis'.split(\n                    '_'\n                ),\n            isFormat: /dddd HH:mm/,\n        },\n        weekdaysShort: 'Sek_Pir_Ant_Tre_Ket_Pen_Šeš'.split('_'),\n        weekdaysMin: 'S_P_A_T_K_Pn_Š'.split('_'),\n        weekdaysParseExact: true,\n        longDateFormat: {\n            LT: 'HH:mm',\n            LTS: 'HH:mm:ss',\n            L: 'YYYY-MM-DD',\n            LL: 'YYYY [m.] MMMM D [d.]',\n            LLL: 'YYYY [m.] MMMM D [d.], HH:mm [val.]',\n            LLLL: 'YYYY [m.] MMMM D [d.], dddd, HH:mm [val.]',\n            l: 'YYYY-MM-DD',\n            ll: 'YYYY [m.] MMMM D [d.]',\n            lll: 'YYYY [m.] MMMM D [d.], HH:mm [val.]',\n            llll: 'YYYY [m.] MMMM D [d.], ddd, HH:mm [val.]',\n        },\n        calendar: {\n            sameDay: '[Šiandien] LT',\n            nextDay: '[Rytoj] LT',\n            nextWeek: 'dddd LT',\n            lastDay: '[Vakar] LT',\n            lastWeek: '[Praėjusį] dddd LT',\n            sameElse: 'L',\n        },\n        relativeTime: {\n            future: 'po %s',\n            past: 'prieš %s',\n            s: translateSeconds,\n            ss: translate,\n            m: translateSingular,\n            mm: translate,\n            h: translateSingular,\n            hh: translate,\n            d: translateSingular,\n            dd: translate,\n            M: translateSingular,\n            MM: translate,\n            y: translateSingular,\n            yy: translate,\n        },\n        dayOfMonthOrdinalParse: /\\d{1,2}-oji/,\n        ordinal: function (number) {\n            return number + '-oji';\n        },\n        week: {\n            dow: 1, // Monday is the first day of the week.\n            doy: 4, // The week that contains Jan 4th is the first week of the year.\n        },\n    });\n\n    return lt;\n\n})));\n","//! moment.js locale configuration\n//! locale : Latvian [lv]\n//! author : Kristaps Karlsons : https://github.com/skakri\n//! author : Jānis Elmeris : https://github.com/JanisE\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 units = {\n        ss: 'sekundes_sekundēm_sekunde_sekundes'.split('_'),\n        m: 'minūtes_minūtēm_minūte_minūtes'.split('_'),\n        mm: 'minūtes_minūtēm_minūte_minūtes'.split('_'),\n        h: 'stundas_stundām_stunda_stundas'.split('_'),\n        hh: 'stundas_stundām_stunda_stundas'.split('_'),\n        d: 'dienas_dienām_diena_dienas'.split('_'),\n        dd: 'dienas_dienām_diena_dienas'.split('_'),\n        M: 'mēneša_mēnešiem_mēnesis_mēneši'.split('_'),\n        MM: 'mēneša_mēnešiem_mēnesis_mēneši'.split('_'),\n        y: 'gada_gadiem_gads_gadi'.split('_'),\n        yy: 'gada_gadiem_gads_gadi'.split('_'),\n    };\n    /**\n     * @param withoutSuffix boolean true = a length of time; false = before/after a period of time.\n     */\n    function format(forms, number, withoutSuffix) {\n        if (withoutSuffix) {\n            // E.g. \"21 minūte\", \"3 minūtes\".\n            return number % 10 === 1 && number % 100 !== 11 ? forms[2] : forms[3];\n        } else {\n            // E.g. \"21 minūtes\" as in \"pēc 21 minūtes\".\n            // E.g. \"3 minūtēm\" as in \"pēc 3 minūtēm\".\n            return number % 10 === 1 && number % 100 !== 11 ? forms[0] : forms[1];\n        }\n    }\n    function relativeTimeWithPlural(number, withoutSuffix, key) {\n        return number + ' ' + format(units[key], number, withoutSuffix);\n    }\n    function relativeTimeWithSingular(number, withoutSuffix, key) {\n        return format(units[key], number, withoutSuffix);\n    }\n    function relativeSeconds(number, withoutSuffix) {\n        return withoutSuffix ? 'dažas sekundes' : 'dažām sekundēm';\n    }\n\n    var lv = moment.defineLocale('lv', {\n        months: 'janvāris_februāris_marts_aprīlis_maijs_jūnijs_jūlijs_augusts_septembris_oktobris_novembris_decembris'.split(\n            '_'\n        ),\n        monthsShort: 'jan_feb_mar_apr_mai_jūn_jūl_aug_sep_okt_nov_dec'.split('_'),\n        weekdays:\n            'svētdiena_pirmdiena_otrdiena_trešdiena_ceturtdiena_piektdiena_sestdiena'.split(\n                '_'\n            ),\n        weekdaysShort: 'Sv_P_O_T_C_Pk_S'.split('_'),\n        weekdaysMin: 'Sv_P_O_T_C_Pk_S'.split('_'),\n        weekdaysParseExact: true,\n        longDateFormat: {\n            LT: 'HH:mm',\n            LTS: 'HH:mm:ss',\n            L: 'DD.MM.YYYY.',\n            LL: 'YYYY. [gada] D. MMMM',\n            LLL: 'YYYY. [gada] D. MMMM, HH:mm',\n            LLLL: 'YYYY. [gada] D. MMMM, dddd, HH:mm',\n        },\n        calendar: {\n            sameDay: '[Šodien pulksten] LT',\n            nextDay: '[Rīt pulksten] LT',\n            nextWeek: 'dddd [pulksten] LT',\n            lastDay: '[Vakar pulksten] LT',\n            lastWeek: '[Pagājušā] dddd [pulksten] LT',\n            sameElse: 'L',\n        },\n        relativeTime: {\n            future: 'pēc %s',\n            past: 'pirms %s',\n            s: relativeSeconds,\n            ss: relativeTimeWithPlural,\n            m: relativeTimeWithSingular,\n            mm: relativeTimeWithPlural,\n            h: relativeTimeWithSingular,\n            hh: relativeTimeWithPlural,\n            d: relativeTimeWithSingular,\n            dd: relativeTimeWithPlural,\n            M: relativeTimeWithSingular,\n            MM: relativeTimeWithPlural,\n            y: relativeTimeWithSingular,\n            yy: relativeTimeWithPlural,\n        },\n        dayOfMonthOrdinalParse: /\\d{1,2}\\./,\n        ordinal: '%d.',\n        week: {\n            dow: 1, // Monday is the first day of the week.\n            doy: 4, // The week that contains Jan 4th is the first week of the year.\n        },\n    });\n\n    return lv;\n\n})));\n","//! moment.js locale configuration\n//! locale : Montenegrin [me]\n//! author : Miodrag Nikač <miodrag@restartit.me> : https://github.com/miodragnikac\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 translator = {\n        words: {\n            //Different grammatical cases\n            ss: ['sekund', 'sekunda', 'sekundi'],\n            m: ['jedan minut', 'jednog minuta'],\n            mm: ['minut', 'minuta', 'minuta'],\n            h: ['jedan sat', 'jednog sata'],\n            hh: ['sat', 'sata', 'sati'],\n            dd: ['dan', 'dana', 'dana'],\n            MM: ['mjesec', 'mjeseca', 'mjeseci'],\n            yy: ['godina', 'godine', 'godina'],\n        },\n        correctGrammaticalCase: function (number, wordKey) {\n            return number === 1\n                ? wordKey[0]\n                : number >= 2 && number <= 4\n                  ? wordKey[1]\n                  : wordKey[2];\n        },\n        translate: function (number, withoutSuffix, key) {\n            var wordKey = translator.words[key];\n            if (key.length === 1) {\n                return withoutSuffix ? wordKey[0] : wordKey[1];\n            } else {\n                return (\n                    number +\n                    ' ' +\n                    translator.correctGrammaticalCase(number, wordKey)\n                );\n            }\n        },\n    };\n\n    var me = moment.defineLocale('me', {\n        months: 'januar_februar_mart_april_maj_jun_jul_avgust_septembar_oktobar_novembar_decembar'.split(\n            '_'\n        ),\n        monthsShort:\n            'jan._feb._mar._apr._maj_jun_jul_avg._sep._okt._nov._dec.'.split('_'),\n        monthsParseExact: true,\n        weekdays: 'nedjelja_ponedjeljak_utorak_srijeda_četvrtak_petak_subota'.split(\n            '_'\n        ),\n        weekdaysShort: 'ned._pon._uto._sri._čet._pet._sub.'.split('_'),\n        weekdaysMin: 'ne_po_ut_sr_če_pe_su'.split('_'),\n        weekdaysParseExact: true,\n        longDateFormat: {\n            LT: 'H:mm',\n            LTS: 'H:mm:ss',\n            L: 'DD.MM.YYYY',\n            LL: 'D. MMMM YYYY',\n            LLL: 'D. MMMM YYYY H:mm',\n            LLLL: 'dddd, D. MMMM YYYY H:mm',\n        },\n        calendar: {\n            sameDay: '[danas u] LT',\n            nextDay: '[sjutra u] LT',\n\n            nextWeek: function () {\n                switch (this.day()) {\n                    case 0:\n                        return '[u] [nedjelju] [u] LT';\n                    case 3:\n                        return '[u] [srijedu] [u] LT';\n                    case 6:\n                        return '[u] [subotu] [u] LT';\n                    case 1:\n                    case 2:\n                    case 4:\n                    case 5:\n                        return '[u] dddd [u] LT';\n                }\n            },\n            lastDay: '[juče u] LT',\n            lastWeek: function () {\n                var lastWeekDays = [\n                    '[prošle] [nedjelje] [u] LT',\n                    '[prošlog] [ponedjeljka] [u] LT',\n                    '[prošlog] [utorka] [u] LT',\n                    '[prošle] [srijede] [u] LT',\n                    '[prošlog] [četvrtka] [u] LT',\n                    '[prošlog] [petka] [u] LT',\n                    '[prošle] [subote] [u] LT',\n                ];\n                return lastWeekDays[this.day()];\n            },\n            sameElse: 'L',\n        },\n        relativeTime: {\n            future: 'za %s',\n            past: 'prije %s',\n            s: 'nekoliko sekundi',\n            ss: translator.translate,\n            m: translator.translate,\n            mm: translator.translate,\n            h: translator.translate,\n            hh: translator.translate,\n            d: 'dan',\n            dd: translator.translate,\n            M: 'mjesec',\n            MM: translator.translate,\n            y: 'godinu',\n            yy: translator.translate,\n        },\n        dayOfMonthOrdinalParse: /\\d{1,2}\\./,\n        ordinal: '%d.',\n        week: {\n            dow: 1, // Monday is the first day of the week.\n            doy: 7, // The week that contains Jan 7th is the first week of the year.\n        },\n    });\n\n    return me;\n\n})));\n","//! moment.js locale configuration\n//! locale : Maori [mi]\n//! author : John Corrigan <robbiecloset@gmail.com> : https://github.com/johnideal\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 mi = moment.defineLocale('mi', {\n        months: 'Kohi-tāte_Hui-tanguru_Poutū-te-rangi_Paenga-whāwhā_Haratua_Pipiri_Hōngoingoi_Here-turi-kōkā_Mahuru_Whiringa-ā-nuku_Whiringa-ā-rangi_Hakihea'.split(\n            '_'\n        ),\n        monthsShort:\n            'Kohi_Hui_Pou_Pae_Hara_Pipi_Hōngoi_Here_Mahu_Whi-nu_Whi-ra_Haki'.split(\n                '_'\n            ),\n        monthsRegex: /(?:['a-z\\u0101\\u014D\\u016B]+\\-?){1,3}/i,\n        monthsStrictRegex: /(?:['a-z\\u0101\\u014D\\u016B]+\\-?){1,3}/i,\n        monthsShortRegex: /(?:['a-z\\u0101\\u014D\\u016B]+\\-?){1,3}/i,\n        monthsShortStrictRegex: /(?:['a-z\\u0101\\u014D\\u016B]+\\-?){1,2}/i,\n        weekdays: 'Rātapu_Mane_Tūrei_Wenerei_Tāite_Paraire_Hātarei'.split('_'),\n        weekdaysShort: 'Ta_Ma_Tū_We_Tāi_Pa_Hā'.split('_'),\n        weekdaysMin: 'Ta_Ma_Tū_We_Tāi_Pa_Hā'.split('_'),\n        longDateFormat: {\n            LT: 'HH:mm',\n            LTS: 'HH:mm:ss',\n            L: 'DD/MM/YYYY',\n            LL: 'D MMMM YYYY',\n            LLL: 'D MMMM YYYY [i] HH:mm',\n            LLLL: 'dddd, D MMMM YYYY [i] HH:mm',\n        },\n        calendar: {\n            sameDay: '[i teie mahana, i] LT',\n            nextDay: '[apopo i] LT',\n            nextWeek: 'dddd [i] LT',\n            lastDay: '[inanahi i] LT',\n            lastWeek: 'dddd [whakamutunga i] LT',\n            sameElse: 'L',\n        },\n        relativeTime: {\n            future: 'i roto i %s',\n            past: '%s i mua',\n            s: 'te hēkona ruarua',\n            ss: '%d hēkona',\n            m: 'he meneti',\n            mm: '%d meneti',\n            h: 'te haora',\n            hh: '%d haora',\n            d: 'he ra',\n            dd: '%d ra',\n            M: 'he marama',\n            MM: '%d marama',\n            y: 'he tau',\n            yy: '%d tau',\n        },\n        dayOfMonthOrdinalParse: /\\d{1,2}º/,\n        ordinal: '%dº',\n        week: {\n            dow: 1, // Monday is the first day of the week.\n            doy: 4, // The week that contains Jan 4th is the first week of the year.\n        },\n    });\n\n    return mi;\n\n})));\n","//! moment.js locale configuration\n//! locale : Macedonian [mk]\n//! author : Borislav Mickov : https://github.com/B0k0\n//! author : Sashko Todorov : https://github.com/bkyceh\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 mk = moment.defineLocale('mk', {\n        months: 'јануари_февруари_март_април_мај_јуни_јули_август_септември_октомври_ноември_декември'.split(\n            '_'\n        ),\n        monthsShort: 'јан_фев_мар_апр_мај_јун_јул_авг_сеп_окт_ное_дек'.split('_'),\n        weekdays: 'недела_понеделник_вторник_среда_четврток_петок_сабота'.split(\n            '_'\n        ),\n        weekdaysShort: 'нед_пон_вто_сре_чет_пет_саб'.split('_'),\n        weekdaysMin: 'нe_пo_вт_ср_че_пе_сa'.split('_'),\n        longDateFormat: {\n            LT: 'H:mm',\n            LTS: 'H:mm:ss',\n            L: 'D.MM.YYYY',\n            LL: 'D MMMM YYYY',\n            LLL: 'D MMMM YYYY H:mm',\n            LLLL: 'dddd, D MMMM YYYY H:mm',\n        },\n        calendar: {\n            sameDay: '[Денес во] LT',\n            nextDay: '[Утре во] LT',\n            nextWeek: '[Во] dddd [во] LT',\n            lastDay: '[Вчера во] LT',\n            lastWeek: function () {\n                switch (this.day()) {\n                    case 0:\n                    case 3:\n                    case 6:\n                        return '[Изминатата] dddd [во] LT';\n                    case 1:\n                    case 2:\n                    case 4:\n                    case 5:\n                        return '[Изминатиот] dddd [во] LT';\n                }\n            },\n            sameElse: 'L',\n        },\n        relativeTime: {\n            future: 'за %s',\n            past: 'пред %s',\n            s: 'неколку секунди',\n            ss: '%d секунди',\n            m: 'една минута',\n            mm: '%d минути',\n            h: 'еден час',\n            hh: '%d часа',\n            d: 'еден ден',\n            dd: '%d дена',\n            M: 'еден месец',\n            MM: '%d месеци',\n            y: 'една година',\n            yy: '%d години',\n        },\n        dayOfMonthOrdinalParse: /\\d{1,2}-(ев|ен|ти|ви|ри|ми)/,\n        ordinal: function (number) {\n            var lastDigit = number % 10,\n                last2Digits = number % 100;\n            if (number === 0) {\n                return number + '-ев';\n            } else if (last2Digits === 0) {\n                return number + '-ен';\n            } else if (last2Digits > 10 && last2Digits < 20) {\n                return number + '-ти';\n            } else if (lastDigit === 1) {\n                return number + '-ви';\n            } else if (lastDigit === 2) {\n                return number + '-ри';\n            } else if (lastDigit === 7 || lastDigit === 8) {\n                return number + '-ми';\n            } else {\n                return number + '-ти';\n            }\n        },\n        week: {\n            dow: 1, // Monday is the first day of the week.\n            doy: 7, // The week that contains Jan 7th is the first week of the year.\n        },\n    });\n\n    return mk;\n\n})));\n","//! moment.js locale configuration\n//! locale : Malayalam [ml]\n//! author : Floyd Pink : https://github.com/floydpink\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 ml = moment.defineLocale('ml', {\n        months: 'ജനുവരി_ഫെബ്രുവരി_മാർച്ച്_ഏപ്രിൽ_മേയ്_ജൂൺ_ജൂലൈ_ഓഗസ്റ്റ്_സെപ്റ്റംബർ_ഒക്ടോബർ_നവംബർ_ഡിസംബർ'.split(\n            '_'\n        ),\n        monthsShort:\n            'ജനു._ഫെബ്രു._മാർ._ഏപ്രി._മേയ്_ജൂൺ_ജൂലൈ._ഓഗ._സെപ്റ്റ._ഒക്ടോ._നവം._ഡിസം.'.split(\n                '_'\n            ),\n        monthsParseExact: true,\n        weekdays:\n            'ഞായറാഴ്ച_തിങ്കളാഴ്ച_ചൊവ്വാഴ്ച_ബുധനാഴ്ച_വ്യാഴാഴ്ച_വെള്ളിയാഴ്ച_ശനിയാഴ്ച'.split(\n                '_'\n            ),\n        weekdaysShort: 'ഞായർ_തിങ്കൾ_ചൊവ്വ_ബുധൻ_വ്യാഴം_വെള്ളി_ശനി'.split('_'),\n        weekdaysMin: 'ഞാ_തി_ചൊ_ബു_വ്യാ_വെ_ശ'.split('_'),\n        longDateFormat: {\n            LT: 'A h:mm -നു',\n            LTS: 'A h:mm:ss -നു',\n            L: 'DD/MM/YYYY',\n            LL: 'D MMMM YYYY',\n            LLL: 'D MMMM YYYY, A h:mm -നു',\n            LLLL: 'dddd, D MMMM YYYY, A h:mm -നു',\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: 'അൽപ നിമിഷങ്ങൾ',\n            ss: '%d സെക്കൻഡ്',\n            m: 'ഒരു മിനിറ്റ്',\n            mm: '%d മിനിറ്റ്',\n            h: 'ഒരു മണിക്കൂർ',\n            hh: '%d മണിക്കൂർ',\n            d: 'ഒരു ദിവസം',\n            dd: '%d ദിവസം',\n            M: 'ഒരു മാസം',\n            MM: '%d മാസം',\n            y: 'ഒരു വർഷം',\n            yy: '%d വർഷം',\n        },\n        meridiemParse: /രാത്രി|രാവിലെ|ഉച്ച കഴിഞ്ഞ്|വൈകുന്നേരം|രാത്രി/i,\n        meridiemHour: function (hour, meridiem) {\n            if (hour === 12) {\n                hour = 0;\n            }\n            if (\n                (meridiem === 'രാത്രി' && hour >= 4) ||\n                meridiem === 'ഉച്ച കഴിഞ്ഞ്' ||\n                meridiem === 'വൈകുന്നേരം'\n            ) {\n                return hour + 12;\n            } else {\n                return hour;\n            }\n        },\n        meridiem: function (hour, minute, isLower) {\n            if (hour < 4) {\n                return 'രാത്രി';\n            } else if (hour < 12) {\n                return 'രാവിലെ';\n            } else if (hour < 17) {\n                return 'ഉച്ച കഴിഞ്ഞ്';\n            } else if (hour < 20) {\n                return 'വൈകുന്നേരം';\n            } else {\n                return 'രാത്രി';\n            }\n        },\n    });\n\n    return ml;\n\n})));\n","//! moment.js locale configuration\n//! locale : Mongolian [mn]\n//! author : Javkhlantugs Nyamdorj : https://github.com/javkhaanj7\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    function translate(number, withoutSuffix, key, isFuture) {\n        switch (key) {\n            case 's':\n                return withoutSuffix ? 'хэдхэн секунд' : 'хэдхэн секундын';\n            case 'ss':\n                return number + (withoutSuffix ? ' секунд' : ' секундын');\n            case 'm':\n            case 'mm':\n                return number + (withoutSuffix ? ' минут' : ' минутын');\n            case 'h':\n            case 'hh':\n                return number + (withoutSuffix ? ' цаг' : ' цагийн');\n            case 'd':\n            case 'dd':\n                return number + (withoutSuffix ? ' өдөр' : ' өдрийн');\n            case 'M':\n            case 'MM':\n                return number + (withoutSuffix ? ' сар' : ' сарын');\n            case 'y':\n            case 'yy':\n                return number + (withoutSuffix ? ' жил' : ' жилийн');\n            default:\n                return number;\n        }\n    }\n\n    var mn = moment.defineLocale('mn', {\n        months: 'Нэгдүгээр сар_Хоёрдугаар сар_Гуравдугаар сар_Дөрөвдүгээр сар_Тавдугаар сар_Зургадугаар сар_Долдугаар сар_Наймдугаар сар_Есдүгээр сар_Аравдугаар сар_Арван нэгдүгээр сар_Арван хоёрдугаар сар'.split(\n            '_'\n        ),\n        monthsShort:\n            '1 сар_2 сар_3 сар_4 сар_5 сар_6 сар_7 сар_8 сар_9 сар_10 сар_11 сар_12 сар'.split(\n                '_'\n            ),\n        monthsParseExact: true,\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: 'YYYY-MM-DD',\n            LL: 'YYYY оны MMMMын D',\n            LLL: 'YYYY оны MMMMын D HH:mm',\n            LLLL: 'dddd, YYYY оны MMMMын D HH:mm',\n        },\n        meridiemParse: /ҮӨ|ҮХ/i,\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: translate,\n            ss: translate,\n            m: translate,\n            mm: translate,\n            h: translate,\n            hh: translate,\n            d: translate,\n            dd: translate,\n            M: translate,\n            MM: translate,\n            y: translate,\n            yy: translate,\n        },\n        dayOfMonthOrdinalParse: /\\d{1,2} өдөр/,\n        ordinal: function (number, period) {\n            switch (period) {\n                case 'd':\n                case 'D':\n                case 'DDD':\n                    return number + ' өдөр';\n                default:\n                    return number;\n            }\n        },\n    });\n\n    return mn;\n\n})));\n","//! moment.js locale configuration\n//! locale : Marathi [mr]\n//! author : Harshad Kale : https://github.com/kalehv\n//! author : Vivek Athalye : https://github.com/vnathalye\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\n    function relativeTimeMr(number, withoutSuffix, string, isFuture) {\n        var output = '';\n        if (withoutSuffix) {\n            switch (string) {\n                case 's':\n                    output = 'काही सेकंद';\n                    break;\n                case 'ss':\n                    output = '%d सेकंद';\n                    break;\n                case 'm':\n                    output = 'एक मिनिट';\n                    break;\n                case 'mm':\n                    output = '%d मिनिटे';\n                    break;\n                case 'h':\n                    output = 'एक तास';\n                    break;\n                case 'hh':\n                    output = '%d तास';\n                    break;\n                case 'd':\n                    output = 'एक दिवस';\n                    break;\n                case 'dd':\n                    output = '%d दिवस';\n                    break;\n                case 'M':\n                    output = 'एक महिना';\n                    break;\n                case 'MM':\n                    output = '%d महिने';\n                    break;\n                case 'y':\n                    output = 'एक वर्ष';\n                    break;\n                case 'yy':\n                    output = '%d वर्षे';\n                    break;\n            }\n        } else {\n            switch (string) {\n                case 's':\n                    output = 'काही सेकंदां';\n                    break;\n                case 'ss':\n                    output = '%d सेकंदां';\n                    break;\n                case 'm':\n                    output = 'एका मिनिटा';\n                    break;\n                case 'mm':\n                    output = '%d मिनिटां';\n                    break;\n                case 'h':\n                    output = 'एका तासा';\n                    break;\n                case 'hh':\n                    output = '%d तासां';\n                    break;\n                case 'd':\n                    output = 'एका दिवसा';\n                    break;\n                case 'dd':\n                    output = '%d दिवसां';\n                    break;\n                case 'M':\n                    output = 'एका महिन्या';\n                    break;\n                case 'MM':\n                    output = '%d महिन्यां';\n                    break;\n                case 'y':\n                    output = 'एका वर्षा';\n                    break;\n                case 'yy':\n                    output = '%d वर्षां';\n                    break;\n            }\n        }\n        return output.replace(/%d/i, number);\n    }\n\n    var mr = moment.defineLocale('mr', {\n        months: 'जानेवारी_फेब्रुवारी_मार्च_एप्रिल_मे_जून_जुलै_ऑगस्ट_सप्टेंबर_ऑक्टोबर_नोव्हेंबर_डिसेंबर'.split(\n            '_'\n        ),\n        monthsShort:\n            'जाने._फेब्रु._मार्च._एप्रि._मे._जून._जुलै._ऑग._सप्टें._ऑक्टो._नोव्हें._डिसें.'.split(\n                '_'\n            ),\n        monthsParseExact: true,\n        weekdays: 'रविवार_सोमवार_मंगळवार_बुधवार_गुरूवार_शुक्रवार_शनिवार'.split('_'),\n        weekdaysShort: 'रवि_सोम_मंगळ_बुध_गुरू_शुक्र_शनि'.split('_'),\n        weekdaysMin: 'र_सो_मं_बु_गु_शु_श'.split('_'),\n        longDateFormat: {\n            LT: 'A h:mm वाजता',\n            LTS: 'A h:mm:ss वाजता',\n            L: 'DD/MM/YYYY',\n            LL: 'D MMMM YYYY',\n            LLL: 'D MMMM YYYY, A h:mm वाजता',\n            LLLL: 'dddd, D MMMM YYYY, A h:mm वाजता',\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: relativeTimeMr,\n            ss: relativeTimeMr,\n            m: relativeTimeMr,\n            mm: relativeTimeMr,\n            h: relativeTimeMr,\n            hh: relativeTimeMr,\n            d: relativeTimeMr,\n            dd: relativeTimeMr,\n            M: relativeTimeMr,\n            MM: relativeTimeMr,\n            y: relativeTimeMr,\n            yy: relativeTimeMr,\n        },\n        preparse: function (string) {\n            return string.replace(/[१२३४५६७८९०]/g, function (match) {\n                return numberMap[match];\n            });\n        },\n        postformat: function (string) {\n            return string.replace(/\\d/g, function (match) {\n                return symbolMap[match];\n            });\n        },\n        meridiemParse: /पहाटे|सकाळी|दुपारी|सायंकाळी|रात्री/,\n        meridiemHour: function (hour, meridiem) {\n            if (hour === 12) {\n                hour = 0;\n            }\n            if (meridiem === 'पहाटे' || meridiem === 'सकाळी') {\n                return hour;\n            } else if (\n                meridiem === 'दुपारी' ||\n                meridiem === 'सायंकाळी' ||\n                meridiem === 'रात्री'\n            ) {\n                return hour >= 12 ? hour : hour + 12;\n            }\n        },\n        meridiem: function (hour, minute, isLower) {\n            if (hour >= 0 && hour < 6) {\n                return 'पहाटे';\n            } else if (hour < 12) {\n                return 'सकाळी';\n            } else if (hour < 17) {\n                return 'दुपारी';\n            } else if (hour < 20) {\n                return 'सायंकाळी';\n            } else {\n                return 'रात्री';\n            }\n        },\n        week: {\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\n    return mr;\n\n})));\n","//! moment.js locale configuration\n//! locale : Malay [ms-my]\n//! note : DEPRECATED, the correct one is [ms]\n//! author : Weldan Jamili : https://github.com/weldan\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 msMy = moment.defineLocale('ms-my', {\n        months: 'Januari_Februari_Mac_April_Mei_Jun_Julai_Ogos_September_Oktober_November_Disember'.split(\n            '_'\n        ),\n        monthsShort: 'Jan_Feb_Mac_Apr_Mei_Jun_Jul_Ogs_Sep_Okt_Nov_Dis'.split('_'),\n        weekdays: 'Ahad_Isnin_Selasa_Rabu_Khamis_Jumaat_Sabtu'.split('_'),\n        weekdaysShort: 'Ahd_Isn_Sel_Rab_Kha_Jum_Sab'.split('_'),\n        weekdaysMin: 'Ah_Is_Sl_Rb_Km_Jm_Sb'.split('_'),\n        longDateFormat: {\n            LT: 'HH.mm',\n            LTS: 'HH.mm.ss',\n            L: 'DD/MM/YYYY',\n            LL: 'D MMMM YYYY',\n            LLL: 'D MMMM YYYY [pukul] HH.mm',\n            LLLL: 'dddd, D MMMM YYYY [pukul] HH.mm',\n        },\n        meridiemParse: /pagi|tengahari|petang|malam/,\n        meridiemHour: function (hour, meridiem) {\n            if (hour === 12) {\n                hour = 0;\n            }\n            if (meridiem === 'pagi') {\n                return hour;\n            } else if (meridiem === 'tengahari') {\n                return hour >= 11 ? hour : hour + 12;\n            } else if (meridiem === 'petang' || meridiem === 'malam') {\n                return hour + 12;\n            }\n        },\n        meridiem: function (hours, minutes, isLower) {\n            if (hours < 11) {\n                return 'pagi';\n            } else if (hours < 15) {\n                return 'tengahari';\n            } else if (hours < 19) {\n                return 'petang';\n            } else {\n                return 'malam';\n            }\n        },\n        calendar: {\n            sameDay: '[Hari ini pukul] LT',\n            nextDay: '[Esok pukul] LT',\n            nextWeek: 'dddd [pukul] LT',\n            lastDay: '[Kelmarin pukul] LT',\n            lastWeek: 'dddd [lepas pukul] LT',\n            sameElse: 'L',\n        },\n        relativeTime: {\n            future: 'dalam %s',\n            past: '%s yang lepas',\n            s: 'beberapa saat',\n            ss: '%d saat',\n            m: 'seminit',\n            mm: '%d minit',\n            h: 'sejam',\n            hh: '%d jam',\n            d: 'sehari',\n            dd: '%d hari',\n            M: 'sebulan',\n            MM: '%d bulan',\n            y: 'setahun',\n            yy: '%d tahun',\n        },\n        week: {\n            dow: 1, // Monday is the first day of the week.\n            doy: 7, // The week that contains Jan 7th is the first week of the year.\n        },\n    });\n\n    return msMy;\n\n})));\n","//! moment.js locale configuration\n//! locale : Malay [ms]\n//! author : Weldan Jamili : https://github.com/weldan\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 ms = moment.defineLocale('ms', {\n        months: 'Januari_Februari_Mac_April_Mei_Jun_Julai_Ogos_September_Oktober_November_Disember'.split(\n            '_'\n        ),\n        monthsShort: 'Jan_Feb_Mac_Apr_Mei_Jun_Jul_Ogs_Sep_Okt_Nov_Dis'.split('_'),\n        weekdays: 'Ahad_Isnin_Selasa_Rabu_Khamis_Jumaat_Sabtu'.split('_'),\n        weekdaysShort: 'Ahd_Isn_Sel_Rab_Kha_Jum_Sab'.split('_'),\n        weekdaysMin: 'Ah_Is_Sl_Rb_Km_Jm_Sb'.split('_'),\n        longDateFormat: {\n            LT: 'HH.mm',\n            LTS: 'HH.mm.ss',\n            L: 'DD/MM/YYYY',\n            LL: 'D MMMM YYYY',\n            LLL: 'D MMMM YYYY [pukul] HH.mm',\n            LLLL: 'dddd, D MMMM YYYY [pukul] HH.mm',\n        },\n        meridiemParse: /pagi|tengahari|petang|malam/,\n        meridiemHour: function (hour, meridiem) {\n            if (hour === 12) {\n                hour = 0;\n            }\n            if (meridiem === 'pagi') {\n                return hour;\n            } else if (meridiem === 'tengahari') {\n                return hour >= 11 ? hour : hour + 12;\n            } else if (meridiem === 'petang' || meridiem === 'malam') {\n                return hour + 12;\n            }\n        },\n        meridiem: function (hours, minutes, isLower) {\n            if (hours < 11) {\n                return 'pagi';\n            } else if (hours < 15) {\n                return 'tengahari';\n            } else if (hours < 19) {\n                return 'petang';\n            } else {\n                return 'malam';\n            }\n        },\n        calendar: {\n            sameDay: '[Hari ini pukul] LT',\n            nextDay: '[Esok pukul] LT',\n            nextWeek: 'dddd [pukul] LT',\n            lastDay: '[Kelmarin pukul] LT',\n            lastWeek: 'dddd [lepas pukul] LT',\n            sameElse: 'L',\n        },\n        relativeTime: {\n            future: 'dalam %s',\n            past: '%s yang lepas',\n            s: 'beberapa saat',\n            ss: '%d saat',\n            m: 'seminit',\n            mm: '%d minit',\n            h: 'sejam',\n            hh: '%d jam',\n            d: 'sehari',\n            dd: '%d hari',\n            M: 'sebulan',\n            MM: '%d bulan',\n            y: 'setahun',\n            yy: '%d tahun',\n        },\n        week: {\n            dow: 1, // Monday is the first day of the week.\n            doy: 7, // The week that contains Jan 7th is the first week of the year.\n        },\n    });\n\n    return ms;\n\n})));\n","//! moment.js locale configuration\n//! locale : Maltese (Malta) [mt]\n//! author : Alessandro Maruccia : https://github.com/alesma\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 mt = moment.defineLocale('mt', {\n        months: 'Jannar_Frar_Marzu_April_Mejju_Ġunju_Lulju_Awwissu_Settembru_Ottubru_Novembru_Diċembru'.split(\n            '_'\n        ),\n        monthsShort: 'Jan_Fra_Mar_Apr_Mej_Ġun_Lul_Aww_Set_Ott_Nov_Diċ'.split('_'),\n        weekdays:\n            'Il-Ħadd_It-Tnejn_It-Tlieta_L-Erbgħa_Il-Ħamis_Il-Ġimgħa_Is-Sibt'.split(\n                '_'\n            ),\n        weekdaysShort: 'Ħad_Tne_Tli_Erb_Ħam_Ġim_Sib'.split('_'),\n        weekdaysMin: 'Ħa_Tn_Tl_Er_Ħa_Ġi_Si'.split('_'),\n        longDateFormat: {\n            LT: 'HH:mm',\n            LTS: 'HH:mm:ss',\n            L: 'DD/MM/YYYY',\n            LL: 'D MMMM YYYY',\n            LLL: 'D MMMM YYYY HH:mm',\n            LLLL: 'dddd, D MMMM YYYY HH:mm',\n        },\n        calendar: {\n            sameDay: '[Illum fil-]LT',\n            nextDay: '[Għada fil-]LT',\n            nextWeek: 'dddd [fil-]LT',\n            lastDay: '[Il-bieraħ fil-]LT',\n            lastWeek: 'dddd [li għadda] [fil-]LT',\n            sameElse: 'L',\n        },\n        relativeTime: {\n            future: 'f’ %s',\n            past: '%s ilu',\n            s: 'ftit sekondi',\n            ss: '%d sekondi',\n            m: 'minuta',\n            mm: '%d minuti',\n            h: 'siegħa',\n            hh: '%d siegħat',\n            d: 'ġurnata',\n            dd: '%d ġranet',\n            M: 'xahar',\n            MM: '%d xhur',\n            y: 'sena',\n            yy: '%d sni',\n        },\n        dayOfMonthOrdinalParse: /\\d{1,2}º/,\n        ordinal: '%dº',\n        week: {\n            dow: 1, // Monday is the first day of the week.\n            doy: 4, // The week that contains Jan 4th is the first week of the year.\n        },\n    });\n\n    return mt;\n\n})));\n","//! moment.js locale configuration\n//! locale : Burmese [my]\n//! author : Squar team, mysquar.com\n//! author : David Rossellat : https://github.com/gholadr\n//! author : Tin Aung Lin : https://github.com/thanyawzinmin\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\n    var my = moment.defineLocale('my', {\n        months: 'ဇန်နဝါရီ_ဖေဖော်ဝါရီ_မတ်_ဧပြီ_မေ_ဇွန်_ဇူလိုင်_သြဂုတ်_စက်တင်ဘာ_အောက်တိုဘာ_နိုဝင်ဘာ_ဒီဇင်ဘာ'.split(\n            '_'\n        ),\n        monthsShort: 'ဇန်_ဖေ_မတ်_ပြီ_မေ_ဇွန်_လိုင်_သြ_စက်_အောက်_နို_ဒီ'.split('_'),\n        weekdays: 'တနင်္ဂနွေ_တနင်္လာ_အင်္ဂါ_ဗုဒ္ဓဟူး_ကြာသပတေး_သောကြာ_စနေ'.split(\n            '_'\n        ),\n        weekdaysShort: 'နွေ_လာ_ဂါ_ဟူး_ကြာ_သော_နေ'.split('_'),\n        weekdaysMin: 'နွေ_လာ_ဂါ_ဟူး_ကြာ_သော_နေ'.split('_'),\n\n        longDateFormat: {\n            LT: 'HH:mm',\n            LTS: 'HH:mm:ss',\n            L: 'DD/MM/YYYY',\n            LL: 'D MMMM YYYY',\n            LLL: 'D MMMM YYYY HH:mm',\n            LLLL: 'dddd D MMMM YYYY HH:mm',\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: 'စက္ကန်.အနည်းငယ်',\n            ss: '%d စက္ကန့်',\n            m: 'တစ်မိနစ်',\n            mm: '%d မိနစ်',\n            h: 'တစ်နာရီ',\n            hh: '%d နာရီ',\n            d: 'တစ်ရက်',\n            dd: '%d ရက်',\n            M: 'တစ်လ',\n            MM: '%d လ',\n            y: 'တစ်နှစ်',\n            yy: '%d နှစ်',\n        },\n        preparse: function (string) {\n            return string.replace(/[၁၂၃၄၅၆၇၈၉၀]/g, function (match) {\n                return numberMap[match];\n            });\n        },\n        postformat: function (string) {\n            return string.replace(/\\d/g, function (match) {\n                return symbolMap[match];\n            });\n        },\n        week: {\n            dow: 1, // Monday is the first day of the week.\n            doy: 4, // The week that contains Jan 4th is the first week of the year.\n        },\n    });\n\n    return my;\n\n})));\n","//! moment.js locale configuration\n//! locale : Norwegian Bokmål [nb]\n//! authors : Espen Hovlandsdal : https://github.com/rexxars\n//!           Sigurd Gartmann : https://github.com/sigurdga\n//!           Stephen Ramthun : https://github.com/stephenramthun\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 nb = moment.defineLocale('nb', {\n        months: 'januar_februar_mars_april_mai_juni_juli_august_september_oktober_november_desember'.split(\n            '_'\n        ),\n        monthsShort:\n            'jan._feb._mars_apr._mai_juni_juli_aug._sep._okt._nov._des.'.split('_'),\n        monthsParseExact: true,\n        weekdays: 'søndag_mandag_tirsdag_onsdag_torsdag_fredag_lørdag'.split('_'),\n        weekdaysShort: 'sø._ma._ti._on._to._fr._lø.'.split('_'),\n        weekdaysMin: 'sø_ma_ti_on_to_fr_lø'.split('_'),\n        weekdaysParseExact: true,\n        longDateFormat: {\n            LT: 'HH:mm',\n            LTS: 'HH:mm:ss',\n            L: 'DD.MM.YYYY',\n            LL: 'D. MMMM YYYY',\n            LLL: 'D. MMMM YYYY [kl.] HH:mm',\n            LLLL: 'dddd D. MMMM YYYY [kl.] HH:mm',\n        },\n        calendar: {\n            sameDay: '[i dag kl.] LT',\n            nextDay: '[i morgen kl.] LT',\n            nextWeek: 'dddd [kl.] LT',\n            lastDay: '[i går kl.] LT',\n            lastWeek: '[forrige] dddd [kl.] LT',\n            sameElse: 'L',\n        },\n        relativeTime: {\n            future: 'om %s',\n            past: '%s siden',\n            s: 'noen sekunder',\n            ss: '%d sekunder',\n            m: 'ett minutt',\n            mm: '%d minutter',\n            h: 'én time',\n            hh: '%d timer',\n            d: 'én dag',\n            dd: '%d dager',\n            w: 'én uke',\n            ww: '%d uker',\n            M: 'én måned',\n            MM: '%d måneder',\n            y: 'ett år',\n            yy: '%d år',\n        },\n        dayOfMonthOrdinalParse: /\\d{1,2}\\./,\n        ordinal: '%d.',\n        week: {\n            dow: 1, // Monday is the first day of the week.\n            doy: 4, // The week that contains Jan 4th is the first week of the year.\n        },\n    });\n\n    return nb;\n\n})));\n","//! moment.js locale configuration\n//! locale : Nepalese [ne]\n//! author : suvash : https://github.com/suvash\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\n    var ne = moment.defineLocale('ne', {\n        months: 'जनवरी_फेब्रुवरी_मार्च_अप्रिल_मई_जुन_जुलाई_अगष्ट_सेप्टेम्बर_अक्टोबर_नोभेम्बर_डिसेम्बर'.split(\n            '_'\n        ),\n        monthsShort:\n            'जन._फेब्रु._मार्च_अप्रि._मई_जुन_जुलाई._अग._सेप्ट._अक्टो._नोभे._डिसे.'.split(\n                '_'\n            ),\n        monthsParseExact: true,\n        weekdays: 'आइतबार_सोमबार_मङ्गलबार_बुधबार_बिहिबार_शुक्रबार_शनिबार'.split(\n            '_'\n        ),\n        weekdaysShort: 'आइत._सोम._मङ्गल._बुध._बिहि._शुक्र._शनि.'.split('_'),\n        weekdaysMin: 'आ._सो._मं._बु._बि._शु._श.'.split('_'),\n        weekdaysParseExact: true,\n        longDateFormat: {\n            LT: 'Aको h:mm बजे',\n            LTS: 'Aको h:mm:ss बजे',\n            L: 'DD/MM/YYYY',\n            LL: 'D MMMM YYYY',\n            LLL: 'D MMMM YYYY, Aको h:mm बजे',\n            LLLL: 'dddd, D MMMM YYYY, Aको h:mm बजे',\n        },\n        preparse: function (string) {\n            return string.replace(/[१२३४५६७८९०]/g, function (match) {\n                return numberMap[match];\n            });\n        },\n        postformat: function (string) {\n            return string.replace(/\\d/g, function (match) {\n                return symbolMap[match];\n            });\n        },\n        meridiemParse: /राति|बिहान|दिउँसो|साँझ/,\n        meridiemHour: function (hour, meridiem) {\n            if (hour === 12) {\n                hour = 0;\n            }\n            if (meridiem === 'राति') {\n                return hour < 4 ? hour : hour + 12;\n            } else if (meridiem === 'बिहान') {\n                return hour;\n            } else if (meridiem === 'दिउँसो') {\n                return hour >= 10 ? hour : hour + 12;\n            } else if (meridiem === 'साँझ') {\n                return hour + 12;\n            }\n        },\n        meridiem: function (hour, minute, isLower) {\n            if (hour < 3) {\n                return 'राति';\n            } else if (hour < 12) {\n                return 'बिहान';\n            } else if (hour < 16) {\n                return 'दिउँसो';\n            } else if (hour < 20) {\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: 'केही क्षण',\n            ss: '%d सेकेण्ड',\n            m: 'एक मिनेट',\n            mm: '%d मिनेट',\n            h: 'एक घण्टा',\n            hh: '%d घण्टा',\n            d: 'एक दिन',\n            dd: '%d दिन',\n            M: 'एक महिना',\n            MM: '%d महिना',\n            y: 'एक बर्ष',\n            yy: '%d बर्ष',\n        },\n        week: {\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\n    return ne;\n\n})));\n","//! moment.js locale configuration\n//! locale : Dutch (Belgium) [nl-be]\n//! author : Joris Röling : https://github.com/jorisroling\n//! author : Jacob Middag : https://github.com/middagj\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 monthsShortWithDots =\n            'jan._feb._mrt._apr._mei_jun._jul._aug._sep._okt._nov._dec.'.split('_'),\n        monthsShortWithoutDots =\n            'jan_feb_mrt_apr_mei_jun_jul_aug_sep_okt_nov_dec'.split('_'),\n        monthsParse = [\n            /^jan/i,\n            /^feb/i,\n            /^(maart|mrt\\.?)$/i,\n            /^apr/i,\n            /^mei$/i,\n            /^jun[i.]?$/i,\n            /^jul[i.]?$/i,\n            /^aug/i,\n            /^sep/i,\n            /^okt/i,\n            /^nov/i,\n            /^dec/i,\n        ],\n        monthsRegex =\n            /^(januari|februari|maart|april|mei|ju[nl]i|augustus|september|oktober|november|december|jan\\.?|feb\\.?|mrt\\.?|apr\\.?|ju[nl]\\.?|aug\\.?|sep\\.?|okt\\.?|nov\\.?|dec\\.?)/i;\n\n    var nlBe = moment.defineLocale('nl-be', {\n        months: 'januari_februari_maart_april_mei_juni_juli_augustus_september_oktober_november_december'.split(\n            '_'\n        ),\n        monthsShort: function (m, format) {\n            if (!m) {\n                return monthsShortWithDots;\n            } else if (/-MMM-/.test(format)) {\n                return monthsShortWithoutDots[m.month()];\n            } else {\n                return monthsShortWithDots[m.month()];\n            }\n        },\n\n        monthsRegex: monthsRegex,\n        monthsShortRegex: monthsRegex,\n        monthsStrictRegex:\n            /^(januari|februari|maart|april|mei|ju[nl]i|augustus|september|oktober|november|december)/i,\n        monthsShortStrictRegex:\n            /^(jan\\.?|feb\\.?|mrt\\.?|apr\\.?|mei|ju[nl]\\.?|aug\\.?|sep\\.?|okt\\.?|nov\\.?|dec\\.?)/i,\n\n        monthsParse: monthsParse,\n        longMonthsParse: monthsParse,\n        shortMonthsParse: monthsParse,\n\n        weekdays:\n            'zondag_maandag_dinsdag_woensdag_donderdag_vrijdag_zaterdag'.split('_'),\n        weekdaysShort: 'zo._ma._di._wo._do._vr._za.'.split('_'),\n        weekdaysMin: 'zo_ma_di_wo_do_vr_za'.split('_'),\n        weekdaysParseExact: true,\n        longDateFormat: {\n            LT: 'HH:mm',\n            LTS: 'HH:mm:ss',\n            L: 'DD/MM/YYYY',\n            LL: 'D MMMM YYYY',\n            LLL: 'D MMMM YYYY HH:mm',\n            LLLL: 'dddd D MMMM YYYY HH:mm',\n        },\n        calendar: {\n            sameDay: '[vandaag om] LT',\n            nextDay: '[morgen om] LT',\n            nextWeek: 'dddd [om] LT',\n            lastDay: '[gisteren om] LT',\n            lastWeek: '[afgelopen] dddd [om] LT',\n            sameElse: 'L',\n        },\n        relativeTime: {\n            future: 'over %s',\n            past: '%s geleden',\n            s: 'een paar seconden',\n            ss: '%d seconden',\n            m: 'één minuut',\n            mm: '%d minuten',\n            h: 'één uur',\n            hh: '%d uur',\n            d: 'één dag',\n            dd: '%d dagen',\n            M: 'één maand',\n            MM: '%d maanden',\n            y: 'één jaar',\n            yy: '%d jaar',\n        },\n        dayOfMonthOrdinalParse: /\\d{1,2}(ste|de)/,\n        ordinal: function (number) {\n            return (\n                number +\n                (number === 1 || number === 8 || number >= 20 ? 'ste' : 'de')\n            );\n        },\n        week: {\n            dow: 1, // Monday is the first day of the week.\n            doy: 4, // The week that contains Jan 4th is the first week of the year.\n        },\n    });\n\n    return nlBe;\n\n})));\n","//! moment.js locale configuration\n//! locale : Dutch [nl]\n//! author : Joris Röling : https://github.com/jorisroling\n//! author : Jacob Middag : https://github.com/middagj\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 monthsShortWithDots =\n            'jan._feb._mrt._apr._mei_jun._jul._aug._sep._okt._nov._dec.'.split('_'),\n        monthsShortWithoutDots =\n            'jan_feb_mrt_apr_mei_jun_jul_aug_sep_okt_nov_dec'.split('_'),\n        monthsParse = [\n            /^jan/i,\n            /^feb/i,\n            /^(maart|mrt\\.?)$/i,\n            /^apr/i,\n            /^mei$/i,\n            /^jun[i.]?$/i,\n            /^jul[i.]?$/i,\n            /^aug/i,\n            /^sep/i,\n            /^okt/i,\n            /^nov/i,\n            /^dec/i,\n        ],\n        monthsRegex =\n            /^(januari|februari|maart|april|mei|ju[nl]i|augustus|september|oktober|november|december|jan\\.?|feb\\.?|mrt\\.?|apr\\.?|ju[nl]\\.?|aug\\.?|sep\\.?|okt\\.?|nov\\.?|dec\\.?)/i;\n\n    var nl = moment.defineLocale('nl', {\n        months: 'januari_februari_maart_april_mei_juni_juli_augustus_september_oktober_november_december'.split(\n            '_'\n        ),\n        monthsShort: function (m, format) {\n            if (!m) {\n                return monthsShortWithDots;\n            } else if (/-MMM-/.test(format)) {\n                return monthsShortWithoutDots[m.month()];\n            } else {\n                return monthsShortWithDots[m.month()];\n            }\n        },\n\n        monthsRegex: monthsRegex,\n        monthsShortRegex: monthsRegex,\n        monthsStrictRegex:\n            /^(januari|februari|maart|april|mei|ju[nl]i|augustus|september|oktober|november|december)/i,\n        monthsShortStrictRegex:\n            /^(jan\\.?|feb\\.?|mrt\\.?|apr\\.?|mei|ju[nl]\\.?|aug\\.?|sep\\.?|okt\\.?|nov\\.?|dec\\.?)/i,\n\n        monthsParse: monthsParse,\n        longMonthsParse: monthsParse,\n        shortMonthsParse: monthsParse,\n\n        weekdays:\n            'zondag_maandag_dinsdag_woensdag_donderdag_vrijdag_zaterdag'.split('_'),\n        weekdaysShort: 'zo._ma._di._wo._do._vr._za.'.split('_'),\n        weekdaysMin: 'zo_ma_di_wo_do_vr_za'.split('_'),\n        weekdaysParseExact: true,\n        longDateFormat: {\n            LT: 'HH:mm',\n            LTS: 'HH:mm:ss',\n            L: 'DD-MM-YYYY',\n            LL: 'D MMMM YYYY',\n            LLL: 'D MMMM YYYY HH:mm',\n            LLLL: 'dddd D MMMM YYYY HH:mm',\n        },\n        calendar: {\n            sameDay: '[vandaag om] LT',\n            nextDay: '[morgen om] LT',\n            nextWeek: 'dddd [om] LT',\n            lastDay: '[gisteren om] LT',\n            lastWeek: '[afgelopen] dddd [om] LT',\n            sameElse: 'L',\n        },\n        relativeTime: {\n            future: 'over %s',\n            past: '%s geleden',\n            s: 'een paar seconden',\n            ss: '%d seconden',\n            m: 'één minuut',\n            mm: '%d minuten',\n            h: 'één uur',\n            hh: '%d uur',\n            d: 'één dag',\n            dd: '%d dagen',\n            w: 'één week',\n            ww: '%d weken',\n            M: 'één maand',\n            MM: '%d maanden',\n            y: 'één jaar',\n            yy: '%d jaar',\n        },\n        dayOfMonthOrdinalParse: /\\d{1,2}(ste|de)/,\n        ordinal: function (number) {\n            return (\n                number +\n                (number === 1 || number === 8 || number >= 20 ? 'ste' : 'de')\n            );\n        },\n        week: {\n            dow: 1, // Monday is the first day of the week.\n            doy: 4, // The week that contains Jan 4th is the first week of the year.\n        },\n    });\n\n    return nl;\n\n})));\n","//! moment.js locale configuration\n//! locale : Nynorsk [nn]\n//! authors : https://github.com/mechuwind\n//!           Stephen Ramthun : https://github.com/stephenramthun\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 nn = moment.defineLocale('nn', {\n        months: 'januar_februar_mars_april_mai_juni_juli_august_september_oktober_november_desember'.split(\n            '_'\n        ),\n        monthsShort:\n            'jan._feb._mars_apr._mai_juni_juli_aug._sep._okt._nov._des.'.split('_'),\n        monthsParseExact: true,\n        weekdays: 'sundag_måndag_tysdag_onsdag_torsdag_fredag_laurdag'.split('_'),\n        weekdaysShort: 'su._må._ty._on._to._fr._lau.'.split('_'),\n        weekdaysMin: 'su_må_ty_on_to_fr_la'.split('_'),\n        weekdaysParseExact: true,\n        longDateFormat: {\n            LT: 'HH:mm',\n            LTS: 'HH:mm:ss',\n            L: 'DD.MM.YYYY',\n            LL: 'D. MMMM YYYY',\n            LLL: 'D. MMMM YYYY [kl.] H:mm',\n            LLLL: 'dddd D. MMMM YYYY [kl.] HH:mm',\n        },\n        calendar: {\n            sameDay: '[I dag klokka] LT',\n            nextDay: '[I morgon klokka] LT',\n            nextWeek: 'dddd [klokka] LT',\n            lastDay: '[I går klokka] LT',\n            lastWeek: '[Føregåande] dddd [klokka] LT',\n            sameElse: 'L',\n        },\n        relativeTime: {\n            future: 'om %s',\n            past: '%s sidan',\n            s: 'nokre sekund',\n            ss: '%d sekund',\n            m: 'eit minutt',\n            mm: '%d minutt',\n            h: 'ein time',\n            hh: '%d timar',\n            d: 'ein dag',\n            dd: '%d dagar',\n            w: 'ei veke',\n            ww: '%d veker',\n            M: 'ein månad',\n            MM: '%d månader',\n            y: 'eit år',\n            yy: '%d år',\n        },\n        dayOfMonthOrdinalParse: /\\d{1,2}\\./,\n        ordinal: '%d.',\n        week: {\n            dow: 1, // Monday is the first day of the week.\n            doy: 4, // The week that contains Jan 4th is the first week of the year.\n        },\n    });\n\n    return nn;\n\n})));\n","//! moment.js locale configuration\n//! locale : Occitan, lengadocian dialecte [oc-lnc]\n//! author : Quentin PAGÈS : https://github.com/Quenty31\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 ocLnc = moment.defineLocale('oc-lnc', {\n        months: {\n            standalone:\n                'genièr_febrièr_març_abril_mai_junh_julhet_agost_setembre_octòbre_novembre_decembre'.split(\n                    '_'\n                ),\n            format: \"de genièr_de febrièr_de març_d'abril_de mai_de junh_de julhet_d'agost_de setembre_d'octòbre_de novembre_de decembre\".split(\n                '_'\n            ),\n            isFormat: /D[oD]?(\\s)+MMMM/,\n        },\n        monthsShort:\n            'gen._febr._març_abr._mai_junh_julh._ago._set._oct._nov._dec.'.split(\n                '_'\n            ),\n        monthsParseExact: true,\n        weekdays: 'dimenge_diluns_dimars_dimècres_dijòus_divendres_dissabte'.split(\n            '_'\n        ),\n        weekdaysShort: 'dg._dl._dm._dc._dj._dv._ds.'.split('_'),\n        weekdaysMin: 'dg_dl_dm_dc_dj_dv_ds'.split('_'),\n        weekdaysParseExact: true,\n        longDateFormat: {\n            LT: 'H:mm',\n            LTS: 'H:mm:ss',\n            L: 'DD/MM/YYYY',\n            LL: 'D MMMM [de] YYYY',\n            ll: 'D MMM YYYY',\n            LLL: 'D MMMM [de] YYYY [a] H:mm',\n            lll: 'D MMM YYYY, H:mm',\n            LLLL: 'dddd D MMMM [de] YYYY [a] H:mm',\n            llll: 'ddd D MMM YYYY, H:mm',\n        },\n        calendar: {\n            sameDay: '[uèi a] LT',\n            nextDay: '[deman a] LT',\n            nextWeek: 'dddd [a] LT',\n            lastDay: '[ièr a] LT',\n            lastWeek: 'dddd [passat a] LT',\n            sameElse: 'L',\n        },\n        relativeTime: {\n            future: \"d'aquí %s\",\n            past: 'fa %s',\n            s: 'unas segondas',\n            ss: '%d segondas',\n            m: 'una minuta',\n            mm: '%d minutas',\n            h: 'una ora',\n            hh: '%d oras',\n            d: 'un jorn',\n            dd: '%d jorns',\n            M: 'un mes',\n            MM: '%d meses',\n            y: 'un an',\n            yy: '%d ans',\n        },\n        dayOfMonthOrdinalParse: /\\d{1,2}(r|n|t|è|a)/,\n        ordinal: function (number, period) {\n            var output =\n                number === 1\n                    ? 'r'\n                    : number === 2\n                      ? 'n'\n                      : number === 3\n                        ? 'r'\n                        : number === 4\n                          ? 't'\n                          : 'è';\n            if (period === 'w' || period === 'W') {\n                output = 'a';\n            }\n            return number + output;\n        },\n        week: {\n            dow: 1, // Monday is the first day of the week.\n            doy: 4,\n        },\n    });\n\n    return ocLnc;\n\n})));\n","//! moment.js locale configuration\n//! locale : Punjabi (India) [pa-in]\n//! author : Harpreet Singh : https://github.com/harpreetkhalsagtbit\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\n    var paIn = moment.defineLocale('pa-in', {\n        // There are months name as per Nanakshahi Calendar but they are not used as rigidly in modern Punjabi.\n        months: 'ਜਨਵਰੀ_ਫ਼ਰਵਰੀ_ਮਾਰਚ_ਅਪ੍ਰੈਲ_ਮਈ_ਜੂਨ_ਜੁਲਾਈ_ਅਗਸਤ_ਸਤੰਬਰ_ਅਕਤੂਬਰ_ਨਵੰਬਰ_ਦਸੰਬਰ'.split(\n            '_'\n        ),\n        monthsShort:\n            'ਜਨਵਰੀ_ਫ਼ਰਵਰੀ_ਮਾਰਚ_ਅਪ੍ਰੈਲ_ਮਈ_ਜੂਨ_ਜੁਲਾਈ_ਅਗਸਤ_ਸਤੰਬਰ_ਅਕਤੂਬਰ_ਨਵੰਬਰ_ਦਸੰਬਰ'.split(\n                '_'\n            ),\n        weekdays: 'ਐਤਵਾਰ_ਸੋਮਵਾਰ_ਮੰਗਲਵਾਰ_ਬੁਧਵਾਰ_ਵੀਰਵਾਰ_ਸ਼ੁੱਕਰਵਾਰ_ਸ਼ਨੀਚਰਵਾਰ'.split(\n            '_'\n        ),\n        weekdaysShort: 'ਐਤ_ਸੋਮ_ਮੰਗਲ_ਬੁਧ_ਵੀਰ_ਸ਼ੁਕਰ_ਸ਼ਨੀ'.split('_'),\n        weekdaysMin: 'ਐਤ_ਸੋਮ_ਮੰਗਲ_ਬੁਧ_ਵੀਰ_ਸ਼ੁਕਰ_ਸ਼ਨੀ'.split('_'),\n        longDateFormat: {\n            LT: 'A h:mm ਵਜੇ',\n            LTS: 'A h:mm:ss ਵਜੇ',\n            L: 'DD/MM/YYYY',\n            LL: 'D MMMM YYYY',\n            LLL: 'D MMMM YYYY, A h:mm ਵਜੇ',\n            LLLL: 'dddd, D MMMM YYYY, A h:mm ਵਜੇ',\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: 'ਕੁਝ ਸਕਿੰਟ',\n            ss: '%d ਸਕਿੰਟ',\n            m: 'ਇਕ ਮਿੰਟ',\n            mm: '%d ਮਿੰਟ',\n            h: 'ਇੱਕ ਘੰਟਾ',\n            hh: '%d ਘੰਟੇ',\n            d: 'ਇੱਕ ਦਿਨ',\n            dd: '%d ਦਿਨ',\n            M: 'ਇੱਕ ਮਹੀਨਾ',\n            MM: '%d ਮਹੀਨੇ',\n            y: 'ਇੱਕ ਸਾਲ',\n            yy: '%d ਸਾਲ',\n        },\n        preparse: function (string) {\n            return string.replace(/[੧੨੩੪੫੬੭੮੯੦]/g, function (match) {\n                return numberMap[match];\n            });\n        },\n        postformat: function (string) {\n            return string.replace(/\\d/g, function (match) {\n                return symbolMap[match];\n            });\n        },\n        // Punjabi notation for meridiems are quite fuzzy in practice. While there exists\n        // a rigid notion of a 'Pahar' it is not used as rigidly in modern Punjabi.\n        meridiemParse: /ਰਾਤ|ਸਵੇਰ|ਦੁਪਹਿਰ|ਸ਼ਾਮ/,\n        meridiemHour: function (hour, meridiem) {\n            if (hour === 12) {\n                hour = 0;\n            }\n            if (meridiem === 'ਰਾਤ') {\n                return hour < 4 ? hour : hour + 12;\n            } else if (meridiem === 'ਸਵੇਰ') {\n                return hour;\n            } else if (meridiem === 'ਦੁਪਹਿਰ') {\n                return hour >= 10 ? hour : hour + 12;\n            } else if (meridiem === 'ਸ਼ਾਮ') {\n                return hour + 12;\n            }\n        },\n        meridiem: function (hour, minute, isLower) {\n            if (hour < 4) {\n                return 'ਰਾਤ';\n            } else if (hour < 10) {\n                return 'ਸਵੇਰ';\n            } else if (hour < 17) {\n                return 'ਦੁਪਹਿਰ';\n            } else if (hour < 20) {\n                return 'ਸ਼ਾਮ';\n            } else {\n                return 'ਰਾਤ';\n            }\n        },\n        week: {\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\n    return paIn;\n\n})));\n","//! moment.js locale configuration\n//! locale : Polish [pl]\n//! author : Rafal Hirsz : https://github.com/evoL\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 monthsNominative =\n            'styczeń_luty_marzec_kwiecień_maj_czerwiec_lipiec_sierpień_wrzesień_październik_listopad_grudzień'.split(\n                '_'\n            ),\n        monthsSubjective =\n            'stycznia_lutego_marca_kwietnia_maja_czerwca_lipca_sierpnia_września_października_listopada_grudnia'.split(\n                '_'\n            ),\n        monthsParse = [\n            /^sty/i,\n            /^lut/i,\n            /^mar/i,\n            /^kwi/i,\n            /^maj/i,\n            /^cze/i,\n            /^lip/i,\n            /^sie/i,\n            /^wrz/i,\n            /^paź/i,\n            /^lis/i,\n            /^gru/i,\n        ];\n    function plural(n) {\n        return n % 10 < 5 && n % 10 > 1 && ~~(n / 10) % 10 !== 1;\n    }\n    function translate(number, withoutSuffix, key) {\n        var result = number + ' ';\n        switch (key) {\n            case 'ss':\n                return result + (plural(number) ? 'sekundy' : 'sekund');\n            case 'm':\n                return withoutSuffix ? 'minuta' : 'minutę';\n            case 'mm':\n                return result + (plural(number) ? 'minuty' : 'minut');\n            case 'h':\n                return withoutSuffix ? 'godzina' : 'godzinę';\n            case 'hh':\n                return result + (plural(number) ? 'godziny' : 'godzin');\n            case 'ww':\n                return result + (plural(number) ? 'tygodnie' : 'tygodni');\n            case 'MM':\n                return result + (plural(number) ? 'miesiące' : 'miesięcy');\n            case 'yy':\n                return result + (plural(number) ? 'lata' : 'lat');\n        }\n    }\n\n    var pl = moment.defineLocale('pl', {\n        months: function (momentToFormat, format) {\n            if (!momentToFormat) {\n                return monthsNominative;\n            } else if (/D MMMM/.test(format)) {\n                return monthsSubjective[momentToFormat.month()];\n            } else {\n                return monthsNominative[momentToFormat.month()];\n            }\n        },\n        monthsShort: 'sty_lut_mar_kwi_maj_cze_lip_sie_wrz_paź_lis_gru'.split('_'),\n        monthsParse: monthsParse,\n        longMonthsParse: monthsParse,\n        shortMonthsParse: monthsParse,\n        weekdays:\n            'niedziela_poniedziałek_wtorek_środa_czwartek_piątek_sobota'.split('_'),\n        weekdaysShort: 'ndz_pon_wt_śr_czw_pt_sob'.split('_'),\n        weekdaysMin: 'Nd_Pn_Wt_Śr_Cz_Pt_So'.split('_'),\n        longDateFormat: {\n            LT: 'HH:mm',\n            LTS: 'HH:mm:ss',\n            L: 'DD.MM.YYYY',\n            LL: 'D MMMM YYYY',\n            LLL: 'D MMMM YYYY HH:mm',\n            LLLL: 'dddd, D MMMM YYYY HH:mm',\n        },\n        calendar: {\n            sameDay: '[Dziś o] LT',\n            nextDay: '[Jutro o] LT',\n            nextWeek: function () {\n                switch (this.day()) {\n                    case 0:\n                        return '[W niedzielę o] LT';\n\n                    case 2:\n                        return '[We wtorek o] LT';\n\n                    case 3:\n                        return '[W środę o] LT';\n\n                    case 6:\n                        return '[W sobotę o] LT';\n\n                    default:\n                        return '[W] dddd [o] LT';\n                }\n            },\n            lastDay: '[Wczoraj o] LT',\n            lastWeek: function () {\n                switch (this.day()) {\n                    case 0:\n                        return '[W zeszłą niedzielę o] LT';\n                    case 3:\n                        return '[W zeszłą środę o] LT';\n                    case 6:\n                        return '[W zeszłą sobotę o] LT';\n                    default:\n                        return '[W zeszły] dddd [o] LT';\n                }\n            },\n            sameElse: 'L',\n        },\n        relativeTime: {\n            future: 'za %s',\n            past: '%s temu',\n            s: 'kilka sekund',\n            ss: translate,\n            m: translate,\n            mm: translate,\n            h: translate,\n            hh: translate,\n            d: '1 dzień',\n            dd: '%d dni',\n            w: 'tydzień',\n            ww: translate,\n            M: 'miesiąc',\n            MM: translate,\n            y: 'rok',\n            yy: translate,\n        },\n        dayOfMonthOrdinalParse: /\\d{1,2}\\./,\n        ordinal: '%d.',\n        week: {\n            dow: 1, // Monday is the first day of the week.\n            doy: 4, // The week that contains Jan 4th is the first week of the year.\n        },\n    });\n\n    return pl;\n\n})));\n","//! moment.js locale configuration\n//! locale : Portuguese (Brazil) [pt-br]\n//! author : Caio Ribeiro Pereira : https://github.com/caio-ribeiro-pereira\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 ptBr = moment.defineLocale('pt-br', {\n        months: 'janeiro_fevereiro_março_abril_maio_junho_julho_agosto_setembro_outubro_novembro_dezembro'.split(\n            '_'\n        ),\n        monthsShort: 'jan_fev_mar_abr_mai_jun_jul_ago_set_out_nov_dez'.split('_'),\n        weekdays:\n            'domingo_segunda-feira_terça-feira_quarta-feira_quinta-feira_sexta-feira_sábado'.split(\n                '_'\n            ),\n        weekdaysShort: 'dom_seg_ter_qua_qui_sex_sáb'.split('_'),\n        weekdaysMin: 'do_2ª_3ª_4ª_5ª_6ª_sá'.split('_'),\n        weekdaysParseExact: true,\n        longDateFormat: {\n            LT: 'HH:mm',\n            LTS: 'HH:mm:ss',\n            L: 'DD/MM/YYYY',\n            LL: 'D [de] MMMM [de] YYYY',\n            LLL: 'D [de] MMMM [de] YYYY [às] HH:mm',\n            LLLL: 'dddd, D [de] MMMM [de] YYYY [às] HH:mm',\n        },\n        calendar: {\n            sameDay: '[Hoje às] LT',\n            nextDay: '[Amanhã às] LT',\n            nextWeek: 'dddd [às] LT',\n            lastDay: '[Ontem às] LT',\n            lastWeek: function () {\n                return this.day() === 0 || this.day() === 6\n                    ? '[Último] dddd [às] LT' // Saturday + Sunday\n                    : '[Última] dddd [às] LT'; // Monday - Friday\n            },\n            sameElse: 'L',\n        },\n        relativeTime: {\n            future: 'em %s',\n            past: 'há %s',\n            s: 'poucos segundos',\n            ss: '%d segundos',\n            m: 'um minuto',\n            mm: '%d minutos',\n            h: 'uma hora',\n            hh: '%d horas',\n            d: 'um dia',\n            dd: '%d dias',\n            M: 'um mês',\n            MM: '%d meses',\n            y: 'um ano',\n            yy: '%d anos',\n        },\n        dayOfMonthOrdinalParse: /\\d{1,2}º/,\n        ordinal: '%dº',\n        invalidDate: 'Data inválida',\n    });\n\n    return ptBr;\n\n})));\n","//! moment.js locale configuration\n//! locale : Portuguese [pt]\n//! author : Jefferson : https://github.com/jalex79\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 pt = moment.defineLocale('pt', {\n        months: 'janeiro_fevereiro_março_abril_maio_junho_julho_agosto_setembro_outubro_novembro_dezembro'.split(\n            '_'\n        ),\n        monthsShort: 'jan_fev_mar_abr_mai_jun_jul_ago_set_out_nov_dez'.split('_'),\n        weekdays:\n            'Domingo_Segunda-feira_Terça-feira_Quarta-feira_Quinta-feira_Sexta-feira_Sábado'.split(\n                '_'\n            ),\n        weekdaysShort: 'Dom_Seg_Ter_Qua_Qui_Sex_Sáb'.split('_'),\n        weekdaysMin: 'Do_2ª_3ª_4ª_5ª_6ª_Sá'.split('_'),\n        weekdaysParseExact: true,\n        longDateFormat: {\n            LT: 'HH:mm',\n            LTS: 'HH:mm:ss',\n            L: 'DD/MM/YYYY',\n            LL: 'D [de] MMMM [de] YYYY',\n            LLL: 'D [de] MMMM [de] YYYY HH:mm',\n            LLLL: 'dddd, D [de] MMMM [de] YYYY HH:mm',\n        },\n        calendar: {\n            sameDay: '[Hoje às] LT',\n            nextDay: '[Amanhã às] LT',\n            nextWeek: 'dddd [às] LT',\n            lastDay: '[Ontem às] LT',\n            lastWeek: function () {\n                return this.day() === 0 || this.day() === 6\n                    ? '[Último] dddd [às] LT' // Saturday + Sunday\n                    : '[Última] dddd [às] LT'; // Monday - Friday\n            },\n            sameElse: 'L',\n        },\n        relativeTime: {\n            future: 'em %s',\n            past: 'há %s',\n            s: 'segundos',\n            ss: '%d segundos',\n            m: 'um minuto',\n            mm: '%d minutos',\n            h: 'uma hora',\n            hh: '%d horas',\n            d: 'um dia',\n            dd: '%d dias',\n            w: 'uma semana',\n            ww: '%d semanas',\n            M: 'um mês',\n            MM: '%d meses',\n            y: 'um ano',\n            yy: '%d anos',\n        },\n        dayOfMonthOrdinalParse: /\\d{1,2}º/,\n        ordinal: '%dº',\n        week: {\n            dow: 1, // Monday is the first day of the week.\n            doy: 4, // The week that contains Jan 4th is the first week of the year.\n        },\n    });\n\n    return pt;\n\n})));\n","//! moment.js locale configuration\n//! locale : Romanian [ro]\n//! author : Vlad Gurdiga : https://github.com/gurdiga\n//! author : Valentin Agachi : https://github.com/avaly\n//! author : Emanuel Cepoi : https://github.com/cepem\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    function relativeTimeWithPlural(number, withoutSuffix, key) {\n        var format = {\n                ss: 'secunde',\n                mm: 'minute',\n                hh: 'ore',\n                dd: 'zile',\n                ww: 'săptămâni',\n                MM: 'luni',\n                yy: 'ani',\n            },\n            separator = ' ';\n        if (number % 100 >= 20 || (number >= 100 && number % 100 === 0)) {\n            separator = ' de ';\n        }\n        return number + separator + format[key];\n    }\n\n    var ro = moment.defineLocale('ro', {\n        months: 'ianuarie_februarie_martie_aprilie_mai_iunie_iulie_august_septembrie_octombrie_noiembrie_decembrie'.split(\n            '_'\n        ),\n        monthsShort:\n            'ian._feb._mart._apr._mai_iun._iul._aug._sept._oct._nov._dec.'.split(\n                '_'\n            ),\n        monthsParseExact: true,\n        weekdays: 'duminică_luni_marți_miercuri_joi_vineri_sâmbătă'.split('_'),\n        weekdaysShort: 'Dum_Lun_Mar_Mie_Joi_Vin_Sâm'.split('_'),\n        weekdaysMin: 'Du_Lu_Ma_Mi_Jo_Vi_Sâ'.split('_'),\n        longDateFormat: {\n            LT: 'H:mm',\n            LTS: 'H:mm:ss',\n            L: 'DD.MM.YYYY',\n            LL: 'D MMMM YYYY',\n            LLL: 'D MMMM YYYY H:mm',\n            LLLL: 'dddd, D MMMM YYYY H:mm',\n        },\n        calendar: {\n            sameDay: '[azi la] LT',\n            nextDay: '[mâine la] LT',\n            nextWeek: 'dddd [la] LT',\n            lastDay: '[ieri la] LT',\n            lastWeek: '[fosta] dddd [la] LT',\n            sameElse: 'L',\n        },\n        relativeTime: {\n            future: 'peste %s',\n            past: '%s în urmă',\n            s: 'câteva secunde',\n            ss: relativeTimeWithPlural,\n            m: 'un minut',\n            mm: relativeTimeWithPlural,\n            h: 'o oră',\n            hh: relativeTimeWithPlural,\n            d: 'o zi',\n            dd: relativeTimeWithPlural,\n            w: 'o săptămână',\n            ww: relativeTimeWithPlural,\n            M: 'o lună',\n            MM: relativeTimeWithPlural,\n            y: 'un an',\n            yy: relativeTimeWithPlural,\n        },\n        week: {\n            dow: 1, // Monday is the first day of the week.\n            doy: 7, // The week that contains Jan 7th is the first week of the year.\n        },\n    });\n\n    return ro;\n\n})));\n","//! moment.js locale configuration\n//! locale : Russian [ru]\n//! author : Viktorminator : https://github.com/Viktorminator\n//! author : Menelion Elensúle : https://github.com/Oire\n//! author : Коренберг Марк : https://github.com/socketpair\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    function plural(word, num) {\n        var forms = word.split('_');\n        return num % 10 === 1 && num % 100 !== 11\n            ? forms[0]\n            : num % 10 >= 2 && num % 10 <= 4 && (num % 100 < 10 || num % 100 >= 20)\n              ? forms[1]\n              : forms[2];\n    }\n    function relativeTimeWithPlural(number, withoutSuffix, key) {\n        var format = {\n            ss: withoutSuffix ? 'секунда_секунды_секунд' : 'секунду_секунды_секунд',\n            mm: withoutSuffix ? 'минута_минуты_минут' : 'минуту_минуты_минут',\n            hh: 'час_часа_часов',\n            dd: 'день_дня_дней',\n            ww: 'неделя_недели_недель',\n            MM: 'месяц_месяца_месяцев',\n            yy: 'год_года_лет',\n        };\n        if (key === 'm') {\n            return withoutSuffix ? 'минута' : 'минуту';\n        } else {\n            return number + ' ' + plural(format[key], +number);\n        }\n    }\n    var monthsParse = [\n        /^янв/i,\n        /^фев/i,\n        /^мар/i,\n        /^апр/i,\n        /^ма[йя]/i,\n        /^июн/i,\n        /^июл/i,\n        /^авг/i,\n        /^сен/i,\n        /^окт/i,\n        /^ноя/i,\n        /^дек/i,\n    ];\n\n    // http://new.gramota.ru/spravka/rules/139-prop : § 103\n    // Сокращения месяцев: http://new.gramota.ru/spravka/buro/search-answer?s=242637\n    // CLDR data:          http://www.unicode.org/cldr/charts/28/summary/ru.html#1753\n    var ru = moment.defineLocale('ru', {\n        months: {\n            format: 'января_февраля_марта_апреля_мая_июня_июля_августа_сентября_октября_ноября_декабря'.split(\n                '_'\n            ),\n            standalone:\n                'январь_февраль_март_апрель_май_июнь_июль_август_сентябрь_октябрь_ноябрь_декабрь'.split(\n                    '_'\n                ),\n        },\n        monthsShort: {\n            // по CLDR именно \"июл.\" и \"июн.\", но какой смысл менять букву на точку?\n            format: 'янв._февр._мар._апр._мая_июня_июля_авг._сент._окт._нояб._дек.'.split(\n                '_'\n            ),\n            standalone:\n                'янв._февр._март_апр._май_июнь_июль_авг._сент._окт._нояб._дек.'.split(\n                    '_'\n                ),\n        },\n        weekdays: {\n            standalone:\n                'воскресенье_понедельник_вторник_среда_четверг_пятница_суббота'.split(\n                    '_'\n                ),\n            format: 'воскресенье_понедельник_вторник_среду_четверг_пятницу_субботу'.split(\n                '_'\n            ),\n            isFormat: /\\[ ?[Вв] ?(?:прошлую|следующую|эту)? ?] ?dddd/,\n        },\n        weekdaysShort: 'вс_пн_вт_ср_чт_пт_сб'.split('_'),\n        weekdaysMin: 'вс_пн_вт_ср_чт_пт_сб'.split('_'),\n        monthsParse: monthsParse,\n        longMonthsParse: monthsParse,\n        shortMonthsParse: monthsParse,\n\n        // полные названия с падежами, по три буквы, для некоторых, по 4 буквы, сокращения с точкой и без точки\n        monthsRegex:\n            /^(январ[ья]|янв\\.?|феврал[ья]|февр?\\.?|марта?|мар\\.?|апрел[ья]|апр\\.?|ма[йя]|июн[ья]|июн\\.?|июл[ья]|июл\\.?|августа?|авг\\.?|сентябр[ья]|сент?\\.?|октябр[ья]|окт\\.?|ноябр[ья]|нояб?\\.?|декабр[ья]|дек\\.?)/i,\n\n        // копия предыдущего\n        monthsShortRegex:\n            /^(январ[ья]|янв\\.?|феврал[ья]|февр?\\.?|марта?|мар\\.?|апрел[ья]|апр\\.?|ма[йя]|июн[ья]|июн\\.?|июл[ья]|июл\\.?|августа?|авг\\.?|сентябр[ья]|сент?\\.?|октябр[ья]|окт\\.?|ноябр[ья]|нояб?\\.?|декабр[ья]|дек\\.?)/i,\n\n        // полные названия с падежами\n        monthsStrictRegex:\n            /^(январ[яь]|феврал[яь]|марта?|апрел[яь]|ма[яй]|июн[яь]|июл[яь]|августа?|сентябр[яь]|октябр[яь]|ноябр[яь]|декабр[яь])/i,\n\n        // Выражение, которое соответствует только сокращённым формам\n        monthsShortStrictRegex:\n            /^(янв\\.|февр?\\.|мар[т.]|апр\\.|ма[яй]|июн[ья.]|июл[ья.]|авг\\.|сент?\\.|окт\\.|нояб?\\.|дек\\.)/i,\n        longDateFormat: {\n            LT: 'H:mm',\n            LTS: 'H:mm:ss',\n            L: 'DD.MM.YYYY',\n            LL: 'D MMMM YYYY г.',\n            LLL: 'D MMMM YYYY г., H:mm',\n            LLLL: 'dddd, D MMMM YYYY г., H:mm',\n        },\n        calendar: {\n            sameDay: '[Сегодня, в] LT',\n            nextDay: '[Завтра, в] LT',\n            lastDay: '[Вчера, в] LT',\n            nextWeek: function (now) {\n                if (now.week() !== this.week()) {\n                    switch (this.day()) {\n                        case 0:\n                            return '[В следующее] dddd, [в] LT';\n                        case 1:\n                        case 2:\n                        case 4:\n                            return '[В следующий] dddd, [в] LT';\n                        case 3:\n                        case 5:\n                        case 6:\n                            return '[В следующую] dddd, [в] LT';\n                    }\n                } else {\n                    if (this.day() === 2) {\n                        return '[Во] dddd, [в] LT';\n                    } else {\n                        return '[В] dddd, [в] LT';\n                    }\n                }\n            },\n            lastWeek: function (now) {\n                if (now.week() !== this.week()) {\n                    switch (this.day()) {\n                        case 0:\n                            return '[В прошлое] dddd, [в] LT';\n                        case 1:\n                        case 2:\n                        case 4:\n                            return '[В прошлый] dddd, [в] LT';\n                        case 3:\n                        case 5:\n                        case 6:\n                            return '[В прошлую] dddd, [в] LT';\n                    }\n                } else {\n                    if (this.day() === 2) {\n                        return '[Во] dddd, [в] LT';\n                    } else {\n                        return '[В] dddd, [в] LT';\n                    }\n                }\n            },\n            sameElse: 'L',\n        },\n        relativeTime: {\n            future: 'через %s',\n            past: '%s назад',\n            s: 'несколько секунд',\n            ss: relativeTimeWithPlural,\n            m: relativeTimeWithPlural,\n            mm: relativeTimeWithPlural,\n            h: 'час',\n            hh: relativeTimeWithPlural,\n            d: 'день',\n            dd: relativeTimeWithPlural,\n            w: 'неделя',\n            ww: relativeTimeWithPlural,\n            M: 'месяц',\n            MM: relativeTimeWithPlural,\n            y: 'год',\n            yy: relativeTimeWithPlural,\n        },\n        meridiemParse: /ночи|утра|дня|вечера/i,\n        isPM: function (input) {\n            return /^(дня|вечера)$/.test(input);\n        },\n        meridiem: function (hour, minute, isLower) {\n            if (hour < 4) {\n                return 'ночи';\n            } else if (hour < 12) {\n                return 'утра';\n            } else if (hour < 17) {\n                return 'дня';\n            } else {\n                return 'вечера';\n            }\n        },\n        dayOfMonthOrdinalParse: /\\d{1,2}-(й|го|я)/,\n        ordinal: function (number, period) {\n            switch (period) {\n                case 'M':\n                case 'd':\n                case 'DDD':\n                    return number + '-й';\n                case 'D':\n                    return number + '-го';\n                case 'w':\n                case 'W':\n                    return number + '-я';\n                default:\n                    return number;\n            }\n        },\n        week: {\n            dow: 1, // Monday is the first day of the week.\n            doy: 4, // The week that contains Jan 4th is the first week of the year.\n        },\n    });\n\n    return ru;\n\n})));\n","//! moment.js locale configuration\n//! locale : Sindhi [sd]\n//! author : Narain Sagar : https://github.com/narainsagar\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 months = [\n            'جنوري',\n            'فيبروري',\n            'مارچ',\n            'اپريل',\n            'مئي',\n            'جون',\n            'جولاءِ',\n            'آگسٽ',\n            'سيپٽمبر',\n            'آڪٽوبر',\n            'نومبر',\n            'ڊسمبر',\n        ],\n        days = ['آچر', 'سومر', 'اڱارو', 'اربع', 'خميس', 'جمع', 'ڇنڇر'];\n\n    var sd = moment.defineLocale('sd', {\n        months: months,\n        monthsShort: months,\n        weekdays: days,\n        weekdaysShort: days,\n        weekdaysMin: days,\n        longDateFormat: {\n            LT: 'HH:mm',\n            LTS: 'HH:mm:ss',\n            L: 'DD/MM/YYYY',\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            }\n            return 'شام';\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: 'چند سيڪنڊ',\n            ss: '%d سيڪنڊ',\n            m: 'هڪ منٽ',\n            mm: '%d منٽ',\n            h: 'هڪ ڪلاڪ',\n            hh: '%d ڪلاڪ',\n            d: 'هڪ ڏينهن',\n            dd: '%d ڏينهن',\n            M: 'هڪ مهينو',\n            MM: '%d مهينا',\n            y: 'هڪ سال',\n            yy: '%d سال',\n        },\n        preparse: function (string) {\n            return string.replace(/،/g, ',');\n        },\n        postformat: function (string) {\n            return string.replace(/,/g, '،');\n        },\n        week: {\n            dow: 1, // Monday is the first day of the week.\n            doy: 4, // The week that contains Jan 4th is the first week of the year.\n        },\n    });\n\n    return sd;\n\n})));\n","//! moment.js locale configuration\n//! locale : Northern Sami [se]\n//! authors : Bård Rolstad Henriksen : https://github.com/karamell\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 se = moment.defineLocale('se', {\n        months: 'ođđajagemánnu_guovvamánnu_njukčamánnu_cuoŋománnu_miessemánnu_geassemánnu_suoidnemánnu_borgemánnu_čakčamánnu_golggotmánnu_skábmamánnu_juovlamánnu'.split(\n            '_'\n        ),\n        monthsShort:\n            'ođđj_guov_njuk_cuo_mies_geas_suoi_borg_čakč_golg_skáb_juov'.split('_'),\n        weekdays:\n            'sotnabeaivi_vuossárga_maŋŋebárga_gaskavahkku_duorastat_bearjadat_lávvardat'.split(\n                '_'\n            ),\n        weekdaysShort: 'sotn_vuos_maŋ_gask_duor_bear_láv'.split('_'),\n        weekdaysMin: 's_v_m_g_d_b_L'.split('_'),\n        longDateFormat: {\n            LT: 'HH:mm',\n            LTS: 'HH:mm:ss',\n            L: 'DD.MM.YYYY',\n            LL: 'MMMM D. [b.] YYYY',\n            LLL: 'MMMM D. [b.] YYYY [ti.] HH:mm',\n            LLLL: 'dddd, MMMM D. [b.] YYYY [ti.] HH:mm',\n        },\n        calendar: {\n            sameDay: '[otne ti] LT',\n            nextDay: '[ihttin ti] LT',\n            nextWeek: 'dddd [ti] LT',\n            lastDay: '[ikte ti] LT',\n            lastWeek: '[ovddit] dddd [ti] LT',\n            sameElse: 'L',\n        },\n        relativeTime: {\n            future: '%s geažes',\n            past: 'maŋit %s',\n            s: 'moadde sekunddat',\n            ss: '%d sekunddat',\n            m: 'okta minuhta',\n            mm: '%d minuhtat',\n            h: 'okta diimmu',\n            hh: '%d diimmut',\n            d: 'okta beaivi',\n            dd: '%d beaivvit',\n            M: 'okta mánnu',\n            MM: '%d mánut',\n            y: 'okta jahki',\n            yy: '%d jagit',\n        },\n        dayOfMonthOrdinalParse: /\\d{1,2}\\./,\n        ordinal: '%d.',\n        week: {\n            dow: 1, // Monday is the first day of the week.\n            doy: 4, // The week that contains Jan 4th is the first week of the year.\n        },\n    });\n\n    return se;\n\n})));\n","//! moment.js locale configuration\n//! locale : Sinhalese [si]\n//! author : Sampath Sitinamaluwa : https://github.com/sampathsris\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    /*jshint -W100*/\n    var si = moment.defineLocale('si', {\n        months: 'ජනවාරි_පෙබරවාරි_මාර්තු_අප්‍රේල්_මැයි_ජූනි_ජූලි_අගෝස්තු_සැප්තැම්බර්_ඔක්තෝබර්_නොවැම්බර්_දෙසැම්බර්'.split(\n            '_'\n        ),\n        monthsShort: 'ජන_පෙබ_මාර්_අප්_මැයි_ජූනි_ජූලි_අගෝ_සැප්_ඔක්_නොවැ_දෙසැ'.split(\n            '_'\n        ),\n        weekdays:\n            'ඉරිදා_සඳුදා_අඟහරුවාදා_බදාදා_බ්‍රහස්පතින්දා_සිකුරාදා_සෙනසුරාදා'.split(\n                '_'\n            ),\n        weekdaysShort: 'ඉරි_සඳු_අඟ_බදා_බ්‍රහ_සිකු_සෙන'.split('_'),\n        weekdaysMin: 'ඉ_ස_අ_බ_බ්‍ර_සි_සෙ'.split('_'),\n        weekdaysParseExact: true,\n        longDateFormat: {\n            LT: 'a h:mm',\n            LTS: 'a h:mm:ss',\n            L: 'YYYY/MM/DD',\n            LL: 'YYYY MMMM D',\n            LLL: 'YYYY MMMM D, a h:mm',\n            LLLL: 'YYYY MMMM D [වැනි] dddd, a h:mm:ss',\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: 'තත්පර කිහිපය',\n            ss: 'තත්පර %d',\n            m: 'මිනිත්තුව',\n            mm: 'මිනිත්තු %d',\n            h: 'පැය',\n            hh: 'පැය %d',\n            d: 'දිනය',\n            dd: 'දින %d',\n            M: 'මාසය',\n            MM: 'මාස %d',\n            y: 'වසර',\n            yy: 'වසර %d',\n        },\n        dayOfMonthOrdinalParse: /\\d{1,2} වැනි/,\n        ordinal: function (number) {\n            return number + ' වැනි';\n        },\n        meridiemParse: /පෙර වරු|පස් වරු|පෙ.ව|ප.ව./,\n        isPM: function (input) {\n            return input === 'ප.ව.' || input === 'පස් වරු';\n        },\n        meridiem: function (hours, minutes, isLower) {\n            if (hours > 11) {\n                return isLower ? 'ප.ව.' : 'පස් වරු';\n            } else {\n                return isLower ? 'පෙ.ව.' : 'පෙර වරු';\n            }\n        },\n    });\n\n    return si;\n\n})));\n","//! moment.js locale configuration\n//! locale : Slovak [sk]\n//! author : Martin Minka : https://github.com/k2s\n//! based on work of petrbela : https://github.com/petrbela\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 months =\n            'január_február_marec_apríl_máj_jún_júl_august_september_október_november_december'.split(\n                '_'\n            ),\n        monthsShort = 'jan_feb_mar_apr_máj_jún_júl_aug_sep_okt_nov_dec'.split('_');\n    function plural(n) {\n        return n > 1 && n < 5;\n    }\n    function translate(number, withoutSuffix, key, isFuture) {\n        var result = number + ' ';\n        switch (key) {\n            case 's': // a few seconds / in a few seconds / a few seconds ago\n                return withoutSuffix || isFuture ? 'pár sekúnd' : 'pár sekundami';\n            case 'ss': // 9 seconds / in 9 seconds / 9 seconds ago\n                if (withoutSuffix || isFuture) {\n                    return result + (plural(number) ? 'sekundy' : 'sekúnd');\n                } else {\n                    return result + 'sekundami';\n                }\n            case 'm': // a minute / in a minute / a minute ago\n                return withoutSuffix ? 'minúta' : isFuture ? 'minútu' : 'minútou';\n            case 'mm': // 9 minutes / in 9 minutes / 9 minutes ago\n                if (withoutSuffix || isFuture) {\n                    return result + (plural(number) ? 'minúty' : 'minút');\n                } else {\n                    return result + 'minútami';\n                }\n            case 'h': // an hour / in an hour / an hour ago\n                return withoutSuffix ? 'hodina' : isFuture ? 'hodinu' : 'hodinou';\n            case 'hh': // 9 hours / in 9 hours / 9 hours ago\n                if (withoutSuffix || isFuture) {\n                    return result + (plural(number) ? 'hodiny' : 'hodín');\n                } else {\n                    return result + 'hodinami';\n                }\n            case 'd': // a day / in a day / a day ago\n                return withoutSuffix || isFuture ? 'deň' : 'dňom';\n            case 'dd': // 9 days / in 9 days / 9 days ago\n                if (withoutSuffix || isFuture) {\n                    return result + (plural(number) ? 'dni' : 'dní');\n                } else {\n                    return result + 'dňami';\n                }\n            case 'M': // a month / in a month / a month ago\n                return withoutSuffix || isFuture ? 'mesiac' : 'mesiacom';\n            case 'MM': // 9 months / in 9 months / 9 months ago\n                if (withoutSuffix || isFuture) {\n                    return result + (plural(number) ? 'mesiace' : 'mesiacov');\n                } else {\n                    return result + 'mesiacmi';\n                }\n            case 'y': // a year / in a year / a year ago\n                return withoutSuffix || isFuture ? 'rok' : 'rokom';\n            case 'yy': // 9 years / in 9 years / 9 years ago\n                if (withoutSuffix || isFuture) {\n                    return result + (plural(number) ? 'roky' : 'rokov');\n                } else {\n                    return result + 'rokmi';\n                }\n        }\n    }\n\n    var sk = moment.defineLocale('sk', {\n        months: months,\n        monthsShort: monthsShort,\n        weekdays: 'nedeľa_pondelok_utorok_streda_štvrtok_piatok_sobota'.split('_'),\n        weekdaysShort: 'ne_po_ut_st_št_pi_so'.split('_'),\n        weekdaysMin: 'ne_po_ut_st_št_pi_so'.split('_'),\n        longDateFormat: {\n            LT: 'H:mm',\n            LTS: 'H:mm:ss',\n            L: 'DD.MM.YYYY',\n            LL: 'D. MMMM YYYY',\n            LLL: 'D. MMMM YYYY H:mm',\n            LLLL: 'dddd D. MMMM YYYY H:mm',\n        },\n        calendar: {\n            sameDay: '[dnes o] LT',\n            nextDay: '[zajtra o] LT',\n            nextWeek: function () {\n                switch (this.day()) {\n                    case 0:\n                        return '[v nedeľu o] LT';\n                    case 1:\n                    case 2:\n                        return '[v] dddd [o] LT';\n                    case 3:\n                        return '[v stredu o] LT';\n                    case 4:\n                        return '[vo štvrtok o] LT';\n                    case 5:\n                        return '[v piatok o] LT';\n                    case 6:\n                        return '[v sobotu o] LT';\n                }\n            },\n            lastDay: '[včera o] LT',\n            lastWeek: function () {\n                switch (this.day()) {\n                    case 0:\n                        return '[minulú nedeľu o] LT';\n                    case 1:\n                    case 2:\n                        return '[minulý] dddd [o] LT';\n                    case 3:\n                        return '[minulú stredu o] LT';\n                    case 4:\n                    case 5:\n                        return '[minulý] dddd [o] LT';\n                    case 6:\n                        return '[minulú sobotu o] LT';\n                }\n            },\n            sameElse: 'L',\n        },\n        relativeTime: {\n            future: 'za %s',\n            past: 'pred %s',\n            s: translate,\n            ss: translate,\n            m: translate,\n            mm: translate,\n            h: translate,\n            hh: translate,\n            d: translate,\n            dd: translate,\n            M: translate,\n            MM: translate,\n            y: translate,\n            yy: translate,\n        },\n        dayOfMonthOrdinalParse: /\\d{1,2}\\./,\n        ordinal: '%d.',\n        week: {\n            dow: 1, // Monday is the first day of the week.\n            doy: 4, // The week that contains Jan 4th is the first week of the year.\n        },\n    });\n\n    return sk;\n\n})));\n","//! moment.js locale configuration\n//! locale : Slovenian [sl]\n//! author : Robert Sedovšek : https://github.com/sedovsek\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    function processRelativeTime(number, withoutSuffix, key, isFuture) {\n        var result = number + ' ';\n        switch (key) {\n            case 's':\n                return withoutSuffix || isFuture\n                    ? 'nekaj sekund'\n                    : 'nekaj sekundami';\n            case 'ss':\n                if (number === 1) {\n                    result += withoutSuffix ? 'sekundo' : 'sekundi';\n                } else if (number === 2) {\n                    result += withoutSuffix || isFuture ? 'sekundi' : 'sekundah';\n                } else if (number < 5) {\n                    result += withoutSuffix || isFuture ? 'sekunde' : 'sekundah';\n                } else {\n                    result += 'sekund';\n                }\n                return result;\n            case 'm':\n                return withoutSuffix ? 'ena minuta' : 'eno minuto';\n            case 'mm':\n                if (number === 1) {\n                    result += withoutSuffix ? 'minuta' : 'minuto';\n                } else if (number === 2) {\n                    result += withoutSuffix || isFuture ? 'minuti' : 'minutama';\n                } else if (number < 5) {\n                    result += withoutSuffix || isFuture ? 'minute' : 'minutami';\n                } else {\n                    result += withoutSuffix || isFuture ? 'minut' : 'minutami';\n                }\n                return result;\n            case 'h':\n                return withoutSuffix ? 'ena ura' : 'eno uro';\n            case 'hh':\n                if (number === 1) {\n                    result += withoutSuffix ? 'ura' : 'uro';\n                } else if (number === 2) {\n                    result += withoutSuffix || isFuture ? 'uri' : 'urama';\n                } else if (number < 5) {\n                    result += withoutSuffix || isFuture ? 'ure' : 'urami';\n                } else {\n                    result += withoutSuffix || isFuture ? 'ur' : 'urami';\n                }\n                return result;\n            case 'd':\n                return withoutSuffix || isFuture ? 'en dan' : 'enim dnem';\n            case 'dd':\n                if (number === 1) {\n                    result += withoutSuffix || isFuture ? 'dan' : 'dnem';\n                } else if (number === 2) {\n                    result += withoutSuffix || isFuture ? 'dni' : 'dnevoma';\n                } else {\n                    result += withoutSuffix || isFuture ? 'dni' : 'dnevi';\n                }\n                return result;\n            case 'M':\n                return withoutSuffix || isFuture ? 'en mesec' : 'enim mesecem';\n            case 'MM':\n                if (number === 1) {\n                    result += withoutSuffix || isFuture ? 'mesec' : 'mesecem';\n                } else if (number === 2) {\n                    result += withoutSuffix || isFuture ? 'meseca' : 'mesecema';\n                } else if (number < 5) {\n                    result += withoutSuffix || isFuture ? 'mesece' : 'meseci';\n                } else {\n                    result += withoutSuffix || isFuture ? 'mesecev' : 'meseci';\n                }\n                return result;\n            case 'y':\n                return withoutSuffix || isFuture ? 'eno leto' : 'enim letom';\n            case 'yy':\n                if (number === 1) {\n                    result += withoutSuffix || isFuture ? 'leto' : 'letom';\n                } else if (number === 2) {\n                    result += withoutSuffix || isFuture ? 'leti' : 'letoma';\n                } else if (number < 5) {\n                    result += withoutSuffix || isFuture ? 'leta' : 'leti';\n                } else {\n                    result += withoutSuffix || isFuture ? 'let' : 'leti';\n                }\n                return result;\n        }\n    }\n\n    var sl = moment.defineLocale('sl', {\n        months: 'januar_februar_marec_april_maj_junij_julij_avgust_september_oktober_november_december'.split(\n            '_'\n        ),\n        monthsShort:\n            'jan._feb._mar._apr._maj._jun._jul._avg._sep._okt._nov._dec.'.split(\n                '_'\n            ),\n        monthsParseExact: true,\n        weekdays: 'nedelja_ponedeljek_torek_sreda_četrtek_petek_sobota'.split('_'),\n        weekdaysShort: 'ned._pon._tor._sre._čet._pet._sob.'.split('_'),\n        weekdaysMin: 'ne_po_to_sr_če_pe_so'.split('_'),\n        weekdaysParseExact: true,\n        longDateFormat: {\n            LT: 'H:mm',\n            LTS: 'H:mm:ss',\n            L: 'DD. MM. YYYY',\n            LL: 'D. MMMM YYYY',\n            LLL: 'D. MMMM YYYY H:mm',\n            LLLL: 'dddd, D. MMMM YYYY H:mm',\n        },\n        calendar: {\n            sameDay: '[danes ob] LT',\n            nextDay: '[jutri ob] LT',\n\n            nextWeek: function () {\n                switch (this.day()) {\n                    case 0:\n                        return '[v] [nedeljo] [ob] LT';\n                    case 3:\n                        return '[v] [sredo] [ob] LT';\n                    case 6:\n                        return '[v] [soboto] [ob] LT';\n                    case 1:\n                    case 2:\n                    case 4:\n                    case 5:\n                        return '[v] dddd [ob] LT';\n                }\n            },\n            lastDay: '[včeraj ob] LT',\n            lastWeek: function () {\n                switch (this.day()) {\n                    case 0:\n                        return '[prejšnjo] [nedeljo] [ob] LT';\n                    case 3:\n                        return '[prejšnjo] [sredo] [ob] LT';\n                    case 6:\n                        return '[prejšnjo] [soboto] [ob] LT';\n                    case 1:\n                    case 2:\n                    case 4:\n                    case 5:\n                        return '[prejšnji] dddd [ob] LT';\n                }\n            },\n            sameElse: 'L',\n        },\n        relativeTime: {\n            future: 'čez %s',\n            past: 'pred %s',\n            s: processRelativeTime,\n            ss: processRelativeTime,\n            m: processRelativeTime,\n            mm: processRelativeTime,\n            h: processRelativeTime,\n            hh: processRelativeTime,\n            d: processRelativeTime,\n            dd: processRelativeTime,\n            M: processRelativeTime,\n            MM: processRelativeTime,\n            y: processRelativeTime,\n            yy: processRelativeTime,\n        },\n        dayOfMonthOrdinalParse: /\\d{1,2}\\./,\n        ordinal: '%d.',\n        week: {\n            dow: 1, // Monday is the first day of the week.\n            doy: 7, // The week that contains Jan 7th is the first week of the year.\n        },\n    });\n\n    return sl;\n\n})));\n","//! moment.js locale configuration\n//! locale : Albanian [sq]\n//! author : Flakërim Ismani : https://github.com/flakerimi\n//! author : Menelion Elensúle : https://github.com/Oire\n//! author : Oerd Cukalla : https://github.com/oerd\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 sq = moment.defineLocale('sq', {\n        months: 'Janar_Shkurt_Mars_Prill_Maj_Qershor_Korrik_Gusht_Shtator_Tetor_Nëntor_Dhjetor'.split(\n            '_'\n        ),\n        monthsShort: 'Jan_Shk_Mar_Pri_Maj_Qer_Kor_Gus_Sht_Tet_Nën_Dhj'.split('_'),\n        weekdays: 'E Diel_E Hënë_E Martë_E Mërkurë_E Enjte_E Premte_E Shtunë'.split(\n            '_'\n        ),\n        weekdaysShort: 'Die_Hën_Mar_Mër_Enj_Pre_Sht'.split('_'),\n        weekdaysMin: 'D_H_Ma_Më_E_P_Sh'.split('_'),\n        weekdaysParseExact: true,\n        meridiemParse: /PD|MD/,\n        isPM: function (input) {\n            return input.charAt(0) === 'M';\n        },\n        meridiem: function (hours, minutes, isLower) {\n            return hours < 12 ? 'PD' : 'MD';\n        },\n        longDateFormat: {\n            LT: 'HH:mm',\n            LTS: 'HH:mm:ss',\n            L: 'DD/MM/YYYY',\n            LL: 'D MMMM YYYY',\n            LLL: 'D MMMM YYYY HH:mm',\n            LLLL: 'dddd, D MMMM YYYY HH:mm',\n        },\n        calendar: {\n            sameDay: '[Sot në] LT',\n            nextDay: '[Nesër në] LT',\n            nextWeek: 'dddd [në] LT',\n            lastDay: '[Dje në] LT',\n            lastWeek: 'dddd [e kaluar në] LT',\n            sameElse: 'L',\n        },\n        relativeTime: {\n            future: 'në %s',\n            past: '%s më parë',\n            s: 'disa sekonda',\n            ss: '%d sekonda',\n            m: 'një minutë',\n            mm: '%d minuta',\n            h: 'një orë',\n            hh: '%d orë',\n            d: 'një ditë',\n            dd: '%d ditë',\n            M: 'një muaj',\n            MM: '%d muaj',\n            y: 'një vit',\n            yy: '%d vite',\n        },\n        dayOfMonthOrdinalParse: /\\d{1,2}\\./,\n        ordinal: '%d.',\n        week: {\n            dow: 1, // Monday is the first day of the week.\n            doy: 4, // The week that contains Jan 4th is the first week of the year.\n        },\n    });\n\n    return sq;\n\n})));\n","//! moment.js locale configuration\n//! locale : Serbian Cyrillic [sr-cyrl]\n//! author : Milan Janačković<milanjanackovic@gmail.com> : https://github.com/milan-j\n//! author : Stefan Crnjaković <stefan@hotmail.rs> : https://github.com/crnjakovic\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 translator = {\n        words: {\n            //Different grammatical cases\n            ss: ['секунда', 'секунде', 'секунди'],\n            m: ['један минут', 'једног минута'],\n            mm: ['минут', 'минута', 'минута'],\n            h: ['један сат', 'једног сата'],\n            hh: ['сат', 'сата', 'сати'],\n            d: ['један дан', 'једног дана'],\n            dd: ['дан', 'дана', 'дана'],\n            M: ['један месец', 'једног месеца'],\n            MM: ['месец', 'месеца', 'месеци'],\n            y: ['једну годину', 'једне године'],\n            yy: ['годину', 'године', 'година'],\n        },\n        correctGrammaticalCase: function (number, wordKey) {\n            if (\n                number % 10 >= 1 &&\n                number % 10 <= 4 &&\n                (number % 100 < 10 || number % 100 >= 20)\n            ) {\n                return number % 10 === 1 ? wordKey[0] : wordKey[1];\n            }\n            return wordKey[2];\n        },\n        translate: function (number, withoutSuffix, key, isFuture) {\n            var wordKey = translator.words[key],\n                word;\n\n            if (key.length === 1) {\n                // Nominativ\n                if (key === 'y' && withoutSuffix) return 'једна година';\n                return isFuture || withoutSuffix ? wordKey[0] : wordKey[1];\n            }\n\n            word = translator.correctGrammaticalCase(number, wordKey);\n            // Nominativ\n            if (key === 'yy' && withoutSuffix && word === 'годину') {\n                return number + ' година';\n            }\n\n            return number + ' ' + word;\n        },\n    };\n\n    var srCyrl = moment.defineLocale('sr-cyrl', {\n        months: 'јануар_фебруар_март_април_мај_јун_јул_август_септембар_октобар_новембар_децембар'.split(\n            '_'\n        ),\n        monthsShort:\n            'јан._феб._мар._апр._мај_јун_јул_авг._сеп._окт._нов._дец.'.split('_'),\n        monthsParseExact: true,\n        weekdays: 'недеља_понедељак_уторак_среда_четвртак_петак_субота'.split('_'),\n        weekdaysShort: 'нед._пон._уто._сре._чет._пет._суб.'.split('_'),\n        weekdaysMin: 'не_по_ут_ср_че_пе_су'.split('_'),\n        weekdaysParseExact: true,\n        longDateFormat: {\n            LT: 'H:mm',\n            LTS: 'H:mm:ss',\n            L: 'D. M. YYYY.',\n            LL: 'D. MMMM YYYY.',\n            LLL: 'D. MMMM YYYY. H:mm',\n            LLLL: 'dddd, D. MMMM YYYY. H:mm',\n        },\n        calendar: {\n            sameDay: '[данас у] LT',\n            nextDay: '[сутра у] LT',\n            nextWeek: function () {\n                switch (this.day()) {\n                    case 0:\n                        return '[у] [недељу] [у] LT';\n                    case 3:\n                        return '[у] [среду] [у] LT';\n                    case 6:\n                        return '[у] [суботу] [у] LT';\n                    case 1:\n                    case 2:\n                    case 4:\n                    case 5:\n                        return '[у] dddd [у] LT';\n                }\n            },\n            lastDay: '[јуче у] LT',\n            lastWeek: function () {\n                var lastWeekDays = [\n                    '[прошле] [недеље] [у] LT',\n                    '[прошлог] [понедељка] [у] LT',\n                    '[прошлог] [уторка] [у] LT',\n                    '[прошле] [среде] [у] LT',\n                    '[прошлог] [четвртка] [у] LT',\n                    '[прошлог] [петка] [у] LT',\n                    '[прошле] [суботе] [у] LT',\n                ];\n                return lastWeekDays[this.day()];\n            },\n            sameElse: 'L',\n        },\n        relativeTime: {\n            future: 'за %s',\n            past: 'пре %s',\n            s: 'неколико секунди',\n            ss: translator.translate,\n            m: translator.translate,\n            mm: translator.translate,\n            h: translator.translate,\n            hh: translator.translate,\n            d: translator.translate,\n            dd: translator.translate,\n            M: translator.translate,\n            MM: translator.translate,\n            y: translator.translate,\n            yy: translator.translate,\n        },\n        dayOfMonthOrdinalParse: /\\d{1,2}\\./,\n        ordinal: '%d.',\n        week: {\n            dow: 1, // Monday is the first day of the week.\n            doy: 7, // The week that contains Jan 1st is the first week of the year.\n        },\n    });\n\n    return srCyrl;\n\n})));\n","//! moment.js locale configuration\n//! locale : Serbian [sr]\n//! author : Milan Janačković<milanjanackovic@gmail.com> : https://github.com/milan-j\n//! author : Stefan Crnjaković <stefan@hotmail.rs> : https://github.com/crnjakovic\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 translator = {\n        words: {\n            //Different grammatical cases\n            ss: ['sekunda', 'sekunde', 'sekundi'],\n            m: ['jedan minut', 'jednog minuta'],\n            mm: ['minut', 'minuta', 'minuta'],\n            h: ['jedan sat', 'jednog sata'],\n            hh: ['sat', 'sata', 'sati'],\n            d: ['jedan dan', 'jednog dana'],\n            dd: ['dan', 'dana', 'dana'],\n            M: ['jedan mesec', 'jednog meseca'],\n            MM: ['mesec', 'meseca', 'meseci'],\n            y: ['jednu godinu', 'jedne godine'],\n            yy: ['godinu', 'godine', 'godina'],\n        },\n        correctGrammaticalCase: function (number, wordKey) {\n            if (\n                number % 10 >= 1 &&\n                number % 10 <= 4 &&\n                (number % 100 < 10 || number % 100 >= 20)\n            ) {\n                return number % 10 === 1 ? wordKey[0] : wordKey[1];\n            }\n            return wordKey[2];\n        },\n        translate: function (number, withoutSuffix, key, isFuture) {\n            var wordKey = translator.words[key],\n                word;\n\n            if (key.length === 1) {\n                // Nominativ\n                if (key === 'y' && withoutSuffix) return 'jedna godina';\n                return isFuture || withoutSuffix ? wordKey[0] : wordKey[1];\n            }\n\n            word = translator.correctGrammaticalCase(number, wordKey);\n            // Nominativ\n            if (key === 'yy' && withoutSuffix && word === 'godinu') {\n                return number + ' godina';\n            }\n\n            return number + ' ' + word;\n        },\n    };\n\n    var sr = moment.defineLocale('sr', {\n        months: 'januar_februar_mart_april_maj_jun_jul_avgust_septembar_oktobar_novembar_decembar'.split(\n            '_'\n        ),\n        monthsShort:\n            'jan._feb._mar._apr._maj_jun_jul_avg._sep._okt._nov._dec.'.split('_'),\n        monthsParseExact: true,\n        weekdays: 'nedelja_ponedeljak_utorak_sreda_četvrtak_petak_subota'.split(\n            '_'\n        ),\n        weekdaysShort: 'ned._pon._uto._sre._čet._pet._sub.'.split('_'),\n        weekdaysMin: 'ne_po_ut_sr_če_pe_su'.split('_'),\n        weekdaysParseExact: true,\n        longDateFormat: {\n            LT: 'H:mm',\n            LTS: 'H:mm:ss',\n            L: 'D. M. YYYY.',\n            LL: 'D. MMMM YYYY.',\n            LLL: 'D. MMMM YYYY. H:mm',\n            LLLL: 'dddd, D. MMMM YYYY. H:mm',\n        },\n        calendar: {\n            sameDay: '[danas u] LT',\n            nextDay: '[sutra u] LT',\n            nextWeek: function () {\n                switch (this.day()) {\n                    case 0:\n                        return '[u] [nedelju] [u] LT';\n                    case 3:\n                        return '[u] [sredu] [u] LT';\n                    case 6:\n                        return '[u] [subotu] [u] LT';\n                    case 1:\n                    case 2:\n                    case 4:\n                    case 5:\n                        return '[u] dddd [u] LT';\n                }\n            },\n            lastDay: '[juče u] LT',\n            lastWeek: function () {\n                var lastWeekDays = [\n                    '[prošle] [nedelje] [u] LT',\n                    '[prošlog] [ponedeljka] [u] LT',\n                    '[prošlog] [utorka] [u] LT',\n                    '[prošle] [srede] [u] LT',\n                    '[prošlog] [četvrtka] [u] LT',\n                    '[prošlog] [petka] [u] LT',\n                    '[prošle] [subote] [u] LT',\n                ];\n                return lastWeekDays[this.day()];\n            },\n            sameElse: 'L',\n        },\n        relativeTime: {\n            future: 'za %s',\n            past: 'pre %s',\n            s: 'nekoliko sekundi',\n            ss: translator.translate,\n            m: translator.translate,\n            mm: translator.translate,\n            h: translator.translate,\n            hh: translator.translate,\n            d: translator.translate,\n            dd: translator.translate,\n            M: translator.translate,\n            MM: translator.translate,\n            y: translator.translate,\n            yy: translator.translate,\n        },\n        dayOfMonthOrdinalParse: /\\d{1,2}\\./,\n        ordinal: '%d.',\n        week: {\n            dow: 1, // Monday is the first day of the week.\n            doy: 7, // The week that contains Jan 7th is the first week of the year.\n        },\n    });\n\n    return sr;\n\n})));\n","//! moment.js locale configuration\n//! locale : siSwati [ss]\n//! author : Nicolai Davies<mail@nicolai.io> : https://github.com/nicolaidavies\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 ss = moment.defineLocale('ss', {\n        months: \"Bhimbidvwane_Indlovana_Indlov'lenkhulu_Mabasa_Inkhwekhweti_Inhlaba_Kholwane_Ingci_Inyoni_Imphala_Lweti_Ingongoni\".split(\n            '_'\n        ),\n        monthsShort: 'Bhi_Ina_Inu_Mab_Ink_Inh_Kho_Igc_Iny_Imp_Lwe_Igo'.split('_'),\n        weekdays:\n            'Lisontfo_Umsombuluko_Lesibili_Lesitsatfu_Lesine_Lesihlanu_Umgcibelo'.split(\n                '_'\n            ),\n        weekdaysShort: 'Lis_Umb_Lsb_Les_Lsi_Lsh_Umg'.split('_'),\n        weekdaysMin: 'Li_Us_Lb_Lt_Ls_Lh_Ug'.split('_'),\n        weekdaysParseExact: true,\n        longDateFormat: {\n            LT: 'h:mm A',\n            LTS: 'h:mm:ss A',\n            L: 'DD/MM/YYYY',\n            LL: 'D MMMM YYYY',\n            LLL: 'D MMMM YYYY h:mm A',\n            LLLL: 'dddd, D MMMM YYYY h:mm A',\n        },\n        calendar: {\n            sameDay: '[Namuhla nga] LT',\n            nextDay: '[Kusasa nga] LT',\n            nextWeek: 'dddd [nga] LT',\n            lastDay: '[Itolo nga] LT',\n            lastWeek: 'dddd [leliphelile] [nga] LT',\n            sameElse: 'L',\n        },\n        relativeTime: {\n            future: 'nga %s',\n            past: 'wenteka nga %s',\n            s: 'emizuzwana lomcane',\n            ss: '%d mzuzwana',\n            m: 'umzuzu',\n            mm: '%d emizuzu',\n            h: 'lihora',\n            hh: '%d emahora',\n            d: 'lilanga',\n            dd: '%d emalanga',\n            M: 'inyanga',\n            MM: '%d tinyanga',\n            y: 'umnyaka',\n            yy: '%d iminyaka',\n        },\n        meridiemParse: /ekuseni|emini|entsambama|ebusuku/,\n        meridiem: function (hours, minutes, isLower) {\n            if (hours < 11) {\n                return 'ekuseni';\n            } else if (hours < 15) {\n                return 'emini';\n            } else if (hours < 19) {\n                return 'entsambama';\n            } else {\n                return 'ebusuku';\n            }\n        },\n        meridiemHour: function (hour, meridiem) {\n            if (hour === 12) {\n                hour = 0;\n            }\n            if (meridiem === 'ekuseni') {\n                return hour;\n            } else if (meridiem === 'emini') {\n                return hour >= 11 ? hour : hour + 12;\n            } else if (meridiem === 'entsambama' || meridiem === 'ebusuku') {\n                if (hour === 0) {\n                    return 0;\n                }\n                return hour + 12;\n            }\n        },\n        dayOfMonthOrdinalParse: /\\d{1,2}/,\n        ordinal: '%d',\n        week: {\n            dow: 1, // Monday is the first day of the week.\n            doy: 4, // The week that contains Jan 4th is the first week of the year.\n        },\n    });\n\n    return ss;\n\n})));\n","//! moment.js locale configuration\n//! locale : Swedish [sv]\n//! author : Jens Alm : https://github.com/ulmus\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 sv = moment.defineLocale('sv', {\n        months: 'januari_februari_mars_april_maj_juni_juli_augusti_september_oktober_november_december'.split(\n            '_'\n        ),\n        monthsShort: 'jan_feb_mar_apr_maj_jun_jul_aug_sep_okt_nov_dec'.split('_'),\n        weekdays: 'söndag_måndag_tisdag_onsdag_torsdag_fredag_lördag'.split('_'),\n        weekdaysShort: 'sön_mån_tis_ons_tor_fre_lör'.split('_'),\n        weekdaysMin: 'sö_må_ti_on_to_fr_lö'.split('_'),\n        longDateFormat: {\n            LT: 'HH:mm',\n            LTS: 'HH:mm:ss',\n            L: 'YYYY-MM-DD',\n            LL: 'D MMMM YYYY',\n            LLL: 'D MMMM YYYY [kl.] HH:mm',\n            LLLL: 'dddd D MMMM YYYY [kl.] HH:mm',\n            lll: 'D MMM YYYY HH:mm',\n            llll: 'ddd D MMM YYYY HH:mm',\n        },\n        calendar: {\n            sameDay: '[Idag] LT',\n            nextDay: '[Imorgon] LT',\n            lastDay: '[Igår] LT',\n            nextWeek: '[På] dddd LT',\n            lastWeek: '[I] dddd[s] LT',\n            sameElse: 'L',\n        },\n        relativeTime: {\n            future: 'om %s',\n            past: 'för %s sedan',\n            s: 'några sekunder',\n            ss: '%d sekunder',\n            m: 'en minut',\n            mm: '%d minuter',\n            h: 'en timme',\n            hh: '%d timmar',\n            d: 'en dag',\n            dd: '%d dagar',\n            M: 'en månad',\n            MM: '%d månader',\n            y: 'ett år',\n            yy: '%d år',\n        },\n        dayOfMonthOrdinalParse: /\\d{1,2}(\\:e|\\:a)/,\n        ordinal: function (number) {\n            var b = number % 10,\n                output =\n                    ~~((number % 100) / 10) === 1\n                        ? ':e'\n                        : b === 1\n                          ? ':a'\n                          : b === 2\n                            ? ':a'\n                            : b === 3\n                              ? ':e'\n                              : ':e';\n            return number + output;\n        },\n        week: {\n            dow: 1, // Monday is the first day of the week.\n            doy: 4, // The week that contains Jan 4th is the first week of the year.\n        },\n    });\n\n    return sv;\n\n})));\n","//! moment.js locale configuration\n//! locale : Swahili [sw]\n//! author : Fahad Kassim : https://github.com/fadsel\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 sw = moment.defineLocale('sw', {\n        months: 'Januari_Februari_Machi_Aprili_Mei_Juni_Julai_Agosti_Septemba_Oktoba_Novemba_Desemba'.split(\n            '_'\n        ),\n        monthsShort: 'Jan_Feb_Mac_Apr_Mei_Jun_Jul_Ago_Sep_Okt_Nov_Des'.split('_'),\n        weekdays:\n            'Jumapili_Jumatatu_Jumanne_Jumatano_Alhamisi_Ijumaa_Jumamosi'.split(\n                '_'\n            ),\n        weekdaysShort: 'Jpl_Jtat_Jnne_Jtan_Alh_Ijm_Jmos'.split('_'),\n        weekdaysMin: 'J2_J3_J4_J5_Al_Ij_J1'.split('_'),\n        weekdaysParseExact: true,\n        longDateFormat: {\n            LT: 'hh:mm A',\n            LTS: 'HH:mm:ss',\n            L: 'DD.MM.YYYY',\n            LL: 'D MMMM YYYY',\n            LLL: 'D MMMM YYYY HH:mm',\n            LLLL: 'dddd, D MMMM YYYY HH:mm',\n        },\n        calendar: {\n            sameDay: '[leo saa] LT',\n            nextDay: '[kesho saa] LT',\n            nextWeek: '[wiki ijayo] dddd [saat] LT',\n            lastDay: '[jana] LT',\n            lastWeek: '[wiki iliyopita] dddd [saat] LT',\n            sameElse: 'L',\n        },\n        relativeTime: {\n            future: '%s baadaye',\n            past: 'tokea %s',\n            s: 'hivi punde',\n            ss: 'sekunde %d',\n            m: 'dakika moja',\n            mm: 'dakika %d',\n            h: 'saa limoja',\n            hh: 'masaa %d',\n            d: 'siku moja',\n            dd: 'siku %d',\n            M: 'mwezi mmoja',\n            MM: 'miezi %d',\n            y: 'mwaka mmoja',\n            yy: 'miaka %d',\n        },\n        week: {\n            dow: 1, // Monday is the first day of the week.\n            doy: 7, // The week that contains Jan 7th is the first week of the year.\n        },\n    });\n\n    return sw;\n\n})));\n","//! moment.js locale configuration\n//! locale : Tamil [ta]\n//! author : Arjunkumar Krishnamoorthy : https://github.com/tk120404\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\n    var ta = moment.defineLocale('ta', {\n        months: 'ஜனவரி_பிப்ரவரி_மார்ச்_ஏப்ரல்_மே_ஜூன்_ஜூலை_ஆகஸ்ட்_செப்டெம்பர்_அக்டோபர்_நவம்பர்_டிசம்பர்'.split(\n            '_'\n        ),\n        monthsShort:\n            'ஜனவரி_பிப்ரவரி_மார்ச்_ஏப்ரல்_மே_ஜூன்_ஜூலை_ஆகஸ்ட்_செப்டெம்பர்_அக்டோபர்_நவம்பர்_டிசம்பர்'.split(\n                '_'\n            ),\n        weekdays:\n            'ஞாயிற்றுக்கிழமை_திங்கட்கிழமை_செவ்வாய்கிழமை_புதன்கிழமை_வியாழக்கிழமை_வெள்ளிக்கிழமை_சனிக்கிழமை'.split(\n                '_'\n            ),\n        weekdaysShort: 'ஞாயிறு_திங்கள்_செவ்வாய்_புதன்_வியாழன்_வெள்ளி_சனி'.split(\n            '_'\n        ),\n        weekdaysMin: 'ஞா_தி_செ_பு_வி_வெ_ச'.split('_'),\n        longDateFormat: {\n            LT: 'HH:mm',\n            LTS: 'HH:mm:ss',\n            L: 'DD/MM/YYYY',\n            LL: 'D MMMM YYYY',\n            LLL: 'D MMMM YYYY, HH:mm',\n            LLLL: 'dddd, D MMMM YYYY, HH:mm',\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: 'ஒரு சில விநாடிகள்',\n            ss: '%d விநாடிகள்',\n            m: 'ஒரு நிமிடம்',\n            mm: '%d நிமிடங்கள்',\n            h: 'ஒரு மணி நேரம்',\n            hh: '%d மணி நேரம்',\n            d: 'ஒரு நாள்',\n            dd: '%d நாட்கள்',\n            M: 'ஒரு மாதம்',\n            MM: '%d மாதங்கள்',\n            y: 'ஒரு வருடம்',\n            yy: '%d ஆண்டுகள்',\n        },\n        dayOfMonthOrdinalParse: /\\d{1,2}வது/,\n        ordinal: function (number) {\n            return number + 'வது';\n        },\n        preparse: function (string) {\n            return string.replace(/[௧௨௩௪௫௬௭௮௯௦]/g, function (match) {\n                return numberMap[match];\n            });\n        },\n        postformat: function (string) {\n            return string.replace(/\\d/g, function (match) {\n                return symbolMap[match];\n            });\n        },\n        // refer http://ta.wikipedia.org/s/1er1\n        meridiemParse: /யாமம்|வைகறை|காலை|நண்பகல்|எற்பாடு|மாலை/,\n        meridiem: function (hour, minute, isLower) {\n            if (hour < 2) {\n                return ' யாமம்';\n            } else if (hour < 6) {\n                return ' வைகறை'; // வைகறை\n            } else if (hour < 10) {\n                return ' காலை'; // காலை\n            } else if (hour < 14) {\n                return ' நண்பகல்'; // நண்பகல்\n            } else if (hour < 18) {\n                return ' எற்பாடு'; // எற்பாடு\n            } else if (hour < 22) {\n                return ' மாலை'; // மாலை\n            } else {\n                return ' யாமம்';\n            }\n        },\n        meridiemHour: function (hour, meridiem) {\n            if (hour === 12) {\n                hour = 0;\n            }\n            if (meridiem === 'யாமம்') {\n                return hour < 2 ? hour : hour + 12;\n            } else if (meridiem === 'வைகறை' || meridiem === 'காலை') {\n                return hour;\n            } else if (meridiem === 'நண்பகல்') {\n                return hour >= 10 ? hour : hour + 12;\n            } else {\n                return hour + 12;\n            }\n        },\n        week: {\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\n    return ta;\n\n})));\n","//! moment.js locale configuration\n//! locale : Telugu [te]\n//! author : Krishna Chaitanya Thota : https://github.com/kcthota\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 te = moment.defineLocale('te', {\n        months: 'జనవరి_ఫిబ్రవరి_మార్చి_ఏప్రిల్_మే_జూన్_జులై_ఆగస్టు_సెప్టెంబర్_అక్టోబర్_నవంబర్_డిసెంబర్'.split(\n            '_'\n        ),\n        monthsShort:\n            'జన._ఫిబ్ర._మార్చి_ఏప్రి._మే_జూన్_జులై_ఆగ._సెప్._అక్టో._నవ._డిసె.'.split(\n                '_'\n            ),\n        monthsParseExact: true,\n        weekdays:\n            'ఆదివారం_సోమవారం_మంగళవారం_బుధవారం_గురువారం_శుక్రవారం_శనివారం'.split(\n                '_'\n            ),\n        weekdaysShort: 'ఆది_సోమ_మంగళ_బుధ_గురు_శుక్ర_శని'.split('_'),\n        weekdaysMin: 'ఆ_సో_మం_బు_గు_శు_శ'.split('_'),\n        longDateFormat: {\n            LT: 'A h:mm',\n            LTS: 'A h:mm:ss',\n            L: 'DD/MM/YYYY',\n            LL: 'D MMMM YYYY',\n            LLL: 'D MMMM YYYY, A h:mm',\n            LLLL: 'dddd, D MMMM YYYY, A h:mm',\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: 'కొన్ని క్షణాలు',\n            ss: '%d సెకన్లు',\n            m: 'ఒక నిమిషం',\n            mm: '%d నిమిషాలు',\n            h: 'ఒక గంట',\n            hh: '%d గంటలు',\n            d: 'ఒక రోజు',\n            dd: '%d రోజులు',\n            M: 'ఒక నెల',\n            MM: '%d నెలలు',\n            y: 'ఒక సంవత్సరం',\n            yy: '%d సంవత్సరాలు',\n        },\n        dayOfMonthOrdinalParse: /\\d{1,2}వ/,\n        ordinal: '%dవ',\n        meridiemParse: /రాత్రి|ఉదయం|మధ్యాహ్నం|సాయంత్రం/,\n        meridiemHour: function (hour, meridiem) {\n            if (hour === 12) {\n                hour = 0;\n            }\n            if (meridiem === 'రాత్రి') {\n                return hour < 4 ? hour : hour + 12;\n            } else if (meridiem === 'ఉదయం') {\n                return hour;\n            } else if (meridiem === 'మధ్యాహ్నం') {\n                return hour >= 10 ? hour : hour + 12;\n            } else if (meridiem === 'సాయంత్రం') {\n                return hour + 12;\n            }\n        },\n        meridiem: function (hour, minute, isLower) {\n            if (hour < 4) {\n                return 'రాత్రి';\n            } else if (hour < 10) {\n                return 'ఉదయం';\n            } else if (hour < 17) {\n                return 'మధ్యాహ్నం';\n            } else if (hour < 20) {\n                return 'సాయంత్రం';\n            } else {\n                return 'రాత్రి';\n            }\n        },\n        week: {\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\n    return te;\n\n})));\n","//! moment.js locale configuration\n//! locale : Tetun Dili (East Timor) [tet]\n//! author : Joshua Brooks : https://github.com/joshbrooks\n//! author : Onorio De J. Afonso : https://github.com/marobo\n//! author : Sonia Simoes : https://github.com/soniasimoes\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 tet = moment.defineLocale('tet', {\n        months: 'Janeiru_Fevereiru_Marsu_Abril_Maiu_Juñu_Jullu_Agustu_Setembru_Outubru_Novembru_Dezembru'.split(\n            '_'\n        ),\n        monthsShort: 'Jan_Fev_Mar_Abr_Mai_Jun_Jul_Ago_Set_Out_Nov_Dez'.split('_'),\n        weekdays: 'Domingu_Segunda_Tersa_Kuarta_Kinta_Sesta_Sabadu'.split('_'),\n        weekdaysShort: 'Dom_Seg_Ters_Kua_Kint_Sest_Sab'.split('_'),\n        weekdaysMin: 'Do_Seg_Te_Ku_Ki_Ses_Sa'.split('_'),\n        longDateFormat: {\n            LT: 'HH:mm',\n            LTS: 'HH:mm:ss',\n            L: 'DD/MM/YYYY',\n            LL: 'D MMMM YYYY',\n            LLL: 'D MMMM YYYY HH:mm',\n            LLLL: 'dddd, D MMMM YYYY HH:mm',\n        },\n        calendar: {\n            sameDay: '[Ohin iha] LT',\n            nextDay: '[Aban iha] LT',\n            nextWeek: 'dddd [iha] LT',\n            lastDay: '[Horiseik iha] LT',\n            lastWeek: 'dddd [semana kotuk] [iha] LT',\n            sameElse: 'L',\n        },\n        relativeTime: {\n            future: 'iha %s',\n            past: '%s liuba',\n            s: 'segundu balun',\n            ss: 'segundu %d',\n            m: 'minutu ida',\n            mm: 'minutu %d',\n            h: 'oras ida',\n            hh: 'oras %d',\n            d: 'loron ida',\n            dd: 'loron %d',\n            M: 'fulan ida',\n            MM: 'fulan %d',\n            y: 'tinan ida',\n            yy: 'tinan %d',\n        },\n        dayOfMonthOrdinalParse: /\\d{1,2}(st|nd|rd|th)/,\n        ordinal: function (number) {\n            var b = number % 10,\n                output =\n                    ~~((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        week: {\n            dow: 1, // Monday is the first day of the week.\n            doy: 4, // The week that contains Jan 4th is the first week of the year.\n        },\n    });\n\n    return tet;\n\n})));\n","//! moment.js locale configuration\n//! locale : Tajik [tg]\n//! author : Orif N. Jr. : https://github.com/orif-jr\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 suffixes = {\n        0: '-ум',\n        1: '-ум',\n        2: '-юм',\n        3: '-юм',\n        4: '-ум',\n        5: '-ум',\n        6: '-ум',\n        7: '-ум',\n        8: '-ум',\n        9: '-ум',\n        10: '-ум',\n        12: '-ум',\n        13: '-ум',\n        20: '-ум',\n        30: '-юм',\n        40: '-ум',\n        50: '-ум',\n        60: '-ум',\n        70: '-ум',\n        80: '-ум',\n        90: '-ум',\n        100: '-ум',\n    };\n\n    var tg = moment.defineLocale('tg', {\n        months: {\n            format: 'январи_феврали_марти_апрели_майи_июни_июли_августи_сентябри_октябри_ноябри_декабри'.split(\n                '_'\n            ),\n            standalone:\n                'январ_феврал_март_апрел_май_июн_июл_август_сентябр_октябр_ноябр_декабр'.split(\n                    '_'\n                ),\n        },\n        monthsShort: 'янв_фев_мар_апр_май_июн_июл_авг_сен_окт_ноя_дек'.split('_'),\n        weekdays: 'якшанбе_душанбе_сешанбе_чоршанбе_панҷшанбе_ҷумъа_шанбе'.split(\n            '_'\n        ),\n        weekdaysShort: 'яшб_дшб_сшб_чшб_пшб_ҷум_шнб'.split('_'),\n        weekdaysMin: 'яш_дш_сш_чш_пш_ҷм_шб'.split('_'),\n        longDateFormat: {\n            LT: 'HH:mm',\n            LTS: 'HH:mm:ss',\n            L: 'DD.MM.YYYY',\n            LL: 'D MMMM YYYY',\n            LLL: 'D MMMM YYYY HH:mm',\n            LLLL: 'dddd, D MMMM YYYY HH:mm',\n        },\n        calendar: {\n            sameDay: '[Имрӯз соати] LT',\n            nextDay: '[Фардо соати] LT',\n            lastDay: '[Дирӯз соати] LT',\n            nextWeek: 'dddd[и] [ҳафтаи оянда соати] LT',\n            lastWeek: 'dddd[и] [ҳафтаи гузашта соати] LT',\n            sameElse: 'L',\n        },\n        relativeTime: {\n            future: 'баъди %s',\n            past: '%s пеш',\n            s: 'якчанд сония',\n            m: 'як дақиқа',\n            mm: '%d дақиқа',\n            h: 'як соат',\n            hh: '%d соат',\n            d: 'як рӯз',\n            dd: '%d рӯз',\n            M: 'як моҳ',\n            MM: '%d моҳ',\n            y: 'як сол',\n            yy: '%d сол',\n        },\n        meridiemParse: /шаб|субҳ|рӯз|бегоҳ/,\n        meridiemHour: function (hour, meridiem) {\n            if (hour === 12) {\n                hour = 0;\n            }\n            if (meridiem === 'шаб') {\n                return hour < 4 ? hour : hour + 12;\n            } else if (meridiem === 'субҳ') {\n                return hour;\n            } else if (meridiem === 'рӯз') {\n                return hour >= 11 ? hour : hour + 12;\n            } else if (meridiem === 'бегоҳ') {\n                return hour + 12;\n            }\n        },\n        meridiem: function (hour, minute, isLower) {\n            if (hour < 4) {\n                return 'шаб';\n            } else if (hour < 11) {\n                return 'субҳ';\n            } else if (hour < 16) {\n                return 'рӯз';\n            } else if (hour < 19) {\n                return 'бегоҳ';\n            } else {\n                return 'шаб';\n            }\n        },\n        dayOfMonthOrdinalParse: /\\d{1,2}-(ум|юм)/,\n        ordinal: function (number) {\n            var a = number % 10,\n                b = number >= 100 ? 100 : null;\n            return number + (suffixes[number] || suffixes[a] || suffixes[b]);\n        },\n        week: {\n            dow: 1, // Monday is the first day of the week.\n            doy: 7, // The week that contains Jan 1th is the first week of the year.\n        },\n    });\n\n    return tg;\n\n})));\n","//! moment.js locale configuration\n//! locale : Thai [th]\n//! author : Kridsada Thanabulpong : https://github.com/sirn\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 th = moment.defineLocale('th', {\n        months: 'มกราคม_กุมภาพันธ์_มีนาคม_เมษายน_พฤษภาคม_มิถุนายน_กรกฎาคม_สิงหาคม_กันยายน_ตุลาคม_พฤศจิกายน_ธันวาคม'.split(\n            '_'\n        ),\n        monthsShort:\n            'ม.ค._ก.พ._มี.ค._เม.ย._พ.ค._มิ.ย._ก.ค._ส.ค._ก.ย._ต.ค._พ.ย._ธ.ค.'.split(\n                '_'\n            ),\n        monthsParseExact: true,\n        weekdays: 'อาทิตย์_จันทร์_อังคาร_พุธ_พฤหัสบดี_ศุกร์_เสาร์'.split('_'),\n        weekdaysShort: 'อาทิตย์_จันทร์_อังคาร_พุธ_พฤหัส_ศุกร์_เสาร์'.split('_'), // yes, three characters difference\n        weekdaysMin: 'อา._จ._อ._พ._พฤ._ศ._ส.'.split('_'),\n        weekdaysParseExact: true,\n        longDateFormat: {\n            LT: 'H:mm',\n            LTS: 'H:mm:ss',\n            L: 'DD/MM/YYYY',\n            LL: 'D MMMM YYYY',\n            LLL: 'D MMMM YYYY เวลา H:mm',\n            LLLL: 'วันddddที่ D MMMM YYYY เวลา H: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: 'ไม่กี่วินาที',\n            ss: '%d วินาที',\n            m: '1 นาที',\n            mm: '%d นาที',\n            h: '1 ชั่วโมง',\n            hh: '%d ชั่วโมง',\n            d: '1 วัน',\n            dd: '%d วัน',\n            w: '1 สัปดาห์',\n            ww: '%d สัปดาห์',\n            M: '1 เดือน',\n            MM: '%d เดือน',\n            y: '1 ปี',\n            yy: '%d ปี',\n        },\n    });\n\n    return th;\n\n})));\n","//! moment.js locale configuration\n//! locale : Turkmen [tk]\n//! author : Atamyrat Abdyrahmanov : https://github.com/atamyratabdy\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 suffixes = {\n        1: \"'inji\",\n        5: \"'inji\",\n        8: \"'inji\",\n        70: \"'inji\",\n        80: \"'inji\",\n        2: \"'nji\",\n        7: \"'nji\",\n        20: \"'nji\",\n        50: \"'nji\",\n        3: \"'ünji\",\n        4: \"'ünji\",\n        100: \"'ünji\",\n        6: \"'njy\",\n        9: \"'unjy\",\n        10: \"'unjy\",\n        30: \"'unjy\",\n        60: \"'ynjy\",\n        90: \"'ynjy\",\n    };\n\n    var tk = moment.defineLocale('tk', {\n        months: 'Ýanwar_Fewral_Mart_Aprel_Maý_Iýun_Iýul_Awgust_Sentýabr_Oktýabr_Noýabr_Dekabr'.split(\n            '_'\n        ),\n        monthsShort: 'Ýan_Few_Mar_Apr_Maý_Iýn_Iýl_Awg_Sen_Okt_Noý_Dek'.split('_'),\n        weekdays: 'Ýekşenbe_Duşenbe_Sişenbe_Çarşenbe_Penşenbe_Anna_Şenbe'.split(\n            '_'\n        ),\n        weekdaysShort: 'Ýek_Duş_Siş_Çar_Pen_Ann_Şen'.split('_'),\n        weekdaysMin: 'Ýk_Dş_Sş_Çr_Pn_An_Şn'.split('_'),\n        longDateFormat: {\n            LT: 'HH:mm',\n            LTS: 'HH:mm:ss',\n            L: 'DD.MM.YYYY',\n            LL: 'D MMMM YYYY',\n            LLL: 'D MMMM YYYY HH:mm',\n            LLLL: 'dddd, D MMMM YYYY HH:mm',\n        },\n        calendar: {\n            sameDay: '[bugün sagat] LT',\n            nextDay: '[ertir sagat] LT',\n            nextWeek: '[indiki] dddd [sagat] LT',\n            lastDay: '[düýn] LT',\n            lastWeek: '[geçen] dddd [sagat] LT',\n            sameElse: 'L',\n        },\n        relativeTime: {\n            future: '%s soň',\n            past: '%s öň',\n            s: 'birnäçe sekunt',\n            m: 'bir minut',\n            mm: '%d minut',\n            h: 'bir sagat',\n            hh: '%d sagat',\n            d: 'bir gün',\n            dd: '%d gün',\n            M: 'bir aý',\n            MM: '%d aý',\n            y: 'bir ýyl',\n            yy: '%d ýyl',\n        },\n        ordinal: function (number, period) {\n            switch (period) {\n                case 'd':\n                case 'D':\n                case 'Do':\n                case 'DD':\n                    return number;\n                default:\n                    if (number === 0) {\n                        // special case for zero\n                        return number + \"'unjy\";\n                    }\n                    var a = number % 10,\n                        b = (number % 100) - a,\n                        c = number >= 100 ? 100 : null;\n                    return number + (suffixes[a] || suffixes[b] || suffixes[c]);\n            }\n        },\n        week: {\n            dow: 1, // Monday is the first day of the week.\n            doy: 7, // The week that contains Jan 7th is the first week of the year.\n        },\n    });\n\n    return tk;\n\n})));\n","//! moment.js locale configuration\n//! locale : Tagalog (Philippines) [tl-ph]\n//! author : Dan Hagman : https://github.com/hagmandan\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 tlPh = moment.defineLocale('tl-ph', {\n        months: 'Enero_Pebrero_Marso_Abril_Mayo_Hunyo_Hulyo_Agosto_Setyembre_Oktubre_Nobyembre_Disyembre'.split(\n            '_'\n        ),\n        monthsShort: 'Ene_Peb_Mar_Abr_May_Hun_Hul_Ago_Set_Okt_Nob_Dis'.split('_'),\n        weekdays: 'Linggo_Lunes_Martes_Miyerkules_Huwebes_Biyernes_Sabado'.split(\n            '_'\n        ),\n        weekdaysShort: 'Lin_Lun_Mar_Miy_Huw_Biy_Sab'.split('_'),\n        weekdaysMin: 'Li_Lu_Ma_Mi_Hu_Bi_Sab'.split('_'),\n        longDateFormat: {\n            LT: 'HH:mm',\n            LTS: 'HH:mm:ss',\n            L: 'MM/D/YYYY',\n            LL: 'MMMM D, YYYY',\n            LLL: 'MMMM D, YYYY HH:mm',\n            LLLL: 'dddd, MMMM DD, YYYY HH:mm',\n        },\n        calendar: {\n            sameDay: 'LT [ngayong araw]',\n            nextDay: '[Bukas ng] LT',\n            nextWeek: 'LT [sa susunod na] dddd',\n            lastDay: 'LT [kahapon]',\n            lastWeek: 'LT [noong nakaraang] dddd',\n            sameElse: 'L',\n        },\n        relativeTime: {\n            future: 'sa loob ng %s',\n            past: '%s ang nakalipas',\n            s: 'ilang segundo',\n            ss: '%d segundo',\n            m: 'isang minuto',\n            mm: '%d minuto',\n            h: 'isang oras',\n            hh: '%d oras',\n            d: 'isang araw',\n            dd: '%d araw',\n            M: 'isang buwan',\n            MM: '%d buwan',\n            y: 'isang taon',\n            yy: '%d taon',\n        },\n        dayOfMonthOrdinalParse: /\\d{1,2}/,\n        ordinal: function (number) {\n            return number;\n        },\n        week: {\n            dow: 1, // Monday is the first day of the week.\n            doy: 4, // The week that contains Jan 4th is the first week of the year.\n        },\n    });\n\n    return tlPh;\n\n})));\n","//! moment.js locale configuration\n//! locale : Klingon [tlh]\n//! author : Dominika Kruk : https://github.com/amaranthrose\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 numbersNouns = 'pagh_wa’_cha’_wej_loS_vagh_jav_Soch_chorgh_Hut'.split('_');\n\n    function translateFuture(output) {\n        var time = output;\n        time =\n            output.indexOf('jaj') !== -1\n                ? time.slice(0, -3) + 'leS'\n                : output.indexOf('jar') !== -1\n                  ? time.slice(0, -3) + 'waQ'\n                  : output.indexOf('DIS') !== -1\n                    ? time.slice(0, -3) + 'nem'\n                    : time + ' pIq';\n        return time;\n    }\n\n    function translatePast(output) {\n        var time = output;\n        time =\n            output.indexOf('jaj') !== -1\n                ? time.slice(0, -3) + 'Hu’'\n                : output.indexOf('jar') !== -1\n                  ? time.slice(0, -3) + 'wen'\n                  : output.indexOf('DIS') !== -1\n                    ? time.slice(0, -3) + 'ben'\n                    : time + ' ret';\n        return time;\n    }\n\n    function translate(number, withoutSuffix, string, isFuture) {\n        var numberNoun = numberAsNoun(number);\n        switch (string) {\n            case 'ss':\n                return numberNoun + ' lup';\n            case 'mm':\n                return numberNoun + ' tup';\n            case 'hh':\n                return numberNoun + ' rep';\n            case 'dd':\n                return numberNoun + ' jaj';\n            case 'MM':\n                return numberNoun + ' jar';\n            case 'yy':\n                return numberNoun + ' DIS';\n        }\n    }\n\n    function numberAsNoun(number) {\n        var hundred = Math.floor((number % 1000) / 100),\n            ten = Math.floor((number % 100) / 10),\n            one = number % 10,\n            word = '';\n        if (hundred > 0) {\n            word += numbersNouns[hundred] + 'vatlh';\n        }\n        if (ten > 0) {\n            word += (word !== '' ? ' ' : '') + numbersNouns[ten] + 'maH';\n        }\n        if (one > 0) {\n            word += (word !== '' ? ' ' : '') + numbersNouns[one];\n        }\n        return word === '' ? 'pagh' : word;\n    }\n\n    var tlh = moment.defineLocale('tlh', {\n        months: 'tera’ jar wa’_tera’ jar cha’_tera’ jar wej_tera’ jar loS_tera’ jar vagh_tera’ jar jav_tera’ jar Soch_tera’ jar chorgh_tera’ jar Hut_tera’ jar wa’maH_tera’ jar wa’maH wa’_tera’ jar wa’maH cha’'.split(\n            '_'\n        ),\n        monthsShort:\n            'jar wa’_jar cha’_jar wej_jar loS_jar vagh_jar jav_jar Soch_jar chorgh_jar Hut_jar wa’maH_jar wa’maH wa’_jar wa’maH cha’'.split(\n                '_'\n            ),\n        monthsParseExact: true,\n        weekdays: 'lojmItjaj_DaSjaj_povjaj_ghItlhjaj_loghjaj_buqjaj_ghInjaj'.split(\n            '_'\n        ),\n        weekdaysShort:\n            'lojmItjaj_DaSjaj_povjaj_ghItlhjaj_loghjaj_buqjaj_ghInjaj'.split('_'),\n        weekdaysMin:\n            'lojmItjaj_DaSjaj_povjaj_ghItlhjaj_loghjaj_buqjaj_ghInjaj'.split('_'),\n        longDateFormat: {\n            LT: 'HH:mm',\n            LTS: 'HH:mm:ss',\n            L: 'DD.MM.YYYY',\n            LL: 'D MMMM YYYY',\n            LLL: 'D MMMM YYYY HH:mm',\n            LLLL: 'dddd, D MMMM YYYY HH:mm',\n        },\n        calendar: {\n            sameDay: '[DaHjaj] LT',\n            nextDay: '[wa’leS] LT',\n            nextWeek: 'LLL',\n            lastDay: '[wa’Hu’] LT',\n            lastWeek: 'LLL',\n            sameElse: 'L',\n        },\n        relativeTime: {\n            future: translateFuture,\n            past: translatePast,\n            s: 'puS lup',\n            ss: translate,\n            m: 'wa’ tup',\n            mm: translate,\n            h: 'wa’ rep',\n            hh: translate,\n            d: 'wa’ jaj',\n            dd: translate,\n            M: 'wa’ jar',\n            MM: translate,\n            y: 'wa’ DIS',\n            yy: translate,\n        },\n        dayOfMonthOrdinalParse: /\\d{1,2}\\./,\n        ordinal: '%d.',\n        week: {\n            dow: 1, // Monday is the first day of the week.\n            doy: 4, // The week that contains Jan 4th is the first week of the year.\n        },\n    });\n\n    return tlh;\n\n})));\n","//! moment.js locale configuration\n//! locale : Turkish [tr]\n//! authors : Erhan Gundogan : https://github.com/erhangundogan,\n//!           Burak Yiğit Kaya: https://github.com/BYK\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 suffixes = {\n        1: \"'inci\",\n        5: \"'inci\",\n        8: \"'inci\",\n        70: \"'inci\",\n        80: \"'inci\",\n        2: \"'nci\",\n        7: \"'nci\",\n        20: \"'nci\",\n        50: \"'nci\",\n        3: \"'üncü\",\n        4: \"'üncü\",\n        100: \"'üncü\",\n        6: \"'ncı\",\n        9: \"'uncu\",\n        10: \"'uncu\",\n        30: \"'uncu\",\n        60: \"'ıncı\",\n        90: \"'ıncı\",\n    };\n\n    var tr = moment.defineLocale('tr', {\n        months: 'Ocak_Şubat_Mart_Nisan_Mayıs_Haziran_Temmuz_Ağustos_Eylül_Ekim_Kasım_Aralık'.split(\n            '_'\n        ),\n        monthsShort: 'Oca_Şub_Mar_Nis_May_Haz_Tem_Ağu_Eyl_Eki_Kas_Ara'.split('_'),\n        weekdays: 'Pazar_Pazartesi_Salı_Çarşamba_Perşembe_Cuma_Cumartesi'.split(\n            '_'\n        ),\n        weekdaysShort: 'Paz_Pzt_Sal_Çar_Per_Cum_Cmt'.split('_'),\n        weekdaysMin: 'Pz_Pt_Sa_Ça_Pe_Cu_Ct'.split('_'),\n        meridiem: function (hours, minutes, isLower) {\n            if (hours < 12) {\n                return isLower ? 'öö' : 'ÖÖ';\n            } else {\n                return isLower ? 'ös' : 'ÖS';\n            }\n        },\n        meridiemParse: /öö|ÖÖ|ös|ÖS/,\n        isPM: function (input) {\n            return input === 'ös' || input === 'ÖS';\n        },\n        longDateFormat: {\n            LT: 'HH:mm',\n            LTS: 'HH:mm:ss',\n            L: 'DD.MM.YYYY',\n            LL: 'D MMMM YYYY',\n            LLL: 'D MMMM YYYY HH:mm',\n            LLLL: 'dddd, D MMMM YYYY HH:mm',\n        },\n        calendar: {\n            sameDay: '[bugün saat] LT',\n            nextDay: '[yarın saat] LT',\n            nextWeek: '[gelecek] dddd [saat] LT',\n            lastDay: '[dün] LT',\n            lastWeek: '[geçen] dddd [saat] LT',\n            sameElse: 'L',\n        },\n        relativeTime: {\n            future: '%s sonra',\n            past: '%s önce',\n            s: 'birkaç saniye',\n            ss: '%d saniye',\n            m: 'bir dakika',\n            mm: '%d dakika',\n            h: 'bir saat',\n            hh: '%d saat',\n            d: 'bir gün',\n            dd: '%d gün',\n            w: 'bir hafta',\n            ww: '%d hafta',\n            M: 'bir ay',\n            MM: '%d ay',\n            y: 'bir yıl',\n            yy: '%d yıl',\n        },\n        ordinal: function (number, period) {\n            switch (period) {\n                case 'd':\n                case 'D':\n                case 'Do':\n                case 'DD':\n                    return number;\n                default:\n                    if (number === 0) {\n                        // special case for zero\n                        return number + \"'ıncı\";\n                    }\n                    var a = number % 10,\n                        b = (number % 100) - a,\n                        c = number >= 100 ? 100 : null;\n                    return number + (suffixes[a] || suffixes[b] || suffixes[c]);\n            }\n        },\n        week: {\n            dow: 1, // Monday is the first day of the week.\n            doy: 7, // The week that contains Jan 7th is the first week of the year.\n        },\n    });\n\n    return tr;\n\n})));\n","//! moment.js locale configuration\n//! locale : Talossan [tzl]\n//! author : Robin van der Vliet : https://github.com/robin0van0der0v\n//! author : Iustì Canun\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    // After the year there should be a slash and the amount of years since December 26, 1979 in Roman numerals.\n    // This is currently too difficult (maybe even impossible) to add.\n    var tzl = moment.defineLocale('tzl', {\n        months: 'Januar_Fevraglh_Març_Avrïu_Mai_Gün_Julia_Guscht_Setemvar_Listopäts_Noemvar_Zecemvar'.split(\n            '_'\n        ),\n        monthsShort: 'Jan_Fev_Mar_Avr_Mai_Gün_Jul_Gus_Set_Lis_Noe_Zec'.split('_'),\n        weekdays: 'Súladi_Lúneçi_Maitzi_Márcuri_Xhúadi_Viénerçi_Sáturi'.split('_'),\n        weekdaysShort: 'Súl_Lún_Mai_Már_Xhú_Vié_Sát'.split('_'),\n        weekdaysMin: 'Sú_Lú_Ma_Má_Xh_Vi_Sá'.split('_'),\n        longDateFormat: {\n            LT: 'HH.mm',\n            LTS: 'HH.mm.ss',\n            L: 'DD.MM.YYYY',\n            LL: 'D. MMMM [dallas] YYYY',\n            LLL: 'D. MMMM [dallas] YYYY HH.mm',\n            LLLL: 'dddd, [li] D. MMMM [dallas] YYYY HH.mm',\n        },\n        meridiemParse: /d\\'o|d\\'a/i,\n        isPM: function (input) {\n            return \"d'o\" === input.toLowerCase();\n        },\n        meridiem: function (hours, minutes, isLower) {\n            if (hours > 11) {\n                return isLower ? \"d'o\" : \"D'O\";\n            } else {\n                return isLower ? \"d'a\" : \"D'A\";\n            }\n        },\n        calendar: {\n            sameDay: '[oxhi à] LT',\n            nextDay: '[demà à] LT',\n            nextWeek: 'dddd [à] LT',\n            lastDay: '[ieiri à] LT',\n            lastWeek: '[sür el] dddd [lasteu à] LT',\n            sameElse: 'L',\n        },\n        relativeTime: {\n            future: 'osprei %s',\n            past: 'ja%s',\n            s: processRelativeTime,\n            ss: processRelativeTime,\n            m: processRelativeTime,\n            mm: processRelativeTime,\n            h: processRelativeTime,\n            hh: processRelativeTime,\n            d: processRelativeTime,\n            dd: processRelativeTime,\n            M: processRelativeTime,\n            MM: processRelativeTime,\n            y: processRelativeTime,\n            yy: processRelativeTime,\n        },\n        dayOfMonthOrdinalParse: /\\d{1,2}\\./,\n        ordinal: '%d.',\n        week: {\n            dow: 1, // Monday is the first day of the week.\n            doy: 4, // The week that contains Jan 4th is the first week of the year.\n        },\n    });\n\n    function processRelativeTime(number, withoutSuffix, key, isFuture) {\n        var format = {\n            s: ['viensas secunds', \"'iensas secunds\"],\n            ss: [number + ' secunds', '' + number + ' secunds'],\n            m: [\"'n míut\", \"'iens míut\"],\n            mm: [number + ' míuts', '' + number + ' míuts'],\n            h: [\"'n þora\", \"'iensa þora\"],\n            hh: [number + ' þoras', '' + number + ' þoras'],\n            d: [\"'n ziua\", \"'iensa ziua\"],\n            dd: [number + ' ziuas', '' + number + ' ziuas'],\n            M: [\"'n mes\", \"'iens mes\"],\n            MM: [number + ' mesen', '' + number + ' mesen'],\n            y: [\"'n ar\", \"'iens ar\"],\n            yy: [number + ' ars', '' + number + ' ars'],\n        };\n        return isFuture\n            ? format[key][0]\n            : withoutSuffix\n              ? format[key][0]\n              : format[key][1];\n    }\n\n    return tzl;\n\n})));\n","//! moment.js locale configuration\n//! locale : Central Atlas Tamazight Latin [tzm-latn]\n//! author : Abdel Said : https://github.com/abdelsaid\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 tzmLatn = moment.defineLocale('tzm-latn', {\n        months: 'innayr_brˤayrˤ_marˤsˤ_ibrir_mayyw_ywnyw_ywlywz_ɣwšt_šwtanbir_ktˤwbrˤ_nwwanbir_dwjnbir'.split(\n            '_'\n        ),\n        monthsShort:\n            'innayr_brˤayrˤ_marˤsˤ_ibrir_mayyw_ywnyw_ywlywz_ɣwšt_šwtanbir_ktˤwbrˤ_nwwanbir_dwjnbir'.split(\n                '_'\n            ),\n        weekdays: 'asamas_aynas_asinas_akras_akwas_asimwas_asiḍyas'.split('_'),\n        weekdaysShort: 'asamas_aynas_asinas_akras_akwas_asimwas_asiḍyas'.split('_'),\n        weekdaysMin: 'asamas_aynas_asinas_akras_akwas_asimwas_asiḍyas'.split('_'),\n        longDateFormat: {\n            LT: 'HH:mm',\n            LTS: 'HH:mm:ss',\n            L: 'DD/MM/YYYY',\n            LL: 'D MMMM YYYY',\n            LLL: 'D MMMM YYYY HH:mm',\n            LLLL: 'dddd D MMMM YYYY HH:mm',\n        },\n        calendar: {\n            sameDay: '[asdkh g] LT',\n            nextDay: '[aska g] LT',\n            nextWeek: 'dddd [g] LT',\n            lastDay: '[assant g] LT',\n            lastWeek: 'dddd [g] LT',\n            sameElse: 'L',\n        },\n        relativeTime: {\n            future: 'dadkh s yan %s',\n            past: 'yan %s',\n            s: 'imik',\n            ss: '%d imik',\n            m: 'minuḍ',\n            mm: '%d minuḍ',\n            h: 'saɛa',\n            hh: '%d tassaɛin',\n            d: 'ass',\n            dd: '%d ossan',\n            M: 'ayowr',\n            MM: '%d iyyirn',\n            y: 'asgas',\n            yy: '%d isgasn',\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 tzmLatn;\n\n})));\n","//! moment.js locale configuration\n//! locale : Central Atlas Tamazight [tzm]\n//! author : Abdel Said : https://github.com/abdelsaid\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 tzm = moment.defineLocale('tzm', {\n        months: 'ⵉⵏⵏⴰⵢⵔ_ⴱⵕⴰⵢⵕ_ⵎⴰⵕⵚ_ⵉⴱⵔⵉⵔ_ⵎⴰⵢⵢⵓ_ⵢⵓⵏⵢⵓ_ⵢⵓⵍⵢⵓⵣ_ⵖⵓⵛⵜ_ⵛⵓⵜⴰⵏⴱⵉⵔ_ⴽⵟⵓⴱⵕ_ⵏⵓⵡⴰⵏⴱⵉⵔ_ⴷⵓⵊⵏⴱⵉⵔ'.split(\n            '_'\n        ),\n        monthsShort:\n            'ⵉⵏⵏⴰⵢⵔ_ⴱⵕⴰⵢⵕ_ⵎⴰⵕⵚ_ⵉⴱⵔⵉⵔ_ⵎⴰⵢⵢⵓ_ⵢⵓⵏⵢⵓ_ⵢⵓⵍⵢⵓⵣ_ⵖⵓⵛⵜ_ⵛⵓⵜⴰⵏⴱⵉⵔ_ⴽⵟⵓⴱⵕ_ⵏⵓⵡⴰⵏⴱⵉⵔ_ⴷⵓⵊⵏⴱⵉⵔ'.split(\n                '_'\n            ),\n        weekdays: 'ⴰⵙⴰⵎⴰⵙ_ⴰⵢⵏⴰⵙ_ⴰⵙⵉⵏⴰⵙ_ⴰⴽⵔⴰⵙ_ⴰⴽⵡⴰⵙ_ⴰⵙⵉⵎⵡⴰⵙ_ⴰⵙⵉⴹⵢⴰⵙ'.split('_'),\n        weekdaysShort: 'ⴰⵙⴰⵎⴰⵙ_ⴰⵢⵏⴰⵙ_ⴰⵙⵉⵏⴰⵙ_ⴰⴽⵔⴰⵙ_ⴰⴽⵡⴰⵙ_ⴰⵙⵉⵎⵡⴰⵙ_ⴰⵙⵉⴹⵢⴰⵙ'.split('_'),\n        weekdaysMin: 'ⴰⵙⴰⵎⴰⵙ_ⴰⵢⵏⴰⵙ_ⴰⵙⵉⵏⴰⵙ_ⴰⴽⵔⴰⵙ_ⴰⴽⵡⴰⵙ_ⴰⵙⵉⵎⵡⴰⵙ_ⴰⵙⵉⴹⵢⴰⵙ'.split('_'),\n        longDateFormat: {\n            LT: 'HH:mm',\n            LTS: 'HH:mm:ss',\n            L: 'DD/MM/YYYY',\n            LL: 'D MMMM YYYY',\n            LLL: 'D MMMM YYYY HH:mm',\n            LLLL: 'dddd D MMMM YYYY HH:mm',\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: 'ⵉⵎⵉⴽ',\n            ss: '%d ⵉⵎⵉⴽ',\n            m: 'ⵎⵉⵏⵓⴺ',\n            mm: '%d ⵎⵉⵏⵓⴺ',\n            h: 'ⵙⴰⵄⴰ',\n            hh: '%d ⵜⴰⵙⵙⴰⵄⵉⵏ',\n            d: 'ⴰⵙⵙ',\n            dd: '%d oⵙⵙⴰⵏ',\n            M: 'ⴰⵢoⵓⵔ',\n            MM: '%d ⵉⵢⵢⵉⵔⵏ',\n            y: 'ⴰⵙⴳⴰⵙ',\n            yy: '%d ⵉⵙⴳⴰⵙⵏ',\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 tzm;\n\n})));\n","//! moment.js locale configuration\n//! locale : Uyghur (China) [ug-cn]\n//! author: boyaq : https://github.com/boyaq\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 ugCn = moment.defineLocale('ug-cn', {\n        months: 'يانۋار_فېۋرال_مارت_ئاپرېل_ماي_ئىيۇن_ئىيۇل_ئاۋغۇست_سېنتەبىر_ئۆكتەبىر_نويابىر_دېكابىر'.split(\n            '_'\n        ),\n        monthsShort:\n            'يانۋار_فېۋرال_مارت_ئاپرېل_ماي_ئىيۇن_ئىيۇل_ئاۋغۇست_سېنتەبىر_ئۆكتەبىر_نويابىر_دېكابىر'.split(\n                '_'\n            ),\n        weekdays: 'يەكشەنبە_دۈشەنبە_سەيشەنبە_چارشەنبە_پەيشەنبە_جۈمە_شەنبە'.split(\n            '_'\n        ),\n        weekdaysShort: 'يە_دۈ_سە_چا_پە_جۈ_شە'.split('_'),\n        weekdaysMin: 'يە_دۈ_سە_چا_پە_جۈ_شە'.split('_'),\n        longDateFormat: {\n            LT: 'HH:mm',\n            LTS: 'HH:mm:ss',\n            L: 'YYYY-MM-DD',\n            LL: 'YYYY-يىلىM-ئاينىڭD-كۈنى',\n            LLL: 'YYYY-يىلىM-ئاينىڭD-كۈنى، HH:mm',\n            LLLL: 'dddd، YYYY-يىلىM-ئاينىڭD-كۈنى، HH:mm',\n        },\n        meridiemParse: /يېرىم كېچە|سەھەر|چۈشتىن بۇرۇن|چۈش|چۈشتىن كېيىن|كەچ/,\n        meridiemHour: function (hour, meridiem) {\n            if (hour === 12) {\n                hour = 0;\n            }\n            if (\n                meridiem === 'يېرىم كېچە' ||\n                meridiem === 'سەھەر' ||\n                meridiem === 'چۈشتىن بۇرۇن'\n            ) {\n                return hour;\n            } else if (meridiem === 'چۈشتىن كېيىن' || meridiem === 'كەچ') {\n                return hour + 12;\n            } else {\n                return hour >= 11 ? hour : hour + 12;\n            }\n        },\n        meridiem: function (hour, minute, isLower) {\n            var hm = hour * 100 + minute;\n            if (hm < 600) {\n                return 'يېرىم كېچە';\n            } else if (hm < 900) {\n                return 'سەھەر';\n            } else if (hm < 1130) {\n                return 'چۈشتىن بۇرۇن';\n            } else if (hm < 1230) {\n                return 'چۈش';\n            } else if (hm < 1800) {\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: 'نەچچە سېكونت',\n            ss: '%d سېكونت',\n            m: 'بىر مىنۇت',\n            mm: '%d مىنۇت',\n            h: 'بىر سائەت',\n            hh: '%d سائەت',\n            d: 'بىر كۈن',\n            dd: '%d كۈن',\n            M: 'بىر ئاي',\n            MM: '%d ئاي',\n            y: 'بىر يىل',\n            yy: '%d يىل',\n        },\n\n        dayOfMonthOrdinalParse: /\\d{1,2}(-كۈنى|-ئاي|-ھەپتە)/,\n        ordinal: function (number, period) {\n            switch (period) {\n                case 'd':\n                case 'D':\n                case 'DDD':\n                    return number + '-كۈنى';\n                case 'w':\n                case 'W':\n                    return number + '-ھەپتە';\n                default:\n                    return number;\n            }\n        },\n        preparse: function (string) {\n            return string.replace(/،/g, ',');\n        },\n        postformat: function (string) {\n            return string.replace(/,/g, '،');\n        },\n        week: {\n            // GB/T 7408-1994《数据元和交换格式·信息交换·日期和时间表示法》与ISO 8601:1988等效\n            dow: 1, // Monday is the first day of the week.\n            doy: 7, // The week that contains Jan 1st is the first week of the year.\n        },\n    });\n\n    return ugCn;\n\n})));\n","//! moment.js locale configuration\n//! locale : Ukrainian [uk]\n//! author : zemlanin : https://github.com/zemlanin\n//! Author : Menelion Elensúle : https://github.com/Oire\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    function plural(word, num) {\n        var forms = word.split('_');\n        return num % 10 === 1 && num % 100 !== 11\n            ? forms[0]\n            : num % 10 >= 2 && num % 10 <= 4 && (num % 100 < 10 || num % 100 >= 20)\n              ? forms[1]\n              : forms[2];\n    }\n    function relativeTimeWithPlural(number, withoutSuffix, key) {\n        var format = {\n            ss: withoutSuffix ? 'секунда_секунди_секунд' : 'секунду_секунди_секунд',\n            mm: withoutSuffix ? 'хвилина_хвилини_хвилин' : 'хвилину_хвилини_хвилин',\n            hh: withoutSuffix ? 'година_години_годин' : 'годину_години_годин',\n            dd: 'день_дні_днів',\n            MM: 'місяць_місяці_місяців',\n            yy: 'рік_роки_років',\n        };\n        if (key === 'm') {\n            return withoutSuffix ? 'хвилина' : 'хвилину';\n        } else if (key === 'h') {\n            return withoutSuffix ? 'година' : 'годину';\n        } else {\n            return number + ' ' + plural(format[key], +number);\n        }\n    }\n    function weekdaysCaseReplace(m, format) {\n        var weekdays = {\n                nominative:\n                    'неділя_понеділок_вівторок_середа_четвер_п’ятниця_субота'.split(\n                        '_'\n                    ),\n                accusative:\n                    'неділю_понеділок_вівторок_середу_четвер_п’ятницю_суботу'.split(\n                        '_'\n                    ),\n                genitive:\n                    'неділі_понеділка_вівторка_середи_четверга_п’ятниці_суботи'.split(\n                        '_'\n                    ),\n            },\n            nounCase;\n\n        if (m === true) {\n            return weekdays['nominative']\n                .slice(1, 7)\n                .concat(weekdays['nominative'].slice(0, 1));\n        }\n        if (!m) {\n            return weekdays['nominative'];\n        }\n\n        nounCase = /(\\[[ВвУу]\\]) ?dddd/.test(format)\n            ? 'accusative'\n            : /\\[?(?:минулої|наступної)? ?\\] ?dddd/.test(format)\n              ? 'genitive'\n              : 'nominative';\n        return weekdays[nounCase][m.day()];\n    }\n    function processHoursFunction(str) {\n        return function () {\n            return str + 'о' + (this.hours() === 11 ? 'б' : '') + '] LT';\n        };\n    }\n\n    var uk = moment.defineLocale('uk', {\n        months: {\n            format: 'січня_лютого_березня_квітня_травня_червня_липня_серпня_вересня_жовтня_листопада_грудня'.split(\n                '_'\n            ),\n            standalone:\n                'січень_лютий_березень_квітень_травень_червень_липень_серпень_вересень_жовтень_листопад_грудень'.split(\n                    '_'\n                ),\n        },\n        monthsShort: 'січ_лют_бер_квіт_трав_черв_лип_серп_вер_жовт_лист_груд'.split(\n            '_'\n        ),\n        weekdays: weekdaysCaseReplace,\n        weekdaysShort: 'нд_пн_вт_ср_чт_пт_сб'.split('_'),\n        weekdaysMin: 'нд_пн_вт_ср_чт_пт_сб'.split('_'),\n        longDateFormat: {\n            LT: 'HH:mm',\n            LTS: 'HH:mm:ss',\n            L: 'DD.MM.YYYY',\n            LL: 'D MMMM YYYY р.',\n            LLL: 'D MMMM YYYY р., HH:mm',\n            LLLL: 'dddd, D MMMM YYYY р., HH:mm',\n        },\n        calendar: {\n            sameDay: processHoursFunction('[Сьогодні '),\n            nextDay: processHoursFunction('[Завтра '),\n            lastDay: processHoursFunction('[Вчора '),\n            nextWeek: processHoursFunction('[У] dddd ['),\n            lastWeek: function () {\n                switch (this.day()) {\n                    case 0:\n                    case 3:\n                    case 5:\n                    case 6:\n                        return processHoursFunction('[Минулої] dddd [').call(this);\n                    case 1:\n                    case 2:\n                    case 4:\n                        return processHoursFunction('[Минулого] dddd [').call(this);\n                }\n            },\n            sameElse: 'L',\n        },\n        relativeTime: {\n            future: 'за %s',\n            past: '%s тому',\n            s: 'декілька секунд',\n            ss: relativeTimeWithPlural,\n            m: relativeTimeWithPlural,\n            mm: relativeTimeWithPlural,\n            h: 'годину',\n            hh: relativeTimeWithPlural,\n            d: 'день',\n            dd: relativeTimeWithPlural,\n            M: 'місяць',\n            MM: relativeTimeWithPlural,\n            y: 'рік',\n            yy: relativeTimeWithPlural,\n        },\n        // M. E.: those two are virtually unused but a user might want to implement them for his/her website for some reason\n        meridiemParse: /ночі|ранку|дня|вечора/,\n        isPM: function (input) {\n            return /^(дня|вечора)$/.test(input);\n        },\n        meridiem: function (hour, minute, isLower) {\n            if (hour < 4) {\n                return 'ночі';\n            } else if (hour < 12) {\n                return 'ранку';\n            } else if (hour < 17) {\n                return 'дня';\n            } else {\n                return 'вечора';\n            }\n        },\n        dayOfMonthOrdinalParse: /\\d{1,2}-(й|го)/,\n        ordinal: function (number, period) {\n            switch (period) {\n                case 'M':\n                case 'd':\n                case 'DDD':\n                case 'w':\n                case 'W':\n                    return number + '-й';\n                case 'D':\n                    return number + '-го';\n                default:\n                    return number;\n            }\n        },\n        week: {\n            dow: 1, // Monday is the first day of the week.\n            doy: 7, // The week that contains Jan 7th is the first week of the year.\n        },\n    });\n\n    return uk;\n\n})));\n","//! moment.js locale configuration\n//! locale : Urdu [ur]\n//! author : Sawood Alam : https://github.com/ibnesayeed\n//! author : Zack : https://github.com/ZackVision\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 months = [\n            'جنوری',\n            'فروری',\n            'مارچ',\n            'اپریل',\n            'مئی',\n            'جون',\n            'جولائی',\n            'اگست',\n            'ستمبر',\n            'اکتوبر',\n            'نومبر',\n            'دسمبر',\n        ],\n        days = ['اتوار', 'پیر', 'منگل', 'بدھ', 'جمعرات', 'جمعہ', 'ہفتہ'];\n\n    var ur = moment.defineLocale('ur', {\n        months: months,\n        monthsShort: months,\n        weekdays: days,\n        weekdaysShort: days,\n        weekdaysMin: days,\n        longDateFormat: {\n            LT: 'HH:mm',\n            LTS: 'HH:mm:ss',\n            L: 'DD/MM/YYYY',\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            }\n            return 'شام';\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: 'چند سیکنڈ',\n            ss: '%d سیکنڈ',\n            m: 'ایک منٹ',\n            mm: '%d منٹ',\n            h: 'ایک گھنٹہ',\n            hh: '%d گھنٹے',\n            d: 'ایک دن',\n            dd: '%d دن',\n            M: 'ایک ماہ',\n            MM: '%d ماہ',\n            y: 'ایک سال',\n            yy: '%d سال',\n        },\n        preparse: function (string) {\n            return string.replace(/،/g, ',');\n        },\n        postformat: function (string) {\n            return string.replace(/,/g, '،');\n        },\n        week: {\n            dow: 1, // Monday is the first day of the week.\n            doy: 4, // The week that contains Jan 4th is the first week of the year.\n        },\n    });\n\n    return ur;\n\n})));\n","//! moment.js locale configuration\n//! locale : Uzbek Latin [uz-latn]\n//! author : Rasulbek Mirzayev : github.com/Rasulbeeek\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 uzLatn = moment.defineLocale('uz-latn', {\n        months: 'Yanvar_Fevral_Mart_Aprel_May_Iyun_Iyul_Avgust_Sentabr_Oktabr_Noyabr_Dekabr'.split(\n            '_'\n        ),\n        monthsShort: 'Yan_Fev_Mar_Apr_May_Iyun_Iyul_Avg_Sen_Okt_Noy_Dek'.split('_'),\n        weekdays:\n            'Yakshanba_Dushanba_Seshanba_Chorshanba_Payshanba_Juma_Shanba'.split(\n                '_'\n            ),\n        weekdaysShort: 'Yak_Dush_Sesh_Chor_Pay_Jum_Shan'.split('_'),\n        weekdaysMin: 'Ya_Du_Se_Cho_Pa_Ju_Sha'.split('_'),\n        longDateFormat: {\n            LT: 'HH:mm',\n            LTS: 'HH:mm:ss',\n            L: 'DD/MM/YYYY',\n            LL: 'D MMMM YYYY',\n            LLL: 'D MMMM YYYY HH:mm',\n            LLLL: 'D MMMM YYYY, dddd HH:mm',\n        },\n        calendar: {\n            sameDay: '[Bugun soat] LT [da]',\n            nextDay: '[Ertaga] LT [da]',\n            nextWeek: 'dddd [kuni soat] LT [da]',\n            lastDay: '[Kecha soat] LT [da]',\n            lastWeek: \"[O'tgan] dddd [kuni soat] LT [da]\",\n            sameElse: 'L',\n        },\n        relativeTime: {\n            future: 'Yaqin %s ichida',\n            past: 'Bir necha %s oldin',\n            s: 'soniya',\n            ss: '%d soniya',\n            m: 'bir daqiqa',\n            mm: '%d daqiqa',\n            h: 'bir soat',\n            hh: '%d soat',\n            d: 'bir kun',\n            dd: '%d kun',\n            M: 'bir oy',\n            MM: '%d oy',\n            y: 'bir yil',\n            yy: '%d yil',\n        },\n        week: {\n            dow: 1, // Monday is the first day of the week.\n            doy: 7, // The week that contains Jan 7th is the first week of the year.\n        },\n    });\n\n    return uzLatn;\n\n})));\n","//! moment.js locale configuration\n//! locale : Uzbek [uz]\n//! author : Sardor Muminov : https://github.com/muminoff\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 uz = moment.defineLocale('uz', {\n        months: 'январ_феврал_март_апрел_май_июн_июл_август_сентябр_октябр_ноябр_декабр'.split(\n            '_'\n        ),\n        monthsShort: 'янв_фев_мар_апр_май_июн_июл_авг_сен_окт_ноя_дек'.split('_'),\n        weekdays: 'Якшанба_Душанба_Сешанба_Чоршанба_Пайшанба_Жума_Шанба'.split('_'),\n        weekdaysShort: 'Якш_Душ_Сеш_Чор_Пай_Жум_Шан'.split('_'),\n        weekdaysMin: 'Як_Ду_Се_Чо_Па_Жу_Ша'.split('_'),\n        longDateFormat: {\n            LT: 'HH:mm',\n            LTS: 'HH:mm:ss',\n            L: 'DD/MM/YYYY',\n            LL: 'D MMMM YYYY',\n            LLL: 'D MMMM YYYY HH:mm',\n            LLLL: 'D MMMM YYYY, dddd HH:mm',\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: 'фурсат',\n            ss: '%d фурсат',\n            m: 'бир дакика',\n            mm: '%d дакика',\n            h: 'бир соат',\n            hh: '%d соат',\n            d: 'бир кун',\n            dd: '%d кун',\n            M: 'бир ой',\n            MM: '%d ой',\n            y: 'бир йил',\n            yy: '%d йил',\n        },\n        week: {\n            dow: 1, // Monday is the first day of the week.\n            doy: 7, // The week that contains Jan 4th is the first week of the year.\n        },\n    });\n\n    return uz;\n\n})));\n","//! moment.js locale configuration\n//! locale : Vietnamese [vi]\n//! author : Bang Nguyen : https://github.com/bangnk\n//! author : Chien Kira : https://github.com/chienkira\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 vi = moment.defineLocale('vi', {\n        months: 'tháng 1_tháng 2_tháng 3_tháng 4_tháng 5_tháng 6_tháng 7_tháng 8_tháng 9_tháng 10_tháng 11_tháng 12'.split(\n            '_'\n        ),\n        monthsShort:\n            'Thg 01_Thg 02_Thg 03_Thg 04_Thg 05_Thg 06_Thg 07_Thg 08_Thg 09_Thg 10_Thg 11_Thg 12'.split(\n                '_'\n            ),\n        monthsParseExact: true,\n        weekdays: 'chủ nhật_thứ hai_thứ ba_thứ tư_thứ năm_thứ sáu_thứ bảy'.split(\n            '_'\n        ),\n        weekdaysShort: 'CN_T2_T3_T4_T5_T6_T7'.split('_'),\n        weekdaysMin: 'CN_T2_T3_T4_T5_T6_T7'.split('_'),\n        weekdaysParseExact: true,\n        meridiemParse: /sa|ch/i,\n        isPM: function (input) {\n            return /^ch$/i.test(input);\n        },\n        meridiem: function (hours, minutes, isLower) {\n            if (hours < 12) {\n                return isLower ? 'sa' : 'SA';\n            } else {\n                return isLower ? 'ch' : 'CH';\n            }\n        },\n        longDateFormat: {\n            LT: 'HH:mm',\n            LTS: 'HH:mm:ss',\n            L: 'DD/MM/YYYY',\n            LL: 'D MMMM [năm] YYYY',\n            LLL: 'D MMMM [năm] YYYY HH:mm',\n            LLLL: 'dddd, D MMMM [năm] YYYY HH:mm',\n            l: 'DD/M/YYYY',\n            ll: 'D MMM YYYY',\n            lll: 'D MMM YYYY HH:mm',\n            llll: 'ddd, D MMM YYYY HH:mm',\n        },\n        calendar: {\n            sameDay: '[Hôm nay lúc] LT',\n            nextDay: '[Ngày mai lúc] LT',\n            nextWeek: 'dddd [tuần tới lúc] LT',\n            lastDay: '[Hôm qua lúc] LT',\n            lastWeek: 'dddd [tuần trước lúc] LT',\n            sameElse: 'L',\n        },\n        relativeTime: {\n            future: '%s tới',\n            past: '%s trước',\n            s: 'vài giây',\n            ss: '%d giây',\n            m: 'một phút',\n            mm: '%d phút',\n            h: 'một giờ',\n            hh: '%d giờ',\n            d: 'một ngày',\n            dd: '%d ngày',\n            w: 'một tuần',\n            ww: '%d tuần',\n            M: 'một tháng',\n            MM: '%d tháng',\n            y: 'một năm',\n            yy: '%d năm',\n        },\n        dayOfMonthOrdinalParse: /\\d{1,2}/,\n        ordinal: function (number) {\n            return number;\n        },\n        week: {\n            dow: 1, // Monday is the first day of the week.\n            doy: 4, // The week that contains Jan 4th is the first week of the year.\n        },\n    });\n\n    return vi;\n\n})));\n","//! moment.js locale configuration\n//! locale : Pseudo [x-pseudo]\n//! author : Andrew Hood : https://github.com/andrewhood125\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 xPseudo = moment.defineLocale('x-pseudo', {\n        months: 'J~áñúá~rý_F~ébrú~árý_~Márc~h_Áp~ríl_~Máý_~Júñé~_Júl~ý_Áú~gúst~_Sép~témb~ér_Ó~ctób~ér_Ñ~óvém~bér_~Décé~mbér'.split(\n            '_'\n        ),\n        monthsShort:\n            'J~áñ_~Féb_~Már_~Ápr_~Máý_~Júñ_~Júl_~Áúg_~Sép_~Óct_~Ñóv_~Déc'.split(\n                '_'\n            ),\n        monthsParseExact: true,\n        weekdays:\n            'S~úñdá~ý_Mó~ñdáý~_Túé~sdáý~_Wéd~ñésd~áý_T~húrs~dáý_~Fríd~áý_S~átúr~dáý'.split(\n                '_'\n            ),\n        weekdaysShort: 'S~úñ_~Móñ_~Túé_~Wéd_~Thú_~Frí_~Sát'.split('_'),\n        weekdaysMin: 'S~ú_Mó~_Tú_~Wé_T~h_Fr~_Sá'.split('_'),\n        weekdaysParseExact: true,\n        longDateFormat: {\n            LT: 'HH:mm',\n            L: 'DD/MM/YYYY',\n            LL: 'D MMMM YYYY',\n            LLL: 'D MMMM YYYY HH:mm',\n            LLLL: 'dddd, D MMMM YYYY HH:mm',\n        },\n        calendar: {\n            sameDay: '[T~ódá~ý át] LT',\n            nextDay: '[T~ómó~rró~w át] LT',\n            nextWeek: 'dddd [át] LT',\n            lastDay: '[Ý~ést~érdá~ý át] LT',\n            lastWeek: '[L~ást] dddd [át] LT',\n            sameElse: 'L',\n        },\n        relativeTime: {\n            future: 'í~ñ %s',\n            past: '%s á~gó',\n            s: 'á ~féw ~sécó~ñds',\n            ss: '%d s~écóñ~ds',\n            m: 'á ~míñ~úté',\n            mm: '%d m~íñú~tés',\n            h: 'á~ñ hó~úr',\n            hh: '%d h~óúrs',\n            d: 'á ~dáý',\n            dd: '%d d~áýs',\n            M: 'á ~móñ~th',\n            MM: '%d m~óñt~hs',\n            y: 'á ~ýéár',\n            yy: '%d ý~éárs',\n        },\n        dayOfMonthOrdinalParse: /\\d{1,2}(th|st|nd|rd)/,\n        ordinal: function (number) {\n            var b = number % 10,\n                output =\n                    ~~((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        week: {\n            dow: 1, // Monday is the first day of the week.\n            doy: 4, // The week that contains Jan 4th is the first week of the year.\n        },\n    });\n\n    return xPseudo;\n\n})));\n","//! moment.js locale configuration\n//! locale : Yoruba Nigeria [yo]\n//! author : Atolagbe Abisoye : https://github.com/andela-batolagbe\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 yo = moment.defineLocale('yo', {\n        months: 'Sẹ́rẹ́_Èrèlè_Ẹrẹ̀nà_Ìgbé_Èbibi_Òkùdu_Agẹmo_Ògún_Owewe_Ọ̀wàrà_Bélú_Ọ̀pẹ̀̀'.split(\n            '_'\n        ),\n        monthsShort: 'Sẹ́r_Èrl_Ẹrn_Ìgb_Èbi_Òkù_Agẹ_Ògú_Owe_Ọ̀wà_Bél_Ọ̀pẹ̀̀'.split('_'),\n        weekdays: 'Àìkú_Ajé_Ìsẹ́gun_Ọjọ́rú_Ọjọ́bọ_Ẹtì_Àbámẹ́ta'.split('_'),\n        weekdaysShort: 'Àìk_Ajé_Ìsẹ́_Ọjr_Ọjb_Ẹtì_Àbá'.split('_'),\n        weekdaysMin: 'Àì_Aj_Ìs_Ọr_Ọb_Ẹt_Àb'.split('_'),\n        longDateFormat: {\n            LT: 'h:mm A',\n            LTS: 'h:mm:ss A',\n            L: 'DD/MM/YYYY',\n            LL: 'D MMMM YYYY',\n            LLL: 'D MMMM YYYY h:mm A',\n            LLLL: 'dddd, D MMMM YYYY h:mm A',\n        },\n        calendar: {\n            sameDay: '[Ònì ni] LT',\n            nextDay: '[Ọ̀la ni] LT',\n            nextWeek: \"dddd [Ọsẹ̀ tón'bọ] [ni] LT\",\n            lastDay: '[Àna ni] LT',\n            lastWeek: 'dddd [Ọsẹ̀ tólọ́] [ni] LT',\n            sameElse: 'L',\n        },\n        relativeTime: {\n            future: 'ní %s',\n            past: '%s kọjá',\n            s: 'ìsẹjú aayá die',\n            ss: 'aayá %d',\n            m: 'ìsẹjú kan',\n            mm: 'ìsẹjú %d',\n            h: 'wákati kan',\n            hh: 'wákati %d',\n            d: 'ọjọ́ kan',\n            dd: 'ọjọ́ %d',\n            M: 'osù kan',\n            MM: 'osù %d',\n            y: 'ọdún kan',\n            yy: 'ọdún %d',\n        },\n        dayOfMonthOrdinalParse: /ọjọ́\\s\\d{1,2}/,\n        ordinal: 'ọjọ́ %d',\n        week: {\n            dow: 1, // Monday is the first day of the week.\n            doy: 4, // The week that contains Jan 4th is the first week of the year.\n        },\n    });\n\n    return yo;\n\n})));\n","//! moment.js locale configuration\n//! locale : Chinese (China) [zh-cn]\n//! author : suupic : https://github.com/suupic\n//! author : Zeno Zeng : https://github.com/zenozeng\n//! author : uu109 : https://github.com/uu109\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 zhCn = moment.defineLocale('zh-cn', {\n        months: '一月_二月_三月_四月_五月_六月_七月_八月_九月_十月_十一月_十二月'.split(\n            '_'\n        ),\n        monthsShort: '1月_2月_3月_4月_5月_6月_7月_8月_9月_10月_11月_12月'.split(\n            '_'\n        ),\n        weekdays: '星期日_星期一_星期二_星期三_星期四_星期五_星期六'.split('_'),\n        weekdaysShort: '周日_周一_周二_周三_周四_周五_周六'.split('_'),\n        weekdaysMin: '日_一_二_三_四_五_六'.split('_'),\n        longDateFormat: {\n            LT: 'HH:mm',\n            LTS: 'HH:mm:ss',\n            L: 'YYYY/MM/DD',\n            LL: 'YYYY年M月D日',\n            LLL: 'YYYY年M月D日Ah点mm分',\n            LLLL: 'YYYY年M月D日ddddAh点mm分',\n            l: 'YYYY/M/D',\n            ll: 'YYYY年M月D日',\n            lll: 'YYYY年M月D日 HH:mm',\n            llll: 'YYYY年M月D日dddd HH:mm',\n        },\n        meridiemParse: /凌晨|早上|上午|中午|下午|晚上/,\n        meridiemHour: function (hour, meridiem) {\n            if (hour === 12) {\n                hour = 0;\n            }\n            if (meridiem === '凌晨' || meridiem === '早上' || meridiem === '上午') {\n                return hour;\n            } else if (meridiem === '下午' || meridiem === '晚上') {\n                return hour + 12;\n            } else {\n                // '中午'\n                return hour >= 11 ? hour : hour + 12;\n            }\n        },\n        meridiem: function (hour, minute, isLower) {\n            var hm = hour * 100 + minute;\n            if (hm < 600) {\n                return '凌晨';\n            } else if (hm < 900) {\n                return '早上';\n            } else if (hm < 1130) {\n                return '上午';\n            } else if (hm < 1230) {\n                return '中午';\n            } else if (hm < 1800) {\n                return '下午';\n            } else {\n                return '晚上';\n            }\n        },\n        calendar: {\n            sameDay: '[今天]LT',\n            nextDay: '[明天]LT',\n            nextWeek: function (now) {\n                if (now.week() !== this.week()) {\n                    return '[下]dddLT';\n                } else {\n                    return '[本]dddLT';\n                }\n            },\n            lastDay: '[昨天]LT',\n            lastWeek: function (now) {\n                if (this.week() !== now.week()) {\n                    return '[上]dddLT';\n                } else {\n                    return '[本]dddLT';\n                }\n            },\n            sameElse: 'L',\n        },\n        dayOfMonthOrdinalParse: /\\d{1,2}(日|月|周)/,\n        ordinal: function (number, period) {\n            switch (period) {\n                case 'd':\n                case 'D':\n                case 'DDD':\n                    return number + '日';\n                case 'M':\n                    return number + '月';\n                case 'w':\n                case 'W':\n                    return number + '周';\n                default:\n                    return number;\n            }\n        },\n        relativeTime: {\n            future: '%s后',\n            past: '%s前',\n            s: '几秒',\n            ss: '%d 秒',\n            m: '1 分钟',\n            mm: '%d 分钟',\n            h: '1 小时',\n            hh: '%d 小时',\n            d: '1 天',\n            dd: '%d 天',\n            w: '1 周',\n            ww: '%d 周',\n            M: '1 个月',\n            MM: '%d 个月',\n            y: '1 年',\n            yy: '%d 年',\n        },\n        week: {\n            // GB/T 7408-1994《数据元和交换格式·信息交换·日期和时间表示法》与ISO 8601:1988等效\n            dow: 1, // Monday is the first day of the week.\n            doy: 4, // The week that contains Jan 4th is the first week of the year.\n        },\n    });\n\n    return zhCn;\n\n})));\n","//! moment.js locale configuration\n//! locale : Chinese (Hong Kong) [zh-hk]\n//! author : Ben : https://github.com/ben-lin\n//! author : Chris Lam : https://github.com/hehachris\n//! author : Konstantin : https://github.com/skfd\n//! author : Anthony : https://github.com/anthonylau\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 zhHk = moment.defineLocale('zh-hk', {\n        months: '一月_二月_三月_四月_五月_六月_七月_八月_九月_十月_十一月_十二月'.split(\n            '_'\n        ),\n        monthsShort: '1月_2月_3月_4月_5月_6月_7月_8月_9月_10月_11月_12月'.split(\n            '_'\n        ),\n        weekdays: '星期日_星期一_星期二_星期三_星期四_星期五_星期六'.split('_'),\n        weekdaysShort: '週日_週一_週二_週三_週四_週五_週六'.split('_'),\n        weekdaysMin: '日_一_二_三_四_五_六'.split('_'),\n        longDateFormat: {\n            LT: 'HH:mm',\n            LTS: 'HH:mm:ss',\n            L: 'YYYY/MM/DD',\n            LL: 'YYYY年M月D日',\n            LLL: 'YYYY年M月D日 HH:mm',\n            LLLL: 'YYYY年M月D日dddd HH:mm',\n            l: 'YYYY/M/D',\n            ll: 'YYYY年M月D日',\n            lll: 'YYYY年M月D日 HH:mm',\n            llll: 'YYYY年M月D日dddd HH:mm',\n        },\n        meridiemParse: /凌晨|早上|上午|中午|下午|晚上/,\n        meridiemHour: function (hour, meridiem) {\n            if (hour === 12) {\n                hour = 0;\n            }\n            if (meridiem === '凌晨' || meridiem === '早上' || meridiem === '上午') {\n                return hour;\n            } else if (meridiem === '中午') {\n                return hour >= 11 ? hour : hour + 12;\n            } else if (meridiem === '下午' || meridiem === '晚上') {\n                return hour + 12;\n            }\n        },\n        meridiem: function (hour, minute, isLower) {\n            var hm = hour * 100 + minute;\n            if (hm < 600) {\n                return '凌晨';\n            } else if (hm < 900) {\n                return '早上';\n            } else if (hm < 1200) {\n                return '上午';\n            } else if (hm === 1200) {\n                return '中午';\n            } else if (hm < 1800) {\n                return '下午';\n            } else {\n                return '晚上';\n            }\n        },\n        calendar: {\n            sameDay: '[今天]LT',\n            nextDay: '[明天]LT',\n            nextWeek: '[下]ddddLT',\n            lastDay: '[昨天]LT',\n            lastWeek: '[上]ddddLT',\n            sameElse: 'L',\n        },\n        dayOfMonthOrdinalParse: /\\d{1,2}(日|月|週)/,\n        ordinal: function (number, period) {\n            switch (period) {\n                case 'd':\n                case 'D':\n                case 'DDD':\n                    return number + '日';\n                case 'M':\n                    return number + '月';\n                case 'w':\n                case 'W':\n                    return number + '週';\n                default:\n                    return number;\n            }\n        },\n        relativeTime: {\n            future: '%s後',\n            past: '%s前',\n            s: '幾秒',\n            ss: '%d 秒',\n            m: '1 分鐘',\n            mm: '%d 分鐘',\n            h: '1 小時',\n            hh: '%d 小時',\n            d: '1 天',\n            dd: '%d 天',\n            M: '1 個月',\n            MM: '%d 個月',\n            y: '1 年',\n            yy: '%d 年',\n        },\n    });\n\n    return zhHk;\n\n})));\n","//! moment.js locale configuration\n//! locale : Chinese (Macau) [zh-mo]\n//! author : Ben : https://github.com/ben-lin\n//! author : Chris Lam : https://github.com/hehachris\n//! author : Tan Yuanhong : https://github.com/le0tan\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 zhMo = moment.defineLocale('zh-mo', {\n        months: '一月_二月_三月_四月_五月_六月_七月_八月_九月_十月_十一月_十二月'.split(\n            '_'\n        ),\n        monthsShort: '1月_2月_3月_4月_5月_6月_7月_8月_9月_10月_11月_12月'.split(\n            '_'\n        ),\n        weekdays: '星期日_星期一_星期二_星期三_星期四_星期五_星期六'.split('_'),\n        weekdaysShort: '週日_週一_週二_週三_週四_週五_週六'.split('_'),\n        weekdaysMin: '日_一_二_三_四_五_六'.split('_'),\n        longDateFormat: {\n            LT: 'HH:mm',\n            LTS: 'HH:mm:ss',\n            L: 'DD/MM/YYYY',\n            LL: 'YYYY年M月D日',\n            LLL: 'YYYY年M月D日 HH:mm',\n            LLLL: 'YYYY年M月D日dddd HH:mm',\n            l: 'D/M/YYYY',\n            ll: 'YYYY年M月D日',\n            lll: 'YYYY年M月D日 HH:mm',\n            llll: 'YYYY年M月D日dddd HH:mm',\n        },\n        meridiemParse: /凌晨|早上|上午|中午|下午|晚上/,\n        meridiemHour: function (hour, meridiem) {\n            if (hour === 12) {\n                hour = 0;\n            }\n            if (meridiem === '凌晨' || meridiem === '早上' || meridiem === '上午') {\n                return hour;\n            } else if (meridiem === '中午') {\n                return hour >= 11 ? hour : hour + 12;\n            } else if (meridiem === '下午' || meridiem === '晚上') {\n                return hour + 12;\n            }\n        },\n        meridiem: function (hour, minute, isLower) {\n            var hm = hour * 100 + minute;\n            if (hm < 600) {\n                return '凌晨';\n            } else if (hm < 900) {\n                return '早上';\n            } else if (hm < 1130) {\n                return '上午';\n            } else if (hm < 1230) {\n                return '中午';\n            } else if (hm < 1800) {\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        dayOfMonthOrdinalParse: /\\d{1,2}(日|月|週)/,\n        ordinal: function (number, period) {\n            switch (period) {\n                case 'd':\n                case 'D':\n                case 'DDD':\n                    return number + '日';\n                case 'M':\n                    return number + '月';\n                case 'w':\n                case 'W':\n                    return number + '週';\n                default:\n                    return number;\n            }\n        },\n        relativeTime: {\n            future: '%s內',\n            past: '%s前',\n            s: '幾秒',\n            ss: '%d 秒',\n            m: '1 分鐘',\n            mm: '%d 分鐘',\n            h: '1 小時',\n            hh: '%d 小時',\n            d: '1 天',\n            dd: '%d 天',\n            M: '1 個月',\n            MM: '%d 個月',\n            y: '1 年',\n            yy: '%d 年',\n        },\n    });\n\n    return zhMo;\n\n})));\n","//! moment.js locale configuration\n//! locale : Chinese (Taiwan) [zh-tw]\n//! author : Ben : https://github.com/ben-lin\n//! author : Chris Lam : https://github.com/hehachris\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 zhTw = moment.defineLocale('zh-tw', {\n        months: '一月_二月_三月_四月_五月_六月_七月_八月_九月_十月_十一月_十二月'.split(\n            '_'\n        ),\n        monthsShort: '1月_2月_3月_4月_5月_6月_7月_8月_9月_10月_11月_12月'.split(\n            '_'\n        ),\n        weekdays: '星期日_星期一_星期二_星期三_星期四_星期五_星期六'.split('_'),\n        weekdaysShort: '週日_週一_週二_週三_週四_週五_週六'.split('_'),\n        weekdaysMin: '日_一_二_三_四_五_六'.split('_'),\n        longDateFormat: {\n            LT: 'HH:mm',\n            LTS: 'HH:mm:ss',\n            L: 'YYYY/MM/DD',\n            LL: 'YYYY年M月D日',\n            LLL: 'YYYY年M月D日 HH:mm',\n            LLLL: 'YYYY年M月D日dddd HH:mm',\n            l: 'YYYY/M/D',\n            ll: 'YYYY年M月D日',\n            lll: 'YYYY年M月D日 HH:mm',\n            llll: 'YYYY年M月D日dddd HH:mm',\n        },\n        meridiemParse: /凌晨|早上|上午|中午|下午|晚上/,\n        meridiemHour: function (hour, meridiem) {\n            if (hour === 12) {\n                hour = 0;\n            }\n            if (meridiem === '凌晨' || meridiem === '早上' || meridiem === '上午') {\n                return hour;\n            } else if (meridiem === '中午') {\n                return hour >= 11 ? hour : hour + 12;\n            } else if (meridiem === '下午' || meridiem === '晚上') {\n                return hour + 12;\n            }\n        },\n        meridiem: function (hour, minute, isLower) {\n            var hm = hour * 100 + minute;\n            if (hm < 600) {\n                return '凌晨';\n            } else if (hm < 900) {\n                return '早上';\n            } else if (hm < 1130) {\n                return '上午';\n            } else if (hm < 1230) {\n                return '中午';\n            } else if (hm < 1800) {\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        dayOfMonthOrdinalParse: /\\d{1,2}(日|月|週)/,\n        ordinal: function (number, period) {\n            switch (period) {\n                case 'd':\n                case 'D':\n                case 'DDD':\n                    return number + '日';\n                case 'M':\n                    return number + '月';\n                case 'w':\n                case 'W':\n                    return number + '週';\n                default:\n                    return number;\n            }\n        },\n        relativeTime: {\n            future: '%s後',\n            past: '%s前',\n            s: '幾秒',\n            ss: '%d 秒',\n            m: '1 分鐘',\n            mm: '%d 分鐘',\n            h: '1 小時',\n            hh: '%d 小時',\n            d: '1 天',\n            dd: '%d 天',\n            M: '1 個月',\n            MM: '%d 個月',\n            y: '1 年',\n            yy: '%d 年',\n        },\n    });\n\n    return zhTw;\n\n})));\n","//! moment.js\n//! version : 2.30.1\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            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(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.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(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            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    function set(config) {\n        var prop, i;\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(key, mom, now) {\n        var output = this._calendar[key] || this._calendar['sameElse'];\n        return isFunction(output) ? output.call(mom, now) : output;\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            /(\\[[^\\[]*\\])|(\\\\)?([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        formatFunctions[format] =\n            formatFunctions[format] || makeFormatFunction(format);\n\n        return formatFunctions[format](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 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\n        if (format || !formatUpper) {\n            return format;\n        }\n\n        this._longDateFormat[key] = 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        return this._longDateFormat[key];\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 relativeTime(number, withoutSuffix, string, isFuture) {\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 pastFuture(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    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    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(this, unit);\n            }\n        };\n    }\n\n    function get(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(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(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\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(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.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(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    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 weekOfYear(mom, dow, doy) {\n        var weekOffset = firstWeekOffset(mom.year(), dow, doy),\n            week = Math.floor((mom.dayOfYear() - weekOffset - 1) / 7) + 1,\n            resWeek,\n            resYear;\n\n        if (week < 1) {\n            resYear = mom.year() - 1;\n            resWeek = week + weeksInYear(resYear, dow, doy);\n        } else if (week > weeksInYear(mom.year(), dow, doy)) {\n            resWeek = week - weeksInYear(mom.year(), dow, doy);\n            resYear = mom.year() + 1;\n        } else {\n            resYear = mom.year();\n            resWeek = week;\n        }\n\n        return {\n            week: resWeek,\n            year: resYear,\n        };\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    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\n    // PARSING\n\n    addRegexToken('d', match1to2);\n    addRegexToken('e', match1to2);\n    addRegexToken('E', match1to2);\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    // 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\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$1(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$1.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(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    // 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        // Prevent names that look like filesystem paths, i.e contain '/' or '\\'\n        // Ensure name is available and function returns boolean\n        return !!(name && name.match('^[^/\\\\\\\\]*$'));\n    }\n\n    function loadLocale(name) {\n        var oldLocale = null,\n            aliasedRequire;\n        // TODO: Find a better way to register and load all the locales in Node\n        if (\n            locales[name] === undefined &&\n            typeof module !== 'undefined' &&\n            module &&\n            module.exports &&\n            isLocaleNameSane(name)\n        ) {\n            try {\n                oldLocale = globalLocale._abbr;\n                aliasedRequire = require;\n                aliasedRequire('./locale/' + name);\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[name] = null; // null means not found\n            }\n        }\n        return locales[name];\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        if (config != null) {\n            var locale,\n                tmpLocale,\n                parentConfig = baseConfig;\n\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                tmpLocale = loadLocale(name);\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) {\n        // hooks is actually the exported moment object\n        var nowValue = new Date(hooks.now());\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    // 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            currentDate,\n            expectedWeekday,\n            yearToUse;\n\n        if (config._d) {\n            return;\n        }\n\n        currentDate = currentDateArray(config);\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);\n        }\n\n        //if the day of the year is set, figure out what it is\n        if (config._dayOfYear != null) {\n            yearToUse = defaults(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        // 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            config._w.d !== expectedWeekday\n        ) {\n            getParsingFlags(config).weekdayMismatch = true;\n        }\n    }\n\n    function dayOfYearFromWeekInfo(config) {\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                weekOfYear(createLocal(), 1, 4).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 = weekOfYear(createLocal(), dow, doy);\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            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._f = config._f[i];\n            configFromStringAndFormat(tempConfig);\n\n            if (isValid(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({ 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(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();\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();\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        res = moments[0];\n        for (i = 1; i < moments.length; ++i) {\n            if (!moments[i].isValid() || moments[i][fn](res)) {\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$1() {\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                (dontConvert && array1[i] !== array2[i]) ||\n                (!dontConvert && 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        config._useUTC = true;\n        config._tzm = offsetFromString(matchShortOffset, input);\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        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(\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$1;\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(this, dur, direction);\n            return this;\n        };\n    }\n\n    function addSubtract(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(mom, 'Month') + months * isAdding);\n        }\n        if (days) {\n            set$1(mom, 'Date', get(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 = createAdder(1, 'add'),\n        subtract = 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$1(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() {\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(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$1(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$1(\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$1(time, MS_PER_MINUTE);\n                break;\n            case 'second':\n                time = this._d.valueOf();\n                time -= mod$1(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$1(\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$1(time, MS_PER_MINUTE) - 1;\n                break;\n            case 'second':\n                time = this._d.valueOf();\n                time += MS_PER_SECOND - mod$1(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() {\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$2() {\n        return isValid(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 = Moment.prototype;\n\n    proto.add = add;\n    proto.calendar = calendar$1;\n    proto.clone = clone;\n    proto.diff = diff;\n    proto.endOf = endOf;\n    proto.format = format;\n    proto.from = from;\n    proto.fromNow = fromNow;\n    proto.to = to;\n    proto.toNow = toNow;\n    proto.get = stringGet;\n    proto.invalidAt = invalidAt;\n    proto.isAfter = isAfter;\n    proto.isBefore = isBefore;\n    proto.isBetween = isBetween;\n    proto.isSame = isSame;\n    proto.isSameOrAfter = isSameOrAfter;\n    proto.isSameOrBefore = isSameOrBefore;\n    proto.isValid = isValid$2;\n    proto.lang = lang;\n    proto.locale = locale;\n    proto.localeData = localeData;\n    proto.max = prototypeMax;\n    proto.min = prototypeMin;\n    proto.parsingFlags = parsingFlags;\n    proto.set = stringSet;\n    proto.startOf = startOf;\n    proto.subtract = subtract;\n    proto.toArray = toArray;\n    proto.toObject = toObject;\n    proto.toDate = toDate;\n    proto.toISOString = toISOString;\n    proto.inspect = inspect;\n    if (typeof Symbol !== 'undefined' && Symbol.for != null) {\n        proto[Symbol.for('nodejs.util.inspect.custom')] = function () {\n            return 'Moment<' + this.format() + '>';\n        };\n    }\n    proto.toJSON = toJSON;\n    proto.toString = toString;\n    proto.unix = unix;\n    proto.valueOf = valueOf;\n    proto.creationData = creationData;\n    proto.eraName = getEraName;\n    proto.eraNarrow = getEraNarrow;\n    proto.eraAbbr = getEraAbbr;\n    proto.eraYear = getEraYear;\n    proto.year = getSetYear;\n    proto.isLeapYear = getIsLeapYear;\n    proto.weekYear = getSetWeekYear;\n    proto.isoWeekYear = getSetISOWeekYear;\n    proto.quarter = proto.quarters = getSetQuarter;\n    proto.month = getSetMonth;\n    proto.daysInMonth = getDaysInMonth;\n    proto.week = proto.weeks = getSetWeek;\n    proto.isoWeek = proto.isoWeeks = getSetISOWeek;\n    proto.weeksInYear = getWeeksInYear;\n    proto.weeksInWeekYear = getWeeksInWeekYear;\n    proto.isoWeeksInYear = getISOWeeksInYear;\n    proto.isoWeeksInISOWeekYear = getISOWeeksInISOWeekYear;\n    proto.date = getSetDayOfMonth;\n    proto.day = proto.days = getSetDayOfWeek;\n    proto.weekday = getSetLocaleDayOfWeek;\n    proto.isoWeekday = getSetISODayOfWeek;\n    proto.dayOfYear = getSetDayOfYear;\n    proto.hour = proto.hours = getSetHour;\n    proto.minute = proto.minutes = getSetMinute;\n    proto.second = proto.seconds = getSetSecond;\n    proto.millisecond = proto.milliseconds = getSetMillisecond;\n    proto.utcOffset = getSetOffset;\n    proto.utc = setOffsetToUTC;\n    proto.local = setOffsetToLocal;\n    proto.parseZone = setOffsetToParsedOffset;\n    proto.hasAlignedHourOffset = hasAlignedHourOffset;\n    proto.isDST = isDaylightSavingTime;\n    proto.isLocal = isLocal;\n    proto.isUtcOffset = isUtcOffset;\n    proto.isUtc = isUtc;\n    proto.isUTC = isUtc;\n    proto.zoneAbbr = getZoneAbbr;\n    proto.zoneName = getZoneName;\n    proto.dates = deprecate(\n        'dates accessor is deprecated. Use date instead.',\n        getSetDayOfMonth\n    );\n    proto.months = deprecate(\n        'months accessor is deprecated. Use month instead',\n        getSetMonth\n    );\n    proto.years = deprecate(\n        'years accessor is deprecated. Use year instead',\n        getSetYear\n    );\n    proto.zone = deprecate(\n        'moment().zone is deprecated, use moment().utcOffset instead. http://momentjs.com/guides/#/warnings/zone/',\n        getSetZone\n    );\n    proto.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;\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;\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() {\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$1(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$1(input, value) {\n        return addSubtract$1(this, input, value, 1);\n    }\n\n    // supports only 2.0-style subtract(1, 's') or subtract(duration)\n    function subtract$1(input, value) {\n        return addSubtract$1(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            !(\n                (milliseconds >= 0 && days >= 0 && months >= 0) ||\n                (milliseconds <= 0 && days <= 0 && months <= 0)\n            )\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$1 = asMilliseconds;\n\n    function clone$1() {\n        return createDuration(this);\n    }\n\n    function get$2(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 locale.relativeTime(number || 1, !!withoutSuffix, string, isFuture);\n    }\n\n    function relativeTime$1(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 = Object.assign({}, 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$1(this, !withSuffix, th, locale);\n\n        if (withSuffix) {\n            output = locale.pastFuture(+this, output);\n        }\n\n        return locale.postformat(output);\n    }\n\n    var abs$1 = Math.abs;\n\n    function sign(x) {\n        return (x > 0) - (x < 0) || +x;\n    }\n\n    function toISOString$1() {\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$1(this._milliseconds) / 1000,\n            days = abs$1(this._days),\n            months = abs$1(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$2 = Duration.prototype;\n\n    proto$2.isValid = isValid$1;\n    proto$2.abs = abs;\n    proto$2.add = add$1;\n    proto$2.subtract = subtract$1;\n    proto$2.as = as;\n    proto$2.asMilliseconds = asMilliseconds;\n    proto$2.asSeconds = asSeconds;\n    proto$2.asMinutes = asMinutes;\n    proto$2.asHours = asHours;\n    proto$2.asDays = asDays;\n    proto$2.asWeeks = asWeeks;\n    proto$2.asMonths = asMonths;\n    proto$2.asQuarters = asQuarters;\n    proto$2.asYears = asYears;\n    proto$2.valueOf = valueOf$1;\n    proto$2._bubble = bubble;\n    proto$2.clone = clone$1;\n    proto$2.get = get$2;\n    proto$2.milliseconds = milliseconds;\n    proto$2.seconds = seconds;\n    proto$2.minutes = minutes;\n    proto$2.hours = hours;\n    proto$2.days = days;\n    proto$2.weeks = weeks;\n    proto$2.months = months;\n    proto$2.years = years;\n    proto$2.humanize = humanize;\n    proto$2.toISOString = toISOString$1;\n    proto$2.toString = toISOString$1;\n    proto$2.toJSON = toISOString$1;\n    proto$2.locale = locale;\n    proto$2.localeData = localeData;\n\n    proto$2.toIsoString = deprecate(\n        'toIsoString() is deprecated. Please use toISOString() instead (notice the capitals)',\n        toISOString$1\n    );\n    proto$2.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.30.1';\n\n    setHookCallback(createLocal);\n\n    hooks.fn = proto;\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;\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;\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","export default typeof window !== 'undefined' && typeof document !== 'undefined' && typeof navigator !== 'undefined';\n","import isBrowser from './isBrowser';\n\nconst timeoutDuration = (function(){\n  const longerTimeoutBrowsers = ['Edge', 'Trident', 'Firefox'];\n  for (let i = 0; i < longerTimeoutBrowsers.length; i += 1) {\n    if (isBrowser && navigator.userAgent.indexOf(longerTimeoutBrowsers[i]) >= 0) {\n      return 1;\n    }\n  }\n  return 0;\n}());\n\nexport function microtaskDebounce(fn) {\n  let called = false\n  return () => {\n    if (called) {\n      return\n    }\n    called = true\n    window.Promise.resolve().then(() => {\n      called = false\n      fn()\n    })\n  }\n}\n\nexport function taskDebounce(fn) {\n  let scheduled = false;\n  return () => {\n    if (!scheduled) {\n      scheduled = true;\n      setTimeout(() => {\n        scheduled = false;\n        fn();\n      }, timeoutDuration);\n    }\n  };\n}\n\nconst supportsMicroTasks = isBrowser && window.Promise\n\n\n/**\n* Create a debounced version of a method, that's asynchronously deferred\n* but called in the minimum time possible.\n*\n* @method\n* @memberof Popper.Utils\n* @argument {Function} fn\n* @returns {Function}\n*/\nexport default (supportsMicroTasks\n  ? microtaskDebounce\n  : taskDebounce);\n","/**\n * Check if the given variable is a function\n * @method\n * @memberof Popper.Utils\n * @argument {Any} functionToCheck - variable to check\n * @returns {Boolean} answer to: is a function?\n */\nexport default function isFunction(functionToCheck) {\n  const getType = {};\n  return (\n    functionToCheck &&\n    getType.toString.call(functionToCheck) === '[object Function]'\n  );\n}\n","/**\n * Get CSS computed property of the given element\n * @method\n * @memberof Popper.Utils\n * @argument {Eement} element\n * @argument {String} property\n */\nexport default function getStyleComputedProperty(element, property) {\n  if (element.nodeType !== 1) {\n    return [];\n  }\n  // NOTE: 1 DOM access here\n  const window = element.ownerDocument.defaultView;\n  const css = window.getComputedStyle(element, null);\n  return property ? css[property] : css;\n}\n","/**\n * Returns the parentNode or the host of the element\n * @method\n * @memberof Popper.Utils\n * @argument {Element} element\n * @returns {Element} parent\n */\nexport default function getParentNode(element) {\n  if (element.nodeName === 'HTML') {\n    return element;\n  }\n  return element.parentNode || element.host;\n}\n","import getStyleComputedProperty from './getStyleComputedProperty';\nimport getParentNode from './getParentNode';\n\n/**\n * Returns the scrolling parent of the given element\n * @method\n * @memberof Popper.Utils\n * @argument {Element} element\n * @returns {Element} scroll parent\n */\nexport default function getScrollParent(element) {\n  // Return body, `getScroll` will take care to get the correct `scrollTop` from it\n  if (!element) {\n    return document.body\n  }\n\n  switch (element.nodeName) {\n    case 'HTML':\n    case 'BODY':\n      return element.ownerDocument.body\n    case '#document':\n      return element.body\n  }\n\n  // Firefox want us to check `-x` and `-y` variations as well\n  const { overflow, overflowX, overflowY } = getStyleComputedProperty(element);\n  if (/(auto|scroll|overlay)/.test(overflow + overflowY + overflowX)) {\n    return element;\n  }\n\n  return getScrollParent(getParentNode(element));\n}\n","/**\n * Returns the reference node of the reference object, or the reference object itself.\n * @method\n * @memberof Popper.Utils\n * @param {Element|Object} reference - the reference element (the popper will be relative to this)\n * @returns {Element} parent\n */\nexport default function getReferenceNode(reference) {\n  return reference && reference.referenceNode ? reference.referenceNode : reference;\n}\n","import isBrowser from './isBrowser';\n\nconst isIE11 = isBrowser && !!(window.MSInputMethodContext && document.documentMode);\nconst isIE10 = isBrowser && /MSIE 10/.test(navigator.userAgent);\n\n/**\n * Determines if the browser is Internet Explorer\n * @method\n * @memberof Popper.Utils\n * @param {Number} version to check\n * @returns {Boolean} isIE\n */\nexport default function isIE(version) {\n  if (version === 11) {\n    return isIE11;\n  }\n  if (version === 10) {\n    return isIE10;\n  }\n  return isIE11 || isIE10;\n}\n","import getStyleComputedProperty from './getStyleComputedProperty';\nimport isIE from './isIE';\n/**\n * Returns the offset parent of the given element\n * @method\n * @memberof Popper.Utils\n * @argument {Element} element\n * @returns {Element} offset parent\n */\nexport default function getOffsetParent(element) {\n  if (!element) {\n    return document.documentElement;\n  }\n\n  const noOffsetParent = isIE(10) ? document.body : null;\n\n  // NOTE: 1 DOM access here\n  let offsetParent = element.offsetParent || null;\n  // Skip hidden elements which don't have an offsetParent\n  while (offsetParent === noOffsetParent && element.nextElementSibling) {\n    offsetParent = (element = element.nextElementSibling).offsetParent;\n  }\n\n  const nodeName = offsetParent && offsetParent.nodeName;\n\n  if (!nodeName || nodeName === 'BODY' || nodeName === 'HTML') {\n    return element ? element.ownerDocument.documentElement : document.documentElement;\n  }\n\n  // .offsetParent will return the closest TH, TD or TABLE in case\n  // no offsetParent is present, I hate this job...\n  if (\n    ['TH', 'TD', 'TABLE'].indexOf(offsetParent.nodeName) !== -1 &&\n    getStyleComputedProperty(offsetParent, 'position') === 'static'\n  ) {\n    return getOffsetParent(offsetParent);\n  }\n\n  return offsetParent;\n}\n","/**\n * Finds the root node (document, shadowDOM root) of the given element\n * @method\n * @memberof Popper.Utils\n * @argument {Element} node\n * @returns {Element} root node\n */\nexport default function getRoot(node) {\n  if (node.parentNode !== null) {\n    return getRoot(node.parentNode);\n  }\n\n  return node;\n}\n","import isOffsetContainer from './isOffsetContainer';\nimport getRoot from './getRoot';\nimport getOffsetParent from './getOffsetParent';\n\n/**\n * Finds the offset parent common to the two provided nodes\n * @method\n * @memberof Popper.Utils\n * @argument {Element} element1\n * @argument {Element} element2\n * @returns {Element} common offset parent\n */\nexport default function findCommonOffsetParent(element1, element2) {\n  // This check is needed to avoid errors in case one of the elements isn't defined for any reason\n  if (!element1 || !element1.nodeType || !element2 || !element2.nodeType) {\n    return document.documentElement;\n  }\n\n  // Here we make sure to give as \"start\" the element that comes first in the DOM\n  const order =\n    element1.compareDocumentPosition(element2) &\n    Node.DOCUMENT_POSITION_FOLLOWING;\n  const start = order ? element1 : element2;\n  const end = order ? element2 : element1;\n\n  // Get common ancestor container\n  const range = document.createRange();\n  range.setStart(start, 0);\n  range.setEnd(end, 0);\n  const { commonAncestorContainer } = range;\n\n  // Both nodes are inside #document\n  if (\n    (element1 !== commonAncestorContainer &&\n      element2 !== commonAncestorContainer) ||\n    start.contains(end)\n  ) {\n    if (isOffsetContainer(commonAncestorContainer)) {\n      return commonAncestorContainer;\n    }\n\n    return getOffsetParent(commonAncestorContainer);\n  }\n\n  // one of the nodes is inside shadowDOM, find which one\n  const element1root = getRoot(element1);\n  if (element1root.host) {\n    return findCommonOffsetParent(element1root.host, element2);\n  } else {\n    return findCommonOffsetParent(element1, getRoot(element2).host);\n  }\n}\n","import getOffsetParent from './getOffsetParent';\n\nexport default function isOffsetContainer(element) {\n  const { nodeName } = element;\n  if (nodeName === 'BODY') {\n    return false;\n  }\n  return (\n    nodeName === 'HTML' || getOffsetParent(element.firstElementChild) === element\n  );\n}\n","/**\n * Gets the scroll value of the given element in the given side (top and left)\n * @method\n * @memberof Popper.Utils\n * @argument {Element} element\n * @argument {String} side `top` or `left`\n * @returns {number} amount of scrolled pixels\n */\nexport default function getScroll(element, side = 'top') {\n  const upperSide = side === 'top' ? 'scrollTop' : 'scrollLeft';\n  const nodeName = element.nodeName;\n\n  if (nodeName === 'BODY' || nodeName === 'HTML') {\n    const html = element.ownerDocument.documentElement;\n    const scrollingElement = element.ownerDocument.scrollingElement || html;\n    return scrollingElement[upperSide];\n  }\n\n  return element[upperSide];\n}\n","/*\n * Helper to detect borders of a given element\n * @method\n * @memberof Popper.Utils\n * @param {CSSStyleDeclaration} styles\n * Result of `getStyleComputedProperty` on the given element\n * @param {String} axis - `x` or `y`\n * @return {number} borders - The borders size of the given axis\n */\n\nexport default function getBordersSize(styles, axis) {\n  const sideA = axis === 'x' ? 'Left' : 'Top';\n  const sideB = sideA === 'Left' ? 'Right' : 'Bottom';\n\n  return (\n    parseFloat(styles[`border${sideA}Width`]) +\n    parseFloat(styles[`border${sideB}Width`])\n  );\n}\n","import isIE from './isIE';\n\nfunction getSize(axis, body, html, computedStyle) {\n  return Math.max(\n    body[`offset${axis}`],\n    body[`scroll${axis}`],\n    html[`client${axis}`],\n    html[`offset${axis}`],\n    html[`scroll${axis}`],\n    isIE(10)\n      ? (parseInt(html[`offset${axis}`]) + \n      parseInt(computedStyle[`margin${axis === 'Height' ? 'Top' : 'Left'}`]) + \n      parseInt(computedStyle[`margin${axis === 'Height' ? 'Bottom' : 'Right'}`]))\n    : 0 \n  );\n}\n\nexport default function getWindowSizes(document) {\n  const body = document.body;\n  const html = document.documentElement;\n  const computedStyle = isIE(10) && getComputedStyle(html);\n\n  return {\n    height: getSize('Height', body, html, computedStyle),\n    width: getSize('Width', body, html, computedStyle),\n  };\n}\n","/**\n * Given element offsets, generate an output similar to getBoundingClientRect\n * @method\n * @memberof Popper.Utils\n * @argument {Object} offsets\n * @returns {Object} ClientRect like output\n */\nexport default function getClientRect(offsets) {\n  return {\n    ...offsets,\n    right: offsets.left + offsets.width,\n    bottom: offsets.top + offsets.height,\n  };\n}\n","import getStyleComputedProperty from './getStyleComputedProperty';\nimport getBordersSize from './getBordersSize';\nimport getWindowSizes from './getWindowSizes';\nimport getScroll from './getScroll';\nimport getClientRect from './getClientRect';\nimport isIE from './isIE';\n\n/**\n * Get bounding client rect of given element\n * @method\n * @memberof Popper.Utils\n * @param {HTMLElement} element\n * @return {Object} client rect\n */\nexport default function getBoundingClientRect(element) {\n  let rect = {};\n\n  // IE10 10 FIX: Please, don't ask, the element isn't\n  // considered in DOM in some circumstances...\n  // This isn't reproducible in IE10 compatibility mode of IE11\n  try {\n    if (isIE(10)) {\n      rect = element.getBoundingClientRect();\n      const scrollTop = getScroll(element, 'top');\n      const scrollLeft = getScroll(element, 'left');\n      rect.top += scrollTop;\n      rect.left += scrollLeft;\n      rect.bottom += scrollTop;\n      rect.right += scrollLeft;\n    }\n    else {\n      rect = element.getBoundingClientRect();\n    }\n  }\n  catch(e){}\n\n  const result = {\n    left: rect.left,\n    top: rect.top,\n    width: rect.right - rect.left,\n    height: rect.bottom - rect.top,\n  };\n\n  // subtract scrollbar size from sizes\n  const sizes = element.nodeName === 'HTML' ? getWindowSizes(element.ownerDocument) : {};\n  const width =\n    sizes.width || element.clientWidth || result.width;\n  const height =\n    sizes.height || element.clientHeight || result.height;\n\n  let horizScrollbar = element.offsetWidth - width;\n  let vertScrollbar = element.offsetHeight - height;\n\n  // if an hypothetical scrollbar is detected, we must be sure it's not a `border`\n  // we make this check conditional for performance reasons\n  if (horizScrollbar || vertScrollbar) {\n    const styles = getStyleComputedProperty(element);\n    horizScrollbar -= getBordersSize(styles, 'x');\n    vertScrollbar -= getBordersSize(styles, 'y');\n\n    result.width -= horizScrollbar;\n    result.height -= vertScrollbar;\n  }\n\n  return getClientRect(result);\n}\n","import getStyleComputedProperty from './getStyleComputedProperty';\nimport includeScroll from './includeScroll';\nimport getScrollParent from './getScrollParent';\nimport getBoundingClientRect from './getBoundingClientRect';\nimport runIsIE from './isIE';\nimport getClientRect from './getClientRect';\n\nexport default function getOffsetRectRelativeToArbitraryNode(children, parent, fixedPosition = false) {\n  const isIE10 = runIsIE(10);\n  const isHTML = parent.nodeName === 'HTML';\n  const childrenRect = getBoundingClientRect(children);\n  const parentRect = getBoundingClientRect(parent);\n  const scrollParent = getScrollParent(children);\n\n  const styles = getStyleComputedProperty(parent);\n  const borderTopWidth = parseFloat(styles.borderTopWidth);\n  const borderLeftWidth = parseFloat(styles.borderLeftWidth);\n\n  // In cases where the parent is fixed, we must ignore negative scroll in offset calc\n  if(fixedPosition && isHTML) {\n    parentRect.top = Math.max(parentRect.top, 0);\n    parentRect.left = Math.max(parentRect.left, 0);\n  }\n  let offsets = getClientRect({\n    top: childrenRect.top - parentRect.top - borderTopWidth,\n    left: childrenRect.left - parentRect.left - borderLeftWidth,\n    width: childrenRect.width,\n    height: childrenRect.height,\n  });\n  offsets.marginTop = 0;\n  offsets.marginLeft = 0;\n\n  // Subtract margins of documentElement in case it's being used as parent\n  // we do this only on HTML because it's the only element that behaves\n  // differently when margins are applied to it. The margins are included in\n  // the box of the documentElement, in the other cases not.\n  if (!isIE10 && isHTML) {\n    const marginTop = parseFloat(styles.marginTop);\n    const marginLeft = parseFloat(styles.marginLeft);\n\n    offsets.top -= borderTopWidth - marginTop;\n    offsets.bottom -= borderTopWidth - marginTop;\n    offsets.left -= borderLeftWidth - marginLeft;\n    offsets.right -= borderLeftWidth - marginLeft;\n\n    // Attach marginTop and marginLeft because in some circumstances we may need them\n    offsets.marginTop = marginTop;\n    offsets.marginLeft = marginLeft;\n  }\n\n  if (\n    isIE10 && !fixedPosition\n      ? parent.contains(scrollParent)\n      : parent === scrollParent && scrollParent.nodeName !== 'BODY'\n  ) {\n    offsets = includeScroll(offsets, parent);\n  }\n\n  return offsets;\n}\n","import getScroll from './getScroll';\n\n/*\n * Sum or subtract the element scroll values (left and top) from a given rect object\n * @method\n * @memberof Popper.Utils\n * @param {Object} rect - Rect object you want to change\n * @param {HTMLElement} element - The element from the function reads the scroll values\n * @param {Boolean} subtract - set to true if you want to subtract the scroll values\n * @return {Object} rect - The modifier rect object\n */\nexport default function includeScroll(rect, element, subtract = false) {\n  const scrollTop = getScroll(element, 'top');\n  const scrollLeft = getScroll(element, 'left');\n  const modifier = subtract ? -1 : 1;\n  rect.top += scrollTop * modifier;\n  rect.bottom += scrollTop * modifier;\n  rect.left += scrollLeft * modifier;\n  rect.right += scrollLeft * modifier;\n  return rect;\n}\n","import getStyleComputedProperty from './getStyleComputedProperty';\nimport getParentNode from './getParentNode';\n\n/**\n * Check if the given element is fixed or is inside a fixed parent\n * @method\n * @memberof Popper.Utils\n * @argument {Element} element\n * @argument {Element} customContainer\n * @returns {Boolean} answer to \"isFixed?\"\n */\nexport default function isFixed(element) {\n  const nodeName = element.nodeName;\n  if (nodeName === 'BODY' || nodeName === 'HTML') {\n    return false;\n  }\n  if (getStyleComputedProperty(element, 'position') === 'fixed') {\n    return true;\n  }\n  const parentNode = getParentNode(element);\n  if (!parentNode) {\n    return false;\n  }\n  return isFixed(parentNode);\n}\n","import getStyleComputedProperty from './getStyleComputedProperty';\nimport isIE from './isIE';\n/**\n * Finds the first parent of an element that has a transformed property defined\n * @method\n * @memberof Popper.Utils\n * @argument {Element} element\n * @returns {Element} first transformed parent or documentElement\n */\n\nexport default function getFixedPositionOffsetParent(element) {\n  // This check is needed to avoid errors in case one of the elements isn't defined for any reason\n   if (!element || !element.parentElement || isIE()) {\n    return document.documentElement;\n  }\n  let el = element.parentElement;\n  while (el && getStyleComputedProperty(el, 'transform') === 'none') {\n    el = el.parentElement;\n  }\n  return el || document.documentElement;\n\n}\n","import getScrollParent from './getScrollParent';\nimport getParentNode from './getParentNode';\nimport getReferenceNode from './getReferenceNode';\nimport findCommonOffsetParent from './findCommonOffsetParent';\nimport getOffsetRectRelativeToArbitraryNode from './getOffsetRectRelativeToArbitraryNode';\nimport getViewportOffsetRectRelativeToArtbitraryNode from './getViewportOffsetRectRelativeToArtbitraryNode';\nimport getWindowSizes from './getWindowSizes';\nimport isFixed from './isFixed';\nimport getFixedPositionOffsetParent from './getFixedPositionOffsetParent';\n\n/**\n * Computed the boundaries limits and return them\n * @method\n * @memberof Popper.Utils\n * @param {HTMLElement} popper\n * @param {HTMLElement} reference\n * @param {number} padding\n * @param {HTMLElement} boundariesElement - Element used to define the boundaries\n * @param {Boolean} fixedPosition - Is in fixed position mode\n * @returns {Object} Coordinates of the boundaries\n */\nexport default function getBoundaries(\n  popper,\n  reference,\n  padding,\n  boundariesElement,\n  fixedPosition = false\n) {\n  // NOTE: 1 DOM access here\n\n  let boundaries = { top: 0, left: 0 };\n  const offsetParent = fixedPosition ? getFixedPositionOffsetParent(popper) : findCommonOffsetParent(popper, getReferenceNode(reference));\n\n  // Handle viewport case\n  if (boundariesElement === 'viewport' ) {\n    boundaries = getViewportOffsetRectRelativeToArtbitraryNode(offsetParent, fixedPosition);\n  }\n\n  else {\n    // Handle other cases based on DOM element used as boundaries\n    let boundariesNode;\n    if (boundariesElement === 'scrollParent') {\n      boundariesNode = getScrollParent(getParentNode(reference));\n      if (boundariesNode.nodeName === 'BODY') {\n        boundariesNode = popper.ownerDocument.documentElement;\n      }\n    } else if (boundariesElement === 'window') {\n      boundariesNode = popper.ownerDocument.documentElement;\n    } else {\n      boundariesNode = boundariesElement;\n    }\n\n    const offsets = getOffsetRectRelativeToArbitraryNode(\n      boundariesNode,\n      offsetParent,\n      fixedPosition\n    );\n\n    // In case of HTML, we need a different computation\n    if (boundariesNode.nodeName === 'HTML' && !isFixed(offsetParent)) {\n      const { height, width } = getWindowSizes(popper.ownerDocument);\n      boundaries.top += offsets.top - offsets.marginTop;\n      boundaries.bottom = height + offsets.top;\n      boundaries.left += offsets.left - offsets.marginLeft;\n      boundaries.right = width + offsets.left;\n    } else {\n      // for all the other DOM elements, this one is good\n      boundaries = offsets;\n    }\n  }\n\n  // Add paddings\n  padding = padding || 0;\n  const isPaddingNumber = typeof padding === 'number';\n  boundaries.left += isPaddingNumber ? padding : padding.left || 0; \n  boundaries.top += isPaddingNumber ? padding : padding.top || 0; \n  boundaries.right -= isPaddingNumber ? padding : padding.right || 0; \n  boundaries.bottom -= isPaddingNumber ? padding : padding.bottom || 0; \n\n  return boundaries;\n}\n","import getOffsetRectRelativeToArbitraryNode from './getOffsetRectRelativeToArbitraryNode';\nimport getScroll from './getScroll';\nimport getClientRect from './getClientRect';\n\nexport default function getViewportOffsetRectRelativeToArtbitraryNode(element, excludeScroll = false) {\n  const html = element.ownerDocument.documentElement;\n  const relativeOffset = getOffsetRectRelativeToArbitraryNode(element, html);\n  const width = Math.max(html.clientWidth, window.innerWidth || 0);\n  const height = Math.max(html.clientHeight, window.innerHeight || 0);\n\n  const scrollTop = !excludeScroll ? getScroll(html) : 0;\n  const scrollLeft = !excludeScroll ? getScroll(html, 'left') : 0;\n\n  const offset = {\n    top: scrollTop - relativeOffset.top + relativeOffset.marginTop,\n    left: scrollLeft - relativeOffset.left + relativeOffset.marginLeft,\n    width,\n    height,\n  };\n\n  return getClientRect(offset);\n}\n","import getBoundaries from '../utils/getBoundaries';\n\nfunction getArea({ width, height }) {\n  return width * height;\n}\n\n/**\n * Utility used to transform the `auto` placement to the placement with more\n * available space.\n * @method\n * @memberof Popper.Utils\n * @argument {Object} data - The data object generated by update method\n * @argument {Object} options - Modifiers configuration and options\n * @returns {Object} The data object, properly modified\n */\nexport default function computeAutoPlacement(\n  placement,\n  refRect,\n  popper,\n  reference,\n  boundariesElement,\n  padding = 0\n) {\n  if (placement.indexOf('auto') === -1) {\n    return placement;\n  }\n\n  const boundaries = getBoundaries(\n    popper,\n    reference,\n    padding,\n    boundariesElement\n  );\n\n  const rects = {\n    top: {\n      width: boundaries.width,\n      height: refRect.top - boundaries.top,\n    },\n    right: {\n      width: boundaries.right - refRect.right,\n      height: boundaries.height,\n    },\n    bottom: {\n      width: boundaries.width,\n      height: boundaries.bottom - refRect.bottom,\n    },\n    left: {\n      width: refRect.left - boundaries.left,\n      height: boundaries.height,\n    },\n  };\n\n  const sortedAreas = Object.keys(rects)\n    .map(key => ({\n      key,\n      ...rects[key],\n      area: getArea(rects[key]),\n    }))\n    .sort((a, b) => b.area - a.area);\n\n  const filteredAreas = sortedAreas.filter(\n    ({ width, height }) =>\n      width >= popper.clientWidth && height >= popper.clientHeight\n  );\n\n  const computedPlacement = filteredAreas.length > 0\n    ? filteredAreas[0].key\n    : sortedAreas[0].key;\n\n  const variation = placement.split('-')[1];\n\n  return computedPlacement + (variation ? `-${variation}` : '');\n}\n","import findCommonOffsetParent from './findCommonOffsetParent';\nimport getOffsetRectRelativeToArbitraryNode from './getOffsetRectRelativeToArbitraryNode';\nimport getFixedPositionOffsetParent from './getFixedPositionOffsetParent';\nimport getReferenceNode from './getReferenceNode';\n\n/**\n * Get offsets to the reference element\n * @method\n * @memberof Popper.Utils\n * @param {Object} state\n * @param {Element} popper - the popper element\n * @param {Element} reference - the reference element (the popper will be relative to this)\n * @param {Element} fixedPosition - is in fixed position mode\n * @returns {Object} An object containing the offsets which will be applied to the popper\n */\nexport default function getReferenceOffsets(state, popper, reference, fixedPosition = null) {\n  const commonOffsetParent = fixedPosition ? getFixedPositionOffsetParent(popper) : findCommonOffsetParent(popper, getReferenceNode(reference));\n  return getOffsetRectRelativeToArbitraryNode(reference, commonOffsetParent, fixedPosition);\n}\n","/**\n * Get the outer sizes of the given element (offset size + margins)\n * @method\n * @memberof Popper.Utils\n * @argument {Element} element\n * @returns {Object} object containing width and height properties\n */\nexport default function getOuterSizes(element) {\n  const window = element.ownerDocument.defaultView;\n  const styles = window.getComputedStyle(element);\n  const x = parseFloat(styles.marginTop || 0) + parseFloat(styles.marginBottom || 0);\n  const y = parseFloat(styles.marginLeft || 0) + parseFloat(styles.marginRight || 0);\n  const result = {\n    width: element.offsetWidth + y,\n    height: element.offsetHeight + x,\n  };\n  return result;\n}\n","/**\n * Get the opposite placement of the given one\n * @method\n * @memberof Popper.Utils\n * @argument {String} placement\n * @returns {String} flipped placement\n */\nexport default function getOppositePlacement(placement) {\n  const hash = { left: 'right', right: 'left', bottom: 'top', top: 'bottom' };\n  return placement.replace(/left|right|bottom|top/g, matched => hash[matched]);\n}\n","import getOuterSizes from './getOuterSizes';\nimport getOppositePlacement from './getOppositePlacement';\n\n/**\n * Get offsets to the popper\n * @method\n * @memberof Popper.Utils\n * @param {Object} position - CSS position the Popper will get applied\n * @param {HTMLElement} popper - the popper element\n * @param {Object} referenceOffsets - the reference offsets (the popper will be relative to this)\n * @param {String} placement - one of the valid placement options\n * @returns {Object} popperOffsets - An object containing the offsets which will be applied to the popper\n */\nexport default function getPopperOffsets(popper, referenceOffsets, placement) {\n  placement = placement.split('-')[0];\n\n  // Get popper node sizes\n  const popperRect = getOuterSizes(popper);\n\n  // Add position, width and height to our offsets object\n  const popperOffsets = {\n    width: popperRect.width,\n    height: popperRect.height,\n  };\n\n  // depending by the popper placement we have to compute its offsets slightly differently\n  const isHoriz = ['right', 'left'].indexOf(placement) !== -1;\n  const mainSide = isHoriz ? 'top' : 'left';\n  const secondarySide = isHoriz ? 'left' : 'top';\n  const measurement = isHoriz ? 'height' : 'width';\n  const secondaryMeasurement = !isHoriz ? 'height' : 'width';\n\n  popperOffsets[mainSide] =\n    referenceOffsets[mainSide] +\n    referenceOffsets[measurement] / 2 -\n    popperRect[measurement] / 2;\n  if (placement === secondarySide) {\n    popperOffsets[secondarySide] =\n      referenceOffsets[secondarySide] - popperRect[secondaryMeasurement];\n  } else {\n    popperOffsets[secondarySide] =\n      referenceOffsets[getOppositePlacement(secondarySide)];\n  }\n\n  return popperOffsets;\n}\n","/**\n * Mimics the `find` method of Array\n * @method\n * @memberof Popper.Utils\n * @argument {Array} arr\n * @argument prop\n * @argument value\n * @returns index or -1\n */\nexport default function find(arr, check) {\n  // use native find if supported\n  if (Array.prototype.find) {\n    return arr.find(check);\n  }\n\n  // use `filter` to obtain the same behavior of `find`\n  return arr.filter(check)[0];\n}\n","import isFunction from './isFunction';\nimport findIndex from './findIndex';\nimport getClientRect from '../utils/getClientRect';\n\n/**\n * Loop trough the list of modifiers and run them in order,\n * each of them will then edit the data object.\n * @method\n * @memberof Popper.Utils\n * @param {dataObject} data\n * @param {Array} modifiers\n * @param {String} ends - Optional modifier name used as stopper\n * @returns {dataObject}\n */\nexport default function runModifiers(modifiers, data, ends) {\n  const modifiersToRun = ends === undefined\n    ? modifiers\n    : modifiers.slice(0, findIndex(modifiers, 'name', ends));\n\n  modifiersToRun.forEach(modifier => {\n    if (modifier['function']) { // eslint-disable-line dot-notation\n      console.warn('`modifier.function` is deprecated, use `modifier.fn`!');\n    }\n    const fn = modifier['function'] || modifier.fn; // eslint-disable-line dot-notation\n    if (modifier.enabled && isFunction(fn)) {\n      // Add properties to offsets to make them a complete clientRect object\n      // we do this before each modifier to make sure the previous one doesn't\n      // mess with these values\n      data.offsets.popper = getClientRect(data.offsets.popper);\n      data.offsets.reference = getClientRect(data.offsets.reference);\n\n      data = fn(data, modifier);\n    }\n  });\n\n  return data;\n}\n","import find from './find';\n\n/**\n * Return the index of the matching object\n * @method\n * @memberof Popper.Utils\n * @argument {Array} arr\n * @argument prop\n * @argument value\n * @returns index or -1\n */\nexport default function findIndex(arr, prop, value) {\n  // use native findIndex if supported\n  if (Array.prototype.findIndex) {\n    return arr.findIndex(cur => cur[prop] === value);\n  }\n\n  // use `find` + `indexOf` if `findIndex` isn't supported\n  const match = find(arr, obj => obj[prop] === value);\n  return arr.indexOf(match);\n}\n","import computeAutoPlacement from '../utils/computeAutoPlacement';\nimport getReferenceOffsets from '../utils/getReferenceOffsets';\nimport getPopperOffsets from '../utils/getPopperOffsets';\nimport runModifiers from '../utils/runModifiers';\n\n/**\n * Updates the position of the popper, computing the new offsets and applying\n * the new style.<br />\n * Prefer `scheduleUpdate` over `update` because of performance reasons.\n * @method\n * @memberof Popper\n */\nexport default function update() {\n  // if popper is destroyed, don't perform any further update\n  if (this.state.isDestroyed) {\n    return;\n  }\n\n  let data = {\n    instance: this,\n    styles: {},\n    arrowStyles: {},\n    attributes: {},\n    flipped: false,\n    offsets: {},\n  };\n\n  // compute reference element offsets\n  data.offsets.reference = getReferenceOffsets(\n    this.state,\n    this.popper,\n    this.reference,\n    this.options.positionFixed\n  );\n\n  // compute auto placement, store placement inside the data object,\n  // modifiers will be able to edit `placement` if needed\n  // and refer to originalPlacement to know the original value\n  data.placement = computeAutoPlacement(\n    this.options.placement,\n    data.offsets.reference,\n    this.popper,\n    this.reference,\n    this.options.modifiers.flip.boundariesElement,\n    this.options.modifiers.flip.padding\n  );\n\n  // store the computed placement inside `originalPlacement`\n  data.originalPlacement = data.placement;\n\n  data.positionFixed = this.options.positionFixed;\n\n  // compute the popper offsets\n  data.offsets.popper = getPopperOffsets(\n    this.popper,\n    data.offsets.reference,\n    data.placement\n  );\n\n  data.offsets.popper.position = this.options.positionFixed\n    ? 'fixed'\n    : 'absolute';\n\n  // run the modifiers\n  data = runModifiers(this.modifiers, data);\n\n  // the first `update` will call `onCreate` callback\n  // the other ones will call `onUpdate` callback\n  if (!this.state.isCreated) {\n    this.state.isCreated = true;\n    this.options.onCreate(data);\n  } else {\n    this.options.onUpdate(data);\n  }\n}\n","/**\n * Helper used to know if the given modifier is enabled.\n * @method\n * @memberof Popper.Utils\n * @returns {Boolean}\n */\nexport default function isModifierEnabled(modifiers, modifierName) {\n  return modifiers.some(\n    ({ name, enabled }) => enabled && name === modifierName\n  );\n}\n","/**\n * Get the prefixed supported property name\n * @method\n * @memberof Popper.Utils\n * @argument {String} property (camelCase)\n * @returns {String} prefixed property (camelCase or PascalCase, depending on the vendor prefix)\n */\nexport default function getSupportedPropertyName(property) {\n  const prefixes = [false, 'ms', 'Webkit', 'Moz', 'O'];\n  const upperProp = property.charAt(0).toUpperCase() + property.slice(1);\n\n  for (let i = 0; i < prefixes.length; i++) {\n    const prefix = prefixes[i];\n    const toCheck = prefix ? `${prefix}${upperProp}` : property;\n    if (typeof document.body.style[toCheck] !== 'undefined') {\n      return toCheck;\n    }\n  }\n  return null;\n}\n","import isModifierEnabled from '../utils/isModifierEnabled';\nimport getSupportedPropertyName from '../utils/getSupportedPropertyName';\n\n/**\n * Destroys the popper.\n * @method\n * @memberof Popper\n */\nexport default function destroy() {\n  this.state.isDestroyed = true;\n\n  // touch DOM only if `applyStyle` modifier is enabled\n  if (isModifierEnabled(this.modifiers, 'applyStyle')) {\n    this.popper.removeAttribute('x-placement');\n    this.popper.style.position = '';\n    this.popper.style.top = '';\n    this.popper.style.left = '';\n    this.popper.style.right = '';\n    this.popper.style.bottom = '';\n    this.popper.style.willChange = '';\n    this.popper.style[getSupportedPropertyName('transform')] = '';\n  }\n\n  this.disableEventListeners();\n\n  // remove the popper if user explicitly asked for the deletion on destroy\n  // do not use `remove` because IE11 doesn't support it\n  if (this.options.removeOnDestroy) {\n    this.popper.parentNode.removeChild(this.popper);\n  }\n  return this;\n}\n","/**\n * Get the window associated with the element\n * @argument {Element} element\n * @returns {Window}\n */\nexport default function getWindow(element) {\n  const ownerDocument = element.ownerDocument;\n  return ownerDocument ? ownerDocument.defaultView : window;\n}\n","import getScrollParent from './getScrollParent';\nimport getWindow from './getWindow';\n\nfunction attachToScrollParents(scrollParent, event, callback, scrollParents) {\n  const isBody = scrollParent.nodeName === 'BODY';\n  const target = isBody ? scrollParent.ownerDocument.defaultView : scrollParent;\n  target.addEventListener(event, callback, { passive: true });\n\n  if (!isBody) {\n    attachToScrollParents(\n      getScrollParent(target.parentNode),\n      event,\n      callback,\n      scrollParents\n    );\n  }\n  scrollParents.push(target);\n}\n\n/**\n * Setup needed event listeners used to update the popper position\n * @method\n * @memberof Popper.Utils\n * @private\n */\nexport default function setupEventListeners(\n  reference,\n  options,\n  state,\n  updateBound\n) {\n  // Resize event listener on window\n  state.updateBound = updateBound;\n  getWindow(reference).addEventListener('resize', state.updateBound, { passive: true });\n\n  // Scroll event listener on scroll parents\n  const scrollElement = getScrollParent(reference);\n  attachToScrollParents(\n    scrollElement,\n    'scroll',\n    state.updateBound,\n    state.scrollParents\n  );\n  state.scrollElement = scrollElement;\n  state.eventsEnabled = true;\n\n  return state;\n}\n","import setupEventListeners from '../utils/setupEventListeners';\n\n/**\n * It will add resize/scroll events and start recalculating\n * position of the popper element when they are triggered.\n * @method\n * @memberof Popper\n */\nexport default function enableEventListeners() {\n  if (!this.state.eventsEnabled) {\n    this.state = setupEventListeners(\n      this.reference,\n      this.options,\n      this.state,\n      this.scheduleUpdate\n    );\n  }\n}\n","import removeEventListeners from '../utils/removeEventListeners';\n\n/**\n * It will remove resize/scroll events and won't recalculate popper position\n * when they are triggered. It also won't trigger `onUpdate` callback anymore,\n * unless you call `update` method manually.\n * @method\n * @memberof Popper\n */\nexport default function disableEventListeners() {\n  if (this.state.eventsEnabled) {\n    cancelAnimationFrame(this.scheduleUpdate);\n    this.state = removeEventListeners(this.reference, this.state);\n  }\n}\n","import getWindow from './getWindow';\n\n/**\n * Remove event listeners used to update the popper position\n * @method\n * @memberof Popper.Utils\n * @private\n */\nexport default function removeEventListeners(reference, state) {\n  // Remove resize event listener on window\n  getWindow(reference).removeEventListener('resize', state.updateBound);\n\n  // Remove scroll event listener on scroll parents\n  state.scrollParents.forEach(target => {\n    target.removeEventListener('scroll', state.updateBound);\n  });\n\n  // Reset state\n  state.updateBound = null;\n  state.scrollParents = [];\n  state.scrollElement = null;\n  state.eventsEnabled = false;\n  return state;\n}\n","/**\n * Tells if a given input is a number\n * @method\n * @memberof Popper.Utils\n * @param {*} input to check\n * @return {Boolean}\n */\nexport default function isNumeric(n) {\n  return n !== '' && !isNaN(parseFloat(n)) && isFinite(n);\n}\n","import isNumeric from './isNumeric';\n\n/**\n * Set the style to the given popper\n * @method\n * @memberof Popper.Utils\n * @argument {Element} element - Element to apply the style to\n * @argument {Object} styles\n * Object with a list of properties and values which will be applied to the element\n */\nexport default function setStyles(element, styles) {\n  Object.keys(styles).forEach(prop => {\n    let unit = '';\n    // add unit if the value is numeric and is one of the following\n    if (\n      ['width', 'height', 'top', 'right', 'bottom', 'left'].indexOf(prop) !==\n        -1 &&\n      isNumeric(styles[prop])\n    ) {\n      unit = 'px';\n    }\n    element.style[prop] = styles[prop] + unit;\n  });\n}\n","import getSupportedPropertyName from '../utils/getSupportedPropertyName';\nimport find from '../utils/find';\nimport getOffsetParent from '../utils/getOffsetParent';\nimport getBoundingClientRect from '../utils/getBoundingClientRect';\nimport getRoundedOffsets from '../utils/getRoundedOffsets';\nimport isBrowser from '../utils/isBrowser';\n\nconst isFirefox = isBrowser && /Firefox/i.test(navigator.userAgent);\n\n/**\n * @function\n * @memberof Modifiers\n * @argument {Object} data - The data object generated by `update` method\n * @argument {Object} options - Modifiers configuration and options\n * @returns {Object} The data object, properly modified\n */\nexport default function computeStyle(data, options) {\n  const { x, y } = options;\n  const { popper } = data.offsets;\n\n  // Remove this legacy support in Popper.js v2\n  const legacyGpuAccelerationOption = find(\n    data.instance.modifiers,\n    modifier => modifier.name === 'applyStyle'\n  ).gpuAcceleration;\n  if (legacyGpuAccelerationOption !== undefined) {\n    console.warn(\n      'WARNING: `gpuAcceleration` option moved to `computeStyle` modifier and will not be supported in future versions of Popper.js!'\n    );\n  }\n  const gpuAcceleration =\n    legacyGpuAccelerationOption !== undefined\n      ? legacyGpuAccelerationOption\n      : options.gpuAcceleration;\n\n  const offsetParent = getOffsetParent(data.instance.popper);\n  const offsetParentRect = getBoundingClientRect(offsetParent);\n\n  // Styles\n  const styles = {\n    position: popper.position,\n  };\n\n  const offsets = getRoundedOffsets(\n    data,\n    window.devicePixelRatio < 2 || !isFirefox\n  );\n\n  const sideA = x === 'bottom' ? 'top' : 'bottom';\n  const sideB = y === 'right' ? 'left' : 'right';\n\n  // if gpuAcceleration is set to `true` and transform is supported,\n  //  we use `translate3d` to apply the position to the popper we\n  // automatically use the supported prefixed version if needed\n  const prefixedProperty = getSupportedPropertyName('transform');\n\n  // now, let's make a step back and look at this code closely (wtf?)\n  // If the content of the popper grows once it's been positioned, it\n  // may happen that the popper gets misplaced because of the new content\n  // overflowing its reference element\n  // To avoid this problem, we provide two options (x and y), which allow\n  // the consumer to define the offset origin.\n  // If we position a popper on top of a reference element, we can set\n  // `x` to `top` to make the popper grow towards its top instead of\n  // its bottom.\n  let left, top;\n  if (sideA === 'bottom') {\n    // when offsetParent is <html> the positioning is relative to the bottom of the screen (excluding the scrollbar)\n    // and not the bottom of the html element\n    if (offsetParent.nodeName === 'HTML') {\n      top = -offsetParent.clientHeight + offsets.bottom;\n    } else {\n      top = -offsetParentRect.height + offsets.bottom;\n    }\n  } else {\n    top = offsets.top;\n  }\n  if (sideB === 'right') {\n    if (offsetParent.nodeName === 'HTML') {\n      left = -offsetParent.clientWidth + offsets.right;\n    } else {\n      left = -offsetParentRect.width + offsets.right;\n    }\n  } else {\n    left = offsets.left;\n  }\n  if (gpuAcceleration && prefixedProperty) {\n    styles[prefixedProperty] = `translate3d(${left}px, ${top}px, 0)`;\n    styles[sideA] = 0;\n    styles[sideB] = 0;\n    styles.willChange = 'transform';\n  } else {\n    // othwerise, we use the standard `top`, `left`, `bottom` and `right` properties\n    const invertTop = sideA === 'bottom' ? -1 : 1;\n    const invertLeft = sideB === 'right' ? -1 : 1;\n    styles[sideA] = top * invertTop;\n    styles[sideB] = left * invertLeft;\n    styles.willChange = `${sideA}, ${sideB}`;\n  }\n\n  // Attributes\n  const attributes = {\n    'x-placement': data.placement,\n  };\n\n  // Update `data` attributes, styles and arrowStyles\n  data.attributes = { ...attributes, ...data.attributes };\n  data.styles = { ...styles, ...data.styles };\n  data.arrowStyles = { ...data.offsets.arrow, ...data.arrowStyles };\n\n  return data;\n}\n","import find from './find';\n\n/**\n * Helper used to know if the given modifier depends from another one.<br />\n * It checks if the needed modifier is listed and enabled.\n * @method\n * @memberof Popper.Utils\n * @param {Array} modifiers - list of modifiers\n * @param {String} requestingName - name of requesting modifier\n * @param {String} requestedName - name of requested modifier\n * @returns {Boolean}\n */\nexport default function isModifierRequired(\n  modifiers,\n  requestingName,\n  requestedName\n) {\n  const requesting = find(modifiers, ({ name }) => name === requestingName);\n\n  const isRequired =\n    !!requesting &&\n    modifiers.some(modifier => {\n      return (\n        modifier.name === requestedName &&\n        modifier.enabled &&\n        modifier.order < requesting.order\n      );\n    });\n\n  if (!isRequired) {\n    const requesting = `\\`${requestingName}\\``;\n    const requested = `\\`${requestedName}\\``;\n    console.warn(\n      `${requested} modifier is required by ${requesting} modifier in order to work, be sure to include it before ${requesting}!`\n    );\n  }\n  return isRequired;\n}\n","/**\n * List of accepted placements to use as values of the `placement` option.<br />\n * Valid placements are:\n * - `auto`\n * - `top`\n * - `right`\n * - `bottom`\n * - `left`\n *\n * Each placement can have a variation from this list:\n * - `-start`\n * - `-end`\n *\n * Variations are interpreted easily if you think of them as the left to right\n * written languages. Horizontally (`top` and `bottom`), `start` is left and `end`\n * is right.<br />\n * Vertically (`left` and `right`), `start` is top and `end` is bottom.\n *\n * Some valid examples are:\n * - `top-end` (on top of reference, right aligned)\n * - `right-start` (on right of reference, top aligned)\n * - `bottom` (on bottom, centered)\n * - `auto-end` (on the side with more space available, alignment depends by placement)\n *\n * @static\n * @type {Array}\n * @enum {String}\n * @readonly\n * @method placements\n * @memberof Popper\n */\nexport default [\n  'auto-start',\n  'auto',\n  'auto-end',\n  'top-start',\n  'top',\n  'top-end',\n  'right-start',\n  'right',\n  'right-end',\n  'bottom-end',\n  'bottom',\n  'bottom-start',\n  'left-end',\n  'left',\n  'left-start',\n];\n","import placements from '../methods/placements';\n\n// Get rid of `auto` `auto-start` and `auto-end`\nconst validPlacements = placements.slice(3);\n\n/**\n * Given an initial placement, returns all the subsequent placements\n * clockwise (or counter-clockwise).\n *\n * @method\n * @memberof Popper.Utils\n * @argument {String} placement - A valid placement (it accepts variations)\n * @argument {Boolean} counter - Set to true to walk the placements counterclockwise\n * @returns {Array} placements including their variations\n */\nexport default function clockwise(placement, counter = false) {\n  const index = validPlacements.indexOf(placement);\n  const arr = validPlacements\n    .slice(index + 1)\n    .concat(validPlacements.slice(0, index));\n  return counter ? arr.reverse() : arr;\n}\n","import applyStyle, { applyStyleOnLoad } from './applyStyle';\nimport computeStyle from './computeStyle';\nimport arrow from './arrow';\nimport flip from './flip';\nimport keepTogether from './keepTogether';\nimport offset from './offset';\nimport preventOverflow from './preventOverflow';\nimport shift from './shift';\nimport hide from './hide';\nimport inner from './inner';\n\n/**\n * Modifier function, each modifier can have a function of this type assigned\n * to its `fn` property.<br />\n * These functions will be called on each update, this means that you must\n * make sure they are performant enough to avoid performance bottlenecks.\n *\n * @function ModifierFn\n * @argument {dataObject} data - The data object generated by `update` method\n * @argument {Object} options - Modifiers configuration and options\n * @returns {dataObject} The data object, properly modified\n */\n\n/**\n * Modifiers are plugins used to alter the behavior of your poppers.<br />\n * Popper.js uses a set of 9 modifiers to provide all the basic functionalities\n * needed by the library.\n *\n * Usually you don't want to override the `order`, `fn` and `onLoad` props.\n * All the other properties are configurations that could be tweaked.\n * @namespace modifiers\n */\nexport default {\n  /**\n   * Modifier used to shift the popper on the start or end of its reference\n   * element.<br />\n   * It will read the variation of the `placement` property.<br />\n   * It can be one either `-end` or `-start`.\n   * @memberof modifiers\n   * @inner\n   */\n  shift: {\n    /** @prop {number} order=100 - Index used to define the order of execution */\n    order: 100,\n    /** @prop {Boolean} enabled=true - Whether the modifier is enabled or not */\n    enabled: true,\n    /** @prop {ModifierFn} */\n    fn: shift,\n  },\n\n  /**\n   * The `offset` modifier can shift your popper on both its axis.\n   *\n   * It accepts the following units:\n   * - `px` or unit-less, interpreted as pixels\n   * - `%` or `%r`, percentage relative to the length of the reference element\n   * - `%p`, percentage relative to the length of the popper element\n   * - `vw`, CSS viewport width unit\n   * - `vh`, CSS viewport height unit\n   *\n   * For length is intended the main axis relative to the placement of the popper.<br />\n   * This means that if the placement is `top` or `bottom`, the length will be the\n   * `width`. In case of `left` or `right`, it will be the `height`.\n   *\n   * You can provide a single value (as `Number` or `String`), or a pair of values\n   * as `String` divided by a comma or one (or more) white spaces.<br />\n   * The latter is a deprecated method because it leads to confusion and will be\n   * removed in v2.<br />\n   * Additionally, it accepts additions and subtractions between different units.\n   * Note that multiplications and divisions aren't supported.\n   *\n   * Valid examples are:\n   * ```\n   * 10\n   * '10%'\n   * '10, 10'\n   * '10%, 10'\n   * '10 + 10%'\n   * '10 - 5vh + 3%'\n   * '-10px + 5vh, 5px - 6%'\n   * ```\n   * > **NB**: If you desire to apply offsets to your poppers in a way that may make them overlap\n   * > with their reference element, unfortunately, you will have to disable the `flip` modifier.\n   * > You can read more on this at this [issue](https://github.com/FezVrasta/popper.js/issues/373).\n   *\n   * @memberof modifiers\n   * @inner\n   */\n  offset: {\n    /** @prop {number} order=200 - Index used to define the order of execution */\n    order: 200,\n    /** @prop {Boolean} enabled=true - Whether the modifier is enabled or not */\n    enabled: true,\n    /** @prop {ModifierFn} */\n    fn: offset,\n    /** @prop {Number|String} offset=0\n     * The offset value as described in the modifier description\n     */\n    offset: 0,\n  },\n\n  /**\n   * Modifier used to prevent the popper from being positioned outside the boundary.\n   *\n   * A scenario exists where the reference itself is not within the boundaries.<br />\n   * We can say it has \"escaped the boundaries\" — or just \"escaped\".<br />\n   * In this case we need to decide whether the popper should either:\n   *\n   * - detach from the reference and remain \"trapped\" in the boundaries, or\n   * - if it should ignore the boundary and \"escape with its reference\"\n   *\n   * When `escapeWithReference` is set to`true` and reference is completely\n   * outside its boundaries, the popper will overflow (or completely leave)\n   * the boundaries in order to remain attached to the edge of the reference.\n   *\n   * @memberof modifiers\n   * @inner\n   */\n  preventOverflow: {\n    /** @prop {number} order=300 - Index used to define the order of execution */\n    order: 300,\n    /** @prop {Boolean} enabled=true - Whether the modifier is enabled or not */\n    enabled: true,\n    /** @prop {ModifierFn} */\n    fn: preventOverflow,\n    /**\n     * @prop {Array} [priority=['left','right','top','bottom']]\n     * Popper will try to prevent overflow following these priorities by default,\n     * then, it could overflow on the left and on top of the `boundariesElement`\n     */\n    priority: ['left', 'right', 'top', 'bottom'],\n    /**\n     * @prop {number} padding=5\n     * Amount of pixel used to define a minimum distance between the boundaries\n     * and the popper. This makes sure the popper always has a little padding\n     * between the edges of its container\n     */\n    padding: 5,\n    /**\n     * @prop {String|HTMLElement} boundariesElement='scrollParent'\n     * Boundaries used by the modifier. Can be `scrollParent`, `window`,\n     * `viewport` or any DOM element.\n     */\n    boundariesElement: 'scrollParent',\n  },\n\n  /**\n   * Modifier used to make sure the reference and its popper stay near each other\n   * without leaving any gap between the two. Especially useful when the arrow is\n   * enabled and you want to ensure that it points to its reference element.\n   * It cares only about the first axis. You can still have poppers with margin\n   * between the popper and its reference element.\n   * @memberof modifiers\n   * @inner\n   */\n  keepTogether: {\n    /** @prop {number} order=400 - Index used to define the order of execution */\n    order: 400,\n    /** @prop {Boolean} enabled=true - Whether the modifier is enabled or not */\n    enabled: true,\n    /** @prop {ModifierFn} */\n    fn: keepTogether,\n  },\n\n  /**\n   * This modifier is used to move the `arrowElement` of the popper to make\n   * sure it is positioned between the reference element and its popper element.\n   * It will read the outer size of the `arrowElement` node to detect how many\n   * pixels of conjunction are needed.\n   *\n   * It has no effect if no `arrowElement` is provided.\n   * @memberof modifiers\n   * @inner\n   */\n  arrow: {\n    /** @prop {number} order=500 - Index used to define the order of execution */\n    order: 500,\n    /** @prop {Boolean} enabled=true - Whether the modifier is enabled or not */\n    enabled: true,\n    /** @prop {ModifierFn} */\n    fn: arrow,\n    /** @prop {String|HTMLElement} element='[x-arrow]' - Selector or node used as arrow */\n    element: '[x-arrow]',\n  },\n\n  /**\n   * Modifier used to flip the popper's placement when it starts to overlap its\n   * reference element.\n   *\n   * Requires the `preventOverflow` modifier before it in order to work.\n   *\n   * **NOTE:** this modifier will interrupt the current update cycle and will\n   * restart it if it detects the need to flip the placement.\n   * @memberof modifiers\n   * @inner\n   */\n  flip: {\n    /** @prop {number} order=600 - Index used to define the order of execution */\n    order: 600,\n    /** @prop {Boolean} enabled=true - Whether the modifier is enabled or not */\n    enabled: true,\n    /** @prop {ModifierFn} */\n    fn: flip,\n    /**\n     * @prop {String|Array} behavior='flip'\n     * The behavior used to change the popper's placement. It can be one of\n     * `flip`, `clockwise`, `counterclockwise` or an array with a list of valid\n     * placements (with optional variations)\n     */\n    behavior: 'flip',\n    /**\n     * @prop {number} padding=5\n     * The popper will flip if it hits the edges of the `boundariesElement`\n     */\n    padding: 5,\n    /**\n     * @prop {String|HTMLElement} boundariesElement='viewport'\n     * The element which will define the boundaries of the popper position.\n     * The popper will never be placed outside of the defined boundaries\n     * (except if `keepTogether` is enabled)\n     */\n    boundariesElement: 'viewport',\n    /**\n     * @prop {Boolean} flipVariations=false\n     * The popper will switch placement variation between `-start` and `-end` when\n     * the reference element overlaps its boundaries.\n     *\n     * The original placement should have a set variation.\n     */\n    flipVariations: false,\n    /**\n     * @prop {Boolean} flipVariationsByContent=false\n     * The popper will switch placement variation between `-start` and `-end` when\n     * the popper element overlaps its reference boundaries.\n     *\n     * The original placement should have a set variation.\n     */\n    flipVariationsByContent: false,\n  },\n\n  /**\n   * Modifier used to make the popper flow toward the inner of the reference element.\n   * By default, when this modifier is disabled, the popper will be placed outside\n   * the reference element.\n   * @memberof modifiers\n   * @inner\n   */\n  inner: {\n    /** @prop {number} order=700 - Index used to define the order of execution */\n    order: 700,\n    /** @prop {Boolean} enabled=false - Whether the modifier is enabled or not */\n    enabled: false,\n    /** @prop {ModifierFn} */\n    fn: inner,\n  },\n\n  /**\n   * Modifier used to hide the popper when its reference element is outside of the\n   * popper boundaries. It will set a `x-out-of-boundaries` attribute which can\n   * be used to hide with a CSS selector the popper when its reference is\n   * out of boundaries.\n   *\n   * Requires the `preventOverflow` modifier before it in order to work.\n   * @memberof modifiers\n   * @inner\n   */\n  hide: {\n    /** @prop {number} order=800 - Index used to define the order of execution */\n    order: 800,\n    /** @prop {Boolean} enabled=true - Whether the modifier is enabled or not */\n    enabled: true,\n    /** @prop {ModifierFn} */\n    fn: hide,\n  },\n\n  /**\n   * Computes the style that will be applied to the popper element to gets\n   * properly positioned.\n   *\n   * Note that this modifier will not touch the DOM, it just prepares the styles\n   * so that `applyStyle` modifier can apply it. This separation is useful\n   * in case you need to replace `applyStyle` with a custom implementation.\n   *\n   * This modifier has `850` as `order` value to maintain backward compatibility\n   * with previous versions of Popper.js. Expect the modifiers ordering method\n   * to change in future major versions of the library.\n   *\n   * @memberof modifiers\n   * @inner\n   */\n  computeStyle: {\n    /** @prop {number} order=850 - Index used to define the order of execution */\n    order: 850,\n    /** @prop {Boolean} enabled=true - Whether the modifier is enabled or not */\n    enabled: true,\n    /** @prop {ModifierFn} */\n    fn: computeStyle,\n    /**\n     * @prop {Boolean} gpuAcceleration=true\n     * If true, it uses the CSS 3D transformation to position the popper.\n     * Otherwise, it will use the `top` and `left` properties\n     */\n    gpuAcceleration: true,\n    /**\n     * @prop {string} [x='bottom']\n     * Where to anchor the X axis (`bottom` or `top`). AKA X offset origin.\n     * Change this if your popper should grow in a direction different from `bottom`\n     */\n    x: 'bottom',\n    /**\n     * @prop {string} [x='left']\n     * Where to anchor the Y axis (`left` or `right`). AKA Y offset origin.\n     * Change this if your popper should grow in a direction different from `right`\n     */\n    y: 'right',\n  },\n\n  /**\n   * Applies the computed styles to the popper element.\n   *\n   * All the DOM manipulations are limited to this modifier. This is useful in case\n   * you want to integrate Popper.js inside a framework or view library and you\n   * want to delegate all the DOM manipulations to it.\n   *\n   * Note that if you disable this modifier, you must make sure the popper element\n   * has its position set to `absolute` before Popper.js can do its work!\n   *\n   * Just disable this modifier and define your own to achieve the desired effect.\n   *\n   * @memberof modifiers\n   * @inner\n   */\n  applyStyle: {\n    /** @prop {number} order=900 - Index used to define the order of execution */\n    order: 900,\n    /** @prop {Boolean} enabled=true - Whether the modifier is enabled or not */\n    enabled: true,\n    /** @prop {ModifierFn} */\n    fn: applyStyle,\n    /** @prop {Function} */\n    onLoad: applyStyleOnLoad,\n    /**\n     * @deprecated since version 1.10.0, the property moved to `computeStyle` modifier\n     * @prop {Boolean} gpuAcceleration=true\n     * If true, it uses the CSS 3D transformation to position the popper.\n     * Otherwise, it will use the `top` and `left` properties\n     */\n    gpuAcceleration: undefined,\n  },\n};\n\n/**\n * The `dataObject` is an object containing all the information used by Popper.js.\n * This object is passed to modifiers and to the `onCreate` and `onUpdate` callbacks.\n * @name dataObject\n * @property {Object} data.instance The Popper.js instance\n * @property {String} data.placement Placement applied to popper\n * @property {String} data.originalPlacement Placement originally defined on init\n * @property {Boolean} data.flipped True if popper has been flipped by flip modifier\n * @property {Boolean} data.hide True if the reference element is out of boundaries, useful to know when to hide the popper\n * @property {HTMLElement} data.arrowElement Node used as arrow by arrow modifier\n * @property {Object} data.styles Any CSS property defined here will be applied to the popper. It expects the JavaScript nomenclature (eg. `marginBottom`)\n * @property {Object} data.arrowStyles Any CSS property defined here will be applied to the popper arrow. It expects the JavaScript nomenclature (eg. `marginBottom`)\n * @property {Object} data.boundaries Offsets of the popper boundaries\n * @property {Object} data.offsets The measurements of popper, reference and arrow elements\n * @property {Object} data.offsets.popper `top`, `left`, `width`, `height` values\n * @property {Object} data.offsets.reference `top`, `left`, `width`, `height` values\n * @property {Object} data.offsets.arrow] `top` and `left` offsets, only one of them will be different from 0\n */\n","import modifiers from '../modifiers/index';\n\n/**\n * Default options provided to Popper.js constructor.<br />\n * These can be overridden using the `options` argument of Popper.js.<br />\n * To override an option, simply pass an object with the same\n * structure of the `options` object, as the 3rd argument. For example:\n * ```\n * new Popper(ref, pop, {\n *   modifiers: {\n *     preventOverflow: { enabled: false }\n *   }\n * })\n * ```\n * @type {Object}\n * @static\n * @memberof Popper\n */\nexport default {\n  /**\n   * Popper's placement.\n   * @prop {Popper.placements} placement='bottom'\n   */\n  placement: 'bottom',\n\n  /**\n   * Set this to true if you want popper to position it self in 'fixed' mode\n   * @prop {Boolean} positionFixed=false\n   */\n  positionFixed: false,\n\n  /**\n   * Whether events (resize, scroll) are initially enabled.\n   * @prop {Boolean} eventsEnabled=true\n   */\n  eventsEnabled: true,\n\n  /**\n   * Set to true if you want to automatically remove the popper when\n   * you call the `destroy` method.\n   * @prop {Boolean} removeOnDestroy=false\n   */\n  removeOnDestroy: false,\n\n  /**\n   * Callback called when the popper is created.<br />\n   * By default, it is set to no-op.<br />\n   * Access Popper.js instance with `data.instance`.\n   * @prop {onCreate}\n   */\n  onCreate: () => {},\n\n  /**\n   * Callback called when the popper is updated. This callback is not called\n   * on the initialization/creation of the popper, but only on subsequent\n   * updates.<br />\n   * By default, it is set to no-op.<br />\n   * Access Popper.js instance with `data.instance`.\n   * @prop {onUpdate}\n   */\n  onUpdate: () => {},\n\n  /**\n   * List of modifiers used to modify the offsets before they are applied to the popper.\n   * They provide most of the functionalities of Popper.js.\n   * @prop {modifiers}\n   */\n  modifiers,\n};\n\n/**\n * @callback onCreate\n * @param {dataObject} data\n */\n\n/**\n * @callback onUpdate\n * @param {dataObject} data\n */\n","/**\n * @function\n * @memberof Modifiers\n * @argument {Object} data - The data object generated by `update` method\n * @argument {Object} options - Modifiers configuration and options\n * @returns {Object} The data object, properly modified\n */\nexport default function shift(data) {\n  const placement = data.placement;\n  const basePlacement = placement.split('-')[0];\n  const shiftvariation = placement.split('-')[1];\n\n  // if shift shiftvariation is specified, run the modifier\n  if (shiftvariation) {\n    const { reference, popper } = data.offsets;\n    const isVertical = ['bottom', 'top'].indexOf(basePlacement) !== -1;\n    const side = isVertical ? 'left' : 'top';\n    const measurement = isVertical ? 'width' : 'height';\n\n    const shiftOffsets = {\n      start: { [side]: reference[side] },\n      end: {\n        [side]: reference[side] + reference[measurement] - popper[measurement],\n      },\n    };\n\n    data.offsets.popper = { ...popper, ...shiftOffsets[shiftvariation] };\n  }\n\n  return data;\n}\n","import isNumeric from '../utils/isNumeric';\nimport getClientRect from '../utils/getClientRect';\nimport find from '../utils/find';\n\n/**\n * Converts a string containing value + unit into a px value number\n * @function\n * @memberof {modifiers~offset}\n * @private\n * @argument {String} str - Value + unit string\n * @argument {String} measurement - `height` or `width`\n * @argument {Object} popperOffsets\n * @argument {Object} referenceOffsets\n * @returns {Number|String}\n * Value in pixels, or original string if no values were extracted\n */\nexport function toValue(str, measurement, popperOffsets, referenceOffsets) {\n  // separate value from unit\n  const split = str.match(/((?:\\-|\\+)?\\d*\\.?\\d*)(.*)/);\n  const value = +split[1];\n  const unit = split[2];\n\n  // If it's not a number it's an operator, I guess\n  if (!value) {\n    return str;\n  }\n\n  if (unit.indexOf('%') === 0) {\n    let element;\n    switch (unit) {\n      case '%p':\n        element = popperOffsets;\n        break;\n      case '%':\n      case '%r':\n      default:\n        element = referenceOffsets;\n    }\n\n    const rect = getClientRect(element);\n    return rect[measurement] / 100 * value;\n  } else if (unit === 'vh' || unit === 'vw') {\n    // if is a vh or vw, we calculate the size based on the viewport\n    let size;\n    if (unit === 'vh') {\n      size = Math.max(\n        document.documentElement.clientHeight,\n        window.innerHeight || 0\n      );\n    } else {\n      size = Math.max(\n        document.documentElement.clientWidth,\n        window.innerWidth || 0\n      );\n    }\n    return size / 100 * value;\n  } else {\n    // if is an explicit pixel unit, we get rid of the unit and keep the value\n    // if is an implicit unit, it's px, and we return just the value\n    return value;\n  }\n}\n\n/**\n * Parse an `offset` string to extrapolate `x` and `y` numeric offsets.\n * @function\n * @memberof {modifiers~offset}\n * @private\n * @argument {String} offset\n * @argument {Object} popperOffsets\n * @argument {Object} referenceOffsets\n * @argument {String} basePlacement\n * @returns {Array} a two cells array with x and y offsets in numbers\n */\nexport function parseOffset(\n  offset,\n  popperOffsets,\n  referenceOffsets,\n  basePlacement\n) {\n  const offsets = [0, 0];\n\n  // Use height if placement is left or right and index is 0 otherwise use width\n  // in this way the first offset will use an axis and the second one\n  // will use the other one\n  const useHeight = ['right', 'left'].indexOf(basePlacement) !== -1;\n\n  // Split the offset string to obtain a list of values and operands\n  // The regex addresses values with the plus or minus sign in front (+10, -20, etc)\n  const fragments = offset.split(/(\\+|\\-)/).map(frag => frag.trim());\n\n  // Detect if the offset string contains a pair of values or a single one\n  // they could be separated by comma or space\n  const divider = fragments.indexOf(\n    find(fragments, frag => frag.search(/,|\\s/) !== -1)\n  );\n\n  if (fragments[divider] && fragments[divider].indexOf(',') === -1) {\n    console.warn(\n      'Offsets separated by white space(s) are deprecated, use a comma (,) instead.'\n    );\n  }\n\n  // If divider is found, we divide the list of values and operands to divide\n  // them by ofset X and Y.\n  const splitRegex = /\\s*,\\s*|\\s+/;\n  let ops = divider !== -1\n    ? [\n        fragments\n          .slice(0, divider)\n          .concat([fragments[divider].split(splitRegex)[0]]),\n        [fragments[divider].split(splitRegex)[1]].concat(\n          fragments.slice(divider + 1)\n        ),\n      ]\n    : [fragments];\n\n  // Convert the values with units to absolute pixels to allow our computations\n  ops = ops.map((op, index) => {\n    // Most of the units rely on the orientation of the popper\n    const measurement = (index === 1 ? !useHeight : useHeight)\n      ? 'height'\n      : 'width';\n    let mergeWithPrevious = false;\n    return (\n      op\n        // This aggregates any `+` or `-` sign that aren't considered operators\n        // e.g.: 10 + +5 => [10, +, +5]\n        .reduce((a, b) => {\n          if (a[a.length - 1] === '' && ['+', '-'].indexOf(b) !== -1) {\n            a[a.length - 1] = b;\n            mergeWithPrevious = true;\n            return a;\n          } else if (mergeWithPrevious) {\n            a[a.length - 1] += b;\n            mergeWithPrevious = false;\n            return a;\n          } else {\n            return a.concat(b);\n          }\n        }, [])\n        // Here we convert the string values into number values (in px)\n        .map(str => toValue(str, measurement, popperOffsets, referenceOffsets))\n    );\n  });\n\n  // Loop trough the offsets arrays and execute the operations\n  ops.forEach((op, index) => {\n    op.forEach((frag, index2) => {\n      if (isNumeric(frag)) {\n        offsets[index] += frag * (op[index2 - 1] === '-' ? -1 : 1);\n      }\n    });\n  });\n  return offsets;\n}\n\n/**\n * @function\n * @memberof Modifiers\n * @argument {Object} data - The data object generated by update method\n * @argument {Object} options - Modifiers configuration and options\n * @argument {Number|String} options.offset=0\n * The offset value as described in the modifier description\n * @returns {Object} The data object, properly modified\n */\nexport default function offset(data, { offset }) {\n  const { placement, offsets: { popper, reference } } = data;\n  const basePlacement = placement.split('-')[0];\n\n  let offsets;\n  if (isNumeric(+offset)) {\n    offsets = [+offset, 0];\n  } else {\n    offsets = parseOffset(offset, popper, reference, basePlacement);\n  }\n\n  if (basePlacement === 'left') {\n    popper.top += offsets[0];\n    popper.left -= offsets[1];\n  } else if (basePlacement === 'right') {\n    popper.top += offsets[0];\n    popper.left += offsets[1];\n  } else if (basePlacement === 'top') {\n    popper.left += offsets[0];\n    popper.top -= offsets[1];\n  } else if (basePlacement === 'bottom') {\n    popper.left += offsets[0];\n    popper.top += offsets[1];\n  }\n\n  data.popper = popper;\n  return data;\n}\n","import getOffsetParent from '../utils/getOffsetParent';\nimport getBoundaries from '../utils/getBoundaries';\nimport getSupportedPropertyName from '../utils/getSupportedPropertyName';\n\n/**\n * @function\n * @memberof Modifiers\n * @argument {Object} data - The data object generated by `update` method\n * @argument {Object} options - Modifiers configuration and options\n * @returns {Object} The data object, properly modified\n */\nexport default function preventOverflow(data, options) {\n  let boundariesElement =\n    options.boundariesElement || getOffsetParent(data.instance.popper);\n\n  // If offsetParent is the reference element, we really want to\n  // go one step up and use the next offsetParent as reference to\n  // avoid to make this modifier completely useless and look like broken\n  if (data.instance.reference === boundariesElement) {\n    boundariesElement = getOffsetParent(boundariesElement);\n  }\n\n  // NOTE: DOM access here\n  // resets the popper's position so that the document size can be calculated excluding\n  // the size of the popper element itself\n  const transformProp = getSupportedPropertyName('transform');\n  const popperStyles = data.instance.popper.style; // assignment to help minification\n  const { top, left, [transformProp]: transform } = popperStyles;\n  popperStyles.top = '';\n  popperStyles.left = '';\n  popperStyles[transformProp] = '';\n\n  const boundaries = getBoundaries(\n    data.instance.popper,\n    data.instance.reference,\n    options.padding,\n    boundariesElement,\n    data.positionFixed\n  );\n\n  // NOTE: DOM access here\n  // restores the original style properties after the offsets have been computed\n  popperStyles.top = top;\n  popperStyles.left = left;\n  popperStyles[transformProp] = transform;\n\n  options.boundaries = boundaries;\n\n  const order = options.priority;\n  let popper = data.offsets.popper;\n\n  const check = {\n    primary(placement) {\n      let value = popper[placement];\n      if (\n        popper[placement] < boundaries[placement] &&\n        !options.escapeWithReference\n      ) {\n        value = Math.max(popper[placement], boundaries[placement]);\n      }\n      return { [placement]: value };\n    },\n    secondary(placement) {\n      const mainSide = placement === 'right' ? 'left' : 'top';\n      let value = popper[mainSide];\n      if (\n        popper[placement] > boundaries[placement] &&\n        !options.escapeWithReference\n      ) {\n        value = Math.min(\n          popper[mainSide],\n          boundaries[placement] -\n            (placement === 'right' ? popper.width : popper.height)\n        );\n      }\n      return { [mainSide]: value };\n    },\n  };\n\n  order.forEach(placement => {\n    const side =\n      ['left', 'top'].indexOf(placement) !== -1 ? 'primary' : 'secondary';\n    popper = { ...popper, ...check[side](placement) };\n  });\n\n  data.offsets.popper = popper;\n\n  return data;\n}\n","/**\n * @function\n * @memberof Modifiers\n * @argument {Object} data - The data object generated by update method\n * @argument {Object} options - Modifiers configuration and options\n * @returns {Object} The data object, properly modified\n */\nexport default function keepTogether(data) {\n  const { popper, reference } = data.offsets;\n  const placement = data.placement.split('-')[0];\n  const floor = Math.floor;\n  const isVertical = ['top', 'bottom'].indexOf(placement) !== -1;\n  const side = isVertical ? 'right' : 'bottom';\n  const opSide = isVertical ? 'left' : 'top';\n  const measurement = isVertical ? 'width' : 'height';\n\n  if (popper[side] < floor(reference[opSide])) {\n    data.offsets.popper[opSide] =\n      floor(reference[opSide]) - popper[measurement];\n  }\n  if (popper[opSide] > floor(reference[side])) {\n    data.offsets.popper[opSide] = floor(reference[side]);\n  }\n\n  return data;\n}\n","import getClientRect from '../utils/getClientRect';\nimport getOuterSizes from '../utils/getOuterSizes';\nimport isModifierRequired from '../utils/isModifierRequired';\nimport getStyleComputedProperty from '../utils/getStyleComputedProperty';\n\n/**\n * @function\n * @memberof Modifiers\n * @argument {Object} data - The data object generated by update method\n * @argument {Object} options - Modifiers configuration and options\n * @returns {Object} The data object, properly modified\n */\nexport default function arrow(data, options) {\n  // arrow depends on keepTogether in order to work\n  if (!isModifierRequired(data.instance.modifiers, 'arrow', 'keepTogether')) {\n    return data;\n  }\n\n  let arrowElement = options.element;\n\n  // if arrowElement is a string, suppose it's a CSS selector\n  if (typeof arrowElement === 'string') {\n    arrowElement = data.instance.popper.querySelector(arrowElement);\n\n    // if arrowElement is not found, don't run the modifier\n    if (!arrowElement) {\n      return data;\n    }\n  } else {\n    // if the arrowElement isn't a query selector we must check that the\n    // provided DOM node is child of its popper node\n    if (!data.instance.popper.contains(arrowElement)) {\n      console.warn(\n        'WARNING: `arrow.element` must be child of its popper element!'\n      );\n      return data;\n    }\n  }\n\n  const placement = data.placement.split('-')[0];\n  const { popper, reference } = data.offsets;\n  const isVertical = ['left', 'right'].indexOf(placement) !== -1;\n\n  const len = isVertical ? 'height' : 'width';\n  const sideCapitalized = isVertical ? 'Top' : 'Left';\n  const side = sideCapitalized.toLowerCase();\n  const altSide = isVertical ? 'left' : 'top';\n  const opSide = isVertical ? 'bottom' : 'right';\n  const arrowElementSize = getOuterSizes(arrowElement)[len];\n\n  //\n  // extends keepTogether behavior making sure the popper and its\n  // reference have enough pixels in conjunction\n  //\n\n  // top/left side\n  if (reference[opSide] - arrowElementSize < popper[side]) {\n    data.offsets.popper[side] -=\n      popper[side] - (reference[opSide] - arrowElementSize);\n  }\n  // bottom/right side\n  if (reference[side] + arrowElementSize > popper[opSide]) {\n    data.offsets.popper[side] +=\n      reference[side] + arrowElementSize - popper[opSide];\n  }\n  data.offsets.popper = getClientRect(data.offsets.popper);\n\n  // compute center of the popper\n  const center = reference[side] + reference[len] / 2 - arrowElementSize / 2;\n\n  // Compute the sideValue using the updated popper offsets\n  // take popper margin in account because we don't have this info available\n  const css = getStyleComputedProperty(data.instance.popper);\n  const popperMarginSide = parseFloat(css[`margin${sideCapitalized}`]);\n  const popperBorderSide = parseFloat(css[`border${sideCapitalized}Width`]);\n  let sideValue =\n    center - data.offsets.popper[side] - popperMarginSide - popperBorderSide;\n\n  // prevent arrowElement from being placed not contiguously to its popper\n  sideValue = Math.max(Math.min(popper[len] - arrowElementSize, sideValue), 0);\n\n  data.arrowElement = arrowElement;\n  data.offsets.arrow = {\n    [side]: Math.round(sideValue),\n    [altSide]: '', // make sure to unset any eventual altSide value from the DOM node\n  };\n\n  return data;\n}\n","import getOppositePlacement from '../utils/getOppositePlacement';\nimport getOppositeVariation from '../utils/getOppositeVariation';\nimport getPopperOffsets from '../utils/getPopperOffsets';\nimport runModifiers from '../utils/runModifiers';\nimport getBoundaries from '../utils/getBoundaries';\nimport isModifierEnabled from '../utils/isModifierEnabled';\nimport clockwise from '../utils/clockwise';\n\nconst BEHAVIORS = {\n  FLIP: 'flip',\n  CLOCKWISE: 'clockwise',\n  COUNTERCLOCKWISE: 'counterclockwise',\n};\n\n/**\n * @function\n * @memberof Modifiers\n * @argument {Object} data - The data object generated by update method\n * @argument {Object} options - Modifiers configuration and options\n * @returns {Object} The data object, properly modified\n */\nexport default function flip(data, options) {\n  // if `inner` modifier is enabled, we can't use the `flip` modifier\n  if (isModifierEnabled(data.instance.modifiers, 'inner')) {\n    return data;\n  }\n\n  if (data.flipped && data.placement === data.originalPlacement) {\n    // seems like flip is trying to loop, probably there's not enough space on any of the flippable sides\n    return data;\n  }\n\n  const boundaries = getBoundaries(\n    data.instance.popper,\n    data.instance.reference,\n    options.padding,\n    options.boundariesElement,\n    data.positionFixed\n  );\n\n  let placement = data.placement.split('-')[0];\n  let placementOpposite = getOppositePlacement(placement);\n  let variation = data.placement.split('-')[1] || '';\n\n  let flipOrder = [];\n\n  switch (options.behavior) {\n    case BEHAVIORS.FLIP:\n      flipOrder = [placement, placementOpposite];\n      break;\n    case BEHAVIORS.CLOCKWISE:\n      flipOrder = clockwise(placement);\n      break;\n    case BEHAVIORS.COUNTERCLOCKWISE:\n      flipOrder = clockwise(placement, true);\n      break;\n    default:\n      flipOrder = options.behavior;\n  }\n\n  flipOrder.forEach((step, index) => {\n    if (placement !== step || flipOrder.length === index + 1) {\n      return data;\n    }\n\n    placement = data.placement.split('-')[0];\n    placementOpposite = getOppositePlacement(placement);\n\n    const popperOffsets = data.offsets.popper;\n    const refOffsets = data.offsets.reference;\n\n    // using floor because the reference offsets may contain decimals we are not going to consider here\n    const floor = Math.floor;\n    const overlapsRef =\n      (placement === 'left' &&\n        floor(popperOffsets.right) > floor(refOffsets.left)) ||\n      (placement === 'right' &&\n        floor(popperOffsets.left) < floor(refOffsets.right)) ||\n      (placement === 'top' &&\n        floor(popperOffsets.bottom) > floor(refOffsets.top)) ||\n      (placement === 'bottom' &&\n        floor(popperOffsets.top) < floor(refOffsets.bottom));\n\n    const overflowsLeft = floor(popperOffsets.left) < floor(boundaries.left);\n    const overflowsRight = floor(popperOffsets.right) > floor(boundaries.right);\n    const overflowsTop = floor(popperOffsets.top) < floor(boundaries.top);\n    const overflowsBottom =\n      floor(popperOffsets.bottom) > floor(boundaries.bottom);\n\n    const overflowsBoundaries =\n      (placement === 'left' && overflowsLeft) ||\n      (placement === 'right' && overflowsRight) ||\n      (placement === 'top' && overflowsTop) ||\n      (placement === 'bottom' && overflowsBottom);\n\n    // flip the variation if required\n    const isVertical = ['top', 'bottom'].indexOf(placement) !== -1;\n\n    // flips variation if reference element overflows boundaries\n    const flippedVariationByRef =\n      !!options.flipVariations &&\n      ((isVertical && variation === 'start' && overflowsLeft) ||\n        (isVertical && variation === 'end' && overflowsRight) ||\n        (!isVertical && variation === 'start' && overflowsTop) ||\n        (!isVertical && variation === 'end' && overflowsBottom));\n\n    // flips variation if popper content overflows boundaries\n    const flippedVariationByContent =\n      !!options.flipVariationsByContent &&\n      ((isVertical && variation === 'start' && overflowsRight) ||\n        (isVertical && variation === 'end' && overflowsLeft) ||\n        (!isVertical && variation === 'start' && overflowsBottom) ||\n        (!isVertical && variation === 'end' && overflowsTop));\n\n    const flippedVariation = flippedVariationByRef || flippedVariationByContent;\n\n    if (overlapsRef || overflowsBoundaries || flippedVariation) {\n      // this boolean to detect any flip loop\n      data.flipped = true;\n\n      if (overlapsRef || overflowsBoundaries) {\n        placement = flipOrder[index + 1];\n      }\n\n      if (flippedVariation) {\n        variation = getOppositeVariation(variation);\n      }\n\n      data.placement = placement + (variation ? '-' + variation : '');\n\n      // this object contains `position`, we want to preserve it along with\n      // any additional property we may add in the future\n      data.offsets.popper = {\n        ...data.offsets.popper,\n        ...getPopperOffsets(\n          data.instance.popper,\n          data.offsets.reference,\n          data.placement\n        ),\n      };\n\n      data = runModifiers(data.instance.modifiers, data, 'flip');\n    }\n  });\n  return data;\n}\n","/**\n * Get the opposite placement variation of the given one\n * @method\n * @memberof Popper.Utils\n * @argument {String} placement variation\n * @returns {String} flipped placement variation\n */\nexport default function getOppositeVariation(variation) {\n  if (variation === 'end') {\n    return 'start';\n  } else if (variation === 'start') {\n    return 'end';\n  }\n  return variation;\n}\n","import getClientRect from '../utils/getClientRect';\nimport getOppositePlacement from '../utils/getOppositePlacement';\n\n/**\n * @function\n * @memberof Modifiers\n * @argument {Object} data - The data object generated by `update` method\n * @argument {Object} options - Modifiers configuration and options\n * @returns {Object} The data object, properly modified\n */\nexport default function inner(data) {\n  const placement = data.placement;\n  const basePlacement = placement.split('-')[0];\n  const { popper, reference } = data.offsets;\n  const isHoriz = ['left', 'right'].indexOf(basePlacement) !== -1;\n\n  const subtractLength = ['top', 'left'].indexOf(basePlacement) === -1;\n\n  popper[isHoriz ? 'left' : 'top'] =\n    reference[basePlacement] -\n    (subtractLength ? popper[isHoriz ? 'width' : 'height'] : 0);\n\n  data.placement = getOppositePlacement(placement);\n  data.offsets.popper = getClientRect(popper);\n\n  return data;\n}\n","import isModifierRequired from '../utils/isModifierRequired';\nimport find from '../utils/find';\n\n/**\n * @function\n * @memberof Modifiers\n * @argument {Object} data - The data object generated by update method\n * @argument {Object} options - Modifiers configuration and options\n * @returns {Object} The data object, properly modified\n */\nexport default function hide(data) {\n  if (!isModifierRequired(data.instance.modifiers, 'hide', 'preventOverflow')) {\n    return data;\n  }\n\n  const refRect = data.offsets.reference;\n  const bound = find(\n    data.instance.modifiers,\n    modifier => modifier.name === 'preventOverflow'\n  ).boundaries;\n\n  if (\n    refRect.bottom < bound.top ||\n    refRect.left > bound.right ||\n    refRect.top > bound.bottom ||\n    refRect.right < bound.left\n  ) {\n    // Avoid unnecessary DOM access if visibility hasn't changed\n    if (data.hide === true) {\n      return data;\n    }\n\n    data.hide = true;\n    data.attributes['x-out-of-boundaries'] = '';\n  } else {\n    // Avoid unnecessary DOM access if visibility hasn't changed\n    if (data.hide === false) {\n      return data;\n    }\n\n    data.hide = false;\n    data.attributes['x-out-of-boundaries'] = false;\n  }\n\n  return data;\n}\n","/**\n * @function\n * @memberof Popper.Utils\n * @argument {Object} data - The data object generated by `update` method\n * @argument {Boolean} shouldRound - If the offsets should be rounded at all\n * @returns {Object} The popper's position offsets rounded\n *\n * The tale of pixel-perfect positioning. It's still not 100% perfect, but as\n * good as it can be within reason.\n * Discussion here: https://github.com/FezVrasta/popper.js/pull/715\n *\n * Low DPI screens cause a popper to be blurry if not using full pixels (Safari\n * as well on High DPI screens).\n *\n * Firefox prefers no rounding for positioning and does not have blurriness on\n * high DPI screens.\n *\n * Only horizontal placement and left/right values need to be considered.\n */\nexport default function getRoundedOffsets(data, shouldRound) {\n  const { popper, reference } = data.offsets;\n  const { round, floor } = Math;\n  const noRound = v => v;\n  \n  const referenceWidth = round(reference.width);\n  const popperWidth = round(popper.width);\n  \n  const isVertical = ['left', 'right'].indexOf(data.placement) !== -1;\n  const isVariation = data.placement.indexOf('-') !== -1;\n  const sameWidthParity = referenceWidth % 2 === popperWidth % 2;\n  const bothOddWidth = referenceWidth % 2 === 1 && popperWidth % 2 === 1;\n\n  const horizontalToInteger = !shouldRound\n    ? noRound\n    : isVertical || isVariation || sameWidthParity\n    ? round\n    : floor;\n  const verticalToInteger = !shouldRound ? noRound : round;\n\n  return {\n    left: horizontalToInteger(\n      bothOddWidth && !isVariation && shouldRound\n        ? popper.left - 1\n        : popper.left\n    ),\n    top: verticalToInteger(popper.top),\n    bottom: verticalToInteger(popper.bottom),\n    right: horizontalToInteger(popper.right),\n  };\n}\n","import setStyles from '../utils/setStyles';\nimport setAttributes from '../utils/setAttributes';\nimport getReferenceOffsets from '../utils/getReferenceOffsets';\nimport computeAutoPlacement from '../utils/computeAutoPlacement';\n\n/**\n * @function\n * @memberof Modifiers\n * @argument {Object} data - The data object generated by `update` method\n * @argument {Object} data.styles - List of style properties - values to apply to popper element\n * @argument {Object} data.attributes - List of attribute properties - values to apply to popper element\n * @argument {Object} options - Modifiers configuration and options\n * @returns {Object} The same data object\n */\nexport default function applyStyle(data) {\n  // any property present in `data.styles` will be applied to the popper,\n  // in this way we can make the 3rd party modifiers add custom styles to it\n  // Be aware, modifiers could override the properties defined in the previous\n  // lines of this modifier!\n  setStyles(data.instance.popper, data.styles);\n\n  // any property present in `data.attributes` will be applied to the popper,\n  // they will be set as HTML attributes of the element\n  setAttributes(data.instance.popper, data.attributes);\n\n  // if arrowElement is defined and arrowStyles has some properties\n  if (data.arrowElement && Object.keys(data.arrowStyles).length) {\n    setStyles(data.arrowElement, data.arrowStyles);\n  }\n\n  return data;\n}\n\n/**\n * Set the x-placement attribute before everything else because it could be used\n * to add margins to the popper margins needs to be calculated to get the\n * correct popper offsets.\n * @method\n * @memberof Popper.modifiers\n * @param {HTMLElement} reference - The reference element used to position the popper\n * @param {HTMLElement} popper - The HTML element used as popper\n * @param {Object} options - Popper.js options\n */\nexport function applyStyleOnLoad(\n  reference,\n  popper,\n  options,\n  modifierOptions,\n  state\n) {\n  // compute reference element offsets\n  const referenceOffsets = getReferenceOffsets(state, popper, reference, options.positionFixed);\n\n  // compute auto placement, store placement inside the data object,\n  // modifiers will be able to edit `placement` if needed\n  // and refer to originalPlacement to know the original value\n  const placement = computeAutoPlacement(\n    options.placement,\n    referenceOffsets,\n    popper,\n    reference,\n    options.modifiers.flip.boundariesElement,\n    options.modifiers.flip.padding\n  );\n\n  popper.setAttribute('x-placement', placement);\n\n  // Apply `position` to popper before anything else because\n  // without the position applied we can't guarantee correct computations\n  setStyles(popper, { position: options.positionFixed ? 'fixed' : 'absolute' });\n\n  return options;\n}\n","/**\n * Set the attributes to the given popper\n * @method\n * @memberof Popper.Utils\n * @argument {Element} element - Element to apply the attributes to\n * @argument {Object} styles\n * Object with a list of properties and values which will be applied to the element\n */\nexport default function setAttributes(element, attributes) {\n  Object.keys(attributes).forEach(function(prop) {\n    const value = attributes[prop];\n    if (value !== false) {\n      element.setAttribute(prop, attributes[prop]);\n    } else {\n      element.removeAttribute(prop);\n    }\n  });\n}\n","/**\n * Check if the given variable is a function\n * @method\n * @memberof Popper.Utils\n * @argument {Any} functionToCheck - variable to check\n * @returns {Boolean} answer to: is a function?\n */\nexport default function isFunction(functionToCheck) {\n  const getType = {};\n  return (\n    functionToCheck &&\n    getType.toString.call(functionToCheck) === '[object Function]'\n  );\n}\n","import {\n  type TrackedStorage,\n  createStorage,\n  getValue,\n  setValue,\n} from 'ember-tracked-storage-polyfill';\n\nexport class TrackedMap<K = unknown, V = unknown> implements Map<K, V> {\n  private collection = createStorage(null, () => false);\n\n  private storages: Map<K, TrackedStorage<null>> = new Map();\n\n  private vals: Map<K, V>;\n\n  private readStorageFor(key: K): void {\n    const { storages } = this;\n    let storage = storages.get(key);\n\n    if (storage === undefined) {\n      storage = createStorage(null, () => false);\n      storages.set(key, storage);\n    }\n\n    getValue(storage);\n  }\n\n  private dirtyStorageFor(key: K): void {\n    const storage = this.storages.get(key);\n\n    if (storage) {\n      setValue(storage, null);\n    }\n  }\n\n  constructor();\n  constructor(entries: readonly (readonly [K, V])[] | null);\n  constructor(iterable: Iterable<readonly [K, V]>);\n  constructor(\n    existing?:\n      | readonly (readonly [K, V])[]\n      | Iterable<readonly [K, V]>\n      | null\n      | undefined,\n  ) {\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 ? new Map(existing) : new Map();\n  }\n\n  // **** KEY GETTERS ****\n  get(key: K): V | undefined {\n    // entangle the storage for the key\n    this.readStorageFor(key);\n\n    return this.vals.get(key);\n  }\n\n  has(key: K): boolean {\n    this.readStorageFor(key);\n\n    return this.vals.has(key);\n  }\n\n  // **** ALL GETTERS ****\n  entries(): IterableIterator<[K, V]> {\n    getValue(this.collection);\n\n    return this.vals.entries();\n  }\n\n  keys(): IterableIterator<K> {\n    getValue(this.collection);\n\n    return this.vals.keys();\n  }\n\n  values(): IterableIterator<V> {\n    getValue(this.collection);\n\n    return this.vals.values();\n  }\n\n  forEach(fn: (value: V, key: K, map: Map<K, V>) => void): void {\n    getValue(this.collection);\n\n    this.vals.forEach(fn);\n  }\n\n  get size(): number {\n    getValue(this.collection);\n\n    return this.vals.size;\n  }\n\n  [Symbol.iterator](): IterableIterator<[K, V]> {\n    getValue(this.collection);\n\n    return this.vals[Symbol.iterator]();\n  }\n\n  get [Symbol.toStringTag](): string {\n    return this.vals[Symbol.toStringTag];\n  }\n\n  // **** KEY SETTERS ****\n  set(key: K, value: V): this {\n    this.dirtyStorageFor(key);\n    setValue(this.collection, null);\n\n    this.vals.set(key, value);\n\n    return this;\n  }\n\n  delete(key: K): boolean {\n    this.dirtyStorageFor(key);\n    setValue(this.collection, null);\n\n    this.storages.delete(key);\n    return this.vals.delete(key);\n  }\n\n  // **** ALL SETTERS ****\n  clear(): void {\n    this.storages.forEach((s) => setValue(s, null));\n    this.storages.clear();\n\n    setValue(this.collection, null);\n    this.vals.clear();\n  }\n}\n\n// So instanceof works\nObject.setPrototypeOf(TrackedMap.prototype, Map.prototype);\n\nexport class TrackedWeakMap<K extends object = object, V = unknown>\n  implements WeakMap<K, V>\n{\n  private storages: WeakMap<K, TrackedStorage<null>> = new WeakMap();\n\n  private vals: WeakMap<K, V>;\n\n  private readStorageFor(key: K): void {\n    const { storages } = this;\n    let storage = storages.get(key);\n\n    if (storage === undefined) {\n      storage = createStorage(null, () => false);\n      storages.set(key, storage);\n    }\n\n    getValue(storage);\n  }\n\n  private dirtyStorageFor(key: K): void {\n    const storage = this.storages.get(key);\n\n    if (storage) {\n      setValue(storage, null);\n    }\n  }\n\n  constructor();\n  constructor(iterable: Iterable<readonly [K, V]>);\n  constructor(entries: readonly [K, V][] | null);\n  constructor(\n    existing?: readonly [K, V][] | Iterable<readonly [K, V]> | null | undefined,\n  ) {\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 ? new WeakMap(existing) : new WeakMap();\n  }\n\n  get(key: K): V | undefined {\n    this.readStorageFor(key);\n\n    return this.vals.get(key);\n  }\n\n  has(key: K): boolean {\n    this.readStorageFor(key);\n\n    return this.vals.has(key);\n  }\n\n  set(key: K, value: V): this {\n    this.dirtyStorageFor(key);\n\n    this.vals.set(key, value);\n\n    return this;\n  }\n\n  delete(key: K): boolean {\n    this.dirtyStorageFor(key);\n\n    this.storages.delete(key);\n    return this.vals.delete(key);\n  }\n\n  get [Symbol.toStringTag](): string {\n    return this.vals[Symbol.toStringTag];\n  }\n}\n\n// So instanceof works\nObject.setPrototypeOf(TrackedWeakMap.prototype, WeakMap.prototype);\n","import {\n  type TrackedStorage,\n  createStorage,\n  getValue,\n  setValue,\n} from 'ember-tracked-storage-polyfill';\n\nexport class TrackedSet<T = unknown> implements Set<T> {\n  private collection = createStorage(null, () => false);\n\n  private storages: Map<T, TrackedStorage<null>> = new Map();\n\n  private vals: Set<T>;\n\n  private storageFor(key: T): TrackedStorage<null> {\n    const storages = this.storages;\n    let storage = storages.get(key);\n\n    if (storage === undefined) {\n      storage = createStorage(null, () => false);\n      storages.set(key, storage);\n    }\n\n    return storage;\n  }\n\n  private dirtyStorageFor(key: T): void {\n    const storage = this.storages.get(key);\n\n    if (storage) {\n      setValue(storage, null);\n    }\n  }\n\n  constructor();\n  constructor(values: readonly T[] | null);\n  constructor(iterable: Iterable<T>);\n  constructor(existing?: readonly T[] | Iterable<T> | null | undefined) {\n    this.vals = new Set(existing);\n  }\n\n  // **** KEY GETTERS ****\n  has(value: T): boolean {\n    getValue(this.storageFor(value));\n\n    return this.vals.has(value);\n  }\n\n  // **** ALL GETTERS ****\n  entries(): IterableIterator<[T, T]> {\n    getValue(this.collection);\n\n    return this.vals.entries();\n  }\n\n  keys(): IterableIterator<T> {\n    getValue(this.collection);\n\n    return this.vals.keys();\n  }\n\n  values(): IterableIterator<T> {\n    getValue(this.collection);\n\n    return this.vals.values();\n  }\n\n  forEach(fn: (value1: T, value2: T, set: Set<T>) => void): void {\n    getValue(this.collection);\n\n    this.vals.forEach(fn);\n  }\n\n  get size(): number {\n    getValue(this.collection);\n\n    return this.vals.size;\n  }\n\n  [Symbol.iterator](): IterableIterator<T> {\n    getValue(this.collection);\n\n    return this.vals[Symbol.iterator]();\n  }\n\n  get [Symbol.toStringTag](): string {\n    return this.vals[Symbol.toStringTag];\n  }\n\n  // **** KEY SETTERS ****\n  add(value: T): this {\n    this.dirtyStorageFor(value);\n    setValue(this.collection, null);\n\n    this.vals.add(value);\n\n    return this;\n  }\n\n  delete(value: T): boolean {\n    this.dirtyStorageFor(value);\n    setValue(this.collection, null);\n\n    this.storages.delete(value);\n    return this.vals.delete(value);\n  }\n\n  // **** ALL SETTERS ****\n  clear(): void {\n    this.storages.forEach((s) => setValue(s, null));\n    setValue(this.collection, null);\n\n    this.storages.clear();\n    this.vals.clear();\n  }\n}\n\n// So instanceof works\nObject.setPrototypeOf(TrackedSet.prototype, Set.prototype);\n\nexport class TrackedWeakSet<T extends object = object> implements WeakSet<T> {\n  private storages: WeakMap<T, TrackedStorage<null>> = new WeakMap();\n\n  private vals: WeakSet<T>;\n\n  private storageFor(key: T): TrackedStorage<null> {\n    const storages = this.storages;\n    let storage = storages.get(key);\n\n    if (storage === undefined) {\n      storage = createStorage(null, () => false);\n      storages.set(key, storage);\n    }\n\n    return storage;\n  }\n\n  private dirtyStorageFor(key: T): void {\n    const storage = this.storages.get(key);\n\n    if (storage) {\n      setValue(storage, null);\n    }\n  }\n\n  constructor(values?: readonly T[] | null) {\n    this.vals = new WeakSet(values);\n  }\n\n  has(value: T): boolean {\n    getValue(this.storageFor(value));\n\n    return this.vals.has(value);\n  }\n\n  add(value: T): this {\n    // Add to vals first to get better error message\n    this.vals.add(value);\n\n    this.dirtyStorageFor(value);\n\n    return this;\n  }\n\n  delete(value: T): boolean {\n    this.dirtyStorageFor(value);\n\n    this.storages.delete(value);\n    return this.vals.delete(value);\n  }\n\n  get [Symbol.toStringTag](): string {\n    return this.vals[Symbol.toStringTag];\n  }\n}\n\n// So instanceof works\nObject.setPrototypeOf(TrackedWeakSet.prototype, WeakSet.prototype);\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\nimport {\n  type TrackedStorage,\n  createStorage,\n  getValue,\n  setValue,\n} from 'ember-tracked-storage-polyfill';\n\nconst ARRAY_GETTER_METHODS = new Set<string | symbol | number>([\n  Symbol.iterator,\n  'concat',\n  'entries',\n  'every',\n  'filter',\n  'find',\n  'findIndex',\n  'flat',\n  'flatMap',\n  'forEach',\n  'includes',\n  'indexOf',\n  'join',\n  'keys',\n  'lastIndexOf',\n  'map',\n  'reduce',\n  'reduceRight',\n  'slice',\n  'some',\n  'values',\n]);\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<string | symbol>([\n  'fill',\n  'push',\n  'unshift',\n]);\n\nfunction convertToInt(prop: number | string | symbol): number | null {\n  if (typeof prop === 'symbol') return null;\n\n  const num = Number(prop);\n\n  if (isNaN(num)) return null;\n\n  return num % 1 === 0 ? num : null;\n}\n\n// eslint-disable-next-line @typescript-eslint/no-unsafe-declaration-merging\nclass TrackedArray<T = unknown> {\n  /**\n   * Creates an array from an iterable object.\n   * @param iterable An iterable object to convert to an array.\n   */\n  static from<T>(iterable: Iterable<T> | ArrayLike<T>): TrackedArray<T>;\n\n  /**\n   * Creates an array from an iterable object.\n   * @param iterable An iterable object to convert to an array.\n   * @param mapfn A mapping function to call on every element of the array.\n   * @param thisArg Value of 'this' used to invoke the mapfn.\n   */\n  static from<T, U>(\n    iterable: Iterable<T> | ArrayLike<T>,\n    mapfn: (v: T, k: number) => U,\n    thisArg?: unknown,\n  ): TrackedArray<U>;\n\n  static from<T, U>(\n    iterable: Iterable<T> | ArrayLike<T>,\n    mapfn?: (v: T, k: number) => U,\n    thisArg?: unknown,\n  ): TrackedArray<T> | TrackedArray<U> {\n    return mapfn\n      ? new TrackedArray(Array.from(iterable, mapfn, thisArg))\n      : new TrackedArray(Array.from(iterable));\n  }\n\n  static of<T>(...arr: T[]): TrackedArray<T> {\n    return new TrackedArray(arr);\n  }\n\n  constructor(arr: T[] = []) {\n    const clone = arr.slice();\n    // eslint-disable-next-line @typescript-eslint/no-this-alias\n    const self = this;\n\n    const boundFns = new Map<string | symbol, (...args: any[]) => any>();\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 nativelyAccessingLengthFromPushOrUnshift = false;\n\n    return new Proxy(clone, {\n      get(target, prop /*, _receiver */) {\n        const index = convertToInt(prop);\n\n        if (index !== null) {\n          self.#readStorageFor(index);\n          getValue(self.#collection);\n\n          return target[index];\n        }\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 (nativelyAccessingLengthFromPushOrUnshift) {\n            nativelyAccessingLengthFromPushOrUnshift = false;\n          } else {\n            getValue(self.#collection);\n          }\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          nativelyAccessingLengthFromPushOrUnshift = true;\n        }\n\n        if (ARRAY_GETTER_METHODS.has(prop)) {\n          let fn = boundFns.get(prop);\n\n          if (fn === undefined) {\n            fn = (...args) => {\n              getValue(self.#collection);\n              return (target as any)[prop](...args);\n            };\n\n            boundFns.set(prop, fn);\n          }\n\n          return fn;\n        }\n\n        return (target as any)[prop];\n      },\n\n      set(target, prop, value /*, _receiver */) {\n        (target as any)[prop] = value;\n\n        const index = convertToInt(prop);\n\n        if (index !== null) {\n          self.#dirtyStorageFor(index);\n          self.#dirtyCollection();\n        } else if (prop === 'length') {\n          self.#dirtyCollection();\n        }\n\n        return true;\n      },\n\n      getPrototypeOf() {\n        return TrackedArray.prototype;\n      },\n    }) as TrackedArray<T>;\n  }\n\n  #collection = createStorage(null, () => false);\n\n  #storages = new Map<number, TrackedStorage<null>>();\n\n  #readStorageFor(index: number) {\n    let storage = this.#storages.get(index);\n\n    if (storage === undefined) {\n      storage = createStorage(null, () => false);\n      this.#storages.set(index, storage);\n    }\n\n    getValue(storage);\n  }\n\n  #dirtyStorageFor(index: number): void {\n    const storage = this.#storages.get(index);\n\n    if (storage) {\n      setValue(storage, null);\n    }\n  }\n\n  #dirtyCollection() {\n    setValue(this.#collection, null);\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// eslint-disable-next-line @typescript-eslint/no-empty-interface\ninterface TrackedArray<T = unknown> extends Array<T> {}\n\nexport default TrackedArray;\n\n// Ensure instanceof works correctly\nObject.setPrototypeOf(TrackedArray.prototype, Array.prototype);\n","import {\n  createStorage,\n  getValue,\n  setValue,\n} from 'ember-tracked-storage-polyfill';\n\nclass TrackedObjectImplementation<T extends object> {\n  static fromEntries<T = unknown>(\n    entries: Iterable<readonly [PropertyKey, T]>,\n  ) {\n    return new TrackedObject(Object.fromEntries(entries));\n  }\n\n  constructor(...args: Record<PropertyKey, never> extends T ? [] | [T] : [T]);\n  constructor(obj = {}) {\n    const proto = Object.getPrototypeOf(obj);\n    const descs = Object.getOwnPropertyDescriptors(obj);\n\n    const clone = Object.create(proto);\n\n    for (const prop in descs) {\n      Object.defineProperty(clone, prop, descs[prop]!);\n    }\n\n    // eslint-disable-next-line @typescript-eslint/no-this-alias\n    const self = this;\n\n    return new Proxy(clone, {\n      get(target, prop) {\n        self.#readStorageFor(prop);\n\n        return target[prop];\n      },\n\n      has(target, prop) {\n        self.#readStorageFor(prop);\n\n        return prop in target;\n      },\n\n      ownKeys(target: T) {\n        getValue(self.#collection);\n\n        return Reflect.ownKeys(target);\n      },\n\n      set(target, prop, value) {\n        target[prop] = value;\n\n        self.#dirtyStorageFor(prop);\n        self.#dirtyCollection();\n\n        return true;\n      },\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\n        return true;\n      },\n\n      getPrototypeOf() {\n        return TrackedObjectImplementation.prototype;\n      },\n    });\n  }\n\n  #storages = new Map();\n\n  #collection = createStorage(null, () => false);\n\n  #readStorageFor(key: PropertyKey) {\n    let storage = this.#storages.get(key);\n\n    if (storage === undefined) {\n      storage = createStorage(null, () => false);\n      this.#storages.set(key, storage);\n    }\n\n    getValue(storage);\n  }\n\n  #dirtyStorageFor(key: PropertyKey) {\n    const storage = this.#storages.get(key);\n\n    if (storage) {\n      setValue(storage, null);\n    }\n  }\n\n  #dirtyCollection() {\n    setValue(this.#collection, null);\n  }\n}\n\nexport interface TrackedObject {\n  fromEntries<T = unknown>(\n    entries: Iterable<readonly [PropertyKey, T]>,\n  ): {\n    [k: string]: T;\n  };\n\n  new <T extends Record<PropertyKey, unknown>>(\n    ...args: Record<PropertyKey, never> extends T ? [] | [T] : [T]\n  ): T;\n}\n\nexport const TrackedObject: TrackedObject =\n  TrackedObjectImplementation as unknown as TrackedObject;\n\nexport default TrackedObject;\n","import { tracked as glimmerTracked } from '@glimmer/tracking';\nimport { assert } from '@ember/debug';\n\nimport { TrackedMap, TrackedWeakMap } from './map.ts';\nimport { TrackedSet, TrackedWeakSet } from './set.ts';\nimport TrackedArray from './array.ts';\nimport TrackedObject from './object.ts';\n\nexport default function tracked<T>(obj: T[] | typeof Array): TrackedArray<T>;\n\nexport default function tracked<T>(obj: Set<T> | typeof Set): TrackedSet<T>;\n\nexport default function tracked<T, U>(\n  obj: Map<T, U> | typeof Map,\n): TrackedMap<T, U>;\n\nexport default function tracked<T extends object>(\n  obj: WeakSet<T> | typeof WeakSet,\n): TrackedWeakSet<T>;\n\nexport default function tracked<T extends object, U>(\n  obj: WeakMap<T, U> | typeof WeakMap,\n): TrackedWeakMap<T, U>;\n\nexport default function tracked<T extends object>(obj: T | typeof Object): T;\n\nexport default function tracked(\n  obj: object,\n  key: string | symbol,\n  desc?: PropertyDescriptor,\n): void;\n\nexport default function tracked(\n  obj: object,\n  key?: string | symbol,\n  desc?: PropertyDescriptor,\n): unknown {\n  if (key !== undefined && desc !== undefined) {\n    return glimmerTracked(obj, key, desc);\n  }\n\n  if (Array.isArray(obj)) {\n    return new TrackedArray(obj);\n  }\n\n  switch (obj) {\n    case Object:\n      return new TrackedObject();\n    case Array:\n      return new TrackedArray();\n    case Map:\n      return new TrackedMap();\n    case WeakMap:\n      return new TrackedWeakMap();\n    case Set:\n      return new TrackedSet();\n    case WeakSet:\n      return new TrackedWeakSet();\n  }\n\n  if (obj instanceof Map) {\n    return new TrackedMap(obj);\n  } else if (obj instanceof WeakMap) {\n    return new TrackedWeakMap();\n  } else if (obj instanceof Set) {\n    return new TrackedSet(obj);\n  } else if (obj instanceof WeakSet) {\n    return new TrackedWeakSet();\n  } else {\n    assert(\n      `You must either use tracked as a field decorator, or to wrap built-in class instances:\n\n      class Example {\n        @tracked field = 123;\n\n        map = tracked(Map);\n        map = tracked(new Map());\n      }`,\n      typeof obj === 'object' && obj !== null,\n    );\n\n    return new TrackedObject(obj as Record<PropertyKey, unknown>);\n  }\n}\n","\"use strict\";const AI_CITATIONS=\"ai.citations\",AI_COMPLETION_TOKENS_USED=\"ai.completion_tokens.used\",AI_DOCUMENTS=\"ai.documents\",AI_FINISH_REASON=\"ai.finish_reason\",AI_FREQUENCY_PENALTY=\"ai.frequency_penalty\",AI_FUNCTION_CALL=\"ai.function_call\",AI_GENERATION_ID=\"ai.generation_id\",AI_INPUT_MESSAGES=\"ai.input_messages\",AI_IS_SEARCH_REQUIRED=\"ai.is_search_required\",AI_METADATA=\"ai.metadata\",AI_MODEL_ID=\"ai.model_id\",AI_MODEL_PROVIDER=\"ai.model.provider\",AI_PIPELINE_NAME=\"ai.pipeline.name\",AI_PREAMBLE=\"ai.preamble\",AI_PRESENCE_PENALTY=\"ai.presence_penalty\",AI_PROMPT_TOKENS_USED=\"ai.prompt_tokens.used\",AI_RAW_PROMPTING=\"ai.raw_prompting\",AI_RESPONSES=\"ai.responses\",AI_RESPONSE_FORMAT=\"ai.response_format\",AI_SEARCH_QUERIES=\"ai.search_queries\",AI_SEARCH_RESULTS=\"ai.search_results\",AI_SEED=\"ai.seed\",AI_STREAMING=\"ai.streaming\",AI_TAGS=\"ai.tags\",AI_TEMPERATURE=\"ai.temperature\",AI_TEXTS=\"ai.texts\",AI_TOOLS=\"ai.tools\",AI_TOOL_CALLS=\"ai.tool_calls\",AI_TOP_K=\"ai.top_k\",AI_TOP_P=\"ai.top_p\",AI_TOTAL_COST=\"ai.total_cost\",AI_TOTAL_TOKENS_USED=\"ai.total_tokens.used\",AI_WARNINGS=\"ai.warnings\",ANGULAR_VERSION=\"angular.version\",APP_APP_BUILD=\"app.app_build\",APP_APP_IDENTIFIER=\"app.app_identifier\",APP_APP_NAME=\"app.app_name\",APP_APP_START_TIME=\"app.app_start_time\",APP_APP_VERSION=\"app.app_version\",APP_BUILD=\"app.build\",APP_IDENTIFIER=\"app.identifier\",APP_IN_FOREGROUND=\"app.in_foreground\",APP_NAME=\"app.name\",APP_START_COLD=\"app_start_cold\",APP_START_TIME=\"app.start_time\",APP_START_TYPE=\"app_start_type\",APP_START_WARM=\"app_start_warm\",APP_VERSION=\"app.version\",APP_VITALS_FRAMES_DELAY_VALUE=\"app.vitals.frames.delay.value\",APP_VITALS_FRAMES_FROZEN_COUNT=\"app.vitals.frames.frozen.count\",APP_VITALS_FRAMES_SLOW_COUNT=\"app.vitals.frames.slow.count\",APP_VITALS_FRAMES_TOTAL_COUNT=\"app.vitals.frames.total.count\",APP_VITALS_START_COLD_VALUE=\"app.vitals.start.cold.value\",APP_VITALS_START_PREWARMED=\"app.vitals.start.prewarmed\",APP_VITALS_START_REASON=\"app.vitals.start.reason\",APP_VITALS_START_SCREEN=\"app.vitals.start.screen\",APP_VITALS_START_TYPE=\"app.vitals.start.type\",APP_VITALS_START_WARM_VALUE=\"app.vitals.start.warm.value\",APP_VITALS_TTFD_VALUE=\"app.vitals.ttfd.value\",APP_VITALS_TTID_VALUE=\"app.vitals.ttid.value\",ART_GC_BLOCKING_COUNT=\"art.gc.blocking_count\",ART_GC_BLOCKING_TIME=\"art.gc.blocking_time\",ART_GC_PRE_OOME_COUNT=\"art.gc.pre_oome_count\",ART_GC_TOTAL_COUNT=\"art.gc.total_count\",ART_GC_TOTAL_TIME=\"art.gc.total_time\",ART_GC_WAITING_TIME=\"art.gc.waiting_time\",ART_MEMORY_FREE=\"art.memory.free\",ART_MEMORY_FREE_UNTIL_GC=\"art.memory.free_until_gc\",ART_MEMORY_FREE_UNTIL_OOME=\"art.memory.free_until_oome\",ART_MEMORY_MAX=\"art.memory.max\",ART_MEMORY_TOTAL=\"art.memory.total\",AWS_CLOUDWATCH_LOGS_LOG_GROUP=\"aws.cloudwatch.logs.log_group\",AWS_CLOUDWATCH_LOGS_LOG_STREAM=\"aws.cloudwatch.logs.log_stream\",AWS_CLOUDWATCH_LOGS_URL=\"aws.cloudwatch.logs.url\",AWS_DYNAMODB_ATTRIBUTE_DEFINITIONS=\"aws.dynamodb.attribute_definitions\",AWS_DYNAMODB_CONSISTENT_READ=\"aws.dynamodb.consistent_read\",AWS_DYNAMODB_CONSUMED_CAPACITY=\"aws.dynamodb.consumed_capacity\",AWS_DYNAMODB_COUNT=\"aws.dynamodb.count\",AWS_DYNAMODB_EXCLUSIVE_START_TABLE=\"aws.dynamodb.exclusive_start_table\",AWS_DYNAMODB_GLOBAL_SECONDARY_INDEXES=\"aws.dynamodb.global_secondary_indexes\",AWS_DYNAMODB_GLOBAL_SECONDARY_INDEX_UPDATES=\"aws.dynamodb.global_secondary_index_updates\",AWS_DYNAMODB_INDEX_NAME=\"aws.dynamodb.index_name\",AWS_DYNAMODB_ITEM_COLLECTION_METRICS=\"aws.dynamodb.item_collection_metrics\",AWS_DYNAMODB_LIMIT=\"aws.dynamodb.limit\",AWS_DYNAMODB_LOCAL_SECONDARY_INDEXES=\"aws.dynamodb.local_secondary_indexes\",AWS_DYNAMODB_PROJECTION=\"aws.dynamodb.projection\",AWS_DYNAMODB_PROVISIONED_READ_CAPACITY=\"aws.dynamodb.provisioned_read_capacity\",AWS_DYNAMODB_PROVISIONED_WRITE_CAPACITY=\"aws.dynamodb.provisioned_write_capacity\",AWS_DYNAMODB_SCANNED_COUNT=\"aws.dynamodb.scanned_count\",AWS_DYNAMODB_SCAN_FORWARD=\"aws.dynamodb.scan_forward\",AWS_DYNAMODB_SEGMENT=\"aws.dynamodb.segment\",AWS_DYNAMODB_SELECT=\"aws.dynamodb.select\",AWS_DYNAMODB_TABLE_COUNT=\"aws.dynamodb.table_count\",AWS_DYNAMODB_TABLE_NAMES=\"aws.dynamodb.table_names\",AWS_DYNAMODB_TOTAL_SEGMENTS=\"aws.dynamodb.total_segments\",AWS_EXTENDED_REQUEST_ID=\"aws.extended_request_id\",AWS_KINESIS_STREAM_NAME=\"aws.kinesis.stream_name\",_AWS_KINESIS_STREAM_NAME=\"aws.kinesis.stream.name\",AWS_LAMBDA_AWS_REQUEST_ID=\"aws.lambda.aws_request_id\",AWS_LAMBDA_EXECUTION_DURATION_IN_MILLIS=\"aws.lambda.execution_duration_in_millis\",AWS_LAMBDA_FUNCTION_NAME=\"aws.lambda.function_name\",AWS_LAMBDA_FUNCTION_VERSION=\"aws.lambda.function_version\",AWS_LAMBDA_INVOKED_ARN=\"aws.lambda.invoked_arn\",AWS_LAMBDA_INVOKED_FUNCTION_ARN=\"aws.lambda.invoked_function_arn\",AWS_LAMBDA_REMAINING_TIME_IN_MILLIS=\"aws.lambda.remaining_time_in_millis\",AWS_LOG_GROUP_NAMES=\"aws.log.group.names\",AWS_LOG_STREAM_NAMES=\"aws.log.stream.names\",AWS_REQUEST_EXTENDED_ID=\"aws.request.extended_id\",AWS_REQUEST_ID=\"aws.request_id\",_AWS_REQUEST_ID=\"aws.request.id\",AWS_S3_BUCKET=\"aws.s3.bucket\",AWS_SECRETSMANAGER_SECRET_ARN=\"aws.secretsmanager.secret.arn\",AWS_SNS_TOPIC_ARN=\"aws.sns.topic.arn\",AWS_STEP_FUNCTIONS_ACTIVITY_ARN=\"aws.step_functions.activity.arn\",AWS_STEP_FUNCTIONS_STATE_MACHINE_ARN=\"aws.step_functions.state_machine.arn\",BLOCKED_MAIN_THREAD=\"blocked_main_thread\",BROWSER_NAME=\"browser.name\",BROWSER_PERFORMANCE_NAVIGATION_ACTIVATION_START=\"browser.performance.navigation.activation_start\",BROWSER_PERFORMANCE_TIME_ORIGIN=\"browser.performance.time_origin\",BROWSER_REPORT_TYPE=\"browser.report.type\",BROWSER_SCRIPT_INVOKER=\"browser.script.invoker\",BROWSER_SCRIPT_INVOKER_TYPE=\"browser.script.invoker_type\",BROWSER_SCRIPT_SOURCE_CHAR_POSITION=\"browser.script.source_char_position\",BROWSER_VERSION=\"browser.version\",BROWSER_WEB_VITAL_CLS_REPORT_EVENT=\"browser.web_vital.cls.report_event\",BROWSER_WEB_VITAL_CLS_SOURCE_KEY=\"browser.web_vital.cls.source.<key>\",BROWSER_WEB_VITAL_CLS_SOURCE_KEY_BASE=\"browser.web_vital.cls.source\",BROWSER_WEB_VITAL_CLS_VALUE=\"browser.web_vital.cls.value\",BROWSER_WEB_VITAL_FCP_VALUE=\"browser.web_vital.fcp.value\",BROWSER_WEB_VITAL_FP_VALUE=\"browser.web_vital.fp.value\",BROWSER_WEB_VITAL_INP_VALUE=\"browser.web_vital.inp.value\",BROWSER_WEB_VITAL_LCP_ELEMENT=\"browser.web_vital.lcp.element\",BROWSER_WEB_VITAL_LCP_ID=\"browser.web_vital.lcp.id\",BROWSER_WEB_VITAL_LCP_LOAD_TIME=\"browser.web_vital.lcp.load_time\",BROWSER_WEB_VITAL_LCP_RENDER_TIME=\"browser.web_vital.lcp.render_time\",BROWSER_WEB_VITAL_LCP_REPORT_EVENT=\"browser.web_vital.lcp.report_event\",BROWSER_WEB_VITAL_LCP_SIZE=\"browser.web_vital.lcp.size\",BROWSER_WEB_VITAL_LCP_URL=\"browser.web_vital.lcp.url\",BROWSER_WEB_VITAL_LCP_VALUE=\"browser.web_vital.lcp.value\",BROWSER_WEB_VITAL_TTFB_REQUEST_TIME=\"browser.web_vital.ttfb.request_time\",BROWSER_WEB_VITAL_TTFB_VALUE=\"browser.web_vital.ttfb.value\",CACHE_HIT=\"cache.hit\",CACHE_ITEM_SIZE=\"cache.item_size\",CACHE_KEY=\"cache.key\",CACHE_OPERATION=\"cache.operation\",CACHE_TTL=\"cache.ttl\",CACHE_WRITE=\"cache.write\",CHANNEL=\"channel\",CLIENT_ADDRESS=\"client.address\",CLIENT_PORT=\"client.port\",CLOUDFLARE_D1_DURATION=\"cloudflare.d1.duration\",CLOUDFLARE_D1_QUERY_TYPE=\"cloudflare.d1.query_type\",CLOUDFLARE_D1_ROWS_READ=\"cloudflare.d1.rows_read\",CLOUDFLARE_D1_ROWS_WRITTEN=\"cloudflare.d1.rows_written\",CLOUDFLARE_DURABLE_OBJECT_QUERY_BINDINGS=\"cloudflare.durable_object.query.bindings\",CLOUDFLARE_DURABLE_OBJECT_RESPONSE_ROWS_READ=\"cloudflare.durable_object.response.rows_read\",CLOUDFLARE_DURABLE_OBJECT_RESPONSE_ROWS_WRITTEN=\"cloudflare.durable_object.response.rows_written\",CLOUDFLARE_R2_BUCKET=\"cloudflare.r2.bucket\",CLOUDFLARE_R2_OPERATION=\"cloudflare.r2.operation\",CLOUDFLARE_R2_REQUEST_DELIMITER=\"cloudflare.r2.request.delimiter\",CLOUDFLARE_R2_REQUEST_KEY=\"cloudflare.r2.request.key\",CLOUDFLARE_R2_REQUEST_PART_NUMBER=\"cloudflare.r2.request.part_number\",CLOUDFLARE_R2_REQUEST_PREFIX=\"cloudflare.r2.request.prefix\",CLOUDFLARE_WORKFLOW_ATTEMPT=\"cloudflare.workflow.attempt\",CLOUDFLARE_WORKFLOW_RETRIES_BACKOFF=\"cloudflare.workflow.retries.backoff\",CLOUDFLARE_WORKFLOW_RETRIES_DELAY=\"cloudflare.workflow.retries.delay\",CLOUDFLARE_WORKFLOW_RETRIES_LIMIT=\"cloudflare.workflow.retries.limit\",CLOUDFLARE_WORKFLOW_TIMEOUT=\"cloudflare.workflow.timeout\",CLOUD_ACCOUNT_ID=\"cloud.account.id\",CLOUD_AVAILABILITY_ZONE=\"cloud.availability_zone\",CLOUD_PLATFORM=\"cloud.platform\",CLOUD_PROVIDER=\"cloud.provider\",CLOUD_REGION=\"cloud.region\",CLOUD_RESOURCE_ID=\"cloud.resource_id\",CLS=\"cls\",CLS_SOURCE_KEY=\"cls.source.<key>\",CLS_SOURCE_KEY_BASE=\"cls.source\",CODE_FILEPATH=\"code.filepath\",CODE_FILE_PATH=\"code.file.path\",CODE_FUNCTION=\"code.function\",CODE_FUNCTION_NAME=\"code.function.name\",CODE_LINENO=\"code.lineno\",CODE_LINE_NUMBER=\"code.line.number\",CODE_NAMESPACE=\"code.namespace\",CONNECTIONTYPE=\"connectionType\",CONNECTION_RTT=\"connection.rtt\",CULTURE_CALENDAR=\"culture.calendar\",CULTURE_DISPLAY_NAME=\"culture.display_name\",CULTURE_IS_24_HOUR_FORMAT=\"culture.is_24_hour_format\",CULTURE_LOCALE=\"culture.locale\",CULTURE_TIMEZONE=\"culture.timezone\",DB_COLLECTION_NAME=\"db.collection.name\",DB_DRIVER_NAME=\"db.driver.name\",DB_NAME=\"db.name\",DB_NAMESPACE=\"db.namespace\",DB_OPERATION=\"db.operation\",DB_OPERATION_BATCH_SIZE=\"db.operation.batch.size\",DB_OPERATION_NAME=\"db.operation.name\",DB_QUERY_PARAMETER_KEY=\"db.query.parameter.<key>\",DB_QUERY_PARAMETER_KEY_BASE=\"db.query.parameter\",DB_QUERY_SUMMARY=\"db.query.summary\",DB_QUERY_TEXT=\"db.query.text\",DB_REDIS_CONNECTION=\"db.redis.connection\",DB_REDIS_KEY=\"db.redis.key\",DB_REDIS_PARAMETERS=\"db.redis.parameters\",DB_RESPONSE_STATUS_CODE=\"db.response.status_code\",DB_SQL_BINDINGS=\"db.sql.bindings\",DB_STATEMENT=\"db.statement\",DB_STORED_PROCEDURE_NAME=\"db.stored_procedure.name\",DB_SYSTEM=\"db.system\",DB_SYSTEM_NAME=\"db.system.name\",DB_USER=\"db.user\",DEVICEMEMORY=\"deviceMemory\",DEVICE_ARCHS=\"device.archs\",DEVICE_BATTERY_LEVEL=\"device.battery_level\",DEVICE_BATTERY_TEMPERATURE=\"device.battery_temperature\",DEVICE_BOOT_TIME=\"device.boot_time\",DEVICE_BRAND=\"device.brand\",DEVICE_CHARGING=\"device.charging\",DEVICE_CHIPSET=\"device.chipset\",DEVICE_CLASS=\"device.class\",DEVICE_CONNECTION_TYPE=\"device.connection_type\",DEVICE_CPU_DESCRIPTION=\"device.cpu_description\",DEVICE_EXTERNAL_FREE_STORAGE=\"device.external_free_storage\",DEVICE_EXTERNAL_STORAGE_SIZE=\"device.external_storage_size\",DEVICE_FAMILY=\"device.family\",DEVICE_FREE_MEMORY=\"device.free_memory\",DEVICE_FREE_STORAGE=\"device.free_storage\",DEVICE_ID=\"device.id\",DEVICE_LOCALE=\"device.locale\",DEVICE_LOW_MEMORY=\"device.low_memory\",DEVICE_LOW_POWER_MODE=\"device.low_power_mode\",DEVICE_MANUFACTURER=\"device.manufacturer\",DEVICE_MEMORY_ESTIMATED_CAPACITY=\"device.memory.estimated_capacity\",DEVICE_MEMORY_SIZE=\"device.memory_size\",DEVICE_MODEL=\"device.model\",DEVICE_MODEL_ID=\"device.model_id\",DEVICE_NAME=\"device.name\",DEVICE_ONLINE=\"device.online\",DEVICE_ORIENTATION=\"device.orientation\",DEVICE_PROCESSOR_COUNT=\"device.processor_count\",DEVICE_PROCESSOR_FREQUENCY=\"device.processor_frequency\",DEVICE_SCREEN_DENSITY=\"device.screen_density\",DEVICE_SCREEN_DPI=\"device.screen_dpi\",DEVICE_SCREEN_HEIGHT_PIXELS=\"device.screen_height_pixels\",DEVICE_SCREEN_WIDTH_PIXELS=\"device.screen_width_pixels\",DEVICE_SIMULATOR=\"device.simulator\",DEVICE_STORAGE_SIZE=\"device.storage_size\",DEVICE_THERMAL_STATE=\"device.thermal_state\",DEVICE_TIMEZONE=\"device.timezone\",DEVICE_USABLE_MEMORY=\"device.usable_memory\",DIST=\"dist\",EFFECTIVECONNECTIONTYPE=\"effectiveConnectionType\",ENVIRONMENT=\"environment\",ERROR_TYPE=\"error.type\",EVENT_ID=\"event.id\",EVENT_NAME=\"event.name\",EXCEPTION_ESCAPED=\"exception.escaped\",EXCEPTION_MESSAGE=\"exception.message\",EXCEPTION_STACKTRACE=\"exception.stacktrace\",EXCEPTION_TYPE=\"exception.type\",FAAS_COLDSTART=\"faas.coldstart\",FAAS_CRON=\"faas.cron\",FAAS_DURATION_IN_MS=\"faas.duration_in_ms\",FAAS_ENTRY_POINT=\"faas.entry_point\",FAAS_EXECUTION=\"faas.execution\",FAAS_ID=\"faas.id\",FAAS_IDENTITY=\"faas.identity\",FAAS_INVOCATION_ID=\"faas.invocation_id\",FAAS_INVOKED_NAME=\"faas.invoked_name\",FAAS_INVOKED_PROVIDER=\"faas.invoked_provider\",FAAS_INVOKED_REGION=\"faas.invoked_region\",FAAS_NAME=\"faas.name\",FAAS_TIME=\"faas.time\",FAAS_TRIGGER=\"faas.trigger\",FAAS_VERSION=\"faas.version\",FCP=\"fcp\",FLAG_EVALUATION_KEY=\"flag.evaluation.<key>\",FLAG_EVALUATION_KEY_BASE=\"flag.evaluation\",FP=\"fp\",FRAMES_DELAY=\"frames.delay\",FRAMES_FROZEN=\"frames.frozen\",FRAMES_FROZEN_RATE=\"frames_frozen_rate\",FRAMES_SLOW=\"frames.slow\",FRAMES_SLOW_RATE=\"frames_slow_rate\",FRAMES_TOTAL=\"frames.total\",FS_ERROR=\"fs_error\",GCP_FUNCTION_CONTEXT_EVENT_ID=\"gcp.function.context.event_id\",GCP_FUNCTION_CONTEXT_EVENT_TYPE=\"gcp.function.context.event_type\",GCP_FUNCTION_CONTEXT_ID=\"gcp.function.context.id\",GCP_FUNCTION_CONTEXT_RESOURCE=\"gcp.function.context.resource\",GCP_FUNCTION_CONTEXT_SOURCE=\"gcp.function.context.source\",GCP_FUNCTION_CONTEXT_SPECVERSION=\"gcp.function.context.specversion\",GCP_FUNCTION_CONTEXT_TIME=\"gcp.function.context.time\",GCP_FUNCTION_CONTEXT_TIMESTAMP=\"gcp.function.context.timestamp\",GCP_FUNCTION_CONTEXT_TYPE=\"gcp.function.context.type\",GCP_PROJECT_ID=\"gcp.project.id\",GEN_AI_AGENT_NAME=\"gen_ai.agent.name\",GEN_AI_CONTEXT_UTILIZATION=\"gen_ai.context.utilization\",GEN_AI_CONTEXT_WINDOW_SIZE=\"gen_ai.context.window_size\",GEN_AI_CONVERSATION_ID=\"gen_ai.conversation.id\",GEN_AI_COST_CACHE_CREATION_INPUT_TOKENS=\"gen_ai.cost.cache_creation.input_tokens\",GEN_AI_COST_CACHE_READ_INPUT_TOKENS=\"gen_ai.cost.cache_read.input_tokens\",GEN_AI_COST_INPUT_TOKENS=\"gen_ai.cost.input_tokens\",GEN_AI_COST_OUTPUT_TOKENS=\"gen_ai.cost.output_tokens\",GEN_AI_COST_REASONING_OUTPUT_TOKENS=\"gen_ai.cost.reasoning.output_tokens\",GEN_AI_COST_TOTAL_TOKENS=\"gen_ai.cost.total_tokens\",GEN_AI_EMBEDDINGS_INPUT=\"gen_ai.embeddings.input\",GEN_AI_FUNCTION_ID=\"gen_ai.function_id\",GEN_AI_INPUT_MESSAGES=\"gen_ai.input.messages\",GEN_AI_OPERATION_NAME=\"gen_ai.operation.name\",GEN_AI_OPERATION_TYPE=\"gen_ai.operation.type\",GEN_AI_OUTPUT_MESSAGES=\"gen_ai.output.messages\",GEN_AI_PIPELINE_NAME=\"gen_ai.pipeline.name\",GEN_AI_PROMPT=\"gen_ai.prompt\",GEN_AI_PROMPT_NAME=\"gen_ai.prompt.name\",GEN_AI_PROVIDER_NAME=\"gen_ai.provider.name\",GEN_AI_REQUEST_AVAILABLE_TOOLS=\"gen_ai.request.available_tools\",GEN_AI_REQUEST_FREQUENCY_PENALTY=\"gen_ai.request.frequency_penalty\",GEN_AI_REQUEST_MAX_TOKENS=\"gen_ai.request.max_tokens\",GEN_AI_REQUEST_MESSAGES=\"gen_ai.request.messages\",GEN_AI_REQUEST_MODEL=\"gen_ai.request.model\",GEN_AI_REQUEST_PRESENCE_PENALTY=\"gen_ai.request.presence_penalty\",GEN_AI_REQUEST_REASONING_EFFORT=\"gen_ai.request.reasoning_effort\",GEN_AI_REQUEST_SEED=\"gen_ai.request.seed\",GEN_AI_REQUEST_STOP_SEQUENCES=\"gen_ai.request.stop_sequences\",GEN_AI_REQUEST_TEMPERATURE=\"gen_ai.request.temperature\",GEN_AI_REQUEST_TOP_K=\"gen_ai.request.top_k\",GEN_AI_REQUEST_TOP_P=\"gen_ai.request.top_p\",GEN_AI_RESPONSE_FINISH_REASONS=\"gen_ai.response.finish_reasons\",GEN_AI_RESPONSE_ID=\"gen_ai.response.id\",GEN_AI_RESPONSE_MODEL=\"gen_ai.response.model\",GEN_AI_RESPONSE_STREAMING=\"gen_ai.response.streaming\",GEN_AI_RESPONSE_TEXT=\"gen_ai.response.text\",GEN_AI_RESPONSE_TIME_TO_FIRST_CHUNK=\"gen_ai.response.time_to_first_chunk\",GEN_AI_RESPONSE_TIME_TO_FIRST_TOKEN=\"gen_ai.response.time_to_first_token\",GEN_AI_RESPONSE_TOKENS_PER_SECOND=\"gen_ai.response.tokens_per_second\",GEN_AI_RESPONSE_TOOL_CALLS=\"gen_ai.response.tool_calls\",GEN_AI_SYSTEM=\"gen_ai.system\",GEN_AI_SYSTEM_INSTRUCTIONS=\"gen_ai.system_instructions\",GEN_AI_SYSTEM_MESSAGE=\"gen_ai.system.message\",GEN_AI_TOOL_CALL_ARGUMENTS=\"gen_ai.tool.call.arguments\",GEN_AI_TOOL_CALL_RESULT=\"gen_ai.tool.call.result\",GEN_AI_TOOL_DEFINITIONS=\"gen_ai.tool.definitions\",GEN_AI_TOOL_DESCRIPTION=\"gen_ai.tool.description\",GEN_AI_TOOL_INPUT=\"gen_ai.tool.input\",GEN_AI_TOOL_MESSAGE=\"gen_ai.tool.message\",GEN_AI_TOOL_NAME=\"gen_ai.tool.name\",GEN_AI_TOOL_OUTPUT=\"gen_ai.tool.output\",GEN_AI_TOOL_TYPE=\"gen_ai.tool.type\",GEN_AI_USAGE_CACHE_CREATION_INPUT_TOKENS=\"gen_ai.usage.cache_creation.input_tokens\",GEN_AI_USAGE_CACHE_READ_INPUT_TOKENS=\"gen_ai.usage.cache_read.input_tokens\",GEN_AI_USAGE_COMPLETION_TOKENS=\"gen_ai.usage.completion_tokens\",GEN_AI_USAGE_INPUT_TOKENS=\"gen_ai.usage.input_tokens\",GEN_AI_USAGE_INPUT_TOKENS_CACHED=\"gen_ai.usage.input_tokens.cached\",GEN_AI_USAGE_INPUT_TOKENS_CACHE_WRITE=\"gen_ai.usage.input_tokens.cache_write\",GEN_AI_USAGE_OUTPUT_TOKENS=\"gen_ai.usage.output_tokens\",GEN_AI_USAGE_OUTPUT_TOKENS_REASONING=\"gen_ai.usage.output_tokens.reasoning\",GEN_AI_USAGE_PROMPT_TOKENS=\"gen_ai.usage.prompt_tokens\",GEN_AI_USAGE_REASONING_OUTPUT_TOKENS=\"gen_ai.usage.reasoning.output_tokens\",GEN_AI_USAGE_TOTAL_TOKENS=\"gen_ai.usage.total_tokens\",GRAPHQL_DOCUMENT=\"graphql.document\",GRAPHQL_OPERATION_NAME=\"graphql.operation.name\",GRAPHQL_OPERATION_TYPE=\"graphql.operation.type\",HARDWARECONCURRENCY=\"hardwareConcurrency\",HTTP_CLIENT_IP=\"http.client_ip\",HTTP_DECODED_RESPONSE_CONTENT_LENGTH=\"http.decoded_response_content_length\",HTTP_FLAVOR=\"http.flavor\",HTTP_FRAGMENT=\"http.fragment\",HTTP_HOST=\"http.host\",HTTP_METHOD=\"http.method\",HTTP_QUERY=\"http.query\",HTTP_REQUEST_BODY_DATA=\"http.request.body.data\",HTTP_REQUEST_CONNECTION_END=\"http.request.connection_end\",HTTP_REQUEST_CONNECT_START=\"http.request.connect_start\",HTTP_REQUEST_DOMAIN_LOOKUP_END=\"http.request.domain_lookup_end\",HTTP_REQUEST_DOMAIN_LOOKUP_START=\"http.request.domain_lookup_start\",HTTP_REQUEST_FETCH_START=\"http.request.fetch_start\",HTTP_REQUEST_HEADER_KEY=\"http.request.header.<key>\",HTTP_REQUEST_HEADER_KEY_BASE=\"http.request.header\",HTTP_REQUEST_METHOD=\"http.request.method\",_HTTP_REQUEST_METHOD=\"http.request_method\",HTTP_REQUEST_REDIRECT_END=\"http.request.redirect_end\",HTTP_REQUEST_REDIRECT_START=\"http.request.redirect_start\",HTTP_REQUEST_REQUEST_START=\"http.request.request_start\",HTTP_REQUEST_RESEND_COUNT=\"http.request.resend_count\",HTTP_REQUEST_RESPONSE_END=\"http.request.response_end\",HTTP_REQUEST_RESPONSE_START=\"http.request.response_start\",HTTP_REQUEST_SAME_ORIGIN=\"http.request.same_origin\",HTTP_REQUEST_SECURE_CONNECTION_START=\"http.request.secure_connection_start\",HTTP_REQUEST_TIME_TO_FIRST_BYTE=\"http.request.time_to_first_byte\",HTTP_REQUEST_WORKER_START=\"http.request.worker_start\",HTTP_RESPONSE_BODY_SIZE=\"http.response.body.size\",HTTP_RESPONSE_CONTENT_LENGTH=\"http.response_content_length\",HTTP_RESPONSE_HEADER_CONTENT_LENGTH=\"http.response.header.content-length\",HTTP_RESPONSE_HEADER_KEY=\"http.response.header.<key>\",HTTP_RESPONSE_HEADER_KEY_BASE=\"http.response.header\",HTTP_RESPONSE_SIZE=\"http.response.size\",HTTP_RESPONSE_STATUS_CODE=\"http.response.status_code\",HTTP_RESPONSE_TRANSFER_SIZE=\"http.response_transfer_size\",HTTP_ROUTE=\"http.route\",HTTP_SCHEME=\"http.scheme\",HTTP_SERVER_NAME=\"http.server_name\",HTTP_SERVER_REQUEST_TIME_IN_QUEUE=\"http.server.request.time_in_queue\",HTTP_STATUS_CODE=\"http.status_code\",HTTP_TARGET=\"http.target\",HTTP_URL=\"http.url\",HTTP_USER_AGENT=\"http.user_agent\",ID=\"id\",INP=\"inp\",JSONRPC_PROTOCOL_VERSION=\"jsonrpc.protocol.version\",JSONRPC_REQUEST_ID=\"jsonrpc.request.id\",JVM_GC_ACTION=\"jvm.gc.action\",JVM_GC_NAME=\"jvm.gc.name\",JVM_MEMORY_POOL_NAME=\"jvm.memory.pool.name\",JVM_MEMORY_TYPE=\"jvm.memory.type\",JVM_THREAD_DAEMON=\"jvm.thread.daemon\",JVM_THREAD_STATE=\"jvm.thread.state\",KOA_NAME=\"koa.name\",KOA_TYPE=\"koa.type\",LCP=\"lcp\",LCP_ELEMENT=\"lcp.element\",LCP_ID=\"lcp.id\",LCP_LOADTIME=\"lcp.loadTime\",LCP_RENDERTIME=\"lcp.renderTime\",LCP_SIZE=\"lcp.size\",LCP_URL=\"lcp.url\",LOGGER_NAME=\"logger.name\",MCP_CANCELLED_REASON=\"mcp.cancelled.reason\",MCP_CANCELLED_REQUEST_ID=\"mcp.cancelled.request_id\",MCP_CLIENT_NAME=\"mcp.client.name\",MCP_CLIENT_TITLE=\"mcp.client.title\",MCP_CLIENT_VERSION=\"mcp.client.version\",MCP_LIFECYCLE_PHASE=\"mcp.lifecycle.phase\",MCP_LOGGING_DATA_TYPE=\"mcp.logging.data_type\",MCP_LOGGING_LEVEL=\"mcp.logging.level\",MCP_LOGGING_LOGGER=\"mcp.logging.logger\",MCP_LOGGING_MESSAGE=\"mcp.logging.message\",MCP_METHOD_NAME=\"mcp.method.name\",MCP_PROGRESS_CURRENT=\"mcp.progress.current\",MCP_PROGRESS_MESSAGE=\"mcp.progress.message\",MCP_PROGRESS_PERCENTAGE=\"mcp.progress.percentage\",MCP_PROGRESS_TOKEN=\"mcp.progress.token\",MCP_PROGRESS_TOTAL=\"mcp.progress.total\",MCP_PROMPT_NAME=\"mcp.prompt.name\",MCP_PROMPT_RESULT_DESCRIPTION=\"mcp.prompt.result.description\",MCP_PROMPT_RESULT_MESSAGE_CONTENT=\"mcp.prompt.result.message_content\",MCP_PROMPT_RESULT_MESSAGE_COUNT=\"mcp.prompt.result.message_count\",MCP_PROMPT_RESULT_MESSAGE_ROLE=\"mcp.prompt.result.message_role\",MCP_PROTOCOL_READY=\"mcp.protocol.ready\",MCP_PROTOCOL_VERSION=\"mcp.protocol.version\",MCP_REQUEST_ARGUMENT_KEY=\"mcp.request.argument.<key>\",MCP_REQUEST_ARGUMENT_KEY_BASE=\"mcp.request.argument\",MCP_REQUEST_ARGUMENT_NAME=\"mcp.request.argument.name\",MCP_REQUEST_ARGUMENT_URI=\"mcp.request.argument.uri\",MCP_REQUEST_ID=\"mcp.request.id\",MCP_RESOURCE_PROTOCOL=\"mcp.resource.protocol\",MCP_RESOURCE_URI=\"mcp.resource.uri\",MCP_SERVER_NAME=\"mcp.server.name\",MCP_SERVER_TITLE=\"mcp.server.title\",MCP_SERVER_VERSION=\"mcp.server.version\",MCP_SESSION_ID=\"mcp.session.id\",MCP_TOOL_NAME=\"mcp.tool.name\",MCP_TOOL_RESULT_CONTENT=\"mcp.tool.result.content\",MCP_TOOL_RESULT_CONTENT_COUNT=\"mcp.tool.result.content_count\",MCP_TOOL_RESULT_IS_ERROR=\"mcp.tool.result.is_error\",MCP_TRANSPORT=\"mcp.transport\",MDC_KEY=\"mdc.<key>\",MDC_KEY_BASE=\"mdc\",MESSAGING_BATCH_MESSAGE_COUNT=\"messaging.batch.message_count\",MESSAGING_DESTINATION=\"messaging.destination\",MESSAGING_DESTINATION_CONNECTION=\"messaging.destination.connection\",MESSAGING_DESTINATION_NAME=\"messaging.destination.name\",MESSAGING_MESSAGE_BODY_SIZE=\"messaging.message.body.size\",MESSAGING_MESSAGE_CONVERSATION_ID=\"messaging.message.conversation_id\",MESSAGING_MESSAGE_ENVELOPE_SIZE=\"messaging.message.envelope.size\",MESSAGING_MESSAGE_ID=\"messaging.message.id\",MESSAGING_MESSAGE_RECEIVE_LATENCY=\"messaging.message.receive.latency\",MESSAGING_MESSAGE_RETRY_COUNT=\"messaging.message.retry.count\",MESSAGING_OPERATION_NAME=\"messaging.operation.name\",MESSAGING_OPERATION_TYPE=\"messaging.operation.type\",MESSAGING_RABBITMQ_DESTINATION_ROUTING_KEY=\"messaging.rabbitmq.destination.routing_key\",MESSAGING_SYSTEM=\"messaging.system\",METHOD=\"method\",MIDDLEWARE_NAME=\"middleware.name\",NAVIGATION_ORIGIN=\"navigation.origin\",NAVIGATION_ROUTE_ID=\"navigation.route.id\",NAVIGATION_TYPE=\"navigation.type\",NEL_ELAPSED_TIME=\"nel.elapsed_time\",NEL_PHASE=\"nel.phase\",NEL_REFERRER=\"nel.referrer\",NEL_SAMPLING_FUNCTION=\"nel.sampling_function\",NEL_TYPE=\"nel.type\",NETWORK_CONNECTION_EFFECTIVE_TYPE=\"network.connection.effective_type\",NETWORK_CONNECTION_RTT=\"network.connection.rtt\",NETWORK_CONNECTION_TYPE=\"network.connection.type\",NETWORK_LOCAL_ADDRESS=\"network.local.address\",NETWORK_LOCAL_PORT=\"network.local.port\",NETWORK_PEER_ADDRESS=\"network.peer.address\",NETWORK_PEER_PORT=\"network.peer.port\",NETWORK_PROTOCOL_NAME=\"network.protocol.name\",NETWORK_PROTOCOL_VERSION=\"network.protocol.version\",NETWORK_TRANSPORT=\"network.transport\",NETWORK_TYPE=\"network.type\",NET_HOST_IP=\"net.host.ip\",NET_HOST_NAME=\"net.host.name\",NET_HOST_PORT=\"net.host.port\",NET_PEER_IP=\"net.peer.ip\",NET_PEER_NAME=\"net.peer.name\",NET_PEER_PORT=\"net.peer.port\",NET_PROTOCOL_NAME=\"net.protocol.name\",NET_PROTOCOL_VERSION=\"net.protocol.version\",NET_SOCK_FAMILY=\"net.sock.family\",NET_SOCK_HOST_ADDR=\"net.sock.host.addr\",NET_SOCK_HOST_PORT=\"net.sock.host.port\",NET_SOCK_PEER_ADDR=\"net.sock.peer.addr\",NET_SOCK_PEER_NAME=\"net.sock.peer.name\",NET_SOCK_PEER_PORT=\"net.sock.peer.port\",NET_TRANSPORT=\"net.transport\",OS_BUILD=\"os.build\",OS_BUILD_ID=\"os.build_id\",OS_DESCRIPTION=\"os.description\",OS_KERNEL_VERSION=\"os.kernel_version\",OS_NAME=\"os.name\",OS_RAW_DESCRIPTION=\"os.raw_description\",OS_ROOTED=\"os.rooted\",OS_THEME=\"os.theme\",OS_TYPE=\"os.type\",OS_VERSION=\"os.version\",OTEL_KIND=\"otel.kind\",OTEL_SCOPE_NAME=\"otel.scope.name\",OTEL_SCOPE_VERSION=\"otel.scope.version\",OTEL_STATUS_CODE=\"otel.status_code\",OTEL_STATUS_DESCRIPTION=\"otel.status_description\",PARAMS_KEY=\"params.<key>\",PARAMS_KEY_BASE=\"params\",PERFORMANCE_ACTIVATIONSTART=\"performance.activationStart\",PERFORMANCE_TIMEORIGIN=\"performance.timeOrigin\",PREVIOUS_ROUTE=\"previous_route\",PROCESS_COMMAND_ARGS=\"process.command_args\",PROCESS_EXECUTABLE_NAME=\"process.executable.name\",PROCESS_PID=\"process.pid\",PROCESS_RUNTIME_DESCRIPTION=\"process.runtime.description\",PROCESS_RUNTIME_ENGINE_NAME=\"process.runtime.engine.name\",PROCESS_RUNTIME_ENGINE_VERSION=\"process.runtime.engine.version\",PROCESS_RUNTIME_NAME=\"process.runtime.name\",PROCESS_RUNTIME_VERSION=\"process.runtime.version\",QUERY_KEY=\"query.<key>\",QUERY_KEY_BASE=\"query\",REACT_VERSION=\"react.version\",RELEASE=\"release\",REMIX_ACTION_FORM_DATA_KEY=\"remix.action_form_data.<key>\",REMIX_ACTION_FORM_DATA_KEY_BASE=\"remix.action_form_data\",REPLAY_ID=\"replay_id\",RESOURCE_DEPLOYMENT_ENVIRONMENT=\"resource.deployment.environment\",RESOURCE_DEPLOYMENT_ENVIRONMENT_NAME=\"resource.deployment.environment.name\",RESOURCE_RENDER_BLOCKING_STATUS=\"resource.render_blocking_status\",ROUTE=\"route\",RPC_GRPC_STATUS_CODE=\"rpc.grpc.status_code\",RPC_METHOD=\"rpc.method\",RPC_RESPONSE_STATUS_CODE=\"rpc.response.status_code\",RPC_SERVICE=\"rpc.service\",RPC_SYSTEM=\"rpc.system\",RPC_SYSTEM_NAME=\"rpc.system.name\",RUNTIME_BUILD=\"runtime.build\",RUNTIME_NAME=\"runtime.name\",RUNTIME_RAW_DESCRIPTION=\"runtime.raw_description\",RUNTIME_VERSION=\"runtime.version\",SCORE_KEY=\"score.<key>\",SCORE_KEY_BASE=\"score\",SCORE_RATIO_KEY=\"score.ratio.<key>\",SCORE_RATIO_KEY_BASE=\"score.ratio\",SCORE_TOTAL=\"score.total\",SCORE_WEIGHT_KEY=\"score.weight.<key>\",SCORE_WEIGHT_KEY_BASE=\"score.weight\",SENTRY_ACTION=\"sentry.action\",SENTRY_BROWSER_NAME=\"sentry.browser.name\",SENTRY_BROWSER_VERSION=\"sentry.browser.version\",SENTRY_CANCELLATION_REASON=\"sentry.cancellation_reason\",SENTRY_CATEGORY=\"sentry.category\",SENTRY_CLIENT_SAMPLE_RATE=\"sentry.client_sample_rate\",SENTRY_DESCRIPTION=\"sentry.description\",SENTRY_DIST=\"sentry.dist\",SENTRY_DOMAIN=\"sentry.domain\",SENTRY_DSC_ENVIRONMENT=\"sentry.dsc.environment\",SENTRY_DSC_PROJECT_ID=\"sentry.dsc.project_id\",SENTRY_DSC_PUBLIC_KEY=\"sentry.dsc.public_key\",SENTRY_DSC_RELEASE=\"sentry.dsc.release\",SENTRY_DSC_SAMPLED=\"sentry.dsc.sampled\",SENTRY_DSC_SAMPLE_RATE=\"sentry.dsc.sample_rate\",SENTRY_DSC_TRACE_ID=\"sentry.dsc.trace_id\",SENTRY_DSC_TRANSACTION=\"sentry.dsc.transaction\",SENTRY_ENVIRONMENT=\"sentry.environment\",SENTRY_EXCLUSIVE_TIME=\"sentry.exclusive_time\",SENTRY_GRAPHQL_OPERATION=\"sentry.graphql.operation\",SENTRY_GROUP=\"sentry.group\",SENTRY_HTTP_PREFETCH=\"sentry.http.prefetch\",SENTRY_IDLE_SPAN_FINISH_REASON=\"sentry.idle_span_finish_reason\",SENTRY_IS_REMOTE=\"sentry.is_remote\",SENTRY_KIND=\"sentry.kind\",SENTRY_MAIN_THREAD=\"sentry.main_thread\",SENTRY_MESSAGE_PARAMETER_KEY=\"sentry.message.parameter.<key>\",SENTRY_MESSAGE_TEMPLATE=\"sentry.message.template\",SENTRY_METRIC_SOURCE=\"sentry.metric.source\",SENTRY_MOBILE=\"sentry.mobile\",SENTRY_MODULE_KEY=\"sentry.module.<key>\",SENTRY_MODULE_KEY_BASE=\"sentry.module\",SENTRY_NEXTJS_SSR_FUNCTION_ROUTE=\"sentry.nextjs.ssr.function.route\",SENTRY_NEXTJS_SSR_FUNCTION_TYPE=\"sentry.nextjs.ssr.function.type\",SENTRY_NORMALIZED_DB_QUERY=\"sentry.normalized_db_query\",SENTRY_NORMALIZED_DB_QUERY_HASH=\"sentry.normalized_db_query.hash\",SENTRY_NORMALIZED_DESCRIPTION=\"sentry.normalized_description\",SENTRY_OBSERVED_TIMESTAMP_NANOS=\"sentry.observed_timestamp_nanos\",SENTRY_OP=\"sentry.op\",SENTRY_ORIGIN=\"sentry.origin\",SENTRY_PLATFORM=\"sentry.platform\",SENTRY_PROFILER_ID=\"sentry.profiler_id\",SENTRY_PROFILE_ID=\"sentry.profile_id\",SENTRY_RELEASE=\"sentry.release\",SENTRY_REPLAY_ID=\"sentry.replay_id\",SENTRY_REPLAY_IS_BUFFERING=\"sentry.replay_is_buffering\",SENTRY_REPORT_EVENT=\"sentry.report_event\",SENTRY_SDK_INTEGRATIONS=\"sentry.sdk.integrations\",SENTRY_SDK_NAME=\"sentry.sdk.name\",SENTRY_SDK_VERSION=\"sentry.sdk.version\",SENTRY_SEGMENT_ID=\"sentry.segment.id\",_SENTRY_SEGMENT_ID=\"sentry.segment_id\",SENTRY_SEGMENT_NAME=\"sentry.segment.name\",SENTRY_SERVER_SAMPLE_RATE=\"sentry.server_sample_rate\",SENTRY_SOURCE=\"sentry.source\",SENTRY_SPAN_SOURCE=\"sentry.span.source\",SENTRY_STATUS=\"sentry.status\",SENTRY_STATUS_CODE=\"sentry.status_code\",SENTRY_STATUS_MESSAGE=\"sentry.status.message\",SENTRY_SVELTEKIT_NAVIGATION_FROM=\"sentry.sveltekit.navigation.from\",SENTRY_SVELTEKIT_NAVIGATION_TO=\"sentry.sveltekit.navigation.to\",SENTRY_SVELTEKIT_NAVIGATION_TYPE=\"sentry.sveltekit.navigation.type\",SENTRY_THREAD_ID=\"sentry.thread.id\",SENTRY_TIMESTAMP_SEQUENCE=\"sentry.timestamp.sequence\",SENTRY_TRACE_LIFECYCLE=\"sentry.trace_lifecycle\",SENTRY_TRACE_PARENT_SPAN_ID=\"sentry.trace.parent_span_id\",SENTRY_TRACE_STATUS=\"sentry.trace.status\",SENTRY_TRANSACTION=\"sentry.transaction\",SENTRY_USER_EMAIL=\"sentry.user.email\",SENTRY_USER_GEO_CITY=\"sentry.user.geo.city\",SENTRY_USER_GEO_COUNTRY_CODE=\"sentry.user.geo.country_code\",SENTRY_USER_GEO_REGION=\"sentry.user.geo.region\",SENTRY_USER_GEO_SUBDIVISION=\"sentry.user.geo.subdivision\",SENTRY_USER_ID=\"sentry.user.id\",SENTRY_USER_IP=\"sentry.user.ip\",SENTRY_USER_USERNAME=\"sentry.user.username\",SERVER_ADDRESS=\"server.address\",SERVER_NAME=\"server_name\",SERVER_PORT=\"server.port\",SERVICE_NAME=\"service.name\",SERVICE_VERSION=\"service.version\",SESSION_ID=\"session.id\",STALL_PERCENTAGE=\"stall_percentage\",STALL_TOTAL_TIME=\"stall_total_time\",STATE_TYPE=\"state.type\",THREAD_ID=\"thread.id\",THREAD_NAME=\"thread.name\",TIMBER_TAG=\"timber.tag\",TIME_TO_FULL_DISPLAY=\"time_to_full_display\",TIME_TO_INITIAL_DISPLAY=\"time_to_initial_display\",TRANSACTION=\"transaction\",TRPC_PROCEDURE_PATH=\"trpc.procedure_path\",TRPC_PROCEDURE_TYPE=\"trpc.procedure_type\",TTFB=\"ttfb\",TTFB_REQUESTTIME=\"ttfb.requestTime\",TYPE=\"type\",UI_COMPONENT_NAME=\"ui.component_name\",UI_CONTRIBUTES_TO_TTFD=\"ui.contributes_to_ttfd\",UI_CONTRIBUTES_TO_TTID=\"ui.contributes_to_ttid\",UI_ELEMENT_HEIGHT=\"ui.element.height\",UI_ELEMENT_ID=\"ui.element.id\",UI_ELEMENT_IDENTIFIER=\"ui.element.identifier\",UI_ELEMENT_LOAD_TIME=\"ui.element.load_time\",UI_ELEMENT_PAINT_TYPE=\"ui.element.paint_type\",UI_ELEMENT_RENDER_TIME=\"ui.element.render_time\",UI_ELEMENT_TYPE=\"ui.element.type\",UI_ELEMENT_URL=\"ui.element.url\",UI_ELEMENT_WIDTH=\"ui.element.width\",URL=\"url\",URL_DOMAIN=\"url.domain\",URL_FRAGMENT=\"url.fragment\",URL_FULL=\"url.full\",URL_PATH=\"url.path\",URL_PATH_PARAMETER_KEY=\"url.path.parameter.<key>\",URL_PATH_PARAMETER_KEY_BASE=\"url.path.parameter\",URL_PORT=\"url.port\",URL_QUERY=\"url.query\",URL_SAME_ORIGIN=\"url.same_origin\",URL_SCHEME=\"url.scheme\",URL_TEMPLATE=\"url.template\",USER_AGENT_ORIGINAL=\"user_agent.original\",USER_EMAIL=\"user.email\",USER_FULL_NAME=\"user.full_name\",USER_GEO_CITY=\"user.geo.city\",USER_GEO_COUNTRY_CODE=\"user.geo.country_code\",USER_GEO_REGION=\"user.geo.region\",USER_GEO_SUBDIVISION=\"user.geo.subdivision\",USER_HASH=\"user.hash\",USER_ID=\"user.id\",USER_IP_ADDRESS=\"user.ip_address\",USER_NAME=\"user.name\",USER_ROLES=\"user.roles\",VERCEL_BRANCH=\"vercel.branch\",VERCEL_BUILD_ID=\"vercel.build_id\",VERCEL_DEPLOYMENT_ID=\"vercel.deployment_id\",VERCEL_DESTINATION=\"vercel.destination\",VERCEL_EDGE_TYPE=\"vercel.edge_type\",VERCEL_ENTRYPOINT=\"vercel.entrypoint\",VERCEL_EXECUTION_REGION=\"vercel.execution_region\",VERCEL_ID=\"vercel.id\",VERCEL_JA3_DIGEST=\"vercel.ja3_digest\",VERCEL_JA4_DIGEST=\"vercel.ja4_digest\",VERCEL_LOG_TYPE=\"vercel.log_type\",VERCEL_PATH=\"vercel.path\",VERCEL_PROJECT_ID=\"vercel.project_id\",VERCEL_PROJECT_NAME=\"vercel.project_name\",VERCEL_PROXY_CACHE_ID=\"vercel.proxy.cache_id\",VERCEL_PROXY_CLIENT_IP=\"vercel.proxy.client_ip\",VERCEL_PROXY_HOST=\"vercel.proxy.host\",VERCEL_PROXY_LAMBDA_REGION=\"vercel.proxy.lambda_region\",VERCEL_PROXY_METHOD=\"vercel.proxy.method\",VERCEL_PROXY_PATH=\"vercel.proxy.path\",VERCEL_PROXY_PATH_TYPE=\"vercel.proxy.path_type\",VERCEL_PROXY_PATH_TYPE_VARIANT=\"vercel.proxy.path_type_variant\",VERCEL_PROXY_REFERER=\"vercel.proxy.referer\",VERCEL_PROXY_REGION=\"vercel.proxy.region\",VERCEL_PROXY_RESPONSE_BYTE_SIZE=\"vercel.proxy.response_byte_size\",VERCEL_PROXY_SCHEME=\"vercel.proxy.scheme\",VERCEL_PROXY_STATUS_CODE=\"vercel.proxy.status_code\",VERCEL_PROXY_TIMESTAMP=\"vercel.proxy.timestamp\",VERCEL_PROXY_USER_AGENT=\"vercel.proxy.user_agent\",VERCEL_PROXY_VERCEL_CACHE=\"vercel.proxy.vercel_cache\",VERCEL_PROXY_VERCEL_ID=\"vercel.proxy.vercel_id\",VERCEL_PROXY_WAF_ACTION=\"vercel.proxy.waf_action\",VERCEL_PROXY_WAF_RULE_ID=\"vercel.proxy.waf_rule_id\",VERCEL_REQUEST_ID=\"vercel.request_id\",VERCEL_SOURCE=\"vercel.source\",VERCEL_STATUS_CODE=\"vercel.status_code\",ATTRIBUTE_TYPE={\"ai.citations\":\"string[]\",\"ai.completion_tokens.used\":\"integer\",\"ai.documents\":\"string[]\",\"ai.finish_reason\":\"string\",\"ai.frequency_penalty\":\"double\",\"ai.function_call\":\"string\",\"ai.generation_id\":\"string\",\"ai.input_messages\":\"string\",\"ai.is_search_required\":\"boolean\",\"ai.metadata\":\"string\",\"ai.model_id\":\"string\",\"ai.model.provider\":\"string\",\"ai.pipeline.name\":\"string\",\"ai.preamble\":\"string\",\"ai.presence_penalty\":\"double\",\"ai.prompt_tokens.used\":\"integer\",\"ai.raw_prompting\":\"boolean\",\"ai.responses\":\"string[]\",\"ai.response_format\":\"string\",\"ai.search_queries\":\"string[]\",\"ai.search_results\":\"string[]\",\"ai.seed\":\"string\",\"ai.streaming\":\"boolean\",\"ai.tags\":\"string\",\"ai.temperature\":\"double\",\"ai.texts\":\"string[]\",\"ai.tools\":\"string[]\",\"ai.tool_calls\":\"string[]\",\"ai.top_k\":\"integer\",\"ai.top_p\":\"double\",\"ai.total_cost\":\"double\",\"ai.total_tokens.used\":\"integer\",\"ai.warnings\":\"string[]\",\"angular.version\":\"string\",\"app.app_build\":\"string\",\"app.app_identifier\":\"string\",\"app.app_name\":\"string\",\"app.app_start_time\":\"string\",\"app.app_version\":\"string\",\"app.build\":\"string\",\"app.identifier\":\"string\",\"app.in_foreground\":\"boolean\",\"app.name\":\"string\",app_start_cold:\"double\",\"app.start_time\":\"string\",app_start_type:\"string\",app_start_warm:\"double\",\"app.version\":\"string\",\"app.vitals.frames.delay.value\":\"integer\",\"app.vitals.frames.frozen.count\":\"integer\",\"app.vitals.frames.slow.count\":\"integer\",\"app.vitals.frames.total.count\":\"integer\",\"app.vitals.start.cold.value\":\"double\",\"app.vitals.start.prewarmed\":\"boolean\",\"app.vitals.start.reason\":\"string\",\"app.vitals.start.screen\":\"string\",\"app.vitals.start.type\":\"string\",\"app.vitals.start.warm.value\":\"double\",\"app.vitals.ttfd.value\":\"double\",\"app.vitals.ttid.value\":\"double\",\"art.gc.blocking_count\":\"integer\",\"art.gc.blocking_time\":\"double\",\"art.gc.pre_oome_count\":\"integer\",\"art.gc.total_count\":\"integer\",\"art.gc.total_time\":\"double\",\"art.gc.waiting_time\":\"double\",\"art.memory.free\":\"integer\",\"art.memory.free_until_gc\":\"integer\",\"art.memory.free_until_oome\":\"integer\",\"art.memory.max\":\"integer\",\"art.memory.total\":\"integer\",\"aws.cloudwatch.logs.log_group\":\"string\",\"aws.cloudwatch.logs.log_stream\":\"string\",\"aws.cloudwatch.logs.url\":\"string\",\"aws.dynamodb.attribute_definitions\":\"string[]\",\"aws.dynamodb.consistent_read\":\"boolean\",\"aws.dynamodb.consumed_capacity\":\"string[]\",\"aws.dynamodb.count\":\"integer\",\"aws.dynamodb.exclusive_start_table\":\"string\",\"aws.dynamodb.global_secondary_indexes\":\"string[]\",\"aws.dynamodb.global_secondary_index_updates\":\"string[]\",\"aws.dynamodb.index_name\":\"string\",\"aws.dynamodb.item_collection_metrics\":\"string\",\"aws.dynamodb.limit\":\"integer\",\"aws.dynamodb.local_secondary_indexes\":\"string[]\",\"aws.dynamodb.projection\":\"string\",\"aws.dynamodb.provisioned_read_capacity\":\"double\",\"aws.dynamodb.provisioned_write_capacity\":\"double\",\"aws.dynamodb.scanned_count\":\"integer\",\"aws.dynamodb.scan_forward\":\"boolean\",\"aws.dynamodb.segment\":\"integer\",\"aws.dynamodb.select\":\"string\",\"aws.dynamodb.table_count\":\"integer\",\"aws.dynamodb.table_names\":\"string[]\",\"aws.dynamodb.total_segments\":\"integer\",\"aws.extended_request_id\":\"string\",\"aws.kinesis.stream_name\":\"string\",\"aws.kinesis.stream.name\":\"string\",\"aws.lambda.aws_request_id\":\"string\",\"aws.lambda.execution_duration_in_millis\":\"double\",\"aws.lambda.function_name\":\"string\",\"aws.lambda.function_version\":\"string\",\"aws.lambda.invoked_arn\":\"string\",\"aws.lambda.invoked_function_arn\":\"string\",\"aws.lambda.remaining_time_in_millis\":\"double\",\"aws.log.group.names\":\"string[]\",\"aws.log.stream.names\":\"string[]\",\"aws.request.extended_id\":\"string\",\"aws.request_id\":\"string\",\"aws.request.id\":\"string\",\"aws.s3.bucket\":\"string\",\"aws.secretsmanager.secret.arn\":\"string\",\"aws.sns.topic.arn\":\"string\",\"aws.step_functions.activity.arn\":\"string\",\"aws.step_functions.state_machine.arn\":\"string\",blocked_main_thread:\"boolean\",\"browser.name\":\"string\",\"browser.performance.navigation.activation_start\":\"double\",\"browser.performance.time_origin\":\"double\",\"browser.report.type\":\"string\",\"browser.script.invoker\":\"string\",\"browser.script.invoker_type\":\"string\",\"browser.script.source_char_position\":\"integer\",\"browser.version\":\"string\",\"browser.web_vital.cls.report_event\":\"string\",\"browser.web_vital.cls.source.<key>\":\"string\",\"browser.web_vital.cls.value\":\"double\",\"browser.web_vital.fcp.value\":\"double\",\"browser.web_vital.fp.value\":\"double\",\"browser.web_vital.inp.value\":\"double\",\"browser.web_vital.lcp.element\":\"string\",\"browser.web_vital.lcp.id\":\"string\",\"browser.web_vital.lcp.load_time\":\"integer\",\"browser.web_vital.lcp.render_time\":\"integer\",\"browser.web_vital.lcp.report_event\":\"string\",\"browser.web_vital.lcp.size\":\"integer\",\"browser.web_vital.lcp.url\":\"string\",\"browser.web_vital.lcp.value\":\"double\",\"browser.web_vital.ttfb.request_time\":\"double\",\"browser.web_vital.ttfb.value\":\"double\",\"cache.hit\":\"boolean\",\"cache.item_size\":\"integer\",\"cache.key\":\"string[]\",\"cache.operation\":\"string\",\"cache.ttl\":\"integer\",\"cache.write\":\"boolean\",channel:\"string\",\"client.address\":\"string\",\"client.port\":\"integer\",\"cloudflare.d1.duration\":\"integer\",\"cloudflare.d1.query_type\":\"string\",\"cloudflare.d1.rows_read\":\"integer\",\"cloudflare.d1.rows_written\":\"integer\",\"cloudflare.durable_object.query.bindings\":\"integer\",\"cloudflare.durable_object.response.rows_read\":\"integer\",\"cloudflare.durable_object.response.rows_written\":\"integer\",\"cloudflare.r2.bucket\":\"string\",\"cloudflare.r2.operation\":\"string\",\"cloudflare.r2.request.delimiter\":\"string\",\"cloudflare.r2.request.key\":\"string\",\"cloudflare.r2.request.part_number\":\"integer\",\"cloudflare.r2.request.prefix\":\"string\",\"cloudflare.workflow.attempt\":\"integer\",\"cloudflare.workflow.retries.backoff\":\"string\",\"cloudflare.workflow.retries.delay\":\"string\",\"cloudflare.workflow.retries.limit\":\"integer\",\"cloudflare.workflow.timeout\":\"string\",\"cloud.account.id\":\"string\",\"cloud.availability_zone\":\"string\",\"cloud.platform\":\"string\",\"cloud.provider\":\"string\",\"cloud.region\":\"string\",\"cloud.resource_id\":\"string\",cls:\"double\",\"cls.source.<key>\":\"string\",\"code.filepath\":\"string\",\"code.file.path\":\"string\",\"code.function\":\"string\",\"code.function.name\":\"string\",\"code.lineno\":\"integer\",\"code.line.number\":\"integer\",\"code.namespace\":\"string\",connectionType:\"string\",\"connection.rtt\":\"integer\",\"culture.calendar\":\"string\",\"culture.display_name\":\"string\",\"culture.is_24_hour_format\":\"boolean\",\"culture.locale\":\"string\",\"culture.timezone\":\"string\",\"db.collection.name\":\"string\",\"db.driver.name\":\"string\",\"db.name\":\"string\",\"db.namespace\":\"string\",\"db.operation\":\"string\",\"db.operation.batch.size\":\"integer\",\"db.operation.name\":\"string\",\"db.query.parameter.<key>\":\"string\",\"db.query.summary\":\"string\",\"db.query.text\":\"string\",\"db.redis.connection\":\"string\",\"db.redis.key\":\"string\",\"db.redis.parameters\":\"string[]\",\"db.response.status_code\":\"string\",\"db.sql.bindings\":\"string[]\",\"db.statement\":\"string\",\"db.stored_procedure.name\":\"string\",\"db.system\":\"string\",\"db.system.name\":\"string\",\"db.user\":\"string\",deviceMemory:\"string\",\"device.archs\":\"string[]\",\"device.battery_level\":\"double\",\"device.battery_temperature\":\"double\",\"device.boot_time\":\"string\",\"device.brand\":\"string\",\"device.charging\":\"boolean\",\"device.chipset\":\"string\",\"device.class\":\"string\",\"device.connection_type\":\"string\",\"device.cpu_description\":\"string\",\"device.external_free_storage\":\"integer\",\"device.external_storage_size\":\"integer\",\"device.family\":\"string\",\"device.free_memory\":\"integer\",\"device.free_storage\":\"integer\",\"device.id\":\"string\",\"device.locale\":\"string\",\"device.low_memory\":\"boolean\",\"device.low_power_mode\":\"boolean\",\"device.manufacturer\":\"string\",\"device.memory.estimated_capacity\":\"integer\",\"device.memory_size\":\"integer\",\"device.model\":\"string\",\"device.model_id\":\"string\",\"device.name\":\"string\",\"device.online\":\"boolean\",\"device.orientation\":\"string\",\"device.processor_count\":\"integer\",\"device.processor_frequency\":\"double\",\"device.screen_density\":\"double\",\"device.screen_dpi\":\"integer\",\"device.screen_height_pixels\":\"integer\",\"device.screen_width_pixels\":\"integer\",\"device.simulator\":\"boolean\",\"device.storage_size\":\"integer\",\"device.thermal_state\":\"string\",\"device.timezone\":\"string\",\"device.usable_memory\":\"integer\",dist:\"string\",effectiveConnectionType:\"string\",environment:\"string\",\"error.type\":\"string\",\"event.id\":\"integer\",\"event.name\":\"string\",\"exception.escaped\":\"boolean\",\"exception.message\":\"string\",\"exception.stacktrace\":\"string\",\"exception.type\":\"string\",\"faas.coldstart\":\"boolean\",\"faas.cron\":\"string\",\"faas.duration_in_ms\":\"integer\",\"faas.entry_point\":\"string\",\"faas.execution\":\"string\",\"faas.id\":\"string\",\"faas.identity\":\"string\",\"faas.invocation_id\":\"string\",\"faas.invoked_name\":\"string\",\"faas.invoked_provider\":\"string\",\"faas.invoked_region\":\"string\",\"faas.name\":\"string\",\"faas.time\":\"string\",\"faas.trigger\":\"string\",\"faas.version\":\"string\",fcp:\"double\",\"flag.evaluation.<key>\":\"boolean\",fp:\"double\",\"frames.delay\":\"integer\",\"frames.frozen\":\"integer\",frames_frozen_rate:\"double\",\"frames.slow\":\"integer\",frames_slow_rate:\"double\",\"frames.total\":\"integer\",fs_error:\"string\",\"gcp.function.context.event_id\":\"string\",\"gcp.function.context.event_type\":\"string\",\"gcp.function.context.id\":\"string\",\"gcp.function.context.resource\":\"string\",\"gcp.function.context.source\":\"string\",\"gcp.function.context.specversion\":\"string\",\"gcp.function.context.time\":\"string\",\"gcp.function.context.timestamp\":\"string\",\"gcp.function.context.type\":\"string\",\"gcp.project.id\":\"string\",\"gen_ai.agent.name\":\"string\",\"gen_ai.context.utilization\":\"double\",\"gen_ai.context.window_size\":\"integer\",\"gen_ai.conversation.id\":\"string\",\"gen_ai.cost.cache_creation.input_tokens\":\"double\",\"gen_ai.cost.cache_read.input_tokens\":\"double\",\"gen_ai.cost.input_tokens\":\"double\",\"gen_ai.cost.output_tokens\":\"double\",\"gen_ai.cost.reasoning.output_tokens\":\"double\",\"gen_ai.cost.total_tokens\":\"double\",\"gen_ai.embeddings.input\":\"string\",\"gen_ai.function_id\":\"string\",\"gen_ai.input.messages\":\"string\",\"gen_ai.operation.name\":\"string\",\"gen_ai.operation.type\":\"string\",\"gen_ai.output.messages\":\"string\",\"gen_ai.pipeline.name\":\"string\",\"gen_ai.prompt\":\"string\",\"gen_ai.prompt.name\":\"string\",\"gen_ai.provider.name\":\"string\",\"gen_ai.request.available_tools\":\"string\",\"gen_ai.request.frequency_penalty\":\"double\",\"gen_ai.request.max_tokens\":\"integer\",\"gen_ai.request.messages\":\"string\",\"gen_ai.request.model\":\"string\",\"gen_ai.request.presence_penalty\":\"double\",\"gen_ai.request.reasoning_effort\":\"string\",\"gen_ai.request.seed\":\"string\",\"gen_ai.request.stop_sequences\":\"string[]\",\"gen_ai.request.temperature\":\"double\",\"gen_ai.request.top_k\":\"integer\",\"gen_ai.request.top_p\":\"double\",\"gen_ai.response.finish_reasons\":\"string\",\"gen_ai.response.id\":\"string\",\"gen_ai.response.model\":\"string\",\"gen_ai.response.streaming\":\"boolean\",\"gen_ai.response.text\":\"string\",\"gen_ai.response.time_to_first_chunk\":\"double\",\"gen_ai.response.time_to_first_token\":\"double\",\"gen_ai.response.tokens_per_second\":\"double\",\"gen_ai.response.tool_calls\":\"string\",\"gen_ai.system\":\"string\",\"gen_ai.system_instructions\":\"string\",\"gen_ai.system.message\":\"string\",\"gen_ai.tool.call.arguments\":\"string\",\"gen_ai.tool.call.result\":\"string\",\"gen_ai.tool.definitions\":\"string\",\"gen_ai.tool.description\":\"string\",\"gen_ai.tool.input\":\"string\",\"gen_ai.tool.message\":\"string\",\"gen_ai.tool.name\":\"string\",\"gen_ai.tool.output\":\"string\",\"gen_ai.tool.type\":\"string\",\"gen_ai.usage.cache_creation.input_tokens\":\"integer\",\"gen_ai.usage.cache_read.input_tokens\":\"integer\",\"gen_ai.usage.completion_tokens\":\"integer\",\"gen_ai.usage.input_tokens\":\"integer\",\"gen_ai.usage.input_tokens.cached\":\"integer\",\"gen_ai.usage.input_tokens.cache_write\":\"integer\",\"gen_ai.usage.output_tokens\":\"integer\",\"gen_ai.usage.output_tokens.reasoning\":\"integer\",\"gen_ai.usage.prompt_tokens\":\"integer\",\"gen_ai.usage.reasoning.output_tokens\":\"integer\",\"gen_ai.usage.total_tokens\":\"integer\",\"graphql.document\":\"string\",\"graphql.operation.name\":\"string\",\"graphql.operation.type\":\"string\",hardwareConcurrency:\"string\",\"http.client_ip\":\"string\",\"http.decoded_response_content_length\":\"integer\",\"http.flavor\":\"string\",\"http.fragment\":\"string\",\"http.host\":\"string\",\"http.method\":\"string\",\"http.query\":\"string\",\"http.request.body.data\":\"string\",\"http.request.connection_end\":\"double\",\"http.request.connect_start\":\"double\",\"http.request.domain_lookup_end\":\"double\",\"http.request.domain_lookup_start\":\"double\",\"http.request.fetch_start\":\"double\",\"http.request.header.<key>\":\"string[]\",\"http.request.method\":\"string\",\"http.request_method\":\"string\",\"http.request.redirect_end\":\"double\",\"http.request.redirect_start\":\"double\",\"http.request.request_start\":\"double\",\"http.request.resend_count\":\"integer\",\"http.request.response_end\":\"double\",\"http.request.response_start\":\"double\",\"http.request.same_origin\":\"boolean\",\"http.request.secure_connection_start\":\"double\",\"http.request.time_to_first_byte\":\"double\",\"http.request.worker_start\":\"double\",\"http.response.body.size\":\"integer\",\"http.response_content_length\":\"integer\",\"http.response.header.content-length\":\"string\",\"http.response.header.<key>\":\"string[]\",\"http.response.size\":\"integer\",\"http.response.status_code\":\"integer\",\"http.response_transfer_size\":\"integer\",\"http.route\":\"string\",\"http.scheme\":\"string\",\"http.server_name\":\"string\",\"http.server.request.time_in_queue\":\"double\",\"http.status_code\":\"integer\",\"http.target\":\"string\",\"http.url\":\"string\",\"http.user_agent\":\"string\",id:\"string\",inp:\"double\",\"jsonrpc.protocol.version\":\"string\",\"jsonrpc.request.id\":\"string\",\"jvm.gc.action\":\"string\",\"jvm.gc.name\":\"string\",\"jvm.memory.pool.name\":\"string\",\"jvm.memory.type\":\"string\",\"jvm.thread.daemon\":\"boolean\",\"jvm.thread.state\":\"string\",\"koa.name\":\"string\",\"koa.type\":\"string\",lcp:\"double\",\"lcp.element\":\"string\",\"lcp.id\":\"string\",\"lcp.loadTime\":\"integer\",\"lcp.renderTime\":\"integer\",\"lcp.size\":\"integer\",\"lcp.url\":\"string\",\"logger.name\":\"string\",\"mcp.cancelled.reason\":\"string\",\"mcp.cancelled.request_id\":\"string\",\"mcp.client.name\":\"string\",\"mcp.client.title\":\"string\",\"mcp.client.version\":\"string\",\"mcp.lifecycle.phase\":\"string\",\"mcp.logging.data_type\":\"string\",\"mcp.logging.level\":\"string\",\"mcp.logging.logger\":\"string\",\"mcp.logging.message\":\"string\",\"mcp.method.name\":\"string\",\"mcp.progress.current\":\"integer\",\"mcp.progress.message\":\"string\",\"mcp.progress.percentage\":\"double\",\"mcp.progress.token\":\"string\",\"mcp.progress.total\":\"integer\",\"mcp.prompt.name\":\"string\",\"mcp.prompt.result.description\":\"string\",\"mcp.prompt.result.message_content\":\"string\",\"mcp.prompt.result.message_count\":\"integer\",\"mcp.prompt.result.message_role\":\"string\",\"mcp.protocol.ready\":\"integer\",\"mcp.protocol.version\":\"string\",\"mcp.request.argument.<key>\":\"string\",\"mcp.request.argument.name\":\"string\",\"mcp.request.argument.uri\":\"string\",\"mcp.request.id\":\"string\",\"mcp.resource.protocol\":\"string\",\"mcp.resource.uri\":\"string\",\"mcp.server.name\":\"string\",\"mcp.server.title\":\"string\",\"mcp.server.version\":\"string\",\"mcp.session.id\":\"string\",\"mcp.tool.name\":\"string\",\"mcp.tool.result.content\":\"string\",\"mcp.tool.result.content_count\":\"integer\",\"mcp.tool.result.is_error\":\"boolean\",\"mcp.transport\":\"string\",\"mdc.<key>\":\"string\",\"messaging.batch.message_count\":\"integer\",\"messaging.destination\":\"string\",\"messaging.destination.connection\":\"string\",\"messaging.destination.name\":\"string\",\"messaging.message.body.size\":\"integer\",\"messaging.message.conversation_id\":\"string\",\"messaging.message.envelope.size\":\"integer\",\"messaging.message.id\":\"string\",\"messaging.message.receive.latency\":\"integer\",\"messaging.message.retry.count\":\"integer\",\"messaging.operation.name\":\"string\",\"messaging.operation.type\":\"string\",\"messaging.rabbitmq.destination.routing_key\":\"string\",\"messaging.system\":\"string\",method:\"string\",\"middleware.name\":\"string\",\"navigation.origin\":\"string\",\"navigation.route.id\":\"string\",\"navigation.type\":\"string\",\"nel.elapsed_time\":\"integer\",\"nel.phase\":\"string\",\"nel.referrer\":\"string\",\"nel.sampling_function\":\"double\",\"nel.type\":\"string\",\"network.connection.effective_type\":\"string\",\"network.connection.rtt\":\"integer\",\"network.connection.type\":\"string\",\"network.local.address\":\"string\",\"network.local.port\":\"integer\",\"network.peer.address\":\"string\",\"network.peer.port\":\"integer\",\"network.protocol.name\":\"string\",\"network.protocol.version\":\"string\",\"network.transport\":\"string\",\"network.type\":\"string\",\"net.host.ip\":\"string\",\"net.host.name\":\"string\",\"net.host.port\":\"integer\",\"net.peer.ip\":\"string\",\"net.peer.name\":\"string\",\"net.peer.port\":\"integer\",\"net.protocol.name\":\"string\",\"net.protocol.version\":\"string\",\"net.sock.family\":\"string\",\"net.sock.host.addr\":\"string\",\"net.sock.host.port\":\"integer\",\"net.sock.peer.addr\":\"string\",\"net.sock.peer.name\":\"string\",\"net.sock.peer.port\":\"integer\",\"net.transport\":\"string\",\"os.build\":\"string\",\"os.build_id\":\"string\",\"os.description\":\"string\",\"os.kernel_version\":\"string\",\"os.name\":\"string\",\"os.raw_description\":\"string\",\"os.rooted\":\"boolean\",\"os.theme\":\"string\",\"os.type\":\"string\",\"os.version\":\"string\",\"otel.kind\":\"string\",\"otel.scope.name\":\"string\",\"otel.scope.version\":\"string\",\"otel.status_code\":\"string\",\"otel.status_description\":\"string\",\"params.<key>\":\"string\",\"performance.activationStart\":\"double\",\"performance.timeOrigin\":\"double\",previous_route:\"string\",\"process.command_args\":\"string[]\",\"process.executable.name\":\"string\",\"process.pid\":\"integer\",\"process.runtime.description\":\"string\",\"process.runtime.engine.name\":\"string\",\"process.runtime.engine.version\":\"string\",\"process.runtime.name\":\"string\",\"process.runtime.version\":\"string\",\"query.<key>\":\"string\",\"react.version\":\"string\",release:\"string\",\"remix.action_form_data.<key>\":\"string\",replay_id:\"string\",\"resource.deployment.environment\":\"string\",\"resource.deployment.environment.name\":\"string\",\"resource.render_blocking_status\":\"string\",route:\"string\",\"rpc.grpc.status_code\":\"integer\",\"rpc.method\":\"string\",\"rpc.response.status_code\":\"string\",\"rpc.service\":\"string\",\"rpc.system\":\"string\",\"rpc.system.name\":\"string\",\"runtime.build\":\"string\",\"runtime.name\":\"string\",\"runtime.raw_description\":\"string\",\"runtime.version\":\"string\",\"score.<key>\":\"double\",\"score.ratio.<key>\":\"double\",\"score.total\":\"double\",\"score.weight.<key>\":\"double\",\"sentry.action\":\"string\",\"sentry.browser.name\":\"string\",\"sentry.browser.version\":\"string\",\"sentry.cancellation_reason\":\"string\",\"sentry.category\":\"string\",\"sentry.client_sample_rate\":\"double\",\"sentry.description\":\"string\",\"sentry.dist\":\"string\",\"sentry.domain\":\"string\",\"sentry.dsc.environment\":\"string\",\"sentry.dsc.project_id\":\"string\",\"sentry.dsc.public_key\":\"string\",\"sentry.dsc.release\":\"string\",\"sentry.dsc.sampled\":\"boolean\",\"sentry.dsc.sample_rate\":\"string\",\"sentry.dsc.trace_id\":\"string\",\"sentry.dsc.transaction\":\"string\",\"sentry.environment\":\"string\",\"sentry.exclusive_time\":\"double\",\"sentry.graphql.operation\":\"string\",\"sentry.group\":\"string\",\"sentry.http.prefetch\":\"boolean\",\"sentry.idle_span_finish_reason\":\"string\",\"sentry.is_remote\":\"boolean\",\"sentry.kind\":\"string\",\"sentry.main_thread\":\"boolean\",\"sentry.message.parameter.<key>\":\"string\",\"sentry.message.template\":\"string\",\"sentry.metric.source\":\"string\",\"sentry.mobile\":\"boolean\",\"sentry.module.<key>\":\"string\",\"sentry.nextjs.ssr.function.route\":\"string\",\"sentry.nextjs.ssr.function.type\":\"string\",\"sentry.normalized_db_query\":\"string\",\"sentry.normalized_db_query.hash\":\"string\",\"sentry.normalized_description\":\"string\",\"sentry.observed_timestamp_nanos\":\"string\",\"sentry.op\":\"string\",\"sentry.origin\":\"string\",\"sentry.platform\":\"string\",\"sentry.profiler_id\":\"string\",\"sentry.profile_id\":\"string\",\"sentry.release\":\"string\",\"sentry.replay_id\":\"string\",\"sentry.replay_is_buffering\":\"boolean\",\"sentry.report_event\":\"string\",\"sentry.sdk.integrations\":\"string[]\",\"sentry.sdk.name\":\"string\",\"sentry.sdk.version\":\"string\",\"sentry.segment.id\":\"string\",\"sentry.segment_id\":\"string\",\"sentry.segment.name\":\"string\",\"sentry.server_sample_rate\":\"double\",\"sentry.source\":\"string\",\"sentry.span.source\":\"string\",\"sentry.status\":\"string\",\"sentry.status_code\":\"integer\",\"sentry.status.message\":\"string\",\"sentry.sveltekit.navigation.from\":\"string\",\"sentry.sveltekit.navigation.to\":\"string\",\"sentry.sveltekit.navigation.type\":\"string\",\"sentry.thread.id\":\"integer\",\"sentry.timestamp.sequence\":\"integer\",\"sentry.trace_lifecycle\":\"string\",\"sentry.trace.parent_span_id\":\"string\",\"sentry.trace.status\":\"string\",\"sentry.transaction\":\"string\",\"sentry.user.email\":\"string\",\"sentry.user.geo.city\":\"string\",\"sentry.user.geo.country_code\":\"string\",\"sentry.user.geo.region\":\"string\",\"sentry.user.geo.subdivision\":\"string\",\"sentry.user.id\":\"string\",\"sentry.user.ip\":\"string\",\"sentry.user.username\":\"string\",\"server.address\":\"string\",server_name:\"string\",\"server.port\":\"integer\",\"service.name\":\"string\",\"service.version\":\"string\",\"session.id\":\"string\",stall_percentage:\"double\",stall_total_time:\"double\",\"state.type\":\"string\",\"thread.id\":\"integer\",\"thread.name\":\"string\",\"timber.tag\":\"string\",time_to_full_display:\"double\",time_to_initial_display:\"double\",transaction:\"string\",\"trpc.procedure_path\":\"string\",\"trpc.procedure_type\":\"string\",ttfb:\"double\",\"ttfb.requestTime\":\"double\",type:\"string\",\"ui.component_name\":\"string\",\"ui.contributes_to_ttfd\":\"boolean\",\"ui.contributes_to_ttid\":\"boolean\",\"ui.element.height\":\"integer\",\"ui.element.id\":\"string\",\"ui.element.identifier\":\"string\",\"ui.element.load_time\":\"double\",\"ui.element.paint_type\":\"string\",\"ui.element.render_time\":\"double\",\"ui.element.type\":\"string\",\"ui.element.url\":\"string\",\"ui.element.width\":\"integer\",url:\"string\",\"url.domain\":\"string\",\"url.fragment\":\"string\",\"url.full\":\"string\",\"url.path\":\"string\",\"url.path.parameter.<key>\":\"string\",\"url.port\":\"integer\",\"url.query\":\"string\",\"url.same_origin\":\"boolean\",\"url.scheme\":\"string\",\"url.template\":\"string\",\"user_agent.original\":\"string\",\"user.email\":\"string\",\"user.full_name\":\"string\",\"user.geo.city\":\"string\",\"user.geo.country_code\":\"string\",\"user.geo.region\":\"string\",\"user.geo.subdivision\":\"string\",\"user.hash\":\"string\",\"user.id\":\"string\",\"user.ip_address\":\"string\",\"user.name\":\"string\",\"user.roles\":\"string[]\",\"vercel.branch\":\"string\",\"vercel.build_id\":\"string\",\"vercel.deployment_id\":\"string\",\"vercel.destination\":\"string\",\"vercel.edge_type\":\"string\",\"vercel.entrypoint\":\"string\",\"vercel.execution_region\":\"string\",\"vercel.id\":\"string\",\"vercel.ja3_digest\":\"string\",\"vercel.ja4_digest\":\"string\",\"vercel.log_type\":\"string\",\"vercel.path\":\"string\",\"vercel.project_id\":\"string\",\"vercel.project_name\":\"string\",\"vercel.proxy.cache_id\":\"string\",\"vercel.proxy.client_ip\":\"string\",\"vercel.proxy.host\":\"string\",\"vercel.proxy.lambda_region\":\"string\",\"vercel.proxy.method\":\"string\",\"vercel.proxy.path\":\"string\",\"vercel.proxy.path_type\":\"string\",\"vercel.proxy.path_type_variant\":\"string\",\"vercel.proxy.referer\":\"string\",\"vercel.proxy.region\":\"string\",\"vercel.proxy.response_byte_size\":\"integer\",\"vercel.proxy.scheme\":\"string\",\"vercel.proxy.status_code\":\"integer\",\"vercel.proxy.timestamp\":\"integer\",\"vercel.proxy.user_agent\":\"string[]\",\"vercel.proxy.vercel_cache\":\"string\",\"vercel.proxy.vercel_id\":\"string\",\"vercel.proxy.waf_action\":\"string\",\"vercel.proxy.waf_rule_id\":\"string\",\"vercel.request_id\":\"string\",\"vercel.source\":\"string\",\"vercel.status_code\":\"integer\"},ATTRIBUTE_METADATA={\"ai.citations\":{brief:\"References or sources cited by the AI model in its response.\",type:\"string[]\",applyScrubbing:{key:\"auto\"},isInOtel:!1,visibility:\"public\",example:[\"Citation 1\",\"Citation 2\"],deprecation:{},changelog:[{version:\"0.5.0\",prs:[264]},{version:\"0.1.0\",prs:[55]}]},\"ai.completion_tokens.used\":{brief:\"The number of tokens used to respond to the message.\",type:\"integer\",applyScrubbing:{key:\"manual\"},isInOtel:!1,visibility:\"public\",example:10,deprecation:{replacement:\"gen_ai.usage.output_tokens\"},aliases:[\"gen_ai.usage.output_tokens\",\"gen_ai.usage.completion_tokens\"],changelog:[{version:\"0.4.0\",prs:[228]},{version:\"0.1.0\",prs:[57,61]},{version:\"0.0.0\"}]},\"ai.documents\":{brief:\"Documents or content chunks used as context for the AI model.\",type:\"string[]\",applyScrubbing:{key:\"auto\"},isInOtel:!1,visibility:\"public\",example:[\"document1.txt\",\"document2.pdf\"],deprecation:{},changelog:[{version:\"0.5.0\",prs:[264]},{version:\"0.1.0\",prs:[55]}]},\"ai.finish_reason\":{brief:\"The reason why the model stopped generating.\",type:\"string\",applyScrubbing:{key:\"manual\"},isInOtel:!1,visibility:\"public\",example:\"COMPLETE\",deprecation:{replacement:\"gen_ai.response.finish_reasons\"},aliases:[\"gen_ai.response.finish_reasons\"],changelog:[{version:\"0.1.0\",prs:[55,57,61,108,127]}]},\"ai.frequency_penalty\":{brief:\"Used to reduce repetitiveness of generated tokens. The higher the value, the stronger a penalty is applied to previously present tokens, proportional to how many times they have already appeared in the prompt or prior generation.\",type:\"double\",applyScrubbing:{key:\"manual\"},isInOtel:!1,visibility:\"public\",example:.5,deprecation:{replacement:\"gen_ai.request.frequency_penalty\"},aliases:[\"gen_ai.request.frequency_penalty\"],changelog:[{version:\"0.4.0\",prs:[228]},{version:\"0.1.0\",prs:[55,57,61,108]}]},\"ai.function_call\":{brief:\"For an AI model call, the function that was called. This is deprecated for OpenAI, and replaced by tool_calls\",type:\"string\",applyScrubbing:{key:\"auto\"},isInOtel:!1,visibility:\"public\",example:\"function_name\",deprecation:{replacement:\"gen_ai.tool.name\"},aliases:[\"gen_ai.tool.name\",\"mcp.tool.name\"],changelog:[{version:\"0.1.0\",prs:[55,57,61,108]}]},\"ai.generation_id\":{brief:\"Unique identifier for the completion.\",type:\"string\",applyScrubbing:{key:\"manual\"},isInOtel:!1,visibility:\"public\",example:\"gen_123abc\",deprecation:{replacement:\"gen_ai.response.id\"},aliases:[\"gen_ai.response.id\"],changelog:[{version:\"0.1.0\",prs:[55,57,61,108,127]}]},\"ai.input_messages\":{brief:\"The input messages sent to the model\",type:\"string\",applyScrubbing:{key:\"manual\"},isInOtel:!1,visibility:\"public\",example:'[{\"role\": \"user\", \"message\": \"hello\"}]',deprecation:{replacement:\"gen_ai.input.messages\"},aliases:[\"gen_ai.request.messages\"],changelog:[{version:\"0.1.0\",prs:[65,119]},{version:\"0.0.0\"}]},\"ai.is_search_required\":{brief:\"Boolean indicating if the model needs to perform a search.\",type:\"boolean\",applyScrubbing:{key:\"manual\"},isInOtel:!1,visibility:\"public\",example:!1,deprecation:{},changelog:[{version:\"0.5.0\",prs:[264]},{version:\"0.1.0\",prs:[55]}]},\"ai.metadata\":{brief:\"Extra metadata passed to an AI pipeline step.\",type:\"string\",applyScrubbing:{key:\"manual\"},isInOtel:!1,visibility:\"public\",example:'{\"user_id\": 123, \"session_id\": \"abc123\"}',deprecation:{},changelog:[{version:\"0.5.0\",prs:[264]},{version:\"0.1.0\",prs:[55,127]}]},\"ai.model_id\":{brief:\"The vendor-specific ID of the model used.\",type:\"string\",applyScrubbing:{key:\"manual\"},isInOtel:!1,visibility:\"public\",example:\"gpt-4\",deprecation:{replacement:\"gen_ai.response.model\"},aliases:[\"gen_ai.response.model\"],changelog:[{version:\"0.1.0\",prs:[57,61,127]},{version:\"0.0.0\"}]},\"ai.model.provider\":{brief:\"The provider of the model.\",type:\"string\",applyScrubbing:{key:\"manual\"},isInOtel:!1,visibility:\"public\",example:\"openai\",deprecation:{replacement:\"gen_ai.provider.name\"},aliases:[\"gen_ai.provider.name\",\"gen_ai.system\"],changelog:[{version:\"0.4.0\",prs:[253]},{version:\"0.1.0\",prs:[57,61,108,127]}]},\"ai.pipeline.name\":{brief:\"The name of the AI pipeline.\",type:\"string\",applyScrubbing:{key:\"manual\"},isInOtel:!1,visibility:\"public\",example:\"Autofix Pipeline\",deprecation:{replacement:\"gen_ai.pipeline.name\"},aliases:[\"gen_ai.pipeline.name\"],changelog:[{version:\"0.1.0\",prs:[53,76,108,127]}]},\"ai.preamble\":{brief:\"For an AI model call, the preamble parameter. Preambles are a part of the prompt used to adjust the model's overall behavior and conversation style.\",type:\"string\",applyScrubbing:{key:\"auto\"},isInOtel:!1,visibility:\"public\",example:\"You are now a clown.\",deprecation:{replacement:\"gen_ai.system_instructions\"},aliases:[\"gen_ai.system_instructions\"],changelog:[{version:\"0.5.0\",prs:[264]},{version:\"0.1.0\",prs:[55]}]},\"ai.presence_penalty\":{brief:\"Used to reduce repetitiveness of generated tokens. Similar to frequency_penalty, except that this penalty is applied equally to all tokens that have already appeared, regardless of their exact frequencies.\",type:\"double\",applyScrubbing:{key:\"manual\"},isInOtel:!1,visibility:\"public\",example:.5,deprecation:{replacement:\"gen_ai.request.presence_penalty\"},aliases:[\"gen_ai.request.presence_penalty\"],changelog:[{version:\"0.4.0\",prs:[228]},{version:\"0.1.0\",prs:[55,57,61,108]}]},\"ai.prompt_tokens.used\":{brief:\"The number of tokens used to process just the prompt.\",type:\"integer\",applyScrubbing:{key:\"manual\"},isInOtel:!1,visibility:\"public\",example:20,deprecation:{replacement:\"gen_ai.usage.input_tokens\"},aliases:[\"gen_ai.usage.prompt_tokens\",\"gen_ai.usage.input_tokens\"],changelog:[{version:\"0.4.0\",prs:[228]},{version:\"0.1.0\",prs:[57,61]},{version:\"0.0.0\"}]},\"ai.raw_prompting\":{brief:\"When enabled, the user\\u2019s prompt will be sent to the model without any pre-processing.\",type:\"boolean\",applyScrubbing:{key:\"manual\"},isInOtel:!1,visibility:\"public\",example:!0,deprecation:{},changelog:[{version:\"0.5.0\",prs:[264]},{version:\"0.1.0\",prs:[55]}]},\"ai.responses\":{brief:\"The response messages sent back by the AI model.\",type:\"string[]\",applyScrubbing:{key:\"manual\"},isInOtel:!1,visibility:\"public\",example:[\"hello\",\"world\"],deprecation:{replacement:\"gen_ai.output.messages\"},changelog:[{version:\"0.1.0\",prs:[65,127]},{version:\"0.0.0\"}]},\"ai.response_format\":{brief:\"For an AI model call, the format of the response\",type:\"string\",applyScrubbing:{key:\"manual\"},isInOtel:!1,visibility:\"public\",example:\"json_object\",deprecation:{},changelog:[{version:\"0.5.0\",prs:[264]},{version:\"0.1.0\",prs:[55,127]}]},\"ai.search_queries\":{brief:\"Queries used to search for relevant context or documents.\",type:\"string[]\",applyScrubbing:{key:\"auto\"},isInOtel:!1,visibility:\"public\",example:[\"climate change effects\",\"renewable energy\"],deprecation:{},changelog:[{version:\"0.5.0\",prs:[264]},{version:\"0.1.0\",prs:[55]}]},\"ai.search_results\":{brief:\"Results returned from search queries for context.\",type:\"string[]\",applyScrubbing:{key:\"auto\"},isInOtel:!1,visibility:\"public\",example:[\"search_result_1, search_result_2\"],deprecation:{},changelog:[{version:\"0.5.0\",prs:[264]},{version:\"0.1.0\",prs:[55]}]},\"ai.seed\":{brief:\"The seed, ideally models given the same seed and same other parameters will produce the exact same output.\",type:\"string\",applyScrubbing:{key:\"manual\"},isInOtel:!1,visibility:\"public\",example:\"1234567890\",deprecation:{replacement:\"gen_ai.request.seed\"},aliases:[\"gen_ai.request.seed\"],changelog:[{version:\"0.1.0\",prs:[55,57,61,108,127]}]},\"ai.streaming\":{brief:\"Whether the request was streamed back.\",type:\"boolean\",applyScrubbing:{key:\"manual\"},isInOtel:!1,visibility:\"public\",example:!0,deprecation:{replacement:\"gen_ai.response.streaming\"},aliases:[\"gen_ai.response.streaming\"],changelog:[{version:\"0.1.0\",prs:[76,108]},{version:\"0.0.0\"}]},\"ai.tags\":{brief:\"Tags that describe an AI pipeline step.\",type:\"string\",applyScrubbing:{key:\"manual\"},isInOtel:!1,visibility:\"public\",example:'{\"executed_function\": \"add_integers\"}',deprecation:{},changelog:[{version:\"0.5.0\",prs:[264]},{version:\"0.1.0\",prs:[55,127]}]},\"ai.temperature\":{brief:\"For an AI model call, the temperature parameter. Temperature essentially means how random the output will be.\",type:\"double\",applyScrubbing:{key:\"manual\"},isInOtel:!1,visibility:\"public\",example:.1,deprecation:{replacement:\"gen_ai.request.temperature\"},aliases:[\"gen_ai.request.temperature\"],changelog:[{version:\"0.4.0\",prs:[228]},{version:\"0.1.0\",prs:[55,57,61,108]}]},\"ai.texts\":{brief:\"Raw text inputs provided to the model.\",type:\"string[]\",applyScrubbing:{key:\"auto\"},isInOtel:!1,visibility:\"public\",example:[\"Hello, how are you?\",\"What is the capital of France?\"],deprecation:{replacement:\"gen_ai.input.messages\"},aliases:[\"gen_ai.input.messages\"],changelog:[{version:\"0.5.0\",prs:[264]},{version:\"0.1.0\",prs:[55]}]},\"ai.tools\":{brief:\"For an AI model call, the functions that are available\",type:\"string[]\",applyScrubbing:{key:\"manual\"},isInOtel:!1,visibility:\"public\",example:[\"function_1\",\"function_2\"],deprecation:{replacement:\"gen_ai.tool.definitions\"},changelog:[{version:\"0.1.0\",prs:[55,65,127]}]},\"ai.tool_calls\":{brief:\"For an AI model call, the tool calls that were made.\",type:\"string[]\",applyScrubbing:{key:\"auto\"},isInOtel:!1,visibility:\"public\",example:[\"tool_call_1\",\"tool_call_2\"],deprecation:{replacement:\"gen_ai.output.messages\"},changelog:[{version:\"0.1.0\",prs:[55,65]}]},\"ai.top_k\":{brief:\"Limits the model to only consider the K most likely next tokens, where K is an integer (e.g., top_k=20 means only the 20 highest probability tokens are considered).\",type:\"integer\",applyScrubbing:{key:\"manual\"},isInOtel:!1,visibility:\"public\",example:35,deprecation:{replacement:\"gen_ai.request.top_k\"},aliases:[\"gen_ai.request.top_k\"],changelog:[{version:\"0.4.0\",prs:[228]},{version:\"0.1.0\",prs:[55,57,61,108]}]},\"ai.top_p\":{brief:\"Limits the model to only consider tokens whose cumulative probability mass adds up to p, where p is a float between 0 and 1 (e.g., top_p=0.7 means only tokens that sum up to 70% of the probability mass are considered).\",type:\"double\",applyScrubbing:{key:\"manual\"},isInOtel:!1,visibility:\"public\",example:.7,deprecation:{replacement:\"gen_ai.request.top_p\"},aliases:[\"gen_ai.request.top_p\"],changelog:[{version:\"0.4.0\",prs:[228]},{version:\"0.1.0\",prs:[55,57,61,108]}]},\"ai.total_cost\":{brief:\"The total cost for the tokens used.\",type:\"double\",applyScrubbing:{key:\"manual\"},isInOtel:!1,visibility:\"public\",example:12.34,deprecation:{replacement:\"gen_ai.cost.total_tokens\"},aliases:[\"gen_ai.cost.total_tokens\"],changelog:[{version:\"0.5.0\",prs:[264]},{version:\"0.4.0\",prs:[228]},{version:\"0.1.0\",prs:[53]}]},\"ai.total_tokens.used\":{brief:\"The total number of tokens used to process the prompt.\",type:\"integer\",applyScrubbing:{key:\"manual\"},isInOtel:!1,visibility:\"public\",example:30,deprecation:{replacement:\"gen_ai.usage.total_tokens\"},aliases:[\"gen_ai.usage.total_tokens\"],changelog:[{version:\"0.4.0\",prs:[228]},{version:\"0.1.0\",prs:[57,61,108]},{version:\"0.0.0\"}]},\"ai.warnings\":{brief:\"Warning messages generated during model execution.\",type:\"string[]\",applyScrubbing:{key:\"auto\"},isInOtel:!1,visibility:\"public\",example:[\"Token limit exceeded\"],deprecation:{},changelog:[{version:\"0.5.0\",prs:[264]},{version:\"0.1.0\",prs:[55]}]},\"angular.version\":{brief:\"The version of the Angular framework\",type:\"string\",applyScrubbing:{key:\"manual\"},isInOtel:!1,visibility:\"public\",example:\"17.1.0\",changelog:[{version:\"0.7.0\",prs:[367],description:\"Added angular.version attribute\"}]},\"app.app_build\":{brief:\"Internal build identifier, as it appears on the platform.\",type:\"string\",applyScrubbing:{key:\"manual\"},isInOtel:!1,visibility:\"public\",example:\"1\",deprecation:{replacement:\"app.build\",reason:\"Deprecated in favor of app.build\"},aliases:[\"app.build\"],changelog:[{version:\"0.5.0\",prs:[296],description:\"Added and deprecated app.app_build in favor of app.build\"}]},\"app.app_identifier\":{brief:\"Version-independent application identifier, often a dotted bundle ID.\",type:\"string\",applyScrubbing:{key:\"manual\"},isInOtel:!1,visibility:\"public\",example:\"com.example.myapp\",deprecation:{replacement:\"app.identifier\",reason:\"Deprecated in favor of app.identifier\"},aliases:[\"app.identifier\"],changelog:[{version:\"0.5.0\",prs:[296],description:\"Added and deprecated app.app_identifier in favor of app.identifier\"}]},\"app.app_name\":{brief:\"Human readable application name, as it appears on the platform.\",type:\"string\",applyScrubbing:{key:\"manual\"},isInOtel:!1,visibility:\"public\",example:\"My App\",deprecation:{replacement:\"app.name\",reason:\"Deprecated in favor of app.name\"},aliases:[\"app.name\"],changelog:[{version:\"0.5.0\",prs:[296],description:\"Added and deprecated app.app_name in favor of app.name\"}]},\"app.app_start_time\":{brief:\"Formatted UTC timestamp when the user started the application.\",type:\"string\",applyScrubbing:{key:\"manual\"},isInOtel:!1,visibility:\"public\",example:\"2025-01-01T00:00:00.000Z\",deprecation:{replacement:\"app.start_time\",reason:\"Deprecated in favor of app.start_time\"},aliases:[\"app.start_time\"],changelog:[{version:\"0.5.0\",prs:[296],description:\"Added and deprecated app.app_start_time in favor of app.start_time\"}]},\"app.app_version\":{brief:\"Human readable application version, as it appears on the platform.\",type:\"string\",applyScrubbing:{key:\"manual\"},isInOtel:!1,visibility:\"public\",example:\"1.0.0\",deprecation:{replacement:\"app.version\",reason:\"Deprecated in favor of app.version\"},aliases:[\"app.version\"],changelog:[{version:\"0.5.0\",prs:[296],description:\"Added and deprecated app.app_version in favor of app.version\"}]},\"app.build\":{brief:\"Internal build identifier, as it appears on the platform.\",type:\"string\",applyScrubbing:{key:\"manual\"},isInOtel:!1,visibility:\"public\",example:\"1\",aliases:[\"app.app_build\"],changelog:[{version:\"0.5.0\",prs:[296],description:\"Added app.build attribute\"}]},\"app.identifier\":{brief:\"Version-independent application identifier, often a dotted bundle ID.\",type:\"string\",applyScrubbing:{key:\"manual\"},isInOtel:!1,visibility:\"public\",example:\"com.example.myapp\",aliases:[\"app.app_identifier\"],changelog:[{version:\"0.5.0\",prs:[296],description:\"Added app.identifier attribute\"}]},\"app.in_foreground\":{brief:\"Whether the application is currently in the foreground.\",type:\"boolean\",applyScrubbing:{key:\"manual\"},isInOtel:!1,visibility:\"public\",example:!0,changelog:[{version:\"0.5.0\",prs:[296],description:\"Added app.in_foreground attribute\"}]},\"app.name\":{brief:\"Human readable application name, as it appears on the platform.\",type:\"string\",applyScrubbing:{key:\"manual\"},isInOtel:!1,visibility:\"public\",example:\"My App\",aliases:[\"app.app_name\"],changelog:[{version:\"0.5.0\",prs:[296],description:\"Added app.name attribute\"}]},app_start_cold:{brief:\"The duration of a cold app start in milliseconds\",type:\"double\",applyScrubbing:{key:\"manual\"},isInOtel:!1,visibility:\"public\",example:1234.56,deprecation:{replacement:\"app.vitals.start.cold.value\",reason:\"Replaced by app.vitals.start.cold.value to align with the app.vitals.* namespace for mobile performance attributes\"},aliases:[\"app.vitals.start.cold.value\"],changelog:[{version:\"0.5.0\",prs:[323],description:\"Added and deprecated in favor of app.vitals.start.cold.value\"}]},\"app.start_time\":{brief:\"Formatted UTC timestamp when the user started the application.\",type:\"string\",applyScrubbing:{key:\"manual\"},isInOtel:!1,visibility:\"public\",example:\"2025-01-01T00:00:00.000Z\",aliases:[\"app.app_start_time\"],changelog:[{version:\"0.5.0\",prs:[296],description:\"Added app.start_time attribute\"}]},app_start_type:{brief:\"Mobile app start variant. Either cold or warm.\",type:\"string\",applyScrubbing:{key:\"manual\"},isInOtel:!1,visibility:\"public\",example:\"cold\",deprecation:{replacement:\"app.vitals.start.type\",reason:\"Replaced by app.vitals.start.type to align with the app.vitals.* namespace for mobile performance attributes\"},aliases:[\"app.vitals.start.type\"],changelog:[{version:\"0.5.0\",prs:[313],description:\"Deprecated in favor of app.vitals.start.type\"},{version:\"0.1.0\",prs:[127]},{version:\"0.0.0\"}]},app_start_warm:{brief:\"The duration of a warm app start in milliseconds\",type:\"double\",applyScrubbing:{key:\"manual\"},isInOtel:!1,visibility:\"public\",example:1234.56,deprecation:{replacement:\"app.vitals.start.warm.value\",reason:\"Replaced by app.vitals.start.warm.value to align with the app.vitals.* namespace for mobile performance attributes\"},aliases:[\"app.vitals.start.warm.value\"],changelog:[{version:\"0.5.0\",prs:[323],description:\"Added and deprecated in favor of app.vitals.start.warm.value\"}]},\"app.version\":{brief:\"Human readable application version, as it appears on the platform.\",type:\"string\",applyScrubbing:{key:\"manual\"},isInOtel:!1,visibility:\"public\",example:\"1.0.0\",aliases:[\"app.app_version\"],changelog:[{version:\"0.5.0\",prs:[296],description:\"Added app.version attribute\"}]},\"app.vitals.frames.delay.value\":{brief:\"The sum of all delayed frame durations in seconds during the lifetime of the span. For more information see [frames delay](https://develop.sentry.dev/sdk/performance/frames-delay/).\",type:\"integer\",applyScrubbing:{key:\"manual\"},isInOtel:!1,visibility:\"public\",example:5,aliases:[\"frames.delay\"],changelog:[{version:\"0.5.0\",prs:[313],description:\"Added app.vitals.frames.delay.value to replace frames.delay\"}]},\"app.vitals.frames.frozen.count\":{brief:\"The number of frozen frames rendered during the lifetime of the span.\",type:\"integer\",applyScrubbing:{key:\"manual\"},isInOtel:!1,visibility:\"public\",example:3,aliases:[\"frames.frozen\"],changelog:[{version:\"0.5.0\",prs:[313],description:\"Added app.vitals.frames.frozen.count to replace frames.frozen\"}]},\"app.vitals.frames.slow.count\":{brief:\"The number of slow frames rendered during the lifetime of the span.\",type:\"integer\",applyScrubbing:{key:\"manual\"},isInOtel:!1,visibility:\"public\",example:1,aliases:[\"frames.slow\"],changelog:[{version:\"0.5.0\",prs:[313],description:\"Added app.vitals.frames.slow.count to replace frames.slow\"}]},\"app.vitals.frames.total.count\":{brief:\"The number of total frames rendered during the lifetime of the span.\",type:\"integer\",applyScrubbing:{key:\"manual\"},isInOtel:!1,visibility:\"public\",example:60,aliases:[\"frames.total\"],changelog:[{version:\"0.5.0\",prs:[313],description:\"Added app.vitals.frames.total.count to replace frames.total\"}]},\"app.vitals.start.cold.value\":{brief:\"The duration of a cold app start in milliseconds\",type:\"double\",applyScrubbing:{key:\"manual\"},isInOtel:!1,visibility:\"public\",example:1234.56,aliases:[\"app_start_cold\"],changelog:[{version:\"0.5.0\",prs:[313],description:\"Added app.vitals.start.cold.value attribute\"}]},\"app.vitals.start.prewarmed\":{brief:\"Whether the app start was prewarmed.\",type:\"boolean\",applyScrubbing:{key:\"manual\"},isInOtel:!1,visibility:\"public\",example:!0,changelog:[{version:\"0.11.0\",prs:[379],description:\"Added app.vitals.start.prewarmed attribute\"}]},\"app.vitals.start.reason\":{brief:\"The reason that triggered the app start.\",type:\"string\",applyScrubbing:{key:\"manual\"},isInOtel:!1,visibility:\"public\",example:\"push\",changelog:[{version:\"0.7.0\",prs:[353],description:\"Added app.vitals.start.reason attribute\"}]},\"app.vitals.start.screen\":{brief:\"The screen that is rendered when the app start is complete. This is the screen the user first sees and can interact with after launch. The absence of this attribute on the app start span indicates a background app start where no UI was rendered.\",type:\"string\",applyScrubbing:{key:\"manual\"},isInOtel:!1,visibility:\"public\",example:\"MainActivity\",changelog:[{version:\"0.7.0\",prs:[353],description:\"Added app.vitals.start.screen attribute\"}]},\"app.vitals.start.type\":{brief:\"The type of app start, for example `cold` or `warm`\",type:\"string\",applyScrubbing:{key:\"manual\"},isInOtel:!1,visibility:\"public\",example:\"cold\",aliases:[\"app_start_type\"],changelog:[{version:\"0.5.0\",prs:[313],description:\"Added app.vitals.start.type attribute\"}]},\"app.vitals.start.warm.value\":{brief:\"The duration of a warm app start in milliseconds\",type:\"double\",applyScrubbing:{key:\"manual\"},isInOtel:!1,visibility:\"public\",example:1234.56,aliases:[\"app_start_warm\"],changelog:[{version:\"0.5.0\",prs:[313],description:\"Added app.vitals.start.warm.value attribute\"}]},\"app.vitals.ttfd.value\":{brief:\"The duration of time to full display in milliseconds\",type:\"double\",applyScrubbing:{key:\"manual\"},isInOtel:!1,visibility:\"public\",example:1234.56,aliases:[\"time_to_full_display\"],changelog:[{version:\"0.5.0\",prs:[313],description:\"Added app.vitals.ttfd.value attribute\"}]},\"app.vitals.ttid.value\":{brief:\"The duration of time to initial display in milliseconds\",type:\"double\",applyScrubbing:{key:\"manual\"},isInOtel:!1,visibility:\"public\",example:1234.56,aliases:[\"time_to_initial_display\"],changelog:[{version:\"0.5.0\",prs:[313],description:\"Added app.vitals.ttid.value attribute\"}]},\"art.gc.blocking_count\":{brief:\"Total number of blocking (stop-the-world) garbage collections performed by the Android Runtime\",type:\"integer\",applyScrubbing:{key:\"manual\"},isInOtel:!1,visibility:\"public\",example:1,changelog:[{version:\"0.11.0\",prs:[382],description:\"Added art.gc.blocking_count attribute\"}]},\"art.gc.blocking_time\":{brief:\"Total time spent in blocking (stop-the-world) garbage collections by the Android Runtime, in milliseconds\",type:\"double\",applyScrubbing:{key:\"manual\"},isInOtel:!1,visibility:\"public\",example:11.873,changelog:[{version:\"0.11.0\",prs:[382],description:\"Added art.gc.blocking_time attribute\"}]},\"art.gc.pre_oome_count\":{brief:\"Total number of garbage collections triggered as a last resort before an OutOfMemoryError by the Android Runtime\",type:\"integer\",applyScrubbing:{key:\"manual\"},isInOtel:!1,visibility:\"public\",example:0,changelog:[{version:\"0.11.0\",prs:[382],description:\"Added art.gc.pre_oome_count attribute\"}]},\"art.gc.total_count\":{brief:\"Total number of garbage collections performed by the Android Runtime\",type:\"integer\",applyScrubbing:{key:\"manual\"},isInOtel:!1,visibility:\"public\",example:1,changelog:[{version:\"0.11.0\",prs:[382],description:\"Added art.gc.total_count attribute\"}]},\"art.gc.total_time\":{brief:\"Total time spent in garbage collection by the Android Runtime, in milliseconds\",type:\"double\",applyScrubbing:{key:\"manual\"},isInOtel:!1,visibility:\"public\",example:11.807,changelog:[{version:\"0.11.0\",prs:[382],description:\"Added art.gc.total_time attribute\"}]},\"art.gc.waiting_time\":{brief:\"Total time threads spent waiting for garbage collection to complete in the Android Runtime, in milliseconds\",type:\"double\",applyScrubbing:{key:\"manual\"},isInOtel:!1,visibility:\"public\",example:8.054,changelog:[{version:\"0.11.0\",prs:[382],description:\"Added art.gc.waiting_time attribute\"}]},\"art.memory.free\":{brief:\"Free memory available to the process as reported by the Android Runtime, in bytes\",type:\"integer\",applyScrubbing:{key:\"manual\"},isInOtel:!1,visibility:\"public\",example:3181568,changelog:[{version:\"0.11.0\",prs:[382],description:\"Added art.memory.free attribute\"}]},\"art.memory.free_until_gc\":{brief:\"Free memory available before a garbage collection would be triggered by the Android Runtime, in bytes\",type:\"integer\",applyScrubbing:{key:\"manual\"},isInOtel:!1,visibility:\"public\",example:3181568,changelog:[{version:\"0.11.0\",prs:[382],description:\"Added art.memory.free_until_gc attribute\"}]},\"art.memory.free_until_oome\":{brief:\"Free memory available before an OutOfMemoryError would be thrown by the Android Runtime, in bytes\",type:\"integer\",applyScrubbing:{key:\"manual\"},isInOtel:!1,visibility:\"public\",example:196083712,changelog:[{version:\"0.11.0\",prs:[382],description:\"Added art.memory.free_until_oome attribute\"}]},\"art.memory.max\":{brief:\"Maximum memory the process is allowed to use as reported by the Android Runtime, in bytes\",type:\"integer\",applyScrubbing:{key:\"manual\"},isInOtel:!1,visibility:\"public\",example:201326592,changelog:[{version:\"0.11.0\",prs:[382],description:\"Added art.memory.max attribute\"}]},\"art.memory.total\":{brief:\"Total memory currently allocated to the process by the Android Runtime, in bytes\",type:\"integer\",applyScrubbing:{key:\"manual\"},isInOtel:!1,visibility:\"public\",example:7774208,changelog:[{version:\"0.11.0\",prs:[382],description:\"Added art.memory.total attribute\"}]},\"aws.cloudwatch.logs.log_group\":{brief:\"The name of the CloudWatch Logs log group\",type:\"string\",applyScrubbing:{key:\"manual\"},isInOtel:!1,visibility:\"public\",example:\"/aws/lambda/my-function\",changelog:[{version:\"0.7.0\",prs:[369],description:\"Added aws.cloudwatch.logs.log_group attribute\"}]},\"aws.cloudwatch.logs.log_stream\":{brief:\"The name of the CloudWatch Logs log stream\",type:\"string\",applyScrubbing:{key:\"manual\"},isInOtel:!1,visibility:\"public\",example:\"2024/01/01/[$LATEST]abcdef1234567890\",changelog:[{version:\"0.7.0\",prs:[369],description:\"Added aws.cloudwatch.logs.log_stream attribute\"}]},\"aws.cloudwatch.logs.url\":{brief:\"The URL to the CloudWatch Logs log group\",type:\"string\",applyScrubbing:{key:\"manual\"},isInOtel:!1,visibility:\"public\",example:\"https://console.aws.amazon.com/cloudwatch/home?region=us-east-1#logsV2:log-groups/log-group/my-log-group\",changelog:[{version:\"0.7.0\",prs:[369],description:\"Added aws.cloudwatch.logs.url attribute\"}]},\"aws.dynamodb.attribute_definitions\":{brief:\"The JSON-serialized value of each item in the `AttributeDefinitions` request field.\",type:\"string[]\",applyScrubbing:{key:\"manual\"},isInOtel:!0,visibility:\"public\",example:['{ \"AttributeName\": \"string\", \"AttributeType\": \"string\" }'],changelog:[{version:\"0.16.0\",prs:[479],description:\"Added aws.dynamodb.attribute_definitions attribute\"}]},\"aws.dynamodb.consistent_read\":{brief:\"The value of the `ConsistentRead` request parameter.\",type:\"boolean\",applyScrubbing:{key:\"manual\"},isInOtel:!0,visibility:\"public\",example:!0,changelog:[{version:\"0.16.0\",prs:[479],description:\"Added aws.dynamodb.consistent_read attribute\"}]},\"aws.dynamodb.consumed_capacity\":{brief:\"The JSON-serialized value of each item in the `ConsumedCapacity` response field.\",type:\"string[]\",applyScrubbing:{key:\"manual\"},isInOtel:!0,visibility:\"public\",example:['{ \"CapacityUnits\": number, \"GlobalSecondaryIndexes\": { \"string\" : { \"CapacityUnits\": number, \"ReadCapacityUnits\": number, \"WriteCapacityUnits\": number } }, \"LocalSecondaryIndexes\": { \"string\" : { \"CapacityUnits\": number, \"ReadCapacityUnits\": number, \"WriteCapacityUnits\": number } }, \"ReadCapacityUnits\": number, \"Table\": { \"CapacityUnits\": number, \"ReadCapacityUnits\": number, \"WriteCapacityUnits\": number }, \"TableName\": \"string\", \"WriteCapacityUnits\": number }'],changelog:[{version:\"0.16.0\",prs:[479],description:\"Added aws.dynamodb.consumed_capacity attribute\"}]},\"aws.dynamodb.count\":{brief:\"The value of the `Count` response parameter.\",type:\"integer\",applyScrubbing:{key:\"manual\"},isInOtel:!0,visibility:\"public\",example:10,changelog:[{version:\"0.16.0\",prs:[479],description:\"Added aws.dynamodb.count attribute\"}]},\"aws.dynamodb.exclusive_start_table\":{brief:\"The value of the `ExclusiveStartTableName` request parameter.\",type:\"string\",applyScrubbing:{key:\"manual\"},isInOtel:!0,visibility:\"public\",example:\"Users\",changelog:[{version:\"0.16.0\",prs:[479],description:\"Added aws.dynamodb.exclusive_start_table attribute\"}]},\"aws.dynamodb.global_secondary_indexes\":{brief:\"The JSON-serialized value of each item of the `GlobalSecondaryIndexes` request field.\",type:\"string[]\",applyScrubbing:{key:\"manual\"},isInOtel:!0,visibility:\"public\",example:['{ \"IndexName\": \"string\", \"KeySchema\": [ { \"AttributeName\": \"string\", \"KeyType\": \"string\" } ], \"Projection\": { \"NonKeyAttributes\": [ \"string\" ], \"ProjectionType\": \"string\" }, \"ProvisionedThroughput\": { \"ReadCapacityUnits\": number, \"WriteCapacityUnits\": number } }'],changelog:[{version:\"0.16.0\",prs:[479],description:\"Added aws.dynamodb.global_secondary_indexes attribute\"}]},\"aws.dynamodb.global_secondary_index_updates\":{brief:\"The JSON-serialized value of each item in the `GlobalSecondaryIndexUpdates` request field.\",type:\"string[]\",applyScrubbing:{key:\"manual\"},isInOtel:!0,visibility:\"public\",example:['{ \"Create\": { \"IndexName\": \"string\", \"KeySchema\": [ { \"AttributeName\": \"string\", \"KeyType\": \"string\" } ], \"Projection\": { \"NonKeyAttributes\": [ \"string\" ], \"ProjectionType\": \"string\" }, \"ProvisionedThroughput\": { \"ReadCapacityUnits\": number, \"WriteCapacityUnits\": number } }'],changelog:[{version:\"0.16.0\",prs:[479],description:\"Added aws.dynamodb.global_secondary_index_updates attribute\"}]},\"aws.dynamodb.index_name\":{brief:\"The value of the `IndexName` request parameter.\",type:\"string\",applyScrubbing:{key:\"manual\"},isInOtel:!0,visibility:\"public\",example:\"name_to_group\",changelog:[{version:\"0.16.0\",prs:[479],description:\"Added aws.dynamodb.index_name attribute\"}]},\"aws.dynamodb.item_collection_metrics\":{brief:\"The JSON-serialized value of the `ItemCollectionMetrics` response field.\",type:\"string\",applyScrubbing:{key:\"manual\"},isInOtel:!0,visibility:\"public\",example:'{ \"string\" : [ { \"ItemCollectionKey\": { \"string\" : { \"B\": blob, \"BOOL\": boolean, \"BS\": [ blob ], \"L\": [ \"AttributeValue\" ], \"M\": { \"string\" : \"AttributeValue\" }, \"N\": \"string\", \"NS\": [ \"string\" ], \"NULL\": boolean, \"S\": \"string\", \"SS\": [ \"string\" ] } }, \"SizeEstimateRangeGB\": [ number ] } ] }',changelog:[{version:\"0.16.0\",prs:[479],description:\"Added aws.dynamodb.item_collection_metrics attribute\"}]},\"aws.dynamodb.limit\":{brief:\"The value of the `Limit` request parameter.\",type:\"integer\",applyScrubbing:{key:\"manual\"},isInOtel:!0,visibility:\"public\",example:10,changelog:[{version:\"0.16.0\",prs:[479],description:\"Added aws.dynamodb.limit attribute\"}]},\"aws.dynamodb.local_secondary_indexes\":{brief:\"The JSON-serialized value of each item of the `LocalSecondaryIndexes` request field.\",type:\"string[]\",applyScrubbing:{key:\"manual\"},isInOtel:!0,visibility:\"public\",example:['{ \"IndexArn\": \"string\", \"IndexName\": \"string\", \"IndexSizeBytes\": number, \"ItemCount\": number, \"KeySchema\": [ { \"AttributeName\": \"string\", \"KeyType\": \"string\" } ], \"Projection\": { \"NonKeyAttributes\": [ \"string\" ], \"ProjectionType\": \"string\" } }'],changelog:[{version:\"0.16.0\",prs:[479],description:\"Added aws.dynamodb.local_secondary_indexes attribute\"}]},\"aws.dynamodb.projection\":{brief:\"The value of the `ProjectionExpression` request parameter.\",type:\"string\",applyScrubbing:{key:\"manual\"},isInOtel:!0,visibility:\"public\",example:\"Title, Price, Color\",changelog:[{version:\"0.16.0\",prs:[479],description:\"Added aws.dynamodb.projection attribute\"}]},\"aws.dynamodb.provisioned_read_capacity\":{brief:\"The value of the `ProvisionedThroughput.ReadCapacityUnits` request parameter.\",type:\"double\",applyScrubbing:{key:\"manual\"},isInOtel:!0,visibility:\"public\",example:1,changelog:[{version:\"0.16.0\",prs:[479],description:\"Added aws.dynamodb.provisioned_read_capacity attribute\"}]},\"aws.dynamodb.provisioned_write_capacity\":{brief:\"The value of the `ProvisionedThroughput.WriteCapacityUnits` request parameter.\",type:\"double\",applyScrubbing:{key:\"manual\"},isInOtel:!0,visibility:\"public\",example:2,changelog:[{version:\"0.16.0\",prs:[479],description:\"Added aws.dynamodb.provisioned_write_capacity attribute\"}]},\"aws.dynamodb.scanned_count\":{brief:\"The value of the `ScannedCount` response parameter.\",type:\"integer\",applyScrubbing:{key:\"manual\"},isInOtel:!0,visibility:\"public\",example:50,changelog:[{version:\"0.16.0\",prs:[479],description:\"Added aws.dynamodb.scanned_count attribute\"}]},\"aws.dynamodb.scan_forward\":{brief:\"The value of the `ScanIndexForward` request parameter.\",type:\"boolean\",applyScrubbing:{key:\"manual\"},isInOtel:!0,visibility:\"public\",example:!0,changelog:[{version:\"0.16.0\",prs:[479],description:\"Added aws.dynamodb.scan_forward attribute\"}]},\"aws.dynamodb.segment\":{brief:\"The value of the `Segment` request parameter.\",type:\"integer\",applyScrubbing:{key:\"manual\"},isInOtel:!0,visibility:\"public\",example:10,changelog:[{version:\"0.16.0\",prs:[479],description:\"Added aws.dynamodb.segment attribute\"}]},\"aws.dynamodb.select\":{brief:\"The value of the `Select` request parameter.\",type:\"string\",applyScrubbing:{key:\"manual\"},isInOtel:!0,visibility:\"public\",example:\"ALL_ATTRIBUTES\",changelog:[{version:\"0.16.0\",prs:[479],description:\"Added aws.dynamodb.select attribute\"}]},\"aws.dynamodb.table_count\":{brief:\"The number of items in the `TableNames` response parameter.\",type:\"integer\",applyScrubbing:{key:\"manual\"},isInOtel:!0,visibility:\"public\",example:20,changelog:[{version:\"0.16.0\",prs:[479],description:\"Added aws.dynamodb.table_count attribute\"}]},\"aws.dynamodb.table_names\":{brief:\"The keys in the `RequestItems` object field.\",type:\"string[]\",applyScrubbing:{key:\"manual\"},isInOtel:!0,visibility:\"public\",example:[\"Users\",\"Cats\"],changelog:[{version:\"0.16.0\",prs:[479],description:\"Added aws.dynamodb.table_names attribute\"}]},\"aws.dynamodb.total_segments\":{brief:\"The value of the `TotalSegments` request parameter.\",type:\"integer\",applyScrubbing:{key:\"manual\"},isInOtel:!0,visibility:\"public\",example:100,changelog:[{version:\"0.16.0\",prs:[479],description:\"Added aws.dynamodb.total_segments attribute\"}]},\"aws.extended_request_id\":{brief:\"The AWS extended request ID as returned in the response headers.\",type:\"string\",applyScrubbing:{key:\"manual\"},isInOtel:!0,visibility:\"public\",example:\"wzHcyEWfmOGDIE5QOhTAqFDoDWP3y8IUvpNINCwL9N4TEHbUw0/gZJ+VZTmCNCWR7fezEN3eCiQ=\",aliases:[\"aws.request.extended_id\"],changelog:[{version:\"0.16.0\",prs:[480],description:\"Added aws.extended_request_id attribute\"}]},\"aws.kinesis.stream_name\":{brief:\"The name of the AWS Kinesis stream the request refers to.\",type:\"string\",applyScrubbing:{key:\"manual\"},isInOtel:!0,visibility:\"public\",example:\"some-stream-name\",aliases:[\"aws.kinesis.stream.name\"],changelog:[{version:\"0.16.0\",prs:[480],description:\"Added aws.kinesis.stream_name attribute\"}]},\"aws.kinesis.stream.name\":{brief:\"The name of the AWS Kinesis stream the request refers to.\",type:\"string\",applyScrubbing:{key:\"manual\"},isInOtel:!1,visibility:\"public\",example:\"some-stream-name\",deprecation:{replacement:\"aws.kinesis.stream_name\",reason:\"This attribute is being deprecated in favor of aws.kinesis.stream_name, which is the OTel-aligned replacement.\"},aliases:[\"aws.kinesis.stream_name\"],changelog:[{version:\"0.16.0\",prs:[480],description:\"Added aws.kinesis.stream.name attribute, deprecated in favor of aws.kinesis.stream_name\"}]},\"aws.lambda.aws_request_id\":{brief:\"The AWS request ID as received by the Lambda function runtime\",type:\"string\",applyScrubbing:{key:\"manual\"},isInOtel:!1,visibility:\"public\",example:\"8476a536-e9f4-11e8-9739-2dfe598c3fcd\",deprecation:{replacement:\"faas.invocation_id\",reason:\"This attribute is being deprecated in favor of faas.invocation_id\"},aliases:[\"faas.invocation_id\",\"faas.execution\"],changelog:[{version:\"0.16.0\",prs:[473],description:\"Added faas.execution as an alias\"},{version:\"0.11.1\",prs:[414,424],description:\"Deprecated aws.lambda.aws_request_id in favor of faas.invocation_id\"},{version:\"0.7.0\",prs:[369],description:\"Added aws.lambda.aws_request_id attribute\"}]},\"aws.lambda.execution_duration_in_millis\":{brief:\"The execution duration of the Lambda function invocation in milliseconds\",type:\"double\",applyScrubbing:{key:\"manual\"},isInOtel:!1,visibility:\"public\",example:1234.56,changelog:[{version:\"0.7.0\",prs:[369],description:\"Added aws.lambda.execution_duration_in_millis attribute\"}]},\"aws.lambda.function_name\":{brief:\"The name of the Lambda function\",type:\"string\",applyScrubbing:{key:\"manual\"},isInOtel:!1,visibility:\"public\",example:\"my-function\",deprecation:{replacement:\"faas.name\",reason:\"Use the OTel-aligned faas.name attribute instead\"},aliases:[\"faas.name\"],changelog:[{version:\"0.11.1\",prs:[414],description:\"Deprecated aws.lambda.function_name in favor of faas.name\"},{version:\"0.7.0\",prs:[369],description:\"Added aws.lambda.function_name attribute\"}]},\"aws.lambda.function_version\":{brief:\"The version of the Lambda function\",type:\"string\",applyScrubbing:{key:\"manual\"},isInOtel:!1,visibility:\"public\",example:\"$LATEST\",deprecation:{replacement:\"faas.version\",reason:\"Use the OTel-aligned faas.version attribute instead\"},aliases:[\"faas.version\"],changelog:[{version:\"0.11.1\",prs:[414,424],description:\"Deprecated aws.lambda.function_version in favor of faas.version\"},{version:\"0.7.0\",prs:[369],description:\"Added aws.lambda.function_version attribute\"}]},\"aws.lambda.invoked_arn\":{brief:\"The full ARN of the Lambda function that was invoked\",type:\"string\",applyScrubbing:{key:\"manual\"},isInOtel:!0,visibility:\"public\",example:\"arn:aws:lambda:us-east-1:123456789012:function:my-function\",aliases:[\"aws.lambda.invoked_function_arn\"],changelog:[{version:\"0.11.1\",prs:[414]}]},\"aws.lambda.invoked_function_arn\":{brief:\"The full ARN of the Lambda function that was invoked\",type:\"string\",applyScrubbing:{key:\"manual\"},isInOtel:!1,visibility:\"public\",example:\"arn:aws:lambda:us-east-1:123456789012:function:my-function\",deprecation:{replacement:\"aws.lambda.invoked_arn\",reason:\"This attribute is being deprecated in favor of aws.lambda.invoked_arn\"},aliases:[\"aws.lambda.invoked_arn\"],changelog:[{version:\"0.11.1\",prs:[414],description:\"Deprecated aws.lambda.invoked_function_arn in favor of aws.lambda.invoked_arn\"},{version:\"0.7.0\",prs:[369],description:\"Added aws.lambda.invoked_function_arn attribute\"}]},\"aws.lambda.remaining_time_in_millis\":{brief:\"The remaining time in milliseconds before the Lambda function times out\",type:\"double\",applyScrubbing:{key:\"manual\"},isInOtel:!1,visibility:\"public\",example:5e3,changelog:[{version:\"0.7.0\",prs:[369],description:\"Added aws.lambda.remaining_time_in_millis attribute\"}]},\"aws.log.group.names\":{brief:\"The name(s) of the AWS log group(s) an application is writing to.\",type:\"string[]\",applyScrubbing:{key:\"manual\"},isInOtel:!0,visibility:\"public\",example:[\"/aws/lambda/my-function\",\"opentelemetry-service\"],changelog:[{version:\"0.11.1\",prs:[414]}]},\"aws.log.stream.names\":{brief:\"The name(s) of the AWS log stream(s) an application is writing to.\",type:\"string[]\",applyScrubbing:{key:\"manual\"},isInOtel:!0,visibility:\"public\",example:[\"logs/main/10838bed-421f-43ef-870a-f43feacbbb5b\"],changelog:[{version:\"0.11.1\",prs:[414]}]},\"aws.request.extended_id\":{brief:\"The AWS extended request ID as returned in the response headers.\",type:\"string\",applyScrubbing:{key:\"manual\"},isInOtel:!1,visibility:\"public\",example:\"wzHcyEWfmOGDIE5QOhTAqFDoDWP3y8IUvpNINCwL9N4TEHbUw0/gZJ+VZTmCNCWR7fezEN3eCiQ=\",deprecation:{replacement:\"aws.extended_request_id\",reason:\"This attribute is being deprecated in favor of aws.extended_request_id, which is the OTel-aligned replacement.\"},aliases:[\"aws.extended_request_id\"],changelog:[{version:\"0.16.0\",prs:[480],description:\"Added aws.request.extended_id attribute, deprecated in favor of aws.extended_request_id\"}]},\"aws.request_id\":{brief:\"The AWS request ID as returned in the response headers.\",type:\"string\",applyScrubbing:{key:\"manual\"},isInOtel:!0,visibility:\"public\",example:\"79b9da39-b7ae-508a-a6bc-864b2829c622\",aliases:[\"aws.request.id\"],changelog:[{version:\"0.16.0\",prs:[480],description:\"Added aws.request_id attribute\"}]},\"aws.request.id\":{brief:\"The AWS request ID as returned in the response headers.\",type:\"string\",applyScrubbing:{key:\"manual\"},isInOtel:!1,visibility:\"public\",example:\"79b9da39-b7ae-508a-a6bc-864b2829c622\",deprecation:{replacement:\"aws.request_id\",reason:\"This attribute is being deprecated in favor of aws.request_id, which is the OTel-aligned replacement.\"},aliases:[\"aws.request_id\"],changelog:[{version:\"0.16.0\",prs:[480],description:\"Added aws.request.id attribute, deprecated in favor of aws.request_id\"}]},\"aws.s3.bucket\":{brief:\"The S3 bucket name the request refers to.\",type:\"string\",applyScrubbing:{key:\"manual\"},isInOtel:!0,visibility:\"public\",example:\"ot-demo-test\",changelog:[{version:\"0.16.0\",prs:[480],description:\"Added aws.s3.bucket attribute\"}]},\"aws.secretsmanager.secret.arn\":{brief:\"The ARN of the Secret stored in Secrets Manager.\",type:\"string\",applyScrubbing:{key:\"manual\"},isInOtel:!0,visibility:\"public\",example:\"arn:aws:secretsmanager:us-east-1:123456789012:secret:SecretName-6RandomCharacters\",changelog:[{version:\"0.16.0\",prs:[480],description:\"Added aws.secretsmanager.secret.arn attribute\"}]},\"aws.sns.topic.arn\":{brief:\"The ARN of the AWS SNS Topic. An Amazon SNS topic is a logical access point that acts as a communication channel.\",type:\"string\",applyScrubbing:{key:\"manual\"},isInOtel:!0,visibility:\"public\",example:\"arn:aws:sns:us-east-1:123456789012:mystack-mytopic-NZJ5JSMVGFIE\",changelog:[{version:\"0.16.0\",prs:[480],description:\"Added aws.sns.topic.arn attribute\"}]},\"aws.step_functions.activity.arn\":{brief:\"The ARN of the AWS Step Functions Activity.\",type:\"string\",applyScrubbing:{key:\"manual\"},isInOtel:!0,visibility:\"public\",example:\"arn:aws:states:us-east-1:123456789012:activity:get-greeting\",changelog:[{version:\"0.16.0\",prs:[480],description:\"Added aws.step_functions.activity.arn attribute\"}]},\"aws.step_functions.state_machine.arn\":{brief:\"The ARN of the AWS Step Functions State Machine.\",type:\"string\",applyScrubbing:{key:\"manual\"},isInOtel:!0,visibility:\"public\",example:\"arn:aws:states:us-east-1:123456789012:stateMachine:myStateMachine:1\",changelog:[{version:\"0.16.0\",prs:[480],description:\"Added aws.step_functions.state_machine.arn attribute\"}]},blocked_main_thread:{brief:\"Whether the main thread was blocked by the span.\",type:\"boolean\",applyScrubbing:{key:\"manual\"},isInOtel:!1,visibility:\"public\",example:!0,changelog:[{version:\"0.0.0\"}]},\"browser.name\":{brief:\"The name of the browser.\",type:\"string\",applyScrubbing:{key:\"manual\"},isInOtel:!1,visibility:\"public\",example:\"Chrome\",aliases:[\"sentry.browser.name\"],changelog:[{version:\"0.1.0\",prs:[127,139]},{version:\"0.0.0\"}]},\"browser.performance.navigation.activation_start\":{brief:\"The time between initiating a navigation to a page and the browser activating the page\",type:\"double\",applyScrubbing:{key:\"manual\"},isInOtel:!1,visibility:\"public\",example:1.983,aliases:[\"performance.activationStart\"],changelog:[{version:\"0.5.0\",prs:[321],description:\"Added browser.performance.navigation.activation_start attribute\"}]},\"browser.performance.time_origin\":{brief:\"The browser's performance.timeOrigin timestamp representing the time when the pageload was initiated\",type:\"double\",applyScrubbing:{key:\"manual\"},isInOtel:!1,visibility:\"public\",example:1776185678886e-3,aliases:[\"performance.timeOrigin\"],changelog:[{version:\"0.5.0\",prs:[321],description:\"Added browser.performance.time_origin attribute attribute\"}]},\"browser.report.type\":{brief:\"A browser report sent via reporting API..\",type:\"string\",applyScrubbing:{key:\"manual\"},isInOtel:!1,visibility:\"public\",example:\"network-error\",changelog:[{version:\"0.1.0\",prs:[68,127]}]},\"browser.script.invoker\":{brief:\"How a script was called in the browser.\",type:\"string\",applyScrubbing:{key:\"manual\"},isInOtel:!1,visibility:\"public\",example:\"Window.requestAnimationFrame\",changelog:[{version:\"0.1.0\",prs:[127]},{version:\"0.0.0\"}]},\"browser.script.invoker_type\":{brief:\"Browser script entry point type.\",type:\"string\",applyScrubbing:{key:\"manual\"},isInOtel:!1,visibility:\"public\",example:\"event-listener\",changelog:[{version:\"0.1.0\",prs:[127]},{version:\"0.0.0\"}]},\"browser.script.source_char_position\":{brief:\"A number representing the script character position of the script.\",type:\"integer\",applyScrubbing:{key:\"manual\"},isInOtel:!1,visibility:\"public\",example:678,changelog:[{version:\"0.4.0\",prs:[228]},{version:\"0.0.0\"}]},\"browser.version\":{brief:\"The version of the browser.\",type:\"string\",applyScrubbing:{key:\"manual\"},isInOtel:!1,visibility:\"public\",example:\"120.0.6099.130\",aliases:[\"sentry.browser.version\"],changelog:[{version:\"0.1.0\",prs:[59,127,139]}]},\"browser.web_vital.cls.report_event\":{brief:\"The event that caused the SDK to report CLS (pagehide or navigation)\",type:\"string\",applyScrubbing:{key:\"manual\"},isInOtel:!1,visibility:\"public\",example:\"navigation\",changelog:[{version:\"0.5.0\",prs:[319],description:\"Added browser.web_vital.cls.report_event attribute\"}]},\"browser.web_vital.cls.source.<key>\":{brief:\"The HTML elements or components responsible for the layout shift. <key> is a numeric index from 1 to N\",type:\"string\",applyScrubbing:{key:\"manual\"},isInOtel:!1,visibility:\"public\",hasDynamicSuffix:!0,example:\"body > div#app\",aliases:[\"cls.source.<key>\"],changelog:[{version:\"0.5.0\",prs:[234]}]},\"browser.web_vital.cls.value\":{brief:\"The value of the recorded Cumulative Layout Shift (CLS) web vital\",type:\"double\",applyScrubbing:{key:\"manual\"},isInOtel:!1,visibility:\"public\",example:.2361,aliases:[\"cls\"],changelog:[{version:\"0.5.0\",prs:[229],description:\"Added browser.web_vital.cls.value attribute\"}]},\"browser.web_vital.fcp.value\":{brief:\"The time it takes for the browser to render the first piece of meaningful content on the screen\",type:\"double\",applyScrubbing:{key:\"manual\"},isInOtel:!1,visibility:\"public\",example:547.6951,aliases:[\"fcp\"],changelog:[{version:\"0.5.0\",prs:[235]}]},\"browser.web_vital.fp.value\":{brief:\"The time in milliseconds it takes for the browser to render the first pixel on the screen\",type:\"double\",applyScrubbing:{key:\"manual\"},isInOtel:!1,visibility:\"public\",example:477.1926,aliases:[\"fp\"],changelog:[{version:\"0.5.0\",prs:[235]}]},\"browser.web_vital.inp.value\":{brief:\"The value of the recorded Interaction to Next Paint (INP) web vital\",type:\"double\",applyScrubbing:{key:\"manual\"},isInOtel:!1,visibility:\"public\",example:200,aliases:[\"inp\"],changelog:[{version:\"0.5.0\",prs:[229],description:\"Added browser.web_vital.inp.value attribute\"}]},\"browser.web_vital.lcp.element\":{brief:\"The HTML element selector or component name for which LCP was reported\",type:\"string\",applyScrubbing:{key:\"manual\"},isInOtel:!1,visibility:\"public\",example:\"body > div#app > div#container > div\",aliases:[\"lcp.element\"],changelog:[{version:\"0.5.0\",prs:[233]}]},\"browser.web_vital.lcp.id\":{brief:\"The id of the dom element responsible for the largest contentful paint\",type:\"string\",applyScrubbing:{key:\"manual\"},isInOtel:!1,visibility:\"public\",example:\"#gero\",aliases:[\"lcp.id\"],changelog:[{version:\"0.5.0\",prs:[233]}]},\"browser.web_vital.lcp.load_time\":{brief:\"The time it took for the LCP element to be loaded\",type:\"integer\",applyScrubbing:{key:\"manual\"},isInOtel:!1,visibility:\"public\",example:1402,aliases:[\"lcp.loadTime\"],changelog:[{version:\"0.5.0\",prs:[233]}]},\"browser.web_vital.lcp.render_time\":{brief:\"The time it took for the LCP element to be rendered\",type:\"integer\",applyScrubbing:{key:\"manual\"},isInOtel:!1,visibility:\"public\",example:1685,aliases:[\"lcp.renderTime\"],changelog:[{version:\"0.5.0\",prs:[233]}]},\"browser.web_vital.lcp.report_event\":{brief:\"The event that caused the SDK to report LCP (pagehide or navigation)\",type:\"string\",applyScrubbing:{key:\"manual\"},isInOtel:!1,visibility:\"public\",example:\"pagehide\",changelog:[{version:\"0.5.0\",prs:[319],description:\"Added browser.web_vital.lcp.report_event attribute\"}]},\"browser.web_vital.lcp.size\":{brief:\"The size of the largest contentful paint element\",type:\"integer\",applyScrubbing:{key:\"manual\"},isInOtel:!1,visibility:\"public\",example:1024,aliases:[\"lcp.size\"],changelog:[{version:\"0.5.0\",prs:[233]}]},\"browser.web_vital.lcp.url\":{brief:\"The url of the dom element responsible for the largest contentful paint\",type:\"string\",applyScrubbing:{key:\"auto\"},isInOtel:!1,visibility:\"public\",example:\"https://example.com/static/img.png\",aliases:[\"lcp.url\"],changelog:[{version:\"0.5.0\",prs:[233]}]},\"browser.web_vital.lcp.value\":{brief:\"The value of the recorded Largest Contentful Paint (LCP) web vital\",type:\"double\",applyScrubbing:{key:\"manual\"},isInOtel:!1,visibility:\"public\",example:2500,aliases:[\"lcp\"],changelog:[{version:\"0.5.0\",prs:[229],description:\"Added browser.web_vital.lcp.value attribute\"}]},\"browser.web_vital.ttfb.request_time\":{brief:\"The time it takes for the server to process the initial request and send the first byte of a response to the user's browser\",type:\"double\",applyScrubbing:{key:\"manual\"},isInOtel:!1,visibility:\"public\",example:1554.5814,aliases:[\"ttfb.requestTime\"],changelog:[{version:\"0.5.0\",prs:[235]}]},\"browser.web_vital.ttfb.value\":{brief:\"The value of the recorded Time To First Byte (TTFB) web vital in Milliseconds\",type:\"double\",applyScrubbing:{key:\"manual\"},isInOtel:!1,visibility:\"public\",example:194.3322,aliases:[\"ttfb\"],changelog:[{version:\"0.5.0\",prs:[235]}]},\"cache.hit\":{brief:\"If the cache was hit during this span.\",type:\"boolean\",applyScrubbing:{key:\"manual\"},isInOtel:!1,visibility:\"public\",example:!0,changelog:[{version:\"0.0.0\"}]},\"cache.item_size\":{brief:\"The size of the requested item in the cache. In bytes.\",type:\"integer\",applyScrubbing:{key:\"manual\"},isInOtel:!1,visibility:\"public\",example:58,changelog:[{version:\"0.4.0\",prs:[228]},{version:\"0.0.0\"}]},\"cache.key\":{brief:\"The key of the cache accessed.\",type:\"string[]\",applyScrubbing:{key:\"manual\"},isInOtel:!1,visibility:\"public\",example:[\"my-cache-key\",\"my-other-cache-key\"],changelog:[{version:\"0.0.0\"}]},\"cache.operation\":{brief:\"The operation being performed on the cache.\",type:\"string\",applyScrubbing:{key:\"manual\"},isInOtel:!1,visibility:\"public\",example:\"get\",changelog:[{version:\"0.1.0\",prs:[127]},{version:\"0.0.0\"}]},\"cache.ttl\":{brief:\"The ttl of the cache in seconds\",type:\"integer\",applyScrubbing:{key:\"manual\"},isInOtel:!1,visibility:\"public\",example:120,changelog:[{version:\"0.4.0\",prs:[228]},{version:\"0.0.0\"}]},\"cache.write\":{brief:\"If the cache operation resulted in a write to the cache.\",type:\"boolean\",applyScrubbing:{key:\"manual\"},isInOtel:!1,visibility:\"public\",example:!0,changelog:[{version:\"0.5.0\"}]},channel:{brief:\"The channel name that is being used.\",type:\"string\",applyScrubbing:{key:\"manual\"},isInOtel:!1,visibility:\"public\",example:\"mail\",changelog:[{version:\"0.1.0\",prs:[127]},{version:\"0.0.0\"}]},\"client.address\":{brief:\"Client address - domain name if available without reverse DNS lookup; otherwise, IP address or Unix domain socket name.\",type:\"string\",applyScrubbing:{key:\"auto\"},isInOtel:!0,visibility:\"public\",example:\"example.com\",aliases:[\"http.client_ip\"],changelog:[{version:\"0.1.0\",prs:[106,127]},{version:\"0.0.0\"}]},\"client.port\":{brief:\"Client port number.\",type:\"integer\",applyScrubbing:{key:\"manual\"},isInOtel:!0,visibility:\"public\",example:5432,changelog:[{version:\"0.4.0\",prs:[228]},{version:\"0.0.0\"}]},\"cloudflare.d1.duration\":{brief:\"The duration of a Cloudflare D1 operation.\",type:\"integer\",applyScrubbing:{key:\"manual\"},isInOtel:!1,visibility:\"public\",example:543,changelog:[{version:\"0.4.0\",prs:[228]},{version:\"0.0.0\"}]},\"cloudflare.d1.query_type\":{brief:\"The type of query executed in a Cloudflare D1 operation\",type:\"string\",applyScrubbing:{key:\"manual\"},isInOtel:!1,visibility:\"public\",example:\"run\",deprecation:{replacement:\"db.operation.name\"},aliases:[\"db.operation.name\",\"db.operation\"],changelog:[{version:\"0.11.0\",prs:[392],description:\"Added cloudflare.d1.query_type attribute\"}]},\"cloudflare.d1.rows_read\":{brief:\"The number of rows read in a Cloudflare D1 operation.\",type:\"integer\",applyScrubbing:{key:\"manual\"},isInOtel:!1,visibility:\"public\",example:12,changelog:[{version:\"0.4.0\",prs:[228]},{version:\"0.0.0\"}]},\"cloudflare.d1.rows_written\":{brief:\"The number of rows written in a Cloudflare D1 operation.\",type:\"integer\",applyScrubbing:{key:\"manual\"},isInOtel:!1,visibility:\"public\",example:12,changelog:[{version:\"0.4.0\",prs:[228]},{version:\"0.0.0\"}]},\"cloudflare.durable_object.query.bindings\":{brief:\"The number of bound parameters passed to the SQL exec call.\",type:\"integer\",applyScrubbing:{key:\"manual\"},isInOtel:!1,visibility:\"public\",example:2,changelog:[{version:\"0.13.0\",prs:[435],description:\"Added cloudflare.durable_object.query.bindings attribute\"}]},\"cloudflare.durable_object.response.rows_read\":{brief:\"The number of rows read by a Cloudflare Durable Object SQL operation.\",type:\"integer\",applyScrubbing:{key:\"manual\"},isInOtel:!1,visibility:\"public\",example:12,changelog:[{version:\"0.13.0\",prs:[435],description:\"Added cloudflare.durable_object.response.rows_read attribute\"}]},\"cloudflare.durable_object.response.rows_written\":{brief:\"The number of rows written by a Cloudflare Durable Object SQL operation.\",type:\"integer\",applyScrubbing:{key:\"manual\"},isInOtel:!1,visibility:\"public\",example:1,changelog:[{version:\"0.13.0\",prs:[435],description:\"Added cloudflare.durable_object.response.rows_written attribute\"}]},\"cloudflare.r2.bucket\":{brief:\"The name of the Cloudflare R2 bucket binding\",type:\"string\",applyScrubbing:{key:\"manual\"},isInOtel:!1,visibility:\"public\",example:\"MY_BUCKET\",changelog:[{version:\"0.11.1\",prs:[413],description:\"Added cloudflare.r2.bucket attribute\"}]},\"cloudflare.r2.operation\":{brief:\"The R2 API operation being performed\",type:\"string\",applyScrubbing:{key:\"manual\"},isInOtel:!1,visibility:\"public\",example:\"GetObject\",changelog:[{version:\"0.11.1\",prs:[413],description:\"Added cloudflare.r2.operation attribute\"}]},\"cloudflare.r2.request.delimiter\":{brief:\"The delimiter used to group objects in an R2 list operation\",type:\"string\",applyScrubbing:{key:\"manual\"},isInOtel:!1,visibility:\"public\",example:\"/\",changelog:[{version:\"0.11.1\",prs:[413],description:\"Added cloudflare.r2.request.delimiter attribute\"}]},\"cloudflare.r2.request.key\":{brief:\"The object key used in the R2 operation\",type:\"string\",applyScrubbing:{key:\"manual\"},isInOtel:!1,visibility:\"public\",example:\"my-file.txt\",changelog:[{version:\"0.11.1\",prs:[413],description:\"Added cloudflare.r2.request.key attribute\"}]},\"cloudflare.r2.request.part_number\":{brief:\"The part number in a multipart upload operation\",type:\"integer\",applyScrubbing:{key:\"manual\"},isInOtel:!1,visibility:\"public\",example:1,changelog:[{version:\"0.11.1\",prs:[413],description:\"Added cloudflare.r2.request.part_number attribute\"}]},\"cloudflare.r2.request.prefix\":{brief:\"The prefix used to filter objects in an R2 list operation\",type:\"string\",applyScrubbing:{key:\"manual\"},isInOtel:!1,visibility:\"public\",example:\"images/\",changelog:[{version:\"0.11.1\",prs:[413],description:\"Added cloudflare.r2.request.prefix attribute\"}]},\"cloudflare.workflow.attempt\":{brief:\"The current attempt number for a Cloudflare Workflow step\",type:\"integer\",applyScrubbing:{key:\"manual\"},isInOtel:!1,visibility:\"public\",example:1,changelog:[{version:\"0.11.0\",prs:[392],description:\"Added cloudflare.workflow.attempt attribute\"}]},\"cloudflare.workflow.retries.backoff\":{brief:\"The backoff strategy for Cloudflare Workflow step retries\",type:\"string\",applyScrubbing:{key:\"manual\"},isInOtel:!1,visibility:\"public\",example:\"exponential\",changelog:[{version:\"0.11.0\",prs:[392],description:\"Added cloudflare.workflow.retries.backoff attribute\"}]},\"cloudflare.workflow.retries.delay\":{brief:\"The delay between Cloudflare Workflow step retries\",type:\"string\",applyScrubbing:{key:\"manual\"},isInOtel:!1,visibility:\"public\",example:\"5 seconds\",changelog:[{version:\"0.11.0\",prs:[392],description:\"Added cloudflare.workflow.retries.delay attribute\"}]},\"cloudflare.workflow.retries.limit\":{brief:\"The maximum number of retries for a Cloudflare Workflow step\",type:\"integer\",applyScrubbing:{key:\"manual\"},isInOtel:!1,visibility:\"public\",example:3,changelog:[{version:\"0.11.0\",prs:[392],description:\"Added cloudflare.workflow.retries.limit attribute\"}]},\"cloudflare.workflow.timeout\":{brief:\"The timeout duration for a Cloudflare Workflow step\",type:\"string\",applyScrubbing:{key:\"manual\"},isInOtel:!1,visibility:\"public\",example:\"1 minute\",changelog:[{version:\"0.11.0\",prs:[392],description:\"Added cloudflare.workflow.timeout attribute\"}]},\"cloud.account.id\":{brief:\"The cloud account ID the resource is assigned to\",type:\"string\",applyScrubbing:{key:\"manual\"},isInOtel:!0,visibility:\"public\",example:\"123456789012\",changelog:[{version:\"0.7.0\",prs:[364],description:\"Added cloud.account.id attribute\"}]},\"cloud.availability_zone\":{brief:\"Cloud regions often have multiple, isolated locations known as zones to increase availability\",type:\"string\",applyScrubbing:{key:\"manual\"},isInOtel:!0,visibility:\"public\",example:\"us-east-1c\",changelog:[{version:\"0.7.0\",prs:[364],description:\"Added cloud.availability_zone attribute\"}]},\"cloud.platform\":{brief:\"The cloud platform in use\",type:\"string\",applyScrubbing:{key:\"manual\"},isInOtel:!0,visibility:\"public\",example:\"aws_lambda\",changelog:[{version:\"0.7.0\",prs:[364],description:\"Added cloud.platform attribute\"}]},\"cloud.provider\":{brief:\"Name of the cloud provider\",type:\"string\",applyScrubbing:{key:\"manual\"},isInOtel:!0,visibility:\"public\",example:\"aws\",changelog:[{version:\"0.7.0\",prs:[364],description:\"Added cloud.provider attribute\"}]},\"cloud.region\":{brief:\"The geographical region the resource is running\",type:\"string\",applyScrubbing:{key:\"manual\"},isInOtel:!0,visibility:\"public\",example:\"us-east-1\",changelog:[{version:\"0.7.0\",prs:[364],description:\"Added cloud.region attribute\"}]},\"cloud.resource_id\":{brief:\"Cloud provider-specific native identifier of the monitored cloud resource\",type:\"string\",applyScrubbing:{key:\"manual\"},isInOtel:!0,visibility:\"public\",example:\"arn:aws:lambda:REGION:ACCOUNT_ID:function:my-function\",aliases:[\"faas.id\"],changelog:[{version:\"0.16.0\",prs:[475],description:\"Added faas.id as an alias\"},{version:\"0.11.1\",prs:[414]}],additionalContext:[\"This can be an identifier for a resource in AWS, GCP, or Azure. There may be some overlap in values found here with other attributes. For instance, an AWS lambda ARN may be found here as well as in `aws.lambda.invoked_arn`. OTEL recommends setting them alongside each other.\"]},cls:{brief:\"The value of the recorded Cumulative Layout Shift (CLS) web vital\",type:\"double\",applyScrubbing:{key:\"manual\"},isInOtel:!1,visibility:\"public\",example:.2361,deprecation:{replacement:\"browser.web_vital.cls.value\",reason:\"The CLS web vital is now recorded as a browser.web_vital.cls.value attribute.\"},aliases:[\"browser.web_vital.cls.value\"],changelog:[{version:\"0.5.0\",prs:[229],description:\"Added and deprecated attribute to document JS SDK's current behaviour\"}]},\"cls.source.<key>\":{brief:\"The HTML elements or components responsible for the layout shift. <key> is a numeric index from 1 to N\",type:\"string\",applyScrubbing:{key:\"manual\"},isInOtel:!1,visibility:\"public\",hasDynamicSuffix:!0,example:\"body > div#app\",deprecation:{replacement:\"browser.web_vital.cls.source.<key>\",reason:\"The CLS source is now recorded as a browser.web_vital.cls.source.<key> attribute.\"},aliases:[\"browser.web_vital.cls.source.<key>\"],changelog:[{version:\"0.5.0\",prs:[234]}]},\"code.filepath\":{brief:\"The source code file name that identifies the code unit as uniquely as possible (preferably an absolute file path).\",type:\"string\",applyScrubbing:{key:\"manual\"},isInOtel:!0,visibility:\"public\",example:\"/app/myapplication/http/handler/server.py\",deprecation:{replacement:\"code.file.path\"},aliases:[\"code.file.path\"],changelog:[{version:\"0.1.0\",prs:[61]},{version:\"0.0.0\"}]},\"code.file.path\":{brief:\"The source code file name that identifies the code unit as uniquely as possible (preferably an absolute file path).\",type:\"string\",applyScrubbing:{key:\"manual\"},isInOtel:!0,visibility:\"public\",example:\"/app/myapplication/http/handler/server.py\",aliases:[\"code.filepath\"],changelog:[{version:\"0.0.0\"}]},\"code.function\":{brief:\"The method or function name, or equivalent (usually rightmost part of the code unit's name).\",type:\"string\",applyScrubbing:{key:\"manual\"},isInOtel:!0,visibility:\"public\",example:\"server_request\",aliases:[\"code.function.name\"],changelog:[{version:\"0.1.0\",prs:[61,74]},{version:\"0.0.0\"}]},\"code.function.name\":{brief:\"The method or function fully-qualified name without arguments.\",type:\"string\",applyScrubbing:{key:\"manual\"},isInOtel:!0,visibility:\"public\",example:\"server_request\",aliases:[\"code.function\"],changelog:[{version:\"0.1.0\",prs:[127]},{version:\"0.0.0\"}]},\"code.lineno\":{brief:\"The line number in code.filepath best representing the operation. It SHOULD point within the code unit named in code.function\",type:\"integer\",applyScrubbing:{key:\"manual\"},isInOtel:!0,visibility:\"public\",example:42,deprecation:{replacement:\"code.line.number\"},aliases:[\"code.line.number\"],changelog:[{version:\"0.4.0\",prs:[228]},{version:\"0.1.0\",prs:[61,108]},{version:\"0.0.0\"}]},\"code.line.number\":{brief:\"The line number in code.filepath best representing the operation. It SHOULD point within the code unit named in code.function\",type:\"integer\",applyScrubbing:{key:\"manual\"},isInOtel:!0,visibility:\"public\",example:42,aliases:[\"code.lineno\"],changelog:[{version:\"0.4.0\",prs:[228]},{version:\"0.0.0\"}]},\"code.namespace\":{brief:\"The 'namespace' within which code.function is defined. Usually the qualified class or module name, such that code.namespace + some separator + code.function form a unique identifier for the code unit.\",type:\"string\",applyScrubbing:{key:\"manual\"},isInOtel:!0,visibility:\"public\",example:\"http.handler\",changelog:[{version:\"0.1.0\",prs:[61,74]},{version:\"0.0.0\"}]},connectionType:{brief:\"Specifies the type of the current connection (e.g. wifi, ethernet, cellular , etc).\",type:\"string\",applyScrubbing:{key:\"manual\"},isInOtel:!1,visibility:\"public\",example:\"wifi\",deprecation:{replacement:\"network.connection.type\",reason:\"Old namespace-less attribute, to be replaced with network.connection.type for span-first future\"},aliases:[\"network.connection.type\",\"device.connection_type\"],changelog:[{version:\"0.5.0\",prs:[279],description:\"Added and deprecated attribute to document JS SDK's current behaviour\"}]},\"connection.rtt\":{brief:\"Specifies the estimated effective round-trip time of the current connection, in milliseconds.\",type:\"integer\",applyScrubbing:{key:\"manual\"},isInOtel:!1,visibility:\"public\",example:100,deprecation:{replacement:\"network.connection.rtt\",reason:\"Old attribute name (no official namespace), to be replaced with network.connection.rtt for span-first future\"},aliases:[\"network.connection.rtt\"],changelog:[{version:\"0.5.0\",prs:[279],description:\"Added and deprecated attribute to document JS SDK's current behaviour\"}]},\"culture.calendar\":{brief:\"The calendar system used by the culture.\",type:\"string\",applyScrubbing:{key:\"manual\"},isInOtel:!1,visibility:\"public\",example:\"GregorianCalendar\",changelog:[{version:\"0.4.0\",prs:[243]}]},\"culture.display_name\":{brief:\"Human readable name of the culture.\",type:\"string\",applyScrubbing:{key:\"manual\"},isInOtel:!1,visibility:\"public\",example:\"English (United States)\",changelog:[{version:\"0.4.0\",prs:[243]}]},\"culture.is_24_hour_format\":{brief:\"Whether the culture uses 24-hour time format.\",type:\"boolean\",applyScrubbing:{key:\"manual\"},isInOtel:!1,visibility:\"public\",example:!0,changelog:[{version:\"0.4.0\",prs:[243]}]},\"culture.locale\":{brief:\"The locale identifier following RFC 4646.\",type:\"string\",applyScrubbing:{key:\"manual\"},isInOtel:!1,visibility:\"public\",example:\"en-US\",changelog:[{version:\"0.4.0\",prs:[243]}]},\"culture.timezone\":{brief:\"The timezone of the culture, as a geographic timezone identifier.\",type:\"string\",applyScrubbing:{key:\"manual\"},isInOtel:!1,visibility:\"public\",example:\"Europe/Vienna\",changelog:[{version:\"0.4.0\",prs:[243]}]},\"db.collection.name\":{brief:\"The name of a collection (table, container) within the database.\",type:\"string\",applyScrubbing:{key:\"manual\"},isInOtel:!0,visibility:\"public\",example:\"users\",changelog:[{version:\"0.1.0\",prs:[106,127]},{version:\"0.0.0\"}]},\"db.driver.name\":{brief:\"The name of the driver used for the database connection.\",type:\"string\",applyScrubbing:{key:\"manual\"},isInOtel:!1,visibility:\"public\",example:\"psycopg2\",changelog:[{version:\"0.5.0\",prs:[297],description:\"Added db.driver.name attribute\"}]},\"db.name\":{brief:\"The name of the database being accessed.\",type:\"string\",applyScrubbing:{key:\"manual\"},isInOtel:!0,visibility:\"public\",example:\"customers\",deprecation:{replacement:\"db.namespace\"},aliases:[\"db.namespace\"],changelog:[{version:\"0.1.0\",prs:[61,127]},{version:\"0.0.0\"}]},\"db.namespace\":{brief:\"The name of the database being accessed.\",type:\"string\",applyScrubbing:{key:\"manual\"},isInOtel:!0,visibility:\"public\",example:\"customers\",aliases:[\"db.name\"],changelog:[{version:\"0.1.0\",prs:[127]},{version:\"0.0.0\"}]},\"db.operation\":{brief:\"The name of the operation being executed.\",type:\"string\",applyScrubbing:{key:\"manual\"},isInOtel:!0,visibility:\"public\",example:\"SELECT\",deprecation:{replacement:\"db.operation.name\"},aliases:[\"db.operation.name\",\"cloudflare.d1.query_type\"],changelog:[{version:\"0.4.0\",prs:[199]},{version:\"0.1.0\",prs:[61,127]},{version:\"0.0.0\"}]},\"db.operation.batch.size\":{brief:\"The number of queries included in a batch operation. Operations are only considered batches when they contain two or more operations, and so db.operation.batch.size SHOULD never be 1.\",type:\"integer\",applyScrubbing:{key:\"manual\"},isInOtel:!0,visibility:\"public\",example:3,changelog:[{version:\"0.11.0\",prs:[407],description:\"Added db.operation.batch.size attribute\"}]},\"db.operation.name\":{brief:\"The name of the operation being executed.\",type:\"string\",applyScrubbing:{key:\"manual\"},isInOtel:!0,visibility:\"public\",example:\"SELECT\",aliases:[\"db.operation\",\"cloudflare.d1.query_type\"],changelog:[{version:\"0.1.0\",prs:[127]},{version:\"0.0.0\"}]},\"db.query.parameter.<key>\":{brief:\"A query parameter used in db.query.text, with <key> being the parameter name, and the attribute value being a string representation of the parameter value.\",type:\"string\",applyScrubbing:{key:\"auto\"},isInOtel:!0,visibility:\"public\",hasDynamicSuffix:!0,example:\"db.query.parameter.foo='123'\",changelog:[{version:\"0.1.0\",prs:[103,127]}]},\"db.query.summary\":{brief:\"A shortened representation of operation(s) in the full query. This attribute must be low-cardinality and should only contain the operation table names.\",type:\"string\",applyScrubbing:{key:\"manual\"},isInOtel:!0,visibility:\"public\",example:\"SELECT users\",changelog:[{version:\"0.4.0\",prs:[208]},{version:\"0.1.0\",prs:[127]},{version:\"0.0.0\"}]},\"db.query.text\":{brief:\"The database parameterized query being executed. Any parameter values (filters, insertion values, etc) should be replaced with parameter placeholders. If applicable, use `db.query.parameter.<key>` to add the parameter value.\",type:\"string\",applyScrubbing:{key:\"manual\"},isInOtel:!0,visibility:\"public\",example:\"SELECT * FROM users WHERE id = $1\",aliases:[\"db.statement\"],changelog:[{version:\"0.4.0\",prs:[208]},{version:\"0.1.0\",prs:[127]},{version:\"0.0.0\"}]},\"db.redis.connection\":{brief:\"The redis connection name.\",type:\"string\",applyScrubbing:{key:\"manual\"},isInOtel:!1,visibility:\"public\",example:\"my-redis-instance\",changelog:[{version:\"0.1.0\",prs:[127]},{version:\"0.0.0\"}]},\"db.redis.key\":{brief:\"The key the Redis command is operating on.\",type:\"string\",applyScrubbing:{key:\"manual\"},isInOtel:!1,visibility:\"public\",example:\"user:2047:city\",changelog:[{version:\"0.6.0\",prs:[326],description:\"Added db.redis.key attribute\"}]},\"db.redis.parameters\":{brief:\"The array of command parameters given to a redis command.\",type:\"string[]\",applyScrubbing:{key:\"auto\"},isInOtel:!1,visibility:\"public\",example:[\"test\",\"*\"],changelog:[{version:\"0.0.0\"}]},\"db.response.status_code\":{brief:\"Database response status code. The status code returned by the database. Usually it represents an error code, but may also represent partial success, warning, or differentiate between various types of successful outcomes.\",type:\"string\",applyScrubbing:{key:\"manual\"},isInOtel:!0,visibility:\"public\",example:\"ORA-17002\",changelog:[{version:\"0.16.0\",prs:[462],description:\"Added db.response.status_code attribute\"}]},\"db.sql.bindings\":{brief:\"The array of query bindings.\",type:\"string[]\",applyScrubbing:{key:\"auto\"},isInOtel:!1,visibility:\"public\",example:[\"1\",\"foo\"],deprecation:{replacement:\"db.query.parameter.<key>\",reason:\"Instead of adding every binding in the db.sql.bindings attribute, add them as individual entires with db.query.parameter.<key>.\"},changelog:[{version:\"0.1.0\",prs:[61]},{version:\"0.0.0\"}]},\"db.statement\":{brief:\"The database statement being executed.\",type:\"string\",applyScrubbing:{key:\"auto\"},isInOtel:!0,visibility:\"public\",example:\"SELECT * FROM users\",deprecation:{replacement:\"db.query.text\"},aliases:[\"db.query.text\"],changelog:[{version:\"0.4.0\",prs:[199]},{version:\"0.1.0\",prs:[61,127]},{version:\"0.0.0\"}]},\"db.stored_procedure.name\":{brief:\"The name of a stored procedure being called.\",type:\"string\",applyScrubbing:{key:\"manual\"},isInOtel:!0,visibility:\"public\",example:\"GetUserById\",changelog:[{version:\"0.11.0\",prs:[398]}]},\"db.system\":{brief:\"An identifier for the database management system (DBMS) product being used. See [OpenTelemetry docs](https://github.com/open-telemetry/semantic-conventions/blob/main/docs/database/database-spans.md#notes-and-well-known-identifiers-for-dbsystem) for a list of well-known identifiers.\",type:\"string\",applyScrubbing:{key:\"manual\"},isInOtel:!0,visibility:\"public\",example:\"postgresql\",deprecation:{replacement:\"db.system.name\"},aliases:[\"db.system.name\"],changelog:[{version:\"0.4.0\",prs:[199,224]},{version:\"0.1.0\",prs:[61,127]},{version:\"0.0.0\"}]},\"db.system.name\":{brief:\"An identifier for the database management system (DBMS) product being used. See [OpenTelemetry docs](https://github.com/open-telemetry/semantic-conventions/blob/main/docs/database/database-spans.md#notes-and-well-known-identifiers-for-dbsystem) for a list of well-known identifiers.\",type:\"string\",applyScrubbing:{key:\"manual\"},isInOtel:!0,visibility:\"public\",example:\"postgresql\",aliases:[\"db.system\"],changelog:[{version:\"0.1.0\",prs:[127]},{version:\"0.0.0\"}]},\"db.user\":{brief:\"The database user.\",type:\"string\",applyScrubbing:{key:\"manual\"},isInOtel:!0,visibility:\"public\",example:\"fancy_user\",changelog:[{version:\"0.0.0\"}]},deviceMemory:{brief:\"The estimated total memory capacity of the device, only a rough estimation in gigabytes.\",type:\"string\",applyScrubbing:{key:\"manual\"},isInOtel:!1,visibility:\"public\",example:\"8 GB\",deprecation:{replacement:\"device.memory.estimated_capacity\",reason:\"Old namespace-less attribute, to be replaced with device.memory.estimated_capacity for span-first future\"},aliases:[\"device.memory.estimated_capacity\"],changelog:[{version:\"0.5.0\",prs:[281],description:\"Added and deprecated attribute to document JS SDK's current behaviour\"}]},\"device.archs\":{brief:\"The CPU architectures of the device.\",type:\"string[]\",applyScrubbing:{key:\"manual\"},isInOtel:!1,visibility:\"public\",example:[\"arm64-v8a\",\"armeabi-v7a\",\"armeabi\"],changelog:[{version:\"0.5.0\",prs:[303],description:\"Added device.archs attribute\"}]},\"device.battery_level\":{brief:\"The battery level of the device as a percentage (0-100).\",type:\"double\",applyScrubbing:{key:\"manual\"},isInOtel:!1,visibility:\"public\",example:100,changelog:[{version:\"0.5.0\",prs:[303],description:\"Added device.battery_level attribute\"}]},\"device.battery_temperature\":{brief:\"The battery temperature of the device in Celsius.\",type:\"double\",applyScrubbing:{key:\"manual\"},isInOtel:!1,visibility:\"public\",example:25,changelog:[{version:\"0.5.0\",prs:[303],description:\"Added device.battery_temperature attribute\"}]},\"device.boot_time\":{brief:\"A formatted UTC timestamp when the system was booted.\",type:\"string\",applyScrubbing:{key:\"manual\"},isInOtel:!1,visibility:\"public\",example:\"2018-02-08T12:52:12Z\",changelog:[{version:\"0.5.0\",prs:[303],description:\"Added device.boot_time attribute\"}]},\"device.brand\":{brief:\"The brand of the device.\",type:\"string\",applyScrubbing:{key:\"manual\"},isInOtel:!1,visibility:\"public\",example:\"Apple\",changelog:[{version:\"0.1.0\",prs:[116,127]}]},\"device.charging\":{brief:\"Whether the device was charging or not.\",type:\"boolean\",applyScrubbing:{key:\"manual\"},isInOtel:!1,visibility:\"public\",example:!1,changelog:[{version:\"0.5.0\",prs:[303],description:\"Added device.charging attribute\"}]},\"device.chipset\":{brief:\"The chipset of the device.\",type:\"string\",applyScrubbing:{key:\"manual\"},isInOtel:!1,visibility:\"public\",example:\"Qualcomm SM8550\",changelog:[{version:\"0.5.0\",prs:[303],description:\"Added device.chipset attribute\"}]},\"device.class\":{brief:\"The classification of the device. For example, `low`, `medium`, or `high`. Typically inferred by Relay - SDKs generally do not need to set this directly.\",type:\"string\",applyScrubbing:{key:\"manual\"},isInOtel:!1,visibility:\"public\",example:\"medium\",changelog:[{version:\"0.5.0\",prs:[300],description:\"Added device.class attribute\"}]},\"device.connection_type\":{brief:\"The internet connection type currently being used by the device.\",type:\"string\",applyScrubbing:{key:\"manual\"},isInOtel:!1,visibility:\"public\",example:\"wifi\",deprecation:{replacement:\"network.connection.type\",reason:\"This attribute is being deprecated in favor of network.connection.type\"},aliases:[\"network.connection.type\",\"connectionType\"],changelog:[{version:\"0.5.0\",prs:[303],description:\"Added and deprecated device.connection_type in favor of network.connection.type\"}]},\"device.cpu_description\":{brief:\"A description of the CPU of the device.\",type:\"string\",applyScrubbing:{key:\"manual\"},isInOtel:!1,visibility:\"public\",example:\"Intel(R) Core(TM)2 Quad CPU Q6600 @ 2.40GHz\",changelog:[{version:\"0.5.0\",prs:[303],description:\"Added device.cpu_description attribute\"}]},\"device.external_free_storage\":{brief:\"External storage free size in bytes.\",type:\"integer\",applyScrubbing:{key:\"manual\"},isInOtel:!1,visibility:\"public\",example:67108864e3,changelog:[{version:\"0.5.0\",prs:[303],description:\"Added device.external_free_storage attribute\"}]},\"device.external_storage_size\":{brief:\"External storage total size in bytes.\",type:\"integer\",applyScrubbing:{key:\"manual\"},isInOtel:!1,visibility:\"public\",example:134217728e3,changelog:[{version:\"0.5.0\",prs:[303],description:\"Added device.external_storage_size attribute\"}]},\"device.family\":{brief:\"The family of the device.\",type:\"string\",applyScrubbing:{key:\"manual\"},isInOtel:!1,visibility:\"public\",example:\"iPhone\",changelog:[{version:\"0.1.0\",prs:[116,127]}]},\"device.free_memory\":{brief:\"Free system memory in bytes.\",type:\"integer\",applyScrubbing:{key:\"manual\"},isInOtel:!1,visibility:\"public\",example:2147483648,changelog:[{version:\"0.5.0\",prs:[300],description:\"Added device.free_memory attribute\"}]},\"device.free_storage\":{brief:\"Free device storage in bytes.\",type:\"integer\",applyScrubbing:{key:\"manual\"},isInOtel:!1,visibility:\"public\",example:107374182400,changelog:[{version:\"0.5.0\",prs:[303],description:\"Added device.free_storage attribute\"}]},\"device.id\":{brief:\"Unique device identifier.\",type:\"string\",applyScrubbing:{key:\"manual\"},isInOtel:!0,visibility:\"public\",example:\"a1b2c3d4-e5f6-7890-abcd-ef1234567890\",changelog:[{version:\"0.5.0\",prs:[303],description:\"Added device.id attribute\"}]},\"device.locale\":{brief:\"The locale of the device.\",type:\"string\",applyScrubbing:{key:\"manual\"},isInOtel:!1,visibility:\"public\",example:\"en-US\",changelog:[{version:\"0.5.0\",prs:[303],description:\"Added device.locale attribute\"}]},\"device.low_memory\":{brief:\"Whether the device was low on memory.\",type:\"boolean\",applyScrubbing:{key:\"manual\"},isInOtel:!1,visibility:\"public\",example:!1,changelog:[{version:\"0.5.0\",prs:[303],description:\"Added device.low_memory attribute\"}]},\"device.low_power_mode\":{brief:\"Whether the device is in Low Power Mode.\",type:\"boolean\",applyScrubbing:{key:\"manual\"},isInOtel:!1,visibility:\"public\",example:!0,changelog:[{version:\"0.6.0\",prs:[314],description:\"Added device.low_power_mode attribute\"}]},\"device.manufacturer\":{brief:\"The manufacturer of the device.\",type:\"string\",applyScrubbing:{key:\"manual\"},isInOtel:!0,visibility:\"public\",example:\"Google\",changelog:[{version:\"0.5.0\",prs:[303],description:\"Added device.manufacturer attribute\"}]},\"device.memory.estimated_capacity\":{brief:\"The estimated total memory capacity of the device, only a rough estimation in gigabytes. Browsers report estimations in buckets of powers of 2, mostly capped at 8 GB\",type:\"integer\",applyScrubbing:{key:\"manual\"},isInOtel:!1,visibility:\"public\",example:8,aliases:[\"deviceMemory\"],changelog:[{version:\"0.5.0\",prs:[281],description:\"Added attribute device.memory.estimated_capacity to be used instead of deviceMemory\"}]},\"device.memory_size\":{brief:\"Total system memory available in bytes.\",type:\"integer\",applyScrubbing:{key:\"manual\"},isInOtel:!1,visibility:\"public\",example:17179869184,changelog:[{version:\"0.5.0\",prs:[300],description:\"Added device.memory_size attribute\"}]},\"device.model\":{brief:\"The model of the device.\",type:\"string\",applyScrubbing:{key:\"manual\"},isInOtel:!1,visibility:\"public\",example:\"iPhone 15 Pro Max\",changelog:[{version:\"0.1.0\",prs:[116,127]}]},\"device.model_id\":{brief:\"An internal hardware revision to identify the device exactly.\",type:\"string\",applyScrubbing:{key:\"manual\"},isInOtel:!1,visibility:\"public\",example:\"N861AP\",changelog:[{version:\"0.5.0\",prs:[300],description:\"Added device.model_id attribute\"}]},\"device.name\":{brief:\"The name of the device. On mobile, this is the user-assigned device name. On servers and desktops, this is typically the hostname.\",type:\"string\",applyScrubbing:{key:\"auto\"},isInOtel:!1,visibility:\"public\",example:\"localhost\",changelog:[{version:\"0.5.0\",prs:[303],description:\"Added device.name attribute\"}]},\"device.online\":{brief:\"Whether the device was online or not.\",type:\"boolean\",applyScrubbing:{key:\"manual\"},isInOtel:!1,visibility:\"public\",example:!0,changelog:[{version:\"0.5.0\",prs:[303],description:\"Added device.online attribute\"}]},\"device.orientation\":{brief:'The orientation of the device, either \"portrait\" or \"landscape\".',type:\"string\",applyScrubbing:{key:\"manual\"},isInOtel:!1,visibility:\"public\",example:\"portrait\",changelog:[{version:\"0.5.0\",prs:[303],description:\"Added device.orientation attribute\"}]},\"device.processor_count\":{brief:'Number of \"logical processors\".',type:\"integer\",applyScrubbing:{key:\"manual\"},isInOtel:!1,visibility:\"public\",example:8,aliases:[\"hardwareConcurrency\"],changelog:[{version:\"0.5.0\",prs:[300],description:\"Added and deprecated attribute device.processor_count in favor of device.cpu.logical_core_count\"}]},\"device.processor_frequency\":{brief:\"Processor frequency in MHz.\",type:\"double\",applyScrubbing:{key:\"manual\"},isInOtel:!1,visibility:\"public\",example:2400,changelog:[{version:\"0.5.0\",prs:[303],description:\"Added device.processor_frequency attribute\"}]},\"device.screen_density\":{brief:\"The screen density of the device.\",type:\"double\",applyScrubbing:{key:\"manual\"},isInOtel:!1,visibility:\"public\",example:2.625,changelog:[{version:\"0.5.0\",prs:[303],description:\"Added device.screen_density attribute\"}]},\"device.screen_dpi\":{brief:\"The screen density in dots-per-inch (DPI) of the device.\",type:\"integer\",applyScrubbing:{key:\"manual\"},isInOtel:!1,visibility:\"public\",example:420,changelog:[{version:\"0.5.0\",prs:[303],description:\"Added device.screen_dpi attribute\"}]},\"device.screen_height_pixels\":{brief:\"The height of the device screen in pixels.\",type:\"integer\",applyScrubbing:{key:\"manual\"},isInOtel:!1,visibility:\"public\",example:2400,changelog:[{version:\"0.5.0\",prs:[303],description:\"Added device.screen_height_pixels attribute\"}]},\"device.screen_width_pixels\":{brief:\"The width of the device screen in pixels.\",type:\"integer\",applyScrubbing:{key:\"manual\"},isInOtel:!1,visibility:\"public\",example:1080,changelog:[{version:\"0.5.0\",prs:[303],description:\"Added device.screen_width_pixels attribute\"}]},\"device.simulator\":{brief:\"Whether the device is a simulator or an actual device.\",type:\"boolean\",applyScrubbing:{key:\"manual\"},isInOtel:!1,visibility:\"public\",example:!1,changelog:[{version:\"0.5.0\",prs:[300],description:\"Added device.simulator attribute\"}]},\"device.storage_size\":{brief:\"Total device storage in bytes.\",type:\"integer\",applyScrubbing:{key:\"manual\"},isInOtel:!1,visibility:\"public\",example:274877906944,changelog:[{version:\"0.5.0\",prs:[303],description:\"Added device.storage_size attribute\"}]},\"device.thermal_state\":{brief:\"The thermal state of the device. Based on Apple's `ProcessInfo.ThermalState` enum: `nominal`, `fair`, `serious`, or `critical`.\",type:\"string\",applyScrubbing:{key:\"manual\"},isInOtel:!1,visibility:\"public\",example:\"nominal\",changelog:[{version:\"0.5.0\",prs:[303],description:\"Added device.thermal_state attribute\"}]},\"device.timezone\":{brief:\"The timezone of the device.\",type:\"string\",applyScrubbing:{key:\"manual\"},isInOtel:!1,visibility:\"public\",example:\"Europe/Vienna\",changelog:[{version:\"0.5.0\",prs:[303],description:\"Added device.timezone attribute\"}]},\"device.usable_memory\":{brief:\"Memory usable for the app in bytes.\",type:\"integer\",applyScrubbing:{key:\"manual\"},isInOtel:!1,visibility:\"public\",example:2147483648,changelog:[{version:\"0.5.0\",prs:[303],description:\"Added device.usable_memory attribute\"}]},dist:{brief:\"The sentry dist.\",type:\"string\",applyScrubbing:{key:\"never\"},isInOtel:!1,visibility:\"public\",example:\"1.0\",deprecation:{replacement:\"sentry.dist\",reason:\"This attribute is being deprecated in favor of sentry.dist.\"},aliases:[\"sentry.dist\"],changelog:[{version:\"0.16.0\",prs:[489],description:\"Added dist attribute\"}]},effectiveConnectionType:{brief:\"Specifies the estimated effective type of the current connection (e.g. slow-2g, 2g, 3g, 4g).\",type:\"string\",applyScrubbing:{key:\"manual\"},isInOtel:!1,visibility:\"public\",example:\"4g\",deprecation:{replacement:\"network.connection.effective_type\",reason:\"Old namespace-less attribute, to be replaced with network.connection.effective_type for span-first future\"},aliases:[\"network.connection.effective_type\"],changelog:[{version:\"0.5.0\",prs:[279],description:\"Added and deprecated attribute to document JS SDK's current behaviour\"}]},environment:{brief:\"The sentry environment.\",type:\"string\",applyScrubbing:{key:\"manual\"},isInOtel:!1,visibility:\"public\",example:\"production\",deprecation:{replacement:\"sentry.environment\"},aliases:[\"sentry.environment\"],changelog:[{version:\"0.1.0\",prs:[61,127]},{version:\"0.0.0\"}]},\"error.type\":{brief:\"Describes a class of error the operation ended with.\",type:\"string\",applyScrubbing:{key:\"manual\"},isInOtel:!0,visibility:\"public\",example:\"timeout\",changelog:[{version:\"0.1.0\",prs:[127]},{version:\"0.0.0\"}]},\"event.id\":{brief:\"The unique identifier for this event (log record)\",type:\"integer\",applyScrubbing:{key:\"manual\"},isInOtel:!1,visibility:\"public\",example:1234567890,changelog:[{version:\"0.1.0\",prs:[101]}]},\"event.name\":{brief:\"The name that uniquely identifies this event (log record)\",type:\"string\",applyScrubbing:{key:\"manual\"},isInOtel:!1,visibility:\"public\",example:\"Process Payload\",changelog:[{version:\"0.1.0\",prs:[101,127]}]},\"exception.escaped\":{brief:\"SHOULD be set to true if the exception event is recorded at a point where it is known that the exception is escaping the scope of the span.\",type:\"boolean\",applyScrubbing:{key:\"manual\"},isInOtel:!0,visibility:\"public\",example:!0,changelog:[{version:\"0.0.0\"}]},\"exception.message\":{brief:\"The error message.\",type:\"string\",applyScrubbing:{key:\"auto\"},isInOtel:!0,visibility:\"public\",example:\"ENOENT: no such file or directory\",changelog:[{version:\"0.1.0\",prs:[127]},{version:\"0.0.0\"}]},\"exception.stacktrace\":{brief:\"A stacktrace as a string in the natural representation for the language runtime. The representation is to be determined and documented by each language SIG.\",type:\"string\",applyScrubbing:{key:\"auto\"},isInOtel:!0,visibility:\"public\",example:`Exception in thread \"main\" java.lang.RuntimeException: Test exception\n at com.example.GenerateTrace.methodB(GenerateTrace.java:13)\n at com.example.GenerateTrace.methodA(GenerateTrace.java:9)\n at com.example.GenerateTrace.main(GenerateTrace.java:5)`,changelog:[{version:\"0.1.0\",prs:[127]},{version:\"0.0.0\"}]},\"exception.type\":{brief:\"The type of the exception (its fully-qualified class name, if applicable). The dynamic type of the exception should be preferred over the static type in languages that support it.\",type:\"string\",applyScrubbing:{key:\"manual\"},isInOtel:!0,visibility:\"public\",example:\"OSError\",changelog:[{version:\"0.1.0\",prs:[127]},{version:\"0.0.0\"}]},\"faas.coldstart\":{brief:\"A boolean that is true if the serverless function is executed for the first time (aka cold-start).\",type:\"boolean\",applyScrubbing:{key:\"manual\"},isInOtel:!0,visibility:\"public\",example:!0,changelog:[{version:\"0.0.0\"}]},\"faas.cron\":{brief:\"A string containing the schedule period as Cron Expression.\",type:\"string\",applyScrubbing:{key:\"manual\"},isInOtel:!0,visibility:\"public\",example:\"0/5 * * * ? *\",changelog:[{version:\"0.1.0\",prs:[127]},{version:\"0.0.0\"}]},\"faas.duration_in_ms\":{brief:\"The duration a function took to run, in milliseconds.\",type:\"integer\",applyScrubbing:{key:\"manual\"},isInOtel:!1,visibility:\"public\",example:120,changelog:[{version:\"0.11.0\",prs:[403]}]},\"faas.entry_point\":{brief:\"The code that's run when the cloud provider invokes your function.\",type:\"string\",applyScrubbing:{key:\"manual\"},isInOtel:!1,visibility:\"public\",example:\"my_main_function\",changelog:[{version:\"0.11.0\",prs:[403,415]}]},\"faas.execution\":{brief:\"The execution ID of the current function execution.\",type:\"string\",applyScrubbing:{key:\"manual\"},isInOtel:!1,visibility:\"public\",example:\"af9d5aa4-a685-4c5f-a22b-444f80b3cc28\",deprecation:{replacement:\"faas.invocation_id\",reason:\"This attribute is being deprecated in favor of faas.invocation_id, which is the OTel-aligned replacement.\"},aliases:[\"faas.invocation_id\",\"aws.lambda.aws_request_id\"],changelog:[{version:\"0.16.0\",prs:[473],description:\"Added faas.execution attribute, deprecated in favor of faas.invocation_id\"}]},\"faas.id\":{brief:\"The unique ID of the single function that this runtime instance executes.\",type:\"string\",applyScrubbing:{key:\"manual\"},isInOtel:!1,visibility:\"public\",example:\"arn:aws:lambda:REGION:ACCOUNT_ID:function:my-function\",deprecation:{replacement:\"cloud.resource_id\",reason:\"This attribute is being deprecated in favor of cloud.resource_id, which is the OTel-aligned replacement (renamed in OTel semantic conventions v1.19.0).\"},aliases:[\"cloud.resource_id\"],changelog:[{version:\"0.16.0\",prs:[475],description:\"Added faas.id attribute, deprecated in favor of cloud.resource_id\"}]},\"faas.identity\":{brief:\"The Service Account (GCP), IAM Execution Role (AWS), or Managed Identity (Azure) used by the serverless function when interacting with other cloud services\",type:\"string\",applyScrubbing:{key:\"manual\"},isInOtel:!1,visibility:\"public\",example:\"name@project.iam.gserviceaccount.com (GCP), arn:aws:iam::123456789012:role/role-name (AWS), 00000000-0000-0000-0000-000000000000 (Azure)\",changelog:[{version:\"0.11.0\",prs:[403]}]},\"faas.invocation_id\":{brief:\"The invocation ID of the current function invocation.\",type:\"string\",applyScrubbing:{key:\"manual\"},isInOtel:!0,visibility:\"public\",example:\"af9d5aa4-a685-4c5f-a22b-444f80b3cc28\",aliases:[\"aws.lambda.aws_request_id\",\"faas.execution\"],changelog:[{version:\"0.16.0\",prs:[473],description:\"Added faas.execution as an alias\"},{version:\"0.11.1\",prs:[414,424]}]},\"faas.invoked_name\":{brief:\"The name of the invoked function.\",type:\"string\",applyScrubbing:{key:\"manual\"},isInOtel:!0,visibility:\"public\",example:\"my-function\",changelog:[{version:\"0.16.0\",prs:[481],description:\"Added faas.invoked_name attribute\"}]},\"faas.invoked_provider\":{brief:\"The cloud provider of the invoked function.\",type:\"string\",applyScrubbing:{key:\"manual\"},isInOtel:!0,visibility:\"public\",example:\"aws\",changelog:[{version:\"0.16.0\",prs:[481],description:\"Added faas.invoked_provider attribute\"}]},\"faas.invoked_region\":{brief:\"The cloud region of the invoked function.\",type:\"string\",applyScrubbing:{key:\"manual\"},isInOtel:!0,visibility:\"public\",example:\"eu-central-1\",changelog:[{version:\"0.16.0\",prs:[481],description:\"Added faas.invoked_region attribute\"}]},\"faas.name\":{brief:\"The name of the serverless function\",type:\"string\",applyScrubbing:{key:\"manual\"},isInOtel:!0,visibility:\"public\",example:\"my_function\",aliases:[\"aws.lambda.function_name\"],changelog:[{version:\"0.11.0\",prs:[403,415]}]},\"faas.time\":{brief:\"A string containing the function invocation time in the ISO 8601 format expressed in UTC.\",type:\"string\",applyScrubbing:{key:\"manual\"},isInOtel:!0,visibility:\"public\",example:\"2020-01-23T13:47:06Z\",changelog:[{version:\"0.1.0\",prs:[127]},{version:\"0.0.0\"}]},\"faas.trigger\":{brief:\"Type of the trigger which caused this function invocation.\",type:\"string\",applyScrubbing:{key:\"manual\"},isInOtel:!0,visibility:\"public\",example:\"timer\",changelog:[{version:\"0.1.0\",prs:[127]},{version:\"0.0.0\"}]},\"faas.version\":{brief:\"The version of the function that was invoked\",type:\"string\",applyScrubbing:{key:\"manual\"},isInOtel:!0,visibility:\"public\",example:\"$LATEST\",aliases:[\"aws.lambda.function_version\"],changelog:[{version:\"0.11.1\",prs:[414,424]}]},fcp:{brief:\"The time it takes for the browser to render the first piece of meaningful content on the screen\",type:\"double\",applyScrubbing:{key:\"manual\"},isInOtel:!1,visibility:\"public\",example:547.6951,deprecation:{replacement:\"browser.web_vital.fcp.value\",reason:\"This attribute is being deprecated in favor of browser.web_vital.fcp.value\"},aliases:[\"browser.web_vital.fcp.value\"],changelog:[{version:\"0.5.0\",prs:[235]}]},\"flag.evaluation.<key>\":{brief:\"An instance of a feature flag evaluation. The value of this attribute is the boolean representing the evaluation result. The <key> suffix is the name of the feature flag.\",type:\"boolean\",applyScrubbing:{key:\"manual\"},isInOtel:!1,visibility:\"public\",hasDynamicSuffix:!0,example:\"flag.evaluation.is_new_ui=true\",changelog:[{version:\"0.1.0\",prs:[103]}]},fp:{brief:\"The time it takes for the browser to render the first pixel on the screen\",type:\"double\",applyScrubbing:{key:\"manual\"},isInOtel:!1,visibility:\"public\",example:477.1926,deprecation:{replacement:\"browser.web_vital.fp.value\",reason:\"This attribute is being deprecated in favor of browser.web_vital.fp.value\"},aliases:[\"browser.web_vital.fp.value\"],changelog:[{version:\"0.5.0\",prs:[235]}]},\"frames.delay\":{brief:\"The sum of all delayed frame durations in seconds during the lifetime of the span. For more information see [frames delay](https://develop.sentry.dev/sdk/performance/frames-delay/).\",type:\"integer\",applyScrubbing:{key:\"manual\"},isInOtel:!1,visibility:\"public\",example:5,deprecation:{replacement:\"app.vitals.frames.delay.value\",reason:\"Replaced by app.vitals.frames.delay.value to align with the app.vitals.* namespace for mobile performance attributes\"},aliases:[\"app.vitals.frames.delay.value\"],changelog:[{version:\"0.5.0\",prs:[313],description:\"Deprecated in favor of app.vitals.frames.delay.value\"},{version:\"0.4.0\",prs:[228]},{version:\"0.0.0\"}]},\"frames.frozen\":{brief:\"The number of frozen frames rendered during the lifetime of the span.\",type:\"integer\",applyScrubbing:{key:\"manual\"},isInOtel:!1,visibility:\"public\",example:3,deprecation:{replacement:\"app.vitals.frames.frozen.count\",reason:\"Replaced by app.vitals.frames.frozen.count to align with the app.vitals.* namespace for mobile performance attributes\"},aliases:[\"app.vitals.frames.frozen.count\"],changelog:[{version:\"0.5.0\",prs:[313],description:\"Deprecated in favor of app.vitals.frames.frozen.count\"},{version:\"0.4.0\",prs:[228]},{version:\"0.0.0\"}]},frames_frozen_rate:{brief:\"The rate of frozen frames, or `app_vitals.frames.frozen.count` divided by `app_vitals.frames.total.count`. This is computed by Relay.\",type:\"double\",applyScrubbing:{key:\"manual\"},isInOtel:!1,visibility:\"public\",changelog:[{version:\"0.7.0\",prs:[362],description:\"Added frames_frozen_rate attribute\"}]},\"frames.slow\":{brief:\"The number of slow frames rendered during the lifetime of the span.\",type:\"integer\",applyScrubbing:{key:\"manual\"},isInOtel:!1,visibility:\"public\",example:1,deprecation:{replacement:\"app.vitals.frames.slow.count\",reason:\"Replaced by app.vitals.frames.slow.count to align with the app.vitals.* namespace for mobile performance attributes\"},aliases:[\"app.vitals.frames.slow.count\"],changelog:[{version:\"0.5.0\",prs:[313],description:\"Deprecated in favor of app.vitals.frames.slow.count\"},{version:\"0.4.0\",prs:[228]},{version:\"0.0.0\"}]},frames_slow_rate:{brief:\"The rate of slow frames, or `app_vitals.frames.slow.count` divided by `app_vitals.frames.total.count`. This is computed by Relay.\",type:\"double\",applyScrubbing:{key:\"manual\"},isInOtel:!1,visibility:\"public\",changelog:[{version:\"0.7.0\",prs:[362],description:\"Added frames_slow_rate attribute\"}]},\"frames.total\":{brief:\"The number of total frames rendered during the lifetime of the span.\",type:\"integer\",applyScrubbing:{key:\"manual\"},isInOtel:!1,visibility:\"public\",example:60,deprecation:{replacement:\"app.vitals.frames.total.count\",reason:\"Replaced by app.vitals.frames.total.count to align with the app.vitals.* namespace for mobile performance attributes\"},aliases:[\"app.vitals.frames.total.count\"],changelog:[{version:\"0.5.0\",prs:[313],description:\"Deprecated in favor of app.vitals.frames.total.count\"},{version:\"0.4.0\",prs:[228]},{version:\"0.0.0\"}]},fs_error:{brief:\"The error message of a file system error.\",type:\"string\",applyScrubbing:{key:\"manual\"},isInOtel:!1,visibility:\"public\",example:\"ENOENT: no such file or directory\",deprecation:{replacement:\"error.type\",reason:\"This attribute is not part of the OpenTelemetry specification and error.type fits much better.\"},changelog:[{version:\"0.1.0\",prs:[61,127]},{version:\"0.0.0\"}]},\"gcp.function.context.event_id\":{brief:\"The event ID from the legacy GCP Cloud Function context (1st gen)\",type:\"string\",applyScrubbing:{key:\"manual\"},isInOtel:!1,visibility:\"public\",example:\"1234567890\",changelog:[{version:\"0.7.0\",prs:[371],description:\"Added gcp.function.context.event_id attribute\"}]},\"gcp.function.context.event_type\":{brief:\"The type of the GCP Cloud Function event\",type:\"string\",applyScrubbing:{key:\"manual\"},isInOtel:!1,visibility:\"public\",example:\"google.pubsub.topic.publish\",changelog:[{version:\"0.7.0\",prs:[371],description:\"Added gcp.function.context.event_type attribute\"}]},\"gcp.function.context.id\":{brief:\"The unique event ID from the GCP CloudEvents context (2nd gen Cloud Functions)\",type:\"string\",applyScrubbing:{key:\"manual\"},isInOtel:!1,visibility:\"public\",example:\"1234567890\",changelog:[{version:\"0.7.0\",prs:[371],description:\"Added gcp.function.context.id attribute\"}]},\"gcp.function.context.resource\":{brief:\"The resource that triggered the GCP Cloud Function event\",type:\"string\",applyScrubbing:{key:\"manual\"},isInOtel:!1,visibility:\"public\",example:\"projects/my-project/topics/my-topic\",changelog:[{version:\"0.7.0\",prs:[371],description:\"Added gcp.function.context.resource attribute\"}]},\"gcp.function.context.source\":{brief:\"The source of the GCP Cloud Function event\",type:\"string\",applyScrubbing:{key:\"manual\"},isInOtel:!1,visibility:\"public\",example:\"//pubsub.googleapis.com/projects/my-project/topics/my-topic\",changelog:[{version:\"0.7.0\",prs:[371],description:\"Added gcp.function.context.source attribute\"}]},\"gcp.function.context.specversion\":{brief:\"The CloudEvents specification version of the GCP Cloud Function event\",type:\"string\",applyScrubbing:{key:\"manual\"},isInOtel:!1,visibility:\"public\",example:\"1.0\",changelog:[{version:\"0.7.0\",prs:[371],description:\"Added gcp.function.context.specversion attribute\"}]},\"gcp.function.context.time\":{brief:\"The timestamp of the GCP Cloud Function event\",type:\"string\",applyScrubbing:{key:\"manual\"},isInOtel:!1,visibility:\"public\",example:\"2024-01-01T00:00:00.000Z\",changelog:[{version:\"0.7.0\",prs:[371],description:\"Added gcp.function.context.time attribute\"}]},\"gcp.function.context.timestamp\":{brief:\"The legacy timestamp of the GCP Cloud Function event\",type:\"string\",applyScrubbing:{key:\"manual\"},isInOtel:!1,visibility:\"public\",example:\"2024-01-01T00:00:00.000Z\",changelog:[{version:\"0.7.0\",prs:[371],description:\"Added gcp.function.context.timestamp attribute\"}]},\"gcp.function.context.type\":{brief:\"The type of the GCP Cloud Function event context\",type:\"string\",applyScrubbing:{key:\"manual\"},isInOtel:!1,visibility:\"public\",example:\"cloud_functions.context\",changelog:[{version:\"0.7.0\",prs:[371],description:\"Added gcp.function.context.type attribute\"}]},\"gcp.project.id\":{brief:\"The ID of the project in GCP that this resource is associated with\",type:\"string\",applyScrubbing:{key:\"manual\"},isInOtel:!1,visibility:\"public\",example:\"my-project-123\",changelog:[{version:\"0.11.0\",prs:[403]}]},\"gen_ai.agent.name\":{brief:\"The name of the agent being used.\",type:\"string\",applyScrubbing:{key:\"manual\"},isInOtel:!0,visibility:\"public\",example:\"ResearchAssistant\",changelog:[{version:\"0.1.0\",prs:[62,127]}]},\"gen_ai.context.utilization\":{brief:\"The fraction of the model context window utilized by this generation.\",type:\"double\",applyScrubbing:{key:\"manual\"},isInOtel:!1,visibility:\"public\",example:.75,changelog:[{version:\"0.5.0\",prs:[315],description:\"Added gen_ai.context.utilization attribute\"}]},\"gen_ai.context.window_size\":{brief:\"The maximum context window size supported by the model for this generation.\",type:\"integer\",applyScrubbing:{key:\"manual\"},isInOtel:!1,visibility:\"public\",example:128e3,changelog:[{version:\"0.5.0\",prs:[315],description:\"Added gen_ai.context.window_size attribute\"}]},\"gen_ai.conversation.id\":{brief:\"The unique identifier for a conversation (session, thread), used to store and correlate messages within this conversation.\",type:\"string\",applyScrubbing:{key:\"manual\"},isInOtel:!0,visibility:\"public\",example:\"conv_5j66UpCpwteGg4YSxUnt7lPY\",changelog:[{version:\"0.4.0\",prs:[250]}]},\"gen_ai.cost.cache_creation.input_tokens\":{brief:\"The cost of input tokens written to cache in USD.\",type:\"double\",applyScrubbing:{key:\"manual\"},isInOtel:!1,visibility:\"public\",example:12.34,changelog:[{version:\"0.16.0\",description:\"Added gen_ai.cost.cache_creation.input_tokens attribute\"}],additionalContext:[\"This attribute appears on both agent parent spans (aggregated totals) and LLM child spans (per-call values). When using sum() to calculate total cost, filter to gen_ai.operation.type:ai_client to avoid double-counting hierarchical spans.\",\"Despite the name 'cost.cache_creation.input_tokens', this value is cost in USD, not a token count. For token counts, use gen_ai.usage.cache_creation.input_tokens.\",\"This is a subset of gen_ai.cost.input_tokens, not an independent cost. Do not sum this with gen_ai.cost.input_tokens \\u2014 it is already included.\"]},\"gen_ai.cost.cache_read.input_tokens\":{brief:\"The cost of cached input tokens in USD.\",type:\"double\",applyScrubbing:{key:\"manual\"},isInOtel:!1,visibility:\"public\",example:12.34,changelog:[{version:\"0.16.0\",description:\"Added gen_ai.cost.cache_read.input_tokens attribute\"}],additionalContext:[\"This attribute appears on both agent parent spans (aggregated totals) and LLM child spans (per-call values). When using sum() to calculate total cost, filter to gen_ai.operation.type:ai_client to avoid double-counting hierarchical spans.\",\"Despite the name 'cost.cache_read.input_tokens', this value is cost in USD, not a token count. For token counts, use gen_ai.usage.cache_read.input_tokens.\",\"This is a subset of gen_ai.cost.input_tokens, not an independent cost. Do not sum this with gen_ai.cost.input_tokens \\u2014 it is already included.\"]},\"gen_ai.cost.input_tokens\":{brief:\"The total cost of all input tokens in USD (includes cached and cache creation tokens).\",type:\"double\",applyScrubbing:{key:\"manual\"},isInOtel:!1,visibility:\"public\",example:123.45,changelog:[{version:\"0.9.0\",prs:[397],description:\"Add additional_context\"},{version:\"0.4.0\",prs:[228]},{version:\"0.1.0\",prs:[112]}],additionalContext:[\"This attribute appears on both agent parent spans (aggregated totals) and LLM child spans (per-call values). When using sum() to calculate total cost, filter to gen_ai.operation.type:ai_client to avoid double-counting hierarchical spans.\",\"Despite the name 'cost.input_tokens', this value is cost in USD, not a token count. For token counts, use gen_ai.usage.input_tokens.\",\"This is the total cost of all input tokens, including cached and cache creation tokens at their respective rates. For the cached portion, see gen_ai.cost.cache_read.input_tokens. For the cache creation portion, see gen_ai.cost.cache_creation.input_tokens.\"]},\"gen_ai.cost.output_tokens\":{brief:\"The total cost of all output tokens in USD (includes reasoning tokens).\",type:\"double\",applyScrubbing:{key:\"manual\"},isInOtel:!1,visibility:\"public\",example:123.45,changelog:[{version:\"0.9.0\",prs:[397],description:\"Add additional_context\"},{version:\"0.4.0\",prs:[228]},{version:\"0.1.0\",prs:[112]}],additionalContext:[\"This attribute appears on both agent parent spans (aggregated totals) and LLM child spans (per-call values). When using sum() to calculate total cost, filter to gen_ai.operation.type:ai_client to avoid double-counting hierarchical spans.\",\"Despite the name 'cost.output_tokens', this value is cost in USD, not a token count. For token counts, use gen_ai.usage.output_tokens.\",\"This is the total cost of all output tokens, including reasoning tokens at their respective rate. For the reasoning portion, see gen_ai.cost.reasoning.output_tokens.\"]},\"gen_ai.cost.reasoning.output_tokens\":{brief:\"The cost of reasoning output tokens in USD.\",type:\"double\",applyScrubbing:{key:\"manual\"},isInOtel:!1,visibility:\"public\",example:12.34,changelog:[{version:\"0.16.0\",description:\"Added gen_ai.cost.reasoning.output_tokens attribute\"}],additionalContext:[\"This attribute appears on both agent parent spans (aggregated totals) and LLM child spans (per-call values). When using sum() to calculate total cost, filter to gen_ai.operation.type:ai_client to avoid double-counting hierarchical spans.\",\"Despite the name 'cost.reasoning.output_tokens', this value is cost in USD, not a token count. For token counts, use gen_ai.usage.reasoning.output_tokens.\",\"This is a subset of gen_ai.cost.output_tokens, not an independent cost. Do not sum this with gen_ai.cost.output_tokens \\u2014 it is already included.\"]},\"gen_ai.cost.total_tokens\":{brief:\"The total cost for the tokens used.\",type:\"double\",applyScrubbing:{key:\"manual\"},isInOtel:!1,visibility:\"public\",example:12.34,aliases:[\"ai.total_cost\"],changelog:[{version:\"0.9.0\",prs:[397],description:\"Add additional_context\"},{version:\"0.5.0\",prs:[264]},{version:\"0.4.0\",prs:[228]},{version:\"0.1.0\",prs:[126]}],additionalContext:[\"This attribute appears on both agent parent spans (aggregated totals) and LLM child spans (per-call values). When using sum() to calculate total cost, filter to gen_ai.operation.type:ai_client to avoid double-counting hierarchical spans.\",\"Despite the name 'cost.total_tokens', this value is cost in USD, not a token count. For token counts, use gen_ai.usage.total_tokens.\"]},\"gen_ai.embeddings.input\":{brief:\"The input to the embeddings model.\",type:\"string\",applyScrubbing:{key:\"manual\"},isInOtel:!1,visibility:\"public\",example:\"What's the weather in Paris?\",changelog:[{version:\"0.3.1\",prs:[195]}]},\"gen_ai.function_id\":{brief:\"Framework-specific tracing label for the execution of a function or other unit of execution in a generative AI system.\",type:\"string\",applyScrubbing:{key:\"manual\"},isInOtel:!1,visibility:\"public\",example:\"my-awesome-function\",changelog:[{version:\"0.5.0\",prs:[308],description:\"Added gen_ai.function_id attribute\"}]},\"gen_ai.input.messages\":{brief:'The messages passed to the model. It has to be a stringified version of an array of objects. The `role` attribute of each object must be `\"user\"`, `\"assistant\"`, `\"tool\"`, or `\"system\"`. For messages of the role `\"tool\"`, the `content` can be a string or an arbitrary object with information about the tool call. For other messages the `content` can be either a string or a list of objects in the format `{type: \"text\", text:\"...\"}`.',type:\"string\",applyScrubbing:{key:\"manual\"},isInOtel:!0,visibility:\"public\",example:'[{\"role\": \"user\", \"parts\": [{\"type\": \"text\", \"content\": \"Weather in Paris?\"}]}, {\"role\": \"assistant\", \"parts\": [{\"type\": \"tool_call\", \"id\": \"call_VSPygqKTWdrhaFErNvMV18Yl\", \"name\": \"get_weather\", \"arguments\": {\"location\": \"Paris\"}}]}, {\"role\": \"tool\", \"parts\": [{\"type\": \"tool_call_response\", \"id\": \"call_VSPygqKTWdrhaFErNvMV18Yl\", \"result\": \"rainy, 57\\xB0F\"}]}]',aliases:[\"ai.texts\"],changelog:[{version:\"0.5.0\",prs:[264]},{version:\"0.4.0\",prs:[221]}]},\"gen_ai.operation.name\":{brief:\"The name of the operation being performed. It has the following list of well-known values: 'chat', 'create_agent', 'embeddings', 'execute_tool', 'generate_content', 'invoke_agent', 'text_completion'. If one of them applies, then that value MUST be used. Otherwise a custom value MAY be used.\",type:\"string\",applyScrubbing:{key:\"manual\"},isInOtel:!0,visibility:\"public\",example:\"chat\",changelog:[{version:\"0.4.0\",prs:[225]},{version:\"0.1.0\",prs:[62,127]}]},\"gen_ai.operation.type\":{brief:\"The type of AI operation. Must be one of 'agent' (invoke_agent and create_agent spans), 'ai_client' (any LLM call), 'tool' (execute_tool spans), 'handoff' (handoff spans), 'other' (input and output processors, skill loading, guardrails etc.) . Added during ingestion based on span.op and gen_ai.operation.type. Used to filter and aggregate data in the UI\",type:\"string\",applyScrubbing:{key:\"manual\"},isInOtel:!1,visibility:\"public\",example:\"tool\",changelog:[{version:\"0.4.0\",prs:[257]},{version:\"0.1.0\",prs:[113,127]}]},\"gen_ai.output.messages\":{brief:\"The model's response messages. It has to be a stringified version of an array of message objects, which can include text responses and tool calls.\",type:\"string\",applyScrubbing:{key:\"manual\"},isInOtel:!0,visibility:\"public\",example:'[{\"role\": \"assistant\", \"parts\": [{\"type\": \"text\", \"content\": \"The weather in Paris is currently rainy with a temperature of 57\\xB0F.\"}], \"finish_reason\": \"stop\"}]',changelog:[{version:\"0.4.0\",prs:[221]}]},\"gen_ai.pipeline.name\":{brief:\"Name of the AI pipeline or chain being executed.\",type:\"string\",applyScrubbing:{key:\"manual\"},isInOtel:!1,visibility:\"public\",example:\"Autofix Pipeline\",aliases:[\"ai.pipeline.name\"],changelog:[{version:\"0.1.0\",prs:[76,127]}]},\"gen_ai.prompt\":{brief:\"The input messages sent to the model\",type:\"string\",applyScrubbing:{key:\"manual\"},isInOtel:!0,visibility:\"public\",example:'[{\"role\": \"user\", \"message\": \"hello\"}]',deprecation:{reason:\"Deprecated from OTEL, use gen_ai.input.messages with the new format instead.\"},changelog:[{version:\"0.1.0\",prs:[74,108,119]},{version:\"0.0.0\"}]},\"gen_ai.prompt.name\":{brief:\"The name of the prompt that uniquely identifies it.\",type:\"string\",applyScrubbing:{key:\"manual\",reason:\"Prompt names may reveal user behavior patterns or sensitive operations\"},isInOtel:!0,visibility:\"public\",example:\"summarize_text\",aliases:[\"mcp.prompt.name\"],changelog:[{version:\"0.12.0\",prs:[420],description:\"Added gen_ai.prompt.name attribute\"}]},\"gen_ai.provider.name\":{brief:\"The Generative AI provider as identified by the client or server instrumentation.\",type:\"string\",applyScrubbing:{key:\"manual\"},isInOtel:!0,visibility:\"public\",example:\"openai\",aliases:[\"ai.model.provider\",\"gen_ai.system\"],changelog:[{version:\"0.4.0\",prs:[253]}]},\"gen_ai.request.available_tools\":{brief:\"The available tools for the model. It has to be a stringified version of an array of objects.\",type:\"string\",applyScrubbing:{key:\"manual\"},isInOtel:!1,visibility:\"public\",example:'[{\"name\": \"get_weather\", \"description\": \"Get the weather for a given location\"}, {\"name\": \"get_news\", \"description\": \"Get the news for a given topic\"}]',deprecation:{replacement:\"gen_ai.tool.definitions\"},changelog:[{version:\"0.4.0\",prs:[221]},{version:\"0.1.0\",prs:[63,127]}]},\"gen_ai.request.frequency_penalty\":{brief:\"Used to reduce repetitiveness of generated tokens. The higher the value, the stronger a penalty is applied to previously present tokens, proportional to how many times they have already appeared in the prompt or prior generation.\",type:\"double\",applyScrubbing:{key:\"manual\"},isInOtel:!0,visibility:\"public\",example:.5,aliases:[\"ai.frequency_penalty\"],changelog:[{version:\"0.4.0\",prs:[228]},{version:\"0.1.0\",prs:[57]}]},\"gen_ai.request.max_tokens\":{brief:\"The maximum number of tokens to generate in the response.\",type:\"integer\",applyScrubbing:{key:\"manual\"},isInOtel:!0,visibility:\"public\",example:2048,changelog:[{version:\"0.4.0\",prs:[228]},{version:\"0.1.0\",prs:[62]}]},\"gen_ai.request.messages\":{brief:'The messages passed to the model. It has to be a stringified version of an array of objects. The `role` attribute of each object must be `\"user\"`, `\"assistant\"`, `\"tool\"`, or `\"system\"`. For messages of the role `\"tool\"`, the `content` can be a string or an arbitrary object with information about the tool call. For other messages the `content` can be either a string or a list of objects in the format `{type: \"text\", text:\"...\"}`.',type:\"string\",applyScrubbing:{key:\"manual\"},isInOtel:!1,visibility:\"public\",example:'[{\"role\": \"system\", \"content\": \"Generate a random number.\"}, {\"role\": \"user\", \"content\": [{\"text\": \"Generate a random number between 0 and 10.\", \"type\": \"text\"}]}, {\"role\": \"tool\", \"content\": {\"toolCallId\": \"1\", \"toolName\": \"Weather\", \"output\": \"rainy\"}}]',deprecation:{replacement:\"gen_ai.input.messages\"},aliases:[\"ai.input_messages\"],changelog:[{version:\"0.4.0\",prs:[221]},{version:\"0.1.0\",prs:[63,74,108,119,122]}]},\"gen_ai.request.model\":{brief:\"The model identifier being used for the request.\",type:\"string\",applyScrubbing:{key:\"manual\"},isInOtel:!0,visibility:\"public\",example:\"gpt-4-turbo-preview\",changelog:[{version:\"0.1.0\",prs:[62,127]}]},\"gen_ai.request.presence_penalty\":{brief:\"Used to reduce repetitiveness of generated tokens. Similar to frequency_penalty, except that this penalty is applied equally to all tokens that have already appeared, regardless of their exact frequencies.\",type:\"double\",applyScrubbing:{key:\"manual\"},isInOtel:!0,visibility:\"public\",example:.5,aliases:[\"ai.presence_penalty\"],changelog:[{version:\"0.4.0\",prs:[228]},{version:\"0.1.0\",prs:[57]}]},\"gen_ai.request.reasoning_effort\":{brief:\"Constrains the effort on reasoning for reasoning models. Supported values vary by provider.\",type:\"string\",applyScrubbing:{key:\"manual\"},isInOtel:!1,visibility:\"public\",example:\"high\",changelog:[{version:\"0.13.0\",prs:[334],description:\"Added gen_ai.request.reasoning_effort attribute\"}]},\"gen_ai.request.seed\":{brief:\"The seed, ideally models given the same seed and same other parameters will produce the exact same output.\",type:\"string\",applyScrubbing:{key:\"manual\"},isInOtel:!0,visibility:\"public\",example:\"1234567890\",aliases:[\"ai.seed\"],changelog:[{version:\"0.1.0\",prs:[57,127]}]},\"gen_ai.request.stop_sequences\":{brief:\"List of sequences that the model will use to stop generating further tokens.\",type:\"string[]\",applyScrubbing:{key:\"manual\"},isInOtel:!0,visibility:\"public\",example:[\"forest\",\"lived\"],changelog:[{version:\"0.16.0\",prs:[482],description:\"Added gen_ai.request.stop_sequences attribute\"}]},\"gen_ai.request.temperature\":{brief:\"For an AI model call, the temperature parameter. Temperature essentially means how random the output will be.\",type:\"double\",applyScrubbing:{key:\"manual\"},isInOtel:!0,visibility:\"public\",example:.1,aliases:[\"ai.temperature\"],changelog:[{version:\"0.4.0\",prs:[228]},{version:\"0.1.0\",prs:[57]}]},\"gen_ai.request.top_k\":{brief:\"Limits the model to only consider the K most likely next tokens, where K is an integer (e.g., top_k=20 means only the 20 highest probability tokens are considered).\",type:\"integer\",applyScrubbing:{key:\"manual\"},isInOtel:!0,visibility:\"public\",example:35,aliases:[\"ai.top_k\"],changelog:[{version:\"0.4.0\",prs:[228]},{version:\"0.1.0\",prs:[57]}]},\"gen_ai.request.top_p\":{brief:\"Limits the model to only consider tokens whose cumulative probability mass adds up to p, where p is a float between 0 and 1 (e.g., top_p=0.7 means only tokens that sum up to 70% of the probability mass are considered).\",type:\"double\",applyScrubbing:{key:\"manual\"},isInOtel:!0,visibility:\"public\",example:.7,aliases:[\"ai.top_p\"],changelog:[{version:\"0.4.0\",prs:[228]},{version:\"0.1.0\",prs:[57]}]},\"gen_ai.response.finish_reasons\":{brief:\"The reason why the model stopped generating.\",type:\"string\",applyScrubbing:{key:\"manual\"},isInOtel:!0,visibility:\"public\",example:\"COMPLETE\",aliases:[\"ai.finish_reason\"],changelog:[{version:\"0.1.0\",prs:[57,127]}]},\"gen_ai.response.id\":{brief:\"Unique identifier for the completion.\",type:\"string\",applyScrubbing:{key:\"manual\"},isInOtel:!0,visibility:\"public\",example:\"gen_123abc\",aliases:[\"ai.generation_id\"],changelog:[{version:\"0.1.0\",prs:[57,127]}]},\"gen_ai.response.model\":{brief:\"The vendor-specific ID of the model used.\",type:\"string\",applyScrubbing:{key:\"manual\"},isInOtel:!0,visibility:\"public\",example:\"gpt-4\",aliases:[\"ai.model_id\"],changelog:[{version:\"0.1.0\",prs:[127]},{version:\"0.0.0\"}]},\"gen_ai.response.streaming\":{brief:\"Whether or not the AI model call's response was streamed back asynchronously\",type:\"boolean\",applyScrubbing:{key:\"manual\"},isInOtel:!1,visibility:\"public\",example:!0,aliases:[\"ai.streaming\"],changelog:[{version:\"0.1.0\",prs:[76]}]},\"gen_ai.response.text\":{brief:\"The model's response text messages. It has to be a stringified version of an array of response text messages.\",type:\"string\",applyScrubbing:{key:\"manual\"},isInOtel:!1,visibility:\"public\",example:'[\"The weather in Paris is rainy and overcast, with temperatures around 57\\xB0F\", \"The weather in London is sunny and warm, with temperatures around 65\\xB0F\"]',deprecation:{replacement:\"gen_ai.output.messages\"},changelog:[{version:\"0.4.0\",prs:[221]},{version:\"0.1.0\",prs:[63,74]}]},\"gen_ai.response.time_to_first_chunk\":{brief:\"Time in seconds when the first response content chunk arrived in streaming responses.\",type:\"double\",applyScrubbing:{key:\"manual\"},isInOtel:!0,visibility:\"public\",example:.6853435,aliases:[\"gen_ai.response.time_to_first_token\"],changelog:[{version:\"0.11.0\",prs:[418],description:\"Added gen_ai.response.time_to_first_chunk attribute\"}]},\"gen_ai.response.time_to_first_token\":{brief:\"Time in seconds when the first response content chunk arrived in streaming responses.\",type:\"double\",applyScrubbing:{key:\"manual\"},isInOtel:!1,visibility:\"public\",example:.6853435,deprecation:{replacement:\"gen_ai.response.time_to_first_chunk\"},aliases:[\"gen_ai.response.time_to_first_chunk\"],changelog:[{version:\"0.11.0\",prs:[418],description:\"Deprecate in favor of gen_ai.response.time_to_first_chunk\"},{version:\"0.4.0\",prs:[227]}]},\"gen_ai.response.tokens_per_second\":{brief:\"The total output tokens per seconds throughput\",type:\"double\",applyScrubbing:{key:\"manual\"},isInOtel:!1,visibility:\"public\",example:12345.67,changelog:[{version:\"0.4.0\",prs:[228]},{version:\"0.1.0\",prs:[66]}]},\"gen_ai.response.tool_calls\":{brief:\"The tool calls in the model's response. It has to be a stringified version of an array of objects.\",type:\"string\",applyScrubbing:{key:\"manual\"},isInOtel:!1,visibility:\"public\",example:'[{\"name\": \"get_weather\", \"arguments\": {\"location\": \"Paris\"}}]',deprecation:{replacement:\"gen_ai.output.messages\"},changelog:[{version:\"0.4.0\",prs:[221]},{version:\"0.1.0\",prs:[63,74]}]},\"gen_ai.system\":{brief:\"The provider of the model.\",type:\"string\",applyScrubbing:{key:\"manual\"},isInOtel:!0,visibility:\"public\",example:\"openai\",deprecation:{replacement:\"gen_ai.provider.name\"},aliases:[\"ai.model.provider\",\"gen_ai.provider.name\"],changelog:[{version:\"0.4.0\",prs:[253]},{version:\"0.1.0\",prs:[57,127]}]},\"gen_ai.system_instructions\":{brief:\"The system instructions passed to the model.\",type:\"string\",applyScrubbing:{key:\"manual\"},isInOtel:!0,visibility:\"public\",example:\"You are a helpful assistant\",aliases:[\"ai.preamble\"],changelog:[{version:\"0.5.0\",prs:[264]},{version:\"0.4.0\",prs:[221]}]},\"gen_ai.system.message\":{brief:\"The system instructions passed to the model.\",type:\"string\",applyScrubbing:{key:\"auto\"},isInOtel:!1,visibility:\"public\",example:\"You are a helpful assistant\",deprecation:{replacement:\"gen_ai.system_instructions\"},changelog:[{version:\"0.4.0\",prs:[221]},{version:\"0.1.0\",prs:[62]}]},\"gen_ai.tool.call.arguments\":{brief:\"The arguments of the tool call. It has to be a stringified version of the arguments to the tool.\",type:\"string\",applyScrubbing:{key:\"manual\"},isInOtel:!0,visibility:\"public\",example:'{\"location\": \"Paris\"}',aliases:[\"gen_ai.tool.input\"],changelog:[{version:\"0.5.0\",prs:[265]},{version:\"0.4.0\",prs:[221]}]},\"gen_ai.tool.call.result\":{brief:\"The result of the tool call. It has to be a stringified version of the result of the tool.\",type:\"string\",applyScrubbing:{key:\"manual\"},isInOtel:!0,visibility:\"public\",example:\"rainy, 57\\xB0F\",aliases:[\"gen_ai.tool.output\",\"gen_ai.tool.message\",\"mcp.tool.result.content\"],changelog:[{version:\"0.5.0\",prs:[265]},{version:\"0.4.0\",prs:[221]}]},\"gen_ai.tool.definitions\":{brief:\"The list of source system tool definitions available to the GenAI agent or model.\",type:\"string\",applyScrubbing:{key:\"manual\"},isInOtel:!0,visibility:\"public\",example:'[{\"type\": \"function\", \"name\": \"get_current_weather\", \"description\": \"Get the current weather in a given location\", \"parameters\": {\"type\": \"object\", \"properties\": {\"location\": {\"type\": \"string\", \"description\": \"The city and state, e.g. San Francisco, CA\"}, \"unit\": {\"type\": \"string\", \"enum\": [\"celsius\", \"fahrenheit\"]}}, \"required\": [\"location\", \"unit\"]}}]',changelog:[{version:\"0.4.0\",prs:[221]}]},\"gen_ai.tool.description\":{brief:\"The description of the tool being used.\",type:\"string\",applyScrubbing:{key:\"manual\"},isInOtel:!0,visibility:\"public\",example:\"Searches the web for current information about a topic\",changelog:[{version:\"0.1.0\",prs:[62,127]}]},\"gen_ai.tool.input\":{brief:\"The input of the tool being used. It has to be a stringified version of the input to the tool.\",type:\"string\",applyScrubbing:{key:\"manual\"},isInOtel:!1,visibility:\"public\",example:'{\"location\": \"Paris\"}',deprecation:{replacement:\"gen_ai.tool.call.arguments\"},aliases:[\"gen_ai.tool.call.arguments\"],changelog:[{version:\"0.5.0\",prs:[265]},{version:\"0.1.0\",prs:[63,74]}]},\"gen_ai.tool.message\":{brief:\"The response from a tool or function call passed to the model.\",type:\"string\",applyScrubbing:{key:\"auto\"},isInOtel:!1,visibility:\"public\",example:\"rainy, 57\\xB0F\",deprecation:{replacement:\"gen_ai.tool.call.result\"},aliases:[\"gen_ai.tool.call.result\",\"gen_ai.tool.output\",\"mcp.tool.result.content\"],changelog:[{version:\"0.5.0\",prs:[265]},{version:\"0.1.0\",prs:[62]}]},\"gen_ai.tool.name\":{brief:\"Name of the tool utilized by the agent.\",type:\"string\",applyScrubbing:{key:\"manual\"},isInOtel:!0,visibility:\"public\",example:\"Flights\",aliases:[\"ai.function_call\",\"mcp.tool.name\"],changelog:[{version:\"0.1.0\",prs:[57,127]}]},\"gen_ai.tool.output\":{brief:\"The output of the tool being used. It has to be a stringified version of the output of the tool.\",type:\"string\",applyScrubbing:{key:\"manual\"},isInOtel:!1,visibility:\"public\",example:\"rainy, 57\\xB0F\",deprecation:{replacement:\"gen_ai.tool.call.result\"},aliases:[\"gen_ai.tool.call.result\",\"gen_ai.tool.message\",\"mcp.tool.result.content\"],changelog:[{version:\"0.5.0\",prs:[265]},{version:\"0.1.0\",prs:[63,74]}]},\"gen_ai.tool.type\":{brief:\"The type of tool being used.\",type:\"string\",applyScrubbing:{key:\"manual\"},isInOtel:!0,visibility:\"public\",example:\"function\",deprecation:{reason:\"The gen_ai.tool.type attribute is deprecated and should no longer be set.\"},changelog:[{version:\"0.1.0\",prs:[62,127]}]},\"gen_ai.usage.cache_creation.input_tokens\":{brief:\"The number of tokens written to the cache when processing the AI input (prompt).\",type:\"integer\",applyScrubbing:{key:\"manual\"},isInOtel:!0,visibility:\"public\",example:100,aliases:[\"gen_ai.usage.input_tokens.cache_write\"],changelog:[{version:\"0.11.0\",prs:[418],description:\"Added gen_ai.usage.cache_creation.input_tokens attribute\"}],additionalContext:[\"This attribute appears on both agent parent spans (aggregated totals) and LLM child spans (per-call values). When using sum() to count tokens, filter to gen_ai.operation.type:ai_client to avoid double-counting hierarchical spans.\"]},\"gen_ai.usage.cache_read.input_tokens\":{brief:\"The number of cached tokens used to process the AI input (prompt).\",type:\"integer\",applyScrubbing:{key:\"manual\"},isInOtel:!0,visibility:\"public\",example:50,aliases:[\"gen_ai.usage.input_tokens.cached\"],changelog:[{version:\"0.11.0\",prs:[418],description:\"Added gen_ai.usage.cache_read.input_tokens attribute\"}],additionalContext:[\"This attribute appears on both agent parent spans (aggregated totals) and LLM child spans (per-call values). When using sum() to count tokens, filter to gen_ai.operation.type:ai_client to avoid double-counting hierarchical spans.\",\"This is a subset of gen_ai.usage.input_tokens, not an independent count. Do not sum this with gen_ai.usage.input_tokens \\u2014 it is already included.\"]},\"gen_ai.usage.completion_tokens\":{brief:\"The number of tokens used in the GenAI response (completion).\",type:\"integer\",applyScrubbing:{key:\"manual\"},isInOtel:!0,visibility:\"public\",example:10,deprecation:{replacement:\"gen_ai.usage.output_tokens\"},aliases:[\"ai.completion_tokens.used\",\"gen_ai.usage.output_tokens\"],changelog:[{version:\"0.9.0\",prs:[397],description:\"Add additional_context\"},{version:\"0.4.0\",prs:[228]},{version:\"0.1.0\",prs:[61]},{version:\"0.0.0\"}],additionalContext:[\"This attribute appears on both agent parent spans (aggregated totals) and LLM child spans (per-call values). When using sum() to count tokens, filter to gen_ai.operation.type:ai_client to avoid double-counting hierarchical spans.\"]},\"gen_ai.usage.input_tokens\":{brief:\"The number of tokens used to process the AI input (prompt) including cached input tokens.\",type:\"integer\",applyScrubbing:{key:\"manual\"},isInOtel:!0,visibility:\"public\",example:10,aliases:[\"ai.prompt_tokens.used\",\"gen_ai.usage.prompt_tokens\"],changelog:[{version:\"0.11.0\",prs:[418],description:\"Update additional_context to reference gen_ai.usage.cache_read.input_tokens\"},{version:\"0.9.0\",prs:[397],description:\"Add additional_context\"},{version:\"0.5.0\",prs:[261]},{version:\"0.4.0\",prs:[228]},{version:\"0.1.0\",prs:[112]},{version:\"0.0.0\"}],additionalContext:[\"This attribute appears on both agent parent spans (aggregated totals) and LLM child spans (per-call values). When using sum() to count tokens, filter to gen_ai.operation.type:ai_client to avoid double-counting hierarchical spans.\",\"This count includes cached input tokens. gen_ai.usage.cache_read.input_tokens is a subset of this value, not an independent count \\u2014 do not sum them together.\"]},\"gen_ai.usage.input_tokens.cached\":{brief:\"The number of cached tokens used to process the AI input (prompt).\",type:\"integer\",applyScrubbing:{key:\"manual\"},isInOtel:!1,visibility:\"public\",example:50,deprecation:{replacement:\"gen_ai.usage.cache_read.input_tokens\"},aliases:[\"gen_ai.usage.cache_read.input_tokens\"],changelog:[{version:\"0.11.0\",prs:[418],description:\"Deprecate in favor of gen_ai.usage.cache_read.input_tokens\"},{version:\"0.9.0\",prs:[397],description:\"Add additional_context\"},{version:\"0.4.0\",prs:[228]},{version:\"0.1.0\",prs:[62,112]}],additionalContext:[\"This attribute appears on both agent parent spans (aggregated totals) and LLM child spans (per-call values). When using sum() to count tokens, filter to gen_ai.operation.type:ai_client to avoid double-counting hierarchical spans.\",\"This is a subset of gen_ai.usage.input_tokens, not an independent count. Do not sum this with gen_ai.usage.input_tokens \\u2014 it is already included.\"]},\"gen_ai.usage.input_tokens.cache_write\":{brief:\"The number of tokens written to the cache when processing the AI input (prompt).\",type:\"integer\",applyScrubbing:{key:\"manual\"},isInOtel:!1,visibility:\"public\",example:100,deprecation:{replacement:\"gen_ai.usage.cache_creation.input_tokens\"},aliases:[\"gen_ai.usage.cache_creation.input_tokens\"],changelog:[{version:\"0.11.0\",prs:[418],description:\"Deprecate in favor of gen_ai.usage.cache_creation.input_tokens\"},{version:\"0.9.0\",prs:[397],description:\"Add additional_context\"},{version:\"0.4.0\",prs:[217,228]}],additionalContext:[\"This attribute appears on both agent parent spans (aggregated totals) and LLM child spans (per-call values). When using sum() to count tokens, filter to gen_ai.operation.type:ai_client to avoid double-counting hierarchical spans.\"]},\"gen_ai.usage.output_tokens\":{brief:\"The number of tokens used for creating the AI output (including reasoning tokens).\",type:\"integer\",applyScrubbing:{key:\"manual\"},isInOtel:!0,visibility:\"public\",example:10,aliases:[\"ai.completion_tokens.used\",\"gen_ai.usage.completion_tokens\"],changelog:[{version:\"0.11.0\",prs:[418],description:\"Update additional_context to reference gen_ai.usage.reasoning.output_tokens\"},{version:\"0.9.0\",prs:[397],description:\"Add additional_context\"},{version:\"0.5.0\",prs:[261]},{version:\"0.4.0\",prs:[228]},{version:\"0.1.0\",prs:[112]},{version:\"0.0.0\"}],additionalContext:[\"This attribute appears on both agent parent spans (aggregated totals) and LLM child spans (per-call values). When using sum() to count tokens, filter to gen_ai.operation.type:ai_client to avoid double-counting hierarchical spans.\",\"This count includes reasoning tokens. gen_ai.usage.reasoning.output_tokens is a subset of this value, not an independent count \\u2014 do not sum them together.\"]},\"gen_ai.usage.output_tokens.reasoning\":{brief:\"The number of tokens used for reasoning to create the AI output.\",type:\"integer\",applyScrubbing:{key:\"manual\"},isInOtel:!1,visibility:\"public\",example:75,deprecation:{replacement:\"gen_ai.usage.reasoning.output_tokens\"},aliases:[\"gen_ai.usage.reasoning.output_tokens\"],changelog:[{version:\"0.11.0\",prs:[418],description:\"Deprecate in favor of gen_ai.usage.reasoning.output_tokens\"},{version:\"0.9.0\",prs:[397],description:\"Add additional_context\"},{version:\"0.4.0\",prs:[228]},{version:\"0.1.0\",prs:[62,112]}],additionalContext:[\"This attribute appears on both agent parent spans (aggregated totals) and LLM child spans (per-call values). When using sum() to count tokens, filter to gen_ai.operation.type:ai_client to avoid double-counting hierarchical spans.\",\"This is a subset of gen_ai.usage.output_tokens, not an independent count. Do not sum this with gen_ai.usage.output_tokens \\u2014 it is already included.\"]},\"gen_ai.usage.prompt_tokens\":{brief:\"The number of tokens used in the GenAI input (prompt).\",type:\"integer\",applyScrubbing:{key:\"manual\"},isInOtel:!0,visibility:\"public\",example:20,deprecation:{replacement:\"gen_ai.usage.input_tokens\"},aliases:[\"ai.prompt_tokens.used\",\"gen_ai.usage.input_tokens\"],changelog:[{version:\"0.9.0\",prs:[397],description:\"Add additional_context\"},{version:\"0.4.0\",prs:[228]},{version:\"0.1.0\",prs:[61]},{version:\"0.0.0\"}],additionalContext:[\"This attribute appears on both agent parent spans (aggregated totals) and LLM child spans (per-call values). When using sum() to count tokens, filter to gen_ai.operation.type:ai_client to avoid double-counting hierarchical spans.\"]},\"gen_ai.usage.reasoning.output_tokens\":{brief:\"The number of tokens used for reasoning to create the AI output.\",type:\"integer\",applyScrubbing:{key:\"manual\"},isInOtel:!0,visibility:\"public\",example:75,aliases:[\"gen_ai.usage.output_tokens.reasoning\"],changelog:[{version:\"0.11.0\",prs:[418],description:\"Added gen_ai.usage.reasoning.output_tokens attribute\"}],additionalContext:[\"This attribute appears on both agent parent spans (aggregated totals) and LLM child spans (per-call values). When using sum() to count tokens, filter to gen_ai.operation.type:ai_client to avoid double-counting hierarchical spans.\",\"This is a subset of gen_ai.usage.output_tokens, not an independent count. Do not sum this with gen_ai.usage.output_tokens \\u2014 it is already included.\"]},\"gen_ai.usage.total_tokens\":{brief:\"The total number of tokens used to process the prompt. (input tokens plus output todkens)\",type:\"integer\",applyScrubbing:{key:\"manual\"},isInOtel:!1,visibility:\"public\",example:20,aliases:[\"ai.total_tokens.used\"],changelog:[{version:\"0.9.0\",prs:[397],description:\"Add additional_context\"},{version:\"0.4.0\",prs:[228]},{version:\"0.1.0\",prs:[57]}],additionalContext:[\"This attribute appears on both agent parent spans (aggregated totals) and LLM child spans (per-call values). When using sum() to count tokens, filter to gen_ai.operation.type:ai_client to avoid double-counting hierarchical spans.\",\"This is the sum of gen_ai.usage.input_tokens and gen_ai.usage.output_tokens. Do not sum this with either of them \\u2014 they are already included.\"]},\"graphql.document\":{brief:\"The GraphQL document being executed.\",type:\"string\",applyScrubbing:{key:\"auto\",reason:\"The document may contain sensitive information in arguments or variables. Instrumentation should redact sensitive information when possible.\"},isInOtel:!0,visibility:\"public\",example:\"query findBookById { bookById(id: ?) { name } }\",changelog:[{version:\"0.7.0\",description:\"Adds the `graphql.document` attribute to track the GraphQL document being executed.\"}]},\"graphql.operation.name\":{brief:\"The name of the operation being executed.\",type:\"string\",applyScrubbing:{key:\"manual\"},isInOtel:!0,visibility:\"public\",example:\"findBookById\",changelog:[{version:\"0.1.0\",prs:[127]},{version:\"0.0.0\"}]},\"graphql.operation.type\":{brief:\"The type of the operation being executed.\",type:\"string\",applyScrubbing:{key:\"manual\"},isInOtel:!0,visibility:\"public\",example:\"query\",changelog:[{version:\"0.1.0\",prs:[127]},{version:\"0.0.0\"}]},hardwareConcurrency:{brief:\"The number of logical CPU cores available.\",type:\"string\",applyScrubbing:{key:\"manual\"},isInOtel:!1,visibility:\"public\",example:\"14\",deprecation:{replacement:\"device.processor_count\",reason:\"Old namespace-less attribute, to be replaced with device.processor_count for span-first future\"},aliases:[\"device.processor_count\"],changelog:[{version:\"0.5.0\",prs:[281,300],description:\"Added and deprecated attribute to document JS SDK's current behaviour\"}]},\"http.client_ip\":{brief:\"Client address - domain name if available without reverse DNS lookup; otherwise, IP address or Unix domain socket name.\",type:\"string\",applyScrubbing:{key:\"auto\"},isInOtel:!0,visibility:\"public\",example:\"example.com\",deprecation:{replacement:\"client.address\"},aliases:[\"client.address\"],changelog:[{version:\"0.1.0\",prs:[61,106,127]},{version:\"0.0.0\"}]},\"http.decoded_response_content_length\":{brief:\"The decoded body size of the response (in bytes).\",type:\"integer\",applyScrubbing:{key:\"manual\"},isInOtel:!1,visibility:\"public\",example:456,changelog:[{version:\"0.4.0\",prs:[228]},{version:\"0.0.0\"}]},\"http.flavor\":{brief:\"The actual version of the protocol used for network communication.\",type:\"string\",applyScrubbing:{key:\"manual\"},isInOtel:!0,visibility:\"public\",example:\"1.1\",deprecation:{replacement:\"network.protocol.version\"},aliases:[\"network.protocol.version\",\"net.protocol.version\"],changelog:[{version:\"0.1.0\",prs:[61,108,127]},{version:\"0.0.0\"}]},\"http.fragment\":{brief:\"The fragments present in the URI. Note that this contains the leading # character, while the `url.fragment` attribute does not.\",type:\"string\",applyScrubbing:{key:\"auto\"},isInOtel:!1,visibility:\"public\",example:\"#details\",changelog:[{version:\"0.0.0\"}]},\"http.host\":{brief:\"The domain name.\",type:\"string\",applyScrubbing:{key:\"manual\"},isInOtel:!0,visibility:\"public\",example:\"example.com\",deprecation:{replacement:\"server.address\",reason:\"Deprecated, use one of `server.address` or `client.address`, depending on the usage\"},aliases:[\"server.address\",\"client.address\",\"http.server_name\",\"net.host.name\",\"server_name\"],changelog:[{version:\"0.1.0\",prs:[61,108,127]},{version:\"0.0.0\"}]},\"http.method\":{brief:\"The HTTP method used.\",type:\"string\",applyScrubbing:{key:\"manual\"},isInOtel:!0,visibility:\"public\",example:\"GET\",deprecation:{replacement:\"http.request.method\"},aliases:[\"http.request.method\",\"http.request_method\",\"method\"],changelog:[{version:\"0.1.0\",prs:[61,127]},{version:\"0.0.0\"}]},\"http.query\":{brief:\"The query string present in the URL. Note that this contains the leading ? character, while the `url.query` attribute does not.\",type:\"string\",applyScrubbing:{key:\"auto\",reason:\"Query string values can contain sensitive information. Clients should attempt to scrub parameters that might contain sensitive information.\"},isInOtel:!1,visibility:\"public\",example:\"?foo=bar&bar=baz\",changelog:[{version:\"0.0.0\"}]},\"http.request.body.data\":{brief:\"HTTP request body data. Can be given as string or structural data of any format.\",type:\"string\",applyScrubbing:{key:\"auto\"},isInOtel:!1,visibility:\"public\",example:'[{\"role\": \"user\", \"message\": \"hello\"}]',changelog:[{version:\"0.6.0\",prs:[336],description:\"Added http.request.body.data attribute\"}]},\"http.request.connection_end\":{brief:\"The UNIX timestamp representing the time immediately after the browser finishes establishing the connection to the server to retrieve the resource. The timestamp value includes the time interval to establish the transport connection, as well as other time intervals such as TLS handshake and SOCKS authentication.\",type:\"double\",applyScrubbing:{key:\"manual\"},isInOtel:!1,visibility:\"public\",example:173282955515e-2,changelog:[{version:\"0.4.0\",prs:[228]},{version:\"0.1.0\",prs:[134]},{version:\"0.0.0\"}]},\"http.request.connect_start\":{brief:\"The UNIX timestamp representing the time immediately before the user agent starts establishing the connection to the server to retrieve the resource.\",type:\"double\",applyScrubbing:{key:\"manual\"},isInOtel:!1,visibility:\"public\",example:1732829555111e-3,changelog:[{version:\"0.4.0\",prs:[228]},{version:\"0.1.0\",prs:[134]},{version:\"0.0.0\"}]},\"http.request.domain_lookup_end\":{brief:\"The UNIX timestamp representing the time immediately after the browser finishes the domain-name lookup for the resource.\",type:\"double\",applyScrubbing:{key:\"manual\"},isInOtel:!1,visibility:\"public\",example:1732829555201e-3,changelog:[{version:\"0.4.0\",prs:[228]},{version:\"0.1.0\",prs:[134]},{version:\"0.0.0\"}]},\"http.request.domain_lookup_start\":{brief:\"The UNIX timestamp representing the time immediately before the browser starts the domain name lookup for the resource.\",type:\"double\",applyScrubbing:{key:\"manual\"},isInOtel:!1,visibility:\"public\",example:1732829555322e-3,changelog:[{version:\"0.4.0\",prs:[228]},{version:\"0.1.0\",prs:[134]},{version:\"0.0.0\"}]},\"http.request.fetch_start\":{brief:\"The UNIX timestamp representing the time immediately before the browser starts to fetch the resource.\",type:\"double\",applyScrubbing:{key:\"manual\"},isInOtel:!1,visibility:\"public\",example:1732829555389e-3,changelog:[{version:\"0.4.0\",prs:[228]},{version:\"0.1.0\",prs:[134]},{version:\"0.0.0\"}]},\"http.request.header.<key>\":{brief:\"HTTP request headers, <key> being the normalized HTTP Header name (lowercase), the value being the header values.\",type:\"string[]\",applyScrubbing:{key:\"auto\"},isInOtel:!0,visibility:\"public\",hasDynamicSuffix:!0,example:\"http.request.header.custom-header=['foo', 'bar']\",changelog:[{version:\"0.4.0\",prs:[201,204]},{version:\"0.1.0\",prs:[103]}]},\"http.request.method\":{brief:\"The HTTP method used.\",type:\"string\",applyScrubbing:{key:\"manual\"},isInOtel:!0,visibility:\"public\",example:\"GET\",aliases:[\"method\",\"http.method\",\"http.request_method\"],changelog:[{version:\"0.1.0\",prs:[127]},{version:\"0.0.0\"}]},\"http.request_method\":{brief:\"The HTTP method used.\",type:\"string\",applyScrubbing:{key:\"manual\"},isInOtel:!1,visibility:\"public\",example:\"GET\",deprecation:{replacement:\"http.request.method\"},aliases:[\"method\",\"http.method\",\"http.request.method\"],changelog:[{version:\"0.6.0\",prs:[343],description:\"Added http.request_method attribute\"}]},\"http.request.redirect_end\":{brief:\"The UNIX timestamp representing the timestamp immediately after receiving the last byte of the response of the last redirect\",type:\"double\",applyScrubbing:{key:\"manual\"},isInOtel:!1,visibility:\"public\",example:1732829558502e-3,changelog:[{version:\"0.4.0\",prs:[228]},{version:\"0.1.0\",prs:[130,134]}]},\"http.request.redirect_start\":{brief:\"The UNIX timestamp representing the start time of the fetch which that initiates the redirect.\",type:\"double\",applyScrubbing:{key:\"manual\"},isInOtel:!1,visibility:\"public\",example:1732829555495e-3,changelog:[{version:\"0.4.0\",prs:[228]},{version:\"0.1.0\",prs:[134]},{version:\"0.0.0\"}]},\"http.request.request_start\":{brief:\"The UNIX timestamp representing the time immediately before the browser starts requesting the resource from the server, cache, or local resource. If the transport connection fails and the browser retires the request, the value returned will be the start of the retry request.\",type:\"double\",applyScrubbing:{key:\"manual\"},isInOtel:!1,visibility:\"public\",example:173282955551e-2,changelog:[{version:\"0.4.0\",prs:[228]},{version:\"0.1.0\",prs:[134]},{version:\"0.0.0\"}]},\"http.request.resend_count\":{brief:\"The ordinal number of request resending attempt (for any reason, including redirects).\",type:\"integer\",applyScrubbing:{key:\"manual\"},isInOtel:!1,visibility:\"public\",example:2,changelog:[{version:\"0.4.0\",prs:[228]},{version:\"0.0.0\"}]},\"http.request.response_end\":{brief:\"The UNIX timestamp representing the time immediately after the browser receives the last byte of the resource or immediately before the transport connection is closed, whichever comes first.\",type:\"double\",applyScrubbing:{key:\"manual\"},isInOtel:!1,visibility:\"public\",example:173282955589e-2,changelog:[{version:\"0.4.0\",prs:[228]},{version:\"0.1.0\",prs:[134]},{version:\"0.0.0\"}]},\"http.request.response_start\":{brief:\"The UNIX timestamp representing the time immediately before the browser starts requesting the resource from the server, cache, or local resource. If the transport connection fails and the browser retires the request, the value returned will be the start of the retry request.\",type:\"double\",applyScrubbing:{key:\"manual\"},isInOtel:!1,visibility:\"public\",example:17328295557e-1,changelog:[{version:\"0.4.0\",prs:[228]},{version:\"0.1.0\",prs:[134]},{version:\"0.0.0\"}]},\"http.request.same_origin\":{brief:\"Indicates that a URL has the same origin as the current page's origin in the browser.\",type:\"boolean\",applyScrubbing:{key:\"manual\"},isInOtel:!1,visibility:\"public\",example:!0,aliases:[\"url.same_origin\"],changelog:[{version:\"0.16.0\",prs:[456],description:\"Added http.request.same_origin attribute\"}]},\"http.request.secure_connection_start\":{brief:\"The UNIX timestamp representing the time immediately before the browser starts the handshake process to secure the current connection. If a secure connection is not used, the property returns zero.\",type:\"double\",applyScrubbing:{key:\"manual\"},isInOtel:!1,visibility:\"public\",example:173282955573e-2,changelog:[{version:\"0.4.0\",prs:[228]},{version:\"0.1.0\",prs:[134]},{version:\"0.0.0\"}]},\"http.request.time_to_first_byte\":{brief:\"The time in seconds from the browser's timeorigin to when the first byte of the request's response was received. See https://web.dev/articles/ttfb#measure-resource-requests\",type:\"double\",applyScrubbing:{key:\"manual\"},isInOtel:!1,visibility:\"public\",example:1.032,changelog:[{version:\"0.4.0\",prs:[228]},{version:\"0.1.0\",prs:[131]}]},\"http.request.worker_start\":{brief:\"The UNIX timestamp representing the timestamp immediately before dispatching the FetchEvent if a Service Worker thread is already running, or immediately before starting the Service Worker thread if it is not already running.\",type:\"double\",applyScrubbing:{key:\"manual\"},isInOtel:!1,visibility:\"public\",example:173282955368e-2,changelog:[{version:\"0.4.0\",prs:[228]},{version:\"0.1.0\",prs:[130,134]}]},\"http.response.body.size\":{brief:\"The encoded body size of the response (in bytes).\",type:\"integer\",applyScrubbing:{key:\"manual\"},isInOtel:!0,visibility:\"public\",example:123,aliases:[\"http.response_content_length\",\"http.response.header.content-length\"],changelog:[{version:\"0.4.0\",prs:[228]},{version:\"0.1.0\",prs:[106]},{version:\"0.0.0\"}]},\"http.response_content_length\":{brief:\"The encoded body size of the response (in bytes).\",type:\"integer\",applyScrubbing:{key:\"manual\"},isInOtel:!0,visibility:\"public\",example:123,deprecation:{replacement:\"http.response.body.size\"},aliases:[\"http.response.body.size\",\"http.response.header.content-length\"],changelog:[{version:\"0.4.0\",prs:[228]},{version:\"0.1.0\",prs:[61,106]},{version:\"0.0.0\"}]},\"http.response.header.content-length\":{brief:\"The size of the message body sent to the recipient (in bytes)\",type:\"string\",applyScrubbing:{key:\"manual\"},isInOtel:!0,visibility:\"public\",example:\"http.response.header.custom-header=['foo', 'bar']\",aliases:[\"http.response_content_length\",\"http.response.body.size\"],changelog:[{version:\"0.1.0\",prs:[127]},{version:\"0.0.0\"}]},\"http.response.header.<key>\":{brief:\"HTTP response headers, <key> being the normalized HTTP Header name (lowercase), the value being the header values.\",type:\"string[]\",applyScrubbing:{key:\"auto\"},isInOtel:!0,visibility:\"public\",hasDynamicSuffix:!0,example:\"http.response.header.custom-header=['foo', 'bar']\",changelog:[{version:\"0.4.0\",prs:[201,204]},{version:\"0.1.0\",prs:[103]}]},\"http.response.size\":{brief:\"The transfer size of the response (in bytes).\",type:\"integer\",applyScrubbing:{key:\"manual\"},isInOtel:!0,visibility:\"public\",example:456,aliases:[\"http.response_transfer_size\"],changelog:[{version:\"0.4.0\",prs:[228]},{version:\"0.0.0\"}]},\"http.response.status_code\":{brief:\"The status code of the HTTP response.\",type:\"integer\",applyScrubbing:{key:\"manual\"},isInOtel:!0,visibility:\"public\",example:404,aliases:[\"http.status_code\"],changelog:[{version:\"0.4.0\",prs:[228]},{version:\"0.0.0\"}]},\"http.response_transfer_size\":{brief:\"The transfer size of the response (in bytes).\",type:\"integer\",applyScrubbing:{key:\"manual\"},isInOtel:!1,visibility:\"public\",example:456,deprecation:{replacement:\"http.response.size\"},aliases:[\"http.response.size\"],changelog:[{version:\"0.4.0\",prs:[228]},{version:\"0.1.0\",prs:[61]},{version:\"0.0.0\"}]},\"http.route\":{brief:\"The matched route, that is, the path template in the format used by the respective server framework.\",type:\"string\",applyScrubbing:{key:\"manual\"},isInOtel:!0,visibility:\"public\",example:\"/users/:id\",aliases:[\"url.template\"],changelog:[{version:\"0.1.0\",prs:[127]},{version:\"0.0.0\"}]},\"http.scheme\":{brief:\"The URI scheme component identifying the used protocol.\",type:\"string\",applyScrubbing:{key:\"manual\"},isInOtel:!0,visibility:\"public\",example:\"https\",deprecation:{replacement:\"url.scheme\"},aliases:[\"url.scheme\"],changelog:[{version:\"0.1.0\",prs:[61,127]},{version:\"0.0.0\"}]},\"http.server_name\":{brief:\"The server domain name\",type:\"string\",applyScrubbing:{key:\"manual\"},isInOtel:!0,visibility:\"public\",example:\"example.com\",deprecation:{replacement:\"server.address\"},aliases:[\"server.address\",\"net.host.name\",\"http.host\",\"server_name\"],changelog:[{version:\"0.1.0\",prs:[61,108,127]},{version:\"0.0.0\"}]},\"http.server.request.time_in_queue\":{brief:\"The time in milliseconds the request spent in the server queue before processing began. Measured from the X-Request-Start header set by reverse proxies (e.g., Nginx, HAProxy, Heroku) to when the application started handling the request.\",type:\"double\",applyScrubbing:{key:\"manual\"},isInOtel:!1,visibility:\"public\",example:50,changelog:[{version:\"0.5.0\",prs:[267]}]},\"http.status_code\":{brief:\"The status code of the HTTP response.\",type:\"integer\",applyScrubbing:{key:\"manual\"},isInOtel:!0,visibility:\"public\",example:404,deprecation:{replacement:\"http.response.status_code\"},aliases:[\"http.response.status_code\"],changelog:[{version:\"0.4.0\",prs:[228]},{version:\"0.1.0\",prs:[61]},{version:\"0.0.0\"}]},\"http.target\":{brief:\"The pathname and query string of the URL.\",type:\"string\",applyScrubbing:{key:\"auto\"},isInOtel:!0,visibility:\"public\",example:\"/test?foo=bar#buzz\",deprecation:{replacement:\"url.path\",reason:\"This attribute is being deprecated in favor of url.path and url.query\"},changelog:[{version:\"0.1.0\",prs:[61]},{version:\"0.0.0\"}]},\"http.url\":{brief:\"The URL of the resource that was fetched.\",type:\"string\",applyScrubbing:{key:\"auto\"},isInOtel:!0,visibility:\"public\",example:\"https://example.com/test?foo=bar#buzz\",deprecation:{replacement:\"url.full\"},aliases:[\"url.full\",\"url\"],changelog:[{version:\"0.1.0\",prs:[61,108]},{version:\"0.0.0\"}]},\"http.user_agent\":{brief:\"Value of the HTTP User-Agent header sent by the client.\",type:\"string\",applyScrubbing:{key:\"manual\"},isInOtel:!0,visibility:\"public\",example:\"Mozilla/5.0 (iPhone; CPU iPhone OS 14_7_1 like Mac OS X) AppleWebKit/605.1.15 (KHTML, like Gecko) Version/14.1.2 Mobile/15E148 Safari/604.1\",deprecation:{replacement:\"user_agent.original\"},aliases:[\"user_agent.original\"],changelog:[{version:\"0.1.0\",prs:[61,127]},{version:\"0.0.0\"}]},id:{brief:\"A unique identifier for the span.\",type:\"string\",applyScrubbing:{key:\"never\"},isInOtel:!1,visibility:\"public\",example:\"f47ac10b58cc4372a5670e02b2c3d479\",changelog:[{version:\"0.0.0\"}]},inp:{brief:\"The value of the recorded Interaction to Next Paint (INP) web vital\",type:\"double\",applyScrubbing:{key:\"manual\"},isInOtel:!1,visibility:\"public\",example:200,deprecation:{replacement:\"browser.web_vital.inp.value\",reason:\"The INP web vital is now recorded as a browser.web_vital.inp.value attribute.\"},aliases:[\"browser.web_vital.inp.value\"],changelog:[{version:\"0.5.0\",prs:[229],description:\"Added and deprecated attribute to document JS SDK's current behaviour\"}]},\"jsonrpc.protocol.version\":{brief:\"The version of the JSON-RPC protocol used.\",type:\"string\",applyScrubbing:{key:\"manual\"},isInOtel:!0,visibility:\"public\",example:\"2.0\",changelog:[{version:\"0.12.0\",prs:[420],description:\"Added jsonrpc.protocol.version attribute\"}]},\"jsonrpc.request.id\":{brief:\"The JSON-RPC request identifier. Unique within the session.\",type:\"string\",applyScrubbing:{key:\"manual\"},isInOtel:!0,visibility:\"public\",example:\"1\",aliases:[\"mcp.request.id\"],changelog:[{version:\"0.12.0\",prs:[420],description:\"Added jsonrpc.request.id attribute\"}]},\"jvm.gc.action\":{brief:\"Name of the garbage collector action.\",type:\"string\",applyScrubbing:{key:\"manual\"},isInOtel:!0,visibility:\"public\",example:\"end of minor GC\",changelog:[{version:\"0.1.0\",prs:[127]},{version:\"0.0.0\"}]},\"jvm.gc.name\":{brief:\"Name of the garbage collector.\",type:\"string\",applyScrubbing:{key:\"manual\"},isInOtel:!0,visibility:\"public\",example:\"G1 Young Generation\",changelog:[{version:\"0.1.0\",prs:[127]},{version:\"0.0.0\"}]},\"jvm.memory.pool.name\":{brief:\"Name of the memory pool.\",type:\"string\",applyScrubbing:{key:\"manual\"},isInOtel:!0,visibility:\"public\",example:\"G1 Old Gen\",changelog:[{version:\"0.1.0\",prs:[127]},{version:\"0.0.0\"}]},\"jvm.memory.type\":{brief:\"Name of the memory pool.\",type:\"string\",applyScrubbing:{key:\"manual\"},isInOtel:!0,visibility:\"public\",example:\"G1 Old Gen\",changelog:[{version:\"0.1.0\",prs:[127]},{version:\"0.0.0\"}]},\"jvm.thread.daemon\":{brief:\"Whether the thread is daemon or not.\",type:\"boolean\",applyScrubbing:{key:\"manual\"},isInOtel:!0,visibility:\"public\",example:!0,changelog:[{version:\"0.0.0\"}]},\"jvm.thread.state\":{brief:\"State of the thread.\",type:\"string\",applyScrubbing:{key:\"manual\"},isInOtel:!0,visibility:\"public\",example:\"blocked\",changelog:[{version:\"0.1.0\",prs:[127]},{version:\"0.0.0\"}]},\"koa.name\":{brief:\"The name of the Koa middleware or matched route that handled the request.\",type:\"string\",applyScrubbing:{key:\"manual\"},isInOtel:!1,visibility:\"public\",example:\"/users/:id\",deprecation:{reason:\"No single replacement. SDKs should use http.route for router layers and code.function.name for middleware layers instead.\"},changelog:[{version:\"0.16.0\",prs:[490],description:\"Added koa.name attribute as deprecated\"}]},\"koa.type\":{brief:\"The type of the Koa layer that handled the request.\",type:\"string\",applyScrubbing:{key:\"manual\"},isInOtel:!1,visibility:\"public\",example:\"router\",changelog:[{version:\"0.16.0\",prs:[471],description:\"Added koa.type attribute\"}]},lcp:{brief:\"The value of the recorded Largest Contentful Paint (LCP) web vital\",type:\"double\",applyScrubbing:{key:\"manual\"},isInOtel:!1,visibility:\"public\",example:2500,deprecation:{replacement:\"browser.web_vital.lcp.value\",reason:\"The LCP web vital is now recorded as a browser.web_vital.lcp.value attribute.\"},aliases:[\"browser.web_vital.lcp.value\"],changelog:[{version:\"0.5.0\",prs:[229],description:\"Added and deprecated attribute to document JS SDK's current behaviour\"}]},\"lcp.element\":{brief:\"The dom element responsible for the largest contentful paint.\",type:\"string\",applyScrubbing:{key:\"manual\"},isInOtel:!1,visibility:\"public\",example:\"img\",deprecation:{replacement:\"browser.web_vital.lcp.element\",reason:\"The LCP element is now recorded as a browser.web_vital.lcp.element attribute.\"},aliases:[\"browser.web_vital.lcp.element\"],changelog:[{version:\"0.5.0\",prs:[233]},{version:\"0.1.0\",prs:[127]},{version:\"0.0.0\"}]},\"lcp.id\":{brief:\"The id of the dom element responsible for the largest contentful paint.\",type:\"string\",applyScrubbing:{key:\"manual\"},isInOtel:!1,visibility:\"public\",example:\"#hero\",deprecation:{replacement:\"browser.web_vital.lcp.id\",reason:\"The LCP id is now recorded as a browser.web_vital.lcp.id attribute.\"},aliases:[\"browser.web_vital.lcp.id\"],changelog:[{version:\"0.5.0\",prs:[233]},{version:\"0.1.0\",prs:[127]},{version:\"0.0.0\"}]},\"lcp.loadTime\":{brief:\"The time it took for the LCP element to be loaded\",type:\"integer\",applyScrubbing:{key:\"manual\"},isInOtel:!1,visibility:\"public\",example:1402,deprecation:{replacement:\"browser.web_vital.lcp.load_time\",reason:\"The LCP load time is now recorded as a browser.web_vital.lcp.load_time attribute.\"},aliases:[\"browser.web_vital.lcp.load_time\"],changelog:[{version:\"0.5.0\",prs:[233]}]},\"lcp.renderTime\":{brief:\"The time it took for the LCP element to be rendered\",type:\"integer\",applyScrubbing:{key:\"manual\"},isInOtel:!1,visibility:\"public\",example:1685,deprecation:{replacement:\"browser.web_vital.lcp.render_time\",reason:\"The LCP render time is now recorded as a browser.web_vital.lcp.render_time attribute.\"},aliases:[\"browser.web_vital.lcp.render_time\"],changelog:[{version:\"0.5.0\",prs:[233]}]},\"lcp.size\":{brief:\"The size of the largest contentful paint element.\",type:\"integer\",applyScrubbing:{key:\"manual\"},isInOtel:!1,visibility:\"public\",example:1234,deprecation:{replacement:\"browser.web_vital.lcp.size\",reason:\"The LCP size is now recorded as a browser.web_vital.lcp.size attribute.\"},aliases:[\"browser.web_vital.lcp.size\"],changelog:[{version:\"0.5.0\",prs:[233]},{version:\"0.4.0\",prs:[228]},{version:\"0.0.0\"}]},\"lcp.url\":{brief:\"The url of the dom element responsible for the largest contentful paint.\",type:\"string\",applyScrubbing:{key:\"auto\"},isInOtel:!1,visibility:\"public\",example:\"https://example.com\",deprecation:{replacement:\"browser.web_vital.lcp.url\",reason:\"The LCP url is now recorded as a browser.web_vital.lcp.url attribute.\"},aliases:[\"browser.web_vital.lcp.url\"],changelog:[{version:\"0.5.0\",prs:[233]},{version:\"0.1.0\",prs:[127]},{version:\"0.0.0\"}]},\"logger.name\":{brief:\"The name of the logger that generated this event.\",type:\"string\",applyScrubbing:{key:\"manual\"},isInOtel:!1,visibility:\"public\",example:\"myLogger\",changelog:[{version:\"0.1.0\",prs:[127]},{version:\"0.0.0\"}]},\"mcp.cancelled.reason\":{brief:\"Reason for the cancellation of an MCP operation.\",type:\"string\",applyScrubbing:{key:\"manual\",reason:\"Cancellation reasons may contain user-specific or sensitive information\"},isInOtel:!1,visibility:\"public\",example:\"User cancelled the request\",changelog:[{version:\"0.3.0\",prs:[171]}]},\"mcp.cancelled.request_id\":{brief:\"Request ID of the cancelled MCP operation.\",type:\"string\",applyScrubbing:{key:\"manual\"},isInOtel:!1,visibility:\"public\",example:\"123\",changelog:[{version:\"0.3.0\",prs:[171]}]},\"mcp.client.name\":{brief:\"Name of the MCP client application.\",type:\"string\",applyScrubbing:{key:\"manual\"},isInOtel:!1,visibility:\"public\",example:\"claude-desktop\",changelog:[{version:\"0.3.0\",prs:[171]}]},\"mcp.client.title\":{brief:\"Display title of the MCP client application.\",type:\"string\",applyScrubbing:{key:\"manual\",reason:\"Client titles may reveal user-specific application configurations or custom setups\"},isInOtel:!1,visibility:\"public\",example:\"Claude Desktop\",changelog:[{version:\"0.3.0\",prs:[171]}]},\"mcp.client.version\":{brief:\"Version of the MCP client application.\",type:\"string\",applyScrubbing:{key:\"manual\"},isInOtel:!1,visibility:\"public\",example:\"1.0.0\",changelog:[{version:\"0.3.0\",prs:[171]}]},\"mcp.lifecycle.phase\":{brief:\"Lifecycle phase indicator for MCP operations.\",type:\"string\",applyScrubbing:{key:\"manual\"},isInOtel:!1,visibility:\"public\",example:\"initialization_complete\",changelog:[{version:\"0.3.0\",prs:[171]}]},\"mcp.logging.data_type\":{brief:\"Data type of the logged message content.\",type:\"string\",applyScrubbing:{key:\"manual\"},isInOtel:!1,visibility:\"public\",example:\"string\",changelog:[{version:\"0.3.0\",prs:[171]}]},\"mcp.logging.level\":{brief:\"Log level for MCP logging operations.\",type:\"string\",applyScrubbing:{key:\"manual\"},isInOtel:!1,visibility:\"public\",example:\"info\",changelog:[{version:\"0.3.0\",prs:[171]}]},\"mcp.logging.logger\":{brief:\"Logger name for MCP logging operations.\",type:\"string\",applyScrubbing:{key:\"manual\",reason:\"Logger names may be user-defined and could contain sensitive information\"},isInOtel:!1,visibility:\"public\",example:\"mcp_server\",changelog:[{version:\"0.3.0\",prs:[171]}]},\"mcp.logging.message\":{brief:\"Log message content from MCP logging operations.\",type:\"string\",applyScrubbing:{key:\"auto\",reason:\"Log messages can contain user data\"},isInOtel:!1,visibility:\"public\",example:\"Tool execution completed successfully\",changelog:[{version:\"0.3.0\",prs:[171]}]},\"mcp.method.name\":{brief:\"The name of the MCP request or notification method being called.\",type:\"string\",applyScrubbing:{key:\"manual\"},isInOtel:!0,visibility:\"public\",example:\"tools/call\",changelog:[{version:\"0.12.0\",prs:[420],description:\"Set is_in_otel=true, attribute exists in OTel MCP registry\"},{version:\"0.3.0\",prs:[171]}]},\"mcp.progress.current\":{brief:\"Current progress value of an MCP operation.\",type:\"integer\",applyScrubbing:{key:\"manual\"},isInOtel:!1,visibility:\"public\",example:50,changelog:[{version:\"0.4.0\",prs:[228]},{version:\"0.3.0\",prs:[171]}]},\"mcp.progress.message\":{brief:\"Progress message describing the current state of an MCP operation.\",type:\"string\",applyScrubbing:{key:\"manual\",reason:\"Progress messages may contain user-specific or sensitive information\"},isInOtel:!1,visibility:\"public\",example:\"Processing 50 of 100 items\",changelog:[{version:\"0.3.0\",prs:[171]}]},\"mcp.progress.percentage\":{brief:\"Calculated progress percentage of an MCP operation. Computed from current/total * 100.\",type:\"double\",applyScrubbing:{key:\"manual\"},isInOtel:!1,visibility:\"public\",example:50,changelog:[{version:\"0.4.0\",prs:[228]},{version:\"0.3.0\",prs:[171]}]},\"mcp.progress.token\":{brief:\"Token for tracking progress of an MCP operation.\",type:\"string\",applyScrubbing:{key:\"manual\"},isInOtel:!1,visibility:\"public\",example:\"progress-token-123\",changelog:[{version:\"0.3.0\",prs:[171]}]},\"mcp.progress.total\":{brief:\"Total progress target value of an MCP operation.\",type:\"integer\",applyScrubbing:{key:\"manual\"},isInOtel:!1,visibility:\"public\",example:100,changelog:[{version:\"0.4.0\",prs:[228]},{version:\"0.3.0\",prs:[171]}]},\"mcp.prompt.name\":{brief:\"Name of the MCP prompt template being used.\",type:\"string\",applyScrubbing:{key:\"manual\",reason:\"Prompt names may reveal user behavior patterns or sensitive operations\"},isInOtel:!1,visibility:\"public\",example:\"summarize\",deprecation:{replacement:\"gen_ai.prompt.name\",reason:\"OTel uses gen_ai.prompt.name for MCP prompt names\"},aliases:[\"gen_ai.prompt.name\"],changelog:[{version:\"0.12.0\",prs:[420],description:\"Deprecated in favor of gen_ai.prompt.name\"},{version:\"0.3.0\",prs:[171]}]},\"mcp.prompt.result.description\":{brief:\"Description of the prompt result.\",type:\"string\",applyScrubbing:{key:\"auto\"},isInOtel:!1,visibility:\"public\",example:\"A summary of the requested information\",changelog:[{version:\"0.3.0\",prs:[171]}]},\"mcp.prompt.result.message_content\":{brief:\"Content of the message in the prompt result. Used for single message results only.\",type:\"string\",applyScrubbing:{key:\"auto\"},isInOtel:!1,visibility:\"public\",example:\"Please provide a summary of the document\",changelog:[{version:\"0.3.0\",prs:[171]}]},\"mcp.prompt.result.message_count\":{brief:\"Number of messages in the prompt result.\",type:\"integer\",applyScrubbing:{key:\"manual\"},isInOtel:!1,visibility:\"public\",example:3,changelog:[{version:\"0.4.0\",prs:[228]},{version:\"0.3.0\",prs:[171]}]},\"mcp.prompt.result.message_role\":{brief:\"Role of the message in the prompt result. Used for single message results only.\",type:\"string\",applyScrubbing:{key:\"manual\"},isInOtel:!1,visibility:\"public\",example:\"user\",changelog:[{version:\"0.3.0\",prs:[171]}]},\"mcp.protocol.ready\":{brief:\"Protocol readiness indicator for MCP session. Non-zero value indicates the protocol is ready.\",type:\"integer\",applyScrubbing:{key:\"manual\"},isInOtel:!1,visibility:\"public\",example:1,changelog:[{version:\"0.4.0\",prs:[228]},{version:\"0.3.0\",prs:[171]}]},\"mcp.protocol.version\":{brief:\"MCP protocol version used in the session.\",type:\"string\",applyScrubbing:{key:\"manual\"},isInOtel:!0,visibility:\"public\",example:\"2024-11-05\",changelog:[{version:\"0.12.0\",prs:[420],description:\"Set is_in_otel=true, attribute exists in OTel MCP registry\"},{version:\"0.3.0\",prs:[171]}]},\"mcp.request.argument.<key>\":{brief:\"MCP request argument with dynamic key suffix. The <key> is replaced with the actual argument name. The value is a JSON-stringified representation of the argument value.\",type:\"string\",applyScrubbing:{key:\"auto\",reason:\"Arguments contain user input\"},isInOtel:!1,visibility:\"public\",hasDynamicSuffix:!0,example:\"mcp.request.argument.query='weather in Paris'\",changelog:[{version:\"0.3.0\",prs:[176]}]},\"mcp.request.argument.name\":{brief:\"Name argument from prompts/get MCP request.\",type:\"string\",applyScrubbing:{key:\"auto\",reason:\"Prompt names can contain user input\"},isInOtel:!1,visibility:\"public\",example:\"summarize\",changelog:[{version:\"0.3.0\",prs:[171]}]},\"mcp.request.argument.uri\":{brief:\"URI argument from resources/read MCP request.\",type:\"string\",applyScrubbing:{key:\"auto\",reason:\"URIs can contain user file paths\"},isInOtel:!1,visibility:\"public\",example:\"file:///path/to/resource\",changelog:[{version:\"0.3.0\",prs:[171]}]},\"mcp.request.id\":{brief:\"JSON-RPC request identifier for the MCP request. Unique within the MCP session.\",type:\"string\",applyScrubbing:{key:\"manual\"},isInOtel:!1,visibility:\"public\",example:\"1\",deprecation:{replacement:\"jsonrpc.request.id\",reason:\"OTel models MCP as JSON-RPC, uses jsonrpc.request.id\"},aliases:[\"jsonrpc.request.id\"],changelog:[{version:\"0.12.0\",prs:[420],description:\"Deprecated in favor of jsonrpc.request.id\"},{version:\"0.3.0\",prs:[171]}]},\"mcp.resource.protocol\":{brief:\"Protocol of the resource URI being accessed, extracted from the URI.\",type:\"string\",applyScrubbing:{key:\"manual\"},isInOtel:!1,visibility:\"public\",example:\"file\",deprecation:{replacement:\"network.protocol.name\",reason:\"OTel uses the generic network.protocol.name attribute\"},aliases:[\"network.protocol.name\",\"net.protocol.name\"],changelog:[{version:\"0.12.0\",prs:[420],description:\"Deprecated in favor of network.protocol.name\"},{version:\"0.3.0\",prs:[171]}]},\"mcp.resource.uri\":{brief:\"The resource URI being accessed in an MCP operation.\",type:\"string\",applyScrubbing:{key:\"auto\",reason:\"URIs can contain sensitive file paths\"},isInOtel:!0,visibility:\"public\",example:\"file:///path/to/file.txt\",changelog:[{version:\"0.12.0\",prs:[420],description:\"Set is_in_otel=true, attribute exists in OTel MCP registry\"},{version:\"0.3.0\",prs:[171]}]},\"mcp.server.name\":{brief:\"Name of the MCP server application.\",type:\"string\",applyScrubbing:{key:\"manual\"},isInOtel:!1,visibility:\"public\",example:\"sentry-mcp-server\",changelog:[{version:\"0.3.0\",prs:[171]}]},\"mcp.server.title\":{brief:\"Display title of the MCP server application.\",type:\"string\",applyScrubbing:{key:\"manual\",reason:\"Server titles may reveal user-specific application configurations or custom setups\"},isInOtel:!1,visibility:\"public\",example:\"Sentry MCP Server\",changelog:[{version:\"0.3.0\",prs:[171]}]},\"mcp.server.version\":{brief:\"Version of the MCP server application.\",type:\"string\",applyScrubbing:{key:\"manual\"},isInOtel:!1,visibility:\"public\",example:\"0.1.0\",changelog:[{version:\"0.3.0\",prs:[171]}]},\"mcp.session.id\":{brief:\"Identifier for the MCP session.\",type:\"string\",applyScrubbing:{key:\"manual\"},isInOtel:!0,visibility:\"public\",example:\"550e8400-e29b-41d4-a716-446655440000\",changelog:[{version:\"0.12.0\",prs:[420],description:\"Set is_in_otel=true, attribute exists in OTel MCP registry\"},{version:\"0.3.0\",prs:[171]}]},\"mcp.tool.name\":{brief:\"Name of the MCP tool being called.\",type:\"string\",applyScrubbing:{key:\"manual\"},isInOtel:!1,visibility:\"public\",example:\"calculator\",deprecation:{replacement:\"gen_ai.tool.name\",reason:\"OTel uses gen_ai.tool.name for MCP tool names\"},aliases:[\"gen_ai.tool.name\",\"ai.function_call\"],changelog:[{version:\"0.12.0\",prs:[420],description:\"Deprecated in favor of gen_ai.tool.name\"},{version:\"0.3.0\",prs:[171]}]},\"mcp.tool.result.content\":{brief:\"The content of the tool result.\",type:\"string\",applyScrubbing:{key:\"auto\",reason:\"Tool results can contain user data\"},isInOtel:!1,visibility:\"public\",example:'{\"output\": \"rainy\", \"toolCallId\": \"1\"}',deprecation:{replacement:\"gen_ai.tool.call.result\",reason:\"OTel uses gen_ai.tool.call.result for MCP tool results\"},aliases:[\"gen_ai.tool.call.result\",\"gen_ai.tool.message\",\"gen_ai.tool.output\"],changelog:[{version:\"0.12.0\",prs:[420],description:\"Deprecated in favor of gen_ai.tool.call.result\"},{version:\"0.3.0\",prs:[171]},{version:\"0.2.0\",prs:[164]}]},\"mcp.tool.result.content_count\":{brief:\"Number of content items in the tool result.\",type:\"integer\",applyScrubbing:{key:\"manual\"},isInOtel:!1,visibility:\"public\",example:1,changelog:[{version:\"0.4.0\",prs:[228]},{version:\"0.3.0\",prs:[171]}]},\"mcp.tool.result.is_error\":{brief:\"Whether a tool execution resulted in an error.\",type:\"boolean\",applyScrubbing:{key:\"manual\"},isInOtel:!1,visibility:\"public\",example:!1,deprecation:{replacement:\"error.type\",reason:\"OTel uses error.type set to 'tool_error' when isError is true. Cannot be automatically backfilled due to type mismatch (boolean vs string).\"},changelog:[{version:\"0.12.0\",prs:[420],description:\"Deprecated in favor of error.type\"},{version:\"0.3.0\",prs:[171]}]},\"mcp.transport\":{brief:\"Transport method used for MCP communication.\",type:\"string\",applyScrubbing:{key:\"manual\"},isInOtel:!1,visibility:\"public\",example:\"stdio\",deprecation:{replacement:\"network.transport\",reason:\"OTel uses the generic network.transport attribute\"},aliases:[\"network.transport\",\"net.transport\"],changelog:[{version:\"0.12.0\",prs:[420],description:\"Deprecated in favor of network.transport\"},{version:\"0.3.0\",prs:[171]}]},\"mdc.<key>\":{brief:\"Attributes from the Mapped Diagnostic Context (MDC) present at the moment the log record was created. The MDC is supported by all the most popular logging solutions in the Java ecosystem, and it's usually implemented as a thread-local map that stores context for e.g. a specific request.\",type:\"string\",applyScrubbing:{key:\"auto\"},isInOtel:!1,visibility:\"public\",hasDynamicSuffix:!0,example:\"mdc.some_key='some_value'\",changelog:[{version:\"0.3.0\",prs:[176]}]},\"messaging.batch.message_count\":{brief:\"The number of messages sent, received, or processed in the scope of the batching operation.\",type:\"integer\",applyScrubbing:{key:\"manual\"},isInOtel:!0,visibility:\"public\",example:10,changelog:[{version:\"0.6.0\",prs:[341],description:\"Added messaging.batch.message_count attribute\"}]},\"messaging.destination\":{brief:\"The message destination name.\",type:\"string\",applyScrubbing:{key:\"manual\"},isInOtel:!1,visibility:\"public\",example:\"BestTopic\",deprecation:{replacement:\"messaging.destination.name\",reason:\"This attribute is being deprecated in favor of messaging.destination.name, which is the OTel-aligned replacement.\"},aliases:[\"messaging.destination.name\"],changelog:[{version:\"0.16.0\",prs:[482],description:\"Added messaging.destination attribute, deprecated in favor of messaging.destination.name\"}]},\"messaging.destination.connection\":{brief:\"The message destination connection.\",type:\"string\",applyScrubbing:{key:\"manual\"},isInOtel:!1,visibility:\"public\",example:\"BestTopic\",changelog:[{version:\"0.1.0\",prs:[127]},{version:\"0.0.0\"}]},\"messaging.destination.name\":{brief:\"The message destination name.\",type:\"string\",applyScrubbing:{key:\"manual\"},isInOtel:!0,visibility:\"public\",example:\"BestTopic\",aliases:[\"messaging.destination\"],changelog:[{version:\"0.16.0\",prs:[482],description:\"Added messaging.destination as an alias\"},{version:\"0.1.0\",prs:[127]},{version:\"0.0.0\"}]},\"messaging.message.body.size\":{brief:\"The size of the message body in bytes.\",type:\"integer\",applyScrubbing:{key:\"manual\"},isInOtel:!0,visibility:\"public\",example:839,changelog:[{version:\"0.4.0\",prs:[228]},{version:\"0.0.0\"}]},\"messaging.message.conversation_id\":{brief:'The conversation ID identifying the conversation to which the message belongs, represented as a string. Sometimes called \"Correlation ID\".',type:\"string\",applyScrubbing:{key:\"manual\"},isInOtel:!0,visibility:\"public\",example:\"MyConversationId\",changelog:[{version:\"0.16.0\",prs:[468],description:\"Added messaging.message.conversation_id attribute\"}]},\"messaging.message.envelope.size\":{brief:\"The size of the message body and metadata in bytes.\",type:\"integer\",applyScrubbing:{key:\"manual\"},isInOtel:!0,visibility:\"public\",example:1045,changelog:[{version:\"0.4.0\",prs:[228]},{version:\"0.0.0\"}]},\"messaging.message.id\":{brief:\"A value used by the messaging system as an identifier for the message, represented as a string.\",type:\"string\",applyScrubbing:{key:\"manual\"},isInOtel:!0,visibility:\"public\",example:\"f47ac10b58cc4372a5670e02b2c3d479\",changelog:[{version:\"0.1.0\",prs:[127]},{version:\"0.0.0\"}]},\"messaging.message.receive.latency\":{brief:\"The latency between when the message was published and received.\",type:\"integer\",applyScrubbing:{key:\"manual\"},isInOtel:!1,visibility:\"public\",example:1732847252,changelog:[{version:\"0.4.0\",prs:[228]},{version:\"0.0.0\"}]},\"messaging.message.retry.count\":{brief:\"The amount of attempts to send the message.\",type:\"integer\",applyScrubbing:{key:\"manual\"},isInOtel:!1,visibility:\"public\",example:2,changelog:[{version:\"0.4.0\",prs:[228]},{version:\"0.0.0\"}]},\"messaging.operation.name\":{brief:\"The name of the messaging operation being performed\",type:\"string\",applyScrubbing:{key:\"manual\"},isInOtel:!0,visibility:\"public\",example:\"send\",changelog:[{version:\"0.11.0\",prs:[392],description:\"Added messaging.operation.name attribute\"}]},\"messaging.operation.type\":{brief:\"A string identifying the type of the messaging operation\",type:\"string\",applyScrubbing:{key:\"manual\"},isInOtel:!0,visibility:\"public\",example:\"create\",changelog:[{version:\"0.1.0\",prs:[51,127]}]},\"messaging.rabbitmq.destination.routing_key\":{brief:\"RabbitMQ message routing key.\",type:\"string\",applyScrubbing:{key:\"manual\"},isInOtel:!0,visibility:\"public\",example:\"myKey\",changelog:[{version:\"0.16.0\",prs:[468],description:\"Added messaging.rabbitmq.destination.routing_key attribute\"}]},\"messaging.system\":{brief:\"The messaging system as identified by the client instrumentation.\",type:\"string\",applyScrubbing:{key:\"manual\"},isInOtel:!0,visibility:\"public\",example:\"activemq\",changelog:[{version:\"0.1.0\",prs:[127]},{version:\"0.0.0\"}]},method:{brief:\"The HTTP method used.\",type:\"string\",applyScrubbing:{key:\"manual\"},isInOtel:!1,visibility:\"public\",example:\"GET\",deprecation:{replacement:\"http.request.method\"},aliases:[\"http.request.method\",\"http.request_method\",\"http.method\"],changelog:[{version:\"0.1.0\",prs:[61,127]},{version:\"0.0.0\"}]},\"middleware.name\":{brief:\"The name of the middleware.\",type:\"string\",applyScrubbing:{key:\"manual\"},isInOtel:!1,visibility:\"public\",example:\"AuthenticationMiddleware\",changelog:[{version:\"0.6.0\",prs:[336],description:\"Added middleware.name attribute\"}]},\"navigation.origin\":{brief:\"The origin of the navigation (usually client side router navigations). Should preferrably parameterized template (like url.template) or a URL path otherwise.\",type:\"string\",applyScrubbing:{key:\"auto\"},isInOtel:!1,visibility:\"public\",example:\"/users/:id\",aliases:[\"sentry.sveltekit.navigation.from\"],changelog:[{version:\"0.16.0\",prs:[467],description:\"Added navigation.origin attribute\"}]},\"navigation.route.id\":{brief:\"The identifier of the matched client-side route, as assigned by the routing framework (e.g., vue-router name, react-router id).\",type:\"string\",applyScrubbing:{key:\"auto\"},isInOtel:!1,visibility:\"public\",example:\"AboutView\",changelog:[{version:\"0.16.0\",prs:[468],description:\"Added navigation.route.id attribute\"}]},\"navigation.type\":{brief:\"The type of navigation done by a client-side router.\",type:\"string\",applyScrubbing:{key:\"manual\"},isInOtel:!1,visibility:\"public\",example:\"router.push\",aliases:[\"sentry.sveltekit.navigation.type\"],changelog:[{version:\"0.16.0\",prs:[467],description:\"Added new deprecated alias\"},{version:\"0.1.0\",prs:[127]},{version:\"0.0.0\"}]},\"nel.elapsed_time\":{brief:\"The elapsed number of milliseconds between the start of the resource fetch and when it was completed or aborted by the user agent.\",type:\"integer\",applyScrubbing:{key:\"manual\"},isInOtel:!1,visibility:\"public\",example:100,changelog:[{version:\"0.4.0\",prs:[228]},{version:\"0.1.0\",prs:[68]}]},\"nel.phase\":{brief:'If request failed, the phase of its network error. If request succeeded, \"application\".',type:\"string\",applyScrubbing:{key:\"manual\"},isInOtel:!1,visibility:\"public\",example:\"application\",changelog:[{version:\"0.1.0\",prs:[68,127]}]},\"nel.referrer\":{brief:\"request's referrer, as determined by the referrer policy associated with its client.\",type:\"string\",applyScrubbing:{key:\"auto\"},isInOtel:!1,visibility:\"public\",example:\"https://example.com/foo?bar=baz\",changelog:[{version:\"0.1.0\",prs:[68,127]}]},\"nel.sampling_function\":{brief:\"The sampling function used to determine if the request should be sampled.\",type:\"double\",applyScrubbing:{key:\"manual\"},isInOtel:!1,visibility:\"public\",example:.5,changelog:[{version:\"0.4.0\",prs:[228]},{version:\"0.1.0\",prs:[68]}]},\"nel.type\":{brief:'If request failed, the type of its network error. If request succeeded, \"ok\".',type:\"string\",applyScrubbing:{key:\"manual\"},isInOtel:!1,visibility:\"public\",example:\"dns.unreachable\",changelog:[{version:\"0.1.0\",prs:[68,127]}]},\"network.connection.effective_type\":{brief:\"Specifies the effective type of the current connection (e.g. slow-2g, 2g, 3g, 4g).\",type:\"string\",applyScrubbing:{key:\"manual\"},isInOtel:!1,visibility:\"public\",example:\"4g\",aliases:[\"effectiveConnectionType\"],changelog:[{version:\"0.5.0\",prs:[279],description:\"Added attribute network.connection.effective_type to be used instead of effectiveConnectionType\"}]},\"network.connection.rtt\":{brief:\"Specifies the estimated effective round-trip time of the current connection, in milliseconds.\",type:\"integer\",applyScrubbing:{key:\"manual\"},isInOtel:!1,visibility:\"public\",example:100,aliases:[\"connection.rtt\"],changelog:[{version:\"0.5.0\",prs:[279],description:\"Added attribute network.connection.rtt to be used instead of connection.rtt\"}]},\"network.connection.type\":{brief:\"Specifies the type of the current connection (e.g. wifi, ethernet, cellular , etc).\",type:\"string\",applyScrubbing:{key:\"manual\"},isInOtel:!0,visibility:\"public\",example:\"wifi\",aliases:[\"device.connection_type\",\"connectionType\"],changelog:[{version:\"0.5.0\",prs:[279],description:\"Added attribute network.connection.type to be used instead of connectionType\"}]},\"network.local.address\":{brief:\"Local address of the network connection - IP address or Unix domain socket name.\",type:\"string\",applyScrubbing:{key:\"manual\"},isInOtel:!0,visibility:\"public\",example:\"10.1.2.80\",aliases:[\"net.host.ip\",\"net.sock.host.addr\"],changelog:[{version:\"0.1.0\",prs:[127]},{version:\"0.0.0\"}]},\"network.local.port\":{brief:\"Local port number of the network connection.\",type:\"integer\",applyScrubbing:{key:\"manual\"},isInOtel:!0,visibility:\"public\",example:65400,aliases:[\"net.sock.host.port\"],changelog:[{version:\"0.4.0\",prs:[228]},{version:\"0.0.0\"}]},\"network.peer.address\":{brief:\"Peer address of the network connection - IP address or Unix domain socket name.\",type:\"string\",applyScrubbing:{key:\"auto\"},isInOtel:!0,visibility:\"public\",example:\"10.1.2.80\",aliases:[\"net.peer.ip\",\"net.sock.peer.addr\"],changelog:[{version:\"0.1.0\",prs:[108,127]},{version:\"0.0.0\"}]},\"network.peer.port\":{brief:\"Peer port number of the network connection.\",type:\"integer\",applyScrubbing:{key:\"manual\"},isInOtel:!0,visibility:\"public\",example:65400,changelog:[{version:\"0.4.0\",prs:[228]},{version:\"0.0.0\"}]},\"network.protocol.name\":{brief:\"OSI application layer or non-OSI equivalent.\",type:\"string\",applyScrubbing:{key:\"manual\"},isInOtel:!0,visibility:\"public\",example:\"http\",aliases:[\"net.protocol.name\",\"mcp.resource.protocol\"],changelog:[{version:\"0.1.0\",prs:[127]},{version:\"0.0.0\"}]},\"network.protocol.version\":{brief:\"The actual version of the protocol used for network communication.\",type:\"string\",applyScrubbing:{key:\"manual\"},isInOtel:!0,visibility:\"public\",example:\"1.1\",aliases:[\"http.flavor\",\"net.protocol.version\"],changelog:[{version:\"0.1.0\",prs:[127]},{version:\"0.0.0\"}]},\"network.transport\":{brief:\"OSI transport layer or inter-process communication method.\",type:\"string\",applyScrubbing:{key:\"manual\"},isInOtel:!0,visibility:\"public\",example:\"tcp\",aliases:[\"net.transport\",\"mcp.transport\"],changelog:[{version:\"0.1.0\",prs:[127]},{version:\"0.0.0\"}]},\"network.type\":{brief:\"OSI network layer or non-OSI equivalent.\",type:\"string\",applyScrubbing:{key:\"manual\"},isInOtel:!0,visibility:\"public\",example:\"ipv4\",changelog:[{version:\"0.1.0\",prs:[127]},{version:\"0.0.0\"}]},\"net.host.ip\":{brief:\"Local address of the network connection - IP address or Unix domain socket name.\",type:\"string\",applyScrubbing:{key:\"manual\"},isInOtel:!0,visibility:\"public\",example:\"192.168.0.1\",deprecation:{replacement:\"network.local.address\"},aliases:[\"network.local.address\",\"net.sock.host.addr\"],changelog:[{version:\"0.1.0\",prs:[61,108,127]},{version:\"0.0.0\"}]},\"net.host.name\":{brief:\"Server domain name if available without reverse DNS lookup; otherwise, IP address or Unix domain socket name.\",type:\"string\",applyScrubbing:{key:\"manual\"},isInOtel:!0,visibility:\"public\",example:\"example.com\",deprecation:{replacement:\"server.address\"},aliases:[\"server.address\",\"http.server_name\",\"http.host\",\"server_name\"],changelog:[{version:\"0.1.0\",prs:[61,108,127]},{version:\"0.0.0\"}]},\"net.host.port\":{brief:\"Server port number.\",type:\"integer\",applyScrubbing:{key:\"manual\"},isInOtel:!0,visibility:\"public\",example:1337,deprecation:{replacement:\"server.port\"},aliases:[\"server.port\"],changelog:[{version:\"0.4.0\",prs:[228]},{version:\"0.1.0\",prs:[61]},{version:\"0.0.0\"}]},\"net.peer.ip\":{brief:\"Peer address of the network connection - IP address or Unix domain socket name.\",type:\"string\",applyScrubbing:{key:\"auto\"},isInOtel:!0,visibility:\"public\",example:\"192.168.0.1\",deprecation:{replacement:\"network.peer.address\"},aliases:[\"network.peer.address\",\"net.sock.peer.addr\"],changelog:[{version:\"0.1.0\",prs:[61,108,127]},{version:\"0.0.0\"}]},\"net.peer.name\":{brief:\"Server domain name if available without reverse DNS lookup; otherwise, IP address or Unix domain socket name.\",type:\"string\",applyScrubbing:{key:\"auto\"},isInOtel:!0,visibility:\"public\",example:\"example.com\",deprecation:{replacement:\"server.address\",reason:\"Deprecated, use server.address on client spans and client.address on server spans.\"},changelog:[{version:\"0.1.0\",prs:[61,127]},{version:\"0.0.0\"}]},\"net.peer.port\":{brief:\"Peer port number.\",type:\"integer\",applyScrubbing:{key:\"manual\"},isInOtel:!0,visibility:\"public\",example:1337,deprecation:{replacement:\"server.port\",reason:\"Deprecated, use server.port on client spans and client.port on server spans.\"},changelog:[{version:\"0.4.0\",prs:[228]},{version:\"0.1.0\",prs:[61]},{version:\"0.0.0\"}]},\"net.protocol.name\":{brief:\"OSI application layer or non-OSI equivalent.\",type:\"string\",applyScrubbing:{key:\"manual\"},isInOtel:!0,visibility:\"public\",example:\"http\",deprecation:{replacement:\"network.protocol.name\"},aliases:[\"network.protocol.name\",\"mcp.resource.protocol\"],changelog:[{version:\"0.1.0\",prs:[61,127]},{version:\"0.0.0\"}]},\"net.protocol.version\":{brief:\"The actual version of the protocol used for network communication.\",type:\"string\",applyScrubbing:{key:\"manual\"},isInOtel:!0,visibility:\"public\",example:\"1.1\",deprecation:{replacement:\"network.protocol.version\"},aliases:[\"network.protocol.version\",\"http.flavor\"],changelog:[{version:\"0.1.0\",prs:[61,108,127]},{version:\"0.0.0\"}]},\"net.sock.family\":{brief:\"OSI transport and network layer\",type:\"string\",applyScrubbing:{key:\"manual\"},isInOtel:!0,visibility:\"public\",example:\"inet\",deprecation:{replacement:\"network.transport\",reason:\"Deprecated, use network.transport and network.type.\"},changelog:[{version:\"0.1.0\",prs:[61,127]},{version:\"0.0.0\"}]},\"net.sock.host.addr\":{brief:\"Local address of the network connection mapping to Unix domain socket name.\",type:\"string\",applyScrubbing:{key:\"manual\"},isInOtel:!0,visibility:\"public\",example:\"/var/my.sock\",deprecation:{replacement:\"network.local.address\"},aliases:[\"network.local.address\",\"net.host.ip\"],changelog:[{version:\"0.1.0\",prs:[61,108,127]},{version:\"0.0.0\"}]},\"net.sock.host.port\":{brief:\"Local port number of the network connection.\",type:\"integer\",applyScrubbing:{key:\"manual\"},isInOtel:!0,visibility:\"public\",example:8080,deprecation:{replacement:\"network.local.port\"},aliases:[\"network.local.port\"],changelog:[{version:\"0.4.0\",prs:[228]},{version:\"0.1.0\",prs:[61]},{version:\"0.0.0\"}]},\"net.sock.peer.addr\":{brief:\"Peer address of the network connection - IP address\",type:\"string\",applyScrubbing:{key:\"auto\"},isInOtel:!0,visibility:\"public\",example:\"192.168.0.1\",deprecation:{replacement:\"network.peer.address\"},aliases:[\"network.peer.address\",\"net.peer.ip\"],changelog:[{version:\"0.1.0\",prs:[61,108,127]},{version:\"0.0.0\"}]},\"net.sock.peer.name\":{brief:\"Peer address of the network connection - Unix domain socket name\",type:\"string\",applyScrubbing:{key:\"auto\"},isInOtel:!0,visibility:\"public\",example:\"/var/my.sock\",deprecation:{reason:\"Deprecated from OTEL, no replacement at this time\"},changelog:[{version:\"0.1.0\",prs:[61,119,127]},{version:\"0.0.0\"}]},\"net.sock.peer.port\":{brief:\"Peer port number of the network connection.\",type:\"integer\",applyScrubbing:{key:\"manual\"},isInOtel:!0,visibility:\"public\",example:8080,deprecation:{replacement:\"network.peer.port\"},changelog:[{version:\"0.4.0\",prs:[228]},{version:\"0.1.0\",prs:[61]},{version:\"0.0.0\"}]},\"net.transport\":{brief:\"OSI transport layer or inter-process communication method.\",type:\"string\",applyScrubbing:{key:\"manual\"},isInOtel:!0,visibility:\"public\",example:\"tcp\",deprecation:{replacement:\"network.transport\"},aliases:[\"network.transport\",\"mcp.transport\"],changelog:[{version:\"0.1.0\",prs:[61,127]},{version:\"0.0.0\"}]},\"os.build\":{brief:\"The build ID of the operating system.\",type:\"string\",applyScrubbing:{key:\"manual\"},isInOtel:!1,visibility:\"public\",example:\"1234567890\",deprecation:{replacement:\"os.build_id\"},aliases:[\"os.build_id\"],changelog:[{version:\"0.5.0\",prs:[301],description:\"Added os.build attribute, deprecated in favor of os.build_id\"}]},\"os.build_id\":{brief:\"The build ID of the operating system.\",type:\"string\",applyScrubbing:{key:\"manual\"},isInOtel:!0,visibility:\"public\",example:\"1234567890\",aliases:[\"os.build\"],changelog:[{version:\"0.5.0\",prs:[301],description:\"Added os.build as alias\"},{version:\"0.1.0\",prs:[127]},{version:\"0.0.0\"}]},\"os.description\":{brief:\"Human readable (not intended to be parsed) OS version information, like e.g. reported by ver or lsb_release -a commands.\",type:\"string\",applyScrubbing:{key:\"manual\"},isInOtel:!0,visibility:\"public\",example:\"Ubuntu 18.04.1 LTS\",changelog:[{version:\"0.1.0\",prs:[127]},{version:\"0.0.0\"}]},\"os.kernel_version\":{brief:\"An independent kernel version string. Typically the entire output of the `uname` syscall.\",type:\"string\",applyScrubbing:{key:\"manual\"},isInOtel:!1,visibility:\"public\",example:\"20.2.0\",changelog:[{version:\"0.5.0\",prs:[301],description:\"Added os.kernel_version attribute\"}]},\"os.name\":{brief:\"Human readable operating system name.\",type:\"string\",applyScrubbing:{key:\"manual\"},isInOtel:!0,visibility:\"public\",example:\"Ubuntu\",changelog:[{version:\"0.1.0\",prs:[127]},{version:\"0.0.0\"}]},\"os.raw_description\":{brief:\"An unprocessed description string obtained by the operating system. For some well-known runtimes, Sentry will attempt to parse `name` and `version` from this string, if they are not explicitly given.\",type:\"string\",applyScrubbing:{key:\"manual\"},isInOtel:!1,visibility:\"public\",example:\"Ubuntu 22.04.4 LTS (Jammy Jellyfish)\",changelog:[{version:\"0.5.0\",prs:[301],description:\"Added os.raw_description attribute\"}]},\"os.rooted\":{brief:\"Whether the operating system has been jailbroken or rooted.\",type:\"boolean\",applyScrubbing:{key:\"manual\"},isInOtel:!1,visibility:\"public\",example:!0,changelog:[{version:\"0.5.0\",prs:[301],description:\"Added os.rooted attribute\"}]},\"os.theme\":{brief:\"Whether the OS runs in dark mode or light mode.\",type:\"string\",applyScrubbing:{key:\"manual\"},isInOtel:!1,visibility:\"public\",example:\"dark\",changelog:[{version:\"0.5.0\",prs:[301],description:\"Added os.theme attribute\"}]},\"os.type\":{brief:\"The operating system type.\",type:\"string\",applyScrubbing:{key:\"manual\"},isInOtel:!0,visibility:\"public\",example:\"linux\",changelog:[{version:\"0.1.0\",prs:[127]},{version:\"0.0.0\"}]},\"os.version\":{brief:\"The version of the operating system.\",type:\"string\",applyScrubbing:{key:\"manual\"},isInOtel:!0,visibility:\"public\",example:\"18.04.2\",changelog:[{version:\"0.1.0\",prs:[127]},{version:\"0.0.0\"}]},\"otel.kind\":{brief:\"The span kind (https://opentelemetry.io/docs/concepts/signals/traces/#span-kind). Deprecated, use `sentry.kind` instead.\",type:\"string\",applyScrubbing:{key:\"manual\"},isInOtel:!1,visibility:\"public\",example:\"SERVER\",deprecation:{replacement:\"sentry.kind\",reason:\"Deprecated in favor of sentry.kind\"},aliases:[\"sentry.kind\"],changelog:[{version:\"0.13.0\",prs:[440],description:\"Added otel.kind attribute\"}]},\"otel.scope.name\":{brief:\"The name of the instrumentation scope - (InstrumentationScope.Name in OTLP).\",type:\"string\",applyScrubbing:{key:\"manual\"},isInOtel:!0,visibility:\"public\",example:\"io.opentelemetry.contrib.mongodb\",changelog:[{version:\"0.1.0\",prs:[127]},{version:\"0.0.0\"}]},\"otel.scope.version\":{brief:\"The version of the instrumentation scope - (InstrumentationScope.Version in OTLP).\",type:\"string\",applyScrubbing:{key:\"manual\"},isInOtel:!0,visibility:\"public\",example:\"2.4.5\",changelog:[{version:\"0.1.0\",prs:[127]},{version:\"0.0.0\"}]},\"otel.status_code\":{brief:\"Name of the code, either \\u201COK\\u201D or \\u201CERROR\\u201D. MUST NOT be set if the status code is UNSET.\",type:\"string\",applyScrubbing:{key:\"manual\"},isInOtel:!0,visibility:\"public\",example:\"OK\",changelog:[{version:\"0.1.0\",prs:[127]},{version:\"0.0.0\"}]},\"otel.status_description\":{brief:\"Description of the Status if it has a value, otherwise not set.\",type:\"string\",applyScrubbing:{key:\"auto\"},isInOtel:!0,visibility:\"public\",example:\"resource not found\",changelog:[{version:\"0.1.0\",prs:[127]},{version:\"0.0.0\"}]},\"params.<key>\":{brief:\"Decoded parameters extracted from a URL path. Usually added by client-side routing frameworks like vue-router.\",type:\"string\",applyScrubbing:{key:\"auto\"},isInOtel:!1,visibility:\"public\",hasDynamicSuffix:!0,example:\"params.id='123'\",aliases:[\"url.path.parameter.<key>\"],changelog:[{version:\"0.1.0\",prs:[103]}]},\"performance.activationStart\":{brief:\"The time between initiating a navigation to a page and the browser activating the page\",type:\"double\",applyScrubbing:{key:\"manual\"},isInOtel:!1,visibility:\"public\",example:1.983,deprecation:{replacement:\"browser.performance.navigation.activation_start\",reason:\"The activationStart is now recorded as the browser.performance.navigation.activation_start attribute.\"},aliases:[\"browser.performance.navigation.activation_start\"],changelog:[{version:\"0.5.0\",prs:[321],description:\"Added performance.activationStart attribute\"}]},\"performance.timeOrigin\":{brief:\"The browser's performance.timeOrigin timestamp representing the time when the pageload was initiated\",type:\"double\",applyScrubbing:{key:\"manual\"},isInOtel:!1,visibility:\"public\",example:1776185678886e-3,deprecation:{replacement:\"browser.performance.time_origin\",reason:\"The timeOrigin is now recorded as the browser.performance.time_origin attribute.\"},aliases:[\"browser.performance.time_origin\"],changelog:[{version:\"0.5.0\",prs:[321],description:\"Added performance.timeOrigin attribute\"}]},previous_route:{brief:\"Also used by mobile SDKs to indicate the previous route in the application.\",type:\"string\",applyScrubbing:{key:\"manual\"},isInOtel:!1,visibility:\"public\",example:\"HomeScreen\",changelog:[{version:\"0.1.0\",prs:[74]},{version:\"0.0.0\"}]},\"process.command_args\":{brief:\"All the command arguments (including the command/executable itself) as received by the process.\",type:\"string[]\",applyScrubbing:{key:\"auto\"},isInOtel:!0,visibility:\"public\",example:[\"cmd/otecol\",\"--config=config.yaml\"],changelog:[{version:\"0.6.0\",prs:[327],description:\"Added process.command_args attribute\"}]},\"process.executable.name\":{brief:\"The name of the executable that started the process.\",type:\"string\",applyScrubbing:{key:\"manual\"},isInOtel:!0,visibility:\"public\",example:\"getsentry\",changelog:[{version:\"0.1.0\",prs:[127]},{version:\"0.0.0\"}]},\"process.pid\":{brief:\"The process ID of the running process.\",type:\"integer\",applyScrubbing:{key:\"manual\"},isInOtel:!0,visibility:\"public\",example:12345,changelog:[{version:\"0.4.0\",prs:[228]},{version:\"0.0.0\"}]},\"process.runtime.description\":{brief:\"An additional description about the runtime of the process, for example a specific vendor customization of the runtime environment. Equivalent to `raw_description` in the Sentry runtime context.\",type:\"string\",applyScrubbing:{key:\"manual\"},isInOtel:!0,visibility:\"public\",example:\"Eclipse OpenJ9 VM openj9-0.21.0\",aliases:[\"runtime.raw_description\"],changelog:[{version:\"0.1.0\",prs:[127]},{version:\"0.0.0\"}]},\"process.runtime.engine.name\":{brief:\"The name of the runtime engine.\",type:\"string\",applyScrubbing:{key:\"manual\"},isInOtel:!1,visibility:\"public\",example:\"v8\",changelog:[{version:\"0.0.0\"}]},\"process.runtime.engine.version\":{brief:\"The version of the runtime engine.\",type:\"string\",applyScrubbing:{key:\"manual\"},isInOtel:!1,visibility:\"public\",example:\"12.9.202.13-rusty\",changelog:[{version:\"0.0.0\"}]},\"process.runtime.name\":{brief:\"The name of the runtime. Equivalent to `name` in the Sentry runtime context.\",type:\"string\",applyScrubbing:{key:\"manual\"},isInOtel:!0,visibility:\"public\",example:\"node\",aliases:[\"runtime.name\"],changelog:[{version:\"0.1.0\",prs:[127]},{version:\"0.0.0\"}]},\"process.runtime.version\":{brief:\"The version of the runtime of this process, as returned by the runtime without modification. Equivalent to `version` in the Sentry runtime context.\",type:\"string\",applyScrubbing:{key:\"manual\"},isInOtel:!0,visibility:\"public\",example:\"18.04.2\",aliases:[\"runtime.version\"],changelog:[{version:\"0.1.0\",prs:[127]},{version:\"0.0.0\"}]},\"query.<key>\":{brief:\"An item in a query string. Usually added by client-side routing frameworks like vue-router.\",type:\"string\",applyScrubbing:{key:\"auto\"},isInOtel:!1,visibility:\"public\",hasDynamicSuffix:!0,example:\"query.id='123'\",deprecation:{replacement:\"url.query\",reason:\"Instead of sending items individually in query.<key>, they should be sent all together with url.query.\"},changelog:[{version:\"0.1.0\",prs:[103]}]},\"react.version\":{brief:\"The version of the React framework\",type:\"string\",applyScrubbing:{key:\"manual\"},isInOtel:!1,visibility:\"public\",example:\"18.2.0\",changelog:[{version:\"0.7.0\",prs:[368],description:\"Added react.version attribute\"}]},release:{brief:\"The sentry release.\",type:\"string\",applyScrubbing:{key:\"manual\"},isInOtel:!1,visibility:\"public\",example:\"production\",deprecation:{replacement:\"sentry.release\"},aliases:[\"sentry.release\"],changelog:[{version:\"0.1.0\",prs:[61,127]},{version:\"0.0.0\"}]},\"remix.action_form_data.<key>\":{brief:\"Remix form data, <key> being the form data key, the value being the form data value.\",type:\"string\",applyScrubbing:{key:\"auto\"},isInOtel:!1,visibility:\"public\",hasDynamicSuffix:!0,example:\"http.response.header.text='test'\",changelog:[{version:\"0.1.0\",prs:[103]}]},replay_id:{brief:\"The id of the sentry replay.\",type:\"string\",applyScrubbing:{key:\"never\"},isInOtel:!1,visibility:\"public\",example:\"123e4567e89b12d3a456426614174000\",deprecation:{replacement:\"sentry.replay_id\"},aliases:[\"sentry.replay_id\"],changelog:[{version:\"0.1.0\",prs:[61]},{version:\"0.0.0\"}]},\"resource.deployment.environment\":{brief:\"The software deployment environment name.\",type:\"string\",applyScrubbing:{key:\"manual\"},isInOtel:!0,visibility:\"public\",example:\"production\",deprecation:{replacement:\"sentry.environment\"},changelog:[{version:\"0.5.0\",prs:[266]}]},\"resource.deployment.environment.name\":{brief:\"The software deployment environment name.\",type:\"string\",applyScrubbing:{key:\"manual\"},isInOtel:!0,visibility:\"public\",example:\"production\",deprecation:{replacement:\"sentry.environment\"},changelog:[{version:\"0.3.1\",prs:[196]}]},\"resource.render_blocking_status\":{brief:\"The render blocking status of the resource.\",type:\"string\",applyScrubbing:{key:\"manual\"},isInOtel:!1,visibility:\"public\",example:\"non-blocking\",changelog:[{version:\"0.1.0\",prs:[127]},{version:\"0.0.0\"}]},route:{brief:\"The matched route, that is, the path template in the format used by the respective server framework. Also used by mobile SDKs to indicate the current route in the application.\",type:\"string\",applyScrubbing:{key:\"manual\"},isInOtel:!1,visibility:\"public\",example:\"App\\\\Controller::indexAction\",deprecation:{replacement:\"http.route\"},aliases:[\"http.route\"],changelog:[{version:\"0.1.0\",prs:[61,74]},{version:\"0.0.0\"}]},\"rpc.grpc.status_code\":{brief:\"The numeric status code of the gRPC request.\",type:\"integer\",applyScrubbing:{key:\"manual\"},isInOtel:!0,visibility:\"public\",example:2,changelog:[{version:\"0.4.0\",prs:[228]},{version:\"0.0.0\"}]},\"rpc.method\":{brief:\"The fully-qualified logical name of the method from the RPC interface perspective.\",type:\"string\",applyScrubbing:{key:\"manual\"},isInOtel:!0,visibility:\"public\",example:\"com.example.ExampleService/exampleMethod\",changelog:[{version:\"0.7.0\",prs:[351],description:\"Added rpc.method attribute\"}]},\"rpc.response.status_code\":{brief:\"Status code of the RPC returned by the RPC server or generated by the client.\",type:\"string\",applyScrubbing:{key:\"manual\"},isInOtel:!0,visibility:\"public\",example:\"DEADLINE_EXCEEDED\",changelog:[{version:\"0.7.0\",prs:[352],description:\"Added rpc.response.status_code attribute\"}]},\"rpc.service\":{brief:\"The full (logical) name of the service being called, including its package name, if applicable.\",type:\"string\",applyScrubbing:{key:\"manual\"},isInOtel:!0,visibility:\"public\",example:\"myService.BestService\",changelog:[{version:\"0.1.0\",prs:[127]},{version:\"0.0.0\"}]},\"rpc.system\":{brief:\"A string identifying the remoting system.\",type:\"string\",applyScrubbing:{key:\"manual\"},isInOtel:!0,visibility:\"public\",example:\"aws-api\",deprecation:{replacement:\"rpc.system.name\",reason:\"This attribute is being deprecated in favor of rpc.system.name, which is the OTel-aligned replacement.\"},aliases:[\"rpc.system.name\"],changelog:[{version:\"0.16.0\",prs:[482],description:\"Added rpc.system attribute, deprecated in favor of rpc.system.name\"}]},\"rpc.system.name\":{brief:\"A string identifying the remoting system.\",type:\"string\",applyScrubbing:{key:\"manual\"},isInOtel:!0,visibility:\"public\",example:\"aws-api\",aliases:[\"rpc.system\"],changelog:[{version:\"0.16.0\",prs:[482],description:\"Added rpc.system.name attribute\"}]},\"runtime.build\":{brief:\"The application build string, when it is separate from the version.\",type:\"string\",applyScrubbing:{key:\"manual\"},isInOtel:!1,visibility:\"public\",example:\"stable\",deprecation:{reason:\"The runtime.* namespace is deprecated in favor of process.runtime.*. No direct OTel equivalent exists for this attribute.\"},changelog:[{version:\"0.11.0\",prs:[383],description:\"Added and deprecated runtime.build attribute\"}]},\"runtime.name\":{brief:\"The name of the runtime. For example node, CPython, or rustc.\",type:\"string\",applyScrubbing:{key:\"manual\"},isInOtel:!1,visibility:\"public\",example:\"node\",deprecation:{replacement:\"process.runtime.name\",reason:\"Prefer OTel-aligned process.runtime.name\"},aliases:[\"process.runtime.name\"],changelog:[{version:\"0.11.0\",prs:[383],description:\"Added and deprecated runtime.name attribute in favor of process.runtime.name\"}]},\"runtime.raw_description\":{brief:\"Unprocessed description string as obtained from the runtime. Used to extract name and version for well-known runtimes.\",type:\"string\",applyScrubbing:{key:\"manual\"},isInOtel:!1,visibility:\"public\",example:\"Eclipse OpenJ9 VM openj9-0.21.0\",deprecation:{replacement:\"process.runtime.description\",reason:\"Prefer OTel-aligned process.runtime.description\"},aliases:[\"process.runtime.description\"],changelog:[{version:\"0.11.0\",prs:[383],description:\"Added and deprecated runtime.raw_description attribute in favor of process.runtime.description\"}]},\"runtime.version\":{brief:\"The version of the runtime.\",type:\"string\",applyScrubbing:{key:\"manual\"},isInOtel:!1,visibility:\"public\",example:\"18.04.2\",deprecation:{replacement:\"process.runtime.version\",reason:\"Prefer OTel-aligned process.runtime.version\"},aliases:[\"process.runtime.version\"],changelog:[{version:\"0.11.0\",prs:[383],description:\"Added and deprecated runtime.version attribute in favor of process.runtime.version\"}]},\"score.<key>\":{brief:\"The weighted performance score for a web vital. This is defined as `score.weight.<key>` * `score.ratio.<key>`.\",type:\"double\",applyScrubbing:{key:\"manual\"},isInOtel:!1,visibility:\"public\",hasDynamicSuffix:!0,example:\"score.cls=0.1723\",changelog:[{version:\"0.7.0\",prs:[355],description:\"Added score.<key> attribute\"}]},\"score.ratio.<key>\":{brief:\"The score for a web vital, normalized to a number between 0 and 1.\",type:\"double\",applyScrubbing:{key:\"manual\"},isInOtel:!1,visibility:\"public\",hasDynamicSuffix:!0,example:\"score.ratio.inp=0.7748\",changelog:[{version:\"0.7.0\",prs:[355],description:\"Added score.ratio.<key> attribute\"}]},\"score.total\":{brief:\"The total performance score of a span. This is the sum of individual weighted web vital scores (see `score.<key>`).\",type:\"double\",applyScrubbing:{key:\"manual\"},isInOtel:!1,visibility:\"public\",changelog:[{version:\"0.7.0\",prs:[355],description:\"Added score.total attribute\"}]},\"score.weight.<key>\":{brief:\"The relative weight of a web vital in a span's performance score.\",type:\"double\",applyScrubbing:{key:\"manual\"},isInOtel:!1,visibility:\"public\",hasDynamicSuffix:!0,example:\"score.weight.fcp=0.25\",changelog:[{version:\"0.7.0\",prs:[355],description:\"Added score.weight.<key> attribute\"}]},\"sentry.action\":{brief:\"Used as a generic attribute representing the action depending on the type of span. For instance, this is the database query operation for DB spans, and the request method for HTTP spans.\",type:\"string\",applyScrubbing:{key:\"manual\"},isInOtel:!1,visibility:\"public\",example:\"SELECT\",changelog:[{version:\"0.4.0\",prs:[212]}]},\"sentry.browser.name\":{brief:\"The name of the browser.\",type:\"string\",applyScrubbing:{key:\"manual\"},isInOtel:!1,visibility:\"public\",example:\"Chrome\",deprecation:{replacement:\"browser.name\"},aliases:[\"browser.name\"],changelog:[{version:\"0.1.0\",prs:[139]}]},\"sentry.browser.version\":{brief:\"The version of the browser.\",type:\"string\",applyScrubbing:{key:\"manual\"},isInOtel:!1,visibility:\"public\",example:\"120.0.6099.130\",deprecation:{replacement:\"browser.version\"},aliases:[\"browser.version\"],changelog:[{version:\"0.1.0\",prs:[139]}]},\"sentry.cancellation_reason\":{brief:\"The reason why a span ended early.\",type:\"string\",applyScrubbing:{key:\"never\"},isInOtel:!1,visibility:\"public\",example:\"document.hidden\",changelog:[{version:\"0.0.0\"}]},\"sentry.category\":{brief:\"The high-level category of a span, derived from the span operation or span attributes. This categorizes spans by their general purpose (e.g., database, HTTP, UI). Known values include: 'ai', 'ai.pipeline', 'app', 'browser', 'cache', 'console', 'db', 'event', 'file', 'function.aws', 'function.azure', 'function.gcp', 'function.nextjs', 'function.remix', 'graphql', 'grpc', 'http', 'measure', 'middleware', 'navigation', 'pageload', 'queue', 'resource', 'rpc', 'serialize', 'subprocess', 'template', 'topic', 'ui', 'ui.angular', 'ui.ember', 'ui.react', 'ui.svelte', 'ui.vue', 'view', 'websocket'.\",type:\"string\",applyScrubbing:{key:\"never\"},isInOtel:!1,visibility:\"public\",example:\"db\",changelog:[{version:\"0.4.0\",prs:[218]}]},\"sentry.client_sample_rate\":{brief:\"Rate at which a span was sampled in the SDK.\",type:\"double\",applyScrubbing:{key:\"never\"},isInOtel:!1,visibility:\"public\",example:.5,changelog:[{version:\"0.1.0\",prs:[102]}]},\"sentry.description\":{brief:\"The human-readable description of a span.\",type:\"string\",applyScrubbing:{key:\"auto\"},isInOtel:!1,visibility:\"public\",example:\"index view query\",changelog:[{version:\"0.1.0\",prs:[135]}]},\"sentry.dist\":{brief:\"The sentry dist.\",type:\"string\",applyScrubbing:{key:\"never\"},isInOtel:!1,visibility:\"public\",example:\"1.0\",aliases:[\"dist\"],changelog:[{version:\"0.16.0\",prs:[489],description:\"Added dist as an alias\"},{version:\"0.0.0\"}]},\"sentry.domain\":{brief:\"Used as a generic attribute representing the domain depending on the type of span. For instance, this is the collection/table name for database spans, and the server address for HTTP spans.\",type:\"string\",applyScrubbing:{key:\"manual\"},isInOtel:!1,visibility:\"public\",example:\"example.com\",changelog:[{version:\"0.4.0\",prs:[212]}]},\"sentry.dsc.environment\":{brief:\"The environment from the dynamic sampling context.\",type:\"string\",applyScrubbing:{key:\"never\"},isInOtel:!1,visibility:\"internal\",example:\"prod\",changelog:[{version:\"0.3.0\",prs:[185]}]},\"sentry.dsc.project_id\":{brief:\"The ID of the project where the trace originated (i.e. the project of the SDK that started the trace). Propagated through the dynamic sampling context and set by Relay during ingestion.\",type:\"string\",applyScrubbing:{key:\"never\"},isInOtel:!1,visibility:\"internal\",example:\"12345\",changelog:[{version:\"0.7.0\",prs:[358],description:\"Add sentry.dsc.project_id as an attribute\"}]},\"sentry.dsc.public_key\":{brief:\"The public key from the dynamic sampling context.\",type:\"string\",applyScrubbing:{key:\"manual\"},isInOtel:!1,visibility:\"internal\",example:\"c51734c603c4430eb57cb0a5728a479d\",changelog:[{version:\"0.3.0\",prs:[185]}]},\"sentry.dsc.release\":{brief:\"The release identifier from the dynamic sampling context.\",type:\"string\",applyScrubbing:{key:\"never\"},isInOtel:!1,visibility:\"internal\",example:\"frontend@e8211be71b214afab5b85de4b4c54be3714952bb\",changelog:[{version:\"0.3.0\",prs:[185]}]},\"sentry.dsc.sampled\":{brief:\"Whether the event was sampled according to the dynamic sampling context.\",type:\"boolean\",applyScrubbing:{key:\"never\"},isInOtel:!1,visibility:\"internal\",example:!0,changelog:[{version:\"0.3.0\",prs:[185]}]},\"sentry.dsc.sample_rate\":{brief:\"The sample rate from the dynamic sampling context.\",type:\"string\",applyScrubbing:{key:\"never\"},isInOtel:!1,visibility:\"internal\",example:\"1.0\",changelog:[{version:\"0.3.0\",prs:[185]}]},\"sentry.dsc.trace_id\":{brief:\"The trace ID from the dynamic sampling context.\",type:\"string\",applyScrubbing:{key:\"never\"},isInOtel:!1,visibility:\"internal\",example:\"047372980460430cbc78d9779df33a46\",changelog:[{version:\"0.3.0\",prs:[185]}]},\"sentry.dsc.transaction\":{brief:\"The transaction name from the dynamic sampling context.\",type:\"string\",applyScrubbing:{key:\"never\"},isInOtel:!1,visibility:\"internal\",example:\"/issues/errors-outages/\",changelog:[{version:\"0.3.0\",prs:[185]}]},\"sentry.environment\":{brief:\"The sentry environment.\",type:\"string\",applyScrubbing:{key:\"never\"},isInOtel:!1,visibility:\"public\",example:\"production\",aliases:[\"environment\"],changelog:[{version:\"0.0.0\"}]},\"sentry.exclusive_time\":{brief:\"The exclusive time duration of the span in milliseconds.\",type:\"double\",applyScrubbing:{key:\"manual\"},isInOtel:!1,visibility:\"public\",example:1234,changelog:[{version:\"0.4.0\",prs:[228]},{version:\"0.3.0\",prs:[160]},{version:\"0.0.0\"}]},\"sentry.graphql.operation\":{brief:\"Indicates the type of graphql operation, emitted by the Javascript SDK.\",type:\"string\",applyScrubbing:{key:\"manual\"},isInOtel:!1,visibility:\"public\",example:\"getUserById\",changelog:[{version:\"0.3.1\",prs:[190]}]},\"sentry.group\":{brief:\"Stores the hash of `sentry.normalized_description`. This is primarily used for grouping spans in the product end.\",type:\"string\",applyScrubbing:{key:\"never\"},isInOtel:!1,visibility:\"public\",changelog:[{version:\"0.4.0\",prs:[212]}]},\"sentry.http.prefetch\":{brief:\"If an http request was a prefetch request.\",type:\"boolean\",applyScrubbing:{key:\"never\"},isInOtel:!1,visibility:\"public\",example:!0,changelog:[{version:\"0.0.0\"}]},\"sentry.idle_span_finish_reason\":{brief:\"The reason why an idle span ended early.\",type:\"string\",applyScrubbing:{key:\"never\"},isInOtel:!1,visibility:\"public\",example:\"idleTimeout\",changelog:[{version:\"0.0.0\"}]},\"sentry.is_remote\":{brief:\"Indicates whether a span's parent is remote.\",type:\"boolean\",applyScrubbing:{key:\"never\"},isInOtel:!1,visibility:\"public\",example:!0,changelog:[{version:\"0.3.1\",prs:[190]}]},\"sentry.kind\":{brief:\"Used to clarify the relationship between parents and children, or to distinguish between spans, e.g. a `server` and `client` span with the same name.\",type:\"string\",applyScrubbing:{key:\"manual\"},isInOtel:!1,visibility:\"public\",example:\"server\",aliases:[\"otel.kind\"],changelog:[{version:\"0.3.1\",prs:[190]}]},\"sentry.main_thread\":{brief:\"Whether the span or event occurred on the main thread. Computed by Relay and should not be set by SDKs.\",type:\"boolean\",applyScrubbing:{key:\"never\"},isInOtel:!1,visibility:\"public\",example:!0,changelog:[{version:\"0.5.0\"}]},\"sentry.message.parameter.<key>\":{brief:\"A parameter used in the message template. <key> can either be the number that represent the parameter's position in the template string (sentry.message.parameter.0, sentry.message.parameter.1, etc) or the parameter's name (sentry.message.parameter.item_id, sentry.message.parameter.user_id, etc)\",type:\"string\",applyScrubbing:{key:\"auto\"},isInOtel:!1,visibility:\"public\",example:\"sentry.message.parameter.0='123'\",changelog:[{version:\"0.1.0\",prs:[116]}]},\"sentry.message.template\":{brief:\"The parameterized template string.\",type:\"string\",applyScrubbing:{key:\"manual\"},isInOtel:!1,visibility:\"public\",example:\"Hello, {name}!\",changelog:[{version:\"0.1.0\",prs:[116]}]},\"sentry.metric.source\":{brief:\"The provenance of a metric.  For example, this can be set to indicate if a metric was generated by Relay from a span.\",type:\"string\",applyScrubbing:{key:\"never\"},isInOtel:!1,visibility:\"public\",example:\"span\",changelog:[{version:\"0.16.0\",prs:[476],description:\"Added sentry.metric.source attribute\"}]},\"sentry.mobile\":{brief:\"Whether the application is using a mobile SDK. Computed by Relay and should not be set by SDKs.\",type:\"boolean\",applyScrubbing:{key:\"never\"},isInOtel:!1,visibility:\"public\",example:!0,changelog:[{version:\"0.5.0\"}]},\"sentry.module.<key>\":{brief:\"A module that was loaded in the process. The key is the name of the module.\",type:\"string\",applyScrubbing:{key:\"manual\"},isInOtel:!1,visibility:\"public\",hasDynamicSuffix:!0,example:\"sentry.module.brianium/paratest='v7.7.0'\",changelog:[{version:\"0.1.0\",prs:[103]}]},\"sentry.nextjs.ssr.function.route\":{brief:\"A parameterized route for a function in Next.js that contributes to Server-Side Rendering. Should be present on spans that track such functions when the file location of the function is known.\",type:\"string\",applyScrubbing:{key:\"never\"},isInOtel:!1,visibility:\"public\",example:\"/posts/[id]/layout\",changelog:[{version:\"0.1.0\",prs:[54,106]}]},\"sentry.nextjs.ssr.function.type\":{brief:\"A descriptor for a for a function in Next.js that contributes to Server-Side Rendering. Should be present on spans that track such functions.\",type:\"string\",applyScrubbing:{key:\"never\"},isInOtel:!1,visibility:\"public\",example:\"generateMetadata\",changelog:[{version:\"0.1.0\",prs:[54,106]}]},\"sentry.normalized_db_query\":{brief:\"The normalized version of `db.query.text`.\",type:\"string\",applyScrubbing:{key:\"manual\"},isInOtel:!1,visibility:\"public\",example:\"SELECT .. FROM sentry_project WHERE (project_id = %s)\",changelog:[{version:\"0.3.1\",prs:[194]}]},\"sentry.normalized_db_query.hash\":{brief:\"The hash of `sentry.normalized_db_query`.\",type:\"string\",applyScrubbing:{key:\"never\"},isInOtel:!1,visibility:\"public\",changelog:[{version:\"0.4.0\",prs:[200]}]},\"sentry.normalized_description\":{brief:\"Used as a generic attribute representing the normalized `sentry.description`. This refers to the legacy use case of `sentry.description` where it holds relevant data depending on the type of span (e.g. database query, resource url, http request description, etc).\",type:\"string\",applyScrubbing:{key:\"auto\"},isInOtel:!1,visibility:\"public\",example:\"SELECT .. FROM sentry_project WHERE (project_id = %s)\",changelog:[{version:\"0.4.0\",prs:[212]}]},\"sentry.observed_timestamp_nanos\":{brief:\"The timestamp at which an envelope was received by Relay, in nanoseconds.\",type:\"string\",applyScrubbing:{key:\"never\"},isInOtel:!1,visibility:\"public\",example:\"1544712660300000000\",changelog:[{version:\"0.3.0\",prs:[174]},{version:\"0.2.0\",prs:[137]}]},\"sentry.op\":{brief:\"The operation of a span.\",type:\"string\",applyScrubbing:{key:\"never\"},isInOtel:!1,visibility:\"public\",example:\"http.client\",changelog:[{version:\"0.0.0\"}]},\"sentry.origin\":{brief:\"The origin of the instrumentation (e.g. span, log, etc.)\",type:\"string\",applyScrubbing:{key:\"never\"},isInOtel:!1,visibility:\"public\",example:\"auto.http.otel.fastify\",changelog:[{version:\"0.1.0\",prs:[68]},{version:\"0.0.0\"}]},\"sentry.platform\":{brief:\"The sdk platform that generated the event.\",type:\"string\",applyScrubbing:{key:\"never\"},isInOtel:!1,visibility:\"public\",example:\"php\",changelog:[{version:\"0.0.0\"}]},\"sentry.profiler_id\":{brief:\"The id of the currently running profiler (continuous profiling)\",type:\"string\",applyScrubbing:{key:\"never\"},isInOtel:!1,visibility:\"public\",example:\"18779b64dd35d1a538e7ce2dd2d3fad3\",changelog:[{version:\"0.4.0\",prs:[242]}]},\"sentry.profile_id\":{brief:\"The ID of the Sentry profile the span is associated with. This is only meaningful for transaction-based profiling.\",type:\"string\",applyScrubbing:{key:\"never\"},isInOtel:!1,visibility:\"public\",example:\"123e4567e89b12d3a456426614174000\",changelog:[{version:\"0.6.0\",prs:[344],description:\"Added sentry.profile_id attribute\"}]},\"sentry.release\":{brief:\"The sentry release.\",type:\"string\",applyScrubbing:{key:\"never\"},isInOtel:!1,visibility:\"public\",example:\"7.0.0\",aliases:[\"service.version\",\"release\"],changelog:[{version:\"0.0.0\"}]},\"sentry.replay_id\":{brief:\"The id of the sentry replay.\",type:\"string\",applyScrubbing:{key:\"never\"},isInOtel:!1,visibility:\"public\",example:\"123e4567e89b12d3a456426614174000\",aliases:[\"replay_id\"],changelog:[{version:\"0.0.0\"}]},\"sentry.replay_is_buffering\":{brief:\"A sentinel attribute on log events indicating whether the current Session Replay is being buffered (onErrorSampleRate).\",type:\"boolean\",applyScrubbing:{key:\"never\"},isInOtel:!1,visibility:\"public\",example:!0,changelog:[{version:\"0.3.0\",prs:[185]}]},\"sentry.report_event\":{brief:\"(Deprecated) The event that caused the SDK to report CLS or LCP (pagehide or navigation)\",type:\"string\",applyScrubbing:{key:\"manual\"},isInOtel:!1,visibility:\"public\",example:\"pagehide\",deprecation:{reason:\"The report event is now recorded as a browser.web_vital.lcp.report_event or browser.web_vital.cls.report_event attribute. No backfill required.\"},changelog:[{version:\"0.5.0\",prs:[320],description:\"Added sentry.report_event attribute\"}]},\"sentry.sdk.integrations\":{brief:\"A list of names identifying enabled integrations. The list shouldhave all enabled integrations, including default integrations. Defaultintegrations are included because different SDK releases may contain differentdefault integrations.\",type:\"string[]\",applyScrubbing:{key:\"never\"},isInOtel:!1,visibility:\"public\",example:[\"InboundFilters\",\"FunctionToString\",\"BrowserApiErrors\",\"Breadcrumbs\"],changelog:[{version:\"0.0.0\",prs:[42]}]},\"sentry.sdk.name\":{brief:\"The sentry sdk name.\",type:\"string\",applyScrubbing:{key:\"never\"},isInOtel:!1,visibility:\"public\",example:\"@sentry/react\",changelog:[{version:\"0.0.0\"}]},\"sentry.sdk.version\":{brief:\"The sentry sdk version.\",type:\"string\",applyScrubbing:{key:\"never\"},isInOtel:!1,visibility:\"public\",example:\"7.0.0\",changelog:[{version:\"0.0.0\"}]},\"sentry.segment.id\":{brief:\"The segment ID of a span\",type:\"string\",applyScrubbing:{key:\"never\"},isInOtel:!1,visibility:\"public\",example:\"051581bf3cb55c13\",aliases:[\"sentry.segment_id\"],changelog:[{version:\"0.1.0\",prs:[107,124]}]},\"sentry.segment_id\":{brief:\"The segment ID of a span\",type:\"string\",applyScrubbing:{key:\"never\"},isInOtel:!1,visibility:\"public\",example:\"051581bf3cb55c13\",deprecation:{replacement:\"sentry.segment.id\"},aliases:[\"sentry.segment.id\"],changelog:[{version:\"0.1.0\",prs:[124]}]},\"sentry.segment.name\":{brief:\"The segment name of a span\",type:\"string\",applyScrubbing:{key:\"manual\"},isInOtel:!1,visibility:\"public\",example:\"GET /user\",aliases:[\"sentry.transaction\",\"transaction\"],changelog:[{version:\"0.6.0\",prs:[345],description:\"Added sentry.transaction and transaction aliases\"},{version:\"0.1.0\",prs:[104]}]},\"sentry.server_sample_rate\":{brief:\"Rate at which a span was sampled in Relay.\",type:\"double\",applyScrubbing:{key:\"never\"},isInOtel:!1,visibility:\"public\",example:.5,changelog:[{version:\"0.1.0\",prs:[102]}]},\"sentry.source\":{brief:\"The source of a span, also referred to as transaction source. Known values are:  `'custom'`, `'url'`, `'route'`, `'component'`, `'view'`, `'task'`. '`source`' describes a parametrized route, while `'url'` describes the full URL, potentially containing identifiers.\",type:\"string\",applyScrubbing:{key:\"never\"},isInOtel:!1,visibility:\"public\",example:\"route\",deprecation:{replacement:\"sentry.span.source\",reason:\"This attribute is being deprecated in favor of sentry.span.source\"},changelog:[{version:\"0.5.0\"}]},\"sentry.span.source\":{brief:\"The source of a span, also referred to as transaction source. Known values are:  `'custom'`, `'url'`, `'route'`, `'component'`, `'view'`, `'task'`. '`source`' describes a parametrized route, while `'url'` describes the full URL, potentially containing identifiers.\",type:\"string\",applyScrubbing:{key:\"never\"},isInOtel:!1,visibility:\"public\",example:\"route\",changelog:[{version:\"0.4.0\",prs:[214]},{version:\"0.0.0\"}]},\"sentry.status\":{brief:`The span's status (either \"ok\" or \"error\"). Older SDKs may set this to a more specific error, but this behaviour is deprecated.`,type:\"string\",applyScrubbing:{key:\"never\"},isInOtel:!1,visibility:\"public\",example:\"ok\",changelog:[{version:\"0.14.0\",prs:[453]}]},\"sentry.status_code\":{brief:\"The HTTP status code used in Sentry Insights. Typically set by Sentry during ingestion, rather than by clients.\",type:\"integer\",applyScrubbing:{key:\"manual\"},isInOtel:!1,visibility:\"public\",example:200,changelog:[{version:\"0.4.0\",prs:[223,228]}]},\"sentry.status.message\":{brief:\"The from OTLP extracted status message.\",type:\"string\",applyScrubbing:{key:\"manual\"},isInOtel:!1,visibility:\"public\",example:\"foobar\",changelog:[{version:\"0.3.1\",prs:[190]}]},\"sentry.sveltekit.navigation.from\":{brief:\"the navigation origin (sveltekit router)\",type:\"string\",applyScrubbing:{key:\"auto\"},isInOtel:!1,visibility:\"public\",example:\"/home\",deprecation:{replacement:\"navigation.origin\",reason:\"Use the more generic attribute instead\"},aliases:[\"navigation.origin\"],changelog:[{version:\"0.16.0\",prs:[467],description:\"Added sentry.sveltekit.navigation.from attribute\"}]},\"sentry.sveltekit.navigation.to\":{brief:\"the navigation destination\",type:\"string\",applyScrubbing:{key:\"auto\"},isInOtel:!1,visibility:\"public\",example:\"/users/:id\",deprecation:{reason:\"the navigation destination is already covered by url.* attributes\"},changelog:[{version:\"0.16.0\",prs:[467],description:\"Added sentry.sveltekit.navigation.to attribute\"}]},\"sentry.sveltekit.navigation.type\":{brief:\"The type of navigation event emitted from the sveltekit client router\",type:\"string\",applyScrubbing:{key:\"manual\"},isInOtel:!1,visibility:\"public\",example:\"link\",deprecation:{replacement:\"navigation.type\",reason:\"Use the more generic attribute instead\"},aliases:[\"navigation.type\"],changelog:[{version:\"0.16.0\",prs:[467],description:\"Added sentry.sveltekit.navigation.type attribute\"}]},\"sentry.thread.id\":{brief:\"Current \\u201Cmanaged\\u201D thread ID.\",type:\"integer\",applyScrubbing:{key:\"manual\"},isInOtel:!1,visibility:\"public\",example:56,deprecation:{replacement:\"thread.id\",reason:\"This attribute is being deprecated in favor of the OTel-standard thread.id\"},changelog:[{version:\"0.13.0\",prs:[451]}]},\"sentry.timestamp.sequence\":{brief:\"A sequencing counter for deterministic ordering of logs or metrics when timestamps share the same integer millisecond. Starts at 0 on SDK initialization, increments by 1 for each captured item, and resets to 0 when the integer millisecond of the current item differs from the previous one.\",type:\"integer\",applyScrubbing:{key:\"never\"},isInOtel:!1,visibility:\"public\",example:0,changelog:[{version:\"0.5.0\",prs:[262]}]},\"sentry.trace_lifecycle\":{brief:\"Indicates the chosen trace lifecycle mode of the SDK (stream or static)\",type:\"string\",applyScrubbing:{key:\"manual\"},isInOtel:!1,visibility:\"public\",example:\"stream\",changelog:[{version:\"0.13.0\",prs:[442],description:\"Added sentry.trace_lifecycle attribute\"}]},\"sentry.trace.parent_span_id\":{brief:\"The span id of the span that was active when the log was collected. This should not be set if there was no active span.\",type:\"string\",applyScrubbing:{key:\"never\"},isInOtel:!1,visibility:\"public\",example:\"b0e6f15b45c36b12\",deprecation:{},changelog:[{version:\"0.5.0\",prs:[287],description:\"Deprecate `sentry.trace.parent_span_id`\"},{version:\"0.1.0\",prs:[116]}]},\"sentry.trace.status\":{brief:`The segment's status (either \"ok\" or \"error\"). Older SDKs may set this to a more specific error, but this behaviour is deprecated.`,type:\"string\",applyScrubbing:{key:\"never\"},isInOtel:!1,visibility:\"public\",example:\"ok\",changelog:[{version:\"0.14.0\",prs:[453]}]},\"sentry.transaction\":{brief:\"The sentry transaction (segment name).\",type:\"string\",applyScrubbing:{key:\"never\"},isInOtel:!1,visibility:\"public\",example:\"GET /\",deprecation:{replacement:\"sentry.segment.name\",reason:\"This attribute is being deprecated in favor of sentry.segment.name\"},aliases:[\"sentry.segment.name\",\"transaction\"],changelog:[{version:\"0.6.0\",prs:[345],description:\"Deprecated sentry.transaction in favor of sentry.segment.name\"},{version:\"0.0.0\"}]},\"sentry.user.email\":{brief:\"User email address.\",type:\"string\",applyScrubbing:{key:\"auto\"},isInOtel:!1,visibility:\"public\",deprecation:{replacement:\"user.email\"},aliases:[\"user.email\"],changelog:[{version:\"0.10.0\",prs:[406]}]},\"sentry.user.geo.city\":{brief:\"Human readable city name.\",type:\"string\",applyScrubbing:{key:\"manual\"},isInOtel:!1,visibility:\"public\",deprecation:{replacement:\"user.geo.city\"},aliases:[\"user.geo.city\"],changelog:[{version:\"0.10.0\",prs:[406]}]},\"sentry.user.geo.country_code\":{brief:\"Two-letter country code (ISO 3166-1 alpha-2).\",type:\"string\",applyScrubbing:{key:\"manual\"},isInOtel:!1,visibility:\"public\",deprecation:{replacement:\"user.geo.country_code\"},aliases:[\"user.geo.country_code\"],changelog:[{version:\"0.10.0\",prs:[406]}]},\"sentry.user.geo.region\":{brief:\"Human readable region name or code.\",type:\"string\",applyScrubbing:{key:\"manual\"},isInOtel:!1,visibility:\"public\",deprecation:{replacement:\"user.geo.region\"},aliases:[\"user.geo.region\"],changelog:[{version:\"0.10.0\",prs:[406]}]},\"sentry.user.geo.subdivision\":{brief:\"Human readable subdivision name.\",type:\"string\",applyScrubbing:{key:\"manual\"},isInOtel:!1,visibility:\"public\",deprecation:{replacement:\"user.geo.subdivision\"},aliases:[\"user.geo.subdivision\"],changelog:[{version:\"0.10.0\",prs:[406]}]},\"sentry.user.id\":{brief:\"Unique identifier of the user.\",type:\"string\",applyScrubbing:{key:\"auto\"},isInOtel:!1,visibility:\"public\",deprecation:{replacement:\"user.id\"},aliases:[\"user.id\"],changelog:[{version:\"0.10.0\",prs:[406]}]},\"sentry.user.ip\":{brief:\"The IP address of the user.\",type:\"string\",applyScrubbing:{key:\"auto\"},isInOtel:!1,visibility:\"public\",deprecation:{replacement:\"user.ip_address\"},aliases:[\"user.ip_address\"],changelog:[{version:\"0.10.0\",prs:[406]}]},\"sentry.user.username\":{brief:\"Short name or login/username of the user.\",type:\"string\",applyScrubbing:{key:\"auto\"},isInOtel:!1,visibility:\"public\",deprecation:{replacement:\"user.name\"},aliases:[\"user.name\"],changelog:[{version:\"0.10.0\",prs:[406]}]},\"server.address\":{brief:\"Server domain name if available without reverse DNS lookup; otherwise, IP address or Unix domain socket name.\",type:\"string\",applyScrubbing:{key:\"manual\"},isInOtel:!0,visibility:\"public\",example:\"example.com\",aliases:[\"http.server_name\",\"net.host.name\",\"http.host\",\"server_name\"],changelog:[{version:\"0.1.0\",prs:[108,127]},{version:\"0.0.0\"}]},server_name:{brief:\"Server domain name if available without reverse DNS lookup; otherwise, IP address or Unix domain socket name.\",type:\"string\",applyScrubbing:{key:\"manual\"},isInOtel:!1,visibility:\"public\",example:\"example.com\",deprecation:{replacement:\"server.address\",reason:\"This attribute is being deprecated in favor of server.address, which is the OTel-aligned replacement.\"},aliases:[\"server.address\",\"http.server_name\",\"net.host.name\",\"http.host\"],changelog:[{version:\"0.16.0\",prs:[477],description:\"Added server_name attribute, deprecated in favor of server.address\"}]},\"server.port\":{brief:\"Server port number.\",type:\"integer\",applyScrubbing:{key:\"manual\"},isInOtel:!0,visibility:\"public\",example:1337,aliases:[\"net.host.port\"],changelog:[{version:\"0.4.0\",prs:[228]},{version:\"0.0.0\"}]},\"service.name\":{brief:\"Logical name of the service.\",type:\"string\",applyScrubbing:{key:\"manual\"},isInOtel:!0,visibility:\"public\",example:\"omegastar\",changelog:[{version:\"0.1.0\",prs:[127]},{version:\"0.0.0\"}]},\"service.version\":{brief:\"The version string of the service API or implementation. The format is not defined by these conventions.\",type:\"string\",applyScrubbing:{key:\"manual\"},isInOtel:!0,visibility:\"public\",example:\"5.0.0\",aliases:[\"sentry.release\"],changelog:[{version:\"0.1.0\",prs:[127]},{version:\"0.0.0\"}]},\"session.id\":{brief:\"A unique id identifying the active session at the time of setting this attribute\",type:\"string\",applyScrubbing:{key:\"manual\"},isInOtel:!0,visibility:\"public\",example:\"00112233-4455-6677-8899-aabbccddeeff\",changelog:[{version:\"0.11.0\",prs:[412],description:\"Added session.id attribute\"}]},stall_percentage:{brief:\"The fraction of time the app was stalled. Only applies to React Native. This is computed by Relay.\",type:\"double\",applyScrubbing:{key:\"manual\"},isInOtel:!1,visibility:\"public\",changelog:[{version:\"0.7.0\",prs:[362],description:\"Added stall_percentage attribute\"}]},stall_total_time:{brief:\"The combined duration of all stalls in milliseconds. Only applies to React Native. This is computed by Relay.\",type:\"double\",applyScrubbing:{key:\"manual\"},isInOtel:!1,visibility:\"public\",changelog:[{version:\"0.7.0\",prs:[362],description:\"Added stall_total_time attribute\"}]},\"state.type\":{brief:\"The type of state management library\",type:\"string\",applyScrubbing:{key:\"manual\"},isInOtel:!1,visibility:\"public\",example:\"redux\",changelog:[{version:\"0.7.0\",prs:[365],description:\"Added state.type attribute\"}]},\"thread.id\":{brief:\"Current \\u201Cmanaged\\u201D thread ID.\",type:\"integer\",applyScrubbing:{key:\"manual\"},isInOtel:!0,visibility:\"public\",example:56,changelog:[{version:\"0.0.0\"}]},\"thread.name\":{brief:\"Current thread name.\",type:\"string\",applyScrubbing:{key:\"manual\"},isInOtel:!0,visibility:\"public\",example:\"main\",changelog:[{version:\"0.1.0\",prs:[127]},{version:\"0.0.0\"}]},\"timber.tag\":{brief:\"The log tag provided by the timber logging framework.\",type:\"string\",applyScrubbing:{key:\"manual\"},isInOtel:!1,visibility:\"public\",example:\"MyTag\",changelog:[{version:\"0.3.0\",prs:[183]}]},time_to_full_display:{brief:\"The duration of time to full display in milliseconds\",type:\"double\",applyScrubbing:{key:\"manual\"},isInOtel:!1,visibility:\"public\",example:1234.56,deprecation:{replacement:\"app.vitals.ttfd.value\",reason:\"Replaced by app.vitals.ttfd.value to align with the app.vitals.* namespace for mobile performance attributes\"},aliases:[\"app.vitals.ttfd.value\"],changelog:[{version:\"0.5.0\",prs:[313],description:\"Added and deprecated in favor of app.vitals.ttfd.value\"}]},time_to_initial_display:{brief:\"The duration of time to initial display in milliseconds\",type:\"double\",applyScrubbing:{key:\"manual\"},isInOtel:!1,visibility:\"public\",example:1234.56,deprecation:{replacement:\"app.vitals.ttid.value\",reason:\"Replaced by app.vitals.ttid.value to align with the app.vitals.* namespace for mobile performance attributes\"},aliases:[\"app.vitals.ttid.value\"],changelog:[{version:\"0.5.0\",prs:[313],description:\"Added and deprecated in favor of app.vitals.ttid.value\"}]},transaction:{brief:\"The sentry transaction (segment name).\",type:\"string\",applyScrubbing:{key:\"manual\"},isInOtel:!1,visibility:\"public\",example:\"GET /\",deprecation:{replacement:\"sentry.segment.name\"},aliases:[\"sentry.segment.name\",\"sentry.transaction\"],changelog:[{version:\"0.6.0\",prs:[345],description:\"Updated transaction deprecation replacement to sentry.segment.name\"},{version:\"0.1.0\",prs:[61,127]},{version:\"0.0.0\"}]},\"trpc.procedure_path\":{brief:\"The path of the tRPC procedure being called\",type:\"string\",applyScrubbing:{key:\"manual\"},isInOtel:!1,visibility:\"public\",example:\"user.getById\",changelog:[{version:\"0.7.0\",prs:[370],description:\"Added trpc.procedure_path attribute\"}]},\"trpc.procedure_type\":{brief:\"The type of the tRPC procedure\",type:\"string\",applyScrubbing:{key:\"manual\"},isInOtel:!1,visibility:\"public\",example:\"query\",changelog:[{version:\"0.7.0\",prs:[370],description:\"Added trpc.procedure_type attribute\"}]},ttfb:{brief:\"The value of the recorded Time To First Byte (TTFB) web vital in milliseconds\",type:\"double\",applyScrubbing:{key:\"manual\"},isInOtel:!1,visibility:\"public\",example:194,deprecation:{replacement:\"browser.web_vital.ttfb.value\",reason:\"This attribute is being deprecated in favor of browser.web_vital.ttfb.value\"},aliases:[\"browser.web_vital.ttfb.value\"],changelog:[{version:\"0.5.0\",prs:[235]}]},\"ttfb.requestTime\":{brief:\"The time it takes for the server to process the initial request and send the first byte of a response to the user's browser\",type:\"double\",applyScrubbing:{key:\"manual\"},isInOtel:!1,visibility:\"public\",example:1554.5814,deprecation:{replacement:\"browser.web_vital.ttfb.request_time\",reason:\"This attribute is being deprecated in favor of browser.web_vital.ttfb.request_time\"},aliases:[\"browser.web_vital.ttfb.request_time\"],changelog:[{version:\"0.5.0\",prs:[235]}]},type:{brief:\"More granular type of the operation happening.\",type:\"string\",applyScrubbing:{key:\"manual\"},isInOtel:!1,visibility:\"public\",example:\"fetch\",changelog:[{version:\"0.0.0\"}]},\"ui.component_name\":{brief:\"The name of the associated component.\",type:\"string\",applyScrubbing:{key:\"manual\"},isInOtel:!1,visibility:\"public\",example:\"HomeButton\",changelog:[{version:\"0.1.0\",prs:[127]},{version:\"0.0.0\"}]},\"ui.contributes_to_ttfd\":{brief:\"Whether the span execution contributed to the TTFD (time to fully drawn) metric.\",type:\"boolean\",applyScrubbing:{key:\"manual\"},isInOtel:!1,visibility:\"public\",example:!0,changelog:[{version:\"0.0.0\"}]},\"ui.contributes_to_ttid\":{brief:\"Whether the span execution contributed to the TTID (time to initial display) metric.\",type:\"boolean\",applyScrubbing:{key:\"manual\"},isInOtel:!1,visibility:\"public\",example:!0,changelog:[{version:\"0.0.0\"}]},\"ui.element.height\":{brief:\"The height of the UI element (for Html in pixels)\",type:\"integer\",applyScrubbing:{key:\"manual\"},isInOtel:!1,visibility:\"public\",example:256,changelog:[{version:\"0.5.0\",prs:[284],description:\"Added ui.element.height attribute\"}]},\"ui.element.id\":{brief:\"The id of the UI element\",type:\"string\",applyScrubbing:{key:\"manual\"},isInOtel:!1,visibility:\"public\",example:\"btn-login\",changelog:[{version:\"0.5.0\",prs:[284],description:\"Added ui.element.id attribute\"}]},\"ui.element.identifier\":{brief:\"The identifier used to measure the UI element timing\",type:\"string\",applyScrubbing:{key:\"manual\"},isInOtel:!1,visibility:\"public\",example:\"heroImage\",changelog:[{version:\"0.5.0\",prs:[284],description:\"Added ui.element.identifier attribute\"}]},\"ui.element.load_time\":{brief:\"The loading time of a UI element (from time origin to finished loading)\",type:\"double\",applyScrubbing:{key:\"manual\"},isInOtel:!1,visibility:\"public\",example:998.2234,changelog:[{version:\"0.5.0\",prs:[284],description:\"Added ui.element.load_time attribute\"}]},\"ui.element.paint_type\":{brief:\"The type of element paint. Can either be 'image-paint' or 'text-paint'\",type:\"string\",applyScrubbing:{key:\"manual\"},isInOtel:!1,visibility:\"public\",example:\"image-paint\",changelog:[{version:\"0.5.0\",prs:[284],description:\"Added ui.element.paint_type attribute\"}]},\"ui.element.render_time\":{brief:\"The rendering time of the UI element (from time origin to finished rendering)\",type:\"double\",applyScrubbing:{key:\"manual\"},isInOtel:!1,visibility:\"public\",example:1023.1124,changelog:[{version:\"0.5.0\",prs:[284],description:\"Added ui.element.render_time attribute\"}]},\"ui.element.type\":{brief:\"type of the UI element\",type:\"string\",applyScrubbing:{key:\"manual\"},isInOtel:!1,visibility:\"public\",example:\"img\",changelog:[{version:\"0.5.0\",prs:[284],description:\"Added ui.element.type attribute\"}]},\"ui.element.url\":{brief:\"The URL of the UI element (e.g. an img src)\",type:\"string\",applyScrubbing:{key:\"auto\"},isInOtel:!1,visibility:\"public\",example:\"https://assets.myapp.com/hero.png\",changelog:[{version:\"0.5.0\",prs:[284],description:\"Added ui.element.url attribute\"}]},\"ui.element.width\":{brief:\"The width of the UI element (for HTML in pixels)\",type:\"integer\",applyScrubbing:{key:\"manual\"},isInOtel:!1,visibility:\"public\",example:512,changelog:[{version:\"0.5.0\",prs:[284],description:\"Added ui.element.width attribute\"}]},url:{brief:\"The URL of the resource that was fetched.\",type:\"string\",applyScrubbing:{key:\"auto\"},isInOtel:!1,visibility:\"public\",example:\"https://example.com/test?foo=bar#buzz\",deprecation:{replacement:\"url.full\"},aliases:[\"url.full\",\"http.url\"],changelog:[{version:\"0.1.0\",prs:[61]},{version:\"0.0.0\"}]},\"url.domain\":{brief:\"Server domain name if available without reverse DNS lookup; otherwise, IP address or Unix domain socket name.\",type:\"string\",applyScrubbing:{key:\"manual\"},isInOtel:!0,visibility:\"public\",example:\"example.com\",changelog:[{version:\"0.1.0\",prs:[127]},{version:\"0.0.0\"}]},\"url.fragment\":{brief:\"The fragments present in the URI. Note that this does not contain the leading # character, while the `http.fragment` attribute does.\",type:\"string\",applyScrubbing:{key:\"auto\"},isInOtel:!0,visibility:\"public\",example:\"details\",changelog:[{version:\"0.0.0\"}]},\"url.full\":{brief:\"The URL of the resource that was fetched.\",type:\"string\",applyScrubbing:{key:\"auto\"},isInOtel:!0,visibility:\"public\",example:\"https://example.com/test?foo=bar#buzz\",aliases:[\"http.url\",\"url\"],changelog:[{version:\"0.1.0\",prs:[108]},{version:\"0.0.0\"}]},\"url.path\":{brief:\"The URI path component.\",type:\"string\",applyScrubbing:{key:\"auto\"},isInOtel:!0,visibility:\"public\",example:\"/foo\",changelog:[{version:\"0.0.0\"}]},\"url.path.parameter.<key>\":{brief:\"Decoded parameters extracted from a URL path. Usually added by client-side routing frameworks like vue-router.\",type:\"string\",applyScrubbing:{key:\"auto\"},isInOtel:!1,visibility:\"public\",hasDynamicSuffix:!0,example:\"url.path.parameter.id='123'\",aliases:[\"params.<key>\"],changelog:[{version:\"0.1.0\",prs:[103]}]},\"url.port\":{brief:\"Server port number.\",type:\"integer\",applyScrubbing:{key:\"manual\"},isInOtel:!0,visibility:\"public\",example:1337,changelog:[{version:\"0.4.0\",prs:[228]},{version:\"0.0.0\"}]},\"url.query\":{brief:\"The query string present in the URL. Note that this does not contain the leading ? character, while the `http.query` attribute does.\",type:\"string\",applyScrubbing:{key:\"auto\",reason:\"Query string values can contain sensitive information. Clients should attempt to scrub parameters that might contain sensitive information.\"},isInOtel:!0,visibility:\"public\",example:\"foo=bar&bar=baz\",changelog:[{version:\"0.0.0\"}]},\"url.same_origin\":{brief:\"Indicates that a URL has the same origin as the current page's origin in the browser.\",type:\"boolean\",applyScrubbing:{key:\"manual\"},isInOtel:!1,visibility:\"public\",example:!0,deprecation:{replacement:\"http.request.same_origin\",reason:\"This attribute is being deprecated in favor of http.request.same_origin.\"},aliases:[\"http.request.same_origin\"],changelog:[{version:\"0.16.0\",prs:[456],description:\"Added url.same_origin attribute, deprecated in favor of http.request.same_origin\"}]},\"url.scheme\":{brief:\"The URI scheme component identifying the used protocol.\",type:\"string\",applyScrubbing:{key:\"manual\"},isInOtel:!0,visibility:\"public\",example:\"https\",aliases:[\"http.scheme\"],changelog:[{version:\"0.1.0\",prs:[127]},{version:\"0.0.0\"}]},\"url.template\":{brief:\"The low-cardinality template of an absolute path reference.\",type:\"string\",applyScrubbing:{key:\"manual\"},isInOtel:!0,visibility:\"public\",example:\"/users/:id\",aliases:[\"http.route\"],changelog:[{version:\"0.1.0\",prs:[127]},{version:\"0.0.0\"}]},\"user_agent.original\":{brief:\"Value of the HTTP User-Agent header sent by the client.\",type:\"string\",applyScrubbing:{key:\"manual\"},isInOtel:!0,visibility:\"public\",example:\"Mozilla/5.0 (iPhone; CPU iPhone OS 14_7_1 like Mac OS X) AppleWebKit/605.1.15 (KHTML, like Gecko) Version/14.1.2 Mobile/15E148 Safari/604.1\",aliases:[\"http.user_agent\"],changelog:[{version:\"0.1.0\",prs:[127]},{version:\"0.0.0\"}]},\"user.email\":{brief:\"User email address.\",type:\"string\",applyScrubbing:{key:\"auto\"},isInOtel:!0,visibility:\"public\",example:\"test@example.com\",aliases:[\"sentry.user.email\"],changelog:[{version:\"0.0.0\"}]},\"user.full_name\":{brief:\"User's full name.\",type:\"string\",applyScrubbing:{key:\"auto\"},isInOtel:!0,visibility:\"public\",example:\"John Smith\",changelog:[{version:\"0.0.0\"}]},\"user.geo.city\":{brief:\"Human readable city name.\",type:\"string\",applyScrubbing:{key:\"manual\"},isInOtel:!1,visibility:\"public\",example:\"Toronto\",aliases:[\"sentry.user.geo.city\"],changelog:[{version:\"0.0.0\"}]},\"user.geo.country_code\":{brief:\"Two-letter country code (ISO 3166-1 alpha-2).\",type:\"string\",applyScrubbing:{key:\"manual\"},isInOtel:!1,visibility:\"public\",example:\"CA\",aliases:[\"sentry.user.geo.country_code\"],changelog:[{version:\"0.0.0\"}]},\"user.geo.region\":{brief:\"Human readable region name or code.\",type:\"string\",applyScrubbing:{key:\"manual\"},isInOtel:!1,visibility:\"public\",example:\"Canada\",aliases:[\"sentry.user.geo.region\"],changelog:[{version:\"0.0.0\"}]},\"user.geo.subdivision\":{brief:\"Human readable subdivision name.\",type:\"string\",applyScrubbing:{key:\"manual\"},isInOtel:!1,visibility:\"public\",example:\"Ontario\",aliases:[\"sentry.user.geo.subdivision\"],changelog:[{version:\"0.0.0\"}]},\"user.hash\":{brief:\"Unique user hash to correlate information for a user in anonymized form.\",type:\"string\",applyScrubbing:{key:\"auto\"},isInOtel:!0,visibility:\"public\",example:\"8ae4c2993e0f4f3b8b2d1b1f3b5e8f4d\",changelog:[{version:\"0.0.0\"}]},\"user.id\":{brief:\"Unique identifier of the user.\",type:\"string\",applyScrubbing:{key:\"auto\"},isInOtel:!0,visibility:\"public\",example:\"S-1-5-21-202424912787-2692429404-2351956786-1000\",aliases:[\"sentry.user.id\"],changelog:[{version:\"0.0.0\"}]},\"user.ip_address\":{brief:\"The IP address of the user.\",type:\"string\",applyScrubbing:{key:\"auto\"},isInOtel:!1,visibility:\"public\",example:\"192.168.1.1\",aliases:[\"sentry.user.ip\"],changelog:[{version:\"0.1.0\",prs:[75]}]},\"user.name\":{brief:\"Short name or login/username of the user.\",type:\"string\",applyScrubbing:{key:\"auto\"},isInOtel:!0,visibility:\"public\",example:\"j.smith\",aliases:[\"sentry.user.username\"],changelog:[{version:\"0.0.0\"}]},\"user.roles\":{brief:\"Array of user roles at the time of the event.\",type:\"string[]\",applyScrubbing:{key:\"auto\"},isInOtel:!0,visibility:\"public\",example:[\"admin\",\"editor\"],changelog:[{version:\"0.0.0\"}]},\"vercel.branch\":{brief:\"Git branch name for Vercel project\",type:\"string\",applyScrubbing:{key:\"manual\"},isInOtel:!1,visibility:\"public\",example:\"main\",changelog:[{version:\"0.2.0\",prs:[163]}]},\"vercel.build_id\":{brief:\"Identifier for the Vercel build (only present on build logs)\",type:\"string\",applyScrubbing:{key:\"manual\"},isInOtel:!1,visibility:\"public\",example:\"bld_cotnkcr76\",changelog:[{version:\"0.2.0\",prs:[163]}]},\"vercel.deployment_id\":{brief:\"Identifier for the Vercel deployment\",type:\"string\",applyScrubbing:{key:\"manual\"},isInOtel:!1,visibility:\"public\",example:\"dpl_233NRGRjVZX1caZrXWtz5g1TAksD\",changelog:[{version:\"0.2.0\",prs:[163]}]},\"vercel.destination\":{brief:\"Origin of the external content in Vercel (only on external logs)\",type:\"string\",applyScrubbing:{key:\"manual\"},isInOtel:!1,visibility:\"public\",example:\"https://vitals.vercel-insights.com/v1\",changelog:[{version:\"0.2.0\",prs:[163]}]},\"vercel.edge_type\":{brief:\"Type of edge runtime in Vercel\",type:\"string\",applyScrubbing:{key:\"manual\"},isInOtel:!1,visibility:\"public\",example:\"edge-function\",changelog:[{version:\"0.2.0\",prs:[163]}]},\"vercel.entrypoint\":{brief:\"Entrypoint for the request in Vercel\",type:\"string\",applyScrubbing:{key:\"manual\"},isInOtel:!1,visibility:\"public\",example:\"api/index.js\",changelog:[{version:\"0.2.0\",prs:[163]}]},\"vercel.execution_region\":{brief:\"Region where the request is executed\",type:\"string\",applyScrubbing:{key:\"manual\"},isInOtel:!1,visibility:\"public\",example:\"sfo1\",changelog:[{version:\"0.2.0\",prs:[163]}]},\"vercel.id\":{brief:\"Unique identifier for the log entry in Vercel\",type:\"string\",applyScrubbing:{key:\"manual\"},isInOtel:!1,visibility:\"public\",example:\"1573817187330377061717300000\",changelog:[{version:\"0.2.0\",prs:[163]}]},\"vercel.ja3_digest\":{brief:\"JA3 fingerprint digest of Vercel request\",type:\"string\",applyScrubbing:{key:\"auto\"},isInOtel:!1,visibility:\"public\",example:\"769,47-53-5-10-49161-49162-49171-49172-50-56-19-4,0-10-11,23-24-25,0\",changelog:[{version:\"0.2.0\",prs:[163]}]},\"vercel.ja4_digest\":{brief:\"JA4 fingerprint digest\",type:\"string\",applyScrubbing:{key:\"auto\"},isInOtel:!1,visibility:\"public\",example:\"t13d1516h2_8daaf6152771_02713d6af862\",changelog:[{version:\"0.2.0\",prs:[163]}]},\"vercel.log_type\":{brief:\"Vercel log output type\",type:\"string\",applyScrubbing:{key:\"manual\"},isInOtel:!1,visibility:\"public\",example:\"stdout\",changelog:[{version:\"0.2.0\",prs:[163]}]},\"vercel.path\":{brief:\"Function or dynamic path of the request in Vercel.\",type:\"string\",applyScrubbing:{key:\"manual\"},isInOtel:!1,visibility:\"public\",example:\"/dynamic/[route].json\",changelog:[{version:\"0.6.0\",prs:[349],description:\"Added vercel.path attribute\"}]},\"vercel.project_id\":{brief:\"Identifier for the Vercel project\",type:\"string\",applyScrubbing:{key:\"manual\"},isInOtel:!1,visibility:\"public\",example:\"gdufoJxB6b9b1fEqr1jUtFkyavUU\",changelog:[{version:\"0.2.0\",prs:[163]}]},\"vercel.project_name\":{brief:\"Name of the Vercel project\",type:\"string\",applyScrubbing:{key:\"manual\"},isInOtel:!1,visibility:\"public\",example:\"my-app\",changelog:[{version:\"0.2.0\",prs:[163]}]},\"vercel.proxy.cache_id\":{brief:\"Original request ID when request is served from cache\",type:\"string\",applyScrubbing:{key:\"manual\"},isInOtel:!1,visibility:\"public\",example:\"pdx1::v8g4b-1744143786684-93dafbc0f70d\",changelog:[{version:\"0.2.0\",prs:[163]}]},\"vercel.proxy.client_ip\":{brief:\"Client IP address\",type:\"string\",applyScrubbing:{key:\"auto\"},isInOtel:!1,visibility:\"public\",example:\"120.75.16.101\",changelog:[{version:\"0.2.0\",prs:[163]}]},\"vercel.proxy.host\":{brief:\"Hostname of the request\",type:\"string\",applyScrubbing:{key:\"manual\"},isInOtel:!1,visibility:\"public\",example:\"test.vercel.app\",changelog:[{version:\"0.2.0\",prs:[163]}]},\"vercel.proxy.lambda_region\":{brief:\"Region where lambda function executed\",type:\"string\",applyScrubbing:{key:\"manual\"},isInOtel:!1,visibility:\"public\",example:\"sfo1\",changelog:[{version:\"0.2.0\",prs:[163]}]},\"vercel.proxy.method\":{brief:\"HTTP method of the request\",type:\"string\",applyScrubbing:{key:\"manual\"},isInOtel:!1,visibility:\"public\",example:\"GET\",changelog:[{version:\"0.2.0\",prs:[163]}]},\"vercel.proxy.path\":{brief:\"Request path with query parameters\",type:\"string\",applyScrubbing:{key:\"auto\"},isInOtel:!1,visibility:\"public\",example:\"/dynamic/some-value.json?route=some-value\",changelog:[{version:\"0.2.0\",prs:[163]}]},\"vercel.proxy.path_type\":{brief:\"How the request was served based on its path and project configuration\",type:\"string\",applyScrubbing:{key:\"manual\"},isInOtel:!1,visibility:\"public\",example:\"func\",changelog:[{version:\"0.2.0\",prs:[163]}]},\"vercel.proxy.path_type_variant\":{brief:\"Variant of the path type\",type:\"string\",applyScrubbing:{key:\"manual\"},isInOtel:!1,visibility:\"public\",example:\"api\",changelog:[{version:\"0.2.0\",prs:[163]}]},\"vercel.proxy.referer\":{brief:\"Referer of the request\",type:\"string\",applyScrubbing:{key:\"auto\"},isInOtel:!1,visibility:\"public\",example:\"*.vercel.app\",changelog:[{version:\"0.2.0\",prs:[163]}]},\"vercel.proxy.region\":{brief:\"Region where the request is processed\",type:\"string\",applyScrubbing:{key:\"manual\"},isInOtel:!1,visibility:\"public\",example:\"sfo1\",changelog:[{version:\"0.2.0\",prs:[163]}]},\"vercel.proxy.response_byte_size\":{brief:\"Size of the response in bytes\",type:\"integer\",applyScrubbing:{key:\"manual\"},isInOtel:!1,visibility:\"public\",example:1024,changelog:[{version:\"0.4.0\",prs:[228]},{version:\"0.2.0\",prs:[163]}]},\"vercel.proxy.scheme\":{brief:\"Protocol of the request\",type:\"string\",applyScrubbing:{key:\"manual\"},isInOtel:!1,visibility:\"public\",example:\"https\",changelog:[{version:\"0.2.0\",prs:[163]}]},\"vercel.proxy.status_code\":{brief:\"HTTP status code of the proxy request\",type:\"integer\",applyScrubbing:{key:\"manual\"},isInOtel:!1,visibility:\"public\",example:200,changelog:[{version:\"0.4.0\",prs:[228]},{version:\"0.2.0\",prs:[163]}]},\"vercel.proxy.timestamp\":{brief:\"Unix timestamp when the proxy request was made\",type:\"integer\",applyScrubbing:{key:\"manual\"},isInOtel:!1,visibility:\"public\",example:1573817250172,changelog:[{version:\"0.4.0\",prs:[228]},{version:\"0.2.0\",prs:[163]}]},\"vercel.proxy.user_agent\":{brief:\"User agent strings of the request\",type:\"string[]\",applyScrubbing:{key:\"manual\"},isInOtel:!1,visibility:\"public\",example:[\"Mozilla/5.0...\"],changelog:[{version:\"0.2.0\",prs:[163]}]},\"vercel.proxy.vercel_cache\":{brief:\"Cache status sent to the browser\",type:\"string\",applyScrubbing:{key:\"manual\"},isInOtel:!1,visibility:\"public\",example:\"REVALIDATED\",changelog:[{version:\"0.2.0\",prs:[163]}]},\"vercel.proxy.vercel_id\":{brief:\"Vercel-specific identifier\",type:\"string\",applyScrubbing:{key:\"manual\"},isInOtel:!1,visibility:\"public\",example:\"sfo1::abc123\",changelog:[{version:\"0.2.0\",prs:[163]}]},\"vercel.proxy.waf_action\":{brief:\"Action taken by firewall rules\",type:\"string\",applyScrubbing:{key:\"manual\"},isInOtel:!1,visibility:\"public\",example:\"deny\",changelog:[{version:\"0.2.0\",prs:[163]}]},\"vercel.proxy.waf_rule_id\":{brief:\"ID of the firewall rule that matched\",type:\"string\",applyScrubbing:{key:\"manual\"},isInOtel:!1,visibility:\"public\",example:\"rule_gAHz8jtSB1Gy\",changelog:[{version:\"0.2.0\",prs:[163]}]},\"vercel.request_id\":{brief:\"Identifier of the Vercel request\",type:\"string\",applyScrubbing:{key:\"manual\"},isInOtel:!1,visibility:\"public\",example:\"643af4e3-975a-4cc7-9e7a-1eda11539d90\",changelog:[{version:\"0.2.0\",prs:[163]}]},\"vercel.source\":{brief:\"Origin of the Vercel log (build, edge, lambda, static, external, or firewall)\",type:\"string\",applyScrubbing:{key:\"manual\"},isInOtel:!1,visibility:\"public\",example:\"build\",changelog:[{version:\"0.2.0\",prs:[163]}]},\"vercel.status_code\":{brief:\"HTTP status code of the request (-1 means no response returned and the lambda crashed)\",type:\"integer\",applyScrubbing:{key:\"manual\"},isInOtel:!1,visibility:\"public\",example:200,changelog:[{version:\"0.4.0\",prs:[228]},{version:\"0.2.0\",prs:[163]}]}};exports.AI_CITATIONS=AI_CITATIONS,exports.AI_COMPLETION_TOKENS_USED=AI_COMPLETION_TOKENS_USED,exports.AI_DOCUMENTS=AI_DOCUMENTS,exports.AI_FINISH_REASON=AI_FINISH_REASON,exports.AI_FREQUENCY_PENALTY=AI_FREQUENCY_PENALTY,exports.AI_FUNCTION_CALL=AI_FUNCTION_CALL,exports.AI_GENERATION_ID=AI_GENERATION_ID,exports.AI_INPUT_MESSAGES=AI_INPUT_MESSAGES,exports.AI_IS_SEARCH_REQUIRED=AI_IS_SEARCH_REQUIRED,exports.AI_METADATA=AI_METADATA,exports.AI_MODEL_ID=AI_MODEL_ID,exports.AI_MODEL_PROVIDER=AI_MODEL_PROVIDER,exports.AI_PIPELINE_NAME=AI_PIPELINE_NAME,exports.AI_PREAMBLE=AI_PREAMBLE,exports.AI_PRESENCE_PENALTY=AI_PRESENCE_PENALTY,exports.AI_PROMPT_TOKENS_USED=AI_PROMPT_TOKENS_USED,exports.AI_RAW_PROMPTING=AI_RAW_PROMPTING,exports.AI_RESPONSES=AI_RESPONSES,exports.AI_RESPONSE_FORMAT=AI_RESPONSE_FORMAT,exports.AI_SEARCH_QUERIES=AI_SEARCH_QUERIES,exports.AI_SEARCH_RESULTS=AI_SEARCH_RESULTS,exports.AI_SEED=AI_SEED,exports.AI_STREAMING=AI_STREAMING,exports.AI_TAGS=AI_TAGS,exports.AI_TEMPERATURE=AI_TEMPERATURE,exports.AI_TEXTS=AI_TEXTS,exports.AI_TOOLS=AI_TOOLS,exports.AI_TOOL_CALLS=AI_TOOL_CALLS,exports.AI_TOP_K=AI_TOP_K,exports.AI_TOP_P=AI_TOP_P,exports.AI_TOTAL_COST=AI_TOTAL_COST,exports.AI_TOTAL_TOKENS_USED=AI_TOTAL_TOKENS_USED,exports.AI_WARNINGS=AI_WARNINGS,exports.ANGULAR_VERSION=ANGULAR_VERSION,exports.APP_APP_BUILD=APP_APP_BUILD,exports.APP_APP_IDENTIFIER=APP_APP_IDENTIFIER,exports.APP_APP_NAME=APP_APP_NAME,exports.APP_APP_START_TIME=APP_APP_START_TIME,exports.APP_APP_VERSION=APP_APP_VERSION,exports.APP_BUILD=APP_BUILD,exports.APP_IDENTIFIER=APP_IDENTIFIER,exports.APP_IN_FOREGROUND=APP_IN_FOREGROUND,exports.APP_NAME=APP_NAME,exports.APP_START_COLD=APP_START_COLD,exports.APP_START_TIME=APP_START_TIME,exports.APP_START_TYPE=APP_START_TYPE,exports.APP_START_WARM=APP_START_WARM,exports.APP_VERSION=APP_VERSION,exports.APP_VITALS_FRAMES_DELAY_VALUE=APP_VITALS_FRAMES_DELAY_VALUE,exports.APP_VITALS_FRAMES_FROZEN_COUNT=APP_VITALS_FRAMES_FROZEN_COUNT,exports.APP_VITALS_FRAMES_SLOW_COUNT=APP_VITALS_FRAMES_SLOW_COUNT,exports.APP_VITALS_FRAMES_TOTAL_COUNT=APP_VITALS_FRAMES_TOTAL_COUNT,exports.APP_VITALS_START_COLD_VALUE=APP_VITALS_START_COLD_VALUE,exports.APP_VITALS_START_PREWARMED=APP_VITALS_START_PREWARMED,exports.APP_VITALS_START_REASON=APP_VITALS_START_REASON,exports.APP_VITALS_START_SCREEN=APP_VITALS_START_SCREEN,exports.APP_VITALS_START_TYPE=APP_VITALS_START_TYPE,exports.APP_VITALS_START_WARM_VALUE=APP_VITALS_START_WARM_VALUE,exports.APP_VITALS_TTFD_VALUE=APP_VITALS_TTFD_VALUE,exports.APP_VITALS_TTID_VALUE=APP_VITALS_TTID_VALUE,exports.ART_GC_BLOCKING_COUNT=ART_GC_BLOCKING_COUNT,exports.ART_GC_BLOCKING_TIME=ART_GC_BLOCKING_TIME,exports.ART_GC_PRE_OOME_COUNT=ART_GC_PRE_OOME_COUNT,exports.ART_GC_TOTAL_COUNT=ART_GC_TOTAL_COUNT,exports.ART_GC_TOTAL_TIME=ART_GC_TOTAL_TIME,exports.ART_GC_WAITING_TIME=ART_GC_WAITING_TIME,exports.ART_MEMORY_FREE=ART_MEMORY_FREE,exports.ART_MEMORY_FREE_UNTIL_GC=ART_MEMORY_FREE_UNTIL_GC,exports.ART_MEMORY_FREE_UNTIL_OOME=ART_MEMORY_FREE_UNTIL_OOME,exports.ART_MEMORY_MAX=ART_MEMORY_MAX,exports.ART_MEMORY_TOTAL=ART_MEMORY_TOTAL,exports.ATTRIBUTE_METADATA=ATTRIBUTE_METADATA,exports.ATTRIBUTE_TYPE=ATTRIBUTE_TYPE,exports.AWS_CLOUDWATCH_LOGS_LOG_GROUP=AWS_CLOUDWATCH_LOGS_LOG_GROUP,exports.AWS_CLOUDWATCH_LOGS_LOG_STREAM=AWS_CLOUDWATCH_LOGS_LOG_STREAM,exports.AWS_CLOUDWATCH_LOGS_URL=AWS_CLOUDWATCH_LOGS_URL,exports.AWS_DYNAMODB_ATTRIBUTE_DEFINITIONS=AWS_DYNAMODB_ATTRIBUTE_DEFINITIONS,exports.AWS_DYNAMODB_CONSISTENT_READ=AWS_DYNAMODB_CONSISTENT_READ,exports.AWS_DYNAMODB_CONSUMED_CAPACITY=AWS_DYNAMODB_CONSUMED_CAPACITY,exports.AWS_DYNAMODB_COUNT=AWS_DYNAMODB_COUNT,exports.AWS_DYNAMODB_EXCLUSIVE_START_TABLE=AWS_DYNAMODB_EXCLUSIVE_START_TABLE,exports.AWS_DYNAMODB_GLOBAL_SECONDARY_INDEXES=AWS_DYNAMODB_GLOBAL_SECONDARY_INDEXES,exports.AWS_DYNAMODB_GLOBAL_SECONDARY_INDEX_UPDATES=AWS_DYNAMODB_GLOBAL_SECONDARY_INDEX_UPDATES,exports.AWS_DYNAMODB_INDEX_NAME=AWS_DYNAMODB_INDEX_NAME,exports.AWS_DYNAMODB_ITEM_COLLECTION_METRICS=AWS_DYNAMODB_ITEM_COLLECTION_METRICS,exports.AWS_DYNAMODB_LIMIT=AWS_DYNAMODB_LIMIT,exports.AWS_DYNAMODB_LOCAL_SECONDARY_INDEXES=AWS_DYNAMODB_LOCAL_SECONDARY_INDEXES,exports.AWS_DYNAMODB_PROJECTION=AWS_DYNAMODB_PROJECTION,exports.AWS_DYNAMODB_PROVISIONED_READ_CAPACITY=AWS_DYNAMODB_PROVISIONED_READ_CAPACITY,exports.AWS_DYNAMODB_PROVISIONED_WRITE_CAPACITY=AWS_DYNAMODB_PROVISIONED_WRITE_CAPACITY,exports.AWS_DYNAMODB_SCANNED_COUNT=AWS_DYNAMODB_SCANNED_COUNT,exports.AWS_DYNAMODB_SCAN_FORWARD=AWS_DYNAMODB_SCAN_FORWARD,exports.AWS_DYNAMODB_SEGMENT=AWS_DYNAMODB_SEGMENT,exports.AWS_DYNAMODB_SELECT=AWS_DYNAMODB_SELECT,exports.AWS_DYNAMODB_TABLE_COUNT=AWS_DYNAMODB_TABLE_COUNT,exports.AWS_DYNAMODB_TABLE_NAMES=AWS_DYNAMODB_TABLE_NAMES,exports.AWS_DYNAMODB_TOTAL_SEGMENTS=AWS_DYNAMODB_TOTAL_SEGMENTS,exports.AWS_EXTENDED_REQUEST_ID=AWS_EXTENDED_REQUEST_ID,exports.AWS_KINESIS_STREAM_NAME=AWS_KINESIS_STREAM_NAME,exports.AWS_LAMBDA_AWS_REQUEST_ID=AWS_LAMBDA_AWS_REQUEST_ID,exports.AWS_LAMBDA_EXECUTION_DURATION_IN_MILLIS=AWS_LAMBDA_EXECUTION_DURATION_IN_MILLIS,exports.AWS_LAMBDA_FUNCTION_NAME=AWS_LAMBDA_FUNCTION_NAME,exports.AWS_LAMBDA_FUNCTION_VERSION=AWS_LAMBDA_FUNCTION_VERSION,exports.AWS_LAMBDA_INVOKED_ARN=AWS_LAMBDA_INVOKED_ARN,exports.AWS_LAMBDA_INVOKED_FUNCTION_ARN=AWS_LAMBDA_INVOKED_FUNCTION_ARN,exports.AWS_LAMBDA_REMAINING_TIME_IN_MILLIS=AWS_LAMBDA_REMAINING_TIME_IN_MILLIS,exports.AWS_LOG_GROUP_NAMES=AWS_LOG_GROUP_NAMES,exports.AWS_LOG_STREAM_NAMES=AWS_LOG_STREAM_NAMES,exports.AWS_REQUEST_EXTENDED_ID=AWS_REQUEST_EXTENDED_ID,exports.AWS_REQUEST_ID=AWS_REQUEST_ID,exports.AWS_S3_BUCKET=AWS_S3_BUCKET,exports.AWS_SECRETSMANAGER_SECRET_ARN=AWS_SECRETSMANAGER_SECRET_ARN,exports.AWS_SNS_TOPIC_ARN=AWS_SNS_TOPIC_ARN,exports.AWS_STEP_FUNCTIONS_ACTIVITY_ARN=AWS_STEP_FUNCTIONS_ACTIVITY_ARN,exports.AWS_STEP_FUNCTIONS_STATE_MACHINE_ARN=AWS_STEP_FUNCTIONS_STATE_MACHINE_ARN,exports.BLOCKED_MAIN_THREAD=BLOCKED_MAIN_THREAD,exports.BROWSER_NAME=BROWSER_NAME,exports.BROWSER_PERFORMANCE_NAVIGATION_ACTIVATION_START=BROWSER_PERFORMANCE_NAVIGATION_ACTIVATION_START,exports.BROWSER_PERFORMANCE_TIME_ORIGIN=BROWSER_PERFORMANCE_TIME_ORIGIN,exports.BROWSER_REPORT_TYPE=BROWSER_REPORT_TYPE,exports.BROWSER_SCRIPT_INVOKER=BROWSER_SCRIPT_INVOKER,exports.BROWSER_SCRIPT_INVOKER_TYPE=BROWSER_SCRIPT_INVOKER_TYPE,exports.BROWSER_SCRIPT_SOURCE_CHAR_POSITION=BROWSER_SCRIPT_SOURCE_CHAR_POSITION,exports.BROWSER_VERSION=BROWSER_VERSION,exports.BROWSER_WEB_VITAL_CLS_REPORT_EVENT=BROWSER_WEB_VITAL_CLS_REPORT_EVENT,exports.BROWSER_WEB_VITAL_CLS_SOURCE_KEY=BROWSER_WEB_VITAL_CLS_SOURCE_KEY,exports.BROWSER_WEB_VITAL_CLS_SOURCE_KEY_BASE=BROWSER_WEB_VITAL_CLS_SOURCE_KEY_BASE,exports.BROWSER_WEB_VITAL_CLS_VALUE=BROWSER_WEB_VITAL_CLS_VALUE,exports.BROWSER_WEB_VITAL_FCP_VALUE=BROWSER_WEB_VITAL_FCP_VALUE,exports.BROWSER_WEB_VITAL_FP_VALUE=BROWSER_WEB_VITAL_FP_VALUE,exports.BROWSER_WEB_VITAL_INP_VALUE=BROWSER_WEB_VITAL_INP_VALUE,exports.BROWSER_WEB_VITAL_LCP_ELEMENT=BROWSER_WEB_VITAL_LCP_ELEMENT,exports.BROWSER_WEB_VITAL_LCP_ID=BROWSER_WEB_VITAL_LCP_ID,exports.BROWSER_WEB_VITAL_LCP_LOAD_TIME=BROWSER_WEB_VITAL_LCP_LOAD_TIME,exports.BROWSER_WEB_VITAL_LCP_RENDER_TIME=BROWSER_WEB_VITAL_LCP_RENDER_TIME,exports.BROWSER_WEB_VITAL_LCP_REPORT_EVENT=BROWSER_WEB_VITAL_LCP_REPORT_EVENT,exports.BROWSER_WEB_VITAL_LCP_SIZE=BROWSER_WEB_VITAL_LCP_SIZE,exports.BROWSER_WEB_VITAL_LCP_URL=BROWSER_WEB_VITAL_LCP_URL,exports.BROWSER_WEB_VITAL_LCP_VALUE=BROWSER_WEB_VITAL_LCP_VALUE,exports.BROWSER_WEB_VITAL_TTFB_REQUEST_TIME=BROWSER_WEB_VITAL_TTFB_REQUEST_TIME,exports.BROWSER_WEB_VITAL_TTFB_VALUE=BROWSER_WEB_VITAL_TTFB_VALUE,exports.CACHE_HIT=CACHE_HIT,exports.CACHE_ITEM_SIZE=CACHE_ITEM_SIZE,exports.CACHE_KEY=CACHE_KEY,exports.CACHE_OPERATION=CACHE_OPERATION,exports.CACHE_TTL=CACHE_TTL,exports.CACHE_WRITE=CACHE_WRITE,exports.CHANNEL=CHANNEL,exports.CLIENT_ADDRESS=CLIENT_ADDRESS,exports.CLIENT_PORT=CLIENT_PORT,exports.CLOUDFLARE_D1_DURATION=CLOUDFLARE_D1_DURATION,exports.CLOUDFLARE_D1_QUERY_TYPE=CLOUDFLARE_D1_QUERY_TYPE,exports.CLOUDFLARE_D1_ROWS_READ=CLOUDFLARE_D1_ROWS_READ,exports.CLOUDFLARE_D1_ROWS_WRITTEN=CLOUDFLARE_D1_ROWS_WRITTEN,exports.CLOUDFLARE_DURABLE_OBJECT_QUERY_BINDINGS=CLOUDFLARE_DURABLE_OBJECT_QUERY_BINDINGS,exports.CLOUDFLARE_DURABLE_OBJECT_RESPONSE_ROWS_READ=CLOUDFLARE_DURABLE_OBJECT_RESPONSE_ROWS_READ,exports.CLOUDFLARE_DURABLE_OBJECT_RESPONSE_ROWS_WRITTEN=CLOUDFLARE_DURABLE_OBJECT_RESPONSE_ROWS_WRITTEN,exports.CLOUDFLARE_R2_BUCKET=CLOUDFLARE_R2_BUCKET,exports.CLOUDFLARE_R2_OPERATION=CLOUDFLARE_R2_OPERATION,exports.CLOUDFLARE_R2_REQUEST_DELIMITER=CLOUDFLARE_R2_REQUEST_DELIMITER,exports.CLOUDFLARE_R2_REQUEST_KEY=CLOUDFLARE_R2_REQUEST_KEY,exports.CLOUDFLARE_R2_REQUEST_PART_NUMBER=CLOUDFLARE_R2_REQUEST_PART_NUMBER,exports.CLOUDFLARE_R2_REQUEST_PREFIX=CLOUDFLARE_R2_REQUEST_PREFIX,exports.CLOUDFLARE_WORKFLOW_ATTEMPT=CLOUDFLARE_WORKFLOW_ATTEMPT,exports.CLOUDFLARE_WORKFLOW_RETRIES_BACKOFF=CLOUDFLARE_WORKFLOW_RETRIES_BACKOFF,exports.CLOUDFLARE_WORKFLOW_RETRIES_DELAY=CLOUDFLARE_WORKFLOW_RETRIES_DELAY,exports.CLOUDFLARE_WORKFLOW_RETRIES_LIMIT=CLOUDFLARE_WORKFLOW_RETRIES_LIMIT,exports.CLOUDFLARE_WORKFLOW_TIMEOUT=CLOUDFLARE_WORKFLOW_TIMEOUT,exports.CLOUD_ACCOUNT_ID=CLOUD_ACCOUNT_ID,exports.CLOUD_AVAILABILITY_ZONE=CLOUD_AVAILABILITY_ZONE,exports.CLOUD_PLATFORM=CLOUD_PLATFORM,exports.CLOUD_PROVIDER=CLOUD_PROVIDER,exports.CLOUD_REGION=CLOUD_REGION,exports.CLOUD_RESOURCE_ID=CLOUD_RESOURCE_ID,exports.CLS=\"cls\",exports.CLS_SOURCE_KEY=CLS_SOURCE_KEY,exports.CLS_SOURCE_KEY_BASE=CLS_SOURCE_KEY_BASE,exports.CODE_FILEPATH=CODE_FILEPATH,exports.CODE_FILE_PATH=CODE_FILE_PATH,exports.CODE_FUNCTION=CODE_FUNCTION,exports.CODE_FUNCTION_NAME=CODE_FUNCTION_NAME,exports.CODE_LINENO=CODE_LINENO,exports.CODE_LINE_NUMBER=CODE_LINE_NUMBER,exports.CODE_NAMESPACE=CODE_NAMESPACE,exports.CONNECTIONTYPE=CONNECTIONTYPE,exports.CONNECTION_RTT=CONNECTION_RTT,exports.CULTURE_CALENDAR=CULTURE_CALENDAR,exports.CULTURE_DISPLAY_NAME=CULTURE_DISPLAY_NAME,exports.CULTURE_IS_24_HOUR_FORMAT=CULTURE_IS_24_HOUR_FORMAT,exports.CULTURE_LOCALE=CULTURE_LOCALE,exports.CULTURE_TIMEZONE=CULTURE_TIMEZONE,exports.DB_COLLECTION_NAME=DB_COLLECTION_NAME,exports.DB_DRIVER_NAME=DB_DRIVER_NAME,exports.DB_NAME=DB_NAME,exports.DB_NAMESPACE=DB_NAMESPACE,exports.DB_OPERATION=DB_OPERATION,exports.DB_OPERATION_BATCH_SIZE=DB_OPERATION_BATCH_SIZE,exports.DB_OPERATION_NAME=DB_OPERATION_NAME,exports.DB_QUERY_PARAMETER_KEY=DB_QUERY_PARAMETER_KEY,exports.DB_QUERY_PARAMETER_KEY_BASE=DB_QUERY_PARAMETER_KEY_BASE,exports.DB_QUERY_SUMMARY=DB_QUERY_SUMMARY,exports.DB_QUERY_TEXT=DB_QUERY_TEXT,exports.DB_REDIS_CONNECTION=DB_REDIS_CONNECTION,exports.DB_REDIS_KEY=DB_REDIS_KEY,exports.DB_REDIS_PARAMETERS=DB_REDIS_PARAMETERS,exports.DB_RESPONSE_STATUS_CODE=DB_RESPONSE_STATUS_CODE,exports.DB_SQL_BINDINGS=DB_SQL_BINDINGS,exports.DB_STATEMENT=DB_STATEMENT,exports.DB_STORED_PROCEDURE_NAME=DB_STORED_PROCEDURE_NAME,exports.DB_SYSTEM=DB_SYSTEM,exports.DB_SYSTEM_NAME=DB_SYSTEM_NAME,exports.DB_USER=DB_USER,exports.DEVICEMEMORY=DEVICEMEMORY,exports.DEVICE_ARCHS=DEVICE_ARCHS,exports.DEVICE_BATTERY_LEVEL=DEVICE_BATTERY_LEVEL,exports.DEVICE_BATTERY_TEMPERATURE=DEVICE_BATTERY_TEMPERATURE,exports.DEVICE_BOOT_TIME=DEVICE_BOOT_TIME,exports.DEVICE_BRAND=DEVICE_BRAND,exports.DEVICE_CHARGING=DEVICE_CHARGING,exports.DEVICE_CHIPSET=DEVICE_CHIPSET,exports.DEVICE_CLASS=DEVICE_CLASS,exports.DEVICE_CONNECTION_TYPE=DEVICE_CONNECTION_TYPE,exports.DEVICE_CPU_DESCRIPTION=DEVICE_CPU_DESCRIPTION,exports.DEVICE_EXTERNAL_FREE_STORAGE=DEVICE_EXTERNAL_FREE_STORAGE,exports.DEVICE_EXTERNAL_STORAGE_SIZE=DEVICE_EXTERNAL_STORAGE_SIZE,exports.DEVICE_FAMILY=DEVICE_FAMILY,exports.DEVICE_FREE_MEMORY=DEVICE_FREE_MEMORY,exports.DEVICE_FREE_STORAGE=DEVICE_FREE_STORAGE,exports.DEVICE_ID=DEVICE_ID,exports.DEVICE_LOCALE=DEVICE_LOCALE,exports.DEVICE_LOW_MEMORY=DEVICE_LOW_MEMORY,exports.DEVICE_LOW_POWER_MODE=DEVICE_LOW_POWER_MODE,exports.DEVICE_MANUFACTURER=DEVICE_MANUFACTURER,exports.DEVICE_MEMORY_ESTIMATED_CAPACITY=DEVICE_MEMORY_ESTIMATED_CAPACITY,exports.DEVICE_MEMORY_SIZE=DEVICE_MEMORY_SIZE,exports.DEVICE_MODEL=DEVICE_MODEL,exports.DEVICE_MODEL_ID=DEVICE_MODEL_ID,exports.DEVICE_NAME=DEVICE_NAME,exports.DEVICE_ONLINE=DEVICE_ONLINE,exports.DEVICE_ORIENTATION=DEVICE_ORIENTATION,exports.DEVICE_PROCESSOR_COUNT=DEVICE_PROCESSOR_COUNT,exports.DEVICE_PROCESSOR_FREQUENCY=DEVICE_PROCESSOR_FREQUENCY,exports.DEVICE_SCREEN_DENSITY=DEVICE_SCREEN_DENSITY,exports.DEVICE_SCREEN_DPI=DEVICE_SCREEN_DPI,exports.DEVICE_SCREEN_HEIGHT_PIXELS=DEVICE_SCREEN_HEIGHT_PIXELS,exports.DEVICE_SCREEN_WIDTH_PIXELS=DEVICE_SCREEN_WIDTH_PIXELS,exports.DEVICE_SIMULATOR=DEVICE_SIMULATOR,exports.DEVICE_STORAGE_SIZE=DEVICE_STORAGE_SIZE,exports.DEVICE_THERMAL_STATE=DEVICE_THERMAL_STATE,exports.DEVICE_TIMEZONE=DEVICE_TIMEZONE,exports.DEVICE_USABLE_MEMORY=DEVICE_USABLE_MEMORY,exports.DIST=DIST,exports.EFFECTIVECONNECTIONTYPE=EFFECTIVECONNECTIONTYPE,exports.ENVIRONMENT=ENVIRONMENT,exports.ERROR_TYPE=ERROR_TYPE,exports.EVENT_ID=EVENT_ID,exports.EVENT_NAME=EVENT_NAME,exports.EXCEPTION_ESCAPED=EXCEPTION_ESCAPED,exports.EXCEPTION_MESSAGE=EXCEPTION_MESSAGE,exports.EXCEPTION_STACKTRACE=EXCEPTION_STACKTRACE,exports.EXCEPTION_TYPE=EXCEPTION_TYPE,exports.FAAS_COLDSTART=FAAS_COLDSTART,exports.FAAS_CRON=FAAS_CRON,exports.FAAS_DURATION_IN_MS=FAAS_DURATION_IN_MS,exports.FAAS_ENTRY_POINT=FAAS_ENTRY_POINT,exports.FAAS_EXECUTION=FAAS_EXECUTION,exports.FAAS_ID=FAAS_ID,exports.FAAS_IDENTITY=FAAS_IDENTITY,exports.FAAS_INVOCATION_ID=FAAS_INVOCATION_ID,exports.FAAS_INVOKED_NAME=FAAS_INVOKED_NAME,exports.FAAS_INVOKED_PROVIDER=FAAS_INVOKED_PROVIDER,exports.FAAS_INVOKED_REGION=FAAS_INVOKED_REGION,exports.FAAS_NAME=FAAS_NAME,exports.FAAS_TIME=FAAS_TIME,exports.FAAS_TRIGGER=FAAS_TRIGGER,exports.FAAS_VERSION=FAAS_VERSION,exports.FCP=\"fcp\",exports.FLAG_EVALUATION_KEY=FLAG_EVALUATION_KEY,exports.FLAG_EVALUATION_KEY_BASE=FLAG_EVALUATION_KEY_BASE,exports.FP=\"fp\",exports.FRAMES_DELAY=FRAMES_DELAY,exports.FRAMES_FROZEN=FRAMES_FROZEN,exports.FRAMES_FROZEN_RATE=FRAMES_FROZEN_RATE,exports.FRAMES_SLOW=FRAMES_SLOW,exports.FRAMES_SLOW_RATE=FRAMES_SLOW_RATE,exports.FRAMES_TOTAL=FRAMES_TOTAL,exports.FS_ERROR=FS_ERROR,exports.GCP_FUNCTION_CONTEXT_EVENT_ID=GCP_FUNCTION_CONTEXT_EVENT_ID,exports.GCP_FUNCTION_CONTEXT_EVENT_TYPE=GCP_FUNCTION_CONTEXT_EVENT_TYPE,exports.GCP_FUNCTION_CONTEXT_ID=GCP_FUNCTION_CONTEXT_ID,exports.GCP_FUNCTION_CONTEXT_RESOURCE=GCP_FUNCTION_CONTEXT_RESOURCE,exports.GCP_FUNCTION_CONTEXT_SOURCE=GCP_FUNCTION_CONTEXT_SOURCE,exports.GCP_FUNCTION_CONTEXT_SPECVERSION=GCP_FUNCTION_CONTEXT_SPECVERSION,exports.GCP_FUNCTION_CONTEXT_TIME=GCP_FUNCTION_CONTEXT_TIME,exports.GCP_FUNCTION_CONTEXT_TIMESTAMP=GCP_FUNCTION_CONTEXT_TIMESTAMP,exports.GCP_FUNCTION_CONTEXT_TYPE=GCP_FUNCTION_CONTEXT_TYPE,exports.GCP_PROJECT_ID=GCP_PROJECT_ID,exports.GEN_AI_AGENT_NAME=GEN_AI_AGENT_NAME,exports.GEN_AI_CONTEXT_UTILIZATION=GEN_AI_CONTEXT_UTILIZATION,exports.GEN_AI_CONTEXT_WINDOW_SIZE=GEN_AI_CONTEXT_WINDOW_SIZE,exports.GEN_AI_CONVERSATION_ID=GEN_AI_CONVERSATION_ID,exports.GEN_AI_COST_CACHE_CREATION_INPUT_TOKENS=GEN_AI_COST_CACHE_CREATION_INPUT_TOKENS,exports.GEN_AI_COST_CACHE_READ_INPUT_TOKENS=GEN_AI_COST_CACHE_READ_INPUT_TOKENS,exports.GEN_AI_COST_INPUT_TOKENS=GEN_AI_COST_INPUT_TOKENS,exports.GEN_AI_COST_OUTPUT_TOKENS=GEN_AI_COST_OUTPUT_TOKENS,exports.GEN_AI_COST_REASONING_OUTPUT_TOKENS=GEN_AI_COST_REASONING_OUTPUT_TOKENS,exports.GEN_AI_COST_TOTAL_TOKENS=GEN_AI_COST_TOTAL_TOKENS,exports.GEN_AI_EMBEDDINGS_INPUT=GEN_AI_EMBEDDINGS_INPUT,exports.GEN_AI_FUNCTION_ID=GEN_AI_FUNCTION_ID,exports.GEN_AI_INPUT_MESSAGES=GEN_AI_INPUT_MESSAGES,exports.GEN_AI_OPERATION_NAME=GEN_AI_OPERATION_NAME,exports.GEN_AI_OPERATION_TYPE=GEN_AI_OPERATION_TYPE,exports.GEN_AI_OUTPUT_MESSAGES=GEN_AI_OUTPUT_MESSAGES,exports.GEN_AI_PIPELINE_NAME=GEN_AI_PIPELINE_NAME,exports.GEN_AI_PROMPT=GEN_AI_PROMPT,exports.GEN_AI_PROMPT_NAME=GEN_AI_PROMPT_NAME,exports.GEN_AI_PROVIDER_NAME=GEN_AI_PROVIDER_NAME,exports.GEN_AI_REQUEST_AVAILABLE_TOOLS=GEN_AI_REQUEST_AVAILABLE_TOOLS,exports.GEN_AI_REQUEST_FREQUENCY_PENALTY=GEN_AI_REQUEST_FREQUENCY_PENALTY,exports.GEN_AI_REQUEST_MAX_TOKENS=GEN_AI_REQUEST_MAX_TOKENS,exports.GEN_AI_REQUEST_MESSAGES=GEN_AI_REQUEST_MESSAGES,exports.GEN_AI_REQUEST_MODEL=GEN_AI_REQUEST_MODEL,exports.GEN_AI_REQUEST_PRESENCE_PENALTY=GEN_AI_REQUEST_PRESENCE_PENALTY,exports.GEN_AI_REQUEST_REASONING_EFFORT=GEN_AI_REQUEST_REASONING_EFFORT,exports.GEN_AI_REQUEST_SEED=GEN_AI_REQUEST_SEED,exports.GEN_AI_REQUEST_STOP_SEQUENCES=GEN_AI_REQUEST_STOP_SEQUENCES,exports.GEN_AI_REQUEST_TEMPERATURE=GEN_AI_REQUEST_TEMPERATURE,exports.GEN_AI_REQUEST_TOP_K=GEN_AI_REQUEST_TOP_K,exports.GEN_AI_REQUEST_TOP_P=GEN_AI_REQUEST_TOP_P,exports.GEN_AI_RESPONSE_FINISH_REASONS=GEN_AI_RESPONSE_FINISH_REASONS,exports.GEN_AI_RESPONSE_ID=GEN_AI_RESPONSE_ID,exports.GEN_AI_RESPONSE_MODEL=GEN_AI_RESPONSE_MODEL,exports.GEN_AI_RESPONSE_STREAMING=GEN_AI_RESPONSE_STREAMING,exports.GEN_AI_RESPONSE_TEXT=GEN_AI_RESPONSE_TEXT,exports.GEN_AI_RESPONSE_TIME_TO_FIRST_CHUNK=GEN_AI_RESPONSE_TIME_TO_FIRST_CHUNK,exports.GEN_AI_RESPONSE_TIME_TO_FIRST_TOKEN=GEN_AI_RESPONSE_TIME_TO_FIRST_TOKEN,exports.GEN_AI_RESPONSE_TOKENS_PER_SECOND=GEN_AI_RESPONSE_TOKENS_PER_SECOND,exports.GEN_AI_RESPONSE_TOOL_CALLS=GEN_AI_RESPONSE_TOOL_CALLS,exports.GEN_AI_SYSTEM=GEN_AI_SYSTEM,exports.GEN_AI_SYSTEM_INSTRUCTIONS=GEN_AI_SYSTEM_INSTRUCTIONS,exports.GEN_AI_SYSTEM_MESSAGE=GEN_AI_SYSTEM_MESSAGE,exports.GEN_AI_TOOL_CALL_ARGUMENTS=GEN_AI_TOOL_CALL_ARGUMENTS,exports.GEN_AI_TOOL_CALL_RESULT=GEN_AI_TOOL_CALL_RESULT,exports.GEN_AI_TOOL_DEFINITIONS=GEN_AI_TOOL_DEFINITIONS,exports.GEN_AI_TOOL_DESCRIPTION=GEN_AI_TOOL_DESCRIPTION,exports.GEN_AI_TOOL_INPUT=GEN_AI_TOOL_INPUT,exports.GEN_AI_TOOL_MESSAGE=GEN_AI_TOOL_MESSAGE,exports.GEN_AI_TOOL_NAME=GEN_AI_TOOL_NAME,exports.GEN_AI_TOOL_OUTPUT=GEN_AI_TOOL_OUTPUT,exports.GEN_AI_TOOL_TYPE=GEN_AI_TOOL_TYPE,exports.GEN_AI_USAGE_CACHE_CREATION_INPUT_TOKENS=GEN_AI_USAGE_CACHE_CREATION_INPUT_TOKENS,exports.GEN_AI_USAGE_CACHE_READ_INPUT_TOKENS=GEN_AI_USAGE_CACHE_READ_INPUT_TOKENS,exports.GEN_AI_USAGE_COMPLETION_TOKENS=GEN_AI_USAGE_COMPLETION_TOKENS,exports.GEN_AI_USAGE_INPUT_TOKENS=GEN_AI_USAGE_INPUT_TOKENS,exports.GEN_AI_USAGE_INPUT_TOKENS_CACHED=GEN_AI_USAGE_INPUT_TOKENS_CACHED,exports.GEN_AI_USAGE_INPUT_TOKENS_CACHE_WRITE=GEN_AI_USAGE_INPUT_TOKENS_CACHE_WRITE,exports.GEN_AI_USAGE_OUTPUT_TOKENS=GEN_AI_USAGE_OUTPUT_TOKENS,exports.GEN_AI_USAGE_OUTPUT_TOKENS_REASONING=GEN_AI_USAGE_OUTPUT_TOKENS_REASONING,exports.GEN_AI_USAGE_PROMPT_TOKENS=GEN_AI_USAGE_PROMPT_TOKENS,exports.GEN_AI_USAGE_REASONING_OUTPUT_TOKENS=GEN_AI_USAGE_REASONING_OUTPUT_TOKENS,exports.GEN_AI_USAGE_TOTAL_TOKENS=GEN_AI_USAGE_TOTAL_TOKENS,exports.GRAPHQL_DOCUMENT=GRAPHQL_DOCUMENT,exports.GRAPHQL_OPERATION_NAME=GRAPHQL_OPERATION_NAME,exports.GRAPHQL_OPERATION_TYPE=GRAPHQL_OPERATION_TYPE,exports.HARDWARECONCURRENCY=HARDWARECONCURRENCY,exports.HTTP_CLIENT_IP=HTTP_CLIENT_IP,exports.HTTP_DECODED_RESPONSE_CONTENT_LENGTH=HTTP_DECODED_RESPONSE_CONTENT_LENGTH,exports.HTTP_FLAVOR=HTTP_FLAVOR,exports.HTTP_FRAGMENT=HTTP_FRAGMENT,exports.HTTP_HOST=HTTP_HOST,exports.HTTP_METHOD=HTTP_METHOD,exports.HTTP_QUERY=HTTP_QUERY,exports.HTTP_REQUEST_BODY_DATA=HTTP_REQUEST_BODY_DATA,exports.HTTP_REQUEST_CONNECTION_END=HTTP_REQUEST_CONNECTION_END,exports.HTTP_REQUEST_CONNECT_START=HTTP_REQUEST_CONNECT_START,exports.HTTP_REQUEST_DOMAIN_LOOKUP_END=HTTP_REQUEST_DOMAIN_LOOKUP_END,exports.HTTP_REQUEST_DOMAIN_LOOKUP_START=HTTP_REQUEST_DOMAIN_LOOKUP_START,exports.HTTP_REQUEST_FETCH_START=HTTP_REQUEST_FETCH_START,exports.HTTP_REQUEST_HEADER_KEY=HTTP_REQUEST_HEADER_KEY,exports.HTTP_REQUEST_HEADER_KEY_BASE=HTTP_REQUEST_HEADER_KEY_BASE,exports.HTTP_REQUEST_METHOD=HTTP_REQUEST_METHOD,exports.HTTP_REQUEST_REDIRECT_END=HTTP_REQUEST_REDIRECT_END,exports.HTTP_REQUEST_REDIRECT_START=HTTP_REQUEST_REDIRECT_START,exports.HTTP_REQUEST_REQUEST_START=HTTP_REQUEST_REQUEST_START,exports.HTTP_REQUEST_RESEND_COUNT=HTTP_REQUEST_RESEND_COUNT,exports.HTTP_REQUEST_RESPONSE_END=HTTP_REQUEST_RESPONSE_END,exports.HTTP_REQUEST_RESPONSE_START=HTTP_REQUEST_RESPONSE_START,exports.HTTP_REQUEST_SAME_ORIGIN=HTTP_REQUEST_SAME_ORIGIN,exports.HTTP_REQUEST_SECURE_CONNECTION_START=HTTP_REQUEST_SECURE_CONNECTION_START,exports.HTTP_REQUEST_TIME_TO_FIRST_BYTE=HTTP_REQUEST_TIME_TO_FIRST_BYTE,exports.HTTP_REQUEST_WORKER_START=HTTP_REQUEST_WORKER_START,exports.HTTP_RESPONSE_BODY_SIZE=HTTP_RESPONSE_BODY_SIZE,exports.HTTP_RESPONSE_CONTENT_LENGTH=HTTP_RESPONSE_CONTENT_LENGTH,exports.HTTP_RESPONSE_HEADER_CONTENT_LENGTH=HTTP_RESPONSE_HEADER_CONTENT_LENGTH,exports.HTTP_RESPONSE_HEADER_KEY=HTTP_RESPONSE_HEADER_KEY,exports.HTTP_RESPONSE_HEADER_KEY_BASE=HTTP_RESPONSE_HEADER_KEY_BASE,exports.HTTP_RESPONSE_SIZE=HTTP_RESPONSE_SIZE,exports.HTTP_RESPONSE_STATUS_CODE=HTTP_RESPONSE_STATUS_CODE,exports.HTTP_RESPONSE_TRANSFER_SIZE=HTTP_RESPONSE_TRANSFER_SIZE,exports.HTTP_ROUTE=HTTP_ROUTE,exports.HTTP_SCHEME=HTTP_SCHEME,exports.HTTP_SERVER_NAME=HTTP_SERVER_NAME,exports.HTTP_SERVER_REQUEST_TIME_IN_QUEUE=HTTP_SERVER_REQUEST_TIME_IN_QUEUE,exports.HTTP_STATUS_CODE=HTTP_STATUS_CODE,exports.HTTP_TARGET=HTTP_TARGET,exports.HTTP_URL=HTTP_URL,exports.HTTP_USER_AGENT=HTTP_USER_AGENT,exports.ID=\"id\",exports.INP=\"inp\",exports.JSONRPC_PROTOCOL_VERSION=JSONRPC_PROTOCOL_VERSION,exports.JSONRPC_REQUEST_ID=JSONRPC_REQUEST_ID,exports.JVM_GC_ACTION=JVM_GC_ACTION,exports.JVM_GC_NAME=JVM_GC_NAME,exports.JVM_MEMORY_POOL_NAME=JVM_MEMORY_POOL_NAME,exports.JVM_MEMORY_TYPE=JVM_MEMORY_TYPE,exports.JVM_THREAD_DAEMON=JVM_THREAD_DAEMON,exports.JVM_THREAD_STATE=JVM_THREAD_STATE,exports.KOA_NAME=KOA_NAME,exports.KOA_TYPE=KOA_TYPE,exports.LCP=\"lcp\",exports.LCP_ELEMENT=LCP_ELEMENT,exports.LCP_ID=LCP_ID,exports.LCP_LOADTIME=LCP_LOADTIME,exports.LCP_RENDERTIME=LCP_RENDERTIME,exports.LCP_SIZE=LCP_SIZE,exports.LCP_URL=LCP_URL,exports.LOGGER_NAME=LOGGER_NAME,exports.MCP_CANCELLED_REASON=MCP_CANCELLED_REASON,exports.MCP_CANCELLED_REQUEST_ID=MCP_CANCELLED_REQUEST_ID,exports.MCP_CLIENT_NAME=MCP_CLIENT_NAME,exports.MCP_CLIENT_TITLE=MCP_CLIENT_TITLE,exports.MCP_CLIENT_VERSION=MCP_CLIENT_VERSION,exports.MCP_LIFECYCLE_PHASE=MCP_LIFECYCLE_PHASE,exports.MCP_LOGGING_DATA_TYPE=MCP_LOGGING_DATA_TYPE,exports.MCP_LOGGING_LEVEL=MCP_LOGGING_LEVEL,exports.MCP_LOGGING_LOGGER=MCP_LOGGING_LOGGER,exports.MCP_LOGGING_MESSAGE=MCP_LOGGING_MESSAGE,exports.MCP_METHOD_NAME=MCP_METHOD_NAME,exports.MCP_PROGRESS_CURRENT=MCP_PROGRESS_CURRENT,exports.MCP_PROGRESS_MESSAGE=MCP_PROGRESS_MESSAGE,exports.MCP_PROGRESS_PERCENTAGE=MCP_PROGRESS_PERCENTAGE,exports.MCP_PROGRESS_TOKEN=MCP_PROGRESS_TOKEN,exports.MCP_PROGRESS_TOTAL=MCP_PROGRESS_TOTAL,exports.MCP_PROMPT_NAME=MCP_PROMPT_NAME,exports.MCP_PROMPT_RESULT_DESCRIPTION=MCP_PROMPT_RESULT_DESCRIPTION,exports.MCP_PROMPT_RESULT_MESSAGE_CONTENT=MCP_PROMPT_RESULT_MESSAGE_CONTENT,exports.MCP_PROMPT_RESULT_MESSAGE_COUNT=MCP_PROMPT_RESULT_MESSAGE_COUNT,exports.MCP_PROMPT_RESULT_MESSAGE_ROLE=MCP_PROMPT_RESULT_MESSAGE_ROLE,exports.MCP_PROTOCOL_READY=MCP_PROTOCOL_READY,exports.MCP_PROTOCOL_VERSION=MCP_PROTOCOL_VERSION,exports.MCP_REQUEST_ARGUMENT_KEY=MCP_REQUEST_ARGUMENT_KEY,exports.MCP_REQUEST_ARGUMENT_KEY_BASE=MCP_REQUEST_ARGUMENT_KEY_BASE,exports.MCP_REQUEST_ARGUMENT_NAME=MCP_REQUEST_ARGUMENT_NAME,exports.MCP_REQUEST_ARGUMENT_URI=MCP_REQUEST_ARGUMENT_URI,exports.MCP_REQUEST_ID=MCP_REQUEST_ID,exports.MCP_RESOURCE_PROTOCOL=MCP_RESOURCE_PROTOCOL,exports.MCP_RESOURCE_URI=MCP_RESOURCE_URI,exports.MCP_SERVER_NAME=MCP_SERVER_NAME,exports.MCP_SERVER_TITLE=MCP_SERVER_TITLE,exports.MCP_SERVER_VERSION=MCP_SERVER_VERSION,exports.MCP_SESSION_ID=MCP_SESSION_ID,exports.MCP_TOOL_NAME=MCP_TOOL_NAME,exports.MCP_TOOL_RESULT_CONTENT=MCP_TOOL_RESULT_CONTENT,exports.MCP_TOOL_RESULT_CONTENT_COUNT=MCP_TOOL_RESULT_CONTENT_COUNT,exports.MCP_TOOL_RESULT_IS_ERROR=MCP_TOOL_RESULT_IS_ERROR,exports.MCP_TRANSPORT=MCP_TRANSPORT,exports.MDC_KEY=MDC_KEY,exports.MDC_KEY_BASE=\"mdc\",exports.MESSAGING_BATCH_MESSAGE_COUNT=MESSAGING_BATCH_MESSAGE_COUNT,exports.MESSAGING_DESTINATION=MESSAGING_DESTINATION,exports.MESSAGING_DESTINATION_CONNECTION=MESSAGING_DESTINATION_CONNECTION,exports.MESSAGING_DESTINATION_NAME=MESSAGING_DESTINATION_NAME,exports.MESSAGING_MESSAGE_BODY_SIZE=MESSAGING_MESSAGE_BODY_SIZE,exports.MESSAGING_MESSAGE_CONVERSATION_ID=MESSAGING_MESSAGE_CONVERSATION_ID,exports.MESSAGING_MESSAGE_ENVELOPE_SIZE=MESSAGING_MESSAGE_ENVELOPE_SIZE,exports.MESSAGING_MESSAGE_ID=MESSAGING_MESSAGE_ID,exports.MESSAGING_MESSAGE_RECEIVE_LATENCY=MESSAGING_MESSAGE_RECEIVE_LATENCY,exports.MESSAGING_MESSAGE_RETRY_COUNT=MESSAGING_MESSAGE_RETRY_COUNT,exports.MESSAGING_OPERATION_NAME=MESSAGING_OPERATION_NAME,exports.MESSAGING_OPERATION_TYPE=MESSAGING_OPERATION_TYPE,exports.MESSAGING_RABBITMQ_DESTINATION_ROUTING_KEY=MESSAGING_RABBITMQ_DESTINATION_ROUTING_KEY,exports.MESSAGING_SYSTEM=MESSAGING_SYSTEM,exports.METHOD=METHOD,exports.MIDDLEWARE_NAME=MIDDLEWARE_NAME,exports.NAVIGATION_ORIGIN=NAVIGATION_ORIGIN,exports.NAVIGATION_ROUTE_ID=NAVIGATION_ROUTE_ID,exports.NAVIGATION_TYPE=NAVIGATION_TYPE,exports.NEL_ELAPSED_TIME=NEL_ELAPSED_TIME,exports.NEL_PHASE=NEL_PHASE,exports.NEL_REFERRER=NEL_REFERRER,exports.NEL_SAMPLING_FUNCTION=NEL_SAMPLING_FUNCTION,exports.NEL_TYPE=NEL_TYPE,exports.NETWORK_CONNECTION_EFFECTIVE_TYPE=NETWORK_CONNECTION_EFFECTIVE_TYPE,exports.NETWORK_CONNECTION_RTT=NETWORK_CONNECTION_RTT,exports.NETWORK_CONNECTION_TYPE=NETWORK_CONNECTION_TYPE,exports.NETWORK_LOCAL_ADDRESS=NETWORK_LOCAL_ADDRESS,exports.NETWORK_LOCAL_PORT=NETWORK_LOCAL_PORT,exports.NETWORK_PEER_ADDRESS=NETWORK_PEER_ADDRESS,exports.NETWORK_PEER_PORT=NETWORK_PEER_PORT,exports.NETWORK_PROTOCOL_NAME=NETWORK_PROTOCOL_NAME,exports.NETWORK_PROTOCOL_VERSION=NETWORK_PROTOCOL_VERSION,exports.NETWORK_TRANSPORT=NETWORK_TRANSPORT,exports.NETWORK_TYPE=NETWORK_TYPE,exports.NET_HOST_IP=NET_HOST_IP,exports.NET_HOST_NAME=NET_HOST_NAME,exports.NET_HOST_PORT=NET_HOST_PORT,exports.NET_PEER_IP=NET_PEER_IP,exports.NET_PEER_NAME=NET_PEER_NAME,exports.NET_PEER_PORT=NET_PEER_PORT,exports.NET_PROTOCOL_NAME=NET_PROTOCOL_NAME,exports.NET_PROTOCOL_VERSION=NET_PROTOCOL_VERSION,exports.NET_SOCK_FAMILY=NET_SOCK_FAMILY,exports.NET_SOCK_HOST_ADDR=NET_SOCK_HOST_ADDR,exports.NET_SOCK_HOST_PORT=NET_SOCK_HOST_PORT,exports.NET_SOCK_PEER_ADDR=NET_SOCK_PEER_ADDR,exports.NET_SOCK_PEER_NAME=NET_SOCK_PEER_NAME,exports.NET_SOCK_PEER_PORT=NET_SOCK_PEER_PORT,exports.NET_TRANSPORT=NET_TRANSPORT,exports.OS_BUILD=OS_BUILD,exports.OS_BUILD_ID=OS_BUILD_ID,exports.OS_DESCRIPTION=OS_DESCRIPTION,exports.OS_KERNEL_VERSION=OS_KERNEL_VERSION,exports.OS_NAME=OS_NAME,exports.OS_RAW_DESCRIPTION=OS_RAW_DESCRIPTION,exports.OS_ROOTED=OS_ROOTED,exports.OS_THEME=OS_THEME,exports.OS_TYPE=OS_TYPE,exports.OS_VERSION=OS_VERSION,exports.OTEL_KIND=OTEL_KIND,exports.OTEL_SCOPE_NAME=OTEL_SCOPE_NAME,exports.OTEL_SCOPE_VERSION=OTEL_SCOPE_VERSION,exports.OTEL_STATUS_CODE=OTEL_STATUS_CODE,exports.OTEL_STATUS_DESCRIPTION=OTEL_STATUS_DESCRIPTION,exports.PARAMS_KEY=PARAMS_KEY,exports.PARAMS_KEY_BASE=PARAMS_KEY_BASE,exports.PERFORMANCE_ACTIVATIONSTART=PERFORMANCE_ACTIVATIONSTART,exports.PERFORMANCE_TIMEORIGIN=PERFORMANCE_TIMEORIGIN,exports.PREVIOUS_ROUTE=PREVIOUS_ROUTE,exports.PROCESS_COMMAND_ARGS=PROCESS_COMMAND_ARGS,exports.PROCESS_EXECUTABLE_NAME=PROCESS_EXECUTABLE_NAME,exports.PROCESS_PID=PROCESS_PID,exports.PROCESS_RUNTIME_DESCRIPTION=PROCESS_RUNTIME_DESCRIPTION,exports.PROCESS_RUNTIME_ENGINE_NAME=PROCESS_RUNTIME_ENGINE_NAME,exports.PROCESS_RUNTIME_ENGINE_VERSION=PROCESS_RUNTIME_ENGINE_VERSION,exports.PROCESS_RUNTIME_NAME=PROCESS_RUNTIME_NAME,exports.PROCESS_RUNTIME_VERSION=PROCESS_RUNTIME_VERSION,exports.QUERY_KEY=QUERY_KEY,exports.QUERY_KEY_BASE=QUERY_KEY_BASE,exports.REACT_VERSION=REACT_VERSION,exports.RELEASE=RELEASE,exports.REMIX_ACTION_FORM_DATA_KEY=REMIX_ACTION_FORM_DATA_KEY,exports.REMIX_ACTION_FORM_DATA_KEY_BASE=REMIX_ACTION_FORM_DATA_KEY_BASE,exports.REPLAY_ID=REPLAY_ID,exports.RESOURCE_DEPLOYMENT_ENVIRONMENT=RESOURCE_DEPLOYMENT_ENVIRONMENT,exports.RESOURCE_DEPLOYMENT_ENVIRONMENT_NAME=RESOURCE_DEPLOYMENT_ENVIRONMENT_NAME,exports.RESOURCE_RENDER_BLOCKING_STATUS=RESOURCE_RENDER_BLOCKING_STATUS,exports.ROUTE=ROUTE,exports.RPC_GRPC_STATUS_CODE=RPC_GRPC_STATUS_CODE,exports.RPC_METHOD=RPC_METHOD,exports.RPC_RESPONSE_STATUS_CODE=RPC_RESPONSE_STATUS_CODE,exports.RPC_SERVICE=RPC_SERVICE,exports.RPC_SYSTEM=RPC_SYSTEM,exports.RPC_SYSTEM_NAME=RPC_SYSTEM_NAME,exports.RUNTIME_BUILD=RUNTIME_BUILD,exports.RUNTIME_NAME=RUNTIME_NAME,exports.RUNTIME_RAW_DESCRIPTION=RUNTIME_RAW_DESCRIPTION,exports.RUNTIME_VERSION=RUNTIME_VERSION,exports.SCORE_KEY=SCORE_KEY,exports.SCORE_KEY_BASE=SCORE_KEY_BASE,exports.SCORE_RATIO_KEY=SCORE_RATIO_KEY,exports.SCORE_RATIO_KEY_BASE=SCORE_RATIO_KEY_BASE,exports.SCORE_TOTAL=SCORE_TOTAL,exports.SCORE_WEIGHT_KEY=SCORE_WEIGHT_KEY,exports.SCORE_WEIGHT_KEY_BASE=SCORE_WEIGHT_KEY_BASE,exports.SENTRY_ACTION=SENTRY_ACTION,exports.SENTRY_BROWSER_NAME=SENTRY_BROWSER_NAME,exports.SENTRY_BROWSER_VERSION=SENTRY_BROWSER_VERSION,exports.SENTRY_CANCELLATION_REASON=SENTRY_CANCELLATION_REASON,exports.SENTRY_CATEGORY=SENTRY_CATEGORY,exports.SENTRY_CLIENT_SAMPLE_RATE=SENTRY_CLIENT_SAMPLE_RATE,exports.SENTRY_DESCRIPTION=SENTRY_DESCRIPTION,exports.SENTRY_DIST=SENTRY_DIST,exports.SENTRY_DOMAIN=SENTRY_DOMAIN,exports.SENTRY_DSC_ENVIRONMENT=SENTRY_DSC_ENVIRONMENT,exports.SENTRY_DSC_PROJECT_ID=SENTRY_DSC_PROJECT_ID,exports.SENTRY_DSC_PUBLIC_KEY=SENTRY_DSC_PUBLIC_KEY,exports.SENTRY_DSC_RELEASE=SENTRY_DSC_RELEASE,exports.SENTRY_DSC_SAMPLED=SENTRY_DSC_SAMPLED,exports.SENTRY_DSC_SAMPLE_RATE=SENTRY_DSC_SAMPLE_RATE,exports.SENTRY_DSC_TRACE_ID=SENTRY_DSC_TRACE_ID,exports.SENTRY_DSC_TRANSACTION=SENTRY_DSC_TRANSACTION,exports.SENTRY_ENVIRONMENT=SENTRY_ENVIRONMENT,exports.SENTRY_EXCLUSIVE_TIME=SENTRY_EXCLUSIVE_TIME,exports.SENTRY_GRAPHQL_OPERATION=SENTRY_GRAPHQL_OPERATION,exports.SENTRY_GROUP=SENTRY_GROUP,exports.SENTRY_HTTP_PREFETCH=SENTRY_HTTP_PREFETCH,exports.SENTRY_IDLE_SPAN_FINISH_REASON=SENTRY_IDLE_SPAN_FINISH_REASON,exports.SENTRY_IS_REMOTE=SENTRY_IS_REMOTE,exports.SENTRY_KIND=SENTRY_KIND,exports.SENTRY_MAIN_THREAD=SENTRY_MAIN_THREAD,exports.SENTRY_MESSAGE_PARAMETER_KEY=SENTRY_MESSAGE_PARAMETER_KEY,exports.SENTRY_MESSAGE_TEMPLATE=SENTRY_MESSAGE_TEMPLATE,exports.SENTRY_METRIC_SOURCE=SENTRY_METRIC_SOURCE,exports.SENTRY_MOBILE=SENTRY_MOBILE,exports.SENTRY_MODULE_KEY=SENTRY_MODULE_KEY,exports.SENTRY_MODULE_KEY_BASE=SENTRY_MODULE_KEY_BASE,exports.SENTRY_NEXTJS_SSR_FUNCTION_ROUTE=SENTRY_NEXTJS_SSR_FUNCTION_ROUTE,exports.SENTRY_NEXTJS_SSR_FUNCTION_TYPE=SENTRY_NEXTJS_SSR_FUNCTION_TYPE,exports.SENTRY_NORMALIZED_DB_QUERY=SENTRY_NORMALIZED_DB_QUERY,exports.SENTRY_NORMALIZED_DB_QUERY_HASH=SENTRY_NORMALIZED_DB_QUERY_HASH,exports.SENTRY_NORMALIZED_DESCRIPTION=SENTRY_NORMALIZED_DESCRIPTION,exports.SENTRY_OBSERVED_TIMESTAMP_NANOS=SENTRY_OBSERVED_TIMESTAMP_NANOS,exports.SENTRY_OP=SENTRY_OP,exports.SENTRY_ORIGIN=SENTRY_ORIGIN,exports.SENTRY_PLATFORM=SENTRY_PLATFORM,exports.SENTRY_PROFILER_ID=SENTRY_PROFILER_ID,exports.SENTRY_PROFILE_ID=SENTRY_PROFILE_ID,exports.SENTRY_RELEASE=SENTRY_RELEASE,exports.SENTRY_REPLAY_ID=SENTRY_REPLAY_ID,exports.SENTRY_REPLAY_IS_BUFFERING=SENTRY_REPLAY_IS_BUFFERING,exports.SENTRY_REPORT_EVENT=SENTRY_REPORT_EVENT,exports.SENTRY_SDK_INTEGRATIONS=SENTRY_SDK_INTEGRATIONS,exports.SENTRY_SDK_NAME=SENTRY_SDK_NAME,exports.SENTRY_SDK_VERSION=SENTRY_SDK_VERSION,exports.SENTRY_SEGMENT_ID=SENTRY_SEGMENT_ID,exports.SENTRY_SEGMENT_NAME=SENTRY_SEGMENT_NAME,exports.SENTRY_SERVER_SAMPLE_RATE=SENTRY_SERVER_SAMPLE_RATE,exports.SENTRY_SOURCE=SENTRY_SOURCE,exports.SENTRY_SPAN_SOURCE=SENTRY_SPAN_SOURCE,exports.SENTRY_STATUS=SENTRY_STATUS,exports.SENTRY_STATUS_CODE=SENTRY_STATUS_CODE,exports.SENTRY_STATUS_MESSAGE=SENTRY_STATUS_MESSAGE,exports.SENTRY_SVELTEKIT_NAVIGATION_FROM=SENTRY_SVELTEKIT_NAVIGATION_FROM,exports.SENTRY_SVELTEKIT_NAVIGATION_TO=SENTRY_SVELTEKIT_NAVIGATION_TO,exports.SENTRY_SVELTEKIT_NAVIGATION_TYPE=SENTRY_SVELTEKIT_NAVIGATION_TYPE,exports.SENTRY_THREAD_ID=SENTRY_THREAD_ID,exports.SENTRY_TIMESTAMP_SEQUENCE=SENTRY_TIMESTAMP_SEQUENCE,exports.SENTRY_TRACE_LIFECYCLE=SENTRY_TRACE_LIFECYCLE,exports.SENTRY_TRACE_PARENT_SPAN_ID=SENTRY_TRACE_PARENT_SPAN_ID,exports.SENTRY_TRACE_STATUS=SENTRY_TRACE_STATUS,exports.SENTRY_TRANSACTION=SENTRY_TRANSACTION,exports.SENTRY_USER_EMAIL=SENTRY_USER_EMAIL,exports.SENTRY_USER_GEO_CITY=SENTRY_USER_GEO_CITY,exports.SENTRY_USER_GEO_COUNTRY_CODE=SENTRY_USER_GEO_COUNTRY_CODE,exports.SENTRY_USER_GEO_REGION=SENTRY_USER_GEO_REGION,exports.SENTRY_USER_GEO_SUBDIVISION=SENTRY_USER_GEO_SUBDIVISION,exports.SENTRY_USER_ID=SENTRY_USER_ID,exports.SENTRY_USER_IP=SENTRY_USER_IP,exports.SENTRY_USER_USERNAME=SENTRY_USER_USERNAME,exports.SERVER_ADDRESS=SERVER_ADDRESS,exports.SERVER_NAME=SERVER_NAME,exports.SERVER_PORT=SERVER_PORT,exports.SERVICE_NAME=SERVICE_NAME,exports.SERVICE_VERSION=SERVICE_VERSION,exports.SESSION_ID=SESSION_ID,exports.STALL_PERCENTAGE=STALL_PERCENTAGE,exports.STALL_TOTAL_TIME=STALL_TOTAL_TIME,exports.STATE_TYPE=STATE_TYPE,exports.THREAD_ID=THREAD_ID,exports.THREAD_NAME=THREAD_NAME,exports.TIMBER_TAG=TIMBER_TAG,exports.TIME_TO_FULL_DISPLAY=TIME_TO_FULL_DISPLAY,exports.TIME_TO_INITIAL_DISPLAY=TIME_TO_INITIAL_DISPLAY,exports.TRANSACTION=TRANSACTION,exports.TRPC_PROCEDURE_PATH=TRPC_PROCEDURE_PATH,exports.TRPC_PROCEDURE_TYPE=TRPC_PROCEDURE_TYPE,exports.TTFB=TTFB,exports.TTFB_REQUESTTIME=TTFB_REQUESTTIME,exports.TYPE=TYPE,exports.UI_COMPONENT_NAME=UI_COMPONENT_NAME,exports.UI_CONTRIBUTES_TO_TTFD=UI_CONTRIBUTES_TO_TTFD,exports.UI_CONTRIBUTES_TO_TTID=UI_CONTRIBUTES_TO_TTID,exports.UI_ELEMENT_HEIGHT=UI_ELEMENT_HEIGHT,exports.UI_ELEMENT_ID=UI_ELEMENT_ID,exports.UI_ELEMENT_IDENTIFIER=UI_ELEMENT_IDENTIFIER,exports.UI_ELEMENT_LOAD_TIME=UI_ELEMENT_LOAD_TIME,exports.UI_ELEMENT_PAINT_TYPE=UI_ELEMENT_PAINT_TYPE,exports.UI_ELEMENT_RENDER_TIME=UI_ELEMENT_RENDER_TIME,exports.UI_ELEMENT_TYPE=UI_ELEMENT_TYPE,exports.UI_ELEMENT_URL=UI_ELEMENT_URL,exports.UI_ELEMENT_WIDTH=UI_ELEMENT_WIDTH,exports.URL=\"url\",exports.URL_DOMAIN=URL_DOMAIN,exports.URL_FRAGMENT=URL_FRAGMENT,exports.URL_FULL=URL_FULL,exports.URL_PATH=URL_PATH,exports.URL_PATH_PARAMETER_KEY=URL_PATH_PARAMETER_KEY,exports.URL_PATH_PARAMETER_KEY_BASE=URL_PATH_PARAMETER_KEY_BASE,exports.URL_PORT=URL_PORT,exports.URL_QUERY=URL_QUERY,exports.URL_SAME_ORIGIN=URL_SAME_ORIGIN,exports.URL_SCHEME=URL_SCHEME,exports.URL_TEMPLATE=URL_TEMPLATE,exports.USER_AGENT_ORIGINAL=USER_AGENT_ORIGINAL,exports.USER_EMAIL=USER_EMAIL,exports.USER_FULL_NAME=USER_FULL_NAME,exports.USER_GEO_CITY=USER_GEO_CITY,exports.USER_GEO_COUNTRY_CODE=USER_GEO_COUNTRY_CODE,exports.USER_GEO_REGION=USER_GEO_REGION,exports.USER_GEO_SUBDIVISION=USER_GEO_SUBDIVISION,exports.USER_HASH=USER_HASH,exports.USER_ID=USER_ID,exports.USER_IP_ADDRESS=USER_IP_ADDRESS,exports.USER_NAME=USER_NAME,exports.USER_ROLES=USER_ROLES,exports.VERCEL_BRANCH=VERCEL_BRANCH,exports.VERCEL_BUILD_ID=VERCEL_BUILD_ID,exports.VERCEL_DEPLOYMENT_ID=VERCEL_DEPLOYMENT_ID,exports.VERCEL_DESTINATION=VERCEL_DESTINATION,exports.VERCEL_EDGE_TYPE=VERCEL_EDGE_TYPE,exports.VERCEL_ENTRYPOINT=VERCEL_ENTRYPOINT,exports.VERCEL_EXECUTION_REGION=VERCEL_EXECUTION_REGION,exports.VERCEL_ID=VERCEL_ID,exports.VERCEL_JA3_DIGEST=VERCEL_JA3_DIGEST,exports.VERCEL_JA4_DIGEST=VERCEL_JA4_DIGEST,exports.VERCEL_LOG_TYPE=VERCEL_LOG_TYPE,exports.VERCEL_PATH=VERCEL_PATH,exports.VERCEL_PROJECT_ID=VERCEL_PROJECT_ID,exports.VERCEL_PROJECT_NAME=VERCEL_PROJECT_NAME,exports.VERCEL_PROXY_CACHE_ID=VERCEL_PROXY_CACHE_ID,exports.VERCEL_PROXY_CLIENT_IP=VERCEL_PROXY_CLIENT_IP,exports.VERCEL_PROXY_HOST=VERCEL_PROXY_HOST,exports.VERCEL_PROXY_LAMBDA_REGION=VERCEL_PROXY_LAMBDA_REGION,exports.VERCEL_PROXY_METHOD=VERCEL_PROXY_METHOD,exports.VERCEL_PROXY_PATH=VERCEL_PROXY_PATH,exports.VERCEL_PROXY_PATH_TYPE=VERCEL_PROXY_PATH_TYPE,exports.VERCEL_PROXY_PATH_TYPE_VARIANT=VERCEL_PROXY_PATH_TYPE_VARIANT,exports.VERCEL_PROXY_REFERER=VERCEL_PROXY_REFERER,exports.VERCEL_PROXY_REGION=VERCEL_PROXY_REGION,exports.VERCEL_PROXY_RESPONSE_BYTE_SIZE=VERCEL_PROXY_RESPONSE_BYTE_SIZE,exports.VERCEL_PROXY_SCHEME=VERCEL_PROXY_SCHEME,exports.VERCEL_PROXY_STATUS_CODE=VERCEL_PROXY_STATUS_CODE,exports.VERCEL_PROXY_TIMESTAMP=VERCEL_PROXY_TIMESTAMP,exports.VERCEL_PROXY_USER_AGENT=VERCEL_PROXY_USER_AGENT,exports.VERCEL_PROXY_VERCEL_CACHE=VERCEL_PROXY_VERCEL_CACHE,exports.VERCEL_PROXY_VERCEL_ID=VERCEL_PROXY_VERCEL_ID,exports.VERCEL_PROXY_WAF_ACTION=VERCEL_PROXY_WAF_ACTION,exports.VERCEL_PROXY_WAF_RULE_ID=VERCEL_PROXY_WAF_RULE_ID,exports.VERCEL_REQUEST_ID=VERCEL_REQUEST_ID,exports.VERCEL_SOURCE=VERCEL_SOURCE,exports.VERCEL_STATUS_CODE=VERCEL_STATUS_CODE,exports._AWS_KINESIS_STREAM_NAME=_AWS_KINESIS_STREAM_NAME,exports._AWS_REQUEST_ID=_AWS_REQUEST_ID,exports._HTTP_REQUEST_METHOD=_HTTP_REQUEST_METHOD,exports._SENTRY_SEGMENT_ID=_SENTRY_SEGMENT_ID;\n//# sourceMappingURL=attributes.cjs.map\n","/* eslint-disable @typescript-eslint/no-explicit-any */\nexport default class Cache<T, V> {\n  public size = 0;\n  public misses = 0;\n  public hits = 0;\n\n  constructor(\n    private limit: number,\n    private func: (obj: T) => V,\n    private store?: any,\n  ) {\n    this.store = store || new Map();\n  }\n\n  get(key: T): V {\n    let value = this.store.get(key);\n\n    if (this.store.has(key)) {\n      this.hits++;\n\n      return this.store.get(key);\n    } else {\n      this.misses++;\n      value = this.set(key, this.func(key));\n    }\n\n    return value;\n  }\n\n  set(key: T, value: V) {\n    if (this.limit > this.size) {\n      this.size++;\n      this.store.set(key, value);\n    }\n\n    return value;\n  }\n\n  purge() {\n    this.store.clear();\n    this.size = 0;\n    this.hits = 0;\n    this.misses = 0;\n  }\n}\n","/* eslint-disable @typescript-eslint/no-explicit-any */\n/* eslint-disable @typescript-eslint/no-unused-vars */\n/* eslint-disable no-useless-escape */\n/**\n @module @ember/string\n */\nimport Cache from './cache.ts';\n\n// STATE within a module is frowned upon, this exists\n// to support Ember.STRINGS but shield ember internals from this legacy global\n// API.\nlet STRINGS: { [key: string]: string } = {};\n\nexport function setStrings(strings: { [key: string]: string }) {\n  STRINGS = strings;\n}\n\nexport function getStrings(): { [key: string]: string } {\n  return STRINGS;\n}\n\nexport function getString(name: string): string | undefined {\n  return STRINGS[name];\n}\n\nconst STRING_DASHERIZE_REGEXP = /[ _]/g;\n\nconst STRING_DASHERIZE_CACHE = new Cache<string, string>(1000, (key) =>\n  decamelize(key).replace(STRING_DASHERIZE_REGEXP, '-'),\n);\n\nconst STRING_CAMELIZE_REGEXP_1 = /(\\-|\\_|\\.|\\s)+(.)?/g;\nconst STRING_CAMELIZE_REGEXP_2 = /(^|\\/)([A-Z])/g;\n\nconst CAMELIZE_CACHE = new Cache<string, string>(1000, (key) =>\n  key\n    .replace(STRING_CAMELIZE_REGEXP_1, (_match, _separator, chr) =>\n      chr ? chr.toUpperCase() : '',\n    )\n    .replace(STRING_CAMELIZE_REGEXP_2, (match /*, separator, chr */) =>\n      match.toLowerCase(),\n    ),\n);\n\nconst STRING_CLASSIFY_REGEXP_1 = /^(\\-|_)+(.)?/;\nconst STRING_CLASSIFY_REGEXP_2 = /(.)(\\-|\\_|\\.|\\s)+(.)?/g;\nconst STRING_CLASSIFY_REGEXP_3 = /(^|\\/|\\.)([a-z])/g;\n\nconst CLASSIFY_CACHE = new Cache<string, string>(1000, (str) => {\n  const replace1 = (_match: string, _separator: string, chr: string) =>\n    chr ? `_${chr.toUpperCase()}` : '';\n  const replace2 = (\n    _match: string,\n    initialChar: string,\n    _separator: string,\n    chr: string,\n  ) => initialChar + (chr ? chr.toUpperCase() : '');\n  const parts = str.split('/');\n\n  for (let i = 0; i < parts.length; i++) {\n    parts[i] = (parts as any)[i]\n      .replace(STRING_CLASSIFY_REGEXP_1, replace1)\n      .replace(STRING_CLASSIFY_REGEXP_2, replace2);\n  }\n\n  return parts\n    .join('/')\n    .replace(STRING_CLASSIFY_REGEXP_3, (match /*, separator, chr */) =>\n      match.toUpperCase(),\n    );\n});\n\nconst STRING_UNDERSCORE_REGEXP_1 = /([a-z\\d])([A-Z]+)/g;\nconst STRING_UNDERSCORE_REGEXP_2 = /\\-|\\s+/g;\n\nconst UNDERSCORE_CACHE = new Cache<string, string>(1000, (str) =>\n  str\n    .replace(STRING_UNDERSCORE_REGEXP_1, '$1_$2')\n    .replace(STRING_UNDERSCORE_REGEXP_2, '_')\n    .toLowerCase(),\n);\n\nconst STRING_CAPITALIZE_REGEXP = /(^|\\/)([a-z\\u00C0-\\u024F])/g;\n\nconst CAPITALIZE_CACHE = new Cache<string, string>(1000, (str) =>\n  str.replace(STRING_CAPITALIZE_REGEXP, (match /*, separator, chr */) =>\n    match.toUpperCase(),\n  ),\n);\n\nconst STRING_DECAMELIZE_REGEXP = /([a-z\\d])([A-Z])/g;\n\nconst DECAMELIZE_CACHE = new Cache<string, string>(1000, (str) =>\n  str.replace(STRING_DECAMELIZE_REGEXP, '$1_$2').toLowerCase(),\n);\n\n/**\n  Splits a string into separate units separated by spaces, eliminating any\n  empty strings in the process. This is a convenience method for split that\n  is mostly useful when applied to the `String.prototype`.\n\n  ```javascript\n  import { w } from '@ember/string';\n\n  w(\"alpha beta gamma\").forEach(function(key) {\n    console.log(key);\n  });\n\n  // > alpha\n  // > beta\n  // > gamma\n  ```\n\n  @method w\n  @param {String} str The string to split\n  @return {Array} array containing the split strings\n  @public\n*/\nexport function w(str: string): string[] {\n  return str.split(/\\s+/);\n}\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: string): string {\n  return DECAMELIZE_CACHE.get(str);\n}\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: string): string {\n  return STRING_DASHERIZE_CACHE.get(str);\n}\n\n/**\n  Returns the lowerCamelCase form of a string.\n\n  ```javascript\n  import { camelize } from '@ember/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  @method camelize\n  @param {String} str The string to camelize.\n  @return {String} the camelized string.\n  @public\n*/\nexport function camelize(str: string): string {\n  return CAMELIZE_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  @public\n*/\nexport function classify(str: string): string {\n  return CLASSIFY_CACHE.get(str);\n}\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: string): string {\n  return UNDERSCORE_CACHE.get(str);\n}\n\n/**\n  Returns the Capitalized form of a string\n\n  ```javascript\n  import { capitalize } from '@ember/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  @method capitalize\n  @param {String} str The string to capitalize.\n  @return {String} The capitalized string.\n  @public\n*/\nexport function capitalize(str: string): string {\n  return CAPITALIZE_CACHE.get(str);\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","function resolveInitializer(modules, moduleName) {\n    let module = modules.load(moduleName);\n    if (!module) {\n        throw new Error(moduleName + ' must export an initializer.');\n    }\n    let initializer = module.default;\n    if (!initializer) {\n        throw new Error(moduleName + ' must have a default export');\n    }\n    if (!initializer.name) {\n        initializer.name = moduleName.slice(moduleName.lastIndexOf('/') + 1);\n    }\n    return initializer;\n}\nfunction registerInitializers(app, modules, moduleNames) {\n    for (let moduleName of moduleNames) {\n        app.initializer(resolveInitializer(modules, moduleName));\n    }\n}\nfunction registerInstanceInitializers(app, modules, moduleNames) {\n    for (let moduleName of moduleNames) {\n        app.instanceInitializer(resolveInitializer(modules, moduleName));\n    }\n}\n/**\n * Configure your application as it boots\n */\nexport default function loadInitializers(app, prefix, explicitModules) {\n    var initializerPrefix = prefix + '/initializers/';\n    var instanceInitializerPrefix = prefix + '/instance-initializers/';\n    var initializers = [];\n    var instanceInitializers = [];\n    let modules;\n    if (explicitModules) {\n        modules = {\n            names() {\n                return Object.keys(explicitModules);\n            },\n            load(name) {\n                return explicitModules[name];\n            }\n        };\n    }\n    else {\n        modules = {\n            names() {\n                let requirejs = globalThis.requirejs;\n                if (!requirejs || !requirejs._eak_seen) {\n                    throw new Error(\"No global AMD loader found. To use loadInitializers without a global AMD loader you must provide explicit modules\");\n                }\n                return Object.keys(requirejs._eak_seen);\n            },\n            load(name) {\n                return globalThis.require(name, null, null, true);\n            }\n        };\n    }\n    for (let moduleName of modules.names()) {\n        if (moduleName.startsWith(initializerPrefix) && !moduleName.endsWith('-test')) {\n            initializers.push(moduleName);\n        }\n        else if (moduleName.startsWith(instanceInitializerPrefix) && !moduleName.endsWith('-test')) {\n            instanceInitializers.push(moduleName);\n        }\n    }\n    registerInitializers(app, modules, initializers);\n    registerInstanceInitializers(app, modules, instanceInitializers);\n}\n","import type { MarkedOptions } from './MarkedOptions.ts';\n\n/**\n * Gets the original marked default options.\n */\nexport function _getDefaults<ParserOutput = string, RendererOutput = string>(): MarkedOptions<ParserOutput, RendererOutput> {\n  return {\n    async: false,\n    breaks: false,\n    extensions: null,\n    gfm: true,\n    hooks: null,\n    pedantic: false,\n    renderer: null,\n    silent: false,\n    tokenizer: null,\n    walkTokens: null,\n  };\n}\n// eslint-disable-next-line @typescript-eslint/no-explicit-any\nexport let _defaults: MarkedOptions<any, any> = _getDefaults();\n\nexport function changeDefaults<ParserOutput = string, RendererOutput = string>(newDefaults: MarkedOptions<ParserOutput, RendererOutput>) {\n  _defaults = newDefaults;\n}\n","const noopTest = { exec: () => null } as unknown as RegExp;\n\nfunction cachedIndentRegex(createRegex: (indent: number) => RegExp) {\n  const cache: RegExp[] = [];\n  return (indent: number) => {\n    const cacheIndex = Math.max(0, Math.min(3, indent - 1));\n    let regex = cache[cacheIndex];\n    if (!regex) {\n      regex = createRegex(cacheIndex);\n      cache[cacheIndex] = regex;\n    }\n    return regex;\n  };\n}\n\nfunction edit(regex: string | RegExp, opt = '') {\n  let source = typeof regex === 'string' ? regex : regex.source;\n  const obj = {\n    replace: (name: string | RegExp, val: string | RegExp) => {\n      let valSource = typeof val === 'string' ? val : val.source;\n      valSource = valSource.replace(other.caret, '$1');\n      source = source.replace(name, valSource);\n      return obj;\n    },\n    getRegex: () => {\n      return new RegExp(source, opt);\n    },\n  };\n  return obj;\n}\n\n// use a default variable to ensure the regex is evaluated on client an not removed by minifiers\nconst supportsLookbehind = ((a = '') => {\ntry {\n  return !!new RegExp('(?<=1)(?<!1)' + a);\n} catch {\n  // See browser support here:\n  // https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Regular_expressions/Lookbehind_assertion\n  return false;\n}\n})();\n\nexport const other = {\n  codeRemoveIndent: /^(?: {1,4}| {0,3}\\t)/gm,\n  outputLinkReplace: /\\\\([\\[\\]])/g,\n  indentCodeCompensation: /^(\\s+)(?:```)/,\n  beginningSpace: /^\\s+/,\n  endingHash: /#$/,\n  startingSpaceChar: /^ /,\n  endingSpaceChar: / $/,\n  nonSpaceChar: /[^ ]/,\n  newLineCharGlobal: /\\n/g,\n  tabCharGlobal: /\\t/g,\n  multipleSpaceGlobal: /\\s+/g,\n  blankLine: /^[ \\t]*$/,\n  doubleBlankLine: /\\n[ \\t]*\\n[ \\t]*$/,\n  blockquoteStart: /^ {0,3}>/,\n  blockquoteSetextReplace: /\\n {0,3}((?:=+|-+) *)(?=\\n|$)/g,\n  blockquoteSetextReplace2: /^ {0,3}>[ \\t]?/gm,\n  listReplaceNesting: /^ {1,4}(?=( {4})*[^ ])/g,\n  listIsTask: /^\\[[ xX]\\] +\\S/,\n  listReplaceTask: /^\\[[ xX]\\] +/,\n  listTaskCheckbox: /\\[[ xX]\\]/,\n  anyLine: /\\n.*\\n/,\n  hrefBrackets: /^<(.*)>$/,\n  tableDelimiter: /[:|]/,\n  tableAlignChars: /^\\||\\| *$/g,\n  tableRowBlankLine: /\\n[ \\t]*$/,\n  tableAlignRight: /^ *-+: *$/,\n  tableAlignCenter: /^ *:-+: *$/,\n  tableAlignLeft: /^ *:-+ *$/,\n  startATag: /^<a /i,\n  endATag: /^<\\/a>/i,\n  startPreScriptTag: /^<(pre|code|kbd|script)(\\s|>)/i,\n  endPreScriptTag: /^<\\/(pre|code|kbd|script)(\\s|>)/i,\n  startAngleBracket: /^</,\n  endAngleBracket: />$/,\n  pedanticHrefTitle: /^([^'\"]*[^\\s])\\s+(['\"])(.*)\\2/,\n  unicodeAlphaNumeric: /[\\p{L}\\p{N}]/u,\n  escapeTest: /[&<>\"']/,\n  escapeReplace: /[&<>\"']/g,\n  escapeTestNoEncode: /[<>\"']|&(?!(#\\d{1,7}|#[Xx][a-fA-F0-9]{1,6}|\\w+);)/,\n  escapeReplaceNoEncode: /[<>\"']|&(?!(#\\d{1,7}|#[Xx][a-fA-F0-9]{1,6}|\\w+);)/g,\n  caret: /(^|[^\\[])\\^/g,\n  percentDecode: /%25/g,\n  findPipe: /\\|/g,\n  splitPipe: / \\|/,\n  slashPipe: /\\\\\\|/g,\n  carriageReturn: /\\r\\n|\\r/g,\n  spaceLine: /^ +$/gm,\n  notSpaceStart: /^\\S*/,\n  endingNewline: /\\n$/,\n  listItemRegex: (bull: string) => new RegExp(`^( {0,3}${bull})((?:[\\t ][^\\\\n]*)?(?:\\\\n|$))`),\n  nextBulletRegex: cachedIndentRegex((indent: number) => new RegExp(`^ {0,${indent}}(?:[*+-]|\\\\d{1,9}[.)])((?:[ \\t][^\\\\n]*)?(?:\\\\n|$))`)),\n  hrRegex: cachedIndentRegex((indent: number) => new RegExp(`^ {0,${indent}}((?:- *){3,}|(?:_ *){3,}|(?:\\\\* *){3,})(?:\\\\n+|$)`)),\n  fencesBeginRegex: cachedIndentRegex((indent: number) => new RegExp(`^ {0,${indent}}(?:\\`\\`\\`|~~~)`)),\n  headingBeginRegex: cachedIndentRegex((indent: number) => new RegExp(`^ {0,${indent}}#`)),\n  htmlBeginRegex: cachedIndentRegex((indent: number) => new RegExp(`^ {0,${indent}}<(?:[a-z].*>|!--)`, 'i')),\n  blockquoteBeginRegex: cachedIndentRegex((indent: number) => new RegExp(`^ {0,${indent}}>`)),\n};\n\n/**\n * Block-Level Grammar\n */\n\nconst newline = /^(?:[ \\t]*(?:\\n|$))+/;\nconst blockCode = /^((?: {4}| {0,3}\\t)[^\\n]+(?:\\n(?:[ \\t]*(?:\\n|$))*)?)+/;\nconst fences = /^ {0,3}(`{3,}(?=[^`\\n]*(?:\\n|$))|~{3,})([^\\n]*)(?:\\n|$)(?:|([\\s\\S]*?)(?:\\n|$))(?: {0,3}\\1[~`]* *(?=\\n|$)|$)/;\nconst hr = /^ {0,3}((?:-[\\t ]*){3,}|(?:_[ \\t]*){3,}|(?:\\*[ \\t]*){3,})(?:\\n+|$)/;\nconst heading = /^ {0,3}(#{1,6})(?=\\s|$)(.*)(?:\\n+|$)/;\nconst bullet = / {0,3}(?:[*+-]|\\d{1,9}[.)])/;\nconst lheadingCore = /^(?!bull |blockCode|fences|blockquote|heading|html|table)((?:.|\\n(?!\\s*?\\n|bull |blockCode|fences|blockquote|heading|html|table))+?)\\n {0,3}(=+|-+) *(?:\\n+|$)/;\nconst lheading = edit(lheadingCore)\n  .replace(/bull/g, bullet) // lists can interrupt\n  .replace(/blockCode/g, /(?: {4}| {0,3}\\t)/) // indented code blocks can interrupt\n  .replace(/fences/g, / {0,3}(?:`{3,}|~{3,})/) // fenced code blocks can interrupt\n  .replace(/blockquote/g, / {0,3}>/) // blockquote can interrupt\n  .replace(/heading/g, / {0,3}#{1,6}(?:\\s|$)/) // ATX heading can interrupt\n  .replace(/html/g, / {0,3}<[^\\n>]+>\\n/) // block html can interrupt\n  .replace(/\\|table/g, '') // table not in commonmark\n  .getRegex();\nconst lheadingGfm = edit(lheadingCore)\n  .replace(/bull/g, bullet) // lists can interrupt\n  .replace(/blockCode/g, /(?: {4}| {0,3}\\t)/) // indented code blocks can interrupt\n  .replace(/fences/g, / {0,3}(?:`{3,}|~{3,})/) // fenced code blocks can interrupt\n  .replace(/blockquote/g, / {0,3}>/) // blockquote can interrupt\n  .replace(/heading/g, / {0,3}#{1,6}(?:\\s|$)/) // ATX heading can interrupt\n  .replace(/html/g, / {0,3}<[^\\n>]+>\\n/) // block html can interrupt\n  .replace(/table/g, / {0,3}\\|?(?:[:\\- ]*\\|)+[\\:\\- ]*\\n/) // table can interrupt\n  .getRegex();\nconst _paragraph = /^([^\\n]+(?:\\n(?!hr|heading|lheading|blockquote|fences|list|html|table|[ \\t]+\\n)[^\\n]+)*)/;\nconst blockText = /^[^\\n]+/;\nconst _blockLabel = /(?!\\s*\\])(?:\\\\[\\s\\S]|[^\\[\\]\\\\])+/;\nconst def = edit(/^ {0,3}\\[(label)\\]: *(?:\\n[ \\t]*)?([^<\\s][^\\s]*|<.*?>)(?:(?: +(?:\\n[ \\t]*)?| *\\n[ \\t]*)(title))? *(?:\\n+|$)/)\n  .replace('label', _blockLabel)\n  .replace('title', /(?:\"(?:\\\\\"?|[^\"\\\\])*\"|'[^'\\n]*(?:\\n[^'\\n]+)*\\n?'|\\([^()]*\\))/)\n  .getRegex();\n\nconst list = edit(/^(bull)([ \\t][^\\n]*?)?(?:\\n|$)/)\n  .replace(/bull/g, bullet)\n  .getRegex();\n\nconst _tag = 'address|article|aside|base|basefont|blockquote|body|caption'\n  + '|center|col|colgroup|dd|details|dialog|dir|div|dl|dt|fieldset|figcaption'\n  + '|figure|footer|form|frame|frameset|h[1-6]|head|header|hr|html|iframe'\n  + '|legend|li|link|main|menu|menuitem|meta|nav|noframes|ol|optgroup|option'\n  + '|p|param|search|section|summary|table|tbody|td|tfoot|th|thead|title'\n  + '|tr|track|ul';\nconst _comment = /<!--(?:-?>|[\\s\\S]*?(?:-->|$))/;\nconst html = edit(\n  '^ {0,3}(?:' // optional indentation\n+ '<(script|pre|style|textarea)[\\\\s>][\\\\s\\\\S]*?(?:</\\\\1>[^\\\\n]*\\\\n*|$)' // (1)\n+ '|comment[^\\\\n]*(\\\\n+|$)' // (2)\n+ '|<\\\\?[\\\\s\\\\S]*?(?:\\\\?>[^\\\\n]*\\\\n*|$)' // (3)\n+ '|<![A-Z][\\\\s\\\\S]*?(?:>[^\\\\n]*\\\\n*|$)' // (4)\n+ '|<!\\\\[CDATA\\\\[[\\\\s\\\\S]*?(?:\\\\]\\\\]>[^\\\\n]*\\\\n*|$)' // (5)\n+ '|</?(tag)(?: +|\\\\n|/?>)[\\\\s\\\\S]*?(?:(?:\\\\n[ \\t]*)+\\\\n|$)' // (6)\n+ '|<(?!script|pre|style|textarea)([a-z][\\\\w-]*)(?:attribute)*? */?>(?=[ \\\\t]*(?:\\\\n|$))[\\\\s\\\\S]*?(?:(?:\\\\n[ \\t]*)+\\\\n|$)' // (7) open tag\n+ '|</(?!script|pre|style|textarea)[a-z][\\\\w-]*\\\\s*>(?=[ \\\\t]*(?:\\\\n|$))[\\\\s\\\\S]*?(?:(?:\\\\n[ \\t]*)+\\\\n|$)' // (7) closing tag\n+ ')', 'i')\n  .replace('comment', _comment)\n  .replace('tag', _tag)\n  .replace('attribute', / +[a-zA-Z:_][\\w.:-]*(?: *= *\"[^\"\\n]*\"| *= *'[^'\\n]*'| *= *[^\\s\"'=<>`]+)?/)\n  .getRegex();\n\nconst createParagraph = (listInterrupt: RegExp) => edit(_paragraph)\n  .replace('hr', hr)\n  .replace('heading', ' {0,3}#{1,6}(?:\\\\s|$)')\n  .replace('|lheading', '') // setext headings don't interrupt commonmark paragraphs\n  .replace('|table', '')\n  .replace('blockquote', ' {0,3}>')\n  .replace('fences', ' {0,3}(?:`{3,}(?=[^`\\\\n]*(?:\\\\n|$))|~~~)[^\\\\n]*(?:\\\\n|$)')\n  .replace('list', listInterrupt)\n  .replace('html', '</?(?:tag)(?: +|\\\\n|/?>)|<(?:script|pre|style|textarea|!--)')\n  .replace('tag', _tag) // pars can be interrupted by type (6) html blocks\n  .getRegex();\n\n// only non-empty lists starting from 1 can interrupt paragraphs\nconst paragraph = createParagraph(/ {0,3}(?:[*+-]|1[.)])[ \\t]+[^ \\t\\n]/);\n// inside a blockquote a bare list marker (any number) starts a sibling list,\n// so it must not be lazily continued as paragraph text (unlike a top level\n// paragraph, where an empty list cannot interrupt)\nconst blockquoteParagraph = createParagraph(/ {0,3}(?:[*+-]|\\d{1,9}[.)])(?:[ \\t]|\\n|$)/);\n\nconst blockquote = edit(/^( {0,3}> ?(paragraph|[^\\n]*)(?:\\n|$))+/)\n  .replace('paragraph', blockquoteParagraph)\n  .getRegex();\n\n/**\n * Normal Block Grammar\n */\n\nconst blockNormal = {\n  blockquote,\n  code: blockCode,\n  def,\n  fences,\n  heading,\n  hr,\n  html,\n  lheading,\n  list,\n  newline,\n  paragraph,\n  table: noopTest,\n  text: blockText,\n};\n\ntype BlockKeys = keyof typeof blockNormal;\n\n/**\n * GFM Block Grammar\n */\n\nconst gfmTable = edit(\n  '^ *([^\\\\n ].*)\\\\n' // Header\n+ ' {0,3}((?:\\\\| *)?:?-+:? *(?:\\\\| *:?-+:? *)*(?:\\\\| *)?)' // Align\n+ '(?:\\\\n((?:(?! *\\\\n|hr|heading|blockquote|code|fences|list|html).*(?:\\\\n|$))*)\\\\n*|$)') // Cells\n  .replace('hr', hr)\n  .replace('heading', ' {0,3}#{1,6}(?:\\\\s|$)')\n  .replace('blockquote', ' {0,3}>')\n  .replace('code', '(?: {4}| {0,3}\\t)[^\\\\n]')\n  .replace('fences', ' {0,3}(?:`{3,}(?=[^`\\\\n]*(?:\\\\n|$))|~~~)[^\\\\n]*(?:\\\\n|$)')\n  .replace('list', ' {0,3}(?:[*+-]|1[.)])[ \\\\t]') // any bullet ends the table rows\n  .replace('html', '</?(?:tag)(?: +|\\\\n|/?>)|<(?:script|pre|style|textarea|!--)')\n  .replace('tag', _tag) // tables can be interrupted by type (6) html blocks\n  .getRegex();\n\nconst blockGfm: Record<BlockKeys, RegExp> = {\n  ...blockNormal,\n  lheading: lheadingGfm,\n  table: gfmTable,\n  paragraph: edit(_paragraph)\n    .replace('hr', hr)\n    .replace('heading', ' {0,3}#{1,6}(?:\\\\s|$)')\n    .replace('|lheading', '') // setext headings don't interrupt commonmark paragraphs\n    .replace('table', gfmTable) // interrupt paragraphs with table\n    .replace('blockquote', ' {0,3}>')\n    .replace('fences', ' {0,3}(?:`{3,}(?=[^`\\\\n]*(?:\\\\n|$))|~~~)[^\\\\n]*(?:\\\\n|$)')\n    .replace('list', ' {0,3}(?:[*+-]|1[.)])[ \\\\t]+[^ \\\\t\\\\n]') // only non-empty lists starting from 1 can interrupt\n    .replace('html', '</?(?:tag)(?: +|\\\\n|/?>)|<(?:script|pre|style|textarea|!--)')\n    .replace('tag', _tag) // pars can be interrupted by type (6) html blocks\n    .getRegex(),\n};\n\n/**\n * Pedantic grammar (original John Gruber's loose markdown specification)\n */\n\nconst blockPedantic: Record<BlockKeys, RegExp> = {\n  ...blockNormal,\n  html: edit(\n    '^ *(?:comment *(?:\\\\n|\\\\s*$)'\n    + '|<(tag)[\\\\s\\\\S]+?</\\\\1> *(?:\\\\n{2,}|\\\\s*$)' // closed tag\n    + '|<tag(?:\"[^\"]*\"|\\'[^\\']*\\'|\\\\s[^\\'\"/>\\\\s]*)*?/?> *(?:\\\\n{2,}|\\\\s*$))')\n    .replace('comment', _comment)\n    .replace(/tag/g, '(?!(?:'\n      + 'a|em|strong|small|s|cite|q|dfn|abbr|data|time|code|var|samp|kbd|sub'\n      + '|sup|i|b|u|mark|ruby|rt|rp|bdi|bdo|span|br|wbr|ins|del|img)'\n      + '\\\\b)\\\\w+(?!:|[^\\\\w\\\\s@]*@)\\\\b')\n    .getRegex(),\n  def: /^ *\\[([^\\]]+)\\]: *<?([^\\s>]+)>?(?: +([\"(][^\\n]+[\")]))? *(?:\\n+|$)/,\n  heading: /^(#{1,6})(.*)(?:\\n+|$)/,\n  fences: noopTest, // fences not supported\n  lheading: /^(.+?)\\n {0,3}(=+|-+) *(?:\\n+|$)/,\n  paragraph: edit(_paragraph)\n    .replace('hr', hr)\n    .replace('heading', ' *#{1,6} *[^\\n]')\n    .replace('lheading', lheading)\n    .replace('|table', '')\n    .replace('blockquote', ' {0,3}>')\n    .replace('|fences', '')\n    .replace('|list', '')\n    .replace('|html', '')\n    .replace('|tag', '')\n    .getRegex(),\n};\n\n/**\n * Inline-Level Grammar\n */\n\nconst escape = /^\\\\([!\"#$%&'()*+,\\-./:;<=>?@\\[\\]\\\\^_`{|}~])/;\nconst inlineCode = /^(`+)([^`]|[^`][\\s\\S]*?[^`])\\1(?!`)/;\nconst br = /^( {2,}|\\\\)\\n(?!\\s*$)/;\nconst inlineText = /^(`+|[^`])(?:(?= {2,}\\n)|[\\s\\S]*?(?:(?=[\\\\<!\\[`*_]|\\b_|$)|[^ ](?= {2,}\\n)))/;\n\n// list of unicode punctuation marks, plus any missing characters from CommonMark spec\nconst _punctuation = /[\\p{P}\\p{S}]/u;\nconst _punctuationOrSpace = /[\\s\\p{P}\\p{S}]/u;\nconst _notPunctuationOrSpace = /[^\\s\\p{P}\\p{S}]/u;\nconst punctuation = edit(/^((?![*_])punctSpace)/, 'u')\n  .replace(/punctSpace/g, _punctuationOrSpace).getRegex();\n\n/**\n * Opening punct/quotes excluded from pedantic LDelim nextChar so\n * `aa**\"A\"**bb` / `aa**(A)**bb` can start strong (Pi + Ps + ASCII straight quotes).\n */\nconst _openQuote = /[\\p{Pi}\\p{Ps}\"']/u;\n\n// GFM allows ~ inside strong and em for strikethrough\nconst _punctuationGfmStrongEm = /(?!~)[\\p{P}\\p{S}]/u;\nconst _punctuationOrSpaceGfmStrongEm = /(?!~)[\\s\\p{P}\\p{S}]/u;\nconst _notPunctuationOrSpaceGfmStrongEm = /(?:[^\\s\\p{P}\\p{S}]|~)/u;\n\n// sequences em should skip over [title](link), `code`, <html>\nconst blockSkip = edit(/link|precode-code|html/, 'g')\n  .replace('link', /\\[(?:[^\\[\\]`]|(?<a>`+)[^`]+\\k<a>(?!`))*?\\]\\((?:\\\\[\\s\\S]|[^\\\\\\(\\)]|\\((?:\\\\[\\s\\S]|[^\\\\\\(\\)])*\\))*\\)/)\n  .replace('precode-', supportsLookbehind ? '(?<!`)()' : '(^^|[^`])')\n  .replace('code', /(?<b>`+)[^`]+\\k<b>(?!`)/)\n  .replace('html', /<(?! )[^<>]*?>/)\n  .getRegex();\n\nconst emStrongLDelimCore = /^(?:\\*+(?:((?!\\*)punct)|([^\\s*]))?)|^_+(?:((?!_)punct)|([^\\s_]))?/;\n\nconst emStrongLDelim = edit(emStrongLDelimCore, 'u')\n  .replace(/punct/g, _punctuation)\n  .getRegex();\n\nconst emStrongLDelimGfm = edit(emStrongLDelimCore, 'u')\n  .replace(/punct/g, _punctuationGfmStrongEm)\n  .getRegex();\n\n// Pedantic: do not treat opening punct/quotes as left-delim punct (e.g. **( / **\").\nconst emStrongLDelimPedanticCore = /^(?:\\*+(?:((?!\\*)(?!openQuote)punct)|([^\\s*]))?)|^_+(?:((?!_)(?!openQuote)punct)|([^\\s_]))?/;\n\nconst emStrongLDelimPedantic = edit(emStrongLDelimPedanticCore, 'u')\n  .replace(/openQuote/g, _openQuote)\n  .replace(/punct/g, _punctuation)\n  .getRegex();\n\nconst emStrongRDelimAstCore =\n  '^[^_*]*?__[^_*]*?\\\\*[^_*]*?(?=__)' // Skip orphan inside strong\n+ '|[^*]+(?=[^*])' // Consume to delim\n+ '|(?!\\\\*)punct(\\\\*+)(?=[\\\\s]|$)' // (1) #*** can only be a Right Delimiter\n+ '|notPunctSpace(\\\\*+)(?!\\\\*)(?=punctSpace|$)' // (2) a***#, a*** can only be a Right Delimiter\n+ '|(?!\\\\*)punctSpace(\\\\*+)(?=notPunctSpace)' // (3) #***a, ***a can only be Left Delimiter\n+ '|[\\\\s](\\\\*+)(?!\\\\*)(?=punct)' // (4) ***# can only be Left Delimiter\n+ '|(?!\\\\*)punct(\\\\*+)(?!\\\\*)(?=punct)' // (5) #***# can be either Left or Right Delimiter\n+ '|notPunctSpace(\\\\*+)(?=notPunctSpace)'; // (6) a***a can be either Left or Right Delimiter\n\nconst emStrongRDelimAst = edit(emStrongRDelimAstCore, 'gu')\n  .replace(/notPunctSpace/g, _notPunctuationOrSpace)\n  .replace(/punctSpace/g, _punctuationOrSpace)\n  .replace(/punct/g, _punctuation)\n  .getRegex();\n\nconst emStrongRDelimAstGfm = edit(emStrongRDelimAstCore, 'gu')\n  .replace(/notPunctSpace/g, _notPunctuationOrSpaceGfmStrongEm)\n  .replace(/punctSpace/g, _punctuationOrSpaceGfmStrongEm)\n  .replace(/punct/g, _punctuationGfmStrongEm)\n  .getRegex();\n\n// Pedantic: rule 3 requires whitespace before left delim; rule 6 allows punct before close (e.g. `:**bar`).\nconst emStrongRDelimAstPedanticCore =\n  '^[^_*]*?__[^_*]*?\\\\*[^_*]*?(?=__)' // Skip orphan inside strong\n+ '|[^*]+(?=[^*])' // Consume to delim\n+ '|(?!\\\\*)punct(\\\\*+)(?=[\\\\s]|$)' // (1) #*** can only be a Right Delimiter\n+ '|notPunctSpace(\\\\*+)(?!\\\\*)(?=punctSpace|$)' // (2) a***#, a*** can only be a Right Delimiter\n+ '|(?!\\\\*)[\\\\s](\\\\*+)(?=notPunctSpace)' // (3) ***a can only be Left Delimiter (whitespace required; not #***a)\n+ '|[\\\\s](\\\\*+)(?!\\\\*)(?=punct)' // (4) ***# can only be Left Delimiter\n+ '|(?!\\\\*)punct(\\\\*+)(?!\\\\*)(?=punct)' // (5) #***# can be either Left or Right Delimiter\n+ '|(?:(?!\\\\*)punct|notPunctSpace)(\\\\*+)(?!\\\\*)(?=notPunctSpace)'; // (6) a***a, #***a, and :** (e.g. **foo:**bar)\n\nconst emStrongRDelimAstPedantic = edit(emStrongRDelimAstPedanticCore, 'gu')\n  .replace(/notPunctSpace/g, _notPunctuationOrSpace)\n  .replace(/punctSpace/g, _punctuationOrSpace)\n  .replace(/punct/g, _punctuation)\n  .getRegex();\n\n// Normal: no rule 6 for _ (a___a cannot close as emphasis).\nconst emStrongRDelimUnd = edit(\n  '^[^_*]*?\\\\*\\\\*[^_*]*?_[^_*]*?(?=\\\\*\\\\*)' // Skip orphan inside strong\n+ '|[^_]+(?=[^_])' // Consume to delim\n+ '|(?!_)punct(_+)(?=[\\\\s]|$)' // (1) #___ can only be a Right Delimiter\n+ '|notPunctSpace(_+)(?!_)(?=punctSpace|$)' // (2) a___#, a___ can only be a Right Delimiter\n+ '|(?!_)punctSpace(_+)(?=notPunctSpace)' // (3) #___a, ___a can only be Left Delimiter\n+ '|[\\\\s](_+)(?!_)(?=punct)' // (4) ___# can only be Left Delimiter\n+ '|(?!_)punct(_+)(?!_)(?=punct)', 'gu') // (5) #___# can be either Left or Right Delimiter\n  .replace(/notPunctSpace/g, _notPunctuationOrSpace)\n  .replace(/punctSpace/g, _punctuationOrSpace)\n  .replace(/punct/g, _punctuation)\n  .getRegex();\n\n// Pedantic: same rule 3/6 adjustments as emStrongRDelimAstPedantic (e.g. `_foo:_bar`).\nconst emStrongRDelimUndPedanticCore =\n  '^[^_*]*?\\\\*\\\\*[^_*]*?_[^_*]*?(?=\\\\*\\\\*)' // Skip orphan inside strong\n+ '|[^_]+(?=[^_])' // Consume to delim\n+ '|(?!_)punct(_+)(?=[\\\\s]|$)' // (1) #___ can only be a Right Delimiter\n+ '|notPunctSpace(_+)(?!_)(?=punctSpace|$)' // (2) a___#, a___ can only be a Right Delimiter\n+ '|(?!_)[\\\\s](_+)(?=notPunctSpace)' // (3) ___a can only be Left Delimiter (whitespace required; not #___a)\n+ '|[\\\\s](_+)(?!_)(?=punct)' // (4) ___# can only be Left Delimiter\n+ '|(?!_)punct(_+)(?!_)(?=punct)' // (5) #___# can be either Left or Right Delimiter\n+ '|(?:(?!_)punct|notPunctSpace)(_+)(?!_)(?=notPunctSpace)'; // (6) a___a, #___a, and :__ (e.g. _foo:_bar)\n\nconst emStrongRDelimUndPedantic = edit(emStrongRDelimUndPedanticCore, 'gu')\n  .replace(/notPunctSpace/g, _notPunctuationOrSpace)\n  .replace(/punctSpace/g, _punctuationOrSpace)\n  .replace(/punct/g, _punctuation)\n  .getRegex();\n\n// Tilde left delimiter for strikethrough (similar to emStrongLDelim for asterisk)\nconst delLDelim = edit(/^~~?(?:((?!~)punct)|[^\\s~])/, 'u')\n  .replace(/punct/g, _punctuation)\n  .getRegex();\n\n// Tilde delimiter patterns for strikethrough (similar to asterisk)\nconst delRDelimCore =\n  '^[^~]+(?=[^~])' // Consume to delim\n+ '|(?!~)punct(~~?)(?=[\\\\s]|$)' // (1) #~~ can only be a Right Delimiter\n+ '|notPunctSpace(~~?)(?!~)(?=punctSpace|$)' // (2) a~~#, a~~ can only be a Right Delimiter\n+ '|(?!~)punctSpace(~~?)(?=notPunctSpace)' // (3) #~~a, ~~a can only be Left Delimiter\n+ '|[\\\\s](~~?)(?!~)(?=punct)' // (4) ~~# can only be Left Delimiter\n+ '|(?!~)punct(~~?)(?!~)(?=punct)' // (5) #~~# can be either Left or Right Delimiter\n+ '|notPunctSpace(~~?)(?=notPunctSpace)'; // (6) a~~a can be either Left or Right Delimiter\n\nconst delRDelim = edit(delRDelimCore, 'gu')\n  .replace(/notPunctSpace/g, _notPunctuationOrSpace)\n  .replace(/punctSpace/g, _punctuationOrSpace)\n  .replace(/punct/g, _punctuation)\n  .getRegex();\n\nconst anyPunctuation = edit(/\\\\(punct)/, 'gu')\n  .replace(/punct/g, _punctuation)\n  .getRegex();\n\nconst autolink = edit(/^<(scheme:[^\\s\\x00-\\x1f<>]*|email)>/)\n  .replace('scheme', /[a-zA-Z][a-zA-Z0-9+.-]{1,31}/)\n  .replace('email', /[a-zA-Z0-9.!#$%&'*+/=?^_`{|}~-]+(@)[a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?(?:\\.[a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?)+(?![-_])/)\n  .getRegex();\n\nconst _inlineComment = edit(_comment).replace('(?:-->|$)', '-->').getRegex();\nconst tag = edit(\n  '^comment'\n    + '|^</[a-zA-Z][\\\\w:-]*\\\\s*>' // self-closing tag\n    + '|^<[a-zA-Z][\\\\w-]*(?:attribute)*?\\\\s*/?>' // open tag\n    + '|^<\\\\?[\\\\s\\\\S]*?\\\\?>' // processing instruction, e.g. <?php ?>\n    + '|^<![a-zA-Z]+\\\\s[\\\\s\\\\S]*?>' // declaration, e.g. <!DOCTYPE html>\n    + '|^<!\\\\[CDATA\\\\[[\\\\s\\\\S]*?\\\\]\\\\]>') // CDATA section\n  .replace('comment', _inlineComment)\n  .replace('attribute', /\\s+[a-zA-Z:_][\\w.:-]*(?:\\s*=\\s*\"[^\"]*\"|\\s*=\\s*'[^']*'|\\s*=\\s*[^\\s\"'=<>`]+)?/)\n  .getRegex();\n\nconst _inlineLabel = /(?:\\[(?:\\\\[\\s\\S]|[^\\[\\]\\\\])*\\]|\\\\[\\s\\S]|`+(?!`)[^`]*?`+(?!`)|``+(?=\\])|[^\\[\\]\\\\`])*?/;\n\nconst link = edit(/^!?\\[(label)\\]\\(\\s*(href)(?:(?:[ \\t]+(?:\\n[ \\t]*)?|\\n[ \\t]*)(title))?\\s*\\)/)\n  .replace('label', _inlineLabel)\n  .replace('href', /<(?:\\\\.|[^\\n<>\\\\])+>|[^ \\t\\n\\x00-\\x1f]+|(?=\\))/)\n  .replace('title', /\"(?:\\\\\"?|[^\"\\\\])*\"|'(?:\\\\'?|[^'\\\\])*'|\\((?:\\\\\\)?|[^)\\\\])*\\)/)\n  .getRegex();\n\nconst reflink = edit(/^!?\\[(label)\\]\\[(ref)\\]/)\n  .replace('label', _inlineLabel)\n  .replace('ref', _blockLabel)\n  .getRegex();\n\nconst nolink = edit(/^!?\\[(ref)\\](?:\\[\\])?/)\n  .replace('ref', _blockLabel)\n  .getRegex();\n\nconst reflinkSearch = edit('reflink|nolink(?!\\\\()', 'g')\n  .replace('reflink', reflink)\n  .replace('nolink', nolink)\n  .getRegex();\n\nconst _caseInsensitiveProtocol = /[hH][tT][tT][pP][sS]?|[fF][tT][pP]/;\n\n/**\n * Normal Inline Grammar\n */\n\nconst inlineNormal = {\n  _backpedal: noopTest, // only used for GFM url\n  anyPunctuation,\n  autolink,\n  blockSkip,\n  br,\n  code: inlineCode,\n  del: noopTest,\n  delLDelim: noopTest,\n  delRDelim: noopTest,\n  emStrongLDelim,\n  emStrongRDelimAst,\n  emStrongRDelimUnd,\n  escape,\n  link,\n  nolink,\n  punctuation,\n  reflink,\n  reflinkSearch,\n  tag,\n  text: inlineText,\n  url: noopTest,\n};\n\ntype InlineKeys = keyof typeof inlineNormal;\n\n/**\n * Pedantic Inline Grammar\n */\n\nconst inlinePedantic: Record<InlineKeys, RegExp> = {\n  ...inlineNormal,\n  emStrongLDelim: emStrongLDelimPedantic,\n  emStrongRDelimAst: emStrongRDelimAstPedantic,\n  emStrongRDelimUnd: emStrongRDelimUndPedantic,\n  link: edit(/^!?\\[(label)\\]\\((.*?)\\)/)\n    .replace('label', _inlineLabel)\n    .getRegex(),\n  reflink: edit(/^!?\\[(label)\\]\\s*\\[([^\\]]*)\\]/)\n    .replace('label', _inlineLabel)\n    .getRegex(),\n};\n\n/**\n * GFM Inline Grammar\n */\n\nconst inlineGfm: Record<InlineKeys, RegExp> = {\n  ...inlineNormal,\n  emStrongRDelimAst: emStrongRDelimAstGfm,\n  emStrongLDelim: emStrongLDelimGfm,\n  delLDelim,\n  delRDelim,\n  url: edit(/^((?:protocol):\\/\\/|www\\.)(?:[a-zA-Z0-9\\-]+\\.?)+[^\\s<]*|^email/)\n    .replace('protocol', _caseInsensitiveProtocol)\n    .replace('email', /[A-Za-z0-9._+-]+(@)[a-zA-Z0-9-_]+(?:\\.[a-zA-Z0-9-_]*[a-zA-Z0-9])+(?![-_])/)\n    .getRegex(),\n  _backpedal: /(?:[^?!.,:;*_'\"~()&]+|\\([^)]*\\)|&(?![a-zA-Z0-9]+;$)|[?!.,:;*_'\"~)]+(?!$))+/,\n  del: /^(~~?)(?=[^\\s~])((?:\\\\[\\s\\S]|[^\\\\])*?(?:\\\\[\\s\\S]|[^\\s~\\\\]))\\1(?=[^~]|$)/,\n  text: edit(/^(`+|~+|[^`~])(?:(?=[`~])|(?= {2,}\\n)|(?=[a-zA-Z0-9.!#$%&'*+\\/=?_`{\\|}~-]+@)|[\\s\\S]*?(?:(?=[\\\\<!\\[`*~_]|\\b_|protocol:\\/\\/|www\\.|$)|[^ ](?= {2,}\\n)|[^a-zA-Z0-9.!#$%&'*+\\/=?_`{\\|}~-](?=[a-zA-Z0-9.!#$%&'*+\\/=?_`{\\|}~-]+@)))/)\n    .replace('protocol', _caseInsensitiveProtocol)\n    .getRegex(),\n};\n\n/**\n * GFM + Line Breaks Inline Grammar\n */\n\nconst inlineBreaks: Record<InlineKeys, RegExp> = {\n  ...inlineGfm,\n  br: edit(br).replace('{2,}', '*').getRegex(),\n  text: edit(inlineGfm.text)\n    .replace('\\\\b_', '\\\\b_| {2,}\\\\n')\n    .replace(/\\{2,\\}/g, '*')\n    .getRegex(),\n};\n\n/**\n * exports\n */\n\nexport const block = {\n  normal: blockNormal,\n  gfm: blockGfm,\n  pedantic: blockPedantic,\n};\n\nexport const inline = {\n  normal: inlineNormal,\n  gfm: inlineGfm,\n  breaks: inlineBreaks,\n  pedantic: inlinePedantic,\n};\n\nexport interface Rules {\n  other: typeof other\n  block: Record<BlockKeys, RegExp>\n  inline: Record<InlineKeys, RegExp>\n}\n","import { _defaults } from './defaults.ts';\nimport {\n  rtrim,\n  splitCells,\n  findClosingBracket,\n  expandTabs,\n  trimTrailingBlankLines,\n} from './helpers.ts';\nimport type { Rules } from './rules.ts';\nimport type { _Lexer } from './Lexer.ts';\nimport type { Links, Tokens, Token } from './Tokens.ts';\nimport type { MarkedOptions } from './MarkedOptions.ts';\n\nfunction outputLink(cap: string[], link: Pick<Tokens.Link, 'href' | 'title'>, raw: string, lexer: _Lexer, rules: Rules): Tokens.Link | Tokens.Image {\n  const href = link.href;\n  const title = link.title || null;\n  const text = cap[1].replace(rules.other.outputLinkReplace, '$1');\n\n  lexer.state.inLink = true;\n  const token: Tokens.Link | Tokens.Image = {\n    type: cap[0].charAt(0) === '!' ? 'image' : 'link',\n    raw,\n    href,\n    title,\n    text,\n    tokens: lexer.inlineTokens(text),\n  };\n  lexer.state.inLink = false;\n  return token;\n}\n\nfunction indentCodeCompensation(raw: string, text: string, rules: Rules) {\n  const matchIndentToCode = raw.match(rules.other.indentCodeCompensation);\n\n  if (matchIndentToCode === null) {\n    return text;\n  }\n\n  const indentToCode = matchIndentToCode[1];\n\n  return text\n    .split('\\n')\n    .map(node => {\n      const matchIndentInNode = node.match(rules.other.beginningSpace);\n      if (matchIndentInNode === null) {\n        return node;\n      }\n\n      const [indentInNode] = matchIndentInNode;\n\n      if (indentInNode.length >= indentToCode.length) {\n        return node.slice(indentToCode.length);\n      }\n\n      return node;\n    })\n    .join('\\n');\n}\n\n/**\n * Tokenizer\n */\nexport class _Tokenizer<ParserOutput = string, RendererOutput = string> {\n  options: MarkedOptions<ParserOutput, RendererOutput>;\n  rules!: Rules; // set by the lexer\n  lexer!: _Lexer<ParserOutput, RendererOutput>; // set by the lexer\n\n  constructor(options?: MarkedOptions<ParserOutput, RendererOutput>) {\n    this.options = options || _defaults;\n  }\n\n  space(src: string): Tokens.Space | undefined {\n    const cap = this.rules.block.newline.exec(src);\n    if (cap && cap[0].length > 0) {\n      return {\n        type: 'space',\n        raw: cap[0],\n      };\n    }\n  }\n\n  code(src: string): Tokens.Code | undefined {\n    const cap = this.rules.block.code.exec(src);\n    if (cap) {\n      const raw = this.options.pedantic\n        ? cap[0]\n        : trimTrailingBlankLines(cap[0]);\n      const text = raw.replace(this.rules.other.codeRemoveIndent, '');\n      return {\n        type: 'code',\n        raw,\n        codeBlockStyle: 'indented',\n        text,\n      };\n    }\n  }\n\n  fences(src: string): Tokens.Code | undefined {\n    const cap = this.rules.block.fences.exec(src);\n    if (cap) {\n      const raw = cap[0];\n      const text = indentCodeCompensation(raw, cap[3] || '', this.rules);\n\n      return {\n        type: 'code',\n        raw,\n        lang: cap[2] ? cap[2].trim().replace(this.rules.inline.anyPunctuation, '$1') : cap[2],\n        text,\n      };\n    }\n  }\n\n  heading(src: string): Tokens.Heading | undefined {\n    const cap = this.rules.block.heading.exec(src);\n    if (cap) {\n      let text = cap[2].trim();\n\n      // remove trailing #s\n      if (this.rules.other.endingHash.test(text)) {\n        const trimmed = rtrim(text, '#');\n        if (this.options.pedantic) {\n          text = trimmed.trim();\n        } else if (!trimmed || this.rules.other.endingSpaceChar.test(trimmed)) {\n          // CommonMark requires space before trailing #s\n          text = trimmed.trim();\n        }\n      }\n\n      return {\n        type: 'heading',\n        raw: rtrim(cap[0], '\\n'),\n        depth: cap[1].length,\n        text,\n        tokens: this.lexer.inline(text),\n      };\n    }\n  }\n\n  hr(src: string): Tokens.Hr | undefined {\n    const cap = this.rules.block.hr.exec(src);\n    if (cap) {\n      return {\n        type: 'hr',\n        raw: rtrim(cap[0], '\\n'),\n      };\n    }\n  }\n\n  blockquote(src: string): Tokens.Blockquote | undefined {\n    const cap = this.rules.block.blockquote.exec(src);\n    if (cap) {\n      let lines = rtrim(cap[0], '\\n').split('\\n');\n      let raw = '';\n      let text = '';\n      const tokens: Token[] = [];\n\n      while (lines.length > 0) {\n        let inBlockquote = false;\n        const currentLines = [];\n\n        let i;\n        for (i = 0; i < lines.length; i++) {\n          // get lines up to a continuation\n          if (this.rules.other.blockquoteStart.test(lines[i])) {\n            currentLines.push(lines[i]);\n            inBlockquote = true;\n          } else if (!inBlockquote) {\n            currentLines.push(lines[i]);\n          } else {\n            break;\n          }\n        }\n        lines = lines.slice(i);\n\n        const currentRaw = currentLines.join('\\n');\n        const currentText = currentRaw\n          // precede setext continuation with 4 spaces so it isn't a setext\n          .replace(this.rules.other.blockquoteSetextReplace, '\\n    $1')\n          .replace(this.rules.other.blockquoteSetextReplace2, '');\n        raw = raw ? `${raw}\\n${currentRaw}` : currentRaw;\n        text = text ? `${text}\\n${currentText}` : currentText;\n\n        // parse blockquote lines as top level tokens\n        // merge paragraphs if this is a continuation\n        const top = this.lexer.state.top;\n        this.lexer.state.top = true;\n        this.lexer.blockTokens(currentText, tokens, true);\n        this.lexer.state.top = top;\n\n        // if there is no continuation then we are done\n        if (lines.length === 0) {\n          break;\n        }\n\n        const lastToken = tokens.at(-1);\n\n        if (lastToken?.type === 'code') {\n          // blockquote continuation cannot be preceded by a code block\n          break;\n        } else if (lastToken?.type === 'blockquote') {\n          // include continuation in nested blockquote\n          const oldToken = lastToken as Tokens.Blockquote;\n          // The continuation lines belong to the same nesting frame as the\n          // nested blockquote, which already had one '>' marker stripped, so\n          // strip one marker from them too. Otherwise a restated marker after a\n          // lazy line is re-parsed as a spurious deeper blockquote.\n          const continuation = lines.join('\\n');\n          const newText = oldToken.raw + '\\n' + continuation.replace(this.rules.other.blockquoteSetextReplace2, '');\n          const newToken = this.blockquote(newText)!;\n          tokens[tokens.length - 1] = newToken;\n\n          raw = `${raw}\\n${continuation}`;\n          text = text.substring(0, text.length - oldToken.text.length) + newToken.text;\n          break;\n        } else if (lastToken?.type === 'list') {\n          // include continuation in nested list\n          const oldToken = lastToken as Tokens.List;\n          const newText = oldToken.raw + '\\n' + lines.join('\\n');\n          const newToken = this.list(newText)!;\n          tokens[tokens.length - 1] = newToken;\n\n          raw = raw.substring(0, raw.length - lastToken.raw.length) + newToken.raw;\n          text = text.substring(0, text.length - oldToken.raw.length) + newToken.raw;\n          lines = newText.substring(tokens.at(-1)!.raw.length).split('\\n');\n          continue;\n        }\n      }\n\n      return {\n        type: 'blockquote',\n        raw,\n        tokens,\n        text,\n      };\n    }\n  }\n\n  list(src: string): Tokens.List | undefined {\n    let cap = this.rules.block.list.exec(src);\n    if (cap) {\n      let bull = cap[1].trim();\n      const isordered = bull.length > 1;\n\n      const list: Tokens.List = {\n        type: 'list',\n        raw: '',\n        ordered: isordered,\n        start: isordered ? +bull.slice(0, -1) : '',\n        loose: false,\n        items: [],\n      };\n\n      bull = isordered ? `\\\\d{1,9}\\\\${bull.slice(-1)}` : `\\\\${bull}`;\n\n      if (this.options.pedantic) {\n        bull = isordered ? bull : '[*+-]';\n      }\n\n      // Get next list item\n      const itemRegex = this.rules.other.listItemRegex(bull);\n      let endsWithBlankLine = false;\n      // Check if current bullet point can start a new List Item\n      while (src) {\n        let endEarly = false;\n        let raw = '';\n        let itemContents = '';\n        if (!(cap = itemRegex.exec(src))) {\n          break;\n        }\n\n        if (this.rules.block.hr.test(src)) { // End list if bullet was actually HR (possibly move into itemRegex?)\n          break;\n        }\n\n        raw = cap[0];\n        src = src.substring(raw.length);\n\n        let line = expandTabs(cap[2].split('\\n', 1)[0], cap[1].length);\n        let nextLine = src.split('\\n', 1)[0];\n        let blankLine = !line.trim();\n\n        let indent = 0;\n        if (this.options.pedantic) {\n          indent = 2;\n          itemContents = line.trimStart();\n        } else if (blankLine) {\n          indent = cap[1].length + 1;\n        } else {\n          indent = line.search(this.rules.other.nonSpaceChar); // Find first non-space char\n          indent = indent > 4 ? 1 : indent; // Treat indented code blocks (> 4 spaces) as having only 1 indent\n          itemContents = line.slice(indent);\n          indent += cap[1].length;\n        }\n\n        if (blankLine && this.rules.other.blankLine.test(nextLine)) { // Items begin with at most one blank line\n          raw += nextLine + '\\n';\n          src = src.substring(nextLine.length + 1);\n          endEarly = true;\n        }\n\n        if (!endEarly) {\n          const nextBulletRegex = this.rules.other.nextBulletRegex(indent);\n          const hrRegex = this.rules.other.hrRegex(indent);\n          const fencesBeginRegex = this.rules.other.fencesBeginRegex(indent);\n          const headingBeginRegex = this.rules.other.headingBeginRegex(indent);\n          const htmlBeginRegex = this.rules.other.htmlBeginRegex(indent);\n          const blockquoteBeginRegex = this.rules.other.blockquoteBeginRegex(indent);\n\n          // Check if following lines should be included in List Item\n          while (src) {\n            const rawLine = src.split('\\n', 1)[0];\n            let nextLineWithoutTabs;\n            nextLine = rawLine;\n\n            // Re-align to follow commonmark nesting rules\n            if (this.options.pedantic) {\n              nextLine = nextLine.replace(this.rules.other.listReplaceNesting, '  ');\n              nextLineWithoutTabs = nextLine;\n            } else {\n              nextLineWithoutTabs = nextLine.replace(this.rules.other.tabCharGlobal, '    ');\n            }\n\n            // End list item if found code fences\n            if (fencesBeginRegex.test(nextLine)) {\n              break;\n            }\n\n            // End list item if found start of new heading\n            if (headingBeginRegex.test(nextLine)) {\n              break;\n            }\n\n            // End list item if found start of html block\n            if (htmlBeginRegex.test(nextLine)) {\n              break;\n            }\n\n            // End list item if found start of blockquote\n            if (blockquoteBeginRegex.test(nextLine)) {\n              break;\n            }\n\n            // End list item if found start of new bullet\n            if (nextBulletRegex.test(nextLine)) {\n              break;\n            }\n\n            // Horizontal rule found\n            if (hrRegex.test(nextLine)) {\n              break;\n            }\n\n            if (nextLineWithoutTabs.search(this.rules.other.nonSpaceChar) >= indent || !nextLine.trim()) { // Dedent if possible\n              itemContents += '\\n' + nextLineWithoutTabs.slice(indent);\n            } else {\n              // not enough indentation\n              if (blankLine) {\n                break;\n              }\n\n              // paragraph continuation unless last line was a different block level element\n              if (line.replace(this.rules.other.tabCharGlobal, '    ').search(this.rules.other.nonSpaceChar) >= 4) { // indented code block\n                break;\n              }\n              if (fencesBeginRegex.test(line)) {\n                break;\n              }\n              if (headingBeginRegex.test(line)) {\n                break;\n              }\n              if (hrRegex.test(line)) {\n                break;\n              }\n\n              itemContents += '\\n' + nextLine;\n            }\n\n            blankLine = !nextLine.trim();\n\n            raw += rawLine + '\\n';\n            src = src.substring(rawLine.length + 1);\n            line = nextLineWithoutTabs.slice(indent);\n          }\n        }\n\n        if (!list.loose) {\n          // If the previous item ended with a blank line, the list is loose\n          if (endsWithBlankLine) {\n            list.loose = true;\n          } else if (this.rules.other.doubleBlankLine.test(raw)) {\n            endsWithBlankLine = true;\n          }\n        }\n\n        list.items.push({\n          type: 'list_item',\n          raw,\n          task: !!this.options.gfm && this.rules.other.listIsTask.test(itemContents),\n          loose: false,\n          text: itemContents,\n          tokens: [],\n        });\n\n        list.raw += raw;\n      }\n\n      // Do not consume newlines at end of final item. Alternatively, make itemRegex *start* with any newlines to simplify/speed up endsWithBlankLine logic\n      const lastItem = list.items.at(-1);\n      if (lastItem) {\n        lastItem.raw = lastItem.raw.trimEnd();\n        lastItem.text = lastItem.text.trimEnd();\n      } else {\n        // not a list since there were no items\n        return;\n      }\n      list.raw = list.raw.trimEnd();\n\n      // Item child tokens handled here at end because we needed to have the final item to trim it first\n      // First pass: tokenize items and finalize list.loose from spacers before placing checkboxes\n      for (const item of list.items) {\n        this.lexer.state.top = false;\n        item.tokens = this.lexer.blockTokens(item.text, []);\n\n        if (!list.loose) {\n          // Check if list should be loose\n          const spacers = item.tokens.filter(t => t.type === 'space');\n          const hasMultipleLineBreaks = spacers.length > 0 && spacers.some(t => this.rules.other.anyLine.test(t.raw));\n\n          list.loose = hasMultipleLineBreaks;\n        }\n      }\n\n      // Second pass: place task checkboxes using the final list.loose\n      for (const item of list.items) {\n        const itemToken = item.tokens[0];\n        if (item.task && (itemToken?.type === 'text' || itemToken?.type === 'paragraph')) {\n          // Remove checkbox markdown from item tokens\n          item.text = item.text.replace(this.rules.other.listReplaceTask, '');\n          itemToken.raw = itemToken.raw.replace(this.rules.other.listReplaceTask, '');\n          itemToken.text = itemToken.text.replace(this.rules.other.listReplaceTask, '');\n          for (let i = this.lexer.inlineQueue.length - 1; i >= 0; i--) {\n            if (this.rules.other.listIsTask.test(this.lexer.inlineQueue[i].src)) {\n              this.lexer.inlineQueue[i].src = this.lexer.inlineQueue[i].src.replace(this.rules.other.listReplaceTask, '');\n              break;\n            }\n          }\n\n          const taskRaw = this.rules.other.listTaskCheckbox.exec(item.raw);\n          if (taskRaw) {\n            const checkboxToken: Tokens.Checkbox = {\n              type: 'checkbox',\n              raw: taskRaw[0] + ' ',\n              checked: taskRaw[0] !== '[ ]',\n            };\n            item.checked = checkboxToken.checked;\n            if (list.loose) {\n              if (item.tokens[0] && ['paragraph', 'text'].includes(item.tokens[0].type) && 'tokens' in item.tokens[0] && item.tokens[0].tokens) {\n                item.tokens[0].raw = checkboxToken.raw + item.tokens[0].raw;\n                item.tokens[0].text = checkboxToken.raw + item.tokens[0].text;\n                item.tokens[0].tokens.unshift(checkboxToken);\n              } else {\n                item.tokens.unshift({\n                  type: 'paragraph',\n                  raw: checkboxToken.raw,\n                  text: checkboxToken.raw,\n                  tokens: [checkboxToken],\n                });\n              }\n            } else {\n              item.tokens.unshift(checkboxToken);\n            }\n          }\n        } else if (item.task) {\n          item.task = false;\n        }\n      }\n\n      // Set all items to loose if list is loose\n      if (list.loose) {\n        for (const item of list.items) {\n          item.loose = true;\n          for (const token of item.tokens) {\n            if (token.type === 'text') {\n              token.type = 'paragraph';\n            }\n          }\n        }\n      }\n\n      return list;\n    }\n  }\n\n  html(src: string): Tokens.HTML | undefined {\n    const cap = this.rules.block.html.exec(src);\n    if (cap) {\n      const raw = trimTrailingBlankLines(cap[0]);\n      const token: Tokens.HTML = {\n        type: 'html',\n        block: true,\n        raw,\n        pre: cap[1] === 'pre' || cap[1] === 'script' || cap[1] === 'style',\n        text: raw,\n      };\n      return token;\n    }\n  }\n\n  def(src: string): Tokens.Def | undefined {\n    const cap = this.rules.block.def.exec(src);\n    if (cap) {\n      const tag = cap[1].toLowerCase().replace(this.rules.other.multipleSpaceGlobal, ' ');\n      const href = cap[2] ? cap[2].replace(this.rules.other.hrefBrackets, '$1').replace(this.rules.inline.anyPunctuation, '$1') : '';\n      const title = cap[3] ? cap[3].substring(1, cap[3].length - 1).replace(this.rules.inline.anyPunctuation, '$1') : cap[3];\n      return {\n        type: 'def',\n        tag,\n        raw: rtrim(cap[0], '\\n'),\n        href,\n        title,\n      };\n    }\n  }\n\n  table(src: string): Tokens.Table | undefined {\n    const cap = this.rules.block.table.exec(src);\n    if (!cap) {\n      return;\n    }\n\n    if (!this.rules.other.tableDelimiter.test(cap[2])) {\n      // delimiter row must have a pipe (|) or colon (:) otherwise it is a setext heading\n      return;\n    }\n\n    const headers = splitCells(cap[1]);\n    const aligns = cap[2].replace(this.rules.other.tableAlignChars, '').split('|');\n    const rows = cap[3]?.trim() ? cap[3].replace(this.rules.other.tableRowBlankLine, '').split('\\n') : [];\n\n    const item: Tokens.Table = {\n      type: 'table',\n      raw: rtrim(cap[0], '\\n'),\n      header: [],\n      align: [],\n      rows: [],\n    };\n\n    if (headers.length !== aligns.length) {\n      // header and align columns must be equal, rows can be different.\n      return;\n    }\n\n    for (const align of aligns) {\n      if (this.rules.other.tableAlignRight.test(align)) {\n        item.align.push('right');\n      } else if (this.rules.other.tableAlignCenter.test(align)) {\n        item.align.push('center');\n      } else if (this.rules.other.tableAlignLeft.test(align)) {\n        item.align.push('left');\n      } else {\n        item.align.push(null);\n      }\n    }\n\n    for (let i = 0; i < headers.length; i++) {\n      item.header.push({\n        text: headers[i],\n        tokens: this.lexer.inline(headers[i]),\n        header: true,\n        align: item.align[i],\n      });\n    }\n\n    for (const row of rows) {\n      item.rows.push(splitCells(row, item.header.length).map((cell, i) => {\n        return {\n          text: cell,\n          tokens: this.lexer.inline(cell),\n          header: false,\n          align: item.align[i],\n        };\n      }));\n    }\n\n    return item;\n  }\n\n  lheading(src: string): Tokens.Heading | undefined {\n    const cap = this.rules.block.lheading.exec(src);\n    if (cap) {\n      const text = cap[1].trim();\n      return {\n        type: 'heading',\n        raw: rtrim(cap[0], '\\n'),\n        depth: cap[2].charAt(0) === '=' ? 1 : 2,\n        text,\n        tokens: this.lexer.inline(text),\n      };\n    }\n  }\n\n  paragraph(src: string): Tokens.Paragraph | undefined {\n    const cap = this.rules.block.paragraph.exec(src);\n    if (cap) {\n      const text = cap[1].charAt(cap[1].length - 1) === '\\n'\n        ? cap[1].slice(0, -1)\n        : cap[1];\n      return {\n        type: 'paragraph',\n        raw: cap[0],\n        text,\n        tokens: this.lexer.inline(text),\n      };\n    }\n  }\n\n  text(src: string): Tokens.Text | undefined {\n    const cap = this.rules.block.text.exec(src);\n    if (cap) {\n      return {\n        type: 'text',\n        raw: cap[0],\n        text: cap[0],\n        tokens: this.lexer.inline(cap[0]),\n      };\n    }\n  }\n\n  escape(src: string): Tokens.Escape | undefined {\n    const cap = this.rules.inline.escape.exec(src);\n    if (cap) {\n      return {\n        type: 'escape',\n        raw: cap[0],\n        text: cap[1],\n      };\n    }\n  }\n\n  tag(src: string): Tokens.Tag | undefined {\n    const cap = this.rules.inline.tag.exec(src);\n    if (cap) {\n      if (!this.lexer.state.inLink && this.rules.other.startATag.test(cap[0])) {\n        this.lexer.state.inLink = true;\n      } else if (this.lexer.state.inLink && this.rules.other.endATag.test(cap[0])) {\n        this.lexer.state.inLink = false;\n      }\n      if (!this.lexer.state.inRawBlock && this.rules.other.startPreScriptTag.test(cap[0])) {\n        this.lexer.state.inRawBlock = true;\n      } else if (this.lexer.state.inRawBlock && this.rules.other.endPreScriptTag.test(cap[0])) {\n        this.lexer.state.inRawBlock = false;\n      }\n\n      return {\n        type: 'html',\n        raw: cap[0],\n        inLink: this.lexer.state.inLink,\n        inRawBlock: this.lexer.state.inRawBlock,\n        block: false,\n        text: cap[0],\n      };\n    }\n  }\n\n  link(src: string): Tokens.Link | Tokens.Image | undefined {\n    const cap = this.rules.inline.link.exec(src);\n    if (cap) {\n      const trimmedUrl = cap[2].trim();\n      if (!this.options.pedantic && this.rules.other.startAngleBracket.test(trimmedUrl)) {\n        // commonmark requires matching angle brackets\n        if (!(this.rules.other.endAngleBracket.test(trimmedUrl))) {\n          return;\n        }\n\n        // ending angle bracket cannot be escaped\n        const rtrimSlash = rtrim(trimmedUrl.slice(0, -1), '\\\\');\n        if ((trimmedUrl.length - rtrimSlash.length) % 2 === 0) {\n          return;\n        }\n      } else {\n        // find closing parenthesis\n        const lastParenIndex = findClosingBracket(cap[2], '()');\n        if (lastParenIndex === -2) {\n          // more open parens than closed\n          return;\n        }\n\n        if (lastParenIndex > -1) {\n          const start = cap[0].indexOf('!') === 0 ? 5 : 4;\n          const linkLen = start + cap[1].length + lastParenIndex;\n          cap[2] = cap[2].substring(0, lastParenIndex);\n          cap[0] = cap[0].substring(0, linkLen).trim();\n          cap[3] = '';\n        }\n      }\n      let href = cap[2];\n      let title = '';\n      if (this.options.pedantic) {\n        // split pedantic href and title\n        const link = this.rules.other.pedanticHrefTitle.exec(href);\n\n        if (link) {\n          href = link[1];\n          title = link[3];\n        }\n      } else {\n        title = cap[3] ? cap[3].slice(1, -1) : '';\n      }\n\n      href = href.trim();\n      if (this.rules.other.startAngleBracket.test(href)) {\n        if (this.options.pedantic && !(this.rules.other.endAngleBracket.test(trimmedUrl))) {\n          // pedantic allows starting angle bracket without ending angle bracket\n          href = href.slice(1);\n        } else {\n          href = href.slice(1, -1);\n        }\n      }\n      return outputLink(cap, {\n        href: href ? href.replace(this.rules.inline.anyPunctuation, '$1') : href,\n        title: title ? title.replace(this.rules.inline.anyPunctuation, '$1') : title,\n      }, cap[0], this.lexer, this.rules);\n    }\n  }\n\n  reflink(src: string, links: Links): Tokens.Link | Tokens.Image | Tokens.Text | undefined {\n    let cap;\n    if ((cap = this.rules.inline.reflink.exec(src))\n      || (cap = this.rules.inline.nolink.exec(src))) {\n      const linkString = (cap[2] || cap[1]).replace(this.rules.other.multipleSpaceGlobal, ' ');\n      const link = links[linkString.toLowerCase()];\n      if (!link) {\n        const text = cap[0].charAt(0);\n        return {\n          type: 'text',\n          raw: text,\n          text,\n        };\n      }\n      return outputLink(cap, link, cap[0], this.lexer, this.rules);\n    }\n  }\n\n  emStrong(src: string, maskedSrc: string, prevChar = ''): Tokens.Em | Tokens.Strong | undefined {\n    let match = this.rules.inline.emStrongLDelim.exec(src);\n    if (!match) return;\n    if (!match[1] && !match[2] && !match[3] && !match[4]) return;\n\n    // _ can't be between two alphanumerics. \\p{L}\\p{N} includes non-english alphabet/numbers as well\n    if (match[4] && prevChar.match(this.rules.other.unicodeAlphaNumeric)) return;\n\n    const nextChar = match[1] || match[3] || '';\n\n    if (!nextChar || !prevChar || this.rules.inline.punctuation.exec(prevChar)) {\n      // unicode Regex counts emoji as 1 char; spread into array for proper count (used multiple times below)\n      const lLength = [...match[0]].length - 1;\n      let rDelim, rLength, delimTotal = lLength, midDelimTotal = 0;\n\n      const delimChar = match[0][0];\n      // A mid-run opener (for example the second star of an unmatched `**`) must\n      // only pair with a delimiter that can only close, otherwise it steals the\n      // opener of a later span (`**a*b*c` must be `**a<em>b</em>c`).\n      const midRun = prevChar === delimChar;\n      const endReg = delimChar === '*' ? this.rules.inline.emStrongRDelimAst : this.rules.inline.emStrongRDelimUnd;\n      endReg.lastIndex = 0;\n\n      // Clip maskedSrc to same section of string as src (move to lexer?)\n      maskedSrc = maskedSrc.slice(-1 * src.length + lLength);\n\n      while ((match = endReg.exec(maskedSrc)) !== null) {\n        rDelim = match[1] || match[2] || match[3] || match[4] || match[5] || match[6];\n\n        if (!rDelim) continue; // skip single * in __abc*abc__\n\n        rLength = [...rDelim].length;\n\n        if (match[3] || match[4]) { // found another Left Delim\n          delimTotal += rLength;\n          continue;\n        } else if (match[5] || match[6]) { // either Left or Right Delim\n          if (lLength % 3 && !((lLength + rLength) % 3)) {\n            midDelimTotal += rLength;\n            continue; // CommonMark Emphasis Rules 9-10\n          }\n          if (midRun) {\n            // A mid-run opener cannot close against an ambiguous delimiter that\n            // can also open; that delimiter opens its own emphasis span instead.\n            break;\n          }\n        }\n\n        delimTotal -= rLength;\n\n        if (delimTotal > 0) continue; // Haven't found enough closing delimiters\n\n        // Remove extra characters. *a*** -> *a*\n        rLength = Math.min(rLength, rLength + delimTotal + midDelimTotal);\n        // char length can be >1 for unicode characters;\n        const lastCharLength = [...match[0]][0].length;\n        const raw = src.slice(0, lLength + match.index + lastCharLength + rLength);\n\n        // Create `em` if smallest delimiter has odd char count. *a***\n        if (Math.min(lLength, rLength) % 2) {\n          const text = raw.slice(1, -1);\n          return {\n            type: 'em',\n            raw,\n            text,\n            tokens: this.lexer.inlineTokens(text),\n          };\n        }\n\n        // Create 'strong' if smallest delimiter has even char count. **a***\n        const text = raw.slice(2, -2);\n        return {\n          type: 'strong',\n          raw,\n          text,\n          tokens: this.lexer.inlineTokens(text),\n        };\n      }\n    }\n  }\n\n  codespan(src: string): Tokens.Codespan | undefined {\n    const cap = this.rules.inline.code.exec(src);\n    if (cap) {\n      let text = cap[2].replace(this.rules.other.newLineCharGlobal, ' ');\n      const hasNonSpaceChars = this.rules.other.nonSpaceChar.test(text);\n      const hasSpaceCharsOnBothEnds = this.rules.other.startingSpaceChar.test(text) && this.rules.other.endingSpaceChar.test(text);\n      if (hasNonSpaceChars && hasSpaceCharsOnBothEnds) {\n        text = text.substring(1, text.length - 1);\n      }\n      return {\n        type: 'codespan',\n        raw: cap[0],\n        text,\n      };\n    }\n  }\n\n  br(src: string): Tokens.Br | undefined {\n    const cap = this.rules.inline.br.exec(src);\n    if (cap) {\n      return {\n        type: 'br',\n        raw: cap[0],\n      };\n    }\n  }\n\n  del(src: string, maskedSrc: string, prevChar = ''): Tokens.Del | undefined {\n    let match = this.rules.inline.delLDelim.exec(src);\n    if (!match) return;\n\n    const nextChar = match[1] || '';\n\n    if (!nextChar || !prevChar || this.rules.inline.punctuation.exec(prevChar)) {\n      // unicode Regex counts emoji as 1 char; spread into array for proper count\n      const lLength = [...match[0]].length - 1;\n      let rDelim, rLength, delimTotal = lLength;\n\n      const endReg = this.rules.inline.delRDelim;\n      endReg.lastIndex = 0;\n\n      // Clip maskedSrc to same section of string as src\n      maskedSrc = maskedSrc.slice(-1 * src.length + lLength);\n\n      while ((match = endReg.exec(maskedSrc)) !== null) {\n        rDelim = match[1] || match[2] || match[3] || match[4] || match[5] || match[6];\n\n        if (!rDelim) continue;\n\n        rLength = [...rDelim].length;\n\n        if (rLength !== lLength) continue;\n\n        if (match[3] || match[4]) { // found another Left Delim\n          delimTotal += rLength;\n          continue;\n        }\n\n        delimTotal -= rLength;\n\n        if (delimTotal > 0) continue; // Haven't found enough closing delimiters\n\n        // Remove extra characters\n        rLength = Math.min(rLength, rLength + delimTotal);\n        // char length can be >1 for unicode characters\n        const lastCharLength = [...match[0]][0].length;\n        const raw = src.slice(0, lLength + match.index + lastCharLength + rLength);\n\n        // Create del token - only single ~ or double ~~ supported\n        const text = raw.slice(lLength, -lLength);\n        return {\n          type: 'del',\n          raw,\n          text,\n          tokens: this.lexer.inlineTokens(text),\n        };\n      }\n    }\n  }\n\n  autolink(src: string): Tokens.Link | undefined {\n    const cap = this.rules.inline.autolink.exec(src);\n    if (cap) {\n      let text, href;\n      if (cap[2] === '@') {\n        text = cap[1];\n        href = 'mailto:' + text;\n      } else {\n        text = cap[1];\n        href = text;\n      }\n\n      return {\n        type: 'link',\n        raw: cap[0],\n        text,\n        href,\n        tokens: [\n          {\n            type: 'text',\n            raw: text,\n            text,\n          },\n        ],\n      };\n    }\n  }\n\n  url(src: string): Tokens.Link | undefined {\n    let cap;\n    if (cap = this.rules.inline.url.exec(src)) {\n      let text, href;\n      if (cap[2] === '@') {\n        text = cap[0];\n        href = 'mailto:' + text;\n      } else {\n        // do extended autolink path validation\n        let prevCapZero;\n        do {\n          prevCapZero = cap[0];\n          cap[0] = this.rules.inline._backpedal.exec(cap[0])?.[0] ?? '';\n        } while (prevCapZero !== cap[0]);\n        text = cap[0];\n        if (cap[1] === 'www.') {\n          href = 'http://' + cap[0];\n        } else {\n          href = cap[0];\n        }\n      }\n      return {\n        type: 'link',\n        raw: cap[0],\n        text,\n        href,\n        tokens: [\n          {\n            type: 'text',\n            raw: text,\n            text,\n          },\n        ],\n      };\n    }\n  }\n\n  inlineText(src: string): Tokens.Text | undefined {\n    const cap = this.rules.inline.text.exec(src);\n    if (cap) {\n      const escaped = this.lexer.state.inRawBlock;\n      return {\n        type: 'text',\n        raw: cap[0],\n        text: cap[0],\n        escaped,\n      };\n    }\n  }\n}\n","import { _Tokenizer } from './Tokenizer.ts';\nimport { _defaults } from './defaults.ts';\nimport { other, block, inline } from './rules.ts';\nimport type { Token, TokensList, Tokens } from './Tokens.ts';\nimport type { MarkedOptions } from './MarkedOptions.ts';\n\n/**\n * Block Lexer\n */\nexport class _Lexer<ParserOutput = string, RendererOutput = string> {\n  tokens: TokensList;\n  options: MarkedOptions<ParserOutput, RendererOutput>;\n  state: {\n    inLink: boolean;\n    inRawBlock: boolean;\n    top: boolean;\n  };\n\n  public inlineQueue: { src: string, tokens: Token[] }[];\n\n  private tokenizer: _Tokenizer<ParserOutput, RendererOutput>;\n\n  constructor(options?: MarkedOptions<ParserOutput, RendererOutput>) {\n    // TokenList cannot be created in one go\n    this.tokens = [] as unknown as TokensList;\n    this.tokens.links = Object.create(null);\n    this.options = options || _defaults;\n    this.options.tokenizer = this.options.tokenizer || new _Tokenizer<ParserOutput, RendererOutput>();\n    this.tokenizer = this.options.tokenizer;\n    this.tokenizer.options = this.options;\n    this.tokenizer.lexer = this;\n    this.inlineQueue = [];\n    this.state = {\n      inLink: false,\n      inRawBlock: false,\n      top: true,\n    };\n\n    const rules = {\n      other,\n      block: block.normal,\n      inline: inline.normal,\n    };\n\n    if (this.options.pedantic) {\n      rules.block = block.pedantic;\n      rules.inline = inline.pedantic;\n    } else if (this.options.gfm) {\n      rules.block = block.gfm;\n      if (this.options.breaks) {\n        rules.inline = inline.breaks;\n      } else {\n        rules.inline = inline.gfm;\n      }\n    }\n    this.tokenizer.rules = rules;\n  }\n\n  /**\n   * Expose Rules\n   */\n  static get rules() {\n    return {\n      block,\n      inline,\n    };\n  }\n\n  /**\n   * Static Lex Method\n   */\n  static lex<ParserOutput = string, RendererOutput = string>(src: string, options?: MarkedOptions<ParserOutput, RendererOutput>) {\n    const lexer = new _Lexer<ParserOutput, RendererOutput>(options);\n    return lexer.lex(src);\n  }\n\n  /**\n   * Static Lex Inline Method\n   */\n  static lexInline<ParserOutput = string, RendererOutput = string>(src: string, options?: MarkedOptions<ParserOutput, RendererOutput>) {\n    const lexer = new _Lexer<ParserOutput, RendererOutput>(options);\n    return lexer.inlineTokens(src);\n  }\n\n  /**\n   * Preprocessing\n   */\n  lex(src: string) {\n    src = src.replace(other.carriageReturn, '\\n');\n\n    this.blockTokens(src, this.tokens);\n\n    for (let i = 0; i < this.inlineQueue.length; i++) {\n      const next = this.inlineQueue[i];\n      this.inlineTokens(next.src, next.tokens);\n    }\n    this.inlineQueue = [];\n\n    return this.tokens;\n  }\n\n  /**\n   * Lexing\n   */\n  blockTokens(src: string, tokens?: Token[], lastParagraphClipped?: boolean): Token[];\n  blockTokens(src: string, tokens?: TokensList, lastParagraphClipped?: boolean): TokensList;\n  blockTokens(src: string, tokens: Token[] = [], lastParagraphClipped = false) {\n    this.tokenizer.lexer = this;\n    if (this.options.pedantic) {\n      src = src.replace(other.tabCharGlobal, '    ').replace(other.spaceLine, '');\n    }\n\n    let srcLength = Infinity;\n    while (src) {\n      if (src.length < srcLength) {\n        srcLength = src.length;\n      } else {\n        this.infiniteLoopError(src.charCodeAt(0));\n        break;\n      }\n\n      let token: Tokens.Generic | undefined;\n\n      if (this.options.extensions?.block?.some((extTokenizer) => {\n        if (token = extTokenizer.call({ lexer: this }, src, tokens)) {\n          src = src.substring(token.raw.length);\n          tokens.push(token);\n          return true;\n        }\n        return false;\n      })) {\n        continue;\n      }\n\n      // newline\n      if (token = this.tokenizer.space(src)) {\n        src = src.substring(token.raw.length);\n        const lastToken = tokens.at(-1);\n        if (token.raw.length === 1 && lastToken !== undefined) {\n          // if there's a single \\n as a spacer, it's terminating the last line,\n          // so move it there so that we don't get unnecessary paragraph tags\n          lastToken.raw += '\\n';\n        } else {\n          tokens.push(token);\n        }\n        continue;\n      }\n\n      // code\n      if (token = this.tokenizer.code(src)) {\n        src = src.substring(token.raw.length);\n        const lastToken = tokens.at(-1);\n        // An indented code block cannot interrupt a paragraph.\n        if (lastToken?.type === 'paragraph' || lastToken?.type === 'text') {\n          lastToken.raw += (lastToken.raw.endsWith('\\n') ? '' : '\\n') + token.raw;\n          lastToken.text += '\\n' + token.text;\n          this.inlineQueue.at(-1)!.src = lastToken.text;\n        } else {\n          tokens.push(token);\n        }\n        continue;\n      }\n\n      // fences\n      if (token = this.tokenizer.fences(src)) {\n        src = src.substring(token.raw.length);\n        tokens.push(token);\n        continue;\n      }\n\n      // heading\n      if (token = this.tokenizer.heading(src)) {\n        src = src.substring(token.raw.length);\n        tokens.push(token);\n        continue;\n      }\n\n      // hr\n      if (token = this.tokenizer.hr(src)) {\n        src = src.substring(token.raw.length);\n        tokens.push(token);\n        continue;\n      }\n\n      // blockquote\n      if (token = this.tokenizer.blockquote(src)) {\n        src = src.substring(token.raw.length);\n        tokens.push(token);\n        continue;\n      }\n\n      // list\n      if (token = this.tokenizer.list(src)) {\n        src = src.substring(token.raw.length);\n        tokens.push(token);\n        continue;\n      }\n\n      // html\n      if (token = this.tokenizer.html(src)) {\n        src = src.substring(token.raw.length);\n        tokens.push(token);\n        continue;\n      }\n\n      // def\n      if (token = this.tokenizer.def(src)) {\n        src = src.substring(token.raw.length);\n        const lastToken = tokens.at(-1);\n        if (lastToken?.type === 'paragraph' || lastToken?.type === 'text') {\n          lastToken.raw += (lastToken.raw.endsWith('\\n') ? '' : '\\n') + token.raw;\n          lastToken.text += '\\n' + token.raw;\n          this.inlineQueue.at(-1)!.src = lastToken.text;\n        } else if (!this.tokens.links[token.tag]) {\n          this.tokens.links[token.tag] = {\n            href: token.href,\n            title: token.title,\n          };\n          tokens.push(token);\n        }\n        continue;\n      }\n\n      // table (gfm)\n      if (token = this.tokenizer.table(src)) {\n        src = src.substring(token.raw.length);\n        tokens.push(token);\n        continue;\n      }\n\n      // lheading\n      if (token = this.tokenizer.lheading(src)) {\n        src = src.substring(token.raw.length);\n        tokens.push(token);\n        continue;\n      }\n\n      // top-level paragraph\n      // prevent paragraph consuming extensions by clipping 'src' to extension start\n      let cutSrc = src;\n      if (this.options.extensions?.startBlock) {\n        let startIndex = Infinity;\n        const tempSrc = src.slice(1);\n        let tempStart;\n        this.options.extensions.startBlock.forEach((getStartIndex) => {\n          tempStart = getStartIndex.call({ lexer: this }, tempSrc);\n          if (typeof tempStart === 'number' && tempStart >= 0) {\n            startIndex = Math.min(startIndex, tempStart);\n          }\n        });\n        if (startIndex < Infinity && startIndex >= 0) {\n          cutSrc = src.substring(0, startIndex + 1);\n        }\n      }\n      if (this.state.top && (token = this.tokenizer.paragraph(cutSrc))) {\n        const lastToken = tokens.at(-1);\n        if (lastParagraphClipped && lastToken?.type === 'paragraph') {\n          lastToken.raw += (lastToken.raw.endsWith('\\n') ? '' : '\\n') + token.raw;\n          lastToken.text += '\\n' + token.text;\n          this.inlineQueue.pop();\n          this.inlineQueue.at(-1)!.src = lastToken.text;\n        } else {\n          tokens.push(token);\n        }\n        lastParagraphClipped = cutSrc.length !== src.length;\n        src = src.substring(token.raw.length);\n        continue;\n      }\n\n      // text\n      if (token = this.tokenizer.text(src)) {\n        src = src.substring(token.raw.length);\n        const lastToken = tokens.at(-1);\n        if (lastToken?.type === 'text') {\n          lastToken.raw += (lastToken.raw.endsWith('\\n') ? '' : '\\n') + token.raw;\n          lastToken.text += '\\n' + token.text;\n          this.inlineQueue.pop();\n          this.inlineQueue.at(-1)!.src = lastToken.text;\n        } else {\n          tokens.push(token);\n        }\n        continue;\n      }\n\n      if (src) {\n        this.infiniteLoopError(src.charCodeAt(0));\n        break;\n      }\n    }\n\n    this.state.top = true;\n    return tokens;\n  }\n\n  inline(src: string, tokens: Token[] = []) {\n    this.inlineQueue.push({ src, tokens });\n    return tokens;\n  }\n\n  /**\n   * Lexing/Compiling\n   */\n  inlineTokens(src: string, tokens: Token[] = []): Token[] {\n    this.tokenizer.lexer = this;\n    // String with links masked to avoid interference with em and strong\n    let maskedSrc = src;\n\n    // Mask out reflinks\n    if (this.tokens.links) {\n      const links = Object.keys(this.tokens.links);\n      if (links.length > 0) {\n        maskedSrc = maskedSrc.replace(this.tokenizer.rules.inline.reflinkSearch, match0 =>\n          links.includes(match0.slice(match0.lastIndexOf('[') + 1, -1))\n            ? '[' + 'a'.repeat(match0.length - 2) + ']'\n            : match0);\n      }\n    }\n\n    // Mask out escaped characters.\n    // Every mask must keep the length it replaces: emStrong and del line\n    // maskedSrc up with src by slicing from the end. `anyPunctuation` matches\n    // unicode punctuation, so an escaped astral character is 3 code units.\n    maskedSrc = maskedSrc.replace(this.tokenizer.rules.inline.anyPunctuation, match0 => '+'.repeat(match0.length));\n\n    // Mask out other blocks\n    maskedSrc = maskedSrc.replace(this.tokenizer.rules.inline.blockSkip, (match0, _link, context) => {\n      const offset = context ? context.length : 0;\n      return match0.slice(0, offset) + '[' + 'a'.repeat(match0.length - offset - 2) + ']';\n    });\n\n    // Mask out blocks from extensions\n    maskedSrc = this.options.hooks?.emStrongMask?.call({ lexer: this }, maskedSrc) ?? maskedSrc;\n\n    let keepPrevChar = false;\n    let prevChar = '';\n    let srcLength = Infinity;\n    while (src) {\n      if (src.length < srcLength) {\n        srcLength = src.length;\n      } else {\n        this.infiniteLoopError(src.charCodeAt(0));\n        break;\n      }\n\n      if (!keepPrevChar) {\n        prevChar = '';\n      }\n      keepPrevChar = false;\n\n      let token: Tokens.Generic | undefined;\n\n      // extensions\n      if (this.options.extensions?.inline?.some((extTokenizer) => {\n        if (token = extTokenizer.call({ lexer: this }, src, tokens)) {\n          src = src.substring(token.raw.length);\n          tokens.push(token);\n          return true;\n        }\n        return false;\n      })) {\n        continue;\n      }\n\n      // escape\n      if (token = this.tokenizer.escape(src)) {\n        src = src.substring(token.raw.length);\n        tokens.push(token);\n        continue;\n      }\n\n      // tag\n      if (token = this.tokenizer.tag(src)) {\n        src = src.substring(token.raw.length);\n        tokens.push(token);\n        continue;\n      }\n\n      // link\n      if (token = this.tokenizer.link(src)) {\n        src = src.substring(token.raw.length);\n        tokens.push(token);\n        continue;\n      }\n\n      // reflink, nolink\n      if (token = this.tokenizer.reflink(src, this.tokens.links)) {\n        src = src.substring(token.raw.length);\n        const lastToken = tokens.at(-1);\n        if (token.type === 'text' && lastToken?.type === 'text') {\n          lastToken.raw += token.raw;\n          lastToken.text += token.text;\n        } else {\n          tokens.push(token);\n        }\n        continue;\n      }\n\n      // em & strong\n      if (token = this.tokenizer.emStrong(src, maskedSrc, prevChar)) {\n        src = src.substring(token.raw.length);\n        tokens.push(token);\n        continue;\n      }\n\n      // code\n      if (token = this.tokenizer.codespan(src)) {\n        src = src.substring(token.raw.length);\n        tokens.push(token);\n        continue;\n      }\n\n      // br\n      if (token = this.tokenizer.br(src)) {\n        src = src.substring(token.raw.length);\n        tokens.push(token);\n        continue;\n      }\n\n      // del (gfm)\n      if (token = this.tokenizer.del(src, maskedSrc, prevChar)) {\n        src = src.substring(token.raw.length);\n        tokens.push(token);\n        continue;\n      }\n\n      // autolink\n      if (token = this.tokenizer.autolink(src)) {\n        src = src.substring(token.raw.length);\n        tokens.push(token);\n        continue;\n      }\n\n      // url (gfm)\n      if (!this.state.inLink && (token = this.tokenizer.url(src))) {\n        src = src.substring(token.raw.length);\n        tokens.push(token);\n        continue;\n      }\n\n      // text\n      // prevent inlineText consuming extensions by clipping 'src' to extension start\n      let cutSrc = src;\n      if (this.options.extensions?.startInline) {\n        let startIndex = Infinity;\n        const tempSrc = src.slice(1);\n        let tempStart;\n        this.options.extensions.startInline.forEach((getStartIndex) => {\n          tempStart = getStartIndex.call({ lexer: this }, tempSrc);\n          if (typeof tempStart === 'number' && tempStart >= 0) {\n            startIndex = Math.min(startIndex, tempStart);\n          }\n        });\n        if (startIndex < Infinity && startIndex >= 0) {\n          cutSrc = src.substring(0, startIndex + 1);\n        }\n      }\n      if (token = this.tokenizer.inlineText(cutSrc)) {\n        src = src.substring(token.raw.length);\n        if (token.raw.slice(-1) !== '_') { // Track prevChar before string of ____ started\n          prevChar = token.raw.slice(-1);\n        }\n        keepPrevChar = true;\n        const lastToken = tokens.at(-1);\n        if (lastToken?.type === 'text') {\n          lastToken.raw += token.raw;\n          lastToken.text += token.text;\n        } else {\n          tokens.push(token);\n        }\n        continue;\n      }\n\n      if (src) {\n        this.infiniteLoopError(src.charCodeAt(0));\n        break;\n      }\n    }\n\n    return tokens;\n  }\n\n  private infiniteLoopError(byte: number) {\n    const errMsg = 'Infinite loop on byte: ' + byte;\n    if (this.options.silent) {\n      console.error(errMsg);\n    } else {\n      throw new Error(errMsg);\n    }\n  }\n}\n","import { _defaults } from './defaults.ts';\nimport {\n  cleanUrl,\n  escapeHtmlEntities,\n} from './helpers.ts';\nimport { other } from './rules.ts';\nimport type { MarkedOptions } from './MarkedOptions.ts';\nimport type { Tokens } from './Tokens.ts';\nimport type { _Parser } from './Parser.ts';\n\n/**\n * Renderer\n */\nexport class _Renderer<ParserOutput = string, RendererOutput = string> {\n  options: MarkedOptions<ParserOutput, RendererOutput>;\n  parser!: _Parser<ParserOutput, RendererOutput>; // set by the parser\n  constructor(options?: MarkedOptions<ParserOutput, RendererOutput>) {\n    this.options = options || _defaults;\n  }\n\n  space(token: Tokens.Space): RendererOutput {\n    return '' as RendererOutput;\n  }\n\n  code({ text, lang, escaped }: Tokens.Code): RendererOutput {\n    const langString = (lang || '').match(other.notSpaceStart)?.[0];\n\n    const code = text.replace(other.endingNewline, '') + '\\n';\n\n    if (!langString) {\n      return '<pre><code>'\n        + (escaped ? code : escapeHtmlEntities(code, true))\n        + '</code></pre>\\n' as RendererOutput;\n    }\n\n    return '<pre><code class=\"language-'\n      + escapeHtmlEntities(langString)\n      + '\">'\n      + (escaped ? code : escapeHtmlEntities(code, true))\n      + '</code></pre>\\n' as RendererOutput;\n  }\n\n  blockquote({ tokens }: Tokens.Blockquote): RendererOutput {\n    const body = this.parser.parse(tokens);\n    return `<blockquote>\\n${body}</blockquote>\\n` as RendererOutput;\n  }\n\n  html({ text }: Tokens.HTML | Tokens.Tag): RendererOutput {\n    return text as RendererOutput;\n  }\n\n  def(token: Tokens.Def): RendererOutput {\n    return '' as RendererOutput;\n  }\n\n  heading({ tokens, depth }: Tokens.Heading): RendererOutput {\n    return `<h${depth}>${this.parser.parseInline(tokens)}</h${depth}>\\n` as RendererOutput;\n  }\n\n  hr(token: Tokens.Hr): RendererOutput {\n    return '<hr>\\n' as RendererOutput;\n  }\n\n  list(token: Tokens.List): RendererOutput {\n    const ordered = token.ordered;\n    const start = token.start;\n\n    let body = '';\n    for (let j = 0; j < token.items.length; j++) {\n      const item = token.items[j];\n      body += this.listitem(item);\n    }\n\n    const type = ordered ? 'ol' : 'ul';\n    const startAttr = (ordered && start !== 1) ? (' start=\"' + start + '\"') : '';\n    return '<' + type + startAttr + '>\\n' + body + '</' + type + '>\\n' as RendererOutput;\n  }\n\n  listitem(item: Tokens.ListItem): RendererOutput {\n    return `<li>${this.parser.parse(item.tokens)}</li>\\n` as RendererOutput;\n  }\n\n  checkbox({ checked }: Tokens.Checkbox): RendererOutput {\n    return '<input '\n      + (checked ? 'checked=\"\" ' : '')\n      + 'disabled=\"\" type=\"checkbox\"> ' as RendererOutput;\n  }\n\n  paragraph({ tokens }: Tokens.Paragraph): RendererOutput {\n    return `<p>${this.parser.parseInline(tokens)}</p>\\n` as RendererOutput;\n  }\n\n  table(token: Tokens.Table): RendererOutput {\n    let header = '';\n\n    // header\n    let cell = '';\n    for (let j = 0; j < token.header.length; j++) {\n      cell += this.tablecell(token.header[j]);\n    }\n    header += this.tablerow({ text: cell as ParserOutput });\n\n    let body = '';\n    for (let j = 0; j < token.rows.length; j++) {\n      const row = token.rows[j];\n\n      cell = '';\n      for (let k = 0; k < row.length; k++) {\n        cell += this.tablecell(row[k]);\n      }\n\n      body += this.tablerow({ text: cell as ParserOutput });\n    }\n    if (body) body = `<tbody>${body}</tbody>`;\n\n    return '<table>\\n'\n      + '<thead>\\n'\n      + header\n      + '</thead>\\n'\n      + body\n      + '</table>\\n' as RendererOutput;\n  }\n\n  tablerow({ text }: Tokens.TableRow<ParserOutput>): RendererOutput {\n    return `<tr>\\n${text}</tr>\\n` as RendererOutput;\n  }\n\n  tablecell(token: Tokens.TableCell): RendererOutput {\n    const content = this.parser.parseInline(token.tokens);\n    const type = token.header ? 'th' : 'td';\n    const tag = token.align\n      ? `<${type} align=\"${token.align}\">`\n      : `<${type}>`;\n    return tag + content + `</${type}>\\n` as RendererOutput;\n  }\n\n  /**\n   * span level renderer\n   */\n  strong({ tokens }: Tokens.Strong): RendererOutput {\n    return `<strong>${this.parser.parseInline(tokens)}</strong>` as RendererOutput;\n  }\n\n  em({ tokens }: Tokens.Em): RendererOutput {\n    return `<em>${this.parser.parseInline(tokens)}</em>` as RendererOutput;\n  }\n\n  codespan({ text }: Tokens.Codespan): RendererOutput {\n    return `<code>${escapeHtmlEntities(text, true)}</code>` as RendererOutput;\n  }\n\n  br(token: Tokens.Br): RendererOutput {\n    return '<br>' as RendererOutput;\n  }\n\n  del({ tokens }: Tokens.Del): RendererOutput {\n    return `<del>${this.parser.parseInline(tokens)}</del>` as RendererOutput;\n  }\n\n  link({ href, title, tokens }: Tokens.Link): RendererOutput {\n    const text = this.parser.parseInline(tokens) as string;\n    const cleanHref = cleanUrl(href);\n    if (cleanHref === null) {\n      return text as RendererOutput;\n    }\n    href = cleanHref;\n    let out = '<a href=\"' + href + '\"';\n    if (title) {\n      out += ' title=\"' + (escapeHtmlEntities(title)) + '\"';\n    }\n    out += '>' + text + '</a>';\n    return out as RendererOutput;\n  }\n\n  image({ href, title, text, tokens }: Tokens.Image): RendererOutput {\n    if (tokens) {\n      text = this.parser.parseInline(tokens, this.parser.textRenderer) as string;\n    }\n    const cleanHref = cleanUrl(href);\n    if (cleanHref === null) {\n      return escapeHtmlEntities(text) as RendererOutput;\n    }\n    href = cleanHref;\n\n    let out = `<img src=\"${href}\" alt=\"${escapeHtmlEntities(text)}\"`;\n    if (title) {\n      out += ` title=\"${escapeHtmlEntities(title)}\"`;\n    }\n    out += '>';\n    return out as RendererOutput;\n  }\n\n  text(token: Tokens.Text | Tokens.Escape): RendererOutput {\n    return 'tokens' in token && token.tokens\n      ? this.parser.parseInline(token.tokens) as unknown as RendererOutput\n      : ('escaped' in token && token.escaped ? token.text as RendererOutput : escapeHtmlEntities(token.text) as RendererOutput);\n  }\n}\n","import type { Tokens } from './Tokens.ts';\n\n/**\n * TextRenderer\n * returns only the textual part of the token\n */\nexport class _TextRenderer<RendererOutput = string> {\n  // no need for block level renderers\n  strong({ text }: Tokens.Strong): RendererOutput {\n    return text as RendererOutput;\n  }\n\n  em({ text }: Tokens.Em): RendererOutput {\n    return text as RendererOutput;\n  }\n\n  codespan({ text }: Tokens.Codespan): RendererOutput {\n    return text as RendererOutput;\n  }\n\n  del({ text }: Tokens.Del): RendererOutput {\n    return text as RendererOutput;\n  }\n\n  html({ text }: Tokens.HTML | Tokens.Tag): RendererOutput {\n    return text as RendererOutput;\n  }\n\n  text({ text }: Tokens.Text | Tokens.Escape | Tokens.Tag): RendererOutput {\n    return text as RendererOutput;\n  }\n\n  link({ text }: Tokens.Link): RendererOutput {\n    return '' + text as RendererOutput;\n  }\n\n  image({ text }: Tokens.Image): RendererOutput {\n    return '' + text as RendererOutput;\n  }\n\n  br(): RendererOutput {\n    return '' as RendererOutput;\n  }\n\n  checkbox({ raw }: Tokens.Checkbox): RendererOutput {\n    return raw as RendererOutput;\n  }\n}\n","import { _Renderer } from './Renderer.ts';\nimport { _TextRenderer } from './TextRenderer.ts';\nimport { _defaults } from './defaults.ts';\nimport type { MarkedToken, Token, Tokens } from './Tokens.ts';\nimport type { MarkedOptions } from './MarkedOptions.ts';\n\n/**\n * Parsing & Compiling\n */\nexport class _Parser<ParserOutput = string, RendererOutput = string> {\n  options: MarkedOptions<ParserOutput, RendererOutput>;\n  renderer: _Renderer<ParserOutput, RendererOutput>;\n  textRenderer: _TextRenderer<RendererOutput>;\n  constructor(options?: MarkedOptions<ParserOutput, RendererOutput>) {\n    this.options = options || _defaults;\n    this.options.renderer = this.options.renderer || new _Renderer<ParserOutput, RendererOutput>();\n    this.renderer = this.options.renderer;\n    this.renderer.options = this.options;\n    this.renderer.parser = this;\n    this.textRenderer = new _TextRenderer<RendererOutput>();\n  }\n\n  /**\n   * Static Parse Method\n   */\n  static parse<ParserOutput = string, RendererOutput = string>(tokens: Token[], options?: MarkedOptions<ParserOutput, RendererOutput>) {\n    const parser = new _Parser<ParserOutput, RendererOutput>(options);\n    return parser.parse(tokens);\n  }\n\n  /**\n   * Static Parse Inline Method\n   */\n  static parseInline<ParserOutput = string, RendererOutput = string>(tokens: Token[], options?: MarkedOptions<ParserOutput, RendererOutput>) {\n    const parser = new _Parser<ParserOutput, RendererOutput>(options);\n    return parser.parseInline(tokens);\n  }\n\n  /**\n   * Parse Loop\n   */\n  parse(tokens: Token[]): ParserOutput {\n    this.renderer.parser = this;\n    let out = '';\n\n    for (let i = 0; i < tokens.length; i++) {\n      const anyToken = tokens[i];\n\n      // Run any renderer extensions\n      if (this.options.extensions?.renderers?.[anyToken.type]) {\n        const genericToken = anyToken as Tokens.Generic;\n        const ret = this.options.extensions.renderers[genericToken.type].call({ parser: this }, genericToken);\n        if (ret !== false || !['space', 'hr', 'heading', 'code', 'table', 'blockquote', 'list', 'checkbox', 'html', 'def', 'paragraph', 'text'].includes(genericToken.type)) {\n          out += ret || '';\n          continue;\n        }\n      }\n\n      const token = anyToken as MarkedToken;\n\n      switch (token.type) {\n        case 'space': {\n          out += this.renderer.space(token);\n          break;\n        }\n        case 'hr': {\n          out += this.renderer.hr(token);\n          break;\n        }\n        case 'heading': {\n          out += this.renderer.heading(token);\n          break;\n        }\n        case 'code': {\n          out += this.renderer.code(token);\n          break;\n        }\n        case 'table': {\n          out += this.renderer.table(token);\n          break;\n        }\n        case 'blockquote': {\n          out += this.renderer.blockquote(token);\n          break;\n        }\n        case 'list': {\n          out += this.renderer.list(token);\n          break;\n        }\n        case 'checkbox': {\n          out += this.renderer.checkbox(token);\n          break;\n        }\n        case 'html': {\n          out += this.renderer.html(token);\n          break;\n        }\n        case 'def': {\n          out += this.renderer.def(token);\n          break;\n        }\n        case 'paragraph': {\n          out += this.renderer.paragraph(token);\n          break;\n        }\n        case 'text': {\n          out += this.renderer.text(token);\n          break;\n        }\n\n        default: {\n          const errMsg = 'Token with \"' + token.type + '\" type was not found.';\n          if (this.options.silent) {\n            console.error(errMsg);\n            return '' as ParserOutput;\n          } else {\n            throw new Error(errMsg);\n          }\n        }\n      }\n    }\n\n    return out as ParserOutput;\n  }\n\n  /**\n   * Parse Inline Tokens\n   */\n  parseInline(tokens: Token[], renderer: _Renderer<ParserOutput, RendererOutput> | _TextRenderer<RendererOutput> = this.renderer): ParserOutput {\n    this.renderer.parser = this;\n    let out = '';\n\n    for (let i = 0; i < tokens.length; i++) {\n      const anyToken = tokens[i];\n\n      // Run any renderer extensions\n      if (this.options.extensions?.renderers?.[anyToken.type]) {\n        const ret = this.options.extensions.renderers[anyToken.type].call({ parser: this }, anyToken);\n        if (ret !== false || !['escape', 'html', 'link', 'image', 'checkbox', 'strong', 'em', 'codespan', 'br', 'del', 'text'].includes(anyToken.type)) {\n          out += ret || '';\n          continue;\n        }\n      }\n\n      const token = anyToken as MarkedToken;\n\n      switch (token.type) {\n        case 'escape': {\n          out += renderer.text(token);\n          break;\n        }\n        case 'html': {\n          out += renderer.html(token);\n          break;\n        }\n        case 'link': {\n          out += renderer.link(token);\n          break;\n        }\n        case 'image': {\n          out += renderer.image(token);\n          break;\n        }\n        case 'checkbox': {\n          out += renderer.checkbox(token);\n          break;\n        }\n        case 'strong': {\n          out += renderer.strong(token);\n          break;\n        }\n        case 'em': {\n          out += renderer.em(token);\n          break;\n        }\n        case 'codespan': {\n          out += renderer.codespan(token);\n          break;\n        }\n        case 'br': {\n          out += renderer.br(token);\n          break;\n        }\n        case 'del': {\n          out += renderer.del(token);\n          break;\n        }\n        case 'text': {\n          out += renderer.text(token);\n          break;\n        }\n        default: {\n          const errMsg = 'Token with \"' + token.type + '\" type was not found.';\n          if (this.options.silent) {\n            console.error(errMsg);\n            return '' as ParserOutput;\n          } else {\n            throw new Error(errMsg);\n          }\n        }\n      }\n    }\n    return out as ParserOutput;\n  }\n}\n","import { _defaults } from './defaults.ts';\nimport { _Lexer } from './Lexer.ts';\nimport { _Parser } from './Parser.ts';\nimport type { MarkedOptions } from './MarkedOptions.ts';\nimport type { Token, TokensList } from './Tokens.ts';\n\nexport class _Hooks<ParserOutput = string, RendererOutput = string> {\n  options: MarkedOptions<ParserOutput, RendererOutput>;\n  block?: boolean;\n\n  constructor(options?: MarkedOptions<ParserOutput, RendererOutput>) {\n    this.options = options || _defaults;\n  }\n\n  static passThroughHooks = new Set([\n    'preprocess',\n    'postprocess',\n    'processAllTokens',\n    'emStrongMask',\n  ]);\n\n  static passThroughHooksRespectAsync = new Set([\n    'preprocess',\n    'postprocess',\n    'processAllTokens',\n  ]);\n\n  /**\n   * Process markdown before marked\n   */\n  preprocess(markdown: string) {\n    return markdown;\n  }\n\n  /**\n   * Process HTML after marked is finished\n   */\n  postprocess(html: ParserOutput) {\n    return html;\n  }\n\n  /**\n   * Process all tokens before walk tokens\n   */\n  processAllTokens(tokens: Token[] | TokensList) {\n    return tokens;\n  }\n\n  /**\n   * Mask contents that should not be interpreted as em/strong delimiters\n   */\n  emStrongMask(src: string) {\n    return src;\n  }\n\n  /**\n   * Provide function to tokenize markdown\n   */\n  provideLexer(block = this.block) {\n    return block ? _Lexer.lex : _Lexer.lexInline;\n  }\n\n  /**\n   * Provide function to parse tokens\n   */\n  provideParser(block = this.block) {\n    return block ? _Parser.parse<ParserOutput, RendererOutput> : _Parser.parseInline<ParserOutput, RendererOutput>;\n  }\n}\n","import { _getDefaults } from './defaults.ts';\nimport { _Lexer } from './Lexer.ts';\nimport { _Parser } from './Parser.ts';\nimport { _Hooks } from './Hooks.ts';\nimport { _Renderer } from './Renderer.ts';\nimport { _Tokenizer } from './Tokenizer.ts';\nimport { _TextRenderer } from './TextRenderer.ts';\nimport { escapeHtmlEntities } from './helpers.ts';\nimport type { MarkedExtension, MarkedOptions } from './MarkedOptions.ts';\nimport type { Token, Tokens, TokensList } from './Tokens.ts';\n\nexport type MaybePromise = void | Promise<void>;\n\ntype UnknownFunction = (...args: unknown[]) => unknown;\ntype GenericRendererFunction = (...args: unknown[]) => string | false;\n\nexport class Marked<ParserOutput = string, RendererOutput = string> {\n  defaults = _getDefaults<ParserOutput, RendererOutput>();\n  options = this.setOptions;\n\n  /**\n   * Compiles markdown to HTML.\n   *\n   * To configure hooks, a renderer, or a tokenizer, create a separate `Marked`\n   * instance and use `Marked#use` instead of passing them on each call.\n   */\n  parse = this.parseMarkdown(true);\n\n  /**\n   * Compiles inline markdown to HTML.\n   *\n   * To configure hooks, a renderer, or a tokenizer, create a separate `Marked`\n   * instance and use `Marked#use` instead of passing them on each call.\n   */\n  parseInline = this.parseMarkdown(false);\n\n  Parser = _Parser<ParserOutput, RendererOutput>;\n  Renderer = _Renderer<ParserOutput, RendererOutput>;\n  TextRenderer = _TextRenderer<RendererOutput>;\n  Lexer = _Lexer;\n  Tokenizer = _Tokenizer<ParserOutput, RendererOutput>;\n  Hooks = _Hooks<ParserOutput, RendererOutput>;\n\n  constructor(...args: MarkedExtension<ParserOutput, RendererOutput>[]) {\n    this.use(...args);\n  }\n\n  /**\n   * Run callback for every token\n   */\n  walkTokens(tokens: Token[] | TokensList, callback: (token: Token) => MaybePromise | MaybePromise[]) {\n    let values: MaybePromise[] = [];\n    for (const token of tokens) {\n      values = values.concat(callback.call(this, token));\n      switch (token.type) {\n        case 'table': {\n          const tableToken = token as Tokens.Table;\n          for (const cell of tableToken.header) {\n            values = values.concat(this.walkTokens(cell.tokens, callback));\n          }\n          for (const row of tableToken.rows) {\n            for (const cell of row) {\n              values = values.concat(this.walkTokens(cell.tokens, callback));\n            }\n          }\n          break;\n        }\n        case 'list': {\n          const listToken = token as Tokens.List;\n          values = values.concat(this.walkTokens(listToken.items, callback));\n          break;\n        }\n        default: {\n          const genericToken = token as Tokens.Generic;\n          if (this.defaults.extensions?.childTokens?.[genericToken.type]) {\n            this.defaults.extensions.childTokens[genericToken.type].forEach((childTokens) => {\n              const tokens = genericToken[childTokens].flat(Infinity) as Token[] | TokensList;\n              values = values.concat(this.walkTokens(tokens, callback));\n            });\n          } else if (genericToken.tokens) {\n            values = values.concat(this.walkTokens(genericToken.tokens, callback));\n          }\n        }\n      }\n    }\n    return values;\n  }\n\n  /**\n   * Registers extensions with this Marked instance.\n   *\n   * The `renderer`, `tokenizer`, and `hooks` objects may each contain only the\n   * methods that should be overridden. Their methods are merged with built-in\n   * behavior and extensions registered by earlier calls.\n   *\n   * Use this method when supplying only some hook methods.\n   */\n  use(...args: MarkedExtension<ParserOutput, RendererOutput>[]) {\n    const extensions: MarkedOptions<ParserOutput, RendererOutput>['extensions'] = this.defaults.extensions || { renderers: {}, childTokens: {} };\n\n    args.forEach((pack) => {\n      // copy options to new object\n      const opts = { ...pack } as MarkedOptions<ParserOutput, RendererOutput>;\n\n      // set async to true if it was set to true before\n      opts.async = this.defaults.async || opts.async || false;\n\n      // ==-- Parse \"addon\" extensions --== //\n      if (pack.extensions) {\n        pack.extensions.forEach((ext) => {\n          if (!ext.name) {\n            throw new Error('extension name required');\n          }\n          if ('renderer' in ext) { // Renderer extensions\n            const prevRenderer = extensions.renderers[ext.name];\n            if (prevRenderer) {\n              // Replace extension with func to run new extension but fall back if false\n              extensions.renderers[ext.name] = function(...args) {\n                let ret = ext.renderer.apply(this, args);\n                if (ret === false) {\n                  ret = prevRenderer.apply(this, args);\n                }\n                return ret;\n              };\n            } else {\n              extensions.renderers[ext.name] = ext.renderer;\n            }\n          }\n          if ('tokenizer' in ext) { // Tokenizer Extensions\n            if (!ext.level || (ext.level !== 'block' && ext.level !== 'inline')) {\n              throw new Error(\"extension level must be 'block' or 'inline'\");\n            }\n            const extLevel = extensions[ext.level];\n            if (extLevel) {\n              extLevel.unshift(ext.tokenizer);\n            } else {\n              extensions[ext.level] = [ext.tokenizer];\n            }\n            if (ext.start) { // Function to check for start of token\n              if (ext.level === 'block') {\n                if (extensions.startBlock) {\n                  extensions.startBlock.push(ext.start);\n                } else {\n                  extensions.startBlock = [ext.start];\n                }\n              } else if (ext.level === 'inline') {\n                if (extensions.startInline) {\n                  extensions.startInline.push(ext.start);\n                } else {\n                  extensions.startInline = [ext.start];\n                }\n              }\n            }\n          }\n          if ('childTokens' in ext && ext.childTokens) { // Child tokens to be visited by walkTokens\n            extensions.childTokens[ext.name] = ext.childTokens;\n          }\n        });\n        opts.extensions = extensions;\n      }\n\n      // ==-- Parse \"overwrite\" extensions --== //\n      if (pack.renderer) {\n        const renderer = this.defaults.renderer || new _Renderer<ParserOutput, RendererOutput>(this.defaults);\n        for (const prop in pack.renderer) {\n          if (!(prop in renderer)) {\n            throw new Error(`renderer '${prop}' does not exist`);\n          }\n          if (['options', 'parser'].includes(prop)) {\n            // ignore options property\n            continue;\n          }\n          const rendererProp = prop as Exclude<keyof _Renderer<ParserOutput, RendererOutput>, 'options' | 'parser'>;\n          const rendererFunc = pack.renderer[rendererProp] as GenericRendererFunction;\n          const prevRenderer = renderer[rendererProp] as GenericRendererFunction;\n          // Replace renderer with func to run extension, but fall back if false\n          renderer[rendererProp] = (...args: unknown[]) => {\n            let ret = rendererFunc.apply(renderer, args);\n            if (ret === false) {\n              ret = prevRenderer.apply(renderer, args);\n            }\n            return (ret || '') as RendererOutput;\n          };\n        }\n        opts.renderer = renderer;\n      }\n      if (pack.tokenizer) {\n        const tokenizer = this.defaults.tokenizer || new _Tokenizer<ParserOutput, RendererOutput>(this.defaults);\n        for (const prop in pack.tokenizer) {\n          if (!(prop in tokenizer)) {\n            throw new Error(`tokenizer '${prop}' does not exist`);\n          }\n          if (['options', 'rules', 'lexer'].includes(prop)) {\n            // ignore options, rules, and lexer properties\n            continue;\n          }\n          const tokenizerProp = prop as Exclude<keyof _Tokenizer<ParserOutput, RendererOutput>, 'options' | 'rules' | 'lexer'>;\n          const tokenizerFunc = pack.tokenizer[tokenizerProp] as UnknownFunction;\n          const prevTokenizer = tokenizer[tokenizerProp] as UnknownFunction;\n          // Replace tokenizer with func to run extension, but fall back if false\n          // @ts-expect-error cannot type tokenizer function dynamically\n          tokenizer[tokenizerProp] = (...args: unknown[]) => {\n            let ret = tokenizerFunc.apply(tokenizer, args);\n            if (ret === false) {\n              ret = prevTokenizer.apply(tokenizer, args);\n            }\n            return ret;\n          };\n        }\n        opts.tokenizer = tokenizer;\n      }\n\n      // ==-- Parse Hooks extensions --== //\n      if (pack.hooks) {\n        const hooks = this.defaults.hooks || new _Hooks<ParserOutput, RendererOutput>();\n        for (const prop in pack.hooks) {\n          if (!(prop in hooks)) {\n            throw new Error(`hook '${prop}' does not exist`);\n          }\n          if (['options', 'block'].includes(prop)) {\n            // ignore options and block properties\n            continue;\n          }\n          const hooksProp = prop as Exclude<keyof _Hooks<ParserOutput, RendererOutput>, 'options' | 'block'>;\n          const hooksFunc = pack.hooks[hooksProp] as UnknownFunction;\n          const prevHook = hooks[hooksProp] as UnknownFunction;\n          if (_Hooks.passThroughHooks.has(prop)) {\n            // @ts-expect-error cannot type hook function dynamically\n            hooks[hooksProp] = (arg: unknown) => {\n              if (this.defaults.async && _Hooks.passThroughHooksRespectAsync.has(prop)) {\n                return (async() => {\n                  const ret = await hooksFunc.call(hooks, arg);\n                  return prevHook.call(hooks, ret);\n                })();\n              }\n\n              const ret = hooksFunc.call(hooks, arg);\n              return prevHook.call(hooks, ret);\n            };\n          } else {\n            // @ts-expect-error cannot type hook function dynamically\n            hooks[hooksProp] = (...args: unknown[]) => {\n              if (this.defaults.async) {\n                return (async() => {\n                  let ret = await hooksFunc.apply(hooks, args);\n                  if (ret === false) {\n                    ret = await prevHook.apply(hooks, args);\n                  }\n                  return ret;\n                })();\n              }\n\n              let ret = hooksFunc.apply(hooks, args);\n              if (ret === false) {\n                ret = prevHook.apply(hooks, args);\n              }\n              return ret;\n            };\n          }\n        }\n        opts.hooks = hooks;\n      }\n\n      // ==-- Parse WalkTokens extensions --== //\n      if (pack.walkTokens) {\n        const walkTokens = this.defaults.walkTokens;\n        const packWalktokens = pack.walkTokens;\n        opts.walkTokens = function(token) {\n          let values: MaybePromise[] = [];\n          values.push(packWalktokens.call(this, token));\n          if (walkTokens) {\n            values = values.concat(walkTokens.call(this, token));\n          }\n          return values;\n        };\n      }\n\n      this.defaults = { ...this.defaults, ...opts };\n    });\n\n    return this;\n  }\n\n  setOptions(opt: MarkedOptions<ParserOutput, RendererOutput>) {\n    this.defaults = { ...this.defaults, ...opt };\n    return this;\n  }\n\n  lexer(src: string, options?: MarkedOptions<ParserOutput, RendererOutput>) {\n    return _Lexer.lex(src, options ?? this.defaults);\n  }\n\n  parser(tokens: Token[], options?: MarkedOptions<ParserOutput, RendererOutput>) {\n    return _Parser.parse<ParserOutput, RendererOutput>(tokens, options ?? this.defaults);\n  }\n\n  private parseMarkdown(blockType: boolean) {\n    type overloadedParse = {\n      (src: string, options: MarkedOptions<ParserOutput, RendererOutput> & { async: true }): Promise<ParserOutput>;\n      (src: string, options: MarkedOptions<ParserOutput, RendererOutput> & { async: false }): ParserOutput;\n      (src: string, options?: MarkedOptions<ParserOutput, RendererOutput> | null): ParserOutput | Promise<ParserOutput>;\n    };\n\n    // eslint-disable-next-line @typescript-eslint/no-explicit-any\n    const parse: overloadedParse = (src: string, options?: MarkedOptions<ParserOutput, RendererOutput> | null): any => {\n      const origOpt = { ...options };\n      const opt = { ...this.defaults, ...origOpt };\n\n      const throwError = this.onError(!!opt.silent, !!opt.async);\n\n      // throw error if an extension set async to true but parse was called with async: false\n      if (this.defaults.async === true && origOpt.async === false) {\n        return throwError(new Error('marked(): The async option was set to true by an extension. Remove async: false from the parse options object to return a Promise.'));\n      }\n\n      // throw error in case of non string input\n      if (typeof src === 'undefined' || src === null) {\n        return throwError(new Error('marked(): input parameter is undefined or null'));\n      }\n      if (typeof src !== 'string') {\n        return throwError(new Error('marked(): input parameter is of type '\n          + Object.prototype.toString.call(src) + ', string expected'));\n      }\n\n      if (opt.hooks) {\n        opt.hooks.options = opt;\n        opt.hooks.block = blockType;\n      }\n\n      if (opt.async) {\n        return (async() => {\n          const processedSrc = opt.hooks ? await opt.hooks.preprocess(src) : src;\n          const lexer = opt.hooks ? await opt.hooks.provideLexer(blockType) : (blockType ? _Lexer.lex : _Lexer.lexInline);\n          const tokens = await lexer(processedSrc, opt);\n          const processedTokens = opt.hooks ? await opt.hooks.processAllTokens(tokens) : tokens;\n          if (opt.walkTokens) {\n            await Promise.all(this.walkTokens(processedTokens, opt.walkTokens));\n          }\n          const parser = opt.hooks ? await opt.hooks.provideParser(blockType) : (blockType ? _Parser.parse : _Parser.parseInline);\n          const html = await parser(processedTokens, opt);\n          return opt.hooks ? await opt.hooks.postprocess(html) : html;\n        })().catch(throwError);\n      }\n\n      try {\n        if (opt.hooks) {\n          src = opt.hooks.preprocess(src) as string;\n        }\n        const lexer = opt.hooks ? opt.hooks.provideLexer(blockType) : (blockType ? _Lexer.lex : _Lexer.lexInline);\n        let tokens = lexer(src, opt);\n        if (opt.hooks) {\n          tokens = opt.hooks.processAllTokens(tokens);\n        }\n        if (opt.walkTokens) {\n          this.walkTokens(tokens, opt.walkTokens);\n        }\n        const parser = opt.hooks ? opt.hooks.provideParser(blockType) : (blockType ? _Parser.parse : _Parser.parseInline);\n        let html = parser(tokens, opt);\n        if (opt.hooks) {\n          html = opt.hooks.postprocess(html);\n        }\n        return html;\n      } catch(e) {\n        return throwError(e as Error);\n      }\n    };\n\n    return parse;\n  }\n\n  private onError(silent: boolean, async: boolean) {\n    return (e: Error): string | Promise<string> => {\n      e.message += '\\nPlease report this to https://github.com/markedjs/marked.';\n\n      if (silent) {\n        const msg = '<p>An error occurred:</p><pre>'\n          + escapeHtmlEntities(e.message + '', true)\n          + '</pre>';\n        if (async) {\n          return Promise.resolve(msg);\n        }\n        return msg;\n      }\n\n      if (async) {\n        return Promise.reject(e);\n      }\n      throw e;\n    };\n  }\n}\n","import { _Lexer } from './Lexer.ts';\nimport { _Parser } from './Parser.ts';\nimport { _Tokenizer } from './Tokenizer.ts';\nimport { _Renderer } from './Renderer.ts';\nimport { _TextRenderer } from './TextRenderer.ts';\nimport { _Hooks } from './Hooks.ts';\nimport { Marked } from './Instance.ts';\nimport {\n  _getDefaults,\n  changeDefaults,\n  _defaults,\n} from './defaults.ts';\nimport type { MarkedExtension, MarkedOptions } from './MarkedOptions.ts';\nimport type { Token, TokensList } from './Tokens.ts';\nimport type { MaybePromise } from './Instance.ts';\n\nconst markedInstance = new Marked();\n\n/**\n * Compiles markdown to HTML asynchronously.\n *\n * To configure hooks, a renderer, or a tokenizer, create a `Marked` instance\n * and use `Marked#use` instead of passing them as options on each call.\n *\n * @param src String of markdown source to be compiled\n * @param options Hash of options, having async: true\n * @return Promise of string of compiled HTML\n */\nexport function marked(src: string, options: MarkedOptions & { async: true }): Promise<string>;\n\n/**\n * Compiles markdown to HTML.\n *\n * To configure hooks, a renderer, or a tokenizer, create a `Marked` instance\n * and use `Marked#use` instead of passing them as options on each call.\n *\n * @param src String of markdown source to be compiled\n * @param options Optional hash of options\n * @return String of compiled HTML. Will be a Promise of string if async is set to true by any extensions.\n */\nexport function marked(src: string, options: MarkedOptions & { async: false }): string;\nexport function marked(src: string, options: MarkedOptions & { async: true }): Promise<string>;\nexport function marked(src: string, options?: MarkedOptions | null): string | Promise<string>;\nexport function marked(src: string, opt?: MarkedOptions | null): string | Promise<string> {\n  return markedInstance.parse(src, opt);\n}\n\nexport declare namespace marked {\n  /**\n   * Compiles inline markdown to HTML.\n   *\n   * To configure hooks, a renderer, or a tokenizer, create a `Marked` instance\n   * and use `Marked#use` instead of passing them as options on each call.\n   */\n  let parseInline: typeof markedInstance.parseInline;\n\n  /**\n   * Registers extensions with the default Marked instance.\n   *\n   * The `renderer`, `tokenizer`, and `hooks` objects may each contain only the\n   * methods that should be overridden. Their methods are merged with built-in\n   * behavior and extensions registered by earlier calls.\n   *\n   * Use this function when supplying only some hook methods.\n   */\n  let use: (...args: MarkedExtension[]) => typeof marked;\n}\n\n/**\n * Sets the default options.\n *\n * @param options Hash of options\n */\nmarked.options =\n  marked.setOptions = function(options: MarkedOptions) {\n    markedInstance.setOptions(options);\n    marked.defaults = markedInstance.defaults;\n    changeDefaults(marked.defaults);\n    return marked;\n  };\n\n/**\n * Gets the original marked default options.\n */\nmarked.getDefaults = _getDefaults;\n\nmarked.defaults = _defaults;\n\n/**\n * Registers extensions with the default Marked instance.\n *\n * The `renderer`, `tokenizer`, and `hooks` objects may each contain only the\n * methods that should be overridden. Their methods are merged with built-in\n * behavior and extensions registered by earlier calls.\n *\n * Use this function when supplying only some hook methods.\n *\n * @param args Extensions to register\n * @return The `marked` function\n */\nfunction useExtension(...args: MarkedExtension[]) {\n  markedInstance.use(...args);\n  marked.defaults = markedInstance.defaults;\n  changeDefaults(marked.defaults);\n  return marked;\n}\n\nmarked.use = useExtension;\n\n/**\n * Run callback for every token\n */\n\nmarked.walkTokens = function(tokens: Token[] | TokensList, callback: (token: Token) => MaybePromise | MaybePromise[]) {\n  return markedInstance.walkTokens(tokens, callback);\n};\n\n/**\n * Compiles markdown to HTML without enclosing `p` tag.\n *\n * To configure hooks, a renderer, or a tokenizer, create a `Marked` instance\n * and use `Marked#use` instead of passing them as options on each call.\n *\n * @param src String of markdown source to be compiled\n * @param options Hash of options\n * @return String of compiled HTML\n */\nmarked.parseInline = markedInstance.parseInline;\n\n/**\n * Expose\n */\nmarked.Parser = _Parser;\nmarked.parser = _Parser.parse;\nmarked.Renderer = _Renderer;\nmarked.TextRenderer = _TextRenderer;\nmarked.Lexer = _Lexer;\nmarked.lexer = _Lexer.lex;\nmarked.Tokenizer = _Tokenizer;\nmarked.Hooks = _Hooks;\nmarked.parse = marked;\n\nexport const options = marked.options;\nexport const setOptions = marked.setOptions;\nexport const walkTokens = marked.walkTokens;\n/**\n * Compiles inline markdown to HTML.\n *\n * To configure hooks, a renderer, or a tokenizer, create a `Marked` instance\n * and use `Marked#use` instead of passing them as options on each call.\n */\nexport const parseInline = marked.parseInline;\nexport const parse = marked;\nexport const parser = _Parser.parse;\nexport const lexer = _Lexer.lex;\nexport { _defaults as defaults, _getDefaults as getDefaults } from './defaults.ts';\nexport { _Lexer as Lexer } from './Lexer.ts';\nexport { _Parser as Parser } from './Parser.ts';\nexport { _Tokenizer as Tokenizer } from './Tokenizer.ts';\nexport { _Renderer as Renderer } from './Renderer.ts';\nexport { _TextRenderer as TextRenderer } from './TextRenderer.ts';\nexport { _Hooks as Hooks } from './Hooks.ts';\nexport { Marked } from './Instance.ts';\nexport { useExtension as use };\nexport type * from './MarkedOptions.ts';\nexport type * from './Tokens.ts';\n"],"mappings":";;;;AAOA,SAASA,EAAcC,EAAQC,EAAU,4BACvCC,KAAKC;AACL,MAAMC,EAAQC,MAAMC,KAAKJ,KAAMD;AAC3BG,IACFF,KAAKK,MAAQH,EAAMG,MACnBL,KAAKM,YAAcJ,EAAMI,YACzBN,KAAKO,SAAWL,EAAMK,SACtBP,KAAKQ,WAAaN,EAAMM,WACxBR,KAAKD,QAAUG,EAAMH,QACrBC,KAAKS,KAAOP,EAAMO,KAClBT,KAAKU,OAASR,EAAMQ,QAEtBV,KAAKF,OAASA,GAAU,CAAC,CACvBa,MAAO,gBACPC,OAAQb,GAEZ,CACAF,EAAcgB,UAAYC,OAAOC,OAAOZ,MAAMU,WAC9ChB,EAAcgB,UAAUG,KAAO,eAC/BnB,EAAcoB,OAASC,EAASrB;AAChC,MAAMsB,KAAeC,MAAe,eAAgBvB;AACpD,SAASqB,EAASG,GAChB,OAAO,UACLtB,QAASuB,GACP,CAAC,GACH,OAAOL,EAAOI,EAAYC,EAC5B,CACF,CACA,SAASL,EAAOM,EAAkBD,GAChC,MAAMD,EAAa,SAAUvB,EAAQC,GAMnCwB,EAAiBnB,KAAKJ,KAAMF,EAAQC,GAAWuB,EACjD;AAGA,OAFAD,EAAWR,UAAYC,OAAOC,OAAOQ,EAAiBV,WACtDQ,EAAWJ,OAASC,EAASG,GACtBA,CACT,CA+DA,MAAMG,KAAeJ,MAAe,eAAgBH,EAAOE,EAAc;AACzEK,EAAaX,UAAUG,KAAO;AA+B9B,MAAMS,KAAeL,MAAe,eAAgBH,EAAOE,EAAc;AACzEM,EAAaZ,UAAUG,KAAO;AAY9B,MAAMU,KAAaN,MAAe,aAAcH,EAAOE,EAAc;AACrEO,EAAWb,UAAUG,KAAO;AAgC5B,MAAMW,KAAoBP,MAAe,oBAAqBH,EAAOE,EAAc;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SACA,OACA,SACA,OACA,KACA,KACA,KACA,KACA,KACA,KACA,OACA,SACA,SACA,KACA,OACA,IACA,MACA,QACA,MACA,MACA,QACA,SACA,KACA,OACA,MACA,OACA,UACA,OACA,WACA,QACA,MACA,OACA,KACA,WACA,SACA,SACA,IACA,UACA,MACA,WACA,IACA,KACA,KACA,OACA,IACA,OACA,SACA,UACA,SACA,SACA,OACA,QACA,SACA,SACA,OACA,SACA,SACA,QACA,MACA,UACA,MACA,QACA,QACA,KACA,WACA,WACA,QACA,KACA,QACA,OACA,KACA,QACA,KACA,IACA,KACA,MACA,QACA,QAGWkrO,EAAMlrO,EAAO,CACxB,MACA,IACA,WACA,cACA,eACA,eACA,gBACA,mBACA,SACA,WACA,OACA,OACA,UACA,eACA,cACA,SACA,OACA,IACA,QACA,WACA,QACA,QACA,YACA,OACA,iBACA,SACA,OACA,WACA,QACA,OACA,OACA,UACA,UACA,WACA,iBACA,OACA,OACA,QACA,SACA,SACA,OACA,WACA,QACA,OACA,QACA,OACA,UAGWmrO,EAAanrO,EAAO,CAC/B,UACA,gBACA,sBACA,cACA,mBACA,oBACA,oBACA,iBACA,eACA,UACA,UACA,UACA,UACA,UACA,iBACA,UACA,UACA,cACA,eACA,WACA,eACA,qBACA,cACA,SACA,iBAOWorO,EAAgBprO,EAAO,CAClC,UACA,gBACA,SACA,UACA,YACA,mBACA,iBACA,gBACA,gBACA,gBACA,QACA,YACA,OACA,eACA,YACA,UACA,gBACA,SACA,MACA,aACA,UACA,QAGWqrO,EAASrrO,EAAO,CAC3B,OACA,WACA,SACA,UACA,QACA,SACA,KACA,aACA,gBACA,KACA,KACA,QACA,UACA,WACA,QACA,OACA,KACA,SACA,QACA,SACA,OACA,OACA,UACA,SACA,MACA,QACA,MACA,SACA,aACA,gBAKWsrO,EAAmBtrO,EAAO,CACrC,UACA,cACA,aACA,WACA,YACA,UACA,UACA,SACA,SACA,QACA,YACA,aACA,iBACA,cACA,SAGW3nE,EAAO2nE,EAAO,CAAC,UC1Rf2wC,EAAO3wC,EAAO,CACzB,SACA,SACA,QACA,MACA,iBACA,eACA,uBACA,WACA,aACA,UACA,SACA,UACA,cACA,cACA,UACA,OACA,QACA,QACA,QACA,OACA,UACA,UACA,aACA,WACA,eACA,SACA,cACA,WACA,WACA,UACA,MACA,WACA,0BACA,wBACA,WACA,YACA,UACA,eACA,cACA,OACA,MACA,UACA,SACA,SACA,OACA,OACA,WACA,KACA,QACA,YACA,YACA,QACA,OACA,QACA,OACA,OACA,UACA,OACA,MACA,MACA,YACA,QACA,SACA,MACA,YACA,WACA,QACA,OACA,QACA,UACA,aACA,SACA,OACA,UACA,OACA,UACA,cACA,cACA,UACA,gBACA,sBACA,SACA,UACA,UACA,aACA,WACA,MACA,WACA,MACA,WACA,OACA,OACA,UACA,aACA,QACA,WACA,QACA,OACA,QACA,OACA,OACA,UACA,QACA,MACA,SACA,OACA,QACA,UACA,WACA,QACA,YACA,OACA,SACA,SACA,QACA,QACA,OACA,UAGW00K,EAAM10K,EAAO,CACxB,gBACA,aACA,WACA,qBACA,YACA,SACA,gBACA,gBACA,UACA,gBACA,iBACA,QACA,OACA,KACA,QACA,OACA,gBACA,YACA,YACA,QACA,sBACA,8BACA,gBACA,kBACA,KACA,KACA,IACA,KACA,KACA,kBACA,YACA,UACA,UACA,oBACA,MACA,WACA,YACA,MACA,WACA,OACA,eACA,YACA,SACA,cACA,cACA,gBACA,cACA,YACA,mBACA,eACA,aACA,eACA,cACA,KACA,KACA,KACA,KACA,aACA,WACA,gBACA,oBACA,SACA,OACA,KACA,kBACA,KACA,MACA,YACA,IACA,KACA,KACA,KACA,KACA,UACA,YACA,aACA,WACA,OACA,eACA,iBACA,eACA,mBACA,iBACA,QACA,aACA,aACA,eACA,eACA,cACA,cACA,mBACA,YACA,MACA,OACA,YACA,QACA,SACA,OACA,MACA,OACA,aACA,SACA,WACA,UACA,QACA,SACA,cACA,SACA,WACA,cACA,OACA,aACA,sBACA,mBACA,eACA,iBACA,SACA,gBACA,sBACA,iBACA,IACA,KACA,KACA,SACA,OACA,OACA,cACA,YACA,UACA,SACA,SACA,QACA,OACA,kBACA,QACA,mBACA,mBACA,eACA,cACA,eACA,cACA,aACA,eACA,mBACA,oBACA,iBACA,kBACA,oBACA,iBACA,SACA,eACA,QACA,eACA,iBACA,WACA,cACA,UACA,UACA,YACA,mBACA,cACA,kBACA,mBACA,iBACA,aACA,OACA,KACA,KACA,UACA,SACA,gBACA,UACA,aACA,UACA,aACA,gBACA,gBACA,QACA,eACA,OACA,eACA,mBACA,mBACA,IACA,KACA,KACA,QACA,IACA,KACA,KACA,IACA,eAGWurO,EAASvrO,EAAO,CAC3B,SACA,cACA,QACA,WACA,QACA,cACA,cACA,gBACA,aACA,aACA,QACA,MACA,UACA,eACA,WACA,QACA,QACA,SACA,OACA,KACA,UACA,SACA,gBACA,SACA,SACA,iBACA,YACA,WACA,cACA,UACA,UACA,gBACA,WACA,WACA,OACA,WACA,WACA,aACA,UACA,SACA,SACA,cACA,gBACA,uBACA,YACA,YACA,aACA,WACA,iBACA,iBACA,YACA,UACA,QACA,UAGWwrO,EAAMxrO,EAAO,CACxB,aACA,SACA,cACA,YACA,gBC1XWyrO,EAAgB7C,EAAK,yBACrB8C,EAAW9C,EAAK,yBAChB+C,EAAc/C,EAAK,eACnBgD,GAAYhD,EAAK,gCACjBiD,GAAYjD,EAAK,kBACjBkD,GAAiBlD,EAC5B,oGAEWmD,GAAoBnD,EAAK,yBACzBoD,GAAkBpD,EAC7B,+DAEWqD,GAAerD,EAAK,WACpBsD,GAAiBtD,EAAK,4BAKtBuD,GAAuBvD,EAAK,YAC5BwD,GAAuBxD,EAAK,WAC5ByD,GAAqBzD,EAAK,+BAC1B0D,GAAmB1D,EAAK,QC4D/B2D,GAA6B,CACjC,QACA,SACA,MACA,SACA,UACA,WACA,YACA,YAEIC,GAAwBxsO,EAAO0qO,EAAS,GAAI6B,KAQ5CE,GAAsB,WAC1B,MAAMn4S,EAA8B;AAIpC,OAHA20S,EAA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ACHC,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,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,I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GACV,OAAUA,GACV,OAAUA,GACV,OAAUA,GACV,OAAUA,GACV,OAAUA,GACV,OAAUA,GACV,OAAUA,GACV,OAAUA,GACV,OAAUA,GACV,OAAUA,GACV,OAAUA,GACV,OAAUA,GACV,OAAUA,GACV,OAAUA,GACV,OAAUA,GACV,OAAUA,GACV,OAAUA,GACV,OAAUA,GACV,OAAUA,GACV,OAAUA,GACV,OAAUA,GACV,OAAUA,GACV,OAAUA,GACV,OAAUA,GACV,OAAUA,GACV,OAAUA,GACV,OAAUA,GACV,OAAUA,GACV,OAAUA,GACV,OAAUA,GACV,OAAUA,GACV,OAAUA,GACV,OAAUA,GACV,OAAUA,GACV,OAAUA,GACV,OAAUA,GACV,OAAUA,GACV,OAAUA,GACV,OAAUA,GACV,OAAUA,GACV,OAAUA,GACV,OAAUA,GACV,OAAUA,GACV,OAAUA,GACV,OAAUA,GACV,OAAUA,GACV,OAAUA,GACV,OAAUA,GACV,OAAUA,GACV,OAAUA,GACV,OAAUA,GACV,OAAUA,GACV,OAAUA,GACV,OAAUA,GACV,OAAUA,GACV,OAAUA,GACV,OAAUA,GACV,OAAUA,GACV,OAAUA,GACV,OAAUA,GACV,OAAUA,GACV,OAAUA,GACV,OAAUA,GACV,OAAUA,GACV,OAAUA,GACV,OAAUA,GACV,OAAUA,GACV,OAAUA,GACV,OAAUA,GACV,OAAUA,GACV,OAAUA,GACV,OAAUA,GACV,OAAUA,GACV,OAAUA,GACV,OAAUA,GACV,OAAUA,GACV,OAAUA,GACV,OAAUA,GACV,OAAUA,GACV,OAAUA,GACV,OAAUA,GACV,OAAUA,GACV,OAAUA,GACV,OAAUA,GACV,OAAUA,GACV,OAAUA,GACV,OAAUA,GACV,OAAUA,GACV,OAAUA,GACV,OAAUA,GACV,OAAUA,GACV,MAAUA,GACV,OAAUA,GACV,OAAUA,GACV,OAAUA,GACV,OAAUA,GACV,OAAUA,GACV,OAAUA,GACV,OAAUA,GACV,OAAUA,GACV,OAAUA,GACV,OAAUA,GACV,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