interval-temporal 0.4.0 → 0.5.4
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/.tsbuildinfo +1 -0
- package/dist/{areIntervalsOverlapping.d.ts → are-intervals-overlapping.d.ts} +1 -1
- package/dist/are-intervals-overlapping.d.ts.map +1 -0
- package/dist/{areIntervalsOverlapping.js → are-intervals-overlapping.js} +1 -1
- package/dist/are-intervals-overlapping.js.map +1 -0
- package/dist/are-intervals-overlapping.test.d.ts +2 -0
- package/dist/are-intervals-overlapping.test.d.ts.map +1 -0
- package/dist/{areIntervalsOverlapping.test.js → are-intervals-overlapping.test.js} +4 -4
- package/dist/are-intervals-overlapping.test.js.map +1 -0
- package/dist/comparators.js +5 -5
- package/dist/comparators.js.map +1 -1
- package/dist/comparators.test.js +4 -4
- package/dist/comparators.test.js.map +1 -1
- package/dist/index.d.ts +4 -4
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +4 -4
- package/dist/index.js.map +1 -1
- package/dist/{isWithinInterval.d.ts → is-within-interval.d.ts} +1 -1
- package/dist/is-within-interval.d.ts.map +1 -0
- package/dist/{isWithinInterval.js → is-within-interval.js} +1 -1
- package/dist/is-within-interval.js.map +1 -0
- package/dist/{normalizeIntervals.d.ts → normalize-intervals.d.ts} +1 -1
- package/dist/normalize-intervals.d.ts.map +1 -0
- package/dist/{normalizeIntervals.js → normalize-intervals.js} +2 -2
- package/dist/normalize-intervals.js.map +1 -0
- package/dist/normalize-intervals.test.d.ts +2 -0
- package/dist/normalize-intervals.test.d.ts.map +1 -0
- package/dist/{normalizeIntervals.test.js → normalize-intervals.test.js} +10 -10
- package/dist/normalize-intervals.test.js.map +1 -0
- package/dist/{sortInterval.d.ts → sort-interval.d.ts} +1 -1
- package/dist/sort-interval.d.ts.map +1 -0
- package/dist/{sortInterval.js → sort-interval.js} +1 -1
- package/dist/sort-interval.js.map +1 -0
- package/package.json +29 -36
- package/src/{areIntervalsOverlapping.test.ts → are-intervals-overlapping.test.ts} +3 -4
- package/src/comparators.test.ts +4 -5
- package/src/comparators.ts +5 -5
- package/src/index.ts +4 -4
- package/src/{normalizeIntervals.test.ts → normalize-intervals.test.ts} +10 -11
- package/src/{normalizeIntervals.ts → normalize-intervals.ts} +2 -2
- package/LICENSE.txt +0 -209
- package/dist/areIntervalsOverlapping.d.ts.map +0 -1
- package/dist/areIntervalsOverlapping.js.map +0 -1
- package/dist/areIntervalsOverlapping.test.d.ts +0 -2
- package/dist/areIntervalsOverlapping.test.d.ts.map +0 -1
- package/dist/areIntervalsOverlapping.test.js.map +0 -1
- package/dist/isWithinInterval.d.ts.map +0 -1
- package/dist/isWithinInterval.js.map +0 -1
- package/dist/normalizeIntervals.d.ts.map +0 -1
- package/dist/normalizeIntervals.js.map +0 -1
- package/dist/normalizeIntervals.test.d.ts +0 -2
- package/dist/normalizeIntervals.test.d.ts.map +0 -1
- package/dist/normalizeIntervals.test.js.map +0 -1
- package/dist/sortInterval.d.ts.map +0 -1
- package/dist/sortInterval.js.map +0 -1
- package/src/{areIntervalsOverlapping.ts → are-intervals-overlapping.ts} +1 -1
- package/src/{isWithinInterval.ts → is-within-interval.ts} +1 -1
- package/src/{sortInterval.ts → sort-interval.ts} +1 -1
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"fileNames":["../../../node_modules/.bun/typescript@5.9.3/node_modules/typescript/lib/lib.es5.d.ts","../../../node_modules/.bun/typescript@5.9.3/node_modules/typescript/lib/lib.es2015.d.ts","../../../node_modules/.bun/typescript@5.9.3/node_modules/typescript/lib/lib.es2016.d.ts","../../../node_modules/.bun/typescript@5.9.3/node_modules/typescript/lib/lib.es2017.d.ts","../../../node_modules/.bun/typescript@5.9.3/node_modules/typescript/lib/lib.es2018.d.ts","../../../node_modules/.bun/typescript@5.9.3/node_modules/typescript/lib/lib.es2019.d.ts","../../../node_modules/.bun/typescript@5.9.3/node_modules/typescript/lib/lib.es2020.d.ts","../../../node_modules/.bun/typescript@5.9.3/node_modules/typescript/lib/lib.es2021.d.ts","../../../node_modules/.bun/typescript@5.9.3/node_modules/typescript/lib/lib.es2022.d.ts","../../../node_modules/.bun/typescript@5.9.3/node_modules/typescript/lib/lib.es2023.d.ts","../../../node_modules/.bun/typescript@5.9.3/node_modules/typescript/lib/lib.es2024.d.ts","../../../node_modules/.bun/typescript@5.9.3/node_modules/typescript/lib/lib.es2015.core.d.ts","../../../node_modules/.bun/typescript@5.9.3/node_modules/typescript/lib/lib.es2015.collection.d.ts","../../../node_modules/.bun/typescript@5.9.3/node_modules/typescript/lib/lib.es2015.generator.d.ts","../../../node_modules/.bun/typescript@5.9.3/node_modules/typescript/lib/lib.es2015.iterable.d.ts","../../../node_modules/.bun/typescript@5.9.3/node_modules/typescript/lib/lib.es2015.promise.d.ts","../../../node_modules/.bun/typescript@5.9.3/node_modules/typescript/lib/lib.es2015.proxy.d.ts","../../../node_modules/.bun/typescript@5.9.3/node_modules/typescript/lib/lib.es2015.reflect.d.ts","../../../node_modules/.bun/typescript@5.9.3/node_modules/typescript/lib/lib.es2015.symbol.d.ts","../../../node_modules/.bun/typescript@5.9.3/node_modules/typescript/lib/lib.es2015.symbol.wellknown.d.ts","../../../node_modules/.bun/typescript@5.9.3/node_modules/typescript/lib/lib.es2016.array.include.d.ts","../../../node_modules/.bun/typescript@5.9.3/node_modules/typescript/lib/lib.es2016.intl.d.ts","../../../node_modules/.bun/typescript@5.9.3/node_modules/typescript/lib/lib.es2017.arraybuffer.d.ts","../../../node_modules/.bun/typescript@5.9.3/node_modules/typescript/lib/lib.es2017.date.d.ts","../../../node_modules/.bun/typescript@5.9.3/node_modules/typescript/lib/lib.es2017.object.d.ts","../../../node_modules/.bun/typescript@5.9.3/node_modules/typescript/lib/lib.es2017.sharedmemory.d.ts","../../../node_modules/.bun/typescript@5.9.3/node_modules/typescript/lib/lib.es2017.string.d.ts","../../../node_modules/.bun/typescript@5.9.3/node_modules/typescript/lib/lib.es2017.intl.d.ts","../../../node_modules/.bun/typescript@5.9.3/node_modules/typescript/lib/lib.es2017.typedarrays.d.ts","../../../node_modules/.bun/typescript@5.9.3/node_modules/typescript/lib/lib.es2018.asyncgenerator.d.ts","../../../node_modules/.bun/typescript@5.9.3/node_modules/typescript/lib/lib.es2018.asynciterable.d.ts","../../../node_modules/.bun/typescript@5.9.3/node_modules/typescript/lib/lib.es2018.intl.d.ts","../../../node_modules/.bun/typescript@5.9.3/node_modules/typescript/lib/lib.es2018.promise.d.ts","../../../node_modules/.bun/typescript@5.9.3/node_modules/typescript/lib/lib.es2018.regexp.d.ts","../../../node_modules/.bun/typescript@5.9.3/node_modules/typescript/lib/lib.es2019.array.d.ts","../../../node_modules/.bun/typescript@5.9.3/node_modules/typescript/lib/lib.es2019.object.d.ts","../../../node_modules/.bun/typescript@5.9.3/node_modules/typescript/lib/lib.es2019.string.d.ts","../../../node_modules/.bun/typescript@5.9.3/node_modules/typescript/lib/lib.es2019.symbol.d.ts","../../../node_modules/.bun/typescript@5.9.3/node_modules/typescript/lib/lib.es2019.intl.d.ts","../../../node_modules/.bun/typescript@5.9.3/node_modules/typescript/lib/lib.es2020.bigint.d.ts","../../../node_modules/.bun/typescript@5.9.3/node_modules/typescript/lib/lib.es2020.date.d.ts","../../../node_modules/.bun/typescript@5.9.3/node_modules/typescript/lib/lib.es2020.promise.d.ts","../../../node_modules/.bun/typescript@5.9.3/node_modules/typescript/lib/lib.es2020.sharedmemory.d.ts","../../../node_modules/.bun/typescript@5.9.3/node_modules/typescript/lib/lib.es2020.string.d.ts","../../../node_modules/.bun/typescript@5.9.3/node_modules/typescript/lib/lib.es2020.symbol.wellknown.d.ts","../../../node_modules/.bun/typescript@5.9.3/node_modules/typescript/lib/lib.es2020.intl.d.ts","../../../node_modules/.bun/typescript@5.9.3/node_modules/typescript/lib/lib.es2020.number.d.ts","../../../node_modules/.bun/typescript@5.9.3/node_modules/typescript/lib/lib.es2021.promise.d.ts","../../../node_modules/.bun/typescript@5.9.3/node_modules/typescript/lib/lib.es2021.string.d.ts","../../../node_modules/.bun/typescript@5.9.3/node_modules/typescript/lib/lib.es2021.weakref.d.ts","../../../node_modules/.bun/typescript@5.9.3/node_modules/typescript/lib/lib.es2021.intl.d.ts","../../../node_modules/.bun/typescript@5.9.3/node_modules/typescript/lib/lib.es2022.array.d.ts","../../../node_modules/.bun/typescript@5.9.3/node_modules/typescript/lib/lib.es2022.error.d.ts","../../../node_modules/.bun/typescript@5.9.3/node_modules/typescript/lib/lib.es2022.intl.d.ts","../../../node_modules/.bun/typescript@5.9.3/node_modules/typescript/lib/lib.es2022.object.d.ts","../../../node_modules/.bun/typescript@5.9.3/node_modules/typescript/lib/lib.es2022.string.d.ts","../../../node_modules/.bun/typescript@5.9.3/node_modules/typescript/lib/lib.es2022.regexp.d.ts","../../../node_modules/.bun/typescript@5.9.3/node_modules/typescript/lib/lib.es2023.array.d.ts","../../../node_modules/.bun/typescript@5.9.3/node_modules/typescript/lib/lib.es2023.collection.d.ts","../../../node_modules/.bun/typescript@5.9.3/node_modules/typescript/lib/lib.es2023.intl.d.ts","../../../node_modules/.bun/typescript@5.9.3/node_modules/typescript/lib/lib.es2024.arraybuffer.d.ts","../../../node_modules/.bun/typescript@5.9.3/node_modules/typescript/lib/lib.es2024.collection.d.ts","../../../node_modules/.bun/typescript@5.9.3/node_modules/typescript/lib/lib.es2024.object.d.ts","../../../node_modules/.bun/typescript@5.9.3/node_modules/typescript/lib/lib.es2024.promise.d.ts","../../../node_modules/.bun/typescript@5.9.3/node_modules/typescript/lib/lib.es2024.regexp.d.ts","../../../node_modules/.bun/typescript@5.9.3/node_modules/typescript/lib/lib.es2024.sharedmemory.d.ts","../../../node_modules/.bun/typescript@5.9.3/node_modules/typescript/lib/lib.es2024.string.d.ts","../../../node_modules/.bun/typescript@5.9.3/node_modules/typescript/lib/lib.esnext.disposable.d.ts","../../../node_modules/.bun/typescript@5.9.3/node_modules/typescript/lib/lib.esnext.float16.d.ts","../../../node_modules/.bun/typescript@5.9.3/node_modules/typescript/lib/lib.decorators.d.ts","../../../node_modules/.bun/typescript@5.9.3/node_modules/typescript/lib/lib.decorators.legacy.d.ts","../../../node_modules/.bun/tslib@2.8.1/node_modules/tslib/tslib.d.ts","../../../node_modules/.bun/tslib@2.8.1/node_modules/tslib/modules/index.d.ts","../../../node_modules/.bun/temporal-spec@0.3.0/node_modules/temporal-spec/index.d.ts","../../../node_modules/.bun/temporal-polyfill@0.3.0/node_modules/temporal-polyfill/index.d.ts","../src/comparators.ts","../src/interval.ts","../src/are-intervals-overlapping.ts","../src/are-intervals-overlapping.test.ts","../src/comparators.test.ts","../src/is-within-interval.ts","../src/normalize-intervals.ts","../src/sort-interval.ts","../src/index.ts","../src/normalize-intervals.test.ts","../../../node_modules/.bun/undici-types@7.18.2/node_modules/undici-types/utility.d.ts","../../../node_modules/.bun/undici-types@7.18.2/node_modules/undici-types/header.d.ts","../../../node_modules/.bun/undici-types@7.18.2/node_modules/undici-types/readable.d.ts","../../../node_modules/.bun/@types+node@25.3.1/node_modules/@types/node/compatibility/iterators.d.ts","../../../node_modules/.bun/@types+node@25.3.1/node_modules/@types/node/globals.typedarray.d.ts","../../../node_modules/.bun/@types+node@25.3.1/node_modules/@types/node/buffer.buffer.d.ts","../../../node_modules/.bun/@types+node@25.3.1/node_modules/@types/node/globals.d.ts","../../../node_modules/.bun/@types+node@25.3.1/node_modules/@types/node/web-globals/abortcontroller.d.ts","../../../node_modules/.bun/@types+node@25.3.1/node_modules/@types/node/web-globals/blob.d.ts","../../../node_modules/.bun/@types+node@25.3.1/node_modules/@types/node/web-globals/console.d.ts","../../../node_modules/.bun/@types+node@25.3.1/node_modules/@types/node/web-globals/crypto.d.ts","../../../node_modules/.bun/@types+node@25.3.1/node_modules/@types/node/web-globals/domexception.d.ts","../../../node_modules/.bun/@types+node@25.3.1/node_modules/@types/node/web-globals/encoding.d.ts","../../../node_modules/.bun/@types+node@25.3.1/node_modules/@types/node/web-globals/events.d.ts","../../../node_modules/.bun/@types+node@25.3.1/node_modules/@types/node/web-globals/fetch.d.ts","../../../node_modules/.bun/@types+node@25.3.1/node_modules/@types/node/web-globals/importmeta.d.ts","../../../node_modules/.bun/@types+node@25.3.1/node_modules/@types/node/web-globals/messaging.d.ts","../../../node_modules/.bun/@types+node@25.3.1/node_modules/@types/node/web-globals/navigator.d.ts","../../../node_modules/.bun/@types+node@25.3.1/node_modules/@types/node/web-globals/performance.d.ts","../../../node_modules/.bun/@types+node@25.3.1/node_modules/@types/node/web-globals/storage.d.ts","../../../node_modules/.bun/@types+node@25.3.1/node_modules/@types/node/web-globals/streams.d.ts","../../../node_modules/.bun/@types+node@25.3.1/node_modules/@types/node/web-globals/timers.d.ts","../../../node_modules/.bun/@types+node@25.3.1/node_modules/@types/node/web-globals/url.d.ts","../../../node_modules/.bun/@types+node@25.3.1/node_modules/@types/node/assert.d.ts","../../../node_modules/.bun/@types+node@25.3.1/node_modules/@types/node/assert/strict.d.ts","../../../node_modules/.bun/@types+node@25.3.1/node_modules/@types/node/async_hooks.d.ts","../../../node_modules/.bun/@types+node@25.3.1/node_modules/@types/node/buffer.d.ts","../../../node_modules/.bun/@types+node@25.3.1/node_modules/@types/node/child_process.d.ts","../../../node_modules/.bun/@types+node@25.3.1/node_modules/@types/node/cluster.d.ts","../../../node_modules/.bun/@types+node@25.3.1/node_modules/@types/node/console.d.ts","../../../node_modules/.bun/@types+node@25.3.1/node_modules/@types/node/constants.d.ts","../../../node_modules/.bun/@types+node@25.3.1/node_modules/@types/node/crypto.d.ts","../../../node_modules/.bun/@types+node@25.3.1/node_modules/@types/node/dgram.d.ts","../../../node_modules/.bun/@types+node@25.3.1/node_modules/@types/node/diagnostics_channel.d.ts","../../../node_modules/.bun/@types+node@25.3.1/node_modules/@types/node/dns.d.ts","../../../node_modules/.bun/@types+node@25.3.1/node_modules/@types/node/dns/promises.d.ts","../../../node_modules/.bun/@types+node@25.3.1/node_modules/@types/node/domain.d.ts","../../../node_modules/.bun/@types+node@25.3.1/node_modules/@types/node/events.d.ts","../../../node_modules/.bun/@types+node@25.3.1/node_modules/@types/node/fs.d.ts","../../../node_modules/.bun/@types+node@25.3.1/node_modules/@types/node/fs/promises.d.ts","../../../node_modules/.bun/@types+node@25.3.1/node_modules/@types/node/http.d.ts","../../../node_modules/.bun/@types+node@25.3.1/node_modules/@types/node/http2.d.ts","../../../node_modules/.bun/@types+node@25.3.1/node_modules/@types/node/https.d.ts","../../../node_modules/.bun/@types+node@25.3.1/node_modules/@types/node/inspector.d.ts","../../../node_modules/.bun/@types+node@25.3.1/node_modules/@types/node/inspector.generated.d.ts","../../../node_modules/.bun/@types+node@25.3.1/node_modules/@types/node/inspector/promises.d.ts","../../../node_modules/.bun/@types+node@25.3.1/node_modules/@types/node/module.d.ts","../../../node_modules/.bun/@types+node@25.3.1/node_modules/@types/node/net.d.ts","../../../node_modules/.bun/@types+node@25.3.1/node_modules/@types/node/os.d.ts","../../../node_modules/.bun/@types+node@25.3.1/node_modules/@types/node/path.d.ts","../../../node_modules/.bun/@types+node@25.3.1/node_modules/@types/node/path/posix.d.ts","../../../node_modules/.bun/@types+node@25.3.1/node_modules/@types/node/path/win32.d.ts","../../../node_modules/.bun/@types+node@25.3.1/node_modules/@types/node/perf_hooks.d.ts","../../../node_modules/.bun/@types+node@25.3.1/node_modules/@types/node/process.d.ts","../../../node_modules/.bun/@types+node@25.3.1/node_modules/@types/node/punycode.d.ts","../../../node_modules/.bun/@types+node@25.3.1/node_modules/@types/node/querystring.d.ts","../../../node_modules/.bun/@types+node@25.3.1/node_modules/@types/node/quic.d.ts","../../../node_modules/.bun/@types+node@25.3.1/node_modules/@types/node/readline.d.ts","../../../node_modules/.bun/@types+node@25.3.1/node_modules/@types/node/readline/promises.d.ts","../../../node_modules/.bun/@types+node@25.3.1/node_modules/@types/node/repl.d.ts","../../../node_modules/.bun/@types+node@25.3.1/node_modules/@types/node/sea.d.ts","../../../node_modules/.bun/@types+node@25.3.1/node_modules/@types/node/sqlite.d.ts","../../../node_modules/.bun/@types+node@25.3.1/node_modules/@types/node/stream.d.ts","../../../node_modules/.bun/@types+node@25.3.1/node_modules/@types/node/stream/consumers.d.ts","../../../node_modules/.bun/@types+node@25.3.1/node_modules/@types/node/stream/promises.d.ts","../../../node_modules/.bun/@types+node@25.3.1/node_modules/@types/node/stream/web.d.ts","../../../node_modules/.bun/@types+node@25.3.1/node_modules/@types/node/string_decoder.d.ts","../../../node_modules/.bun/@types+node@25.3.1/node_modules/@types/node/test.d.ts","../../../node_modules/.bun/@types+node@25.3.1/node_modules/@types/node/test/reporters.d.ts","../../../node_modules/.bun/@types+node@25.3.1/node_modules/@types/node/timers.d.ts","../../../node_modules/.bun/@types+node@25.3.1/node_modules/@types/node/timers/promises.d.ts","../../../node_modules/.bun/@types+node@25.3.1/node_modules/@types/node/tls.d.ts","../../../node_modules/.bun/@types+node@25.3.1/node_modules/@types/node/trace_events.d.ts","../../../node_modules/.bun/@types+node@25.3.1/node_modules/@types/node/tty.d.ts","../../../node_modules/.bun/@types+node@25.3.1/node_modules/@types/node/url.d.ts","../../../node_modules/.bun/@types+node@25.3.1/node_modules/@types/node/util.d.ts","../../../node_modules/.bun/@types+node@25.3.1/node_modules/@types/node/util/types.d.ts","../../../node_modules/.bun/@types+node@25.3.1/node_modules/@types/node/v8.d.ts","../../../node_modules/.bun/@types+node@25.3.1/node_modules/@types/node/vm.d.ts","../../../node_modules/.bun/@types+node@25.3.1/node_modules/@types/node/wasi.d.ts","../../../node_modules/.bun/@types+node@25.3.1/node_modules/@types/node/worker_threads.d.ts","../../../node_modules/.bun/@types+node@25.3.1/node_modules/@types/node/zlib.d.ts","../../../node_modules/.bun/@types+node@25.3.1/node_modules/@types/node/index.d.ts","../../../node_modules/.bun/undici-types@7.18.2/node_modules/undici-types/fetch.d.ts","../../../node_modules/.bun/undici-types@7.18.2/node_modules/undici-types/formdata.d.ts","../../../node_modules/.bun/undici-types@7.18.2/node_modules/undici-types/connector.d.ts","../../../node_modules/.bun/undici-types@7.18.2/node_modules/undici-types/client-stats.d.ts","../../../node_modules/.bun/undici-types@7.18.2/node_modules/undici-types/client.d.ts","../../../node_modules/.bun/undici-types@7.18.2/node_modules/undici-types/errors.d.ts","../../../node_modules/.bun/undici-types@7.18.2/node_modules/undici-types/dispatcher.d.ts","../../../node_modules/.bun/undici-types@7.18.2/node_modules/undici-types/global-dispatcher.d.ts","../../../node_modules/.bun/undici-types@7.18.2/node_modules/undici-types/global-origin.d.ts","../../../node_modules/.bun/undici-types@7.18.2/node_modules/undici-types/pool-stats.d.ts","../../../node_modules/.bun/undici-types@7.18.2/node_modules/undici-types/pool.d.ts","../../../node_modules/.bun/undici-types@7.18.2/node_modules/undici-types/handlers.d.ts","../../../node_modules/.bun/undici-types@7.18.2/node_modules/undici-types/balanced-pool.d.ts","../../../node_modules/.bun/undici-types@7.18.2/node_modules/undici-types/round-robin-pool.d.ts","../../../node_modules/.bun/undici-types@7.18.2/node_modules/undici-types/h2c-client.d.ts","../../../node_modules/.bun/undici-types@7.18.2/node_modules/undici-types/agent.d.ts","../../../node_modules/.bun/undici-types@7.18.2/node_modules/undici-types/mock-interceptor.d.ts","../../../node_modules/.bun/undici-types@7.18.2/node_modules/undici-types/mock-call-history.d.ts","../../../node_modules/.bun/undici-types@7.18.2/node_modules/undici-types/mock-agent.d.ts","../../../node_modules/.bun/undici-types@7.18.2/node_modules/undici-types/mock-client.d.ts","../../../node_modules/.bun/undici-types@7.18.2/node_modules/undici-types/mock-pool.d.ts","../../../node_modules/.bun/undici-types@7.18.2/node_modules/undici-types/snapshot-agent.d.ts","../../../node_modules/.bun/undici-types@7.18.2/node_modules/undici-types/mock-errors.d.ts","../../../node_modules/.bun/undici-types@7.18.2/node_modules/undici-types/proxy-agent.d.ts","../../../node_modules/.bun/undici-types@7.18.2/node_modules/undici-types/env-http-proxy-agent.d.ts","../../../node_modules/.bun/undici-types@7.18.2/node_modules/undici-types/retry-handler.d.ts","../../../node_modules/.bun/undici-types@7.18.2/node_modules/undici-types/retry-agent.d.ts","../../../node_modules/.bun/undici-types@7.18.2/node_modules/undici-types/api.d.ts","../../../node_modules/.bun/undici-types@7.18.2/node_modules/undici-types/cache-interceptor.d.ts","../../../node_modules/.bun/undici-types@7.18.2/node_modules/undici-types/interceptors.d.ts","../../../node_modules/.bun/undici-types@7.18.2/node_modules/undici-types/util.d.ts","../../../node_modules/.bun/undici-types@7.18.2/node_modules/undici-types/cookies.d.ts","../../../node_modules/.bun/undici-types@7.18.2/node_modules/undici-types/patch.d.ts","../../../node_modules/.bun/undici-types@7.18.2/node_modules/undici-types/websocket.d.ts","../../../node_modules/.bun/undici-types@7.18.2/node_modules/undici-types/eventsource.d.ts","../../../node_modules/.bun/undici-types@7.18.2/node_modules/undici-types/diagnostics-channel.d.ts","../../../node_modules/.bun/undici-types@7.18.2/node_modules/undici-types/content-type.d.ts","../../../node_modules/.bun/undici-types@7.18.2/node_modules/undici-types/cache.d.ts","../../../node_modules/.bun/undici-types@7.18.2/node_modules/undici-types/index.d.ts","../../../node_modules/.bun/bun-types@1.3.14/node_modules/bun-types/globals.d.ts","../../../node_modules/.bun/bun-types@1.3.14/node_modules/bun-types/s3.d.ts","../../../node_modules/.bun/bun-types@1.3.14/node_modules/bun-types/fetch.d.ts","../../../node_modules/.bun/bun-types@1.3.14/node_modules/bun-types/jsx.d.ts","../../../node_modules/.bun/bun-types@1.3.14/node_modules/bun-types/bun.d.ts","../../../node_modules/.bun/bun-types@1.3.14/node_modules/bun-types/extensions.d.ts","../../../node_modules/.bun/bun-types@1.3.14/node_modules/bun-types/devserver.d.ts","../../../node_modules/.bun/bun-types@1.3.14/node_modules/bun-types/ffi.d.ts","../../../node_modules/.bun/bun-types@1.3.14/node_modules/bun-types/html-rewriter.d.ts","../../../node_modules/.bun/bun-types@1.3.14/node_modules/bun-types/jsc.d.ts","../../../node_modules/.bun/bun-types@1.3.14/node_modules/bun-types/sqlite.d.ts","../../../node_modules/.bun/bun-types@1.3.14/node_modules/bun-types/vendor/expect-type/utils.d.ts","../../../node_modules/.bun/bun-types@1.3.14/node_modules/bun-types/vendor/expect-type/overloads.d.ts","../../../node_modules/.bun/bun-types@1.3.14/node_modules/bun-types/vendor/expect-type/branding.d.ts","../../../node_modules/.bun/bun-types@1.3.14/node_modules/bun-types/vendor/expect-type/messages.d.ts","../../../node_modules/.bun/bun-types@1.3.14/node_modules/bun-types/vendor/expect-type/index.d.ts","../../../node_modules/.bun/bun-types@1.3.14/node_modules/bun-types/test.d.ts","../../../node_modules/.bun/bun-types@1.3.14/node_modules/bun-types/wasm.d.ts","../../../node_modules/.bun/bun-types@1.3.14/node_modules/bun-types/overrides.d.ts","../../../node_modules/.bun/bun-types@1.3.14/node_modules/bun-types/deprecated.d.ts","../../../node_modules/.bun/bun-types@1.3.14/node_modules/bun-types/redis.d.ts","../../../node_modules/.bun/bun-types@1.3.14/node_modules/bun-types/shell.d.ts","../../../node_modules/.bun/bun-types@1.3.14/node_modules/bun-types/serve.d.ts","../../../node_modules/.bun/bun-types@1.3.14/node_modules/bun-types/sql.d.ts","../../../node_modules/.bun/bun-types@1.3.14/node_modules/bun-types/security.d.ts","../../../node_modules/.bun/bun-types@1.3.14/node_modules/bun-types/bundle.d.ts","../../../node_modules/.bun/bun-types@1.3.14/node_modules/bun-types/bun.ns.d.ts","../../../node_modules/.bun/bun-types@1.3.14/node_modules/bun-types/index.d.ts","../../../node_modules/.bun/@types+bun@1.3.14/node_modules/@types/bun/index.d.ts"],"fileIdsList":[[91,112,120,124,127,129,130,131,143,208,209,210,212,214,225,227,228,229,230,231,232,235],[91,109,110,112,120,124,127,129,130,131,143,208,209,210,212,214,225,227,228,229,230,231,232],[91,111,112,120,124,127,129,130,131,143,208,209,210,212,214,225,227,228,229,230,231,232],[112,120,124,127,129,130,131,143,208,209,210,212,214,225,227,228,229,230,231,232],[91,112,120,124,127,129,130,131,143,151,208,209,210,212,214,225,227,228,229,230,231,232],[91,112,113,118,120,123,124,127,129,130,131,133,143,148,160,208,209,210,212,214,225,227,228,229,230,231,232],[91,112,113,114,120,123,124,127,129,130,131,143,208,209,210,212,214,225,227,228,229,230,231,232],[91,112,120,124,127,129,130,131,143,208,209,210,212,214,225,227,228,229,230,231,232],[91,112,115,120,124,127,129,130,131,143,161,208,209,210,212,214,225,227,228,229,230,231,232],[91,112,116,117,120,124,127,129,130,131,134,143,208,209,210,212,214,225,227,228,229,230,231,232],[91,112,117,120,124,127,129,130,131,143,148,157,208,209,210,212,214,225,226,227,228,229,230,231,232],[91,112,118,120,123,124,127,129,130,131,133,143,208,209,210,212,214,225,227,228,229,230,231,232],[91,111,112,119,120,124,127,129,130,131,143,208,209,210,212,214,225,227,228,229,230,231,232],[91,112,120,121,124,127,129,130,131,143,208,209,210,212,214,225,227,228,229,230,231,232],[91,112,120,122,123,124,127,129,130,131,143,208,209,210,212,214,225,227,228,229,230,231,232],[91,111,112,120,123,124,127,129,130,131,143,208,209,210,212,214,225,227,228,229,230,231,232],[91,112,120,123,124,125,127,129,130,131,143,148,160,208,209,210,212,214,225,226,227,228,229,230,231,232],[91,112,120,123,124,125,127,129,130,131,143,148,151,208,209,210,212,214,225,226,227,228,229,230,231,232],[91,112,120,123,124,126,127,129,130,131,133,143,148,160,207,208,209,210,212,214,225,227,228,229,230,231,232],[91,112,120,123,124,126,127,129,130,131,133,143,148,157,160,208,209,210,212,214,225,226,227,228,229,230,231,232],[91,112,120,124,126,127,128,129,130,131,143,148,157,160,208,209,210,212,214,225,226,227,228,229,230,231,232],[89,90,91,92,93,94,95,96,97,98,99,100,101,102,103,104,105,106,107,108,109,110,111,112,113,114,115,116,117,118,119,120,121,122,123,124,125,126,127,128,129,130,131,132,133,134,135,136,137,138,139,140,141,142,143,144,145,146,147,148,149,150,151,152,153,154,155,156,157,158,159,160,161,162,163,164,165,166,167,208,209,210,212,214,225,227,228,229,230,231,232],[91,112,120,123,124,127,129,130,131,143,208,209,210,212,214,225,227,228,229,230,231,232],[91,112,120,124,127,129,131,143,208,209,210,212,214,225,227,228,229,230,231,232],[91,112,120,124,127,129,130,131,132,143,160,208,209,210,212,214,225,227,228,229,230,231,232],[91,112,120,123,124,127,129,130,131,133,143,148,208,209,210,212,214,225,227,228,229,230,231,232],[91,112,120,124,127,129,130,131,134,143,208,209,210,212,214,225,226,227,228,229,230,231,232],[91,112,120,124,127,129,130,131,135,143,208,209,210,212,214,225,227,228,229,230,231,232],[91,112,120,123,124,127,129,130,131,138,143,208,209,210,212,214,225,227,228,229,230,231,232],[91,109,110,111,112,113,114,115,116,117,118,119,120,121,122,123,124,125,126,127,128,129,130,131,132,133,134,135,136,137,138,139,140,141,142,143,144,145,146,147,148,149,150,151,152,153,154,155,156,157,158,159,160,161,162,163,164,165,166,167,208,209,210,212,214,225,226,227,228,229,230,231,232],[91,112,120,124,127,129,130,131,140,143,208,209,210,212,214,225,227,228,229,230,231,232],[91,112,120,124,127,129,130,131,141,143,208,209,210,212,214,225,227,228,229,230,231,232],[91,112,117,120,124,127,129,130,131,133,143,151,208,209,210,212,214,225,227,228,229,230,231,232],[91,112,120,123,124,127,129,130,131,143,144,208,209,210,212,214,225,227,228,229,230,231,232],[91,112,120,124,127,129,130,131,143,145,161,164,208,209,210,212,214,225,227,228,229,230,231,232],[91,112,120,123,124,127,129,130,131,143,148,150,151,208,209,210,212,214,225,227,228,229,230,231,232],[91,112,120,124,127,129,130,131,143,149,151,208,209,210,212,214,225,227,228,229,230,231,232],[91,112,120,124,127,129,130,131,143,151,161,208,209,210,212,214,225,227,228,229,230,231,232],[91,112,120,124,127,129,130,131,143,152,208,209,210,212,214,225,227,228,229,230,231,232],[91,109,112,120,124,127,129,130,131,143,148,154,160,208,209,210,212,214,225,227,228,229,230,231,232],[91,112,120,124,127,129,130,131,143,148,153,208,209,210,212,214,225,227,228,229,230,231,232],[91,112,120,123,124,127,129,130,131,143,155,156,208,209,210,212,214,225,227,228,229,230,231,232],[91,112,120,124,127,129,130,131,143,155,156,208,209,210,212,214,225,227,228,229,230,231,232],[91,112,117,120,124,127,129,130,131,133,143,148,157,208,209,210,212,214,225,226,227,228,229,230,231,232],[91,112,120,124,127,129,130,131,143,158,208,209,210,212,214,225,227,228,229,230,231,232],[91,112,120,124,127,129,130,131,133,143,159,208,209,210,212,214,225,227,228,229,230,231,232],[91,112,120,124,126,127,129,130,131,141,143,160,208,209,210,212,214,225,227,228,229,230,231,232],[91,112,120,124,127,129,130,131,143,161,162,208,209,210,212,214,225,227,228,229,230,231,232],[91,112,117,120,124,127,129,130,131,143,162,208,209,210,212,214,225,227,228,229,230,231,232],[91,112,120,124,127,129,130,131,143,148,163,208,209,210,212,214,225,227,228,229,230,231,232],[91,112,120,124,127,129,130,131,132,143,164,208,209,210,212,214,225,227,228,229,230,231,232],[91,112,120,124,127,129,130,131,143,165,208,209,210,212,214,225,227,228,229,230,231,232],[91,112,115,120,124,127,129,130,131,143,208,209,210,212,214,225,227,228,229,230,231,232],[91,112,117,120,124,127,129,130,131,143,208,209,210,212,214,225,227,228,229,230,231,232],[91,112,120,124,127,129,130,131,143,161,208,209,210,212,214,225,227,228,229,230,231,232],[91,112,120,124,127,129,130,131,143,207,208,209,210,212,214,225,227,228,229,230,231,232],[91,112,120,124,127,129,130,131,143,160,208,209,210,212,214,225,227,228,229,230,231,232],[91,112,120,124,127,129,130,131,143,166,208,209,210,212,214,225,227,228,229,230,231,232],[91,112,120,124,127,129,130,131,138,143,208,209,210,212,214,225,227,228,229,230,231,232],[91,112,120,124,127,129,130,131,143,151,208,209,210,212,214,225,226,227,228,229,230,231,232],[91,112,120,124,127,129,130,131,143,156,208,209,210,212,214,225,227,228,229,230,231,232],[91,112,120,123,124,125,127,129,130,131,138,143,148,151,160,163,164,166,207,208,209,210,212,214,225,226,227,228,229,230,231,232],[91,112,120,124,127,129,130,131,143,148,167,208,209,210,212,214,225,227,228,229,230,231,232],[91,112,117,120,124,126,127,129,130,131,143,157,161,166,207,208,209,210,211,214,215,225,226,227,228,229,230,231,232],[91,112,120,124,127,129,130,131,143,208,209,210,212,214,225,228,229,230,231,232],[91,112,120,124,127,129,130,131,143,208,209,210,212,225,227,228,229,230,231,232],[91,112,117,120,124,127,129,130,131,138,143,148,151,157,161,166,207,209,210,212,214,225,226,227,228,229,230,231,232],[91,112,120,124,127,129,130,131,143,168,208,209,210,212,213,214,215,216,217,218,224,225,226,227,228,229,230,231,232,233,234],[91,112,115,117,120,124,125,127,129,130,131,134,143,151,157,160,167,208,209,210,212,214,225,227,228,229,230,231,232],[91,112,120,124,127,129,130,131,143,208,209,210,212,214,225,227,229,230,231,232],[91,112,120,124,127,129,130,131,143,208,210,212,214,225,227,228,229,230,231,232],[91,112,120,124,127,129,130,131,143,208,209,210,212,214,225,227,228,229,230,231],[91,112,120,124,127,129,130,131,143,208,209,210,212,214,225,227,228,229,231,232],[91,112,120,124,127,129,130,131,143,208,209,210,212,214,225,227,228,230,231,232],[91,112,120,124,127,129,130,131,143,208,209,210,212,214,218,225,227,228,229,230,232],[91,112,120,124,127,129,130,131,143,208,209,210,212,214,223,225,227,228,229,230,231,232],[91,112,120,124,127,129,130,131,143,208,209,210,212,214,219,220,225,227,228,229,230,231,232],[91,112,120,124,127,129,130,131,143,208,209,210,212,214,219,220,221,222,225,227,228,229,230,231,232],[91,112,120,124,127,129,130,131,143,208,209,210,212,214,219,221,225,227,228,229,230,231,232],[91,112,120,124,127,129,130,131,143,208,209,210,212,214,219,225,227,228,229,230,231,232],[91,112,120,124,127,129,130,131,143,208,209,210,212,214,227,228,229,230,231,232],[74,91,112,120,124,127,129,130,131,143,208,209,210,212,214,225,227,228,229,230,231,232],[72,91,112,120,124,127,129,130,131,143,208,209,210,212,214,225,227,228,229,230,231,232],[91,112,120,124,127,129,130,131,143,160,172,175,178,179,208,209,210,212,214,225,227,228,229,230,231,232],[91,112,120,124,127,129,130,131,143,148,160,175,208,209,210,212,214,225,227,228,229,230,231,232],[91,112,120,124,127,129,130,131,143,160,175,179,208,209,210,212,214,225,227,228,229,230,231,232],[91,112,120,124,127,129,130,131,143,148,208,209,210,212,214,225,227,228,229,230,231,232],[91,112,120,124,127,129,130,131,143,169,208,209,210,212,214,225,227,228,229,230,231,232],[91,112,120,124,127,129,130,131,143,173,208,209,210,212,214,225,227,228,229,230,231,232],[91,112,120,124,127,129,130,131,143,160,171,172,175,208,209,210,212,214,225,227,228,229,230,231,232],[91,112,120,124,127,129,130,131,133,143,157,208,209,210,212,214,225,226,227,228,229,230,231,232],[91,112,120,124,127,129,130,131,143,168,208,209,210,212,214,225,227,228,229,230,231,232],[91,112,120,124,127,129,130,131,143,168,169,208,209,210,212,214,225,227,228,229,230,231,232],[91,112,120,124,127,129,130,131,133,143,160,171,175,208,209,210,212,214,225,227,228,229,230,231,232],[86,87,88,91,112,120,123,124,127,129,130,131,143,148,160,170,174,208,209,210,212,214,225,227,228,229,230,231,232],[91,112,120,124,127,129,130,131,143,175,184,192,208,209,210,212,214,225,227,228,229,230,231,232],[87,91,112,120,124,127,129,130,131,143,173,208,209,210,212,214,225,227,228,229,230,231,232],[91,112,120,124,127,129,130,131,143,175,201,202,208,209,210,212,214,225,227,228,229,230,231,232],[87,91,112,120,124,127,129,130,131,143,151,160,168,170,175,208,209,210,212,214,225,227,228,229,230,231,232],[91,112,120,124,127,129,130,131,143,175,208,209,210,212,214,225,227,228,229,230,231,232],[91,112,120,124,127,129,130,131,143,160,171,175,208,209,210,212,214,225,227,228,229,230,231,232],[86,91,112,120,124,127,129,130,131,143,208,209,210,212,214,225,227,228,229,230,231,232],[91,112,120,124,127,129,130,131,143,169,170,171,173,174,175,176,177,179,180,181,182,183,184,185,186,187,188,189,190,191,192,193,194,195,196,197,198,199,200,202,203,204,205,206,208,209,210,212,214,225,227,228,229,230,231,232],[91,112,120,124,127,129,130,131,143,175,194,197,208,209,210,212,214,225,227,228,229,230,231,232],[91,112,120,124,127,129,130,131,143,175,184,185,186,208,209,210,212,214,225,227,228,229,230,231,232],[91,112,120,124,127,129,130,131,143,173,175,185,187,208,209,210,212,214,225,227,228,229,230,231,232],[91,112,120,124,127,129,130,131,143,174,208,209,210,212,214,225,227,228,229,230,231,232],[87,91,112,120,124,127,129,130,131,143,169,175,208,209,210,212,214,225,227,228,229,230,231,232],[91,112,120,124,127,129,130,131,143,175,179,185,187,208,209,210,212,214,225,227,228,229,230,231,232],[91,112,120,124,127,129,130,131,143,179,208,209,210,212,214,225,227,228,229,230,231,232],[91,112,120,124,127,129,130,131,143,160,173,175,178,208,209,210,212,214,225,227,228,229,230,231,232],[87,91,112,120,124,127,129,130,131,143,171,175,184,208,209,210,212,214,225,227,228,229,230,231,232],[91,112,120,124,127,129,130,131,143,175,194,208,209,210,212,214,225,227,228,229,230,231,232],[91,112,120,124,127,129,130,131,143,187,208,209,210,212,214,225,227,228,229,230,231,232],[91,112,120,124,127,129,130,131,143,151,166,168,169,175,201,208,209,210,212,214,225,227,228,229,230,231,232],[73,75,78,91,112,120,124,127,129,130,131,143,208,209,210,212,214,224,225,227,228,229,230,231,232],[73,76,77,91,112,120,124,127,129,130,131,143,208,209,210,212,214,225,227,228,229,230,231,232],[73,75,76,91,112,120,124,127,129,130,131,143,208,209,210,212,214,224,225,227,228,229,230,231,232],[73,75,91,112,120,124,127,129,130,131,143,208,209,210,212,214,225,227,228,229,230,231,232],[73,76,77,78,81,82,83,91,112,120,124,127,129,130,131,143,208,209,210,212,214,225,227,228,229,230,231,232],[73,76,91,112,120,124,127,129,130,131,143,208,209,210,212,214,225,227,228,229,230,231,232],[73,75,77,82,91,112,120,124,127,129,130,131,143,208,209,210,212,214,224,225,227,228,229,230,231,232]],"fileInfos":[{"version":"c430d44666289dae81f30fa7b2edebf186ecc91a2d4c71266ea6ae76388792e1","affectsGlobalScope":true,"impliedFormat":1},{"version":"45b7ab580deca34ae9729e97c13cfd999df04416a79116c3bfb483804f85ded4","impliedFormat":1},{"version":"3facaf05f0c5fc569c5649dd359892c98a85557e3e0c847964caeb67076f4d75","impliedFormat":1},{"version":"e44bb8bbac7f10ecc786703fe0a6a4b952189f908707980ba8f3c8975a760962","impliedFormat":1},{"version":"5e1c4c362065a6b95ff952c0eab010f04dcd2c3494e813b493ecfd4fcb9fc0d8","impliedFormat":1},{"version":"68d73b4a11549f9c0b7d352d10e91e5dca8faa3322bfb77b661839c42b1ddec7","impliedFormat":1},{"version":"5efce4fc3c29ea84e8928f97adec086e3dc876365e0982cc8479a07954a3efd4","impliedFormat":1},{"version":"feecb1be483ed332fad555aff858affd90a48ab19ba7272ee084704eb7167569","impliedFormat":1},{"version":"ee7bad0c15b58988daa84371e0b89d313b762ab83cb5b31b8a2d1162e8eb41c2","impliedFormat":1},{"version":"27bdc30a0e32783366a5abeda841bc22757c1797de8681bbe81fbc735eeb1c10","impliedFormat":1},{"version":"8fd575e12870e9944c7e1d62e1f5a73fcf23dd8d3a321f2a2c74c20d022283fe","impliedFormat":1},{"version":"c57796738e7f83dbc4b8e65132f11a377649c00dd3eee333f672b8f0a6bea671","affectsGlobalScope":true,"impliedFormat":1},{"version":"dc2df20b1bcdc8c2d34af4926e2c3ab15ffe1160a63e58b7e09833f616efff44","affectsGlobalScope":true,"impliedFormat":1},{"version":"515d0b7b9bea2e31ea4ec968e9edd2c39d3eebf4a2d5cbd04e88639819ae3b71","affectsGlobalScope":true,"impliedFormat":1},{"version":"0559b1f683ac7505ae451f9a96ce4c3c92bdc71411651ca6ddb0e88baaaad6a3","affectsGlobalScope":true,"impliedFormat":1},{"version":"0dc1e7ceda9b8b9b455c3a2d67b0412feab00bd2f66656cd8850e8831b08b537","affectsGlobalScope":true,"impliedFormat":1},{"version":"ce691fb9e5c64efb9547083e4a34091bcbe5bdb41027e310ebba8f7d96a98671","affectsGlobalScope":true,"impliedFormat":1},{"version":"8d697a2a929a5fcb38b7a65594020fcef05ec1630804a33748829c5ff53640d0","affectsGlobalScope":true,"impliedFormat":1},{"version":"4ff2a353abf8a80ee399af572debb8faab2d33ad38c4b4474cff7f26e7653b8d","affectsGlobalScope":true,"impliedFormat":1},{"version":"fb0f136d372979348d59b3f5020b4cdb81b5504192b1cacff5d1fbba29378aa1","affectsGlobalScope":true,"impliedFormat":1},{"version":"d15bea3d62cbbdb9797079416b8ac375ae99162a7fba5de2c6c505446486ac0a","affectsGlobalScope":true,"impliedFormat":1},{"version":"68d18b664c9d32a7336a70235958b8997ebc1c3b8505f4f1ae2b7e7753b87618","affectsGlobalScope":true,"impliedFormat":1},{"version":"eb3d66c8327153d8fa7dd03f9c58d351107fe824c79e9b56b462935176cdf12a","affectsGlobalScope":true,"impliedFormat":1},{"version":"38f0219c9e23c915ef9790ab1d680440d95419ad264816fa15009a8851e79119","affectsGlobalScope":true,"impliedFormat":1},{"version":"69ab18c3b76cd9b1be3d188eaf8bba06112ebbe2f47f6c322b5105a6fbc45a2e","affectsGlobalScope":true,"impliedFormat":1},{"version":"a680117f487a4d2f30ea46f1b4b7f58bef1480456e18ba53ee85c2746eeca012","affectsGlobalScope":true,"impliedFormat":1},{"version":"2f11ff796926e0832f9ae148008138ad583bd181899ab7dd768a2666700b1893","affectsGlobalScope":true,"impliedFormat":1},{"version":"4de680d5bb41c17f7f68e0419412ca23c98d5749dcaaea1896172f06435891fc","affectsGlobalScope":true,"impliedFormat":1},{"version":"954296b30da6d508a104a3a0b5d96b76495c709785c1d11610908e63481ee667","affectsGlobalScope":true,"impliedFormat":1},{"version":"ac9538681b19688c8eae65811b329d3744af679e0bdfa5d842d0e32524c73e1c","affectsGlobalScope":true,"impliedFormat":1},{"version":"0a969edff4bd52585473d24995c5ef223f6652d6ef46193309b3921d65dd4376","affectsGlobalScope":true,"impliedFormat":1},{"version":"9e9fbd7030c440b33d021da145d3232984c8bb7916f277e8ffd3dc2e3eae2bdb","affectsGlobalScope":true,"impliedFormat":1},{"version":"811ec78f7fefcabbda4bfa93b3eb67d9ae166ef95f9bff989d964061cbf81a0c","affectsGlobalScope":true,"impliedFormat":1},{"version":"717937616a17072082152a2ef351cb51f98802fb4b2fdabd32399843875974ca","affectsGlobalScope":true,"impliedFormat":1},{"version":"d7e7d9b7b50e5f22c915b525acc5a49a7a6584cf8f62d0569e557c5cfc4b2ac2","affectsGlobalScope":true,"impliedFormat":1},{"version":"71c37f4c9543f31dfced6c7840e068c5a5aacb7b89111a4364b1d5276b852557","affectsGlobalScope":true,"impliedFormat":1},{"version":"576711e016cf4f1804676043e6a0a5414252560eb57de9faceee34d79798c850","affectsGlobalScope":true,"impliedFormat":1},{"version":"89c1b1281ba7b8a96efc676b11b264de7a8374c5ea1e6617f11880a13fc56dc6","affectsGlobalScope":true,"impliedFormat":1},{"version":"74f7fa2d027d5b33eb0471c8e82a6c87216223181ec31247c357a3e8e2fddc5b","affectsGlobalScope":true,"impliedFormat":1},{"version":"d6d7ae4d1f1f3772e2a3cde568ed08991a8ae34a080ff1151af28b7f798e22ca","affectsGlobalScope":true,"impliedFormat":1},{"version":"063600664504610fe3e99b717a1223f8b1900087fab0b4cad1496a114744f8df","affectsGlobalScope":true,"impliedFormat":1},{"version":"934019d7e3c81950f9a8426d093458b65d5aff2c7c1511233c0fd5b941e608ab","affectsGlobalScope":true,"impliedFormat":1},{"version":"52ada8e0b6e0482b728070b7639ee42e83a9b1c22d205992756fe020fd9f4a47","affectsGlobalScope":true,"impliedFormat":1},{"version":"3bdefe1bfd4d6dee0e26f928f93ccc128f1b64d5d501ff4a8cf3c6371200e5e6","affectsGlobalScope":true,"impliedFormat":1},{"version":"59fb2c069260b4ba00b5643b907ef5d5341b167e7d1dbf58dfd895658bda2867","affectsGlobalScope":true,"impliedFormat":1},{"version":"639e512c0dfc3fad96a84caad71b8834d66329a1f28dc95e3946c9b58176c73a","affectsGlobalScope":true,"impliedFormat":1},{"version":"368af93f74c9c932edd84c58883e736c9e3d53cec1fe24c0b0ff451f529ceab1","affectsGlobalScope":true,"impliedFormat":1},{"version":"af3dd424cf267428f30ccfc376f47a2c0114546b55c44d8c0f1d57d841e28d74","affectsGlobalScope":true,"impliedFormat":1},{"version":"995c005ab91a498455ea8dfb63aa9f83fa2ea793c3d8aa344be4a1678d06d399","affectsGlobalScope":true,"impliedFormat":1},{"version":"959d36cddf5e7d572a65045b876f2956c973a586da58e5d26cde519184fd9b8a","affectsGlobalScope":true,"impliedFormat":1},{"version":"965f36eae237dd74e6cca203a43e9ca801ce38824ead814728a2807b1910117d","affectsGlobalScope":true,"impliedFormat":1},{"version":"3925a6c820dcb1a06506c90b1577db1fdbf7705d65b62b99dce4be75c637e26b","affectsGlobalScope":true,"impliedFormat":1},{"version":"0a3d63ef2b853447ec4f749d3f368ce642264246e02911fcb1590d8c161b8005","affectsGlobalScope":true,"impliedFormat":1},{"version":"8cdf8847677ac7d20486e54dd3fcf09eda95812ac8ace44b4418da1bbbab6eb8","affectsGlobalScope":true,"impliedFormat":1},{"version":"8444af78980e3b20b49324f4a16ba35024fef3ee069a0eb67616ea6ca821c47a","affectsGlobalScope":true,"impliedFormat":1},{"version":"3287d9d085fbd618c3971944b65b4be57859f5415f495b33a6adc994edd2f004","affectsGlobalScope":true,"impliedFormat":1},{"version":"b4b67b1a91182421f5df999988c690f14d813b9850b40acd06ed44691f6727ad","affectsGlobalScope":true,"impliedFormat":1},{"version":"df83c2a6c73228b625b0beb6669c7ee2a09c914637e2d35170723ad49c0f5cd4","affectsGlobalScope":true,"impliedFormat":1},{"version":"436aaf437562f276ec2ddbee2f2cdedac7664c1e4c1d2c36839ddd582eeb3d0a","affectsGlobalScope":true,"impliedFormat":1},{"version":"8e3c06ea092138bf9fa5e874a1fdbc9d54805d074bee1de31b99a11e2fec239d","affectsGlobalScope":true,"impliedFormat":1},{"version":"87dc0f382502f5bbce5129bdc0aea21e19a3abbc19259e0b43ae038a9fc4e326","affectsGlobalScope":true,"impliedFormat":1},{"version":"b1cb28af0c891c8c96b2d6b7be76bd394fddcfdb4709a20ba05a7c1605eea0f9","affectsGlobalScope":true,"impliedFormat":1},{"version":"2fef54945a13095fdb9b84f705f2b5994597640c46afeb2ce78352fab4cb3279","affectsGlobalScope":true,"impliedFormat":1},{"version":"ac77cb3e8c6d3565793eb90a8373ee8033146315a3dbead3bde8db5eaf5e5ec6","affectsGlobalScope":true,"impliedFormat":1},{"version":"56e4ed5aab5f5920980066a9409bfaf53e6d21d3f8d020c17e4de584d29600ad","affectsGlobalScope":true,"impliedFormat":1},{"version":"4ece9f17b3866cc077099c73f4983bddbcb1dc7ddb943227f1ec070f529dedd1","affectsGlobalScope":true,"impliedFormat":1},{"version":"0a6282c8827e4b9a95f4bf4f5c205673ada31b982f50572d27103df8ceb8013c","affectsGlobalScope":true,"impliedFormat":1},{"version":"51ad4c928303041605b4d7ae32e0c1ee387d43a24cd6f1ebf4a2699e1076d4fa","affectsGlobalScope":true,"impliedFormat":1},{"version":"196cb558a13d4533a5163286f30b0509ce0210e4b316c56c38d4c0fd2fb38405","affectsGlobalScope":true,"impliedFormat":1},{"version":"8e7f8264d0fb4c5339605a15daadb037bf238c10b654bb3eee14208f860a32ea","affectsGlobalScope":true,"impliedFormat":1},{"version":"782dec38049b92d4e85c1585fbea5474a219c6984a35b004963b00beb1aab538","affectsGlobalScope":true,"impliedFormat":1},{"version":"a6a5253138c5432c68a1510c70fe78a644fe2e632111ba778e1978010d6edfec","impliedFormat":1},{"version":"b8f34dd1757f68e03262b1ca3ddfa668a855b872f8bdd5224d6f993a7b37dc2c","impliedFormat":99},{"version":"b7d90cb5fac5ba97b94614147f44b84e29751a6699fc2e7c4d1c4386985e180d","impliedFormat":99},{"version":"6066fad0e37fd1bc223e76747a43f4bd2c6e6937cc92d7584b6c1ce1b3b668d9","impliedFormat":99},{"version":"6dacda01e012dd39f8a3576d4f460ad380450b0218d453c168f7fc6205744d89","signature":"23f928aa7faaec4c13f12c2b410667d57323b8df677703dac166d4f0d2a26c96","impliedFormat":99},{"version":"bc424099202ac6d7c2719a7e3f7494f6a4d41f09aa8d7ee0b221040847e7cf89","signature":"4bf7f108abde2889362b794a8f2d71f4c56bdd979fff6d6db23a4deccca10a64","impliedFormat":99},{"version":"83a4be753c82398f6c145242731c76c8d8e31502a6413d04ebb3eadbb9b44465","signature":"96fe3d03e04e310b5de398de521c11c9aec2fa0df0637c80f608737f125304bb","impliedFormat":99},{"version":"949fb248094d456f05608c27c6c43543354fbc76aefb59d82d8346a7b7cfdda5","signature":"8e609bb71c20b858c77f0e9f90bb1319db8477b13f9f965f1a1e18524bf50881","impliedFormat":99},{"version":"a4f4398f2b15c6071846df1b53d86c8f0c84a1e285cb825026ca4082439f4df2","signature":"8e609bb71c20b858c77f0e9f90bb1319db8477b13f9f965f1a1e18524bf50881","impliedFormat":99},{"version":"931f54d2905e5f7f0681634a15a831f7dbd9ef739581042ffc9cd9a4fd3e9e06","signature":"95e97c599bb3affabca92d071e171abc77c0dcc0492763cda2e70a05caa8de7d","impliedFormat":99},{"version":"c20bf49e6089946d751a0b5d51859329b9353e8800e945ac8b656f5b17a7d8d3","signature":"485dc62091580ac2f532fc310618d10ecdd635957840fce0362630540931c9ef","impliedFormat":99},{"version":"3351f5c46adbb9d175a36f1eb429923d7671eed402d22c6d775b8ca0438944d3","signature":"aeab7a277fbc67b36eaa0f291efbb51d5216330c955eaf1ba06b628c0c3d735b","impliedFormat":99},{"version":"0c0ae4270d48ca75aa6589d0b401cacb71ff10984007b605189314133950aab0","impliedFormat":99},{"version":"0b76313a82deabdf7054919346e58c71b6d257a80a349b3f599de12b378a97d1","signature":"8e609bb71c20b858c77f0e9f90bb1319db8477b13f9f965f1a1e18524bf50881","impliedFormat":99},{"version":"cdcf9ea426ad970f96ac930cd176d5c69c6c24eebd9fc580e1572d6c6a88f62c","impliedFormat":1},{"version":"23cd712e2ce083d68afe69224587438e5914b457b8acf87073c22494d706a3d0","impliedFormat":1},{"version":"156a859e21ef3244d13afeeba4e49760a6afa035c149dda52f0c45ea8903b338","impliedFormat":1},{"version":"d153a11543fd884b596587ccd97aebbeed950b26933ee000f94009f1ab142848","affectsGlobalScope":true,"impliedFormat":1},{"version":"0ccdaa19852d25ecd84eec365c3bfa16e7859cadecf6e9ca6d0dbbbee439743f","affectsGlobalScope":true,"impliedFormat":1},{"version":"438b41419b1df9f1fbe33b5e1b18f5853432be205991d1b19f5b7f351675541e","affectsGlobalScope":true,"impliedFormat":1},{"version":"096116f8fedc1765d5bd6ef360c257b4a9048e5415054b3bf3c41b07f8951b0b","affectsGlobalScope":true,"impliedFormat":1},{"version":"e5e01375c9e124a83b52ee4b3244ed1a4d214a6cfb54ac73e164a823a4a7860a","affectsGlobalScope":true,"impliedFormat":1},{"version":"f90ae2bbce1505e67f2f6502392e318f5714bae82d2d969185c4a6cecc8af2fc","affectsGlobalScope":true,"impliedFormat":1},{"version":"4b58e207b93a8f1c88bbf2a95ddc686ac83962b13830fe8ad3f404ffc7051fb4","affectsGlobalScope":true,"impliedFormat":1},{"version":"1fefabcb2b06736a66d2904074d56268753654805e829989a46a0161cd8412c5","affectsGlobalScope":true,"impliedFormat":1},{"version":"9798340ffb0d067d69b1ae5b32faa17ab31b82466a3fc00d8f2f2df0c8554aaa","affectsGlobalScope":true,"impliedFormat":1},{"version":"c18a99f01eb788d849ad032b31cafd49de0b19e083fe775370834c5675d7df8e","affectsGlobalScope":true,"impliedFormat":1},{"version":"5247874c2a23b9a62d178ae84f2db6a1d54e6c9a2e7e057e178cc5eea13757fc","affectsGlobalScope":true,"impliedFormat":1},{"version":"c3f5289820990ab66b70c7fb5b63cb674001009ff84b13de40619619a9c8175f","affectsGlobalScope":true,"impliedFormat":1},{"version":"b3275d55fac10b799c9546804126239baf020d220136163f763b55a74e50e750","affectsGlobalScope":true,"impliedFormat":1},{"version":"fa68a0a3b7cb32c00e39ee3cd31f8f15b80cac97dce51b6ee7fc14a1e8deb30b","affectsGlobalScope":true,"impliedFormat":1},{"version":"1cf059eaf468efcc649f8cf6075d3cb98e9a35a0fe9c44419ec3d2f5428d7123","affectsGlobalScope":true,"impliedFormat":1},{"version":"6c36e755bced82df7fb6ce8169265d0a7bb046ab4e2cb6d0da0cb72b22033e89","affectsGlobalScope":true,"impliedFormat":1},{"version":"e7721c4f69f93c91360c26a0a84ee885997d748237ef78ef665b153e622b36c1","affectsGlobalScope":true,"impliedFormat":1},{"version":"7a93de4ff8a63bafe62ba86b89af1df0ccb5e40bb85b0c67d6bbcfdcf96bf3d4","affectsGlobalScope":true,"impliedFormat":1},{"version":"90e85f9bc549dfe2b5749b45fe734144e96cd5d04b38eae244028794e142a77e","affectsGlobalScope":true,"impliedFormat":1},{"version":"e0a5deeb610b2a50a6350bd23df6490036a1773a8a71d70f2f9549ab009e67ee","affectsGlobalScope":true,"impliedFormat":1},{"version":"435b3711465425770ed2ee2f1cf00ce071835265e0851a7dc4600ab4b007550e","impliedFormat":1},{"version":"7e49f52a159435fc8df4de9dc377ef5860732ca2dc9efec1640531d3cf5da7a3","impliedFormat":1},{"version":"dd4bde4bdc2e5394aed6855e98cf135dfdf5dd6468cad842e03116d31bbcc9bc","impliedFormat":1},{"version":"4d4e879009a84a47c05350b8dca823036ba3a29a3038efed1be76c9f81e45edf","affectsGlobalScope":true,"impliedFormat":1},{"version":"237ba5ac2a95702a114a309e39c53a5bddff5f6333b325db9764df9b34f3502b","impliedFormat":1},{"version":"9ba13b47cb450a438e3076c4a3f6afb9dc85e17eae50f26d4b2d72c0688c9251","impliedFormat":1},{"version":"b64cd4401633ea4ecadfd700ddc8323a13b63b106ac7127c1d2726f32424622c","impliedFormat":1},{"version":"37c6e5fe5715814412b43cc9b50b24c67a63c4e04e753e0d1305970d65417a60","impliedFormat":1},{"version":"1d024184fb57c58c5c91823f9d10b4915a4867b7934e89115fd0d861a9df27c8","impliedFormat":1},{"version":"ee0e4946247f842c6dd483cbb60a5e6b484fee07996e3a7bc7343dfb68a04c5d","impliedFormat":1},{"version":"ef051f42b7e0ef5ca04552f54c4552eac84099d64b6c5ad0ef4033574b6035b8","impliedFormat":1},{"version":"853a43154f1d01b0173d9cbd74063507ece57170bad7a3b68f3fa1229ad0a92f","impliedFormat":1},{"version":"56231e3c39a031bfb0afb797690b20ed4537670c93c0318b72d5180833d98b72","impliedFormat":1},{"version":"5cc7c39031bfd8b00ad58f32143d59eb6ffc24f5d41a20931269011dccd36c5e","impliedFormat":1},{"version":"b0b69c61b0f0ec8ca15db4c8c41f6e77f4cacb784d42bca948f42dea33e8757e","affectsGlobalScope":true,"impliedFormat":1},{"version":"f96a48183254c00d24575401f1a761b4ce4927d927407e7862a83e06ce5d6964","impliedFormat":1},{"version":"cc25940cfb27aa538e60d465f98bb5068d4d7d33131861ace43f04fe6947d68f","impliedFormat":1},{"version":"f83fb2b1338afbb3f9d733c7d6e8b135826c41b0518867df0c0ace18ae1aa270","impliedFormat":1},{"version":"01ff95aa1443e3f7248974e5a771f513cb2ac158c8898f470a1792f817bee497","impliedFormat":1},{"version":"757227c8b345c57d76f7f0e3bbad7a91ffca23f1b2547cbed9e10025816c9cb7","impliedFormat":1},{"version":"42a05d8f239f74587d4926aba8cc54792eed8e8a442c7adc9b38b516642aadfe","impliedFormat":1},{"version":"5d21b58d60383cc6ab9ad3d3e265d7d25af24a2c9b506247e0e50b0a884920be","impliedFormat":1},{"version":"101f482fd48cb4c7c0468dcc6d62c843d842977aea6235644b1edd05e81fbf22","impliedFormat":1},{"version":"ae6757460f37078884b1571a3de3ebaf724d827d7e1d53626c02b3c2a408ac63","affectsGlobalScope":true,"impliedFormat":1},{"version":"9451a46a89ed209e2e08329e6cac59f89356eae79a7230f916d8cc38725407c7","impliedFormat":1},{"version":"3ef397f12387eff17f550bc484ea7c27d21d43816bbe609d495107f44b97e933","impliedFormat":1},{"version":"1023282e2ba810bc07905d3668349fbd37a26411f0c8f94a70ef3c05fe523fcf","impliedFormat":1},{"version":"b214ebcf76c51b115453f69729ee8aa7b7f8eccdae2a922b568a45c2d7ff52f7","impliedFormat":1},{"version":"429c9cdfa7d126255779efd7e6d9057ced2d69c81859bbab32073bad52e9ba76","impliedFormat":1},{"version":"e236b5eba291f51bdf32c231673e6cab81b5410850e61f51a7a524dddadc0f95","impliedFormat":1},{"version":"f7ba0e839daa0702e3ff1a1a871c0d8ea2d586ce684dd8a72c786c36a680b1d9","affectsGlobalScope":true,"impliedFormat":1},{"version":"7f2c62938251b45715fd2a9887060ec4fbc8724727029d1cbce373747252bdd7","impliedFormat":1},{"version":"e3ace08b6bbd84655d41e244677b474fd995923ffef7149ddb68af8848b60b05","impliedFormat":1},{"version":"132580b0e86c48fab152bab850fc57a4b74fe915c8958d2ccb052b809a44b61c","impliedFormat":1},{"version":"af4ab0aa8908fc9a655bb833d3bc28e117c4f0e1038c5a891546158beb25accb","impliedFormat":1},{"version":"69c9a5a9392e8564bd81116e1ed93b13205201fb44cb35a7fde8c9f9e21c4b23","impliedFormat":1},{"version":"5f8fc37f8434691ffac1bfd8fc2634647da2c0e84253ab5d2dd19a7718915b35","impliedFormat":1},{"version":"5981c2340fd8b076cae8efbae818d42c11ffc615994cb060b1cd390795f1be2b","impliedFormat":1},{"version":"f64deb26664af64dc274637343bde8d82f930c77af05a412c7d310b77207a448","impliedFormat":1},{"version":"ed4f674fc8c0c993cc7e145069ac44129e03519b910c62be206a0cc777bdc60b","affectsGlobalScope":true,"impliedFormat":1},{"version":"0250da3eb85c99624f974e77ef355cdf86f43980251bc371475c2b397ba55bcd","impliedFormat":1},{"version":"f1c93e046fb3d9b7f8249629f4b63dc068dd839b824dd0aa39a5e68476dc9420","impliedFormat":1},{"version":"3d3a5f27ffbc06c885dd4d5f9ee20de61faf877fe2c3a7051c4825903d9a7fdc","impliedFormat":1},{"version":"12806f9f085598ef930edaf2467a5fa1789a878fba077cd27e85dc5851e11834","impliedFormat":1},{"version":"bce309f4d9b67c18d4eeff5bba6cf3e67b2b0aead9f03f75d6060c553974d7ba","impliedFormat":1},{"version":"a43fe41c33d0a192a0ecaf9b92e87bef3709c9972e6d53c42c49251ccb962d69","impliedFormat":1},{"version":"a177959203c017fad3ecc4f3d96c8757a840957a4959a3ae00dab9d35961ca6c","affectsGlobalScope":true,"impliedFormat":1},{"version":"6fc727ccf9b36e257ff982ea0badeffbfc2c151802f741bddff00c6af3b784cf","impliedFormat":1},{"version":"fde38b23ab057617351c1676047d3317f651b1a6d207084e41c056ed158a77f9","impliedFormat":1},{"version":"4844a4c9b4b1e812b257676ed8a80b3f3be0e29bf05e742cc2ea9c3c6865e6c6","impliedFormat":1},{"version":"064878a60367e0407c42fb7ba02a2ea4d83257357dc20088e549bd4d89433e9c","impliedFormat":1},{"version":"14d4bd22d1b05824971b98f7e91b2484c90f1a684805c330476641417c3d9735","impliedFormat":1},{"version":"c3877fef8a43cd434f9728f25a97575b0eb73d92f38b5c87c840daccc3e21d97","impliedFormat":1},{"version":"b484ec11ba00e3a2235562a41898d55372ccabe607986c6fa4f4aba72093749f","impliedFormat":1},{"version":"1dbd83860e7634f9c236647f45dbc5d3c4f9eba8827d87209d6e9826fdf4dbd5","impliedFormat":1},{"version":"41ef7992c555671a8fe54db302788adefa191ded810a50329b79d20a6772d14c","impliedFormat":1},{"version":"041a7781b9127ab568d2cdcce62c58fdea7c7407f40b8c50045d7866a2727130","impliedFormat":1},{"version":"b37f83e7deea729aa9ce5593f78905afb45b7532fdff63041d374f60059e7852","impliedFormat":1},{"version":"e1cb68f3ef3a8dd7b2a9dfb3de482ed6c0f1586ba0db4e7d73c1d2147b6ffc51","impliedFormat":1},{"version":"55cdbeebe76a1fa18bbd7e7bf73350a2173926bd3085bb050cf5a5397025ee4e","impliedFormat":1},{"version":"10ec5e82144dfac6f04fa5d1d6c11763b3e4dbbac6d99101427219ab3e2ae887","impliedFormat":1},{"version":"615754924717c0b1e293e083b83503c0a872717ad5aa60ed7f1a699eb1b4ea5c","impliedFormat":1},{"version":"074de5b2fdead0165a2757e3aaef20f27a6347b1c36adea27d51456795b37682","impliedFormat":1},{"version":"68834d631c8838c715f225509cfc3927913b9cc7a4870460b5b60c8dbdb99baf","impliedFormat":1},{"version":"24371e69a38fc33e268d4a8716dbcda430d6c2c414a99ff9669239c4b8f40dea","impliedFormat":1},{"version":"ccab02f3920fc75c01174c47fcf67882a11daf16baf9e81701d0a94636e94556","impliedFormat":1},{"version":"3e11fce78ad8c0e1d1db4ba5f0652285509be3acdd519529bc8fcef85f7dafd9","impliedFormat":1},{"version":"ea6bc8de8b59f90a7a3960005fd01988f98fd0784e14bc6922dde2e93305ec7d","impliedFormat":1},{"version":"36107995674b29284a115e21a0618c4c2751b32a8766dd4cb3ba740308b16d59","impliedFormat":1},{"version":"914a0ae30d96d71915fc519ccb4efbf2b62c0ddfb3a3fc6129151076bc01dc60","impliedFormat":1},{"version":"9c32412007b5662fd34a8eb04292fb5314ec370d7016d1c2fb8aa193c807fe22","impliedFormat":1},{"version":"7fd1b31fd35876b0aa650811c25ec2c97a3c6387e5473eb18004bed86cdd76b6","impliedFormat":1},{"version":"4d327f7d72ad0918275cea3eee49a6a8dc8114ae1d5b7f3f5d0774de75f7439a","impliedFormat":1},{"version":"6ebe8ebb8659aaa9d1acbf3710d7dae3e923e97610238b9511c25dc39023a166","impliedFormat":1},{"version":"e85d7f8068f6a26710bff0cc8c0fc5e47f71089c3780fbede05857331d2ddec9","impliedFormat":1},{"version":"7befaf0e76b5671be1d47b77fcc65f2b0aad91cc26529df1904f4a7c46d216e9","impliedFormat":1},{"version":"0a60a292b89ca7218b8616f78e5bbd1c96b87e048849469cccb4355e98af959a","impliedFormat":1},{"version":"0b6e25234b4eec6ed96ab138d96eb70b135690d7dd01f3dd8a8ab291c35a683a","impliedFormat":1},{"version":"9666f2f84b985b62400d2e5ab0adae9ff44de9b2a34803c2c5bd3c8325b17dc0","impliedFormat":1},{"version":"40cd35c95e9cf22cfa5bd84e96408b6fcbca55295f4ff822390abb11afbc3dca","impliedFormat":1},{"version":"b1616b8959bf557feb16369c6124a97a0e74ed6f49d1df73bb4b9ddf68acf3f3","impliedFormat":1},{"version":"5b03a034c72146b61573aab280f295b015b9168470f2df05f6080a2122f9b4df","impliedFormat":1},{"version":"40b463c6766ca1b689bfcc46d26b5e295954f32ad43e37ee6953c0a677e4ae2b","impliedFormat":1},{"version":"249b9cab7f5d628b71308c7d9bb0a808b50b091e640ba3ed6e2d0516f4a8d91d","impliedFormat":1},{"version":"80aae6afc67faa5ac0b32b5b8bc8cc9f7fa299cff15cf09cc2e11fd28c6ae29e","impliedFormat":1},{"version":"f473cd2288991ff3221165dcf73cd5d24da30391f87e85b3dd4d0450c787a391","impliedFormat":1},{"version":"499e5b055a5aba1e1998f7311a6c441a369831c70905cc565ceac93c28083d53","impliedFormat":1},{"version":"8aee8b6d4f9f62cf3776cda1305fb18763e2aade7e13cea5bbe699112df85214","impliedFormat":1},{"version":"c63b9ada8c72f95aac5db92aea07e5e87ec810353cdf63b2d78f49a58662cf6c","impliedFormat":1},{"version":"1cc2a09e1a61a5222d4174ab358a9f9de5e906afe79dbf7363d871a7edda3955","impliedFormat":1},{"version":"5d0375ca7310efb77e3ef18d068d53784faf62705e0ad04569597ae0e755c401","impliedFormat":1},{"version":"59af37caec41ecf7b2e76059c9672a49e682c1a2aa6f9d7dc78878f53aa284d6","impliedFormat":1},{"version":"addf417b9eb3f938fddf8d81e96393a165e4be0d4a8b6402292f9c634b1cb00d","impliedFormat":1},{"version":"b64d4d1c5f877f9c666e98e833f0205edb9384acc46e98a1fef344f64d6aba44","impliedFormat":1},{"version":"adf27937dba6af9f08a68c5b1d3fce0ca7d4b960c57e6d6c844e7d1a8e53adae","impliedFormat":1},{"version":"12950411eeab8563b349cb7959543d92d8d02c289ed893d78499a19becb5a8cc","impliedFormat":1},{"version":"2e85db9e6fd73cfa3d7f28e0ab6b55417ea18931423bd47b409a96e4a169e8e6","impliedFormat":1},{"version":"c46e079fe54c76f95c67fb89081b3e399da2c7d109e7dca8e4b58d83e332e605","impliedFormat":1},{"version":"c9381908473a1c92cb8c516b184e75f4d226dad95c3a85a5af35f670064d9a2f","impliedFormat":1},{"version":"9d4a4290a3c4e3a270f0a71562ad4eb4660d570e28ce642b6bd9429844860d38","affectsGlobalScope":true,"impliedFormat":1},{"version":"0d759cc99e081cacd0352467a0c24e979a6ef748329aa6ddea2d789664580201","impliedFormat":1},{"version":"bd85f4135b68382ac505805ba1f527818e3930a61d78614c8c78d050b7287d6a","impliedFormat":1},{"version":"314607151cc203975193d5f44765f38597be3b0a43f466d3c1bfb17176dd3bd3","impliedFormat":1},{"version":"4e7a48d96c485eaafa9250f1e64d875f04eaec933b754728cd8bdd86103c171a","impliedFormat":1},{"version":"f40aad6c91017f20fc542f5701ec41e0f6aeba63c61bbf7aa13266ec29a50a3b","impliedFormat":1},{"version":"fc9e630f9302d0414ccd6c8ed2706659cff5ae454a56560c6122fa4a3fac5bbd","affectsGlobalScope":true,"impliedFormat":1},{"version":"4b150df3a383765413ab569181f5f907d75da6d7df22062567722e4031e066ba","impliedFormat":1},{"version":"0ac74c7586880e26b6a599c710b59284a284e084a2bbc82cd40fb3fbfdea71ae","affectsGlobalScope":true,"impliedFormat":1},{"version":"2ce12357dadbb8efc4e4ec4dab709c8071bf992722fc9adfea2fe0bd5b50923f","impliedFormat":1},{"version":"b5a907deaba678e5083ccdd7cc063a3a8c3413c688098f6de29d6e4cefabc85f","impliedFormat":1},{"version":"ffd344731abee98a0a85a735b19052817afd2156d97d1410819cd9bcd1bd575e","impliedFormat":1},{"version":"475e07c959f4766f90678425b45cf58ac9b95e50de78367759c1e5118e85d5c3","impliedFormat":1},{"version":"a524ae401b30a1b0814f1bbcdae459da97fa30ae6e22476e506bb3f82e3d9456","impliedFormat":1},{"version":"7375e803c033425e27cb33bae21917c106cb37b508fd242cccd978ef2ee244c7","impliedFormat":1},{"version":"eeb890c7e9218afdad2f30ad8a76b0b0b5161d11ce13b6723879de408e6bc47a","impliedFormat":1},{"version":"998da6b85ebace9ebea67040dd1a640f0156064e3d28dbe9bd9c0229b6f72347","impliedFormat":1},{"version":"00a196792eed6e9b7f988db0d3ced11a94ecd1e258fd19124ce89fe7642df35a","affectsGlobalScope":true,"impliedFormat":1},{"version":"dc6ce3e0a0bcd06ea3788fdc3475cedb048ea2e06282ae21b8ccd54a6a7062f8","affectsGlobalScope":true,"impliedFormat":1},{"version":"6b386c7b6ce6f369d18246904fa5eac73566167c88fb6508feba74fa7501a384","affectsGlobalScope":true,"impliedFormat":1},{"version":"592a109e67b907ffd2078cd6f727d5c326e06eaada169eef8fb18546d96f6797","impliedFormat":1},{"version":"f2eb1e35cae499d57e34b4ac3650248776fe7dbd9a3ec34b23754cfd8c22fceb","impliedFormat":1},{"version":"cbbd9a45e9ac79f13a0135b82dc5698f3fb601c22b7246e05d407cd11b2e10c7","impliedFormat":1},{"version":"9e98bd421e71f70c75dae7029e316745c89fa7b8bc8b43a91adf9b82c206099c","impliedFormat":1},{"version":"fc803e6b01f4365f71f51f9ce13f71396766848204d4f7a1b2b6154434b84b15","impliedFormat":1},{"version":"f3afcc0d6f77a9ca2d2c5c92eb4b89cd38d6fa4bdc1410d626bd701760a977ec","impliedFormat":1},{"version":"c8109fe76467db6e801d0edfbc50e6826934686467c9418ce6b246232ce7f109","affectsGlobalScope":true,"impliedFormat":1},{"version":"e6f803e4e45915d58e721c04ec17830c6e6678d1e3e00e28edf3d52720909cea","affectsGlobalScope":true,"impliedFormat":1},{"version":"37be812b06e518320ba82e2aff3ac2ca37370a9df917db708f081b9043fa3315","impliedFormat":1}],"root":[[76,85]],"options":{"composite":true,"declaration":true,"declarationMap":true,"esModuleInterop":true,"importHelpers":true,"inlineSources":true,"isolatedDeclarations":true,"module":199,"noFallthroughCasesInSwitch":true,"noImplicitOverride":true,"noUncheckedIndexedAccess":true,"noUnusedLocals":true,"noUnusedParameters":true,"outDir":"./","preserveConstEnums":true,"rootDir":"../src","skipDefaultLibCheck":true,"skipLibCheck":true,"sourceMap":true,"strict":true,"target":11,"tsBuildInfoFile":"./.tsbuildinfo","verbatimModuleSyntax":true},"referencedMap":[[236,1],[109,2],[110,2],[111,3],[91,4],[112,5],[113,6],[114,7],[89,8],[115,9],[116,10],[117,11],[118,12],[119,13],[120,14],[121,14],[122,15],[123,16],[124,17],[125,18],[92,8],[90,8],[126,19],[127,20],[128,21],[168,22],[129,23],[130,24],[131,23],[132,25],[133,26],[134,27],[135,28],[136,28],[137,28],[138,29],[139,30],[140,31],[141,32],[142,33],[143,34],[144,34],[145,35],[146,8],[147,8],[148,36],[149,37],[150,36],[151,38],[152,39],[153,40],[154,41],[155,42],[156,43],[157,44],[158,45],[159,46],[160,47],[161,48],[162,49],[163,50],[164,51],[165,52],[93,23],[94,8],[95,53],[96,54],[97,8],[98,55],[99,8],[100,56],[101,57],[102,58],[103,58],[104,59],[105,8],[106,60],[107,61],[108,57],[166,62],[167,63],[212,64],[234,8],[233,8],[227,65],[214,66],[213,8],[210,56],[215,8],[208,67],[216,8],[235,68],[217,8],[211,8],[226,69],[228,70],[209,71],[232,72],[230,73],[229,74],[231,75],[218,8],[224,76],[221,77],[223,78],[222,79],[220,80],[219,8],[225,81],[75,82],[74,8],[73,83],[72,8],[70,8],[71,8],[13,8],[12,8],[2,8],[14,8],[15,8],[16,8],[17,8],[18,8],[19,8],[20,8],[21,8],[3,8],[22,8],[23,8],[4,8],[24,8],[28,8],[25,8],[26,8],[27,8],[29,8],[30,8],[31,8],[5,8],[32,8],[33,8],[34,8],[35,8],[6,8],[39,8],[36,8],[37,8],[38,8],[40,8],[7,8],[41,8],[46,8],[47,8],[42,8],[43,8],[44,8],[45,8],[8,8],[51,8],[48,8],[49,8],[50,8],[52,8],[9,8],[53,8],[54,8],[55,8],[57,8],[56,8],[58,8],[59,8],[10,8],[60,8],[61,8],[62,8],[11,8],[63,8],[64,8],[65,8],[66,8],[67,8],[1,8],[68,8],[69,8],[184,84],[196,85],[181,86],[197,87],[206,88],[172,89],[173,90],[171,91],[205,92],[200,93],[204,94],[175,95],[193,96],[174,97],[203,98],[169,99],[170,93],[176,100],[177,8],[183,101],[180,100],[87,102],[207,103],[198,104],[187,105],[186,100],[188,106],[191,107],[185,108],[189,109],[201,92],[178,110],[179,111],[192,112],[88,87],[195,113],[194,100],[182,111],[190,114],[199,8],[86,8],[202,115],[79,116],[78,117],[80,118],[76,119],[84,120],[77,121],[81,117],[85,122],[82,117],[83,117]],"latestChangedDtsFile":"./normalize-intervals.test.d.ts","version":"5.9.3"}
|
|
@@ -8,4 +8,4 @@ import type { Interval } from "./interval.js";
|
|
|
8
8
|
* @returns Whether the intervals overlap.
|
|
9
9
|
*/
|
|
10
10
|
export declare function areIntervalsOverlapping<T extends TemporalComparable>(intervalLeft: Interval<T>, intervalRight: Interval<T>): boolean;
|
|
11
|
-
//# sourceMappingURL=
|
|
11
|
+
//# sourceMappingURL=are-intervals-overlapping.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"are-intervals-overlapping.d.ts","sourceRoot":"","sources":["../src/are-intervals-overlapping.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,kBAAkB,EAAE,MAAM,kBAAkB,CAAC;AAC3D,OAAO,KAAK,EAAE,QAAQ,EAAE,MAAM,eAAe,CAAC;AAG9C;;;;;;GAMG;AACH,wBAAgB,uBAAuB,CAAC,CAAC,SAAS,kBAAkB,EAClE,YAAY,EAAE,QAAQ,CAAC,CAAC,CAAC,EACzB,aAAa,EAAE,QAAQ,CAAC,CAAC,CAAC,GACzB,OAAO,CAaT"}
|
|
@@ -12,4 +12,4 @@ export function areIntervalsOverlapping(intervalLeft, intervalRight) {
|
|
|
12
12
|
return (compareTemporals(leftStartTime, rightEndTime) === -1 &&
|
|
13
13
|
compareTemporals(rightStartTime, leftEndTime) === -1);
|
|
14
14
|
}
|
|
15
|
-
//# sourceMappingURL=
|
|
15
|
+
//# sourceMappingURL=are-intervals-overlapping.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"are-intervals-overlapping.js","sourceRoot":"","sources":["../src/are-intervals-overlapping.ts"],"names":[],"mappings":"AAEA,OAAO,EAAE,gBAAgB,EAAE,WAAW,EAAE,MAAM,kBAAkB,CAAC;AAEjE;;;;;;GAMG;AACH,MAAM,UAAU,uBAAuB,CACrC,YAAyB,EACzB,aAA0B;IAE1B,MAAM,CAAC,aAAa,EAAE,WAAW,CAAC,GAAG,WAAW,CAC9C,YAAY,CAAC,KAAK,EAClB,YAAY,CAAC,GAAG,CACjB,CAAC;IACF,MAAM,CAAC,cAAc,EAAE,YAAY,CAAC,GAAG,WAAW,CAChD,aAAa,CAAC,KAAK,EACnB,aAAa,CAAC,GAAG,CAClB,CAAC;IACF,OAAO,CACL,gBAAgB,CAAC,aAAa,EAAE,YAAY,CAAC,KAAK,CAAC,CAAC;QACpD,gBAAgB,CAAC,cAAc,EAAE,WAAW,CAAC,KAAK,CAAC,CAAC,CACrD,CAAC;AACJ,CAAC","sourcesContent":["import type { TemporalComparable } from \"./comparators.js\";\nimport type { Interval } from \"./interval.js\";\nimport { compareTemporals, sortedTuple } from \"./comparators.js\";\n\n/**\n * Checks if two intervals overlap.\n *\n * @param intervalLeft - The left interval.\n * @param intervalRight - The right interval.\n * @returns Whether the intervals overlap.\n */\nexport function areIntervalsOverlapping<T extends TemporalComparable>(\n intervalLeft: Interval<T>,\n intervalRight: Interval<T>,\n): boolean {\n const [leftStartTime, leftEndTime] = sortedTuple(\n intervalLeft.start,\n intervalLeft.end,\n );\n const [rightStartTime, rightEndTime] = sortedTuple(\n intervalRight.start,\n intervalRight.end,\n );\n return (\n compareTemporals(leftStartTime, rightEndTime) === -1 &&\n compareTemporals(rightStartTime, leftEndTime) === -1\n );\n}\n"]}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"are-intervals-overlapping.test.d.ts","sourceRoot":"","sources":["../src/are-intervals-overlapping.test.ts"],"names":[],"mappings":""}
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
+
import { describe, expect, test } from "bun:test";
|
|
1
2
|
import { Temporal } from "temporal-polyfill";
|
|
2
|
-
import {
|
|
3
|
-
import { areIntervalsOverlapping } from "./areIntervalsOverlapping.js";
|
|
3
|
+
import { areIntervalsOverlapping } from "./are-intervals-overlapping.js";
|
|
4
4
|
describe("areIntervalsOverlapping", () => {
|
|
5
5
|
const base = {
|
|
6
6
|
start: Temporal.ZonedDateTime.from("2023-10-01T10:00:00Z[UTC]"),
|
|
@@ -10,8 +10,8 @@ describe("areIntervalsOverlapping", () => {
|
|
|
10
10
|
start: Temporal.ZonedDateTime.from("2023-10-01T12:00:00Z[UTC]"),
|
|
11
11
|
end: Temporal.ZonedDateTime.from("2023-10-02T12:00:00Z[UTC]"),
|
|
12
12
|
};
|
|
13
|
-
|
|
13
|
+
test("should return true when the intervals overlap", () => {
|
|
14
14
|
expect(areIntervalsOverlapping(base, overlaps)).toBe(true);
|
|
15
15
|
});
|
|
16
16
|
});
|
|
17
|
-
//# sourceMappingURL=
|
|
17
|
+
//# sourceMappingURL=are-intervals-overlapping.test.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"are-intervals-overlapping.test.js","sourceRoot":"","sources":["../src/are-intervals-overlapping.test.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,QAAQ,EAAE,MAAM,EAAE,IAAI,EAAE,MAAM,UAAU,CAAC;AAClD,OAAO,EAAE,QAAQ,EAAE,MAAM,mBAAmB,CAAC;AAC7C,OAAO,EAAE,uBAAuB,EAAE,MAAM,gCAAgC,CAAC;AAEzE,QAAQ,CAAC,yBAAyB,EAAE,GAAG,EAAE;IACvC,MAAM,IAAI,GAAG;QACX,KAAK,EAAE,QAAQ,CAAC,aAAa,CAAC,IAAI,CAAC,2BAA2B,CAAC;QAC/D,GAAG,EAAE,QAAQ,CAAC,aAAa,CAAC,IAAI,CAAC,2BAA2B,CAAC;KAC9D,CAAC;IACF,MAAM,QAAQ,GAAG;QACf,KAAK,EAAE,QAAQ,CAAC,aAAa,CAAC,IAAI,CAAC,2BAA2B,CAAC;QAC/D,GAAG,EAAE,QAAQ,CAAC,aAAa,CAAC,IAAI,CAAC,2BAA2B,CAAC;KAC9D,CAAC;IAEF,IAAI,CAAC,+CAA+C,EAAE,GAAG,EAAE;QACzD,MAAM,CAAC,uBAAuB,CAAC,IAAI,EAAE,QAAQ,CAAC,CAAC,CAAC,IAAI,CAAC,IAAI,CAAC,CAAC;IAC7D,CAAC,CAAC,CAAC;AACL,CAAC,CAAC,CAAC","sourcesContent":["import { describe, expect, test } from \"bun:test\";\nimport { Temporal } from \"temporal-polyfill\";\nimport { areIntervalsOverlapping } from \"./are-intervals-overlapping.js\";\n\ndescribe(\"areIntervalsOverlapping\", () => {\n const base = {\n start: Temporal.ZonedDateTime.from(\"2023-10-01T10:00:00Z[UTC]\"),\n end: Temporal.ZonedDateTime.from(\"2023-10-02T10:00:00Z[UTC]\"),\n };\n const overlaps = {\n start: Temporal.ZonedDateTime.from(\"2023-10-01T12:00:00Z[UTC]\"),\n end: Temporal.ZonedDateTime.from(\"2023-10-02T12:00:00Z[UTC]\"),\n };\n\n test(\"should return true when the intervals overlap\", () => {\n expect(areIntervalsOverlapping(base, overlaps)).toBe(true);\n });\n});\n"]}
|
package/dist/comparators.js
CHANGED
|
@@ -1,11 +1,11 @@
|
|
|
1
1
|
import { Temporal } from "temporal-polyfill";
|
|
2
2
|
export const getTemporalType = (value) => value[Symbol.toStringTag];
|
|
3
3
|
export const TEMPORAL_COMPARATORS = {
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
4
|
+
"Temporal.PlainDate": (a, b) => Temporal.PlainDate.compare(a, b),
|
|
5
|
+
"Temporal.Instant": (a, b) => Temporal.Instant.compare(a, b),
|
|
6
|
+
"Temporal.PlainDateTime": (a, b) => Temporal.PlainDateTime.compare(a, b),
|
|
7
|
+
"Temporal.ZonedDateTime": (a, b) => Temporal.ZonedDateTime.compare(a, b),
|
|
8
|
+
"Temporal.PlainTime": (a, b) => Temporal.PlainTime.compare(a, b),
|
|
9
9
|
};
|
|
10
10
|
export const compareTemporals = (a, b) => TEMPORAL_COMPARATORS[a[Symbol.toStringTag]](a, b);
|
|
11
11
|
export const sortedTuple = (a, b) => {
|
package/dist/comparators.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"comparators.js","sourceRoot":"","sources":["../src/comparators.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,QAAQ,EAAE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C,CAAC,EAAE,CAAC,CAAC,CAAC;AAE/E,MAAM,CAAC,MAAM,WAAW,GAAG,CACzB,CAAI,EACJ,CAAI,EACI,EAAE;IACV,OAAO,gBAAgB,CAAC,CAAC,EAAE,CAAC,CAAC,KAAK,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,EAAE,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,EAAE,CAAC,CAAC,CAAC;AACxD,CAAC,CAAC","sourcesContent":["import { Temporal } from \"temporal-polyfill\";\n\n/**\n * A temporal type that can be compared to itself.\n */\nexport type TemporalComparable =\n | Temporal.PlainDate\n | Temporal.Instant\n | Temporal.PlainDateTime\n | Temporal.PlainTime\n | Temporal.ZonedDateTime;\n\nexport type TemporalComparableStringTag =\n TemporalComparable[typeof Symbol.toStringTag];\n\ntype TemporalComparableWithStringTag<T extends TemporalComparableStringTag> =\n TemporalComparable & {\n [Symbol.toStringTag]: T;\n };\n\nexport const getTemporalType = (\n value: TemporalComparable,\n): TemporalComparableStringTag => value[Symbol.toStringTag];\n\nexport type TemporalComparator<T extends TemporalComparable> = (\n a: T,\n b: T,\n) => -1 | 0 | 1;\n\nexport const TEMPORAL_COMPARATORS: {\n [TTag in TemporalComparableStringTag]: TemporalComparator<\n TemporalComparableWithStringTag<TTag>\n >;\n} = {\n \"Temporal.PlainDate\": (a, b) => Temporal.PlainDate.compare(a, b),\n \"Temporal.Instant\": (a, b) => Temporal.Instant.compare(a, b),\n \"Temporal.PlainDateTime\": (a, b) => Temporal.PlainDateTime.compare(a, b),\n \"Temporal.ZonedDateTime\": (a, b) => Temporal.ZonedDateTime.compare(a, b),\n \"Temporal.PlainTime\": (a, b) => Temporal.PlainTime.compare(a, b),\n};\n\nexport const compareTemporals = <T extends TemporalComparable>(\n a: T,\n b: T,\n): -1 | 0 | 1 =>\n (TEMPORAL_COMPARATORS[a[Symbol.toStringTag]] as TemporalComparator<T>)(a, b);\n\nexport const sortedTuple = <T extends TemporalComparable>(\n a: T,\n b: T,\n): [T, T] => {\n return compareTemporals(a, b) === 1 ? [b, a] : [a, b];\n};\n"]}
|
package/dist/comparators.test.js
CHANGED
|
@@ -1,18 +1,18 @@
|
|
|
1
|
+
import { describe, expect, test } from "bun:test";
|
|
1
2
|
import { Temporal } from "temporal-polyfill";
|
|
2
|
-
import { describe, expect, it } from "vitest";
|
|
3
3
|
import { sortedTuple } from "./comparators.js";
|
|
4
4
|
describe("sortedTuple for ZonedDateTime", () => {
|
|
5
|
-
|
|
5
|
+
test("should return 0 for equal ZonedDateTime instances", () => {
|
|
6
6
|
const dateTime1 = Temporal.ZonedDateTime.from("2023-10-01T10:00:00Z[UTC]");
|
|
7
7
|
const dateTime2 = Temporal.ZonedDateTime.from("2023-10-01T10:00:00Z[UTC]");
|
|
8
8
|
expect(sortedTuple(dateTime1, dateTime2)).toEqual([dateTime1, dateTime2]);
|
|
9
9
|
});
|
|
10
|
-
|
|
10
|
+
test("should return -1 for an earlier ZonedDateTime", () => {
|
|
11
11
|
const dateTime1 = Temporal.ZonedDateTime.from("2023-10-01T09:00:00Z[UTC]");
|
|
12
12
|
const dateTime2 = Temporal.ZonedDateTime.from("2023-10-01T10:00:00Z[UTC]");
|
|
13
13
|
expect(sortedTuple(dateTime1, dateTime2)).toEqual([dateTime1, dateTime2]);
|
|
14
14
|
});
|
|
15
|
-
|
|
15
|
+
test("should return 1 for a later ZonedDateTime", () => {
|
|
16
16
|
const dateTime1 = Temporal.ZonedDateTime.from("2023-10-01T11:00:00Z[UTC]");
|
|
17
17
|
const dateTime2 = Temporal.ZonedDateTime.from("2023-10-01T10:00:00Z[UTC]");
|
|
18
18
|
expect(sortedTuple(dateTime1, dateTime2)).toEqual([dateTime2, dateTime1]);
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"comparators.test.js","sourceRoot":"","sources":["../src/comparators.test.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,QAAQ,EAAE,MAAM,
|
|
1
|
+
{"version":3,"file":"comparators.test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,EAAE,SAAS,CAAC,CAAC,CAAC,OAAO,CAAC,CAAC,SAAS,EAAE,SAAS,CAAC,CAAC,CAAC;IAC5E,CAAC,CAAC,CAAC;AACL,CAAC,CAAC,CAAC","sourcesContent":["import { describe, expect, test } from \"bun:test\";\nimport { Temporal } from \"temporal-polyfill\";\nimport { sortedTuple } from \"./comparators.js\";\n\ndescribe(\"sortedTuple for ZonedDateTime\", () => {\n test(\"should return 0 for equal ZonedDateTime instances\", () => {\n const dateTime1 = Temporal.ZonedDateTime.from(\"2023-10-01T10:00:00Z[UTC]\");\n const dateTime2 = Temporal.ZonedDateTime.from(\"2023-10-01T10:00:00Z[UTC]\");\n expect(sortedTuple(dateTime1, dateTime2)).toEqual([dateTime1, dateTime2]);\n });\n\n test(\"should return -1 for an earlier ZonedDateTime\", () => {\n const dateTime1 = Temporal.ZonedDateTime.from(\"2023-10-01T09:00:00Z[UTC]\");\n const dateTime2 = Temporal.ZonedDateTime.from(\"2023-10-01T10:00:00Z[UTC]\");\n expect(sortedTuple(dateTime1, dateTime2)).toEqual([dateTime1, dateTime2]);\n });\n\n test(\"should return 1 for a later ZonedDateTime\", () => {\n const dateTime1 = Temporal.ZonedDateTime.from(\"2023-10-01T11:00:00Z[UTC]\");\n const dateTime2 = Temporal.ZonedDateTime.from(\"2023-10-01T10:00:00Z[UTC]\");\n expect(sortedTuple(dateTime1, dateTime2)).toEqual([dateTime2, dateTime1]);\n });\n});\n"]}
|
package/dist/index.d.ts
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
export * from "./
|
|
1
|
+
export * from "./are-intervals-overlapping.js";
|
|
2
2
|
export * from "./comparators.js";
|
|
3
3
|
export * from "./interval.js";
|
|
4
|
-
export * from "./
|
|
5
|
-
export * from "./
|
|
6
|
-
export * from "./
|
|
4
|
+
export * from "./is-within-interval.js";
|
|
5
|
+
export * from "./normalize-intervals.js";
|
|
6
|
+
export * from "./sort-interval.js";
|
|
7
7
|
//# sourceMappingURL=index.d.ts.map
|
package/dist/index.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA,cAAc,
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA,cAAc,gCAAgC,CAAC;AAC/C,cAAc,kBAAkB,CAAC;AACjC,cAAc,eAAe,CAAC;AAC9B,cAAc,yBAAyB,CAAC;AACxC,cAAc,0BAA0B,CAAC;AACzC,cAAc,oBAAoB,CAAC"}
|
package/dist/index.js
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
export * from "./
|
|
1
|
+
export * from "./are-intervals-overlapping.js";
|
|
2
2
|
export * from "./comparators.js";
|
|
3
3
|
export * from "./interval.js";
|
|
4
|
-
export * from "./
|
|
5
|
-
export * from "./
|
|
6
|
-
export * from "./
|
|
4
|
+
export * from "./is-within-interval.js";
|
|
5
|
+
export * from "./normalize-intervals.js";
|
|
6
|
+
export * from "./sort-interval.js";
|
|
7
7
|
//# sourceMappingURL=index.js.map
|
package/dist/index.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA,cAAc,
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA,cAAc,gCAAgC,CAAC;AAC/C,cAAc,kBAAkB,CAAC;AACjC,cAAc,eAAe,CAAC;AAC9B,cAAc,yBAAyB,CAAC;AACxC,cAAc,0BAA0B,CAAC;AACzC,cAAc,oBAAoB,CAAC","sourcesContent":["export * from \"./are-intervals-overlapping.js\";\nexport * from \"./comparators.js\";\nexport * from \"./interval.js\";\nexport * from \"./is-within-interval.js\";\nexport * from \"./normalize-intervals.js\";\nexport * from \"./sort-interval.js\";\n"]}
|
|
@@ -1,4 +1,4 @@
|
|
|
1
1
|
import type { TemporalComparable } from "./comparators.js";
|
|
2
2
|
import type { Interval } from "./interval.js";
|
|
3
3
|
export declare function isWithinInterval<T extends TemporalComparable>(value: T, interval: Interval<T>): boolean;
|
|
4
|
-
//# sourceMappingURL=
|
|
4
|
+
//# sourceMappingURL=is-within-interval.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"is-within-interval.d.ts","sourceRoot":"","sources":["../src/is-within-interval.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,kBAAkB,EAAE,MAAM,kBAAkB,CAAC;AAC3D,OAAO,KAAK,EAAE,QAAQ,EAAE,MAAM,eAAe,CAAC;AAG9C,wBAAgB,gBAAgB,CAAC,CAAC,SAAS,kBAAkB,EAC3D,KAAK,EAAE,CAAC,EACR,QAAQ,EAAE,QAAQ,CAAC,CAAC,CAAC,GACpB,OAAO,CAMT"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"is-within-interval.js","sourceRoot":"","sources":["../src/is-within-interval.ts"],"names":[],"mappings":"AAEA,OAAO,EAAE,gBAAgB,EAAE,WAAW,EAAE,MAAM,kBAAkB,CAAC;AAEjE,MAAM,UAAU,gBAAgB,CAC9B,KAAQ,EACR,QAAqB;IAErB,MAAM,CAAC,SAAS,EAAE,OAAO,CAAC,GAAG,WAAW,CAAC,QAAQ,CAAC,KAAK,EAAE,QAAQ,CAAC,GAAG,CAAC,CAAC;IACvE,OAAO,CACL,gBAAgB,CAAC,KAAK,EAAE,SAAS,CAAC,IAAI,CAAC;QACvC,gBAAgB,CAAC,KAAK,EAAE,OAAO,CAAC,IAAI,CAAC,CACtC,CAAC;AACJ,CAAC","sourcesContent":["import type { TemporalComparable } from \"./comparators.js\";\nimport type { Interval } from \"./interval.js\";\nimport { compareTemporals, sortedTuple } from \"./comparators.js\";\n\nexport function isWithinInterval<T extends TemporalComparable>(\n value: T,\n interval: Interval<T>,\n): boolean {\n const [startTime, endTime] = sortedTuple(interval.start, interval.end);\n return (\n compareTemporals(value, startTime) >= 0 &&\n compareTemporals(value, endTime) <= 0\n );\n}\n"]}
|
|
@@ -6,4 +6,4 @@ import type { Interval } from "./interval.js";
|
|
|
6
6
|
* @param intervals - The intervals to normalize.
|
|
7
7
|
*/
|
|
8
8
|
export declare const normalizeIntervals: <T extends TemporalComparable>(intervals: Interval<T>[]) => Interval<T>[];
|
|
9
|
-
//# sourceMappingURL=
|
|
9
|
+
//# sourceMappingURL=normalize-intervals.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"normalize-intervals.d.ts","sourceRoot":"","sources":["../src/normalize-intervals.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,kBAAkB,EAAE,MAAM,kBAAkB,CAAC;AAC3D,OAAO,KAAK,EAAE,QAAQ,EAAE,MAAM,eAAe,CAAC;AAG9C;;;;GAIG;AACH,eAAO,MAAM,kBAAkB,GAAI,CAAC,SAAS,kBAAkB,EAC7D,WAAW,QAAQ,CAAC,CAAC,CAAC,EAAE,KACvB,QAAQ,CAAC,CAAC,CAAC,EAmCb,CAAC"}
|
|
@@ -5,7 +5,7 @@ import { compareTemporals } from "./comparators.js";
|
|
|
5
5
|
* @param intervals - The intervals to normalize.
|
|
6
6
|
*/
|
|
7
7
|
export const normalizeIntervals = (intervals) => {
|
|
8
|
-
const sortedIntervals = intervals.
|
|
8
|
+
const sortedIntervals = intervals.toSorted((a, b) => compareTemporals(a.start, b.start));
|
|
9
9
|
const firstInterval = sortedIntervals[0];
|
|
10
10
|
if (!firstInterval) {
|
|
11
11
|
return [];
|
|
@@ -33,4 +33,4 @@ export const normalizeIntervals = (intervals) => {
|
|
|
33
33
|
normalizedRanges.push(currentRange);
|
|
34
34
|
return normalizedRanges;
|
|
35
35
|
};
|
|
36
|
-
//# sourceMappingURL=
|
|
36
|
+
//# sourceMappingURL=normalize-intervals.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"normalize-interv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AAgB,CAAC,IAAI,CAAC,YAAY,CAAC,CAAC;IAEpC,OAAO,gBAAgB,CAAC;AAC1B,CAAC,CAAC","sourcesContent":["import type { TemporalComparable } from \"./comparators.js\";\nimport type { Interval } from \"./interval.js\";\nimport { compareTemporals } from \"./comparators.js\";\n\n/**\n * Normalizes the ranges by combining overlapping ranges and sorting them.\n *\n * @param intervals - The intervals to normalize.\n */\nexport const normalizeIntervals = <T extends TemporalComparable>(\n intervals: Interval<T>[],\n): Interval<T>[] => {\n const sortedIntervals = intervals.toSorted((a, b) =>\n compareTemporals<T>(a.start, b.start),\n );\n const firstInterval = sortedIntervals[0];\n if (!firstInterval) {\n return [];\n }\n\n const normalizedRanges: Interval<T>[] = [];\n let currentRange: Interval<T> = firstInterval;\n\n for (let i = 1; i < sortedIntervals.length; i++) {\n const nextRange = sortedIntervals[i];\n if (!nextRange) {\n break;\n }\n\n if (compareTemporals(nextRange.start, currentRange.end) <= 0) {\n currentRange = {\n start: currentRange.start,\n end:\n compareTemporals(currentRange.end, nextRange.end) <= 0\n ? nextRange.end\n : currentRange.end,\n };\n } else {\n normalizedRanges.push(currentRange);\n currentRange = nextRange;\n }\n }\n\n normalizedRanges.push(currentRange);\n\n return normalizedRanges;\n};\n"]}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"normalize-intervals.test.d.ts","sourceRoot":"","sources":["../src/normalize-intervals.test.ts"],"names":[],"mappings":""}
|
|
@@ -1,23 +1,23 @@
|
|
|
1
|
+
import { describe, expect, test } from "bun:test";
|
|
1
2
|
import { Temporal } from "temporal-polyfill";
|
|
2
|
-
import {
|
|
3
|
-
import { normalizeIntervals } from "./normalizeIntervals.js";
|
|
3
|
+
import { normalizeIntervals } from "./normalize-intervals.js";
|
|
4
4
|
const toPlainTimeIntervals = (ranges) => ranges.map(({ start, end }) => ({
|
|
5
5
|
start: Temporal.PlainTime.from(start),
|
|
6
6
|
end: Temporal.PlainTime.from(end),
|
|
7
7
|
}));
|
|
8
8
|
describe("normalizeIntervals", () => {
|
|
9
|
-
|
|
9
|
+
test("should return an empty array when given an empty array", () => {
|
|
10
10
|
const result = normalizeIntervals([]);
|
|
11
11
|
expect(result).toEqual([]);
|
|
12
12
|
});
|
|
13
|
-
|
|
13
|
+
test("should return the same range when given a single range", () => {
|
|
14
14
|
const input = toPlainTimeIntervals([
|
|
15
15
|
{ start: "09:00", end: "17:00" },
|
|
16
16
|
]);
|
|
17
17
|
const result = normalizeIntervals(input);
|
|
18
18
|
expect(result).toEqual(input);
|
|
19
19
|
});
|
|
20
|
-
|
|
20
|
+
test("should combine overlapping ranges", () => {
|
|
21
21
|
const input = toPlainTimeIntervals([
|
|
22
22
|
{ start: "09:00", end: "12:00" },
|
|
23
23
|
{ start: "11:00", end: "14:00" },
|
|
@@ -27,7 +27,7 @@ describe("normalizeIntervals", () => {
|
|
|
27
27
|
const result = normalizeIntervals(input);
|
|
28
28
|
expect(result).toEqual(expected);
|
|
29
29
|
});
|
|
30
|
-
|
|
30
|
+
test("should not combine non-overlapping ranges", () => {
|
|
31
31
|
const input = toPlainTimeIntervals([
|
|
32
32
|
{ start: "09:00", end: "11:00" },
|
|
33
33
|
{ start: "13:00", end: "15:00" },
|
|
@@ -41,7 +41,7 @@ describe("normalizeIntervals", () => {
|
|
|
41
41
|
const result = normalizeIntervals(input);
|
|
42
42
|
expect(result).toEqual(expected);
|
|
43
43
|
});
|
|
44
|
-
|
|
44
|
+
test("should sort ranges by start time", () => {
|
|
45
45
|
const input = toPlainTimeIntervals([
|
|
46
46
|
{ start: "13:00", end: "15:00" },
|
|
47
47
|
{ start: "09:00", end: "11:00" },
|
|
@@ -55,7 +55,7 @@ describe("normalizeIntervals", () => {
|
|
|
55
55
|
const result = normalizeIntervals(input);
|
|
56
56
|
expect(result).toEqual(expected);
|
|
57
57
|
});
|
|
58
|
-
|
|
58
|
+
test("should handle adjacent ranges", () => {
|
|
59
59
|
const input = toPlainTimeIntervals([
|
|
60
60
|
{ start: "09:00", end: "11:00" },
|
|
61
61
|
{ start: "11:00", end: "13:00" },
|
|
@@ -65,7 +65,7 @@ describe("normalizeIntervals", () => {
|
|
|
65
65
|
const result = normalizeIntervals(input);
|
|
66
66
|
expect(result).toEqual(expected);
|
|
67
67
|
});
|
|
68
|
-
|
|
68
|
+
test("works with contained ranges", () => {
|
|
69
69
|
const input = toPlainTimeIntervals([
|
|
70
70
|
{ start: "09:00", end: "17:00" },
|
|
71
71
|
{ start: "12:00", end: "14:00" }, // Overlapping range
|
|
@@ -79,4 +79,4 @@ describe("normalizeIntervals", () => {
|
|
|
79
79
|
expect(result).toEqual(expected);
|
|
80
80
|
});
|
|
81
81
|
});
|
|
82
|
-
//# sourceMappingURL=
|
|
82
|
+
//# sourceMappingURL=normalize-intervals.test.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"normalize-intervals.test.js","sourceRoot":"","sources":["../src/normalize-intervals.test.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,QAAQ,EAAE,MAAM,EAAE,IAAI,EAAE,MAAM,UAAU,CAAC;AAClD,OAAO,EAAE,QAAQ,EAAE,MAAM,mBAAmB,CAAC;AAC7C,OAAO,EAAE,kBAAkB,EAAE,MAAM,0BAA0B,CAAC;AAE9D,MAAM,oBAAoB,GAAG,CAC3B,MAAwC,EACR,EAAE,CAClC,MAAM,CAAC,GAAG,CAAC,CAAC,EAAE,KAAK,EAAE,GAAG,EAAE,EAAE,EAAE,CAAC,CAAC;IAC9B,KAAK,EAAE,QAAQ,CAAC,SAAS,CAAC,IAAI,CAAC,KAAK,CAAC;IACrC,GAAG,EAAE,QAAQ,CAAC,SAAS,CAAC,IAAI,CAAC,GAAG,CAAC;CAClC,CAAC,CAAC,CAAC;AAEN,QAAQ,CAAC,oBAAoB,EAAE,GAAG,EAAE;IAClC,IAAI,CAAC,wDAAwD,EAAE,GAAG,EAAE;QAClE,MAAM,MAAM,GAAG,kBAAkB,CAAC,EAAE,CAAC,CAAC;QACtC,MAA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AO,EAAE;YAChC,EAAE,KAAK,EAAE,OAAO,EAAE,GAAG,EAAE,OAAO,EAAE;SACjC,CAAC,CAAC;QACH,MAAM,QAAQ,GAAG,oBAAoB,CAAC,CAAC,EAAE,KAAK,EAAE,OAAO,EAAE,GAAG,EAAE,OAAO,EAAE,CAAC,CAAC,CAAC;QAC1E,MAAM,MAAM,GAAG,kBAAkB,CAAC,KAAK,CAAC,CAAC;QACzC,MAAM,CAAC,MAAM,CAAC,CAAC,OAAO,CAAC,QAAQ,CAAC,CAAC;IACnC,CAAC,CAAC,CAAC;IAEH,IAAI,CAAC,6BAA6B,EAAE,GAAG,EAAE;QACvC,MAAM,KAAK,GAAG,oBAAoB,CAAC;YACjC,EAAE,KAAK,EAAE,OAAO,EAAE,GAAG,EAAE,OAAO,EAAE;YAChC,EAAE,KAAK,EAAE,OAAO,EAAE,GAAG,EAAE,OAAO,EAAE,EAAE,oBAAoB;YACtD,EAAE,KAAK,EAAE,OAAO,EAAE,GAAG,EAAE,OAAO,EAAE;SACjC,CAAC,CAAC;QACH,MAAM,QAAQ,GAAG,oBAAoB,CAAC;YACpC,EAAE,KAAK,EAAE,OAAO,EAAE,GAAG,EAAE,OAAO,EAAE;YAChC,EAAE,KAAK,EAAE,OAAO,EAAE,GAAG,EAAE,OAAO,EAAE;SACjC,CAAC,CAAC;QACH,MAAM,MAAM,GAAG,kBAAkB,CAAC,KAAK,CAAC,CAAC;QACzC,MAAM,CAAC,MAAM,CAAC,CAAC,OAAO,CAAC,QAAQ,CAAC,CAAC;IACnC,CAAC,CAAC,CAAC;AACL,CAAC,CAAC,CAAC","sourcesContent":["import type { Interval } from \"./interval.js\";\nimport { describe, expect, test } from \"bun:test\";\nimport { Temporal } from \"temporal-polyfill\";\nimport { normalizeIntervals } from \"./normalize-intervals.js\";\n\nconst toPlainTimeIntervals = (\n ranges: { start: string; end: string }[],\n): Interval<Temporal.PlainTime>[] =>\n ranges.map(({ start, end }) => ({\n start: Temporal.PlainTime.from(start),\n end: Temporal.PlainTime.from(end),\n }));\n\ndescribe(\"normalizeIntervals\", () => {\n test(\"should return an empty array when given an empty array\", () => {\n const result = normalizeIntervals([]);\n expect(result).toEqual([]);\n });\n\n test(\"should return the same range when given a single range\", () => {\n const input: Interval<Temporal.PlainTime>[] = toPlainTimeIntervals([\n { start: \"09:00\", end: \"17:00\" },\n ]);\n const result = normalizeIntervals(input);\n expect(result).toEqual(input);\n });\n\n test(\"should combine overlapping ranges\", () => {\n const input = toPlainTimeIntervals([\n { start: \"09:00\", end: \"12:00\" },\n { start: \"11:00\", end: \"14:00\" },\n { start: \"13:00\", end: \"17:00\" },\n ]);\n const expected = toPlainTimeIntervals([{ start: \"09:00\", end: \"17:00\" }]);\n const result = normalizeIntervals(input);\n expect(result).toEqual(expected);\n });\n\n test(\"should not combine non-overlapping ranges\", () => {\n const input = toPlainTimeIntervals([\n { start: \"09:00\", end: \"11:00\" },\n { start: \"13:00\", end: \"15:00\" },\n { start: \"17:00\", end: \"19:00\" },\n ]);\n const expected = toPlainTimeIntervals([\n { start: \"09:00\", end: \"11:00\" },\n { start: \"13:00\", end: \"15:00\" },\n { start: \"17:00\", end: \"19:00\" },\n ]);\n const result = normalizeIntervals(input);\n expect(result).toEqual(expected);\n });\n\n test(\"should sort ranges by start time\", () => {\n const input = toPlainTimeIntervals([\n { start: \"13:00\", end: \"15:00\" },\n { start: \"09:00\", end: \"11:00\" },\n { start: \"17:00\", end: \"19:00\" },\n ]);\n const expected = toPlainTimeIntervals([\n { start: \"09:00\", end: \"11:00\" },\n { start: \"13:00\", end: \"15:00\" },\n { start: \"17:00\", end: \"19:00\" },\n ]);\n const result = normalizeIntervals(input);\n expect(result).toEqual(expected);\n });\n\n test(\"should handle adjacent ranges\", () => {\n const input = toPlainTimeIntervals([\n { start: \"09:00\", end: \"11:00\" },\n { start: \"11:00\", end: \"13:00\" },\n { start: \"13:00\", end: \"15:00\" },\n ]);\n const expected = toPlainTimeIntervals([{ start: \"09:00\", end: \"15:00\" }]);\n const result = normalizeIntervals(input);\n expect(result).toEqual(expected);\n });\n\n test(\"works with contained ranges\", () => {\n const input = toPlainTimeIntervals([\n { start: \"09:00\", end: \"17:00\" },\n { start: \"12:00\", end: \"14:00\" }, // Overlapping range\n { start: \"18:00\", end: \"22:00\" },\n ]);\n const expected = toPlainTimeIntervals([\n { start: \"09:00\", end: \"17:00\" },\n { start: \"18:00\", end: \"22:00\" },\n ]);\n const result = normalizeIntervals(input);\n expect(result).toEqual(expected);\n });\n});\n"]}
|
|
@@ -1,4 +1,4 @@
|
|
|
1
1
|
import type { TemporalComparable } from "./comparators.js";
|
|
2
2
|
import type { Interval } from "./interval.js";
|
|
3
3
|
export declare const sortInterval: <T extends TemporalComparable>(interval: Interval<T>) => Interval<T>;
|
|
4
|
-
//# sourceMappingURL=
|
|
4
|
+
//# sourceMappingURL=sort-interval.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"sort-interval.d.ts","sourceRoot":"","sources":["../src/sort-interval.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,kBAAkB,EAAE,MAAM,kBAAkB,CAAC;AAC3D,OAAO,KAAK,EAAE,QAAQ,EAAE,MAAM,eAAe,CAAC;AAG9C,eAAO,MAAM,YAAY,GAAI,CAAC,SAAS,kBAAkB,EACvD,UAAU,QAAQ,CAAC,CAAC,CAAC,KACpB,QAAQ,CAAC,CAAC,CAGZ,CAAC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"sort-interval.js","sourceRoot":"","sources":["../src/sort-interval.ts"],"names":[],"mappings":"AAEA,OAAO,EAAE,WAAW,EAAE,MAAM,kBAAkB,CAAC;AAE/C,MAAM,CAAC,MAAM,YAAY,GAAG,CAC1B,QAAqB,EACR,EAAE;IACf,MAAM,CAAC,KAAK,EAAE,GAAG,CAAC,GAAG,WAAW,CAAC,QAAQ,CAAC,KAAK,EAAE,QAAQ,CAAC,GAAG,CAAC,CAAC;IAC/D,OAAO,EAAE,KAAK,EAAE,GAAG,EAAE,CAAC;AACxB,CAAC,CAAC","sourcesContent":["import type { TemporalComparable } from \"./comparators.js\";\nimport type { Interval } from \"./interval.js\";\nimport { sortedTuple } from \"./comparators.js\";\n\nexport const sortInterval = <T extends TemporalComparable>(\n interval: Interval<T>,\n): Interval<T> => {\n const [start, end] = sortedTuple(interval.start, interval.end);\n return { start, end };\n};\n"]}
|
package/package.json
CHANGED
|
@@ -1,36 +1,25 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "interval-temporal",
|
|
3
|
+
"version": "0.5.4",
|
|
3
4
|
"description": "An interval type for Temporal. Also contains helpers for comparing and sorting Temporal objects.",
|
|
4
|
-
"
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
"type": "module",
|
|
8
|
-
"sideEffects": false,
|
|
9
|
-
"files": [
|
|
10
|
-
"dist/",
|
|
11
|
-
"src/",
|
|
12
|
-
"README.md"
|
|
5
|
+
"keywords": [
|
|
6
|
+
"interval",
|
|
7
|
+
"temporal"
|
|
13
8
|
],
|
|
14
|
-
"repository": "github:macalinao/temporal-utils",
|
|
15
9
|
"homepage": "https://github.com/macalinao/temporal-utils",
|
|
16
10
|
"bugs": {
|
|
17
11
|
"url": "https://github.com/macalinao/temporal-utils/issues"
|
|
18
12
|
},
|
|
19
|
-
"
|
|
20
|
-
|
|
21
|
-
|
|
13
|
+
"license": "Apache-2.0",
|
|
14
|
+
"author": "Ian Macalinao <me@ianm.com>",
|
|
15
|
+
"repository": "github:macalinao/temporal-utils",
|
|
16
|
+
"files": [
|
|
17
|
+
"dist/",
|
|
18
|
+
"src/",
|
|
19
|
+
"README.md"
|
|
22
20
|
],
|
|
23
|
-
"
|
|
24
|
-
|
|
25
|
-
},
|
|
26
|
-
"devDependencies": {
|
|
27
|
-
"@macalinao/eslint-config": "^4.1.10",
|
|
28
|
-
"@macalinao/tsconfig": "^3.1.0",
|
|
29
|
-
"eslint": "^9.23.0",
|
|
30
|
-
"temporal-polyfill": "^0.3.0",
|
|
31
|
-
"typescript": "^5.8.2",
|
|
32
|
-
"vitest": "^3.1.1"
|
|
33
|
-
},
|
|
21
|
+
"type": "module",
|
|
22
|
+
"sideEffects": false,
|
|
34
23
|
"main": "dist/index.js",
|
|
35
24
|
"types": "dist/index.d.ts",
|
|
36
25
|
"exports": {
|
|
@@ -40,20 +29,24 @@
|
|
|
40
29
|
}
|
|
41
30
|
},
|
|
42
31
|
"publishConfig": {
|
|
43
|
-
"
|
|
44
|
-
"
|
|
45
|
-
},
|
|
46
|
-
"lint-staged": {
|
|
47
|
-
"*.{js,jsx,ts,tsx}": "eslint --fix",
|
|
48
|
-
"*.{md,json}": "prettier --write"
|
|
49
|
-
},
|
|
50
|
-
"peerDependencies": {
|
|
51
|
-
"temporal-polyfill": "^0.2 || ^0.3"
|
|
32
|
+
"access": "public",
|
|
33
|
+
"registry": "https://registry.npmjs.org/"
|
|
52
34
|
},
|
|
53
35
|
"scripts": {
|
|
54
36
|
"build": "tsc",
|
|
55
37
|
"clean": "tsc --build --clean && rm -fr dist/",
|
|
56
|
-
"
|
|
57
|
-
|
|
38
|
+
"test": "bun test src/"
|
|
39
|
+
},
|
|
40
|
+
"dependencies": {
|
|
41
|
+
"tslib": "^2.8.1"
|
|
42
|
+
},
|
|
43
|
+
"devDependencies": {
|
|
44
|
+
"@macalinao/tsconfig": "^3.2.5",
|
|
45
|
+
"@types/bun": "latest",
|
|
46
|
+
"temporal-polyfill": "^0.3.0",
|
|
47
|
+
"typescript": "^5.8.2"
|
|
48
|
+
},
|
|
49
|
+
"peerDependencies": {
|
|
50
|
+
"temporal-polyfill": "^0.2 || ^0.3"
|
|
58
51
|
}
|
|
59
|
-
}
|
|
52
|
+
}
|
|
@@ -1,7 +1,6 @@
|
|
|
1
|
+
import { describe, expect, test } from "bun:test";
|
|
1
2
|
import { Temporal } from "temporal-polyfill";
|
|
2
|
-
import {
|
|
3
|
-
|
|
4
|
-
import { areIntervalsOverlapping } from "./areIntervalsOverlapping.js";
|
|
3
|
+
import { areIntervalsOverlapping } from "./are-intervals-overlapping.js";
|
|
5
4
|
|
|
6
5
|
describe("areIntervalsOverlapping", () => {
|
|
7
6
|
const base = {
|
|
@@ -13,7 +12,7 @@ describe("areIntervalsOverlapping", () => {
|
|
|
13
12
|
end: Temporal.ZonedDateTime.from("2023-10-02T12:00:00Z[UTC]"),
|
|
14
13
|
};
|
|
15
14
|
|
|
16
|
-
|
|
15
|
+
test("should return true when the intervals overlap", () => {
|
|
17
16
|
expect(areIntervalsOverlapping(base, overlaps)).toBe(true);
|
|
18
17
|
});
|
|
19
18
|
});
|
package/src/comparators.test.ts
CHANGED
|
@@ -1,22 +1,21 @@
|
|
|
1
|
+
import { describe, expect, test } from "bun:test";
|
|
1
2
|
import { Temporal } from "temporal-polyfill";
|
|
2
|
-
import { describe, expect, it } from "vitest";
|
|
3
|
-
|
|
4
3
|
import { sortedTuple } from "./comparators.js";
|
|
5
4
|
|
|
6
5
|
describe("sortedTuple for ZonedDateTime", () => {
|
|
7
|
-
|
|
6
|
+
test("should return 0 for equal ZonedDateTime instances", () => {
|
|
8
7
|
const dateTime1 = Temporal.ZonedDateTime.from("2023-10-01T10:00:00Z[UTC]");
|
|
9
8
|
const dateTime2 = Temporal.ZonedDateTime.from("2023-10-01T10:00:00Z[UTC]");
|
|
10
9
|
expect(sortedTuple(dateTime1, dateTime2)).toEqual([dateTime1, dateTime2]);
|
|
11
10
|
});
|
|
12
11
|
|
|
13
|
-
|
|
12
|
+
test("should return -1 for an earlier ZonedDateTime", () => {
|
|
14
13
|
const dateTime1 = Temporal.ZonedDateTime.from("2023-10-01T09:00:00Z[UTC]");
|
|
15
14
|
const dateTime2 = Temporal.ZonedDateTime.from("2023-10-01T10:00:00Z[UTC]");
|
|
16
15
|
expect(sortedTuple(dateTime1, dateTime2)).toEqual([dateTime1, dateTime2]);
|
|
17
16
|
});
|
|
18
17
|
|
|
19
|
-
|
|
18
|
+
test("should return 1 for a later ZonedDateTime", () => {
|
|
20
19
|
const dateTime1 = Temporal.ZonedDateTime.from("2023-10-01T11:00:00Z[UTC]");
|
|
21
20
|
const dateTime2 = Temporal.ZonedDateTime.from("2023-10-01T10:00:00Z[UTC]");
|
|
22
21
|
expect(sortedTuple(dateTime1, dateTime2)).toEqual([dateTime2, dateTime1]);
|
package/src/comparators.ts
CHANGED
|
@@ -32,11 +32,11 @@ export const TEMPORAL_COMPARATORS: {
|
|
|
32
32
|
TemporalComparableWithStringTag<TTag>
|
|
33
33
|
>;
|
|
34
34
|
} = {
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
35
|
+
"Temporal.PlainDate": (a, b) => Temporal.PlainDate.compare(a, b),
|
|
36
|
+
"Temporal.Instant": (a, b) => Temporal.Instant.compare(a, b),
|
|
37
|
+
"Temporal.PlainDateTime": (a, b) => Temporal.PlainDateTime.compare(a, b),
|
|
38
|
+
"Temporal.ZonedDateTime": (a, b) => Temporal.ZonedDateTime.compare(a, b),
|
|
39
|
+
"Temporal.PlainTime": (a, b) => Temporal.PlainTime.compare(a, b),
|
|
40
40
|
};
|
|
41
41
|
|
|
42
42
|
export const compareTemporals = <T extends TemporalComparable>(
|
package/src/index.ts
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
export * from "./
|
|
1
|
+
export * from "./are-intervals-overlapping.js";
|
|
2
2
|
export * from "./comparators.js";
|
|
3
3
|
export * from "./interval.js";
|
|
4
|
-
export * from "./
|
|
5
|
-
export * from "./
|
|
6
|
-
export * from "./
|
|
4
|
+
export * from "./is-within-interval.js";
|
|
5
|
+
export * from "./normalize-intervals.js";
|
|
6
|
+
export * from "./sort-interval.js";
|
|
@@ -1,8 +1,7 @@
|
|
|
1
|
-
import { Temporal } from "temporal-polyfill";
|
|
2
|
-
import { describe, expect, it } from "vitest";
|
|
3
|
-
|
|
4
1
|
import type { Interval } from "./interval.js";
|
|
5
|
-
import {
|
|
2
|
+
import { describe, expect, test } from "bun:test";
|
|
3
|
+
import { Temporal } from "temporal-polyfill";
|
|
4
|
+
import { normalizeIntervals } from "./normalize-intervals.js";
|
|
6
5
|
|
|
7
6
|
const toPlainTimeIntervals = (
|
|
8
7
|
ranges: { start: string; end: string }[],
|
|
@@ -13,12 +12,12 @@ const toPlainTimeIntervals = (
|
|
|
13
12
|
}));
|
|
14
13
|
|
|
15
14
|
describe("normalizeIntervals", () => {
|
|
16
|
-
|
|
15
|
+
test("should return an empty array when given an empty array", () => {
|
|
17
16
|
const result = normalizeIntervals([]);
|
|
18
17
|
expect(result).toEqual([]);
|
|
19
18
|
});
|
|
20
19
|
|
|
21
|
-
|
|
20
|
+
test("should return the same range when given a single range", () => {
|
|
22
21
|
const input: Interval<Temporal.PlainTime>[] = toPlainTimeIntervals([
|
|
23
22
|
{ start: "09:00", end: "17:00" },
|
|
24
23
|
]);
|
|
@@ -26,7 +25,7 @@ describe("normalizeIntervals", () => {
|
|
|
26
25
|
expect(result).toEqual(input);
|
|
27
26
|
});
|
|
28
27
|
|
|
29
|
-
|
|
28
|
+
test("should combine overlapping ranges", () => {
|
|
30
29
|
const input = toPlainTimeIntervals([
|
|
31
30
|
{ start: "09:00", end: "12:00" },
|
|
32
31
|
{ start: "11:00", end: "14:00" },
|
|
@@ -37,7 +36,7 @@ describe("normalizeIntervals", () => {
|
|
|
37
36
|
expect(result).toEqual(expected);
|
|
38
37
|
});
|
|
39
38
|
|
|
40
|
-
|
|
39
|
+
test("should not combine non-overlapping ranges", () => {
|
|
41
40
|
const input = toPlainTimeIntervals([
|
|
42
41
|
{ start: "09:00", end: "11:00" },
|
|
43
42
|
{ start: "13:00", end: "15:00" },
|
|
@@ -52,7 +51,7 @@ describe("normalizeIntervals", () => {
|
|
|
52
51
|
expect(result).toEqual(expected);
|
|
53
52
|
});
|
|
54
53
|
|
|
55
|
-
|
|
54
|
+
test("should sort ranges by start time", () => {
|
|
56
55
|
const input = toPlainTimeIntervals([
|
|
57
56
|
{ start: "13:00", end: "15:00" },
|
|
58
57
|
{ start: "09:00", end: "11:00" },
|
|
@@ -67,7 +66,7 @@ describe("normalizeIntervals", () => {
|
|
|
67
66
|
expect(result).toEqual(expected);
|
|
68
67
|
});
|
|
69
68
|
|
|
70
|
-
|
|
69
|
+
test("should handle adjacent ranges", () => {
|
|
71
70
|
const input = toPlainTimeIntervals([
|
|
72
71
|
{ start: "09:00", end: "11:00" },
|
|
73
72
|
{ start: "11:00", end: "13:00" },
|
|
@@ -78,7 +77,7 @@ describe("normalizeIntervals", () => {
|
|
|
78
77
|
expect(result).toEqual(expected);
|
|
79
78
|
});
|
|
80
79
|
|
|
81
|
-
|
|
80
|
+
test("works with contained ranges", () => {
|
|
82
81
|
const input = toPlainTimeIntervals([
|
|
83
82
|
{ start: "09:00", end: "17:00" },
|
|
84
83
|
{ start: "12:00", end: "14:00" }, // Overlapping range
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import type { TemporalComparable } from "./comparators.js";
|
|
2
|
-
import { compareTemporals } from "./comparators.js";
|
|
3
2
|
import type { Interval } from "./interval.js";
|
|
3
|
+
import { compareTemporals } from "./comparators.js";
|
|
4
4
|
|
|
5
5
|
/**
|
|
6
6
|
* Normalizes the ranges by combining overlapping ranges and sorting them.
|
|
@@ -10,7 +10,7 @@ import type { Interval } from "./interval.js";
|
|
|
10
10
|
export const normalizeIntervals = <T extends TemporalComparable>(
|
|
11
11
|
intervals: Interval<T>[],
|
|
12
12
|
): Interval<T>[] => {
|
|
13
|
-
const sortedIntervals = intervals.
|
|
13
|
+
const sortedIntervals = intervals.toSorted((a, b) =>
|
|
14
14
|
compareTemporals<T>(a.start, b.start),
|
|
15
15
|
);
|
|
16
16
|
const firstInterval = sortedIntervals[0];
|
package/LICENSE.txt
DELETED
|
@@ -1,209 +0,0 @@
|
|
|
1
|
-
|
|
2
|
-
Apache License
|
|
3
|
-
Version 2.0, January 2004
|
|
4
|
-
http://www.apache.org/licenses/
|
|
5
|
-
|
|
6
|
-
TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION
|
|
7
|
-
|
|
8
|
-
1. Definitions.
|
|
9
|
-
|
|
10
|
-
"License" shall mean the terms and conditions for use, reproduction, and
|
|
11
|
-
distribution as defined by Sections 1 through 9 of this document.
|
|
12
|
-
|
|
13
|
-
"Licensor" shall mean the copyright owner or entity authorized by the
|
|
14
|
-
copyright owner that is granting the License.
|
|
15
|
-
|
|
16
|
-
"Legal Entity" shall mean the union of the acting entity and all other
|
|
17
|
-
entities that control, are controlled by, or are under common control with
|
|
18
|
-
that entity. For the purposes of this definition, "control" means (i) the
|
|
19
|
-
power, direct or indirect, to cause the direction or management of such
|
|
20
|
-
entity, whether by contract or otherwise, or (ii) ownership of
|
|
21
|
-
fifty percent (50%) or more of the outstanding shares, or (iii) beneficial
|
|
22
|
-
ownership of such entity.
|
|
23
|
-
|
|
24
|
-
"You" (or "Your") shall mean an individual or Legal Entity exercising
|
|
25
|
-
permissions granted by this License.
|
|
26
|
-
|
|
27
|
-
"Source" form shall mean the preferred form for making modifications,
|
|
28
|
-
including but not limited to software source code, documentation source,
|
|
29
|
-
and configuration files.
|
|
30
|
-
|
|
31
|
-
"Object" form shall mean any form resulting from mechanical transformation
|
|
32
|
-
or translation of a Source form, including but not limited to compiled
|
|
33
|
-
object code, generated documentation, and conversions to
|
|
34
|
-
other media types.
|
|
35
|
-
|
|
36
|
-
"Work" shall mean the work of authorship, whether in Source or Object
|
|
37
|
-
form, made available under the License, as indicated by a copyright notice
|
|
38
|
-
that is included in or attached to the work (an example is provided in the
|
|
39
|
-
Appendix below).
|
|
40
|
-
|
|
41
|
-
"Derivative Works" shall mean any work, whether in Source or Object form,
|
|
42
|
-
that is based on (or derived from) the Work and for which the editorial
|
|
43
|
-
revisions, annotations, elaborations, or other modifications represent,
|
|
44
|
-
as a whole, an original work of authorship. For the purposes of this
|
|
45
|
-
License, Derivative Works shall not include works that remain separable
|
|
46
|
-
from, or merely link (or bind by name) to the interfaces of, the Work and
|
|
47
|
-
Derivative Works thereof.
|
|
48
|
-
|
|
49
|
-
"Contribution" shall mean any work of authorship, including the original
|
|
50
|
-
version of the Work and any modifications or additions to that Work or
|
|
51
|
-
Derivative Works thereof, that is intentionally submitted to Licensor for
|
|
52
|
-
inclusion in the Work by the copyright owner or by an individual or
|
|
53
|
-
Legal Entity authorized to submit on behalf of the copyright owner.
|
|
54
|
-
For the purposes of this definition, "submitted" means any form of
|
|
55
|
-
electronic, verbal, or written communication sent to the Licensor or its
|
|
56
|
-
representatives, including but not limited to communication on electronic
|
|
57
|
-
mailing lists, source code control systems, and issue tracking systems
|
|
58
|
-
that are managed by, or on behalf of, the Licensor for the purpose of
|
|
59
|
-
discussing and improving the Work, but excluding communication that is
|
|
60
|
-
conspicuously marked or otherwise designated in writing by the copyright
|
|
61
|
-
owner as "Not a Contribution."
|
|
62
|
-
|
|
63
|
-
"Contributor" shall mean Licensor and any individual or Legal Entity on
|
|
64
|
-
behalf of whom a Contribution has been received by Licensor and
|
|
65
|
-
subsequently incorporated within the Work.
|
|
66
|
-
|
|
67
|
-
2. Grant of Copyright License.
|
|
68
|
-
|
|
69
|
-
Subject to the terms and conditions of this License, each Contributor
|
|
70
|
-
hereby grants to You a perpetual, worldwide, non-exclusive, no-charge,
|
|
71
|
-
royalty-free, irrevocable copyright license to reproduce, prepare
|
|
72
|
-
Derivative Works of, publicly display, publicly perform, sublicense,
|
|
73
|
-
and distribute the Work and such Derivative Works in
|
|
74
|
-
Source or Object form.
|
|
75
|
-
|
|
76
|
-
3. Grant of Patent License.
|
|
77
|
-
|
|
78
|
-
Subject to the terms and conditions of this License, each Contributor
|
|
79
|
-
hereby grants to You a perpetual, worldwide, non-exclusive, no-charge,
|
|
80
|
-
royalty-free, irrevocable (except as stated in this section) patent
|
|
81
|
-
license to make, have made, use, offer to sell, sell, import, and
|
|
82
|
-
otherwise transfer the Work, where such license applies only to those
|
|
83
|
-
patent claims licensable by such Contributor that are necessarily
|
|
84
|
-
infringed by their Contribution(s) alone or by combination of their
|
|
85
|
-
Contribution(s) with the Work to which such Contribution(s) was submitted.
|
|
86
|
-
If You institute patent litigation against any entity (including a
|
|
87
|
-
cross-claim or counterclaim in a lawsuit) alleging that the Work or a
|
|
88
|
-
Contribution incorporated within the Work constitutes direct or
|
|
89
|
-
contributory patent infringement, then any patent licenses granted to
|
|
90
|
-
You under this License for that Work shall terminate as of the date such
|
|
91
|
-
litigation is filed.
|
|
92
|
-
|
|
93
|
-
4. Redistribution.
|
|
94
|
-
|
|
95
|
-
You may reproduce and distribute copies of the Work or Derivative Works
|
|
96
|
-
thereof in any medium, with or without modifications, and in Source or
|
|
97
|
-
Object form, provided that You meet the following conditions:
|
|
98
|
-
|
|
99
|
-
1. You must give any other recipients of the Work or Derivative Works a
|
|
100
|
-
copy of this License; and
|
|
101
|
-
|
|
102
|
-
2. You must cause any modified files to carry prominent notices stating
|
|
103
|
-
that You changed the files; and
|
|
104
|
-
|
|
105
|
-
3. You must retain, in the Source form of any Derivative Works that You
|
|
106
|
-
distribute, all copyright, patent, trademark, and attribution notices from
|
|
107
|
-
the Source form of the Work, excluding those notices that do not pertain
|
|
108
|
-
to any part of the Derivative Works; and
|
|
109
|
-
|
|
110
|
-
4. If the Work includes a "NOTICE" text file as part of its distribution,
|
|
111
|
-
then any Derivative Works that You distribute must include a readable copy
|
|
112
|
-
of the attribution notices contained within such NOTICE file, excluding
|
|
113
|
-
those notices that do not pertain to any part of the Derivative Works,
|
|
114
|
-
in at least one of the following places: within a NOTICE text file
|
|
115
|
-
distributed as part of the Derivative Works; within the Source form or
|
|
116
|
-
documentation, if provided along with the Derivative Works; or, within a
|
|
117
|
-
display generated by the Derivative Works, if and wherever such
|
|
118
|
-
third-party notices normally appear. The contents of the NOTICE file are
|
|
119
|
-
for informational purposes only and do not modify the License.
|
|
120
|
-
You may add Your own attribution notices within Derivative Works that You
|
|
121
|
-
distribute, alongside or as an addendum to the NOTICE text from the Work,
|
|
122
|
-
provided that such additional attribution notices cannot be construed
|
|
123
|
-
as modifying the License.
|
|
124
|
-
|
|
125
|
-
You may add Your own copyright statement to Your modifications and may
|
|
126
|
-
provide additional or different license terms and conditions for use,
|
|
127
|
-
reproduction, or distribution of Your modifications, or for any such
|
|
128
|
-
Derivative Works as a whole, provided Your use, reproduction, and
|
|
129
|
-
distribution of the Work otherwise complies with the conditions
|
|
130
|
-
stated in this License.
|
|
131
|
-
|
|
132
|
-
5. Submission of Contributions.
|
|
133
|
-
|
|
134
|
-
Unless You explicitly state otherwise, any Contribution intentionally
|
|
135
|
-
submitted for inclusion in the Work by You to the Licensor shall be under
|
|
136
|
-
the terms and conditions of this License, without any additional
|
|
137
|
-
terms or conditions. Notwithstanding the above, nothing herein shall
|
|
138
|
-
supersede or modify the terms of any separate license agreement you may
|
|
139
|
-
have executed with Licensor regarding such Contributions.
|
|
140
|
-
|
|
141
|
-
6. Trademarks.
|
|
142
|
-
|
|
143
|
-
This License does not grant permission to use the trade names, trademarks,
|
|
144
|
-
service marks, or product names of the Licensor, except as required for
|
|
145
|
-
reasonable and customary use in describing the origin of the Work and
|
|
146
|
-
reproducing the content of the NOTICE file.
|
|
147
|
-
|
|
148
|
-
7. Disclaimer of Warranty.
|
|
149
|
-
|
|
150
|
-
Unless required by applicable law or agreed to in writing, Licensor
|
|
151
|
-
provides the Work (and each Contributor provides its Contributions)
|
|
152
|
-
on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND,
|
|
153
|
-
either express or implied, including, without limitation, any warranties
|
|
154
|
-
or conditions of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS
|
|
155
|
-
FOR A PARTICULAR PURPOSE. You are solely responsible for determining the
|
|
156
|
-
appropriateness of using or redistributing the Work and assume any risks
|
|
157
|
-
associated with Your exercise of permissions under this License.
|
|
158
|
-
|
|
159
|
-
8. Limitation of Liability.
|
|
160
|
-
|
|
161
|
-
In no event and under no legal theory, whether in tort
|
|
162
|
-
(including negligence), contract, or otherwise, unless required by
|
|
163
|
-
applicable law (such as deliberate and grossly negligent acts) or agreed
|
|
164
|
-
to in writing, shall any Contributor be liable to You for damages,
|
|
165
|
-
including any direct, indirect, special, incidental, or consequential
|
|
166
|
-
damages of any character arising as a result of this License or out of
|
|
167
|
-
the use or inability to use the Work (including but not limited to damages
|
|
168
|
-
for loss of goodwill, work stoppage, computer failure or malfunction,
|
|
169
|
-
or any and all other commercial damages or losses), even if such
|
|
170
|
-
Contributor has been advised of the possibility of such damages.
|
|
171
|
-
|
|
172
|
-
9. Accepting Warranty or Additional Liability.
|
|
173
|
-
|
|
174
|
-
While redistributing the Work or Derivative Works thereof, You may choose
|
|
175
|
-
to offer, and charge a fee for, acceptance of support, warranty,
|
|
176
|
-
indemnity, or other liability obligations and/or rights consistent with
|
|
177
|
-
this License. However, in accepting such obligations, You may act only
|
|
178
|
-
on Your own behalf and on Your sole responsibility, not on behalf of any
|
|
179
|
-
other Contributor, and only if You agree to indemnify, defend, and hold
|
|
180
|
-
each Contributor harmless for any liability incurred by, or claims
|
|
181
|
-
asserted against, such Contributor by reason of your accepting any such
|
|
182
|
-
warranty or additional liability.
|
|
183
|
-
|
|
184
|
-
END OF TERMS AND CONDITIONS
|
|
185
|
-
|
|
186
|
-
APPENDIX: How to apply the Apache License to your work
|
|
187
|
-
|
|
188
|
-
To apply the Apache License to your work, attach the following boilerplate
|
|
189
|
-
notice, with the fields enclosed by brackets "[]" replaced with your own
|
|
190
|
-
identifying information. (Don't include the brackets!) The text should be
|
|
191
|
-
enclosed in the appropriate comment syntax for the file format. We also
|
|
192
|
-
recommend that a file or class name and description of purpose be included
|
|
193
|
-
on the same "printed page" as the copyright notice for easier
|
|
194
|
-
identification within third-party archives.
|
|
195
|
-
|
|
196
|
-
Copyright 2024 Ian Macalinao
|
|
197
|
-
|
|
198
|
-
Licensed under the Apache License, Version 2.0 (the "License");
|
|
199
|
-
you may not use this file except in compliance with the License.
|
|
200
|
-
You may obtain a copy of the License at
|
|
201
|
-
|
|
202
|
-
http://www.apache.org/licenses/LICENSE-2.0
|
|
203
|
-
|
|
204
|
-
Unless required by applicable law or agreed to in writing, software
|
|
205
|
-
distributed under the License is distributed on an "AS IS" BASIS,
|
|
206
|
-
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express
|
|
207
|
-
or implied. See the License for the specific language governing
|
|
208
|
-
permissions and limitations under the License.
|
|
209
|
-
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"areIntervalsOverlapping.d.ts","sourceRoot":"","sources":["../src/areIntervalsOverlapping.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,kBAAkB,EAAE,MAAM,kBAAkB,CAAC;AAE3D,OAAO,KAAK,EAAE,QAAQ,EAAE,MAAM,eAAe,CAAC;AAE9C;;;;;;GAMG;AACH,wBAAgB,uBAAuB,CAAC,CAAC,SAAS,kBAAkB,EAClE,YAAY,EAAE,QAAQ,CAAC,CAAC,CAAC,EACzB,aAAa,EAAE,QAAQ,CAAC,CAAC,CAAC,GACzB,OAAO,CAaT"}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"areIntervalsOverlapping.js","sourceRoot":"","sources":["../src/areIntervalsOverlapping.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,gBAAgB,EAAE,WAAW,EAAE,MAAM,kBAAkB,CAAC;AAGjE;;;;;;GAMG;AACH,MAAM,UAAU,uBAAuB,CACrC,YAAyB,EACzB,aAA0B;IAE1B,MAAM,CAAC,aAAa,EAAE,WAAW,CAAC,GAAG,WAAW,CAC9C,YAAY,CAAC,KAAK,EAClB,YAAY,CAAC,GAAG,CACjB,CAAC;IACF,MAAM,CAAC,cAAc,EAAE,YAAY,CAAC,GAAG,WAAW,CAChD,aAAa,CAAC,KAAK,EACnB,aAAa,CAAC,GAAG,CAClB,CAAC;IACF,OAAO,CACL,gBAAgB,CAAC,aAAa,EAAE,YAAY,CAAC,KAAK,CAAC,CAAC;QACpD,gBAAgB,CAAC,cAAc,EAAE,WAAW,CAAC,KAAK,CAAC,CAAC,CACrD,CAAC;AACJ,CAAC","sourcesContent":["import type { TemporalComparable } from \"./comparators.js\";\nimport { compareTemporals, sortedTuple } from \"./comparators.js\";\nimport type { Interval } from \"./interval.js\";\n\n/**\n * Checks if two intervals overlap.\n *\n * @param intervalLeft - The left interval.\n * @param intervalRight - The right interval.\n * @returns Whether the intervals overlap.\n */\nexport function areIntervalsOverlapping<T extends TemporalComparable>(\n intervalLeft: Interval<T>,\n intervalRight: Interval<T>,\n): boolean {\n const [leftStartTime, leftEndTime] = sortedTuple(\n intervalLeft.start,\n intervalLeft.end,\n );\n const [rightStartTime, rightEndTime] = sortedTuple(\n intervalRight.start,\n intervalRight.end,\n );\n return (\n compareTemporals(leftStartTime, rightEndTime) === -1 &&\n compareTemporals(rightStartTime, leftEndTime) === -1\n );\n}\n"]}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"areIntervalsOverlapping.test.d.ts","sourceRoot":"","sources":["../src/areIntervalsOverlapping.test.ts"],"names":[],"mappings":""}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"areIntervalsOverlapping.test.js","sourceRoot":"","sources":["../src/areIntervalsOverlapping.test.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,QAAQ,EAAE,MAAM,mBAAmB,CAAC;AAC7C,OAAO,EAAE,QAAQ,EAAE,MAAM,EAAE,EAAE,EAAE,MAAM,QAAQ,CAAC;AAE9C,OAAO,EAAE,uBAAuB,EAAE,MAAM,8BAA8B,CAAC;AAEvE,QAAQ,CAAC,yBAAyB,EAAE,GAAG,EAAE;IACvC,MAAM,IAAI,GAAG;QACX,KAAK,EAAE,QAAQ,CAAC,aAAa,CAAC,IAAI,CAAC,2BAA2B,CAAC;QAC/D,GAAG,EAAE,QAAQ,CAAC,aAAa,CAAC,IAAI,CAAC,2BAA2B,CAAC;KAC9D,CAAC;IACF,MAAM,QAAQ,GAAG;QACf,KAAK,EAAE,QAAQ,CAAC,aAAa,CAAC,IAAI,CAAC,2BAA2B,CAAC;QAC/D,GAAG,EAAE,QAAQ,CAAC,aAAa,CAAC,IAAI,CAAC,2BAA2B,CAAC;KAC9D,CAAC;IAEF,EAAE,CAAC,+CAA+C,EAAE,GAAG,EAAE;QACvD,MAAM,CAAC,uBAAuB,CAAC,IAAI,EAAE,QAAQ,CAAC,CAAC,CAAC,IAAI,CAAC,IAAI,CAAC,CAAC;IAC7D,CAAC,CAAC,CAAC;AACL,CAAC,CAAC,CAAC","sourcesContent":["import { Temporal } from \"temporal-polyfill\";\nimport { describe, expect, it } from \"vitest\";\n\nimport { areIntervalsOverlapping } from \"./areIntervalsOverlapping.js\";\n\ndescribe(\"areIntervalsOverlapping\", () => {\n const base = {\n start: Temporal.ZonedDateTime.from(\"2023-10-01T10:00:00Z[UTC]\"),\n end: Temporal.ZonedDateTime.from(\"2023-10-02T10:00:00Z[UTC]\"),\n };\n const overlaps = {\n start: Temporal.ZonedDateTime.from(\"2023-10-01T12:00:00Z[UTC]\"),\n end: Temporal.ZonedDateTime.from(\"2023-10-02T12:00:00Z[UTC]\"),\n };\n\n it(\"should return true when the intervals overlap\", () => {\n expect(areIntervalsOverlapping(base, overlaps)).toBe(true);\n });\n});\n"]}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"isWithinInterval.d.ts","sourceRoot":"","sources":["../src/isWithinInterval.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,kBAAkB,EAAE,MAAM,kBAAkB,CAAC;AAE3D,OAAO,KAAK,EAAE,QAAQ,EAAE,MAAM,eAAe,CAAC;AAE9C,wBAAgB,gBAAgB,CAAC,CAAC,SAAS,kBAAkB,EAC3D,KAAK,EAAE,CAAC,EACR,QAAQ,EAAE,QAAQ,CAAC,CAAC,CAAC,GACpB,OAAO,CAMT"}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"isWithinInterval.js","sourceRoot":"","sources":["../src/isWithinInterval.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,gBAAgB,EAAE,WAAW,EAAE,MAAM,kBAAkB,CAAC;AAGjE,MAAM,UAAU,gBAAgB,CAC9B,KAAQ,EACR,QAAqB;IAErB,MAAM,CAAC,SAAS,EAAE,OAAO,CAAC,GAAG,WAAW,CAAC,QAAQ,CAAC,KAAK,EAAE,QAAQ,CAAC,GAAG,CAAC,CAAC;IACvE,OAAO,CACL,gBAAgB,CAAC,KAAK,EAAE,SAAS,CAAC,IAAI,CAAC;QACvC,gBAAgB,CAAC,KAAK,EAAE,OAAO,CAAC,IAAI,CAAC,CACtC,CAAC;AACJ,CAAC","sourcesContent":["import type { TemporalComparable } from \"./comparators.js\";\nimport { compareTemporals, sortedTuple } from \"./comparators.js\";\nimport type { Interval } from \"./interval.js\";\n\nexport function isWithinInterval<T extends TemporalComparable>(\n value: T,\n interval: Interval<T>,\n): boolean {\n const [startTime, endTime] = sortedTuple(interval.start, interval.end);\n return (\n compareTemporals(value, startTime) >= 0 &&\n compareTemporals(value, endTime) <= 0\n );\n}\n"]}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"normalizeIntervals.d.ts","sourceRoot":"","sources":["../src/normalizeIntervals.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,kBAAkB,EAAE,MAAM,kBAAkB,CAAC;AAE3D,OAAO,KAAK,EAAE,QAAQ,EAAE,MAAM,eAAe,CAAC;AAE9C;;;;GAIG;AACH,eAAO,MAAM,kBAAkB,GAAI,CAAC,SAAS,kBAAkB,EAC7D,WAAW,QAAQ,CAAC,CAAC,CAAC,EAAE,KACvB,QAAQ,CAAC,CAAC,CAAC,EAmCb,CAAC"}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"normalizeIntervals.js","sourceRoot":"","sources":["../src/normalizeIntervals.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,gBAAgB,EAAE,MAAM,kBAAkB,CAAC;AAGpD;;;;GAIG;AACH,MAA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{ compareTemporals } from \"./comparators.js\";\nimport type { Interval } from \"./interval.js\";\n\n/**\n * Normalizes the ranges by combining overlapping ranges and sorting them.\n *\n * @param intervals - The intervals to normalize.\n */\nexport const normalizeIntervals = <T extends TemporalComparable>(\n intervals: Interval<T>[],\n): Interval<T>[] => {\n const sortedIntervals = intervals.sort((a, b) =>\n compareTemporals<T>(a.start, b.start),\n );\n const firstInterval = sortedIntervals[0];\n if (!firstInterval) {\n return [];\n }\n\n const normalizedRanges: Interval<T>[] = [];\n let currentRange: Interval<T> = firstInterval;\n\n for (let i = 1; i < sortedIntervals.length; i++) {\n const nextRange = sortedIntervals[i];\n if (!nextRange) {\n break;\n }\n\n if (compareTemporals(nextRange.start, currentRange.end) <= 0) {\n currentRange = {\n start: currentRange.start,\n end:\n compareTemporals(currentRange.end, nextRange.end) <= 0\n ? nextRange.end\n : currentRange.end,\n };\n } else {\n normalizedRanges.push(currentRange);\n currentRange = nextRange;\n }\n }\n\n normalizedRanges.push(currentRange);\n\n return normalizedRanges;\n};\n"]}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"normalizeIntervals.test.d.ts","sourceRoot":"","sources":["../src/normalizeIntervals.test.ts"],"names":[],"mappings":""}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"normalizeIntervals.test.js","sourceRoot":"","sources":["../src/normalizeIntervals.test.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,QAAQ,EAAE,MAAM,mBAAmB,CAAC;AAC7C,OAAO,EAAE,QAAQ,EAAE,MAAM,EAAE,EAAE,EAAE,MAAM,QAAQ,CAAC;AAG9C,OAAO,EAAE,kBAAkB,EAAE,MAAM,yBAAyB,CAAC;AAE7D,MAAM,oBAAoB,GAAG,CAC3B,MAAwC,EACR,EAAE,CAClC,MAAM,CAAC,GAAG,CAAC,CAAC,EAAE,KAAK,EAAE,GAAG,EAAE,EAAE,EAAE,CAAC,CAAC;IAC9B,KAAK,EAAE,QAAQ,CAAC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C;IACnC,CAAC,CAAC,CAAC;AACL,CAAC,CAAC,CAAC","sourcesContent":["import { Temporal } from \"temporal-polyfill\";\nimport { describe, expect, it } from \"vitest\";\n\nimport type { Interval } from \"./interval.js\";\nimport { normalizeIntervals } from \"./normalizeIntervals.js\";\n\nconst toPlainTimeIntervals = (\n ranges: { start: string; end: string }[],\n): Interval<Temporal.PlainTime>[] =>\n ranges.map(({ start, end }) => ({\n start: Temporal.PlainTime.from(start),\n end: Temporal.PlainTime.from(end),\n }));\n\ndescribe(\"normalizeIntervals\", () => {\n it(\"should return an empty array when given an empty array\", () => {\n const result = normalizeIntervals([]);\n expect(result).toEqual([]);\n });\n\n it(\"should return the same range when given a single range\", () => {\n const input: Interval<Temporal.PlainTime>[] = toPlainTimeIntervals([\n { start: \"09:00\", end: \"17:00\" },\n ]);\n const result = normalizeIntervals(input);\n expect(result).toEqual(input);\n });\n\n it(\"should combine overlapping ranges\", () => {\n const input = toPlainTimeIntervals([\n { start: \"09:00\", end: \"12:00\" },\n { start: \"11:00\", end: \"14:00\" },\n { start: \"13:00\", end: \"17:00\" },\n ]);\n const expected = toPlainTimeIntervals([{ start: \"09:00\", end: \"17:00\" }]);\n const result = normalizeIntervals(input);\n expect(result).toEqual(expected);\n });\n\n it(\"should not combine non-overlapping ranges\", () => {\n const input = toPlainTimeIntervals([\n { start: \"09:00\", end: \"11:00\" },\n { start: \"13:00\", end: \"15:00\" },\n { start: \"17:00\", end: \"19:00\" },\n ]);\n const expected = toPlainTimeIntervals([\n { start: \"09:00\", end: \"11:00\" },\n { start: \"13:00\", end: \"15:00\" },\n { start: \"17:00\", end: \"19:00\" },\n ]);\n const result = normalizeIntervals(input);\n expect(result).toEqual(expected);\n });\n\n it(\"should sort ranges by start time\", () => {\n const input = toPlainTimeIntervals([\n { start: \"13:00\", end: \"15:00\" },\n { start: \"09:00\", end: \"11:00\" },\n { start: \"17:00\", end: \"19:00\" },\n ]);\n const expected = toPlainTimeIntervals([\n { start: \"09:00\", end: \"11:00\" },\n { start: \"13:00\", end: \"15:00\" },\n { start: \"17:00\", end: \"19:00\" },\n ]);\n const result = normalizeIntervals(input);\n expect(result).toEqual(expected);\n });\n\n it(\"should handle adjacent ranges\", () => {\n const input = toPlainTimeIntervals([\n { start: \"09:00\", end: \"11:00\" },\n { start: \"11:00\", end: \"13:00\" },\n { start: \"13:00\", end: \"15:00\" },\n ]);\n const expected = toPlainTimeIntervals([{ start: \"09:00\", end: \"15:00\" }]);\n const result = normalizeIntervals(input);\n expect(result).toEqual(expected);\n });\n\n it(\"works with contained ranges\", () => {\n const input = toPlainTimeIntervals([\n { start: \"09:00\", end: \"17:00\" },\n { start: \"12:00\", end: \"14:00\" }, // Overlapping range\n { start: \"18:00\", end: \"22:00\" },\n ]);\n const expected = toPlainTimeIntervals([\n { start: \"09:00\", end: \"17:00\" },\n { start: \"18:00\", end: \"22:00\" },\n ]);\n const result = normalizeIntervals(input);\n expect(result).toEqual(expected);\n });\n});\n"]}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"sortInterval.d.ts","sourceRoot":"","sources":["../src/sortInterval.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,kBAAkB,EAAE,MAAM,kBAAkB,CAAC;AAE3D,OAAO,KAAK,EAAE,QAAQ,EAAE,MAAM,eAAe,CAAC;AAE9C,eAAO,MAAM,YAAY,GAAI,CAAC,SAAS,kBAAkB,EACvD,UAAU,QAAQ,CAAC,CAAC,CAAC,KACpB,QAAQ,CAAC,CAAC,CAGZ,CAAC"}
|
package/dist/sortInterval.js.map
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"sortInterval.js","sourceRoot":"","sources":["../src/sortInterval.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,WAAW,EAAE,MAAM,kBAAkB,CAAC;AAG/C,MAAM,CAAC,MAAM,YAAY,GAAG,CAC1B,QAAqB,EACR,EAAE;IACf,MAAM,CAAC,KAAK,EAAE,GAAG,CAAC,GAAG,WAAW,CAAC,QAAQ,CAAC,KAAK,EAAE,QAAQ,CAAC,GAAG,CAAC,CAAC;IAC/D,OAAO,EAAE,KAAK,EAAE,GAAG,EAAE,CAAC;AACxB,CAAC,CAAC","sourcesContent":["import type { TemporalComparable } from \"./comparators.js\";\nimport { sortedTuple } from \"./comparators.js\";\nimport type { Interval } from \"./interval.js\";\n\nexport const sortInterval = <T extends TemporalComparable>(\n interval: Interval<T>,\n): Interval<T> => {\n const [start, end] = sortedTuple(interval.start, interval.end);\n return { start, end };\n};\n"]}
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import type { TemporalComparable } from "./comparators.js";
|
|
2
|
-
import { compareTemporals, sortedTuple } from "./comparators.js";
|
|
3
2
|
import type { Interval } from "./interval.js";
|
|
3
|
+
import { compareTemporals, sortedTuple } from "./comparators.js";
|
|
4
4
|
|
|
5
5
|
/**
|
|
6
6
|
* Checks if two intervals overlap.
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import type { TemporalComparable } from "./comparators.js";
|
|
2
|
-
import { compareTemporals, sortedTuple } from "./comparators.js";
|
|
3
2
|
import type { Interval } from "./interval.js";
|
|
3
|
+
import { compareTemporals, sortedTuple } from "./comparators.js";
|
|
4
4
|
|
|
5
5
|
export function isWithinInterval<T extends TemporalComparable>(
|
|
6
6
|
value: T,
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import type { TemporalComparable } from "./comparators.js";
|
|
2
|
-
import { sortedTuple } from "./comparators.js";
|
|
3
2
|
import type { Interval } from "./interval.js";
|
|
3
|
+
import { sortedTuple } from "./comparators.js";
|
|
4
4
|
|
|
5
5
|
export const sortInterval = <T extends TemporalComparable>(
|
|
6
6
|
interval: Interval<T>,
|