@pie-element/graphing-solution-set 6.1.1-next.11 → 6.1.2-next.0
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/configure.js +2 -0
- package/controller.js +1 -0
- package/dist/author/configure.d.ts +26 -0
- package/dist/author/configure.js +190 -0
- package/dist/author/correct-response.d.ts +33 -0
- package/dist/author/correct-response.js +206 -0
- package/dist/author/defaults.d.ts +238 -0
- package/dist/author/defaults.js +339 -0
- package/dist/author/graphing-config.d.ts +33 -0
- package/dist/author/graphing-config.js +238 -0
- package/dist/author/index.d.ts +62 -0
- package/dist/author/index.js +87 -0
- package/dist/author/utils.d.ts +46 -0
- package/dist/author/utils.js +474 -0
- package/dist/browser/author/index.js +1942 -0
- package/dist/browser/author/index.js.map +1 -0
- package/dist/browser/browser-DpedO01u.js +1218 -0
- package/dist/browser/browser-DpedO01u.js.map +1 -0
- package/dist/browser/controller/index.js +220 -0
- package/dist/browser/controller/index.js.map +1 -0
- package/dist/browser/delivery/index.js +782 -0
- package/dist/browser/delivery/index.js.map +1 -0
- package/dist/browser/dist-SjeWPldT.js +61711 -0
- package/dist/browser/dist-SjeWPldT.js.map +1 -0
- package/dist/browser/graphing-solution-set.css +2 -0
- package/dist/controller/defaults.d.ts +64 -0
- package/dist/controller/defaults.js +54 -0
- package/dist/controller/index.d.ts +24 -0
- package/dist/controller/index.js +112 -0
- package/dist/controller/utils.d.ts +20 -0
- package/dist/controller/utils.js +42 -0
- package/dist/delivery/index.d.ts +22 -0
- package/dist/delivery/index.js +62 -0
- package/dist/delivery/main.d.ts +31 -0
- package/dist/delivery/main.js +198 -0
- package/dist/delivery/utils.d.ts +12 -0
- package/dist/delivery/utils.js +220 -0
- package/dist/graphing-solution-set.css +2 -0
- package/dist/index.d.ts +1 -0
- package/dist/index.iife.d.ts +8 -0
- package/dist/index.iife.js +403 -0
- package/dist/index.js +2 -0
- package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_DataView.js +6 -0
- package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_Hash.js +16 -0
- package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_ListCache.js +16 -0
- package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_Map.js +6 -0
- package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_MapCache.js +16 -0
- package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_Promise.js +6 -0
- package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_Set.js +6 -0
- package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_SetCache.js +11 -0
- package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_Stack.js +14 -0
- package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_Symbol.js +5 -0
- package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_Uint8Array.js +5 -0
- package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_WeakMap.js +6 -0
- package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_apply.js +12 -0
- package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_arrayEach.js +7 -0
- package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_arrayFilter.js +10 -0
- package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_arrayIncludes.js +7 -0
- package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_arrayIncludesWith.js +7 -0
- package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_arrayLikeKeys.js +15 -0
- package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_arrayMap.js +7 -0
- package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_arrayPush.js +7 -0
- package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_arraySome.js +7 -0
- package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_assignValue.js +10 -0
- package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_assocIndexOf.js +8 -0
- package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_baseAssign.js +8 -0
- package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_baseAssignIn.js +8 -0
- package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_baseAssignValue.js +12 -0
- package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_baseClone.js +57 -0
- package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_baseCreate.js +14 -0
- package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_baseDifference.js +23 -0
- package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_baseFindIndex.js +7 -0
- package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_baseFlatten.js +13 -0
- package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_baseGetAllKeys.js +9 -0
- package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_baseGetTag.js +10 -0
- package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_baseIndexOf.js +9 -0
- package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_baseIsArguments.js +9 -0
- package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_baseIsEqual.js +8 -0
- package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_baseIsEqualDeep.js +30 -0
- package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_baseIsMap.js +9 -0
- package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_baseIsNaN.js +6 -0
- package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_baseIsNative.js +11 -0
- package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_baseIsSet.js +9 -0
- package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_baseIsTypedArray.js +11 -0
- package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_baseKeys.js +12 -0
- package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_baseKeysIn.js +13 -0
- package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_baseRest.js +9 -0
- package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_baseSet.js +22 -0
- package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_baseSetToString.js +14 -0
- package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_baseTimes.js +7 -0
- package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_baseToString.js +15 -0
- package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_baseUnary.js +8 -0
- package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_baseUniq.js +27 -0
- package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_cacheHas.js +6 -0
- package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_castPath.js +10 -0
- package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_cloneArrayBuffer.js +8 -0
- package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_cloneBuffer.js +10 -0
- package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_cloneDataView.js +8 -0
- package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_cloneRegExp.js +8 -0
- package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_cloneSymbol.js +8 -0
- package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_cloneTypedArray.js +8 -0
- package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_copyArray.js +8 -0
- package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_copyObject.js +14 -0
- package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_copySymbols.js +8 -0
- package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_copySymbolsIn.js +8 -0
- package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_coreJsData.js +5 -0
- package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_createSet.js +9 -0
- package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_defineProperty.js +10 -0
- package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_equalArrays.js +35 -0
- package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_equalByTag.js +35 -0
- package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_equalObjects.js +32 -0
- package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_freeGlobal.js +4 -0
- package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_getAllKeys.js +9 -0
- package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_getAllKeysIn.js +9 -0
- package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_getMapData.js +8 -0
- package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_getNative.js +9 -0
- package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_getPrototype.js +5 -0
- package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_getRawTag.js +14 -0
- package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_getSymbols.js +10 -0
- package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_getSymbolsIn.js +11 -0
- package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_getTag.js +23 -0
- package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_getValue.js +6 -0
- package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_hashClear.js +7 -0
- package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_hashDelete.js +7 -0
- package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_hashGet.js +13 -0
- package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_hashHas.js +9 -0
- package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_hashSet.js +9 -0
- package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_initCloneArray.js +8 -0
- package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_initCloneByTag.js +33 -0
- package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_initCloneObject.js +9 -0
- package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_isFlattenable.js +10 -0
- package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_isIndex.js +8 -0
- package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_isKey.js +11 -0
- package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_isKeyable.js +7 -0
- package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_isMasked.js +11 -0
- package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_isPrototype.js +8 -0
- package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_listCacheClear.js +6 -0
- package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_listCacheDelete.js +9 -0
- package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_listCacheGet.js +8 -0
- package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_listCacheHas.js +7 -0
- package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_listCacheSet.js +8 -0
- package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_mapCacheClear.js +13 -0
- package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_mapCacheDelete.js +8 -0
- package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_mapCacheGet.js +7 -0
- package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_mapCacheHas.js +7 -0
- package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_mapCacheSet.js +8 -0
- package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_mapToArray.js +9 -0
- package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_memoizeCapped.js +11 -0
- package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_nativeCreate.js +5 -0
- package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_nativeKeys.js +5 -0
- package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_nativeKeysIn.js +8 -0
- package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_nodeUtil.js +9 -0
- package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_objectToString.js +7 -0
- package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_overArg.js +8 -0
- package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_overRest.js +13 -0
- package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_root.js +5 -0
- package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_setCacheAdd.js +7 -0
- package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_setCacheHas.js +6 -0
- package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_setToArray.js +9 -0
- package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_setToString.js +6 -0
- package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_shortOut.js +14 -0
- package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_stackClear.js +7 -0
- package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_stackDelete.js +7 -0
- package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_stackGet.js +6 -0
- package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_stackHas.js +6 -0
- package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_stackSet.js +16 -0
- package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_strictIndexOf.js +7 -0
- package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_stringToPath.js +10 -0
- package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_toKey.js +10 -0
- package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_toSource.js +15 -0
- package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/cloneDeep.js +8 -0
- package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/constant.js +8 -0
- package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/differenceWith.js +12 -0
- package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/eq.js +6 -0
- package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/identity.js +6 -0
- package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/isArguments.js +10 -0
- package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/isArray.js +4 -0
- package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/isArrayLike.js +8 -0
- package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/isArrayLikeObject.js +8 -0
- package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/isBuffer.js +6 -0
- package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/isEmpty.js +21 -0
- package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/isEqual.js +7 -0
- package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/isFunction.js +11 -0
- package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/isLength.js +7 -0
- package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/isMap.js +7 -0
- package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/isObject.js +7 -0
- package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/isObjectLike.js +6 -0
- package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/isSet.js +7 -0
- package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/isSymbol.js +9 -0
- package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/isTypedArray.js +7 -0
- package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/keys.js +9 -0
- package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/keysIn.js +9 -0
- package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/last.js +7 -0
- package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/memoize.js +16 -0
- package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/noop.js +4 -0
- package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/set.js +7 -0
- package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/stubArray.js +6 -0
- package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/stubFalse.js +6 -0
- package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/toString.js +7 -0
- package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/uniq.js +7 -0
- package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/uniqWith.js +7 -0
- package/package.json +81 -22
- package/CHANGELOG.json +0 -1
- package/CHANGELOG.md +0 -846
- package/LICENSE.md +0 -5
- package/README.md +0 -20
- package/configure/CHANGELOG.json +0 -1
- package/configure/CHANGELOG.md +0 -806
- package/configure/lib/configure.js +0 -312
- package/configure/lib/configure.js.map +0 -1
- package/configure/lib/correct-response.js +0 -435
- package/configure/lib/correct-response.js.map +0 -1
- package/configure/lib/defaults.js +0 -357
- package/configure/lib/defaults.js.map +0 -1
- package/configure/lib/graphing-config.js +0 -408
- package/configure/lib/graphing-config.js.map +0 -1
- package/configure/lib/index.js +0 -163
- package/configure/lib/index.js.map +0 -1
- package/configure/lib/utils.js +0 -630
- package/configure/lib/utils.js.map +0 -1
- package/configure/package.json +0 -29
- package/controller/CHANGELOG.json +0 -1
- package/controller/CHANGELOG.md +0 -671
- package/controller/lib/defaults.js +0 -69
- package/controller/lib/defaults.js.map +0 -1
- package/controller/lib/index.js +0 -351
- package/controller/lib/index.js.map +0 -1
- package/controller/lib/utils.js +0 -212
- package/controller/lib/utils.js.map +0 -1
- package/controller/package.json +0 -22
- package/demo-gss.gif +0 -0
- package/docs/config-schema.json +0 -1560
- package/docs/config-schema.json.md +0 -1114
- package/docs/demo/config.js +0 -8
- package/docs/demo/generate.js +0 -54
- package/docs/demo/index.html +0 -1
- package/docs/demo/session.js +0 -6
- package/docs/pie-schema.json +0 -1800
- package/docs/pie-schema.json.md +0 -952
- package/lib/index.js +0 -164
- package/lib/index.js.map +0 -1
- package/lib/main.js +0 -355
- package/lib/main.js.map +0 -1
- package/lib/utils.js +0 -515
- package/lib/utils.js.map +0 -1
|
@@ -0,0 +1,87 @@
|
|
|
1
|
+
import e from "./configure.js";
|
|
2
|
+
import t from "./defaults.js";
|
|
3
|
+
import n from "react";
|
|
4
|
+
import { createRoot as r } from "react-dom/client";
|
|
5
|
+
import { renderMath as i } from "@pie-element/shared-math-rendering-mathjax";
|
|
6
|
+
import a from "debug";
|
|
7
|
+
import { DeleteImageEvent as o, DeleteSoundEvent as s, InsertImageEvent as c, InsertSoundEvent as l, ModelUpdatedEvent as u } from "@pie-element/shared-configure-events";
|
|
8
|
+
//#region src/author/index.ts
|
|
9
|
+
var d = a("pie-elements:graphing-solution-set:configure"), f = (e) => Object.keys(e || {}).sort().reduce((t, n) => (n !== "correctAnswer" && (t[n] = e[n]), t), {}), p = class a extends HTMLElement {
|
|
10
|
+
static createDefaultModel = (e = {}) => {
|
|
11
|
+
let n = {
|
|
12
|
+
...t.model,
|
|
13
|
+
...e
|
|
14
|
+
}, { answers: r = {}, domain: i = {}, graph: a = {}, range: o = {}, standardGrid: s } = n;
|
|
15
|
+
return {
|
|
16
|
+
...n,
|
|
17
|
+
answers: r && r.correctAnswer && {
|
|
18
|
+
correctAnswer: r.correctAnswer,
|
|
19
|
+
...f(r)
|
|
20
|
+
} || r,
|
|
21
|
+
range: s && {
|
|
22
|
+
...o,
|
|
23
|
+
min: i.min,
|
|
24
|
+
max: i.max,
|
|
25
|
+
step: i.step,
|
|
26
|
+
labelStep: i.labelStep
|
|
27
|
+
} || o,
|
|
28
|
+
graph: s && {
|
|
29
|
+
...a,
|
|
30
|
+
height: a.width
|
|
31
|
+
} || a
|
|
32
|
+
};
|
|
33
|
+
};
|
|
34
|
+
constructor() {
|
|
35
|
+
super(), this._root = null, this._model = a.createDefaultModel(), this._configuration = t.configuration;
|
|
36
|
+
}
|
|
37
|
+
set model(e) {
|
|
38
|
+
this._model = a.createDefaultModel(e), this._render();
|
|
39
|
+
}
|
|
40
|
+
set configuration(e) {
|
|
41
|
+
this._configuration = e, e.language?.enabled ? e.languageChoices?.options?.length && (this._model.language = e.languageChoices.options[0].value) : e.language.settings ? this._model.language && (this._configuration.language.enabled = !0) : delete this._model.language, this._render();
|
|
42
|
+
}
|
|
43
|
+
onModelChanged = (e) => {
|
|
44
|
+
this._model = e, this._render(), d("[onModelChanged]: ", this._model), this.dispatchEvent(new u(this._model));
|
|
45
|
+
};
|
|
46
|
+
onConfigurationChanged = (e) => {
|
|
47
|
+
this._configuration = e, this._render();
|
|
48
|
+
};
|
|
49
|
+
insertImage = (e) => {
|
|
50
|
+
this.dispatchEvent(new c(e));
|
|
51
|
+
};
|
|
52
|
+
onDeleteImage = (e, t) => {
|
|
53
|
+
this.dispatchEvent(new o(e, t));
|
|
54
|
+
};
|
|
55
|
+
insertSound(e) {
|
|
56
|
+
this.dispatchEvent(new l(e));
|
|
57
|
+
}
|
|
58
|
+
onDeleteSound(e, t) {
|
|
59
|
+
this.dispatchEvent(new s(e, t));
|
|
60
|
+
}
|
|
61
|
+
_render() {
|
|
62
|
+
if (this._model) {
|
|
63
|
+
let t = n.createElement(e, {
|
|
64
|
+
onModelChanged: this.onModelChanged,
|
|
65
|
+
onConfigurationChanged: this.onConfigurationChanged,
|
|
66
|
+
model: this._model,
|
|
67
|
+
configuration: this._configuration,
|
|
68
|
+
imageSupport: {
|
|
69
|
+
add: this.insertImage,
|
|
70
|
+
delete: this.onDeleteImage
|
|
71
|
+
},
|
|
72
|
+
uploadSoundSupport: {
|
|
73
|
+
add: this.insertSound.bind(this),
|
|
74
|
+
delete: this.onDeleteSound.bind(this)
|
|
75
|
+
}
|
|
76
|
+
});
|
|
77
|
+
this._root ||= r(this), this._root.render(t), queueMicrotask(() => {
|
|
78
|
+
i(this);
|
|
79
|
+
});
|
|
80
|
+
}
|
|
81
|
+
}
|
|
82
|
+
disconnectedCallback() {
|
|
83
|
+
this._root && this._root.unmount();
|
|
84
|
+
}
|
|
85
|
+
};
|
|
86
|
+
//#endregion
|
|
87
|
+
export { p as default };
|
|
@@ -0,0 +1,46 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* @synced-from pie-elements/packages/graphing-solution-set/configure/src/utils.js
|
|
3
|
+
* @auto-generated
|
|
4
|
+
*
|
|
5
|
+
* This file is automatically synced from pie-elements and converted to TypeScript.
|
|
6
|
+
* Manual edits will be overwritten on next sync.
|
|
7
|
+
* To make changes, edit the upstream JavaScript file and run sync again.
|
|
8
|
+
*/
|
|
9
|
+
export declare const VALID_LABEL_VALUES: {
|
|
10
|
+
0.01: number[];
|
|
11
|
+
0.02: number[];
|
|
12
|
+
0.04: number[];
|
|
13
|
+
0.05: number[];
|
|
14
|
+
0.0625: number[];
|
|
15
|
+
0.1: number[];
|
|
16
|
+
0.125: number[];
|
|
17
|
+
0.2: number[];
|
|
18
|
+
0.25: number[];
|
|
19
|
+
0.5: number[];
|
|
20
|
+
1: number[];
|
|
21
|
+
2: number[];
|
|
22
|
+
3: number[];
|
|
23
|
+
4: number[];
|
|
24
|
+
5: number[];
|
|
25
|
+
8: number[];
|
|
26
|
+
10: number[];
|
|
27
|
+
12: number[];
|
|
28
|
+
15: number[];
|
|
29
|
+
20: number[];
|
|
30
|
+
40: number[];
|
|
31
|
+
50: number[];
|
|
32
|
+
64: number[];
|
|
33
|
+
100: number[];
|
|
34
|
+
500: number[];
|
|
35
|
+
1000: number[];
|
|
36
|
+
};
|
|
37
|
+
export declare const getGridValues: (axis: any, size: any, prefferedValues?: boolean) => number[];
|
|
38
|
+
export declare const getLabelValues: (value: any) => any;
|
|
39
|
+
export declare const applyConstraints: (axis: any, size: any, oldGridValues: any, oldLabelValues: any) => {
|
|
40
|
+
gridValues: number[];
|
|
41
|
+
labelValues: any;
|
|
42
|
+
};
|
|
43
|
+
export declare const filterPlotableMarks: (domain: any, range: any, answers: any) => {};
|
|
44
|
+
export declare const findSectionsInSolutionSet: (gssLineData: any, answers: any, domain: any, range: any) => any;
|
|
45
|
+
export declare const pointInsidePolygon: (point: any, polygon: any) => boolean;
|
|
46
|
+
export declare const checkIfLinesAreAdded: (gssLineData: any, answer: any) => boolean | undefined;
|
|
@@ -0,0 +1,474 @@
|
|
|
1
|
+
import e from "../node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/isEqual.js";
|
|
2
|
+
//#region src/author/utils.ts
|
|
3
|
+
var t = [
|
|
4
|
+
.01,
|
|
5
|
+
.02,
|
|
6
|
+
.04,
|
|
7
|
+
.05,
|
|
8
|
+
.0625,
|
|
9
|
+
.1,
|
|
10
|
+
.125,
|
|
11
|
+
.2,
|
|
12
|
+
.25,
|
|
13
|
+
.5,
|
|
14
|
+
1,
|
|
15
|
+
2,
|
|
16
|
+
3,
|
|
17
|
+
4,
|
|
18
|
+
5,
|
|
19
|
+
8,
|
|
20
|
+
10,
|
|
21
|
+
12,
|
|
22
|
+
15,
|
|
23
|
+
20,
|
|
24
|
+
40,
|
|
25
|
+
50,
|
|
26
|
+
64,
|
|
27
|
+
100,
|
|
28
|
+
500,
|
|
29
|
+
1e3
|
|
30
|
+
], n = [
|
|
31
|
+
.01,
|
|
32
|
+
.02,
|
|
33
|
+
.05,
|
|
34
|
+
.1,
|
|
35
|
+
.2,
|
|
36
|
+
.25,
|
|
37
|
+
.5,
|
|
38
|
+
1,
|
|
39
|
+
2,
|
|
40
|
+
5,
|
|
41
|
+
10,
|
|
42
|
+
20,
|
|
43
|
+
50,
|
|
44
|
+
100,
|
|
45
|
+
500,
|
|
46
|
+
1e3
|
|
47
|
+
], r = {
|
|
48
|
+
.01: [
|
|
49
|
+
0,
|
|
50
|
+
.01,
|
|
51
|
+
.02,
|
|
52
|
+
.04,
|
|
53
|
+
.05,
|
|
54
|
+
.1
|
|
55
|
+
],
|
|
56
|
+
.02: [
|
|
57
|
+
0,
|
|
58
|
+
.02,
|
|
59
|
+
.04,
|
|
60
|
+
.1
|
|
61
|
+
],
|
|
62
|
+
.04: [
|
|
63
|
+
0,
|
|
64
|
+
.04,
|
|
65
|
+
.08,
|
|
66
|
+
.16,
|
|
67
|
+
.2
|
|
68
|
+
],
|
|
69
|
+
.05: [
|
|
70
|
+
0,
|
|
71
|
+
.05,
|
|
72
|
+
.1,
|
|
73
|
+
.2,
|
|
74
|
+
.25
|
|
75
|
+
],
|
|
76
|
+
.0625: [
|
|
77
|
+
0,
|
|
78
|
+
.0625,
|
|
79
|
+
.125,
|
|
80
|
+
.25,
|
|
81
|
+
.5
|
|
82
|
+
],
|
|
83
|
+
.1: [
|
|
84
|
+
0,
|
|
85
|
+
.1,
|
|
86
|
+
.2,
|
|
87
|
+
.4,
|
|
88
|
+
.5,
|
|
89
|
+
1
|
|
90
|
+
],
|
|
91
|
+
.125: [
|
|
92
|
+
0,
|
|
93
|
+
.125,
|
|
94
|
+
.25,
|
|
95
|
+
.5,
|
|
96
|
+
1
|
|
97
|
+
],
|
|
98
|
+
.2: [
|
|
99
|
+
0,
|
|
100
|
+
.2,
|
|
101
|
+
.5,
|
|
102
|
+
.1
|
|
103
|
+
],
|
|
104
|
+
.25: [
|
|
105
|
+
0,
|
|
106
|
+
.25,
|
|
107
|
+
.5,
|
|
108
|
+
1,
|
|
109
|
+
2
|
|
110
|
+
],
|
|
111
|
+
.5: [
|
|
112
|
+
0,
|
|
113
|
+
.5,
|
|
114
|
+
1,
|
|
115
|
+
2
|
|
116
|
+
],
|
|
117
|
+
1: [
|
|
118
|
+
0,
|
|
119
|
+
1,
|
|
120
|
+
2,
|
|
121
|
+
4,
|
|
122
|
+
5,
|
|
123
|
+
10
|
|
124
|
+
],
|
|
125
|
+
2: [
|
|
126
|
+
0,
|
|
127
|
+
2,
|
|
128
|
+
4,
|
|
129
|
+
8,
|
|
130
|
+
10
|
|
131
|
+
],
|
|
132
|
+
3: [
|
|
133
|
+
0,
|
|
134
|
+
3,
|
|
135
|
+
6,
|
|
136
|
+
12,
|
|
137
|
+
15
|
|
138
|
+
],
|
|
139
|
+
4: [
|
|
140
|
+
0,
|
|
141
|
+
4,
|
|
142
|
+
8,
|
|
143
|
+
16,
|
|
144
|
+
20
|
|
145
|
+
],
|
|
146
|
+
5: [
|
|
147
|
+
0,
|
|
148
|
+
5,
|
|
149
|
+
10,
|
|
150
|
+
20,
|
|
151
|
+
25
|
|
152
|
+
],
|
|
153
|
+
8: [
|
|
154
|
+
0,
|
|
155
|
+
8,
|
|
156
|
+
16,
|
|
157
|
+
32,
|
|
158
|
+
40,
|
|
159
|
+
64
|
|
160
|
+
],
|
|
161
|
+
10: [
|
|
162
|
+
0,
|
|
163
|
+
10,
|
|
164
|
+
20,
|
|
165
|
+
40,
|
|
166
|
+
50,
|
|
167
|
+
100
|
|
168
|
+
],
|
|
169
|
+
12: [
|
|
170
|
+
0,
|
|
171
|
+
12,
|
|
172
|
+
24
|
|
173
|
+
],
|
|
174
|
+
15: [
|
|
175
|
+
0,
|
|
176
|
+
15,
|
|
177
|
+
30,
|
|
178
|
+
60
|
|
179
|
+
],
|
|
180
|
+
20: [
|
|
181
|
+
0,
|
|
182
|
+
20,
|
|
183
|
+
40,
|
|
184
|
+
80,
|
|
185
|
+
100
|
|
186
|
+
],
|
|
187
|
+
40: [
|
|
188
|
+
0,
|
|
189
|
+
40,
|
|
190
|
+
80,
|
|
191
|
+
160,
|
|
192
|
+
200
|
|
193
|
+
],
|
|
194
|
+
50: [
|
|
195
|
+
0,
|
|
196
|
+
50,
|
|
197
|
+
100,
|
|
198
|
+
200,
|
|
199
|
+
250
|
|
200
|
+
],
|
|
201
|
+
64: [
|
|
202
|
+
0,
|
|
203
|
+
64,
|
|
204
|
+
128
|
|
205
|
+
],
|
|
206
|
+
100: [
|
|
207
|
+
0,
|
|
208
|
+
100,
|
|
209
|
+
200,
|
|
210
|
+
400,
|
|
211
|
+
500
|
|
212
|
+
],
|
|
213
|
+
500: [
|
|
214
|
+
0,
|
|
215
|
+
500,
|
|
216
|
+
1e3,
|
|
217
|
+
2500
|
|
218
|
+
],
|
|
219
|
+
1e3: [
|
|
220
|
+
0,
|
|
221
|
+
1e3,
|
|
222
|
+
2e3,
|
|
223
|
+
4e3,
|
|
224
|
+
5e3
|
|
225
|
+
]
|
|
226
|
+
}, i = (e, r, i = !1) => {
|
|
227
|
+
let a = 10 * (e.max - e.min) / r, o = a * 10;
|
|
228
|
+
return (i ? n : t).filter((e) => e >= a && e <= o);
|
|
229
|
+
}, a = (e) => r[e] || [], o = (t, n, r, o) => {
|
|
230
|
+
let s = i(t, n), c = a(t.step);
|
|
231
|
+
if (!e(r, s) && !s.includes(t.step)) {
|
|
232
|
+
let e = i(t, n, !0)[0] || 1;
|
|
233
|
+
return t.step = e, c = a(e), c.includes(t.labelStep) || (t.labelStep = e), {
|
|
234
|
+
gridValues: s,
|
|
235
|
+
labelValues: c
|
|
236
|
+
};
|
|
237
|
+
}
|
|
238
|
+
return !e(o, c) && !c.includes(t.labelStep) && (t.labelStep = t.step), {
|
|
239
|
+
gridValues: s,
|
|
240
|
+
labelValues: c
|
|
241
|
+
};
|
|
242
|
+
}, s = (e) => {
|
|
243
|
+
let t = [], n = 0;
|
|
244
|
+
for (; n >= e.min && t.indexOf(n) < 0;) t.push(n), n = Math.round((n - e.step) * 1e4) / 1e4;
|
|
245
|
+
for (n = Math.round(e.step * 1e4) / 1e4; n <= e.max && t.indexOf(n) < 0;) t.push(n), n = Math.round((n + e.step) * 1e4) / 1e4;
|
|
246
|
+
return t ? t.filter((t) => t >= e.min && t <= e.max) : [];
|
|
247
|
+
}, c = (e, t, n) => {
|
|
248
|
+
let r = s(e), i = s(t), a = (e, t) => r.includes(e) && i.includes(t);
|
|
249
|
+
return Object.entries(n || {}).reduce((e, [t, n]) => (e[t] = {
|
|
250
|
+
...n,
|
|
251
|
+
marks: (n.marks || []).filter((e) => {
|
|
252
|
+
if (e.type === "point") return a(e.x, e.y);
|
|
253
|
+
if (e.type === "polygon") return !e.points.find((e) => !a(e.x, e.y));
|
|
254
|
+
let t = e.from || e.root, n = e.to || e.edge;
|
|
255
|
+
return e.building ? a(t.x, t.y) : a(t.x, t.y) && a(n.x, n.y);
|
|
256
|
+
})
|
|
257
|
+
}, e), {});
|
|
258
|
+
}, l = (e, t) => Number(Math.sqrt((e.x - t.x) ** 2 + (e.y - t.y) ** 2).toFixed(3)), u = (e, t) => {
|
|
259
|
+
let n = e, r = !1, i = [...t];
|
|
260
|
+
i.push(t[0]);
|
|
261
|
+
for (let e = 0; e < i.length - 1; e++) {
|
|
262
|
+
let t = i[e], a = i[e + 1];
|
|
263
|
+
if (l(t, n) + l(n, a) === l(t, a)) {
|
|
264
|
+
r = !0;
|
|
265
|
+
break;
|
|
266
|
+
}
|
|
267
|
+
}
|
|
268
|
+
return r;
|
|
269
|
+
}, d = (e, t, n, r, i, a, o, s) => {
|
|
270
|
+
let c, l = (s - a) * (n - e) - (o - i) * (r - t);
|
|
271
|
+
return l === 0 ? null : (c = ((o - i) * (t - a) - (s - a) * (e - i)) / l, {
|
|
272
|
+
x: Number((e + c * (n - e)).toFixed(3)),
|
|
273
|
+
y: Number((t + c * (r - t)).toFixed(3))
|
|
274
|
+
});
|
|
275
|
+
}, f = (e, t, n) => e.x > t.min && e.x < t.max && e.y > n.min && e.y < n.max, p = (e, t, n) => e.x >= t.min && e.x <= t.max && e.y >= n.min && e.y <= n.max, m = (e, t, n) => {
|
|
276
|
+
let r = [], i = [
|
|
277
|
+
[
|
|
278
|
+
t.max,
|
|
279
|
+
n.max,
|
|
280
|
+
t.max,
|
|
281
|
+
n.min
|
|
282
|
+
],
|
|
283
|
+
[
|
|
284
|
+
t.min,
|
|
285
|
+
n.max,
|
|
286
|
+
t.min,
|
|
287
|
+
n.min
|
|
288
|
+
],
|
|
289
|
+
[
|
|
290
|
+
t.min,
|
|
291
|
+
n.max,
|
|
292
|
+
t.max,
|
|
293
|
+
n.max
|
|
294
|
+
],
|
|
295
|
+
[
|
|
296
|
+
t.min,
|
|
297
|
+
n.min,
|
|
298
|
+
t.max,
|
|
299
|
+
n.min
|
|
300
|
+
]
|
|
301
|
+
];
|
|
302
|
+
for (let a = 0; a < i.length; a++) {
|
|
303
|
+
let o = d(e.from.x, e.from.y, e.to.x, e.to.y, i[a][0], i[a][1], i[a][2], i[a][3]);
|
|
304
|
+
o && p(o, t, n) && r.push(o);
|
|
305
|
+
}
|
|
306
|
+
return r;
|
|
307
|
+
}, h = (e) => {
|
|
308
|
+
e.sort((e, t) => e.y - t.y);
|
|
309
|
+
let t = (e[0].y + e[e.length - 1].y) / 2;
|
|
310
|
+
e.sort((e, t) => t.x - e.x);
|
|
311
|
+
let n = {
|
|
312
|
+
x: (e[0].x + e[e.length - 1].x) / 2,
|
|
313
|
+
y: t
|
|
314
|
+
}, r;
|
|
315
|
+
e.forEach((e) => {
|
|
316
|
+
let t = Math.atan2(e.y - n.y, e.x - n.x);
|
|
317
|
+
r ? t < r && (t += Math.PI * 2) : r = t, e.angle = t;
|
|
318
|
+
}), e.sort((e, t) => e.angle - t.angle);
|
|
319
|
+
let i = e.reverse();
|
|
320
|
+
return i.unshift(i.pop()), i.map(({ angle: e, ...t }) => t);
|
|
321
|
+
}, g = (e, t) => e.x * t.x + e.y * t.y, _ = (e) => Math.sqrt(e.x * e.x + e.y * e.y), v = (e, t) => {
|
|
322
|
+
let n = g(e, t), r = _(e), i = _(t);
|
|
323
|
+
return Math.acos(n / (r * i));
|
|
324
|
+
}, y = (e, t, n, r) => {
|
|
325
|
+
let i = {
|
|
326
|
+
x: t.x - e.x,
|
|
327
|
+
y: t.y - e.y
|
|
328
|
+
}, a = {
|
|
329
|
+
x: n.x - e.x,
|
|
330
|
+
y: n.y - e.y
|
|
331
|
+
}, o = {
|
|
332
|
+
x: r.x - e.x,
|
|
333
|
+
y: r.y - e.y
|
|
334
|
+
}, s = v(i, o) + v(a, o);
|
|
335
|
+
return Math.abs(s - v(i, a)) < 1e-4;
|
|
336
|
+
}, b = (e) => e.filter((t, n) => n === e.findIndex((e) => t.x === e.x && t.y === e.y)), x = (e) => {
|
|
337
|
+
for (let t = 0; t < e.length; t++) e[t] = e[t].filter((n, r) => r === e[t].findIndex((e) => n.x === e.x && n.y === e.y));
|
|
338
|
+
e = e.filter((e) => e.length > 2);
|
|
339
|
+
for (let t = 0; t < e.length; t++) e[t] = h(e[t]);
|
|
340
|
+
return e;
|
|
341
|
+
}, S = (e, t, n) => {
|
|
342
|
+
let r = [];
|
|
343
|
+
return r.push([].concat(e)), r.push([].concat(e)), e[0].x === t.max && e[1].y === n.max || e[1].x === t.max && e[0].y === n.max ? (r[0].push({
|
|
344
|
+
x: t.max,
|
|
345
|
+
y: n.max
|
|
346
|
+
}), r[1].push({
|
|
347
|
+
x: t.min,
|
|
348
|
+
y: n.max
|
|
349
|
+
}, {
|
|
350
|
+
x: t.min,
|
|
351
|
+
y: n.min
|
|
352
|
+
}, {
|
|
353
|
+
x: t.max,
|
|
354
|
+
y: n.min
|
|
355
|
+
})) : e[0].x === t.min && e[1].y === n.max || e[1].x === t.min && e[0].y === n.max ? (r[0].push({
|
|
356
|
+
x: t.min,
|
|
357
|
+
y: n.max
|
|
358
|
+
}), r[1].push({
|
|
359
|
+
x: t.max,
|
|
360
|
+
y: n.max
|
|
361
|
+
}, {
|
|
362
|
+
x: t.max,
|
|
363
|
+
y: n.min
|
|
364
|
+
}, {
|
|
365
|
+
x: t.min,
|
|
366
|
+
y: n.min
|
|
367
|
+
})) : e[0].x === t.min && e[1].y === n.min || e[1].x === t.min && e[0].y === n.min ? (r[0].push({
|
|
368
|
+
x: t.min,
|
|
369
|
+
y: n.min
|
|
370
|
+
}), r[1].push({
|
|
371
|
+
x: t.max,
|
|
372
|
+
y: n.min
|
|
373
|
+
}, {
|
|
374
|
+
x: t.max,
|
|
375
|
+
y: n.max
|
|
376
|
+
}, {
|
|
377
|
+
x: t.min,
|
|
378
|
+
y: n.max
|
|
379
|
+
})) : e[0].x === t.max && e[1].y === n.min || e[1].x === t.max && e[0].y === n.min ? (r[0].push({
|
|
380
|
+
x: t.max,
|
|
381
|
+
y: n.min
|
|
382
|
+
}), r[1].push({
|
|
383
|
+
x: t.min,
|
|
384
|
+
y: n.min
|
|
385
|
+
}, {
|
|
386
|
+
x: t.min,
|
|
387
|
+
y: n.max
|
|
388
|
+
}, {
|
|
389
|
+
x: t.max,
|
|
390
|
+
y: n.max
|
|
391
|
+
})) : e[0].x === t.min && e[1].x === t.max || e[0].x === t.max && e[1].x === t.min ? (r[0].push({
|
|
392
|
+
x: t.min,
|
|
393
|
+
y: n.max
|
|
394
|
+
}, {
|
|
395
|
+
x: t.max,
|
|
396
|
+
y: n.max
|
|
397
|
+
}), r[1].push({
|
|
398
|
+
x: t.min,
|
|
399
|
+
y: n.min
|
|
400
|
+
}, {
|
|
401
|
+
x: t.max,
|
|
402
|
+
y: n.min
|
|
403
|
+
})) : (e[0].y === n.min && e[1].y === n.max || e[0].y === n.max && e[1].y === n.min) && (r[0].push({
|
|
404
|
+
x: t.min,
|
|
405
|
+
y: n.min
|
|
406
|
+
}, {
|
|
407
|
+
x: t.min,
|
|
408
|
+
y: n.max
|
|
409
|
+
}), r[1].push({
|
|
410
|
+
x: t.max,
|
|
411
|
+
y: n.min
|
|
412
|
+
}, {
|
|
413
|
+
x: t.max,
|
|
414
|
+
y: n.max
|
|
415
|
+
})), x(r);
|
|
416
|
+
}, C = (e, t, n, r) => {
|
|
417
|
+
let i = t[0], a = t[1], o = [
|
|
418
|
+
{
|
|
419
|
+
x: n.min,
|
|
420
|
+
y: r.min
|
|
421
|
+
},
|
|
422
|
+
{
|
|
423
|
+
x: n.min,
|
|
424
|
+
y: r.max
|
|
425
|
+
},
|
|
426
|
+
{
|
|
427
|
+
x: n.max,
|
|
428
|
+
y: r.min
|
|
429
|
+
},
|
|
430
|
+
{
|
|
431
|
+
x: n.max,
|
|
432
|
+
y: r.max
|
|
433
|
+
}
|
|
434
|
+
], s = d(i.from.x, i.from.y, i.to.x, i.to.y, a.from.x, a.from.y, a.to.x, a.to.y), c = [], l = m(i, n, r);
|
|
435
|
+
l = b(l);
|
|
436
|
+
let p = m(a, n, r);
|
|
437
|
+
if (p = b(p), s && f(s, n, r)) for (let e = 0; e < l.length; e++) for (let t = 0; t < p.length; t++) {
|
|
438
|
+
let n = [], r = [];
|
|
439
|
+
n.push(s), n.push(l[e]), n.push(p[t]);
|
|
440
|
+
for (let i = 0; i < o.length; i++) y(s, l[e], p[t], o[i]) ? n.push(o[i]) : r.push(o[i]);
|
|
441
|
+
o = r, c.push(n);
|
|
442
|
+
}
|
|
443
|
+
else {
|
|
444
|
+
let e = S(l, n, r), t = S(p, n, r);
|
|
445
|
+
for (let t = 0; t < e.length; t++) u(p[0], e[t]) && u(p[1], e[t]) || c.push(e[t]);
|
|
446
|
+
for (let e = 0; e < t.length; e++) u(l[0], t[e]) && u(l[1], t[e]) || c.push(t[e]);
|
|
447
|
+
for (let e = 0; e < c.length; e++) o = o.filter(function(t) {
|
|
448
|
+
return !c[e].some(function(e) {
|
|
449
|
+
return t.x === e.x && t.y === e.y;
|
|
450
|
+
});
|
|
451
|
+
});
|
|
452
|
+
let i = o.concat(l, p);
|
|
453
|
+
c.push(i);
|
|
454
|
+
}
|
|
455
|
+
return x(c);
|
|
456
|
+
}, w = (e, t, n, r) => (e.numberOfLines === 1 ? e.sections = S(m(t[0], n, r), n, r) : e.sections = C(e, t, n, r), e), T = (e, t) => {
|
|
457
|
+
let n = t.length, r = e.x, i = e.y, a = !1, o = t[0], s;
|
|
458
|
+
for (let e = 1; e <= n; e++) {
|
|
459
|
+
if (s = t[e % n], i > Math.min(o.y, s.y) && i <= Math.max(o.y, s.y) && r <= Math.max(o.x, s.x)) {
|
|
460
|
+
let e = (i - o.y) * (s.x - o.x) / (s.y - o.y) + o.x;
|
|
461
|
+
(o.x === s.x || r <= e) && (a = !a);
|
|
462
|
+
}
|
|
463
|
+
o = s;
|
|
464
|
+
}
|
|
465
|
+
return a;
|
|
466
|
+
}, E = (e, t) => {
|
|
467
|
+
if (t.length === 0) return !1;
|
|
468
|
+
if (e.numberOfLines === 1) {
|
|
469
|
+
if (t.length === 1) return !t[0].building;
|
|
470
|
+
} else if (t.length !== 2) return !1;
|
|
471
|
+
else return !t[1].building;
|
|
472
|
+
};
|
|
473
|
+
//#endregion
|
|
474
|
+
export { o as applyConstraints, E as checkIfLinesAreAdded, c as filterPlotableMarks, w as findSectionsInSolutionSet, i as getGridValues, a as getLabelValues, T as pointInsidePolygon };
|