@nubjs/nub-darwin-x64 0.2.3 → 0.2.5
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/bin/nub +0 -0
- package/bin/nubx +0 -0
- package/package.json +2 -3
- package/runtime/addons/nub-native.node +0 -0
- package/runtime/cache-evict.mjs +0 -69
- package/runtime/compile-cache-restore.mjs +0 -21
- package/runtime/floor-builtin.mjs +0 -57
- package/runtime/navigator-locks.mjs +0 -242
- package/runtime/navigator-shim.mjs +0 -144
- package/runtime/node_modules/@js-temporal/polyfill/CHANGELOG.md +0 -453
- package/runtime/node_modules/@js-temporal/polyfill/LICENSE +0 -13
- package/runtime/node_modules/@js-temporal/polyfill/README.md +0 -90
- package/runtime/node_modules/@js-temporal/polyfill/dist/index.cjs +0 -2
- package/runtime/node_modules/@js-temporal/polyfill/dist/index.cjs.map +0 -1
- package/runtime/node_modules/@js-temporal/polyfill/dist/index.esm.js +0 -2
- package/runtime/node_modules/@js-temporal/polyfill/dist/index.esm.js.map +0 -1
- package/runtime/node_modules/@js-temporal/polyfill/dist/index.umd.js +0 -2
- package/runtime/node_modules/@js-temporal/polyfill/dist/index.umd.js.map +0 -1
- package/runtime/node_modules/@js-temporal/polyfill/index.d.cts +0 -1215
- package/runtime/node_modules/@js-temporal/polyfill/index.d.ts +0 -1215
- package/runtime/node_modules/@js-temporal/polyfill/lib/assert.ts +0 -8
- package/runtime/node_modules/@js-temporal/polyfill/lib/bigintmath.ts +0 -39
- package/runtime/node_modules/@js-temporal/polyfill/lib/calendar.ts +0 -2424
- package/runtime/node_modules/@js-temporal/polyfill/lib/debug.ts +0 -7
- package/runtime/node_modules/@js-temporal/polyfill/lib/duration.ts +0 -438
- package/runtime/node_modules/@js-temporal/polyfill/lib/durationformat.d.ts +0 -93
- package/runtime/node_modules/@js-temporal/polyfill/lib/ecmascript.ts +0 -4973
- package/runtime/node_modules/@js-temporal/polyfill/lib/index.ts +0 -34
- package/runtime/node_modules/@js-temporal/polyfill/lib/init.ts +0 -43
- package/runtime/node_modules/@js-temporal/polyfill/lib/instant.ts +0 -138
- package/runtime/node_modules/@js-temporal/polyfill/lib/internaltypes.d.ts +0 -242
- package/runtime/node_modules/@js-temporal/polyfill/lib/intl.ts +0 -758
- package/runtime/node_modules/@js-temporal/polyfill/lib/intrinsicclass.ts +0 -162
- package/runtime/node_modules/@js-temporal/polyfill/lib/legacydate.ts +0 -17
- package/runtime/node_modules/@js-temporal/polyfill/lib/math.ts +0 -96
- package/runtime/node_modules/@js-temporal/polyfill/lib/now.ts +0 -48
- package/runtime/node_modules/@js-temporal/polyfill/lib/plaindate.ts +0 -212
- package/runtime/node_modules/@js-temporal/polyfill/lib/plaindatetime.ts +0 -274
- package/runtime/node_modules/@js-temporal/polyfill/lib/plainmonthday.ts +0 -110
- package/runtime/node_modules/@js-temporal/polyfill/lib/plaintime.ts +0 -154
- package/runtime/node_modules/@js-temporal/polyfill/lib/plainyearmonth.ts +0 -157
- package/runtime/node_modules/@js-temporal/polyfill/lib/regex.ts +0 -59
- package/runtime/node_modules/@js-temporal/polyfill/lib/slots.ts +0 -341
- package/runtime/node_modules/@js-temporal/polyfill/lib/temporal.ts +0 -10
- package/runtime/node_modules/@js-temporal/polyfill/lib/timeduration.ts +0 -149
- package/runtime/node_modules/@js-temporal/polyfill/lib/zoneddatetime.ts +0 -492
- package/runtime/node_modules/@js-temporal/polyfill/package.json +0 -143
- package/runtime/node_modules/@oxc-project/runtime/CHANGELOG.md +0 -88
- package/runtime/node_modules/@oxc-project/runtime/LICENSE +0 -22
- package/runtime/node_modules/@oxc-project/runtime/README.md +0 -5
- package/runtime/node_modules/@oxc-project/runtime/package.json +0 -1066
- package/runtime/node_modules/@oxc-project/runtime/src/helpers/AwaitValue.js +0 -4
- package/runtime/node_modules/@oxc-project/runtime/src/helpers/OverloadYield.js +0 -4
- package/runtime/node_modules/@oxc-project/runtime/src/helpers/applyDecoratedDescriptor.js +0 -9
- package/runtime/node_modules/@oxc-project/runtime/src/helpers/applyDecs.js +0 -236
- package/runtime/node_modules/@oxc-project/runtime/src/helpers/applyDecs2203.js +0 -184
- package/runtime/node_modules/@oxc-project/runtime/src/helpers/applyDecs2203R.js +0 -191
- package/runtime/node_modules/@oxc-project/runtime/src/helpers/applyDecs2301.js +0 -222
- package/runtime/node_modules/@oxc-project/runtime/src/helpers/applyDecs2305.js +0 -133
- package/runtime/node_modules/@oxc-project/runtime/src/helpers/applyDecs2311.js +0 -124
- package/runtime/node_modules/@oxc-project/runtime/src/helpers/arrayLikeToArray.js +0 -6
- package/runtime/node_modules/@oxc-project/runtime/src/helpers/arrayWithHoles.js +0 -4
- package/runtime/node_modules/@oxc-project/runtime/src/helpers/arrayWithoutHoles.js +0 -5
- package/runtime/node_modules/@oxc-project/runtime/src/helpers/assertClassBrand.js +0 -5
- package/runtime/node_modules/@oxc-project/runtime/src/helpers/assertThisInitialized.js +0 -5
- package/runtime/node_modules/@oxc-project/runtime/src/helpers/asyncGeneratorDelegate.js +0 -24
- package/runtime/node_modules/@oxc-project/runtime/src/helpers/asyncIterator.js +0 -45
- package/runtime/node_modules/@oxc-project/runtime/src/helpers/asyncToGenerator.js +0 -26
- package/runtime/node_modules/@oxc-project/runtime/src/helpers/awaitAsyncGenerator.js +0 -5
- package/runtime/node_modules/@oxc-project/runtime/src/helpers/callSuper.js +0 -7
- package/runtime/node_modules/@oxc-project/runtime/src/helpers/checkInRHS.js +0 -6
- package/runtime/node_modules/@oxc-project/runtime/src/helpers/checkPrivateRedeclaration.js +0 -4
- package/runtime/node_modules/@oxc-project/runtime/src/helpers/classApplyDescriptorDestructureSet.js +0 -10
- package/runtime/node_modules/@oxc-project/runtime/src/helpers/classApplyDescriptorGet.js +0 -4
- package/runtime/node_modules/@oxc-project/runtime/src/helpers/classApplyDescriptorSet.js +0 -7
- package/runtime/node_modules/@oxc-project/runtime/src/helpers/classCallCheck.js +0 -4
- package/runtime/node_modules/@oxc-project/runtime/src/helpers/classCheckPrivateStaticAccess.js +0 -5
- package/runtime/node_modules/@oxc-project/runtime/src/helpers/classCheckPrivateStaticFieldDescriptor.js +0 -4
- package/runtime/node_modules/@oxc-project/runtime/src/helpers/classExtractFieldDescriptor.js +0 -5
- package/runtime/node_modules/@oxc-project/runtime/src/helpers/classNameTDZError.js +0 -4
- package/runtime/node_modules/@oxc-project/runtime/src/helpers/classPrivateFieldDestructureSet.js +0 -7
- package/runtime/node_modules/@oxc-project/runtime/src/helpers/classPrivateFieldGet.js +0 -7
- package/runtime/node_modules/@oxc-project/runtime/src/helpers/classPrivateFieldGet2.js +0 -5
- package/runtime/node_modules/@oxc-project/runtime/src/helpers/classPrivateFieldInitSpec.js +0 -5
- package/runtime/node_modules/@oxc-project/runtime/src/helpers/classPrivateFieldLooseBase.js +0 -5
- package/runtime/node_modules/@oxc-project/runtime/src/helpers/classPrivateFieldLooseKey.js +0 -5
- package/runtime/node_modules/@oxc-project/runtime/src/helpers/classPrivateFieldSet.js +0 -7
- package/runtime/node_modules/@oxc-project/runtime/src/helpers/classPrivateFieldSet2.js +0 -5
- package/runtime/node_modules/@oxc-project/runtime/src/helpers/classPrivateGetter.js +0 -5
- package/runtime/node_modules/@oxc-project/runtime/src/helpers/classPrivateMethodGet.js +0 -5
- package/runtime/node_modules/@oxc-project/runtime/src/helpers/classPrivateMethodInitSpec.js +0 -5
- package/runtime/node_modules/@oxc-project/runtime/src/helpers/classPrivateMethodSet.js +0 -4
- package/runtime/node_modules/@oxc-project/runtime/src/helpers/classPrivateSetter.js +0 -5
- package/runtime/node_modules/@oxc-project/runtime/src/helpers/classStaticPrivateFieldDestructureSet.js +0 -7
- package/runtime/node_modules/@oxc-project/runtime/src/helpers/classStaticPrivateFieldSpecGet.js +0 -7
- package/runtime/node_modules/@oxc-project/runtime/src/helpers/classStaticPrivateFieldSpecSet.js +0 -7
- package/runtime/node_modules/@oxc-project/runtime/src/helpers/classStaticPrivateMethodGet.js +0 -5
- package/runtime/node_modules/@oxc-project/runtime/src/helpers/classStaticPrivateMethodSet.js +0 -4
- package/runtime/node_modules/@oxc-project/runtime/src/helpers/construct.js +0 -10
- package/runtime/node_modules/@oxc-project/runtime/src/helpers/createClass.js +0 -13
- package/runtime/node_modules/@oxc-project/runtime/src/helpers/createForOfIteratorHelper.js +0 -50
- package/runtime/node_modules/@oxc-project/runtime/src/helpers/createForOfIteratorHelperLoose.js +0 -19
- package/runtime/node_modules/@oxc-project/runtime/src/helpers/createSuper.js +0 -16
- package/runtime/node_modules/@oxc-project/runtime/src/helpers/decorate.js +0 -23
- package/runtime/node_modules/@oxc-project/runtime/src/helpers/decorateMetadata.js +0 -9
- package/runtime/node_modules/@oxc-project/runtime/src/helpers/decorateParam.js +0 -11
- package/runtime/node_modules/@oxc-project/runtime/src/helpers/defaults.js +0 -9
- package/runtime/node_modules/@oxc-project/runtime/src/helpers/defineAccessor.js +0 -8
- package/runtime/node_modules/@oxc-project/runtime/src/helpers/defineEnumerableProperties.js +0 -12
- package/runtime/node_modules/@oxc-project/runtime/src/helpers/defineProperty.js +0 -10
- package/runtime/node_modules/@oxc-project/runtime/src/helpers/dispose.js +0 -28
- package/runtime/node_modules/@oxc-project/runtime/src/helpers/esm/AwaitValue.js +0 -4
- package/runtime/node_modules/@oxc-project/runtime/src/helpers/esm/OverloadYield.js +0 -4
- package/runtime/node_modules/@oxc-project/runtime/src/helpers/esm/applyDecoratedDescriptor.js +0 -9
- package/runtime/node_modules/@oxc-project/runtime/src/helpers/esm/applyDecs.js +0 -236
- package/runtime/node_modules/@oxc-project/runtime/src/helpers/esm/applyDecs2203.js +0 -184
- package/runtime/node_modules/@oxc-project/runtime/src/helpers/esm/applyDecs2203R.js +0 -191
- package/runtime/node_modules/@oxc-project/runtime/src/helpers/esm/applyDecs2301.js +0 -222
- package/runtime/node_modules/@oxc-project/runtime/src/helpers/esm/applyDecs2305.js +0 -133
- package/runtime/node_modules/@oxc-project/runtime/src/helpers/esm/applyDecs2311.js +0 -124
- package/runtime/node_modules/@oxc-project/runtime/src/helpers/esm/arrayLikeToArray.js +0 -6
- package/runtime/node_modules/@oxc-project/runtime/src/helpers/esm/arrayWithHoles.js +0 -4
- package/runtime/node_modules/@oxc-project/runtime/src/helpers/esm/arrayWithoutHoles.js +0 -5
- package/runtime/node_modules/@oxc-project/runtime/src/helpers/esm/assertClassBrand.js +0 -5
- package/runtime/node_modules/@oxc-project/runtime/src/helpers/esm/assertThisInitialized.js +0 -5
- package/runtime/node_modules/@oxc-project/runtime/src/helpers/esm/asyncGeneratorDelegate.js +0 -24
- package/runtime/node_modules/@oxc-project/runtime/src/helpers/esm/asyncIterator.js +0 -45
- package/runtime/node_modules/@oxc-project/runtime/src/helpers/esm/asyncToGenerator.js +0 -26
- package/runtime/node_modules/@oxc-project/runtime/src/helpers/esm/awaitAsyncGenerator.js +0 -5
- package/runtime/node_modules/@oxc-project/runtime/src/helpers/esm/callSuper.js +0 -7
- package/runtime/node_modules/@oxc-project/runtime/src/helpers/esm/checkInRHS.js +0 -6
- package/runtime/node_modules/@oxc-project/runtime/src/helpers/esm/checkPrivateRedeclaration.js +0 -4
- package/runtime/node_modules/@oxc-project/runtime/src/helpers/esm/classApplyDescriptorDestructureSet.js +0 -10
- package/runtime/node_modules/@oxc-project/runtime/src/helpers/esm/classApplyDescriptorGet.js +0 -4
- package/runtime/node_modules/@oxc-project/runtime/src/helpers/esm/classApplyDescriptorSet.js +0 -7
- package/runtime/node_modules/@oxc-project/runtime/src/helpers/esm/classCallCheck.js +0 -4
- package/runtime/node_modules/@oxc-project/runtime/src/helpers/esm/classCheckPrivateStaticAccess.js +0 -5
- package/runtime/node_modules/@oxc-project/runtime/src/helpers/esm/classCheckPrivateStaticFieldDescriptor.js +0 -4
- package/runtime/node_modules/@oxc-project/runtime/src/helpers/esm/classExtractFieldDescriptor.js +0 -5
- package/runtime/node_modules/@oxc-project/runtime/src/helpers/esm/classNameTDZError.js +0 -4
- package/runtime/node_modules/@oxc-project/runtime/src/helpers/esm/classPrivateFieldDestructureSet.js +0 -7
- package/runtime/node_modules/@oxc-project/runtime/src/helpers/esm/classPrivateFieldGet.js +0 -7
- package/runtime/node_modules/@oxc-project/runtime/src/helpers/esm/classPrivateFieldGet2.js +0 -5
- package/runtime/node_modules/@oxc-project/runtime/src/helpers/esm/classPrivateFieldInitSpec.js +0 -5
- package/runtime/node_modules/@oxc-project/runtime/src/helpers/esm/classPrivateFieldLooseBase.js +0 -5
- package/runtime/node_modules/@oxc-project/runtime/src/helpers/esm/classPrivateFieldLooseKey.js +0 -5
- package/runtime/node_modules/@oxc-project/runtime/src/helpers/esm/classPrivateFieldSet.js +0 -7
- package/runtime/node_modules/@oxc-project/runtime/src/helpers/esm/classPrivateFieldSet2.js +0 -5
- package/runtime/node_modules/@oxc-project/runtime/src/helpers/esm/classPrivateGetter.js +0 -5
- package/runtime/node_modules/@oxc-project/runtime/src/helpers/esm/classPrivateMethodGet.js +0 -5
- package/runtime/node_modules/@oxc-project/runtime/src/helpers/esm/classPrivateMethodInitSpec.js +0 -5
- package/runtime/node_modules/@oxc-project/runtime/src/helpers/esm/classPrivateMethodSet.js +0 -4
- package/runtime/node_modules/@oxc-project/runtime/src/helpers/esm/classPrivateSetter.js +0 -5
- package/runtime/node_modules/@oxc-project/runtime/src/helpers/esm/classStaticPrivateFieldDestructureSet.js +0 -7
- package/runtime/node_modules/@oxc-project/runtime/src/helpers/esm/classStaticPrivateFieldSpecGet.js +0 -7
- package/runtime/node_modules/@oxc-project/runtime/src/helpers/esm/classStaticPrivateFieldSpecSet.js +0 -7
- package/runtime/node_modules/@oxc-project/runtime/src/helpers/esm/classStaticPrivateMethodGet.js +0 -5
- package/runtime/node_modules/@oxc-project/runtime/src/helpers/esm/classStaticPrivateMethodSet.js +0 -4
- package/runtime/node_modules/@oxc-project/runtime/src/helpers/esm/construct.js +0 -10
- package/runtime/node_modules/@oxc-project/runtime/src/helpers/esm/createClass.js +0 -13
- package/runtime/node_modules/@oxc-project/runtime/src/helpers/esm/createForOfIteratorHelper.js +0 -50
- package/runtime/node_modules/@oxc-project/runtime/src/helpers/esm/createForOfIteratorHelperLoose.js +0 -19
- package/runtime/node_modules/@oxc-project/runtime/src/helpers/esm/createSuper.js +0 -16
- package/runtime/node_modules/@oxc-project/runtime/src/helpers/esm/decorate.js +0 -21
- package/runtime/node_modules/@oxc-project/runtime/src/helpers/esm/decorateMetadata.js +0 -7
- package/runtime/node_modules/@oxc-project/runtime/src/helpers/esm/decorateParam.js +0 -9
- package/runtime/node_modules/@oxc-project/runtime/src/helpers/esm/defaults.js +0 -9
- package/runtime/node_modules/@oxc-project/runtime/src/helpers/esm/defineAccessor.js +0 -8
- package/runtime/node_modules/@oxc-project/runtime/src/helpers/esm/defineEnumerableProperties.js +0 -12
- package/runtime/node_modules/@oxc-project/runtime/src/helpers/esm/defineProperty.js +0 -10
- package/runtime/node_modules/@oxc-project/runtime/src/helpers/esm/dispose.js +0 -28
- package/runtime/node_modules/@oxc-project/runtime/src/helpers/esm/extends.js +0 -10
- package/runtime/node_modules/@oxc-project/runtime/src/helpers/esm/get.js +0 -11
- package/runtime/node_modules/@oxc-project/runtime/src/helpers/esm/getPrototypeOf.js +0 -6
- package/runtime/node_modules/@oxc-project/runtime/src/helpers/esm/identity.js +0 -4
- package/runtime/node_modules/@oxc-project/runtime/src/helpers/esm/importDeferProxy.js +0 -27
- package/runtime/node_modules/@oxc-project/runtime/src/helpers/esm/inherits.js +0 -14
- package/runtime/node_modules/@oxc-project/runtime/src/helpers/esm/inheritsLoose.js +0 -5
- package/runtime/node_modules/@oxc-project/runtime/src/helpers/esm/initializerDefineProperty.js +0 -9
- package/runtime/node_modules/@oxc-project/runtime/src/helpers/esm/initializerWarningHelper.js +0 -4
- package/runtime/node_modules/@oxc-project/runtime/src/helpers/esm/instanceof.js +0 -4
- package/runtime/node_modules/@oxc-project/runtime/src/helpers/esm/interopRequireDefault.js +0 -6
- package/runtime/node_modules/@oxc-project/runtime/src/helpers/esm/interopRequireWildcard.js +0 -27
- package/runtime/node_modules/@oxc-project/runtime/src/helpers/esm/isNativeFunction.js +0 -8
- package/runtime/node_modules/@oxc-project/runtime/src/helpers/esm/isNativeReflectConstruct.js +0 -9
- package/runtime/node_modules/@oxc-project/runtime/src/helpers/esm/iterableToArray.js +0 -4
- package/runtime/node_modules/@oxc-project/runtime/src/helpers/esm/iterableToArrayLimit.js +0 -28
- package/runtime/node_modules/@oxc-project/runtime/src/helpers/esm/jsx.js +0 -22
- package/runtime/node_modules/@oxc-project/runtime/src/helpers/esm/maybeArrayLike.js +0 -9
- package/runtime/node_modules/@oxc-project/runtime/src/helpers/esm/newArrowCheck.js +0 -4
- package/runtime/node_modules/@oxc-project/runtime/src/helpers/esm/nonIterableRest.js +0 -4
- package/runtime/node_modules/@oxc-project/runtime/src/helpers/esm/nonIterableSpread.js +0 -4
- package/runtime/node_modules/@oxc-project/runtime/src/helpers/esm/nullishReceiverError.js +0 -4
- package/runtime/node_modules/@oxc-project/runtime/src/helpers/esm/objectDestructuringEmpty.js +0 -4
- package/runtime/node_modules/@oxc-project/runtime/src/helpers/esm/objectSpread.js +0 -14
- package/runtime/node_modules/@oxc-project/runtime/src/helpers/esm/objectSpread2.js +0 -23
- package/runtime/node_modules/@oxc-project/runtime/src/helpers/esm/objectWithoutProperties.js +0 -13
- package/runtime/node_modules/@oxc-project/runtime/src/helpers/esm/objectWithoutPropertiesLoose.js +0 -10
- package/runtime/node_modules/@oxc-project/runtime/src/helpers/esm/package.json +0 -3
- package/runtime/node_modules/@oxc-project/runtime/src/helpers/esm/possibleConstructorReturn.js +0 -8
- package/runtime/node_modules/@oxc-project/runtime/src/helpers/esm/readOnlyError.js +0 -4
- package/runtime/node_modules/@oxc-project/runtime/src/helpers/esm/regeneratorRuntime.js +0 -304
- package/runtime/node_modules/@oxc-project/runtime/src/helpers/esm/set.js +0 -22
- package/runtime/node_modules/@oxc-project/runtime/src/helpers/esm/setFunctionName.js +0 -12
- package/runtime/node_modules/@oxc-project/runtime/src/helpers/esm/setPrototypeOf.js +0 -6
- package/runtime/node_modules/@oxc-project/runtime/src/helpers/esm/skipFirstGeneratorNext.js +0 -7
- package/runtime/node_modules/@oxc-project/runtime/src/helpers/esm/slicedToArray.js +0 -8
- package/runtime/node_modules/@oxc-project/runtime/src/helpers/esm/superPropBase.js +0 -6
- package/runtime/node_modules/@oxc-project/runtime/src/helpers/esm/superPropGet.js +0 -9
- package/runtime/node_modules/@oxc-project/runtime/src/helpers/esm/superPropSet.js +0 -6
- package/runtime/node_modules/@oxc-project/runtime/src/helpers/esm/taggedTemplateLiteral.js +0 -8
- package/runtime/node_modules/@oxc-project/runtime/src/helpers/esm/taggedTemplateLiteralLoose.js +0 -4
- package/runtime/node_modules/@oxc-project/runtime/src/helpers/esm/tdz.js +0 -4
- package/runtime/node_modules/@oxc-project/runtime/src/helpers/esm/temporalRef.js +0 -6
- package/runtime/node_modules/@oxc-project/runtime/src/helpers/esm/temporalUndefined.js +0 -2
- package/runtime/node_modules/@oxc-project/runtime/src/helpers/esm/toArray.js +0 -8
- package/runtime/node_modules/@oxc-project/runtime/src/helpers/esm/toConsumableArray.js +0 -8
- package/runtime/node_modules/@oxc-project/runtime/src/helpers/esm/toPrimitive.js +0 -12
- package/runtime/node_modules/@oxc-project/runtime/src/helpers/esm/toPropertyKey.js +0 -7
- package/runtime/node_modules/@oxc-project/runtime/src/helpers/esm/toSetter.js +0 -10
- package/runtime/node_modules/@oxc-project/runtime/src/helpers/esm/typeof.js +0 -10
- package/runtime/node_modules/@oxc-project/runtime/src/helpers/esm/unsupportedIterableToArray.js +0 -9
- package/runtime/node_modules/@oxc-project/runtime/src/helpers/esm/using.js +0 -12
- package/runtime/node_modules/@oxc-project/runtime/src/helpers/esm/usingCtx.js +0 -59
- package/runtime/node_modules/@oxc-project/runtime/src/helpers/esm/wrapAsyncGenerator.js +0 -69
- package/runtime/node_modules/@oxc-project/runtime/src/helpers/esm/wrapNativeSuper.js +0 -27
- package/runtime/node_modules/@oxc-project/runtime/src/helpers/esm/wrapRegExp.js +0 -51
- package/runtime/node_modules/@oxc-project/runtime/src/helpers/esm/writeOnlyError.js +0 -4
- package/runtime/node_modules/@oxc-project/runtime/src/helpers/extends.js +0 -10
- package/runtime/node_modules/@oxc-project/runtime/src/helpers/get.js +0 -11
- package/runtime/node_modules/@oxc-project/runtime/src/helpers/getPrototypeOf.js +0 -6
- package/runtime/node_modules/@oxc-project/runtime/src/helpers/identity.js +0 -4
- package/runtime/node_modules/@oxc-project/runtime/src/helpers/importDeferProxy.js +0 -27
- package/runtime/node_modules/@oxc-project/runtime/src/helpers/inherits.js +0 -14
- package/runtime/node_modules/@oxc-project/runtime/src/helpers/inheritsLoose.js +0 -5
- package/runtime/node_modules/@oxc-project/runtime/src/helpers/initializerDefineProperty.js +0 -9
- package/runtime/node_modules/@oxc-project/runtime/src/helpers/initializerWarningHelper.js +0 -4
- package/runtime/node_modules/@oxc-project/runtime/src/helpers/instanceof.js +0 -4
- package/runtime/node_modules/@oxc-project/runtime/src/helpers/interopRequireDefault.js +0 -6
- package/runtime/node_modules/@oxc-project/runtime/src/helpers/interopRequireWildcard.js +0 -27
- package/runtime/node_modules/@oxc-project/runtime/src/helpers/isNativeFunction.js +0 -8
- package/runtime/node_modules/@oxc-project/runtime/src/helpers/isNativeReflectConstruct.js +0 -9
- package/runtime/node_modules/@oxc-project/runtime/src/helpers/iterableToArray.js +0 -4
- package/runtime/node_modules/@oxc-project/runtime/src/helpers/iterableToArrayLimit.js +0 -28
- package/runtime/node_modules/@oxc-project/runtime/src/helpers/jsx.js +0 -22
- package/runtime/node_modules/@oxc-project/runtime/src/helpers/maybeArrayLike.js +0 -9
- package/runtime/node_modules/@oxc-project/runtime/src/helpers/newArrowCheck.js +0 -4
- package/runtime/node_modules/@oxc-project/runtime/src/helpers/nonIterableRest.js +0 -4
- package/runtime/node_modules/@oxc-project/runtime/src/helpers/nonIterableSpread.js +0 -4
- package/runtime/node_modules/@oxc-project/runtime/src/helpers/nullishReceiverError.js +0 -4
- package/runtime/node_modules/@oxc-project/runtime/src/helpers/objectDestructuringEmpty.js +0 -4
- package/runtime/node_modules/@oxc-project/runtime/src/helpers/objectSpread.js +0 -14
- package/runtime/node_modules/@oxc-project/runtime/src/helpers/objectSpread2.js +0 -23
- package/runtime/node_modules/@oxc-project/runtime/src/helpers/objectWithoutProperties.js +0 -13
- package/runtime/node_modules/@oxc-project/runtime/src/helpers/objectWithoutPropertiesLoose.js +0 -10
- package/runtime/node_modules/@oxc-project/runtime/src/helpers/possibleConstructorReturn.js +0 -8
- package/runtime/node_modules/@oxc-project/runtime/src/helpers/readOnlyError.js +0 -4
- package/runtime/node_modules/@oxc-project/runtime/src/helpers/regeneratorRuntime.js +0 -304
- package/runtime/node_modules/@oxc-project/runtime/src/helpers/set.js +0 -22
- package/runtime/node_modules/@oxc-project/runtime/src/helpers/setFunctionName.js +0 -12
- package/runtime/node_modules/@oxc-project/runtime/src/helpers/setPrototypeOf.js +0 -6
- package/runtime/node_modules/@oxc-project/runtime/src/helpers/skipFirstGeneratorNext.js +0 -7
- package/runtime/node_modules/@oxc-project/runtime/src/helpers/slicedToArray.js +0 -8
- package/runtime/node_modules/@oxc-project/runtime/src/helpers/superPropBase.js +0 -6
- package/runtime/node_modules/@oxc-project/runtime/src/helpers/superPropGet.js +0 -9
- package/runtime/node_modules/@oxc-project/runtime/src/helpers/superPropSet.js +0 -6
- package/runtime/node_modules/@oxc-project/runtime/src/helpers/taggedTemplateLiteral.js +0 -8
- package/runtime/node_modules/@oxc-project/runtime/src/helpers/taggedTemplateLiteralLoose.js +0 -4
- package/runtime/node_modules/@oxc-project/runtime/src/helpers/tdz.js +0 -4
- package/runtime/node_modules/@oxc-project/runtime/src/helpers/temporalRef.js +0 -6
- package/runtime/node_modules/@oxc-project/runtime/src/helpers/temporalUndefined.js +0 -2
- package/runtime/node_modules/@oxc-project/runtime/src/helpers/toArray.js +0 -8
- package/runtime/node_modules/@oxc-project/runtime/src/helpers/toConsumableArray.js +0 -8
- package/runtime/node_modules/@oxc-project/runtime/src/helpers/toPrimitive.js +0 -12
- package/runtime/node_modules/@oxc-project/runtime/src/helpers/toPropertyKey.js +0 -7
- package/runtime/node_modules/@oxc-project/runtime/src/helpers/toSetter.js +0 -10
- package/runtime/node_modules/@oxc-project/runtime/src/helpers/typeof.js +0 -10
- package/runtime/node_modules/@oxc-project/runtime/src/helpers/unsupportedIterableToArray.js +0 -9
- package/runtime/node_modules/@oxc-project/runtime/src/helpers/using.js +0 -12
- package/runtime/node_modules/@oxc-project/runtime/src/helpers/usingCtx.js +0 -59
- package/runtime/node_modules/@oxc-project/runtime/src/helpers/wrapAsyncGenerator.js +0 -69
- package/runtime/node_modules/@oxc-project/runtime/src/helpers/wrapNativeSuper.js +0 -27
- package/runtime/node_modules/@oxc-project/runtime/src/helpers/wrapRegExp.js +0 -51
- package/runtime/node_modules/@oxc-project/runtime/src/helpers/writeOnlyError.js +0 -4
- package/runtime/node_modules/@petamoriken/float16/LICENSE +0 -21
- package/runtime/node_modules/@petamoriken/float16/README.md +0 -413
- package/runtime/node_modules/@petamoriken/float16/browser/float16.js +0 -1340
- package/runtime/node_modules/@petamoriken/float16/browser/float16.mjs +0 -1325
- package/runtime/node_modules/@petamoriken/float16/index.d.ts +0 -546
- package/runtime/node_modules/@petamoriken/float16/index.v5.6.d.ts +0 -546
- package/runtime/node_modules/@petamoriken/float16/index.v5.7.d.ts +0 -555
- package/runtime/node_modules/@petamoriken/float16/inspect/node.cjs +0 -25
- package/runtime/node_modules/@petamoriken/float16/inspect/node.mjs +0 -23
- package/runtime/node_modules/@petamoriken/float16/lib/DataView.cjs +0 -16
- package/runtime/node_modules/@petamoriken/float16/lib/Float16Array.cjs +0 -690
- package/runtime/node_modules/@petamoriken/float16/lib/_util/arrayIterator.cjs +0 -52
- package/runtime/node_modules/@petamoriken/float16/lib/_util/brand.cjs +0 -27
- package/runtime/node_modules/@petamoriken/float16/lib/_util/converter.cjs +0 -111
- package/runtime/node_modules/@petamoriken/float16/lib/_util/is.cjs +0 -78
- package/runtime/node_modules/@petamoriken/float16/lib/_util/messages.cjs +0 -18
- package/runtime/node_modules/@petamoriken/float16/lib/_util/primordials.cjs +0 -150
- package/runtime/node_modules/@petamoriken/float16/lib/_util/spec.cjs +0 -84
- package/runtime/node_modules/@petamoriken/float16/lib/f16round.cjs +0 -10
- package/runtime/node_modules/@petamoriken/float16/lib/index.cjs +0 -16
- package/runtime/node_modules/@petamoriken/float16/lib/isTypedArray.cjs +0 -11
- package/runtime/node_modules/@petamoriken/float16/package.json +0 -115
- package/runtime/node_modules/@petamoriken/float16/src/DataView.mjs +0 -35
- package/runtime/node_modules/@petamoriken/float16/src/Float16Array.mjs +0 -1194
- package/runtime/node_modules/@petamoriken/float16/src/_util/arrayIterator.mjs +0 -86
- package/runtime/node_modules/@petamoriken/float16/src/_util/brand.mjs +0 -31
- package/runtime/node_modules/@petamoriken/float16/src/_util/converter.mjs +0 -173
- package/runtime/node_modules/@petamoriken/float16/src/_util/is.mjs +0 -151
- package/runtime/node_modules/@petamoriken/float16/src/_util/messages.mjs +0 -22
- package/runtime/node_modules/@petamoriken/float16/src/_util/primordials.mjs +0 -254
- package/runtime/node_modules/@petamoriken/float16/src/_util/spec.mjs +0 -137
- package/runtime/node_modules/@petamoriken/float16/src/f16round.mjs +0 -10
- package/runtime/node_modules/@petamoriken/float16/src/index.mjs +0 -7
- package/runtime/node_modules/@petamoriken/float16/src/isTypedArray.mjs +0 -10
- package/runtime/node_modules/jsbi/LICENSE +0 -176
- package/runtime/node_modules/jsbi/README.md +0 -173
- package/runtime/node_modules/jsbi/dist/jsbi-cjs.js +0 -2
- package/runtime/node_modules/jsbi/dist/jsbi-cjs.js.map +0 -1
- package/runtime/node_modules/jsbi/dist/jsbi-umd.js +0 -2
- package/runtime/node_modules/jsbi/dist/jsbi-umd.js.map +0 -1
- package/runtime/node_modules/jsbi/dist/jsbi.mjs +0 -2
- package/runtime/node_modules/jsbi/dist/jsbi.mjs.map +0 -1
- package/runtime/node_modules/jsbi/jsbi.d.ts +0 -43
- package/runtime/node_modules/jsbi/package.json +0 -35
- package/runtime/node_modules/urlpattern-polyfill/LICENSE +0 -19
- package/runtime/node_modules/urlpattern-polyfill/README.md +0 -242
- package/runtime/node_modules/urlpattern-polyfill/dist/index.d.ts +0 -9
- package/runtime/node_modules/urlpattern-polyfill/dist/types.d.ts +0 -49
- package/runtime/node_modules/urlpattern-polyfill/dist/urlpattern.cjs +0 -1
- package/runtime/node_modules/urlpattern-polyfill/dist/urlpattern.js +0 -1
- package/runtime/node_modules/urlpattern-polyfill/index.cjs +0 -7
- package/runtime/node_modules/urlpattern-polyfill/index.js +0 -7
- package/runtime/node_modules/urlpattern-polyfill/package.json +0 -149
- package/runtime/pnp-bin-run.cjs +0 -91
- package/runtime/pnp-util.cjs +0 -62
- package/runtime/polyfills.cjs +0 -816
- package/runtime/preload-async-hooks.mjs +0 -110
- package/runtime/preload-common.cjs +0 -1096
- package/runtime/preload.cjs +0 -313
- package/runtime/preload.mjs +0 -149
- package/runtime/transform-core.mjs +0 -756
- package/runtime/version.mjs +0 -12
- package/runtime/worker-blob-url.cjs +0 -116
- package/runtime/worker-polyfill.mjs +0 -541
|
@@ -1,438 +0,0 @@
|
|
|
1
|
-
import { DEBUG } from './debug';
|
|
2
|
-
import { assert } from './assert';
|
|
3
|
-
import * as ES from './ecmascript';
|
|
4
|
-
import { ModifiedIntlDurationFormatPrototypeFormat } from './intl';
|
|
5
|
-
import { MakeIntrinsicClass } from './intrinsicclass';
|
|
6
|
-
import {
|
|
7
|
-
YEARS,
|
|
8
|
-
MONTHS,
|
|
9
|
-
WEEKS,
|
|
10
|
-
DAYS,
|
|
11
|
-
HOURS,
|
|
12
|
-
MINUTES,
|
|
13
|
-
SECONDS,
|
|
14
|
-
MILLISECONDS,
|
|
15
|
-
MICROSECONDS,
|
|
16
|
-
NANOSECONDS,
|
|
17
|
-
CALENDAR,
|
|
18
|
-
EPOCHNANOSECONDS,
|
|
19
|
-
CreateSlots,
|
|
20
|
-
GetSlot,
|
|
21
|
-
ISO_DATE,
|
|
22
|
-
SetSlot,
|
|
23
|
-
TIME_ZONE
|
|
24
|
-
} from './slots';
|
|
25
|
-
import { TimeDuration } from './timeduration';
|
|
26
|
-
import type { Temporal } from '..';
|
|
27
|
-
import type { DurationParams as Params, DurationReturn as Return } from './internaltypes';
|
|
28
|
-
import JSBI from 'jsbi';
|
|
29
|
-
|
|
30
|
-
export class Duration implements Temporal.Duration {
|
|
31
|
-
constructor(
|
|
32
|
-
yearsParam: Params['constructor'][0] = 0,
|
|
33
|
-
monthsParam: Params['constructor'][1] = 0,
|
|
34
|
-
weeksParam: Params['constructor'][2] = 0,
|
|
35
|
-
daysParam: Params['constructor'][3] = 0,
|
|
36
|
-
hoursParam: Params['constructor'][4] = 0,
|
|
37
|
-
minutesParam: Params['constructor'][5] = 0,
|
|
38
|
-
secondsParam: Params['constructor'][6] = 0,
|
|
39
|
-
millisecondsParam: Params['constructor'][7] = 0,
|
|
40
|
-
microsecondsParam: Params['constructor'][8] = 0,
|
|
41
|
-
nanosecondsParam: Params['constructor'][9] = 0
|
|
42
|
-
) {
|
|
43
|
-
const years = yearsParam === undefined ? 0 : ES.ToIntegerIfIntegral(yearsParam);
|
|
44
|
-
const months = monthsParam === undefined ? 0 : ES.ToIntegerIfIntegral(monthsParam);
|
|
45
|
-
const weeks = weeksParam === undefined ? 0 : ES.ToIntegerIfIntegral(weeksParam);
|
|
46
|
-
const days = daysParam === undefined ? 0 : ES.ToIntegerIfIntegral(daysParam);
|
|
47
|
-
const hours = hoursParam === undefined ? 0 : ES.ToIntegerIfIntegral(hoursParam);
|
|
48
|
-
const minutes = minutesParam === undefined ? 0 : ES.ToIntegerIfIntegral(minutesParam);
|
|
49
|
-
const seconds = secondsParam === undefined ? 0 : ES.ToIntegerIfIntegral(secondsParam);
|
|
50
|
-
const milliseconds = millisecondsParam === undefined ? 0 : ES.ToIntegerIfIntegral(millisecondsParam);
|
|
51
|
-
const microseconds = microsecondsParam === undefined ? 0 : ES.ToIntegerIfIntegral(microsecondsParam);
|
|
52
|
-
const nanoseconds = nanosecondsParam === undefined ? 0 : ES.ToIntegerIfIntegral(nanosecondsParam);
|
|
53
|
-
|
|
54
|
-
ES.RejectDuration(years, months, weeks, days, hours, minutes, seconds, milliseconds, microseconds, nanoseconds);
|
|
55
|
-
|
|
56
|
-
CreateSlots(this);
|
|
57
|
-
SetSlot(this, YEARS, years);
|
|
58
|
-
SetSlot(this, MONTHS, months);
|
|
59
|
-
SetSlot(this, WEEKS, weeks);
|
|
60
|
-
SetSlot(this, DAYS, days);
|
|
61
|
-
SetSlot(this, HOURS, hours);
|
|
62
|
-
SetSlot(this, MINUTES, minutes);
|
|
63
|
-
SetSlot(this, SECONDS, seconds);
|
|
64
|
-
SetSlot(this, MILLISECONDS, milliseconds);
|
|
65
|
-
SetSlot(this, MICROSECONDS, microseconds);
|
|
66
|
-
SetSlot(this, NANOSECONDS, nanoseconds);
|
|
67
|
-
|
|
68
|
-
if (DEBUG) {
|
|
69
|
-
Object.defineProperty(this, '_repr_', {
|
|
70
|
-
value: `Temporal.Duration <${ES.TemporalDurationToString(this, 'auto')}>`,
|
|
71
|
-
writable: false,
|
|
72
|
-
enumerable: false,
|
|
73
|
-
configurable: false
|
|
74
|
-
});
|
|
75
|
-
}
|
|
76
|
-
}
|
|
77
|
-
get years(): Return['years'] {
|
|
78
|
-
ES.CheckReceiver(this, ES.IsTemporalDuration);
|
|
79
|
-
return GetSlot(this, YEARS);
|
|
80
|
-
}
|
|
81
|
-
get months(): Return['months'] {
|
|
82
|
-
ES.CheckReceiver(this, ES.IsTemporalDuration);
|
|
83
|
-
return GetSlot(this, MONTHS);
|
|
84
|
-
}
|
|
85
|
-
get weeks(): Return['weeks'] {
|
|
86
|
-
ES.CheckReceiver(this, ES.IsTemporalDuration);
|
|
87
|
-
return GetSlot(this, WEEKS);
|
|
88
|
-
}
|
|
89
|
-
get days(): Return['days'] {
|
|
90
|
-
ES.CheckReceiver(this, ES.IsTemporalDuration);
|
|
91
|
-
return GetSlot(this, DAYS);
|
|
92
|
-
}
|
|
93
|
-
get hours(): Return['hours'] {
|
|
94
|
-
ES.CheckReceiver(this, ES.IsTemporalDuration);
|
|
95
|
-
return GetSlot(this, HOURS);
|
|
96
|
-
}
|
|
97
|
-
get minutes(): Return['minutes'] {
|
|
98
|
-
ES.CheckReceiver(this, ES.IsTemporalDuration);
|
|
99
|
-
return GetSlot(this, MINUTES);
|
|
100
|
-
}
|
|
101
|
-
get seconds(): Return['seconds'] {
|
|
102
|
-
ES.CheckReceiver(this, ES.IsTemporalDuration);
|
|
103
|
-
return GetSlot(this, SECONDS);
|
|
104
|
-
}
|
|
105
|
-
get milliseconds(): Return['milliseconds'] {
|
|
106
|
-
ES.CheckReceiver(this, ES.IsTemporalDuration);
|
|
107
|
-
return GetSlot(this, MILLISECONDS);
|
|
108
|
-
}
|
|
109
|
-
get microseconds(): Return['microseconds'] {
|
|
110
|
-
ES.CheckReceiver(this, ES.IsTemporalDuration);
|
|
111
|
-
return GetSlot(this, MICROSECONDS);
|
|
112
|
-
}
|
|
113
|
-
get nanoseconds(): Return['nanoseconds'] {
|
|
114
|
-
ES.CheckReceiver(this, ES.IsTemporalDuration);
|
|
115
|
-
return GetSlot(this, NANOSECONDS);
|
|
116
|
-
}
|
|
117
|
-
get sign(): Return['sign'] {
|
|
118
|
-
ES.CheckReceiver(this, ES.IsTemporalDuration);
|
|
119
|
-
return ES.DurationSign(this);
|
|
120
|
-
}
|
|
121
|
-
get blank(): Return['blank'] {
|
|
122
|
-
ES.CheckReceiver(this, ES.IsTemporalDuration);
|
|
123
|
-
return ES.DurationSign(this) === 0;
|
|
124
|
-
}
|
|
125
|
-
with(durationLike: Params['with'][0]): Return['with'] {
|
|
126
|
-
ES.CheckReceiver(this, ES.IsTemporalDuration);
|
|
127
|
-
const partialDuration = ES.ToTemporalPartialDurationRecord(durationLike);
|
|
128
|
-
const {
|
|
129
|
-
years = GetSlot(this, YEARS),
|
|
130
|
-
months = GetSlot(this, MONTHS),
|
|
131
|
-
weeks = GetSlot(this, WEEKS),
|
|
132
|
-
days = GetSlot(this, DAYS),
|
|
133
|
-
hours = GetSlot(this, HOURS),
|
|
134
|
-
minutes = GetSlot(this, MINUTES),
|
|
135
|
-
seconds = GetSlot(this, SECONDS),
|
|
136
|
-
milliseconds = GetSlot(this, MILLISECONDS),
|
|
137
|
-
microseconds = GetSlot(this, MICROSECONDS),
|
|
138
|
-
nanoseconds = GetSlot(this, NANOSECONDS)
|
|
139
|
-
} = partialDuration;
|
|
140
|
-
return new Duration(years, months, weeks, days, hours, minutes, seconds, milliseconds, microseconds, nanoseconds);
|
|
141
|
-
}
|
|
142
|
-
negated(): Return['negated'] {
|
|
143
|
-
ES.CheckReceiver(this, ES.IsTemporalDuration);
|
|
144
|
-
return ES.CreateNegatedTemporalDuration(this);
|
|
145
|
-
}
|
|
146
|
-
abs(): Return['abs'] {
|
|
147
|
-
ES.CheckReceiver(this, ES.IsTemporalDuration);
|
|
148
|
-
return new Duration(
|
|
149
|
-
Math.abs(GetSlot(this, YEARS)),
|
|
150
|
-
Math.abs(GetSlot(this, MONTHS)),
|
|
151
|
-
Math.abs(GetSlot(this, WEEKS)),
|
|
152
|
-
Math.abs(GetSlot(this, DAYS)),
|
|
153
|
-
Math.abs(GetSlot(this, HOURS)),
|
|
154
|
-
Math.abs(GetSlot(this, MINUTES)),
|
|
155
|
-
Math.abs(GetSlot(this, SECONDS)),
|
|
156
|
-
Math.abs(GetSlot(this, MILLISECONDS)),
|
|
157
|
-
Math.abs(GetSlot(this, MICROSECONDS)),
|
|
158
|
-
Math.abs(GetSlot(this, NANOSECONDS))
|
|
159
|
-
);
|
|
160
|
-
}
|
|
161
|
-
add(other: Params['add'][0]): Return['add'] {
|
|
162
|
-
ES.CheckReceiver(this, ES.IsTemporalDuration);
|
|
163
|
-
return ES.AddDurations('add', this, other);
|
|
164
|
-
}
|
|
165
|
-
subtract(other: Params['subtract'][0]): Return['subtract'] {
|
|
166
|
-
ES.CheckReceiver(this, ES.IsTemporalDuration);
|
|
167
|
-
return ES.AddDurations('subtract', this, other);
|
|
168
|
-
}
|
|
169
|
-
round(roundToParam: Params['round'][0]): Return['round'] {
|
|
170
|
-
ES.CheckReceiver(this, ES.IsTemporalDuration);
|
|
171
|
-
if (roundToParam === undefined) throw new TypeError('options parameter is required');
|
|
172
|
-
|
|
173
|
-
const existingLargestUnit = ES.DefaultTemporalLargestUnit(this);
|
|
174
|
-
const roundTo =
|
|
175
|
-
typeof roundToParam === 'string'
|
|
176
|
-
? (ES.CreateOnePropObject('smallestUnit', roundToParam) as Exclude<typeof roundToParam, string>)
|
|
177
|
-
: ES.GetOptionsObject(roundToParam);
|
|
178
|
-
|
|
179
|
-
let largestUnit = ES.GetTemporalUnitValuedOption(roundTo, 'largestUnit', 'datetime', undefined, ['auto']);
|
|
180
|
-
let { plainRelativeTo, zonedRelativeTo } = ES.GetTemporalRelativeToOption(roundTo);
|
|
181
|
-
const roundingIncrement = ES.GetTemporalRoundingIncrementOption(roundTo);
|
|
182
|
-
const roundingMode = ES.GetRoundingModeOption(roundTo, 'halfExpand');
|
|
183
|
-
let smallestUnit = ES.GetTemporalUnitValuedOption(roundTo, 'smallestUnit', 'datetime', undefined);
|
|
184
|
-
|
|
185
|
-
let smallestUnitPresent = true;
|
|
186
|
-
if (!smallestUnit) {
|
|
187
|
-
smallestUnitPresent = false;
|
|
188
|
-
smallestUnit = 'nanosecond';
|
|
189
|
-
}
|
|
190
|
-
const defaultLargestUnit = ES.LargerOfTwoTemporalUnits(existingLargestUnit, smallestUnit);
|
|
191
|
-
let largestUnitPresent = true;
|
|
192
|
-
if (!largestUnit) {
|
|
193
|
-
largestUnitPresent = false;
|
|
194
|
-
largestUnit = defaultLargestUnit;
|
|
195
|
-
}
|
|
196
|
-
if (largestUnit === 'auto') largestUnit = defaultLargestUnit;
|
|
197
|
-
if (!smallestUnitPresent && !largestUnitPresent) {
|
|
198
|
-
throw new RangeError('at least one of smallestUnit or largestUnit is required');
|
|
199
|
-
}
|
|
200
|
-
if (ES.LargerOfTwoTemporalUnits(largestUnit, smallestUnit) !== largestUnit) {
|
|
201
|
-
throw new RangeError(`largestUnit ${largestUnit} cannot be smaller than smallestUnit ${smallestUnit}`);
|
|
202
|
-
}
|
|
203
|
-
|
|
204
|
-
const maximumIncrements = {
|
|
205
|
-
hour: 24,
|
|
206
|
-
minute: 60,
|
|
207
|
-
second: 60,
|
|
208
|
-
millisecond: 1000,
|
|
209
|
-
microsecond: 1000,
|
|
210
|
-
nanosecond: 1000
|
|
211
|
-
} as { [k in Temporal.DateTimeUnit]?: number };
|
|
212
|
-
const maximum = maximumIncrements[smallestUnit];
|
|
213
|
-
if (maximum !== undefined) ES.ValidateTemporalRoundingIncrement(roundingIncrement, maximum, false);
|
|
214
|
-
if (roundingIncrement > 1 && ES.TemporalUnitCategory(smallestUnit) === 'date' && largestUnit !== smallestUnit) {
|
|
215
|
-
throw new RangeError('For calendar units with roundingIncrement > 1, use largestUnit = smallestUnit');
|
|
216
|
-
}
|
|
217
|
-
|
|
218
|
-
if (zonedRelativeTo) {
|
|
219
|
-
let duration = ES.ToInternalDurationRecord(this);
|
|
220
|
-
const timeZone = GetSlot(zonedRelativeTo, TIME_ZONE);
|
|
221
|
-
const calendar = GetSlot(zonedRelativeTo, CALENDAR);
|
|
222
|
-
const relativeEpochNs = GetSlot(zonedRelativeTo, EPOCHNANOSECONDS);
|
|
223
|
-
const targetEpochNs = ES.AddZonedDateTime(relativeEpochNs, timeZone, calendar, duration);
|
|
224
|
-
duration = ES.DifferenceZonedDateTimeWithRounding(
|
|
225
|
-
relativeEpochNs,
|
|
226
|
-
targetEpochNs,
|
|
227
|
-
timeZone,
|
|
228
|
-
calendar,
|
|
229
|
-
largestUnit,
|
|
230
|
-
roundingIncrement,
|
|
231
|
-
smallestUnit,
|
|
232
|
-
roundingMode
|
|
233
|
-
);
|
|
234
|
-
if (ES.TemporalUnitCategory(largestUnit) === 'date') largestUnit = 'hour';
|
|
235
|
-
return ES.TemporalDurationFromInternal(duration, largestUnit);
|
|
236
|
-
}
|
|
237
|
-
|
|
238
|
-
if (plainRelativeTo) {
|
|
239
|
-
let duration = ES.ToInternalDurationRecordWith24HourDays(this);
|
|
240
|
-
const targetTime = ES.AddTime(ES.MidnightTimeRecord(), duration.time);
|
|
241
|
-
|
|
242
|
-
// Delegate the date part addition to the calendar
|
|
243
|
-
const isoRelativeToDate = GetSlot(plainRelativeTo, ISO_DATE);
|
|
244
|
-
const calendar = GetSlot(plainRelativeTo, CALENDAR);
|
|
245
|
-
const dateDuration = ES.AdjustDateDurationRecord(duration.date, targetTime.deltaDays);
|
|
246
|
-
const targetDate = ES.CalendarDateAdd(calendar, isoRelativeToDate, dateDuration, 'constrain');
|
|
247
|
-
|
|
248
|
-
const isoDateTime = ES.CombineISODateAndTimeRecord(isoRelativeToDate, ES.MidnightTimeRecord());
|
|
249
|
-
const targetDateTime = ES.CombineISODateAndTimeRecord(targetDate, targetTime);
|
|
250
|
-
duration = ES.DifferencePlainDateTimeWithRounding(
|
|
251
|
-
isoDateTime,
|
|
252
|
-
targetDateTime,
|
|
253
|
-
calendar,
|
|
254
|
-
largestUnit,
|
|
255
|
-
roundingIncrement,
|
|
256
|
-
smallestUnit,
|
|
257
|
-
roundingMode
|
|
258
|
-
);
|
|
259
|
-
return ES.TemporalDurationFromInternal(duration, largestUnit);
|
|
260
|
-
}
|
|
261
|
-
|
|
262
|
-
// No reference date to calculate difference relative to
|
|
263
|
-
if (ES.IsCalendarUnit(existingLargestUnit)) {
|
|
264
|
-
throw new RangeError(`a starting point is required for ${existingLargestUnit}s balancing`);
|
|
265
|
-
}
|
|
266
|
-
if (ES.IsCalendarUnit(largestUnit)) {
|
|
267
|
-
throw new RangeError(`a starting point is required for ${largestUnit}s balancing`);
|
|
268
|
-
}
|
|
269
|
-
assert(!ES.IsCalendarUnit(smallestUnit), 'smallestUnit was larger than largestUnit');
|
|
270
|
-
let internalDuration = ES.ToInternalDurationRecordWith24HourDays(this);
|
|
271
|
-
if (smallestUnit === 'day') {
|
|
272
|
-
// First convert time units up to days
|
|
273
|
-
const { quotient, remainder } = internalDuration.time.divmod(ES.DAY_NANOS);
|
|
274
|
-
let days = internalDuration.date.days + quotient + ES.TotalTimeDuration(remainder, 'day');
|
|
275
|
-
days = ES.RoundNumberToIncrement(days, roundingIncrement, roundingMode);
|
|
276
|
-
const dateDuration = { years: 0, months: 0, weeks: 0, days };
|
|
277
|
-
internalDuration = ES.CombineDateAndTimeDuration(dateDuration, TimeDuration.ZERO);
|
|
278
|
-
} else {
|
|
279
|
-
const timeDuration = ES.RoundTimeDuration(internalDuration.time, roundingIncrement, smallestUnit, roundingMode);
|
|
280
|
-
internalDuration = ES.CombineDateAndTimeDuration(ES.ZeroDateDuration(), timeDuration);
|
|
281
|
-
}
|
|
282
|
-
return ES.TemporalDurationFromInternal(internalDuration, largestUnit);
|
|
283
|
-
}
|
|
284
|
-
total(optionsParam: Params['total'][0]): Return['total'] {
|
|
285
|
-
ES.CheckReceiver(this, ES.IsTemporalDuration);
|
|
286
|
-
|
|
287
|
-
if (optionsParam === undefined) throw new TypeError('options argument is required');
|
|
288
|
-
const options =
|
|
289
|
-
typeof optionsParam === 'string'
|
|
290
|
-
? (ES.CreateOnePropObject('unit', optionsParam) as Exclude<typeof optionsParam, string>)
|
|
291
|
-
: ES.GetOptionsObject(optionsParam);
|
|
292
|
-
let { plainRelativeTo, zonedRelativeTo } = ES.GetTemporalRelativeToOption(options);
|
|
293
|
-
const unit = ES.GetTemporalUnitValuedOption(options, 'unit', 'datetime', ES.REQUIRED);
|
|
294
|
-
|
|
295
|
-
if (zonedRelativeTo) {
|
|
296
|
-
const duration = ES.ToInternalDurationRecord(this);
|
|
297
|
-
const timeZone = GetSlot(zonedRelativeTo, TIME_ZONE);
|
|
298
|
-
const calendar = GetSlot(zonedRelativeTo, CALENDAR);
|
|
299
|
-
const relativeEpochNs = GetSlot(zonedRelativeTo, EPOCHNANOSECONDS);
|
|
300
|
-
const targetEpochNs = ES.AddZonedDateTime(relativeEpochNs, timeZone, calendar, duration);
|
|
301
|
-
return ES.DifferenceZonedDateTimeWithTotal(relativeEpochNs, targetEpochNs, timeZone, calendar, unit);
|
|
302
|
-
}
|
|
303
|
-
|
|
304
|
-
if (plainRelativeTo) {
|
|
305
|
-
const duration = ES.ToInternalDurationRecordWith24HourDays(this);
|
|
306
|
-
let targetTime = ES.AddTime(ES.MidnightTimeRecord(), duration.time);
|
|
307
|
-
|
|
308
|
-
// Delegate the date part addition to the calendar
|
|
309
|
-
const isoRelativeToDate = GetSlot(plainRelativeTo, ISO_DATE);
|
|
310
|
-
const calendar = GetSlot(plainRelativeTo, CALENDAR);
|
|
311
|
-
const dateDuration = ES.AdjustDateDurationRecord(duration.date, targetTime.deltaDays);
|
|
312
|
-
const targetDate = ES.CalendarDateAdd(calendar, isoRelativeToDate, dateDuration, 'constrain');
|
|
313
|
-
|
|
314
|
-
const isoDateTime = ES.CombineISODateAndTimeRecord(isoRelativeToDate, ES.MidnightTimeRecord());
|
|
315
|
-
const targetDateTime = ES.CombineISODateAndTimeRecord(targetDate, targetTime);
|
|
316
|
-
return ES.DifferencePlainDateTimeWithTotal(isoDateTime, targetDateTime, calendar, unit);
|
|
317
|
-
}
|
|
318
|
-
|
|
319
|
-
// No reference date to calculate difference relative to
|
|
320
|
-
const largestUnit = ES.DefaultTemporalLargestUnit(this);
|
|
321
|
-
if (ES.IsCalendarUnit(largestUnit)) {
|
|
322
|
-
throw new RangeError(`a starting point is required for ${largestUnit}s total`);
|
|
323
|
-
}
|
|
324
|
-
if (ES.IsCalendarUnit(unit)) {
|
|
325
|
-
throw new RangeError(`a starting point is required for ${unit}s total`);
|
|
326
|
-
}
|
|
327
|
-
const duration = ES.ToInternalDurationRecordWith24HourDays(this);
|
|
328
|
-
return ES.TotalTimeDuration(duration.time, unit);
|
|
329
|
-
}
|
|
330
|
-
toString(options: Params['toString'][0] = undefined): string {
|
|
331
|
-
ES.CheckReceiver(this, ES.IsTemporalDuration);
|
|
332
|
-
const resolvedOptions = ES.GetOptionsObject(options);
|
|
333
|
-
const digits = ES.GetTemporalFractionalSecondDigitsOption(resolvedOptions);
|
|
334
|
-
const roundingMode = ES.GetRoundingModeOption(resolvedOptions, 'trunc');
|
|
335
|
-
const smallestUnit = ES.GetTemporalUnitValuedOption(resolvedOptions, 'smallestUnit', 'time', undefined);
|
|
336
|
-
if (smallestUnit === 'hour' || smallestUnit === 'minute') {
|
|
337
|
-
throw new RangeError('smallestUnit must be a time unit other than "hours" or "minutes"');
|
|
338
|
-
}
|
|
339
|
-
const { precision, unit, increment } = ES.ToSecondsStringPrecisionRecord(smallestUnit, digits);
|
|
340
|
-
ES.uncheckedAssertNarrowedType<Exclude<typeof precision, 'minute'>>(
|
|
341
|
-
precision,
|
|
342
|
-
'Precision cannot be "minute" because of RangeError above'
|
|
343
|
-
);
|
|
344
|
-
|
|
345
|
-
if (unit === 'nanosecond' && increment === 1) return ES.TemporalDurationToString(this, precision);
|
|
346
|
-
|
|
347
|
-
const largestUnit = ES.DefaultTemporalLargestUnit(this);
|
|
348
|
-
let internalDuration = ES.ToInternalDurationRecord(this);
|
|
349
|
-
const timeDuration = ES.RoundTimeDuration(internalDuration.time, increment, unit, roundingMode);
|
|
350
|
-
internalDuration = ES.CombineDateAndTimeDuration(internalDuration.date, timeDuration);
|
|
351
|
-
const roundedDuration = ES.TemporalDurationFromInternal(
|
|
352
|
-
internalDuration,
|
|
353
|
-
ES.LargerOfTwoTemporalUnits(largestUnit, 'second')
|
|
354
|
-
);
|
|
355
|
-
return ES.TemporalDurationToString(roundedDuration, precision);
|
|
356
|
-
}
|
|
357
|
-
toJSON(): Return['toJSON'] {
|
|
358
|
-
ES.CheckReceiver(this, ES.IsTemporalDuration);
|
|
359
|
-
return ES.TemporalDurationToString(this, 'auto');
|
|
360
|
-
}
|
|
361
|
-
toLocaleString(
|
|
362
|
-
locales: Params['toLocaleString'][0] = undefined,
|
|
363
|
-
options: Params['toLocaleString'][1] = undefined
|
|
364
|
-
): string {
|
|
365
|
-
ES.CheckReceiver(this, ES.IsTemporalDuration);
|
|
366
|
-
if (typeof Intl.DurationFormat === 'function') {
|
|
367
|
-
const formatter = new Intl.DurationFormat(locales, options as Intl.DurationFormatOptions);
|
|
368
|
-
return ModifiedIntlDurationFormatPrototypeFormat.call(formatter, this);
|
|
369
|
-
}
|
|
370
|
-
console.warn('Temporal.Duration.prototype.toLocaleString() requires Intl.DurationFormat.');
|
|
371
|
-
return ES.TemporalDurationToString(this, 'auto');
|
|
372
|
-
}
|
|
373
|
-
valueOf(): never {
|
|
374
|
-
ES.ValueOfThrows('Duration');
|
|
375
|
-
}
|
|
376
|
-
static from(item: Params['from'][0]): Return['from'] {
|
|
377
|
-
return ES.ToTemporalDuration(item);
|
|
378
|
-
}
|
|
379
|
-
static compare(
|
|
380
|
-
oneParam: Params['compare'][0],
|
|
381
|
-
twoParam: Params['compare'][1],
|
|
382
|
-
options: Params['compare'][2] = undefined
|
|
383
|
-
): Return['compare'] {
|
|
384
|
-
const one = ES.ToTemporalDuration(oneParam);
|
|
385
|
-
const two = ES.ToTemporalDuration(twoParam);
|
|
386
|
-
const resolvedOptions = ES.GetOptionsObject(options);
|
|
387
|
-
const { plainRelativeTo, zonedRelativeTo } = ES.GetTemporalRelativeToOption(resolvedOptions);
|
|
388
|
-
|
|
389
|
-
if (
|
|
390
|
-
GetSlot(one, YEARS) === GetSlot(two, YEARS) &&
|
|
391
|
-
GetSlot(one, MONTHS) === GetSlot(two, MONTHS) &&
|
|
392
|
-
GetSlot(one, WEEKS) === GetSlot(two, WEEKS) &&
|
|
393
|
-
GetSlot(one, DAYS) === GetSlot(two, DAYS) &&
|
|
394
|
-
GetSlot(one, HOURS) === GetSlot(two, HOURS) &&
|
|
395
|
-
GetSlot(one, MINUTES) === GetSlot(two, MINUTES) &&
|
|
396
|
-
GetSlot(one, SECONDS) === GetSlot(two, SECONDS) &&
|
|
397
|
-
GetSlot(one, MILLISECONDS) === GetSlot(two, MILLISECONDS) &&
|
|
398
|
-
GetSlot(one, MICROSECONDS) === GetSlot(two, MICROSECONDS) &&
|
|
399
|
-
GetSlot(one, NANOSECONDS) === GetSlot(two, NANOSECONDS)
|
|
400
|
-
) {
|
|
401
|
-
return 0;
|
|
402
|
-
}
|
|
403
|
-
|
|
404
|
-
const largestUnit1 = ES.DefaultTemporalLargestUnit(one);
|
|
405
|
-
const largestUnit2 = ES.DefaultTemporalLargestUnit(two);
|
|
406
|
-
const duration1 = ES.ToInternalDurationRecord(one);
|
|
407
|
-
const duration2 = ES.ToInternalDurationRecord(two);
|
|
408
|
-
|
|
409
|
-
if (
|
|
410
|
-
zonedRelativeTo &&
|
|
411
|
-
(ES.TemporalUnitCategory(largestUnit1) === 'date' || ES.TemporalUnitCategory(largestUnit2) === 'date')
|
|
412
|
-
) {
|
|
413
|
-
const timeZone = GetSlot(zonedRelativeTo, TIME_ZONE);
|
|
414
|
-
const calendar = GetSlot(zonedRelativeTo, CALENDAR);
|
|
415
|
-
const epochNs = GetSlot(zonedRelativeTo, EPOCHNANOSECONDS);
|
|
416
|
-
|
|
417
|
-
const after1 = ES.AddZonedDateTime(epochNs, timeZone, calendar, duration1);
|
|
418
|
-
const after2 = ES.AddZonedDateTime(epochNs, timeZone, calendar, duration2);
|
|
419
|
-
return ES.ComparisonResult(JSBI.toNumber(JSBI.subtract(after1, after2)));
|
|
420
|
-
}
|
|
421
|
-
|
|
422
|
-
let d1 = duration1.date.days;
|
|
423
|
-
let d2 = duration2.date.days;
|
|
424
|
-
if (ES.IsCalendarUnit(largestUnit1) || ES.IsCalendarUnit(largestUnit2)) {
|
|
425
|
-
if (!plainRelativeTo) {
|
|
426
|
-
throw new RangeError('A starting point is required for years, months, or weeks comparison');
|
|
427
|
-
}
|
|
428
|
-
d1 = ES.DateDurationDays(duration1.date, plainRelativeTo);
|
|
429
|
-
d2 = ES.DateDurationDays(duration2.date, plainRelativeTo);
|
|
430
|
-
}
|
|
431
|
-
const timeDuration1 = duration1.time.add24HourDays(d1);
|
|
432
|
-
const timeDuration2 = duration2.time.add24HourDays(d2);
|
|
433
|
-
return timeDuration1.cmp(timeDuration2);
|
|
434
|
-
}
|
|
435
|
-
[Symbol.toStringTag]!: 'Temporal.Duration';
|
|
436
|
-
}
|
|
437
|
-
|
|
438
|
-
MakeIntrinsicClass(Duration, 'Temporal.Duration');
|
|
@@ -1,93 +0,0 @@
|
|
|
1
|
-
// Ambient declaration file to bridge the gap until Intl.DurationFormat is
|
|
2
|
-
// supported in TypeScript's own type declarations. Note that it is for internal
|
|
3
|
-
// use, meaning that it describes the DurationFormat interface _without_ support
|
|
4
|
-
// for Temporal.Duration objects.
|
|
5
|
-
|
|
6
|
-
declare namespace Intl {
|
|
7
|
-
type DurationCalendarUnitStyle = 'long' | 'short' | 'narrow';
|
|
8
|
-
type DurationDigitalUnitStyle = 'long' | 'short' | 'narrow' | 'numeric' | '2-digit';
|
|
9
|
-
type DurationFractionalUnitStyle = 'long' | 'short' | 'narrow' | 'numeric';
|
|
10
|
-
type DurationDisplay = 'auto' | 'always';
|
|
11
|
-
|
|
12
|
-
interface DurationFormatOptions {
|
|
13
|
-
localeMatcher?: 'best fit' | 'basic' | undefined;
|
|
14
|
-
numberingSystem?: string | undefined;
|
|
15
|
-
style?: 'long' | 'short' | 'narrow' | 'digital' | undefined;
|
|
16
|
-
years?: DurationCalendarUnitStyle | undefined;
|
|
17
|
-
yearsDisplay?: DurationDisplay | undefined;
|
|
18
|
-
months?: DurationCalendarUnitStyle | undefined;
|
|
19
|
-
monthsDisplay?: DurationDisplay | undefined;
|
|
20
|
-
weeks?: DurationCalendarUnitStyle | undefined;
|
|
21
|
-
weeksDisplay?: DurationDisplay | undefined;
|
|
22
|
-
days?: DurationCalendarUnitStyle | undefined;
|
|
23
|
-
daysDisplay?: DurationDisplay | undefined;
|
|
24
|
-
hours?: DurationDigitalUnitStyle | undefined;
|
|
25
|
-
hoursDisplay?: DurationDisplay | undefined;
|
|
26
|
-
minutes?: DurationDigitalUnitStyle | undefined;
|
|
27
|
-
minutesDisplay?: DurationDisplay | undefined;
|
|
28
|
-
seconds?: DurationDigitalUnitStyle | undefined;
|
|
29
|
-
secondsDisplay?: DurationDisplay | undefined;
|
|
30
|
-
milliseconds?: DurationFractionalUnitStyle | undefined;
|
|
31
|
-
millisecondsDisplay?: DurationDisplay | undefined;
|
|
32
|
-
microseconds?: DurationFractionalUnitStyle | undefined;
|
|
33
|
-
microsecondsDisplay?: DurationDisplay | undefined;
|
|
34
|
-
nanoseconds?: DurationFractionalUnitStyle | undefined;
|
|
35
|
-
nanosecondsDisplay?: DurationDisplay | undefined;
|
|
36
|
-
fractionalDigits?: 0 | 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | undefined;
|
|
37
|
-
}
|
|
38
|
-
|
|
39
|
-
interface ResolvedDurationFormatOptions {
|
|
40
|
-
locale: string;
|
|
41
|
-
numberingSystem: string;
|
|
42
|
-
style: 'long' | 'short' | 'narrow' | 'digital';
|
|
43
|
-
years: DurationCalendarUnitStyle;
|
|
44
|
-
yearsDisplay: DurationDisplay;
|
|
45
|
-
months: DurationCalendarUnitStyle;
|
|
46
|
-
monthsDisplay: DurationDisplay;
|
|
47
|
-
weeks: DurationCalendarUnitStyle;
|
|
48
|
-
weeksDisplay: DurationDisplay;
|
|
49
|
-
days: DurationCalendarUnitStyle;
|
|
50
|
-
daysDisplay: DurationDisplay;
|
|
51
|
-
hours: DurationDigitalUnitStyle;
|
|
52
|
-
hoursDisplay: DurationDisplay;
|
|
53
|
-
minutes: DurationDigitalUnitStyle;
|
|
54
|
-
minutesDisplay: DurationDisplay;
|
|
55
|
-
seconds: DurationDigitalUnitStyle;
|
|
56
|
-
secondsDisplay: DurationDisplay;
|
|
57
|
-
milliseconds: DurationFractionalUnitStyle;
|
|
58
|
-
millisecondsDisplay: DurationDisplay;
|
|
59
|
-
microseconds: DurationFractionalUnitStyle;
|
|
60
|
-
microsecondsDisplay: DurationDisplay;
|
|
61
|
-
nanoseconds: DurationFractionalUnitStyle;
|
|
62
|
-
nanosecondsDisplay: DurationDisplay;
|
|
63
|
-
fractionalDigits: 0 | 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | undefined;
|
|
64
|
-
}
|
|
65
|
-
|
|
66
|
-
interface DurationLike {
|
|
67
|
-
years?: number;
|
|
68
|
-
months?: number;
|
|
69
|
-
weeks?: number;
|
|
70
|
-
days?: number;
|
|
71
|
-
hours?: number;
|
|
72
|
-
minutes?: number;
|
|
73
|
-
seconds?: number;
|
|
74
|
-
milliseconds?: number;
|
|
75
|
-
microseconds?: number;
|
|
76
|
-
nanoseconds?: number;
|
|
77
|
-
}
|
|
78
|
-
|
|
79
|
-
interface DurationFormatPart {
|
|
80
|
-
type: string;
|
|
81
|
-
value: string;
|
|
82
|
-
}
|
|
83
|
-
|
|
84
|
-
class DurationFormat {
|
|
85
|
-
constructor(locales?: LocalesArgument, options?: DurationFormatOptions);
|
|
86
|
-
|
|
87
|
-
static supportedLocalesOf(locales?: LocalesArgument, options?: DurationFormatOptions): LocalesArgument;
|
|
88
|
-
|
|
89
|
-
format(duration: DurationLike | string): string;
|
|
90
|
-
formatToParts(duration: DurationLike | string): DurationFormatPart[];
|
|
91
|
-
resolvedOptions(): ResolvedDurationFormatOptions;
|
|
92
|
-
}
|
|
93
|
-
}
|