{"version":3,"file":"chunk-dye5qndr.js","sources":["node_modules/@rx-angular/cdk/fesm2022/cdk-template.mjs"],"sourcesContent":["import { onStrategy, strategyHandling } from '@rx-angular/cdk/render-strategies';\nimport { of, BehaviorSubject, concat, combineLatest, ReplaySubject, EMPTY, merge } from 'rxjs';\nimport { switchMap, ignoreElements, catchError, distinctUntilChanged, map, tap, withLatestFrom } from 'rxjs/operators';\n\n// copied from https://github.com/angular/angular/blob/main/packages/core/src/render3/list_reconciliation.ts\n/**\n * A type representing the live collection to be reconciled with any new (incoming) collection. This\n * is an adapter class that makes it possible to work with different internal data structures,\n * regardless of the actual values of the incoming collection.\n */\nclass LiveCollection {\n destroy(item) {\n // noop by default\n }\n updateValue(index, value) {\n // noop by default\n }\n // operations below could be implemented on top of the operations defined so far, but having\n // them explicitly allow clear expression of intent and potentially more performant\n // implementations\n swap(index1, index2) {\n const startIdx = Math.min(index1, index2);\n const endIdx = Math.max(index1, index2);\n const endItem = this.detach(endIdx);\n if (endIdx - startIdx > 1) {\n const startItem = this.detach(startIdx);\n this.attach(startIdx, endItem);\n this.attach(endIdx, startItem);\n } else {\n this.attach(startIdx, endItem);\n }\n }\n move(prevIndex, newIdx) {\n this.attach(newIdx, this.detach(prevIndex));\n }\n}\nfunction valuesMatching(liveIdx, liveValue, newIdx, newValue, trackBy) {\n if (liveIdx === newIdx && Object.is(liveValue, newValue)) {\n // matching and no value identity to update\n return 1;\n } else if (Object.is(trackBy(liveIdx, liveValue), trackBy(newIdx, newValue))) {\n // matching but requires value identity update\n return -1;\n }\n return 0;\n}\nfunction recordDuplicateKeys(keyToIdx, key, idx) {\n const idxSoFar = keyToIdx.get(key);\n if (idxSoFar !== undefined) {\n idxSoFar.add(idx);\n } else {\n keyToIdx.set(key, new Set([idx]));\n }\n}\n/**\n * The live collection reconciliation algorithm that perform various in-place operations, so it\n * reflects the content of the new (incoming) collection.\n *\n * The reconciliation algorithm has 2 code paths:\n * - \"fast\" path that don't require any memory allocation;\n * - \"slow\" path that requires additional memory allocation for intermediate data structures used to\n * collect additional information about the live collection.\n * It might happen that the algorithm switches between the two modes in question in a single\n * reconciliation path - generally it tries to stay on the \"fast\" path as much as possible.\n *\n * The overall complexity of the algorithm is O(n + m) for speed and O(n) for memory (where n is the\n * length of the live collection and m is the length of the incoming collection). Given the problem\n * at hand the complexity / performance constraints makes it impossible to perform the absolute\n * minimum of operation to reconcile the 2 collections. The algorithm makes different tradeoffs to\n * stay within reasonable performance bounds and may apply sub-optimal number of operations in\n * certain situations.\n *\n * @param liveCollection the current, live collection;\n * @param newCollection the new, incoming collection;\n * @param trackByFn key generation function that determines equality between items in the life and\n * incoming collection;\n */\nfunction reconcile(liveCollection, newCollection, trackByFn) {\n let detachedItems = undefined;\n let liveKeysInTheFuture = undefined;\n let liveStartIdx = 0;\n let liveEndIdx = liveCollection.length - 1;\n const duplicateKeys = ngDevMode ? new Map() : undefined;\n if (Array.isArray(newCollection)) {\n let newEndIdx = newCollection.length - 1;\n while (liveStartIdx <= liveEndIdx && liveStartIdx <= newEndIdx) {\n // compare from the beginning\n const liveStartValue = liveCollection.at(liveStartIdx);\n const newStartValue = newCollection[liveStartIdx];\n if (ngDevMode) {\n recordDuplicateKeys(duplicateKeys, trackByFn(liveStartIdx, newStartValue), liveStartIdx);\n }\n const isStartMatching = valuesMatching(liveStartIdx, liveStartValue, liveStartIdx, newStartValue, trackByFn);\n if (isStartMatching !== 0) {\n if (isStartMatching < 0) {\n liveCollection.updateValue(liveStartIdx, newStartValue);\n }\n liveStartIdx++;\n continue;\n }\n // compare from the end\n // TODO(perf): do _all_ the matching from the end\n const liveEndValue = liveCollection.at(liveEndIdx);\n const newEndValue = newCollection[newEndIdx];\n if (ngDevMode) {\n recordDuplicateKeys(duplicateKeys, trackByFn(newEndIdx, newEndValue), newEndIdx);\n }\n const isEndMatching = valuesMatching(liveEndIdx, liveEndValue, newEndIdx, newEndValue, trackByFn);\n if (isEndMatching !== 0) {\n if (isEndMatching < 0) {\n liveCollection.updateValue(liveEndIdx, newEndValue);\n }\n liveEndIdx--;\n newEndIdx--;\n continue;\n }\n // Detect swap and moves:\n const liveStartKey = trackByFn(liveStartIdx, liveStartValue);\n const liveEndKey = trackByFn(liveEndIdx, liveEndValue);\n const newStartKey = trackByFn(liveStartIdx, newStartValue);\n if (Object.is(newStartKey, liveEndKey)) {\n const newEndKey = trackByFn(newEndIdx, newEndValue);\n // detect swap on both ends;\n if (Object.is(newEndKey, liveStartKey)) {\n liveCollection.swap(liveStartIdx, liveEndIdx);\n liveCollection.updateValue(liveEndIdx, newEndValue);\n newEndIdx--;\n liveEndIdx--;\n } else {\n // the new item is the same as the live item with the end pointer - this is a move forward\n // to an earlier index;\n liveCollection.move(liveEndIdx, liveStartIdx);\n }\n liveCollection.updateValue(liveStartIdx, newStartValue);\n liveStartIdx++;\n continue;\n }\n // Fallback to the slow path: we need to learn more about the content of the live and new\n // collections.\n detachedItems ??= new UniqueValueMultiKeyMap();\n liveKeysInTheFuture ??= initLiveItemsInTheFuture(liveCollection, liveStartIdx, liveEndIdx, trackByFn);\n // Check if I'm inserting a previously detached item: if so, attach it here\n if (attachPreviouslyDetached(liveCollection, detachedItems, liveStartIdx, newStartKey)) {\n liveCollection.updateValue(liveStartIdx, newStartValue);\n liveStartIdx++;\n liveEndIdx++;\n } else if (!liveKeysInTheFuture.has(newStartKey)) {\n // Check if we seen a new item that doesn't exist in the old collection and must be INSERTED\n const newItem = liveCollection.create(liveStartIdx, newCollection[liveStartIdx]);\n liveCollection.attach(liveStartIdx, newItem);\n liveStartIdx++;\n liveEndIdx++;\n } else {\n // We know that the new item exists later on in old collection but we don't know its index\n // and as the consequence can't move it (don't know where to find it). Detach the old item,\n // hoping that it unlocks the fast path again.\n detachedItems.set(liveStartKey, liveCollection.detach(liveStartIdx));\n liveEndIdx--;\n }\n }\n // Final cleanup steps:\n // - more items in the new collection => insert\n while (liveStartIdx <= newEndIdx) {\n createOrAttach(liveCollection, detachedItems, trackByFn, liveStartIdx, newCollection[liveStartIdx]);\n liveStartIdx++;\n }\n } else if (newCollection != null) {\n // iterable - immediately fallback to the slow path\n const newCollectionIterator = newCollection[Symbol.iterator]();\n let newIterationResult = newCollectionIterator.next();\n while (!newIterationResult.done && liveStartIdx <= liveEndIdx) {\n const liveValue = liveCollection.at(liveStartIdx);\n const newValue = newIterationResult.value;\n if (ngDevMode) {\n recordDuplicateKeys(duplicateKeys, trackByFn(liveStartIdx, newValue), liveStartIdx);\n }\n const isStartMatching = valuesMatching(liveStartIdx, liveValue, liveStartIdx, newValue, trackByFn);\n if (isStartMatching !== 0) {\n // found a match - move on, but update value\n if (isStartMatching < 0) {\n liveCollection.updateValue(liveStartIdx, newValue);\n }\n liveStartIdx++;\n newIterationResult = newCollectionIterator.next();\n } else {\n detachedItems ??= new UniqueValueMultiKeyMap();\n liveKeysInTheFuture ??= initLiveItemsInTheFuture(liveCollection, liveStartIdx, liveEndIdx, trackByFn);\n // Check if I'm inserting a previously detached item: if so, attach it here\n const newKey = trackByFn(liveStartIdx, newValue);\n if (attachPreviouslyDetached(liveCollection, detachedItems, liveStartIdx, newKey)) {\n liveCollection.updateValue(liveStartIdx, newValue);\n liveStartIdx++;\n liveEndIdx++;\n newIterationResult = newCollectionIterator.next();\n } else if (!liveKeysInTheFuture.has(newKey)) {\n liveCollection.attach(liveStartIdx, liveCollection.create(liveStartIdx, newValue));\n liveStartIdx++;\n liveEndIdx++;\n newIterationResult = newCollectionIterator.next();\n } else {\n // it is a move forward - detach the current item without advancing in collections\n const liveKey = trackByFn(liveStartIdx, liveValue);\n detachedItems.set(liveKey, liveCollection.detach(liveStartIdx));\n liveEndIdx--;\n }\n }\n }\n // this is a new item as we run out of the items in the old collection - create or attach a\n // previously detached one\n while (!newIterationResult.done) {\n createOrAttach(liveCollection, detachedItems, trackByFn, liveCollection.length, newIterationResult.value);\n newIterationResult = newCollectionIterator.next();\n }\n }\n // Cleanups common to the array and iterable:\n // - more items in the live collection => delete starting from the end;\n while (liveStartIdx <= liveEndIdx) {\n liveCollection.destroy(liveCollection.detach(liveEndIdx--));\n }\n // - destroy items that were detached but never attached again.\n detachedItems?.forEach(item => {\n liveCollection.destroy(item);\n });\n // report duplicate keys (dev mode only)\n if (ngDevMode) {\n const duplicatedKeysMsg = [];\n for (const [key, idxSet] of duplicateKeys) {\n if (idxSet.size > 1) {\n const idx = [...idxSet].sort((a, b) => a - b);\n for (let i = 1; i < idx.length; i++) {\n duplicatedKeysMsg.push(`key \"${key}\" at index \"${idx[i - 1]}\" and \"${idx[i]}\"`);\n }\n }\n }\n if (duplicatedKeysMsg.length > 0) {\n const message = 'The provided track expression resulted in duplicated keys for a given collection. ' + 'Adjust the tracking expression such that it uniquely identifies all the items in the collection. ' + 'Duplicated keys were: \\n' + duplicatedKeysMsg.join(', \\n') + '.';\n // tslint:disable-next-line:no-console\n console.warn(message);\n }\n }\n}\nfunction attachPreviouslyDetached(prevCollection, detachedItems, index, key) {\n if (detachedItems !== undefined && detachedItems.has(key)) {\n prevCollection.attach(index, detachedItems.get(key));\n detachedItems.delete(key);\n return true;\n }\n return false;\n}\nfunction createOrAttach(liveCollection, detachedItems, trackByFn, index, value) {\n if (!attachPreviouslyDetached(liveCollection, detachedItems, index, trackByFn(index, value))) {\n const newItem = liveCollection.create(index, value);\n liveCollection.attach(index, newItem);\n } else {\n liveCollection.updateValue(index, value);\n }\n}\nfunction initLiveItemsInTheFuture(liveCollection, start, end, trackByFn) {\n const keys = new Set();\n for (let i = start; i <= end; i++) {\n keys.add(trackByFn(i, liveCollection.at(i)));\n }\n return keys;\n}\n/**\n * A specific, partial implementation of the Map interface with the following characteristics:\n * - allows multiple values for a given key;\n * - maintain FIFO order for multiple values corresponding to a given key;\n * - assumes that all values are unique.\n *\n * The implementation aims at having the minimal overhead for cases where keys are _not_ duplicated\n * (the most common case in the list reconciliation algorithm). To achieve this, the first value for\n * a given key is stored in a regular map. Then, when more values are set for a given key, we\n * maintain a form of linked list in a separate map. To maintain this linked list we assume that all\n * values (in the entire collection) are unique.\n */\nclass UniqueValueMultiKeyMap {\n constructor() {\n // A map from a key to the first value corresponding to this key.\n this.kvMap = new Map();\n // A map that acts as a linked list of values - each value maps to the next value in this \"linked\n // list\" (this only works if values are unique). Allocated lazily to avoid memory consumption when\n // there are no duplicated values.\n this._vMap = undefined;\n }\n has(key) {\n return this.kvMap.has(key);\n }\n delete(key) {\n if (!this.has(key)) return false;\n const value = this.kvMap.get(key);\n if (this._vMap !== undefined && this._vMap.has(value)) {\n this.kvMap.set(key, this._vMap.get(value));\n this._vMap.delete(value);\n } else {\n this.kvMap.delete(key);\n }\n return true;\n }\n get(key) {\n return this.kvMap.get(key);\n }\n set(key, value) {\n if (this.kvMap.has(key)) {\n let prevValue = this.kvMap.get(key);\n // Note: we don't use `assertNotSame`, because the value needs to be stringified even if\n // there is no error which can freeze the browser for large values (see #58509).\n /*if (ngDevMode && prevValue === value) {\n throw new Error(\n `Detected a duplicated value ${value} for the key ${key}`,\n );\n }*/\n if (this._vMap === undefined) {\n this._vMap = new Map();\n }\n const vMap = this._vMap;\n while (vMap.has(prevValue)) {\n prevValue = vMap.get(prevValue);\n }\n vMap.set(prevValue, value);\n } else {\n this.kvMap.set(key, value);\n }\n }\n forEach(cb) {\n // eslint-disable-next-line prefer-const\n for (let [key, value] of this.kvMap) {\n cb(value, key);\n if (this._vMap !== undefined) {\n const vMap = this._vMap;\n while (vMap.has(value)) {\n value = vMap.get(value);\n cb(value, key);\n }\n }\n }\n }\n}\n\n/**\n * @internal\n * creates an embeddedViewRef\n *\n * @param viewContainerRef\n * @param templateRef\n * @param context\n * @param index\n * @return EmbeddedViewRef\n */\nfunction createEmbeddedView(viewContainerRef, templateRef, context, index = 0) {\n const view = viewContainerRef.createEmbeddedView(templateRef, context, index);\n view.detectChanges();\n return view;\n}\n/**\n * @internal\n *\n * A factory function returning an object to handle `TemplateRef`'s.\n * You can add and get a `TemplateRef`.\n *\n */\nfunction templateHandling(viewContainerRef) {\n const templateCache = new Map();\n const get$ = name => {\n return templateCache.get(name) || of(undefined);\n };\n const get = name => {\n let ref;\n const templatRef$ = get$(name);\n if (templatRef$) {\n const sub = templatRef$.subscribe(r => ref = r);\n sub.unsubscribe();\n }\n return ref;\n };\n return {\n add(name, templateRef) {\n assertTemplate(name, templateRef);\n if (!templateCache.has(name)) {\n templateCache.set(name, new BehaviorSubject(templateRef));\n } else {\n templateCache.get(name).next(templateRef);\n }\n },\n get$,\n get,\n createEmbeddedView: (name, context) => createEmbeddedView(viewContainerRef, get(name), context)\n };\n //\n function assertTemplate(property, templateRef) {\n const isTemplateRefOrNull = !!(!templateRef || templateRef.createEmbeddedView);\n if (!isTemplateRefOrNull) {\n throw new Error(`${property} must be a TemplateRef, but received ${typeof templateRef}`);\n }\n return isTemplateRefOrNull;\n }\n}\n/**\n * @internal\n *\n * A side effect operator similar to `tap` but with a static internal logic.\n * It calls detect changes on the 'VirtualParent' and the injectingViewCdRef.\n *\n * @param injectingViewCdRef\n * @param strategy\n * @param notifyNeeded\n * @param ngZone\n */\nfunction notifyAllParentsIfNeeded(injectingViewCdRef, strategy, notifyNeeded, ngZone) {\n return o$ => o$.pipe(switchMap(v => {\n const notifyParent = notifyNeeded();\n if (!notifyParent) {\n return of(v);\n }\n return concat(of(v), onStrategy(injectingViewCdRef, strategy, (_v, work, options) => {\n /*console.log(\n 'notifyAllParentsIfNeeded injectingView',\n (injectingViewCdRef as any).context\n );*/\n work(injectingViewCdRef, options.scope);\n }, {\n scope: injectingViewCdRef.context || injectingViewCdRef,\n ngZone\n }).pipe(ignoreElements()));\n }));\n}\n\n/**\n * @internal\n *\n * Factory that returns a `ListTemplateManager` for the passed params.\n *\n * @param templateSettings\n */\nfunction getTemplateHandler(templateSettings) {\n const {\n viewContainerRef,\n initialTemplateRef,\n createViewContext,\n updateViewContext\n } = templateSettings;\n return {\n updateUnchangedContext,\n insertView,\n moveView,\n removeView,\n getListChanges,\n updateView\n };\n // =====\n function updateUnchangedContext(item, index, count) {\n const view = viewContainerRef.get(index);\n updateViewContext(item, view, {\n count,\n index\n });\n view.detectChanges();\n }\n function moveView(oldIndex, item, index, count) {\n const oldView = viewContainerRef.get(oldIndex);\n const view = viewContainerRef.move(oldView, index);\n updateViewContext(item, view, {\n count,\n index\n });\n view.detectChanges();\n }\n function updateView(item, index, count) {\n const view = viewContainerRef.get(index);\n updateViewContext(item, view, {\n count,\n index\n });\n view.detectChanges();\n }\n function removeView(index) {\n return viewContainerRef.remove(index);\n }\n function insertView(item, index, count) {\n createEmbeddedView(viewContainerRef, initialTemplateRef, createViewContext(item, {\n count,\n index\n }), index);\n }\n}\n/**\n * @internal\n *\n * @param changes\n * @param items\n */\nfunction getListChanges(changes, items) {\n const changedIdxs = new Set();\n const changesArr = [];\n let notifyParent = false;\n changes.forEachOperation((record, adjustedPreviousIndex, currentIndex) => {\n const item = record.item;\n if (record.previousIndex == null) {\n // insert\n changesArr.push(getInsertChange(item, currentIndex === null ? undefined : currentIndex));\n changedIdxs.add(item);\n notifyParent = true;\n } else if (currentIndex == null) {\n // remove\n changesArr.push(getRemoveChange(item, adjustedPreviousIndex === null ? undefined : adjustedPreviousIndex));\n notifyParent = true;\n } else if (adjustedPreviousIndex !== null) {\n // move\n changesArr.push(getMoveChange(item, currentIndex, adjustedPreviousIndex));\n changedIdxs.add(item);\n notifyParent = true;\n }\n });\n changes.forEachIdentityChange(record => {\n const item = record.item;\n if (!changedIdxs.has(item)) {\n changesArr.push(getUpdateChange(item, record.currentIndex));\n changedIdxs.add(item);\n }\n });\n items.forEach((item, index) => {\n if (!changedIdxs.has(item)) {\n changesArr.push(getUnchangedChange(item, index));\n }\n });\n return [changesArr, notifyParent];\n // ==========\n function getMoveChange(item, currentIndex, adjustedPreviousIndex) {\n return [2 /* RxListTemplateChangeType.move */, [item, currentIndex, adjustedPreviousIndex]];\n }\n function getUpdateChange(item, currentIndex) {\n return [3 /* RxListTemplateChangeType.update */, [item, currentIndex]];\n }\n function getUnchangedChange(item, index) {\n return [4 /* RxListTemplateChangeType.context */, [item, index]];\n }\n function getInsertChange(item, currentIndex) {\n return [0 /* RxListTemplateChangeType.insert */, [item, currentIndex === null ? undefined : currentIndex]];\n }\n function getRemoveChange(item, adjustedPreviousIndex) {\n return [1 /* RxListTemplateChangeType.remove */, [item, adjustedPreviousIndex === null ? undefined : adjustedPreviousIndex]];\n }\n}\n\n/** @internal **/\nfunction isRxRenderError(e) {\n return e != null && Array.isArray(e) && e.length === 2 && e[0] instanceof Error;\n}\n/** @internal **/\nfunction createErrorHandler(_handler) {\n const _handleError = _handler ? e => _handler.handleError(e) : console.error;\n return {\n handleError: error => {\n if (isRxRenderError(error)) {\n _handleError(error[0]);\n console.error('additionalErrorContext', error[1]);\n } else {\n _handleError(error);\n }\n }\n };\n}\n/** @internal **/\nfunction toRenderError(e, context) {\n return [e, context];\n}\nfunction createListTemplateManager(config) {\n const {\n templateSettings,\n renderSettings,\n trackBy,\n iterableDiffers\n } = config;\n const {\n defaultStrategyName,\n strategies,\n cdRef: injectingViewCdRef,\n patchZone,\n parent\n } = renderSettings;\n const errorHandler = createErrorHandler(renderSettings.errorHandler);\n const ngZone = patchZone ? patchZone : undefined;\n const strategyHandling$ = strategyHandling(defaultStrategyName, strategies);\n let _differ;\n function getDiffer(values) {\n if (_differ) {\n return _differ;\n }\n return values ? _differ = iterableDiffers.find(values).create(trackBy) : null;\n }\n // type, context\n /* TODO (regarding createView): this is currently not in use. for the list-manager this would mean to provide\n functions for not only create. developers than should have to provide create, move, remove,... the whole thing.\n i don't know if this is the right decision for a first RC */\n const listViewHandler = getTemplateHandler({\n ...templateSettings,\n initialTemplateRef: templateSettings.templateRef\n });\n const viewContainerRef = templateSettings.viewContainerRef;\n let notifyParent = false;\n let changesArr;\n let partiallyFinished = false;\n return {\n nextStrategy(nextConfig) {\n strategyHandling$.next(nextConfig);\n },\n render(values$) {\n return values$.pipe(render());\n }\n };\n function handleError() {\n return o$ => o$.pipe(catchError(err => {\n partiallyFinished = false;\n errorHandler.handleError(err);\n return of(null);\n }));\n }\n function render() {\n return o$ => combineLatest([o$, strategyHandling$.strategy$.pipe(distinctUntilChanged())]).pipe(map(([iterable, strategy]) => {\n try {\n const differ = getDiffer(iterable);\n let changes;\n if (differ) {\n if (partiallyFinished) {\n const currentIterable = [];\n for (let i = 0, ilen = viewContainerRef.length; i < ilen; i++) {\n const viewRef = viewContainerRef.get(i);\n currentIterable[i] = viewRef.context.$implicit;\n }\n differ.diff(currentIterable);\n }\n changes = differ.diff(iterable);\n }\n return {\n changes,\n iterable,\n strategy\n };\n } catch {\n throw new Error(`Error trying to diff '${iterable}'. Only arrays and iterables are allowed`);\n }\n }),\n // Cancel old renders\n switchMap(({\n changes,\n iterable,\n strategy\n }) => {\n if (!changes) {\n return of([]);\n }\n const values = iterable || [];\n // TODO: we might want to treat other iterables in a more performant way than Array.from()\n const items = Array.isArray(values) ? values : Array.from(iterable);\n const listChanges = listViewHandler.getListChanges(changes, items);\n changesArr = listChanges[0];\n const insertedOrRemoved = listChanges[1];\n const applyChanges$ = getObservablesFromChangesArray(changesArr, strategy, items.length);\n partiallyFinished = true;\n notifyParent = insertedOrRemoved && parent;\n return combineLatest(applyChanges$.length > 0 ? applyChanges$ : [of(null)]).pipe(tap(() => partiallyFinished = false), notifyAllParentsIfNeeded(injectingViewCdRef, strategy, () => notifyParent, ngZone), handleError(), map(() => iterable));\n }), handleError());\n }\n /**\n * @internal\n *\n * returns an array of streams which process all of the view updates needed to reflect the latest diff to the\n * viewContainer.\n * I\n *\n * @param changes\n * @param strategy\n * @param count\n */\n function getObservablesFromChangesArray(changes, strategy, count) {\n return changes.length > 0 ? changes.map(change => {\n const payload = change[1];\n return onStrategy(change[0], strategy, type => {\n switch (type) {\n case 0 /* RxListTemplateChangeType.insert */:\n listViewHandler.insertView(payload[0], payload[1], count);\n break;\n case 2 /* RxListTemplateChangeType.move */:\n listViewHandler.moveView(payload[2], payload[0], payload[1], count);\n break;\n case 1 /* RxListTemplateChangeType.remove */:\n listViewHandler.removeView(payload[1]);\n break;\n case 3 /* RxListTemplateChangeType.update */:\n listViewHandler.updateView(payload[0], payload[1], count);\n break;\n case 4 /* RxListTemplateChangeType.context */:\n listViewHandler.updateUnchangedContext(payload[0], payload[1], count);\n break;\n }\n }, {\n ngZone\n });\n }) : [of(null)];\n }\n}\nconst computeFirst = ({\n count,\n index\n}) => index === 0;\nconst computeLast = ({\n count,\n index\n}) => index === count - 1;\nconst computeEven = ({\n count,\n index\n}) => index % 2 === 0;\nclass RxDefaultListViewContext {\n set $implicit($implicit) {\n this._$implicit = $implicit;\n this._item.next($implicit);\n }\n get $implicit() {\n return this._$implicit;\n }\n get $complete() {\n return this._$complete;\n }\n get $error() {\n return this._$error;\n }\n get $suspense() {\n return this._$suspense;\n }\n get index() {\n return this._context$.getValue().index;\n }\n get count() {\n return this._context$.getValue().count;\n }\n get first() {\n return computeFirst(this._context$.getValue());\n }\n get last() {\n return computeLast(this._context$.getValue());\n }\n get even() {\n return computeEven(this._context$.getValue());\n }\n get odd() {\n return !this.even;\n }\n get index$() {\n return this._context$.pipe(map(c => c.index), distinctUntilChanged());\n }\n get count$() {\n return this._context$.pipe(map(s => s.count), distinctUntilChanged());\n }\n get first$() {\n return this._context$.pipe(map(computeFirst), distinctUntilChanged());\n }\n get last$() {\n return this._context$.pipe(map(computeLast), distinctUntilChanged());\n }\n get even$() {\n return this._context$.pipe(map(computeEven), distinctUntilChanged());\n }\n get odd$() {\n return this.even$.pipe(map(even => !even));\n }\n constructor(item, customProps) {\n this._item = new ReplaySubject(1);\n this.item$ = this._item.asObservable();\n this._context$ = new BehaviorSubject({\n index: -1,\n count: -1\n });\n this.select = props => {\n return this.item$.pipe(map(r => props.reduce((acc, key) => acc?.[key], r)));\n };\n this.$implicit = item;\n if (customProps) {\n this.updateContext(customProps);\n }\n }\n updateContext(newProps) {\n this._context$.next({\n ...this._context$.getValue(),\n ...newProps\n });\n }\n}\nvar RxBaseTemplateNames = /*#__PURE__*/function (RxBaseTemplateNames) {\n RxBaseTemplateNames[\"error\"] = \"errorTpl\";\n RxBaseTemplateNames[\"complete\"] = \"completeTpl\";\n RxBaseTemplateNames[\"suspense\"] = \"suspenseTpl\";\n return RxBaseTemplateNames;\n}(RxBaseTemplateNames || {});\nclass WorkQueue {\n constructor(strategyProvider) {\n this.strategyProvider = strategyProvider;\n this.queue = new Map();\n this.length = 0;\n }\n patch(view, data) {\n if (this.queue.has(view)) {\n const entries = this.queue.get(view);\n const lastEntry = entries[entries.length - 1];\n /*console.log(\n 'patch I has a work in queue',\n data.type,\n this.queue.get(view).map((w) => w.type),\n );*/\n const work = lastEntry.work;\n lastEntry.work = () => {\n const view = work();\n const view2 = data.work();\n return view ?? view2;\n };\n } else {\n this.set(view, data);\n }\n }\n override(view, data) {\n if (this.queue.has(view)) {\n const entries = this.queue.get(view);\n const lastEntry = entries[entries.length - 1];\n this.queue.set(view, [{\n work: data.work,\n type: 'remove',\n order: lastEntry.order\n }]);\n } else {\n this.set(view, data);\n }\n }\n set(view, data) {\n if (this.queue.has(view)) {\n /* console.log(\n 'I has a work in queue',\n data.type,\n this.queue.get(view).map((w) => w.type),\n );*/\n this.queue.get(view).push({\n work: data.work,\n type: data.type,\n order: this.length++\n });\n } else {\n this.queue.set(view, [{\n work: data.work,\n type: data.type,\n order: this.length++\n }]);\n }\n }\n flush(strategy, ngZone) {\n // console.log('operations', this.length);\n return combineLatest(Array.from(this.queue.values()).flatMap(entry => entry).sort((a, b) => a.order - b.order).map(({\n work\n }) => {\n // console.log('operation', type);\n return onStrategy(null, this.strategyProvider.strategies[strategy], () => {\n // console.log('exec order', order, type);\n const view = work();\n view?.detectChanges();\n }, {\n ngZone\n });\n }));\n }\n clear() {\n this.queue.clear();\n this.length = 0;\n }\n}\nclass RxLiveCollection extends LiveCollection {\n set needHostUpdate(needHostUpdate) {\n this._needHostUpdate = needHostUpdate;\n }\n get needHostUpdate() {\n return this._needHostUpdate;\n }\n constructor(viewContainer, templateRef, strategyProvider, createViewContext, updateViewContext) {\n super();\n this.viewContainer = viewContainer;\n this.templateRef = templateRef;\n this.strategyProvider = strategyProvider;\n this.createViewContext = createViewContext;\n this.updateViewContext = updateViewContext;\n /**\n Property indicating if indexes in the repeater context need to be updated following the live\n collection changes. Index updates are necessary if and only if views are inserted / removed in\n the middle of LContainer. Adds and removals at the end don't require index updates.\n */\n this.needsIndexUpdate = false;\n this._needHostUpdate = false;\n this.lastCount = undefined;\n this.workQueue = new WorkQueue(this.strategyProvider);\n }\n flushQueue(strategy, ngZone) {\n return this.workQueue.flush(strategy, ngZone);\n }\n get length() {\n return this._virtualViews.length;\n }\n at(index) {\n // console.log('live-coll: at', { index });\n return this.getView(index).context.$implicit;\n }\n attach(index, view) {\n this.needsIndexUpdate ||= index !== this.length;\n this.needHostUpdate = true;\n addToArray(this._virtualViews, index, view);\n // console.log('live-coll: attach', { index, existingWork });\n this.workQueue.set(view.context.$implicit, {\n work: () => {\n return this.attachView(view, index);\n },\n type: 'attach'\n });\n }\n attachView(view, index) {\n if (view._tempView) {\n // fake view\n return this._virtualViews[index] = this.viewContainer.createEmbeddedView(this.templateRef, this.createViewContext(view.context.$implicit, {\n index,\n count: this.length\n }), {\n index\n });\n }\n // TODO: this is only here because at the time of `create` we don't have information about the count yet\n this.updateViewContext(view.context.$implicit, view, {\n index,\n count: this.length\n });\n return this.viewContainer.insert(view, index);\n }\n detach(index) {\n this.needsIndexUpdate ||= index !== this.length - 1;\n const detachedView = removeFromArray(this._virtualViews, index);\n // console.log('live-coll: detach', { index, existingWork });\n this.workQueue.set(detachedView.context.$implicit, {\n work: () => {\n // return undefined, to prevent `.detectChanges` being called\n return this.detachView(index);\n },\n type: 'detach'\n });\n return detachedView;\n }\n detachView(index) {\n this.viewContainer.detach(index);\n return undefined;\n }\n create(index, value) {\n // console.log('live-coll: create', { index, value });\n // only create a fake EmbeddedView\n return {\n context: {\n $implicit: value,\n index\n },\n _tempView: true\n };\n }\n destroy(view) {\n // console.log('live-coll: destroy', { existingWork });\n this.needHostUpdate = true;\n this.workQueue.override(view.context.$implicit, {\n work: () => {\n this.destroyView(view);\n // return undefined, to prevent `.detectChanges` being called\n return undefined;\n },\n type: 'remove'\n });\n }\n destroyView(view) {\n view.destroy();\n return view;\n }\n updateValue(index, value) {\n const view = this.getView(index);\n // console.log('live-coll: updateValue', { index, value, existingWork });\n this.workQueue.patch(view.context.$implicit, {\n work: () => {\n return this.updateView(value, index, view);\n },\n type: 'update'\n });\n }\n updateView(value, index, view) {\n this.updateViewContext(value, view, {\n index,\n count: this.length\n });\n return view;\n }\n reset() {\n this._virtualViews = [];\n this.workQueue.clear();\n for (let i = 0; i < this.viewContainer.length; i++) {\n this._virtualViews[i] = this.viewContainer.get(i);\n }\n this.needsIndexUpdate = false;\n this.needHostUpdate = false;\n }\n updateIndexes() {\n const count = this.length;\n if (this.needsIndexUpdate || this.lastCount !== undefined && this.lastCount !== count) {\n // console.log('live-coll: updateIndexes');\n for (let i = 0; i < count; i++) {\n const view = this.getView(i);\n this.workQueue.patch(view.context.$implicit, {\n work: () => {\n const v = this.getView(i);\n if (v.context.index !== i || v.context.count !== count) {\n return this.updateView(v.context.$implicit, i, v);\n }\n },\n type: 'update'\n });\n }\n }\n this.lastCount = count;\n }\n getView(index) {\n return this._virtualViews[index] ?? this.viewContainer.get(index);\n }\n}\nfunction addToArray(arr, index, value) {\n // perf: array.push is faster than array.splice!\n if (index >= arr.length) {\n arr.push(value);\n } else {\n arr.splice(index, 0, value);\n }\n}\nfunction removeFromArray(arr, index) {\n // perf: array.pop is faster than array.splice!\n if (index >= arr.length - 1) {\n return arr.pop();\n } else {\n return arr.splice(index, 1)[0];\n }\n}\n\n/**\n * @internal\n *\n * A factory function that returns a map of projections to turn a notification of a Observable (next, error, complete)\n *\n * @param customNextContext - projection function to provide custom properties as well as override existing\n */\nfunction notificationKindToViewContext(customNextContext) {\n // @TODO rethink overrides\n return {\n suspense: notification => {\n const $implicit = notification.value;\n return {\n $implicit,\n suspense: true,\n error: false,\n complete: false,\n ...customNextContext($implicit)\n };\n },\n next: notification => {\n const $implicit = notification.value;\n return {\n $implicit,\n suspense: false,\n error: false,\n complete: false,\n ...customNextContext($implicit)\n };\n },\n error: notification => {\n const $implicit = notification.value;\n return {\n $implicit,\n complete: false,\n error: notification.error || true,\n suspense: false,\n ...customNextContext($implicit)\n };\n },\n complete: notification => {\n const $implicit = notification.value;\n return {\n $implicit,\n error: false,\n complete: true,\n suspense: false,\n ...customNextContext($implicit)\n };\n }\n };\n}\nfunction createTemplateManager(config) {\n const {\n renderSettings,\n notificationToTemplateName,\n templateSettings\n } = config;\n const {\n defaultStrategyName,\n strategies,\n cdRef: injectingViewCdRef,\n patchZone,\n parent\n } = renderSettings;\n const errorHandler = createErrorHandler(renderSettings.errorHandler);\n const ngZone = patchZone ? patchZone : undefined;\n let activeTemplate;\n const strategyHandling$ = strategyHandling(defaultStrategyName, strategies);\n const templates = templateHandling(templateSettings.viewContainerRef);\n const viewContainerRef = templateSettings.viewContainerRef;\n const triggerHandling = config.templateTrigger$ || EMPTY;\n const getContext = notificationKindToViewContext(templateSettings.customContext || (() => ({})));\n return {\n addTemplateRef: (name, templateRef) => {\n templates.add(name, templateRef);\n },\n nextStrategy: strategyHandling$.next,\n render(values$) {\n let trg;\n let notification = {\n value: undefined,\n complete: false,\n error: false,\n kind: \"suspense\" /* RxNotificationKind.Suspense */,\n hasValue: false\n };\n return merge(values$.pipe(tap(n => notification = n)), triggerHandling.pipe(tap(trigger => trg = trigger))).pipe(switchMap(() => {\n const contextKind = trg || notification.kind;\n trg = undefined;\n const value = notification.value;\n const templateName = notificationToTemplateName[contextKind](value, templates);\n return templates.get$(templateName).pipe(map(template => ({\n template,\n templateName,\n notification,\n contextKind\n })));\n }), withLatestFrom(strategyHandling$.strategy$),\n // Cancel old renders\n switchMap(([{\n template,\n templateName,\n notification,\n contextKind\n }, strategy]) => {\n const isNewTemplate = activeTemplate !== template || !template;\n const notifyParent = isNewTemplate && parent;\n return onStrategy(notification.value, strategy, (v, work, options) => {\n const context = getContext[contextKind](notification);\n if (isNewTemplate) {\n // template has changed (undefined => next; suspense => next; ...)\n // handle remove & insert\n // remove current view if there is any\n if (viewContainerRef.length > 0) {\n // patch removal if needed\n viewContainerRef.clear();\n }\n // create new view if any\n if (template) {\n // createEmbeddedView is already patched, no need for workFactory\n templates.createEmbeddedView(templateName, context);\n }\n } else if (template) {\n // template didn't change, update it\n // handle update\n const view = viewContainerRef.get(0);\n Object.keys(context).forEach(k => {\n view.context[k] = context[k];\n });\n // update view context, patch if needed\n work(view, options.scope, notification);\n }\n activeTemplate = template;\n }, {\n ngZone\n }\n // we don't need to specify any scope here. The template manager is the only one\n // who will call `viewRef#detectChanges` on any of the templates it manages.\n // whenever a new value comes in, any pre-scheduled work of this taskManager will\n // be nooped before a new work will be scheduled. This happens because of the implementation\n // of `StrategyCredential#behavior`\n ).pipe(notifyAllParentsIfNeeded(injectingViewCdRef, strategy, () => notifyParent, ngZone), catchError(e => {\n errorHandler.handleError(e);\n return of(e);\n }));\n }));\n }\n };\n}\n\n/**\n * Generated bundle index. Do not edit.\n */\n\nexport { LiveCollection, RxBaseTemplateNames, RxDefaultListViewContext, RxLiveCollection, createListTemplateManager, createTemplateManager, reconcile, templateHandling };\n"],"names":["createEmbeddedView","viewContainerRef","templateRef","context","index","view","templateHandling","templateCache","get$","name","of","get","ref","templatRef$","r","assertTemplate","BehaviorSubject","property","isTemplateRefOrNull","notifyAllParentsIfNeeded","injectingViewCdRef","strategy","notifyNeeded","ngZone","o$","switchMap","v","concat","onStrategy","_v","work","options","ignoreElements","getTemplateHandler","templateSettings","initialTemplateRef","createViewContext","updateViewContext","updateUnchangedContext","insertView","moveView","removeView","getListChanges","updateView","item","count","oldIndex","oldView","changes","items","changedIdxs","changesArr","notifyParent","record","adjustedPreviousIndex","currentIndex","getInsertChange","getRemoveChange","getMoveChange","getUpdateChange","getUnchangedChange","isRxRenderError","e","createErrorHandler","_handler","_handleError","error","createListTemplateManager","config","renderSettings","trackBy","iterableDiffers","defaultStrategyName","strategies","patchZone","parent","errorHandler","strategyHandling$","strategyHandling","_differ","getDiffer","values","listViewHandler","__spreadProps","__spreadValues","partiallyFinished","nextConfig","values$","render","handleError","catchError","err","combineLatest","distinctUntilChanged","map","iterable","differ","currentIterable","i","ilen","viewRef","listChanges","insertedOrRemoved","applyChanges$","getObservablesFromChangesArray","tap","change","payload","type","computeFirst","computeLast","computeEven","RxDefaultListViewContext","$implicit","c","s","even","customProps","ReplaySubject","props","acc","key","newProps","k","RxBaseTemplateNames","notificationKindToViewContext","customNextContext","notification","createTemplateManager","notificationToTemplateName","activeTemplate","templates","triggerHandling","EMPTY","getContext","trg","merge","n","trigger","contextKind","value","templateName","template","withLatestFrom","isNewTemplate"],"mappings":"yOA6VA,SAASA,EAAAA,CAAmBC,EAAkBC,CAAaC,CAAAA,CAAAA,CAASC,EAAQ,CAAG,CAAA,CAC7E,IAAMC,CAAAA,CAAOJ,CAAiB,CAAA,kBAAA,CAAmBC,EAAaC,CAASC,CAAAA,CAAK,CAC5E,CAAA,OAAAC,CAAK,CAAA,aAAA,GACEA,CACT,CAQA,SAASC,EAAAA,CAAiBL,CAAkB,CAAA,CAC1C,IAAMM,CAAgB,CAAA,IAAI,IACpBC,CAAOC,CAAAA,CAAAA,EACJF,EAAc,GAAIE,CAAAA,CAAI,CAAKC,EAAAA,EAAAA,CAAG,MAAS,CAAA,CAE1CC,EAAMF,CAAQ,EAAA,CAClB,IAAIG,CAAAA,CACEC,CAAcL,CAAAA,CAAAA,CAAKC,CAAI,CAC7B,CAAA,OAAII,CACUA,EAAAA,CAAAA,CAAY,SAAUC,CAAAA,CAAAA,EAAKF,EAAME,CAAC,CAAA,CAC1C,aAECF,CAAAA,CACT,EACA,OAAO,CACL,GAAIH,CAAAA,CAAAA,CAAMP,CAAa,CAAA,CACrBa,EAAeN,CAAMP,CAAAA,CAAW,CAC3BK,CAAAA,CAAAA,CAAc,GAAIE,CAAAA,CAAI,EAGzBF,CAAc,CAAA,GAAA,CAAIE,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