@pie-element/placement-ordering 14.1.2-next.0 → 14.1.2-next.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/author/choice-editor.js +16 -17
- package/dist/author/design.js +49 -50
- package/dist/author/index.js +21 -21
- package/dist/author/utils.js +1 -1
- package/dist/browser/author/index.js +8227 -8516
- package/dist/browser/author/index.js.map +1 -1
- package/dist/browser/browser-Dbw2uHQ7.js +372 -0
- package/dist/browser/browser-Dbw2uHQ7.js.map +1 -0
- package/dist/browser/controller/index.js +86 -163
- package/dist/browser/controller/index.js.map +1 -1
- package/dist/browser/delivery/index.js +299 -296
- package/dist/browser/delivery/index.js.map +1 -1
- package/dist/browser/{dist-BTHiIs74.js → dist-D9ARZhQk.js} +354 -538
- package/dist/browser/dist-D9ARZhQk.js.map +1 -0
- package/dist/browser/{drag-provider-DaPxkh4j.js → drag-provider-DSf9QLEN.js} +3280 -3565
- package/dist/browser/drag-provider-DSf9QLEN.js.map +1 -0
- package/dist/controller/index.js +44 -49
- package/dist/controller/scoring.js +1 -3
- package/dist/delivery/index.js +10 -10
- package/dist/delivery/ordering.js +2 -5
- package/dist/delivery/placement-ordering.js +37 -39
- package/dist/index.iife.js +33 -33
- package/dist/runtime-support.d.ts +12 -0
- package/dist/runtime-support.js +12 -0
- package/package.json +12 -8
- package/dist/browser/browser-CvJkn_Ec.js +0 -1019
- package/dist/browser/browser-CvJkn_Ec.js.map +0 -1
- package/dist/browser/dist-BTHiIs74.js.map +0 -1
- package/dist/browser/drag-provider-DaPxkh4j.js.map +0 -1
- package/dist/browser/last-D7N4Qfx4.js +0 -9
- package/dist/browser/last-D7N4Qfx4.js.map +0 -1
- package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_DataView.js +0 -6
- package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_Hash.js +0 -16
- package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_ListCache.js +0 -16
- package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_Map.js +0 -6
- package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_MapCache.js +0 -16
- package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_Promise.js +0 -6
- package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_Set.js +0 -6
- package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_SetCache.js +0 -11
- package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_Stack.js +0 -14
- package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_Symbol.js +0 -5
- package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_Uint8Array.js +0 -5
- package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_WeakMap.js +0 -6
- package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_apply.js +0 -12
- package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_arrayEach.js +0 -7
- package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_arrayEvery.js +0 -7
- package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_arrayFilter.js +0 -10
- package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_arrayIncludes.js +0 -7
- package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_arrayIncludesWith.js +0 -7
- package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_arrayLikeKeys.js +0 -15
- package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_arrayMap.js +0 -7
- package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_arrayPush.js +0 -7
- package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_arrayReduce.js +0 -8
- package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_arrayShuffle.js +0 -8
- package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_arraySome.js +0 -7
- package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_assignValue.js +0 -10
- package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_assocIndexOf.js +0 -8
- package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_baseAssign.js +0 -8
- package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_baseAssignIn.js +0 -8
- package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_baseAssignValue.js +0 -12
- package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_baseClone.js +0 -57
- package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_baseCreate.js +0 -14
- package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_baseDifference.js +0 -23
- package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_baseEach.js +0 -6
- package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_baseEvery.js +0 -10
- package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_baseFindIndex.js +0 -7
- package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_baseFlatten.js +0 -13
- package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_baseFor.js +0 -5
- package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_baseForOwn.js +0 -8
- package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_baseGet.js +0 -10
- package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_baseGetAllKeys.js +0 -9
- package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_baseGetTag.js +0 -10
- package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_baseHasIn.js +0 -6
- package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_baseIndexOf.js +0 -9
- package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_baseIsArguments.js +0 -9
- package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_baseIsEqual.js +0 -8
- package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_baseIsEqualDeep.js +0 -30
- package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_baseIsMap.js +0 -9
- package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_baseIsMatch.js +0 -26
- package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_baseIsNaN.js +0 -6
- package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_baseIsNative.js +0 -11
- package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_baseIsSet.js +0 -9
- package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_baseIsTypedArray.js +0 -11
- package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_baseIteratee.js +0 -11
- package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_baseKeys.js +0 -12
- package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_baseKeysIn.js +0 -13
- package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_baseMap.js +0 -11
- package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_baseMatches.js +0 -12
- package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_baseMatchesProperty.js +0 -17
- package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_baseProperty.js +0 -8
- package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_basePropertyDeep.js +0 -9
- package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_baseRandom.js +0 -7
- package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_baseReduce.js +0 -8
- package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_baseRest.js +0 -9
- package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_baseSetToString.js +0 -14
- package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_baseShuffle.js +0 -8
- package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_baseTimes.js +0 -7
- package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_baseToString.js +0 -15
- package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_baseUnary.js +0 -8
- package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_baseUniq.js +0 -27
- package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_baseValues.js +0 -9
- package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_cacheHas.js +0 -6
- package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_castPath.js +0 -10
- package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_cloneArrayBuffer.js +0 -8
- package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_cloneBuffer.js +0 -10
- package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_cloneDataView.js +0 -8
- package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_cloneRegExp.js +0 -8
- package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_cloneSymbol.js +0 -8
- package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_cloneTypedArray.js +0 -8
- package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_copyArray.js +0 -8
- package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_copyObject.js +0 -14
- package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_copySymbols.js +0 -8
- package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_copySymbolsIn.js +0 -8
- package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_coreJsData.js +0 -5
- package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_createAssigner.js +0 -15
- package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_createBaseEach.js +0 -12
- package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_createBaseFor.js +0 -12
- package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_createSet.js +0 -9
- package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_defineProperty.js +0 -10
- package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_equalArrays.js +0 -35
- package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_equalByTag.js +0 -35
- package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_equalObjects.js +0 -32
- package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_freeGlobal.js +0 -4
- package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_getAllKeys.js +0 -9
- package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_getAllKeysIn.js +0 -9
- package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_getMapData.js +0 -8
- package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_getMatchData.js +0 -16
- package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_getNative.js +0 -9
- package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_getPrototype.js +0 -5
- package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_getRawTag.js +0 -14
- package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_getSymbols.js +0 -10
- package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_getSymbolsIn.js +0 -11
- package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_getTag.js +0 -23
- package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_getValue.js +0 -6
- package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_hasPath.js +0 -18
- package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_hashClear.js +0 -7
- package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_hashDelete.js +0 -7
- package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_hashGet.js +0 -13
- package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_hashHas.js +0 -9
- package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_hashSet.js +0 -9
- package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_initCloneArray.js +0 -8
- package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_initCloneByTag.js +0 -33
- package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_initCloneObject.js +0 -9
- package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_isFlattenable.js +0 -10
- package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_isIndex.js +0 -8
- package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_isIterateeCall.js +0 -12
- package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_isKey.js +0 -11
- package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_isKeyable.js +0 -7
- package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_isMasked.js +0 -11
- package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_isPrototype.js +0 -8
- package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_isStrictComparable.js +0 -7
- package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_listCacheClear.js +0 -6
- package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_listCacheDelete.js +0 -9
- package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_listCacheGet.js +0 -8
- package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_listCacheHas.js +0 -7
- package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_listCacheSet.js +0 -8
- package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_mapCacheClear.js +0 -13
- package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_mapCacheDelete.js +0 -8
- package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_mapCacheGet.js +0 -7
- package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_mapCacheHas.js +0 -7
- package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_mapCacheSet.js +0 -8
- package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_mapToArray.js +0 -9
- package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_matchesStrictComparable.js +0 -8
- package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_memoizeCapped.js +0 -11
- package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_nativeCreate.js +0 -5
- package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_nativeKeys.js +0 -5
- package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_nativeKeysIn.js +0 -8
- package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_nodeUtil.js +0 -9
- package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_objectToString.js +0 -7
- package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_overArg.js +0 -8
- package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_overRest.js +0 -13
- package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_root.js +0 -5
- package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_setCacheAdd.js +0 -7
- package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_setCacheHas.js +0 -6
- package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_setToArray.js +0 -9
- package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_setToString.js +0 -6
- package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_shortOut.js +0 -14
- package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_shuffleSelf.js +0 -12
- package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_stackClear.js +0 -7
- package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_stackDelete.js +0 -7
- package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_stackGet.js +0 -6
- package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_stackHas.js +0 -6
- package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_stackSet.js +0 -16
- package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_strictIndexOf.js +0 -7
- package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_stringToPath.js +0 -10
- package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_toKey.js +0 -10
- package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_toSource.js +0 -15
- package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/assign.js +0 -16
- package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/cloneDeep.js +0 -8
- package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/compact.js +0 -10
- package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/constant.js +0 -8
- package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/defaults.js +0 -16
- package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/difference.js +0 -10
- package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/differenceWith.js +0 -12
- package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/eq.js +0 -6
- package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/every.js +0 -12
- package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/get.js +0 -8
- package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/hasIn.js +0 -8
- package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/identity.js +0 -6
- package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/isArguments.js +0 -10
- package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/isArray.js +0 -4
- package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/isArrayLike.js +0 -8
- package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/isArrayLikeObject.js +0 -8
- package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/isBuffer.js +0 -6
- package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/isEmpty.js +0 -21
- package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/isEqual.js +0 -7
- package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/isFunction.js +0 -11
- package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/isLength.js +0 -7
- package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/isMap.js +0 -7
- package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/isObject.js +0 -7
- package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/isObjectLike.js +0 -6
- package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/isSet.js +0 -7
- package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/isSymbol.js +0 -9
- package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/isTypedArray.js +0 -7
- package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/keys.js +0 -9
- package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/keysIn.js +0 -9
- package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/last.js +0 -7
- package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/map.js +0 -10
- package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/memoize.js +0 -16
- package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/noop.js +0 -4
- package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/property.js +0 -10
- package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/reduce.js +0 -12
- package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/shuffle.js +0 -9
- package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/stubArray.js +0 -6
- package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/stubFalse.js +0 -6
- package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/toString.js +0 -7
- package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/uniq.js +0 -7
- package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/uniqueId.js +0 -9
- package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/values.js +0 -8
|
@@ -1,189 +1,5 @@
|
|
|
1
|
-
import { B as e, C as t, D as n, F as r, J as i, N as a, O as o, S as s, T as c, W as l, X as u, Y as d, Z as f, a as p, l as m, o as h, s as g, u as _, w as v, y, z as b } from "./browser-CvJkn_Ec.js";
|
|
2
|
-
//#region ../../../node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_baseFindIndex.js
|
|
3
|
-
function x(e, t, n, r) {
|
|
4
|
-
for (var i = e.length, a = n + (r ? 1 : -1); r ? a-- : ++a < i;) if (t(e[a], a, e)) return a;
|
|
5
|
-
return -1;
|
|
6
|
-
}
|
|
7
|
-
//#endregion
|
|
8
|
-
//#region ../../../node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_baseIsNaN.js
|
|
9
|
-
function ee(e) {
|
|
10
|
-
return e !== e;
|
|
11
|
-
}
|
|
12
|
-
//#endregion
|
|
13
|
-
//#region ../../../node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_strictIndexOf.js
|
|
14
|
-
function S(e, t, n) {
|
|
15
|
-
for (var r = n - 1, i = e.length; ++r < i;) if (e[r] === t) return r;
|
|
16
|
-
return -1;
|
|
17
|
-
}
|
|
18
|
-
//#endregion
|
|
19
|
-
//#region ../../../node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_baseIndexOf.js
|
|
20
|
-
function C(e, t, n) {
|
|
21
|
-
return t === t ? S(e, t, n) : x(e, ee, n);
|
|
22
|
-
}
|
|
23
|
-
//#endregion
|
|
24
|
-
//#region ../../../node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_arrayIncludes.js
|
|
25
|
-
function w(e, t) {
|
|
26
|
-
return !!(e != null && e.length) && C(e, t, 0) > -1;
|
|
27
|
-
}
|
|
28
|
-
//#endregion
|
|
29
|
-
//#region ../../../node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_baseIsMatch.js
|
|
30
|
-
var T = 1, te = 2;
|
|
31
|
-
function E(e, t, n, r) {
|
|
32
|
-
var i = n.length, a = i, o = !r;
|
|
33
|
-
if (e == null) return !a;
|
|
34
|
-
for (e = Object(e); i--;) {
|
|
35
|
-
var s = n[i];
|
|
36
|
-
if (o && s[2] ? s[1] !== e[s[0]] : !(s[0] in e)) return !1;
|
|
37
|
-
}
|
|
38
|
-
for (; ++i < a;) {
|
|
39
|
-
s = n[i];
|
|
40
|
-
var c = s[0], l = e[c], u = s[1];
|
|
41
|
-
if (o && s[2]) {
|
|
42
|
-
if (l === void 0 && !(c in e)) return !1;
|
|
43
|
-
} else {
|
|
44
|
-
var d = new y();
|
|
45
|
-
if (r) var f = r(l, u, c, e, t, d);
|
|
46
|
-
if (!(f === void 0 ? g(u, l, T | te, r, d) : f)) return !1;
|
|
47
|
-
}
|
|
48
|
-
}
|
|
49
|
-
return !0;
|
|
50
|
-
}
|
|
51
|
-
//#endregion
|
|
52
|
-
//#region ../../../node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_isStrictComparable.js
|
|
53
|
-
function D(e) {
|
|
54
|
-
return e === e && !d(e);
|
|
55
|
-
}
|
|
56
|
-
//#endregion
|
|
57
|
-
//#region ../../../node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_getMatchData.js
|
|
58
|
-
function ne(e) {
|
|
59
|
-
for (var t = o(e), n = t.length; n--;) {
|
|
60
|
-
var r = t[n], i = e[r];
|
|
61
|
-
t[n] = [
|
|
62
|
-
r,
|
|
63
|
-
i,
|
|
64
|
-
D(i)
|
|
65
|
-
];
|
|
66
|
-
}
|
|
67
|
-
return t;
|
|
68
|
-
}
|
|
69
|
-
//#endregion
|
|
70
|
-
//#region ../../../node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_matchesStrictComparable.js
|
|
71
|
-
function O(e, t) {
|
|
72
|
-
return function(n) {
|
|
73
|
-
return n == null ? !1 : n[e] === t && (t !== void 0 || e in Object(n));
|
|
74
|
-
};
|
|
75
|
-
}
|
|
76
|
-
//#endregion
|
|
77
|
-
//#region ../../../node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_baseMatches.js
|
|
78
|
-
function re(e) {
|
|
79
|
-
var t = ne(e);
|
|
80
|
-
return t.length == 1 && t[0][2] ? O(t[0][0], t[0][1]) : function(n) {
|
|
81
|
-
return n === e || E(n, e, t);
|
|
82
|
-
};
|
|
83
|
-
}
|
|
84
|
-
//#endregion
|
|
85
|
-
//#region ../../../node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_baseHasIn.js
|
|
86
|
-
function ie(e, t) {
|
|
87
|
-
return e != null && t in Object(e);
|
|
88
|
-
}
|
|
89
|
-
//#endregion
|
|
90
|
-
//#region ../../../node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_hasPath.js
|
|
91
|
-
function ae(t, n, i) {
|
|
92
|
-
n = c(n, t);
|
|
93
|
-
for (var a = -1, o = n.length, s = !1; ++a < o;) {
|
|
94
|
-
var d = v(n[a]);
|
|
95
|
-
if (!(s = t != null && i(t, d))) break;
|
|
96
|
-
t = t[d];
|
|
97
|
-
}
|
|
98
|
-
return s || ++a != o ? s : (o = t == null ? 0 : t.length, !!o && e(o) && l(d, o) && (u(t) || r(t)));
|
|
99
|
-
}
|
|
100
|
-
//#endregion
|
|
101
|
-
//#region ../../../node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/hasIn.js
|
|
102
|
-
function oe(e, t) {
|
|
103
|
-
return e != null && ae(e, t, ie);
|
|
104
|
-
}
|
|
105
|
-
//#endregion
|
|
106
|
-
//#region ../../../node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_baseMatchesProperty.js
|
|
107
|
-
var se = 1, ce = 2;
|
|
108
|
-
function le(e, t) {
|
|
109
|
-
return n(e) && D(t) ? O(v(e), t) : function(n) {
|
|
110
|
-
var r = s(n, e);
|
|
111
|
-
return r === void 0 && r === t ? oe(n, e) : g(t, r, se | ce);
|
|
112
|
-
};
|
|
113
|
-
}
|
|
114
|
-
//#endregion
|
|
115
|
-
//#region ../../../node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_basePropertyDeep.js
|
|
116
|
-
function ue(e) {
|
|
117
|
-
return function(n) {
|
|
118
|
-
return t(n, e);
|
|
119
|
-
};
|
|
120
|
-
}
|
|
121
|
-
//#endregion
|
|
122
|
-
//#region ../../../node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/property.js
|
|
123
|
-
function de(e) {
|
|
124
|
-
return n(e) ? h(v(e)) : ue(e);
|
|
125
|
-
}
|
|
126
|
-
//#endregion
|
|
127
|
-
//#region ../../../node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_baseIteratee.js
|
|
128
|
-
function k(e) {
|
|
129
|
-
return typeof e == "function" ? e : e == null ? i : typeof e == "object" ? u(e) ? le(e[0], e[1]) : re(e) : de(e);
|
|
130
|
-
}
|
|
131
|
-
//#endregion
|
|
132
|
-
//#region ../../../node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_baseForOwn.js
|
|
133
|
-
function fe(e, t) {
|
|
134
|
-
return e && p(e, t, o);
|
|
135
|
-
}
|
|
136
|
-
//#endregion
|
|
137
|
-
//#region ../../../node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_createBaseEach.js
|
|
138
|
-
function pe(e, t) {
|
|
139
|
-
return function(n, r) {
|
|
140
|
-
if (n == null) return n;
|
|
141
|
-
if (!b(n)) return e(n, r);
|
|
142
|
-
for (var i = n.length, a = t ? i : -1, o = Object(n); (t ? a-- : ++a < i) && r(o[a], a, o) !== !1;);
|
|
143
|
-
return n;
|
|
144
|
-
};
|
|
145
|
-
}
|
|
146
|
-
//#endregion
|
|
147
|
-
//#region ../../../node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_baseEach.js
|
|
148
|
-
var me = pe(fe);
|
|
149
|
-
//#endregion
|
|
150
|
-
//#region ../../../node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_arrayIncludesWith.js
|
|
151
|
-
function A(e, t, n) {
|
|
152
|
-
for (var r = -1, i = e == null ? 0 : e.length; ++r < i;) if (n(t, e[r])) return !0;
|
|
153
|
-
return !1;
|
|
154
|
-
}
|
|
155
|
-
//#endregion
|
|
156
|
-
//#region ../../../node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_baseDifference.js
|
|
157
|
-
var he = 200;
|
|
158
|
-
function ge(e, t, n, r) {
|
|
159
|
-
var i = -1, o = w, s = !0, c = e.length, l = [], u = t.length;
|
|
160
|
-
if (!c) return l;
|
|
161
|
-
n && (t = f(t, a(n))), r ? (o = A, s = !1) : t.length >= he && (o = m, s = !1, t = new _(t));
|
|
162
|
-
outer: for (; ++i < c;) {
|
|
163
|
-
var d = e[i], p = n == null ? d : n(d);
|
|
164
|
-
if (d = r || d !== 0 ? d : 0, s && p === p) {
|
|
165
|
-
for (var h = u; h--;) if (t[h] === p) continue outer;
|
|
166
|
-
l.push(d);
|
|
167
|
-
} else o(t, p, r) || l.push(d);
|
|
168
|
-
}
|
|
169
|
-
return l;
|
|
170
|
-
}
|
|
171
|
-
//#endregion
|
|
172
|
-
//#region ../../../node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_baseMap.js
|
|
173
|
-
function _e(e, t) {
|
|
174
|
-
var n = -1, r = b(e) ? Array(e.length) : [];
|
|
175
|
-
return me(e, function(e, i, a) {
|
|
176
|
-
r[++n] = t(e, i, a);
|
|
177
|
-
}), r;
|
|
178
|
-
}
|
|
179
|
-
//#endregion
|
|
180
|
-
//#region ../../../node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/map.js
|
|
181
|
-
function ve(e, t) {
|
|
182
|
-
return (u(e) ? f : _e)(e, k(t, 3));
|
|
183
|
-
}
|
|
184
|
-
//#endregion
|
|
185
1
|
//#region ../../lib-react/translator/dist/en.js
|
|
186
|
-
var
|
|
2
|
+
var e = {
|
|
187
3
|
translation: {
|
|
188
4
|
categorize: {
|
|
189
5
|
limitMaxChoicesPerCategory: "You've reached the limit of {{maxChoicesPerCategory}} responses per area. To add another response, one must first be removed.",
|
|
@@ -272,7 +88,7 @@ var ye = {
|
|
|
272
88
|
hideNote: "Hide Note",
|
|
273
89
|
cancel: "Cancel"
|
|
274
90
|
}
|
|
275
|
-
},
|
|
91
|
+
}, t = {
|
|
276
92
|
translation: {
|
|
277
93
|
categorize: {
|
|
278
94
|
limitMaxChoicesPerCategory: "Has alcanzado el límite de {{maxChoicesPerCategory}} respuestas por área. Para agregar otra respuesta, primero se debe eliminar una respuesta.",
|
|
@@ -361,55 +177,55 @@ var ye = {
|
|
|
361
177
|
hideNote: "Ocultar Nota",
|
|
362
178
|
cancel: "Cancelar"
|
|
363
179
|
}
|
|
364
|
-
},
|
|
180
|
+
}, n = (e) => typeof e == "string", r = () => {
|
|
365
181
|
let e, t, n = new Promise((n, r) => {
|
|
366
182
|
e = n, t = r;
|
|
367
183
|
});
|
|
368
184
|
return n.resolve = e, n.reject = t, n;
|
|
369
|
-
},
|
|
185
|
+
}, i = (e) => e == null ? "" : "" + e, a = (e, t, n) => {
|
|
370
186
|
e.forEach((e) => {
|
|
371
187
|
t[e] && (n[e] = t[e]);
|
|
372
188
|
});
|
|
373
|
-
},
|
|
374
|
-
let
|
|
375
|
-
for (;
|
|
376
|
-
if (
|
|
377
|
-
let t =
|
|
378
|
-
!e[t] &&
|
|
379
|
-
}
|
|
380
|
-
return
|
|
189
|
+
}, o = /###/g, s = (e) => e && e.indexOf("###") > -1 ? e.replace(o, ".") : e, c = (e) => !e || n(e), l = (e, t, r) => {
|
|
190
|
+
let i = n(t) ? t.split(".") : t, a = 0;
|
|
191
|
+
for (; a < i.length - 1;) {
|
|
192
|
+
if (c(e)) return {};
|
|
193
|
+
let t = s(i[a]);
|
|
194
|
+
!e[t] && r && (e[t] = new r()), e = Object.prototype.hasOwnProperty.call(e, t) ? e[t] : {}, ++a;
|
|
195
|
+
}
|
|
196
|
+
return c(e) ? {} : {
|
|
381
197
|
obj: e,
|
|
382
|
-
k:
|
|
198
|
+
k: s(i[a])
|
|
383
199
|
};
|
|
384
|
-
},
|
|
385
|
-
let { obj: r, k: i } =
|
|
200
|
+
}, u = (e, t, n) => {
|
|
201
|
+
let { obj: r, k: i } = l(e, t, Object);
|
|
386
202
|
if (r !== void 0 || t.length === 1) {
|
|
387
203
|
r[i] = n;
|
|
388
204
|
return;
|
|
389
205
|
}
|
|
390
|
-
let a = t[t.length - 1], o = t.slice(0, t.length - 1), s =
|
|
391
|
-
for (; s.obj === void 0 && o.length;) a = `${o[o.length - 1]}.${a}`, o = o.slice(0, o.length - 1), s =
|
|
206
|
+
let a = t[t.length - 1], o = t.slice(0, t.length - 1), s = l(e, o, Object);
|
|
207
|
+
for (; s.obj === void 0 && o.length;) a = `${o[o.length - 1]}.${a}`, o = o.slice(0, o.length - 1), s = l(e, o, Object), s?.obj && s.obj[`${s.k}.${a}`] !== void 0 && (s.obj = void 0);
|
|
392
208
|
s.obj[`${s.k}.${a}`] = n;
|
|
393
|
-
},
|
|
394
|
-
let { obj: i, k: a } =
|
|
209
|
+
}, d = (e, t, n, r) => {
|
|
210
|
+
let { obj: i, k: a } = l(e, t, Object);
|
|
395
211
|
i[a] = i[a] || [], i[a].push(n);
|
|
396
|
-
},
|
|
397
|
-
let { obj: n, k: r } =
|
|
212
|
+
}, f = (e, t) => {
|
|
213
|
+
let { obj: n, k: r } = l(e, t);
|
|
398
214
|
if (n && Object.prototype.hasOwnProperty.call(n, r)) return n[r];
|
|
399
|
-
},
|
|
400
|
-
let r =
|
|
401
|
-
return r === void 0 ?
|
|
402
|
-
},
|
|
403
|
-
for (let
|
|
215
|
+
}, p = (e, t, n) => {
|
|
216
|
+
let r = f(e, n);
|
|
217
|
+
return r === void 0 ? f(t, n) : r;
|
|
218
|
+
}, m = (e, t, r) => {
|
|
219
|
+
for (let i in t) i !== "__proto__" && i !== "constructor" && (i in e ? n(e[i]) || e[i] instanceof String || n(t[i]) || t[i] instanceof String ? r && (e[i] = t[i]) : m(e[i], t[i], r) : e[i] = t[i]);
|
|
404
220
|
return e;
|
|
405
|
-
},
|
|
221
|
+
}, h = (e) => e.replace(/[\-\[\]\/\{\}\(\)\*\+\?\.\\\^\$\|]/g, "\\$&"), g = {
|
|
406
222
|
"&": "&",
|
|
407
223
|
"<": "<",
|
|
408
224
|
">": ">",
|
|
409
225
|
"\"": """,
|
|
410
226
|
"'": "'",
|
|
411
227
|
"/": "/"
|
|
412
|
-
},
|
|
228
|
+
}, _ = (e) => n(e) ? e.replace(/[&<>"'\/]/g, (e) => g[e]) : e, v = class {
|
|
413
229
|
constructor(e) {
|
|
414
230
|
this.capacity = e, this.regExpMap = /* @__PURE__ */ new Map(), this.regExpQueue = [];
|
|
415
231
|
}
|
|
@@ -419,23 +235,23 @@ var ye = {
|
|
|
419
235
|
let n = new RegExp(e);
|
|
420
236
|
return this.regExpQueue.length === this.capacity && this.regExpMap.delete(this.regExpQueue.shift()), this.regExpMap.set(e, n), this.regExpQueue.push(e), n;
|
|
421
237
|
}
|
|
422
|
-
},
|
|
238
|
+
}, y = [
|
|
423
239
|
" ",
|
|
424
240
|
",",
|
|
425
241
|
"?",
|
|
426
242
|
"!",
|
|
427
243
|
";"
|
|
428
|
-
],
|
|
244
|
+
], b = new v(20), x = (e, t, n) => {
|
|
429
245
|
t ||= "", n ||= "";
|
|
430
|
-
let r =
|
|
246
|
+
let r = y.filter((e) => t.indexOf(e) < 0 && n.indexOf(e) < 0);
|
|
431
247
|
if (r.length === 0) return !0;
|
|
432
|
-
let i =
|
|
248
|
+
let i = b.getRegExp(`(${r.map((e) => e === "?" ? "\\?" : e).join("|")})`), a = !i.test(e);
|
|
433
249
|
if (!a) {
|
|
434
250
|
let t = e.indexOf(n);
|
|
435
251
|
t > 0 && !i.test(e.substring(0, t)) && (a = !0);
|
|
436
252
|
}
|
|
437
253
|
return a;
|
|
438
|
-
},
|
|
254
|
+
}, S = (e, t, n = ".") => {
|
|
439
255
|
if (!e) return;
|
|
440
256
|
if (e[t]) return Object.prototype.hasOwnProperty.call(e, t) ? e[t] : void 0;
|
|
441
257
|
let r = t.split(n), i = e;
|
|
@@ -454,7 +270,7 @@ var ye = {
|
|
|
454
270
|
i = t;
|
|
455
271
|
}
|
|
456
272
|
return i;
|
|
457
|
-
},
|
|
273
|
+
}, C = (e) => e?.replace(/_/g, "-"), w = {
|
|
458
274
|
type: "logger",
|
|
459
275
|
log(e) {
|
|
460
276
|
this.output("log", e);
|
|
@@ -468,12 +284,12 @@ var ye = {
|
|
|
468
284
|
output(e, t) {
|
|
469
285
|
console?.[e]?.apply?.(console, t);
|
|
470
286
|
}
|
|
471
|
-
},
|
|
287
|
+
}, T = new class e {
|
|
472
288
|
constructor(e, t = {}) {
|
|
473
289
|
this.init(e, t);
|
|
474
290
|
}
|
|
475
291
|
init(e, t = {}) {
|
|
476
|
-
this.prefix = t.prefix || "i18next:", this.logger = e ||
|
|
292
|
+
this.prefix = t.prefix || "i18next:", this.logger = e || w, this.options = t, this.debug = t.debug;
|
|
477
293
|
}
|
|
478
294
|
log(...e) {
|
|
479
295
|
return this.forward(e, "log", "", !0);
|
|
@@ -487,8 +303,8 @@ var ye = {
|
|
|
487
303
|
deprecate(...e) {
|
|
488
304
|
return this.forward(e, "warn", "WARNING DEPRECATED: ", !0);
|
|
489
305
|
}
|
|
490
|
-
forward(e, t,
|
|
491
|
-
return
|
|
306
|
+
forward(e, t, r, i) {
|
|
307
|
+
return i && !this.debug ? null : (n(e[0]) && (e[0] = `${r}${this.prefix} ${e[0]}`), this.logger[t](e));
|
|
492
308
|
}
|
|
493
309
|
create(t) {
|
|
494
310
|
return new e(this.logger, {
|
|
@@ -499,7 +315,7 @@ var ye = {
|
|
|
499
315
|
clone(t) {
|
|
500
316
|
return t ||= this.options, t.prefix = t.prefix || this.prefix, new e(this.logger, t);
|
|
501
317
|
}
|
|
502
|
-
}(),
|
|
318
|
+
}(), E = class {
|
|
503
319
|
constructor() {
|
|
504
320
|
this.observers = {};
|
|
505
321
|
}
|
|
@@ -526,7 +342,7 @@ var ye = {
|
|
|
526
342
|
for (let i = 0; i < r; i++) n.apply(n, [e, ...t]);
|
|
527
343
|
});
|
|
528
344
|
}
|
|
529
|
-
},
|
|
345
|
+
}, D = class extends E {
|
|
530
346
|
constructor(e, t = {
|
|
531
347
|
ns: ["translation"],
|
|
532
348
|
defaultNS: "translation"
|
|
@@ -540,19 +356,19 @@ var ye = {
|
|
|
540
356
|
let t = this.options.ns.indexOf(e);
|
|
541
357
|
t > -1 && this.options.ns.splice(t, 1);
|
|
542
358
|
}
|
|
543
|
-
getResource(e, t,
|
|
544
|
-
let
|
|
545
|
-
e.indexOf(".") > -1 ?
|
|
546
|
-
let
|
|
547
|
-
return !
|
|
359
|
+
getResource(e, t, r, i = {}) {
|
|
360
|
+
let a = i.keySeparator === void 0 ? this.options.keySeparator : i.keySeparator, o = i.ignoreJSONStructure === void 0 ? this.options.ignoreJSONStructure : i.ignoreJSONStructure, s;
|
|
361
|
+
e.indexOf(".") > -1 ? s = e.split(".") : (s = [e, t], r && (Array.isArray(r) ? s.push(...r) : n(r) && a ? s.push(...r.split(a)) : s.push(r)));
|
|
362
|
+
let c = f(this.data, s);
|
|
363
|
+
return !c && !t && !r && e.indexOf(".") > -1 && (e = s[0], t = s[1], r = s.slice(2).join(".")), c || !o || !n(r) ? c : S(this.data?.[e]?.[t], r, a);
|
|
548
364
|
}
|
|
549
365
|
addResource(e, t, n, r, i = { silent: !1 }) {
|
|
550
366
|
let a = i.keySeparator === void 0 ? this.options.keySeparator : i.keySeparator, o = [e, t];
|
|
551
|
-
n && (o = o.concat(a ? n.split(a) : n)), e.indexOf(".") > -1 && (o = e.split("."), r = t, t = o[1]), this.addNamespaces(t),
|
|
367
|
+
n && (o = o.concat(a ? n.split(a) : n)), e.indexOf(".") > -1 && (o = e.split("."), r = t, t = o[1]), this.addNamespaces(t), u(this.data, o, r), i.silent || this.emit("added", e, t, n, r);
|
|
552
368
|
}
|
|
553
|
-
addResources(e, t,
|
|
554
|
-
for (let
|
|
555
|
-
|
|
369
|
+
addResources(e, t, r, i = { silent: !1 }) {
|
|
370
|
+
for (let i in r) (n(r[i]) || Array.isArray(r[i])) && this.addResource(e, t, i, r[i], { silent: !0 });
|
|
371
|
+
i.silent || this.emit("added", e, t, r);
|
|
556
372
|
}
|
|
557
373
|
addResourceBundle(e, t, n, r, i, a = {
|
|
558
374
|
silent: !1,
|
|
@@ -560,11 +376,11 @@ var ye = {
|
|
|
560
376
|
}) {
|
|
561
377
|
let o = [e, t];
|
|
562
378
|
e.indexOf(".") > -1 && (o = e.split("."), r = n, n = t, t = o[1]), this.addNamespaces(t);
|
|
563
|
-
let s =
|
|
564
|
-
a.skipCopy || (n = JSON.parse(JSON.stringify(n))), r ?
|
|
379
|
+
let s = f(this.data, o) || {};
|
|
380
|
+
a.skipCopy || (n = JSON.parse(JSON.stringify(n))), r ? m(s, n, i) : s = {
|
|
565
381
|
...s,
|
|
566
382
|
...n
|
|
567
|
-
},
|
|
383
|
+
}, u(this.data, o, s), a.silent || this.emit("added", e, t, n);
|
|
568
384
|
}
|
|
569
385
|
removeResourceBundle(e, t) {
|
|
570
386
|
this.hasResourceBundle(e, t) && delete this.data[e][t], this.removeNamespaces(t), this.emit("removed", e, t);
|
|
@@ -585,7 +401,7 @@ var ye = {
|
|
|
585
401
|
toJSON() {
|
|
586
402
|
return this.data;
|
|
587
403
|
}
|
|
588
|
-
},
|
|
404
|
+
}, O = {
|
|
589
405
|
processors: {},
|
|
590
406
|
addPostProcessor(e) {
|
|
591
407
|
this.processors[e.name] = e;
|
|
@@ -595,22 +411,22 @@ var ye = {
|
|
|
595
411
|
t = this.processors[e]?.process(t, n, r, i) ?? t;
|
|
596
412
|
}), t;
|
|
597
413
|
}
|
|
598
|
-
},
|
|
599
|
-
function
|
|
414
|
+
}, k = Symbol("i18next/PATH_KEY");
|
|
415
|
+
function A() {
|
|
600
416
|
let e = [], t = Object.create(null), n;
|
|
601
|
-
return t.get = (r, i) => (n?.revoke?.(), i ===
|
|
417
|
+
return t.get = (r, i) => (n?.revoke?.(), i === k ? e : (e.push(i), n = Proxy.revocable(r, t), n.proxy)), Proxy.revocable(Object.create(null), t).proxy;
|
|
602
418
|
}
|
|
603
|
-
function
|
|
604
|
-
let { [
|
|
419
|
+
function j(e, t) {
|
|
420
|
+
let { [k]: n } = e(A()), r = t?.keySeparator ?? ".", i = t?.nsSeparator ?? ":";
|
|
605
421
|
if (n.length > 1 && i) {
|
|
606
422
|
let e = t?.ns, a = Array.isArray(e) ? e : null;
|
|
607
423
|
if (a && a.length > 1 && a.slice(1).includes(n[0])) return `${n[0]}${i}${n.slice(1).join(r)}`;
|
|
608
424
|
}
|
|
609
425
|
return n.join(r);
|
|
610
426
|
}
|
|
611
|
-
var
|
|
427
|
+
var M = {}, N = (e) => !n(e) && typeof e != "boolean" && typeof e != "number", P = class e extends E {
|
|
612
428
|
constructor(e, t = {}) {
|
|
613
|
-
super(),
|
|
429
|
+
super(), a([
|
|
614
430
|
"resourceStore",
|
|
615
431
|
"languageUtils",
|
|
616
432
|
"pluralResolver",
|
|
@@ -618,7 +434,7 @@ var q = {}, J = (e) => !j(e) && typeof e != "boolean" && typeof e != "number", Y
|
|
|
618
434
|
"backendConnector",
|
|
619
435
|
"i18nFormat",
|
|
620
436
|
"utils"
|
|
621
|
-
], e, this), this.options = t, this.options.keySeparator === void 0 && (this.options.keySeparator = "."), this.logger =
|
|
437
|
+
], e, this), this.options = t, this.options.keySeparator === void 0 && (this.options.keySeparator = "."), this.logger = T.create("translator");
|
|
622
438
|
}
|
|
623
439
|
changeLanguage(e) {
|
|
624
440
|
e && (this.language = e);
|
|
@@ -628,193 +444,193 @@ var q = {}, J = (e) => !j(e) && typeof e != "boolean" && typeof e != "number", Y
|
|
|
628
444
|
if (e == null) return !1;
|
|
629
445
|
let r = this.resolve(e, n);
|
|
630
446
|
if (r?.res === void 0) return !1;
|
|
631
|
-
let i =
|
|
447
|
+
let i = N(r.res);
|
|
632
448
|
return !(n.returnObjects === !1 && i);
|
|
633
449
|
}
|
|
634
450
|
extractFromKey(e, t) {
|
|
635
|
-
let
|
|
636
|
-
|
|
637
|
-
let
|
|
638
|
-
if (
|
|
451
|
+
let r = t.nsSeparator === void 0 ? this.options.nsSeparator : t.nsSeparator;
|
|
452
|
+
r === void 0 && (r = ":");
|
|
453
|
+
let i = t.keySeparator === void 0 ? this.options.keySeparator : t.keySeparator, a = t.ns || this.options.defaultNS || [], o = r && e.indexOf(r) > -1, s = !this.options.userDefinedKeySeparator && !t.keySeparator && !this.options.userDefinedNsSeparator && !t.nsSeparator && !x(e, r, i);
|
|
454
|
+
if (o && !s) {
|
|
639
455
|
let t = e.match(this.interpolator.nestingRegexp);
|
|
640
456
|
if (t && t.length > 0) return {
|
|
641
457
|
key: e,
|
|
642
|
-
namespaces:
|
|
458
|
+
namespaces: n(a) ? [a] : a
|
|
643
459
|
};
|
|
644
|
-
let
|
|
645
|
-
(
|
|
460
|
+
let o = e.split(r);
|
|
461
|
+
(r !== i || r === i && this.options.ns.indexOf(o[0]) > -1) && (a = o.shift()), e = o.join(i);
|
|
646
462
|
}
|
|
647
463
|
return {
|
|
648
464
|
key: e,
|
|
649
|
-
namespaces:
|
|
465
|
+
namespaces: n(a) ? [a] : a
|
|
650
466
|
};
|
|
651
467
|
}
|
|
652
|
-
translate(t,
|
|
653
|
-
let
|
|
654
|
-
if (typeof
|
|
655
|
-
typeof t == "function" && (t =
|
|
468
|
+
translate(t, r, i) {
|
|
469
|
+
let a = typeof r == "object" ? { ...r } : r;
|
|
470
|
+
if (typeof a != "object" && this.options.overloadTranslationOptionHandler && (a = this.options.overloadTranslationOptionHandler(arguments)), typeof a == "object" && (a = { ...a }), a ||= {}, t == null) return "";
|
|
471
|
+
typeof t == "function" && (t = j(t, {
|
|
656
472
|
...this.options,
|
|
657
|
-
...
|
|
658
|
-
})), Array.isArray(t) || (t = [String(t)]), t = t.map((e) => typeof e == "function" ?
|
|
473
|
+
...a
|
|
474
|
+
})), Array.isArray(t) || (t = [String(t)]), t = t.map((e) => typeof e == "function" ? j(e, {
|
|
659
475
|
...this.options,
|
|
660
|
-
...
|
|
476
|
+
...a
|
|
661
477
|
}) : String(e));
|
|
662
|
-
let
|
|
663
|
-
|
|
664
|
-
let
|
|
665
|
-
if (
|
|
666
|
-
res: `${
|
|
667
|
-
usedKey:
|
|
668
|
-
exactUsedKey:
|
|
669
|
-
usedLng:
|
|
670
|
-
usedNS:
|
|
671
|
-
usedParams: this.getUsedParamsDetails(
|
|
672
|
-
} : `${
|
|
673
|
-
res:
|
|
674
|
-
usedKey:
|
|
675
|
-
exactUsedKey:
|
|
676
|
-
usedLng:
|
|
677
|
-
usedNS:
|
|
678
|
-
usedParams: this.getUsedParamsDetails(
|
|
679
|
-
} :
|
|
680
|
-
let
|
|
478
|
+
let o = a.returnDetails === void 0 ? this.options.returnDetails : a.returnDetails, s = a.keySeparator === void 0 ? this.options.keySeparator : a.keySeparator, { key: c, namespaces: l } = this.extractFromKey(t[t.length - 1], a), u = l[l.length - 1], d = a.nsSeparator === void 0 ? this.options.nsSeparator : a.nsSeparator;
|
|
479
|
+
d === void 0 && (d = ":");
|
|
480
|
+
let f = a.lng || this.language, p = a.appendNamespaceToCIMode || this.options.appendNamespaceToCIMode;
|
|
481
|
+
if (f?.toLowerCase() === "cimode") return p ? o ? {
|
|
482
|
+
res: `${u}${d}${c}`,
|
|
483
|
+
usedKey: c,
|
|
484
|
+
exactUsedKey: c,
|
|
485
|
+
usedLng: f,
|
|
486
|
+
usedNS: u,
|
|
487
|
+
usedParams: this.getUsedParamsDetails(a)
|
|
488
|
+
} : `${u}${d}${c}` : o ? {
|
|
489
|
+
res: c,
|
|
490
|
+
usedKey: c,
|
|
491
|
+
exactUsedKey: c,
|
|
492
|
+
usedLng: f,
|
|
493
|
+
usedNS: u,
|
|
494
|
+
usedParams: this.getUsedParamsDetails(a)
|
|
495
|
+
} : c;
|
|
496
|
+
let m = this.resolve(t, a), h = m?.res, g = m?.usedKey || c, _ = m?.exactUsedKey || c, v = [
|
|
681
497
|
"[object Number]",
|
|
682
498
|
"[object Function]",
|
|
683
499
|
"[object RegExp]"
|
|
684
|
-
],
|
|
685
|
-
|
|
686
|
-
let
|
|
687
|
-
if (
|
|
688
|
-
if (!
|
|
500
|
+
], y = a.joinArrays === void 0 ? this.options.joinArrays : a.joinArrays, b = !this.i18nFormat || this.i18nFormat.handleAsObject, x = a.count !== void 0 && !n(a.count), S = e.hasDefaultValue(a), C = x ? this.pluralResolver.getSuffix(f, a.count, a) : "", w = a.ordinal && x ? this.pluralResolver.getSuffix(f, a.count, { ordinal: !1 }) : "", T = x && !a.ordinal && a.count === 0, E = T && a[`defaultValue${this.options.pluralSeparator}zero`] || a[`defaultValue${C}`] || a[`defaultValue${w}`] || a.defaultValue, D = h;
|
|
501
|
+
b && !h && S && (D = E);
|
|
502
|
+
let O = N(D), k = Object.prototype.toString.apply(D);
|
|
503
|
+
if (b && D && O && v.indexOf(k) < 0 && !(n(y) && Array.isArray(D))) {
|
|
504
|
+
if (!a.returnObjects && !this.options.returnObjects) {
|
|
689
505
|
this.options.returnedObjectHandler || this.logger.warn("accessing an object - but returnObjects options is not enabled!");
|
|
690
|
-
let e = this.options.returnedObjectHandler ? this.options.returnedObjectHandler(
|
|
691
|
-
...
|
|
692
|
-
ns:
|
|
693
|
-
}) : `key '${
|
|
694
|
-
return
|
|
506
|
+
let e = this.options.returnedObjectHandler ? this.options.returnedObjectHandler(g, D, {
|
|
507
|
+
...a,
|
|
508
|
+
ns: l
|
|
509
|
+
}) : `key '${c} (${this.language})' returned an object instead of string.`;
|
|
510
|
+
return o ? (m.res = e, m.usedParams = this.getUsedParamsDetails(a), m) : e;
|
|
695
511
|
}
|
|
696
|
-
if (
|
|
697
|
-
let e = Array.isArray(
|
|
698
|
-
for (let e in
|
|
699
|
-
let r = `${n}${
|
|
700
|
-
|
|
701
|
-
...
|
|
702
|
-
defaultValue:
|
|
512
|
+
if (s) {
|
|
513
|
+
let e = Array.isArray(D), t = e ? [] : {}, n = e ? _ : g;
|
|
514
|
+
for (let e in D) if (Object.prototype.hasOwnProperty.call(D, e)) {
|
|
515
|
+
let r = `${n}${s}${e}`;
|
|
516
|
+
S && !h ? t[e] = this.translate(r, {
|
|
517
|
+
...a,
|
|
518
|
+
defaultValue: N(E) ? E[e] : void 0,
|
|
703
519
|
joinArrays: !1,
|
|
704
|
-
ns:
|
|
520
|
+
ns: l
|
|
705
521
|
}) : t[e] = this.translate(r, {
|
|
706
|
-
...
|
|
522
|
+
...a,
|
|
707
523
|
joinArrays: !1,
|
|
708
|
-
ns:
|
|
709
|
-
}), t[e] === r && (t[e] =
|
|
524
|
+
ns: l
|
|
525
|
+
}), t[e] === r && (t[e] = D[e]);
|
|
710
526
|
}
|
|
711
|
-
|
|
527
|
+
h = t;
|
|
712
528
|
}
|
|
713
|
-
} else if (
|
|
529
|
+
} else if (b && n(y) && Array.isArray(h)) h = h.join(y), h &&= this.extendTranslation(h, t, a, i);
|
|
714
530
|
else {
|
|
715
531
|
let e = !1, n = !1;
|
|
716
|
-
!this.isValidLookup(
|
|
717
|
-
let
|
|
718
|
-
if (n || e ||
|
|
719
|
-
if (this.logger.log(
|
|
720
|
-
let e = this.resolve(
|
|
721
|
-
...
|
|
532
|
+
!this.isValidLookup(h) && S && (e = !0, h = E), this.isValidLookup(h) || (n = !0, h = c);
|
|
533
|
+
let r = (a.missingKeyNoValueFallbackToKey || this.options.missingKeyNoValueFallbackToKey) && n ? void 0 : h, o = S && E !== h && this.options.updateMissing;
|
|
534
|
+
if (n || e || o) {
|
|
535
|
+
if (this.logger.log(o ? "updateKey" : "missingKey", f, u, c, o ? E : h), s) {
|
|
536
|
+
let e = this.resolve(c, {
|
|
537
|
+
...a,
|
|
722
538
|
keySeparator: !1
|
|
723
539
|
});
|
|
724
540
|
e && e.res && this.logger.warn("Seems the loaded translations were in flat JSON format instead of nested. Either set keySeparator: false on init or make sure your translations are published in nested format.");
|
|
725
541
|
}
|
|
726
|
-
let e = [], t = this.languageUtils.getFallbackCodes(this.options.fallbackLng,
|
|
542
|
+
let e = [], t = this.languageUtils.getFallbackCodes(this.options.fallbackLng, a.lng || this.language);
|
|
727
543
|
if (this.options.saveMissingTo === "fallback" && t && t[0]) for (let n = 0; n < t.length; n++) e.push(t[n]);
|
|
728
|
-
else this.options.saveMissingTo === "all" ? e = this.languageUtils.toResolveHierarchy(
|
|
544
|
+
else this.options.saveMissingTo === "all" ? e = this.languageUtils.toResolveHierarchy(a.lng || this.language) : e.push(a.lng || this.language);
|
|
729
545
|
let n = (e, t, n) => {
|
|
730
|
-
let
|
|
731
|
-
this.options.missingKeyHandler ? this.options.missingKeyHandler(e,
|
|
546
|
+
let i = S && n !== h ? n : r;
|
|
547
|
+
this.options.missingKeyHandler ? this.options.missingKeyHandler(e, u, t, i, o, a) : this.backendConnector?.saveMissing && this.backendConnector.saveMissing(e, u, t, i, o, a), this.emit("missingKey", e, u, t, h);
|
|
732
548
|
};
|
|
733
|
-
this.options.saveMissing && (this.options.saveMissingPlurals &&
|
|
734
|
-
let t = this.pluralResolver.getSuffixes(e,
|
|
735
|
-
|
|
736
|
-
n([e],
|
|
549
|
+
this.options.saveMissing && (this.options.saveMissingPlurals && x ? e.forEach((e) => {
|
|
550
|
+
let t = this.pluralResolver.getSuffixes(e, a);
|
|
551
|
+
T && a[`defaultValue${this.options.pluralSeparator}zero`] && t.indexOf(`${this.options.pluralSeparator}zero`) < 0 && t.push(`${this.options.pluralSeparator}zero`), t.forEach((t) => {
|
|
552
|
+
n([e], c + t, a[`defaultValue${t}`] || E);
|
|
737
553
|
});
|
|
738
|
-
}) : n(e,
|
|
554
|
+
}) : n(e, c, E));
|
|
739
555
|
}
|
|
740
|
-
|
|
556
|
+
h = this.extendTranslation(h, t, a, m, i), n && h === c && this.options.appendNamespaceToMissingKey && (h = `${u}${d}${c}`), (n || e) && this.options.parseMissingKeyHandler && (h = this.options.parseMissingKeyHandler(this.options.appendNamespaceToMissingKey ? `${u}${d}${c}` : c, e ? h : void 0, a));
|
|
741
557
|
}
|
|
742
|
-
return
|
|
558
|
+
return o ? (m.res = h, m.usedParams = this.getUsedParamsDetails(a), m) : h;
|
|
743
559
|
}
|
|
744
|
-
extendTranslation(e, t,
|
|
560
|
+
extendTranslation(e, t, r, i, a) {
|
|
745
561
|
if (this.i18nFormat?.parse) e = this.i18nFormat.parse(e, {
|
|
746
562
|
...this.options.interpolation.defaultVariables,
|
|
747
|
-
...
|
|
748
|
-
},
|
|
749
|
-
else if (!
|
|
750
|
-
|
|
751
|
-
...
|
|
563
|
+
...r
|
|
564
|
+
}, r.lng || this.language || i.usedLng, i.usedNS, i.usedKey, { resolved: i });
|
|
565
|
+
else if (!r.skipInterpolation) {
|
|
566
|
+
r.interpolation && this.interpolator.init({
|
|
567
|
+
...r,
|
|
752
568
|
interpolation: {
|
|
753
569
|
...this.options.interpolation,
|
|
754
|
-
...
|
|
570
|
+
...r.interpolation
|
|
755
571
|
}
|
|
756
572
|
});
|
|
757
|
-
let
|
|
758
|
-
if (
|
|
573
|
+
let o = n(e) && (r?.interpolation?.skipOnVariables === void 0 ? this.options.interpolation.skipOnVariables : r.interpolation.skipOnVariables), s;
|
|
574
|
+
if (o) {
|
|
759
575
|
let t = e.match(this.interpolator.nestingRegexp);
|
|
760
|
-
|
|
576
|
+
s = t && t.length;
|
|
761
577
|
}
|
|
762
|
-
let
|
|
763
|
-
if (this.options.interpolation.defaultVariables && (
|
|
578
|
+
let c = r.replace && !n(r.replace) ? r.replace : r;
|
|
579
|
+
if (this.options.interpolation.defaultVariables && (c = {
|
|
764
580
|
...this.options.interpolation.defaultVariables,
|
|
765
|
-
...
|
|
766
|
-
}), e = this.interpolator.interpolate(e,
|
|
767
|
-
let t = e.match(this.interpolator.nestingRegexp),
|
|
768
|
-
|
|
581
|
+
...c
|
|
582
|
+
}), e = this.interpolator.interpolate(e, c, r.lng || this.language || i.usedLng, r), o) {
|
|
583
|
+
let t = e.match(this.interpolator.nestingRegexp), n = t && t.length;
|
|
584
|
+
s < n && (r.nest = !1);
|
|
769
585
|
}
|
|
770
|
-
!
|
|
586
|
+
!r.lng && i && i.res && (r.lng = this.language || i.usedLng), r.nest !== !1 && (e = this.interpolator.nest(e, (...e) => a?.[0] === e[0] && !r.context ? (this.logger.warn(`It seems you are nesting recursively key: ${e[0]} in key: ${t[0]}`), null) : this.translate(...e, t), r)), r.interpolation && this.interpolator.reset();
|
|
771
587
|
}
|
|
772
|
-
let
|
|
773
|
-
return e != null &&
|
|
588
|
+
let o = r.postProcess || this.options.postProcess, s = n(o) ? [o] : o;
|
|
589
|
+
return e != null && s?.length && r.applyPostProcessor !== !1 && (e = O.handle(s, e, t, this.options && this.options.postProcessPassResolved ? {
|
|
774
590
|
i18nResolved: {
|
|
775
|
-
...
|
|
776
|
-
usedParams: this.getUsedParamsDetails(
|
|
591
|
+
...i,
|
|
592
|
+
usedParams: this.getUsedParamsDetails(r)
|
|
777
593
|
},
|
|
778
|
-
...
|
|
779
|
-
} :
|
|
594
|
+
...r
|
|
595
|
+
} : r, this)), e;
|
|
780
596
|
}
|
|
781
597
|
resolve(e, t = {}) {
|
|
782
|
-
let
|
|
783
|
-
return
|
|
598
|
+
let r, i, a, o, s;
|
|
599
|
+
return n(e) && (e = [e]), Array.isArray(e) && (e = e.map((e) => typeof e == "function" ? j(e, {
|
|
784
600
|
...this.options,
|
|
785
601
|
...t
|
|
786
602
|
}) : e)), e.forEach((e) => {
|
|
787
|
-
if (this.isValidLookup(
|
|
788
|
-
let
|
|
789
|
-
|
|
790
|
-
let
|
|
791
|
-
this.options.fallbackNS && (
|
|
792
|
-
let
|
|
793
|
-
|
|
794
|
-
this.isValidLookup(
|
|
795
|
-
if (this.isValidLookup(
|
|
796
|
-
|
|
797
|
-
let
|
|
798
|
-
if (this.i18nFormat?.addLookupKeys) this.i18nFormat.addLookupKeys(
|
|
603
|
+
if (this.isValidLookup(r)) return;
|
|
604
|
+
let c = this.extractFromKey(e, t), l = c.key;
|
|
605
|
+
i = l;
|
|
606
|
+
let u = c.namespaces;
|
|
607
|
+
this.options.fallbackNS && (u = u.concat(this.options.fallbackNS));
|
|
608
|
+
let d = t.count !== void 0 && !n(t.count), f = d && !t.ordinal && t.count === 0, p = t.context !== void 0 && (n(t.context) || typeof t.context == "number") && t.context !== "", m = t.lngs ? t.lngs : this.languageUtils.toResolveHierarchy(t.lng || this.language, t.fallbackLng);
|
|
609
|
+
u.forEach((e) => {
|
|
610
|
+
this.isValidLookup(r) || (s = e, !M[`${m[0]}-${e}`] && this.utils?.hasLoadedNamespace && !this.utils?.hasLoadedNamespace(s) && (M[`${m[0]}-${e}`] = !0, this.logger.warn(`key "${i}" for languages "${m.join(", ")}" won't get resolved as namespace "${s}" was not yet loaded`, "This means something IS WRONG in your setup. You access the t function before i18next.init / i18next.loadNamespace / i18next.changeLanguage was done. Wait for the callback or Promise to resolve before accessing it!!!")), m.forEach((n) => {
|
|
611
|
+
if (this.isValidLookup(r)) return;
|
|
612
|
+
o = n;
|
|
613
|
+
let i = [l];
|
|
614
|
+
if (this.i18nFormat?.addLookupKeys) this.i18nFormat.addLookupKeys(i, l, n, e, t);
|
|
799
615
|
else {
|
|
800
616
|
let e;
|
|
801
|
-
|
|
802
|
-
let
|
|
803
|
-
if (
|
|
804
|
-
let
|
|
805
|
-
|
|
617
|
+
d && (e = this.pluralResolver.getSuffix(n, t.count, t));
|
|
618
|
+
let r = `${this.options.pluralSeparator}zero`, a = `${this.options.pluralSeparator}ordinal${this.options.pluralSeparator}`;
|
|
619
|
+
if (d && (t.ordinal && e.indexOf(a) === 0 && i.push(l + e.replace(a, this.options.pluralSeparator)), i.push(l + e), f && i.push(l + r)), p) {
|
|
620
|
+
let n = `${l}${this.options.contextSeparator || "_"}${t.context}`;
|
|
621
|
+
i.push(n), d && (t.ordinal && e.indexOf(a) === 0 && i.push(n + e.replace(a, this.options.pluralSeparator)), i.push(n + e), f && i.push(n + r));
|
|
806
622
|
}
|
|
807
623
|
}
|
|
808
624
|
let s;
|
|
809
|
-
for (; s =
|
|
625
|
+
for (; s = i.pop();) this.isValidLookup(r) || (a = s, r = this.getResource(n, e, s, t));
|
|
810
626
|
}));
|
|
811
627
|
});
|
|
812
628
|
}), {
|
|
813
|
-
res:
|
|
814
|
-
usedKey:
|
|
815
|
-
exactUsedKey:
|
|
816
|
-
usedLng:
|
|
817
|
-
usedNS:
|
|
629
|
+
res: r,
|
|
630
|
+
usedKey: i,
|
|
631
|
+
exactUsedKey: a,
|
|
632
|
+
usedLng: o,
|
|
633
|
+
usedNS: s
|
|
818
634
|
};
|
|
819
635
|
}
|
|
820
636
|
isValidLookup(e) {
|
|
@@ -840,36 +656,36 @@ var q = {}, J = (e) => !j(e) && typeof e != "boolean" && typeof e != "number", Y
|
|
|
840
656
|
"joinArrays",
|
|
841
657
|
"postProcess",
|
|
842
658
|
"interpolation"
|
|
843
|
-
],
|
|
844
|
-
if (
|
|
659
|
+
], r = e.replace && !n(e.replace), i = r ? e.replace : e;
|
|
660
|
+
if (r && e.count !== void 0 && (i.count = e.count), this.options.interpolation.defaultVariables && (i = {
|
|
845
661
|
...this.options.interpolation.defaultVariables,
|
|
846
|
-
...
|
|
847
|
-
}), !
|
|
848
|
-
|
|
849
|
-
for (let e of t) delete
|
|
662
|
+
...i
|
|
663
|
+
}), !r) {
|
|
664
|
+
i = { ...i };
|
|
665
|
+
for (let e of t) delete i[e];
|
|
850
666
|
}
|
|
851
|
-
return
|
|
667
|
+
return i;
|
|
852
668
|
}
|
|
853
669
|
static hasDefaultValue(e) {
|
|
854
670
|
for (let t in e) if (Object.prototype.hasOwnProperty.call(e, t) && t.substring(0, 12) === "defaultValue" && e[t] !== void 0) return !0;
|
|
855
671
|
return !1;
|
|
856
672
|
}
|
|
857
|
-
},
|
|
673
|
+
}, F = class {
|
|
858
674
|
constructor(e) {
|
|
859
|
-
this.options = e, this.supportedLngs = this.options.supportedLngs || !1, this.logger =
|
|
675
|
+
this.options = e, this.supportedLngs = this.options.supportedLngs || !1, this.logger = T.create("languageUtils");
|
|
860
676
|
}
|
|
861
677
|
getScriptPartFromCode(e) {
|
|
862
|
-
if (e =
|
|
678
|
+
if (e = C(e), !e || e.indexOf("-") < 0) return null;
|
|
863
679
|
let t = e.split("-");
|
|
864
680
|
return t.length === 2 || (t.pop(), t[t.length - 1].toLowerCase() === "x") ? null : this.formatLanguageCode(t.join("-"));
|
|
865
681
|
}
|
|
866
682
|
getLanguagePartFromCode(e) {
|
|
867
|
-
if (e =
|
|
683
|
+
if (e = C(e), !e || e.indexOf("-") < 0) return e;
|
|
868
684
|
let t = e.split("-");
|
|
869
685
|
return this.formatLanguageCode(t[0]);
|
|
870
686
|
}
|
|
871
687
|
formatLanguageCode(e) {
|
|
872
|
-
if (
|
|
688
|
+
if (n(e) && e.indexOf("-") > -1) {
|
|
873
689
|
let t;
|
|
874
690
|
try {
|
|
875
691
|
t = Intl.getCanonicalLocales(e)[0];
|
|
@@ -901,38 +717,38 @@ var q = {}, J = (e) => !j(e) && typeof e != "boolean" && typeof e != "number", Y
|
|
|
901
717
|
}
|
|
902
718
|
getFallbackCodes(e, t) {
|
|
903
719
|
if (!e) return [];
|
|
904
|
-
if (typeof e == "function" && (e = e(t)),
|
|
720
|
+
if (typeof e == "function" && (e = e(t)), n(e) && (e = [e]), Array.isArray(e)) return e;
|
|
905
721
|
if (!t) return e.default || [];
|
|
906
|
-
let
|
|
907
|
-
return
|
|
722
|
+
let r = e[t];
|
|
723
|
+
return r ||= e[this.getScriptPartFromCode(t)], r ||= e[this.formatLanguageCode(t)], r ||= e[this.getLanguagePartFromCode(t)], r ||= e.default, r || [];
|
|
908
724
|
}
|
|
909
725
|
toResolveHierarchy(e, t) {
|
|
910
|
-
let
|
|
911
|
-
e && (this.isSupportedCode(e) ?
|
|
726
|
+
let r = this.getFallbackCodes((t === !1 ? [] : t) || this.options.fallbackLng || [], e), i = [], a = (e) => {
|
|
727
|
+
e && (this.isSupportedCode(e) ? i.push(e) : this.logger.warn(`rejecting language code not found in supportedLngs: ${e}`));
|
|
912
728
|
};
|
|
913
|
-
return
|
|
914
|
-
|
|
915
|
-
}),
|
|
729
|
+
return n(e) && (e.indexOf("-") > -1 || e.indexOf("_") > -1) ? (this.options.load !== "languageOnly" && a(this.formatLanguageCode(e)), this.options.load !== "languageOnly" && this.options.load !== "currentOnly" && a(this.getScriptPartFromCode(e)), this.options.load !== "currentOnly" && a(this.getLanguagePartFromCode(e))) : n(e) && a(this.formatLanguageCode(e)), r.forEach((e) => {
|
|
730
|
+
i.indexOf(e) < 0 && a(this.formatLanguageCode(e));
|
|
731
|
+
}), i;
|
|
916
732
|
}
|
|
917
|
-
},
|
|
733
|
+
}, I = {
|
|
918
734
|
zero: 0,
|
|
919
735
|
one: 1,
|
|
920
736
|
two: 2,
|
|
921
737
|
few: 3,
|
|
922
738
|
many: 4,
|
|
923
739
|
other: 5
|
|
924
|
-
},
|
|
740
|
+
}, L = {
|
|
925
741
|
select: (e) => e === 1 ? "one" : "other",
|
|
926
742
|
resolvedOptions: () => ({ pluralCategories: ["one", "other"] })
|
|
927
|
-
},
|
|
743
|
+
}, R = class {
|
|
928
744
|
constructor(e, t = {}) {
|
|
929
|
-
this.languageUtils = e, this.options = t, this.logger =
|
|
745
|
+
this.languageUtils = e, this.options = t, this.logger = T.create("pluralResolver"), this.pluralRulesCache = {};
|
|
930
746
|
}
|
|
931
747
|
clearCache() {
|
|
932
748
|
this.pluralRulesCache = {};
|
|
933
749
|
}
|
|
934
750
|
getRule(e, t = {}) {
|
|
935
|
-
let n =
|
|
751
|
+
let n = C(e === "dev" ? "en" : e), r = t.ordinal ? "ordinal" : "cardinal", i = JSON.stringify({
|
|
936
752
|
cleanedCode: n,
|
|
937
753
|
type: r
|
|
938
754
|
});
|
|
@@ -941,8 +757,8 @@ var q = {}, J = (e) => !j(e) && typeof e != "boolean" && typeof e != "number", Y
|
|
|
941
757
|
try {
|
|
942
758
|
a = new Intl.PluralRules(n, { type: r });
|
|
943
759
|
} catch {
|
|
944
|
-
if (typeof Intl > "u") return this.logger.error("No Intl support, please use an Intl polyfill!"),
|
|
945
|
-
if (!e.match(/-|_/)) return
|
|
760
|
+
if (typeof Intl > "u") return this.logger.error("No Intl support, please use an Intl polyfill!"), L;
|
|
761
|
+
if (!e.match(/-|_/)) return L;
|
|
946
762
|
let n = this.languageUtils.getLanguagePartFromCode(e);
|
|
947
763
|
a = this.getRule(n, t);
|
|
948
764
|
}
|
|
@@ -957,23 +773,23 @@ var q = {}, J = (e) => !j(e) && typeof e != "boolean" && typeof e != "number", Y
|
|
|
957
773
|
}
|
|
958
774
|
getSuffixes(e, t = {}) {
|
|
959
775
|
let n = this.getRule(e, t);
|
|
960
|
-
return n ||= this.getRule("dev", t), n ? n.resolvedOptions().pluralCategories.sort((e, t) =>
|
|
776
|
+
return n ||= this.getRule("dev", t), n ? n.resolvedOptions().pluralCategories.sort((e, t) => I[e] - I[t]).map((e) => `${this.options.prepend}${t.ordinal ? `ordinal${this.options.prepend}` : ""}${e}`) : [];
|
|
961
777
|
}
|
|
962
778
|
getSuffix(e, t, n = {}) {
|
|
963
779
|
let r = this.getRule(e, n);
|
|
964
780
|
return r ? `${this.options.prepend}${n.ordinal ? `ordinal${this.options.prepend}` : ""}${r.select(t)}` : (this.logger.warn(`no plural rule found for: ${e}`), this.getSuffix("dev", t, n));
|
|
965
781
|
}
|
|
966
|
-
},
|
|
967
|
-
let
|
|
968
|
-
return !
|
|
969
|
-
},
|
|
782
|
+
}, z = (e, t, r, i = ".", a = !0) => {
|
|
783
|
+
let o = p(e, t, r);
|
|
784
|
+
return !o && a && n(r) && (o = S(e, r, i), o === void 0 && (o = S(t, r, i))), o;
|
|
785
|
+
}, B = (e) => e.replace(/\$/g, "$$$$"), V = class {
|
|
970
786
|
constructor(e = {}) {
|
|
971
|
-
this.logger =
|
|
787
|
+
this.logger = T.create("interpolator"), this.options = e, this.format = e?.interpolation?.format || ((e) => e), this.init(e);
|
|
972
788
|
}
|
|
973
789
|
init(e = {}) {
|
|
974
790
|
e.interpolation ||= { escapeValue: !0 };
|
|
975
|
-
let { escape: t, escapeValue: n, useRawValueToEscape: r, prefix: i, prefixEscaped: a, suffix: o, suffixEscaped: s, formatSeparator: c, unescapeSuffix: l, unescapePrefix: u, nestingPrefix: d, nestingPrefixEscaped: f, nestingSuffix: p, nestingSuffixEscaped: m, nestingOptionsSeparator:
|
|
976
|
-
this.escape = t === void 0 ?
|
|
791
|
+
let { escape: t, escapeValue: n, useRawValueToEscape: r, prefix: i, prefixEscaped: a, suffix: o, suffixEscaped: s, formatSeparator: c, unescapeSuffix: l, unescapePrefix: u, nestingPrefix: d, nestingPrefixEscaped: f, nestingSuffix: p, nestingSuffixEscaped: m, nestingOptionsSeparator: g, maxReplaces: v, alwaysFormat: y } = e.interpolation;
|
|
792
|
+
this.escape = t === void 0 ? _ : t, this.escapeValue = n === void 0 ? !0 : n, this.useRawValueToEscape = r === void 0 ? !1 : r, this.prefix = i ? h(i) : a || "{{", this.suffix = o ? h(o) : s || "}}", this.formatSeparator = c || ",", this.unescapePrefix = l ? "" : u || "-", this.unescapeSuffix = this.unescapePrefix ? "" : l || "", this.nestingPrefix = d ? h(d) : f || h("$t("), this.nestingSuffix = p ? h(p) : m || h(")"), this.nestingOptionsSeparator = g || ",", this.maxReplaces = v || 1e3, this.alwaysFormat = y === void 0 ? !1 : y, this.resetRegExp();
|
|
977
793
|
}
|
|
978
794
|
reset() {
|
|
979
795
|
this.options && this.init(this.options);
|
|
@@ -982,79 +798,79 @@ var q = {}, J = (e) => !j(e) && typeof e != "boolean" && typeof e != "number", Y
|
|
|
982
798
|
let e = (e, t) => e?.source === t ? (e.lastIndex = 0, e) : new RegExp(t, "g");
|
|
983
799
|
this.regexp = e(this.regexp, `${this.prefix}(.+?)${this.suffix}`), this.regexpUnescape = e(this.regexpUnescape, `${this.prefix}${this.unescapePrefix}(.+?)${this.unescapeSuffix}${this.suffix}`), this.nestingRegexp = e(this.nestingRegexp, `${this.nestingPrefix}((?:[^()"']+|"[^"]*"|'[^']*'|\\((?:[^()]|"[^"]*"|'[^']*')*\\))*?)${this.nestingSuffix}`);
|
|
984
800
|
}
|
|
985
|
-
interpolate(e, t,
|
|
986
|
-
let
|
|
801
|
+
interpolate(e, t, r, a) {
|
|
802
|
+
let o, s, c, l = this.options && this.options.interpolation && this.options.interpolation.defaultVariables || {}, u = (e) => {
|
|
987
803
|
if (e.indexOf(this.formatSeparator) < 0) {
|
|
988
|
-
let
|
|
989
|
-
return this.alwaysFormat ? this.format(
|
|
990
|
-
...
|
|
804
|
+
let n = z(t, l, e, this.options.keySeparator, this.options.ignoreJSONStructure);
|
|
805
|
+
return this.alwaysFormat ? this.format(n, void 0, r, {
|
|
806
|
+
...a,
|
|
991
807
|
...t,
|
|
992
808
|
interpolationkey: e
|
|
993
|
-
}) :
|
|
809
|
+
}) : n;
|
|
994
810
|
}
|
|
995
|
-
let
|
|
996
|
-
return this.format(
|
|
997
|
-
...
|
|
811
|
+
let n = e.split(this.formatSeparator), i = n.shift().trim(), o = n.join(this.formatSeparator).trim();
|
|
812
|
+
return this.format(z(t, l, i, this.options.keySeparator, this.options.ignoreJSONStructure), o, r, {
|
|
813
|
+
...a,
|
|
998
814
|
...t,
|
|
999
|
-
interpolationkey:
|
|
815
|
+
interpolationkey: i
|
|
1000
816
|
});
|
|
1001
817
|
};
|
|
1002
818
|
this.resetRegExp();
|
|
1003
|
-
let
|
|
819
|
+
let d = a?.missingInterpolationHandler || this.options.missingInterpolationHandler, f = a?.interpolation?.skipOnVariables === void 0 ? this.options.interpolation.skipOnVariables : a.interpolation.skipOnVariables;
|
|
1004
820
|
return [{
|
|
1005
821
|
regex: this.regexpUnescape,
|
|
1006
|
-
safeValue: (e) =>
|
|
822
|
+
safeValue: (e) => B(e)
|
|
1007
823
|
}, {
|
|
1008
824
|
regex: this.regexp,
|
|
1009
|
-
safeValue: (e) => this.escapeValue ?
|
|
825
|
+
safeValue: (e) => this.escapeValue ? B(this.escape(e)) : B(e)
|
|
1010
826
|
}].forEach((t) => {
|
|
1011
|
-
for (
|
|
1012
|
-
let
|
|
1013
|
-
if (
|
|
1014
|
-
let t =
|
|
1015
|
-
|
|
1016
|
-
} else if (
|
|
1017
|
-
else if (
|
|
1018
|
-
|
|
827
|
+
for (c = 0; o = t.regex.exec(e);) {
|
|
828
|
+
let r = o[1].trim();
|
|
829
|
+
if (s = u(r), s === void 0) if (typeof d == "function") {
|
|
830
|
+
let t = d(e, o, a);
|
|
831
|
+
s = n(t) ? t : "";
|
|
832
|
+
} else if (a && Object.prototype.hasOwnProperty.call(a, r)) s = "";
|
|
833
|
+
else if (f) {
|
|
834
|
+
s = o[0];
|
|
1019
835
|
continue;
|
|
1020
|
-
} else this.logger.warn(`missed to pass in variable ${
|
|
1021
|
-
else !
|
|
1022
|
-
let
|
|
1023
|
-
if (e = e.replace(
|
|
836
|
+
} else this.logger.warn(`missed to pass in variable ${r} for interpolating ${e}`), s = "";
|
|
837
|
+
else !n(s) && !this.useRawValueToEscape && (s = i(s));
|
|
838
|
+
let l = t.safeValue(s);
|
|
839
|
+
if (e = e.replace(o[0], l), f ? (t.regex.lastIndex += s.length, t.regex.lastIndex -= o[0].length) : t.regex.lastIndex = 0, c++, c >= this.maxReplaces) break;
|
|
1024
840
|
}
|
|
1025
841
|
}), e;
|
|
1026
842
|
}
|
|
1027
|
-
nest(e, t,
|
|
1028
|
-
let
|
|
843
|
+
nest(e, t, r = {}) {
|
|
844
|
+
let a, o, s, c = (e, t) => {
|
|
1029
845
|
let n = this.nestingOptionsSeparator;
|
|
1030
846
|
if (e.indexOf(n) < 0) return e;
|
|
1031
|
-
let r = e.split(RegExp(`${
|
|
1032
|
-
e = r[0], i = this.interpolate(i,
|
|
1033
|
-
let
|
|
1034
|
-
((
|
|
847
|
+
let r = e.split(RegExp(`${h(n)}[ ]*{`)), i = `{${r[1]}`;
|
|
848
|
+
e = r[0], i = this.interpolate(i, s);
|
|
849
|
+
let a = i.match(/'/g), o = i.match(/"/g);
|
|
850
|
+
((a?.length ?? 0) % 2 == 0 && !o || (o?.length ?? 0) % 2 != 0) && (i = i.replace(/'/g, "\""));
|
|
1035
851
|
try {
|
|
1036
|
-
|
|
852
|
+
s = JSON.parse(i), t && (s = {
|
|
1037
853
|
...t,
|
|
1038
|
-
...
|
|
854
|
+
...s
|
|
1039
855
|
});
|
|
1040
856
|
} catch (t) {
|
|
1041
857
|
return this.logger.warn(`failed parsing options string in nesting for key ${e}`, t), `${e}${n}${i}`;
|
|
1042
858
|
}
|
|
1043
|
-
return
|
|
859
|
+
return s.defaultValue && s.defaultValue.indexOf(this.prefix) > -1 && delete s.defaultValue, e;
|
|
1044
860
|
};
|
|
1045
|
-
for (;
|
|
1046
|
-
let
|
|
1047
|
-
|
|
1048
|
-
let
|
|
1049
|
-
if (
|
|
1050
|
-
|
|
1051
|
-
...
|
|
1052
|
-
interpolationkey:
|
|
1053
|
-
}),
|
|
861
|
+
for (; a = this.nestingRegexp.exec(e);) {
|
|
862
|
+
let l = [];
|
|
863
|
+
s = { ...r }, s = s.replace && !n(s.replace) ? s.replace : s, s.applyPostProcessor = !1, delete s.defaultValue;
|
|
864
|
+
let u = /{.*}/.test(a[1]) ? a[1].lastIndexOf("}") + 1 : a[1].indexOf(this.formatSeparator);
|
|
865
|
+
if (u !== -1 && (l = a[1].slice(u).split(this.formatSeparator).map((e) => e.trim()).filter(Boolean), a[1] = a[1].slice(0, u)), o = t(c.call(this, a[1].trim(), s), s), o && a[0] === e && !n(o)) return o;
|
|
866
|
+
n(o) || (o = i(o)), o ||= (this.logger.warn(`missed to resolve ${a[1]} for nesting ${e}`), ""), l.length && (o = l.reduce((e, t) => this.format(e, t, r.lng, {
|
|
867
|
+
...r,
|
|
868
|
+
interpolationkey: a[1].trim()
|
|
869
|
+
}), o.trim())), e = e.replace(a[0], o), this.regexp.lastIndex = 0;
|
|
1054
870
|
}
|
|
1055
871
|
return e;
|
|
1056
872
|
}
|
|
1057
|
-
},
|
|
873
|
+
}, H = (e) => {
|
|
1058
874
|
let t = e.toLowerCase().trim(), n = {};
|
|
1059
875
|
if (e.indexOf("(") > -1) {
|
|
1060
876
|
let r = e.split("(");
|
|
@@ -1071,7 +887,7 @@ var q = {}, J = (e) => !j(e) && typeof e != "boolean" && typeof e != "number", Y
|
|
|
1071
887
|
formatName: t,
|
|
1072
888
|
formatOptions: n
|
|
1073
889
|
};
|
|
1074
|
-
},
|
|
890
|
+
}, U = (e) => {
|
|
1075
891
|
let t = {};
|
|
1076
892
|
return (n, r, i) => {
|
|
1077
893
|
let a = i;
|
|
@@ -1080,15 +896,15 @@ var q = {}, J = (e) => !j(e) && typeof e != "boolean" && typeof e != "number", Y
|
|
|
1080
896
|
[i.interpolationkey]: void 0
|
|
1081
897
|
});
|
|
1082
898
|
let o = r + JSON.stringify(a), s = t[o];
|
|
1083
|
-
return s || (s = e(
|
|
899
|
+
return s || (s = e(C(r), i), t[o] = s), s(n);
|
|
1084
900
|
};
|
|
1085
|
-
},
|
|
901
|
+
}, W = (e) => (t, n, r) => e(C(n), r)(t), G = class {
|
|
1086
902
|
constructor(e = {}) {
|
|
1087
|
-
this.logger =
|
|
903
|
+
this.logger = T.create("formatter"), this.options = e, this.init(e);
|
|
1088
904
|
}
|
|
1089
905
|
init(e, t = { interpolation: {} }) {
|
|
1090
906
|
this.formatSeparator = t.interpolation.formatSeparator || ",";
|
|
1091
|
-
let n = t.cacheInBuiltFormats ?
|
|
907
|
+
let n = t.cacheInBuiltFormats ? U : W;
|
|
1092
908
|
this.formats = {
|
|
1093
909
|
number: n((e, t) => {
|
|
1094
910
|
let n = new Intl.NumberFormat(e, { ...t });
|
|
@@ -1119,7 +935,7 @@ var q = {}, J = (e) => !j(e) && typeof e != "boolean" && typeof e != "number", Y
|
|
|
1119
935
|
this.formats[e.toLowerCase().trim()] = t;
|
|
1120
936
|
}
|
|
1121
937
|
addCached(e, t) {
|
|
1122
|
-
this.formats[e.toLowerCase().trim()] =
|
|
938
|
+
this.formats[e.toLowerCase().trim()] = U(t);
|
|
1123
939
|
}
|
|
1124
940
|
format(e, t, n, r = {}) {
|
|
1125
941
|
let i = t.split(this.formatSeparator);
|
|
@@ -1128,7 +944,7 @@ var q = {}, J = (e) => !j(e) && typeof e != "boolean" && typeof e != "number", Y
|
|
|
1128
944
|
i[0] = [i[0], ...i.splice(1, e)].join(this.formatSeparator);
|
|
1129
945
|
}
|
|
1130
946
|
return i.reduce((e, t) => {
|
|
1131
|
-
let { formatName: i, formatOptions: a } =
|
|
947
|
+
let { formatName: i, formatOptions: a } = H(t);
|
|
1132
948
|
if (this.formats[i]) {
|
|
1133
949
|
let t = e;
|
|
1134
950
|
try {
|
|
@@ -1146,11 +962,11 @@ var q = {}, J = (e) => !j(e) && typeof e != "boolean" && typeof e != "number", Y
|
|
|
1146
962
|
return e;
|
|
1147
963
|
}, e);
|
|
1148
964
|
}
|
|
1149
|
-
},
|
|
965
|
+
}, K = (e, t) => {
|
|
1150
966
|
e.pending[t] !== void 0 && (delete e.pending[t], e.pendingCount--);
|
|
1151
|
-
},
|
|
967
|
+
}, q = class extends E {
|
|
1152
968
|
constructor(e, t, n, r = {}) {
|
|
1153
|
-
super(), this.backend = e, this.store = t, this.services = n, this.languageUtils = n.languageUtils, this.options = r, this.logger =
|
|
969
|
+
super(), this.backend = e, this.store = t, this.services = n, this.languageUtils = n.languageUtils, this.options = r, this.logger = T.create("backendConnector"), this.waitingReads = [], this.maxParallelReads = r.maxParallelReads || 10, this.readingCalls = 0, this.maxRetries = r.maxRetries >= 0 ? r.maxRetries : 5, this.retryTimeout = r.retryTimeout >= 1 ? r.retryTimeout : 350, this.state = {}, this.queue = [], this.backend?.init?.(n, r.backend, r);
|
|
1154
970
|
}
|
|
1155
971
|
queueLoad(e, t, n, r) {
|
|
1156
972
|
let i = {}, a = {}, o = {}, s = {};
|
|
@@ -1178,7 +994,7 @@ var q = {}, J = (e) => !j(e) && typeof e != "boolean" && typeof e != "number", Y
|
|
|
1178
994
|
t && this.emit("failedLoading", i, a, t), !t && n && this.store.addResourceBundle(i, a, n, void 0, void 0, { skipCopy: !0 }), this.state[e] = t ? -1 : 2, t && n && (this.state[e] = 0);
|
|
1179
995
|
let o = {};
|
|
1180
996
|
this.queue.forEach((n) => {
|
|
1181
|
-
|
|
997
|
+
d(n.loaded, [i], a), K(n, e), t && n.errors.push(t), n.pendingCount === 0 && !n.done && (Object.keys(n.loaded).forEach((e) => {
|
|
1182
998
|
o[e] || (o[e] = {});
|
|
1183
999
|
let t = n.loaded[e];
|
|
1184
1000
|
t.length && t.forEach((t) => {
|
|
@@ -1225,12 +1041,12 @@ var q = {}, J = (e) => !j(e) && typeof e != "boolean" && typeof e != "number", Y
|
|
|
1225
1041
|
}
|
|
1226
1042
|
return s(e, t, o);
|
|
1227
1043
|
}
|
|
1228
|
-
prepareLoading(e, t,
|
|
1229
|
-
if (!this.backend) return this.logger.warn("No backend was added via i18next.use. Will not load resources."),
|
|
1230
|
-
|
|
1231
|
-
let
|
|
1232
|
-
if (!
|
|
1233
|
-
|
|
1044
|
+
prepareLoading(e, t, r = {}, i) {
|
|
1045
|
+
if (!this.backend) return this.logger.warn("No backend was added via i18next.use. Will not load resources."), i && i();
|
|
1046
|
+
n(e) && (e = this.languageUtils.toResolveHierarchy(e)), n(t) && (t = [t]);
|
|
1047
|
+
let a = this.queueLoad(e, t, r, i);
|
|
1048
|
+
if (!a.toLoad.length) return a.pending.length || i(), null;
|
|
1049
|
+
a.toLoad.forEach((e) => {
|
|
1234
1050
|
this.loadOne(e);
|
|
1235
1051
|
});
|
|
1236
1052
|
}
|
|
@@ -1268,7 +1084,7 @@ var q = {}, J = (e) => !j(e) && typeof e != "boolean" && typeof e != "number", Y
|
|
|
1268
1084
|
!e || !e[0] || this.store.addResource(e[0], t, n, r);
|
|
1269
1085
|
}
|
|
1270
1086
|
}
|
|
1271
|
-
},
|
|
1087
|
+
}, J = () => ({
|
|
1272
1088
|
debug: !1,
|
|
1273
1089
|
initAsync: !0,
|
|
1274
1090
|
ns: ["translation"],
|
|
@@ -1303,7 +1119,7 @@ var q = {}, J = (e) => !j(e) && typeof e != "boolean" && typeof e != "number", Y
|
|
|
1303
1119
|
appendNamespaceToCIMode: !1,
|
|
1304
1120
|
overloadTranslationOptionHandler: (e) => {
|
|
1305
1121
|
let t = {};
|
|
1306
|
-
if (typeof e[1] == "object" && (t = e[1]),
|
|
1122
|
+
if (typeof e[1] == "object" && (t = e[1]), n(e[1]) && (t.defaultValue = e[1]), n(e[2]) && (t.tDescription = e[2]), typeof e[2] == "object" || typeof e[3] == "object") {
|
|
1307
1123
|
let n = e[3] || e[2];
|
|
1308
1124
|
Object.keys(n).forEach((e) => {
|
|
1309
1125
|
t[e] = n[e];
|
|
@@ -1325,15 +1141,15 @@ var q = {}, J = (e) => !j(e) && typeof e != "boolean" && typeof e != "number", Y
|
|
|
1325
1141
|
skipOnVariables: !0
|
|
1326
1142
|
},
|
|
1327
1143
|
cacheInBuiltFormats: !0
|
|
1328
|
-
}),
|
|
1144
|
+
}), Y = (e) => (n(e.ns) && (e.ns = [e.ns]), n(e.fallbackLng) && (e.fallbackLng = [e.fallbackLng]), n(e.fallbackNS) && (e.fallbackNS = [e.fallbackNS]), e.supportedLngs?.indexOf?.("cimode") < 0 && (e.supportedLngs = e.supportedLngs.concat(["cimode"])), typeof e.initImmediate == "boolean" && (e.initAsync = e.initImmediate), e), X = () => {}, Z = (e) => {
|
|
1329
1145
|
Object.getOwnPropertyNames(Object.getPrototypeOf(e)).forEach((t) => {
|
|
1330
1146
|
typeof e[t] == "function" && (e[t] = e[t].bind(e));
|
|
1331
1147
|
});
|
|
1332
|
-
},
|
|
1333
|
-
typeof globalThis < "u" && (globalThis[
|
|
1334
|
-
},
|
|
1148
|
+
}, Q = "__i18next_supportNoticeShown", ee = () => !!(typeof globalThis < "u" && globalThis[Q] || typeof process < "u" && process.env && process.env.I18NEXT_NO_SUPPORT_NOTICE || typeof process < "u" && process.env), te = () => {
|
|
1149
|
+
typeof globalThis < "u" && (globalThis[Q] = !0);
|
|
1150
|
+
}, ne = (e) => !!(e?.modules?.backend?.name?.indexOf("Locize") > 0 || e?.modules?.backend?.constructor?.name?.indexOf("Locize") > 0 || e?.options?.backend?.backends && e.options.backend.backends.some((e) => e?.name?.indexOf("Locize") > 0 || e?.constructor?.name?.indexOf("Locize") > 0) || e?.options?.backend?.projectId || e?.options?.backend?.backendOptions && e.options.backend.backendOptions.some((e) => e?.projectId)), $ = class e extends E {
|
|
1335
1151
|
constructor(e = {}, t) {
|
|
1336
|
-
if (super(), this.options =
|
|
1152
|
+
if (super(), this.options = Y(e), this.services = {}, this.logger = T, this.modules = { external: [] }, Z(this), t && !this.isInitialized && !e.isClone) {
|
|
1337
1153
|
if (!this.options.initAsync) return this.init(e, t), this;
|
|
1338
1154
|
setTimeout(() => {
|
|
1339
1155
|
this.init(e, t);
|
|
@@ -1341,36 +1157,36 @@ var q = {}, J = (e) => !j(e) && typeof e != "boolean" && typeof e != "number", Y
|
|
|
1341
1157
|
}
|
|
1342
1158
|
}
|
|
1343
1159
|
init(e = {}, t) {
|
|
1344
|
-
this.isInitializing = !0, typeof e == "function" && (t = e, e = {}), e.defaultNS == null && e.ns && (
|
|
1345
|
-
let
|
|
1160
|
+
this.isInitializing = !0, typeof e == "function" && (t = e, e = {}), e.defaultNS == null && e.ns && (n(e.ns) ? e.defaultNS = e.ns : e.ns.indexOf("translation") < 0 && (e.defaultNS = e.ns[0]));
|
|
1161
|
+
let i = J();
|
|
1346
1162
|
this.options = {
|
|
1347
|
-
...
|
|
1163
|
+
...i,
|
|
1348
1164
|
...this.options,
|
|
1349
|
-
...
|
|
1165
|
+
...Y(e)
|
|
1350
1166
|
}, this.options.interpolation = {
|
|
1351
|
-
...
|
|
1167
|
+
...i.interpolation,
|
|
1352
1168
|
...this.options.interpolation
|
|
1353
|
-
}, e.keySeparator !== void 0 && (this.options.userDefinedKeySeparator = e.keySeparator), e.nsSeparator !== void 0 && (this.options.userDefinedNsSeparator = e.nsSeparator), typeof this.options.overloadTranslationOptionHandler != "function" && (this.options.overloadTranslationOptionHandler =
|
|
1354
|
-
let
|
|
1169
|
+
}, e.keySeparator !== void 0 && (this.options.userDefinedKeySeparator = e.keySeparator), e.nsSeparator !== void 0 && (this.options.userDefinedNsSeparator = e.nsSeparator), typeof this.options.overloadTranslationOptionHandler != "function" && (this.options.overloadTranslationOptionHandler = i.overloadTranslationOptionHandler), this.options.showSupportNotice !== !1 && !ne(this) && !ee() && (typeof console < "u" && console.info !== void 0 && console.info("🌐 i18next is made possible by our own product, Locize — consider powering your project with managed localization (AI, CDN, integrations): https://locize.com 💙"), te());
|
|
1170
|
+
let a = (e) => e ? typeof e == "function" ? new e() : e : null;
|
|
1355
1171
|
if (!this.options.isClone) {
|
|
1356
|
-
this.modules.logger ?
|
|
1172
|
+
this.modules.logger ? T.init(a(this.modules.logger), this.options) : T.init(null, this.options);
|
|
1357
1173
|
let e;
|
|
1358
|
-
e = this.modules.formatter ? this.modules.formatter :
|
|
1359
|
-
let t = new
|
|
1360
|
-
this.store = new
|
|
1361
|
-
let
|
|
1362
|
-
|
|
1174
|
+
e = this.modules.formatter ? this.modules.formatter : G;
|
|
1175
|
+
let t = new F(this.options);
|
|
1176
|
+
this.store = new D(this.options.resources, this.options);
|
|
1177
|
+
let n = this.services;
|
|
1178
|
+
n.logger = T, n.resourceStore = this.store, n.languageUtils = t, n.pluralResolver = new R(t, {
|
|
1363
1179
|
prepend: this.options.pluralSeparator,
|
|
1364
1180
|
simplifyPluralSuffix: this.options.simplifyPluralSuffix
|
|
1365
|
-
}), this.options.interpolation.format && this.options.interpolation.format !==
|
|
1181
|
+
}), this.options.interpolation.format && this.options.interpolation.format !== i.interpolation.format && this.logger.deprecate("init: you are still using the legacy format function, please use the new approach: https://www.i18next.com/translation-function/formatting"), e && (!this.options.interpolation.format || this.options.interpolation.format === i.interpolation.format) && (n.formatter = a(e), n.formatter.init && n.formatter.init(n, this.options), this.options.interpolation.format = n.formatter.format.bind(n.formatter)), n.interpolator = new V(this.options), n.utils = { hasLoadedNamespace: this.hasLoadedNamespace.bind(this) }, n.backendConnector = new q(a(this.modules.backend), n.resourceStore, n, this.options), n.backendConnector.on("*", (e, ...t) => {
|
|
1366
1182
|
this.emit(e, ...t);
|
|
1367
|
-
}), this.modules.languageDetector && (
|
|
1183
|
+
}), this.modules.languageDetector && (n.languageDetector = a(this.modules.languageDetector), n.languageDetector.init && n.languageDetector.init(n, this.options.detection, this.options)), this.modules.i18nFormat && (n.i18nFormat = a(this.modules.i18nFormat), n.i18nFormat.init && n.i18nFormat.init(this)), this.translator = new P(this.services, this.options), this.translator.on("*", (e, ...t) => {
|
|
1368
1184
|
this.emit(e, ...t);
|
|
1369
1185
|
}), this.modules.external.forEach((e) => {
|
|
1370
1186
|
e.init && e.init(this);
|
|
1371
1187
|
});
|
|
1372
1188
|
}
|
|
1373
|
-
if (this.format = this.options.interpolation.format, t ||=
|
|
1189
|
+
if (this.format = this.options.interpolation.format, t ||= X, this.options.fallbackLng && !this.services.languageDetector && !this.options.lng) {
|
|
1374
1190
|
let e = this.services.languageUtils.getFallbackCodes(this.options.fallbackLng);
|
|
1375
1191
|
e.length > 0 && e[0] !== "dev" && (this.options.lng = e[0]);
|
|
1376
1192
|
}
|
|
@@ -1389,39 +1205,39 @@ var q = {}, J = (e) => !j(e) && typeof e != "boolean" && typeof e != "number", Y
|
|
|
1389
1205
|
].forEach((e) => {
|
|
1390
1206
|
this[e] = (...t) => (this.store[e](...t), this);
|
|
1391
1207
|
});
|
|
1392
|
-
let
|
|
1208
|
+
let o = r(), s = () => {
|
|
1393
1209
|
let e = (e, n) => {
|
|
1394
|
-
this.isInitializing = !1, this.isInitialized && !this.initializedStoreOnce && this.logger.warn("init: i18next is already initialized. You should call init just once!"), this.isInitialized = !0, this.options.isClone || this.logger.log("initialized", this.options), this.emit("initialized", this.options),
|
|
1210
|
+
this.isInitializing = !1, this.isInitialized && !this.initializedStoreOnce && this.logger.warn("init: i18next is already initialized. You should call init just once!"), this.isInitialized = !0, this.options.isClone || this.logger.log("initialized", this.options), this.emit("initialized", this.options), o.resolve(n), t(e, n);
|
|
1395
1211
|
};
|
|
1396
1212
|
if (this.languages && !this.isInitialized) return e(null, this.t.bind(this));
|
|
1397
1213
|
this.changeLanguage(this.options.lng, e);
|
|
1398
1214
|
};
|
|
1399
|
-
return this.options.resources || !this.options.initAsync ?
|
|
1215
|
+
return this.options.resources || !this.options.initAsync ? s() : setTimeout(s, 0), o;
|
|
1400
1216
|
}
|
|
1401
|
-
loadResources(e, t =
|
|
1402
|
-
let
|
|
1403
|
-
if (typeof e == "function" && (
|
|
1404
|
-
if (
|
|
1217
|
+
loadResources(e, t = X) {
|
|
1218
|
+
let r = t, i = n(e) ? e : this.language;
|
|
1219
|
+
if (typeof e == "function" && (r = e), !this.options.resources || this.options.partialBundledLanguages) {
|
|
1220
|
+
if (i?.toLowerCase() === "cimode" && (!this.options.preload || this.options.preload.length === 0)) return r();
|
|
1405
1221
|
let e = [], t = (t) => {
|
|
1406
1222
|
t && t !== "cimode" && this.services.languageUtils.toResolveHierarchy(t).forEach((t) => {
|
|
1407
1223
|
t !== "cimode" && e.indexOf(t) < 0 && e.push(t);
|
|
1408
1224
|
});
|
|
1409
1225
|
};
|
|
1410
|
-
|
|
1411
|
-
!e && !this.resolvedLanguage && this.language && this.setResolvedLanguage(this.language),
|
|
1226
|
+
i ? t(i) : this.services.languageUtils.getFallbackCodes(this.options.fallbackLng).forEach((e) => t(e)), this.options.preload?.forEach?.((e) => t(e)), this.services.backendConnector.load(e, this.options.ns, (e) => {
|
|
1227
|
+
!e && !this.resolvedLanguage && this.language && this.setResolvedLanguage(this.language), r(e);
|
|
1412
1228
|
});
|
|
1413
|
-
} else
|
|
1229
|
+
} else r(null);
|
|
1414
1230
|
}
|
|
1415
1231
|
reloadResources(e, t, n) {
|
|
1416
|
-
let
|
|
1417
|
-
return typeof e == "function" && (n = e, e = void 0), typeof t == "function" && (n = t, t = void 0), e ||= this.languages, t ||= this.options.ns, n ||=
|
|
1418
|
-
|
|
1419
|
-
}),
|
|
1232
|
+
let i = r();
|
|
1233
|
+
return typeof e == "function" && (n = e, e = void 0), typeof t == "function" && (n = t, t = void 0), e ||= this.languages, t ||= this.options.ns, n ||= X, this.services.backendConnector.reload(e, t, (e) => {
|
|
1234
|
+
i.resolve(), n(e);
|
|
1235
|
+
}), i;
|
|
1420
1236
|
}
|
|
1421
1237
|
use(e) {
|
|
1422
1238
|
if (!e) throw Error("You are passing an undefined module! Please check the object you are passing to i18next.use()");
|
|
1423
1239
|
if (!e.type) throw Error("You are passing a wrong module! Please check the object you are passing to i18next.use()");
|
|
1424
|
-
return e.type === "backend" && (this.modules.backend = e), (e.type === "logger" || e.log && e.warn && e.error) && (this.modules.logger = e), e.type === "languageDetector" && (this.modules.languageDetector = e), e.type === "i18nFormat" && (this.modules.i18nFormat = e), e.type === "postProcessor" &&
|
|
1240
|
+
return e.type === "backend" && (this.modules.backend = e), (e.type === "logger" || e.log && e.warn && e.error) && (this.modules.logger = e), e.type === "languageDetector" && (this.modules.languageDetector = e), e.type === "i18nFormat" && (this.modules.i18nFormat = e), e.type === "postProcessor" && O.addPostProcessor(e), e.type === "formatter" && (this.modules.formatter = e), e.type === "3rdParty" && this.modules.external.push(e), this;
|
|
1425
1241
|
}
|
|
1426
1242
|
setResolvedLanguage(e) {
|
|
1427
1243
|
if (!(!e || !this.languages) && !(["cimode", "dev"].indexOf(e) > -1)) {
|
|
@@ -1437,34 +1253,34 @@ var q = {}, J = (e) => !j(e) && typeof e != "boolean" && typeof e != "number", Y
|
|
|
1437
1253
|
}
|
|
1438
1254
|
changeLanguage(e, t) {
|
|
1439
1255
|
this.isLanguageChangingTo = e;
|
|
1440
|
-
let
|
|
1256
|
+
let i = r();
|
|
1441
1257
|
this.emit("languageChanging", e);
|
|
1442
|
-
let
|
|
1258
|
+
let a = (e) => {
|
|
1443
1259
|
this.language = e, this.languages = this.services.languageUtils.toResolveHierarchy(e), this.resolvedLanguage = void 0, this.setResolvedLanguage(e);
|
|
1444
|
-
},
|
|
1445
|
-
|
|
1446
|
-
},
|
|
1260
|
+
}, o = (n, r) => {
|
|
1261
|
+
r ? this.isLanguageChangingTo === e && (a(r), this.translator.changeLanguage(r), this.isLanguageChangingTo = void 0, this.emit("languageChanged", r), this.logger.log("languageChanged", r)) : this.isLanguageChangingTo = void 0, i.resolve((...e) => this.t(...e)), t && t(n, (...e) => this.t(...e));
|
|
1262
|
+
}, s = (t) => {
|
|
1447
1263
|
!e && !t && this.services.languageDetector && (t = []);
|
|
1448
|
-
let
|
|
1449
|
-
|
|
1450
|
-
|
|
1264
|
+
let r = n(t) ? t : t && t[0], i = this.store.hasLanguageSomeTranslations(r) ? r : this.services.languageUtils.getBestMatchFromCodes(n(t) ? [t] : t);
|
|
1265
|
+
i && (this.language || a(i), this.translator.language || this.translator.changeLanguage(i), this.services.languageDetector?.cacheUserLanguage?.(i)), this.loadResources(i, (e) => {
|
|
1266
|
+
o(e, i);
|
|
1451
1267
|
});
|
|
1452
1268
|
};
|
|
1453
|
-
return !e && this.services.languageDetector && !this.services.languageDetector.async ?
|
|
1269
|
+
return !e && this.services.languageDetector && !this.services.languageDetector.async ? s(this.services.languageDetector.detect()) : !e && this.services.languageDetector && this.services.languageDetector.async ? this.services.languageDetector.detect.length === 0 ? this.services.languageDetector.detect().then(s) : this.services.languageDetector.detect(s) : s(e), i;
|
|
1454
1270
|
}
|
|
1455
|
-
getFixedT(e, t,
|
|
1456
|
-
let
|
|
1271
|
+
getFixedT(e, t, r) {
|
|
1272
|
+
let i = (e, t, ...n) => {
|
|
1457
1273
|
let a;
|
|
1458
|
-
a = typeof t == "object" ? { ...t } : this.options.overloadTranslationOptionHandler([e, t].concat(
|
|
1274
|
+
a = typeof t == "object" ? { ...t } : this.options.overloadTranslationOptionHandler([e, t].concat(n)), a.lng = a.lng || i.lng, a.lngs = a.lngs || i.lngs, a.ns = a.ns || i.ns, a.keyPrefix !== "" && (a.keyPrefix = a.keyPrefix || r || i.keyPrefix);
|
|
1459
1275
|
let o = {
|
|
1460
1276
|
...this.options,
|
|
1461
1277
|
...a
|
|
1462
1278
|
};
|
|
1463
|
-
typeof a.keyPrefix == "function" && (a.keyPrefix =
|
|
1279
|
+
typeof a.keyPrefix == "function" && (a.keyPrefix = j(a.keyPrefix, o));
|
|
1464
1280
|
let s = this.options.keySeparator || ".", c;
|
|
1465
|
-
return a.keyPrefix && Array.isArray(e) ? c = e.map((e) => (typeof e == "function" && (e =
|
|
1281
|
+
return a.keyPrefix && Array.isArray(e) ? c = e.map((e) => (typeof e == "function" && (e = j(e, o)), `${a.keyPrefix}${s}${e}`)) : (typeof e == "function" && (e = j(e, o)), c = a.keyPrefix ? `${a.keyPrefix}${s}${e}` : e), this.t(c, a);
|
|
1466
1282
|
};
|
|
1467
|
-
return
|
|
1283
|
+
return n(e) ? i.lng = e : i.lngs = e, i.ns = t, i.keyPrefix = r, i;
|
|
1468
1284
|
}
|
|
1469
1285
|
t(...e) {
|
|
1470
1286
|
return this.translator?.translate(...e);
|
|
@@ -1491,20 +1307,20 @@ var q = {}, J = (e) => !j(e) && typeof e != "boolean" && typeof e != "number", Y
|
|
|
1491
1307
|
return !!(this.hasResourceBundle(n, e) || !this.services.backendConnector.backend || this.options.resources && !this.options.partialBundledLanguages || a(n, e) && (!r || a(i, e)));
|
|
1492
1308
|
}
|
|
1493
1309
|
loadNamespaces(e, t) {
|
|
1494
|
-
let
|
|
1495
|
-
return this.options.ns ? (
|
|
1310
|
+
let i = r();
|
|
1311
|
+
return this.options.ns ? (n(e) && (e = [e]), e.forEach((e) => {
|
|
1496
1312
|
this.options.ns.indexOf(e) < 0 && this.options.ns.push(e);
|
|
1497
1313
|
}), this.loadResources((e) => {
|
|
1498
|
-
|
|
1499
|
-
}),
|
|
1314
|
+
i.resolve(), t && t(e);
|
|
1315
|
+
}), i) : (t && t(), Promise.resolve());
|
|
1500
1316
|
}
|
|
1501
1317
|
loadLanguages(e, t) {
|
|
1502
|
-
let
|
|
1503
|
-
|
|
1504
|
-
let
|
|
1505
|
-
return
|
|
1506
|
-
|
|
1507
|
-
}),
|
|
1318
|
+
let i = r();
|
|
1319
|
+
n(e) && (e = [e]);
|
|
1320
|
+
let a = this.options.preload || [], o = e.filter((e) => a.indexOf(e) < 0 && this.services.languageUtils.isSupportedCode(e));
|
|
1321
|
+
return o.length ? (this.options.preload = a.concat(o), this.loadResources((e) => {
|
|
1322
|
+
i.resolve(), t && t(e);
|
|
1323
|
+
}), i) : (t && t(), Promise.resolve());
|
|
1508
1324
|
}
|
|
1509
1325
|
dir(e) {
|
|
1510
1326
|
if (e ||= this.resolvedLanguage || (this.languages?.length > 0 ? this.languages[0] : this.language), !e) return "rtl";
|
|
@@ -1515,14 +1331,14 @@ var q = {}, J = (e) => !j(e) && typeof e != "boolean" && typeof e != "number", Y
|
|
|
1515
1331
|
if (e && e.direction) return e.direction;
|
|
1516
1332
|
}
|
|
1517
1333
|
} catch {}
|
|
1518
|
-
let t = /* @__PURE__ */ "ar.shu.sqr.ssh.xaa.yhd.yud.aao.abh.abv.acm.acq.acw.acx.acy.adf.ads.aeb.aec.afb.ajp.apc.apd.arb.arq.ars.ary.arz.auz.avl.ayh.ayl.ayn.ayp.bbz.pga.he.iw.ps.pbt.pbu.pst.prp.prd.ug.ur.ydd.yds.yih.ji.yi.hbo.men.xmn.fa.jpr.peo.pes.prs.dv.sam.ckb".split("."), n = this.services?.languageUtils || new
|
|
1334
|
+
let t = /* @__PURE__ */ "ar.shu.sqr.ssh.xaa.yhd.yud.aao.abh.abv.acm.acq.acw.acx.acy.adf.ads.aeb.aec.afb.ajp.apc.apd.arb.arq.ars.ary.arz.auz.avl.ayh.ayl.ayn.ayp.bbz.pga.he.iw.ps.pbt.pbu.pst.prp.prd.ug.ur.ydd.yds.yih.ji.yi.hbo.men.xmn.fa.jpr.peo.pes.prs.dv.sam.ckb".split("."), n = this.services?.languageUtils || new F(J());
|
|
1519
1335
|
return e.toLowerCase().indexOf("-latn") > 1 ? "ltr" : t.indexOf(n.getLanguagePartFromCode(e)) > -1 || e.toLowerCase().indexOf("-arab") > 1 ? "rtl" : "ltr";
|
|
1520
1336
|
}
|
|
1521
1337
|
static createInstance(t = {}, n) {
|
|
1522
1338
|
let r = new e(t, n);
|
|
1523
1339
|
return r.createInstance = e.createInstance, r;
|
|
1524
1340
|
}
|
|
1525
|
-
cloneInstance(t = {}, n =
|
|
1341
|
+
cloneInstance(t = {}, n = X) {
|
|
1526
1342
|
let r = t.forkResourceStore;
|
|
1527
1343
|
r && delete t.forkResourceStore;
|
|
1528
1344
|
let i = {
|
|
@@ -1536,18 +1352,18 @@ var q = {}, J = (e) => !j(e) && typeof e != "boolean" && typeof e != "number", Y
|
|
|
1536
1352
|
"language"
|
|
1537
1353
|
].forEach((e) => {
|
|
1538
1354
|
a[e] = this[e];
|
|
1539
|
-
}), a.services = { ...this.services }, a.services.utils = { hasLoadedNamespace: a.hasLoadedNamespace.bind(a) }, r && (a.store = new
|
|
1355
|
+
}), a.services = { ...this.services }, a.services.utils = { hasLoadedNamespace: a.hasLoadedNamespace.bind(a) }, r && (a.store = new D(Object.keys(this.store.data).reduce((e, t) => (e[t] = { ...this.store.data[t] }, e[t] = Object.keys(e[t]).reduce((n, r) => (n[r] = { ...e[t][r] }, n), e[t]), e), {}), i), a.services.resourceStore = a.store), t.interpolation) {
|
|
1540
1356
|
let e = {
|
|
1541
|
-
...
|
|
1357
|
+
...J().interpolation,
|
|
1542
1358
|
...this.options.interpolation,
|
|
1543
1359
|
...t.interpolation
|
|
1544
1360
|
}, n = {
|
|
1545
1361
|
...i,
|
|
1546
1362
|
interpolation: e
|
|
1547
1363
|
};
|
|
1548
|
-
a.services.interpolator = new
|
|
1364
|
+
a.services.interpolator = new V(n);
|
|
1549
1365
|
}
|
|
1550
|
-
return a.translator = new
|
|
1366
|
+
return a.translator = new P(a.services, i), a.translator.on("*", (e, ...t) => {
|
|
1551
1367
|
a.emit(e, ...t);
|
|
1552
1368
|
}), a.init(i, n), a.translator.options = i, a.translator.backendConnector.services.utils = { hasLoadedNamespace: a.hasLoadedNamespace.bind(a) }, a;
|
|
1553
1369
|
}
|
|
@@ -1568,11 +1384,11 @@ $.createInstance, $.dir, $.init, $.loadResources, $.reloadResources, $.use, $.ch
|
|
|
1568
1384
|
lng: "en",
|
|
1569
1385
|
debug: !0,
|
|
1570
1386
|
resources: {
|
|
1571
|
-
en:
|
|
1572
|
-
es:
|
|
1387
|
+
en: e,
|
|
1388
|
+
es: t
|
|
1573
1389
|
}
|
|
1574
1390
|
});
|
|
1575
|
-
var
|
|
1391
|
+
var re = {
|
|
1576
1392
|
translator: {
|
|
1577
1393
|
...$,
|
|
1578
1394
|
t: (e, t) => {
|
|
@@ -1605,6 +1421,6 @@ var $e = {
|
|
|
1605
1421
|
}]
|
|
1606
1422
|
};
|
|
1607
1423
|
//#endregion
|
|
1608
|
-
export {
|
|
1424
|
+
export { re as t };
|
|
1609
1425
|
|
|
1610
|
-
//# sourceMappingURL=dist-
|
|
1426
|
+
//# sourceMappingURL=dist-D9ARZhQk.js.map
|