@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,27 +1,12 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import {
|
|
3
|
-
import {
|
|
4
|
-
import
|
|
5
|
-
import { createRoot as
|
|
6
|
-
import
|
|
7
|
-
import { jsx as
|
|
8
|
-
//#region ../../../node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/assign.js
|
|
9
|
-
var pe = Object.prototype.hasOwnProperty, me = f(function(e, r) {
|
|
10
|
-
if (t(r) || u(r)) {
|
|
11
|
-
m(r, n(r), e);
|
|
12
|
-
return;
|
|
13
|
-
}
|
|
14
|
-
for (var i in r) pe.call(r, i) && ne(e, i, r[i]);
|
|
15
|
-
}), M = r(function(e, t) {
|
|
16
|
-
return a(e) ? se(e, i(t, 1, a, !0)) : [];
|
|
17
|
-
}), he = 0;
|
|
18
|
-
function ge(t) {
|
|
19
|
-
var n = ++he;
|
|
20
|
-
return e(t) + n;
|
|
21
|
-
}
|
|
22
|
-
//#endregion
|
|
1
|
+
import { C as e, _ as t, b as n, g as r, k as i, l as a, r as o, t as s, u as c, v as l } from "../browser-Dbw2uHQ7.js";
|
|
2
|
+
import { Mt as u, Nt as d, T as f, c as p, ct as m, dt as h, ft as g, l as _, lt as v, mt as y, n as b, s as x, st as S, t as C, u as ee, ut as te, v as w, yt as T } from "../drag-provider-DSf9QLEN.js";
|
|
3
|
+
import { t as E } from "../dist-D9ARZhQk.js";
|
|
4
|
+
import D, { createElement as O, useRef as ne } from "react";
|
|
5
|
+
import { createRoot as re } from "react-dom/client";
|
|
6
|
+
import ie from "react-dom";
|
|
7
|
+
import { jsx as k, jsxs as A } from "react/jsx-runtime";
|
|
23
8
|
//#region ../../shared/player-events/dist/index.js
|
|
24
|
-
var
|
|
9
|
+
var j = /* @__PURE__ */ i(s(), 1);
|
|
25
10
|
(class e extends CustomEvent {
|
|
26
11
|
static {
|
|
27
12
|
this.TYPE = "model-set";
|
|
@@ -38,7 +23,7 @@ var N = /* @__PURE__ */ s(l(), 1);
|
|
|
38
23
|
}), this.component = t, this.complete = n;
|
|
39
24
|
}
|
|
40
25
|
});
|
|
41
|
-
var
|
|
26
|
+
var ae = class e extends CustomEvent {
|
|
42
27
|
static {
|
|
43
28
|
this.TYPE = "session-changed";
|
|
44
29
|
}
|
|
@@ -52,39 +37,39 @@ var _e = class e extends CustomEvent {
|
|
|
52
37
|
}
|
|
53
38
|
}), this.component = t, this.complete = n;
|
|
54
39
|
}
|
|
55
|
-
},
|
|
40
|
+
}, M = /* @__PURE__ */ i(u(), 1), oe = ({ bgFill: e, fgFill: t }) => /* @__PURE__ */ A("svg", {
|
|
56
41
|
preserveAspectRatio: "xMinYMin meet",
|
|
57
42
|
version: "1.1",
|
|
58
43
|
viewBox: "-283 359 34 35",
|
|
59
44
|
style: { enableBackground: "new -283 359 34 35" },
|
|
60
45
|
children: [
|
|
61
|
-
/* @__PURE__ */
|
|
46
|
+
/* @__PURE__ */ k("circle", {
|
|
62
47
|
cx: "-266",
|
|
63
48
|
cy: "375.9",
|
|
64
49
|
r: "14",
|
|
65
50
|
fill: e
|
|
66
51
|
}),
|
|
67
|
-
/* @__PURE__ */
|
|
52
|
+
/* @__PURE__ */ k("path", {
|
|
68
53
|
d: "M-280.5,375.9c0-8,6.5-14.5,14.5-14.5s14.5,6.5,14.5,14.5s-6.5,14.5-14.5,14.5S-280.5,383.9-280.5,375.9z\n M-279.5,375.9c0,7.4,6.1,13.5,13.5,13.5c7.4,0,13.5-6.1,13.5-13.5s-6.1-13.5-13.5-13.5C-273.4,362.4-279.5,368.5-279.5,375.9z",
|
|
69
54
|
fill: e
|
|
70
55
|
}),
|
|
71
|
-
/* @__PURE__ */
|
|
56
|
+
/* @__PURE__ */ k("polygon", {
|
|
72
57
|
points: "-265.4,383.1 -258.6,377.2 -261.2,374.2 -264.3,376.9 -268.9,368.7 -272.4,370.6",
|
|
73
58
|
fill: t
|
|
74
59
|
})
|
|
75
60
|
]
|
|
76
61
|
});
|
|
77
|
-
|
|
78
|
-
bgFill:
|
|
79
|
-
fgFill:
|
|
62
|
+
oe.propTypes = {
|
|
63
|
+
bgFill: M.default.string.isRequired,
|
|
64
|
+
fgFill: M.default.string.isRequired
|
|
80
65
|
};
|
|
81
|
-
var
|
|
66
|
+
var se = ({ bgFill: e, fgFill: t, borderFill: n }) => /* @__PURE__ */ A("svg", {
|
|
82
67
|
preserveAspectRatio: "xMinYMin meet",
|
|
83
68
|
version: "1.1",
|
|
84
69
|
viewBox: "-129.5 127 34 35",
|
|
85
70
|
style: { enableBackground: "new -129.5 127 34 35" },
|
|
86
71
|
children: [
|
|
87
|
-
/* @__PURE__ */
|
|
72
|
+
/* @__PURE__ */ k("path", {
|
|
88
73
|
style: {
|
|
89
74
|
fill: "#D0CAC5",
|
|
90
75
|
stroke: "#E6E3E0",
|
|
@@ -93,7 +78,7 @@ var I = ({ bgFill: e, fgFill: t, borderFill: n }) => /* @__PURE__ */ j("svg", {
|
|
|
93
78
|
},
|
|
94
79
|
d: "M-112.9,160.4c-8.5,0-15.5-6.9-15.5-15.5c0-8.5,6.9-15.5,15.5-15.5s15.5,6.9,15.5,15.5\n C-97.4,153.5-104.3,160.4-112.9,160.4z"
|
|
95
80
|
}),
|
|
96
|
-
/* @__PURE__ */
|
|
81
|
+
/* @__PURE__ */ k("path", {
|
|
97
82
|
style: {
|
|
98
83
|
fill: "#B3ABA4",
|
|
99
84
|
stroke: "#CDC7C2",
|
|
@@ -102,48 +87,48 @@ var I = ({ bgFill: e, fgFill: t, borderFill: n }) => /* @__PURE__ */ j("svg", {
|
|
|
102
87
|
},
|
|
103
88
|
d: "M-113.2,159c-8,0-14.5-6.5-14.5-14.5s6.5-14.5,14.5-14.5s14.5,6.5,14.5,14.5S-105.2,159-113.2,159z"
|
|
104
89
|
}),
|
|
105
|
-
/* @__PURE__ */
|
|
90
|
+
/* @__PURE__ */ k("circle", {
|
|
106
91
|
cx: "-114.2",
|
|
107
92
|
cy: "143.5",
|
|
108
93
|
r: "14",
|
|
109
94
|
fill: e
|
|
110
95
|
}),
|
|
111
|
-
/* @__PURE__ */
|
|
96
|
+
/* @__PURE__ */ k("path", {
|
|
112
97
|
d: "M-114.2,158c-8,0-14.5-6.5-14.5-14.5s6.5-14.5,14.5-14.5s14.5,6.5,14.5,14.5S-106.2,158-114.2,158z\n M-114.2,130c-7.4,0-13.5,6.1-13.5,13.5s6.1,13.5,13.5,13.5s13.5-6.1,13.5-13.5S-106.8,130-114.2,130z",
|
|
113
98
|
fill: n
|
|
114
99
|
}),
|
|
115
|
-
/* @__PURE__ */
|
|
100
|
+
/* @__PURE__ */ k("polygon", {
|
|
116
101
|
points: "-114.8,150.7 -121.6,144.8 -119,141.8 -115.9,144.5 -111.3,136.3 -107.8,138.2",
|
|
117
102
|
fill: t
|
|
118
103
|
})
|
|
119
104
|
]
|
|
120
105
|
});
|
|
121
|
-
|
|
122
|
-
bgFill:
|
|
123
|
-
fgFill:
|
|
124
|
-
borderFill:
|
|
106
|
+
se.propTypes = {
|
|
107
|
+
bgFill: M.default.string.isRequired,
|
|
108
|
+
fgFill: M.default.string.isRequired,
|
|
109
|
+
borderFill: M.default.string.isRequired
|
|
125
110
|
};
|
|
126
|
-
var
|
|
111
|
+
var ce = y("div")(({ size: e }) => ({
|
|
127
112
|
width: e || "25px",
|
|
128
113
|
height: e || "25px"
|
|
129
|
-
})),
|
|
114
|
+
})), N = ({ open: e, size: t }) => /* @__PURE__ */ k(ce, {
|
|
130
115
|
size: t,
|
|
131
|
-
children: e ? /* @__PURE__ */
|
|
116
|
+
children: e ? /* @__PURE__ */ k(oe, {
|
|
132
117
|
bgFill: "#bce2ff",
|
|
133
118
|
fgFill: "#1a9cff"
|
|
134
|
-
}) : /* @__PURE__ */
|
|
119
|
+
}) : /* @__PURE__ */ k(se, {
|
|
135
120
|
bgFill: "white",
|
|
136
121
|
fgFill: "#1a9cff",
|
|
137
122
|
borderFill: "#bce2ff"
|
|
138
123
|
})
|
|
139
124
|
});
|
|
140
|
-
|
|
141
|
-
open:
|
|
142
|
-
size:
|
|
143
|
-
},
|
|
125
|
+
N.propTypes = {
|
|
126
|
+
open: M.default.bool,
|
|
127
|
+
size: M.default.string
|
|
128
|
+
}, N.defaultProps = { open: !1 };
|
|
144
129
|
//#endregion
|
|
145
130
|
//#region ../../lib-react/correct-answer-toggle/dist/expander.js
|
|
146
|
-
var
|
|
131
|
+
var le = "height ease-in 300ms, opacity ease-in 300ms", ue = y("div")(() => ({
|
|
147
132
|
position: "relative",
|
|
148
133
|
height: 0,
|
|
149
134
|
overflow: "hidden",
|
|
@@ -151,7 +136,7 @@ var R = "height ease-in 300ms, opacity ease-in 300ms", ye = C("div")(() => ({
|
|
|
151
136
|
visibility: "hidden",
|
|
152
137
|
width: 0,
|
|
153
138
|
"&.enter": {
|
|
154
|
-
transition:
|
|
139
|
+
transition: le,
|
|
155
140
|
opacity: 1,
|
|
156
141
|
height: "auto",
|
|
157
142
|
width: "auto",
|
|
@@ -165,7 +150,7 @@ var R = "height ease-in 300ms, opacity ease-in 300ms", ye = C("div")(() => ({
|
|
|
165
150
|
minHeight: "25px"
|
|
166
151
|
},
|
|
167
152
|
"&.exit": {
|
|
168
|
-
transition:
|
|
153
|
+
transition: le,
|
|
169
154
|
opacity: 0,
|
|
170
155
|
height: 0,
|
|
171
156
|
visibility: "visible",
|
|
@@ -177,9 +162,9 @@ var R = "height ease-in 300ms, opacity ease-in 300ms", ye = C("div")(() => ({
|
|
|
177
162
|
height: 0,
|
|
178
163
|
width: 0
|
|
179
164
|
}
|
|
180
|
-
})),
|
|
181
|
-
let { show: t, children: n, className: r } = e, i =
|
|
182
|
-
return /* @__PURE__ */
|
|
165
|
+
})), de = (e) => {
|
|
166
|
+
let { show: t, children: n, className: r } = e, i = ne(null);
|
|
167
|
+
return /* @__PURE__ */ k(m, {
|
|
183
168
|
nodeRef: i,
|
|
184
169
|
in: t,
|
|
185
170
|
appear: !0,
|
|
@@ -191,49 +176,49 @@ var R = "height ease-in 300ms, opacity ease-in 300ms", ye = C("div")(() => ({
|
|
|
191
176
|
exit: "exit",
|
|
192
177
|
exitDone: "exit-done"
|
|
193
178
|
},
|
|
194
|
-
children: /* @__PURE__ */
|
|
179
|
+
children: /* @__PURE__ */ k(ue, {
|
|
195
180
|
ref: i,
|
|
196
181
|
className: r,
|
|
197
182
|
children: n
|
|
198
183
|
})
|
|
199
184
|
});
|
|
200
185
|
};
|
|
201
|
-
|
|
202
|
-
show:
|
|
203
|
-
className:
|
|
204
|
-
children:
|
|
186
|
+
de.propTypes = {
|
|
187
|
+
show: M.default.bool.isRequired,
|
|
188
|
+
className: M.default.string,
|
|
189
|
+
children: M.default.oneOfType([M.default.arrayOf(M.default.node), M.default.node]).isRequired
|
|
205
190
|
};
|
|
206
191
|
//#endregion
|
|
207
192
|
//#region ../../lib-react/correct-answer-toggle/dist/index.js
|
|
208
|
-
function
|
|
193
|
+
function P(e) {
|
|
209
194
|
return typeof e == "function" || typeof e == "object" && !!e && typeof e.$$typeof == "symbol";
|
|
210
195
|
}
|
|
211
|
-
function
|
|
212
|
-
return !e ||
|
|
196
|
+
function F(e, t) {
|
|
197
|
+
return !e || P(e) ? e : P(e.default) ? e.default : t && P(e[t]) ? e[t] : t && P(e[t]?.default) ? e[t].default : e;
|
|
213
198
|
}
|
|
214
|
-
var
|
|
199
|
+
var fe = F(_, "Readable") || F(pe.Readable, "Readable"), I = b, L = I.default, pe = L && typeof L == "object" ? L : I, { translator: R } = E, me = {
|
|
215
200
|
WebkitTouchCallout: "none",
|
|
216
201
|
WebkitUserSelect: "none",
|
|
217
202
|
KhtmlUserSelect: "none",
|
|
218
203
|
MozUserSelect: "none",
|
|
219
204
|
msUserSelect: "none",
|
|
220
205
|
userSelect: "none"
|
|
221
|
-
},
|
|
206
|
+
}, he = y("div")(() => ({
|
|
222
207
|
width: "100%",
|
|
223
208
|
cursor: "pointer"
|
|
224
|
-
})),
|
|
209
|
+
})), ge = y("div")(() => ({
|
|
225
210
|
margin: "0 auto",
|
|
226
211
|
textAlign: "center",
|
|
227
212
|
display: "flex"
|
|
228
|
-
})),
|
|
213
|
+
})), _e = y("div")(() => ({
|
|
229
214
|
width: "fit-content",
|
|
230
215
|
minWidth: "140px",
|
|
231
216
|
alignSelf: "center",
|
|
232
217
|
verticalAlign: "middle",
|
|
233
|
-
color: `var(--correct-answer-toggle-label-color, ${
|
|
218
|
+
color: `var(--correct-answer-toggle-label-color, ${v.text()})`,
|
|
234
219
|
fontWeight: "normal",
|
|
235
|
-
...
|
|
236
|
-
})),
|
|
220
|
+
...me
|
|
221
|
+
})), z = y("div")(() => ({
|
|
237
222
|
position: "absolute",
|
|
238
223
|
width: "25px",
|
|
239
224
|
"&.enter": { opacity: "0" },
|
|
@@ -246,20 +231,20 @@ var xe = be(ie, "Readable") || be(Ce.Readable, "Readable"), Se = D, V = Se.defau
|
|
|
246
231
|
opacity: "0",
|
|
247
232
|
transition: "opacity 0.3s ease-in"
|
|
248
233
|
}
|
|
249
|
-
})),
|
|
234
|
+
})), ve = y("div")(() => ({
|
|
250
235
|
width: "25px",
|
|
251
236
|
marginRight: "5px",
|
|
252
237
|
display: "flex",
|
|
253
238
|
alignItems: "center"
|
|
254
|
-
})),
|
|
239
|
+
})), ye = class e extends D.Component {
|
|
255
240
|
static propTypes = {
|
|
256
|
-
onToggle:
|
|
257
|
-
toggled:
|
|
258
|
-
show:
|
|
259
|
-
hideMessage:
|
|
260
|
-
showMessage:
|
|
261
|
-
className:
|
|
262
|
-
language:
|
|
241
|
+
onToggle: M.default.func,
|
|
242
|
+
toggled: M.default.bool,
|
|
243
|
+
show: M.default.bool,
|
|
244
|
+
hideMessage: M.default.string,
|
|
245
|
+
showMessage: M.default.string,
|
|
246
|
+
className: M.default.string,
|
|
247
|
+
language: M.default.string
|
|
263
248
|
};
|
|
264
249
|
static defaultProps = {
|
|
265
250
|
showMessage: "Show correct answer",
|
|
@@ -268,10 +253,10 @@ var xe = be(ie, "Readable") || be(Ce.Readable, "Readable"), Se = D, V = Se.defau
|
|
|
268
253
|
toggled: !1
|
|
269
254
|
};
|
|
270
255
|
constructor(t) {
|
|
271
|
-
super(t), this.state = { show: t.show }, this.openIconRef =
|
|
256
|
+
super(t), this.state = { show: t.show }, this.openIconRef = D.createRef(), this.closedIconRef = D.createRef(), e.defaultProps = {
|
|
272
257
|
...e.defaultProps,
|
|
273
|
-
showMessage:
|
|
274
|
-
hideMessage:
|
|
258
|
+
showMessage: R.t("common:showCorrectAnswer", { lng: t.language }),
|
|
259
|
+
hideMessage: R.t("common:hideCorrectAnswer", { lng: t.language })
|
|
275
260
|
};
|
|
276
261
|
}
|
|
277
262
|
onClick() {
|
|
@@ -283,20 +268,20 @@ var xe = be(ie, "Readable") || be(Ce.Readable, "Readable"), Se = D, V = Se.defau
|
|
|
283
268
|
UNSAFE_componentWillReceiveProps(t) {
|
|
284
269
|
this.setState({ show: t.show }), t.language !== this.props?.language && (e.defaultProps = {
|
|
285
270
|
...e.defaultProps,
|
|
286
|
-
showMessage:
|
|
287
|
-
hideMessage:
|
|
271
|
+
showMessage: R.t("common:showCorrectAnswer", { lng: t.language }),
|
|
272
|
+
hideMessage: R.t("common:hideCorrectAnswer", { lng: t.language })
|
|
288
273
|
});
|
|
289
274
|
}
|
|
290
275
|
render() {
|
|
291
276
|
let { className: e, toggled: t, hideMessage: n, showMessage: r } = this.props;
|
|
292
|
-
return /* @__PURE__ */
|
|
277
|
+
return /* @__PURE__ */ k(he, {
|
|
293
278
|
className: e,
|
|
294
|
-
children: /* @__PURE__ */
|
|
279
|
+
children: /* @__PURE__ */ k(de, {
|
|
295
280
|
show: this.state.show,
|
|
296
|
-
children: /* @__PURE__ */
|
|
281
|
+
children: /* @__PURE__ */ A(ge, {
|
|
297
282
|
onClick: this.onClick.bind(this),
|
|
298
283
|
onTouchEnd: this.onTouch.bind(this),
|
|
299
|
-
children: [/* @__PURE__ */
|
|
284
|
+
children: [/* @__PURE__ */ A(ve, { children: [/* @__PURE__ */ k(m, {
|
|
300
285
|
nodeRef: this.openIconRef,
|
|
301
286
|
timeout: 400,
|
|
302
287
|
in: t,
|
|
@@ -307,11 +292,11 @@ var xe = be(ie, "Readable") || be(Ce.Readable, "Readable"), Se = D, V = Se.defau
|
|
|
307
292
|
exit: "exit",
|
|
308
293
|
exitActive: "exit-active"
|
|
309
294
|
},
|
|
310
|
-
children: /* @__PURE__ */
|
|
295
|
+
children: /* @__PURE__ */ k(z, {
|
|
311
296
|
ref: this.openIconRef,
|
|
312
|
-
children: /* @__PURE__ */
|
|
297
|
+
children: /* @__PURE__ */ k(N, { open: t }, "correct-open")
|
|
313
298
|
})
|
|
314
|
-
}), /* @__PURE__ */
|
|
299
|
+
}), /* @__PURE__ */ k(m, {
|
|
315
300
|
nodeRef: this.closedIconRef,
|
|
316
301
|
timeout: 5e3,
|
|
317
302
|
in: !t,
|
|
@@ -322,13 +307,13 @@ var xe = be(ie, "Readable") || be(Ce.Readable, "Readable"), Se = D, V = Se.defau
|
|
|
322
307
|
exit: "exit",
|
|
323
308
|
exitActive: "exit-active"
|
|
324
309
|
},
|
|
325
|
-
children: /* @__PURE__ */
|
|
310
|
+
children: /* @__PURE__ */ k(z, {
|
|
326
311
|
ref: this.closedIconRef,
|
|
327
|
-
children: /* @__PURE__ */
|
|
312
|
+
children: /* @__PURE__ */ k(N, { open: t }, "correct-closed")
|
|
328
313
|
})
|
|
329
|
-
})] }), /* @__PURE__ */
|
|
314
|
+
})] }), /* @__PURE__ */ k(fe, {
|
|
330
315
|
false: !0,
|
|
331
|
-
children: /* @__PURE__ */
|
|
316
|
+
children: /* @__PURE__ */ k(_e, {
|
|
332
317
|
"aria-hidden": !this.state.show,
|
|
333
318
|
children: t ? n : r
|
|
334
319
|
})
|
|
@@ -337,7 +322,25 @@ var xe = be(ie, "Readable") || be(Ce.Readable, "Readable"), Se = D, V = Se.defau
|
|
|
337
322
|
})
|
|
338
323
|
});
|
|
339
324
|
}
|
|
340
|
-
}
|
|
325
|
+
};
|
|
326
|
+
//#endregion
|
|
327
|
+
//#region ../../lib-react/drag/dist/node_modules/.bun/clsx@2.1.1/node_modules/clsx/dist/clsx.js
|
|
328
|
+
function B(e) {
|
|
329
|
+
var t, n, r = "";
|
|
330
|
+
if (typeof e == "string" || typeof e == "number") r += e;
|
|
331
|
+
else if (typeof e == "object") if (Array.isArray(e)) {
|
|
332
|
+
var i = e.length;
|
|
333
|
+
for (t = 0; t < i; t++) e[t] && (n = B(e[t])) && (r && (r += " "), r += n);
|
|
334
|
+
} else for (n in e) e[n] && (r && (r += " "), r += n);
|
|
335
|
+
return r;
|
|
336
|
+
}
|
|
337
|
+
function V() {
|
|
338
|
+
for (var e, t, n = 0, r = "", i = arguments.length; n < i; n++) (e = arguments[n]) && (t = B(e)) && (r && (r += " "), r += t);
|
|
339
|
+
return r;
|
|
340
|
+
}
|
|
341
|
+
//#endregion
|
|
342
|
+
//#region ../../lib-react/drag/dist/placeholder.js
|
|
343
|
+
var be = y("div")(({ theme: e }) => ({
|
|
341
344
|
"&.placeholder": {
|
|
342
345
|
WebkitTouchCallout: "none",
|
|
343
346
|
WebkitUserSelect: "none",
|
|
@@ -347,22 +350,22 @@ var xe = be(ie, "Readable") || be(Ce.Readable, "Readable"), Se = D, V = Se.defau
|
|
|
347
350
|
userSelect: "none",
|
|
348
351
|
width: "100%",
|
|
349
352
|
height: "100%",
|
|
350
|
-
background:
|
|
353
|
+
background: v.white(),
|
|
351
354
|
transition: "background-color 200ms linear, border-color 200ms linear",
|
|
352
355
|
boxSizing: "border-box",
|
|
353
356
|
display: "grid",
|
|
354
357
|
gridRowGap: e.spacing(1),
|
|
355
358
|
gridColumnGap: e.spacing(1),
|
|
356
359
|
padding: e.spacing(1),
|
|
357
|
-
border: `2px dashed ${
|
|
360
|
+
border: `2px dashed ${v.black()}`
|
|
358
361
|
},
|
|
359
362
|
"&.disabled": {
|
|
360
363
|
boxShadow: "none",
|
|
361
364
|
background: e.palette.background.paper
|
|
362
365
|
},
|
|
363
366
|
"&.over": {
|
|
364
|
-
border: `1px solid ${
|
|
365
|
-
backgroundColor: `${
|
|
367
|
+
border: `1px solid ${T[500]}`,
|
|
368
|
+
backgroundColor: `${T[300]}`
|
|
366
369
|
},
|
|
367
370
|
"&.board": {
|
|
368
371
|
padding: e.spacing(1),
|
|
@@ -373,7 +376,7 @@ var xe = be(ie, "Readable") || be(Ce.Readable, "Readable"), Se = D, V = Se.defau
|
|
|
373
376
|
justifyContent: "center",
|
|
374
377
|
overflow: "hidden",
|
|
375
378
|
touchAction: "none",
|
|
376
|
-
backgroundColor:
|
|
379
|
+
backgroundColor: v.backgroundDark()
|
|
377
380
|
},
|
|
378
381
|
"&.categorizeBoard": {
|
|
379
382
|
padding: e.spacing(.5),
|
|
@@ -384,67 +387,67 @@ var xe = be(ie, "Readable") || be(Ce.Readable, "Readable"), Se = D, V = Se.defau
|
|
|
384
387
|
justifyContent: "center",
|
|
385
388
|
overflow: "hidden",
|
|
386
389
|
touchAction: "none",
|
|
387
|
-
backgroundColor:
|
|
390
|
+
backgroundColor: v.backgroundDark()
|
|
388
391
|
},
|
|
389
392
|
"&.verticalPool": {
|
|
390
393
|
display: "flex",
|
|
391
394
|
flexFlow: "column wrap"
|
|
392
395
|
}
|
|
393
|
-
})),
|
|
394
|
-
let { children: t, className: n, isOver: r, type: i, grid: a, disabled: o, choiceBoard: s, isCategorize: c, isVerticalPool: l, minHeight: u, extraStyles: d } = e, f = (
|
|
396
|
+
})), H = (e) => {
|
|
397
|
+
let { children: t, className: n, isOver: r, type: i, grid: a, disabled: o, choiceBoard: s, isCategorize: c, isVerticalPool: l, minHeight: u, extraStyles: d } = e, f = V("placeholder", o && "disabled", r && "over", i, n), p = {};
|
|
395
398
|
if (a && a.columns && (p.gridTemplateColumns = `repeat(${a.columns}, 1fr)`), a && a.rows) {
|
|
396
399
|
let e = a.rowsRepeatValue || "1fr";
|
|
397
400
|
p.gridTemplateRows = `repeat(${a.rows}, ${e})`;
|
|
398
401
|
}
|
|
399
|
-
i === "choice" && (p.border = `1px solid ${
|
|
402
|
+
i === "choice" && (p.border = `1px solid ${v.borderLight()}`, p.background = v.backgroundDark());
|
|
400
403
|
let m = c ? "categorizeBoard" : "board";
|
|
401
|
-
return /* @__PURE__ */
|
|
404
|
+
return /* @__PURE__ */ k(be, {
|
|
402
405
|
style: {
|
|
403
406
|
...p,
|
|
404
407
|
minHeight: u,
|
|
405
408
|
...d
|
|
406
409
|
},
|
|
407
|
-
className: (
|
|
410
|
+
className: V(s ? m : f, l && "verticalPool"),
|
|
408
411
|
children: t
|
|
409
412
|
});
|
|
410
413
|
};
|
|
411
|
-
|
|
412
|
-
choiceBoard:
|
|
413
|
-
grid:
|
|
414
|
-
columns:
|
|
415
|
-
rows:
|
|
416
|
-
rowsRepeatValue:
|
|
414
|
+
H.propTypes = {
|
|
415
|
+
choiceBoard: M.default.bool,
|
|
416
|
+
grid: M.default.shape({
|
|
417
|
+
columns: M.default.number,
|
|
418
|
+
rows: M.default.number,
|
|
419
|
+
rowsRepeatValue: M.default.string
|
|
417
420
|
}),
|
|
418
|
-
children:
|
|
419
|
-
className:
|
|
420
|
-
isOver:
|
|
421
|
-
index:
|
|
422
|
-
type:
|
|
423
|
-
disabled:
|
|
424
|
-
isCategorize:
|
|
425
|
-
isVerticalPool:
|
|
426
|
-
minHeight:
|
|
421
|
+
children: M.default.oneOfType([M.default.arrayOf(M.default.node), M.default.node]).isRequired,
|
|
422
|
+
className: M.default.string,
|
|
423
|
+
isOver: M.default.bool,
|
|
424
|
+
index: M.default.number,
|
|
425
|
+
type: M.default.string,
|
|
426
|
+
disabled: M.default.bool,
|
|
427
|
+
isCategorize: M.default.bool,
|
|
428
|
+
isVerticalPool: M.default.bool,
|
|
429
|
+
minHeight: M.default.number
|
|
427
430
|
};
|
|
428
431
|
//#endregion
|
|
429
432
|
//#region src/delivery/tile.tsx
|
|
430
|
-
var
|
|
433
|
+
var xe = (0, j.default)("pie-elements:placement-ordering:tile"), Se = y("div")(({ theme: e }) => ({
|
|
431
434
|
width: "100%",
|
|
432
435
|
fontSize: e.typography.fontSize + 4,
|
|
433
436
|
textAlign: "center",
|
|
434
437
|
color: `rgba(${e.palette.common.black}, 0.6)`
|
|
435
|
-
})), U = ({ type: e, index: t, isOver: n, disabled: r }) => /* @__PURE__ */
|
|
438
|
+
})), U = ({ type: e, index: t, isOver: n, disabled: r }) => /* @__PURE__ */ k(H, {
|
|
436
439
|
type: e,
|
|
437
440
|
isOver: n,
|
|
438
441
|
disabled: r,
|
|
439
|
-
children: e === "target" && t !== void 0 && /* @__PURE__ */
|
|
442
|
+
children: e === "target" && t !== void 0 && /* @__PURE__ */ k(Se, { children: t })
|
|
440
443
|
});
|
|
441
444
|
U.propTypes = {
|
|
442
|
-
type:
|
|
443
|
-
index:
|
|
444
|
-
isOver:
|
|
445
|
-
disabled:
|
|
445
|
+
type: M.default.string,
|
|
446
|
+
index: M.default.number,
|
|
447
|
+
isOver: M.default.bool,
|
|
448
|
+
disabled: M.default.bool
|
|
446
449
|
};
|
|
447
|
-
var
|
|
450
|
+
var Ce = y("div")(({ theme: e, isDragging: t, isOver: n, disabled: r, outcome: i, label: a, type: o }) => ({
|
|
448
451
|
cursor: r ? "not-allowed" : "grab",
|
|
449
452
|
width: "100%",
|
|
450
453
|
height: "100%",
|
|
@@ -452,25 +455,25 @@ var Ie = C("div")(({ theme: e, isDragging: t, isOver: n, disabled: r, outcome: i
|
|
|
452
455
|
boxSizing: "border-box",
|
|
453
456
|
overflow: "hidden",
|
|
454
457
|
border: o === "choice" || o === "target" ? `1px solid ${e.palette.grey[400]}` : "1px solid transparent",
|
|
455
|
-
backgroundColor: o === "choice" || o === "target" ?
|
|
458
|
+
backgroundColor: o === "choice" || o === "target" ? v.background() : "transparent",
|
|
456
459
|
transition: o === "choice" || o === "target" ? "background-color 150ms ease, border-color 150ms ease, opacity 150ms ease" : "none",
|
|
457
460
|
pointerEvents: "none",
|
|
458
461
|
userSelect: "none",
|
|
459
462
|
...(o === "choice" || o === "target") && { "&:hover": {
|
|
460
|
-
backgroundColor: r ?
|
|
463
|
+
backgroundColor: r ? v.background() : v.secondary(),
|
|
461
464
|
borderColor: r ? e.palette.grey[400] : e.palette.primary.main,
|
|
462
465
|
transform: r ? "none" : "scale(1.02)"
|
|
463
466
|
} },
|
|
464
467
|
...(o === "choice" || o === "target") && n && !r && {
|
|
465
468
|
opacity: .4,
|
|
466
|
-
backgroundColor:
|
|
469
|
+
backgroundColor: v.primaryLight(),
|
|
467
470
|
borderColor: e.palette.primary.main,
|
|
468
471
|
borderStyle: "dashed",
|
|
469
472
|
transform: "scale(1.05)"
|
|
470
473
|
},
|
|
471
474
|
...(o === "choice" || o === "target") && t && !r && {
|
|
472
475
|
opacity: .6,
|
|
473
|
-
backgroundColor:
|
|
476
|
+
backgroundColor: v.secondaryLight(),
|
|
474
477
|
transform: "scale(1.05) rotate(2deg)",
|
|
475
478
|
boxShadow: "0 8px 16px rgba(0,0,0,0.2)",
|
|
476
479
|
cursor: "grabbing"
|
|
@@ -478,24 +481,24 @@ var Ie = C("div")(({ theme: e, isDragging: t, isOver: n, disabled: r, outcome: i
|
|
|
478
481
|
...(o === "choice" || o === "target") && r && {
|
|
479
482
|
cursor: "not-allowed",
|
|
480
483
|
"&:hover": {
|
|
481
|
-
backgroundColor:
|
|
484
|
+
backgroundColor: v.background(),
|
|
482
485
|
transform: "none"
|
|
483
486
|
}
|
|
484
487
|
},
|
|
485
|
-
...(o === "choice" || o === "target") && i === "incorrect" && { border: `1px solid ${
|
|
486
|
-
...(o === "choice" || o === "target") && i === "correct" && { border: `1px solid ${
|
|
488
|
+
...(o === "choice" || o === "target") && i === "incorrect" && { border: `1px solid ${v.incorrect()}` },
|
|
489
|
+
...(o === "choice" || o === "target") && i === "correct" && { border: `1px solid ${v.correct()}` },
|
|
487
490
|
...!a && {
|
|
488
491
|
border: "none",
|
|
489
492
|
"&:hover": { backgroundColor: "unset" }
|
|
490
493
|
}
|
|
491
|
-
})),
|
|
494
|
+
})), we = (e) => {
|
|
492
495
|
let { type: t, isDragging: n, empty: r, isOver: i, label: a, disabled: o, outcome: s, guideIndex: c } = e;
|
|
493
|
-
return r ? /* @__PURE__ */
|
|
496
|
+
return r ? /* @__PURE__ */ k(U, {
|
|
494
497
|
type: t,
|
|
495
498
|
index: c,
|
|
496
499
|
isOver: i,
|
|
497
500
|
disabled: o
|
|
498
|
-
}) : /* @__PURE__ */
|
|
501
|
+
}) : /* @__PURE__ */ k(Ce, {
|
|
499
502
|
type: t,
|
|
500
503
|
isDragging: n,
|
|
501
504
|
isOver: i,
|
|
@@ -505,7 +508,7 @@ var Ie = C("div")(({ theme: e, isDragging: t, isOver: n, disabled: r, outcome: i
|
|
|
505
508
|
dangerouslySetInnerHTML: { __html: a }
|
|
506
509
|
});
|
|
507
510
|
}, W = (e) => {
|
|
508
|
-
let { label: t, type: n, id: r, empty: i, disabled: a, outcome: o, index: s, guideIndex: c, instanceId: l, draggable: u, tileIndex: d } = e, f = `tile-${n}-${r ?? "empty"}-${d}-${l}`, p = `drop-${n}-${r ?? "empty"}-${d}-${l}`, { attributes: m, listeners:
|
|
511
|
+
let { label: t, type: n, id: r, empty: i, disabled: a, outcome: o, index: s, guideIndex: c, instanceId: l, draggable: u, tileIndex: d } = e, f = `tile-${n}-${r ?? "empty"}-${d}-${l}`, p = `drop-${n}-${r ?? "empty"}-${d}-${l}`, { attributes: m, listeners: _, setNodeRef: v, transform: y, isDragging: b } = h({
|
|
509
512
|
id: f,
|
|
510
513
|
data: {
|
|
511
514
|
id: r,
|
|
@@ -515,7 +518,7 @@ var Ie = C("div")(({ theme: e, isDragging: t, isOver: n, disabled: r, outcome: i
|
|
|
515
518
|
index: s
|
|
516
519
|
},
|
|
517
520
|
disabled: !u || a
|
|
518
|
-
}), { setNodeRef:
|
|
521
|
+
}), { setNodeRef: x, isOver: S } = g({
|
|
519
522
|
id: p,
|
|
520
523
|
data: {
|
|
521
524
|
id: r,
|
|
@@ -524,43 +527,43 @@ var Ie = C("div")(({ theme: e, isDragging: t, isOver: n, disabled: r, outcome: i
|
|
|
524
527
|
value: t,
|
|
525
528
|
index: s
|
|
526
529
|
},
|
|
527
|
-
disabled:
|
|
528
|
-
}),
|
|
529
|
-
return
|
|
530
|
-
let e =
|
|
530
|
+
disabled: b
|
|
531
|
+
}), C = D.useRef(null);
|
|
532
|
+
return D.useEffect(() => {
|
|
533
|
+
let e = C.current, t = (e) => {
|
|
531
534
|
e.preventDefault();
|
|
532
535
|
};
|
|
533
536
|
return e && e.addEventListener("touchstart", t, { passive: !1 }), () => {
|
|
534
537
|
e && e.removeEventListener("touchstart", t);
|
|
535
538
|
};
|
|
536
|
-
}, []),
|
|
539
|
+
}, []), xe("[render], props: ", e), /* @__PURE__ */ k("div", {
|
|
537
540
|
ref: (e) => {
|
|
538
|
-
|
|
541
|
+
C.current = e, v(e), x(e);
|
|
539
542
|
},
|
|
540
543
|
style: {
|
|
541
|
-
transform:
|
|
544
|
+
transform: y ? `translate3d(${y.x}px, ${y.y}px, 0)` : void 0,
|
|
542
545
|
boxSizing: "border-box",
|
|
543
546
|
overflow: "visible",
|
|
544
547
|
padding: 0,
|
|
545
548
|
margin: 0,
|
|
546
549
|
textAlign: "center",
|
|
547
550
|
pointerEvents: "auto",
|
|
548
|
-
cursor: a ? "not-allowed" :
|
|
549
|
-
zIndex:
|
|
550
|
-
willChange:
|
|
551
|
+
cursor: a ? "not-allowed" : b ? "grabbing" : "grab",
|
|
552
|
+
zIndex: b ? 1e3 : "auto",
|
|
553
|
+
willChange: b ? "transform" : "auto"
|
|
551
554
|
},
|
|
552
555
|
...u && !a ? {
|
|
553
|
-
...
|
|
556
|
+
..._,
|
|
554
557
|
...m
|
|
555
558
|
} : {},
|
|
556
|
-
children: /* @__PURE__ */
|
|
559
|
+
children: /* @__PURE__ */ k(we, {
|
|
557
560
|
label: t,
|
|
558
561
|
id: r,
|
|
559
562
|
empty: i,
|
|
560
563
|
index: s,
|
|
561
564
|
guideIndex: c,
|
|
562
|
-
isOver:
|
|
563
|
-
isDragging:
|
|
565
|
+
isOver: S,
|
|
566
|
+
isDragging: b,
|
|
564
567
|
disabled: a,
|
|
565
568
|
outcome: o,
|
|
566
569
|
type: n
|
|
@@ -568,125 +571,125 @@ var Ie = C("div")(({ theme: e, isDragging: t, isOver: n, disabled: r, outcome: i
|
|
|
568
571
|
});
|
|
569
572
|
};
|
|
570
573
|
W.propTypes = {
|
|
571
|
-
id:
|
|
572
|
-
label:
|
|
573
|
-
isOver:
|
|
574
|
-
type:
|
|
575
|
-
empty:
|
|
576
|
-
disabled:
|
|
577
|
-
outcome:
|
|
578
|
-
index:
|
|
579
|
-
guideIndex:
|
|
580
|
-
instanceId:
|
|
581
|
-
draggable:
|
|
582
|
-
tileIndex:
|
|
574
|
+
id: M.default.any,
|
|
575
|
+
label: M.default.string,
|
|
576
|
+
isOver: M.default.bool,
|
|
577
|
+
type: M.default.string,
|
|
578
|
+
empty: M.default.bool,
|
|
579
|
+
disabled: M.default.bool,
|
|
580
|
+
outcome: M.default.string,
|
|
581
|
+
index: M.default.number,
|
|
582
|
+
guideIndex: M.default.number,
|
|
583
|
+
instanceId: M.default.any,
|
|
584
|
+
draggable: M.default.bool,
|
|
585
|
+
tileIndex: M.default.number
|
|
583
586
|
};
|
|
584
587
|
//#endregion
|
|
585
588
|
//#region src/delivery/tiler.tsx
|
|
586
589
|
var G = {
|
|
587
|
-
choiceLabel:
|
|
588
|
-
targetLabel:
|
|
589
|
-
disabled:
|
|
590
|
-
tiles:
|
|
591
|
-
tileSize:
|
|
592
|
-
addGuide:
|
|
593
|
-
},
|
|
590
|
+
choiceLabel: M.default.string,
|
|
591
|
+
targetLabel: M.default.string,
|
|
592
|
+
disabled: M.default.bool,
|
|
593
|
+
tiles: M.default.array.isRequired,
|
|
594
|
+
tileSize: M.default.string,
|
|
595
|
+
addGuide: M.default.bool
|
|
596
|
+
}, Te = {
|
|
594
597
|
tileSize: "1fr",
|
|
595
598
|
disabled: !1,
|
|
596
599
|
addGuide: !1
|
|
597
|
-
},
|
|
598
|
-
let t = (t, n) => (t.instanceId = e.instanceId, t.disabled = e.disabled, t.guideIndex = e.addGuide ? t.index + 1 : void 0, t.tileIndex = n, e.includeTargets || t.type === "choice" ? /* @__PURE__ */
|
|
600
|
+
}, Ee = (e) => {
|
|
601
|
+
let t = (t, n) => (t.instanceId = e.instanceId, t.disabled = e.disabled, t.guideIndex = e.addGuide ? t.index + 1 : void 0, t.tileIndex = n, e.includeTargets || t.type === "choice" ? /* @__PURE__ */ O(W, {
|
|
599
602
|
...t,
|
|
600
603
|
key: n
|
|
601
|
-
}) : /* @__PURE__ */
|
|
604
|
+
}) : /* @__PURE__ */ O(W, {
|
|
602
605
|
...t,
|
|
603
606
|
label: "",
|
|
604
607
|
key: n
|
|
605
608
|
}));
|
|
606
609
|
return t.propTypes = { ...G }, t;
|
|
607
|
-
},
|
|
610
|
+
}, De = y("div")(({ theme: e, includeTargets: t }) => ({
|
|
608
611
|
display: "grid",
|
|
609
612
|
paddingBottom: e.spacing(2),
|
|
610
613
|
...t && { gridGap: "10px" }
|
|
611
|
-
})),
|
|
614
|
+
})), Oe = y("div")({ textAlign: "center" }), ke = y("div")({
|
|
612
615
|
textAlign: "center",
|
|
613
616
|
gridRow: "3/4"
|
|
614
|
-
}),
|
|
617
|
+
}), Ae = y("div")(({ includeTargets: e }) => ({
|
|
615
618
|
gridAutoFlow: "column",
|
|
616
619
|
display: "grid",
|
|
617
620
|
...e && { gridGap: "10px" }
|
|
618
|
-
})),
|
|
621
|
+
})), je = y("div")({
|
|
619
622
|
gridColumn: "1/2",
|
|
620
623
|
textAlign: "center"
|
|
621
|
-
}),
|
|
624
|
+
}), Me = y("div")({
|
|
622
625
|
gridColumn: "2/3",
|
|
623
626
|
textAlign: "center"
|
|
624
|
-
}),
|
|
627
|
+
}), Ne = class extends D.Component {
|
|
625
628
|
static propTypes = { ...G };
|
|
626
|
-
static defaultProps = { ...
|
|
629
|
+
static defaultProps = { ...Te };
|
|
627
630
|
render() {
|
|
628
631
|
let { includeTargets: e, choiceLabelEnabled: t, choiceLabel: n, targetLabel: r, tiles: i, tileSize: a } = this.props, o = e ? `auto ${a} auto ${a}` : `auto ${a} auto`, s = e ? i.length / 2 : i.length, c = {
|
|
629
632
|
gridTemplateColumns: e ? `repeat(${s}, ${a})` : `auto repeat(${Math.floor(s / 2) - 1}, ${a} 10px) ${a} auto`,
|
|
630
633
|
gridTemplateRows: o
|
|
631
634
|
}, l = { gridColumn: `1/${s + 1}` };
|
|
632
|
-
return /* @__PURE__ */
|
|
635
|
+
return /* @__PURE__ */ A(De, {
|
|
633
636
|
includeTargets: e,
|
|
634
637
|
style: c,
|
|
635
638
|
children: [
|
|
636
|
-
/* @__PURE__ */
|
|
639
|
+
/* @__PURE__ */ k(Oe, {
|
|
637
640
|
style: l,
|
|
638
641
|
dangerouslySetInnerHTML: { __html: t ? n : "" }
|
|
639
642
|
}),
|
|
640
|
-
e && /* @__PURE__ */
|
|
643
|
+
e && /* @__PURE__ */ k(ke, {
|
|
641
644
|
style: l,
|
|
642
645
|
dangerouslySetInnerHTML: { __html: r }
|
|
643
646
|
}),
|
|
644
|
-
i.map(
|
|
647
|
+
i.map(Ee(this.props))
|
|
645
648
|
]
|
|
646
649
|
});
|
|
647
650
|
}
|
|
648
|
-
},
|
|
651
|
+
}, Pe = class extends D.Component {
|
|
649
652
|
static propTypes = { ...G };
|
|
650
|
-
static defaultProps = { ...
|
|
653
|
+
static defaultProps = { ...Te };
|
|
651
654
|
render() {
|
|
652
655
|
let { includeTargets: e, choiceLabelEnabled: t, choiceLabel: n, targetLabel: r, tiles: i, tileSize: a } = this.props, o = e ? 2 : 1, s = e ? i.length / 2 : i.length;
|
|
653
|
-
return /* @__PURE__ */
|
|
656
|
+
return /* @__PURE__ */ A(Ae, {
|
|
654
657
|
includeTargets: e,
|
|
655
658
|
style: {
|
|
656
659
|
gridTemplateColumns: `repeat(${o}, ${a})`,
|
|
657
660
|
gridTemplateRows: e ? `auto repeat(${s}, ${a})` : `auto auto repeat(${Math.floor(s / 2) - 1}, ${a} 10px) ${a} auto`
|
|
658
661
|
},
|
|
659
662
|
children: [
|
|
660
|
-
/* @__PURE__ */
|
|
661
|
-
e && /* @__PURE__ */
|
|
662
|
-
i.map(
|
|
663
|
+
/* @__PURE__ */ k(je, { dangerouslySetInnerHTML: { __html: t ? n : "" } }),
|
|
664
|
+
e && /* @__PURE__ */ k(Me, { dangerouslySetInnerHTML: { __html: r } }),
|
|
665
|
+
i.map(Ee(this.props))
|
|
663
666
|
]
|
|
664
667
|
});
|
|
665
668
|
}
|
|
666
|
-
}, K = (0,
|
|
669
|
+
}, K = (0, j.default)("pie-elements:placement-ordering:ordering"), Fe = (e, t, n) => {
|
|
667
670
|
let r = e.find((e, n) => n === t), i = e.filter((e, n) => n !== t);
|
|
668
671
|
return [
|
|
669
672
|
...i.slice(0, n),
|
|
670
673
|
r,
|
|
671
674
|
...i.slice(n)
|
|
672
675
|
];
|
|
673
|
-
},
|
|
674
|
-
if (K("[swap]", e,
|
|
675
|
-
let
|
|
676
|
-
return r
|
|
676
|
+
}, Ie = (e, n, r) => {
|
|
677
|
+
if (K("[swap]", e, n, r), !e || e.length <= 1 || n === void 0 || r === void 0) throw Error(`swap requires a non-empty array, fromIndex, toIndex: ${e}, ${n} ${r}`);
|
|
678
|
+
let i = t(e), a = e[r];
|
|
679
|
+
return i[r] = i[n], i[n] = a, i;
|
|
677
680
|
};
|
|
678
|
-
function
|
|
679
|
-
let
|
|
680
|
-
if (n
|
|
681
|
-
else throw Error(`Tried to remove from index: ${
|
|
682
|
-
return
|
|
681
|
+
function Le(e, n) {
|
|
682
|
+
let r = t(e.response);
|
|
683
|
+
if (r[n.index] === n.id) r[n.index] = void 0;
|
|
684
|
+
else throw Error(`Tried to remove from index: ${n.index}, but the id doesn't match: array: ${r}, target: ${n.id}`);
|
|
685
|
+
return r;
|
|
683
686
|
}
|
|
684
|
-
function
|
|
685
|
-
let { response:
|
|
686
|
-
if (
|
|
687
|
+
function Re(e, n, r) {
|
|
688
|
+
let { response: i, opts: a } = e, o = t(i);
|
|
689
|
+
if (a.includeTargets) return n.type === "choice" && r.type === "target" ? (o[r.index] = n.id, o) : n.type === "target" && r.type === "choice" ? (o[n.index] = void 0, o) : n.type === "target" && r.type === "target" ? Ie(i, n.index, r.index) : (K("do nothing to the response"), i);
|
|
687
690
|
{
|
|
688
|
-
let
|
|
689
|
-
return K("fromIndex: ",
|
|
691
|
+
let t = e.response.findIndex((e) => e !== void 0 && e === n.id), i = e.response.findIndex((e) => e !== void 0 && e === r.id);
|
|
692
|
+
return K("fromIndex: ", t, "toIndex:", i), Fe(e.response, t, i);
|
|
690
693
|
}
|
|
691
694
|
}
|
|
692
695
|
function q(e, t, n, r) {
|
|
@@ -723,26 +726,26 @@ function q(e, t, n, r) {
|
|
|
723
726
|
return i === 0 && t.push(a), t.push(o, a), t;
|
|
724
727
|
}, []);
|
|
725
728
|
}
|
|
726
|
-
function
|
|
727
|
-
return
|
|
729
|
+
function ze(e, t, r, i) {
|
|
730
|
+
return i = n({ includeTargets: !0 }, i), r ||= [], t = !t || a(t) ? i.includeTargets ? Array(e.length) : c(e, (e) => e.id) : t, {
|
|
728
731
|
choices: e,
|
|
729
732
|
response: t,
|
|
730
|
-
opts:
|
|
731
|
-
outcomes:
|
|
732
|
-
tiles: q(e, t,
|
|
733
|
+
opts: i,
|
|
734
|
+
outcomes: r,
|
|
735
|
+
tiles: q(e, t, r, i)
|
|
733
736
|
};
|
|
734
737
|
}
|
|
735
|
-
function
|
|
738
|
+
function Be(e, t) {
|
|
736
739
|
switch (e.type) {
|
|
737
740
|
case "move": {
|
|
738
|
-
let { from: n, to: r } = e, i =
|
|
741
|
+
let { from: n, to: r } = e, i = Re(t, n, r), a = q(t.choices, i, t.outcomes, t.opts);
|
|
739
742
|
return Object.assign({}, t, {
|
|
740
743
|
response: i,
|
|
741
744
|
tiles: a
|
|
742
745
|
});
|
|
743
746
|
}
|
|
744
747
|
case "remove": {
|
|
745
|
-
let { target: n } = e, r =
|
|
748
|
+
let { target: n } = e, r = Le(t, n), i = q(t.choices, r, t.outcomes, t.opts);
|
|
746
749
|
return Object.assign({}, t, {
|
|
747
750
|
response: r,
|
|
748
751
|
tiles: i
|
|
@@ -753,7 +756,7 @@ function $e(e, t) {
|
|
|
753
756
|
}
|
|
754
757
|
//#endregion
|
|
755
758
|
//#region src/delivery/utils.ts
|
|
756
|
-
var
|
|
759
|
+
var Ve = (e, t) => {
|
|
757
760
|
if (!Array.isArray(e) || !Array.isArray(t) || e.length !== t.length) return !1;
|
|
758
761
|
let n = (e) => e.map((e) => JSON.stringify(e)).sort(), r = n(e), i = n(t), a = r.every((e, t) => e === i[t]), o = e.every((e, n) => JSON.stringify(e) === JSON.stringify(t[n]));
|
|
759
762
|
return a && !o;
|
|
@@ -766,71 +769,71 @@ function J(e) {
|
|
|
766
769
|
function Y(e, t) {
|
|
767
770
|
return !e || J(e) ? e : J(e.default) ? e.default : t && J(e[t]) ? e[t] : t && J(e[t]?.default) ? e[t].default : e;
|
|
768
771
|
}
|
|
769
|
-
var
|
|
770
|
-
color:
|
|
771
|
-
backgroundColor:
|
|
772
|
+
var He = Y(w, "UiLayout") || Y(Q.UiLayout, "UiLayout"), X = Y(ee, "PreviewPrompt") || Y(Q.PreviewPrompt, "PreviewPrompt"), Ue = Y(S, "Feedback") || Y(Q.Feedback, "Feedback"), We = Y(f, "Collapsible") || Y(Q.Collapsible, "Collapsible"), Ge = b, Z = Ge.default, Q = Z && typeof Z == "object" ? Z : Ge, { translator: Ke } = E, qe = (0, j.default)("pie-elements:placement-ordering"), Je = y("div")({
|
|
773
|
+
color: v.text(),
|
|
774
|
+
backgroundColor: v.background(),
|
|
772
775
|
display: "flex",
|
|
773
776
|
flexDirection: "column",
|
|
774
777
|
alignItems: "center",
|
|
775
778
|
boxSizing: "border-box"
|
|
776
|
-
}),
|
|
779
|
+
}), Ye = y("div")(({ theme: e }) => ({ paddingBottom: e.spacing(1) })), Xe = y("div")(({ theme: e }) => ({ paddingBottom: e.spacing(2) })), Ze = y(ye)(({ theme: e }) => ({ paddingBottom: e.spacing(1) })), $ = y(We)(({ theme: e }) => ({
|
|
777
780
|
marginBottom: e.spacing(2),
|
|
778
781
|
alignSelf: "flex-start"
|
|
779
|
-
})),
|
|
782
|
+
})), Qe = (e) => {
|
|
780
783
|
let { tiler: t, ordering: n, onDropChoice: r, onRemoveChoice: i, ...a } = e;
|
|
781
|
-
return /* @__PURE__ */
|
|
784
|
+
return /* @__PURE__ */ k(t, {
|
|
782
785
|
...a,
|
|
783
786
|
tiles: n.tiles,
|
|
784
787
|
onDropChoice: (e, t) => r(e, t, n),
|
|
785
788
|
onRemoveChoice: (e) => i(e, n)
|
|
786
789
|
});
|
|
787
790
|
};
|
|
788
|
-
|
|
789
|
-
tiler:
|
|
790
|
-
ordering:
|
|
791
|
-
onDropChoice:
|
|
792
|
-
onRemoveChoice:
|
|
791
|
+
Qe.propTypes = {
|
|
792
|
+
tiler: M.default.func,
|
|
793
|
+
ordering: M.default.any,
|
|
794
|
+
onDropChoice: M.default.func,
|
|
795
|
+
onRemoveChoice: M.default.func
|
|
793
796
|
};
|
|
794
|
-
var
|
|
797
|
+
var $e = class extends D.Component {
|
|
795
798
|
static propTypes = {
|
|
796
|
-
onSessionChange:
|
|
797
|
-
model:
|
|
798
|
-
session:
|
|
799
|
+
onSessionChange: M.default.func.isRequired,
|
|
800
|
+
model: M.default.object.isRequired,
|
|
801
|
+
session: M.default.oneOfType([M.default.array.isRequired, M.default.object.isRequired])
|
|
799
802
|
};
|
|
800
803
|
constructor(e) {
|
|
801
|
-
super(e), this.instanceId =
|
|
804
|
+
super(e), this.instanceId = r();
|
|
802
805
|
let { value: t, needsReset: n } = this.validateSession(e);
|
|
803
806
|
this.state = { showingCorrect: !1 };
|
|
804
|
-
let { model:
|
|
805
|
-
n &&
|
|
807
|
+
let { model: i } = e || {}, { env: a } = i || {}, { mode: o } = a || {};
|
|
808
|
+
n && o === "gather" && this.props.onSessionChange({
|
|
806
809
|
...e.session,
|
|
807
810
|
value: t
|
|
808
811
|
});
|
|
809
812
|
}
|
|
810
813
|
toggleCorrect = (e) => this.setState({ showingCorrect: e });
|
|
811
814
|
componentDidUpdate() {
|
|
812
|
-
|
|
815
|
+
d(ie.findDOMNode(this));
|
|
813
816
|
}
|
|
814
817
|
validateSession = ({ model: e, session: t }, n = !1) => {
|
|
815
|
-
let { config: r, choices: i } = e || {}, { includeTargets: a } = r || {}, s = i.map((e) => e.id), { value: c } = t || {},
|
|
816
|
-
if (a) c && c.length !== s.length && (
|
|
818
|
+
let { config: r, choices: i } = e || {}, { includeTargets: a } = r || {}, s = i.map((e) => e.id), { value: c } = t || {}, u;
|
|
819
|
+
if (a) c && c.length !== s.length && (u = !0, c = c.length < s.length ? c.concat(Array(s.length - c.length)) : c.filter((e) => s.includes(e)));
|
|
817
820
|
else {
|
|
818
821
|
if (!c || !c.length || n) c = s;
|
|
819
822
|
else {
|
|
820
|
-
let e =
|
|
823
|
+
let e = l(s, c), t = l(c, s);
|
|
821
824
|
(e.length || t.length) && (c = s);
|
|
822
825
|
}
|
|
823
|
-
|
|
826
|
+
u = !o(t.value, c);
|
|
824
827
|
}
|
|
825
|
-
return
|
|
828
|
+
return u && console.warn("This session is not valid anymore. It will be reset."), {
|
|
826
829
|
value: c,
|
|
827
|
-
needsReset:
|
|
830
|
+
needsReset: u
|
|
828
831
|
};
|
|
829
832
|
};
|
|
830
833
|
UNSAFE_componentWillReceiveProps(e) {
|
|
831
|
-
let { model: t = {} } = e || {}, { model: n = {} } = this.props || {}, { correctResponse: r, config: i, choices: a = [], env: o } = t, { includeTargets: s } = i || {}, c = {}, l = n.language && n.language !== t.language, u = n.note && n.note ===
|
|
832
|
-
l && u && (n.note =
|
|
833
|
-
let d =
|
|
834
|
+
let { model: t = {} } = e || {}, { model: n = {} } = this.props || {}, { correctResponse: r, config: i, choices: a = [], env: o } = t, { includeTargets: s } = i || {}, c = {}, l = n.language && n.language !== t.language, u = n.note && n.note === Ke.t("common:commonCorrectAnswerWithAlternates", { lng: n.language });
|
|
835
|
+
l && u && (n.note = Ke.t("common:commonCorrectAnswerWithAlternates", { lng: t.language })), r || (c.showingCorrect = !1);
|
|
836
|
+
let d = Ve(a, n.choices), { value: f, needsReset: p } = this.validateSession(e, d), m = {
|
|
834
837
|
...e.session,
|
|
835
838
|
value: f
|
|
836
839
|
}, h = n.config?.includeTargets !== s;
|
|
@@ -841,8 +844,8 @@ var pt = class extends k.Component {
|
|
|
841
844
|
}
|
|
842
845
|
onDropChoice = (e, t, n) => {
|
|
843
846
|
let { onSessionChange: r, session: i } = this.props, a = n.tiles.find((e) => e.id === t.id && e.type === t.type && e.index === t.index), o = e;
|
|
844
|
-
|
|
845
|
-
let s =
|
|
847
|
+
qe("[onDropChoice] ", a, o);
|
|
848
|
+
let s = Be({
|
|
846
849
|
type: "move",
|
|
847
850
|
from: a,
|
|
848
851
|
to: o
|
|
@@ -851,8 +854,8 @@ var pt = class extends k.Component {
|
|
|
851
854
|
};
|
|
852
855
|
onRemoveChoice = (e, t) => {
|
|
853
856
|
let { onSessionChange: n, session: r } = this.props;
|
|
854
|
-
|
|
855
|
-
let i =
|
|
857
|
+
qe("[onRemoveChoice]", e);
|
|
858
|
+
let i = Be({
|
|
856
859
|
type: "remove",
|
|
857
860
|
target: e
|
|
858
861
|
}, t);
|
|
@@ -863,13 +866,13 @@ var pt = class extends k.Component {
|
|
|
863
866
|
orientation: "vertical",
|
|
864
867
|
includeTargets: !0
|
|
865
868
|
};
|
|
866
|
-
return n ?
|
|
869
|
+
return n ? ze(e.choices, e.correctResponse, e.correctResponse.map((e) => ({
|
|
867
870
|
id: e,
|
|
868
871
|
outcome: "correct"
|
|
869
872
|
})), {
|
|
870
873
|
includeTargets: r,
|
|
871
874
|
allowSameChoiceInTargets: e.config.allowSameChoiceInTargets
|
|
872
|
-
}) :
|
|
875
|
+
}) : ze(e.choices, t.value, e.outcomes, {
|
|
873
876
|
includeTargets: r,
|
|
874
877
|
allowSameChoiceInTargets: e.config.allowSameChoiceInTargets
|
|
875
878
|
});
|
|
@@ -889,62 +892,62 @@ var pt = class extends k.Component {
|
|
|
889
892
|
}
|
|
890
893
|
};
|
|
891
894
|
render() {
|
|
892
|
-
let { model: e } = this.props, { correctResponse: t, correctness: n, extraCSSRules: r, prompt: i, rationale: a, feedback: o, config: s, note: c, showNote: l, env: u, disabled: d, teacherInstructions: f, language:
|
|
895
|
+
let { model: e } = this.props, { correctResponse: t, correctness: n, extraCSSRules: r, prompt: i, rationale: a, feedback: o, config: s, note: c, showNote: l, env: u, disabled: d, teacherInstructions: f, language: m } = e, h = t && t.length > 0, { showingCorrect: g } = this.state, _ = s || {
|
|
893
896
|
orientation: "vertical",
|
|
894
897
|
includeTargets: !0
|
|
895
|
-
}, { orientation:
|
|
896
|
-
color:
|
|
897
|
-
backgroundColor:
|
|
898
|
+
}, { orientation: y, includeTargets: b } = _, S = y === "vertical", ee = this.createOrdering(), { mode: w, role: T } = u || {}, E = S ? Pe : Ne, D = (g || w === "view" && T === "instructor") && l && c, O = a && (p(a) || x(a)), ne = f && (p(f) || x(f)), re = {
|
|
899
|
+
color: v.text(),
|
|
900
|
+
backgroundColor: v.background(),
|
|
898
901
|
display: "flex",
|
|
899
902
|
flexDirection: "column",
|
|
900
903
|
alignItems: "center",
|
|
901
904
|
boxSizing: "border-box"
|
|
902
905
|
};
|
|
903
|
-
return /* @__PURE__ */
|
|
906
|
+
return /* @__PURE__ */ k(C, {
|
|
904
907
|
onDragStart: () => {},
|
|
905
908
|
onDragEnd: this.onDragEnd,
|
|
906
|
-
collisionDetection:
|
|
907
|
-
children: /* @__PURE__ */
|
|
909
|
+
collisionDetection: te,
|
|
910
|
+
children: /* @__PURE__ */ k(Je, { children: /* @__PURE__ */ A(He, {
|
|
908
911
|
extraCSSRules: r,
|
|
909
|
-
style:
|
|
912
|
+
style: re,
|
|
910
913
|
children: [
|
|
911
|
-
ne && /* @__PURE__ */
|
|
914
|
+
ne && /* @__PURE__ */ k($, {
|
|
912
915
|
labels: {
|
|
913
916
|
hidden: "Show Teacher Instructions",
|
|
914
917
|
visible: "Hide Teacher Instructions"
|
|
915
918
|
},
|
|
916
919
|
className: "collapsible",
|
|
917
|
-
children: /* @__PURE__ */
|
|
920
|
+
children: /* @__PURE__ */ k(X, { prompt: f })
|
|
918
921
|
}),
|
|
919
|
-
/* @__PURE__ */
|
|
920
|
-
/* @__PURE__ */
|
|
921
|
-
show:
|
|
922
|
-
toggled:
|
|
922
|
+
/* @__PURE__ */ k(Ye, { children: /* @__PURE__ */ k(X, { prompt: i }) }),
|
|
923
|
+
/* @__PURE__ */ k(Ze, {
|
|
924
|
+
show: h,
|
|
925
|
+
toggled: g,
|
|
923
926
|
onToggle: this.toggleCorrect,
|
|
924
|
-
language:
|
|
927
|
+
language: m
|
|
925
928
|
}),
|
|
926
|
-
/* @__PURE__ */
|
|
929
|
+
/* @__PURE__ */ k(Qe, {
|
|
927
930
|
instanceId: this.instanceId,
|
|
928
|
-
choiceLabel:
|
|
929
|
-
targetLabel:
|
|
930
|
-
ordering:
|
|
931
|
-
tiler:
|
|
931
|
+
choiceLabel: _.choiceLabel,
|
|
932
|
+
targetLabel: _.targetLabel,
|
|
933
|
+
ordering: ee,
|
|
934
|
+
tiler: E,
|
|
932
935
|
disabled: d,
|
|
933
|
-
addGuide:
|
|
934
|
-
tileSize:
|
|
935
|
-
includeTargets:
|
|
936
|
+
addGuide: _.showOrdering,
|
|
937
|
+
tileSize: _.tileSize,
|
|
938
|
+
includeTargets: b,
|
|
936
939
|
choiceLabelEnabled: e.config && e.config.choiceLabelEnabled
|
|
937
940
|
}),
|
|
938
|
-
|
|
939
|
-
|
|
941
|
+
D && /* @__PURE__ */ k(Xe, { dangerouslySetInnerHTML: { __html: c } }),
|
|
942
|
+
O && /* @__PURE__ */ k($, {
|
|
940
943
|
labels: {
|
|
941
944
|
hidden: "Show Rationale",
|
|
942
945
|
visible: "Hide Rationale"
|
|
943
946
|
},
|
|
944
947
|
className: "collapsible",
|
|
945
|
-
children: /* @__PURE__ */
|
|
948
|
+
children: /* @__PURE__ */ k(X, { prompt: a })
|
|
946
949
|
}),
|
|
947
|
-
!
|
|
950
|
+
!g && /* @__PURE__ */ k(Ue, {
|
|
948
951
|
correctness: n,
|
|
949
952
|
feedback: o
|
|
950
953
|
})
|
|
@@ -952,30 +955,30 @@ var pt = class extends k.Component {
|
|
|
952
955
|
}) })
|
|
953
956
|
});
|
|
954
957
|
}
|
|
955
|
-
},
|
|
958
|
+
}, et = class extends D.Component {
|
|
956
959
|
static propTypes = {
|
|
957
|
-
model:
|
|
958
|
-
session:
|
|
959
|
-
onSessionChange:
|
|
960
|
+
model: M.default.object.isRequired,
|
|
961
|
+
session: M.default.oneOfType([M.default.array.isRequired, M.default.object.isRequired]),
|
|
962
|
+
onSessionChange: M.default.func.isRequired
|
|
960
963
|
};
|
|
961
964
|
render() {
|
|
962
965
|
let { model: e, session: t, onSessionChange: n } = this.props;
|
|
963
|
-
return /* @__PURE__ */
|
|
966
|
+
return /* @__PURE__ */ k($e, {
|
|
964
967
|
model: e,
|
|
965
968
|
session: t,
|
|
966
969
|
onSessionChange: n
|
|
967
970
|
});
|
|
968
971
|
}
|
|
969
|
-
},
|
|
970
|
-
let { config:
|
|
971
|
-
return
|
|
972
|
-
},
|
|
972
|
+
}, tt = (0, j.default)("pie-elements:placement-ordering"), nt = ({ model: t, session: n }) => {
|
|
973
|
+
let { config: r } = t, i = (n && e(n.value) || []).length === t.choices.length;
|
|
974
|
+
return r.includeTargets || i;
|
|
975
|
+
}, rt = class extends HTMLElement {
|
|
973
976
|
constructor() {
|
|
974
977
|
super(), this._root = null, this._mathObserver = null, this._mathRenderPending = !1;
|
|
975
978
|
}
|
|
976
979
|
_scheduleMathRender = () => {
|
|
977
980
|
this._mathRenderPending || (this._mathRenderPending = !0, requestAnimationFrame(() => {
|
|
978
|
-
this._mathObserver && this._mathObserver.disconnect(),
|
|
981
|
+
this._mathObserver && this._mathObserver.disconnect(), d(this), this._mathRenderPending = !1, setTimeout(() => {
|
|
979
982
|
this._mathObserver && this._mathObserver.observe(this, {
|
|
980
983
|
childList: !0,
|
|
981
984
|
subtree: !0
|
|
@@ -992,9 +995,9 @@ var pt = class extends k.Component {
|
|
|
992
995
|
_disconnectMathObserver() {
|
|
993
996
|
this._mathObserver &&= (this._mathObserver.disconnect(), null);
|
|
994
997
|
}
|
|
995
|
-
isComplete = (
|
|
998
|
+
isComplete = (t) => t && e(t).length === this._model.completeLength;
|
|
996
999
|
sessionChange = (e) => {
|
|
997
|
-
this._session.value = e.value, this.render(), this.dispatchEvent(new
|
|
1000
|
+
this._session.value = e.value, this.render(), this.dispatchEvent(new ae(this.tagName.toLowerCase(), this._session && this.isComplete(this._session.value)));
|
|
998
1001
|
};
|
|
999
1002
|
set model(e) {
|
|
1000
1003
|
this._model = e, this.render(), this.dispatchEvent(new CustomEvent("model-set", {
|
|
@@ -1010,13 +1013,13 @@ var pt = class extends k.Component {
|
|
|
1010
1013
|
}
|
|
1011
1014
|
render() {
|
|
1012
1015
|
if (this._model && this._session) {
|
|
1013
|
-
|
|
1014
|
-
let e =
|
|
1016
|
+
tt("[render] session: ", this._session.value), tt("[render] model: ", this._model), this._initMathObserver();
|
|
1017
|
+
let e = D.createElement(et, {
|
|
1015
1018
|
model: this._model,
|
|
1016
1019
|
session: this._session,
|
|
1017
1020
|
onSessionChange: this.sessionChange
|
|
1018
1021
|
});
|
|
1019
|
-
this._root ||=
|
|
1022
|
+
this._root ||= re(this), this._root.render(e);
|
|
1020
1023
|
}
|
|
1021
1024
|
}
|
|
1022
1025
|
connectedCallback() {
|
|
@@ -1027,6 +1030,6 @@ var pt = class extends k.Component {
|
|
|
1027
1030
|
}
|
|
1028
1031
|
};
|
|
1029
1032
|
//#endregion
|
|
1030
|
-
export {
|
|
1033
|
+
export { rt as default, nt as isValidSession };
|
|
1031
1034
|
|
|
1032
1035
|
//# sourceMappingURL=index.js.map
|