@bitblit/ngx-acute-common 5.0.515-alpha → 5.0.516-alpha

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.
Files changed (28) hide show
  1. package/lib/esm2022/ngx-acute-common.mjs +514 -0
  2. package/lib/esm2022/ngx-acute-common.mjs.map +1 -0
  3. package/package.json +5 -10
  4. package/lib/my-angular-library.cjs.js +0 -7
  5. package/lib/my-angular-library.cjs.js.map +0 -1
  6. package/lib/my-angular-library.esm.js +0 -7
  7. package/lib/my-angular-library.esm.js.map +0 -1
  8. package/lib/my-angular-library.umd.js +0 -7
  9. package/lib/my-angular-library.umd.js.map +0 -1
  10. /package/lib/{build → esm2022/build}/ngx-acute-common-info.d.ts +0 -0
  11. /package/lib/{components → esm2022/components}/dialogs/alert/alert.component.d.ts +0 -0
  12. /package/lib/{components → esm2022/components}/dialogs/block-ui/block-ui.component.d.ts +0 -0
  13. /package/lib/{index.d.ts → esm2022/index.d.ts} +0 -0
  14. /package/lib/{model → esm2022/model}/google-analytics-config.d.ts +0 -0
  15. /package/lib/{pipes → esm2022/pipes}/capitalize.pipe.d.ts +0 -0
  16. /package/lib/{pipes → esm2022/pipes}/dollar-formatted.pipe.d.ts +0 -0
  17. /package/lib/{pipes → esm2022/pipes}/map-values.pipe.d.ts +0 -0
  18. /package/lib/{pipes → esm2022/pipes}/number-with-commas.pipe.d.ts +0 -0
  19. /package/lib/{pipes → esm2022/pipes}/order-by.pipe.d.ts +0 -0
  20. /package/lib/{pipes → esm2022/pipes}/percent-formatted.pipe.d.ts +0 -0
  21. /package/lib/{pipes → esm2022/pipes}/plural.pipe.d.ts +0 -0
  22. /package/lib/{pipes → esm2022/pipes}/round.pipe.d.ts +0 -0
  23. /package/lib/{pipes → esm2022/pipes}/time-ago-formatted.pipe.d.ts +0 -0
  24. /package/lib/{pipes → esm2022/pipes}/timing.pipe.d.ts +0 -0
  25. /package/lib/{services → esm2022/services}/google-analytics.service.d.ts +0 -0
  26. /package/lib/{services → esm2022/services}/graphql-query.service.d.ts +0 -0
  27. /package/lib/{services → esm2022/services}/local-storage.service.d.ts +0 -0
  28. /package/lib/{services → esm2022/services}/window-ref.service.d.ts +0 -0
@@ -1 +0,0 @@
1
- {"version":3,"file":"my-angular-library.cjs.js","sources":["../../../node_modules/@angular/animations/fesm2022/animations.mjs","../../../node_modules/primeng/fesm2022/primeng-dom.mjs","../../../node_modules/primeng/fesm2022/primeng-utils.mjs","../../../node_modules/primeng/fesm2022/primeng-api.mjs","../../../node_modules/primeng/fesm2022/primeng-focustrap.mjs","../../../node_modules/primeng/fesm2022/primeng-baseicon.mjs","../../../node_modules/primeng/fesm2022/primeng-icons-times.mjs","../../../node_modules/primeng/fesm2022/primeng-icons-windowmaximize.mjs","../../../node_modules/primeng/fesm2022/primeng-icons-windowminimize.mjs","../../../node_modules/primeng/fesm2022/primeng-dynamicdialog.mjs","../../common/lib/logger/logger-level-name.js","../../common/lib/logger/logger-ring-buffer.js","../../common/lib/logger/logger-output-function.js","../../common/lib/logger/logger-util.js","../../common/lib/logger/log-message-format-type.js","../../common/lib/lang/require-ratchet.js","../../common/lib/lang/string-ratchet.js","../../common/lib/logger/classic-single-line-log-message-formatter.js","../../common/lib/logger/none-log-message-formatter.js","../../common/lib/logger/structured-json-log-message-formatter.js","../../common/lib/logger/logger-instance.js","../../common/lib/logger/logger.js","../src/components/dialogs/alert/alert.component.ts","../../../node_modules/primeng/fesm2022/primeng-progressspinner.mjs","../src/components/dialogs/block-ui/block-ui.component.ts","../src/pipes/capitalize.pipe.ts","../../common/lib/lang/currency-ratchet.js","../src/pipes/dollar-formatted.pipe.ts","../src/pipes/map-values.pipe.ts","../src/pipes/number-with-commas.pipe.ts","../src/pipes/order-by.pipe.ts","../../common/lib/lang/number-ratchet.js","../src/pipes/percent-formatted.pipe.ts","../src/pipes/plural.pipe.ts","../src/pipes/round.pipe.ts","../../../node_modules/luxon/src/errors.js","../../../node_modules/luxon/src/impl/formats.js","../../../node_modules/luxon/src/zone.js","../../../node_modules/luxon/src/zones/systemZone.js","../../../node_modules/luxon/src/zones/IANAZone.js","../../../node_modules/luxon/src/impl/locale.js","../../../node_modules/luxon/src/impl/english.js","../../../node_modules/luxon/src/zones/fixedOffsetZone.js","../../../node_modules/luxon/src/zones/invalidZone.js","../../../node_modules/luxon/src/impl/zoneUtil.js","../../../node_modules/luxon/src/impl/util.js","../../../node_modules/luxon/src/impl/digits.js","../../../node_modules/luxon/src/settings.js","../../../node_modules/luxon/src/impl/invalid.js","../../../node_modules/luxon/src/impl/conversions.js","../../../node_modules/luxon/src/impl/formatter.js","../../../node_modules/luxon/src/impl/regexParser.js","../../../node_modules/luxon/src/duration.js","../../../node_modules/luxon/src/interval.js","../../../node_modules/luxon/src/info.js","../../../node_modules/luxon/src/impl/diff.js","../../../node_modules/luxon/src/impl/tokenParser.js","../../../node_modules/luxon/src/datetime.js","../../common/lib/lang/duration-ratchet.js","../src/pipes/time-ago-formatted.pipe.ts","../src/pipes/timing.pipe.ts","../src/services/google-analytics.service.ts","../../graphql/lib/graphql/provider/default-graphql-ratchet-error-handler.js","../../common/lib/lang/error-ratchet.js","../../../node_modules/graphql-request/build/legacy/classes/ClientError.js","../../../node_modules/graphql-request/build/lib/prelude.js","../../../node_modules/graphql/jsutils/devAssert.mjs","../../../node_modules/graphql/jsutils/invariant.mjs","../../../node_modules/graphql/language/location.mjs","../../../node_modules/graphql/language/printLocation.mjs","../../../node_modules/graphql/error/GraphQLError.mjs","../../../node_modules/graphql/jsutils/isObjectLike.mjs","../../../node_modules/graphql/error/syntaxError.mjs","../../../node_modules/graphql/language/ast.mjs","../../../node_modules/graphql/language/directiveLocation.mjs","../../../node_modules/graphql/language/kinds.mjs","../../../node_modules/graphql/language/tokenKind.mjs","../../../node_modules/graphql/language/characterClasses.mjs","../../../node_modules/graphql/language/blockString.mjs","../../../node_modules/graphql/language/lexer.mjs","../../../node_modules/graphql/jsutils/inspect.mjs","../../../node_modules/graphql/jsutils/instanceOf.mjs","../../../node_modules/graphql/language/source.mjs","../../../node_modules/graphql/language/parser.mjs","../../../node_modules/graphql/language/printString.mjs","../../../node_modules/graphql/language/visitor.mjs","../../../node_modules/graphql/language/printer.mjs","../../../node_modules/graphql-request/build/lib/http.js","../../../node_modules/graphql-request/build/legacy/lib/graphql.js","../../../node_modules/graphql-request/build/legacy/helpers/analyzeDocument.js","../../../node_modules/graphql-request/build/legacy/helpers/defaultJsonSerializer.js","../../../node_modules/graphql-request/build/legacy/helpers/runRequest.js","../../../node_modules/graphql-request/build/legacy/classes/GraphQLClient.js","../../../node_modules/graphql-request/build/legacy/functions/rawRequest.js","../../../node_modules/graphql-request/build/legacy/functions/batchRequests.js","../../../node_modules/graphql-request/build/legacy/functions/request.js","../../graphql/lib/graphql/authorization-style.js","../../graphql/lib/graphql/graphql-ratchet.js","../src/services/local-storage.service.ts","../src/services/graphql-query.service.ts","../src/services/window-ref.service.ts","../src/build/ngx-acute-common-info.ts"],"sourcesContent":["/**\n * @license Angular v18.2.8\n * (c) 2010-2024 Google LLC. https://angular.io/\n * License: MIT\n */\n\nimport { DOCUMENT } from '@angular/common';\nimport * as i0 from '@angular/core';\nimport { inject, Injectable, ANIMATION_MODULE_TYPE, ViewEncapsulation, ɵRuntimeError, Inject } from '@angular/core';\n\n/**\n * @description Constants for the categories of parameters that can be defined for animations.\n *\n * A corresponding function defines a set of parameters for each category, and\n * collects them into a corresponding `AnimationMetadata` object.\n *\n * @publicApi\n */\nvar AnimationMetadataType;\n(function (AnimationMetadataType) {\n /**\n * Associates a named animation state with a set of CSS styles.\n * See [`state()`](api/animations/state)\n */\n AnimationMetadataType[AnimationMetadataType[\"State\"] = 0] = \"State\";\n /**\n * Data for a transition from one animation state to another.\n * See `transition()`\n */\n AnimationMetadataType[AnimationMetadataType[\"Transition\"] = 1] = \"Transition\";\n /**\n * Contains a set of animation steps.\n * See `sequence()`\n */\n AnimationMetadataType[AnimationMetadataType[\"Sequence\"] = 2] = \"Sequence\";\n /**\n * Contains a set of animation steps.\n * See `{@link animations/group group()}`\n */\n AnimationMetadataType[AnimationMetadataType[\"Group\"] = 3] = \"Group\";\n /**\n * Contains an animation step.\n * See `animate()`\n */\n AnimationMetadataType[AnimationMetadataType[\"Animate\"] = 4] = \"Animate\";\n /**\n * Contains a set of animation steps.\n * See `keyframes()`\n */\n AnimationMetadataType[AnimationMetadataType[\"Keyframes\"] = 5] = \"Keyframes\";\n /**\n * Contains a set of CSS property-value pairs into a named style.\n * See `style()`\n */\n AnimationMetadataType[AnimationMetadataType[\"Style\"] = 6] = \"Style\";\n /**\n * Associates an animation with an entry trigger that can be attached to an element.\n * See `trigger()`\n */\n AnimationMetadataType[AnimationMetadataType[\"Trigger\"] = 7] = \"Trigger\";\n /**\n * Contains a re-usable animation.\n * See `animation()`\n */\n AnimationMetadataType[AnimationMetadataType[\"Reference\"] = 8] = \"Reference\";\n /**\n * Contains data to use in executing child animations returned by a query.\n * See `animateChild()`\n */\n AnimationMetadataType[AnimationMetadataType[\"AnimateChild\"] = 9] = \"AnimateChild\";\n /**\n * Contains animation parameters for a re-usable animation.\n * See `useAnimation()`\n */\n AnimationMetadataType[AnimationMetadataType[\"AnimateRef\"] = 10] = \"AnimateRef\";\n /**\n * Contains child-animation query data.\n * See `query()`\n */\n AnimationMetadataType[AnimationMetadataType[\"Query\"] = 11] = \"Query\";\n /**\n * Contains data for staggering an animation sequence.\n * See `stagger()`\n */\n AnimationMetadataType[AnimationMetadataType[\"Stagger\"] = 12] = \"Stagger\";\n})(AnimationMetadataType || (AnimationMetadataType = {}));\n/**\n * Specifies automatic styling.\n *\n * @publicApi\n */\nconst AUTO_STYLE = '*';\n/**\n * Creates a named animation trigger, containing a list of [`state()`](api/animations/state)\n * and `transition()` entries to be evaluated when the expression\n * bound to the trigger changes.\n *\n * @param name An identifying string.\n * @param definitions An animation definition object, containing an array of\n * [`state()`](api/animations/state) and `transition()` declarations.\n *\n * @return An object that encapsulates the trigger data.\n *\n * @usageNotes\n * Define an animation trigger in the `animations` section of `@Component` metadata.\n * In the template, reference the trigger by name and bind it to a trigger expression that\n * evaluates to a defined animation state, using the following format:\n *\n * `[@triggerName]=\"expression\"`\n *\n * Animation trigger bindings convert all values to strings, and then match the\n * previous and current values against any linked transitions.\n * Booleans can be specified as `1` or `true` and `0` or `false`.\n *\n * ### Usage Example\n *\n * The following example creates an animation trigger reference based on the provided\n * name value.\n * The provided animation value is expected to be an array consisting of state and\n * transition declarations.\n *\n * ```typescript\n * @Component({\n * selector: \"my-component\",\n * templateUrl: \"my-component-tpl.html\",\n * animations: [\n * trigger(\"myAnimationTrigger\", [\n * state(...),\n * state(...),\n * transition(...),\n * transition(...)\n * ])\n * ]\n * })\n * class MyComponent {\n * myStatusExp = \"something\";\n * }\n * ```\n *\n * The template associated with this component makes use of the defined trigger\n * by binding to an element within its template code.\n *\n * ```html\n * <!-- somewhere inside of my-component-tpl.html -->\n * <div [@myAnimationTrigger]=\"myStatusExp\">...</div>\n * ```\n *\n * ### Using an inline function\n * The `transition` animation method also supports reading an inline function which can decide\n * if its associated animation should be run.\n *\n * ```typescript\n * // this method is run each time the `myAnimationTrigger` trigger value changes.\n * function myInlineMatcherFn(fromState: string, toState: string, element: any, params: {[key:\n string]: any}): boolean {\n * // notice that `element` and `params` are also available here\n * return toState == 'yes-please-animate';\n * }\n *\n * @Component({\n * selector: 'my-component',\n * templateUrl: 'my-component-tpl.html',\n * animations: [\n * trigger('myAnimationTrigger', [\n * transition(myInlineMatcherFn, [\n * // the animation sequence code\n * ]),\n * ])\n * ]\n * })\n * class MyComponent {\n * myStatusExp = \"yes-please-animate\";\n * }\n * ```\n *\n * ### Disabling Animations\n * When true, the special animation control binding `@.disabled` binding prevents\n * all animations from rendering.\n * Place the `@.disabled` binding on an element to disable\n * animations on the element itself, as well as any inner animation triggers\n * within the element.\n *\n * The following example shows how to use this feature:\n *\n * ```typescript\n * @Component({\n * selector: 'my-component',\n * template: `\n * <div [@.disabled]=\"isDisabled\">\n * <div [@childAnimation]=\"exp\"></div>\n * </div>\n * `,\n * animations: [\n * trigger(\"childAnimation\", [\n * // ...\n * ])\n * ]\n * })\n * class MyComponent {\n * isDisabled = true;\n * exp = '...';\n * }\n * ```\n *\n * When `@.disabled` is true, it prevents the `@childAnimation` trigger from animating,\n * along with any inner animations.\n *\n * ### Disable animations application-wide\n * When an area of the template is set to have animations disabled,\n * **all** inner components have their animations disabled as well.\n * This means that you can disable all animations for an app\n * by placing a host binding set on `@.disabled` on the topmost Angular component.\n *\n * ```typescript\n * import {Component, HostBinding} from '@angular/core';\n *\n * @Component({\n * selector: 'app-component',\n * templateUrl: 'app.component.html',\n * })\n * class AppComponent {\n * @HostBinding('@.disabled')\n * public animationsDisabled = true;\n * }\n * ```\n *\n * ### Overriding disablement of inner animations\n * Despite inner animations being disabled, a parent animation can `query()`\n * for inner elements located in disabled areas of the template and still animate\n * them if needed. This is also the case for when a sub animation is\n * queried by a parent and then later animated using `animateChild()`.\n *\n * ### Detecting when an animation is disabled\n * If a region of the DOM (or the entire application) has its animations disabled, the animation\n * trigger callbacks still fire, but for zero seconds. When the callback fires, it provides\n * an instance of an `AnimationEvent`. If animations are disabled,\n * the `.disabled` flag on the event is true.\n *\n * @publicApi\n */\nfunction trigger(name, definitions) {\n return { type: AnimationMetadataType.Trigger, name, definitions, options: {} };\n}\n/**\n * Defines an animation step that combines styling information with timing information.\n *\n * @param timings Sets `AnimateTimings` for the parent animation.\n * A string in the format \"duration [delay] [easing]\".\n * - Duration and delay are expressed as a number and optional time unit,\n * such as \"1s\" or \"10ms\" for one second and 10 milliseconds, respectively.\n * The default unit is milliseconds.\n * - The easing value controls how the animation accelerates and decelerates\n * during its runtime. Value is one of `ease`, `ease-in`, `ease-out`,\n * `ease-in-out`, or a `cubic-bezier()` function call.\n * If not supplied, no easing is applied.\n *\n * For example, the string \"1s 100ms ease-out\" specifies a duration of\n * 1000 milliseconds, and delay of 100 ms, and the \"ease-out\" easing style,\n * which decelerates near the end of the duration.\n * @param styles Sets AnimationStyles for the parent animation.\n * A function call to either `style()` or `keyframes()`\n * that returns a collection of CSS style entries to be applied to the parent animation.\n * When null, uses the styles from the destination state.\n * This is useful when describing an animation step that will complete an animation;\n * see \"Animating to the final state\" in `transitions()`.\n * @returns An object that encapsulates the animation step.\n *\n * @usageNotes\n * Call within an animation `sequence()`, `{@link animations/group group()}`, or\n * `transition()` call to specify an animation step\n * that applies given style data to the parent animation for a given amount of time.\n *\n * ### Syntax Examples\n * **Timing examples**\n *\n * The following examples show various `timings` specifications.\n * - `animate(500)` : Duration is 500 milliseconds.\n * - `animate(\"1s\")` : Duration is 1000 milliseconds.\n * - `animate(\"100ms 0.5s\")` : Duration is 100 milliseconds, delay is 500 milliseconds.\n * - `animate(\"5s ease-in\")` : Duration is 5000 milliseconds, easing in.\n * - `animate(\"5s 10ms cubic-bezier(.17,.67,.88,.1)\")` : Duration is 5000 milliseconds, delay is 10\n * milliseconds, easing according to a bezier curve.\n *\n * **Style examples**\n *\n * The following example calls `style()` to set a single CSS style.\n * ```typescript\n * animate(500, style({ background: \"red\" }))\n * ```\n * The following example calls `keyframes()` to set a CSS style\n * to different values for successive keyframes.\n * ```typescript\n * animate(500, keyframes(\n * [\n * style({ background: \"blue\" }),\n * style({ background: \"red\" })\n * ])\n * ```\n *\n * @publicApi\n */\nfunction animate(timings, styles = null) {\n return { type: AnimationMetadataType.Animate, styles, timings };\n}\n/**\n * @description Defines a list of animation steps to be run in parallel.\n *\n * @param steps An array of animation step objects.\n * - When steps are defined by `style()` or `animate()`\n * function calls, each call within the group is executed instantly.\n * - To specify offset styles to be applied at a later time, define steps with\n * `keyframes()`, or use `animate()` calls with a delay value.\n * For example:\n *\n * ```typescript\n * group([\n * animate(\"1s\", style({ background: \"black\" })),\n * animate(\"2s\", style({ color: \"white\" }))\n * ])\n * ```\n *\n * @param options An options object containing a delay and\n * developer-defined parameters that provide styling defaults and\n * can be overridden on invocation.\n *\n * @return An object that encapsulates the group data.\n *\n * @usageNotes\n * Grouped animations are useful when a series of styles must be\n * animated at different starting times and closed off at different ending times.\n *\n * When called within a `sequence()` or a\n * `transition()` call, does not continue to the next\n * instruction until all of the inner animation steps have completed.\n *\n * @publicApi\n */\nfunction group(steps, options = null) {\n return { type: AnimationMetadataType.Group, steps, options };\n}\n/**\n * Defines a list of animation steps to be run sequentially, one by one.\n *\n * @param steps An array of animation step objects.\n * - Steps defined by `style()` calls apply the styling data immediately.\n * - Steps defined by `animate()` calls apply the styling data over time\n * as specified by the timing data.\n *\n * ```typescript\n * sequence([\n * style({ opacity: 0 }),\n * animate(\"1s\", style({ opacity: 1 }))\n * ])\n * ```\n *\n * @param options An options object containing a delay and\n * developer-defined parameters that provide styling defaults and\n * can be overridden on invocation.\n *\n * @return An object that encapsulates the sequence data.\n *\n * @usageNotes\n * When you pass an array of steps to a\n * `transition()` call, the steps run sequentially by default.\n * Compare this to the `{@link animations/group group()}` call, which runs animation steps in\n *parallel.\n *\n * When a sequence is used within a `{@link animations/group group()}` or a `transition()` call,\n * execution continues to the next instruction only after each of the inner animation\n * steps have completed.\n *\n * @publicApi\n **/\nfunction sequence(steps, options = null) {\n return { type: AnimationMetadataType.Sequence, steps, options };\n}\n/**\n * Declares a key/value object containing CSS properties/styles that\n * can then be used for an animation [`state`](api/animations/state), within an animation\n *`sequence`, or as styling data for calls to `animate()` and `keyframes()`.\n *\n * @param tokens A set of CSS styles or HTML styles associated with an animation state.\n * The value can be any of the following:\n * - A key-value style pair associating a CSS property with a value.\n * - An array of key-value style pairs.\n * - An asterisk (*), to use auto-styling, where styles are derived from the element\n * being animated and applied to the animation when it starts.\n *\n * Auto-styling can be used to define a state that depends on layout or other\n * environmental factors.\n *\n * @return An object that encapsulates the style data.\n *\n * @usageNotes\n * The following examples create animation styles that collect a set of\n * CSS property values:\n *\n * ```typescript\n * // string values for CSS properties\n * style({ background: \"red\", color: \"blue\" })\n *\n * // numerical pixel values\n * style({ width: 100, height: 0 })\n * ```\n *\n * The following example uses auto-styling to allow an element to animate from\n * a height of 0 up to its full height:\n *\n * ```\n * style({ height: 0 }),\n * animate(\"1s\", style({ height: \"*\" }))\n * ```\n *\n * @publicApi\n **/\nfunction style(tokens) {\n return { type: AnimationMetadataType.Style, styles: tokens, offset: null };\n}\n/**\n * Declares an animation state within a trigger attached to an element.\n *\n * @param name One or more names for the defined state in a comma-separated string.\n * The following reserved state names can be supplied to define a style for specific use\n * cases:\n *\n * - `void` You can associate styles with this name to be used when\n * the element is detached from the application. For example, when an `ngIf` evaluates\n * to false, the state of the associated element is void.\n * - `*` (asterisk) Indicates the default state. You can associate styles with this name\n * to be used as the fallback when the state that is being animated is not declared\n * within the trigger.\n *\n * @param styles A set of CSS styles associated with this state, created using the\n * `style()` function.\n * This set of styles persists on the element once the state has been reached.\n * @param options Parameters that can be passed to the state when it is invoked.\n * 0 or more key-value pairs.\n * @return An object that encapsulates the new state data.\n *\n * @usageNotes\n * Use the `trigger()` function to register states to an animation trigger.\n * Use the `transition()` function to animate between states.\n * When a state is active within a component, its associated styles persist on the element,\n * even when the animation ends.\n *\n * @publicApi\n **/\nfunction state(name, styles, options) {\n return { type: AnimationMetadataType.State, name, styles, options };\n}\n/**\n * Defines a set of animation styles, associating each style with an optional `offset` value.\n *\n * @param steps A set of animation styles with optional offset data.\n * The optional `offset` value for a style specifies a percentage of the total animation\n * time at which that style is applied.\n * @returns An object that encapsulates the keyframes data.\n *\n * @usageNotes\n * Use with the `animate()` call. Instead of applying animations\n * from the current state\n * to the destination state, keyframes describe how each style entry is applied and at what point\n * within the animation arc.\n * Compare [CSS Keyframe Animations](https://www.w3schools.com/css/css3_animations.asp).\n *\n * ### Usage\n *\n * In the following example, the offset values describe\n * when each `backgroundColor` value is applied. The color is red at the start, and changes to\n * blue when 20% of the total time has elapsed.\n *\n * ```typescript\n * // the provided offset values\n * animate(\"5s\", keyframes([\n * style({ backgroundColor: \"red\", offset: 0 }),\n * style({ backgroundColor: \"blue\", offset: 0.2 }),\n * style({ backgroundColor: \"orange\", offset: 0.3 }),\n * style({ backgroundColor: \"black\", offset: 1 })\n * ]))\n * ```\n *\n * If there are no `offset` values specified in the style entries, the offsets\n * are calculated automatically.\n *\n * ```typescript\n * animate(\"5s\", keyframes([\n * style({ backgroundColor: \"red\" }) // offset = 0\n * style({ backgroundColor: \"blue\" }) // offset = 0.33\n * style({ backgroundColor: \"orange\" }) // offset = 0.66\n * style({ backgroundColor: \"black\" }) // offset = 1\n * ]))\n *```\n\n * @publicApi\n */\nfunction keyframes(steps) {\n return { type: AnimationMetadataType.Keyframes, steps };\n}\n/**\n * Declares an animation transition which is played when a certain specified condition is met.\n *\n * @param stateChangeExpr A string with a specific format or a function that specifies when the\n * animation transition should occur (see [State Change Expression](#state-change-expression)).\n *\n * @param steps One or more animation objects that represent the animation's instructions.\n *\n * @param options An options object that can be used to specify a delay for the animation or provide\n * custom parameters for it.\n *\n * @returns An object that encapsulates the transition data.\n *\n * @usageNotes\n *\n * ### State Change Expression\n *\n * The State Change Expression instructs Angular when to run the transition's animations, it can\n *either be\n * - a string with a specific syntax\n * - or a function that compares the previous and current state (value of the expression bound to\n * the element's trigger) and returns `true` if the transition should occur or `false` otherwise\n *\n * The string format can be:\n * - `fromState => toState`, which indicates that the transition's animations should occur then the\n * expression bound to the trigger's element goes from `fromState` to `toState`\n *\n * _Example:_\n * ```typescript\n * transition('open => closed', animate('.5s ease-out', style({ height: 0 }) ))\n * ```\n *\n * - `fromState <=> toState`, which indicates that the transition's animations should occur then\n * the expression bound to the trigger's element goes from `fromState` to `toState` or vice versa\n *\n * _Example:_\n * ```typescript\n * transition('enabled <=> disabled', animate('1s cubic-bezier(0.8,0.3,0,1)'))\n * ```\n *\n * - `:enter`/`:leave`, which indicates that the transition's animations should occur when the\n * element enters or exists the DOM\n *\n * _Example:_\n * ```typescript\n * transition(':enter', [\n * style({ opacity: 0 }),\n * animate('500ms', style({ opacity: 1 }))\n * ])\n * ```\n *\n * - `:increment`/`:decrement`, which indicates that the transition's animations should occur when\n * the numerical expression bound to the trigger's element has increased in value or decreased\n *\n * _Example:_\n * ```typescript\n * transition(':increment', query('@counter', animateChild()))\n * ```\n *\n * - a sequence of any of the above divided by commas, which indicates that transition's animations\n * should occur whenever one of the state change expressions matches\n *\n * _Example:_\n * ```typescript\n * transition(':increment, * => enabled, :enter', animate('1s ease', keyframes([\n * style({ transform: 'scale(1)', offset: 0}),\n * style({ transform: 'scale(1.1)', offset: 0.7}),\n * style({ transform: 'scale(1)', offset: 1})\n * ]))),\n * ```\n *\n * Also note that in such context:\n * - `void` can be used to indicate the absence of the element\n * - asterisks can be used as wildcards that match any state\n * - (as a consequence of the above, `void => *` is equivalent to `:enter` and `* => void` is\n * equivalent to `:leave`)\n * - `true` and `false` also match expression values of `1` and `0` respectively (but do not match\n * _truthy_ and _falsy_ values)\n *\n * <div class=\"alert is-helpful\">\n *\n * Be careful about entering end leaving elements as their transitions present a common\n * pitfall for developers.\n *\n * Note that when an element with a trigger enters the DOM its `:enter` transition always\n * gets executed, but its `:leave` transition will not be executed if the element is removed\n * alongside its parent (as it will be removed \"without warning\" before its transition has\n * a chance to be executed, the only way that such transition can occur is if the element\n * is exiting the DOM on its own).\n *\n *\n * </div>\n *\n * ### Animating to a Final State\n *\n * If the final step in a transition is a call to `animate()` that uses a timing value\n * with no `style` data, that step is automatically considered the final animation arc,\n * for the element to reach the final state, in such case Angular automatically adds or removes\n * CSS styles to ensure that the element is in the correct final state.\n *\n *\n * ### Usage Examples\n *\n * - Transition animations applied based on\n * the trigger's expression value\n *\n * ```html\n * <div [@myAnimationTrigger]=\"myStatusExp\">\n * ...\n * </div>\n * ```\n *\n * ```typescript\n * trigger(\"myAnimationTrigger\", [\n * ..., // states\n * transition(\"on => off, open => closed\", animate(500)),\n * transition(\"* <=> error\", query('.indicator', animateChild()))\n * ])\n * ```\n *\n * - Transition animations applied based on custom logic dependent\n * on the trigger's expression value and provided parameters\n *\n * ```html\n * <div [@myAnimationTrigger]=\"{\n * value: stepName,\n * params: { target: currentTarget }\n * }\">\n * ...\n * </div>\n * ```\n *\n * ```typescript\n * trigger(\"myAnimationTrigger\", [\n * ..., // states\n * transition(\n * (fromState, toState, _element, params) =>\n * ['firststep', 'laststep'].includes(fromState.toLowerCase())\n * && toState === params?.['target'],\n * animate('1s')\n * )\n * ])\n * ```\n *\n * @publicApi\n **/\nfunction transition(stateChangeExpr, steps, options = null) {\n return { type: AnimationMetadataType.Transition, expr: stateChangeExpr, animation: steps, options };\n}\n/**\n * Produces a reusable animation that can be invoked in another animation or sequence,\n * by calling the `useAnimation()` function.\n *\n * @param steps One or more animation objects, as returned by the `animate()`\n * or `sequence()` function, that form a transformation from one state to another.\n * A sequence is used by default when you pass an array.\n * @param options An options object that can contain a delay value for the start of the\n * animation, and additional developer-defined parameters.\n * Provided values for additional parameters are used as defaults,\n * and override values can be passed to the caller on invocation.\n * @returns An object that encapsulates the animation data.\n *\n * @usageNotes\n * The following example defines a reusable animation, providing some default parameter\n * values.\n *\n * ```typescript\n * var fadeAnimation = animation([\n * style({ opacity: '{{ start }}' }),\n * animate('{{ time }}',\n * style({ opacity: '{{ end }}'}))\n * ],\n * { params: { time: '1000ms', start: 0, end: 1 }});\n * ```\n *\n * The following invokes the defined animation with a call to `useAnimation()`,\n * passing in override parameter values.\n *\n * ```js\n * useAnimation(fadeAnimation, {\n * params: {\n * time: '2s',\n * start: 1,\n * end: 0\n * }\n * })\n * ```\n *\n * If any of the passed-in parameter values are missing from this call,\n * the default values are used. If one or more parameter values are missing before a step is\n * animated, `useAnimation()` throws an error.\n *\n * @publicApi\n */\nfunction animation(steps, options = null) {\n return { type: AnimationMetadataType.Reference, animation: steps, options };\n}\n/**\n * Executes a queried inner animation element within an animation sequence.\n *\n * @param options An options object that can contain a delay value for the start of the\n * animation, and additional override values for developer-defined parameters.\n * @return An object that encapsulates the child animation data.\n *\n * @usageNotes\n * Each time an animation is triggered in Angular, the parent animation\n * has priority and any child animations are blocked. In order\n * for a child animation to run, the parent animation must query each of the elements\n * containing child animations, and run them using this function.\n *\n * Note that this feature is designed to be used with `query()` and it will only work\n * with animations that are assigned using the Angular animation library. CSS keyframes\n * and transitions are not handled by this API.\n *\n * @publicApi\n */\nfunction animateChild(options = null) {\n return { type: AnimationMetadataType.AnimateChild, options };\n}\n/**\n * Starts a reusable animation that is created using the `animation()` function.\n *\n * @param animation The reusable animation to start.\n * @param options An options object that can contain a delay value for the start of\n * the animation, and additional override values for developer-defined parameters.\n * @return An object that contains the animation parameters.\n *\n * @publicApi\n */\nfunction useAnimation(animation, options = null) {\n return { type: AnimationMetadataType.AnimateRef, animation, options };\n}\n/**\n * Finds one or more inner elements within the current element that is\n * being animated within a sequence. Use with `animate()`.\n *\n * @param selector The element to query, or a set of elements that contain Angular-specific\n * characteristics, specified with one or more of the following tokens.\n * - `query(\":enter\")` or `query(\":leave\")` : Query for newly inserted/removed elements (not\n * all elements can be queried via these tokens, see\n * [Entering and Leaving Elements](#entering-and-leaving-elements))\n * - `query(\":animating\")` : Query all currently animating elements.\n * - `query(\"@triggerName\")` : Query elements that contain an animation trigger.\n * - `query(\"@*\")` : Query all elements that contain an animation triggers.\n * - `query(\":self\")` : Include the current element into the animation sequence.\n *\n * @param animation One or more animation steps to apply to the queried element or elements.\n * An array is treated as an animation sequence.\n * @param options An options object. Use the 'limit' field to limit the total number of\n * items to collect.\n * @return An object that encapsulates the query data.\n *\n * @usageNotes\n *\n * ### Multiple Tokens\n *\n * Tokens can be merged into a combined query selector string. For example:\n *\n * ```typescript\n * query(':self, .record:enter, .record:leave, @subTrigger', [...])\n * ```\n *\n * The `query()` function collects multiple elements and works internally by using\n * `element.querySelectorAll`. Use the `limit` field of an options object to limit\n * the total number of items to be collected. For example:\n *\n * ```js\n * query('div', [\n * animate(...),\n * animate(...)\n * ], { limit: 1 })\n * ```\n *\n * By default, throws an error when zero items are found. Set the\n * `optional` flag to ignore this error. For example:\n *\n * ```js\n * query('.some-element-that-may-not-be-there', [\n * animate(...),\n * animate(...)\n * ], { optional: true })\n * ```\n *\n * ### Entering and Leaving Elements\n *\n * Not all elements can be queried via the `:enter` and `:leave` tokens, the only ones\n * that can are those that Angular assumes can enter/leave based on their own logic\n * (if their insertion/removal is simply a consequence of that of their parent they\n * should be queried via a different token in their parent's `:enter`/`:leave` transitions).\n *\n * The only elements Angular assumes can enter/leave based on their own logic (thus the only\n * ones that can be queried via the `:enter` and `:leave` tokens) are:\n * - Those inserted dynamically (via `ViewContainerRef`)\n * - Those that have a structural directive (which, under the hood, are a subset of the above ones)\n *\n * <div class=\"alert is-helpful\">\n *\n * Note that elements will be successfully queried via `:enter`/`:leave` even if their\n * insertion/removal is not done manually via `ViewContainerRef`or caused by their structural\n * directive (e.g. they enter/exit alongside their parent).\n *\n * </div>\n *\n * <div class=\"alert is-important\">\n *\n * There is an exception to what previously mentioned, besides elements entering/leaving based on\n * their own logic, elements with an animation trigger can always be queried via `:leave` when\n * their parent is also leaving.\n *\n * </div>\n *\n * ### Usage Example\n *\n * The following example queries for inner elements and animates them\n * individually using `animate()`.\n *\n * ```typescript\n * @Component({\n * selector: 'inner',\n * template: `\n * <div [@queryAnimation]=\"exp\">\n * <h1>Title</h1>\n * <div class=\"content\">\n * Blah blah blah\n * </div>\n * </div>\n * `,\n * animations: [\n * trigger('queryAnimation', [\n * transition('* => goAnimate', [\n * // hide the inner elements\n * query('h1', style({ opacity: 0 })),\n * query('.content', style({ opacity: 0 })),\n *\n * // animate the inner elements in, one by one\n * query('h1', animate(1000, style({ opacity: 1 }))),\n * query('.content', animate(1000, style({ opacity: 1 }))),\n * ])\n * ])\n * ]\n * })\n * class Cmp {\n * exp = '';\n *\n * goAnimate() {\n * this.exp = 'goAnimate';\n * }\n * }\n * ```\n *\n * @publicApi\n */\nfunction query(selector, animation, options = null) {\n return { type: AnimationMetadataType.Query, selector, animation, options };\n}\n/**\n * Use within an animation `query()` call to issue a timing gap after\n * each queried item is animated.\n *\n * @param timings A delay value.\n * @param animation One ore more animation steps.\n * @returns An object that encapsulates the stagger data.\n *\n * @usageNotes\n * In the following example, a container element wraps a list of items stamped out\n * by an `ngFor`. The container element contains an animation trigger that will later be set\n * to query for each of the inner items.\n *\n * Each time items are added, the opacity fade-in animation runs,\n * and each removed item is faded out.\n * When either of these animations occur, the stagger effect is\n * applied after each item's animation is started.\n *\n * ```html\n * <!-- list.component.html -->\n * <button (click)=\"toggle()\">Show / Hide Items</button>\n * <hr />\n * <div [@listAnimation]=\"items.length\">\n * <div *ngFor=\"let item of items\">\n * {{ item }}\n * </div>\n * </div>\n * ```\n *\n * Here is the component code:\n *\n * ```typescript\n * import {trigger, transition, style, animate, query, stagger} from '@angular/animations';\n * @Component({\n * templateUrl: 'list.component.html',\n * animations: [\n * trigger('listAnimation', [\n * ...\n * ])\n * ]\n * })\n * class ListComponent {\n * items = [];\n *\n * showItems() {\n * this.items = [0,1,2,3,4];\n * }\n *\n * hideItems() {\n * this.items = [];\n * }\n *\n * toggle() {\n * this.items.length ? this.hideItems() : this.showItems();\n * }\n * }\n * ```\n *\n * Here is the animation trigger code:\n *\n * ```typescript\n * trigger('listAnimation', [\n * transition('* => *', [ // each time the binding value changes\n * query(':leave', [\n * stagger(100, [\n * animate('0.5s', style({ opacity: 0 }))\n * ])\n * ]),\n * query(':enter', [\n * style({ opacity: 0 }),\n * stagger(100, [\n * animate('0.5s', style({ opacity: 1 }))\n * ])\n * ])\n * ])\n * ])\n * ```\n *\n * @publicApi\n */\nfunction stagger(timings, animation) {\n return { type: AnimationMetadataType.Stagger, timings, animation };\n}\n\n/**\n * An injectable service that produces an animation sequence programmatically within an\n * Angular component or directive.\n * Provided by the `BrowserAnimationsModule` or `NoopAnimationsModule`.\n *\n * @usageNotes\n *\n * To use this service, add it to your component or directive as a dependency.\n * The service is instantiated along with your component.\n *\n * Apps do not typically need to create their own animation players, but if you\n * do need to, follow these steps:\n *\n * 1. Use the <code>[AnimationBuilder.build](api/animations/AnimationBuilder#build)()</code> method\n * to create a programmatic animation. The method returns an `AnimationFactory` instance.\n *\n * 2. Use the factory object to create an `AnimationPlayer` and attach it to a DOM element.\n *\n * 3. Use the player object to control the animation programmatically.\n *\n * For example:\n *\n * ```ts\n * // import the service from BrowserAnimationsModule\n * import {AnimationBuilder} from '@angular/animations';\n * // require the service as a dependency\n * class MyCmp {\n * constructor(private _builder: AnimationBuilder) {}\n *\n * makeAnimation(element: any) {\n * // first define a reusable animation\n * const myAnimation = this._builder.build([\n * style({ width: 0 }),\n * animate(1000, style({ width: '100px' }))\n * ]);\n *\n * // use the returned factory object to create a player\n * const player = myAnimation.create(element);\n *\n * player.play();\n * }\n * }\n * ```\n *\n * @publicApi\n */\nclass AnimationBuilder {\n static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: \"12.0.0\", version: \"18.2.8\", ngImport: i0, type: AnimationBuilder, deps: [], target: i0.ɵɵFactoryTarget.Injectable }); }\n static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: \"12.0.0\", version: \"18.2.8\", ngImport: i0, type: AnimationBuilder, providedIn: 'root', useFactory: () => inject(BrowserAnimationBuilder) }); }\n}\ni0.ɵɵngDeclareClassMetadata({ minVersion: \"12.0.0\", version: \"18.2.8\", ngImport: i0, type: AnimationBuilder, decorators: [{\n type: Injectable,\n args: [{ providedIn: 'root', useFactory: () => inject(BrowserAnimationBuilder) }]\n }] });\n/**\n * A factory object returned from the\n * <code>[AnimationBuilder.build](api/animations/AnimationBuilder#build)()</code>\n * method.\n *\n * @publicApi\n */\nclass AnimationFactory {\n}\nclass BrowserAnimationBuilder extends AnimationBuilder {\n constructor(rootRenderer, doc) {\n super();\n this.animationModuleType = inject(ANIMATION_MODULE_TYPE, { optional: true });\n this._nextAnimationId = 0;\n const typeData = {\n id: '0',\n encapsulation: ViewEncapsulation.None,\n styles: [],\n data: { animation: [] },\n };\n this._renderer = rootRenderer.createRenderer(doc.body, typeData);\n if (this.animationModuleType === null && !isAnimationRenderer(this._renderer)) {\n // We only support AnimationRenderer & DynamicDelegationRenderer for this AnimationBuilder\n throw new ɵRuntimeError(3600 /* RuntimeErrorCode.BROWSER_ANIMATION_BUILDER_INJECTED_WITHOUT_ANIMATIONS */, (typeof ngDevMode === 'undefined' || ngDevMode) &&\n 'Angular detected that the `AnimationBuilder` was injected, but animation support was not enabled. ' +\n 'Please make sure that you enable animations in your application by calling `provideAnimations()` or `provideAnimationsAsync()` function.');\n }\n }\n build(animation) {\n const id = this._nextAnimationId;\n this._nextAnimationId++;\n const entry = Array.isArray(animation) ? sequence(animation) : animation;\n issueAnimationCommand(this._renderer, null, id, 'register', [entry]);\n return new BrowserAnimationFactory(id, this._renderer);\n }\n static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: \"12.0.0\", version: \"18.2.8\", ngImport: i0, type: BrowserAnimationBuilder, deps: [{ token: i0.RendererFactory2 }, { token: DOCUMENT }], target: i0.ɵɵFactoryTarget.Injectable }); }\n static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: \"12.0.0\", version: \"18.2.8\", ngImport: i0, type: BrowserAnimationBuilder, providedIn: 'root' }); }\n}\ni0.ɵɵngDeclareClassMetadata({ minVersion: \"12.0.0\", version: \"18.2.8\", ngImport: i0, type: BrowserAnimationBuilder, decorators: [{\n type: Injectable,\n args: [{ providedIn: 'root' }]\n }], ctorParameters: () => [{ type: i0.RendererFactory2 }, { type: Document, decorators: [{\n type: Inject,\n args: [DOCUMENT]\n }] }] });\nclass BrowserAnimationFactory extends AnimationFactory {\n constructor(_id, _renderer) {\n super();\n this._id = _id;\n this._renderer = _renderer;\n }\n create(element, options) {\n return new RendererAnimationPlayer(this._id, element, options || {}, this._renderer);\n }\n}\nclass RendererAnimationPlayer {\n constructor(id, element, options, _renderer) {\n this.id = id;\n this.element = element;\n this._renderer = _renderer;\n this.parentPlayer = null;\n this._started = false;\n this.totalTime = 0;\n this._command('create', options);\n }\n _listen(eventName, callback) {\n return this._renderer.listen(this.element, `@@${this.id}:${eventName}`, callback);\n }\n _command(command, ...args) {\n issueAnimationCommand(this._renderer, this.element, this.id, command, args);\n }\n onDone(fn) {\n this._listen('done', fn);\n }\n onStart(fn) {\n this._listen('start', fn);\n }\n onDestroy(fn) {\n this._listen('destroy', fn);\n }\n init() {\n this._command('init');\n }\n hasStarted() {\n return this._started;\n }\n play() {\n this._command('play');\n this._started = true;\n }\n pause() {\n this._command('pause');\n }\n restart() {\n this._command('restart');\n }\n finish() {\n this._command('finish');\n }\n destroy() {\n this._command('destroy');\n }\n reset() {\n this._command('reset');\n this._started = false;\n }\n setPosition(p) {\n this._command('setPosition', p);\n }\n getPosition() {\n return unwrapAnimationRenderer(this._renderer)?.engine?.players[this.id]?.getPosition() ?? 0;\n }\n}\nfunction issueAnimationCommand(renderer, element, id, command, args) {\n renderer.setProperty(element, `@@${id}:${command}`, args);\n}\n/**\n * The following 2 methods cannot reference their correct types (AnimationRenderer &\n * DynamicDelegationRenderer) since this would introduce a import cycle.\n */\nfunction unwrapAnimationRenderer(renderer) {\n const type = renderer.ɵtype;\n if (type === 0 /* AnimationRendererType.Regular */) {\n return renderer;\n }\n else if (type === 1 /* AnimationRendererType.Delegated */) {\n return renderer.animationRenderer;\n }\n return null;\n}\nfunction isAnimationRenderer(renderer) {\n const type = renderer.ɵtype;\n return type === 0 /* AnimationRendererType.Regular */ || type === 1 /* AnimationRendererType.Delegated */;\n}\n\n/**\n * An empty programmatic controller for reusable animations.\n * Used internally when animations are disabled, to avoid\n * checking for the null case when an animation player is expected.\n *\n * @see {@link animate}\n * @see {@link AnimationPlayer}\n *\n * @publicApi\n */\nclass NoopAnimationPlayer {\n constructor(duration = 0, delay = 0) {\n this._onDoneFns = [];\n this._onStartFns = [];\n this._onDestroyFns = [];\n this._originalOnDoneFns = [];\n this._originalOnStartFns = [];\n this._started = false;\n this._destroyed = false;\n this._finished = false;\n this._position = 0;\n this.parentPlayer = null;\n this.totalTime = duration + delay;\n }\n _onFinish() {\n if (!this._finished) {\n this._finished = true;\n this._onDoneFns.forEach((fn) => fn());\n this._onDoneFns = [];\n }\n }\n onStart(fn) {\n this._originalOnStartFns.push(fn);\n this._onStartFns.push(fn);\n }\n onDone(fn) {\n this._originalOnDoneFns.push(fn);\n this._onDoneFns.push(fn);\n }\n onDestroy(fn) {\n this._onDestroyFns.push(fn);\n }\n hasStarted() {\n return this._started;\n }\n init() { }\n play() {\n if (!this.hasStarted()) {\n this._onStart();\n this.triggerMicrotask();\n }\n this._started = true;\n }\n /** @internal */\n triggerMicrotask() {\n queueMicrotask(() => this._onFinish());\n }\n _onStart() {\n this._onStartFns.forEach((fn) => fn());\n this._onStartFns = [];\n }\n pause() { }\n restart() { }\n finish() {\n this._onFinish();\n }\n destroy() {\n if (!this._destroyed) {\n this._destroyed = true;\n if (!this.hasStarted()) {\n this._onStart();\n }\n this.finish();\n this._onDestroyFns.forEach((fn) => fn());\n this._onDestroyFns = [];\n }\n }\n reset() {\n this._started = false;\n this._finished = false;\n this._onStartFns = this._originalOnStartFns;\n this._onDoneFns = this._originalOnDoneFns;\n }\n setPosition(position) {\n this._position = this.totalTime ? position * this.totalTime : 1;\n }\n getPosition() {\n return this.totalTime ? this._position / this.totalTime : 1;\n }\n /** @internal */\n triggerCallback(phaseName) {\n const methods = phaseName == 'start' ? this._onStartFns : this._onDoneFns;\n methods.forEach((fn) => fn());\n methods.length = 0;\n }\n}\n\n/**\n * A programmatic controller for a group of reusable animations.\n * Used internally to control animations.\n *\n * @see {@link AnimationPlayer}\n * @see {@link animations/group group}\n *\n */\nclass AnimationGroupPlayer {\n constructor(_players) {\n this._onDoneFns = [];\n this._onStartFns = [];\n this._finished = false;\n this._started = false;\n this._destroyed = false;\n this._onDestroyFns = [];\n this.parentPlayer = null;\n this.totalTime = 0;\n this.players = _players;\n let doneCount = 0;\n let destroyCount = 0;\n let startCount = 0;\n const total = this.players.length;\n if (total == 0) {\n queueMicrotask(() => this._onFinish());\n }\n else {\n this.players.forEach((player) => {\n player.onDone(() => {\n if (++doneCount == total) {\n this._onFinish();\n }\n });\n player.onDestroy(() => {\n if (++destroyCount == total) {\n this._onDestroy();\n }\n });\n player.onStart(() => {\n if (++startCount == total) {\n this._onStart();\n }\n });\n });\n }\n this.totalTime = this.players.reduce((time, player) => Math.max(time, player.totalTime), 0);\n }\n _onFinish() {\n if (!this._finished) {\n this._finished = true;\n this._onDoneFns.forEach((fn) => fn());\n this._onDoneFns = [];\n }\n }\n init() {\n this.players.forEach((player) => player.init());\n }\n onStart(fn) {\n this._onStartFns.push(fn);\n }\n _onStart() {\n if (!this.hasStarted()) {\n this._started = true;\n this._onStartFns.forEach((fn) => fn());\n this._onStartFns = [];\n }\n }\n onDone(fn) {\n this._onDoneFns.push(fn);\n }\n onDestroy(fn) {\n this._onDestroyFns.push(fn);\n }\n hasStarted() {\n return this._started;\n }\n play() {\n if (!this.parentPlayer) {\n this.init();\n }\n this._onStart();\n this.players.forEach((player) => player.play());\n }\n pause() {\n this.players.forEach((player) => player.pause());\n }\n restart() {\n this.players.forEach((player) => player.restart());\n }\n finish() {\n this._onFinish();\n this.players.forEach((player) => player.finish());\n }\n destroy() {\n this._onDestroy();\n }\n _onDestroy() {\n if (!this._destroyed) {\n this._destroyed = true;\n this._onFinish();\n this.players.forEach((player) => player.destroy());\n this._onDestroyFns.forEach((fn) => fn());\n this._onDestroyFns = [];\n }\n }\n reset() {\n this.players.forEach((player) => player.reset());\n this._destroyed = false;\n this._finished = false;\n this._started = false;\n }\n setPosition(p) {\n const timeAtPosition = p * this.totalTime;\n this.players.forEach((player) => {\n const position = player.totalTime ? Math.min(1, timeAtPosition / player.totalTime) : 1;\n player.setPosition(position);\n });\n }\n getPosition() {\n const longestPlayer = this.players.reduce((longestSoFar, player) => {\n const newPlayerIsLongest = longestSoFar === null || player.totalTime > longestSoFar.totalTime;\n return newPlayerIsLongest ? player : longestSoFar;\n }, null);\n return longestPlayer != null ? longestPlayer.getPosition() : 0;\n }\n beforeDestroy() {\n this.players.forEach((player) => {\n if (player.beforeDestroy) {\n player.beforeDestroy();\n }\n });\n }\n /** @internal */\n triggerCallback(phaseName) {\n const methods = phaseName == 'start' ? this._onStartFns : this._onDoneFns;\n methods.forEach((fn) => fn());\n methods.length = 0;\n }\n}\n\nconst ɵPRE_STYLE = '!';\n\n/**\n * @module\n * @description\n * Entry point for all animation APIs of the animation package.\n */\n\n/**\n * @module\n * @description\n * Entry point for all public APIs of this package.\n */\n\n// This file is not used to build this module. It is only used during editing\n\n/**\n * Generated bundle index. Do not edit.\n */\n\nexport { AUTO_STYLE, AnimationBuilder, AnimationFactory, AnimationMetadataType, NoopAnimationPlayer, animate, animateChild, animation, group, keyframes, query, sequence, stagger, state, style, transition, trigger, useAnimation, AnimationGroupPlayer as ɵAnimationGroupPlayer, BrowserAnimationBuilder as ɵBrowserAnimationBuilder, ɵPRE_STYLE };\n//# sourceMappingURL=animations.mjs.map\n","/**\n * @dynamic is for runtime initializing DomHandler.browser\n *\n * If delete below comment, we can see this error message:\n * Metadata collected contains an error that will be reported at runtime:\n * Only initialized variables and constants can be referenced\n * because the value of this variable is needed by the template compiler.\n */\n// @dynamic\nclass DomHandler {\n static zindex = 1000;\n static calculatedScrollbarWidth = null;\n static calculatedScrollbarHeight = null;\n static browser;\n static addClass(element, className) {\n if (element && className) {\n if (element.classList)\n element.classList.add(className);\n else\n element.className += ' ' + className;\n }\n }\n static addMultipleClasses(element, className) {\n if (element && className) {\n if (element.classList) {\n let styles = className.trim().split(' ');\n for (let i = 0; i < styles.length; i++) {\n element.classList.add(styles[i]);\n }\n }\n else {\n let styles = className.split(' ');\n for (let i = 0; i < styles.length; i++) {\n element.className += ' ' + styles[i];\n }\n }\n }\n }\n static removeClass(element, className) {\n if (element && className) {\n if (element.classList)\n element.classList.remove(className);\n else\n element.className = element.className.replace(new RegExp('(^|\\\\b)' + className.split(' ').join('|') + '(\\\\b|$)', 'gi'), ' ');\n }\n }\n static removeMultipleClasses(element, classNames) {\n if (element && classNames) {\n [classNames]\n .flat()\n .filter(Boolean)\n .forEach((cNames) => cNames.split(' ').forEach((className) => this.removeClass(element, className)));\n }\n }\n static hasClass(element, className) {\n if (element && className) {\n if (element.classList)\n return element.classList.contains(className);\n else\n return new RegExp('(^| )' + className + '( |$)', 'gi').test(element.className);\n }\n return false;\n }\n static siblings(element) {\n return Array.prototype.filter.call(element.parentNode.children, function (child) {\n return child !== element;\n });\n }\n static find(element, selector) {\n return Array.from(element.querySelectorAll(selector));\n }\n static findSingle(element, selector) {\n return this.isElement(element) ? element.querySelector(selector) : null;\n }\n static index(element) {\n let children = element.parentNode.childNodes;\n let num = 0;\n for (var i = 0; i < children.length; i++) {\n if (children[i] == element)\n return num;\n if (children[i].nodeType == 1)\n num++;\n }\n return -1;\n }\n static indexWithinGroup(element, attributeName) {\n let children = element.parentNode ? element.parentNode.childNodes : [];\n let num = 0;\n for (var i = 0; i < children.length; i++) {\n if (children[i] == element)\n return num;\n if (children[i].attributes && children[i].attributes[attributeName] && children[i].nodeType == 1)\n num++;\n }\n return -1;\n }\n static appendOverlay(overlay, target, appendTo = 'self') {\n if (appendTo !== 'self' && overlay && target) {\n this.appendChild(overlay, target);\n }\n }\n static alignOverlay(overlay, target, appendTo = 'self', calculateMinWidth = true) {\n if (overlay && target) {\n if (calculateMinWidth) {\n overlay.style.minWidth = `${DomHandler.getOuterWidth(target)}px`;\n }\n if (appendTo === 'self') {\n this.relativePosition(overlay, target);\n }\n else {\n this.absolutePosition(overlay, target);\n }\n }\n }\n static relativePosition(element, target, gutter = true) {\n const getClosestRelativeElement = (el) => {\n if (!el)\n return;\n return getComputedStyle(el).getPropertyValue('position') === 'relative' ? el : getClosestRelativeElement(el.parentElement);\n };\n const elementDimensions = element.offsetParent ? { width: element.offsetWidth, height: element.offsetHeight } : this.getHiddenElementDimensions(element);\n const targetHeight = target.offsetHeight ?? target.getBoundingClientRect().height;\n const targetOffset = target.getBoundingClientRect();\n const windowScrollTop = this.getWindowScrollTop();\n const windowScrollLeft = this.getWindowScrollLeft();\n const viewport = this.getViewport();\n const relativeElement = getClosestRelativeElement(element);\n const relativeElementOffset = relativeElement?.getBoundingClientRect() || { top: -1 * windowScrollTop, left: -1 * windowScrollLeft };\n let top, left;\n if (targetOffset.top + targetHeight + elementDimensions.height > viewport.height) {\n top = targetOffset.top - relativeElementOffset.top - elementDimensions.height;\n element.style.transformOrigin = 'bottom';\n if (targetOffset.top + top < 0) {\n top = -1 * targetOffset.top;\n }\n }\n else {\n top = targetHeight + targetOffset.top - relativeElementOffset.top;\n element.style.transformOrigin = 'top';\n }\n const horizontalOverflow = targetOffset.left + elementDimensions.width - viewport.width;\n const targetLeftOffsetInSpaceOfRelativeElement = targetOffset.left - relativeElementOffset.left;\n if (elementDimensions.width > viewport.width) {\n // element wider then viewport and cannot fit on screen (align at left side of viewport)\n left = (targetOffset.left - relativeElementOffset.left) * -1;\n }\n else if (horizontalOverflow > 0) {\n // element wider then viewport but can be fit on screen (align at right side of viewport)\n left = targetLeftOffsetInSpaceOfRelativeElement - horizontalOverflow;\n }\n else {\n // element fits on screen (align with target)\n left = targetOffset.left - relativeElementOffset.left;\n }\n element.style.top = top + 'px';\n element.style.left = left + 'px';\n gutter && (element.style.marginTop = origin === 'bottom' ? 'calc(var(--p-anchor-gutter) * -1)' : 'calc(var(--p-anchor-gutter))');\n }\n static absolutePosition(element, target, gutter = true) {\n const elementDimensions = element.offsetParent ? { width: element.offsetWidth, height: element.offsetHeight } : this.getHiddenElementDimensions(element);\n const elementOuterHeight = elementDimensions.height;\n const elementOuterWidth = elementDimensions.width;\n const targetOuterHeight = target.offsetHeight ?? target.getBoundingClientRect().height;\n const targetOuterWidth = target.offsetWidth ?? target.getBoundingClientRect().width;\n const targetOffset = target.getBoundingClientRect();\n const windowScrollTop = this.getWindowScrollTop();\n const windowScrollLeft = this.getWindowScrollLeft();\n const viewport = this.getViewport();\n let top, left;\n if (targetOffset.top + targetOuterHeight + elementOuterHeight > viewport.height) {\n top = targetOffset.top + windowScrollTop - elementOuterHeight;\n element.style.transformOrigin = 'bottom';\n if (top < 0) {\n top = windowScrollTop;\n }\n }\n else {\n top = targetOuterHeight + targetOffset.top + windowScrollTop;\n element.style.transformOrigin = 'top';\n }\n if (targetOffset.left + elementOuterWidth > viewport.width)\n left = Math.max(0, targetOffset.left + windowScrollLeft + targetOuterWidth - elementOuterWidth);\n else\n left = targetOffset.left + windowScrollLeft;\n element.style.top = top + 'px';\n element.style.left = left + 'px';\n gutter && (element.style.marginTop = origin === 'bottom' ? 'calc(var(--p-anchor-gutter) * -1)' : 'calc(var(--p-anchor-gutter))');\n }\n static getParents(element, parents = []) {\n return element['parentNode'] === null ? parents : this.getParents(element.parentNode, parents.concat([element.parentNode]));\n }\n static getScrollableParents(element) {\n let scrollableParents = [];\n if (element) {\n let parents = this.getParents(element);\n const overflowRegex = /(auto|scroll)/;\n const overflowCheck = (node) => {\n let styleDeclaration = window['getComputedStyle'](node, null);\n return overflowRegex.test(styleDeclaration.getPropertyValue('overflow')) || overflowRegex.test(styleDeclaration.getPropertyValue('overflowX')) || overflowRegex.test(styleDeclaration.getPropertyValue('overflowY'));\n };\n for (let parent of parents) {\n let scrollSelectors = parent.nodeType === 1 && parent.dataset['scrollselectors'];\n if (scrollSelectors) {\n let selectors = scrollSelectors.split(',');\n for (let selector of selectors) {\n let el = this.findSingle(parent, selector);\n if (el && overflowCheck(el)) {\n scrollableParents.push(el);\n }\n }\n }\n if (parent.nodeType !== 9 && overflowCheck(parent)) {\n scrollableParents.push(parent);\n }\n }\n }\n return scrollableParents;\n }\n static getHiddenElementOuterHeight(element) {\n element.style.visibility = 'hidden';\n element.style.display = 'block';\n let elementHeight = element.offsetHeight;\n element.style.display = 'none';\n element.style.visibility = 'visible';\n return elementHeight;\n }\n static getHiddenElementOuterWidth(element) {\n element.style.visibility = 'hidden';\n element.style.display = 'block';\n let elementWidth = element.offsetWidth;\n element.style.display = 'none';\n element.style.visibility = 'visible';\n return elementWidth;\n }\n static getHiddenElementDimensions(element) {\n let dimensions = {};\n element.style.visibility = 'hidden';\n element.style.display = 'block';\n dimensions.width = element.offsetWidth;\n dimensions.height = element.offsetHeight;\n element.style.display = 'none';\n element.style.visibility = 'visible';\n return dimensions;\n }\n static scrollInView(container, item) {\n let borderTopValue = getComputedStyle(container).getPropertyValue('borderTopWidth');\n let borderTop = borderTopValue ? parseFloat(borderTopValue) : 0;\n let paddingTopValue = getComputedStyle(container).getPropertyValue('paddingTop');\n let paddingTop = paddingTopValue ? parseFloat(paddingTopValue) : 0;\n let containerRect = container.getBoundingClientRect();\n let itemRect = item.getBoundingClientRect();\n let offset = itemRect.top + document.body.scrollTop - (containerRect.top + document.body.scrollTop) - borderTop - paddingTop;\n let scroll = container.scrollTop;\n let elementHeight = container.clientHeight;\n let itemHeight = this.getOuterHeight(item);\n if (offset < 0) {\n container.scrollTop = scroll + offset;\n }\n else if (offset + itemHeight > elementHeight) {\n container.scrollTop = scroll + offset - elementHeight + itemHeight;\n }\n }\n static fadeIn(element, duration) {\n element.style.opacity = 0;\n let last = +new Date();\n let opacity = 0;\n let tick = function () {\n opacity = +element.style.opacity.replace(',', '.') + (new Date().getTime() - last) / duration;\n element.style.opacity = opacity;\n last = +new Date();\n if (+opacity < 1) {\n (window.requestAnimationFrame && requestAnimationFrame(tick)) || setTimeout(tick, 16);\n }\n };\n tick();\n }\n static fadeOut(element, ms) {\n var opacity = 1, interval = 50, duration = ms, gap = interval / duration;\n let fading = setInterval(() => {\n opacity = opacity - gap;\n if (opacity <= 0) {\n opacity = 0;\n clearInterval(fading);\n }\n element.style.opacity = opacity;\n }, interval);\n }\n static getWindowScrollTop() {\n let doc = document.documentElement;\n return (window.pageYOffset || doc.scrollTop) - (doc.clientTop || 0);\n }\n static getWindowScrollLeft() {\n let doc = document.documentElement;\n return (window.pageXOffset || doc.scrollLeft) - (doc.clientLeft || 0);\n }\n static matches(element, selector) {\n var p = Element.prototype;\n var f = p['matches'] ||\n p.webkitMatchesSelector ||\n p['mozMatchesSelector'] ||\n p['msMatchesSelector'] ||\n function (s) {\n return [].indexOf.call(document.querySelectorAll(s), this) !== -1;\n };\n return f.call(element, selector);\n }\n static getOuterWidth(el, margin) {\n let width = el.offsetWidth;\n if (margin) {\n let style = getComputedStyle(el);\n width += parseFloat(style.marginLeft) + parseFloat(style.marginRight);\n }\n return width;\n }\n static getHorizontalPadding(el) {\n let style = getComputedStyle(el);\n return parseFloat(style.paddingLeft) + parseFloat(style.paddingRight);\n }\n static getHorizontalMargin(el) {\n let style = getComputedStyle(el);\n return parseFloat(style.marginLeft) + parseFloat(style.marginRight);\n }\n static innerWidth(el) {\n let width = el.offsetWidth;\n let style = getComputedStyle(el);\n width += parseFloat(style.paddingLeft) + parseFloat(style.paddingRight);\n return width;\n }\n static width(el) {\n let width = el.offsetWidth;\n let style = getComputedStyle(el);\n width -= parseFloat(style.paddingLeft) + parseFloat(style.paddingRight);\n return width;\n }\n static getInnerHeight(el) {\n let height = el.offsetHeight;\n let style = getComputedStyle(el);\n height += parseFloat(style.paddingTop) + parseFloat(style.paddingBottom);\n return height;\n }\n static getOuterHeight(el, margin) {\n let height = el.offsetHeight;\n if (margin) {\n let style = getComputedStyle(el);\n height += parseFloat(style.marginTop) + parseFloat(style.marginBottom);\n }\n return height;\n }\n static getHeight(el) {\n let height = el.offsetHeight;\n let style = getComputedStyle(el);\n height -= parseFloat(style.paddingTop) + parseFloat(style.paddingBottom) + parseFloat(style.borderTopWidth) + parseFloat(style.borderBottomWidth);\n return height;\n }\n static getWidth(el) {\n let width = el.offsetWidth;\n let style = getComputedStyle(el);\n width -= parseFloat(style.paddingLeft) + parseFloat(style.paddingRight) + parseFloat(style.borderLeftWidth) + parseFloat(style.borderRightWidth);\n return width;\n }\n static getViewport() {\n let win = window, d = document, e = d.documentElement, g = d.getElementsByTagName('body')[0], w = win.innerWidth || e.clientWidth || g.clientWidth, h = win.innerHeight || e.clientHeight || g.clientHeight;\n return { width: w, height: h };\n }\n static getOffset(el) {\n var rect = el.getBoundingClientRect();\n return {\n top: rect.top + (window.pageYOffset || document.documentElement.scrollTop || document.body.scrollTop || 0),\n left: rect.left + (window.pageXOffset || document.documentElement.scrollLeft || document.body.scrollLeft || 0)\n };\n }\n static replaceElementWith(element, replacementElement) {\n let parentNode = element.parentNode;\n if (!parentNode)\n throw `Can't replace element`;\n return parentNode.replaceChild(replacementElement, element);\n }\n static getUserAgent() {\n if (navigator && this.isClient()) {\n return navigator.userAgent;\n }\n }\n static isIE() {\n var ua = window.navigator.userAgent;\n var msie = ua.indexOf('MSIE ');\n if (msie > 0) {\n // IE 10 or older => return version number\n return true;\n }\n var trident = ua.indexOf('Trident/');\n if (trident > 0) {\n // IE 11 => return version number\n var rv = ua.indexOf('rv:');\n return true;\n }\n var edge = ua.indexOf('Edge/');\n if (edge > 0) {\n // Edge (IE 12+) => return version number\n return true;\n }\n // other browser\n return false;\n }\n static isIOS() {\n return /iPad|iPhone|iPod/.test(navigator.userAgent) && !window['MSStream'];\n }\n static isAndroid() {\n return /(android)/i.test(navigator.userAgent);\n }\n static isTouchDevice() {\n return 'ontouchstart' in window || navigator.maxTouchPoints > 0;\n }\n static appendChild(element, target) {\n if (this.isElement(target))\n target.appendChild(element);\n else if (target && target.el && target.el.nativeElement)\n target.el.nativeElement.appendChild(element);\n else\n throw 'Cannot append ' + target + ' to ' + element;\n }\n static removeChild(element, target) {\n if (this.isElement(target))\n target.removeChild(element);\n else if (target.el && target.el.nativeElement)\n target.el.nativeElement.removeChild(element);\n else\n throw 'Cannot remove ' + element + ' from ' + target;\n }\n static removeElement(element) {\n if (!('remove' in Element.prototype))\n element.parentNode.removeChild(element);\n else\n element.remove();\n }\n static isElement(obj) {\n return typeof HTMLElement === 'object' ? obj instanceof HTMLElement : obj && typeof obj === 'object' && obj !== null && obj.nodeType === 1 && typeof obj.nodeName === 'string';\n }\n static calculateScrollbarWidth(el) {\n if (el) {\n let style = getComputedStyle(el);\n return el.offsetWidth - el.clientWidth - parseFloat(style.borderLeftWidth) - parseFloat(style.borderRightWidth);\n }\n else {\n if (this.calculatedScrollbarWidth !== null)\n return this.calculatedScrollbarWidth;\n let scrollDiv = document.createElement('div');\n scrollDiv.className = 'p-scrollbar-measure';\n document.body.appendChild(scrollDiv);\n let scrollbarWidth = scrollDiv.offsetWidth - scrollDiv.clientWidth;\n document.body.removeChild(scrollDiv);\n this.calculatedScrollbarWidth = scrollbarWidth;\n return scrollbarWidth;\n }\n }\n static calculateScrollbarHeight() {\n if (this.calculatedScrollbarHeight !== null)\n return this.calculatedScrollbarHeight;\n let scrollDiv = document.createElement('div');\n scrollDiv.className = 'p-scrollbar-measure';\n document.body.appendChild(scrollDiv);\n let scrollbarHeight = scrollDiv.offsetHeight - scrollDiv.clientHeight;\n document.body.removeChild(scrollDiv);\n this.calculatedScrollbarWidth = scrollbarHeight;\n return scrollbarHeight;\n }\n static invokeElementMethod(element, methodName, args) {\n element[methodName].apply(element, args);\n }\n static clearSelection() {\n if (window.getSelection) {\n if (window.getSelection().empty) {\n window.getSelection().empty();\n }\n else if (window.getSelection().removeAllRanges && window.getSelection().rangeCount > 0 && window.getSelection().getRangeAt(0).getClientRects().length > 0) {\n window.getSelection().removeAllRanges();\n }\n }\n else if (document['selection'] && document['selection'].empty) {\n try {\n document['selection'].empty();\n }\n catch (error) {\n //ignore IE bug\n }\n }\n }\n static getBrowser() {\n if (!this.browser) {\n let matched = this.resolveUserAgent();\n this.browser = {};\n if (matched.browser) {\n this.browser[matched.browser] = true;\n this.browser['version'] = matched.version;\n }\n if (this.browser['chrome']) {\n this.browser['webkit'] = true;\n }\n else if (this.browser['webkit']) {\n this.browser['safari'] = true;\n }\n }\n return this.browser;\n }\n static resolveUserAgent() {\n let ua = navigator.userAgent.toLowerCase();\n let match = /(chrome)[ \\/]([\\w.]+)/.exec(ua) || /(webkit)[ \\/]([\\w.]+)/.exec(ua) || /(opera)(?:.*version|)[ \\/]([\\w.]+)/.exec(ua) || /(msie) ([\\w.]+)/.exec(ua) || (ua.indexOf('compatible') < 0 && /(mozilla)(?:.*? rv:([\\w.]+)|)/.exec(ua)) || [];\n return {\n browser: match[1] || '',\n version: match[2] || '0'\n };\n }\n static isInteger(value) {\n if (Number.isInteger) {\n return Number.isInteger(value);\n }\n else {\n return typeof value === 'number' && isFinite(value) && Math.floor(value) === value;\n }\n }\n static isHidden(element) {\n return !element || element.offsetParent === null;\n }\n static isVisible(element) {\n return element && element.offsetParent != null;\n }\n static isExist(element) {\n return element !== null && typeof element !== 'undefined' && element.nodeName && element.parentNode;\n }\n static focus(element, options) {\n element && document.activeElement !== element && element.focus(options);\n }\n static getFocusableSelectorString(selector = '') {\n return `button:not([tabindex = \"-1\"]):not([disabled]):not([style*=\"display:none\"]):not([hidden])${selector},\n [href][clientHeight][clientWidth]:not([tabindex = \"-1\"]):not([disabled]):not([style*=\"display:none\"]):not([hidden])${selector},\n input:not([tabindex = \"-1\"]):not([disabled]):not([style*=\"display:none\"]):not([hidden])${selector},\n select:not([tabindex = \"-1\"]):not([disabled]):not([style*=\"display:none\"]):not([hidden])${selector},\n textarea:not([tabindex = \"-1\"]):not([disabled]):not([style*=\"display:none\"]):not([hidden])${selector},\n [tabIndex]:not([tabIndex = \"-1\"]):not([disabled]):not([style*=\"display:none\"]):not([hidden])${selector},\n [contenteditable]:not([tabIndex = \"-1\"]):not([disabled]):not([style*=\"display:none\"]):not([hidden])${selector},\n .p-inputtext:not([tabindex = \"-1\"]):not([disabled]):not([style*=\"display:none\"]):not([hidden])${selector},\n .p-button:not([tabindex = \"-1\"]):not([disabled]):not([style*=\"display:none\"]):not([hidden])${selector}`;\n }\n static getFocusableElements(element, selector = '') {\n let focusableElements = this.find(element, this.getFocusableSelectorString(selector));\n let visibleFocusableElements = [];\n for (let focusableElement of focusableElements) {\n const computedStyle = getComputedStyle(focusableElement);\n if (this.isVisible(focusableElement) && computedStyle.display != 'none' && computedStyle.visibility != 'hidden')\n visibleFocusableElements.push(focusableElement);\n }\n return visibleFocusableElements;\n }\n static getFocusableElement(element, selector = '') {\n let focusableElement = this.findSingle(element, this.getFocusableSelectorString(selector));\n if (focusableElement) {\n const computedStyle = getComputedStyle(focusableElement);\n if (this.isVisible(focusableElement) && computedStyle.display != 'none' && computedStyle.visibility != 'hidden')\n return focusableElement;\n }\n return null;\n }\n static getFirstFocusableElement(element, selector = '') {\n const focusableElements = this.getFocusableElements(element, selector);\n return focusableElements.length > 0 ? focusableElements[0] : null;\n }\n static getLastFocusableElement(element, selector) {\n const focusableElements = this.getFocusableElements(element, selector);\n return focusableElements.length > 0 ? focusableElements[focusableElements.length - 1] : null;\n }\n static getNextFocusableElement(element, reverse = false) {\n const focusableElements = DomHandler.getFocusableElements(element);\n let index = 0;\n if (focusableElements && focusableElements.length > 0) {\n const focusedIndex = focusableElements.indexOf(focusableElements[0].ownerDocument.activeElement);\n if (reverse) {\n if (focusedIndex == -1 || focusedIndex === 0) {\n index = focusableElements.length - 1;\n }\n else {\n index = focusedIndex - 1;\n }\n }\n else if (focusedIndex != -1 && focusedIndex !== focusableElements.length - 1) {\n index = focusedIndex + 1;\n }\n }\n return focusableElements[index];\n }\n static generateZIndex() {\n this.zindex = this.zindex || 999;\n return ++this.zindex;\n }\n static getSelection() {\n if (window.getSelection)\n return window.getSelection().toString();\n else if (document.getSelection)\n return document.getSelection().toString();\n else if (document['selection'])\n return document['selection'].createRange().text;\n return null;\n }\n static getTargetElement(target, el) {\n if (!target)\n return null;\n switch (target) {\n case 'document':\n return document;\n case 'window':\n return window;\n case '@next':\n return el?.nextElementSibling;\n case '@prev':\n return el?.previousElementSibling;\n case '@parent':\n return el?.parentElement;\n case '@grandparent':\n return el?.parentElement.parentElement;\n default:\n const type = typeof target;\n if (type === 'string') {\n return document.querySelector(target);\n }\n else if (type === 'object' && target.hasOwnProperty('nativeElement')) {\n return this.isExist(target.nativeElement) ? target.nativeElement : undefined;\n }\n const isFunction = (obj) => !!(obj && obj.constructor && obj.call && obj.apply);\n const element = isFunction(target) ? target() : target;\n return (element && element.nodeType === 9) || this.isExist(element) ? element : null;\n }\n }\n static isClient() {\n return !!(typeof window !== 'undefined' && window.document && window.document.createElement);\n }\n static getAttribute(element, name) {\n if (element) {\n const value = element.getAttribute(name);\n if (!isNaN(value)) {\n return +value;\n }\n if (value === 'true' || value === 'false') {\n return value === 'true';\n }\n return value;\n }\n return undefined;\n }\n static calculateBodyScrollbarWidth() {\n return window.innerWidth - document.documentElement.offsetWidth;\n }\n static blockBodyScroll(className = 'p-overflow-hidden') {\n document.body.style.setProperty('--scrollbar-width', this.calculateBodyScrollbarWidth() + 'px');\n this.addClass(document.body, className);\n }\n static unblockBodyScroll(className = 'p-overflow-hidden') {\n document.body.style.removeProperty('--scrollbar-width');\n this.removeClass(document.body, className);\n }\n static createElement(type, attributes = {}, ...children) {\n if (type) {\n const element = document.createElement(type);\n this.setAttributes(element, attributes);\n element.append(...children);\n return element;\n }\n return undefined;\n }\n static setAttribute(element, attribute = '', value) {\n if (this.isElement(element) && value !== null && value !== undefined) {\n element.setAttribute(attribute, value);\n }\n }\n static setAttributes(element, attributes = {}) {\n if (this.isElement(element)) {\n const computedStyles = (rule, value) => {\n const styles = element?.$attrs?.[rule] ? [element?.$attrs?.[rule]] : [];\n return [value].flat().reduce((cv, v) => {\n if (v !== null && v !== undefined) {\n const type = typeof v;\n if (type === 'string' || type === 'number') {\n cv.push(v);\n }\n else if (type === 'object') {\n const _cv = Array.isArray(v)\n ? computedStyles(rule, v)\n : Object.entries(v).map(([_k, _v]) => (rule === 'style' && (!!_v || _v === 0) ? `${_k.replace(/([a-z])([A-Z])/g, '$1-$2').toLowerCase()}:${_v}` : !!_v ? _k : undefined));\n cv = _cv.length ? cv.concat(_cv.filter((c) => !!c)) : cv;\n }\n }\n return cv;\n }, styles);\n };\n Object.entries(attributes).forEach(([key, value]) => {\n if (value !== undefined && value !== null) {\n const matchedEvent = key.match(/^on(.+)/);\n if (matchedEvent) {\n element.addEventListener(matchedEvent[1].toLowerCase(), value);\n }\n else if (key === 'pBind') {\n this.setAttributes(element, value);\n }\n else {\n value = key === 'class' ? [...new Set(computedStyles('class', value))].join(' ').trim() : key === 'style' ? computedStyles('style', value).join(';').trim() : value;\n (element.$attrs = element.$attrs || {}) && (element.$attrs[key] = value);\n element.setAttribute(key, value);\n }\n }\n });\n }\n }\n static isFocusableElement(element, selector = '') {\n return this.isElement(element)\n ? element.matches(`button:not([tabindex = \"-1\"]):not([disabled]):not([style*=\"display:none\"]):not([hidden])${selector},\n [href][clientHeight][clientWidth]:not([tabindex = \"-1\"]):not([disabled]):not([style*=\"display:none\"]):not([hidden])${selector},\n input:not([tabindex = \"-1\"]):not([disabled]):not([style*=\"display:none\"]):not([hidden])${selector},\n select:not([tabindex = \"-1\"]):not([disabled]):not([style*=\"display:none\"]):not([hidden])${selector},\n textarea:not([tabindex = \"-1\"]):not([disabled]):not([style*=\"display:none\"]):not([hidden])${selector},\n [tabIndex]:not([tabIndex = \"-1\"]):not([disabled]):not([style*=\"display:none\"]):not([hidden])${selector},\n [contenteditable]:not([tabIndex = \"-1\"]):not([disabled]):not([style*=\"display:none\"]):not([hidden])${selector}`)\n : false;\n }\n}\n\nclass ConnectedOverlayScrollHandler {\n element;\n listener;\n scrollableParents;\n constructor(element, listener = () => { }) {\n this.element = element;\n this.listener = listener;\n }\n bindScrollListener() {\n this.scrollableParents = DomHandler.getScrollableParents(this.element);\n for (let i = 0; i < this.scrollableParents.length; i++) {\n this.scrollableParents[i].addEventListener('scroll', this.listener);\n }\n }\n unbindScrollListener() {\n if (this.scrollableParents) {\n for (let i = 0; i < this.scrollableParents.length; i++) {\n this.scrollableParents[i].removeEventListener('scroll', this.listener);\n }\n }\n }\n destroy() {\n this.unbindScrollListener();\n this.element = null;\n this.listener = null;\n this.scrollableParents = null;\n }\n}\n\n/**\n * Generated bundle index. Do not edit.\n */\n\nexport { ConnectedOverlayScrollHandler, DomHandler };\n//# sourceMappingURL=primeng-dom.mjs.map\n","class ObjectUtils {\n static isArray(value, empty = true) {\n return Array.isArray(value) && (empty || value.length !== 0);\n }\n static isObject(value, empty = true) {\n return typeof value === 'object' && !Array.isArray(value) && value != null && (empty || Object.keys(value).length !== 0);\n }\n static equals(obj1, obj2, field) {\n if (field)\n return this.resolveFieldData(obj1, field) === this.resolveFieldData(obj2, field);\n else\n return this.equalsByValue(obj1, obj2);\n }\n static equalsByValue(obj1, obj2) {\n if (obj1 === obj2)\n return true;\n if (obj1 && obj2 && typeof obj1 == 'object' && typeof obj2 == 'object') {\n var arrA = Array.isArray(obj1), arrB = Array.isArray(obj2), i, length, key;\n if (arrA && arrB) {\n length = obj1.length;\n if (length != obj2.length)\n return false;\n for (i = length; i-- !== 0;)\n if (!this.equalsByValue(obj1[i], obj2[i]))\n return false;\n return true;\n }\n if (arrA != arrB)\n return false;\n var dateA = this.isDate(obj1), dateB = this.isDate(obj2);\n if (dateA != dateB)\n return false;\n if (dateA && dateB)\n return obj1.getTime() == obj2.getTime();\n var regexpA = obj1 instanceof RegExp, regexpB = obj2 instanceof RegExp;\n if (regexpA != regexpB)\n return false;\n if (regexpA && regexpB)\n return obj1.toString() == obj2.toString();\n var keys = Object.keys(obj1);\n length = keys.length;\n if (length !== Object.keys(obj2).length)\n return false;\n for (i = length; i-- !== 0;)\n if (!Object.prototype.hasOwnProperty.call(obj2, keys[i]))\n return false;\n for (i = length; i-- !== 0;) {\n key = keys[i];\n if (!this.equalsByValue(obj1[key], obj2[key]))\n return false;\n }\n return true;\n }\n return obj1 !== obj1 && obj2 !== obj2;\n }\n static resolveFieldData(data, field) {\n if (data && field) {\n if (this.isFunction(field)) {\n return field(data);\n }\n else if (field.indexOf('.') == -1) {\n return data[field];\n }\n else {\n let fields = field.split('.');\n let value = data;\n for (let i = 0, len = fields.length; i < len; ++i) {\n if (value == null) {\n return null;\n }\n value = value[fields[i]];\n }\n return value;\n }\n }\n else {\n return null;\n }\n }\n static isFunction(obj) {\n return !!(obj && obj.constructor && obj.call && obj.apply);\n }\n static reorderArray(value, from, to) {\n let target;\n if (value && from !== to) {\n if (to >= value.length) {\n to %= value.length;\n from %= value.length;\n }\n value.splice(to, 0, value.splice(from, 1)[0]);\n }\n }\n static insertIntoOrderedArray(item, index, arr, sourceArr) {\n if (arr.length > 0) {\n let injected = false;\n for (let i = 0; i < arr.length; i++) {\n let currentItemIndex = this.findIndexInList(arr[i], sourceArr);\n if (currentItemIndex > index) {\n arr.splice(i, 0, item);\n injected = true;\n break;\n }\n }\n if (!injected) {\n arr.push(item);\n }\n }\n else {\n arr.push(item);\n }\n }\n static findIndexInList(item, list) {\n let index = -1;\n if (list) {\n for (let i = 0; i < list.length; i++) {\n if (list[i] == item) {\n index = i;\n break;\n }\n }\n }\n return index;\n }\n static contains(value, list) {\n if (value != null && list && list.length) {\n for (let val of list) {\n if (this.equals(value, val))\n return true;\n }\n }\n return false;\n }\n static removeAccents(str) {\n if (str) {\n str = str.normalize('NFKD').replace(/\\p{Diacritic}/gu, '');\n }\n return str;\n }\n static isDate(input) {\n return Object.prototype.toString.call(input) === '[object Date]';\n }\n static isEmpty(value) {\n return value === null || value === undefined || value === '' || (Array.isArray(value) && value.length === 0) || (!this.isDate(value) && typeof value === 'object' && Object.keys(value).length === 0);\n }\n static isNotEmpty(value) {\n return !this.isEmpty(value);\n }\n static compare(value1, value2, locale, order = 1) {\n let result = -1;\n const emptyValue1 = this.isEmpty(value1);\n const emptyValue2 = this.isEmpty(value2);\n if (emptyValue1 && emptyValue2)\n result = 0;\n else if (emptyValue1)\n result = order;\n else if (emptyValue2)\n result = -order;\n else if (typeof value1 === 'string' && typeof value2 === 'string')\n result = value1.localeCompare(value2, locale, { numeric: true });\n else\n result = value1 < value2 ? -1 : value1 > value2 ? 1 : 0;\n return result;\n }\n static sort(value1, value2, order = 1, locale, nullSortOrder = 1) {\n const result = ObjectUtils.compare(value1, value2, locale, order);\n let finalSortOrder = order;\n // nullSortOrder == 1 means Excel like sort nulls at bottom\n if (ObjectUtils.isEmpty(value1) || ObjectUtils.isEmpty(value2)) {\n finalSortOrder = nullSortOrder === 1 ? order : nullSortOrder;\n }\n return finalSortOrder * result;\n }\n static merge(obj1, obj2) {\n if (obj1 == undefined && obj2 == undefined) {\n return undefined;\n }\n else if ((obj1 == undefined || typeof obj1 === 'object') && (obj2 == undefined || typeof obj2 === 'object')) {\n return { ...(obj1 || {}), ...(obj2 || {}) };\n }\n else if ((obj1 == undefined || typeof obj1 === 'string') && (obj2 == undefined || typeof obj2 === 'string')) {\n return [obj1 || '', obj2 || ''].join(' ');\n }\n return obj2 || obj1;\n }\n static isPrintableCharacter(char = '') {\n return this.isNotEmpty(char) && char.length === 1 && char.match(/\\S| /);\n }\n static getItemValue(obj, ...params) {\n return this.isFunction(obj) ? obj(...params) : obj;\n }\n static findLastIndex(arr, callback) {\n let index = -1;\n if (this.isNotEmpty(arr)) {\n try {\n index = arr.findLastIndex(callback);\n }\n catch {\n index = arr.lastIndexOf([...arr].reverse().find(callback));\n }\n }\n return index;\n }\n static findLast(arr, callback) {\n let item;\n if (this.isNotEmpty(arr)) {\n try {\n item = arr.findLast(callback);\n }\n catch {\n item = [...arr].reverse().find(callback);\n }\n }\n return item;\n }\n static deepEquals(a, b) {\n if (a === b)\n return true;\n if (a && b && typeof a == 'object' && typeof b == 'object') {\n var arrA = Array.isArray(a), arrB = Array.isArray(b), i, length, key;\n if (arrA && arrB) {\n length = a.length;\n if (length != b.length)\n return false;\n for (i = length; i-- !== 0;)\n if (!this.deepEquals(a[i], b[i]))\n return false;\n return true;\n }\n if (arrA != arrB)\n return false;\n var dateA = a instanceof Date, dateB = b instanceof Date;\n if (dateA != dateB)\n return false;\n if (dateA && dateB)\n return a.getTime() == b.getTime();\n var regexpA = a instanceof RegExp, regexpB = b instanceof RegExp;\n if (regexpA != regexpB)\n return false;\n if (regexpA && regexpB)\n return a.toString() == b.toString();\n var keys = Object.keys(a);\n length = keys.length;\n if (length !== Object.keys(b).length)\n return false;\n for (i = length; i-- !== 0;)\n if (!Object.prototype.hasOwnProperty.call(b, keys[i]))\n return false;\n for (i = length; i-- !== 0;) {\n key = keys[i];\n if (!this.deepEquals(a[key], b[key]))\n return false;\n }\n return true;\n }\n return a !== a && b !== b;\n }\n}\n\nvar lastId = 0;\nfunction UniqueComponentId(prefix = 'pn_id_') {\n lastId++;\n return `${prefix}${lastId}`;\n}\n\nfunction ZIndexUtils() {\n let zIndexes = [];\n const generateZIndex = (key, baseZIndex) => {\n let lastZIndex = zIndexes.length > 0 ? zIndexes[zIndexes.length - 1] : { key, value: baseZIndex };\n let newZIndex = lastZIndex.value + (lastZIndex.key === key ? 0 : baseZIndex) + 2;\n zIndexes.push({ key, value: newZIndex });\n return newZIndex;\n };\n const revertZIndex = (zIndex) => {\n zIndexes = zIndexes.filter((obj) => obj.value !== zIndex);\n };\n const getCurrentZIndex = () => {\n return zIndexes.length > 0 ? zIndexes[zIndexes.length - 1].value : 0;\n };\n const getZIndex = (el) => {\n return el ? parseInt(el.style.zIndex, 10) || 0 : 0;\n };\n return {\n get: getZIndex,\n set: (key, el, baseZIndex) => {\n if (el) {\n el.style.zIndex = String(generateZIndex(key, baseZIndex));\n }\n },\n clear: (el) => {\n if (el) {\n revertZIndex(getZIndex(el));\n el.style.zIndex = '';\n }\n },\n getCurrent: () => getCurrentZIndex()\n };\n}\nvar zindexutils = ZIndexUtils();\n\n/**\n * Generated bundle index. Do not edit.\n */\n\nexport { ObjectUtils, UniqueComponentId, zindexutils as ZIndexUtils };\n//# sourceMappingURL=primeng-utils.mjs.map\n","import * as i0 from '@angular/core';\nimport { Injectable, signal, Component, Directive, Input, NgModule } from '@angular/core';\nimport { Subject } from 'rxjs';\nimport { ObjectUtils } from 'primeng/utils';\n\n/**\n * Type of the confirm event.\n */\nvar ConfirmEventType;\n(function (ConfirmEventType) {\n ConfirmEventType[ConfirmEventType[\"ACCEPT\"] = 0] = \"ACCEPT\";\n ConfirmEventType[ConfirmEventType[\"REJECT\"] = 1] = \"REJECT\";\n ConfirmEventType[ConfirmEventType[\"CANCEL\"] = 2] = \"CANCEL\";\n})(ConfirmEventType || (ConfirmEventType = {}));\n\n/**\n * Methods used in confirmation service.\n * @group Service\n */\nclass ConfirmationService {\n requireConfirmationSource = new Subject();\n acceptConfirmationSource = new Subject();\n requireConfirmation$ = this.requireConfirmationSource.asObservable();\n accept = this.acceptConfirmationSource.asObservable();\n /**\n * Callback to invoke on confirm.\n * @param {Confirmation} confirmation - Represents a confirmation dialog configuration.\n * @group Method\n */\n confirm(confirmation) {\n this.requireConfirmationSource.next(confirmation);\n return this;\n }\n /**\n * Closes the dialog.\n * @group Method\n */\n close() {\n this.requireConfirmationSource.next(null);\n return this;\n }\n /**\n * Accepts the dialog.\n * @group Method\n */\n onAccept() {\n this.acceptConfirmationSource.next(null);\n }\n static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: \"12.0.0\", version: \"18.0.1\", ngImport: i0, type: ConfirmationService, deps: [], target: i0.ɵɵFactoryTarget.Injectable });\n static ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: \"12.0.0\", version: \"18.0.1\", ngImport: i0, type: ConfirmationService });\n}\ni0.ɵɵngDeclareClassMetadata({ minVersion: \"12.0.0\", version: \"18.0.1\", ngImport: i0, type: ConfirmationService, decorators: [{\n type: Injectable\n }] });\n\nclass ContextMenuService {\n activeItemKeyChange = new Subject();\n activeItemKeyChange$ = this.activeItemKeyChange.asObservable();\n activeItemKey;\n changeKey(key) {\n this.activeItemKey = key;\n this.activeItemKeyChange.next(this.activeItemKey);\n }\n reset() {\n this.activeItemKey = null;\n this.activeItemKeyChange.next(this.activeItemKey);\n }\n static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: \"12.0.0\", version: \"18.0.1\", ngImport: i0, type: ContextMenuService, deps: [], target: i0.ɵɵFactoryTarget.Injectable });\n static ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: \"12.0.0\", version: \"18.0.1\", ngImport: i0, type: ContextMenuService });\n}\ni0.ɵɵngDeclareClassMetadata({ minVersion: \"12.0.0\", version: \"18.0.1\", ngImport: i0, type: ContextMenuService, decorators: [{\n type: Injectable\n }] });\n\nclass FilterMatchMode {\n static STARTS_WITH = 'startsWith';\n static CONTAINS = 'contains';\n static NOT_CONTAINS = 'notContains';\n static ENDS_WITH = 'endsWith';\n static EQUALS = 'equals';\n static NOT_EQUALS = 'notEquals';\n static IN = 'in';\n static LESS_THAN = 'lt';\n static LESS_THAN_OR_EQUAL_TO = 'lte';\n static GREATER_THAN = 'gt';\n static GREATER_THAN_OR_EQUAL_TO = 'gte';\n static BETWEEN = 'between';\n static IS = 'is';\n static IS_NOT = 'isNot';\n static BEFORE = 'before';\n static AFTER = 'after';\n static DATE_IS = 'dateIs';\n static DATE_IS_NOT = 'dateIsNot';\n static DATE_BEFORE = 'dateBefore';\n static DATE_AFTER = 'dateAfter';\n}\n\nclass FilterOperator {\n static AND = 'and';\n static OR = 'or';\n}\n\nclass FilterService {\n filter(value, fields, filterValue, filterMatchMode, filterLocale) {\n let filteredItems = [];\n if (value) {\n for (let item of value) {\n for (let field of fields) {\n let fieldValue = ObjectUtils.resolveFieldData(item, field);\n if (this.filters[filterMatchMode](fieldValue, filterValue, filterLocale)) {\n filteredItems.push(item);\n break;\n }\n }\n }\n }\n return filteredItems;\n }\n filters = {\n startsWith: (value, filter, filterLocale) => {\n if (filter === undefined || filter === null || filter.trim() === '') {\n return true;\n }\n if (value === undefined || value === null) {\n return false;\n }\n let filterValue = ObjectUtils.removeAccents(filter.toString()).toLocaleLowerCase(filterLocale);\n let stringValue = ObjectUtils.removeAccents(value.toString()).toLocaleLowerCase(filterLocale);\n return stringValue.slice(0, filterValue.length) === filterValue;\n },\n contains: (value, filter, filterLocale) => {\n if (filter === undefined || filter === null || (typeof filter === 'string' && filter.trim() === '')) {\n return true;\n }\n if (value === undefined || value === null) {\n return false;\n }\n let filterValue = ObjectUtils.removeAccents(filter.toString()).toLocaleLowerCase(filterLocale);\n let stringValue = ObjectUtils.removeAccents(value.toString()).toLocaleLowerCase(filterLocale);\n return stringValue.indexOf(filterValue) !== -1;\n },\n notContains: (value, filter, filterLocale) => {\n if (filter === undefined || filter === null || (typeof filter === 'string' && filter.trim() === '')) {\n return true;\n }\n if (value === undefined || value === null) {\n return false;\n }\n let filterValue = ObjectUtils.removeAccents(filter.toString()).toLocaleLowerCase(filterLocale);\n let stringValue = ObjectUtils.removeAccents(value.toString()).toLocaleLowerCase(filterLocale);\n return stringValue.indexOf(filterValue) === -1;\n },\n endsWith: (value, filter, filterLocale) => {\n if (filter === undefined || filter === null || filter.trim() === '') {\n return true;\n }\n if (value === undefined || value === null) {\n return false;\n }\n let filterValue = ObjectUtils.removeAccents(filter.toString()).toLocaleLowerCase(filterLocale);\n let stringValue = ObjectUtils.removeAccents(value.toString()).toLocaleLowerCase(filterLocale);\n return stringValue.indexOf(filterValue, stringValue.length - filterValue.length) !== -1;\n },\n equals: (value, filter, filterLocale) => {\n if (filter === undefined || filter === null || (typeof filter === 'string' && filter.trim() === '')) {\n return true;\n }\n if (value === undefined || value === null) {\n return false;\n }\n if (value.getTime && filter.getTime)\n return value.getTime() === filter.getTime();\n else if (value == filter)\n return true;\n else\n return ObjectUtils.removeAccents(value.toString()).toLocaleLowerCase(filterLocale) == ObjectUtils.removeAccents(filter.toString()).toLocaleLowerCase(filterLocale);\n },\n notEquals: (value, filter, filterLocale) => {\n if (filter === undefined || filter === null || (typeof filter === 'string' && filter.trim() === '')) {\n return false;\n }\n if (value === undefined || value === null) {\n return true;\n }\n if (value.getTime && filter.getTime)\n return value.getTime() !== filter.getTime();\n else if (value == filter)\n return false;\n else\n return ObjectUtils.removeAccents(value.toString()).toLocaleLowerCase(filterLocale) != ObjectUtils.removeAccents(filter.toString()).toLocaleLowerCase(filterLocale);\n },\n in: (value, filter) => {\n if (filter === undefined || filter === null || filter.length === 0) {\n return true;\n }\n for (let i = 0; i < filter.length; i++) {\n if (ObjectUtils.equals(value, filter[i])) {\n return true;\n }\n }\n return false;\n },\n between: (value, filter) => {\n if (filter == null || filter[0] == null || filter[1] == null) {\n return true;\n }\n if (value === undefined || value === null) {\n return false;\n }\n if (value.getTime)\n return filter[0].getTime() <= value.getTime() && value.getTime() <= filter[1].getTime();\n else\n return filter[0] <= value && value <= filter[1];\n },\n lt: (value, filter, filterLocale) => {\n if (filter === undefined || filter === null) {\n return true;\n }\n if (value === undefined || value === null) {\n return false;\n }\n if (value.getTime && filter.getTime)\n return value.getTime() < filter.getTime();\n else\n return value < filter;\n },\n lte: (value, filter, filterLocale) => {\n if (filter === undefined || filter === null) {\n return true;\n }\n if (value === undefined || value === null) {\n return false;\n }\n if (value.getTime && filter.getTime)\n return value.getTime() <= filter.getTime();\n else\n return value <= filter;\n },\n gt: (value, filter, filterLocale) => {\n if (filter === undefined || filter === null) {\n return true;\n }\n if (value === undefined || value === null) {\n return false;\n }\n if (value.getTime && filter.getTime)\n return value.getTime() > filter.getTime();\n else\n return value > filter;\n },\n gte: (value, filter, filterLocale) => {\n if (filter === undefined || filter === null) {\n return true;\n }\n if (value === undefined || value === null) {\n return false;\n }\n if (value.getTime && filter.getTime)\n return value.getTime() >= filter.getTime();\n else\n return value >= filter;\n },\n is: (value, filter, filterLocale) => {\n return this.filters.equals(value, filter, filterLocale);\n },\n isNot: (value, filter, filterLocale) => {\n return this.filters.notEquals(value, filter, filterLocale);\n },\n before: (value, filter, filterLocale) => {\n return this.filters.lt(value, filter, filterLocale);\n },\n after: (value, filter, filterLocale) => {\n return this.filters.gt(value, filter, filterLocale);\n },\n dateIs: (value, filter) => {\n if (filter === undefined || filter === null) {\n return true;\n }\n if (value === undefined || value === null) {\n return false;\n }\n return value.toDateString() === filter.toDateString();\n },\n dateIsNot: (value, filter) => {\n if (filter === undefined || filter === null) {\n return true;\n }\n if (value === undefined || value === null) {\n return false;\n }\n return value.toDateString() !== filter.toDateString();\n },\n dateBefore: (value, filter) => {\n if (filter === undefined || filter === null) {\n return true;\n }\n if (value === undefined || value === null) {\n return false;\n }\n return value.getTime() < filter.getTime();\n },\n dateAfter: (value, filter) => {\n if (filter === undefined || filter === null) {\n return true;\n }\n if (value === undefined || value === null) {\n return false;\n }\n const valueCopy = new Date(value);\n valueCopy.setHours(0, 0, 0, 0);\n return valueCopy.getTime() > filter.getTime();\n }\n };\n register(rule, fn) {\n this.filters[rule] = fn;\n }\n static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: \"12.0.0\", version: \"18.0.1\", ngImport: i0, type: FilterService, deps: [], target: i0.ɵɵFactoryTarget.Injectable });\n static ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: \"12.0.0\", version: \"18.0.1\", ngImport: i0, type: FilterService, providedIn: 'root' });\n}\ni0.ɵɵngDeclareClassMetadata({ minVersion: \"12.0.0\", version: \"18.0.1\", ngImport: i0, type: FilterService, decorators: [{\n type: Injectable,\n args: [{ providedIn: 'root' }]\n }] });\n\n/**\n * Message service used in messages and toast components.\n * @group Service\n */\nclass MessageService {\n messageSource = new Subject();\n clearSource = new Subject();\n messageObserver = this.messageSource.asObservable();\n clearObserver = this.clearSource.asObservable();\n /**\n * Inserts single message.\n * @param {Message} message - Message to be added.\n * @group Method\n */\n add(message) {\n if (message) {\n this.messageSource.next(message);\n }\n }\n /**\n * Inserts new messages.\n * @param {Message[]} messages - Messages to be added.\n * @group Method\n */\n addAll(messages) {\n if (messages && messages.length) {\n this.messageSource.next(messages);\n }\n }\n /**\n * Clears the message with the given key.\n * @param {string} key - Key of the message to be cleared.\n * @group Method\n */\n clear(key) {\n this.clearSource.next(key || null);\n }\n static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: \"12.0.0\", version: \"18.0.1\", ngImport: i0, type: MessageService, deps: [], target: i0.ɵɵFactoryTarget.Injectable });\n static ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: \"12.0.0\", version: \"18.0.1\", ngImport: i0, type: MessageService });\n}\ni0.ɵɵngDeclareClassMetadata({ minVersion: \"12.0.0\", version: \"18.0.1\", ngImport: i0, type: MessageService, decorators: [{\n type: Injectable\n }] });\n\nclass OverlayService {\n clickSource = new Subject();\n clickObservable = this.clickSource.asObservable();\n add(event) {\n if (event) {\n this.clickSource.next(event);\n }\n }\n static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: \"12.0.0\", version: \"18.0.1\", ngImport: i0, type: OverlayService, deps: [], target: i0.ɵɵFactoryTarget.Injectable });\n static ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: \"12.0.0\", version: \"18.0.1\", ngImport: i0, type: OverlayService, providedIn: 'root' });\n}\ni0.ɵɵngDeclareClassMetadata({ minVersion: \"12.0.0\", version: \"18.0.1\", ngImport: i0, type: OverlayService, decorators: [{\n type: Injectable,\n args: [{ providedIn: 'root' }]\n }] });\n\nclass PrimeIcons {\n static ADDRESS_BOOK = 'pi pi-address-book';\n static ALIGN_CENTER = 'pi pi-align-center';\n static ALIGN_JUSTIFY = 'pi pi-align-justify';\n static ALIGN_LEFT = 'pi pi-align-left';\n static ALIGN_RIGHT = 'pi pi-align-right';\n static AMAZON = 'pi pi-amazon';\n static ANDROID = 'pi pi-android';\n static ANGLE_DOUBLE_DOWN = 'pi pi-angle-double-down';\n static ANGLE_DOUBLE_LEFT = 'pi pi-angle-double-left';\n static ANGLE_DOUBLE_RIGHT = 'pi pi-angle-double-right';\n static ANGLE_DOUBLE_UP = 'pi pi-angle-double-up';\n static ANGLE_DOWN = 'pi pi-angle-down';\n static ANGLE_LEFT = 'pi pi-angle-left';\n static ANGLE_RIGHT = 'pi pi-angle-right';\n static ANGLE_UP = 'pi pi-angle-up';\n static APPLE = 'pi pi-apple';\n static ARROWS_ALT = 'pi pi-arrows-alt';\n static ARROW_CIRCLE_DOWN = 'pi pi-arrow-circle-down';\n static ARROW_CIRCLE_LEFT = 'pi pi-arrow-circle-left';\n static ARROW_CIRCLE_RIGHT = 'pi pi-arrow-circle-right';\n static ARROW_CIRCLE_UP = 'pi pi-arrow-circle-up';\n static ARROW_DOWN = 'pi pi-arrow-down';\n static ARROW_DOWN_LEFT = 'pi pi-arrow-down-left';\n static ARROW_DOWN_LEFT_AND_ARROW_UP_RIGHT_TO_CENTER = 'pi pi-arrow-down-left-and-arrow-up-right-to-center';\n static ARROW_DOWN_RIGHT = 'pi pi-arrow-down-right';\n static ARROW_LEFT = 'pi pi-arrow-left';\n static ARROW_RIGHT_ARROW_LEFT = 'pi pi-arrow-right-arrow-left';\n static ARROW_RIGHT = 'pi pi-arrow-right';\n static ARROW_UP = 'pi pi-arrow-up';\n static ARROW_UP_LEFT = 'pi pi-arrow-up-left';\n static ARROW_UP_RIGHT = 'pi pi-arrow-up-right';\n static ARROW_UP_RIGHT_AND_ARROW_DOWN_LEFT_FROM_CENTER = 'pi pi-arrow-up-right-and-arrow-down-left-from-center';\n static ARROW_H = 'pi pi-arrows-h';\n static ARROW_V = 'pi pi-arrows-v';\n static ASTERIKS = 'pi pi-asteriks';\n static AT = 'pi pi-at';\n static BACKWARD = 'pi pi-backward';\n static BAN = 'pi pi-ban';\n static BARCODE = 'pi pi-barcode';\n static BARS = 'pi pi-bars';\n static BELL = 'pi pi-bell';\n static BELL_SLASH = 'pi pi-bell-slash';\n static BITCOIN = 'pi pi-bitcoin';\n static BOLT = 'pi pi-bolt';\n static BOOK = 'pi pi-book';\n static BOOKMARK = 'pi pi-bookmark';\n static BOOKMARK_FILL = 'pi pi-bookmark-fill';\n static BOX = 'pi pi-box';\n static BRIEFCASE = 'pi pi-briefcase';\n static BUILDING = 'pi pi-building';\n static BUILDING_COLUMNS = 'pi pi-building-columns';\n static BULLSEYE = 'pi pi-bullseye';\n static CALCULATOR = 'pi pi-calculator';\n static CALENDAR = 'pi pi-calendar';\n static CALENDAR_CLOCK = 'pi pi-calendar-clock';\n static CALENDAR_MINUS = 'pi pi-calendar-minus';\n static CALENDAR_PLUS = 'pi pi-calendar-plus';\n static CALENDAR_TIMES = 'pi pi-calendar-times';\n static CAMERA = 'pi pi-camera';\n static CAR = 'pi pi-car';\n static CARET_DOWN = 'pi pi-caret-down';\n static CARET_LEFT = 'pi pi-caret-left';\n static CARET_RIGHT = 'pi pi-caret-right';\n static CARET_UP = 'pi pi-caret-up';\n static CART_ARROW_DOWN = 'pi pi-cart-arrow-down';\n static CART_MINUS = 'pi pi-cart-minus';\n static CART_PLUS = 'pi pi-cart-plus';\n static CHART_BAR = 'pi pi-chart-bar';\n static CHART_LINE = 'pi pi-chart-line';\n static CHART_PIE = 'pi pi-chart-pie';\n static CHART_SCATTER = 'pi pi-chart-scatter';\n static CHECK = 'pi pi-check';\n static CHECK_CIRCLE = 'pi pi-check-circle';\n static CHECK_SQUARE = 'pi pi-check-square';\n static CHEVRON_CIRCLE_DOWN = 'pi pi-chevron-circle-down';\n static CHEVRON_CIRCLE_LEFT = 'pi pi-chevron-circle-left';\n static CHEVRON_CIRCLE_RIGHT = 'pi pi-chevron-circle-right';\n static CHEVRON_CIRCLE_UP = 'pi pi-chevron-circle-up';\n static CHEVRON_DOWN = 'pi pi-chevron-down';\n static CHEVRON_LEFT = 'pi pi-chevron-left';\n static CHEVRON_RIGHT = 'pi pi-chevron-right';\n static CHEVRON_UP = 'pi pi-chevron-up';\n static CIRCLE = 'pi pi-circle';\n static CIRCLE_FILL = 'pi pi-circle-fill';\n static CLIPBOARD = 'pi pi-clipboard';\n static CLOCK = 'pi pi-clock';\n static CLONE = 'pi pi-clone';\n static CLOUD = 'pi pi-cloud';\n static CLOUD_DOWNLOAD = 'pi pi-cloud-download';\n static CLOUD_UPLOAD = 'pi pi-cloud-upload';\n static CODE = 'pi pi-code';\n static COG = 'pi pi-cog';\n static COMMENT = 'pi pi-comment';\n static COMMENTS = 'pi pi-comments';\n static COMPASS = 'pi pi-compass';\n static COPY = 'pi pi-copy';\n static CREDIT_CARD = 'pi pi-credit-card';\n static CROWN = 'pi pi-crown';\n static DATABASE = 'pi pi-database';\n static DESKTOP = 'pi pi-desktop';\n static DELETE_LEFT = 'pi pi-delete-left';\n static DIRECTIONS = 'pi pi-directions';\n static DIRECTIONS_ALT = 'pi pi-directions-alt';\n static DISCORD = 'pi pi-discord';\n static DOLLAR = 'pi pi-dollar';\n static DOWNLOAD = 'pi pi-download';\n static EJECT = 'pi pi-eject';\n static ELLIPSIS_H = 'pi pi-ellipsis-h';\n static ELLIPSIS_V = 'pi pi-ellipsis-v';\n static ENVELOPE = 'pi pi-envelope';\n static EQUALS = 'pi pi-equals';\n static ERASER = 'pi pi-eraser';\n static ETHEREUM = 'pi pi-ethereum';\n static EURO = 'pi pi-euro';\n static EXCLAMATION_CIRCLE = 'pi pi-exclamation-circle';\n static EXCLAMATION_TRIANGLE = 'pi pi-exclamation-triangle';\n static EXPAND = 'pi pi-expand';\n static EXTERNAL_LINK = 'pi pi-external-link';\n static EYE = 'pi pi-eye';\n static EYE_SLASH = 'pi pi-eye-slash';\n static FACE_SMILE = 'pi pi-face-smile';\n static FACEBOOK = 'pi pi-facebook';\n static FAST_BACKWARD = 'pi pi-fast-backward';\n static FAST_FORWARD = 'pi pi-fast-forward';\n static FILE = 'pi pi-file';\n static FILE_ARROW_UP = 'pi pi-file-arrow-up';\n static FILE_CHECK = 'pi pi-file-check';\n static FILE_EDIT = 'pi pi-file-edit';\n static FILE_IMPORT = 'pi pi-file-import';\n static FILE_PDF = 'pi pi-file-pdf';\n static FILE_PLUS = 'pi pi-file-plus';\n static FILE_EXCEL = 'pi pi-file-excel';\n static FILE_EXPORT = 'pi pi-file-export';\n static FILE_WORD = 'pi pi-file-word';\n static FILTER = 'pi pi-filter';\n static FILTER_FILL = 'pi pi-filter-fill';\n static FILTER_SLASH = 'pi pi-filter-slash';\n static FLAG = 'pi pi-flag';\n static FLAG_FILL = 'pi pi-flag-fill';\n static FOLDER = 'pi pi-folder';\n static FOLDER_OPEN = 'pi pi-folder-open';\n static FOLDER_PLUS = 'pi pi-folder-plus';\n static FORWARD = 'pi pi-forward';\n static GAUGE = 'pi pi-gauge';\n static GIFT = 'pi pi-gift';\n static GITHUB = 'pi pi-github';\n static GLOBE = 'pi pi-globe';\n static GOOGLE = 'pi pi-google';\n static GRADUATION_CAP = 'pi pi-graduation-cap';\n static HAMMER = 'pi pi-hammer';\n static HASHTAG = 'pi pi-hashtag';\n static HEADPHONES = 'pi pi-headphones';\n static HEART = 'pi pi-heart';\n static HEART_FILL = 'pi pi-heart-fill';\n static HISTORY = 'pi pi-history';\n static HOME = 'pi pi-home';\n static HOURGLASS = 'pi pi-hourglass';\n static ID_CARD = 'pi pi-id-card';\n static IMAGE = 'pi pi-image';\n static IMAGES = 'pi pi-images';\n static INBOX = 'pi pi-inbox';\n static INDIAN_RUPEE = 'pi pi-indian-rupee';\n static INFO = 'pi pi-info';\n static INFO_CIRCLE = 'pi pi-info-circle';\n static INSTAGRAM = 'pi pi-instagram';\n static KEY = 'pi pi-key';\n static LANGUAGE = 'pi pi-language';\n static LIGHTBULB = 'pi pi-lightbulb';\n static LINK = 'pi pi-link';\n static LINKEDIN = 'pi pi-linkedin';\n static LIST = 'pi pi-list';\n static LIST_CHECK = 'pi pi-list-check';\n static LOCK = 'pi pi-lock';\n static LOCK_OPEN = 'pi pi-lock-open';\n static MAP = 'pi pi-map';\n static MAP_MARKER = 'pi pi-map-marker';\n static MARS = 'pi pi-mars';\n static MEGAPHONE = 'pi pi-megaphone';\n static MICROCHIP = 'pi pi-microchip';\n static MICROCHIP_AI = 'pi pi-microchip-ai';\n static MICROPHONE = 'pi pi-microphone';\n static MICROSOFT = 'pi pi-microsoft';\n static MINUS = 'pi pi-minus';\n static MINUS_CIRCLE = 'pi pi-minus-circle';\n static MOBILE = 'pi pi-mobile';\n static MONEY_BILL = 'pi pi-money-bill';\n static MOON = 'pi pi-moon';\n static OBJECTS_COLUMN = 'pi pi-objects-column';\n static PALETTE = 'pi pi-palette';\n static PAPERCLIP = 'pi pi-paperclip';\n static PAUSE = 'pi pi-pause';\n static PAUSE_CIRCLE = 'pi pi-pause-circle';\n static PAYPAL = 'pi pi-paypal';\n static PEN_TO_SQUARE = 'pi pi-pen-to-square';\n static PENCIL = 'pi pi-pencil';\n static PERCENTAGE = 'pi pi-percentage';\n static PHONE = 'pi pi-phone';\n static PINTEREST = 'pi pi-pinterest';\n static PLAY = 'pi pi-play';\n static PLAY_CIRCLE = 'pi pi-play-circle';\n static PLUS = 'pi pi-plus';\n static PLUS_CIRCLE = 'pi pi-plus-circle';\n static POUND = 'pi pi-pound';\n static POWER_OFF = 'pi pi-power-off';\n static PRIME = 'pi pi-prime';\n static PRINT = 'pi pi-print';\n static QRCODE = 'pi pi-qrcode';\n static QUESTION = 'pi pi-question';\n static QUESTION_CIRCLE = 'pi pi-question-circle';\n static RECEIPT = 'pi pi-receipt';\n static REDDIT = 'pi pi-reddit';\n static REFRESH = 'pi pi-refresh';\n static REPLAY = 'pi pi-replay';\n static REPLY = 'pi pi-reply';\n static SAVE = 'pi pi-save';\n static SEARCH = 'pi pi-search';\n static SEARCH_MINUS = 'pi pi-search-minus';\n static SEARCH_PLUS = 'pi pi-search-plus';\n static SEND = 'pi pi-send';\n static SERVER = 'pi pi-server';\n static SHARE_ALT = 'pi pi-share-alt';\n static SHIELD = 'pi pi-shield';\n static SHOP = 'pi pi-shop';\n static SHOPPING_BAG = 'pi pi-shopping-bag';\n static SHOPPING_CART = 'pi pi-shopping-cart';\n static SIGN_IN = 'pi pi-sign-in';\n static SIGN_OUT = 'pi pi-sign-out';\n static SITEMAP = 'pi pi-sitemap';\n static SLACK = 'pi pi-slack';\n static SLIDERS_H = 'pi pi-sliders-h';\n static SLIDERS_V = 'pi pi-sliders-v';\n static SORT = 'pi pi-sort';\n static SORT_ALPHA_DOWN = 'pi pi-sort-alpha-down';\n static SORT_ALPHA_DOWN_ALT = 'pi pi-sort-alpha-down-alt';\n static SORT_ALPHA_UP = 'pi pi-sort-alpha-up';\n static SORT_ALPHA_UP_ALT = 'pi pi-sort-alpha-up-alt';\n static SORT_ALT = 'pi pi-sort-alt';\n static SORT_ALT_SLASH = 'pi pi-sort-alt-slash';\n static SORT_AMOUNT_DOWN = 'pi pi-sort-amount-down';\n static SORT_AMOUNT_DOWN_ALT = 'pi pi-sort-amount-down-alt';\n static SORT_AMOUNT_UP = 'pi pi-sort-amount-up';\n static SORT_AMOUNT_UP_ALT = 'pi pi-sort-amount-up-alt';\n static SORT_DOWN = 'pi pi-sort-down';\n static SORT_DOWN_FILL = 'pi pi-sort-down-fill';\n static SORT_NUMERIC_DOWN = 'pi pi-sort-numeric-down';\n static SORT_NUMERIC_DOWN_ALT = 'pi pi-sort-numeric-down-alt';\n static SORT_NUMERIC_UP = 'pi pi-sort-numeric-up';\n static SORT_NUMERIC_UP_ALT = 'pi pi-sort-numeric-up-alt';\n static SORT_UP = 'pi pi-sort-up';\n static SORT_UP_FILL = 'pi pi-sort-up-fill';\n static SPARKLES = 'pi pi-sparkles';\n static SPINNER = 'pi pi-spinner';\n static SPINNER_DOTTED = 'pi pi-spinner-dotted';\n static STAR = 'pi pi-star';\n static STAR_FILL = 'pi pi-star-fill';\n static STAR_HALF = 'pi pi-star-half';\n static STAR_HALF_FILL = 'pi pi-star-half-fill';\n static STEP_BACKWARD = 'pi pi-step-backward';\n static STEP_BACKWARD_ALT = 'pi pi-step-backward-alt';\n static STEP_FORWARD = 'pi pi-step-forward';\n static STEP_FORWARD_ALT = 'pi pi-step-forward-alt';\n static STOP = 'pi pi-stop';\n static STOP_CIRCLE = 'pi pi-stop-circle';\n static STOPWATCH = 'pi pi-stopwatch';\n static SUN = 'pi pi-sun';\n static SYNC = 'pi pi-sync';\n static TABLE = 'pi pi-table';\n static TABLET = 'pi pi-tablet';\n static TAG = 'pi pi-tag';\n static TAGS = 'pi pi-tags';\n static TELEGRAM = 'pi pi-telegram';\n static TH_LARGE = 'pi pi-th-large';\n static THUMBS_DOWN = 'pi pi-thumbs-down';\n static THUMBS_DOWN_FILL = 'pi pi-thumbs-down-fill';\n static THUMBS_UP = 'pi pi-thumbs-up';\n static THUMBS_UP_FILL = 'pi pi-thumbs-up-fill';\n static THUMBTACK = 'pi pi-thumbtack';\n static TICKET = 'pi pi-ticket';\n static TIKTOK = 'pi pi-tiktok';\n static TIMES = 'pi pi-times';\n static TIMES_CIRCLE = 'pi pi-times-circle';\n static TRASH = 'pi pi-trash';\n static TROPHY = 'pi pi-trophy';\n static TRUCK = 'pi pi-truck';\n static TURKISH_LIRA = 'pi pi-turkish-lira';\n static TWITCH = 'pi pi-twitch';\n static TWITTER = 'pi pi-twitter';\n static UNDO = 'pi pi-undo';\n static UNLOCK = 'pi pi-unlock';\n static UPLOAD = 'pi pi-upload';\n static USER = 'pi pi-user';\n static USER_EDIT = 'pi pi-user-edit';\n static USER_MINUS = 'pi pi-user-minus';\n static USER_PLUS = 'pi pi-user-plus';\n static USERS = 'pi pi-users';\n static VENUS = 'pi pi-venus';\n static VERIFIED = 'pi pi-verified';\n static VIDEO = 'pi pi-video';\n static VIMEO = 'pi pi-vimeo';\n static VOLUME_DOWN = 'pi pi-volume-down';\n static VOLUME_OFF = 'pi pi-volume-off';\n static VOLUME_UP = 'pi pi-volume-up';\n static WALLET = 'pi pi-wallet';\n static WAREHOUSE = 'pi pi-warehouse';\n static WAVE_PULSE = 'pi pi-wave-pulse';\n static WHATSAPP = 'pi pi-whatsapp';\n static WIFI = 'pi pi-wifi';\n static WINDOW_MAXIMIZE = 'pi pi-window-maximize';\n static WINDOW_MINIMIZE = 'pi pi-window-minimize';\n static WRENCH = 'pi pi-wrench';\n static YOUTUBE = 'pi pi-youtube';\n}\n\nclass PrimeNGConfig {\n ripple = false;\n inputStyle = signal('outlined');\n overlayOptions = {};\n csp = signal({ nonce: undefined });\n filterMatchModeOptions = {\n text: [FilterMatchMode.STARTS_WITH, FilterMatchMode.CONTAINS, FilterMatchMode.NOT_CONTAINS, FilterMatchMode.ENDS_WITH, FilterMatchMode.EQUALS, FilterMatchMode.NOT_EQUALS],\n numeric: [FilterMatchMode.EQUALS, FilterMatchMode.NOT_EQUALS, FilterMatchMode.LESS_THAN, FilterMatchMode.LESS_THAN_OR_EQUAL_TO, FilterMatchMode.GREATER_THAN, FilterMatchMode.GREATER_THAN_OR_EQUAL_TO],\n date: [FilterMatchMode.DATE_IS, FilterMatchMode.DATE_IS_NOT, FilterMatchMode.DATE_BEFORE, FilterMatchMode.DATE_AFTER]\n };\n translation = {\n startsWith: 'Starts with',\n contains: 'Contains',\n notContains: 'Not contains',\n endsWith: 'Ends with',\n equals: 'Equals',\n notEquals: 'Not equals',\n noFilter: 'No Filter',\n lt: 'Less than',\n lte: 'Less than or equal to',\n gt: 'Greater than',\n gte: 'Greater than or equal to',\n is: 'Is',\n isNot: 'Is not',\n before: 'Before',\n after: 'After',\n dateIs: 'Date is',\n dateIsNot: 'Date is not',\n dateBefore: 'Date is before',\n dateAfter: 'Date is after',\n clear: 'Clear',\n apply: 'Apply',\n matchAll: 'Match All',\n matchAny: 'Match Any',\n addRule: 'Add Rule',\n removeRule: 'Remove Rule',\n accept: 'Yes',\n reject: 'No',\n choose: 'Choose',\n upload: 'Upload',\n cancel: 'Cancel',\n pending: 'Pending',\n fileSizeTypes: ['B', 'KB', 'MB', 'GB', 'TB', 'PB', 'EB', 'ZB', 'YB'],\n dayNames: ['Sunday', 'Monday', 'Tuesday', 'Wednesday', 'Thursday', 'Friday', 'Saturday'],\n dayNamesShort: ['Sun', 'Mon', 'Tue', 'Wed', 'Thu', 'Fri', 'Sat'],\n dayNamesMin: ['Su', 'Mo', 'Tu', 'We', 'Th', 'Fr', 'Sa'],\n monthNames: ['January', 'February', 'March', 'April', 'May', 'June', 'July', 'August', 'September', 'October', 'November', 'December'],\n monthNamesShort: ['Jan', 'Feb', 'Mar', 'Apr', 'May', 'Jun', 'Jul', 'Aug', 'Sep', 'Oct', 'Nov', 'Dec'],\n chooseYear: 'Choose Year',\n chooseMonth: 'Choose Month',\n chooseDate: 'Choose Date',\n prevDecade: 'Previous Decade',\n nextDecade: 'Next Decade',\n prevYear: 'Previous Year',\n nextYear: 'Next Year',\n prevMonth: 'Previous Month',\n nextMonth: 'Next Month',\n prevHour: 'Previous Hour',\n nextHour: 'Next Hour',\n prevMinute: 'Previous Minute',\n nextMinute: 'Next Minute',\n prevSecond: 'Previous Second',\n nextSecond: 'Next Second',\n am: 'am',\n pm: 'pm',\n dateFormat: 'mm/dd/yy',\n firstDayOfWeek: 0,\n today: 'Today',\n weekHeader: 'Wk',\n weak: 'Weak',\n medium: 'Medium',\n strong: 'Strong',\n passwordPrompt: 'Enter a password',\n emptyMessage: 'No results found',\n searchMessage: '{0} results are available',\n selectionMessage: '{0} items selected',\n emptySelectionMessage: 'No selected item',\n emptySearchMessage: 'No results found',\n emptyFilterMessage: 'No results found',\n aria: {\n trueLabel: 'True',\n falseLabel: 'False',\n nullLabel: 'Not Selected',\n star: '1 star',\n stars: '{star} stars',\n selectAll: 'All items selected',\n unselectAll: 'All items unselected',\n close: 'Close',\n previous: 'Previous',\n next: 'Next',\n navigation: 'Navigation',\n scrollTop: 'Scroll Top',\n moveTop: 'Move Top',\n moveUp: 'Move Up',\n moveDown: 'Move Down',\n moveBottom: 'Move Bottom',\n moveToTarget: 'Move to Target',\n moveToSource: 'Move to Source',\n moveAllToTarget: 'Move All to Target',\n moveAllToSource: 'Move All to Source',\n pageLabel: '{page}',\n firstPageLabel: 'First Page',\n lastPageLabel: 'Last Page',\n nextPageLabel: 'Next Page',\n prevPageLabel: 'Previous Page',\n rowsPerPageLabel: 'Rows per page',\n previousPageLabel: 'Previous Page',\n jumpToPageDropdownLabel: 'Jump to Page Dropdown',\n jumpToPageInputLabel: 'Jump to Page Input',\n selectRow: 'Row Selected',\n unselectRow: 'Row Unselected',\n expandRow: 'Row Expanded',\n collapseRow: 'Row Collapsed',\n showFilterMenu: 'Show Filter Menu',\n hideFilterMenu: 'Hide Filter Menu',\n filterOperator: 'Filter Operator',\n filterConstraint: 'Filter Constraint',\n editRow: 'Row Edit',\n saveEdit: 'Save Edit',\n cancelEdit: 'Cancel Edit',\n listView: 'List View',\n gridView: 'Grid View',\n slide: 'Slide',\n slideNumber: '{slideNumber}',\n zoomImage: 'Zoom Image',\n zoomIn: 'Zoom In',\n zoomOut: 'Zoom Out',\n rotateRight: 'Rotate Right',\n rotateLeft: 'Rotate Left',\n listLabel: 'Option List',\n selectColor: 'Select a color',\n removeLabel: 'Remove',\n browseFiles: 'Browse Files',\n maximizeLabel: 'Maximize'\n }\n };\n zIndex = {\n modal: 1100,\n overlay: 1000,\n menu: 1000,\n tooltip: 1100\n };\n translationSource = new Subject();\n translationObserver = this.translationSource.asObservable();\n getTranslation(key) {\n return this.translation[key];\n }\n setTranslation(value) {\n this.translation = { ...this.translation, ...value };\n this.translationSource.next(this.translation);\n }\n static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: \"12.0.0\", version: \"18.0.1\", ngImport: i0, type: PrimeNGConfig, deps: [], target: i0.ɵɵFactoryTarget.Injectable });\n static ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: \"12.0.0\", version: \"18.0.1\", ngImport: i0, type: PrimeNGConfig, providedIn: 'root' });\n}\ni0.ɵɵngDeclareClassMetadata({ minVersion: \"12.0.0\", version: \"18.0.1\", ngImport: i0, type: PrimeNGConfig, decorators: [{\n type: Injectable,\n args: [{ providedIn: 'root' }]\n }] });\n\nclass Header {\n static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: \"12.0.0\", version: \"18.0.1\", ngImport: i0, type: Header, deps: [], target: i0.ɵɵFactoryTarget.Component });\n static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: \"14.0.0\", version: \"18.0.1\", type: Header, isStandalone: true, selector: \"p-header\", ngImport: i0, template: '<ng-content></ng-content>', isInline: true });\n}\ni0.ɵɵngDeclareClassMetadata({ minVersion: \"12.0.0\", version: \"18.0.1\", ngImport: i0, type: Header, decorators: [{\n type: Component,\n args: [{\n selector: 'p-header',\n standalone: true,\n template: '<ng-content></ng-content>'\n }]\n }] });\nclass Footer {\n static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: \"12.0.0\", version: \"18.0.1\", ngImport: i0, type: Footer, deps: [], target: i0.ɵɵFactoryTarget.Component });\n static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: \"14.0.0\", version: \"18.0.1\", type: Footer, isStandalone: true, selector: \"p-footer\", ngImport: i0, template: '<ng-content></ng-content>', isInline: true });\n}\ni0.ɵɵngDeclareClassMetadata({ minVersion: \"12.0.0\", version: \"18.0.1\", ngImport: i0, type: Footer, decorators: [{\n type: Component,\n args: [{\n selector: 'p-footer',\n standalone: true,\n template: '<ng-content></ng-content>'\n }]\n }] });\nclass PrimeTemplate {\n template;\n type;\n name;\n constructor(template) {\n this.template = template;\n }\n getType() {\n return this.name;\n }\n static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: \"12.0.0\", version: \"18.0.1\", ngImport: i0, type: PrimeTemplate, deps: [{ token: i0.TemplateRef }], target: i0.ɵɵFactoryTarget.Directive });\n static ɵdir = i0.ɵɵngDeclareDirective({ minVersion: \"14.0.0\", version: \"18.0.1\", type: PrimeTemplate, isStandalone: true, selector: \"[pTemplate]\", inputs: { type: \"type\", name: [\"pTemplate\", \"name\"] }, ngImport: i0 });\n}\ni0.ɵɵngDeclareClassMetadata({ minVersion: \"12.0.0\", version: \"18.0.1\", ngImport: i0, type: PrimeTemplate, decorators: [{\n type: Directive,\n args: [{\n selector: '[pTemplate]',\n standalone: true,\n host: {}\n }]\n }], ctorParameters: () => [{ type: i0.TemplateRef }], propDecorators: { type: [{\n type: Input\n }], name: [{\n type: Input,\n args: ['pTemplate']\n }] } });\nclass SharedModule {\n static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: \"12.0.0\", version: \"18.0.1\", ngImport: i0, type: SharedModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule });\n static ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: \"14.0.0\", version: \"18.0.1\", ngImport: i0, type: SharedModule, imports: [Header, Footer, PrimeTemplate], exports: [Header, Footer, PrimeTemplate] });\n static ɵinj = i0.ɵɵngDeclareInjector({ minVersion: \"12.0.0\", version: \"18.0.1\", ngImport: i0, type: SharedModule });\n}\ni0.ɵɵngDeclareClassMetadata({ minVersion: \"12.0.0\", version: \"18.0.1\", ngImport: i0, type: SharedModule, decorators: [{\n type: NgModule,\n args: [{\n imports: [Header, Footer, PrimeTemplate],\n exports: [Header, Footer, PrimeTemplate]\n }]\n }] });\n\nclass TranslationKeys {\n static STARTS_WITH = 'startsWith';\n static CONTAINS = 'contains';\n static NOT_CONTAINS = 'notContains';\n static ENDS_WITH = 'endsWith';\n static EQUALS = 'equals';\n static NOT_EQUALS = 'notEquals';\n static NO_FILTER = 'noFilter';\n static LT = 'lt';\n static LTE = 'lte';\n static GT = 'gt';\n static GTE = 'gte';\n static IS = 'is';\n static IS_NOT = 'isNot';\n static BEFORE = 'before';\n static AFTER = 'after';\n static CLEAR = 'clear';\n static APPLY = 'apply';\n static MATCH_ALL = 'matchAll';\n static MATCH_ANY = 'matchAny';\n static ADD_RULE = 'addRule';\n static REMOVE_RULE = 'removeRule';\n static ACCEPT = 'accept';\n static REJECT = 'reject';\n static CHOOSE = 'choose';\n static UPLOAD = 'upload';\n static CANCEL = 'cancel';\n static PENDING = 'pending';\n static FILE_SIZE_TYPES = 'fileSizeTypes';\n static DAY_NAMES = 'dayNames';\n static DAY_NAMES_SHORT = 'dayNamesShort';\n static DAY_NAMES_MIN = 'dayNamesMin';\n static MONTH_NAMES = 'monthNames';\n static MONTH_NAMES_SHORT = 'monthNamesShort';\n static FIRST_DAY_OF_WEEK = 'firstDayOfWeek';\n static TODAY = 'today';\n static WEEK_HEADER = 'weekHeader';\n static WEAK = 'weak';\n static MEDIUM = 'medium';\n static STRONG = 'strong';\n static PASSWORD_PROMPT = 'passwordPrompt';\n static EMPTY_MESSAGE = 'emptyMessage';\n static EMPTY_FILTER_MESSAGE = 'emptyFilterMessage';\n static SHOW_FILTER_MENU = 'showFilterMenu';\n static HIDE_FILTER_MENU = 'hideFilterMenu';\n static SELECTION_MESSAGE = 'selectionMessage';\n static ARIA = 'aria';\n static SELECT_COLOR = 'selectColor';\n static BROWSE_FILES = 'browseFiles';\n}\n\nclass TreeDragDropService {\n dragStartSource = new Subject();\n dragStopSource = new Subject();\n dragStart$ = this.dragStartSource.asObservable();\n dragStop$ = this.dragStopSource.asObservable();\n startDrag(event) {\n this.dragStartSource.next(event);\n }\n stopDrag(event) {\n this.dragStopSource.next(event);\n }\n static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: \"12.0.0\", version: \"18.0.1\", ngImport: i0, type: TreeDragDropService, deps: [], target: i0.ɵɵFactoryTarget.Injectable });\n static ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: \"12.0.0\", version: \"18.0.1\", ngImport: i0, type: TreeDragDropService });\n}\ni0.ɵɵngDeclareClassMetadata({ minVersion: \"12.0.0\", version: \"18.0.1\", ngImport: i0, type: TreeDragDropService, decorators: [{\n type: Injectable\n }] });\n\n/**\n * Generated bundle index. Do not edit.\n */\n\nexport { ConfirmEventType, ConfirmationService, ContextMenuService, FilterMatchMode, FilterOperator, FilterService, Footer, Header, MessageService, OverlayService, PrimeIcons, PrimeNGConfig, PrimeTemplate, SharedModule, TranslationKeys, TreeDragDropService };\n//# sourceMappingURL=primeng-api.mjs.map\n","import { DomHandler } from 'primeng/dom';\nimport { DOCUMENT, isPlatformBrowser, CommonModule } from '@angular/common';\nimport * as i0 from '@angular/core';\nimport { inject, PLATFORM_ID, ElementRef, booleanAttribute, Directive, Input, NgModule } from '@angular/core';\n\n/**\n * Focus Trap keeps focus within a certain DOM element while tabbing.\n * @group Components\n */\nclass FocusTrap {\n /**\n * When set as true, focus wouldn't be managed.\n * @group Props\n */\n pFocusTrapDisabled = false;\n platformId = inject(PLATFORM_ID);\n host = inject(ElementRef);\n document = inject(DOCUMENT);\n firstHiddenFocusableElement;\n lastHiddenFocusableElement;\n ngOnInit() {\n if (isPlatformBrowser(this.platformId) && !this.pFocusTrapDisabled) {\n !this.firstHiddenFocusableElement && !this.lastHiddenFocusableElement && this.createHiddenFocusableElements();\n }\n }\n ngOnChanges(changes) {\n if (changes.pFocusTrapDisabled && isPlatformBrowser(this.platformId)) {\n if (changes.pFocusTrapDisabled.currentValue) {\n this.removeHiddenFocusableElements();\n }\n else {\n this.createHiddenFocusableElements();\n }\n }\n }\n removeHiddenFocusableElements() {\n if (this.firstHiddenFocusableElement && this.firstHiddenFocusableElement.parentNode) {\n this.firstHiddenFocusableElement.parentNode.removeChild(this.firstHiddenFocusableElement);\n }\n if (this.lastHiddenFocusableElement && this.lastHiddenFocusableElement.parentNode) {\n this.lastHiddenFocusableElement.parentNode.removeChild(this.lastHiddenFocusableElement);\n }\n }\n getComputedSelector(selector) {\n return `:not(.p-hidden-focusable):not([data-p-hidden-focusable=\"true\"])${selector ?? ''}`;\n }\n createHiddenFocusableElements() {\n const tabindex = '0';\n const createFocusableElement = (onFocus) => {\n return DomHandler.createElement('span', {\n class: 'p-hidden-accessible p-hidden-focusable',\n tabindex,\n role: 'presentation',\n 'data-p-hidden-accessible': true,\n 'data-p-hidden-focusable': true,\n onFocus: onFocus?.bind(this)\n });\n };\n this.firstHiddenFocusableElement = createFocusableElement(this.onFirstHiddenElementFocus);\n this.lastHiddenFocusableElement = createFocusableElement(this.onLastHiddenElementFocus);\n this.firstHiddenFocusableElement.setAttribute('data-pc-section', 'firstfocusableelement');\n this.lastHiddenFocusableElement.setAttribute('data-pc-section', 'lastfocusableelement');\n this.host.nativeElement.prepend(this.firstHiddenFocusableElement);\n this.host.nativeElement.append(this.lastHiddenFocusableElement);\n }\n onFirstHiddenElementFocus(event) {\n const { currentTarget, relatedTarget } = event;\n const focusableElement = relatedTarget === this.lastHiddenFocusableElement || !this.host.nativeElement?.contains(relatedTarget) ? DomHandler.getFirstFocusableElement(currentTarget.parentElement, ':not(.p-hidden-focusable)') : this.lastHiddenFocusableElement;\n DomHandler.focus(focusableElement);\n }\n onLastHiddenElementFocus(event) {\n const { currentTarget, relatedTarget } = event;\n const focusableElement = relatedTarget === this.firstHiddenFocusableElement || !this.host.nativeElement?.contains(relatedTarget) ? DomHandler.getLastFocusableElement(currentTarget.parentElement, ':not(.p-hidden-focusable)') : this.firstHiddenFocusableElement;\n DomHandler.focus(focusableElement);\n }\n static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: \"12.0.0\", version: \"18.0.1\", ngImport: i0, type: FocusTrap, deps: [], target: i0.ɵɵFactoryTarget.Directive });\n static ɵdir = i0.ɵɵngDeclareDirective({ minVersion: \"16.1.0\", version: \"18.0.1\", type: FocusTrap, selector: \"[pFocusTrap]\", inputs: { pFocusTrapDisabled: [\"pFocusTrapDisabled\", \"pFocusTrapDisabled\", booleanAttribute] }, host: { classAttribute: \"p-element\" }, usesOnChanges: true, ngImport: i0 });\n}\ni0.ɵɵngDeclareClassMetadata({ minVersion: \"12.0.0\", version: \"18.0.1\", ngImport: i0, type: FocusTrap, decorators: [{\n type: Directive,\n args: [{\n selector: '[pFocusTrap]',\n host: {\n class: 'p-element'\n }\n }]\n }], propDecorators: { pFocusTrapDisabled: [{\n type: Input,\n args: [{ transform: booleanAttribute }]\n }] } });\nclass FocusTrapModule {\n static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: \"12.0.0\", version: \"18.0.1\", ngImport: i0, type: FocusTrapModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule });\n static ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: \"14.0.0\", version: \"18.0.1\", ngImport: i0, type: FocusTrapModule, declarations: [FocusTrap], imports: [CommonModule], exports: [FocusTrap] });\n static ɵinj = i0.ɵɵngDeclareInjector({ minVersion: \"12.0.0\", version: \"18.0.1\", ngImport: i0, type: FocusTrapModule, imports: [CommonModule] });\n}\ni0.ɵɵngDeclareClassMetadata({ minVersion: \"12.0.0\", version: \"18.0.1\", ngImport: i0, type: FocusTrapModule, decorators: [{\n type: NgModule,\n args: [{\n imports: [CommonModule],\n exports: [FocusTrap],\n declarations: [FocusTrap]\n }]\n }] });\n\n/**\n * Generated bundle index. Do not edit.\n */\n\nexport { FocusTrap, FocusTrapModule };\n//# sourceMappingURL=primeng-focustrap.mjs.map\n","import * as i0 from '@angular/core';\nimport { booleanAttribute, Component, ChangeDetectionStrategy, ViewEncapsulation, Input } from '@angular/core';\nimport { ObjectUtils } from 'primeng/utils';\n\nclass BaseIcon {\n label;\n spin = false;\n styleClass;\n role;\n ariaLabel;\n ariaHidden;\n ngOnInit() {\n this.getAttributes();\n }\n getAttributes() {\n const isLabelEmpty = ObjectUtils.isEmpty(this.label);\n this.role = !isLabelEmpty ? 'img' : undefined;\n this.ariaLabel = !isLabelEmpty ? this.label : undefined;\n this.ariaHidden = isLabelEmpty;\n }\n getClassNames() {\n return `p-icon ${this.styleClass ? this.styleClass + ' ' : ''}${this.spin ? 'p-icon-spin' : ''}`;\n }\n static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: \"12.0.0\", version: \"18.0.1\", ngImport: i0, type: BaseIcon, deps: [], target: i0.ɵɵFactoryTarget.Component });\n static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: \"16.1.0\", version: \"18.0.1\", type: BaseIcon, isStandalone: true, selector: \"ng-component\", inputs: { label: \"label\", spin: [\"spin\", \"spin\", booleanAttribute], styleClass: \"styleClass\" }, host: { classAttribute: \"p-element p-icon-wrapper\" }, ngImport: i0, template: ` <ng-content></ng-content> `, isInline: true, changeDetection: i0.ChangeDetectionStrategy.OnPush, encapsulation: i0.ViewEncapsulation.None });\n}\ni0.ɵɵngDeclareClassMetadata({ minVersion: \"12.0.0\", version: \"18.0.1\", ngImport: i0, type: BaseIcon, decorators: [{\n type: Component,\n args: [{\n template: ` <ng-content></ng-content> `,\n standalone: true,\n changeDetection: ChangeDetectionStrategy.OnPush,\n encapsulation: ViewEncapsulation.None,\n host: {\n class: 'p-element p-icon-wrapper'\n }\n }]\n }], propDecorators: { label: [{\n type: Input\n }], spin: [{\n type: Input,\n args: [{ transform: booleanAttribute }]\n }], styleClass: [{\n type: Input\n }] } });\n\n/**\n * Generated bundle index. Do not edit.\n */\n\nexport { BaseIcon };\n//# sourceMappingURL=primeng-baseicon.mjs.map\n","import * as i0 from '@angular/core';\nimport { Component } from '@angular/core';\nimport { BaseIcon } from 'primeng/baseicon';\n\nclass TimesIcon extends BaseIcon {\n static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: \"12.0.0\", version: \"18.0.1\", ngImport: i0, type: TimesIcon, deps: null, target: i0.ɵɵFactoryTarget.Component });\n static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: \"14.0.0\", version: \"18.0.1\", type: TimesIcon, isStandalone: true, selector: \"TimesIcon\", usesInheritance: true, ngImport: i0, template: `\n <svg width=\"14\" height=\"14\" viewBox=\"0 0 14 14\" fill=\"none\" xmlns=\"http://www.w3.org/2000/svg\" [attr.aria-label]=\"ariaLabel\" [attr.aria-hidden]=\"ariaHidden\" [attr.role]=\"role\" [class]=\"getClassNames()\">\n <path\n d=\"M8.01186 7.00933L12.27 2.75116C12.341 2.68501 12.398 2.60524 12.4375 2.51661C12.4769 2.42798 12.4982 2.3323 12.4999 2.23529C12.5016 2.13827 12.4838 2.0419 12.4474 1.95194C12.4111 1.86197 12.357 1.78024 12.2884 1.71163C12.2198 1.64302 12.138 1.58893 12.0481 1.55259C11.9581 1.51625 11.8617 1.4984 11.7647 1.50011C11.6677 1.50182 11.572 1.52306 11.4834 1.56255C11.3948 1.60204 11.315 1.65898 11.2488 1.72997L6.99067 5.98814L2.7325 1.72997C2.59553 1.60234 2.41437 1.53286 2.22718 1.53616C2.03999 1.53946 1.8614 1.61529 1.72901 1.74767C1.59663 1.88006 1.5208 2.05865 1.5175 2.24584C1.5142 2.43303 1.58368 2.61419 1.71131 2.75116L5.96948 7.00933L1.71131 11.2675C1.576 11.403 1.5 11.5866 1.5 11.7781C1.5 11.9696 1.576 12.1532 1.71131 12.2887C1.84679 12.424 2.03043 12.5 2.2219 12.5C2.41338 12.5 2.59702 12.424 2.7325 12.2887L6.99067 8.03052L11.2488 12.2887C11.3843 12.424 11.568 12.5 11.7594 12.5C11.9509 12.5 12.1346 12.424 12.27 12.2887C12.4053 12.1532 12.4813 11.9696 12.4813 11.7781C12.4813 11.5866 12.4053 11.403 12.27 11.2675L8.01186 7.00933Z\"\n fill=\"currentColor\"\n />\n </svg>\n `, isInline: true });\n}\ni0.ɵɵngDeclareClassMetadata({ minVersion: \"12.0.0\", version: \"18.0.1\", ngImport: i0, type: TimesIcon, decorators: [{\n type: Component,\n args: [{\n selector: 'TimesIcon',\n standalone: true,\n imports: [BaseIcon],\n template: `\n <svg width=\"14\" height=\"14\" viewBox=\"0 0 14 14\" fill=\"none\" xmlns=\"http://www.w3.org/2000/svg\" [attr.aria-label]=\"ariaLabel\" [attr.aria-hidden]=\"ariaHidden\" [attr.role]=\"role\" [class]=\"getClassNames()\">\n <path\n d=\"M8.01186 7.00933L12.27 2.75116C12.341 2.68501 12.398 2.60524 12.4375 2.51661C12.4769 2.42798 12.4982 2.3323 12.4999 2.23529C12.5016 2.13827 12.4838 2.0419 12.4474 1.95194C12.4111 1.86197 12.357 1.78024 12.2884 1.71163C12.2198 1.64302 12.138 1.58893 12.0481 1.55259C11.9581 1.51625 11.8617 1.4984 11.7647 1.50011C11.6677 1.50182 11.572 1.52306 11.4834 1.56255C11.3948 1.60204 11.315 1.65898 11.2488 1.72997L6.99067 5.98814L2.7325 1.72997C2.59553 1.60234 2.41437 1.53286 2.22718 1.53616C2.03999 1.53946 1.8614 1.61529 1.72901 1.74767C1.59663 1.88006 1.5208 2.05865 1.5175 2.24584C1.5142 2.43303 1.58368 2.61419 1.71131 2.75116L5.96948 7.00933L1.71131 11.2675C1.576 11.403 1.5 11.5866 1.5 11.7781C1.5 11.9696 1.576 12.1532 1.71131 12.2887C1.84679 12.424 2.03043 12.5 2.2219 12.5C2.41338 12.5 2.59702 12.424 2.7325 12.2887L6.99067 8.03052L11.2488 12.2887C11.3843 12.424 11.568 12.5 11.7594 12.5C11.9509 12.5 12.1346 12.424 12.27 12.2887C12.4053 12.1532 12.4813 11.9696 12.4813 11.7781C12.4813 11.5866 12.4053 11.403 12.27 11.2675L8.01186 7.00933Z\"\n fill=\"currentColor\"\n />\n </svg>\n `\n }]\n }] });\n\n/**\n * Generated bundle index. Do not edit.\n */\n\nexport { TimesIcon };\n//# sourceMappingURL=primeng-icons-times.mjs.map\n","import * as i0 from '@angular/core';\nimport { Component } from '@angular/core';\nimport { BaseIcon } from 'primeng/baseicon';\nimport { UniqueComponentId } from 'primeng/utils';\n\nclass WindowMaximizeIcon extends BaseIcon {\n pathId;\n ngOnInit() {\n this.pathId = 'url(#' + UniqueComponentId() + ')';\n }\n static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: \"12.0.0\", version: \"18.0.1\", ngImport: i0, type: WindowMaximizeIcon, deps: null, target: i0.ɵɵFactoryTarget.Component });\n static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: \"14.0.0\", version: \"18.0.1\", type: WindowMaximizeIcon, isStandalone: true, selector: \"WindowMaximizeIcon\", usesInheritance: true, ngImport: i0, template: `\n <svg width=\"14\" height=\"14\" viewBox=\"0 0 14 14\" fill=\"none\" xmlns=\"http://www.w3.org/2000/svg\" [attr.aria-label]=\"ariaLabel\" [attr.aria-hidden]=\"ariaHidden\" [attr.role]=\"role\" [class]=\"getClassNames()\">\n <g [attr.clip-path]=\"pathId\">\n <path\n fill-rule=\"evenodd\"\n clip-rule=\"evenodd\"\n d=\"M7 14H11.8C12.3835 14 12.9431 13.7682 13.3556 13.3556C13.7682 12.9431 14 12.3835 14 11.8V2.2C14 1.61652 13.7682 1.05694 13.3556 0.644365C12.9431 0.231785 12.3835 0 11.8 0H2.2C1.61652 0 1.05694 0.231785 0.644365 0.644365C0.231785 1.05694 0 1.61652 0 2.2V7C0 7.15913 0.063214 7.31174 0.175736 7.42426C0.288258 7.53679 0.44087 7.6 0.6 7.6C0.75913 7.6 0.911742 7.53679 1.02426 7.42426C1.13679 7.31174 1.2 7.15913 1.2 7V2.2C1.2 1.93478 1.30536 1.68043 1.49289 1.49289C1.68043 1.30536 1.93478 1.2 2.2 1.2H11.8C12.0652 1.2 12.3196 1.30536 12.5071 1.49289C12.6946 1.68043 12.8 1.93478 12.8 2.2V11.8C12.8 12.0652 12.6946 12.3196 12.5071 12.5071C12.3196 12.6946 12.0652 12.8 11.8 12.8H7C6.84087 12.8 6.68826 12.8632 6.57574 12.9757C6.46321 13.0883 6.4 13.2409 6.4 13.4C6.4 13.5591 6.46321 13.7117 6.57574 13.8243C6.68826 13.9368 6.84087 14 7 14ZM9.77805 7.42192C9.89013 7.534 10.0415 7.59788 10.2 7.59995C10.3585 7.59788 10.5099 7.534 10.622 7.42192C10.7341 7.30985 10.798 7.15844 10.8 6.99995V3.94242C10.8066 3.90505 10.8096 3.86689 10.8089 3.82843C10.8079 3.77159 10.7988 3.7157 10.7824 3.6623C10.756 3.55552 10.701 3.45698 10.622 3.37798C10.5099 3.2659 10.3585 3.20202 10.2 3.19995H7.00002C6.84089 3.19995 6.68828 3.26317 6.57576 3.37569C6.46324 3.48821 6.40002 3.64082 6.40002 3.79995C6.40002 3.95908 6.46324 4.11169 6.57576 4.22422C6.68828 4.33674 6.84089 4.39995 7.00002 4.39995H8.80006L6.19997 7.00005C6.10158 7.11005 6.04718 7.25246 6.04718 7.40005C6.04718 7.54763 6.10158 7.69004 6.19997 7.80005C6.30202 7.91645 6.44561 7.98824 6.59997 8.00005C6.75432 7.98824 6.89791 7.91645 6.99997 7.80005L9.60002 5.26841V6.99995C9.6021 7.15844 9.66598 7.30985 9.77805 7.42192ZM1.4 14H3.8C4.17066 13.9979 4.52553 13.8498 4.78763 13.5877C5.04973 13.3256 5.1979 12.9707 5.2 12.6V10.2C5.1979 9.82939 5.04973 9.47452 4.78763 9.21242C4.52553 8.95032 4.17066 8.80215 3.8 8.80005H1.4C1.02934 8.80215 0.674468 8.95032 0.412371 9.21242C0.150274 9.47452 0.00210008 9.82939 0 10.2V12.6C0.00210008 12.9707 0.150274 13.3256 0.412371 13.5877C0.674468 13.8498 1.02934 13.9979 1.4 14ZM1.25858 10.0586C1.29609 10.0211 1.34696 10 1.4 10H3.8C3.85304 10 3.90391 10.0211 3.94142 10.0586C3.97893 10.0961 4 10.147 4 10.2V12.6C4 12.6531 3.97893 12.704 3.94142 12.7415C3.90391 12.779 3.85304 12.8 3.8 12.8H1.4C1.34696 12.8 1.29609 12.779 1.25858 12.7415C1.22107 12.704 1.2 12.6531 1.2 12.6V10.2C1.2 10.147 1.22107 10.0961 1.25858 10.0586Z\"\n fill=\"currentColor\"\n />\n </g>\n <defs>\n <clipPath [id]=\"pathId\">\n <rect width=\"14\" height=\"14\" fill=\"white\" />\n </clipPath>\n </defs>\n </svg>\n `, isInline: true });\n}\ni0.ɵɵngDeclareClassMetadata({ minVersion: \"12.0.0\", version: \"18.0.1\", ngImport: i0, type: WindowMaximizeIcon, decorators: [{\n type: Component,\n args: [{\n selector: 'WindowMaximizeIcon',\n standalone: true,\n imports: [BaseIcon],\n template: `\n <svg width=\"14\" height=\"14\" viewBox=\"0 0 14 14\" fill=\"none\" xmlns=\"http://www.w3.org/2000/svg\" [attr.aria-label]=\"ariaLabel\" [attr.aria-hidden]=\"ariaHidden\" [attr.role]=\"role\" [class]=\"getClassNames()\">\n <g [attr.clip-path]=\"pathId\">\n <path\n fill-rule=\"evenodd\"\n clip-rule=\"evenodd\"\n d=\"M7 14H11.8C12.3835 14 12.9431 13.7682 13.3556 13.3556C13.7682 12.9431 14 12.3835 14 11.8V2.2C14 1.61652 13.7682 1.05694 13.3556 0.644365C12.9431 0.231785 12.3835 0 11.8 0H2.2C1.61652 0 1.05694 0.231785 0.644365 0.644365C0.231785 1.05694 0 1.61652 0 2.2V7C0 7.15913 0.063214 7.31174 0.175736 7.42426C0.288258 7.53679 0.44087 7.6 0.6 7.6C0.75913 7.6 0.911742 7.53679 1.02426 7.42426C1.13679 7.31174 1.2 7.15913 1.2 7V2.2C1.2 1.93478 1.30536 1.68043 1.49289 1.49289C1.68043 1.30536 1.93478 1.2 2.2 1.2H11.8C12.0652 1.2 12.3196 1.30536 12.5071 1.49289C12.6946 1.68043 12.8 1.93478 12.8 2.2V11.8C12.8 12.0652 12.6946 12.3196 12.5071 12.5071C12.3196 12.6946 12.0652 12.8 11.8 12.8H7C6.84087 12.8 6.68826 12.8632 6.57574 12.9757C6.46321 13.0883 6.4 13.2409 6.4 13.4C6.4 13.5591 6.46321 13.7117 6.57574 13.8243C6.68826 13.9368 6.84087 14 7 14ZM9.77805 7.42192C9.89013 7.534 10.0415 7.59788 10.2 7.59995C10.3585 7.59788 10.5099 7.534 10.622 7.42192C10.7341 7.30985 10.798 7.15844 10.8 6.99995V3.94242C10.8066 3.90505 10.8096 3.86689 10.8089 3.82843C10.8079 3.77159 10.7988 3.7157 10.7824 3.6623C10.756 3.55552 10.701 3.45698 10.622 3.37798C10.5099 3.2659 10.3585 3.20202 10.2 3.19995H7.00002C6.84089 3.19995 6.68828 3.26317 6.57576 3.37569C6.46324 3.48821 6.40002 3.64082 6.40002 3.79995C6.40002 3.95908 6.46324 4.11169 6.57576 4.22422C6.68828 4.33674 6.84089 4.39995 7.00002 4.39995H8.80006L6.19997 7.00005C6.10158 7.11005 6.04718 7.25246 6.04718 7.40005C6.04718 7.54763 6.10158 7.69004 6.19997 7.80005C6.30202 7.91645 6.44561 7.98824 6.59997 8.00005C6.75432 7.98824 6.89791 7.91645 6.99997 7.80005L9.60002 5.26841V6.99995C9.6021 7.15844 9.66598 7.30985 9.77805 7.42192ZM1.4 14H3.8C4.17066 13.9979 4.52553 13.8498 4.78763 13.5877C5.04973 13.3256 5.1979 12.9707 5.2 12.6V10.2C5.1979 9.82939 5.04973 9.47452 4.78763 9.21242C4.52553 8.95032 4.17066 8.80215 3.8 8.80005H1.4C1.02934 8.80215 0.674468 8.95032 0.412371 9.21242C0.150274 9.47452 0.00210008 9.82939 0 10.2V12.6C0.00210008 12.9707 0.150274 13.3256 0.412371 13.5877C0.674468 13.8498 1.02934 13.9979 1.4 14ZM1.25858 10.0586C1.29609 10.0211 1.34696 10 1.4 10H3.8C3.85304 10 3.90391 10.0211 3.94142 10.0586C3.97893 10.0961 4 10.147 4 10.2V12.6C4 12.6531 3.97893 12.704 3.94142 12.7415C3.90391 12.779 3.85304 12.8 3.8 12.8H1.4C1.34696 12.8 1.29609 12.779 1.25858 12.7415C1.22107 12.704 1.2 12.6531 1.2 12.6V10.2C1.2 10.147 1.22107 10.0961 1.25858 10.0586Z\"\n fill=\"currentColor\"\n />\n </g>\n <defs>\n <clipPath [id]=\"pathId\">\n <rect width=\"14\" height=\"14\" fill=\"white\" />\n </clipPath>\n </defs>\n </svg>\n `\n }]\n }] });\n\n/**\n * Generated bundle index. Do not edit.\n */\n\nexport { WindowMaximizeIcon };\n//# sourceMappingURL=primeng-icons-windowmaximize.mjs.map\n","import * as i0 from '@angular/core';\nimport { Component } from '@angular/core';\nimport { BaseIcon } from 'primeng/baseicon';\nimport { UniqueComponentId } from 'primeng/utils';\n\nclass WindowMinimizeIcon extends BaseIcon {\n pathId;\n ngOnInit() {\n this.pathId = 'url(#' + UniqueComponentId() + ')';\n }\n static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: \"12.0.0\", version: \"18.0.1\", ngImport: i0, type: WindowMinimizeIcon, deps: null, target: i0.ɵɵFactoryTarget.Component });\n static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: \"14.0.0\", version: \"18.0.1\", type: WindowMinimizeIcon, isStandalone: true, selector: \"WindowMinimizeIcon\", usesInheritance: true, ngImport: i0, template: `\n <svg width=\"14\" height=\"14\" viewBox=\"0 0 14 14\" fill=\"none\" xmlns=\"http://www.w3.org/2000/svg\" [attr.aria-label]=\"ariaLabel\" [attr.aria-hidden]=\"ariaHidden\" [attr.role]=\"role\" [class]=\"getClassNames()\">\n <g [attr.clip-path]=\"pathId\">\n <path\n fill-rule=\"evenodd\"\n clip-rule=\"evenodd\"\n d=\"M11.8 0H2.2C1.61652 0 1.05694 0.231785 0.644365 0.644365C0.231785 1.05694 0 1.61652 0 2.2V7C0 7.15913 0.063214 7.31174 0.175736 7.42426C0.288258 7.53679 0.44087 7.6 0.6 7.6C0.75913 7.6 0.911742 7.53679 1.02426 7.42426C1.13679 7.31174 1.2 7.15913 1.2 7V2.2C1.2 1.93478 1.30536 1.68043 1.49289 1.49289C1.68043 1.30536 1.93478 1.2 2.2 1.2H11.8C12.0652 1.2 12.3196 1.30536 12.5071 1.49289C12.6946 1.68043 12.8 1.93478 12.8 2.2V11.8C12.8 12.0652 12.6946 12.3196 12.5071 12.5071C12.3196 12.6946 12.0652 12.8 11.8 12.8H7C6.84087 12.8 6.68826 12.8632 6.57574 12.9757C6.46321 13.0883 6.4 13.2409 6.4 13.4C6.4 13.5591 6.46321 13.7117 6.57574 13.8243C6.68826 13.9368 6.84087 14 7 14H11.8C12.3835 14 12.9431 13.7682 13.3556 13.3556C13.7682 12.9431 14 12.3835 14 11.8V2.2C14 1.61652 13.7682 1.05694 13.3556 0.644365C12.9431 0.231785 12.3835 0 11.8 0ZM6.368 7.952C6.44137 7.98326 6.52025 7.99958 6.6 8H9.8C9.95913 8 10.1117 7.93678 10.2243 7.82426C10.3368 7.71174 10.4 7.55913 10.4 7.4C10.4 7.24087 10.3368 7.08826 10.2243 6.97574C10.1117 6.86321 9.95913 6.8 9.8 6.8H8.048L10.624 4.224C10.73 4.11026 10.7877 3.95982 10.7849 3.80438C10.7822 3.64894 10.7192 3.50063 10.6093 3.3907C10.4994 3.28077 10.3511 3.2178 10.1956 3.21506C10.0402 3.21232 9.88974 3.27002 9.776 3.376L7.2 5.952V4.2C7.2 4.04087 7.13679 3.88826 7.02426 3.77574C6.91174 3.66321 6.75913 3.6 6.6 3.6C6.44087 3.6 6.28826 3.66321 6.17574 3.77574C6.06321 3.88826 6 4.04087 6 4.2V7.4C6.00042 7.47975 6.01674 7.55862 6.048 7.632C6.07656 7.70442 6.11971 7.7702 6.17475 7.82524C6.2298 7.88029 6.29558 7.92344 6.368 7.952ZM1.4 8.80005H3.8C4.17066 8.80215 4.52553 8.95032 4.78763 9.21242C5.04973 9.47452 5.1979 9.82939 5.2 10.2V12.6C5.1979 12.9707 5.04973 13.3256 4.78763 13.5877C4.52553 13.8498 4.17066 13.9979 3.8 14H1.4C1.02934 13.9979 0.674468 13.8498 0.412371 13.5877C0.150274 13.3256 0.00210008 12.9707 0 12.6V10.2C0.00210008 9.82939 0.150274 9.47452 0.412371 9.21242C0.674468 8.95032 1.02934 8.80215 1.4 8.80005ZM3.94142 12.7415C3.97893 12.704 4 12.6531 4 12.6V10.2C4 10.147 3.97893 10.0961 3.94142 10.0586C3.90391 10.0211 3.85304 10 3.8 10H1.4C1.34696 10 1.29609 10.0211 1.25858 10.0586C1.22107 10.0961 1.2 10.147 1.2 10.2V12.6C1.2 12.6531 1.22107 12.704 1.25858 12.7415C1.29609 12.779 1.34696 12.8 1.4 12.8H3.8C3.85304 12.8 3.90391 12.779 3.94142 12.7415Z\"\n fill=\"currentColor\"\n />\n </g>\n <defs>\n <clipPath [id]=\"pathId\">\n <rect width=\"14\" height=\"14\" fill=\"white\" />\n </clipPath>\n </defs>\n </svg>\n `, isInline: true });\n}\ni0.ɵɵngDeclareClassMetadata({ minVersion: \"12.0.0\", version: \"18.0.1\", ngImport: i0, type: WindowMinimizeIcon, decorators: [{\n type: Component,\n args: [{\n selector: 'WindowMinimizeIcon',\n standalone: true,\n imports: [BaseIcon],\n template: `\n <svg width=\"14\" height=\"14\" viewBox=\"0 0 14 14\" fill=\"none\" xmlns=\"http://www.w3.org/2000/svg\" [attr.aria-label]=\"ariaLabel\" [attr.aria-hidden]=\"ariaHidden\" [attr.role]=\"role\" [class]=\"getClassNames()\">\n <g [attr.clip-path]=\"pathId\">\n <path\n fill-rule=\"evenodd\"\n clip-rule=\"evenodd\"\n d=\"M11.8 0H2.2C1.61652 0 1.05694 0.231785 0.644365 0.644365C0.231785 1.05694 0 1.61652 0 2.2V7C0 7.15913 0.063214 7.31174 0.175736 7.42426C0.288258 7.53679 0.44087 7.6 0.6 7.6C0.75913 7.6 0.911742 7.53679 1.02426 7.42426C1.13679 7.31174 1.2 7.15913 1.2 7V2.2C1.2 1.93478 1.30536 1.68043 1.49289 1.49289C1.68043 1.30536 1.93478 1.2 2.2 1.2H11.8C12.0652 1.2 12.3196 1.30536 12.5071 1.49289C12.6946 1.68043 12.8 1.93478 12.8 2.2V11.8C12.8 12.0652 12.6946 12.3196 12.5071 12.5071C12.3196 12.6946 12.0652 12.8 11.8 12.8H7C6.84087 12.8 6.68826 12.8632 6.57574 12.9757C6.46321 13.0883 6.4 13.2409 6.4 13.4C6.4 13.5591 6.46321 13.7117 6.57574 13.8243C6.68826 13.9368 6.84087 14 7 14H11.8C12.3835 14 12.9431 13.7682 13.3556 13.3556C13.7682 12.9431 14 12.3835 14 11.8V2.2C14 1.61652 13.7682 1.05694 13.3556 0.644365C12.9431 0.231785 12.3835 0 11.8 0ZM6.368 7.952C6.44137 7.98326 6.52025 7.99958 6.6 8H9.8C9.95913 8 10.1117 7.93678 10.2243 7.82426C10.3368 7.71174 10.4 7.55913 10.4 7.4C10.4 7.24087 10.3368 7.08826 10.2243 6.97574C10.1117 6.86321 9.95913 6.8 9.8 6.8H8.048L10.624 4.224C10.73 4.11026 10.7877 3.95982 10.7849 3.80438C10.7822 3.64894 10.7192 3.50063 10.6093 3.3907C10.4994 3.28077 10.3511 3.2178 10.1956 3.21506C10.0402 3.21232 9.88974 3.27002 9.776 3.376L7.2 5.952V4.2C7.2 4.04087 7.13679 3.88826 7.02426 3.77574C6.91174 3.66321 6.75913 3.6 6.6 3.6C6.44087 3.6 6.28826 3.66321 6.17574 3.77574C6.06321 3.88826 6 4.04087 6 4.2V7.4C6.00042 7.47975 6.01674 7.55862 6.048 7.632C6.07656 7.70442 6.11971 7.7702 6.17475 7.82524C6.2298 7.88029 6.29558 7.92344 6.368 7.952ZM1.4 8.80005H3.8C4.17066 8.80215 4.52553 8.95032 4.78763 9.21242C5.04973 9.47452 5.1979 9.82939 5.2 10.2V12.6C5.1979 12.9707 5.04973 13.3256 4.78763 13.5877C4.52553 13.8498 4.17066 13.9979 3.8 14H1.4C1.02934 13.9979 0.674468 13.8498 0.412371 13.5877C0.150274 13.3256 0.00210008 12.9707 0 12.6V10.2C0.00210008 9.82939 0.150274 9.47452 0.412371 9.21242C0.674468 8.95032 1.02934 8.80215 1.4 8.80005ZM3.94142 12.7415C3.97893 12.704 4 12.6531 4 12.6V10.2C4 10.147 3.97893 10.0961 3.94142 10.0586C3.90391 10.0211 3.85304 10 3.8 10H1.4C1.34696 10 1.29609 10.0211 1.25858 10.0586C1.22107 10.0961 1.2 10.147 1.2 10.2V12.6C1.2 12.6531 1.22107 12.704 1.25858 12.7415C1.29609 12.779 1.34696 12.8 1.4 12.8H3.8C3.85304 12.8 3.90391 12.779 3.94142 12.7415Z\"\n fill=\"currentColor\"\n />\n </g>\n <defs>\n <clipPath [id]=\"pathId\">\n <rect width=\"14\" height=\"14\" fill=\"white\" />\n </clipPath>\n </defs>\n </svg>\n `\n }]\n }] });\n\n/**\n * Generated bundle index. Do not edit.\n */\n\nexport { WindowMinimizeIcon };\n//# sourceMappingURL=primeng-icons-windowminimize.mjs.map\n","import * as i0 from '@angular/core';\nimport { Directive, PLATFORM_ID, Component, ChangeDetectionStrategy, ViewEncapsulation, Inject, SkipSelf, Optional, ViewChild, NgModule, createComponent, Injectable } from '@angular/core';\nimport { DomHandler } from 'primeng/dom';\nimport { animation, style, animate, trigger, transition, useAnimation } from '@angular/animations';\nimport * as i4 from '@angular/common';\nimport { isPlatformBrowser, DOCUMENT, CommonModule } from '@angular/common';\nimport * as i3 from 'primeng/api';\nimport { TranslationKeys, SharedModule } from 'primeng/api';\nimport * as i5 from 'primeng/focustrap';\nimport { FocusTrapModule } from 'primeng/focustrap';\nimport { TimesIcon } from 'primeng/icons/times';\nimport { WindowMaximizeIcon } from 'primeng/icons/windowmaximize';\nimport { WindowMinimizeIcon } from 'primeng/icons/windowminimize';\nimport { UniqueComponentId, ZIndexUtils } from 'primeng/utils';\nimport { Subject } from 'rxjs';\n\nclass DynamicDialogContent {\n viewContainerRef;\n constructor(viewContainerRef) {\n this.viewContainerRef = viewContainerRef;\n }\n static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: \"12.0.0\", version: \"18.0.1\", ngImport: i0, type: DynamicDialogContent, deps: [{ token: i0.ViewContainerRef }], target: i0.ɵɵFactoryTarget.Directive });\n static ɵdir = i0.ɵɵngDeclareDirective({ minVersion: \"14.0.0\", version: \"18.0.1\", type: DynamicDialogContent, selector: \"[pDynamicDialogContent]\", host: { classAttribute: \"p-element\" }, ngImport: i0 });\n}\ni0.ɵɵngDeclareClassMetadata({ minVersion: \"12.0.0\", version: \"18.0.1\", ngImport: i0, type: DynamicDialogContent, decorators: [{\n type: Directive,\n args: [{\n selector: '[pDynamicDialogContent]',\n host: {\n class: 'p-element'\n }\n }]\n }], ctorParameters: () => [{ type: i0.ViewContainerRef }] });\n\n/**\n * Dialogs can be created dynamically with any component as the content using a DialogService.\n * @group Components\n */\nclass DynamicDialogConfig {\n /**\n * An object to pass to the component loaded inside the Dialog.\n * @group Props\n */\n data;\n /**\n * Header text of the dialog.\n * @group Props\n */\n header;\n /**\n * Identifies the element (or elements) that labels the element it is applied to.\n * @group Props\n */\n ariaLabelledBy;\n /**\n * Footer text of the dialog.\n * @group Props\n */\n footer;\n /**\n * Width of the dialog.\n * @group Props\n */\n width;\n /**\n * Height of the dialog.\n * @group Props\n */\n height;\n /**\n * Specifies if pressing escape key should hide the dialog.\n * @group Props\n */\n closeOnEscape;\n /**\n * Specifies if autofocus should happen on show.\n * @group Props\n */\n focusOnShow = true;\n /**\n * Specifies if autofocus should happen on close.\n * @group Props\n */\n focusOnClose = true;\n /**\n * When enabled, can only focus on elements inside the dialog.\n * @group Props\n */\n focusTrap = true;\n /**\n * Base zIndex value to use in layering.\n * @group Props\n */\n baseZIndex;\n /**\n * Whether to automatically manage layering.\n * @group Props\n */\n autoZIndex;\n /**\n * Specifies if clicking the modal background should hide the dialog.\n * @group Props\n */\n dismissableMask;\n /**\n * Inline style of the component.\n * @group Props\n */\n rtl;\n /**\n * Inline style of the comopnent.\n * @group Props\n */\n style;\n /**\n * Inline style of the content.\n * @group Props\n */\n contentStyle;\n /**\n * Style class of the component.\n * @group Props\n */\n styleClass;\n /**\n * Transition options of the animation.\n * @group Props\n */\n transitionOptions;\n /**\n * Adds a close icon to the header to hide the dialog.\n * @group Props\n */\n closable;\n /**\n * Whether to show the header or not.\n * @group Props\n */\n showHeader;\n /**\n * Defines if background should be blocked when dialog is displayed.\n * @group Props\n */\n modal;\n /**\n * Style class of the mask.\n * @group Props\n */\n maskStyleClass;\n /**\n * Enables resizing of the content.\n * @group Props\n */\n resizable;\n /**\n * Enables dragging to change the position using header.\n * @group Props\n */\n draggable;\n /**\n * Keeps dialog in the viewport.\n * @group Props\n */\n keepInViewport;\n /**\n * Minimum value for the left coordinate of dialog in dragging.\n * @group Props\n */\n minX;\n /**\n * Minimum value for the top coordinate of dialog in dragging.\n * @group Props\n */\n minY;\n /**\n * Whether the dialog can be displayed full screen.\n * @group Props\n */\n maximizable;\n /**\n * Name of the maximize icon.\n * @group Props\n */\n maximizeIcon;\n /**\n * Name of the minimize icon.\n * @group Props\n */\n minimizeIcon;\n /**\n * Position of the dialog, options are \"center\", \"top\", \"bottom\", \"left\", \"right\", \"top-left\", \"top-right\", \"bottom-left\" or \"bottom-right\".\n * @group Props\n */\n position;\n /**\n * Defines a string that labels the close button for accessibility.\n * @group Props\n */\n closeAriaLabel;\n /**\n * Target element to attach the overlay, valid values are \"body\" or a local ng-template variable of another element (note: use binding with brackets for template variables, e.g. [appendTo]=\"mydiv\" for a div element having #mydiv as variable name).\n * @group Props\n */\n appendTo;\n /**\n * A boolean to determine if it can be duplicate.\n * @group Props\n */\n duplicate;\n /**\n * Object literal to define widths per screen size.\n * @group Props\n */\n breakpoints;\n /**\n * Dialog templates.\n * @group Props\n */\n templates;\n}\n\n/**\n * Dynamic Dialog instance.\n * @group Components\n */\nclass DynamicDialogRef {\n constructor() { }\n /**\n * Closes dialog.\n * @group Method\n */\n close(result) {\n this._onClose.next(result);\n setTimeout(() => {\n this._onClose.complete();\n }, 1000);\n }\n /**\n * Destroys the dialog instance.\n * @group Method\n */\n destroy() {\n this._onDestroy.next(null);\n }\n /**\n * Callback to invoke on drag start.\n * @param {MouseEvent} event - Mouse event.\n * @group Method\n */\n dragStart(event) {\n this._onDragStart.next(event);\n }\n /**\n * Callback to invoke on drag end.\n * @param {MouseEvent} event - Mouse event.\n * @group Method\n */\n dragEnd(event) {\n this._onDragEnd.next(event);\n }\n /**\n * Callback to invoke on resize start.\n * @param {MouseEvent} event - Mouse event.\n * @group Method\n */\n resizeInit(event) {\n this._onResizeInit.next(event);\n }\n /**\n * Callback to invoke on resize start.\n * @param {MouseEvent} event - Mouse event.\n * @group Method\n */\n resizeEnd(event) {\n this._onResizeEnd.next(event);\n }\n /**\n * Callback to invoke on dialog is maximized.\n * @param {*} value - Size value.\n * @group Method\n */\n maximize(value) {\n this._onMaximize.next(value);\n }\n _onClose = new Subject();\n /**\n * Event triggered on dialog is closed.\n * @group Events\n */\n onClose = this._onClose.asObservable();\n _onDestroy = new Subject();\n /**\n * Event triggered on dialog instance is destroyed.\n * @group Events\n */\n onDestroy = this._onDestroy.asObservable();\n _onDragStart = new Subject();\n /**\n * Event triggered on drag start.\n * @param {MouseEvent} event - Mouse event.\n * @group Events\n */\n onDragStart = this._onDragStart.asObservable();\n _onDragEnd = new Subject();\n /**\n * Event triggered on drag end.\n * @param {MouseEvent} event - Mouse event.\n * @group Events\n */\n onDragEnd = this._onDragEnd.asObservable();\n _onResizeInit = new Subject();\n /**\n * Event triggered on resize start.\n * @param {MouseEvent} event - Mouse event.\n * @group Events\n */\n onResizeInit = this._onResizeInit.asObservable();\n _onResizeEnd = new Subject();\n /**\n * Event triggered on resize end.\n * @param {MouseEvent} event - Mouse event.\n * @group Events\n */\n onResizeEnd = this._onResizeEnd.asObservable();\n _onMaximize = new Subject();\n /**\n * Event triggered on dialog is maximized.\n * @param {*} value - Size value.\n * @group Events\n */\n onMaximize = this._onMaximize.asObservable();\n /**\n * Event triggered on child component load.\n * @param {*} value - Chi.\n * @group Events\n */\n onChildComponentLoaded = new Subject();\n}\n\nconst showAnimation = animation([style({ transform: '{{transform}}', opacity: 0 }), animate('{{transition}}', style({ transform: 'none', opacity: 1 }))]);\nconst hideAnimation = animation([animate('{{transition}}', style({ transform: '{{transform}}', opacity: 0 }))]);\nclass DynamicDialogComponent {\n document;\n platformId;\n cd;\n renderer;\n config;\n dialogRef;\n zone;\n primeNGConfig;\n parentDialog;\n visible = true;\n componentRef;\n mask;\n resizing;\n dragging;\n maximized;\n _style = {};\n originalStyle;\n lastPageX;\n lastPageY;\n ariaLabelledBy;\n id = UniqueComponentId();\n styleElement;\n insertionPoint;\n maskViewChild;\n contentViewChild;\n footerViewChild;\n headerViewChild;\n childComponentType;\n container;\n wrapper;\n documentKeydownListener;\n documentEscapeListener;\n maskClickListener;\n transformOptions = 'scale(0.7)';\n documentResizeListener;\n documentResizeEndListener;\n documentDragListener;\n documentDragEndListener;\n get minX() {\n return this.config.minX ? this.config.minX : 0;\n }\n get minY() {\n return this.config.minY ? this.config.minY : 0;\n }\n get keepInViewport() {\n return this.config.keepInViewport;\n }\n get maximizable() {\n return this.config.maximizable;\n }\n get maximizeIcon() {\n return this.config.maximizeIcon;\n }\n get minimizeIcon() {\n return this.config.minimizeIcon;\n }\n get style() {\n return this._style;\n }\n get position() {\n return this.config.position;\n }\n get closeAriaLabel() {\n return this.primeNGConfig.getTranslation(TranslationKeys.ARIA)['close'];\n }\n set style(value) {\n if (value) {\n this._style = { ...value };\n this.originalStyle = value;\n }\n }\n get parent() {\n const domElements = Array.from(this.document.getElementsByClassName('p-dialog'));\n if (domElements.length > 1) {\n return domElements.pop();\n }\n }\n get parentContent() {\n const domElements = Array.from(this.document.getElementsByClassName('p-dialog'));\n if (domElements.length > 0) {\n const contentElements = domElements[domElements.length - 1].querySelector('.p-dialog-content');\n if (contentElements)\n return Array.isArray(contentElements) ? contentElements[0] : contentElements;\n }\n }\n get header() {\n return this.config.header;\n }\n get data() {\n return this.config.data;\n }\n get breakpoints() {\n return this.config.breakpoints;\n }\n get footerTemplate() {\n return this.config?.templates?.footer;\n }\n get headerTemplate() {\n return this.config?.templates?.header;\n }\n get contentTemplate() {\n return this.config?.templates?.content;\n }\n get minimizeIconTemplate() {\n return this.config?.templates?.minimizeicon;\n }\n get maximizeIconTemplate() {\n return this.config?.templates?.maximizeicon;\n }\n get closeIconTemplate() {\n return this.config?.templates?.closeicon;\n }\n get dynamicDialogCount() {\n const dynamicDialogs = this.document.querySelectorAll('p-dynamicdialog');\n const dynamicDialogCount = dynamicDialogs?.length;\n return dynamicDialogCount;\n }\n get containerStyle() {\n return {\n ...this.config.style,\n width: this.config.width,\n height: this.config.height\n };\n }\n constructor(document, platformId, cd, renderer, config, dialogRef, zone, primeNGConfig, parentDialog) {\n this.document = document;\n this.platformId = platformId;\n this.cd = cd;\n this.renderer = renderer;\n this.config = config;\n this.dialogRef = dialogRef;\n this.zone = zone;\n this.primeNGConfig = primeNGConfig;\n this.parentDialog = parentDialog;\n }\n ngOnInit() {\n if (this.breakpoints) {\n this.createStyle();\n }\n }\n createStyle() {\n if (isPlatformBrowser(this.platformId)) {\n if (!this.styleElement) {\n this.styleElement = this.renderer.createElement('style');\n this.styleElement.type = 'text/css';\n DomHandler.setAttribute(this.styleElement, 'nonce', this.primeNGConfig?.csp()?.nonce);\n this.renderer.appendChild(this.document.head, this.styleElement);\n let innerHTML = '';\n for (let breakpoint in this.breakpoints) {\n innerHTML += `\n @media screen and (max-width: ${breakpoint}) {\n .p-dialog[${this.id}]:not(.p-dialog-maximized) {\n width: ${this.breakpoints[breakpoint]} !important;\n }\n }\n `;\n }\n this.renderer.setProperty(this.styleElement, 'innerHTML', innerHTML);\n }\n }\n }\n destroyStyle() {\n if (this.styleElement) {\n this.renderer.removeChild(this.document.head, this.styleElement);\n this.styleElement = null;\n }\n }\n ngAfterViewInit() {\n this.loadChildComponent(this.childComponentType);\n this.ariaLabelledBy = this.getAriaLabelledBy();\n this.cd.detectChanges();\n }\n getAriaLabelledBy() {\n return this.header !== null ? UniqueComponentId() + '_header' : null;\n }\n loadChildComponent(componentType) {\n let viewContainerRef = this.insertionPoint?.viewContainerRef;\n viewContainerRef?.clear();\n this.componentRef = viewContainerRef?.createComponent(componentType);\n this.dialogRef.onChildComponentLoaded.next(this.componentRef.instance);\n }\n moveOnTop() {\n if (this.config.autoZIndex !== false) {\n ZIndexUtils.set('modal', this.container, (this.config.baseZIndex || 0) + this.primeNGConfig.zIndex.modal);\n this.wrapper.style.zIndex = String(parseInt(this.container.style.zIndex, 10) - 1);\n }\n }\n onAnimationStart(event) {\n switch (event.toState) {\n case 'visible':\n this.container = event.element;\n this.wrapper = this.container.parentElement;\n this.moveOnTop();\n if (this.parent) {\n this.unbindGlobalListeners();\n }\n this.bindGlobalListeners();\n this.container?.setAttribute(this.id, '');\n if (this.config.modal !== false) {\n this.enableModality();\n }\n if (this.config.focusOnShow !== false) {\n this.focus();\n }\n break;\n case 'void':\n if (this.wrapper && this.config.modal !== false) {\n DomHandler.addClass(this.wrapper, 'p-component-overlay-leave');\n }\n break;\n }\n }\n onAnimationEnd(event) {\n if (event.toState === 'void') {\n if (this.parentContent && this.config.focusOnClose !== false) {\n this.focus(this.parentContent);\n }\n this.onContainerDestroy();\n this.dialogRef.destroy();\n }\n }\n onContainerDestroy() {\n this.unbindGlobalListeners();\n if (this.container && this.config.autoZIndex !== false) {\n ZIndexUtils.clear(this.container);\n }\n if (this.config.modal !== false) {\n this.disableModality();\n }\n this.container = null;\n }\n close() {\n this.visible = false;\n this.cd.markForCheck();\n }\n hide() {\n if (this.dialogRef) {\n this.dialogRef.close();\n }\n }\n enableModality() {\n if (this.config.dismissableMask) {\n this.maskClickListener = this.renderer.listen(this.wrapper, 'mousedown', (event) => {\n if (this.wrapper && this.wrapper.isSameNode(event.target)) {\n this.hide();\n }\n });\n }\n if (this.dynamicDialogCount === 1) {\n DomHandler.addClass(this.document.body, 'p-overflow-hidden');\n }\n }\n disableModality() {\n if (this.wrapper) {\n if (this.config.dismissableMask) {\n this.unbindMaskClickListener();\n }\n if (this.dynamicDialogCount === 1) {\n DomHandler.removeClass(this.document.body, 'p-overflow-hidden');\n }\n if (!this.cd.destroyed) {\n this.cd.detectChanges();\n }\n }\n }\n focus(focusParentElement = this.contentViewChild.nativeElement) {\n const focusableElements = DomHandler.getFocusableElements(focusParentElement);\n if (!focusableElements.length) {\n return;\n }\n let focusable = DomHandler.getFocusableElement(focusParentElement, '[autofocus]');\n if (focusable) {\n this.zone.runOutsideAngular(() => {\n setTimeout(() => focusable.focus(), 5);\n });\n return;\n }\n const focusableElement = DomHandler.getFocusableElement(focusParentElement);\n if (focusableElement) {\n this.zone.runOutsideAngular(() => {\n setTimeout(() => focusableElement.focus(), 5);\n });\n }\n else if (this.footerViewChild) {\n // If the content section is empty try to focus on footer\n this.focus(this.footerViewChild.nativeElement);\n }\n else if (!focusableElement && this.headerViewChild) {\n this.focus(this.headerViewChild.nativeElement);\n }\n }\n maximize() {\n this.maximized = !this.maximized;\n if (this.maximized) {\n DomHandler.addClass(this.document.body, 'p-overflow-hidden');\n }\n else {\n DomHandler.removeClass(this.document.body, 'p-overflow-hidden');\n }\n this.dialogRef.maximize({ maximized: this.maximized });\n }\n initResize(event) {\n if (this.config.resizable) {\n if (!this.documentResizeListener) {\n this.bindDocumentResizeListeners();\n }\n this.resizing = true;\n this.lastPageX = event.pageX;\n this.lastPageY = event.pageY;\n DomHandler.addClass(this.document.body, 'p-unselectable-text');\n this.dialogRef.resizeInit(event);\n }\n }\n onResize(event) {\n if (this.resizing) {\n let deltaX = event.pageX - this.lastPageX;\n let deltaY = event.pageY - this.lastPageY;\n let containerWidth = DomHandler.getOuterWidth(this.container);\n let containerHeight = DomHandler.getOuterHeight(this.container);\n let contentHeight = DomHandler.getOuterHeight(this.contentViewChild.nativeElement);\n let newWidth = containerWidth + deltaX;\n let newHeight = containerHeight + deltaY;\n let minWidth = this.container.style.minWidth;\n let minHeight = this.container.style.minHeight;\n let offset = this.container.getBoundingClientRect();\n let viewport = DomHandler.getViewport();\n let hasBeenDragged = !parseInt(this.container.style.top) || !parseInt(this.container.style.left);\n if (hasBeenDragged) {\n newWidth += deltaX;\n newHeight += deltaY;\n }\n if ((!minWidth || newWidth > parseInt(minWidth)) && offset.left + newWidth < viewport.width) {\n this._style.width = newWidth + 'px';\n this.container.style.width = this._style.width;\n }\n if ((!minHeight || newHeight > parseInt(minHeight)) && offset.top + newHeight < viewport.height) {\n this.contentViewChild.nativeElement.style.height = contentHeight + newHeight - containerHeight + 'px';\n if (this._style.height) {\n this._style.height = newHeight + 'px';\n this.container.style.height = this._style.height;\n }\n }\n this.lastPageX = event.pageX;\n this.lastPageY = event.pageY;\n }\n }\n resizeEnd(event) {\n if (this.resizing) {\n this.resizing = false;\n DomHandler.removeClass(this.document.body, 'p-unselectable-text');\n this.dialogRef.resizeEnd(event);\n }\n }\n initDrag(event) {\n if (DomHandler.hasClass(event.target, 'p-dialog-header-icon') || DomHandler.hasClass(event.target.parentElement, 'p-dialog-header-icon')) {\n return;\n }\n if (this.config.draggable) {\n this.dragging = true;\n this.lastPageX = event.pageX;\n this.lastPageY = event.pageY;\n this.container.style.margin = '0';\n DomHandler.addClass(this.document.body, 'p-unselectable-text');\n this.dialogRef.dragStart(event);\n }\n }\n onDrag(event) {\n if (this.dragging) {\n let containerWidth = DomHandler.getOuterWidth(this.container);\n let containerHeight = DomHandler.getOuterHeight(this.container);\n let deltaX = event.pageX - this.lastPageX;\n let deltaY = event.pageY - this.lastPageY;\n let offset = this.container.getBoundingClientRect();\n let leftPos = offset.left + deltaX;\n let topPos = offset.top + deltaY;\n let viewport = DomHandler.getViewport();\n this.container.style.position = 'fixed';\n if (this.keepInViewport) {\n if (leftPos >= this.minX && leftPos + containerWidth < viewport.width) {\n this._style.left = leftPos + 'px';\n this.lastPageX = event.pageX;\n this.container.style.left = leftPos + 'px';\n }\n if (topPos >= this.minY && topPos + containerHeight < viewport.height) {\n this._style.top = topPos + 'px';\n this.lastPageY = event.pageY;\n this.container.style.top = topPos + 'px';\n }\n }\n else {\n this.lastPageX = event.pageX;\n this.container.style.left = leftPos + 'px';\n this.lastPageY = event.pageY;\n this.container.style.top = topPos + 'px';\n }\n }\n }\n endDrag(event) {\n if (this.dragging) {\n this.dragging = false;\n DomHandler.removeClass(this.document.body, 'p-unselectable-text');\n this.dialogRef.dragEnd(event);\n this.cd.detectChanges();\n }\n }\n resetPosition() {\n this.container.style.position = '';\n this.container.style.left = '';\n this.container.style.top = '';\n this.container.style.margin = '';\n }\n bindDocumentDragListener() {\n if (isPlatformBrowser(this.platformId)) {\n this.zone.runOutsideAngular(() => {\n this.documentDragListener = this.renderer.listen(this.document, 'mousemove', this.onDrag.bind(this));\n });\n }\n }\n bindDocumentDragEndListener() {\n if (isPlatformBrowser(this.platformId)) {\n this.zone.runOutsideAngular(() => {\n this.documentDragEndListener = this.renderer.listen(this.document, 'mouseup', this.endDrag.bind(this));\n });\n }\n }\n unbindDocumentDragEndListener() {\n if (this.documentDragEndListener) {\n this.documentDragEndListener();\n this.documentDragListener = null;\n }\n }\n unbindDocumentDragListener() {\n if (this.documentDragListener) {\n this.documentDragListener();\n this.documentDragListener = null;\n }\n }\n bindDocumentResizeListeners() {\n if (isPlatformBrowser(this.platformId)) {\n this.zone.runOutsideAngular(() => {\n this.documentResizeListener = this.renderer.listen(this.document, 'mousemove', this.onResize.bind(this));\n this.documentResizeEndListener = this.renderer.listen(this.document, 'mouseup', this.resizeEnd.bind(this));\n });\n }\n }\n unbindDocumentResizeListeners() {\n if (this.documentResizeListener && this.documentResizeEndListener) {\n this.documentResizeListener();\n this.documentResizeEndListener();\n this.documentResizeListener = null;\n this.documentResizeEndListener = null;\n }\n }\n bindGlobalListeners() {\n if (this.config.closeOnEscape !== false) {\n this.bindDocumentEscapeListener();\n }\n if (this.config.resizable) {\n this.bindDocumentResizeListeners();\n }\n if (this.config.draggable) {\n this.bindDocumentDragListener();\n this.bindDocumentDragEndListener();\n }\n }\n unbindGlobalListeners() {\n this.unbindDocumentEscapeListener();\n this.unbindDocumentResizeListeners();\n this.unbindDocumentDragListener();\n this.unbindDocumentDragEndListener();\n }\n bindDocumentEscapeListener() {\n const documentTarget = this.maskViewChild ? this.maskViewChild.nativeElement.ownerDocument : 'document';\n this.documentEscapeListener = this.renderer.listen(documentTarget, 'keydown', (event) => {\n if (event.which == 27) {\n if (parseInt(this.container.style.zIndex) == ZIndexUtils.getCurrent()) {\n this.hide();\n }\n }\n });\n }\n unbindDocumentEscapeListener() {\n if (this.documentEscapeListener) {\n this.documentEscapeListener();\n this.documentEscapeListener = null;\n }\n }\n unbindMaskClickListener() {\n if (this.maskClickListener) {\n this.maskClickListener();\n this.maskClickListener = null;\n }\n }\n ngOnDestroy() {\n this.onContainerDestroy();\n if (this.componentRef) {\n this.componentRef.destroy();\n }\n this.destroyStyle();\n }\n static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: \"12.0.0\", version: \"18.0.1\", ngImport: i0, type: DynamicDialogComponent, deps: [{ token: DOCUMENT }, { token: PLATFORM_ID }, { token: i0.ChangeDetectorRef }, { token: i0.Renderer2 }, { token: DynamicDialogConfig }, { token: DynamicDialogRef }, { token: i0.NgZone }, { token: i3.PrimeNGConfig }, { token: DynamicDialogComponent, optional: true, skipSelf: true }], target: i0.ɵɵFactoryTarget.Component });\n static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: \"14.0.0\", version: \"18.0.1\", type: DynamicDialogComponent, selector: \"p-dynamicDialog\", host: { classAttribute: \"p-element\" }, viewQueries: [{ propertyName: \"insertionPoint\", first: true, predicate: DynamicDialogContent, descendants: true }, { propertyName: \"maskViewChild\", first: true, predicate: [\"mask\"], descendants: true }, { propertyName: \"contentViewChild\", first: true, predicate: [\"content\"], descendants: true }, { propertyName: \"footerViewChild\", first: true, predicate: [\"footer\"], descendants: true }, { propertyName: \"headerViewChild\", first: true, predicate: [\"titlebar\"], descendants: true }], ngImport: i0, template: `\n <div\n #mask\n [ngClass]=\"{\n 'p-dialog-mask': true,\n 'p-component-overlay p-component-overlay-enter p-dialog-mask-scrollblocker': config.modal !== false,\n 'p-dialog-left': position === 'left',\n 'p-dialog-right': position === 'right',\n 'p-dialog-top': position === 'top',\n 'p-dialog-bottom': position === 'bottom',\n 'p-dialog-top-left': position === 'topleft' || position === 'top-left',\n 'p-dialog-top-right': position === 'topright' || position === 'top-right',\n 'p-dialog-bottom-left': position === 'bottomleft' || position === 'bottom-left',\n 'p-dialog-bottom-right': position === 'bottomright' || position === 'bottom-right'\n }\"\n [class]=\"config.maskStyleClass\"\n >\n <div\n #container\n [ngClass]=\"{ 'p-dialog p-dynamic-dialog p-component': true, 'p-dialog-rtl': config.rtl, 'p-dialog-resizable': config.resizable, 'p-dialog-draggable': config.draggable, 'p-dialog-maximized': maximized }\"\n [ngStyle]=\"containerStyle\"\n [class]=\"config.styleClass\"\n [@animation]=\"{ value: 'visible', params: { transform: transformOptions, transition: config.transitionOptions || '150ms cubic-bezier(0, 0, 0.2, 1)' } }\"\n (@animation.start)=\"onAnimationStart($event)\"\n (@animation.done)=\"onAnimationEnd($event)\"\n role=\"dialog\"\n *ngIf=\"visible\"\n pFocusTrap\n [pFocusTrapDisabled]=\"config.focusTrap === false\"\n [attr.aria-labelledby]=\"ariaLabelledBy\"\n [attr.aria-modal]=\"true\"\n >\n <div *ngIf=\"config.resizable\" class=\"p-resizable-handle\" (mousedown)=\"initResize($event)\"></div>\n <div #titlebar class=\"p-dialog-header\" (mousedown)=\"initDrag($event)\" *ngIf=\"config.showHeader === false ? false : true\">\n <ng-container *ngComponentOutlet=\"headerTemplate\"></ng-container>\n <ng-container *ngIf=\"!headerTemplate\">\n <span class=\"p-dialog-title\" [id]=\"ariaLabelledBy\">{{ config.header }}</span>\n <div class=\"p-dialog-header-icons\">\n <button *ngIf=\"config.maximizable\" type=\"button\" [ngClass]=\"{ 'p-dialog-header-icon p-dialog-header-maximize p-link': true }\" (click)=\"maximize()\" (keydown.enter)=\"maximize()\" tabindex=\"-1\" pRipple>\n <span class=\"p-dialog-header-maximize-icon\" *ngIf=\"!maximizeIconTemplate || !minimizeIconTemplate\" [ngClass]=\"maximized ? minimizeIcon : maximizeIcon\"></span>\n <WindowMaximizeIcon *ngIf=\"!maximized && !maximizeIcon && !maximizeIconTemplate\" [styleClass]=\"'p-dialog-header-maximize-icon'\" />\n <WindowMinimizeIcon *ngIf=\"maximized && !minimizeIcon && !minimizeIconTemplate\" [styleClass]=\"'p-dialog-header-maximize-icon'\" />\n <ng-container *ngComponentOutlet=\"maximizeIconTemplate\"></ng-container>\n <ng-container *ngComponentOutlet=\"minimizeIconTemplate\"></ng-container>\n </button>\n <button [ngClass]=\"'p-dialog-header-icon p-dialog-header-maximize p-link'\" type=\"button\" role=\"button\" (click)=\"hide()\" (keydown.enter)=\"hide()\" *ngIf=\"config.closable !== false\" [attr.aria-label]=\"closeAriaLabel\">\n <TimesIcon [styleClass]=\"'p-dialog-header-close-icon'\" *ngIf=\"!closeIconTemplate\" />\n <ng-container *ngComponentOutlet=\"closeIconTemplate\"></ng-container>\n </button>\n </div>\n </ng-container>\n </div>\n <div #content class=\"p-dialog-content\" [ngStyle]=\"config.contentStyle\">\n <ng-template pDynamicDialogContent *ngIf=\"!contentTemplate\"></ng-template>\n <ng-container *ngComponentOutlet=\"contentTemplate\"></ng-container>\n </div>\n <div #footer class=\"p-dialog-footer\" *ngIf=\"config.footer || footerTemplate\">\n <ng-container *ngIf=\"!footerTemplate\">\n {{ config.footer }}\n </ng-container>\n <ng-container *ngComponentOutlet=\"footerTemplate\"></ng-container>\n </div>\n </div>\n </div>\n `, isInline: true, styles: [\"@layer primeng{.p-dialog-mask{position:fixed;top:0;left:0;width:100%;height:100%;display:flex;justify-content:center;align-items:center;pointer-events:none}.p-dialog-mask.p-component-overlay{pointer-events:auto}.p-dialog{display:flex;flex-direction:column;pointer-events:auto;max-height:90%;transform:scale(1);position:relative}.p-dialog-content{overflow-y:auto;flex-grow:1}.p-dialog-header{display:flex;align-items:center;justify-content:space-between;flex-shrink:0}.p-dialog-draggable .p-dialog-header{cursor:move}.p-dialog-footer{flex-shrink:0}.p-dialog .p-dialog-header-icons{display:flex;align-items:center}.p-dialog .p-dialog-header-icon{display:flex;align-items:center;justify-content:center;overflow:hidden;position:relative}.p-fluid .p-dialog-footer .p-button{width:auto}.p-dialog-top .p-dialog,.p-dialog-bottom .p-dialog,.p-dialog-left .p-dialog,.p-dialog-right .p-dialog,.p-dialog-top-left .p-dialog,.p-dialog-top-right .p-dialog,.p-dialog-bottom-left .p-dialog,.p-dialog-bottom-right .p-dialog{margin:.75rem;transform:translateZ(0)}.p-dialog-maximized{-webkit-transition:none;transition:none;transform:none;width:100vw!important;height:100vh!important;top:0!important;left:0!important;max-height:100%;height:100%}.p-dialog-maximized .p-dialog-content{flex-grow:1}.p-dialog-left{justify-content:flex-start}.p-dialog-right{justify-content:flex-end}.p-dialog-top{align-items:flex-start}.p-dialog-top-left{justify-content:flex-start;align-items:flex-start}.p-dialog-top-right{justify-content:flex-end;align-items:flex-start}.p-dialog-bottom{align-items:flex-end}.p-dialog-bottom-left{justify-content:flex-start;align-items:flex-end}.p-dialog-bottom-right{justify-content:flex-end;align-items:flex-end}.p-dialog .p-resizable-handle{position:absolute;font-size:.1px;display:block;cursor:se-resize;width:12px;height:12px;right:1px;bottom:1px}.p-confirm-dialog .p-dialog-content{display:flex;align-items:center}}\\n\"], dependencies: [{ kind: \"directive\", type: i0.forwardRef(() => i4.NgClass), selector: \"[ngClass]\", inputs: [\"class\", \"ngClass\"] }, { kind: \"directive\", type: i0.forwardRef(() => i4.NgComponentOutlet), selector: \"[ngComponentOutlet]\", inputs: [\"ngComponentOutlet\", \"ngComponentOutletInputs\", \"ngComponentOutletInjector\", \"ngComponentOutletContent\", \"ngComponentOutletNgModule\", \"ngComponentOutletNgModuleFactory\"] }, { kind: \"directive\", type: i0.forwardRef(() => i4.NgIf), selector: \"[ngIf]\", inputs: [\"ngIf\", \"ngIfThen\", \"ngIfElse\"] }, { kind: \"directive\", type: i0.forwardRef(() => i4.NgStyle), selector: \"[ngStyle]\", inputs: [\"ngStyle\"] }, { kind: \"component\", type: i0.forwardRef(() => WindowMaximizeIcon), selector: \"WindowMaximizeIcon\" }, { kind: \"component\", type: i0.forwardRef(() => WindowMinimizeIcon), selector: \"WindowMinimizeIcon\" }, { kind: \"component\", type: i0.forwardRef(() => TimesIcon), selector: \"TimesIcon\" }, { kind: \"directive\", type: i0.forwardRef(() => i5.FocusTrap), selector: \"[pFocusTrap]\", inputs: [\"pFocusTrapDisabled\"] }, { kind: \"directive\", type: i0.forwardRef(() => DynamicDialogContent), selector: \"[pDynamicDialogContent]\" }], animations: [trigger('animation', [transition('void => visible', [useAnimation(showAnimation)]), transition('visible => void', [useAnimation(hideAnimation)])])], changeDetection: i0.ChangeDetectionStrategy.Default, encapsulation: i0.ViewEncapsulation.None });\n}\ni0.ɵɵngDeclareClassMetadata({ minVersion: \"12.0.0\", version: \"18.0.1\", ngImport: i0, type: DynamicDialogComponent, decorators: [{\n type: Component,\n args: [{ selector: 'p-dynamicDialog', template: `\n <div\n #mask\n [ngClass]=\"{\n 'p-dialog-mask': true,\n 'p-component-overlay p-component-overlay-enter p-dialog-mask-scrollblocker': config.modal !== false,\n 'p-dialog-left': position === 'left',\n 'p-dialog-right': position === 'right',\n 'p-dialog-top': position === 'top',\n 'p-dialog-bottom': position === 'bottom',\n 'p-dialog-top-left': position === 'topleft' || position === 'top-left',\n 'p-dialog-top-right': position === 'topright' || position === 'top-right',\n 'p-dialog-bottom-left': position === 'bottomleft' || position === 'bottom-left',\n 'p-dialog-bottom-right': position === 'bottomright' || position === 'bottom-right'\n }\"\n [class]=\"config.maskStyleClass\"\n >\n <div\n #container\n [ngClass]=\"{ 'p-dialog p-dynamic-dialog p-component': true, 'p-dialog-rtl': config.rtl, 'p-dialog-resizable': config.resizable, 'p-dialog-draggable': config.draggable, 'p-dialog-maximized': maximized }\"\n [ngStyle]=\"containerStyle\"\n [class]=\"config.styleClass\"\n [@animation]=\"{ value: 'visible', params: { transform: transformOptions, transition: config.transitionOptions || '150ms cubic-bezier(0, 0, 0.2, 1)' } }\"\n (@animation.start)=\"onAnimationStart($event)\"\n (@animation.done)=\"onAnimationEnd($event)\"\n role=\"dialog\"\n *ngIf=\"visible\"\n pFocusTrap\n [pFocusTrapDisabled]=\"config.focusTrap === false\"\n [attr.aria-labelledby]=\"ariaLabelledBy\"\n [attr.aria-modal]=\"true\"\n >\n <div *ngIf=\"config.resizable\" class=\"p-resizable-handle\" (mousedown)=\"initResize($event)\"></div>\n <div #titlebar class=\"p-dialog-header\" (mousedown)=\"initDrag($event)\" *ngIf=\"config.showHeader === false ? false : true\">\n <ng-container *ngComponentOutlet=\"headerTemplate\"></ng-container>\n <ng-container *ngIf=\"!headerTemplate\">\n <span class=\"p-dialog-title\" [id]=\"ariaLabelledBy\">{{ config.header }}</span>\n <div class=\"p-dialog-header-icons\">\n <button *ngIf=\"config.maximizable\" type=\"button\" [ngClass]=\"{ 'p-dialog-header-icon p-dialog-header-maximize p-link': true }\" (click)=\"maximize()\" (keydown.enter)=\"maximize()\" tabindex=\"-1\" pRipple>\n <span class=\"p-dialog-header-maximize-icon\" *ngIf=\"!maximizeIconTemplate || !minimizeIconTemplate\" [ngClass]=\"maximized ? minimizeIcon : maximizeIcon\"></span>\n <WindowMaximizeIcon *ngIf=\"!maximized && !maximizeIcon && !maximizeIconTemplate\" [styleClass]=\"'p-dialog-header-maximize-icon'\" />\n <WindowMinimizeIcon *ngIf=\"maximized && !minimizeIcon && !minimizeIconTemplate\" [styleClass]=\"'p-dialog-header-maximize-icon'\" />\n <ng-container *ngComponentOutlet=\"maximizeIconTemplate\"></ng-container>\n <ng-container *ngComponentOutlet=\"minimizeIconTemplate\"></ng-container>\n </button>\n <button [ngClass]=\"'p-dialog-header-icon p-dialog-header-maximize p-link'\" type=\"button\" role=\"button\" (click)=\"hide()\" (keydown.enter)=\"hide()\" *ngIf=\"config.closable !== false\" [attr.aria-label]=\"closeAriaLabel\">\n <TimesIcon [styleClass]=\"'p-dialog-header-close-icon'\" *ngIf=\"!closeIconTemplate\" />\n <ng-container *ngComponentOutlet=\"closeIconTemplate\"></ng-container>\n </button>\n </div>\n </ng-container>\n </div>\n <div #content class=\"p-dialog-content\" [ngStyle]=\"config.contentStyle\">\n <ng-template pDynamicDialogContent *ngIf=\"!contentTemplate\"></ng-template>\n <ng-container *ngComponentOutlet=\"contentTemplate\"></ng-container>\n </div>\n <div #footer class=\"p-dialog-footer\" *ngIf=\"config.footer || footerTemplate\">\n <ng-container *ngIf=\"!footerTemplate\">\n {{ config.footer }}\n </ng-container>\n <ng-container *ngComponentOutlet=\"footerTemplate\"></ng-container>\n </div>\n </div>\n </div>\n `, animations: [trigger('animation', [transition('void => visible', [useAnimation(showAnimation)]), transition('visible => void', [useAnimation(hideAnimation)])])], changeDetection: ChangeDetectionStrategy.Default, encapsulation: ViewEncapsulation.None, host: {\n class: 'p-element'\n }, styles: [\"@layer primeng{.p-dialog-mask{position:fixed;top:0;left:0;width:100%;height:100%;display:flex;justify-content:center;align-items:center;pointer-events:none}.p-dialog-mask.p-component-overlay{pointer-events:auto}.p-dialog{display:flex;flex-direction:column;pointer-events:auto;max-height:90%;transform:scale(1);position:relative}.p-dialog-content{overflow-y:auto;flex-grow:1}.p-dialog-header{display:flex;align-items:center;justify-content:space-between;flex-shrink:0}.p-dialog-draggable .p-dialog-header{cursor:move}.p-dialog-footer{flex-shrink:0}.p-dialog .p-dialog-header-icons{display:flex;align-items:center}.p-dialog .p-dialog-header-icon{display:flex;align-items:center;justify-content:center;overflow:hidden;position:relative}.p-fluid .p-dialog-footer .p-button{width:auto}.p-dialog-top .p-dialog,.p-dialog-bottom .p-dialog,.p-dialog-left .p-dialog,.p-dialog-right .p-dialog,.p-dialog-top-left .p-dialog,.p-dialog-top-right .p-dialog,.p-dialog-bottom-left .p-dialog,.p-dialog-bottom-right .p-dialog{margin:.75rem;transform:translateZ(0)}.p-dialog-maximized{-webkit-transition:none;transition:none;transform:none;width:100vw!important;height:100vh!important;top:0!important;left:0!important;max-height:100%;height:100%}.p-dialog-maximized .p-dialog-content{flex-grow:1}.p-dialog-left{justify-content:flex-start}.p-dialog-right{justify-content:flex-end}.p-dialog-top{align-items:flex-start}.p-dialog-top-left{justify-content:flex-start;align-items:flex-start}.p-dialog-top-right{justify-content:flex-end;align-items:flex-start}.p-dialog-bottom{align-items:flex-end}.p-dialog-bottom-left{justify-content:flex-start;align-items:flex-end}.p-dialog-bottom-right{justify-content:flex-end;align-items:flex-end}.p-dialog .p-resizable-handle{position:absolute;font-size:.1px;display:block;cursor:se-resize;width:12px;height:12px;right:1px;bottom:1px}.p-confirm-dialog .p-dialog-content{display:flex;align-items:center}}\\n\"] }]\n }], ctorParameters: () => [{ type: Document, decorators: [{\n type: Inject,\n args: [DOCUMENT]\n }] }, { type: undefined, decorators: [{\n type: Inject,\n args: [PLATFORM_ID]\n }] }, { type: i0.ChangeDetectorRef }, { type: i0.Renderer2 }, { type: DynamicDialogConfig }, { type: DynamicDialogRef }, { type: i0.NgZone }, { type: i3.PrimeNGConfig }, { type: DynamicDialogComponent, decorators: [{\n type: SkipSelf\n }, {\n type: Optional\n }] }], propDecorators: { insertionPoint: [{\n type: ViewChild,\n args: [DynamicDialogContent]\n }], maskViewChild: [{\n type: ViewChild,\n args: ['mask']\n }], contentViewChild: [{\n type: ViewChild,\n args: ['content']\n }], footerViewChild: [{\n type: ViewChild,\n args: ['footer']\n }], headerViewChild: [{\n type: ViewChild,\n args: ['titlebar']\n }] } });\nclass DynamicDialogModule {\n static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: \"12.0.0\", version: \"18.0.1\", ngImport: i0, type: DynamicDialogModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule });\n static ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: \"14.0.0\", version: \"18.0.1\", ngImport: i0, type: DynamicDialogModule, declarations: [DynamicDialogComponent, DynamicDialogContent], imports: [CommonModule, WindowMaximizeIcon, WindowMinimizeIcon, TimesIcon, SharedModule, FocusTrapModule], exports: [SharedModule] });\n static ɵinj = i0.ɵɵngDeclareInjector({ minVersion: \"12.0.0\", version: \"18.0.1\", ngImport: i0, type: DynamicDialogModule, imports: [CommonModule, WindowMaximizeIcon, WindowMinimizeIcon, TimesIcon, SharedModule, FocusTrapModule, SharedModule] });\n}\ni0.ɵɵngDeclareClassMetadata({ minVersion: \"12.0.0\", version: \"18.0.1\", ngImport: i0, type: DynamicDialogModule, decorators: [{\n type: NgModule,\n args: [{\n imports: [CommonModule, WindowMaximizeIcon, WindowMinimizeIcon, TimesIcon, SharedModule, FocusTrapModule],\n declarations: [DynamicDialogComponent, DynamicDialogContent],\n exports: [SharedModule]\n }]\n }] });\n\nclass DynamicDialogInjector {\n _parentInjector;\n _additionalTokens;\n constructor(_parentInjector, _additionalTokens) {\n this._parentInjector = _parentInjector;\n this._additionalTokens = _additionalTokens;\n }\n get(token, notFoundValue, options) {\n const value = this._additionalTokens.get(token);\n if (value)\n return value;\n return this._parentInjector.get(token, notFoundValue);\n }\n}\n\n/**\n * Dynamic Dialog component methods.\n * @group Service\n */\nclass DialogService {\n appRef;\n injector;\n document;\n dialogComponentRefMap = new Map();\n constructor(appRef, injector, document) {\n this.appRef = appRef;\n this.injector = injector;\n this.document = document;\n }\n /**\n * Displays the dialog using the dynamic dialog object options.\n * @param {*} componentType - Dynamic component for content template.\n * @param {DynamicDialogConfig} config - DynamicDialog object.\n * @returns {DynamicDialogRef} DynamicDialog instance.\n * @group Method\n */\n open(componentType, config) {\n if (!this.duplicationPermission(componentType, config)) {\n return null;\n }\n const dialogRef = this.appendDialogComponentToBody(config, componentType);\n this.dialogComponentRefMap.get(dialogRef).instance.childComponentType = componentType;\n return dialogRef;\n }\n /**\n * Returns the dynamic dialog component instance.\n * @param {ref} DynamicDialogRef - DynamicDialog instance.\n * @group Method\n */\n getInstance(ref) {\n return this.dialogComponentRefMap.get(ref).instance;\n }\n appendDialogComponentToBody(config, componentType) {\n const map = new WeakMap();\n map.set(DynamicDialogConfig, config);\n const dialogRef = new DynamicDialogRef();\n map.set(DynamicDialogRef, dialogRef);\n const sub = dialogRef.onClose.subscribe(() => {\n this.dialogComponentRefMap.get(dialogRef).instance.close();\n });\n const destroySub = dialogRef.onDestroy.subscribe(() => {\n this.removeDialogComponentFromBody(dialogRef);\n destroySub.unsubscribe();\n sub.unsubscribe();\n });\n const componentRef = createComponent(DynamicDialogComponent, { environmentInjector: this.appRef.injector, elementInjector: new DynamicDialogInjector(this.injector, map) });\n this.appRef.attachView(componentRef.hostView);\n const domElem = componentRef.hostView.rootNodes[0];\n if (!config.appendTo || config.appendTo === 'body') {\n this.document.body.appendChild(domElem);\n }\n else {\n DomHandler.appendChild(domElem, config.appendTo);\n }\n this.dialogComponentRefMap.set(dialogRef, componentRef);\n return dialogRef;\n }\n removeDialogComponentFromBody(dialogRef) {\n if (!dialogRef || !this.dialogComponentRefMap.has(dialogRef)) {\n return;\n }\n const dialogComponentRef = this.dialogComponentRefMap.get(dialogRef);\n this.appRef.detachView(dialogComponentRef.hostView);\n dialogComponentRef.destroy();\n this.dialogComponentRefMap.delete(dialogRef);\n }\n duplicationPermission(componentType, config) {\n if (config.duplicate) {\n return true;\n }\n let permission = true;\n for (const [key, value] of this.dialogComponentRefMap) {\n if (value.instance.childComponentType === componentType) {\n permission = false;\n break;\n }\n }\n return permission;\n }\n static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: \"12.0.0\", version: \"18.0.1\", ngImport: i0, type: DialogService, deps: [{ token: i0.ApplicationRef }, { token: i0.Injector }, { token: DOCUMENT }], target: i0.ɵɵFactoryTarget.Injectable });\n static ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: \"12.0.0\", version: \"18.0.1\", ngImport: i0, type: DialogService });\n}\ni0.ɵɵngDeclareClassMetadata({ minVersion: \"12.0.0\", version: \"18.0.1\", ngImport: i0, type: DialogService, decorators: [{\n type: Injectable\n }], ctorParameters: () => [{ type: i0.ApplicationRef }, { type: i0.Injector }, { type: Document, decorators: [{\n type: Inject,\n args: [DOCUMENT]\n }] }] });\n\n/**\n * Generated bundle index. Do not edit.\n */\n\nexport { DialogService, DynamicDialogComponent, DynamicDialogConfig, DynamicDialogInjector, DynamicDialogModule, DynamicDialogRef };\n//# sourceMappingURL=primeng-dynamicdialog.mjs.map\n","export const LoggerLevelName = {\n error: 'error',\n warn: 'warn',\n info: 'info',\n verbose: 'verbose',\n debug: 'debug',\n silly: 'silly',\n};\n//# sourceMappingURL=logger-level-name.js.map","import { LoggerLevelName } from './logger-level-name.js';\nexport class LoggerRingBuffer {\n _lastLogMessage = { messageSource: 'No message yet', timestamp: new Date().getTime(), lvl: LoggerLevelName.info };\n _buffer = [];\n _bufferIdx = 0;\n _lastSnapshotIdx = 0;\n _bufferSize;\n constructor(size) {\n if (!size) {\n throw new Error('Cannot create ring buffer of size 0');\n }\n this._bufferSize = size;\n }\n get currentIndex() {\n return this._bufferIdx;\n }\n get lastSnapshotIdx() {\n return this._lastSnapshotIdx;\n }\n set bufferSize(newSize) {\n if (!newSize) {\n throw new Error('Cannot create ring buffer of size 0');\n }\n this._bufferSize = newSize;\n this.clearRingBuffer();\n }\n getMessages(inStartFrom = null, clear = false, reverseSort = false) {\n let rval = null;\n if (this._bufferIdx < this._bufferSize) {\n const start = inStartFrom == null ? 0 : inStartFrom;\n rval = this._buffer.slice(start, this._bufferIdx);\n }\n else {\n rval = [];\n const firstIdx = this._bufferIdx - this._bufferSize;\n const startFrom = inStartFrom ? Math.max(inStartFrom, firstIdx) : firstIdx;\n for (let i = startFrom; i < this._bufferIdx; i++) {\n rval.push(this._buffer[i % this._bufferSize]);\n }\n }\n if (clear) {\n this.clearRingBuffer();\n }\n if (reverseSort) {\n rval = rval.reverse();\n }\n return rval;\n }\n takeSnapshot() {\n const trailingEdge = Math.max(0, this._bufferIdx - this._bufferSize);\n const rval = {\n messages: this.getMessages(this._lastSnapshotIdx),\n logMessagesTruncated: Math.max(0, trailingEdge - this._lastSnapshotIdx),\n };\n this._lastSnapshotIdx = this._bufferIdx;\n return rval;\n }\n getLastLogMessage() {\n return Object.assign({}, this._lastLogMessage);\n }\n clearRingBuffer() {\n this._buffer = [];\n this._bufferIdx = 0;\n this._lastSnapshotIdx = 0;\n }\n addToRingBuffer(newMsg) {\n this._lastLogMessage = newMsg;\n this._buffer[this._bufferIdx % this._bufferSize] = newMsg;\n this._bufferIdx++;\n }\n}\n//# sourceMappingURL=logger-ring-buffer.js.map","export const LoggerOutputFunction = {\n Console: 'Console',\n ConsoleNoDebug: 'ConsoleNoDebug',\n StdOut: 'StdOut',\n};\n//# sourceMappingURL=logger-output-function.js.map","import { LoggerLevelName } from './logger-level-name.js';\nimport { LoggerOutputFunction } from './logger-output-function.js';\nexport class LoggerUtil {\n static LOG_LEVELS_IN_ORDER = [\n LoggerLevelName.error,\n LoggerLevelName.warn,\n LoggerLevelName.info,\n LoggerLevelName.verbose,\n LoggerLevelName.debug,\n LoggerLevelName.silly,\n ];\n static handlerFunctionMap(outputFn = LoggerOutputFunction.Console) {\n const output = new Map();\n if (outputFn === LoggerOutputFunction.StdOut) {\n if (!process?.stdout?.write) {\n throw new Error('Cannot use standard out - process.stdout.write not found');\n }\n const myStdOut = (chunk, cb) => process.stdout.write(chunk, 'utf-8', cb);\n output.set(LoggerLevelName.error, myStdOut);\n output.set(LoggerLevelName.warn, myStdOut);\n output.set(LoggerLevelName.info, myStdOut);\n output.set(LoggerLevelName.verbose, myStdOut);\n output.set(LoggerLevelName.debug, myStdOut);\n output.set(LoggerLevelName.silly, myStdOut);\n }\n else {\n output.set(LoggerLevelName.error, console.error);\n output.set(LoggerLevelName.warn, console.warn);\n output.set(LoggerLevelName.info, console.info);\n output.set(LoggerLevelName.verbose, outputFn === LoggerOutputFunction.ConsoleNoDebug ? console.log : console.debug);\n output.set(LoggerLevelName.debug, outputFn === LoggerOutputFunction.ConsoleNoDebug ? console.log : console.debug);\n output.set(LoggerLevelName.silly, outputFn === LoggerOutputFunction.ConsoleNoDebug ? console.log : console.debug);\n }\n return output;\n }\n static defaultHandlerFunction() {\n return console.info;\n }\n static levelIsEnabled(targetLevel, currentEnabled) {\n const idxTarget = LoggerUtil.LOG_LEVELS_IN_ORDER.indexOf(targetLevel);\n const lvl = LoggerUtil.LOG_LEVELS_IN_ORDER.indexOf(currentEnabled);\n return idxTarget > -1 && lvl > -1 && lvl >= idxTarget;\n }\n}\n//# sourceMappingURL=logger-util.js.map","export const LogMessageFormatType = {\n ClassicSingleLine: 'ClassicSingleLine',\n StructuredJson: 'StructuredJson',\n None: 'None',\n};\n//# sourceMappingURL=log-message-format-type.js.map","export class RequireRatchet {\n static isNullOrUndefined(ob) {\n return Object.is(ob, null) || Object.is(ob, undefined);\n }\n static notNullOrUndefined(ob, name = 'object') {\n if (RequireRatchet.isNullOrUndefined(ob)) {\n throw new Error(name + ' may not be null or undefined');\n }\n }\n static notNullUndefinedOrOnlyWhitespaceString(ob, name = 'string') {\n if (RequireRatchet.isNullOrUndefined(ob) || ob.trim() === '') {\n throw new Error(name + ' may not be null or undefined or only whitespace string');\n }\n }\n static notNullUndefinedOrEmptyArray(ob, name = 'string') {\n if (RequireRatchet.isNullOrUndefined(ob) || ob.length === 0) {\n throw new Error(name + ' may not be null or undefined or an empty array');\n }\n }\n static equal(ob1, ob2, message = 'Values must be equal') {\n if (ob1 !== ob2) {\n throw new Error(message);\n }\n }\n static true(ob, message = 'Value must be true') {\n RequireRatchet.equal(ob, true, message);\n }\n static noNullOrUndefinedValuesInArray(arr, expectedLength = null, customMsg = null) {\n RequireRatchet.notNullOrUndefined(arr, 'Source array may not be null');\n if (expectedLength !== null && arr.length !== expectedLength) {\n throw new Error(`Expected array of length ${expectedLength} but was ${arr.length} ${customMsg}`);\n }\n for (let i = 0; i < arr.length; i++) {\n if (RequireRatchet.isNullOrUndefined(arr[i])) {\n throw new Error(`Array index ${i} was null or undefined ${customMsg}`);\n }\n }\n }\n static noNullOrUndefinedValuesInRestArgs(expectedLength, ...restArgs) {\n RequireRatchet.notNullOrUndefined(restArgs, 'Source array may not be null');\n if (expectedLength !== null && restArgs.length !== expectedLength) {\n throw new Error(`Expected array of length ${expectedLength} but was ${restArgs.length}`);\n }\n for (let i = 0; i < restArgs.length; i++) {\n if (RequireRatchet.isNullOrUndefined(restArgs[i])) {\n throw new Error(`Array index ${i} was null or undefined`);\n }\n }\n }\n static constructorArgumentsMatchLengthAndAreNonNull() {\n const args = Array.from(arguments);\n const len = this.constructor.length;\n return RequireRatchet.noNullOrUndefinedValuesInArray(args, len);\n }\n}\n//# sourceMappingURL=require-ratchet.js.map","import { RequireRatchet } from './require-ratchet.js';\nexport class StringRatchet {\n static RFC_3986_RESERVED = [\n '!',\n '*',\n \"'\",\n '(',\n ')',\n ';',\n ':',\n '@',\n '&',\n '=',\n '+',\n '$',\n ',',\n '/',\n '?',\n '#',\n '[',\n ']',\n '%',\n ];\n static WHITESPACE = ' \\n\\t';\n static DIGITS = '0123456789';\n static HEXITS = StringRatchet.DIGITS + 'ABCDEF';\n static UPPER_CASE_LATIN = 'ABCDEFGHIJKLMNOPQRSTUVWXYZ';\n static LOWER_CASE_LATIN = 'abcdefghijklmnopqrstuvwxyz';\n static CASE_INSENSITIVE_LATIN = StringRatchet.UPPER_CASE_LATIN + StringRatchet.LOWER_CASE_LATIN;\n static stringIsInGivenAlphabet(input, alphabet) {\n let rval = false;\n if (input && alphabet) {\n for (let i = 0; i < input.length && !rval; i++) {\n rval = alphabet.includes(input.charAt(i));\n }\n }\n return rval;\n }\n static stringToUint8Array(val) {\n return val ? new TextEncoder().encode(val) : null;\n }\n static uint8ArrayToString(val) {\n return val ? new TextDecoder().decode(val) : null;\n }\n static attemptJsonParse(val) {\n let rval = null;\n if (StringRatchet.trimToNull(val)) {\n try {\n rval = JSON.parse(val);\n }\n catch {\n rval = null;\n }\n }\n return rval;\n }\n static canParseAsJson(val) {\n return !!StringRatchet.attemptJsonParse(val);\n }\n static allUnique(input) {\n let rval = true;\n if (input) {\n const check = new Set();\n for (let i = 0; i < input.length && rval; i++) {\n const test = input.charAt(i);\n rval = !check.has(test);\n check.add(test);\n }\n }\n return rval;\n }\n static allPermutationsOfLength(len, alphabet) {\n const rval = [];\n if (len > 0 && alphabet && alphabet.length > 0) {\n RequireRatchet.true(StringRatchet.allUnique(alphabet), 'Alphabet must be unique');\n const step = len === 1 ? [''] : StringRatchet.allPermutationsOfLength(len - 1, alphabet);\n for (let i = 0; i < alphabet.length; i++) {\n step.forEach((s) => rval.push(alphabet.charAt(i) + s));\n }\n }\n return rval;\n }\n static breakIntoBlocks(input, blockSize, separator) {\n let out = '';\n while (input.length > blockSize) {\n out = separator + input.substring(input.length - blockSize) + out;\n input = input.substring(0, input.length - blockSize);\n }\n if (input.length > 0) {\n out = input + out;\n }\n else {\n out = out.substring(1);\n }\n return out;\n }\n static createShortUid(blockSize = 0, uniquesPerSecond = 1000, radix = 36) {\n const currentEpoch = Math.floor(Date.now() / 1000);\n const asDecimal = parseInt(String(Math.floor(Math.random() * uniquesPerSecond)) + String(currentEpoch));\n const asHex = asDecimal.toString(radix);\n const out = blockSize > 0 ? StringRatchet.breakIntoBlocks(asHex, blockSize, '-') : asHex;\n return out;\n }\n static createType4Guid() {\n return 'xxxxxxxx-xxxx-4xxx-yxxx-xxxxxxxxxxxx'.replace(/[xy]/g, function (c) {\n const r = (Math.random() * 16) | 0, v = c == 'x' ? r : (r & 0x3) | 0x8;\n return v.toString(16);\n });\n }\n static createRandomHexString(len = 10) {\n let r = '';\n for (let i = 0; i < len; i++) {\n r += Math.floor(Math.random() * 16).toString(16);\n }\n return r;\n }\n static canonicalize(value) {\n let rval = value ? value.toLowerCase() : '';\n rval = rval.replace(' ', '-');\n StringRatchet.RFC_3986_RESERVED.forEach((s) => {\n rval = rval.replace(s, '');\n });\n return rval;\n }\n static formatBytes(bytes, decimals = 2) {\n if (bytes == 0)\n return '0 Bytes';\n const k = 1024, dm = decimals || 2, sizes = ['Bytes', 'KB', 'MB', 'GB', 'TB', 'PB', 'EB', 'ZB', 'YB'], i = Math.floor(Math.log(bytes) / Math.log(k));\n return parseFloat((bytes / Math.pow(k, i)).toFixed(dm)) + ' ' + sizes[i];\n }\n static safeString(input) {\n let rval = null;\n if (input != null) {\n const type = typeof input;\n if (type == 'string') {\n rval = input;\n }\n else {\n rval = String(input);\n }\n }\n return rval;\n }\n static stringContainsOnlyWhitespace(input) {\n return StringRatchet.stringContainsOnly(input, StringRatchet.WHITESPACE);\n }\n static stringContainsOnlyNumbers(input) {\n const rval = /^[0-9]+$/.test(input);\n return rval;\n }\n static stringContainsOnlyAlphanumeric(input) {\n const rval = /^[0-9a-zA-Z]+$/.test(input);\n return rval;\n }\n static stringContainsOnlyHex(input) {\n const rval = /^[0-9a-fA-F]+$/.test(input);\n return rval;\n }\n static stringContainsOnly(inVal, validCharsIn) {\n const input = !inVal ? '' : inVal;\n const validChars = !validCharsIn ? '' : validCharsIn;\n let rval = true;\n for (let i = 0; i < input.length && rval; i++) {\n rval = validChars.indexOf(input.charAt(i)) >= 0;\n }\n return rval;\n }\n static obscure(input, prefixLength = 2, suffixLength = 2) {\n if (!input) {\n return input;\n }\n const len = input.length;\n let pl = prefixLength;\n let sl = suffixLength;\n while (len > 0 && len < pl + sl + 1) {\n pl = Math.max(0, pl - 1);\n sl = Math.max(0, sl - 1);\n }\n const rem = len - (pl + sl);\n let rval = '';\n rval += input.substring(0, pl);\n for (let i = 0; i < rem; i++) {\n rval += '*';\n }\n rval += input.substring(len - sl);\n return rval;\n }\n static leadingZeros(inVal, size) {\n const pad = '00000000000000000000000000000000000000000000000000';\n let negative = false;\n let sVal = String(inVal);\n if (sVal.startsWith('-')) {\n negative = true;\n sVal = sVal.substring(1);\n }\n if (size > pad.length) {\n throw new Error('Cannot format number that large');\n }\n let rval = (pad + sVal).slice(-1 * size);\n if (negative) {\n rval = '-' + rval;\n }\n return rval;\n }\n static trimToEmpty(input) {\n const t = input ? StringRatchet.safeString(input) : '';\n return t.trim();\n }\n static trimToNull(input) {\n const x = StringRatchet.trimToEmpty(input);\n return x.length > 0 ? x : null;\n }\n static trimAllStringPropertiesToNullInPlace(input) {\n return StringRatchet.trimAllStringPropertiesInPlace(input, false);\n }\n static trimAllStringPropertiesToEmptyInPlace(input) {\n return StringRatchet.trimAllStringPropertiesInPlace(input, true);\n }\n static trimAllStringPropertiesInPlace(input, toEmpty) {\n const dealKeys = Object.keys(input);\n dealKeys.forEach((key) => {\n const val = input[key];\n if (val != null && typeof val === 'string') {\n input[key] = toEmpty ? StringRatchet.trimToEmpty(input[key]) : StringRatchet.trimToNull(input[key]);\n }\n });\n return input;\n }\n static stripNonNumeric(input) {\n let rval = input;\n if (input != null && !StringRatchet.stringContainsOnlyNumbers(input)) {\n rval = '';\n for (let i = 0; i < input.length; i++) {\n const c = input.charAt(i);\n if (StringRatchet.stringContainsOnlyNumbers(c) || (i === 0 && c === '-')) {\n rval += c;\n }\n }\n }\n return rval;\n }\n static csvSafe(input) {\n let rval = StringRatchet.trimToEmpty(StringRatchet.safeString(input));\n rval.split('\"').join('\\\\\"');\n if (rval.indexOf(',') !== -1 || rval.indexOf('\"') !== -1 || rval.indexOf(\"'\") !== -1) {\n rval = '\"' + rval + '\"';\n }\n return rval;\n }\n static stripNonAscii(value) {\n const reduced = [...value].reduce((previousValue, currentValue) => {\n const charCode = currentValue.charCodeAt(0);\n if (charCode > 127) {\n return previousValue;\n }\n return previousValue + currentValue;\n });\n return reduced;\n }\n static replaceAll(value, src, dst) {\n let rval = value;\n if (rval?.length && src?.length && dst?.length) {\n rval = rval.split(src).join(dst);\n }\n return rval;\n }\n static simpleTemplateFill(template, fillers, errorOnMissingFiller = false, opener = '${', closer = '}') {\n let rval = template;\n if (rval && fillers) {\n Object.keys(fillers).forEach((key) => {\n rval = rval.split(opener + key + closer).join(fillers[key]);\n });\n }\n if (errorOnMissingFiller && rval?.indexOf(opener) >= 0) {\n throw new Error('Template has unfilled variables:' + rval);\n }\n return rval;\n }\n static circSafeJsonStringify(input) {\n let rval = null;\n try {\n rval = JSON.stringify(input);\n }\n catch (err) {\n if (err instanceof TypeError) {\n let lines = err.message.split('\\n').map(s => StringRatchet.trimToNull(s)).filter(s => !!s);\n lines = lines.filter(s => s.startsWith('-->') || s.startsWith('---'));\n rval = 'Cannot stringify - object contains circular reference : ' + lines.join(', ');\n }\n else {\n throw err;\n }\n }\n return rval;\n }\n static format(fmt, ...args) {\n const re = /(%?)(%([ojds]))/g;\n if (args.length) {\n fmt = fmt.replace(re, function (match, escaped, ptn, flag) {\n let arg = args.shift();\n switch (flag) {\n case 'o':\n if (Array.isArray(arg)) {\n arg = StringRatchet.circSafeJsonStringify(arg);\n break;\n }\n else {\n throw new Error('Cannot use o placeholder for argument of type ' + typeof arg);\n }\n case 's':\n arg = '' + arg;\n break;\n case 'd':\n arg = Number(arg);\n break;\n case 'j':\n arg = StringRatchet.circSafeJsonStringify(arg);\n break;\n }\n if (!escaped) {\n return arg;\n }\n args.unshift(arg);\n return match;\n });\n }\n if (args.length) {\n fmt += ' ' + args.join(' ');\n }\n fmt = fmt.replace(/%{2,2}/g, '%');\n return '' + fmt;\n }\n}\n//# sourceMappingURL=string-ratchet.js.map","import { StringRatchet } from \"../lang/string-ratchet.js\";\nexport class ClassicSingleLineLogMessageFormatter {\n formatMessage(msg, meta) {\n let tmp = null;\n if (msg) {\n tmp = '';\n tmp += meta.options.trace ? meta.options.trace + ' ' : '';\n tmp += '[' + msg.lvl + '] ';\n tmp += StringRatchet.format(msg.messageSource, ...msg.subsVars);\n }\n return tmp;\n }\n}\n//# sourceMappingURL=classic-single-line-log-message-formatter.js.map","export class NoneLogMessageFormatter {\n formatMessage(_msg, _meta) {\n return null;\n }\n}\n//# sourceMappingURL=none-log-message-formatter.js.map","import { StringRatchet } from \"../lang/string-ratchet.js\";\nexport class StructuredJsonLogMessageFormatter {\n formatMessage(msg, meta) {\n let rval = null;\n if (msg) {\n const tmp = Object.assign({}, meta.options.globalVars || {}, msg.params || {});\n tmp['msg'] = StringRatchet.format(msg.messageSource, ...msg.subsVars);\n tmp['utcDateTime'] = new Date(msg.timestamp).toISOString();\n tmp['logLevel'] = msg.lvl;\n if (meta.options.trace) {\n tmp['trace'] = meta.options.trace;\n }\n tmp['logName'] = meta.loggerInstanceName;\n tmp['logId'] = meta.loggerInstanceId;\n rval = JSON.stringify(tmp) + '\\n';\n }\n return rval;\n }\n}\n//# sourceMappingURL=structured-json-log-message-formatter.js.map","import { LoggerRingBuffer } from './logger-ring-buffer.js';\nimport { LoggerLevelName } from './logger-level-name.js';\nimport { LoggerUtil } from './logger-util.js';\nimport { LogMessageFormatType } from './log-message-format-type.js';\nimport { ClassicSingleLineLogMessageFormatter } from './classic-single-line-log-message-formatter.js';\nimport { NoneLogMessageFormatter } from './none-log-message-formatter.js';\nimport { StructuredJsonLogMessageFormatter } from './structured-json-log-message-formatter.js';\nimport { StringRatchet } from '../lang/string-ratchet.js';\nexport class LoggerInstance {\n loggerInstanceName;\n _guid = Math.floor(Math.random() * 1_000_000);\n _loggerMeta;\n _ringBuffer;\n _formatter;\n _level;\n _handlerFunctionMap;\n _options;\n constructor(loggerInstanceName = 'default', inOptions) {\n this.loggerInstanceName = loggerInstanceName;\n this.options = inOptions;\n }\n levelIsEnabled(level) {\n return LoggerUtil.levelIsEnabled(level, this._level);\n }\n addPreProcessor(proc) {\n if (proc) {\n this._options.preProcessors = this._options.preProcessors || [];\n this._options.preProcessors.push(proc);\n }\n return Object.assign([], this._options.preProcessors);\n }\n get ringBuffer() {\n return this._ringBuffer;\n }\n dumpConfigurationIntoLog() {\n this.error('ERROR enabled');\n this.warn('WARN enabled');\n this.info('INFO enabled');\n this.verbose('VERBOSE enabled');\n this.debug('DEBUG enabled');\n this.silly('SILLY enabled');\n }\n dumpOptionsIntoLog() {\n this.info('Guid: %s Options: %j', this._guid, this.options);\n if (this?.options?.preProcessors?.length) {\n const labels = this.options.preProcessors.map((p) => StringRatchet.trimToNull(p.label()) || 'Unlabelled');\n this.info('Preprocessors: %j', labels);\n }\n }\n get guid() {\n return this._guid;\n }\n changeRingBufferSize(newSize) {\n this._ringBuffer = null;\n if (newSize) {\n this._ringBuffer = new LoggerRingBuffer(newSize);\n this._options.ringBufferSize = newSize;\n }\n }\n updateTracePrefix(newValue) {\n this._options.trace = newValue;\n }\n get options() {\n return Object.assign({}, this._options);\n }\n set options(newOpts) {\n this._options = Object.assign({}, newOpts);\n if (this._options.ringBufferSize) {\n this._ringBuffer = new LoggerRingBuffer(this._options.ringBufferSize);\n }\n switch (this._options.formatType) {\n case LogMessageFormatType.None:\n this._formatter = new NoneLogMessageFormatter();\n break;\n case LogMessageFormatType.StructuredJson:\n this._formatter = new StructuredJsonLogMessageFormatter();\n break;\n default:\n this._formatter = new ClassicSingleLineLogMessageFormatter();\n break;\n }\n this._level = this._options.initialLevel;\n this._handlerFunctionMap = LoggerUtil.handlerFunctionMap(this._options.outputFunction);\n const oldId = this._loggerMeta ? this._loggerMeta.loggerInstanceId : null;\n this._loggerMeta = {\n options: this._options,\n loggerInstanceName: this.loggerInstanceName,\n loggerInstanceId: oldId || StringRatchet.createRandomHexString(8),\n };\n }\n get level() {\n return this._level;\n }\n set level(newLevel) {\n if (!newLevel) {\n throw new Error('Cannot set level to null/undefined');\n }\n this._level = newLevel;\n }\n consoleLogPassThru(level, ...input) {\n if (LoggerUtil.levelIsEnabled(level, this._level)) {\n let passThruPrefix = this._options.trace || '';\n passThruPrefix += '[' + level + '] ';\n input.unshift(passThruPrefix);\n const fn = this._handlerFunctionMap.get(level) || LoggerUtil.defaultHandlerFunction;\n fn(...input);\n }\n }\n createLogMessage(level, params, format, ...input) {\n const rval = {\n lvl: level,\n timestamp: Date.now(),\n messageSource: format,\n subsVars: input,\n params: params,\n };\n return rval;\n }\n formatMessage(msg) {\n const rval = msg ? this._formatter.formatMessage(msg, this._loggerMeta) : null;\n return rval;\n }\n formatMessages(msgs) {\n const rval = (msgs || []).map((m) => this.formatMessage(m)).filter((m) => !!m);\n return rval;\n }\n recordMessageBuilder(msgBuild) {\n return this.recordMessage(msgBuild.toMessage());\n }\n recordMessage(inMsg) {\n let rval = null;\n if (LoggerUtil.levelIsEnabled(inMsg.lvl, this._level)) {\n let msg = Object.assign({}, inMsg);\n if (this._options.preProcessors?.length) {\n for (const proc of this._options.preProcessors) {\n msg = proc.process(msg);\n }\n }\n rval = this.formatMessage(msg);\n if (rval) {\n const fn = this._handlerFunctionMap.get(msg.lvl) || LoggerUtil.defaultHandlerFunction;\n fn(rval);\n if (this._ringBuffer) {\n this._ringBuffer.addToRingBuffer(msg);\n }\n }\n }\n else {\n }\n return rval;\n }\n error(format, ...input) {\n const msg = this.createLogMessage(LoggerLevelName.error, {}, format, ...input);\n return this.recordMessage(msg);\n }\n errorP(...input) {\n this.consoleLogPassThru(LoggerLevelName.error, ...input);\n }\n warn(format, ...input) {\n const msg = this.createLogMessage(LoggerLevelName.warn, {}, format, ...input);\n return this.recordMessage(msg);\n }\n warnP(...input) {\n this.consoleLogPassThru(LoggerLevelName.warn, ...input);\n }\n info(format, ...input) {\n const msg = this.createLogMessage(LoggerLevelName.info, {}, format, ...input);\n return this.recordMessage(msg);\n }\n infoP(...input) {\n this.consoleLogPassThru(LoggerLevelName.info, ...input);\n }\n verbose(format, ...input) {\n const msg = this.createLogMessage(LoggerLevelName.verbose, {}, format, ...input);\n return this.recordMessage(msg);\n }\n verboseP(...input) {\n this.consoleLogPassThru(LoggerLevelName.verbose, ...input);\n }\n debug(format, ...input) {\n const msg = this.createLogMessage(LoggerLevelName.debug, {}, format, ...input);\n return this.recordMessage(msg);\n }\n debugP(...input) {\n this.consoleLogPassThru(LoggerLevelName.debug, ...input);\n }\n silly(format, ...input) {\n const msg = this.createLogMessage(LoggerLevelName.silly, {}, format, ...input);\n return this.recordMessage(msg);\n }\n sillyP(...input) {\n this.consoleLogPassThru(LoggerLevelName.silly, ...input);\n }\n logByLevel(level, format, ...input) {\n const msg = this.createLogMessage(level, {}, format, ...input);\n this.recordMessage(msg);\n }\n importMessages(msgs, prefixIn = '', addTimestamp = true) {\n const prefix = prefixIn || '';\n if (msgs && msgs.length > 0) {\n this.silly('Received import data : %d msgs', msgs.length);\n msgs.forEach((m) => {\n if (m.messageSource) {\n let mOut = prefix;\n if (addTimestamp) {\n const ts = String(new Date()).substring(15, 24);\n mOut += ' (' + ts + ') : ';\n mOut += m.messageSource;\n }\n this.logByLevel(m.lvl, mOut);\n }\n });\n }\n }\n}\n//# sourceMappingURL=logger-instance.js.map","import { LoggerInstance } from './logger-instance.js';\nimport { LogMessageFormatType } from './log-message-format-type.js';\nimport { LoggerLevelName } from './logger-level-name.js';\nimport { LoggerOutputFunction } from './logger-output-function.js';\nexport class Logger {\n static LOGGER_INSTANCE_MAP_GLOBAL_KEY = 'RATCHET_GLOBAL_LOGGER_MAP_V01';\n static GLOBAL_PROVIDER = process || global || window;\n static DEFAULT_OPTIONS = {\n initialLevel: LoggerLevelName.info,\n formatType: LogMessageFormatType.ClassicSingleLine,\n trace: null,\n globalVars: {},\n outputFunction: LoggerOutputFunction.Console,\n ringBufferSize: 0,\n preProcessors: [],\n };\n static applyDefaultsToOptions(input) {\n const rval = input || {};\n rval.initialLevel = rval.initialLevel ?? Logger.DEFAULT_OPTIONS.initialLevel;\n rval.formatType = rval.formatType ?? Logger.DEFAULT_OPTIONS.formatType;\n rval.trace = rval.trace ?? Logger.DEFAULT_OPTIONS.trace;\n rval.globalVars = rval.globalVars ?? Logger.DEFAULT_OPTIONS.globalVars;\n rval.outputFunction = rval.outputFunction ?? Logger.DEFAULT_OPTIONS.outputFunction;\n rval.ringBufferSize = rval.ringBufferSize ?? Logger.DEFAULT_OPTIONS.ringBufferSize;\n return rval;\n }\n static loggerInstances() {\n if (!Logger.GLOBAL_PROVIDER) {\n throw new Error('Cannot create logger - could not find a global provider');\n }\n let rval = Logger.GLOBAL_PROVIDER[Logger.LOGGER_INSTANCE_MAP_GLOBAL_KEY];\n if (!rval) {\n rval = new Map();\n Logger.GLOBAL_PROVIDER[Logger.LOGGER_INSTANCE_MAP_GLOBAL_KEY] = rval;\n }\n return rval;\n }\n static changeDefaultOptions(input, retroactive) {\n if (!input || !input.initialLevel || !input.formatType) {\n throw new Error('Default options must be non-null, and provide initial level and format type');\n }\n Logger.DEFAULT_OPTIONS = Object.assign({}, input);\n if (retroactive) {\n Array.from(Logger.loggerInstances().values()).forEach((li) => (li.options = input));\n }\n }\n static getLogger(loggerName = 'default', inOptions) {\n let inst = Logger.loggerInstances().get(loggerName);\n if (!inst) {\n const options = Logger.applyDefaultsToOptions(inOptions);\n inst = new LoggerInstance(loggerName, options);\n Logger.loggerInstances().set(loggerName, inst);\n }\n return inst;\n }\n static recordMessageBuilder(msgBuild) {\n return Logger.getLogger().recordMessageBuilder(msgBuild);\n }\n static levelIsEnabled(level) {\n return Logger.getLogger().levelIsEnabled(level);\n }\n static recordMessage(msg) {\n return Logger.getLogger().recordMessage(msg);\n }\n static formatMessages(msgs) {\n return Logger.getLogger().formatMessages(msgs);\n }\n static updateTracePrefix(newValue) {\n return Logger.getLogger().updateTracePrefix(newValue);\n }\n static changeRingBufferSize(newValue) {\n return Logger.getLogger().changeRingBufferSize(newValue);\n }\n static getRingBuffer() {\n return Logger.getLogger().ringBuffer;\n }\n static dumpConfigurationIntoLog() {\n return Logger.getLogger().dumpConfigurationIntoLog();\n }\n static dumpOptionsIntoLog() {\n return Logger.getLogger().dumpOptionsIntoLog();\n }\n static getLevel() {\n return Logger.getLogger().level;\n }\n static setLevel(newLevel) {\n Logger.getLogger().level = newLevel;\n }\n static getOptions() {\n return Logger.getLogger().options;\n }\n static getMessages(inStartFrom = null, clear = false, reverseSort = false) {\n const buf = Logger.getLogger().ringBuffer;\n return buf ? buf.getMessages(inStartFrom, clear, reverseSort) : null;\n }\n static consoleLogPassThru(level, ...input) {\n return Logger.getLogger().consoleLogPassThru(level, ...input);\n }\n static error(format, ...input) {\n return Logger.getLogger().error(format, ...input);\n }\n static errorP(...input) {\n return Logger.getLogger().errorP(...input);\n }\n static warn(format, ...input) {\n return Logger.getLogger().warn(format, ...input);\n }\n static warnP(...input) {\n return Logger.getLogger().warnP(...input);\n }\n static info(format, ...input) {\n return Logger.getLogger().info(format, ...input);\n }\n static infoP(...input) {\n return Logger.getLogger().infoP(...input);\n }\n static verbose(format, ...input) {\n return Logger.getLogger().verbose(format, ...input);\n }\n static verboseP(...input) {\n return Logger.getLogger().verboseP(...input);\n }\n static debug(format, ...input) {\n return Logger.getLogger().debug(format, ...input);\n }\n static debugP(...input) {\n return Logger.getLogger().debugP(...input);\n }\n static silly(format, ...input) {\n return Logger.getLogger().silly(format, ...input);\n }\n static sillyP(...input) {\n return Logger.getLogger().sillyP(...input);\n }\n static takeSnapshot() {\n const buf = Logger.getLogger().ringBuffer;\n return buf ? buf.takeSnapshot() : null;\n }\n static logByLevel(level, format, ...input) {\n return Logger.getLogger().logByLevel(level, format, ...input);\n }\n static importMessages(msgs, prefixIn = '', addTimestamp = true) {\n return Logger.getLogger().importMessages(msgs, prefixIn, addTimestamp);\n }\n static getLastLogMessage() {\n const buf = Logger.getLogger().ringBuffer;\n return buf ? buf.getLastLogMessage() : null;\n }\n}\n//# sourceMappingURL=logger.js.map","import {Component} from '@angular/core';\nimport {DialogService, DynamicDialogConfig, DynamicDialogRef} from 'primeng/dynamicdialog';\nimport {Logger} from '@bitblit/ratchet-common/logger/logger';\nimport {BehaviorSubject} from 'rxjs';\nimport {AsyncPipe} from \"@angular/common\";\n\n@Component({\n selector: 'ngx-acute-common-alert',\n template: '<div><pre>{{cfg.data.message | async}}</pre></div>',\n standalone: true,\n imports: [AsyncPipe]\n})\nexport class AlertComponent {\n constructor(\n private dialogService: DialogService,\n public cfg: DynamicDialogConfig,\n protected ref: DynamicDialogRef,\n ) {\n Logger.info('Creating with %j', this.cfg);\n }\n\n public static showAlert(dialogSvc: DialogService, message: BehaviorSubject<string> | string, title: string = 'Alert'): DynamicDialogRef {\n const dlg: DynamicDialogRef = dialogSvc.open(AlertComponent, {\n //disableClose: true,\n //autoFocus: true,\n data: {\n message: message instanceof BehaviorSubject ? message : new BehaviorSubject<string>(message),\n },\n header: title,\n });\n return dlg;\n }\n}\n","import * as i1 from '@angular/common';\nimport { CommonModule } from '@angular/common';\nimport * as i0 from '@angular/core';\nimport { Component, ChangeDetectionStrategy, ViewEncapsulation, Input, NgModule } from '@angular/core';\n\n/**\n * ProgressSpinner is a process status indicator.\n * @group Components\n */\nclass ProgressSpinner {\n /**\n * Class of the element.\n * @group Props\n */\n styleClass;\n /**\n * Inline style of the element.\n * @group Props\n */\n style;\n /**\n * Width of the circle stroke.\n * @group Props\n */\n strokeWidth = '2';\n /**\n * Color for the background of the circle.\n * @group Props\n */\n fill = 'none';\n /**\n * Duration of the rotate animation.\n * @group Props\n */\n animationDuration = '2s';\n /**\n * Used to define a aria label attribute the current element.\n * @group Props\n */\n ariaLabel;\n static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: \"12.0.0\", version: \"18.0.1\", ngImport: i0, type: ProgressSpinner, deps: [], target: i0.ɵɵFactoryTarget.Component });\n static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: \"14.0.0\", version: \"18.0.1\", type: ProgressSpinner, selector: \"p-progressSpinner\", inputs: { styleClass: \"styleClass\", style: \"style\", strokeWidth: \"strokeWidth\", fill: \"fill\", animationDuration: \"animationDuration\", ariaLabel: \"ariaLabel\" }, host: { classAttribute: \"p-element\" }, ngImport: i0, template: `\n <div class=\"p-progress-spinner\" [ngStyle]=\"style\" [ngClass]=\"styleClass\" role=\"progressbar\" [attr.aria-label]=\"ariaLabel\" [attr.aria-busy]=\"true\" [attr.data-pc-name]=\"'progressspinner'\" [attr.data-pc-section]=\"'root'\">\n <svg class=\"p-progress-spinner-svg\" viewBox=\"25 25 50 50\" [style.animation-duration]=\"animationDuration\" [attr.data-pc-section]=\"'root'\">\n <circle class=\"p-progress-spinner-circle\" cx=\"50\" cy=\"50\" r=\"20\" [attr.fill]=\"fill\" [attr.stroke-width]=\"strokeWidth\" stroke-miterlimit=\"10\" />\n </svg>\n </div>\n `, isInline: true, styles: [\"@layer primeng{.p-progress-spinner{position:relative;margin:0 auto;width:100px;height:100px;display:inline-block}.p-progress-spinner:before{content:\\\"\\\";display:block;padding-top:100%}.p-progress-spinner-svg{animation:p-progress-spinner-rotate 2s linear infinite;height:100%;transform-origin:center center;width:100%;position:absolute;inset:0;margin:auto}.p-progress-spinner-circle{stroke-dasharray:89,200;stroke-dashoffset:0;stroke:#d62d20;animation:p-progress-spinner-dash 1.5s ease-in-out infinite,p-progress-spinner-color 6s ease-in-out infinite;stroke-linecap:round}}@keyframes p-progress-spinner-rotate{to{transform:rotate(360deg)}}@keyframes p-progress-spinner-dash{0%{stroke-dasharray:1,200;stroke-dashoffset:0}50%{stroke-dasharray:89,200;stroke-dashoffset:-35px}to{stroke-dasharray:89,200;stroke-dashoffset:-124px}}@keyframes p-progress-spinner-color{to,0%{stroke:#d62d20}40%{stroke:#0057e7}66%{stroke:#008744}80%,90%{stroke:#ffa700}}\\n\"], dependencies: [{ kind: \"directive\", type: i1.NgClass, selector: \"[ngClass]\", inputs: [\"class\", \"ngClass\"] }, { kind: \"directive\", type: i1.NgStyle, selector: \"[ngStyle]\", inputs: [\"ngStyle\"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush, encapsulation: i0.ViewEncapsulation.None });\n}\ni0.ɵɵngDeclareClassMetadata({ minVersion: \"12.0.0\", version: \"18.0.1\", ngImport: i0, type: ProgressSpinner, decorators: [{\n type: Component,\n args: [{ selector: 'p-progressSpinner', template: `\n <div class=\"p-progress-spinner\" [ngStyle]=\"style\" [ngClass]=\"styleClass\" role=\"progressbar\" [attr.aria-label]=\"ariaLabel\" [attr.aria-busy]=\"true\" [attr.data-pc-name]=\"'progressspinner'\" [attr.data-pc-section]=\"'root'\">\n <svg class=\"p-progress-spinner-svg\" viewBox=\"25 25 50 50\" [style.animation-duration]=\"animationDuration\" [attr.data-pc-section]=\"'root'\">\n <circle class=\"p-progress-spinner-circle\" cx=\"50\" cy=\"50\" r=\"20\" [attr.fill]=\"fill\" [attr.stroke-width]=\"strokeWidth\" stroke-miterlimit=\"10\" />\n </svg>\n </div>\n `, changeDetection: ChangeDetectionStrategy.OnPush, encapsulation: ViewEncapsulation.None, host: {\n class: 'p-element'\n }, styles: [\"@layer primeng{.p-progress-spinner{position:relative;margin:0 auto;width:100px;height:100px;display:inline-block}.p-progress-spinner:before{content:\\\"\\\";display:block;padding-top:100%}.p-progress-spinner-svg{animation:p-progress-spinner-rotate 2s linear infinite;height:100%;transform-origin:center center;width:100%;position:absolute;inset:0;margin:auto}.p-progress-spinner-circle{stroke-dasharray:89,200;stroke-dashoffset:0;stroke:#d62d20;animation:p-progress-spinner-dash 1.5s ease-in-out infinite,p-progress-spinner-color 6s ease-in-out infinite;stroke-linecap:round}}@keyframes p-progress-spinner-rotate{to{transform:rotate(360deg)}}@keyframes p-progress-spinner-dash{0%{stroke-dasharray:1,200;stroke-dashoffset:0}50%{stroke-dasharray:89,200;stroke-dashoffset:-35px}to{stroke-dasharray:89,200;stroke-dashoffset:-124px}}@keyframes p-progress-spinner-color{to,0%{stroke:#d62d20}40%{stroke:#0057e7}66%{stroke:#008744}80%,90%{stroke:#ffa700}}\\n\"] }]\n }], propDecorators: { styleClass: [{\n type: Input\n }], style: [{\n type: Input\n }], strokeWidth: [{\n type: Input\n }], fill: [{\n type: Input\n }], animationDuration: [{\n type: Input\n }], ariaLabel: [{\n type: Input\n }] } });\nclass ProgressSpinnerModule {\n static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: \"12.0.0\", version: \"18.0.1\", ngImport: i0, type: ProgressSpinnerModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule });\n static ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: \"14.0.0\", version: \"18.0.1\", ngImport: i0, type: ProgressSpinnerModule, declarations: [ProgressSpinner], imports: [CommonModule], exports: [ProgressSpinner] });\n static ɵinj = i0.ɵɵngDeclareInjector({ minVersion: \"12.0.0\", version: \"18.0.1\", ngImport: i0, type: ProgressSpinnerModule, imports: [CommonModule] });\n}\ni0.ɵɵngDeclareClassMetadata({ minVersion: \"12.0.0\", version: \"18.0.1\", ngImport: i0, type: ProgressSpinnerModule, decorators: [{\n type: NgModule,\n args: [{\n imports: [CommonModule],\n exports: [ProgressSpinner],\n declarations: [ProgressSpinner]\n }]\n }] });\n\n/**\n * Generated bundle index. Do not edit.\n */\n\nexport { ProgressSpinner, ProgressSpinnerModule };\n//# sourceMappingURL=primeng-progressspinner.mjs.map\n","import {Component} from '@angular/core';\nimport {DialogService, DynamicDialogConfig, DynamicDialogRef} from 'primeng/dynamicdialog';\nimport {BehaviorSubject} from 'rxjs';\nimport {Logger} from '@bitblit/ratchet-common/logger/logger';\nimport {AsyncPipe, NgIf} from \"@angular/common\";\nimport {ProgressSpinnerModule} from \"primeng/progressspinner\";\n\n@Component({\n selector: 'ngx-acute-common-block-ui',\n templateUrl: './block-ui.component.html',\n standalone: true,\n imports: [NgIf, AsyncPipe, ProgressSpinnerModule]\n})\nexport class BlockUiComponent {\n constructor(\n private dialogService: DialogService,\n public cfg: DynamicDialogConfig,\n ) {}\n\n public static createUiBlock(\n dialogService: DialogService,\n message: BehaviorSubject<string> | string = 'Please wait...',\n subMessage?: string,\n ): DynamicDialogRef {\n const dlg: DynamicDialogRef = dialogService.open(BlockUiComponent, {\n closable: false,\n modal: true,\n data: {\n message: message instanceof BehaviorSubject ? message : new BehaviorSubject<string>(message),\n subMessage: subMessage,\n },\n });\n return dlg;\n }\n\n public static async runPromiseWithUiBlock<T>(\n dialogService: DialogService,\n prom: Promise<T>,\n message: BehaviorSubject<string> | string = 'Please wait...',\n subMessage?: string,\n ): Promise<T> {\n const dlg = dialogService.open(BlockUiComponent, {\n closable: false,\n modal: true,\n data: {\n message: message instanceof BehaviorSubject ? message : new BehaviorSubject<string>(message),\n subMessage: subMessage,\n },\n });\n\n try {\n const rval: T = await prom;\n dlg?.close(rval); // If it is still open, close it\n Logger.info('Blockui - Received %j - closing blocker ui and returning', rval);\n return rval;\n } catch (err) {\n Logger.error('Caught error inside block ui dialog : %s - rethrowing', err, err);\n dlg?.close(); // If it is still open, close it\n throw err;\n }\n }\n}\n","import { Pipe, PipeTransform } from '@angular/core';\n\n@Pipe({ name: 'acuteCapitalize' , standalone: true})\nexport class CapitalizePipe implements PipeTransform {\n\n transform(input: string): string {\n return input && input.length\n ? (input.charAt(0).toUpperCase() + input.slice(1).toLowerCase())\n : input;\n }\n}\n","export class CurrencyRatchet {\n constructor() { }\n static centToDollarFormat(cents, fractionDigits = 2) {\n return CurrencyRatchet.dollarFormat(cents / 100);\n }\n static dollarFormat(dollars, fractionDigits = 2) {\n const rval = dollars === null || dollars === undefined\n ? 'Null'\n : '$' + dollars.toLocaleString('en-US', { minimumFractionDigits: fractionDigits, maximumFractionDigits: fractionDigits });\n return rval;\n }\n static dollarFormatNumberRange(range) {\n let rval = 'N/A';\n if (range) {\n rval = range.low ? CurrencyRatchet.dollarFormat(range.low) : ' ^ ';\n rval += ' - ';\n rval += range.high ? CurrencyRatchet.dollarFormat(range.high) : ' ^ ';\n }\n return rval;\n }\n}\n//# sourceMappingURL=currency-ratchet.js.map","import { Pipe, PipeTransform } from '@angular/core';\nimport {CurrencyRatchet} from \"@bitblit/ratchet-common/lang/currency-ratchet\";\n\n@Pipe({ name: 'acuteDollars', standalone: true })\nexport class DollarFormattedPipe implements PipeTransform {\n transform(input: number): string {\n const rval: string =\n input === null || input === undefined\n ? 'Null'\n : CurrencyRatchet.dollarFormat(input)\n return rval;\n }\n}\n","import { Pipe, PipeTransform } from '@angular/core';\nimport { Logger } from '@bitblit/ratchet-common/logger/logger';\n\n@Pipe({ name: 'acuteMapValues', standalone: true })\nexport class MapValuesPipe implements PipeTransform {\n transform(value: any, args?: any[]): any[] {\n const returnArray = [];\n\n for (const k of Object.keys(value)) {\n returnArray.push({\n key: k,\n val: value[k],\n });\n }\n\n Logger.info('Map values : %j : %j', returnArray, args);\n return returnArray;\n }\n}\n","import { Pipe, PipeTransform } from '@angular/core';\n\n@Pipe({ name: 'acuteNumberWithCommas' , standalone: true})\nexport class NumberWithCommasPipe implements PipeTransform {\n\n transform(input: number): string {\n return new Intl.NumberFormat().format(input);\n }\n}\n","import { Pipe, PipeTransform } from '@angular/core';\n\n@Pipe({ name: 'acuteOrderBy', pure: false, standalone: true })\nexport class OrderByPipe implements PipeTransform {\n static _orderByComparator(a: any, b: any): number {\n if (isNaN(parseFloat(a)) || !isFinite(a) || isNaN(parseFloat(b)) || !isFinite(b)) {\n //Isn't a number so lowercase the string to properly compare\n if (String(a).toLowerCase() < String(b).toLowerCase()) return -1;\n if (String(a).toLowerCase() > String(b).toLowerCase()) return 1;\n } else {\n //Parse strings as numbers to compare properly\n if (parseFloat(a) < parseFloat(b)) return -1;\n if (parseFloat(a) > parseFloat(b)) return 1;\n }\n\n return 0; //equal each other\n }\n\n transform(input: any, [config = '+']): any {\n if (!Array.isArray(input)) return input;\n\n if (!Array.isArray(config) || (Array.isArray(config) && config.length == 1)) {\n const propertyToCheck: string = !Array.isArray(config) ? config : config[0];\n const desc = propertyToCheck.substr(0, 1) == '-';\n\n //Basic array\n if (!propertyToCheck || propertyToCheck == '-' || propertyToCheck == '+') {\n return !desc ? input.sort() : input.sort().reverse();\n } else {\n const property: string =\n propertyToCheck.substr(0, 1) == '+' || propertyToCheck.substr(0, 1) == '-' ? propertyToCheck.substr(1) : propertyToCheck;\n\n return input.sort(function (a: any, b: any) {\n return !desc\n ? OrderByPipe._orderByComparator(a[property], b[property])\n : -OrderByPipe._orderByComparator(a[property], b[property]);\n });\n }\n } else {\n //Loop over property of the array in order and sort\n return input.sort(function (a: any, b: any) {\n for (let i: number = 0; i < config.length; i++) {\n const desc = config[i].substr(0, 1) == '-';\n const property = config[i].substr(0, 1) == '+' || config[i].substr(0, 1) == '-' ? config[i].substr(1) : config[i];\n\n const comparison = !desc\n ? OrderByPipe._orderByComparator(a[property], b[property])\n : -OrderByPipe._orderByComparator(a[property], b[property]);\n\n //Don't return 0 yet in case of needing to sort by next property\n if (comparison != 0) return comparison;\n }\n\n return 0; //equal each other\n });\n }\n }\n}\n","import { Logger } from '../logger/logger.js';\nimport { RequireRatchet } from './require-ratchet.js';\nexport class NumberRatchet {\n static MAX_LEADING_ZEROS_FORMAT_LENGTH = 1000;\n static DEFAULT_SAFE_NUMBER_OPTIONS = {\n ifNotNumber: null,\n returnValueForNull: null,\n returnValueForUndefined: null,\n preParseCharacterMapping: { ',': '' },\n };\n static toFixedDecimalNumber(input, placesAfterPoint) {\n const v = NumberRatchet.safeNumber(input);\n return v === null || v === undefined ? v : NumberRatchet.safeNumber(v.toFixed(placesAfterPoint));\n }\n static leadingZeros(val, size) {\n const sVal = String(val);\n if (sVal.length < size) {\n let pad = '0000';\n if (size > NumberRatchet.MAX_LEADING_ZEROS_FORMAT_LENGTH) {\n throw 'Cannot format number that large (max length is ' + NumberRatchet.MAX_LEADING_ZEROS_FORMAT_LENGTH + ')';\n }\n while (pad.length < size) {\n pad = pad + pad;\n }\n return (pad + sVal).slice(-1 * size);\n }\n else {\n return sVal;\n }\n }\n static between(inTest, inP1, inP2) {\n const test = NumberRatchet.safeNumber(inTest);\n const p1 = NumberRatchet.safeNumber(inP1);\n const p2 = NumberRatchet.safeNumber(inP2);\n return (test >= p1 && test <= p2) || (test >= p2 && test <= p1);\n }\n static safeNumber(input, ifNotNumber = null, useDefaultForNullAndUndefined) {\n const opts = {\n ifNotNumber: ifNotNumber,\n returnValueForNull: useDefaultForNullAndUndefined ? ifNotNumber : null,\n returnValueForUndefined: useDefaultForNullAndUndefined ? ifNotNumber : undefined,\n };\n if (useDefaultForNullAndUndefined === undefined) {\n opts.returnValueForUndefined = null;\n }\n return NumberRatchet.safeNumberOpt(input, opts);\n }\n static safeNumberOpt(input, optionPart) {\n let rval = undefined;\n const opts = Object.assign({}, NumberRatchet.DEFAULT_SAFE_NUMBER_OPTIONS, optionPart || {});\n if (input === null) {\n rval = opts.returnValueForNull;\n }\n else if (input === undefined) {\n rval = opts.returnValueForUndefined;\n }\n else {\n const type = typeof input;\n if (type == 'number') {\n rval = input;\n }\n else if (type == 'string') {\n let test = input.trim();\n if (test.length === 0) {\n rval = opts.ifNotNumber;\n }\n else {\n if (opts.preParseCharacterMapping && Object.keys(opts.preParseCharacterMapping).length > 0) {\n let t2 = '';\n for (let i = 0; i < test.length; i++) {\n const cr = test.charAt(i);\n t2 += opts.preParseCharacterMapping[cr] === undefined ? cr : opts.preParseCharacterMapping[cr];\n }\n test = t2;\n }\n rval = Number.parseFloat(test);\n }\n }\n else {\n Logger.warn('Value is of type %s, returning default', type);\n rval = opts.ifNotNumber;\n }\n if (isNaN(rval)) {\n Logger.debug('Parsed string to NaN - using NaN value from param');\n rval = opts.ifNotNumber;\n }\n }\n return rval;\n }\n static numberCSVToList(inputCSV) {\n let rval = null;\n if (inputCSV) {\n rval = inputCSV.split(',').map((s) => {\n return NumberRatchet.safeNumber(s.trim());\n });\n rval = rval.filter((r) => typeof r === 'number' && !isNaN(r));\n }\n return rval;\n }\n static fitToWindow(val, b1, b2) {\n let rval = val;\n if (val === null || b1 === null || b2 === null || b1 < 0 || b2 < 0 || val < 0) {\n throw new Error('All values must be non-null and larger than 0');\n }\n const low = Math.min(b1, b2);\n const high = Math.max(b1, b2);\n const windowSize = high - low;\n if (high === low) {\n rval = high;\n }\n else {\n while (rval < low) {\n rval += windowSize;\n }\n while (rval > high) {\n rval -= windowSize;\n }\n }\n return rval;\n }\n static groupNumbersIntoContiguousRanges(inputData, minRangeSize = 3) {\n RequireRatchet.notNullOrUndefined(inputData);\n const input = Object.assign([], inputData);\n input.sort((a, b) => a - b);\n const singles = [];\n const ranges = [];\n let start = 0;\n for (let i = 1; i < input.length; i++) {\n if (input[i] === input[i - 1] + 1) {\n }\n else {\n if (start === i - 1) {\n singles.push(input[i - 1]);\n }\n else {\n const rangeSize = i - start;\n if (rangeSize < minRangeSize) {\n for (let j = start; j < i; j++) {\n singles.push(input[j]);\n }\n }\n else {\n ranges.push({\n min: input[start],\n max: input[i - 1],\n });\n }\n }\n start = i;\n }\n }\n return {\n singles: singles,\n ranges: ranges,\n };\n }\n static distributeItemsEvenly(items, buckets) {\n RequireRatchet.notNullOrUndefined(items, 'items');\n RequireRatchet.notNullOrUndefined(buckets, 'buckets');\n RequireRatchet.true(items > 0 && items === Math.floor(items), 'Items integer larger than 0');\n RequireRatchet.true(buckets > 0 && buckets === Math.floor(buckets), 'Buckets integer larger than 0');\n const offset = buckets / items;\n const rval = [];\n for (let i = 0; i < buckets; i++) {\n rval.push(0);\n }\n let loc = 0;\n let rem = items;\n while (rem > 0) {\n rval[Math.floor(loc) % buckets]++;\n rem--;\n loc += offset;\n }\n return rval;\n }\n static createRange(minInclusive, maxExclusive, step = 1) {\n const rval = [];\n let val = minInclusive;\n while (val < maxExclusive) {\n rval.push(val);\n val += step;\n }\n return rval;\n }\n static percentFormatNumberRange(range) {\n let rval = 'N/A';\n if (range) {\n rval = range.low ? NumberRatchet.pctFormatted(range.low) : ' ^ ';\n rval += ' - ';\n rval += range.high ? NumberRatchet.pctFormatted(range.high) : ' ^ ';\n }\n return rval;\n }\n static pctFormatted(pct, fractionDigits = 2) {\n const rval = pct === null || pct === undefined\n ? 'Null'\n : pct.toLocaleString('en-US', { minimumFractionDigits: fractionDigits, maximumFractionDigits: fractionDigits }) + '%';\n return rval;\n }\n}\n//# sourceMappingURL=number-ratchet.js.map","import { Pipe, PipeTransform } from '@angular/core';\nimport {NumberRatchet} from \"@bitblit/ratchet-common/lang/number-ratchet\";\n\n@Pipe({ name: 'acutePercent' , standalone: true })\nexport class PercentFormattedPipe implements PipeTransform {\n transform(input: number): string {\n return NumberRatchet.pctFormatted(input);\n }\n}\n","import { Pipe, PipeTransform } from '@angular/core';\n\n@Pipe({ name: 'acutePlural' , standalone: true})\nexport class PluralPipe implements PipeTransform {\n\n transform(input: number, label: string, pluralLabel: string = ''): string {\n input = input || 0;\n return input === 1\n ? `${input} ${label}`\n : pluralLabel\n ? `${input} ${pluralLabel}`\n : `${input} ${label}s`;\n }\n}\n","import { Pipe, PipeTransform } from '@angular/core';\n\n@Pipe({ name: 'acuteRound' , standalone: true})\nexport class RoundPipe implements PipeTransform {\n\n transform(input: number): number {\n return Math.round(input);\n }\n}\n","// these aren't really private, but nor are they really useful to document\n\n/**\n * @private\n */\nclass LuxonError extends Error {}\n\n/**\n * @private\n */\nexport class InvalidDateTimeError extends LuxonError {\n constructor(reason) {\n super(`Invalid DateTime: ${reason.toMessage()}`);\n }\n}\n\n/**\n * @private\n */\nexport class InvalidIntervalError extends LuxonError {\n constructor(reason) {\n super(`Invalid Interval: ${reason.toMessage()}`);\n }\n}\n\n/**\n * @private\n */\nexport class InvalidDurationError extends LuxonError {\n constructor(reason) {\n super(`Invalid Duration: ${reason.toMessage()}`);\n }\n}\n\n/**\n * @private\n */\nexport class ConflictingSpecificationError extends LuxonError {}\n\n/**\n * @private\n */\nexport class InvalidUnitError extends LuxonError {\n constructor(unit) {\n super(`Invalid unit ${unit}`);\n }\n}\n\n/**\n * @private\n */\nexport class InvalidArgumentError extends LuxonError {}\n\n/**\n * @private\n */\nexport class ZoneIsAbstractError extends LuxonError {\n constructor() {\n super(\"Zone is an abstract class\");\n }\n}\n","/**\n * @private\n */\n\nconst n = \"numeric\",\n s = \"short\",\n l = \"long\";\n\nexport const DATE_SHORT = {\n year: n,\n month: n,\n day: n,\n};\n\nexport const DATE_MED = {\n year: n,\n month: s,\n day: n,\n};\n\nexport const DATE_MED_WITH_WEEKDAY = {\n year: n,\n month: s,\n day: n,\n weekday: s,\n};\n\nexport const DATE_FULL = {\n year: n,\n month: l,\n day: n,\n};\n\nexport const DATE_HUGE = {\n year: n,\n month: l,\n day: n,\n weekday: l,\n};\n\nexport const TIME_SIMPLE = {\n hour: n,\n minute: n,\n};\n\nexport const TIME_WITH_SECONDS = {\n hour: n,\n minute: n,\n second: n,\n};\n\nexport const TIME_WITH_SHORT_OFFSET = {\n hour: n,\n minute: n,\n second: n,\n timeZoneName: s,\n};\n\nexport const TIME_WITH_LONG_OFFSET = {\n hour: n,\n minute: n,\n second: n,\n timeZoneName: l,\n};\n\nexport const TIME_24_SIMPLE = {\n hour: n,\n minute: n,\n hourCycle: \"h23\",\n};\n\nexport const TIME_24_WITH_SECONDS = {\n hour: n,\n minute: n,\n second: n,\n hourCycle: \"h23\",\n};\n\nexport const TIME_24_WITH_SHORT_OFFSET = {\n hour: n,\n minute: n,\n second: n,\n hourCycle: \"h23\",\n timeZoneName: s,\n};\n\nexport const TIME_24_WITH_LONG_OFFSET = {\n hour: n,\n minute: n,\n second: n,\n hourCycle: \"h23\",\n timeZoneName: l,\n};\n\nexport const DATETIME_SHORT = {\n year: n,\n month: n,\n day: n,\n hour: n,\n minute: n,\n};\n\nexport const DATETIME_SHORT_WITH_SECONDS = {\n year: n,\n month: n,\n day: n,\n hour: n,\n minute: n,\n second: n,\n};\n\nexport const DATETIME_MED = {\n year: n,\n month: s,\n day: n,\n hour: n,\n minute: n,\n};\n\nexport const DATETIME_MED_WITH_SECONDS = {\n year: n,\n month: s,\n day: n,\n hour: n,\n minute: n,\n second: n,\n};\n\nexport const DATETIME_MED_WITH_WEEKDAY = {\n year: n,\n month: s,\n day: n,\n weekday: s,\n hour: n,\n minute: n,\n};\n\nexport const DATETIME_FULL = {\n year: n,\n month: l,\n day: n,\n hour: n,\n minute: n,\n timeZoneName: s,\n};\n\nexport const DATETIME_FULL_WITH_SECONDS = {\n year: n,\n month: l,\n day: n,\n hour: n,\n minute: n,\n second: n,\n timeZoneName: s,\n};\n\nexport const DATETIME_HUGE = {\n year: n,\n month: l,\n day: n,\n weekday: l,\n hour: n,\n minute: n,\n timeZoneName: l,\n};\n\nexport const DATETIME_HUGE_WITH_SECONDS = {\n year: n,\n month: l,\n day: n,\n weekday: l,\n hour: n,\n minute: n,\n second: n,\n timeZoneName: l,\n};\n","import { ZoneIsAbstractError } from \"./errors.js\";\n\n/**\n * @interface\n */\nexport default class Zone {\n /**\n * The type of zone\n * @abstract\n * @type {string}\n */\n get type() {\n throw new ZoneIsAbstractError();\n }\n\n /**\n * The name of this zone.\n * @abstract\n * @type {string}\n */\n get name() {\n throw new ZoneIsAbstractError();\n }\n\n /**\n * The IANA name of this zone.\n * Defaults to `name` if not overwritten by a subclass.\n * @abstract\n * @type {string}\n */\n get ianaName() {\n return this.name;\n }\n\n /**\n * Returns whether the offset is known to be fixed for the whole year.\n * @abstract\n * @type {boolean}\n */\n get isUniversal() {\n throw new ZoneIsAbstractError();\n }\n\n /**\n * Returns the offset's common name (such as EST) at the specified timestamp\n * @abstract\n * @param {number} ts - Epoch milliseconds for which to get the name\n * @param {Object} opts - Options to affect the format\n * @param {string} opts.format - What style of offset to return. Accepts 'long' or 'short'.\n * @param {string} opts.locale - What locale to return the offset name in.\n * @return {string}\n */\n offsetName(ts, opts) {\n throw new ZoneIsAbstractError();\n }\n\n /**\n * Returns the offset's value as a string\n * @abstract\n * @param {number} ts - Epoch milliseconds for which to get the offset\n * @param {string} format - What style of offset to return.\n * Accepts 'narrow', 'short', or 'techie'. Returning '+6', '+06:00', or '+0600' respectively\n * @return {string}\n */\n formatOffset(ts, format) {\n throw new ZoneIsAbstractError();\n }\n\n /**\n * Return the offset in minutes for this zone at the specified timestamp.\n * @abstract\n * @param {number} ts - Epoch milliseconds for which to compute the offset\n * @return {number}\n */\n offset(ts) {\n throw new ZoneIsAbstractError();\n }\n\n /**\n * Return whether this Zone is equal to another zone\n * @abstract\n * @param {Zone} otherZone - the zone to compare\n * @return {boolean}\n */\n equals(otherZone) {\n throw new ZoneIsAbstractError();\n }\n\n /**\n * Return whether this Zone is valid.\n * @abstract\n * @type {boolean}\n */\n get isValid() {\n throw new ZoneIsAbstractError();\n }\n}\n","import { formatOffset, parseZoneInfo } from \"../impl/util.js\";\nimport Zone from \"../zone.js\";\n\nlet singleton = null;\n\n/**\n * Represents the local zone for this JavaScript environment.\n * @implements {Zone}\n */\nexport default class SystemZone extends Zone {\n /**\n * Get a singleton instance of the local zone\n * @return {SystemZone}\n */\n static get instance() {\n if (singleton === null) {\n singleton = new SystemZone();\n }\n return singleton;\n }\n\n /** @override **/\n get type() {\n return \"system\";\n }\n\n /** @override **/\n get name() {\n return new Intl.DateTimeFormat().resolvedOptions().timeZone;\n }\n\n /** @override **/\n get isUniversal() {\n return false;\n }\n\n /** @override **/\n offsetName(ts, { format, locale }) {\n return parseZoneInfo(ts, format, locale);\n }\n\n /** @override **/\n formatOffset(ts, format) {\n return formatOffset(this.offset(ts), format);\n }\n\n /** @override **/\n offset(ts) {\n return -new Date(ts).getTimezoneOffset();\n }\n\n /** @override **/\n equals(otherZone) {\n return otherZone.type === \"system\";\n }\n\n /** @override **/\n get isValid() {\n return true;\n }\n}\n","import { formatOffset, parseZoneInfo, isUndefined, objToLocalTS } from \"../impl/util.js\";\nimport Zone from \"../zone.js\";\n\nlet dtfCache = {};\nfunction makeDTF(zone) {\n if (!dtfCache[zone]) {\n dtfCache[zone] = new Intl.DateTimeFormat(\"en-US\", {\n hour12: false,\n timeZone: zone,\n year: \"numeric\",\n month: \"2-digit\",\n day: \"2-digit\",\n hour: \"2-digit\",\n minute: \"2-digit\",\n second: \"2-digit\",\n era: \"short\",\n });\n }\n return dtfCache[zone];\n}\n\nconst typeToPos = {\n year: 0,\n month: 1,\n day: 2,\n era: 3,\n hour: 4,\n minute: 5,\n second: 6,\n};\n\nfunction hackyOffset(dtf, date) {\n const formatted = dtf.format(date).replace(/\\u200E/g, \"\"),\n parsed = /(\\d+)\\/(\\d+)\\/(\\d+) (AD|BC),? (\\d+):(\\d+):(\\d+)/.exec(formatted),\n [, fMonth, fDay, fYear, fadOrBc, fHour, fMinute, fSecond] = parsed;\n return [fYear, fMonth, fDay, fadOrBc, fHour, fMinute, fSecond];\n}\n\nfunction partsOffset(dtf, date) {\n const formatted = dtf.formatToParts(date);\n const filled = [];\n for (let i = 0; i < formatted.length; i++) {\n const { type, value } = formatted[i];\n const pos = typeToPos[type];\n\n if (type === \"era\") {\n filled[pos] = value;\n } else if (!isUndefined(pos)) {\n filled[pos] = parseInt(value, 10);\n }\n }\n return filled;\n}\n\nlet ianaZoneCache = {};\n/**\n * A zone identified by an IANA identifier, like America/New_York\n * @implements {Zone}\n */\nexport default class IANAZone extends Zone {\n /**\n * @param {string} name - Zone name\n * @return {IANAZone}\n */\n static create(name) {\n if (!ianaZoneCache[name]) {\n ianaZoneCache[name] = new IANAZone(name);\n }\n return ianaZoneCache[name];\n }\n\n /**\n * Reset local caches. Should only be necessary in testing scenarios.\n * @return {void}\n */\n static resetCache() {\n ianaZoneCache = {};\n dtfCache = {};\n }\n\n /**\n * Returns whether the provided string is a valid specifier. This only checks the string's format, not that the specifier identifies a known zone; see isValidZone for that.\n * @param {string} s - The string to check validity on\n * @example IANAZone.isValidSpecifier(\"America/New_York\") //=> true\n * @example IANAZone.isValidSpecifier(\"Sport~~blorp\") //=> false\n * @deprecated For backward compatibility, this forwards to isValidZone, better use `isValidZone()` directly instead.\n * @return {boolean}\n */\n static isValidSpecifier(s) {\n return this.isValidZone(s);\n }\n\n /**\n * Returns whether the provided string identifies a real zone\n * @param {string} zone - The string to check\n * @example IANAZone.isValidZone(\"America/New_York\") //=> true\n * @example IANAZone.isValidZone(\"Fantasia/Castle\") //=> false\n * @example IANAZone.isValidZone(\"Sport~~blorp\") //=> false\n * @return {boolean}\n */\n static isValidZone(zone) {\n if (!zone) {\n return false;\n }\n try {\n new Intl.DateTimeFormat(\"en-US\", { timeZone: zone }).format();\n return true;\n } catch (e) {\n return false;\n }\n }\n\n constructor(name) {\n super();\n /** @private **/\n this.zoneName = name;\n /** @private **/\n this.valid = IANAZone.isValidZone(name);\n }\n\n /**\n * The type of zone. `iana` for all instances of `IANAZone`.\n * @override\n * @type {string}\n */\n get type() {\n return \"iana\";\n }\n\n /**\n * The name of this zone (i.e. the IANA zone name).\n * @override\n * @type {string}\n */\n get name() {\n return this.zoneName;\n }\n\n /**\n * Returns whether the offset is known to be fixed for the whole year:\n * Always returns false for all IANA zones.\n * @override\n * @type {boolean}\n */\n get isUniversal() {\n return false;\n }\n\n /**\n * Returns the offset's common name (such as EST) at the specified timestamp\n * @override\n * @param {number} ts - Epoch milliseconds for which to get the name\n * @param {Object} opts - Options to affect the format\n * @param {string} opts.format - What style of offset to return. Accepts 'long' or 'short'.\n * @param {string} opts.locale - What locale to return the offset name in.\n * @return {string}\n */\n offsetName(ts, { format, locale }) {\n return parseZoneInfo(ts, format, locale, this.name);\n }\n\n /**\n * Returns the offset's value as a string\n * @override\n * @param {number} ts - Epoch milliseconds for which to get the offset\n * @param {string} format - What style of offset to return.\n * Accepts 'narrow', 'short', or 'techie'. Returning '+6', '+06:00', or '+0600' respectively\n * @return {string}\n */\n formatOffset(ts, format) {\n return formatOffset(this.offset(ts), format);\n }\n\n /**\n * Return the offset in minutes for this zone at the specified timestamp.\n * @override\n * @param {number} ts - Epoch milliseconds for which to compute the offset\n * @return {number}\n */\n offset(ts) {\n const date = new Date(ts);\n\n if (isNaN(date)) return NaN;\n\n const dtf = makeDTF(this.name);\n let [year, month, day, adOrBc, hour, minute, second] = dtf.formatToParts\n ? partsOffset(dtf, date)\n : hackyOffset(dtf, date);\n\n if (adOrBc === \"BC\") {\n year = -Math.abs(year) + 1;\n }\n\n // because we're using hour12 and https://bugs.chromium.org/p/chromium/issues/detail?id=1025564&can=2&q=%2224%3A00%22%20datetimeformat\n const adjustedHour = hour === 24 ? 0 : hour;\n\n const asUTC = objToLocalTS({\n year,\n month,\n day,\n hour: adjustedHour,\n minute,\n second,\n millisecond: 0,\n });\n\n let asTS = +date;\n const over = asTS % 1000;\n asTS -= over >= 0 ? over : 1000 + over;\n return (asUTC - asTS) / (60 * 1000);\n }\n\n /**\n * Return whether this Zone is equal to another zone\n * @override\n * @param {Zone} otherZone - the zone to compare\n * @return {boolean}\n */\n equals(otherZone) {\n return otherZone.type === \"iana\" && otherZone.name === this.name;\n }\n\n /**\n * Return whether this Zone is valid.\n * @override\n * @type {boolean}\n */\n get isValid() {\n return this.valid;\n }\n}\n","import { hasLocaleWeekInfo, hasRelative, padStart, roundTo, validateWeekSettings } from \"./util.js\";\nimport * as English from \"./english.js\";\nimport Settings from \"../settings.js\";\nimport DateTime from \"../datetime.js\";\nimport IANAZone from \"../zones/IANAZone.js\";\n\n// todo - remap caching\n\nlet intlLFCache = {};\nfunction getCachedLF(locString, opts = {}) {\n const key = JSON.stringify([locString, opts]);\n let dtf = intlLFCache[key];\n if (!dtf) {\n dtf = new Intl.ListFormat(locString, opts);\n intlLFCache[key] = dtf;\n }\n return dtf;\n}\n\nlet intlDTCache = {};\nfunction getCachedDTF(locString, opts = {}) {\n const key = JSON.stringify([locString, opts]);\n let dtf = intlDTCache[key];\n if (!dtf) {\n dtf = new Intl.DateTimeFormat(locString, opts);\n intlDTCache[key] = dtf;\n }\n return dtf;\n}\n\nlet intlNumCache = {};\nfunction getCachedINF(locString, opts = {}) {\n const key = JSON.stringify([locString, opts]);\n let inf = intlNumCache[key];\n if (!inf) {\n inf = new Intl.NumberFormat(locString, opts);\n intlNumCache[key] = inf;\n }\n return inf;\n}\n\nlet intlRelCache = {};\nfunction getCachedRTF(locString, opts = {}) {\n const { base, ...cacheKeyOpts } = opts; // exclude `base` from the options\n const key = JSON.stringify([locString, cacheKeyOpts]);\n let inf = intlRelCache[key];\n if (!inf) {\n inf = new Intl.RelativeTimeFormat(locString, opts);\n intlRelCache[key] = inf;\n }\n return inf;\n}\n\nlet sysLocaleCache = null;\nfunction systemLocale() {\n if (sysLocaleCache) {\n return sysLocaleCache;\n } else {\n sysLocaleCache = new Intl.DateTimeFormat().resolvedOptions().locale;\n return sysLocaleCache;\n }\n}\n\nlet weekInfoCache = {};\nfunction getCachedWeekInfo(locString) {\n let data = weekInfoCache[locString];\n if (!data) {\n const locale = new Intl.Locale(locString);\n // browsers currently implement this as a property, but spec says it should be a getter function\n data = \"getWeekInfo\" in locale ? locale.getWeekInfo() : locale.weekInfo;\n weekInfoCache[locString] = data;\n }\n return data;\n}\n\nfunction parseLocaleString(localeStr) {\n // I really want to avoid writing a BCP 47 parser\n // see, e.g. https://github.com/wooorm/bcp-47\n // Instead, we'll do this:\n\n // a) if the string has no -u extensions, just leave it alone\n // b) if it does, use Intl to resolve everything\n // c) if Intl fails, try again without the -u\n\n // private subtags and unicode subtags have ordering requirements,\n // and we're not properly parsing this, so just strip out the\n // private ones if they exist.\n const xIndex = localeStr.indexOf(\"-x-\");\n if (xIndex !== -1) {\n localeStr = localeStr.substring(0, xIndex);\n }\n\n const uIndex = localeStr.indexOf(\"-u-\");\n if (uIndex === -1) {\n return [localeStr];\n } else {\n let options;\n let selectedStr;\n try {\n options = getCachedDTF(localeStr).resolvedOptions();\n selectedStr = localeStr;\n } catch (e) {\n const smaller = localeStr.substring(0, uIndex);\n options = getCachedDTF(smaller).resolvedOptions();\n selectedStr = smaller;\n }\n\n const { numberingSystem, calendar } = options;\n return [selectedStr, numberingSystem, calendar];\n }\n}\n\nfunction intlConfigString(localeStr, numberingSystem, outputCalendar) {\n if (outputCalendar || numberingSystem) {\n if (!localeStr.includes(\"-u-\")) {\n localeStr += \"-u\";\n }\n\n if (outputCalendar) {\n localeStr += `-ca-${outputCalendar}`;\n }\n\n if (numberingSystem) {\n localeStr += `-nu-${numberingSystem}`;\n }\n return localeStr;\n } else {\n return localeStr;\n }\n}\n\nfunction mapMonths(f) {\n const ms = [];\n for (let i = 1; i <= 12; i++) {\n const dt = DateTime.utc(2009, i, 1);\n ms.push(f(dt));\n }\n return ms;\n}\n\nfunction mapWeekdays(f) {\n const ms = [];\n for (let i = 1; i <= 7; i++) {\n const dt = DateTime.utc(2016, 11, 13 + i);\n ms.push(f(dt));\n }\n return ms;\n}\n\nfunction listStuff(loc, length, englishFn, intlFn) {\n const mode = loc.listingMode();\n\n if (mode === \"error\") {\n return null;\n } else if (mode === \"en\") {\n return englishFn(length);\n } else {\n return intlFn(length);\n }\n}\n\nfunction supportsFastNumbers(loc) {\n if (loc.numberingSystem && loc.numberingSystem !== \"latn\") {\n return false;\n } else {\n return (\n loc.numberingSystem === \"latn\" ||\n !loc.locale ||\n loc.locale.startsWith(\"en\") ||\n new Intl.DateTimeFormat(loc.intl).resolvedOptions().numberingSystem === \"latn\"\n );\n }\n}\n\n/**\n * @private\n */\n\nclass PolyNumberFormatter {\n constructor(intl, forceSimple, opts) {\n this.padTo = opts.padTo || 0;\n this.floor = opts.floor || false;\n\n const { padTo, floor, ...otherOpts } = opts;\n\n if (!forceSimple || Object.keys(otherOpts).length > 0) {\n const intlOpts = { useGrouping: false, ...opts };\n if (opts.padTo > 0) intlOpts.minimumIntegerDigits = opts.padTo;\n this.inf = getCachedINF(intl, intlOpts);\n }\n }\n\n format(i) {\n if (this.inf) {\n const fixed = this.floor ? Math.floor(i) : i;\n return this.inf.format(fixed);\n } else {\n // to match the browser's numberformatter defaults\n const fixed = this.floor ? Math.floor(i) : roundTo(i, 3);\n return padStart(fixed, this.padTo);\n }\n }\n}\n\n/**\n * @private\n */\n\nclass PolyDateFormatter {\n constructor(dt, intl, opts) {\n this.opts = opts;\n this.originalZone = undefined;\n\n let z = undefined;\n if (this.opts.timeZone) {\n // Don't apply any workarounds if a timeZone is explicitly provided in opts\n this.dt = dt;\n } else if (dt.zone.type === \"fixed\") {\n // UTC-8 or Etc/UTC-8 are not part of tzdata, only Etc/GMT+8 and the like.\n // That is why fixed-offset TZ is set to that unless it is:\n // 1. Representing offset 0 when UTC is used to maintain previous behavior and does not become GMT.\n // 2. Unsupported by the browser:\n // - some do not support Etc/\n // - < Etc/GMT-14, > Etc/GMT+12, and 30-minute or 45-minute offsets are not part of tzdata\n const gmtOffset = -1 * (dt.offset / 60);\n const offsetZ = gmtOffset >= 0 ? `Etc/GMT+${gmtOffset}` : `Etc/GMT${gmtOffset}`;\n if (dt.offset !== 0 && IANAZone.create(offsetZ).valid) {\n z = offsetZ;\n this.dt = dt;\n } else {\n // Not all fixed-offset zones like Etc/+4:30 are present in tzdata so\n // we manually apply the offset and substitute the zone as needed.\n z = \"UTC\";\n this.dt = dt.offset === 0 ? dt : dt.setZone(\"UTC\").plus({ minutes: dt.offset });\n this.originalZone = dt.zone;\n }\n } else if (dt.zone.type === \"system\") {\n this.dt = dt;\n } else if (dt.zone.type === \"iana\") {\n this.dt = dt;\n z = dt.zone.name;\n } else {\n // Custom zones can have any offset / offsetName so we just manually\n // apply the offset and substitute the zone as needed.\n z = \"UTC\";\n this.dt = dt.setZone(\"UTC\").plus({ minutes: dt.offset });\n this.originalZone = dt.zone;\n }\n\n const intlOpts = { ...this.opts };\n intlOpts.timeZone = intlOpts.timeZone || z;\n this.dtf = getCachedDTF(intl, intlOpts);\n }\n\n format() {\n if (this.originalZone) {\n // If we have to substitute in the actual zone name, we have to use\n // formatToParts so that the timezone can be replaced.\n return this.formatToParts()\n .map(({ value }) => value)\n .join(\"\");\n }\n return this.dtf.format(this.dt.toJSDate());\n }\n\n formatToParts() {\n const parts = this.dtf.formatToParts(this.dt.toJSDate());\n if (this.originalZone) {\n return parts.map((part) => {\n if (part.type === \"timeZoneName\") {\n const offsetName = this.originalZone.offsetName(this.dt.ts, {\n locale: this.dt.locale,\n format: this.opts.timeZoneName,\n });\n return {\n ...part,\n value: offsetName,\n };\n } else {\n return part;\n }\n });\n }\n return parts;\n }\n\n resolvedOptions() {\n return this.dtf.resolvedOptions();\n }\n}\n\n/**\n * @private\n */\nclass PolyRelFormatter {\n constructor(intl, isEnglish, opts) {\n this.opts = { style: \"long\", ...opts };\n if (!isEnglish && hasRelative()) {\n this.rtf = getCachedRTF(intl, opts);\n }\n }\n\n format(count, unit) {\n if (this.rtf) {\n return this.rtf.format(count, unit);\n } else {\n return English.formatRelativeTime(unit, count, this.opts.numeric, this.opts.style !== \"long\");\n }\n }\n\n formatToParts(count, unit) {\n if (this.rtf) {\n return this.rtf.formatToParts(count, unit);\n } else {\n return [];\n }\n }\n}\n\nconst fallbackWeekSettings = {\n firstDay: 1,\n minimalDays: 4,\n weekend: [6, 7],\n};\n\n/**\n * @private\n */\n\nexport default class Locale {\n static fromOpts(opts) {\n return Locale.create(\n opts.locale,\n opts.numberingSystem,\n opts.outputCalendar,\n opts.weekSettings,\n opts.defaultToEN\n );\n }\n\n static create(locale, numberingSystem, outputCalendar, weekSettings, defaultToEN = false) {\n const specifiedLocale = locale || Settings.defaultLocale;\n // the system locale is useful for human-readable strings but annoying for parsing/formatting known formats\n const localeR = specifiedLocale || (defaultToEN ? \"en-US\" : systemLocale());\n const numberingSystemR = numberingSystem || Settings.defaultNumberingSystem;\n const outputCalendarR = outputCalendar || Settings.defaultOutputCalendar;\n const weekSettingsR = validateWeekSettings(weekSettings) || Settings.defaultWeekSettings;\n return new Locale(localeR, numberingSystemR, outputCalendarR, weekSettingsR, specifiedLocale);\n }\n\n static resetCache() {\n sysLocaleCache = null;\n intlDTCache = {};\n intlNumCache = {};\n intlRelCache = {};\n }\n\n static fromObject({ locale, numberingSystem, outputCalendar, weekSettings } = {}) {\n return Locale.create(locale, numberingSystem, outputCalendar, weekSettings);\n }\n\n constructor(locale, numbering, outputCalendar, weekSettings, specifiedLocale) {\n const [parsedLocale, parsedNumberingSystem, parsedOutputCalendar] = parseLocaleString(locale);\n\n this.locale = parsedLocale;\n this.numberingSystem = numbering || parsedNumberingSystem || null;\n this.outputCalendar = outputCalendar || parsedOutputCalendar || null;\n this.weekSettings = weekSettings;\n this.intl = intlConfigString(this.locale, this.numberingSystem, this.outputCalendar);\n\n this.weekdaysCache = { format: {}, standalone: {} };\n this.monthsCache = { format: {}, standalone: {} };\n this.meridiemCache = null;\n this.eraCache = {};\n\n this.specifiedLocale = specifiedLocale;\n this.fastNumbersCached = null;\n }\n\n get fastNumbers() {\n if (this.fastNumbersCached == null) {\n this.fastNumbersCached = supportsFastNumbers(this);\n }\n\n return this.fastNumbersCached;\n }\n\n listingMode() {\n const isActuallyEn = this.isEnglish();\n const hasNoWeirdness =\n (this.numberingSystem === null || this.numberingSystem === \"latn\") &&\n (this.outputCalendar === null || this.outputCalendar === \"gregory\");\n return isActuallyEn && hasNoWeirdness ? \"en\" : \"intl\";\n }\n\n clone(alts) {\n if (!alts || Object.getOwnPropertyNames(alts).length === 0) {\n return this;\n } else {\n return Locale.create(\n alts.locale || this.specifiedLocale,\n alts.numberingSystem || this.numberingSystem,\n alts.outputCalendar || this.outputCalendar,\n validateWeekSettings(alts.weekSettings) || this.weekSettings,\n alts.defaultToEN || false\n );\n }\n }\n\n redefaultToEN(alts = {}) {\n return this.clone({ ...alts, defaultToEN: true });\n }\n\n redefaultToSystem(alts = {}) {\n return this.clone({ ...alts, defaultToEN: false });\n }\n\n months(length, format = false) {\n return listStuff(this, length, English.months, () => {\n const intl = format ? { month: length, day: \"numeric\" } : { month: length },\n formatStr = format ? \"format\" : \"standalone\";\n if (!this.monthsCache[formatStr][length]) {\n this.monthsCache[formatStr][length] = mapMonths((dt) => this.extract(dt, intl, \"month\"));\n }\n return this.monthsCache[formatStr][length];\n });\n }\n\n weekdays(length, format = false) {\n return listStuff(this, length, English.weekdays, () => {\n const intl = format\n ? { weekday: length, year: \"numeric\", month: \"long\", day: \"numeric\" }\n : { weekday: length },\n formatStr = format ? \"format\" : \"standalone\";\n if (!this.weekdaysCache[formatStr][length]) {\n this.weekdaysCache[formatStr][length] = mapWeekdays((dt) =>\n this.extract(dt, intl, \"weekday\")\n );\n }\n return this.weekdaysCache[formatStr][length];\n });\n }\n\n meridiems() {\n return listStuff(\n this,\n undefined,\n () => English.meridiems,\n () => {\n // In theory there could be aribitrary day periods. We're gonna assume there are exactly two\n // for AM and PM. This is probably wrong, but it's makes parsing way easier.\n if (!this.meridiemCache) {\n const intl = { hour: \"numeric\", hourCycle: \"h12\" };\n this.meridiemCache = [DateTime.utc(2016, 11, 13, 9), DateTime.utc(2016, 11, 13, 19)].map(\n (dt) => this.extract(dt, intl, \"dayperiod\")\n );\n }\n\n return this.meridiemCache;\n }\n );\n }\n\n eras(length) {\n return listStuff(this, length, English.eras, () => {\n const intl = { era: length };\n\n // This is problematic. Different calendars are going to define eras totally differently. What I need is the minimum set of dates\n // to definitely enumerate them.\n if (!this.eraCache[length]) {\n this.eraCache[length] = [DateTime.utc(-40, 1, 1), DateTime.utc(2017, 1, 1)].map((dt) =>\n this.extract(dt, intl, \"era\")\n );\n }\n\n return this.eraCache[length];\n });\n }\n\n extract(dt, intlOpts, field) {\n const df = this.dtFormatter(dt, intlOpts),\n results = df.formatToParts(),\n matching = results.find((m) => m.type.toLowerCase() === field);\n return matching ? matching.value : null;\n }\n\n numberFormatter(opts = {}) {\n // this forcesimple option is never used (the only caller short-circuits on it, but it seems safer to leave)\n // (in contrast, the rest of the condition is used heavily)\n return new PolyNumberFormatter(this.intl, opts.forceSimple || this.fastNumbers, opts);\n }\n\n dtFormatter(dt, intlOpts = {}) {\n return new PolyDateFormatter(dt, this.intl, intlOpts);\n }\n\n relFormatter(opts = {}) {\n return new PolyRelFormatter(this.intl, this.isEnglish(), opts);\n }\n\n listFormatter(opts = {}) {\n return getCachedLF(this.intl, opts);\n }\n\n isEnglish() {\n return (\n this.locale === \"en\" ||\n this.locale.toLowerCase() === \"en-us\" ||\n new Intl.DateTimeFormat(this.intl).resolvedOptions().locale.startsWith(\"en-us\")\n );\n }\n\n getWeekSettings() {\n if (this.weekSettings) {\n return this.weekSettings;\n } else if (!hasLocaleWeekInfo()) {\n return fallbackWeekSettings;\n } else {\n return getCachedWeekInfo(this.locale);\n }\n }\n\n getStartOfWeek() {\n return this.getWeekSettings().firstDay;\n }\n\n getMinDaysInFirstWeek() {\n return this.getWeekSettings().minimalDays;\n }\n\n getWeekendDays() {\n return this.getWeekSettings().weekend;\n }\n\n equals(other) {\n return (\n this.locale === other.locale &&\n this.numberingSystem === other.numberingSystem &&\n this.outputCalendar === other.outputCalendar\n );\n }\n\n toString() {\n return `Locale(${this.locale}, ${this.numberingSystem}, ${this.outputCalendar})`;\n }\n}\n","import * as Formats from \"./formats.js\";\nimport { pick } from \"./util.js\";\n\nfunction stringify(obj) {\n return JSON.stringify(obj, Object.keys(obj).sort());\n}\n\n/**\n * @private\n */\n\nexport const monthsLong = [\n \"January\",\n \"February\",\n \"March\",\n \"April\",\n \"May\",\n \"June\",\n \"July\",\n \"August\",\n \"September\",\n \"October\",\n \"November\",\n \"December\",\n];\n\nexport const monthsShort = [\n \"Jan\",\n \"Feb\",\n \"Mar\",\n \"Apr\",\n \"May\",\n \"Jun\",\n \"Jul\",\n \"Aug\",\n \"Sep\",\n \"Oct\",\n \"Nov\",\n \"Dec\",\n];\n\nexport const monthsNarrow = [\"J\", \"F\", \"M\", \"A\", \"M\", \"J\", \"J\", \"A\", \"S\", \"O\", \"N\", \"D\"];\n\nexport function months(length) {\n switch (length) {\n case \"narrow\":\n return [...monthsNarrow];\n case \"short\":\n return [...monthsShort];\n case \"long\":\n return [...monthsLong];\n case \"numeric\":\n return [\"1\", \"2\", \"3\", \"4\", \"5\", \"6\", \"7\", \"8\", \"9\", \"10\", \"11\", \"12\"];\n case \"2-digit\":\n return [\"01\", \"02\", \"03\", \"04\", \"05\", \"06\", \"07\", \"08\", \"09\", \"10\", \"11\", \"12\"];\n default:\n return null;\n }\n}\n\nexport const weekdaysLong = [\n \"Monday\",\n \"Tuesday\",\n \"Wednesday\",\n \"Thursday\",\n \"Friday\",\n \"Saturday\",\n \"Sunday\",\n];\n\nexport const weekdaysShort = [\"Mon\", \"Tue\", \"Wed\", \"Thu\", \"Fri\", \"Sat\", \"Sun\"];\n\nexport const weekdaysNarrow = [\"M\", \"T\", \"W\", \"T\", \"F\", \"S\", \"S\"];\n\nexport function weekdays(length) {\n switch (length) {\n case \"narrow\":\n return [...weekdaysNarrow];\n case \"short\":\n return [...weekdaysShort];\n case \"long\":\n return [...weekdaysLong];\n case \"numeric\":\n return [\"1\", \"2\", \"3\", \"4\", \"5\", \"6\", \"7\"];\n default:\n return null;\n }\n}\n\nexport const meridiems = [\"AM\", \"PM\"];\n\nexport const erasLong = [\"Before Christ\", \"Anno Domini\"];\n\nexport const erasShort = [\"BC\", \"AD\"];\n\nexport const erasNarrow = [\"B\", \"A\"];\n\nexport function eras(length) {\n switch (length) {\n case \"narrow\":\n return [...erasNarrow];\n case \"short\":\n return [...erasShort];\n case \"long\":\n return [...erasLong];\n default:\n return null;\n }\n}\n\nexport function meridiemForDateTime(dt) {\n return meridiems[dt.hour < 12 ? 0 : 1];\n}\n\nexport function weekdayForDateTime(dt, length) {\n return weekdays(length)[dt.weekday - 1];\n}\n\nexport function monthForDateTime(dt, length) {\n return months(length)[dt.month - 1];\n}\n\nexport function eraForDateTime(dt, length) {\n return eras(length)[dt.year < 0 ? 0 : 1];\n}\n\nexport function formatRelativeTime(unit, count, numeric = \"always\", narrow = false) {\n const units = {\n years: [\"year\", \"yr.\"],\n quarters: [\"quarter\", \"qtr.\"],\n months: [\"month\", \"mo.\"],\n weeks: [\"week\", \"wk.\"],\n days: [\"day\", \"day\", \"days\"],\n hours: [\"hour\", \"hr.\"],\n minutes: [\"minute\", \"min.\"],\n seconds: [\"second\", \"sec.\"],\n };\n\n const lastable = [\"hours\", \"minutes\", \"seconds\"].indexOf(unit) === -1;\n\n if (numeric === \"auto\" && lastable) {\n const isDay = unit === \"days\";\n switch (count) {\n case 1:\n return isDay ? \"tomorrow\" : `next ${units[unit][0]}`;\n case -1:\n return isDay ? \"yesterday\" : `last ${units[unit][0]}`;\n case 0:\n return isDay ? \"today\" : `this ${units[unit][0]}`;\n default: // fall through\n }\n }\n\n const isInPast = Object.is(count, -0) || count < 0,\n fmtValue = Math.abs(count),\n singular = fmtValue === 1,\n lilUnits = units[unit],\n fmtUnit = narrow\n ? singular\n ? lilUnits[1]\n : lilUnits[2] || lilUnits[1]\n : singular\n ? units[unit][0]\n : unit;\n return isInPast ? `${fmtValue} ${fmtUnit} ago` : `in ${fmtValue} ${fmtUnit}`;\n}\n\nexport function formatString(knownFormat) {\n // these all have the offsets removed because we don't have access to them\n // without all the intl stuff this is backfilling\n const filtered = pick(knownFormat, [\n \"weekday\",\n \"era\",\n \"year\",\n \"month\",\n \"day\",\n \"hour\",\n \"minute\",\n \"second\",\n \"timeZoneName\",\n \"hourCycle\",\n ]),\n key = stringify(filtered),\n dateTimeHuge = \"EEEE, LLLL d, yyyy, h:mm a\";\n switch (key) {\n case stringify(Formats.DATE_SHORT):\n return \"M/d/yyyy\";\n case stringify(Formats.DATE_MED):\n return \"LLL d, yyyy\";\n case stringify(Formats.DATE_MED_WITH_WEEKDAY):\n return \"EEE, LLL d, yyyy\";\n case stringify(Formats.DATE_FULL):\n return \"LLLL d, yyyy\";\n case stringify(Formats.DATE_HUGE):\n return \"EEEE, LLLL d, yyyy\";\n case stringify(Formats.TIME_SIMPLE):\n return \"h:mm a\";\n case stringify(Formats.TIME_WITH_SECONDS):\n return \"h:mm:ss a\";\n case stringify(Formats.TIME_WITH_SHORT_OFFSET):\n return \"h:mm a\";\n case stringify(Formats.TIME_WITH_LONG_OFFSET):\n return \"h:mm a\";\n case stringify(Formats.TIME_24_SIMPLE):\n return \"HH:mm\";\n case stringify(Formats.TIME_24_WITH_SECONDS):\n return \"HH:mm:ss\";\n case stringify(Formats.TIME_24_WITH_SHORT_OFFSET):\n return \"HH:mm\";\n case stringify(Formats.TIME_24_WITH_LONG_OFFSET):\n return \"HH:mm\";\n case stringify(Formats.DATETIME_SHORT):\n return \"M/d/yyyy, h:mm a\";\n case stringify(Formats.DATETIME_MED):\n return \"LLL d, yyyy, h:mm a\";\n case stringify(Formats.DATETIME_FULL):\n return \"LLLL d, yyyy, h:mm a\";\n case stringify(Formats.DATETIME_HUGE):\n return dateTimeHuge;\n case stringify(Formats.DATETIME_SHORT_WITH_SECONDS):\n return \"M/d/yyyy, h:mm:ss a\";\n case stringify(Formats.DATETIME_MED_WITH_SECONDS):\n return \"LLL d, yyyy, h:mm:ss a\";\n case stringify(Formats.DATETIME_MED_WITH_WEEKDAY):\n return \"EEE, d LLL yyyy, h:mm a\";\n case stringify(Formats.DATETIME_FULL_WITH_SECONDS):\n return \"LLLL d, yyyy, h:mm:ss a\";\n case stringify(Formats.DATETIME_HUGE_WITH_SECONDS):\n return \"EEEE, LLLL d, yyyy, h:mm:ss a\";\n default:\n return dateTimeHuge;\n }\n}\n","import { formatOffset, signedOffset } from \"../impl/util.js\";\nimport Zone from \"../zone.js\";\n\nlet singleton = null;\n\n/**\n * A zone with a fixed offset (meaning no DST)\n * @implements {Zone}\n */\nexport default class FixedOffsetZone extends Zone {\n /**\n * Get a singleton instance of UTC\n * @return {FixedOffsetZone}\n */\n static get utcInstance() {\n if (singleton === null) {\n singleton = new FixedOffsetZone(0);\n }\n return singleton;\n }\n\n /**\n * Get an instance with a specified offset\n * @param {number} offset - The offset in minutes\n * @return {FixedOffsetZone}\n */\n static instance(offset) {\n return offset === 0 ? FixedOffsetZone.utcInstance : new FixedOffsetZone(offset);\n }\n\n /**\n * Get an instance of FixedOffsetZone from a UTC offset string, like \"UTC+6\"\n * @param {string} s - The offset string to parse\n * @example FixedOffsetZone.parseSpecifier(\"UTC+6\")\n * @example FixedOffsetZone.parseSpecifier(\"UTC+06\")\n * @example FixedOffsetZone.parseSpecifier(\"UTC-6:00\")\n * @return {FixedOffsetZone}\n */\n static parseSpecifier(s) {\n if (s) {\n const r = s.match(/^utc(?:([+-]\\d{1,2})(?::(\\d{2}))?)?$/i);\n if (r) {\n return new FixedOffsetZone(signedOffset(r[1], r[2]));\n }\n }\n return null;\n }\n\n constructor(offset) {\n super();\n /** @private **/\n this.fixed = offset;\n }\n\n /**\n * The type of zone. `fixed` for all instances of `FixedOffsetZone`.\n * @override\n * @type {string}\n */\n get type() {\n return \"fixed\";\n }\n\n /**\n * The name of this zone.\n * All fixed zones' names always start with \"UTC\" (plus optional offset)\n * @override\n * @type {string}\n */\n get name() {\n return this.fixed === 0 ? \"UTC\" : `UTC${formatOffset(this.fixed, \"narrow\")}`;\n }\n\n /**\n * The IANA name of this zone, i.e. `Etc/UTC` or `Etc/GMT+/-nn`\n *\n * @override\n * @type {string}\n */\n get ianaName() {\n if (this.fixed === 0) {\n return \"Etc/UTC\";\n } else {\n return `Etc/GMT${formatOffset(-this.fixed, \"narrow\")}`;\n }\n }\n\n /**\n * Returns the offset's common name at the specified timestamp.\n *\n * For fixed offset zones this equals to the zone name.\n * @override\n */\n offsetName() {\n return this.name;\n }\n\n /**\n * Returns the offset's value as a string\n * @override\n * @param {number} ts - Epoch milliseconds for which to get the offset\n * @param {string} format - What style of offset to return.\n * Accepts 'narrow', 'short', or 'techie'. Returning '+6', '+06:00', or '+0600' respectively\n * @return {string}\n */\n formatOffset(ts, format) {\n return formatOffset(this.fixed, format);\n }\n\n /**\n * Returns whether the offset is known to be fixed for the whole year:\n * Always returns true for all fixed offset zones.\n * @override\n * @type {boolean}\n */\n get isUniversal() {\n return true;\n }\n\n /**\n * Return the offset in minutes for this zone at the specified timestamp.\n *\n * For fixed offset zones, this is constant and does not depend on a timestamp.\n * @override\n * @return {number}\n */\n offset() {\n return this.fixed;\n }\n\n /**\n * Return whether this Zone is equal to another zone (i.e. also fixed and same offset)\n * @override\n * @param {Zone} otherZone - the zone to compare\n * @return {boolean}\n */\n equals(otherZone) {\n return otherZone.type === \"fixed\" && otherZone.fixed === this.fixed;\n }\n\n /**\n * Return whether this Zone is valid:\n * All fixed offset zones are valid.\n * @override\n * @type {boolean}\n */\n get isValid() {\n return true;\n }\n}\n","import Zone from \"../zone.js\";\n\n/**\n * A zone that failed to parse. You should never need to instantiate this.\n * @implements {Zone}\n */\nexport default class InvalidZone extends Zone {\n constructor(zoneName) {\n super();\n /** @private */\n this.zoneName = zoneName;\n }\n\n /** @override **/\n get type() {\n return \"invalid\";\n }\n\n /** @override **/\n get name() {\n return this.zoneName;\n }\n\n /** @override **/\n get isUniversal() {\n return false;\n }\n\n /** @override **/\n offsetName() {\n return null;\n }\n\n /** @override **/\n formatOffset() {\n return \"\";\n }\n\n /** @override **/\n offset() {\n return NaN;\n }\n\n /** @override **/\n equals() {\n return false;\n }\n\n /** @override **/\n get isValid() {\n return false;\n }\n}\n","/**\n * @private\n */\n\nimport Zone from \"../zone.js\";\nimport IANAZone from \"../zones/IANAZone.js\";\nimport FixedOffsetZone from \"../zones/fixedOffsetZone.js\";\nimport InvalidZone from \"../zones/invalidZone.js\";\n\nimport { isUndefined, isString, isNumber } from \"./util.js\";\nimport SystemZone from \"../zones/systemZone.js\";\n\nexport function normalizeZone(input, defaultZone) {\n let offset;\n if (isUndefined(input) || input === null) {\n return defaultZone;\n } else if (input instanceof Zone) {\n return input;\n } else if (isString(input)) {\n const lowered = input.toLowerCase();\n if (lowered === \"default\") return defaultZone;\n else if (lowered === \"local\" || lowered === \"system\") return SystemZone.instance;\n else if (lowered === \"utc\" || lowered === \"gmt\") return FixedOffsetZone.utcInstance;\n else return FixedOffsetZone.parseSpecifier(lowered) || IANAZone.create(input);\n } else if (isNumber(input)) {\n return FixedOffsetZone.instance(input);\n } else if (typeof input === \"object\" && \"offset\" in input && typeof input.offset === \"function\") {\n // This is dumb, but the instanceof check above doesn't seem to really work\n // so we're duck checking it\n return input;\n } else {\n return new InvalidZone(input);\n }\n}\n","/*\n This is just a junk drawer, containing anything used across multiple classes.\n Because Luxon is small(ish), this should stay small and we won't worry about splitting\n it up into, say, parsingUtil.js and basicUtil.js and so on. But they are divided up by feature area.\n*/\n\nimport { InvalidArgumentError } from \"../errors.js\";\nimport Settings from \"../settings.js\";\nimport { dayOfWeek, isoWeekdayToLocal } from \"./conversions.js\";\n\n/**\n * @private\n */\n\n// TYPES\n\nexport function isUndefined(o) {\n return typeof o === \"undefined\";\n}\n\nexport function isNumber(o) {\n return typeof o === \"number\";\n}\n\nexport function isInteger(o) {\n return typeof o === \"number\" && o % 1 === 0;\n}\n\nexport function isString(o) {\n return typeof o === \"string\";\n}\n\nexport function isDate(o) {\n return Object.prototype.toString.call(o) === \"[object Date]\";\n}\n\n// CAPABILITIES\n\nexport function hasRelative() {\n try {\n return typeof Intl !== \"undefined\" && !!Intl.RelativeTimeFormat;\n } catch (e) {\n return false;\n }\n}\n\nexport function hasLocaleWeekInfo() {\n try {\n return (\n typeof Intl !== \"undefined\" &&\n !!Intl.Locale &&\n (\"weekInfo\" in Intl.Locale.prototype || \"getWeekInfo\" in Intl.Locale.prototype)\n );\n } catch (e) {\n return false;\n }\n}\n\n// OBJECTS AND ARRAYS\n\nexport function maybeArray(thing) {\n return Array.isArray(thing) ? thing : [thing];\n}\n\nexport function bestBy(arr, by, compare) {\n if (arr.length === 0) {\n return undefined;\n }\n return arr.reduce((best, next) => {\n const pair = [by(next), next];\n if (!best) {\n return pair;\n } else if (compare(best[0], pair[0]) === best[0]) {\n return best;\n } else {\n return pair;\n }\n }, null)[1];\n}\n\nexport function pick(obj, keys) {\n return keys.reduce((a, k) => {\n a[k] = obj[k];\n return a;\n }, {});\n}\n\nexport function hasOwnProperty(obj, prop) {\n return Object.prototype.hasOwnProperty.call(obj, prop);\n}\n\nexport function validateWeekSettings(settings) {\n if (settings == null) {\n return null;\n } else if (typeof settings !== \"object\") {\n throw new InvalidArgumentError(\"Week settings must be an object\");\n } else {\n if (\n !integerBetween(settings.firstDay, 1, 7) ||\n !integerBetween(settings.minimalDays, 1, 7) ||\n !Array.isArray(settings.weekend) ||\n settings.weekend.some((v) => !integerBetween(v, 1, 7))\n ) {\n throw new InvalidArgumentError(\"Invalid week settings\");\n }\n return {\n firstDay: settings.firstDay,\n minimalDays: settings.minimalDays,\n weekend: Array.from(settings.weekend),\n };\n }\n}\n\n// NUMBERS AND STRINGS\n\nexport function integerBetween(thing, bottom, top) {\n return isInteger(thing) && thing >= bottom && thing <= top;\n}\n\n// x % n but takes the sign of n instead of x\nexport function floorMod(x, n) {\n return x - n * Math.floor(x / n);\n}\n\nexport function padStart(input, n = 2) {\n const isNeg = input < 0;\n let padded;\n if (isNeg) {\n padded = \"-\" + (\"\" + -input).padStart(n, \"0\");\n } else {\n padded = (\"\" + input).padStart(n, \"0\");\n }\n return padded;\n}\n\nexport function parseInteger(string) {\n if (isUndefined(string) || string === null || string === \"\") {\n return undefined;\n } else {\n return parseInt(string, 10);\n }\n}\n\nexport function parseFloating(string) {\n if (isUndefined(string) || string === null || string === \"\") {\n return undefined;\n } else {\n return parseFloat(string);\n }\n}\n\nexport function parseMillis(fraction) {\n // Return undefined (instead of 0) in these cases, where fraction is not set\n if (isUndefined(fraction) || fraction === null || fraction === \"\") {\n return undefined;\n } else {\n const f = parseFloat(\"0.\" + fraction) * 1000;\n return Math.floor(f);\n }\n}\n\nexport function roundTo(number, digits, towardZero = false) {\n const factor = 10 ** digits,\n rounder = towardZero ? Math.trunc : Math.round;\n return rounder(number * factor) / factor;\n}\n\n// DATE BASICS\n\nexport function isLeapYear(year) {\n return year % 4 === 0 && (year % 100 !== 0 || year % 400 === 0);\n}\n\nexport function daysInYear(year) {\n return isLeapYear(year) ? 366 : 365;\n}\n\nexport function daysInMonth(year, month) {\n const modMonth = floorMod(month - 1, 12) + 1,\n modYear = year + (month - modMonth) / 12;\n\n if (modMonth === 2) {\n return isLeapYear(modYear) ? 29 : 28;\n } else {\n return [31, null, 31, 30, 31, 30, 31, 31, 30, 31, 30, 31][modMonth - 1];\n }\n}\n\n// convert a calendar object to a local timestamp (epoch, but with the offset baked in)\nexport function objToLocalTS(obj) {\n let d = Date.UTC(\n obj.year,\n obj.month - 1,\n obj.day,\n obj.hour,\n obj.minute,\n obj.second,\n obj.millisecond\n );\n\n // for legacy reasons, years between 0 and 99 are interpreted as 19XX; revert that\n if (obj.year < 100 && obj.year >= 0) {\n d = new Date(d);\n // set the month and day again, this is necessary because year 2000 is a leap year, but year 100 is not\n // so if obj.year is in 99, but obj.day makes it roll over into year 100,\n // the calculations done by Date.UTC are using year 2000 - which is incorrect\n d.setUTCFullYear(obj.year, obj.month - 1, obj.day);\n }\n return +d;\n}\n\n// adapted from moment.js: https://github.com/moment/moment/blob/000ac1800e620f770f4eb31b5ae908f6167b0ab2/src/lib/units/week-calendar-utils.js\nfunction firstWeekOffset(year, minDaysInFirstWeek, startOfWeek) {\n const fwdlw = isoWeekdayToLocal(dayOfWeek(year, 1, minDaysInFirstWeek), startOfWeek);\n return -fwdlw + minDaysInFirstWeek - 1;\n}\n\nexport function weeksInWeekYear(weekYear, minDaysInFirstWeek = 4, startOfWeek = 1) {\n const weekOffset = firstWeekOffset(weekYear, minDaysInFirstWeek, startOfWeek);\n const weekOffsetNext = firstWeekOffset(weekYear + 1, minDaysInFirstWeek, startOfWeek);\n return (daysInYear(weekYear) - weekOffset + weekOffsetNext) / 7;\n}\n\nexport function untruncateYear(year) {\n if (year > 99) {\n return year;\n } else return year > Settings.twoDigitCutoffYear ? 1900 + year : 2000 + year;\n}\n\n// PARSING\n\nexport function parseZoneInfo(ts, offsetFormat, locale, timeZone = null) {\n const date = new Date(ts),\n intlOpts = {\n hourCycle: \"h23\",\n year: \"numeric\",\n month: \"2-digit\",\n day: \"2-digit\",\n hour: \"2-digit\",\n minute: \"2-digit\",\n };\n\n if (timeZone) {\n intlOpts.timeZone = timeZone;\n }\n\n const modified = { timeZoneName: offsetFormat, ...intlOpts };\n\n const parsed = new Intl.DateTimeFormat(locale, modified)\n .formatToParts(date)\n .find((m) => m.type.toLowerCase() === \"timezonename\");\n return parsed ? parsed.value : null;\n}\n\n// signedOffset('-5', '30') -> -330\nexport function signedOffset(offHourStr, offMinuteStr) {\n let offHour = parseInt(offHourStr, 10);\n\n // don't || this because we want to preserve -0\n if (Number.isNaN(offHour)) {\n offHour = 0;\n }\n\n const offMin = parseInt(offMinuteStr, 10) || 0,\n offMinSigned = offHour < 0 || Object.is(offHour, -0) ? -offMin : offMin;\n return offHour * 60 + offMinSigned;\n}\n\n// COERCION\n\nexport function asNumber(value) {\n const numericValue = Number(value);\n if (typeof value === \"boolean\" || value === \"\" || Number.isNaN(numericValue))\n throw new InvalidArgumentError(`Invalid unit value ${value}`);\n return numericValue;\n}\n\nexport function normalizeObject(obj, normalizer) {\n const normalized = {};\n for (const u in obj) {\n if (hasOwnProperty(obj, u)) {\n const v = obj[u];\n if (v === undefined || v === null) continue;\n normalized[normalizer(u)] = asNumber(v);\n }\n }\n return normalized;\n}\n\n/**\n * Returns the offset's value as a string\n * @param {number} ts - Epoch milliseconds for which to get the offset\n * @param {string} format - What style of offset to return.\n * Accepts 'narrow', 'short', or 'techie'. Returning '+6', '+06:00', or '+0600' respectively\n * @return {string}\n */\nexport function formatOffset(offset, format) {\n const hours = Math.trunc(Math.abs(offset / 60)),\n minutes = Math.trunc(Math.abs(offset % 60)),\n sign = offset >= 0 ? \"+\" : \"-\";\n\n switch (format) {\n case \"short\":\n return `${sign}${padStart(hours, 2)}:${padStart(minutes, 2)}`;\n case \"narrow\":\n return `${sign}${hours}${minutes > 0 ? `:${minutes}` : \"\"}`;\n case \"techie\":\n return `${sign}${padStart(hours, 2)}${padStart(minutes, 2)}`;\n default:\n throw new RangeError(`Value format ${format} is out of range for property format`);\n }\n}\n\nexport function timeObject(obj) {\n return pick(obj, [\"hour\", \"minute\", \"second\", \"millisecond\"]);\n}\n","const numberingSystems = {\n arab: \"[\\u0660-\\u0669]\",\n arabext: \"[\\u06F0-\\u06F9]\",\n bali: \"[\\u1B50-\\u1B59]\",\n beng: \"[\\u09E6-\\u09EF]\",\n deva: \"[\\u0966-\\u096F]\",\n fullwide: \"[\\uFF10-\\uFF19]\",\n gujr: \"[\\u0AE6-\\u0AEF]\",\n hanidec: \"[〇|一|二|三|四|五|六|七|八|九]\",\n khmr: \"[\\u17E0-\\u17E9]\",\n knda: \"[\\u0CE6-\\u0CEF]\",\n laoo: \"[\\u0ED0-\\u0ED9]\",\n limb: \"[\\u1946-\\u194F]\",\n mlym: \"[\\u0D66-\\u0D6F]\",\n mong: \"[\\u1810-\\u1819]\",\n mymr: \"[\\u1040-\\u1049]\",\n orya: \"[\\u0B66-\\u0B6F]\",\n tamldec: \"[\\u0BE6-\\u0BEF]\",\n telu: \"[\\u0C66-\\u0C6F]\",\n thai: \"[\\u0E50-\\u0E59]\",\n tibt: \"[\\u0F20-\\u0F29]\",\n latn: \"\\\\d\",\n};\n\nconst numberingSystemsUTF16 = {\n arab: [1632, 1641],\n arabext: [1776, 1785],\n bali: [6992, 7001],\n beng: [2534, 2543],\n deva: [2406, 2415],\n fullwide: [65296, 65303],\n gujr: [2790, 2799],\n khmr: [6112, 6121],\n knda: [3302, 3311],\n laoo: [3792, 3801],\n limb: [6470, 6479],\n mlym: [3430, 3439],\n mong: [6160, 6169],\n mymr: [4160, 4169],\n orya: [2918, 2927],\n tamldec: [3046, 3055],\n telu: [3174, 3183],\n thai: [3664, 3673],\n tibt: [3872, 3881],\n};\n\nconst hanidecChars = numberingSystems.hanidec.replace(/[\\[|\\]]/g, \"\").split(\"\");\n\nexport function parseDigits(str) {\n let value = parseInt(str, 10);\n if (isNaN(value)) {\n value = \"\";\n for (let i = 0; i < str.length; i++) {\n const code = str.charCodeAt(i);\n\n if (str[i].search(numberingSystems.hanidec) !== -1) {\n value += hanidecChars.indexOf(str[i]);\n } else {\n for (const key in numberingSystemsUTF16) {\n const [min, max] = numberingSystemsUTF16[key];\n if (code >= min && code <= max) {\n value += code - min;\n }\n }\n }\n }\n return parseInt(value, 10);\n } else {\n return value;\n }\n}\n\n// cache of {numberingSystem: {append: regex}}\nlet digitRegexCache = {};\nexport function resetDigitRegexCache() {\n digitRegexCache = {};\n}\n\nexport function digitRegex({ numberingSystem }, append = \"\") {\n const ns = numberingSystem || \"latn\";\n\n if (!digitRegexCache[ns]) {\n digitRegexCache[ns] = {};\n }\n if (!digitRegexCache[ns][append]) {\n digitRegexCache[ns][append] = new RegExp(`${numberingSystems[ns]}${append}`);\n }\n\n return digitRegexCache[ns][append];\n}\n","import SystemZone from \"./zones/systemZone.js\";\nimport IANAZone from \"./zones/IANAZone.js\";\nimport Locale from \"./impl/locale.js\";\nimport DateTime from \"./datetime.js\";\n\nimport { normalizeZone } from \"./impl/zoneUtil.js\";\nimport { validateWeekSettings } from \"./impl/util.js\";\nimport { resetDigitRegexCache } from \"./impl/digits.js\";\n\nlet now = () => Date.now(),\n defaultZone = \"system\",\n defaultLocale = null,\n defaultNumberingSystem = null,\n defaultOutputCalendar = null,\n twoDigitCutoffYear = 60,\n throwOnInvalid,\n defaultWeekSettings = null;\n\n/**\n * Settings contains static getters and setters that control Luxon's overall behavior. Luxon is a simple library with few options, but the ones it does have live here.\n */\nexport default class Settings {\n /**\n * Get the callback for returning the current timestamp.\n * @type {function}\n */\n static get now() {\n return now;\n }\n\n /**\n * Set the callback for returning the current timestamp.\n * The function should return a number, which will be interpreted as an Epoch millisecond count\n * @type {function}\n * @example Settings.now = () => Date.now() + 3000 // pretend it is 3 seconds in the future\n * @example Settings.now = () => 0 // always pretend it's Jan 1, 1970 at midnight in UTC time\n */\n static set now(n) {\n now = n;\n }\n\n /**\n * Set the default time zone to create DateTimes in. Does not affect existing instances.\n * Use the value \"system\" to reset this value to the system's time zone.\n * @type {string}\n */\n static set defaultZone(zone) {\n defaultZone = zone;\n }\n\n /**\n * Get the default time zone object currently used to create DateTimes. Does not affect existing instances.\n * The default value is the system's time zone (the one set on the machine that runs this code).\n * @type {Zone}\n */\n static get defaultZone() {\n return normalizeZone(defaultZone, SystemZone.instance);\n }\n\n /**\n * Get the default locale to create DateTimes with. Does not affect existing instances.\n * @type {string}\n */\n static get defaultLocale() {\n return defaultLocale;\n }\n\n /**\n * Set the default locale to create DateTimes with. Does not affect existing instances.\n * @type {string}\n */\n static set defaultLocale(locale) {\n defaultLocale = locale;\n }\n\n /**\n * Get the default numbering system to create DateTimes with. Does not affect existing instances.\n * @type {string}\n */\n static get defaultNumberingSystem() {\n return defaultNumberingSystem;\n }\n\n /**\n * Set the default numbering system to create DateTimes with. Does not affect existing instances.\n * @type {string}\n */\n static set defaultNumberingSystem(numberingSystem) {\n defaultNumberingSystem = numberingSystem;\n }\n\n /**\n * Get the default output calendar to create DateTimes with. Does not affect existing instances.\n * @type {string}\n */\n static get defaultOutputCalendar() {\n return defaultOutputCalendar;\n }\n\n /**\n * Set the default output calendar to create DateTimes with. Does not affect existing instances.\n * @type {string}\n */\n static set defaultOutputCalendar(outputCalendar) {\n defaultOutputCalendar = outputCalendar;\n }\n\n /**\n * @typedef {Object} WeekSettings\n * @property {number} firstDay\n * @property {number} minimalDays\n * @property {number[]} weekend\n */\n\n /**\n * @return {WeekSettings|null}\n */\n static get defaultWeekSettings() {\n return defaultWeekSettings;\n }\n\n /**\n * Allows overriding the default locale week settings, i.e. the start of the week, the weekend and\n * how many days are required in the first week of a year.\n * Does not affect existing instances.\n *\n * @param {WeekSettings|null} weekSettings\n */\n static set defaultWeekSettings(weekSettings) {\n defaultWeekSettings = validateWeekSettings(weekSettings);\n }\n\n /**\n * Get the cutoff year for whether a 2-digit year string is interpreted in the current or previous century. Numbers higher than the cutoff will be considered to mean 19xx and numbers lower or equal to the cutoff will be considered 20xx.\n * @type {number}\n */\n static get twoDigitCutoffYear() {\n return twoDigitCutoffYear;\n }\n\n /**\n * Set the cutoff year for whether a 2-digit year string is interpreted in the current or previous century. Numbers higher than the cutoff will be considered to mean 19xx and numbers lower or equal to the cutoff will be considered 20xx.\n * @type {number}\n * @example Settings.twoDigitCutoffYear = 0 // all 'yy' are interpreted as 20th century\n * @example Settings.twoDigitCutoffYear = 99 // all 'yy' are interpreted as 21st century\n * @example Settings.twoDigitCutoffYear = 50 // '49' -> 2049; '50' -> 1950\n * @example Settings.twoDigitCutoffYear = 1950 // interpreted as 50\n * @example Settings.twoDigitCutoffYear = 2050 // ALSO interpreted as 50\n */\n static set twoDigitCutoffYear(cutoffYear) {\n twoDigitCutoffYear = cutoffYear % 100;\n }\n\n /**\n * Get whether Luxon will throw when it encounters invalid DateTimes, Durations, or Intervals\n * @type {boolean}\n */\n static get throwOnInvalid() {\n return throwOnInvalid;\n }\n\n /**\n * Set whether Luxon will throw when it encounters invalid DateTimes, Durations, or Intervals\n * @type {boolean}\n */\n static set throwOnInvalid(t) {\n throwOnInvalid = t;\n }\n\n /**\n * Reset Luxon's global caches. Should only be necessary in testing scenarios.\n * @return {void}\n */\n static resetCaches() {\n Locale.resetCache();\n IANAZone.resetCache();\n DateTime.resetCache();\n resetDigitRegexCache();\n }\n}\n","export default class Invalid {\n constructor(reason, explanation) {\n this.reason = reason;\n this.explanation = explanation;\n }\n\n toMessage() {\n if (this.explanation) {\n return `${this.reason}: ${this.explanation}`;\n } else {\n return this.reason;\n }\n }\n}\n","import {\n integerBetween,\n isLeapYear,\n timeObject,\n daysInYear,\n daysInMonth,\n weeksInWeekYear,\n isInteger,\n isUndefined,\n} from \"./util.js\";\nimport Invalid from \"./invalid.js\";\nimport { ConflictingSpecificationError } from \"../errors.js\";\n\nconst nonLeapLadder = [0, 31, 59, 90, 120, 151, 181, 212, 243, 273, 304, 334],\n leapLadder = [0, 31, 60, 91, 121, 152, 182, 213, 244, 274, 305, 335];\n\nfunction unitOutOfRange(unit, value) {\n return new Invalid(\n \"unit out of range\",\n `you specified ${value} (of type ${typeof value}) as a ${unit}, which is invalid`\n );\n}\n\nexport function dayOfWeek(year, month, day) {\n const d = new Date(Date.UTC(year, month - 1, day));\n\n if (year < 100 && year >= 0) {\n d.setUTCFullYear(d.getUTCFullYear() - 1900);\n }\n\n const js = d.getUTCDay();\n\n return js === 0 ? 7 : js;\n}\n\nfunction computeOrdinal(year, month, day) {\n return day + (isLeapYear(year) ? leapLadder : nonLeapLadder)[month - 1];\n}\n\nfunction uncomputeOrdinal(year, ordinal) {\n const table = isLeapYear(year) ? leapLadder : nonLeapLadder,\n month0 = table.findIndex((i) => i < ordinal),\n day = ordinal - table[month0];\n return { month: month0 + 1, day };\n}\n\nexport function isoWeekdayToLocal(isoWeekday, startOfWeek) {\n return ((isoWeekday - startOfWeek + 7) % 7) + 1;\n}\n\n/**\n * @private\n */\n\nexport function gregorianToWeek(gregObj, minDaysInFirstWeek = 4, startOfWeek = 1) {\n const { year, month, day } = gregObj,\n ordinal = computeOrdinal(year, month, day),\n weekday = isoWeekdayToLocal(dayOfWeek(year, month, day), startOfWeek);\n\n let weekNumber = Math.floor((ordinal - weekday + 14 - minDaysInFirstWeek) / 7),\n weekYear;\n\n if (weekNumber < 1) {\n weekYear = year - 1;\n weekNumber = weeksInWeekYear(weekYear, minDaysInFirstWeek, startOfWeek);\n } else if (weekNumber > weeksInWeekYear(year, minDaysInFirstWeek, startOfWeek)) {\n weekYear = year + 1;\n weekNumber = 1;\n } else {\n weekYear = year;\n }\n\n return { weekYear, weekNumber, weekday, ...timeObject(gregObj) };\n}\n\nexport function weekToGregorian(weekData, minDaysInFirstWeek = 4, startOfWeek = 1) {\n const { weekYear, weekNumber, weekday } = weekData,\n weekdayOfJan4 = isoWeekdayToLocal(dayOfWeek(weekYear, 1, minDaysInFirstWeek), startOfWeek),\n yearInDays = daysInYear(weekYear);\n\n let ordinal = weekNumber * 7 + weekday - weekdayOfJan4 - 7 + minDaysInFirstWeek,\n year;\n\n if (ordinal < 1) {\n year = weekYear - 1;\n ordinal += daysInYear(year);\n } else if (ordinal > yearInDays) {\n year = weekYear + 1;\n ordinal -= daysInYear(weekYear);\n } else {\n year = weekYear;\n }\n\n const { month, day } = uncomputeOrdinal(year, ordinal);\n return { year, month, day, ...timeObject(weekData) };\n}\n\nexport function gregorianToOrdinal(gregData) {\n const { year, month, day } = gregData;\n const ordinal = computeOrdinal(year, month, day);\n return { year, ordinal, ...timeObject(gregData) };\n}\n\nexport function ordinalToGregorian(ordinalData) {\n const { year, ordinal } = ordinalData;\n const { month, day } = uncomputeOrdinal(year, ordinal);\n return { year, month, day, ...timeObject(ordinalData) };\n}\n\n/**\n * Check if local week units like localWeekday are used in obj.\n * If so, validates that they are not mixed with ISO week units and then copies them to the normal week unit properties.\n * Modifies obj in-place!\n * @param obj the object values\n */\nexport function usesLocalWeekValues(obj, loc) {\n const hasLocaleWeekData =\n !isUndefined(obj.localWeekday) ||\n !isUndefined(obj.localWeekNumber) ||\n !isUndefined(obj.localWeekYear);\n if (hasLocaleWeekData) {\n const hasIsoWeekData =\n !isUndefined(obj.weekday) || !isUndefined(obj.weekNumber) || !isUndefined(obj.weekYear);\n\n if (hasIsoWeekData) {\n throw new ConflictingSpecificationError(\n \"Cannot mix locale-based week fields with ISO-based week fields\"\n );\n }\n if (!isUndefined(obj.localWeekday)) obj.weekday = obj.localWeekday;\n if (!isUndefined(obj.localWeekNumber)) obj.weekNumber = obj.localWeekNumber;\n if (!isUndefined(obj.localWeekYear)) obj.weekYear = obj.localWeekYear;\n delete obj.localWeekday;\n delete obj.localWeekNumber;\n delete obj.localWeekYear;\n return {\n minDaysInFirstWeek: loc.getMinDaysInFirstWeek(),\n startOfWeek: loc.getStartOfWeek(),\n };\n } else {\n return { minDaysInFirstWeek: 4, startOfWeek: 1 };\n }\n}\n\nexport function hasInvalidWeekData(obj, minDaysInFirstWeek = 4, startOfWeek = 1) {\n const validYear = isInteger(obj.weekYear),\n validWeek = integerBetween(\n obj.weekNumber,\n 1,\n weeksInWeekYear(obj.weekYear, minDaysInFirstWeek, startOfWeek)\n ),\n validWeekday = integerBetween(obj.weekday, 1, 7);\n\n if (!validYear) {\n return unitOutOfRange(\"weekYear\", obj.weekYear);\n } else if (!validWeek) {\n return unitOutOfRange(\"week\", obj.weekNumber);\n } else if (!validWeekday) {\n return unitOutOfRange(\"weekday\", obj.weekday);\n } else return false;\n}\n\nexport function hasInvalidOrdinalData(obj) {\n const validYear = isInteger(obj.year),\n validOrdinal = integerBetween(obj.ordinal, 1, daysInYear(obj.year));\n\n if (!validYear) {\n return unitOutOfRange(\"year\", obj.year);\n } else if (!validOrdinal) {\n return unitOutOfRange(\"ordinal\", obj.ordinal);\n } else return false;\n}\n\nexport function hasInvalidGregorianData(obj) {\n const validYear = isInteger(obj.year),\n validMonth = integerBetween(obj.month, 1, 12),\n validDay = integerBetween(obj.day, 1, daysInMonth(obj.year, obj.month));\n\n if (!validYear) {\n return unitOutOfRange(\"year\", obj.year);\n } else if (!validMonth) {\n return unitOutOfRange(\"month\", obj.month);\n } else if (!validDay) {\n return unitOutOfRange(\"day\", obj.day);\n } else return false;\n}\n\nexport function hasInvalidTimeData(obj) {\n const { hour, minute, second, millisecond } = obj;\n const validHour =\n integerBetween(hour, 0, 23) ||\n (hour === 24 && minute === 0 && second === 0 && millisecond === 0),\n validMinute = integerBetween(minute, 0, 59),\n validSecond = integerBetween(second, 0, 59),\n validMillisecond = integerBetween(millisecond, 0, 999);\n\n if (!validHour) {\n return unitOutOfRange(\"hour\", hour);\n } else if (!validMinute) {\n return unitOutOfRange(\"minute\", minute);\n } else if (!validSecond) {\n return unitOutOfRange(\"second\", second);\n } else if (!validMillisecond) {\n return unitOutOfRange(\"millisecond\", millisecond);\n } else return false;\n}\n","import * as English from \"./english.js\";\nimport * as Formats from \"./formats.js\";\nimport { padStart } from \"./util.js\";\n\nfunction stringifyTokens(splits, tokenToString) {\n let s = \"\";\n for (const token of splits) {\n if (token.literal) {\n s += token.val;\n } else {\n s += tokenToString(token.val);\n }\n }\n return s;\n}\n\nconst macroTokenToFormatOpts = {\n D: Formats.DATE_SHORT,\n DD: Formats.DATE_MED,\n DDD: Formats.DATE_FULL,\n DDDD: Formats.DATE_HUGE,\n t: Formats.TIME_SIMPLE,\n tt: Formats.TIME_WITH_SECONDS,\n ttt: Formats.TIME_WITH_SHORT_OFFSET,\n tttt: Formats.TIME_WITH_LONG_OFFSET,\n T: Formats.TIME_24_SIMPLE,\n TT: Formats.TIME_24_WITH_SECONDS,\n TTT: Formats.TIME_24_WITH_SHORT_OFFSET,\n TTTT: Formats.TIME_24_WITH_LONG_OFFSET,\n f: Formats.DATETIME_SHORT,\n ff: Formats.DATETIME_MED,\n fff: Formats.DATETIME_FULL,\n ffff: Formats.DATETIME_HUGE,\n F: Formats.DATETIME_SHORT_WITH_SECONDS,\n FF: Formats.DATETIME_MED_WITH_SECONDS,\n FFF: Formats.DATETIME_FULL_WITH_SECONDS,\n FFFF: Formats.DATETIME_HUGE_WITH_SECONDS,\n};\n\n/**\n * @private\n */\n\nexport default class Formatter {\n static create(locale, opts = {}) {\n return new Formatter(locale, opts);\n }\n\n static parseFormat(fmt) {\n // white-space is always considered a literal in user-provided formats\n // the \" \" token has a special meaning (see unitForToken)\n\n let current = null,\n currentFull = \"\",\n bracketed = false;\n const splits = [];\n for (let i = 0; i < fmt.length; i++) {\n const c = fmt.charAt(i);\n if (c === \"'\") {\n if (currentFull.length > 0) {\n splits.push({ literal: bracketed || /^\\s+$/.test(currentFull), val: currentFull });\n }\n current = null;\n currentFull = \"\";\n bracketed = !bracketed;\n } else if (bracketed) {\n currentFull += c;\n } else if (c === current) {\n currentFull += c;\n } else {\n if (currentFull.length > 0) {\n splits.push({ literal: /^\\s+$/.test(currentFull), val: currentFull });\n }\n currentFull = c;\n current = c;\n }\n }\n\n if (currentFull.length > 0) {\n splits.push({ literal: bracketed || /^\\s+$/.test(currentFull), val: currentFull });\n }\n\n return splits;\n }\n\n static macroTokenToFormatOpts(token) {\n return macroTokenToFormatOpts[token];\n }\n\n constructor(locale, formatOpts) {\n this.opts = formatOpts;\n this.loc = locale;\n this.systemLoc = null;\n }\n\n formatWithSystemDefault(dt, opts) {\n if (this.systemLoc === null) {\n this.systemLoc = this.loc.redefaultToSystem();\n }\n const df = this.systemLoc.dtFormatter(dt, { ...this.opts, ...opts });\n return df.format();\n }\n\n dtFormatter(dt, opts = {}) {\n return this.loc.dtFormatter(dt, { ...this.opts, ...opts });\n }\n\n formatDateTime(dt, opts) {\n return this.dtFormatter(dt, opts).format();\n }\n\n formatDateTimeParts(dt, opts) {\n return this.dtFormatter(dt, opts).formatToParts();\n }\n\n formatInterval(interval, opts) {\n const df = this.dtFormatter(interval.start, opts);\n return df.dtf.formatRange(interval.start.toJSDate(), interval.end.toJSDate());\n }\n\n resolvedOptions(dt, opts) {\n return this.dtFormatter(dt, opts).resolvedOptions();\n }\n\n num(n, p = 0) {\n // we get some perf out of doing this here, annoyingly\n if (this.opts.forceSimple) {\n return padStart(n, p);\n }\n\n const opts = { ...this.opts };\n\n if (p > 0) {\n opts.padTo = p;\n }\n\n return this.loc.numberFormatter(opts).format(n);\n }\n\n formatDateTimeFromString(dt, fmt) {\n const knownEnglish = this.loc.listingMode() === \"en\",\n useDateTimeFormatter = this.loc.outputCalendar && this.loc.outputCalendar !== \"gregory\",\n string = (opts, extract) => this.loc.extract(dt, opts, extract),\n formatOffset = (opts) => {\n if (dt.isOffsetFixed && dt.offset === 0 && opts.allowZ) {\n return \"Z\";\n }\n\n return dt.isValid ? dt.zone.formatOffset(dt.ts, opts.format) : \"\";\n },\n meridiem = () =>\n knownEnglish\n ? English.meridiemForDateTime(dt)\n : string({ hour: \"numeric\", hourCycle: \"h12\" }, \"dayperiod\"),\n month = (length, standalone) =>\n knownEnglish\n ? English.monthForDateTime(dt, length)\n : string(standalone ? { month: length } : { month: length, day: \"numeric\" }, \"month\"),\n weekday = (length, standalone) =>\n knownEnglish\n ? English.weekdayForDateTime(dt, length)\n : string(\n standalone ? { weekday: length } : { weekday: length, month: \"long\", day: \"numeric\" },\n \"weekday\"\n ),\n maybeMacro = (token) => {\n const formatOpts = Formatter.macroTokenToFormatOpts(token);\n if (formatOpts) {\n return this.formatWithSystemDefault(dt, formatOpts);\n } else {\n return token;\n }\n },\n era = (length) =>\n knownEnglish ? English.eraForDateTime(dt, length) : string({ era: length }, \"era\"),\n tokenToString = (token) => {\n // Where possible: https://cldr.unicode.org/translation/date-time/date-time-symbols\n switch (token) {\n // ms\n case \"S\":\n return this.num(dt.millisecond);\n case \"u\":\n // falls through\n case \"SSS\":\n return this.num(dt.millisecond, 3);\n // seconds\n case \"s\":\n return this.num(dt.second);\n case \"ss\":\n return this.num(dt.second, 2);\n // fractional seconds\n case \"uu\":\n return this.num(Math.floor(dt.millisecond / 10), 2);\n case \"uuu\":\n return this.num(Math.floor(dt.millisecond / 100));\n // minutes\n case \"m\":\n return this.num(dt.minute);\n case \"mm\":\n return this.num(dt.minute, 2);\n // hours\n case \"h\":\n return this.num(dt.hour % 12 === 0 ? 12 : dt.hour % 12);\n case \"hh\":\n return this.num(dt.hour % 12 === 0 ? 12 : dt.hour % 12, 2);\n case \"H\":\n return this.num(dt.hour);\n case \"HH\":\n return this.num(dt.hour, 2);\n // offset\n case \"Z\":\n // like +6\n return formatOffset({ format: \"narrow\", allowZ: this.opts.allowZ });\n case \"ZZ\":\n // like +06:00\n return formatOffset({ format: \"short\", allowZ: this.opts.allowZ });\n case \"ZZZ\":\n // like +0600\n return formatOffset({ format: \"techie\", allowZ: this.opts.allowZ });\n case \"ZZZZ\":\n // like EST\n return dt.zone.offsetName(dt.ts, { format: \"short\", locale: this.loc.locale });\n case \"ZZZZZ\":\n // like Eastern Standard Time\n return dt.zone.offsetName(dt.ts, { format: \"long\", locale: this.loc.locale });\n // zone\n case \"z\":\n // like America/New_York\n return dt.zoneName;\n // meridiems\n case \"a\":\n return meridiem();\n // dates\n case \"d\":\n return useDateTimeFormatter ? string({ day: \"numeric\" }, \"day\") : this.num(dt.day);\n case \"dd\":\n return useDateTimeFormatter ? string({ day: \"2-digit\" }, \"day\") : this.num(dt.day, 2);\n // weekdays - standalone\n case \"c\":\n // like 1\n return this.num(dt.weekday);\n case \"ccc\":\n // like 'Tues'\n return weekday(\"short\", true);\n case \"cccc\":\n // like 'Tuesday'\n return weekday(\"long\", true);\n case \"ccccc\":\n // like 'T'\n return weekday(\"narrow\", true);\n // weekdays - format\n case \"E\":\n // like 1\n return this.num(dt.weekday);\n case \"EEE\":\n // like 'Tues'\n return weekday(\"short\", false);\n case \"EEEE\":\n // like 'Tuesday'\n return weekday(\"long\", false);\n case \"EEEEE\":\n // like 'T'\n return weekday(\"narrow\", false);\n // months - standalone\n case \"L\":\n // like 1\n return useDateTimeFormatter\n ? string({ month: \"numeric\", day: \"numeric\" }, \"month\")\n : this.num(dt.month);\n case \"LL\":\n // like 01, doesn't seem to work\n return useDateTimeFormatter\n ? string({ month: \"2-digit\", day: \"numeric\" }, \"month\")\n : this.num(dt.month, 2);\n case \"LLL\":\n // like Jan\n return month(\"short\", true);\n case \"LLLL\":\n // like January\n return month(\"long\", true);\n case \"LLLLL\":\n // like J\n return month(\"narrow\", true);\n // months - format\n case \"M\":\n // like 1\n return useDateTimeFormatter\n ? string({ month: \"numeric\" }, \"month\")\n : this.num(dt.month);\n case \"MM\":\n // like 01\n return useDateTimeFormatter\n ? string({ month: \"2-digit\" }, \"month\")\n : this.num(dt.month, 2);\n case \"MMM\":\n // like Jan\n return month(\"short\", false);\n case \"MMMM\":\n // like January\n return month(\"long\", false);\n case \"MMMMM\":\n // like J\n return month(\"narrow\", false);\n // years\n case \"y\":\n // like 2014\n return useDateTimeFormatter ? string({ year: \"numeric\" }, \"year\") : this.num(dt.year);\n case \"yy\":\n // like 14\n return useDateTimeFormatter\n ? string({ year: \"2-digit\" }, \"year\")\n : this.num(dt.year.toString().slice(-2), 2);\n case \"yyyy\":\n // like 0012\n return useDateTimeFormatter\n ? string({ year: \"numeric\" }, \"year\")\n : this.num(dt.year, 4);\n case \"yyyyyy\":\n // like 000012\n return useDateTimeFormatter\n ? string({ year: \"numeric\" }, \"year\")\n : this.num(dt.year, 6);\n // eras\n case \"G\":\n // like AD\n return era(\"short\");\n case \"GG\":\n // like Anno Domini\n return era(\"long\");\n case \"GGGGG\":\n return era(\"narrow\");\n case \"kk\":\n return this.num(dt.weekYear.toString().slice(-2), 2);\n case \"kkkk\":\n return this.num(dt.weekYear, 4);\n case \"W\":\n return this.num(dt.weekNumber);\n case \"WW\":\n return this.num(dt.weekNumber, 2);\n case \"n\":\n return this.num(dt.localWeekNumber);\n case \"nn\":\n return this.num(dt.localWeekNumber, 2);\n case \"ii\":\n return this.num(dt.localWeekYear.toString().slice(-2), 2);\n case \"iiii\":\n return this.num(dt.localWeekYear, 4);\n case \"o\":\n return this.num(dt.ordinal);\n case \"ooo\":\n return this.num(dt.ordinal, 3);\n case \"q\":\n // like 1\n return this.num(dt.quarter);\n case \"qq\":\n // like 01\n return this.num(dt.quarter, 2);\n case \"X\":\n return this.num(Math.floor(dt.ts / 1000));\n case \"x\":\n return this.num(dt.ts);\n default:\n return maybeMacro(token);\n }\n };\n\n return stringifyTokens(Formatter.parseFormat(fmt), tokenToString);\n }\n\n formatDurationFromString(dur, fmt) {\n const tokenToField = (token) => {\n switch (token[0]) {\n case \"S\":\n return \"millisecond\";\n case \"s\":\n return \"second\";\n case \"m\":\n return \"minute\";\n case \"h\":\n return \"hour\";\n case \"d\":\n return \"day\";\n case \"w\":\n return \"week\";\n case \"M\":\n return \"month\";\n case \"y\":\n return \"year\";\n default:\n return null;\n }\n },\n tokenToString = (lildur) => (token) => {\n const mapped = tokenToField(token);\n if (mapped) {\n return this.num(lildur.get(mapped), token.length);\n } else {\n return token;\n }\n },\n tokens = Formatter.parseFormat(fmt),\n realTokens = tokens.reduce(\n (found, { literal, val }) => (literal ? found : found.concat(val)),\n []\n ),\n collapsed = dur.shiftTo(...realTokens.map(tokenToField).filter((t) => t));\n return stringifyTokens(tokens, tokenToString(collapsed));\n }\n}\n","import {\n untruncateYear,\n signedOffset,\n parseInteger,\n parseMillis,\n isUndefined,\n parseFloating,\n} from \"./util.js\";\nimport * as English from \"./english.js\";\nimport FixedOffsetZone from \"../zones/fixedOffsetZone.js\";\nimport IANAZone from \"../zones/IANAZone.js\";\n\n/*\n * This file handles parsing for well-specified formats. Here's how it works:\n * Two things go into parsing: a regex to match with and an extractor to take apart the groups in the match.\n * An extractor is just a function that takes a regex match array and returns a { year: ..., month: ... } object\n * parse() does the work of executing the regex and applying the extractor. It takes multiple regex/extractor pairs to try in sequence.\n * Extractors can take a \"cursor\" representing the offset in the match to look at. This makes it easy to combine extractors.\n * combineExtractors() does the work of combining them, keeping track of the cursor through multiple extractions.\n * Some extractions are super dumb and simpleParse and fromStrings help DRY them.\n */\n\nconst ianaRegex = /[A-Za-z_+-]{1,256}(?::?\\/[A-Za-z0-9_+-]{1,256}(?:\\/[A-Za-z0-9_+-]{1,256})?)?/;\n\nfunction combineRegexes(...regexes) {\n const full = regexes.reduce((f, r) => f + r.source, \"\");\n return RegExp(`^${full}$`);\n}\n\nfunction combineExtractors(...extractors) {\n return (m) =>\n extractors\n .reduce(\n ([mergedVals, mergedZone, cursor], ex) => {\n const [val, zone, next] = ex(m, cursor);\n return [{ ...mergedVals, ...val }, zone || mergedZone, next];\n },\n [{}, null, 1]\n )\n .slice(0, 2);\n}\n\nfunction parse(s, ...patterns) {\n if (s == null) {\n return [null, null];\n }\n\n for (const [regex, extractor] of patterns) {\n const m = regex.exec(s);\n if (m) {\n return extractor(m);\n }\n }\n return [null, null];\n}\n\nfunction simpleParse(...keys) {\n return (match, cursor) => {\n const ret = {};\n let i;\n\n for (i = 0; i < keys.length; i++) {\n ret[keys[i]] = parseInteger(match[cursor + i]);\n }\n return [ret, null, cursor + i];\n };\n}\n\n// ISO and SQL parsing\nconst offsetRegex = /(?:(Z)|([+-]\\d\\d)(?::?(\\d\\d))?)/;\nconst isoExtendedZone = `(?:${offsetRegex.source}?(?:\\\\[(${ianaRegex.source})\\\\])?)?`;\nconst isoTimeBaseRegex = /(\\d\\d)(?::?(\\d\\d)(?::?(\\d\\d)(?:[.,](\\d{1,30}))?)?)?/;\nconst isoTimeRegex = RegExp(`${isoTimeBaseRegex.source}${isoExtendedZone}`);\nconst isoTimeExtensionRegex = RegExp(`(?:T${isoTimeRegex.source})?`);\nconst isoYmdRegex = /([+-]\\d{6}|\\d{4})(?:-?(\\d\\d)(?:-?(\\d\\d))?)?/;\nconst isoWeekRegex = /(\\d{4})-?W(\\d\\d)(?:-?(\\d))?/;\nconst isoOrdinalRegex = /(\\d{4})-?(\\d{3})/;\nconst extractISOWeekData = simpleParse(\"weekYear\", \"weekNumber\", \"weekDay\");\nconst extractISOOrdinalData = simpleParse(\"year\", \"ordinal\");\nconst sqlYmdRegex = /(\\d{4})-(\\d\\d)-(\\d\\d)/; // dumbed-down version of the ISO one\nconst sqlTimeRegex = RegExp(\n `${isoTimeBaseRegex.source} ?(?:${offsetRegex.source}|(${ianaRegex.source}))?`\n);\nconst sqlTimeExtensionRegex = RegExp(`(?: ${sqlTimeRegex.source})?`);\n\nfunction int(match, pos, fallback) {\n const m = match[pos];\n return isUndefined(m) ? fallback : parseInteger(m);\n}\n\nfunction extractISOYmd(match, cursor) {\n const item = {\n year: int(match, cursor),\n month: int(match, cursor + 1, 1),\n day: int(match, cursor + 2, 1),\n };\n\n return [item, null, cursor + 3];\n}\n\nfunction extractISOTime(match, cursor) {\n const item = {\n hours: int(match, cursor, 0),\n minutes: int(match, cursor + 1, 0),\n seconds: int(match, cursor + 2, 0),\n milliseconds: parseMillis(match[cursor + 3]),\n };\n\n return [item, null, cursor + 4];\n}\n\nfunction extractISOOffset(match, cursor) {\n const local = !match[cursor] && !match[cursor + 1],\n fullOffset = signedOffset(match[cursor + 1], match[cursor + 2]),\n zone = local ? null : FixedOffsetZone.instance(fullOffset);\n return [{}, zone, cursor + 3];\n}\n\nfunction extractIANAZone(match, cursor) {\n const zone = match[cursor] ? IANAZone.create(match[cursor]) : null;\n return [{}, zone, cursor + 1];\n}\n\n// ISO time parsing\n\nconst isoTimeOnly = RegExp(`^T?${isoTimeBaseRegex.source}$`);\n\n// ISO duration parsing\n\nconst isoDuration =\n /^-?P(?:(?:(-?\\d{1,20}(?:\\.\\d{1,20})?)Y)?(?:(-?\\d{1,20}(?:\\.\\d{1,20})?)M)?(?:(-?\\d{1,20}(?:\\.\\d{1,20})?)W)?(?:(-?\\d{1,20}(?:\\.\\d{1,20})?)D)?(?:T(?:(-?\\d{1,20}(?:\\.\\d{1,20})?)H)?(?:(-?\\d{1,20}(?:\\.\\d{1,20})?)M)?(?:(-?\\d{1,20})(?:[.,](-?\\d{1,20}))?S)?)?)$/;\n\nfunction extractISODuration(match) {\n const [s, yearStr, monthStr, weekStr, dayStr, hourStr, minuteStr, secondStr, millisecondsStr] =\n match;\n\n const hasNegativePrefix = s[0] === \"-\";\n const negativeSeconds = secondStr && secondStr[0] === \"-\";\n\n const maybeNegate = (num, force = false) =>\n num !== undefined && (force || (num && hasNegativePrefix)) ? -num : num;\n\n return [\n {\n years: maybeNegate(parseFloating(yearStr)),\n months: maybeNegate(parseFloating(monthStr)),\n weeks: maybeNegate(parseFloating(weekStr)),\n days: maybeNegate(parseFloating(dayStr)),\n hours: maybeNegate(parseFloating(hourStr)),\n minutes: maybeNegate(parseFloating(minuteStr)),\n seconds: maybeNegate(parseFloating(secondStr), secondStr === \"-0\"),\n milliseconds: maybeNegate(parseMillis(millisecondsStr), negativeSeconds),\n },\n ];\n}\n\n// These are a little braindead. EDT *should* tell us that we're in, say, America/New_York\n// and not just that we're in -240 *right now*. But since I don't think these are used that often\n// I'm just going to ignore that\nconst obsOffsets = {\n GMT: 0,\n EDT: -4 * 60,\n EST: -5 * 60,\n CDT: -5 * 60,\n CST: -6 * 60,\n MDT: -6 * 60,\n MST: -7 * 60,\n PDT: -7 * 60,\n PST: -8 * 60,\n};\n\nfunction fromStrings(weekdayStr, yearStr, monthStr, dayStr, hourStr, minuteStr, secondStr) {\n const result = {\n year: yearStr.length === 2 ? untruncateYear(parseInteger(yearStr)) : parseInteger(yearStr),\n month: English.monthsShort.indexOf(monthStr) + 1,\n day: parseInteger(dayStr),\n hour: parseInteger(hourStr),\n minute: parseInteger(minuteStr),\n };\n\n if (secondStr) result.second = parseInteger(secondStr);\n if (weekdayStr) {\n result.weekday =\n weekdayStr.length > 3\n ? English.weekdaysLong.indexOf(weekdayStr) + 1\n : English.weekdaysShort.indexOf(weekdayStr) + 1;\n }\n\n return result;\n}\n\n// RFC 2822/5322\nconst rfc2822 =\n /^(?:(Mon|Tue|Wed|Thu|Fri|Sat|Sun),\\s)?(\\d{1,2})\\s(Jan|Feb|Mar|Apr|May|Jun|Jul|Aug|Sep|Oct|Nov|Dec)\\s(\\d{2,4})\\s(\\d\\d):(\\d\\d)(?::(\\d\\d))?\\s(?:(UT|GMT|[ECMP][SD]T)|([Zz])|(?:([+-]\\d\\d)(\\d\\d)))$/;\n\nfunction extractRFC2822(match) {\n const [\n ,\n weekdayStr,\n dayStr,\n monthStr,\n yearStr,\n hourStr,\n minuteStr,\n secondStr,\n obsOffset,\n milOffset,\n offHourStr,\n offMinuteStr,\n ] = match,\n result = fromStrings(weekdayStr, yearStr, monthStr, dayStr, hourStr, minuteStr, secondStr);\n\n let offset;\n if (obsOffset) {\n offset = obsOffsets[obsOffset];\n } else if (milOffset) {\n offset = 0;\n } else {\n offset = signedOffset(offHourStr, offMinuteStr);\n }\n\n return [result, new FixedOffsetZone(offset)];\n}\n\nfunction preprocessRFC2822(s) {\n // Remove comments and folding whitespace and replace multiple-spaces with a single space\n return s\n .replace(/\\([^()]*\\)|[\\n\\t]/g, \" \")\n .replace(/(\\s\\s+)/g, \" \")\n .trim();\n}\n\n// http date\n\nconst rfc1123 =\n /^(Mon|Tue|Wed|Thu|Fri|Sat|Sun), (\\d\\d) (Jan|Feb|Mar|Apr|May|Jun|Jul|Aug|Sep|Oct|Nov|Dec) (\\d{4}) (\\d\\d):(\\d\\d):(\\d\\d) GMT$/,\n rfc850 =\n /^(Monday|Tuesday|Wednesday|Thursday|Friday|Saturday|Sunday), (\\d\\d)-(Jan|Feb|Mar|Apr|May|Jun|Jul|Aug|Sep|Oct|Nov|Dec)-(\\d\\d) (\\d\\d):(\\d\\d):(\\d\\d) GMT$/,\n ascii =\n /^(Mon|Tue|Wed|Thu|Fri|Sat|Sun) (Jan|Feb|Mar|Apr|May|Jun|Jul|Aug|Sep|Oct|Nov|Dec) ( \\d|\\d\\d) (\\d\\d):(\\d\\d):(\\d\\d) (\\d{4})$/;\n\nfunction extractRFC1123Or850(match) {\n const [, weekdayStr, dayStr, monthStr, yearStr, hourStr, minuteStr, secondStr] = match,\n result = fromStrings(weekdayStr, yearStr, monthStr, dayStr, hourStr, minuteStr, secondStr);\n return [result, FixedOffsetZone.utcInstance];\n}\n\nfunction extractASCII(match) {\n const [, weekdayStr, monthStr, dayStr, hourStr, minuteStr, secondStr, yearStr] = match,\n result = fromStrings(weekdayStr, yearStr, monthStr, dayStr, hourStr, minuteStr, secondStr);\n return [result, FixedOffsetZone.utcInstance];\n}\n\nconst isoYmdWithTimeExtensionRegex = combineRegexes(isoYmdRegex, isoTimeExtensionRegex);\nconst isoWeekWithTimeExtensionRegex = combineRegexes(isoWeekRegex, isoTimeExtensionRegex);\nconst isoOrdinalWithTimeExtensionRegex = combineRegexes(isoOrdinalRegex, isoTimeExtensionRegex);\nconst isoTimeCombinedRegex = combineRegexes(isoTimeRegex);\n\nconst extractISOYmdTimeAndOffset = combineExtractors(\n extractISOYmd,\n extractISOTime,\n extractISOOffset,\n extractIANAZone\n);\nconst extractISOWeekTimeAndOffset = combineExtractors(\n extractISOWeekData,\n extractISOTime,\n extractISOOffset,\n extractIANAZone\n);\nconst extractISOOrdinalDateAndTime = combineExtractors(\n extractISOOrdinalData,\n extractISOTime,\n extractISOOffset,\n extractIANAZone\n);\nconst extractISOTimeAndOffset = combineExtractors(\n extractISOTime,\n extractISOOffset,\n extractIANAZone\n);\n\n/*\n * @private\n */\n\nexport function parseISODate(s) {\n return parse(\n s,\n [isoYmdWithTimeExtensionRegex, extractISOYmdTimeAndOffset],\n [isoWeekWithTimeExtensionRegex, extractISOWeekTimeAndOffset],\n [isoOrdinalWithTimeExtensionRegex, extractISOOrdinalDateAndTime],\n [isoTimeCombinedRegex, extractISOTimeAndOffset]\n );\n}\n\nexport function parseRFC2822Date(s) {\n return parse(preprocessRFC2822(s), [rfc2822, extractRFC2822]);\n}\n\nexport function parseHTTPDate(s) {\n return parse(\n s,\n [rfc1123, extractRFC1123Or850],\n [rfc850, extractRFC1123Or850],\n [ascii, extractASCII]\n );\n}\n\nexport function parseISODuration(s) {\n return parse(s, [isoDuration, extractISODuration]);\n}\n\nconst extractISOTimeOnly = combineExtractors(extractISOTime);\n\nexport function parseISOTimeOnly(s) {\n return parse(s, [isoTimeOnly, extractISOTimeOnly]);\n}\n\nconst sqlYmdWithTimeExtensionRegex = combineRegexes(sqlYmdRegex, sqlTimeExtensionRegex);\nconst sqlTimeCombinedRegex = combineRegexes(sqlTimeRegex);\n\nconst extractISOTimeOffsetAndIANAZone = combineExtractors(\n extractISOTime,\n extractISOOffset,\n extractIANAZone\n);\n\nexport function parseSQL(s) {\n return parse(\n s,\n [sqlYmdWithTimeExtensionRegex, extractISOYmdTimeAndOffset],\n [sqlTimeCombinedRegex, extractISOTimeOffsetAndIANAZone]\n );\n}\n","import { InvalidArgumentError, InvalidDurationError, InvalidUnitError } from \"./errors.js\";\nimport Formatter from \"./impl/formatter.js\";\nimport Invalid from \"./impl/invalid.js\";\nimport Locale from \"./impl/locale.js\";\nimport { parseISODuration, parseISOTimeOnly } from \"./impl/regexParser.js\";\nimport {\n asNumber,\n hasOwnProperty,\n isNumber,\n isUndefined,\n normalizeObject,\n roundTo,\n} from \"./impl/util.js\";\nimport Settings from \"./settings.js\";\nimport DateTime from \"./datetime.js\";\n\nconst INVALID = \"Invalid Duration\";\n\n// unit conversion constants\nexport const lowOrderMatrix = {\n weeks: {\n days: 7,\n hours: 7 * 24,\n minutes: 7 * 24 * 60,\n seconds: 7 * 24 * 60 * 60,\n milliseconds: 7 * 24 * 60 * 60 * 1000,\n },\n days: {\n hours: 24,\n minutes: 24 * 60,\n seconds: 24 * 60 * 60,\n milliseconds: 24 * 60 * 60 * 1000,\n },\n hours: { minutes: 60, seconds: 60 * 60, milliseconds: 60 * 60 * 1000 },\n minutes: { seconds: 60, milliseconds: 60 * 1000 },\n seconds: { milliseconds: 1000 },\n },\n casualMatrix = {\n years: {\n quarters: 4,\n months: 12,\n weeks: 52,\n days: 365,\n hours: 365 * 24,\n minutes: 365 * 24 * 60,\n seconds: 365 * 24 * 60 * 60,\n milliseconds: 365 * 24 * 60 * 60 * 1000,\n },\n quarters: {\n months: 3,\n weeks: 13,\n days: 91,\n hours: 91 * 24,\n minutes: 91 * 24 * 60,\n seconds: 91 * 24 * 60 * 60,\n milliseconds: 91 * 24 * 60 * 60 * 1000,\n },\n months: {\n weeks: 4,\n days: 30,\n hours: 30 * 24,\n minutes: 30 * 24 * 60,\n seconds: 30 * 24 * 60 * 60,\n milliseconds: 30 * 24 * 60 * 60 * 1000,\n },\n\n ...lowOrderMatrix,\n },\n daysInYearAccurate = 146097.0 / 400,\n daysInMonthAccurate = 146097.0 / 4800,\n accurateMatrix = {\n years: {\n quarters: 4,\n months: 12,\n weeks: daysInYearAccurate / 7,\n days: daysInYearAccurate,\n hours: daysInYearAccurate * 24,\n minutes: daysInYearAccurate * 24 * 60,\n seconds: daysInYearAccurate * 24 * 60 * 60,\n milliseconds: daysInYearAccurate * 24 * 60 * 60 * 1000,\n },\n quarters: {\n months: 3,\n weeks: daysInYearAccurate / 28,\n days: daysInYearAccurate / 4,\n hours: (daysInYearAccurate * 24) / 4,\n minutes: (daysInYearAccurate * 24 * 60) / 4,\n seconds: (daysInYearAccurate * 24 * 60 * 60) / 4,\n milliseconds: (daysInYearAccurate * 24 * 60 * 60 * 1000) / 4,\n },\n months: {\n weeks: daysInMonthAccurate / 7,\n days: daysInMonthAccurate,\n hours: daysInMonthAccurate * 24,\n minutes: daysInMonthAccurate * 24 * 60,\n seconds: daysInMonthAccurate * 24 * 60 * 60,\n milliseconds: daysInMonthAccurate * 24 * 60 * 60 * 1000,\n },\n ...lowOrderMatrix,\n };\n\n// units ordered by size\nconst orderedUnits = [\n \"years\",\n \"quarters\",\n \"months\",\n \"weeks\",\n \"days\",\n \"hours\",\n \"minutes\",\n \"seconds\",\n \"milliseconds\",\n];\n\nconst reverseUnits = orderedUnits.slice(0).reverse();\n\n// clone really means \"create another instance just like this one, but with these changes\"\nfunction clone(dur, alts, clear = false) {\n // deep merge for vals\n const conf = {\n values: clear ? alts.values : { ...dur.values, ...(alts.values || {}) },\n loc: dur.loc.clone(alts.loc),\n conversionAccuracy: alts.conversionAccuracy || dur.conversionAccuracy,\n matrix: alts.matrix || dur.matrix,\n };\n return new Duration(conf);\n}\n\nfunction durationToMillis(matrix, vals) {\n let sum = vals.milliseconds ?? 0;\n for (const unit of reverseUnits.slice(1)) {\n if (vals[unit]) {\n sum += vals[unit] * matrix[unit][\"milliseconds\"];\n }\n }\n return sum;\n}\n\n// NB: mutates parameters\nfunction normalizeValues(matrix, vals) {\n // the logic below assumes the overall value of the duration is positive\n // if this is not the case, factor is used to make it so\n const factor = durationToMillis(matrix, vals) < 0 ? -1 : 1;\n\n orderedUnits.reduceRight((previous, current) => {\n if (!isUndefined(vals[current])) {\n if (previous) {\n const previousVal = vals[previous] * factor;\n const conv = matrix[current][previous];\n\n // if (previousVal < 0):\n // lower order unit is negative (e.g. { years: 2, days: -2 })\n // normalize this by reducing the higher order unit by the appropriate amount\n // and increasing the lower order unit\n // this can never make the higher order unit negative, because this function only operates\n // on positive durations, so the amount of time represented by the lower order unit cannot\n // be larger than the higher order unit\n // else:\n // lower order unit is positive (e.g. { years: 2, days: 450 } or { years: -2, days: 450 })\n // in this case we attempt to convert as much as possible from the lower order unit into\n // the higher order one\n //\n // Math.floor takes care of both of these cases, rounding away from 0\n // if previousVal < 0 it makes the absolute value larger\n // if previousVal >= it makes the absolute value smaller\n const rollUp = Math.floor(previousVal / conv);\n vals[current] += rollUp * factor;\n vals[previous] -= rollUp * conv * factor;\n }\n return current;\n } else {\n return previous;\n }\n }, null);\n\n // try to convert any decimals into smaller units if possible\n // for example for { years: 2.5, days: 0, seconds: 0 } we want to get { years: 2, days: 182, hours: 12 }\n orderedUnits.reduce((previous, current) => {\n if (!isUndefined(vals[current])) {\n if (previous) {\n const fraction = vals[previous] % 1;\n vals[previous] -= fraction;\n vals[current] += fraction * matrix[previous][current];\n }\n return current;\n } else {\n return previous;\n }\n }, null);\n}\n\n// Remove all properties with a value of 0 from an object\nfunction removeZeroes(vals) {\n const newVals = {};\n for (const [key, value] of Object.entries(vals)) {\n if (value !== 0) {\n newVals[key] = value;\n }\n }\n return newVals;\n}\n\n/**\n * A Duration object represents a period of time, like \"2 months\" or \"1 day, 1 hour\". Conceptually, it's just a map of units to their quantities, accompanied by some additional configuration and methods for creating, parsing, interrogating, transforming, and formatting them. They can be used on their own or in conjunction with other Luxon types; for example, you can use {@link DateTime#plus} to add a Duration object to a DateTime, producing another DateTime.\n *\n * Here is a brief overview of commonly used methods and getters in Duration:\n *\n * * **Creation** To create a Duration, use {@link Duration.fromMillis}, {@link Duration.fromObject}, or {@link Duration.fromISO}.\n * * **Unit values** See the {@link Duration#years}, {@link Duration#months}, {@link Duration#weeks}, {@link Duration#days}, {@link Duration#hours}, {@link Duration#minutes}, {@link Duration#seconds}, {@link Duration#milliseconds} accessors.\n * * **Configuration** See {@link Duration#locale} and {@link Duration#numberingSystem} accessors.\n * * **Transformation** To create new Durations out of old ones use {@link Duration#plus}, {@link Duration#minus}, {@link Duration#normalize}, {@link Duration#set}, {@link Duration#reconfigure}, {@link Duration#shiftTo}, and {@link Duration#negate}.\n * * **Output** To convert the Duration into other representations, see {@link Duration#as}, {@link Duration#toISO}, {@link Duration#toFormat}, and {@link Duration#toJSON}\n *\n * There's are more methods documented below. In addition, for more information on subtler topics like internationalization and validity, see the external documentation.\n */\nexport default class Duration {\n /**\n * @private\n */\n constructor(config) {\n const accurate = config.conversionAccuracy === \"longterm\" || false;\n let matrix = accurate ? accurateMatrix : casualMatrix;\n\n if (config.matrix) {\n matrix = config.matrix;\n }\n\n /**\n * @access private\n */\n this.values = config.values;\n /**\n * @access private\n */\n this.loc = config.loc || Locale.create();\n /**\n * @access private\n */\n this.conversionAccuracy = accurate ? \"longterm\" : \"casual\";\n /**\n * @access private\n */\n this.invalid = config.invalid || null;\n /**\n * @access private\n */\n this.matrix = matrix;\n /**\n * @access private\n */\n this.isLuxonDuration = true;\n }\n\n /**\n * Create Duration from a number of milliseconds.\n * @param {number} count of milliseconds\n * @param {Object} opts - options for parsing\n * @param {string} [opts.locale='en-US'] - the locale to use\n * @param {string} opts.numberingSystem - the numbering system to use\n * @param {string} [opts.conversionAccuracy='casual'] - the conversion system to use\n * @return {Duration}\n */\n static fromMillis(count, opts) {\n return Duration.fromObject({ milliseconds: count }, opts);\n }\n\n /**\n * Create a Duration from a JavaScript object with keys like 'years' and 'hours'.\n * If this object is empty then a zero milliseconds duration is returned.\n * @param {Object} obj - the object to create the DateTime from\n * @param {number} obj.years\n * @param {number} obj.quarters\n * @param {number} obj.months\n * @param {number} obj.weeks\n * @param {number} obj.days\n * @param {number} obj.hours\n * @param {number} obj.minutes\n * @param {number} obj.seconds\n * @param {number} obj.milliseconds\n * @param {Object} [opts=[]] - options for creating this Duration\n * @param {string} [opts.locale='en-US'] - the locale to use\n * @param {string} opts.numberingSystem - the numbering system to use\n * @param {string} [opts.conversionAccuracy='casual'] - the preset conversion system to use\n * @param {string} [opts.matrix=Object] - the custom conversion system to use\n * @return {Duration}\n */\n static fromObject(obj, opts = {}) {\n if (obj == null || typeof obj !== \"object\") {\n throw new InvalidArgumentError(\n `Duration.fromObject: argument expected to be an object, got ${\n obj === null ? \"null\" : typeof obj\n }`\n );\n }\n\n return new Duration({\n values: normalizeObject(obj, Duration.normalizeUnit),\n loc: Locale.fromObject(opts),\n conversionAccuracy: opts.conversionAccuracy,\n matrix: opts.matrix,\n });\n }\n\n /**\n * Create a Duration from DurationLike.\n *\n * @param {Object | number | Duration} durationLike\n * One of:\n * - object with keys like 'years' and 'hours'.\n * - number representing milliseconds\n * - Duration instance\n * @return {Duration}\n */\n static fromDurationLike(durationLike) {\n if (isNumber(durationLike)) {\n return Duration.fromMillis(durationLike);\n } else if (Duration.isDuration(durationLike)) {\n return durationLike;\n } else if (typeof durationLike === \"object\") {\n return Duration.fromObject(durationLike);\n } else {\n throw new InvalidArgumentError(\n `Unknown duration argument ${durationLike} of type ${typeof durationLike}`\n );\n }\n }\n\n /**\n * Create a Duration from an ISO 8601 duration string.\n * @param {string} text - text to parse\n * @param {Object} opts - options for parsing\n * @param {string} [opts.locale='en-US'] - the locale to use\n * @param {string} opts.numberingSystem - the numbering system to use\n * @param {string} [opts.conversionAccuracy='casual'] - the preset conversion system to use\n * @param {string} [opts.matrix=Object] - the preset conversion system to use\n * @see https://en.wikipedia.org/wiki/ISO_8601#Durations\n * @example Duration.fromISO('P3Y6M1W4DT12H30M5S').toObject() //=> { years: 3, months: 6, weeks: 1, days: 4, hours: 12, minutes: 30, seconds: 5 }\n * @example Duration.fromISO('PT23H').toObject() //=> { hours: 23 }\n * @example Duration.fromISO('P5Y3M').toObject() //=> { years: 5, months: 3 }\n * @return {Duration}\n */\n static fromISO(text, opts) {\n const [parsed] = parseISODuration(text);\n if (parsed) {\n return Duration.fromObject(parsed, opts);\n } else {\n return Duration.invalid(\"unparsable\", `the input \"${text}\" can't be parsed as ISO 8601`);\n }\n }\n\n /**\n * Create a Duration from an ISO 8601 time string.\n * @param {string} text - text to parse\n * @param {Object} opts - options for parsing\n * @param {string} [opts.locale='en-US'] - the locale to use\n * @param {string} opts.numberingSystem - the numbering system to use\n * @param {string} [opts.conversionAccuracy='casual'] - the preset conversion system to use\n * @param {string} [opts.matrix=Object] - the conversion system to use\n * @see https://en.wikipedia.org/wiki/ISO_8601#Times\n * @example Duration.fromISOTime('11:22:33.444').toObject() //=> { hours: 11, minutes: 22, seconds: 33, milliseconds: 444 }\n * @example Duration.fromISOTime('11:00').toObject() //=> { hours: 11, minutes: 0, seconds: 0 }\n * @example Duration.fromISOTime('T11:00').toObject() //=> { hours: 11, minutes: 0, seconds: 0 }\n * @example Duration.fromISOTime('1100').toObject() //=> { hours: 11, minutes: 0, seconds: 0 }\n * @example Duration.fromISOTime('T1100').toObject() //=> { hours: 11, minutes: 0, seconds: 0 }\n * @return {Duration}\n */\n static fromISOTime(text, opts) {\n const [parsed] = parseISOTimeOnly(text);\n if (parsed) {\n return Duration.fromObject(parsed, opts);\n } else {\n return Duration.invalid(\"unparsable\", `the input \"${text}\" can't be parsed as ISO 8601`);\n }\n }\n\n /**\n * Create an invalid Duration.\n * @param {string} reason - simple string of why this datetime is invalid. Should not contain parameters or anything else data-dependent\n * @param {string} [explanation=null] - longer explanation, may include parameters and other useful debugging information\n * @return {Duration}\n */\n static invalid(reason, explanation = null) {\n if (!reason) {\n throw new InvalidArgumentError(\"need to specify a reason the Duration is invalid\");\n }\n\n const invalid = reason instanceof Invalid ? reason : new Invalid(reason, explanation);\n\n if (Settings.throwOnInvalid) {\n throw new InvalidDurationError(invalid);\n } else {\n return new Duration({ invalid });\n }\n }\n\n /**\n * @private\n */\n static normalizeUnit(unit) {\n const normalized = {\n year: \"years\",\n years: \"years\",\n quarter: \"quarters\",\n quarters: \"quarters\",\n month: \"months\",\n months: \"months\",\n week: \"weeks\",\n weeks: \"weeks\",\n day: \"days\",\n days: \"days\",\n hour: \"hours\",\n hours: \"hours\",\n minute: \"minutes\",\n minutes: \"minutes\",\n second: \"seconds\",\n seconds: \"seconds\",\n millisecond: \"milliseconds\",\n milliseconds: \"milliseconds\",\n }[unit ? unit.toLowerCase() : unit];\n\n if (!normalized) throw new InvalidUnitError(unit);\n\n return normalized;\n }\n\n /**\n * Check if an object is a Duration. Works across context boundaries\n * @param {object} o\n * @return {boolean}\n */\n static isDuration(o) {\n return (o && o.isLuxonDuration) || false;\n }\n\n /**\n * Get the locale of a Duration, such 'en-GB'\n * @type {string}\n */\n get locale() {\n return this.isValid ? this.loc.locale : null;\n }\n\n /**\n * Get the numbering system of a Duration, such 'beng'. The numbering system is used when formatting the Duration\n *\n * @type {string}\n */\n get numberingSystem() {\n return this.isValid ? this.loc.numberingSystem : null;\n }\n\n /**\n * Returns a string representation of this Duration formatted according to the specified format string. You may use these tokens:\n * * `S` for milliseconds\n * * `s` for seconds\n * * `m` for minutes\n * * `h` for hours\n * * `d` for days\n * * `w` for weeks\n * * `M` for months\n * * `y` for years\n * Notes:\n * * Add padding by repeating the token, e.g. \"yy\" pads the years to two digits, \"hhhh\" pads the hours out to four digits\n * * Tokens can be escaped by wrapping with single quotes.\n * * The duration will be converted to the set of units in the format string using {@link Duration#shiftTo} and the Durations's conversion accuracy setting.\n * @param {string} fmt - the format string\n * @param {Object} opts - options\n * @param {boolean} [opts.floor=true] - floor numerical values\n * @example Duration.fromObject({ years: 1, days: 6, seconds: 2 }).toFormat(\"y d s\") //=> \"1 6 2\"\n * @example Duration.fromObject({ years: 1, days: 6, seconds: 2 }).toFormat(\"yy dd sss\") //=> \"01 06 002\"\n * @example Duration.fromObject({ years: 1, days: 6, seconds: 2 }).toFormat(\"M S\") //=> \"12 518402000\"\n * @return {string}\n */\n toFormat(fmt, opts = {}) {\n // reverse-compat since 1.2; we always round down now, never up, and we do it by default\n const fmtOpts = {\n ...opts,\n floor: opts.round !== false && opts.floor !== false,\n };\n return this.isValid\n ? Formatter.create(this.loc, fmtOpts).formatDurationFromString(this, fmt)\n : INVALID;\n }\n\n /**\n * Returns a string representation of a Duration with all units included.\n * To modify its behavior, use `listStyle` and any Intl.NumberFormat option, though `unitDisplay` is especially relevant.\n * @see https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Intl/NumberFormat/NumberFormat#options\n * @param {Object} opts - Formatting options. Accepts the same keys as the options parameter of the native `Intl.NumberFormat` constructor, as well as `listStyle`.\n * @param {string} [opts.listStyle='narrow'] - How to format the merged list. Corresponds to the `style` property of the options parameter of the native `Intl.ListFormat` constructor.\n * @example\n * ```js\n * var dur = Duration.fromObject({ days: 1, hours: 5, minutes: 6 })\n * dur.toHuman() //=> '1 day, 5 hours, 6 minutes'\n * dur.toHuman({ listStyle: \"long\" }) //=> '1 day, 5 hours, and 6 minutes'\n * dur.toHuman({ unitDisplay: \"short\" }) //=> '1 day, 5 hr, 6 min'\n * ```\n */\n toHuman(opts = {}) {\n if (!this.isValid) return INVALID;\n\n const l = orderedUnits\n .map((unit) => {\n const val = this.values[unit];\n if (isUndefined(val)) {\n return null;\n }\n return this.loc\n .numberFormatter({ style: \"unit\", unitDisplay: \"long\", ...opts, unit: unit.slice(0, -1) })\n .format(val);\n })\n .filter((n) => n);\n\n return this.loc\n .listFormatter({ type: \"conjunction\", style: opts.listStyle || \"narrow\", ...opts })\n .format(l);\n }\n\n /**\n * Returns a JavaScript object with this Duration's values.\n * @example Duration.fromObject({ years: 1, days: 6, seconds: 2 }).toObject() //=> { years: 1, days: 6, seconds: 2 }\n * @return {Object}\n */\n toObject() {\n if (!this.isValid) return {};\n return { ...this.values };\n }\n\n /**\n * Returns an ISO 8601-compliant string representation of this Duration.\n * @see https://en.wikipedia.org/wiki/ISO_8601#Durations\n * @example Duration.fromObject({ years: 3, seconds: 45 }).toISO() //=> 'P3YT45S'\n * @example Duration.fromObject({ months: 4, seconds: 45 }).toISO() //=> 'P4MT45S'\n * @example Duration.fromObject({ months: 5 }).toISO() //=> 'P5M'\n * @example Duration.fromObject({ minutes: 5 }).toISO() //=> 'PT5M'\n * @example Duration.fromObject({ milliseconds: 6 }).toISO() //=> 'PT0.006S'\n * @return {string}\n */\n toISO() {\n // we could use the formatter, but this is an easier way to get the minimum string\n if (!this.isValid) return null;\n\n let s = \"P\";\n if (this.years !== 0) s += this.years + \"Y\";\n if (this.months !== 0 || this.quarters !== 0) s += this.months + this.quarters * 3 + \"M\";\n if (this.weeks !== 0) s += this.weeks + \"W\";\n if (this.days !== 0) s += this.days + \"D\";\n if (this.hours !== 0 || this.minutes !== 0 || this.seconds !== 0 || this.milliseconds !== 0)\n s += \"T\";\n if (this.hours !== 0) s += this.hours + \"H\";\n if (this.minutes !== 0) s += this.minutes + \"M\";\n if (this.seconds !== 0 || this.milliseconds !== 0)\n // this will handle \"floating point madness\" by removing extra decimal places\n // https://stackoverflow.com/questions/588004/is-floating-point-math-broken\n s += roundTo(this.seconds + this.milliseconds / 1000, 3) + \"S\";\n if (s === \"P\") s += \"T0S\";\n return s;\n }\n\n /**\n * Returns an ISO 8601-compliant string representation of this Duration, formatted as a time of day.\n * Note that this will return null if the duration is invalid, negative, or equal to or greater than 24 hours.\n * @see https://en.wikipedia.org/wiki/ISO_8601#Times\n * @param {Object} opts - options\n * @param {boolean} [opts.suppressMilliseconds=false] - exclude milliseconds from the format if they're 0\n * @param {boolean} [opts.suppressSeconds=false] - exclude seconds from the format if they're 0\n * @param {boolean} [opts.includePrefix=false] - include the `T` prefix\n * @param {string} [opts.format='extended'] - choose between the basic and extended format\n * @example Duration.fromObject({ hours: 11 }).toISOTime() //=> '11:00:00.000'\n * @example Duration.fromObject({ hours: 11 }).toISOTime({ suppressMilliseconds: true }) //=> '11:00:00'\n * @example Duration.fromObject({ hours: 11 }).toISOTime({ suppressSeconds: true }) //=> '11:00'\n * @example Duration.fromObject({ hours: 11 }).toISOTime({ includePrefix: true }) //=> 'T11:00:00.000'\n * @example Duration.fromObject({ hours: 11 }).toISOTime({ format: 'basic' }) //=> '110000.000'\n * @return {string}\n */\n toISOTime(opts = {}) {\n if (!this.isValid) return null;\n\n const millis = this.toMillis();\n if (millis < 0 || millis >= 86400000) return null;\n\n opts = {\n suppressMilliseconds: false,\n suppressSeconds: false,\n includePrefix: false,\n format: \"extended\",\n ...opts,\n includeOffset: false,\n };\n\n const dateTime = DateTime.fromMillis(millis, { zone: \"UTC\" });\n return dateTime.toISOTime(opts);\n }\n\n /**\n * Returns an ISO 8601 representation of this Duration appropriate for use in JSON.\n * @return {string}\n */\n toJSON() {\n return this.toISO();\n }\n\n /**\n * Returns an ISO 8601 representation of this Duration appropriate for use in debugging.\n * @return {string}\n */\n toString() {\n return this.toISO();\n }\n\n /**\n * Returns a string representation of this Duration appropriate for the REPL.\n * @return {string}\n */\n [Symbol.for(\"nodejs.util.inspect.custom\")]() {\n if (this.isValid) {\n return `Duration { values: ${JSON.stringify(this.values)} }`;\n } else {\n return `Duration { Invalid, reason: ${this.invalidReason} }`;\n }\n }\n\n /**\n * Returns an milliseconds value of this Duration.\n * @return {number}\n */\n toMillis() {\n if (!this.isValid) return NaN;\n\n return durationToMillis(this.matrix, this.values);\n }\n\n /**\n * Returns an milliseconds value of this Duration. Alias of {@link toMillis}\n * @return {number}\n */\n valueOf() {\n return this.toMillis();\n }\n\n /**\n * Make this Duration longer by the specified amount. Return a newly-constructed Duration.\n * @param {Duration|Object|number} duration - The amount to add. Either a Luxon Duration, a number of milliseconds, the object argument to Duration.fromObject()\n * @return {Duration}\n */\n plus(duration) {\n if (!this.isValid) return this;\n\n const dur = Duration.fromDurationLike(duration),\n result = {};\n\n for (const k of orderedUnits) {\n if (hasOwnProperty(dur.values, k) || hasOwnProperty(this.values, k)) {\n result[k] = dur.get(k) + this.get(k);\n }\n }\n\n return clone(this, { values: result }, true);\n }\n\n /**\n * Make this Duration shorter by the specified amount. Return a newly-constructed Duration.\n * @param {Duration|Object|number} duration - The amount to subtract. Either a Luxon Duration, a number of milliseconds, the object argument to Duration.fromObject()\n * @return {Duration}\n */\n minus(duration) {\n if (!this.isValid) return this;\n\n const dur = Duration.fromDurationLike(duration);\n return this.plus(dur.negate());\n }\n\n /**\n * Scale this Duration by the specified amount. Return a newly-constructed Duration.\n * @param {function} fn - The function to apply to each unit. Arity is 1 or 2: the value of the unit and, optionally, the unit name. Must return a number.\n * @example Duration.fromObject({ hours: 1, minutes: 30 }).mapUnits(x => x * 2) //=> { hours: 2, minutes: 60 }\n * @example Duration.fromObject({ hours: 1, minutes: 30 }).mapUnits((x, u) => u === \"hours\" ? x * 2 : x) //=> { hours: 2, minutes: 30 }\n * @return {Duration}\n */\n mapUnits(fn) {\n if (!this.isValid) return this;\n const result = {};\n for (const k of Object.keys(this.values)) {\n result[k] = asNumber(fn(this.values[k], k));\n }\n return clone(this, { values: result }, true);\n }\n\n /**\n * Get the value of unit.\n * @param {string} unit - a unit such as 'minute' or 'day'\n * @example Duration.fromObject({years: 2, days: 3}).get('years') //=> 2\n * @example Duration.fromObject({years: 2, days: 3}).get('months') //=> 0\n * @example Duration.fromObject({years: 2, days: 3}).get('days') //=> 3\n * @return {number}\n */\n get(unit) {\n return this[Duration.normalizeUnit(unit)];\n }\n\n /**\n * \"Set\" the values of specified units. Return a newly-constructed Duration.\n * @param {Object} values - a mapping of units to numbers\n * @example dur.set({ years: 2017 })\n * @example dur.set({ hours: 8, minutes: 30 })\n * @return {Duration}\n */\n set(values) {\n if (!this.isValid) return this;\n\n const mixed = { ...this.values, ...normalizeObject(values, Duration.normalizeUnit) };\n return clone(this, { values: mixed });\n }\n\n /**\n * \"Set\" the locale and/or numberingSystem. Returns a newly-constructed Duration.\n * @example dur.reconfigure({ locale: 'en-GB' })\n * @return {Duration}\n */\n reconfigure({ locale, numberingSystem, conversionAccuracy, matrix } = {}) {\n const loc = this.loc.clone({ locale, numberingSystem });\n const opts = { loc, matrix, conversionAccuracy };\n return clone(this, opts);\n }\n\n /**\n * Return the length of the duration in the specified unit.\n * @param {string} unit - a unit such as 'minutes' or 'days'\n * @example Duration.fromObject({years: 1}).as('days') //=> 365\n * @example Duration.fromObject({years: 1}).as('months') //=> 12\n * @example Duration.fromObject({hours: 60}).as('days') //=> 2.5\n * @return {number}\n */\n as(unit) {\n return this.isValid ? this.shiftTo(unit).get(unit) : NaN;\n }\n\n /**\n * Reduce this Duration to its canonical representation in its current units.\n * Assuming the overall value of the Duration is positive, this means:\n * - excessive values for lower-order units are converted to higher-order units (if possible, see first and second example)\n * - negative lower-order units are converted to higher order units (there must be such a higher order unit, otherwise\n * the overall value would be negative, see third example)\n * - fractional values for higher-order units are converted to lower-order units (if possible, see fourth example)\n *\n * If the overall value is negative, the result of this method is equivalent to `this.negate().normalize().negate()`.\n * @example Duration.fromObject({ years: 2, days: 5000 }).normalize().toObject() //=> { years: 15, days: 255 }\n * @example Duration.fromObject({ days: 5000 }).normalize().toObject() //=> { days: 5000 }\n * @example Duration.fromObject({ hours: 12, minutes: -45 }).normalize().toObject() //=> { hours: 11, minutes: 15 }\n * @example Duration.fromObject({ years: 2.5, days: 0, hours: 0 }).normalize().toObject() //=> { years: 2, days: 182, hours: 12 }\n * @return {Duration}\n */\n normalize() {\n if (!this.isValid) return this;\n const vals = this.toObject();\n normalizeValues(this.matrix, vals);\n return clone(this, { values: vals }, true);\n }\n\n /**\n * Rescale units to its largest representation\n * @example Duration.fromObject({ milliseconds: 90000 }).rescale().toObject() //=> { minutes: 1, seconds: 30 }\n * @return {Duration}\n */\n rescale() {\n if (!this.isValid) return this;\n const vals = removeZeroes(this.normalize().shiftToAll().toObject());\n return clone(this, { values: vals }, true);\n }\n\n /**\n * Convert this Duration into its representation in a different set of units.\n * @example Duration.fromObject({ hours: 1, seconds: 30 }).shiftTo('minutes', 'milliseconds').toObject() //=> { minutes: 60, milliseconds: 30000 }\n * @return {Duration}\n */\n shiftTo(...units) {\n if (!this.isValid) return this;\n\n if (units.length === 0) {\n return this;\n }\n\n units = units.map((u) => Duration.normalizeUnit(u));\n\n const built = {},\n accumulated = {},\n vals = this.toObject();\n let lastUnit;\n\n for (const k of orderedUnits) {\n if (units.indexOf(k) >= 0) {\n lastUnit = k;\n\n let own = 0;\n\n // anything we haven't boiled down yet should get boiled to this unit\n for (const ak in accumulated) {\n own += this.matrix[ak][k] * accumulated[ak];\n accumulated[ak] = 0;\n }\n\n // plus anything that's already in this unit\n if (isNumber(vals[k])) {\n own += vals[k];\n }\n\n // only keep the integer part for now in the hopes of putting any decimal part\n // into a smaller unit later\n const i = Math.trunc(own);\n built[k] = i;\n accumulated[k] = (own * 1000 - i * 1000) / 1000;\n\n // otherwise, keep it in the wings to boil it later\n } else if (isNumber(vals[k])) {\n accumulated[k] = vals[k];\n }\n }\n\n // anything leftover becomes the decimal for the last unit\n // lastUnit must be defined since units is not empty\n for (const key in accumulated) {\n if (accumulated[key] !== 0) {\n built[lastUnit] +=\n key === lastUnit ? accumulated[key] : accumulated[key] / this.matrix[lastUnit][key];\n }\n }\n\n normalizeValues(this.matrix, built);\n return clone(this, { values: built }, true);\n }\n\n /**\n * Shift this Duration to all available units.\n * Same as shiftTo(\"years\", \"months\", \"weeks\", \"days\", \"hours\", \"minutes\", \"seconds\", \"milliseconds\")\n * @return {Duration}\n */\n shiftToAll() {\n if (!this.isValid) return this;\n return this.shiftTo(\n \"years\",\n \"months\",\n \"weeks\",\n \"days\",\n \"hours\",\n \"minutes\",\n \"seconds\",\n \"milliseconds\"\n );\n }\n\n /**\n * Return the negative of this Duration.\n * @example Duration.fromObject({ hours: 1, seconds: 30 }).negate().toObject() //=> { hours: -1, seconds: -30 }\n * @return {Duration}\n */\n negate() {\n if (!this.isValid) return this;\n const negated = {};\n for (const k of Object.keys(this.values)) {\n negated[k] = this.values[k] === 0 ? 0 : -this.values[k];\n }\n return clone(this, { values: negated }, true);\n }\n\n /**\n * Get the years.\n * @type {number}\n */\n get years() {\n return this.isValid ? this.values.years || 0 : NaN;\n }\n\n /**\n * Get the quarters.\n * @type {number}\n */\n get quarters() {\n return this.isValid ? this.values.quarters || 0 : NaN;\n }\n\n /**\n * Get the months.\n * @type {number}\n */\n get months() {\n return this.isValid ? this.values.months || 0 : NaN;\n }\n\n /**\n * Get the weeks\n * @type {number}\n */\n get weeks() {\n return this.isValid ? this.values.weeks || 0 : NaN;\n }\n\n /**\n * Get the days.\n * @type {number}\n */\n get days() {\n return this.isValid ? this.values.days || 0 : NaN;\n }\n\n /**\n * Get the hours.\n * @type {number}\n */\n get hours() {\n return this.isValid ? this.values.hours || 0 : NaN;\n }\n\n /**\n * Get the minutes.\n * @type {number}\n */\n get minutes() {\n return this.isValid ? this.values.minutes || 0 : NaN;\n }\n\n /**\n * Get the seconds.\n * @return {number}\n */\n get seconds() {\n return this.isValid ? this.values.seconds || 0 : NaN;\n }\n\n /**\n * Get the milliseconds.\n * @return {number}\n */\n get milliseconds() {\n return this.isValid ? this.values.milliseconds || 0 : NaN;\n }\n\n /**\n * Returns whether the Duration is invalid. Invalid durations are returned by diff operations\n * on invalid DateTimes or Intervals.\n * @return {boolean}\n */\n get isValid() {\n return this.invalid === null;\n }\n\n /**\n * Returns an error code if this Duration became invalid, or null if the Duration is valid\n * @return {string}\n */\n get invalidReason() {\n return this.invalid ? this.invalid.reason : null;\n }\n\n /**\n * Returns an explanation of why this Duration became invalid, or null if the Duration is valid\n * @type {string}\n */\n get invalidExplanation() {\n return this.invalid ? this.invalid.explanation : null;\n }\n\n /**\n * Equality check\n * Two Durations are equal iff they have the same units and the same values for each unit.\n * @param {Duration} other\n * @return {boolean}\n */\n equals(other) {\n if (!this.isValid || !other.isValid) {\n return false;\n }\n\n if (!this.loc.equals(other.loc)) {\n return false;\n }\n\n function eq(v1, v2) {\n // Consider 0 and undefined as equal\n if (v1 === undefined || v1 === 0) return v2 === undefined || v2 === 0;\n return v1 === v2;\n }\n\n for (const u of orderedUnits) {\n if (!eq(this.values[u], other.values[u])) {\n return false;\n }\n }\n return true;\n }\n}\n","import DateTime, { friendlyDateTime } from \"./datetime.js\";\nimport Duration from \"./duration.js\";\nimport Settings from \"./settings.js\";\nimport { InvalidArgumentError, InvalidIntervalError } from \"./errors.js\";\nimport Invalid from \"./impl/invalid.js\";\nimport Formatter from \"./impl/formatter.js\";\nimport * as Formats from \"./impl/formats.js\";\n\nconst INVALID = \"Invalid Interval\";\n\n// checks if the start is equal to or before the end\nfunction validateStartEnd(start, end) {\n if (!start || !start.isValid) {\n return Interval.invalid(\"missing or invalid start\");\n } else if (!end || !end.isValid) {\n return Interval.invalid(\"missing or invalid end\");\n } else if (end < start) {\n return Interval.invalid(\n \"end before start\",\n `The end of an interval must be after its start, but you had start=${start.toISO()} and end=${end.toISO()}`\n );\n } else {\n return null;\n }\n}\n\n/**\n * An Interval object represents a half-open interval of time, where each endpoint is a {@link DateTime}. Conceptually, it's a container for those two endpoints, accompanied by methods for creating, parsing, interrogating, comparing, transforming, and formatting them.\n *\n * Here is a brief overview of the most commonly used methods and getters in Interval:\n *\n * * **Creation** To create an Interval, use {@link Interval.fromDateTimes}, {@link Interval.after}, {@link Interval.before}, or {@link Interval.fromISO}.\n * * **Accessors** Use {@link Interval#start} and {@link Interval#end} to get the start and end.\n * * **Interrogation** To analyze the Interval, use {@link Interval#count}, {@link Interval#length}, {@link Interval#hasSame}, {@link Interval#contains}, {@link Interval#isAfter}, or {@link Interval#isBefore}.\n * * **Transformation** To create other Intervals out of this one, use {@link Interval#set}, {@link Interval#splitAt}, {@link Interval#splitBy}, {@link Interval#divideEqually}, {@link Interval.merge}, {@link Interval.xor}, {@link Interval#union}, {@link Interval#intersection}, or {@link Interval#difference}.\n * * **Comparison** To compare this Interval to another one, use {@link Interval#equals}, {@link Interval#overlaps}, {@link Interval#abutsStart}, {@link Interval#abutsEnd}, {@link Interval#engulfs}\n * * **Output** To convert the Interval into other representations, see {@link Interval#toString}, {@link Interval#toLocaleString}, {@link Interval#toISO}, {@link Interval#toISODate}, {@link Interval#toISOTime}, {@link Interval#toFormat}, and {@link Interval#toDuration}.\n */\nexport default class Interval {\n /**\n * @private\n */\n constructor(config) {\n /**\n * @access private\n */\n this.s = config.start;\n /**\n * @access private\n */\n this.e = config.end;\n /**\n * @access private\n */\n this.invalid = config.invalid || null;\n /**\n * @access private\n */\n this.isLuxonInterval = true;\n }\n\n /**\n * Create an invalid Interval.\n * @param {string} reason - simple string of why this Interval is invalid. Should not contain parameters or anything else data-dependent\n * @param {string} [explanation=null] - longer explanation, may include parameters and other useful debugging information\n * @return {Interval}\n */\n static invalid(reason, explanation = null) {\n if (!reason) {\n throw new InvalidArgumentError(\"need to specify a reason the Interval is invalid\");\n }\n\n const invalid = reason instanceof Invalid ? reason : new Invalid(reason, explanation);\n\n if (Settings.throwOnInvalid) {\n throw new InvalidIntervalError(invalid);\n } else {\n return new Interval({ invalid });\n }\n }\n\n /**\n * Create an Interval from a start DateTime and an end DateTime. Inclusive of the start but not the end.\n * @param {DateTime|Date|Object} start\n * @param {DateTime|Date|Object} end\n * @return {Interval}\n */\n static fromDateTimes(start, end) {\n const builtStart = friendlyDateTime(start),\n builtEnd = friendlyDateTime(end);\n\n const validateError = validateStartEnd(builtStart, builtEnd);\n\n if (validateError == null) {\n return new Interval({\n start: builtStart,\n end: builtEnd,\n });\n } else {\n return validateError;\n }\n }\n\n /**\n * Create an Interval from a start DateTime and a Duration to extend to.\n * @param {DateTime|Date|Object} start\n * @param {Duration|Object|number} duration - the length of the Interval.\n * @return {Interval}\n */\n static after(start, duration) {\n const dur = Duration.fromDurationLike(duration),\n dt = friendlyDateTime(start);\n return Interval.fromDateTimes(dt, dt.plus(dur));\n }\n\n /**\n * Create an Interval from an end DateTime and a Duration to extend backwards to.\n * @param {DateTime|Date|Object} end\n * @param {Duration|Object|number} duration - the length of the Interval.\n * @return {Interval}\n */\n static before(end, duration) {\n const dur = Duration.fromDurationLike(duration),\n dt = friendlyDateTime(end);\n return Interval.fromDateTimes(dt.minus(dur), dt);\n }\n\n /**\n * Create an Interval from an ISO 8601 string.\n * Accepts `<start>/<end>`, `<start>/<duration>`, and `<duration>/<end>` formats.\n * @param {string} text - the ISO string to parse\n * @param {Object} [opts] - options to pass {@link DateTime#fromISO} and optionally {@link Duration#fromISO}\n * @see https://en.wikipedia.org/wiki/ISO_8601#Time_intervals\n * @return {Interval}\n */\n static fromISO(text, opts) {\n const [s, e] = (text || \"\").split(\"/\", 2);\n if (s && e) {\n let start, startIsValid;\n try {\n start = DateTime.fromISO(s, opts);\n startIsValid = start.isValid;\n } catch (e) {\n startIsValid = false;\n }\n\n let end, endIsValid;\n try {\n end = DateTime.fromISO(e, opts);\n endIsValid = end.isValid;\n } catch (e) {\n endIsValid = false;\n }\n\n if (startIsValid && endIsValid) {\n return Interval.fromDateTimes(start, end);\n }\n\n if (startIsValid) {\n const dur = Duration.fromISO(e, opts);\n if (dur.isValid) {\n return Interval.after(start, dur);\n }\n } else if (endIsValid) {\n const dur = Duration.fromISO(s, opts);\n if (dur.isValid) {\n return Interval.before(end, dur);\n }\n }\n }\n return Interval.invalid(\"unparsable\", `the input \"${text}\" can't be parsed as ISO 8601`);\n }\n\n /**\n * Check if an object is an Interval. Works across context boundaries\n * @param {object} o\n * @return {boolean}\n */\n static isInterval(o) {\n return (o && o.isLuxonInterval) || false;\n }\n\n /**\n * Returns the start of the Interval\n * @type {DateTime}\n */\n get start() {\n return this.isValid ? this.s : null;\n }\n\n /**\n * Returns the end of the Interval\n * @type {DateTime}\n */\n get end() {\n return this.isValid ? this.e : null;\n }\n\n /**\n * Returns whether this Interval's end is at least its start, meaning that the Interval isn't 'backwards'.\n * @type {boolean}\n */\n get isValid() {\n return this.invalidReason === null;\n }\n\n /**\n * Returns an error code if this Interval is invalid, or null if the Interval is valid\n * @type {string}\n */\n get invalidReason() {\n return this.invalid ? this.invalid.reason : null;\n }\n\n /**\n * Returns an explanation of why this Interval became invalid, or null if the Interval is valid\n * @type {string}\n */\n get invalidExplanation() {\n return this.invalid ? this.invalid.explanation : null;\n }\n\n /**\n * Returns the length of the Interval in the specified unit.\n * @param {string} unit - the unit (such as 'hours' or 'days') to return the length in.\n * @return {number}\n */\n length(unit = \"milliseconds\") {\n return this.isValid ? this.toDuration(...[unit]).get(unit) : NaN;\n }\n\n /**\n * Returns the count of minutes, hours, days, months, or years included in the Interval, even in part.\n * Unlike {@link Interval#length} this counts sections of the calendar, not periods of time, e.g. specifying 'day'\n * asks 'what dates are included in this interval?', not 'how many days long is this interval?'\n * @param {string} [unit='milliseconds'] - the unit of time to count.\n * @param {Object} opts - options\n * @param {boolean} [opts.useLocaleWeeks=false] - If true, use weeks based on the locale, i.e. use the locale-dependent start of the week; this operation will always use the locale of the start DateTime\n * @return {number}\n */\n count(unit = \"milliseconds\", opts) {\n if (!this.isValid) return NaN;\n const start = this.start.startOf(unit, opts);\n let end;\n if (opts?.useLocaleWeeks) {\n end = this.end.reconfigure({ locale: start.locale });\n } else {\n end = this.end;\n }\n end = end.startOf(unit, opts);\n return Math.floor(end.diff(start, unit).get(unit)) + (end.valueOf() !== this.end.valueOf());\n }\n\n /**\n * Returns whether this Interval's start and end are both in the same unit of time\n * @param {string} unit - the unit of time to check sameness on\n * @return {boolean}\n */\n hasSame(unit) {\n return this.isValid ? this.isEmpty() || this.e.minus(1).hasSame(this.s, unit) : false;\n }\n\n /**\n * Return whether this Interval has the same start and end DateTimes.\n * @return {boolean}\n */\n isEmpty() {\n return this.s.valueOf() === this.e.valueOf();\n }\n\n /**\n * Return whether this Interval's start is after the specified DateTime.\n * @param {DateTime} dateTime\n * @return {boolean}\n */\n isAfter(dateTime) {\n if (!this.isValid) return false;\n return this.s > dateTime;\n }\n\n /**\n * Return whether this Interval's end is before the specified DateTime.\n * @param {DateTime} dateTime\n * @return {boolean}\n */\n isBefore(dateTime) {\n if (!this.isValid) return false;\n return this.e <= dateTime;\n }\n\n /**\n * Return whether this Interval contains the specified DateTime.\n * @param {DateTime} dateTime\n * @return {boolean}\n */\n contains(dateTime) {\n if (!this.isValid) return false;\n return this.s <= dateTime && this.e > dateTime;\n }\n\n /**\n * \"Sets\" the start and/or end dates. Returns a newly-constructed Interval.\n * @param {Object} values - the values to set\n * @param {DateTime} values.start - the starting DateTime\n * @param {DateTime} values.end - the ending DateTime\n * @return {Interval}\n */\n set({ start, end } = {}) {\n if (!this.isValid) return this;\n return Interval.fromDateTimes(start || this.s, end || this.e);\n }\n\n /**\n * Split this Interval at each of the specified DateTimes\n * @param {...DateTime} dateTimes - the unit of time to count.\n * @return {Array}\n */\n splitAt(...dateTimes) {\n if (!this.isValid) return [];\n const sorted = dateTimes\n .map(friendlyDateTime)\n .filter((d) => this.contains(d))\n .sort((a, b) => a.toMillis() - b.toMillis()),\n results = [];\n let { s } = this,\n i = 0;\n\n while (s < this.e) {\n const added = sorted[i] || this.e,\n next = +added > +this.e ? this.e : added;\n results.push(Interval.fromDateTimes(s, next));\n s = next;\n i += 1;\n }\n\n return results;\n }\n\n /**\n * Split this Interval into smaller Intervals, each of the specified length.\n * Left over time is grouped into a smaller interval\n * @param {Duration|Object|number} duration - The length of each resulting interval.\n * @return {Array}\n */\n splitBy(duration) {\n const dur = Duration.fromDurationLike(duration);\n\n if (!this.isValid || !dur.isValid || dur.as(\"milliseconds\") === 0) {\n return [];\n }\n\n let { s } = this,\n idx = 1,\n next;\n\n const results = [];\n while (s < this.e) {\n const added = this.start.plus(dur.mapUnits((x) => x * idx));\n next = +added > +this.e ? this.e : added;\n results.push(Interval.fromDateTimes(s, next));\n s = next;\n idx += 1;\n }\n\n return results;\n }\n\n /**\n * Split this Interval into the specified number of smaller intervals.\n * @param {number} numberOfParts - The number of Intervals to divide the Interval into.\n * @return {Array}\n */\n divideEqually(numberOfParts) {\n if (!this.isValid) return [];\n return this.splitBy(this.length() / numberOfParts).slice(0, numberOfParts);\n }\n\n /**\n * Return whether this Interval overlaps with the specified Interval\n * @param {Interval} other\n * @return {boolean}\n */\n overlaps(other) {\n return this.e > other.s && this.s < other.e;\n }\n\n /**\n * Return whether this Interval's end is adjacent to the specified Interval's start.\n * @param {Interval} other\n * @return {boolean}\n */\n abutsStart(other) {\n if (!this.isValid) return false;\n return +this.e === +other.s;\n }\n\n /**\n * Return whether this Interval's start is adjacent to the specified Interval's end.\n * @param {Interval} other\n * @return {boolean}\n */\n abutsEnd(other) {\n if (!this.isValid) return false;\n return +other.e === +this.s;\n }\n\n /**\n * Returns true if this Interval fully contains the specified Interval, specifically if the intersect (of this Interval and the other Interval) is equal to the other Interval; false otherwise.\n * @param {Interval} other\n * @return {boolean}\n */\n engulfs(other) {\n if (!this.isValid) return false;\n return this.s <= other.s && this.e >= other.e;\n }\n\n /**\n * Return whether this Interval has the same start and end as the specified Interval.\n * @param {Interval} other\n * @return {boolean}\n */\n equals(other) {\n if (!this.isValid || !other.isValid) {\n return false;\n }\n\n return this.s.equals(other.s) && this.e.equals(other.e);\n }\n\n /**\n * Return an Interval representing the intersection of this Interval and the specified Interval.\n * Specifically, the resulting Interval has the maximum start time and the minimum end time of the two Intervals.\n * Returns null if the intersection is empty, meaning, the intervals don't intersect.\n * @param {Interval} other\n * @return {Interval}\n */\n intersection(other) {\n if (!this.isValid) return this;\n const s = this.s > other.s ? this.s : other.s,\n e = this.e < other.e ? this.e : other.e;\n\n if (s >= e) {\n return null;\n } else {\n return Interval.fromDateTimes(s, e);\n }\n }\n\n /**\n * Return an Interval representing the union of this Interval and the specified Interval.\n * Specifically, the resulting Interval has the minimum start time and the maximum end time of the two Intervals.\n * @param {Interval} other\n * @return {Interval}\n */\n union(other) {\n if (!this.isValid) return this;\n const s = this.s < other.s ? this.s : other.s,\n e = this.e > other.e ? this.e : other.e;\n return Interval.fromDateTimes(s, e);\n }\n\n /**\n * Merge an array of Intervals into a equivalent minimal set of Intervals.\n * Combines overlapping and adjacent Intervals.\n * @param {Array} intervals\n * @return {Array}\n */\n static merge(intervals) {\n const [found, final] = intervals\n .sort((a, b) => a.s - b.s)\n .reduce(\n ([sofar, current], item) => {\n if (!current) {\n return [sofar, item];\n } else if (current.overlaps(item) || current.abutsStart(item)) {\n return [sofar, current.union(item)];\n } else {\n return [sofar.concat([current]), item];\n }\n },\n [[], null]\n );\n if (final) {\n found.push(final);\n }\n return found;\n }\n\n /**\n * Return an array of Intervals representing the spans of time that only appear in one of the specified Intervals.\n * @param {Array} intervals\n * @return {Array}\n */\n static xor(intervals) {\n let start = null,\n currentCount = 0;\n const results = [],\n ends = intervals.map((i) => [\n { time: i.s, type: \"s\" },\n { time: i.e, type: \"e\" },\n ]),\n flattened = Array.prototype.concat(...ends),\n arr = flattened.sort((a, b) => a.time - b.time);\n\n for (const i of arr) {\n currentCount += i.type === \"s\" ? 1 : -1;\n\n if (currentCount === 1) {\n start = i.time;\n } else {\n if (start && +start !== +i.time) {\n results.push(Interval.fromDateTimes(start, i.time));\n }\n\n start = null;\n }\n }\n\n return Interval.merge(results);\n }\n\n /**\n * Return an Interval representing the span of time in this Interval that doesn't overlap with any of the specified Intervals.\n * @param {...Interval} intervals\n * @return {Array}\n */\n difference(...intervals) {\n return Interval.xor([this].concat(intervals))\n .map((i) => this.intersection(i))\n .filter((i) => i && !i.isEmpty());\n }\n\n /**\n * Returns a string representation of this Interval appropriate for debugging.\n * @return {string}\n */\n toString() {\n if (!this.isValid) return INVALID;\n return `[${this.s.toISO()} – ${this.e.toISO()})`;\n }\n\n /**\n * Returns a string representation of this Interval appropriate for the REPL.\n * @return {string}\n */\n [Symbol.for(\"nodejs.util.inspect.custom\")]() {\n if (this.isValid) {\n return `Interval { start: ${this.s.toISO()}, end: ${this.e.toISO()} }`;\n } else {\n return `Interval { Invalid, reason: ${this.invalidReason} }`;\n }\n }\n\n /**\n * Returns a localized string representing this Interval. Accepts the same options as the\n * Intl.DateTimeFormat constructor and any presets defined by Luxon, such as\n * {@link DateTime.DATE_FULL} or {@link DateTime.TIME_SIMPLE}. The exact behavior of this method\n * is browser-specific, but in general it will return an appropriate representation of the\n * Interval in the assigned locale. Defaults to the system's locale if no locale has been\n * specified.\n * @see https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/DateTimeFormat\n * @param {Object} [formatOpts=DateTime.DATE_SHORT] - Either a DateTime preset or\n * Intl.DateTimeFormat constructor options.\n * @param {Object} opts - Options to override the configuration of the start DateTime.\n * @example Interval.fromISO('2022-11-07T09:00Z/2022-11-08T09:00Z').toLocaleString(); //=> 11/7/2022 – 11/8/2022\n * @example Interval.fromISO('2022-11-07T09:00Z/2022-11-08T09:00Z').toLocaleString(DateTime.DATE_FULL); //=> November 7 – 8, 2022\n * @example Interval.fromISO('2022-11-07T09:00Z/2022-11-08T09:00Z').toLocaleString(DateTime.DATE_FULL, { locale: 'fr-FR' }); //=> 7–8 novembre 2022\n * @example Interval.fromISO('2022-11-07T17:00Z/2022-11-07T19:00Z').toLocaleString(DateTime.TIME_SIMPLE); //=> 6:00 – 8:00 PM\n * @example Interval.fromISO('2022-11-07T17:00Z/2022-11-07T19:00Z').toLocaleString({ weekday: 'short', month: 'short', day: '2-digit', hour: '2-digit', minute: '2-digit' }); //=> Mon, Nov 07, 6:00 – 8:00 p\n * @return {string}\n */\n toLocaleString(formatOpts = Formats.DATE_SHORT, opts = {}) {\n return this.isValid\n ? Formatter.create(this.s.loc.clone(opts), formatOpts).formatInterval(this)\n : INVALID;\n }\n\n /**\n * Returns an ISO 8601-compliant string representation of this Interval.\n * @see https://en.wikipedia.org/wiki/ISO_8601#Time_intervals\n * @param {Object} opts - The same options as {@link DateTime#toISO}\n * @return {string}\n */\n toISO(opts) {\n if (!this.isValid) return INVALID;\n return `${this.s.toISO(opts)}/${this.e.toISO(opts)}`;\n }\n\n /**\n * Returns an ISO 8601-compliant string representation of date of this Interval.\n * The time components are ignored.\n * @see https://en.wikipedia.org/wiki/ISO_8601#Time_intervals\n * @return {string}\n */\n toISODate() {\n if (!this.isValid) return INVALID;\n return `${this.s.toISODate()}/${this.e.toISODate()}`;\n }\n\n /**\n * Returns an ISO 8601-compliant string representation of time of this Interval.\n * The date components are ignored.\n * @see https://en.wikipedia.org/wiki/ISO_8601#Time_intervals\n * @param {Object} opts - The same options as {@link DateTime#toISO}\n * @return {string}\n */\n toISOTime(opts) {\n if (!this.isValid) return INVALID;\n return `${this.s.toISOTime(opts)}/${this.e.toISOTime(opts)}`;\n }\n\n /**\n * Returns a string representation of this Interval formatted according to the specified format\n * string. **You may not want this.** See {@link Interval#toLocaleString} for a more flexible\n * formatting tool.\n * @param {string} dateFormat - The format string. This string formats the start and end time.\n * See {@link DateTime#toFormat} for details.\n * @param {Object} opts - Options.\n * @param {string} [opts.separator = ' – '] - A separator to place between the start and end\n * representations.\n * @return {string}\n */\n toFormat(dateFormat, { separator = \" – \" } = {}) {\n if (!this.isValid) return INVALID;\n return `${this.s.toFormat(dateFormat)}${separator}${this.e.toFormat(dateFormat)}`;\n }\n\n /**\n * Return a Duration representing the time spanned by this interval.\n * @param {string|string[]} [unit=['milliseconds']] - the unit or units (such as 'hours' or 'days') to include in the duration.\n * @param {Object} opts - options that affect the creation of the Duration\n * @param {string} [opts.conversionAccuracy='casual'] - the conversion system to use\n * @example Interval.fromDateTimes(dt1, dt2).toDuration().toObject() //=> { milliseconds: 88489257 }\n * @example Interval.fromDateTimes(dt1, dt2).toDuration('days').toObject() //=> { days: 1.0241812152777778 }\n * @example Interval.fromDateTimes(dt1, dt2).toDuration(['hours', 'minutes']).toObject() //=> { hours: 24, minutes: 34.82095 }\n * @example Interval.fromDateTimes(dt1, dt2).toDuration(['hours', 'minutes', 'seconds']).toObject() //=> { hours: 24, minutes: 34, seconds: 49.257 }\n * @example Interval.fromDateTimes(dt1, dt2).toDuration('seconds').toObject() //=> { seconds: 88489.257 }\n * @return {Duration}\n */\n toDuration(unit, opts) {\n if (!this.isValid) {\n return Duration.invalid(this.invalidReason);\n }\n return this.e.diff(this.s, unit, opts);\n }\n\n /**\n * Run mapFn on the interval start and end, returning a new Interval from the resulting DateTimes\n * @param {function} mapFn\n * @return {Interval}\n * @example Interval.fromDateTimes(dt1, dt2).mapEndpoints(endpoint => endpoint.toUTC())\n * @example Interval.fromDateTimes(dt1, dt2).mapEndpoints(endpoint => endpoint.plus({ hours: 2 }))\n */\n mapEndpoints(mapFn) {\n return Interval.fromDateTimes(mapFn(this.s), mapFn(this.e));\n }\n}\n","import DateTime from \"./datetime.js\";\nimport Settings from \"./settings.js\";\nimport Locale from \"./impl/locale.js\";\nimport IANAZone from \"./zones/IANAZone.js\";\nimport { normalizeZone } from \"./impl/zoneUtil.js\";\n\nimport { hasLocaleWeekInfo, hasRelative } from \"./impl/util.js\";\n\n/**\n * The Info class contains static methods for retrieving general time and date related data. For example, it has methods for finding out if a time zone has a DST, for listing the months in any supported locale, and for discovering which of Luxon features are available in the current environment.\n */\nexport default class Info {\n /**\n * Return whether the specified zone contains a DST.\n * @param {string|Zone} [zone='local'] - Zone to check. Defaults to the environment's local zone.\n * @return {boolean}\n */\n static hasDST(zone = Settings.defaultZone) {\n const proto = DateTime.now().setZone(zone).set({ month: 12 });\n\n return !zone.isUniversal && proto.offset !== proto.set({ month: 6 }).offset;\n }\n\n /**\n * Return whether the specified zone is a valid IANA specifier.\n * @param {string} zone - Zone to check\n * @return {boolean}\n */\n static isValidIANAZone(zone) {\n return IANAZone.isValidZone(zone);\n }\n\n /**\n * Converts the input into a {@link Zone} instance.\n *\n * * If `input` is already a Zone instance, it is returned unchanged.\n * * If `input` is a string containing a valid time zone name, a Zone instance\n * with that name is returned.\n * * If `input` is a string that doesn't refer to a known time zone, a Zone\n * instance with {@link Zone#isValid} == false is returned.\n * * If `input is a number, a Zone instance with the specified fixed offset\n * in minutes is returned.\n * * If `input` is `null` or `undefined`, the default zone is returned.\n * @param {string|Zone|number} [input] - the value to be converted\n * @return {Zone}\n */\n static normalizeZone(input) {\n return normalizeZone(input, Settings.defaultZone);\n }\n\n /**\n * Get the weekday on which the week starts according to the given locale.\n * @param {Object} opts - options\n * @param {string} [opts.locale] - the locale code\n * @param {string} [opts.locObj=null] - an existing locale object to use\n * @returns {number} the start of the week, 1 for Monday through 7 for Sunday\n */\n static getStartOfWeek({ locale = null, locObj = null } = {}) {\n return (locObj || Locale.create(locale)).getStartOfWeek();\n }\n\n /**\n * Get the minimum number of days necessary in a week before it is considered part of the next year according\n * to the given locale.\n * @param {Object} opts - options\n * @param {string} [opts.locale] - the locale code\n * @param {string} [opts.locObj=null] - an existing locale object to use\n * @returns {number}\n */\n static getMinimumDaysInFirstWeek({ locale = null, locObj = null } = {}) {\n return (locObj || Locale.create(locale)).getMinDaysInFirstWeek();\n }\n\n /**\n * Get the weekdays, which are considered the weekend according to the given locale\n * @param {Object} opts - options\n * @param {string} [opts.locale] - the locale code\n * @param {string} [opts.locObj=null] - an existing locale object to use\n * @returns {number[]} an array of weekdays, 1 for Monday through 7 for Sunday\n */\n static getWeekendWeekdays({ locale = null, locObj = null } = {}) {\n // copy the array, because we cache it internally\n return (locObj || Locale.create(locale)).getWeekendDays().slice();\n }\n\n /**\n * Return an array of standalone month names.\n * @see https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/DateTimeFormat\n * @param {string} [length='long'] - the length of the month representation, such as \"numeric\", \"2-digit\", \"narrow\", \"short\", \"long\"\n * @param {Object} opts - options\n * @param {string} [opts.locale] - the locale code\n * @param {string} [opts.numberingSystem=null] - the numbering system\n * @param {string} [opts.locObj=null] - an existing locale object to use\n * @param {string} [opts.outputCalendar='gregory'] - the calendar\n * @example Info.months()[0] //=> 'January'\n * @example Info.months('short')[0] //=> 'Jan'\n * @example Info.months('numeric')[0] //=> '1'\n * @example Info.months('short', { locale: 'fr-CA' } )[0] //=> 'janv.'\n * @example Info.months('numeric', { locale: 'ar' })[0] //=> '١'\n * @example Info.months('long', { outputCalendar: 'islamic' })[0] //=> 'Rabiʻ I'\n * @return {Array}\n */\n static months(\n length = \"long\",\n { locale = null, numberingSystem = null, locObj = null, outputCalendar = \"gregory\" } = {}\n ) {\n return (locObj || Locale.create(locale, numberingSystem, outputCalendar)).months(length);\n }\n\n /**\n * Return an array of format month names.\n * Format months differ from standalone months in that they're meant to appear next to the day of the month. In some languages, that\n * changes the string.\n * See {@link Info#months}\n * @param {string} [length='long'] - the length of the month representation, such as \"numeric\", \"2-digit\", \"narrow\", \"short\", \"long\"\n * @param {Object} opts - options\n * @param {string} [opts.locale] - the locale code\n * @param {string} [opts.numberingSystem=null] - the numbering system\n * @param {string} [opts.locObj=null] - an existing locale object to use\n * @param {string} [opts.outputCalendar='gregory'] - the calendar\n * @return {Array}\n */\n static monthsFormat(\n length = \"long\",\n { locale = null, numberingSystem = null, locObj = null, outputCalendar = \"gregory\" } = {}\n ) {\n return (locObj || Locale.create(locale, numberingSystem, outputCalendar)).months(length, true);\n }\n\n /**\n * Return an array of standalone week names.\n * @see https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/DateTimeFormat\n * @param {string} [length='long'] - the length of the weekday representation, such as \"narrow\", \"short\", \"long\".\n * @param {Object} opts - options\n * @param {string} [opts.locale] - the locale code\n * @param {string} [opts.numberingSystem=null] - the numbering system\n * @param {string} [opts.locObj=null] - an existing locale object to use\n * @example Info.weekdays()[0] //=> 'Monday'\n * @example Info.weekdays('short')[0] //=> 'Mon'\n * @example Info.weekdays('short', { locale: 'fr-CA' })[0] //=> 'lun.'\n * @example Info.weekdays('short', { locale: 'ar' })[0] //=> 'الاثنين'\n * @return {Array}\n */\n static weekdays(length = \"long\", { locale = null, numberingSystem = null, locObj = null } = {}) {\n return (locObj || Locale.create(locale, numberingSystem, null)).weekdays(length);\n }\n\n /**\n * Return an array of format week names.\n * Format weekdays differ from standalone weekdays in that they're meant to appear next to more date information. In some languages, that\n * changes the string.\n * See {@link Info#weekdays}\n * @param {string} [length='long'] - the length of the month representation, such as \"narrow\", \"short\", \"long\".\n * @param {Object} opts - options\n * @param {string} [opts.locale=null] - the locale code\n * @param {string} [opts.numberingSystem=null] - the numbering system\n * @param {string} [opts.locObj=null] - an existing locale object to use\n * @return {Array}\n */\n static weekdaysFormat(\n length = \"long\",\n { locale = null, numberingSystem = null, locObj = null } = {}\n ) {\n return (locObj || Locale.create(locale, numberingSystem, null)).weekdays(length, true);\n }\n\n /**\n * Return an array of meridiems.\n * @param {Object} opts - options\n * @param {string} [opts.locale] - the locale code\n * @example Info.meridiems() //=> [ 'AM', 'PM' ]\n * @example Info.meridiems({ locale: 'my' }) //=> [ 'နံနက်', 'ညနေ' ]\n * @return {Array}\n */\n static meridiems({ locale = null } = {}) {\n return Locale.create(locale).meridiems();\n }\n\n /**\n * Return an array of eras, such as ['BC', 'AD']. The locale can be specified, but the calendar system is always Gregorian.\n * @param {string} [length='short'] - the length of the era representation, such as \"short\" or \"long\".\n * @param {Object} opts - options\n * @param {string} [opts.locale] - the locale code\n * @example Info.eras() //=> [ 'BC', 'AD' ]\n * @example Info.eras('long') //=> [ 'Before Christ', 'Anno Domini' ]\n * @example Info.eras('long', { locale: 'fr' }) //=> [ 'avant Jésus-Christ', 'après Jésus-Christ' ]\n * @return {Array}\n */\n static eras(length = \"short\", { locale = null } = {}) {\n return Locale.create(locale, null, \"gregory\").eras(length);\n }\n\n /**\n * Return the set of available features in this environment.\n * Some features of Luxon are not available in all environments. For example, on older browsers, relative time formatting support is not available. Use this function to figure out if that's the case.\n * Keys:\n * * `relative`: whether this environment supports relative time formatting\n * * `localeWeek`: whether this environment supports different weekdays for the start of the week based on the locale\n * @example Info.features() //=> { relative: false, localeWeek: true }\n * @return {Object}\n */\n static features() {\n return { relative: hasRelative(), localeWeek: hasLocaleWeekInfo() };\n }\n}\n","import Duration from \"../duration.js\";\n\nfunction dayDiff(earlier, later) {\n const utcDayStart = (dt) => dt.toUTC(0, { keepLocalTime: true }).startOf(\"day\").valueOf(),\n ms = utcDayStart(later) - utcDayStart(earlier);\n return Math.floor(Duration.fromMillis(ms).as(\"days\"));\n}\n\nfunction highOrderDiffs(cursor, later, units) {\n const differs = [\n [\"years\", (a, b) => b.year - a.year],\n [\"quarters\", (a, b) => b.quarter - a.quarter + (b.year - a.year) * 4],\n [\"months\", (a, b) => b.month - a.month + (b.year - a.year) * 12],\n [\n \"weeks\",\n (a, b) => {\n const days = dayDiff(a, b);\n return (days - (days % 7)) / 7;\n },\n ],\n [\"days\", dayDiff],\n ];\n\n const results = {};\n const earlier = cursor;\n let lowestOrder, highWater;\n\n /* This loop tries to diff using larger units first.\n If we overshoot, we backtrack and try the next smaller unit.\n \"cursor\" starts out at the earlier timestamp and moves closer and closer to \"later\"\n as we use smaller and smaller units.\n highWater keeps track of where we would be if we added one more of the smallest unit,\n this is used later to potentially convert any difference smaller than the smallest higher order unit\n into a fraction of that smallest higher order unit\n */\n for (const [unit, differ] of differs) {\n if (units.indexOf(unit) >= 0) {\n lowestOrder = unit;\n\n results[unit] = differ(cursor, later);\n highWater = earlier.plus(results);\n\n if (highWater > later) {\n // we overshot the end point, backtrack cursor by 1\n results[unit]--;\n cursor = earlier.plus(results);\n\n // if we are still overshooting now, we need to backtrack again\n // this happens in certain situations when diffing times in different zones,\n // because this calculation ignores time zones\n if (cursor > later) {\n // keep the \"overshot by 1\" around as highWater\n highWater = cursor;\n // backtrack cursor by 1\n results[unit]--;\n cursor = earlier.plus(results);\n }\n } else {\n cursor = highWater;\n }\n }\n }\n\n return [cursor, results, highWater, lowestOrder];\n}\n\nexport default function (earlier, later, units, opts) {\n let [cursor, results, highWater, lowestOrder] = highOrderDiffs(earlier, later, units);\n\n const remainingMillis = later - cursor;\n\n const lowerOrderUnits = units.filter(\n (u) => [\"hours\", \"minutes\", \"seconds\", \"milliseconds\"].indexOf(u) >= 0\n );\n\n if (lowerOrderUnits.length === 0) {\n if (highWater < later) {\n highWater = cursor.plus({ [lowestOrder]: 1 });\n }\n\n if (highWater !== cursor) {\n results[lowestOrder] = (results[lowestOrder] || 0) + remainingMillis / (highWater - cursor);\n }\n }\n\n const duration = Duration.fromObject(results, opts);\n\n if (lowerOrderUnits.length > 0) {\n return Duration.fromMillis(remainingMillis, opts)\n .shiftTo(...lowerOrderUnits)\n .plus(duration);\n } else {\n return duration;\n }\n}\n","import { parseMillis, isUndefined, untruncateYear, signedOffset, hasOwnProperty } from \"./util.js\";\nimport Formatter from \"./formatter.js\";\nimport FixedOffsetZone from \"../zones/fixedOffsetZone.js\";\nimport IANAZone from \"../zones/IANAZone.js\";\nimport DateTime from \"../datetime.js\";\nimport { digitRegex, parseDigits } from \"./digits.js\";\nimport { ConflictingSpecificationError } from \"../errors.js\";\n\nconst MISSING_FTP = \"missing Intl.DateTimeFormat.formatToParts support\";\n\nfunction intUnit(regex, post = (i) => i) {\n return { regex, deser: ([s]) => post(parseDigits(s)) };\n}\n\nconst NBSP = String.fromCharCode(160);\nconst spaceOrNBSP = `[ ${NBSP}]`;\nconst spaceOrNBSPRegExp = new RegExp(spaceOrNBSP, \"g\");\n\nfunction fixListRegex(s) {\n // make dots optional and also make them literal\n // make space and non breakable space characters interchangeable\n return s.replace(/\\./g, \"\\\\.?\").replace(spaceOrNBSPRegExp, spaceOrNBSP);\n}\n\nfunction stripInsensitivities(s) {\n return s\n .replace(/\\./g, \"\") // ignore dots that were made optional\n .replace(spaceOrNBSPRegExp, \" \") // interchange space and nbsp\n .toLowerCase();\n}\n\nfunction oneOf(strings, startIndex) {\n if (strings === null) {\n return null;\n } else {\n return {\n regex: RegExp(strings.map(fixListRegex).join(\"|\")),\n deser: ([s]) =>\n strings.findIndex((i) => stripInsensitivities(s) === stripInsensitivities(i)) + startIndex,\n };\n }\n}\n\nfunction offset(regex, groups) {\n return { regex, deser: ([, h, m]) => signedOffset(h, m), groups };\n}\n\nfunction simple(regex) {\n return { regex, deser: ([s]) => s };\n}\n\nfunction escapeToken(value) {\n return value.replace(/[\\-\\[\\]{}()*+?.,\\\\\\^$|#\\s]/g, \"\\\\$&\");\n}\n\n/**\n * @param token\n * @param {Locale} loc\n */\nfunction unitForToken(token, loc) {\n const one = digitRegex(loc),\n two = digitRegex(loc, \"{2}\"),\n three = digitRegex(loc, \"{3}\"),\n four = digitRegex(loc, \"{4}\"),\n six = digitRegex(loc, \"{6}\"),\n oneOrTwo = digitRegex(loc, \"{1,2}\"),\n oneToThree = digitRegex(loc, \"{1,3}\"),\n oneToSix = digitRegex(loc, \"{1,6}\"),\n oneToNine = digitRegex(loc, \"{1,9}\"),\n twoToFour = digitRegex(loc, \"{2,4}\"),\n fourToSix = digitRegex(loc, \"{4,6}\"),\n literal = (t) => ({ regex: RegExp(escapeToken(t.val)), deser: ([s]) => s, literal: true }),\n unitate = (t) => {\n if (token.literal) {\n return literal(t);\n }\n switch (t.val) {\n // era\n case \"G\":\n return oneOf(loc.eras(\"short\"), 0);\n case \"GG\":\n return oneOf(loc.eras(\"long\"), 0);\n // years\n case \"y\":\n return intUnit(oneToSix);\n case \"yy\":\n return intUnit(twoToFour, untruncateYear);\n case \"yyyy\":\n return intUnit(four);\n case \"yyyyy\":\n return intUnit(fourToSix);\n case \"yyyyyy\":\n return intUnit(six);\n // months\n case \"M\":\n return intUnit(oneOrTwo);\n case \"MM\":\n return intUnit(two);\n case \"MMM\":\n return oneOf(loc.months(\"short\", true), 1);\n case \"MMMM\":\n return oneOf(loc.months(\"long\", true), 1);\n case \"L\":\n return intUnit(oneOrTwo);\n case \"LL\":\n return intUnit(two);\n case \"LLL\":\n return oneOf(loc.months(\"short\", false), 1);\n case \"LLLL\":\n return oneOf(loc.months(\"long\", false), 1);\n // dates\n case \"d\":\n return intUnit(oneOrTwo);\n case \"dd\":\n return intUnit(two);\n // ordinals\n case \"o\":\n return intUnit(oneToThree);\n case \"ooo\":\n return intUnit(three);\n // time\n case \"HH\":\n return intUnit(two);\n case \"H\":\n return intUnit(oneOrTwo);\n case \"hh\":\n return intUnit(two);\n case \"h\":\n return intUnit(oneOrTwo);\n case \"mm\":\n return intUnit(two);\n case \"m\":\n return intUnit(oneOrTwo);\n case \"q\":\n return intUnit(oneOrTwo);\n case \"qq\":\n return intUnit(two);\n case \"s\":\n return intUnit(oneOrTwo);\n case \"ss\":\n return intUnit(two);\n case \"S\":\n return intUnit(oneToThree);\n case \"SSS\":\n return intUnit(three);\n case \"u\":\n return simple(oneToNine);\n case \"uu\":\n return simple(oneOrTwo);\n case \"uuu\":\n return intUnit(one);\n // meridiem\n case \"a\":\n return oneOf(loc.meridiems(), 0);\n // weekYear (k)\n case \"kkkk\":\n return intUnit(four);\n case \"kk\":\n return intUnit(twoToFour, untruncateYear);\n // weekNumber (W)\n case \"W\":\n return intUnit(oneOrTwo);\n case \"WW\":\n return intUnit(two);\n // weekdays\n case \"E\":\n case \"c\":\n return intUnit(one);\n case \"EEE\":\n return oneOf(loc.weekdays(\"short\", false), 1);\n case \"EEEE\":\n return oneOf(loc.weekdays(\"long\", false), 1);\n case \"ccc\":\n return oneOf(loc.weekdays(\"short\", true), 1);\n case \"cccc\":\n return oneOf(loc.weekdays(\"long\", true), 1);\n // offset/zone\n case \"Z\":\n case \"ZZ\":\n return offset(new RegExp(`([+-]${oneOrTwo.source})(?::(${two.source}))?`), 2);\n case \"ZZZ\":\n return offset(new RegExp(`([+-]${oneOrTwo.source})(${two.source})?`), 2);\n // we don't support ZZZZ (PST) or ZZZZZ (Pacific Standard Time) in parsing\n // because we don't have any way to figure out what they are\n case \"z\":\n return simple(/[a-z_+-/]{1,256}?/i);\n // this special-case \"token\" represents a place where a macro-token expanded into a white-space literal\n // in this case we accept any non-newline white-space\n case \" \":\n return simple(/[^\\S\\n\\r]/);\n default:\n return literal(t);\n }\n };\n\n const unit = unitate(token) || {\n invalidReason: MISSING_FTP,\n };\n\n unit.token = token;\n\n return unit;\n}\n\nconst partTypeStyleToTokenVal = {\n year: {\n \"2-digit\": \"yy\",\n numeric: \"yyyyy\",\n },\n month: {\n numeric: \"M\",\n \"2-digit\": \"MM\",\n short: \"MMM\",\n long: \"MMMM\",\n },\n day: {\n numeric: \"d\",\n \"2-digit\": \"dd\",\n },\n weekday: {\n short: \"EEE\",\n long: \"EEEE\",\n },\n dayperiod: \"a\",\n dayPeriod: \"a\",\n hour12: {\n numeric: \"h\",\n \"2-digit\": \"hh\",\n },\n hour24: {\n numeric: \"H\",\n \"2-digit\": \"HH\",\n },\n minute: {\n numeric: \"m\",\n \"2-digit\": \"mm\",\n },\n second: {\n numeric: \"s\",\n \"2-digit\": \"ss\",\n },\n timeZoneName: {\n long: \"ZZZZZ\",\n short: \"ZZZ\",\n },\n};\n\nfunction tokenForPart(part, formatOpts, resolvedOpts) {\n const { type, value } = part;\n\n if (type === \"literal\") {\n const isSpace = /^\\s+$/.test(value);\n return {\n literal: !isSpace,\n val: isSpace ? \" \" : value,\n };\n }\n\n const style = formatOpts[type];\n\n // The user might have explicitly specified hour12 or hourCycle\n // if so, respect their decision\n // if not, refer back to the resolvedOpts, which are based on the locale\n let actualType = type;\n if (type === \"hour\") {\n if (formatOpts.hour12 != null) {\n actualType = formatOpts.hour12 ? \"hour12\" : \"hour24\";\n } else if (formatOpts.hourCycle != null) {\n if (formatOpts.hourCycle === \"h11\" || formatOpts.hourCycle === \"h12\") {\n actualType = \"hour12\";\n } else {\n actualType = \"hour24\";\n }\n } else {\n // tokens only differentiate between 24 hours or not,\n // so we do not need to check hourCycle here, which is less supported anyways\n actualType = resolvedOpts.hour12 ? \"hour12\" : \"hour24\";\n }\n }\n let val = partTypeStyleToTokenVal[actualType];\n if (typeof val === \"object\") {\n val = val[style];\n }\n\n if (val) {\n return {\n literal: false,\n val,\n };\n }\n\n return undefined;\n}\n\nfunction buildRegex(units) {\n const re = units.map((u) => u.regex).reduce((f, r) => `${f}(${r.source})`, \"\");\n return [`^${re}$`, units];\n}\n\nfunction match(input, regex, handlers) {\n const matches = input.match(regex);\n\n if (matches) {\n const all = {};\n let matchIndex = 1;\n for (const i in handlers) {\n if (hasOwnProperty(handlers, i)) {\n const h = handlers[i],\n groups = h.groups ? h.groups + 1 : 1;\n if (!h.literal && h.token) {\n all[h.token.val[0]] = h.deser(matches.slice(matchIndex, matchIndex + groups));\n }\n matchIndex += groups;\n }\n }\n return [matches, all];\n } else {\n return [matches, {}];\n }\n}\n\nfunction dateTimeFromMatches(matches) {\n const toField = (token) => {\n switch (token) {\n case \"S\":\n return \"millisecond\";\n case \"s\":\n return \"second\";\n case \"m\":\n return \"minute\";\n case \"h\":\n case \"H\":\n return \"hour\";\n case \"d\":\n return \"day\";\n case \"o\":\n return \"ordinal\";\n case \"L\":\n case \"M\":\n return \"month\";\n case \"y\":\n return \"year\";\n case \"E\":\n case \"c\":\n return \"weekday\";\n case \"W\":\n return \"weekNumber\";\n case \"k\":\n return \"weekYear\";\n case \"q\":\n return \"quarter\";\n default:\n return null;\n }\n };\n\n let zone = null;\n let specificOffset;\n if (!isUndefined(matches.z)) {\n zone = IANAZone.create(matches.z);\n }\n\n if (!isUndefined(matches.Z)) {\n if (!zone) {\n zone = new FixedOffsetZone(matches.Z);\n }\n specificOffset = matches.Z;\n }\n\n if (!isUndefined(matches.q)) {\n matches.M = (matches.q - 1) * 3 + 1;\n }\n\n if (!isUndefined(matches.h)) {\n if (matches.h < 12 && matches.a === 1) {\n matches.h += 12;\n } else if (matches.h === 12 && matches.a === 0) {\n matches.h = 0;\n }\n }\n\n if (matches.G === 0 && matches.y) {\n matches.y = -matches.y;\n }\n\n if (!isUndefined(matches.u)) {\n matches.S = parseMillis(matches.u);\n }\n\n const vals = Object.keys(matches).reduce((r, k) => {\n const f = toField(k);\n if (f) {\n r[f] = matches[k];\n }\n\n return r;\n }, {});\n\n return [vals, zone, specificOffset];\n}\n\nlet dummyDateTimeCache = null;\n\nfunction getDummyDateTime() {\n if (!dummyDateTimeCache) {\n dummyDateTimeCache = DateTime.fromMillis(1555555555555);\n }\n\n return dummyDateTimeCache;\n}\n\nfunction maybeExpandMacroToken(token, locale) {\n if (token.literal) {\n return token;\n }\n\n const formatOpts = Formatter.macroTokenToFormatOpts(token.val);\n const tokens = formatOptsToTokens(formatOpts, locale);\n\n if (tokens == null || tokens.includes(undefined)) {\n return token;\n }\n\n return tokens;\n}\n\nexport function expandMacroTokens(tokens, locale) {\n return Array.prototype.concat(...tokens.map((t) => maybeExpandMacroToken(t, locale)));\n}\n\n/**\n * @private\n */\n\nexport class TokenParser {\n constructor(locale, format) {\n this.locale = locale;\n this.format = format;\n this.tokens = expandMacroTokens(Formatter.parseFormat(format), locale);\n this.units = this.tokens.map((t) => unitForToken(t, locale));\n this.disqualifyingUnit = this.units.find((t) => t.invalidReason);\n\n if (!this.disqualifyingUnit) {\n const [regexString, handlers] = buildRegex(this.units);\n this.regex = RegExp(regexString, \"i\");\n this.handlers = handlers;\n }\n }\n\n explainFromTokens(input) {\n if (!this.isValid) {\n return { input, tokens: this.tokens, invalidReason: this.invalidReason };\n } else {\n const [rawMatches, matches] = match(input, this.regex, this.handlers),\n [result, zone, specificOffset] = matches\n ? dateTimeFromMatches(matches)\n : [null, null, undefined];\n if (hasOwnProperty(matches, \"a\") && hasOwnProperty(matches, \"H\")) {\n throw new ConflictingSpecificationError(\n \"Can't include meridiem when specifying 24-hour format\"\n );\n }\n return {\n input,\n tokens: this.tokens,\n regex: this.regex,\n rawMatches,\n matches,\n result,\n zone,\n specificOffset,\n };\n }\n }\n\n get isValid() {\n return !this.disqualifyingUnit;\n }\n\n get invalidReason() {\n return this.disqualifyingUnit ? this.disqualifyingUnit.invalidReason : null;\n }\n}\n\nexport function explainFromTokens(locale, input, format) {\n const parser = new TokenParser(locale, format);\n return parser.explainFromTokens(input);\n}\n\nexport function parseFromTokens(locale, input, format) {\n const { result, zone, specificOffset, invalidReason } = explainFromTokens(locale, input, format);\n return [result, zone, specificOffset, invalidReason];\n}\n\nexport function formatOptsToTokens(formatOpts, locale) {\n if (!formatOpts) {\n return null;\n }\n\n const formatter = Formatter.create(locale, formatOpts);\n const df = formatter.dtFormatter(getDummyDateTime());\n const parts = df.formatToParts();\n const resolvedOpts = df.resolvedOptions();\n return parts.map((p) => tokenForPart(p, formatOpts, resolvedOpts));\n}\n","import Duration from \"./duration.js\";\nimport Interval from \"./interval.js\";\nimport Settings from \"./settings.js\";\nimport Info from \"./info.js\";\nimport Formatter from \"./impl/formatter.js\";\nimport FixedOffsetZone from \"./zones/fixedOffsetZone.js\";\nimport Locale from \"./impl/locale.js\";\nimport {\n isUndefined,\n maybeArray,\n isDate,\n isNumber,\n bestBy,\n daysInMonth,\n daysInYear,\n isLeapYear,\n weeksInWeekYear,\n normalizeObject,\n roundTo,\n objToLocalTS,\n padStart,\n} from \"./impl/util.js\";\nimport { normalizeZone } from \"./impl/zoneUtil.js\";\nimport diff from \"./impl/diff.js\";\nimport { parseRFC2822Date, parseISODate, parseHTTPDate, parseSQL } from \"./impl/regexParser.js\";\nimport {\n parseFromTokens,\n explainFromTokens,\n formatOptsToTokens,\n expandMacroTokens,\n TokenParser,\n} from \"./impl/tokenParser.js\";\nimport {\n gregorianToWeek,\n weekToGregorian,\n gregorianToOrdinal,\n ordinalToGregorian,\n hasInvalidGregorianData,\n hasInvalidWeekData,\n hasInvalidOrdinalData,\n hasInvalidTimeData,\n usesLocalWeekValues,\n isoWeekdayToLocal,\n} from \"./impl/conversions.js\";\nimport * as Formats from \"./impl/formats.js\";\nimport {\n InvalidArgumentError,\n ConflictingSpecificationError,\n InvalidUnitError,\n InvalidDateTimeError,\n} from \"./errors.js\";\nimport Invalid from \"./impl/invalid.js\";\n\nconst INVALID = \"Invalid DateTime\";\nconst MAX_DATE = 8.64e15;\n\nfunction unsupportedZone(zone) {\n return new Invalid(\"unsupported zone\", `the zone \"${zone.name}\" is not supported`);\n}\n\n// we cache week data on the DT object and this intermediates the cache\n/**\n * @param {DateTime} dt\n */\nfunction possiblyCachedWeekData(dt) {\n if (dt.weekData === null) {\n dt.weekData = gregorianToWeek(dt.c);\n }\n return dt.weekData;\n}\n\n/**\n * @param {DateTime} dt\n */\nfunction possiblyCachedLocalWeekData(dt) {\n if (dt.localWeekData === null) {\n dt.localWeekData = gregorianToWeek(\n dt.c,\n dt.loc.getMinDaysInFirstWeek(),\n dt.loc.getStartOfWeek()\n );\n }\n return dt.localWeekData;\n}\n\n// clone really means, \"make a new object with these modifications\". all \"setters\" really use this\n// to create a new object while only changing some of the properties\nfunction clone(inst, alts) {\n const current = {\n ts: inst.ts,\n zone: inst.zone,\n c: inst.c,\n o: inst.o,\n loc: inst.loc,\n invalid: inst.invalid,\n };\n return new DateTime({ ...current, ...alts, old: current });\n}\n\n// find the right offset a given local time. The o input is our guess, which determines which\n// offset we'll pick in ambiguous cases (e.g. there are two 3 AMs b/c Fallback DST)\nfunction fixOffset(localTS, o, tz) {\n // Our UTC time is just a guess because our offset is just a guess\n let utcGuess = localTS - o * 60 * 1000;\n\n // Test whether the zone matches the offset for this ts\n const o2 = tz.offset(utcGuess);\n\n // If so, offset didn't change and we're done\n if (o === o2) {\n return [utcGuess, o];\n }\n\n // If not, change the ts by the difference in the offset\n utcGuess -= (o2 - o) * 60 * 1000;\n\n // If that gives us the local time we want, we're done\n const o3 = tz.offset(utcGuess);\n if (o2 === o3) {\n return [utcGuess, o2];\n }\n\n // If it's different, we're in a hole time. The offset has changed, but the we don't adjust the time\n return [localTS - Math.min(o2, o3) * 60 * 1000, Math.max(o2, o3)];\n}\n\n// convert an epoch timestamp into a calendar object with the given offset\nfunction tsToObj(ts, offset) {\n ts += offset * 60 * 1000;\n\n const d = new Date(ts);\n\n return {\n year: d.getUTCFullYear(),\n month: d.getUTCMonth() + 1,\n day: d.getUTCDate(),\n hour: d.getUTCHours(),\n minute: d.getUTCMinutes(),\n second: d.getUTCSeconds(),\n millisecond: d.getUTCMilliseconds(),\n };\n}\n\n// convert a calendar object to a epoch timestamp\nfunction objToTS(obj, offset, zone) {\n return fixOffset(objToLocalTS(obj), offset, zone);\n}\n\n// create a new DT instance by adding a duration, adjusting for DSTs\nfunction adjustTime(inst, dur) {\n const oPre = inst.o,\n year = inst.c.year + Math.trunc(dur.years),\n month = inst.c.month + Math.trunc(dur.months) + Math.trunc(dur.quarters) * 3,\n c = {\n ...inst.c,\n year,\n month,\n day:\n Math.min(inst.c.day, daysInMonth(year, month)) +\n Math.trunc(dur.days) +\n Math.trunc(dur.weeks) * 7,\n },\n millisToAdd = Duration.fromObject({\n years: dur.years - Math.trunc(dur.years),\n quarters: dur.quarters - Math.trunc(dur.quarters),\n months: dur.months - Math.trunc(dur.months),\n weeks: dur.weeks - Math.trunc(dur.weeks),\n days: dur.days - Math.trunc(dur.days),\n hours: dur.hours,\n minutes: dur.minutes,\n seconds: dur.seconds,\n milliseconds: dur.milliseconds,\n }).as(\"milliseconds\"),\n localTS = objToLocalTS(c);\n\n let [ts, o] = fixOffset(localTS, oPre, inst.zone);\n\n if (millisToAdd !== 0) {\n ts += millisToAdd;\n // that could have changed the offset by going over a DST, but we want to keep the ts the same\n o = inst.zone.offset(ts);\n }\n\n return { ts, o };\n}\n\n// helper useful in turning the results of parsing into real dates\n// by handling the zone options\nfunction parseDataToDateTime(parsed, parsedZone, opts, format, text, specificOffset) {\n const { setZone, zone } = opts;\n if ((parsed && Object.keys(parsed).length !== 0) || parsedZone) {\n const interpretationZone = parsedZone || zone,\n inst = DateTime.fromObject(parsed, {\n ...opts,\n zone: interpretationZone,\n specificOffset,\n });\n return setZone ? inst : inst.setZone(zone);\n } else {\n return DateTime.invalid(\n new Invalid(\"unparsable\", `the input \"${text}\" can't be parsed as ${format}`)\n );\n }\n}\n\n// if you want to output a technical format (e.g. RFC 2822), this helper\n// helps handle the details\nfunction toTechFormat(dt, format, allowZ = true) {\n return dt.isValid\n ? Formatter.create(Locale.create(\"en-US\"), {\n allowZ,\n forceSimple: true,\n }).formatDateTimeFromString(dt, format)\n : null;\n}\n\nfunction toISODate(o, extended) {\n const longFormat = o.c.year > 9999 || o.c.year < 0;\n let c = \"\";\n if (longFormat && o.c.year >= 0) c += \"+\";\n c += padStart(o.c.year, longFormat ? 6 : 4);\n\n if (extended) {\n c += \"-\";\n c += padStart(o.c.month);\n c += \"-\";\n c += padStart(o.c.day);\n } else {\n c += padStart(o.c.month);\n c += padStart(o.c.day);\n }\n return c;\n}\n\nfunction toISOTime(\n o,\n extended,\n suppressSeconds,\n suppressMilliseconds,\n includeOffset,\n extendedZone\n) {\n let c = padStart(o.c.hour);\n if (extended) {\n c += \":\";\n c += padStart(o.c.minute);\n if (o.c.millisecond !== 0 || o.c.second !== 0 || !suppressSeconds) {\n c += \":\";\n }\n } else {\n c += padStart(o.c.minute);\n }\n\n if (o.c.millisecond !== 0 || o.c.second !== 0 || !suppressSeconds) {\n c += padStart(o.c.second);\n\n if (o.c.millisecond !== 0 || !suppressMilliseconds) {\n c += \".\";\n c += padStart(o.c.millisecond, 3);\n }\n }\n\n if (includeOffset) {\n if (o.isOffsetFixed && o.offset === 0 && !extendedZone) {\n c += \"Z\";\n } else if (o.o < 0) {\n c += \"-\";\n c += padStart(Math.trunc(-o.o / 60));\n c += \":\";\n c += padStart(Math.trunc(-o.o % 60));\n } else {\n c += \"+\";\n c += padStart(Math.trunc(o.o / 60));\n c += \":\";\n c += padStart(Math.trunc(o.o % 60));\n }\n }\n\n if (extendedZone) {\n c += \"[\" + o.zone.ianaName + \"]\";\n }\n return c;\n}\n\n// defaults for unspecified units in the supported calendars\nconst defaultUnitValues = {\n month: 1,\n day: 1,\n hour: 0,\n minute: 0,\n second: 0,\n millisecond: 0,\n },\n defaultWeekUnitValues = {\n weekNumber: 1,\n weekday: 1,\n hour: 0,\n minute: 0,\n second: 0,\n millisecond: 0,\n },\n defaultOrdinalUnitValues = {\n ordinal: 1,\n hour: 0,\n minute: 0,\n second: 0,\n millisecond: 0,\n };\n\n// Units in the supported calendars, sorted by bigness\nconst orderedUnits = [\"year\", \"month\", \"day\", \"hour\", \"minute\", \"second\", \"millisecond\"],\n orderedWeekUnits = [\n \"weekYear\",\n \"weekNumber\",\n \"weekday\",\n \"hour\",\n \"minute\",\n \"second\",\n \"millisecond\",\n ],\n orderedOrdinalUnits = [\"year\", \"ordinal\", \"hour\", \"minute\", \"second\", \"millisecond\"];\n\n// standardize case and plurality in units\nfunction normalizeUnit(unit) {\n const normalized = {\n year: \"year\",\n years: \"year\",\n month: \"month\",\n months: \"month\",\n day: \"day\",\n days: \"day\",\n hour: \"hour\",\n hours: \"hour\",\n minute: \"minute\",\n minutes: \"minute\",\n quarter: \"quarter\",\n quarters: \"quarter\",\n second: \"second\",\n seconds: \"second\",\n millisecond: \"millisecond\",\n milliseconds: \"millisecond\",\n weekday: \"weekday\",\n weekdays: \"weekday\",\n weeknumber: \"weekNumber\",\n weeksnumber: \"weekNumber\",\n weeknumbers: \"weekNumber\",\n weekyear: \"weekYear\",\n weekyears: \"weekYear\",\n ordinal: \"ordinal\",\n }[unit.toLowerCase()];\n\n if (!normalized) throw new InvalidUnitError(unit);\n\n return normalized;\n}\n\nfunction normalizeUnitWithLocalWeeks(unit) {\n switch (unit.toLowerCase()) {\n case \"localweekday\":\n case \"localweekdays\":\n return \"localWeekday\";\n case \"localweeknumber\":\n case \"localweeknumbers\":\n return \"localWeekNumber\";\n case \"localweekyear\":\n case \"localweekyears\":\n return \"localWeekYear\";\n default:\n return normalizeUnit(unit);\n }\n}\n\n// cache offsets for zones based on the current timestamp when this function is\n// first called. When we are handling a datetime from components like (year,\n// month, day, hour) in a time zone, we need a guess about what the timezone\n// offset is so that we can convert into a UTC timestamp. One way is to find the\n// offset of now in the zone. The actual date may have a different offset (for\n// example, if we handle a date in June while we're in December in a zone that\n// observes DST), but we can check and adjust that.\n//\n// When handling many dates, calculating the offset for now every time is\n// expensive. It's just a guess, so we can cache the offset to use even if we\n// are right on a time change boundary (we'll just correct in the other\n// direction). Using a timestamp from first read is a slight optimization for\n// handling dates close to the current date, since those dates will usually be\n// in the same offset (we could set the timestamp statically, instead). We use a\n// single timestamp for all zones to make things a bit more predictable.\n//\n// This is safe for quickDT (used by local() and utc()) because we don't fill in\n// higher-order units from tsNow (as we do in fromObject, this requires that\n// offset is calculated from tsNow).\nfunction guessOffsetForZone(zone) {\n if (!zoneOffsetGuessCache[zone]) {\n if (zoneOffsetTs === undefined) {\n zoneOffsetTs = Settings.now();\n }\n\n zoneOffsetGuessCache[zone] = zone.offset(zoneOffsetTs);\n }\n return zoneOffsetGuessCache[zone];\n}\n\n// this is a dumbed down version of fromObject() that runs about 60% faster\n// but doesn't do any validation, makes a bunch of assumptions about what units\n// are present, and so on.\nfunction quickDT(obj, opts) {\n const zone = normalizeZone(opts.zone, Settings.defaultZone);\n if (!zone.isValid) {\n return DateTime.invalid(unsupportedZone(zone));\n }\n\n const loc = Locale.fromObject(opts);\n\n let ts, o;\n\n // assume we have the higher-order units\n if (!isUndefined(obj.year)) {\n for (const u of orderedUnits) {\n if (isUndefined(obj[u])) {\n obj[u] = defaultUnitValues[u];\n }\n }\n\n const invalid = hasInvalidGregorianData(obj) || hasInvalidTimeData(obj);\n if (invalid) {\n return DateTime.invalid(invalid);\n }\n\n const offsetProvis = guessOffsetForZone(zone);\n [ts, o] = objToTS(obj, offsetProvis, zone);\n } else {\n ts = Settings.now();\n }\n\n return new DateTime({ ts, zone, loc, o });\n}\n\nfunction diffRelative(start, end, opts) {\n const round = isUndefined(opts.round) ? true : opts.round,\n format = (c, unit) => {\n c = roundTo(c, round || opts.calendary ? 0 : 2, true);\n const formatter = end.loc.clone(opts).relFormatter(opts);\n return formatter.format(c, unit);\n },\n differ = (unit) => {\n if (opts.calendary) {\n if (!end.hasSame(start, unit)) {\n return end.startOf(unit).diff(start.startOf(unit), unit).get(unit);\n } else return 0;\n } else {\n return end.diff(start, unit).get(unit);\n }\n };\n\n if (opts.unit) {\n return format(differ(opts.unit), opts.unit);\n }\n\n for (const unit of opts.units) {\n const count = differ(unit);\n if (Math.abs(count) >= 1) {\n return format(count, unit);\n }\n }\n return format(start > end ? -0 : 0, opts.units[opts.units.length - 1]);\n}\n\nfunction lastOpts(argList) {\n let opts = {},\n args;\n if (argList.length > 0 && typeof argList[argList.length - 1] === \"object\") {\n opts = argList[argList.length - 1];\n args = Array.from(argList).slice(0, argList.length - 1);\n } else {\n args = Array.from(argList);\n }\n return [opts, args];\n}\n\n/**\n * Timestamp to use for cached zone offset guesses (exposed for test)\n */\nlet zoneOffsetTs;\n/**\n * Cache for zone offset guesses (exposed for test).\n *\n * This optimizes quickDT via guessOffsetForZone to avoid repeated calls of\n * zone.offset().\n */\nlet zoneOffsetGuessCache = {};\n\n/**\n * A DateTime is an immutable data structure representing a specific date and time and accompanying methods. It contains class and instance methods for creating, parsing, interrogating, transforming, and formatting them.\n *\n * A DateTime comprises of:\n * * A timestamp. Each DateTime instance refers to a specific millisecond of the Unix epoch.\n * * A time zone. Each instance is considered in the context of a specific zone (by default the local system's zone).\n * * Configuration properties that effect how output strings are formatted, such as `locale`, `numberingSystem`, and `outputCalendar`.\n *\n * Here is a brief overview of the most commonly used functionality it provides:\n *\n * * **Creation**: To create a DateTime from its components, use one of its factory class methods: {@link DateTime.local}, {@link DateTime.utc}, and (most flexibly) {@link DateTime.fromObject}. To create one from a standard string format, use {@link DateTime.fromISO}, {@link DateTime.fromHTTP}, and {@link DateTime.fromRFC2822}. To create one from a custom string format, use {@link DateTime.fromFormat}. To create one from a native JS date, use {@link DateTime.fromJSDate}.\n * * **Gregorian calendar and time**: To examine the Gregorian properties of a DateTime individually (i.e as opposed to collectively through {@link DateTime#toObject}), use the {@link DateTime#year}, {@link DateTime#month},\n * {@link DateTime#day}, {@link DateTime#hour}, {@link DateTime#minute}, {@link DateTime#second}, {@link DateTime#millisecond} accessors.\n * * **Week calendar**: For ISO week calendar attributes, see the {@link DateTime#weekYear}, {@link DateTime#weekNumber}, and {@link DateTime#weekday} accessors.\n * * **Configuration** See the {@link DateTime#locale} and {@link DateTime#numberingSystem} accessors.\n * * **Transformation**: To transform the DateTime into other DateTimes, use {@link DateTime#set}, {@link DateTime#reconfigure}, {@link DateTime#setZone}, {@link DateTime#setLocale}, {@link DateTime.plus}, {@link DateTime#minus}, {@link DateTime#endOf}, {@link DateTime#startOf}, {@link DateTime#toUTC}, and {@link DateTime#toLocal}.\n * * **Output**: To convert the DateTime to other representations, use the {@link DateTime#toRelative}, {@link DateTime#toRelativeCalendar}, {@link DateTime#toJSON}, {@link DateTime#toISO}, {@link DateTime#toHTTP}, {@link DateTime#toObject}, {@link DateTime#toRFC2822}, {@link DateTime#toString}, {@link DateTime#toLocaleString}, {@link DateTime#toFormat}, {@link DateTime#toMillis} and {@link DateTime#toJSDate}.\n *\n * There's plenty others documented below. In addition, for more information on subtler topics like internationalization, time zones, alternative calendars, validity, and so on, see the external documentation.\n */\nexport default class DateTime {\n /**\n * @access private\n */\n constructor(config) {\n const zone = config.zone || Settings.defaultZone;\n\n let invalid =\n config.invalid ||\n (Number.isNaN(config.ts) ? new Invalid(\"invalid input\") : null) ||\n (!zone.isValid ? unsupportedZone(zone) : null);\n /**\n * @access private\n */\n this.ts = isUndefined(config.ts) ? Settings.now() : config.ts;\n\n let c = null,\n o = null;\n if (!invalid) {\n const unchanged = config.old && config.old.ts === this.ts && config.old.zone.equals(zone);\n\n if (unchanged) {\n [c, o] = [config.old.c, config.old.o];\n } else {\n // If an offset has been passed and we have not been called from\n // clone(), we can trust it and avoid the offset calculation.\n const ot = isNumber(config.o) && !config.old ? config.o : zone.offset(this.ts);\n c = tsToObj(this.ts, ot);\n invalid = Number.isNaN(c.year) ? new Invalid(\"invalid input\") : null;\n c = invalid ? null : c;\n o = invalid ? null : ot;\n }\n }\n\n /**\n * @access private\n */\n this._zone = zone;\n /**\n * @access private\n */\n this.loc = config.loc || Locale.create();\n /**\n * @access private\n */\n this.invalid = invalid;\n /**\n * @access private\n */\n this.weekData = null;\n /**\n * @access private\n */\n this.localWeekData = null;\n /**\n * @access private\n */\n this.c = c;\n /**\n * @access private\n */\n this.o = o;\n /**\n * @access private\n */\n this.isLuxonDateTime = true;\n }\n\n // CONSTRUCT\n\n /**\n * Create a DateTime for the current instant, in the system's time zone.\n *\n * Use Settings to override these default values if needed.\n * @example DateTime.now().toISO() //~> now in the ISO format\n * @return {DateTime}\n */\n static now() {\n return new DateTime({});\n }\n\n /**\n * Create a local DateTime\n * @param {number} [year] - The calendar year. If omitted (as in, call `local()` with no arguments), the current time will be used\n * @param {number} [month=1] - The month, 1-indexed\n * @param {number} [day=1] - The day of the month, 1-indexed\n * @param {number} [hour=0] - The hour of the day, in 24-hour time\n * @param {number} [minute=0] - The minute of the hour, meaning a number between 0 and 59\n * @param {number} [second=0] - The second of the minute, meaning a number between 0 and 59\n * @param {number} [millisecond=0] - The millisecond of the second, meaning a number between 0 and 999\n * @example DateTime.local() //~> now\n * @example DateTime.local({ zone: \"America/New_York\" }) //~> now, in US east coast time\n * @example DateTime.local(2017) //~> 2017-01-01T00:00:00\n * @example DateTime.local(2017, 3) //~> 2017-03-01T00:00:00\n * @example DateTime.local(2017, 3, 12, { locale: \"fr\" }) //~> 2017-03-12T00:00:00, with a French locale\n * @example DateTime.local(2017, 3, 12, 5) //~> 2017-03-12T05:00:00\n * @example DateTime.local(2017, 3, 12, 5, { zone: \"utc\" }) //~> 2017-03-12T05:00:00, in UTC\n * @example DateTime.local(2017, 3, 12, 5, 45) //~> 2017-03-12T05:45:00\n * @example DateTime.local(2017, 3, 12, 5, 45, 10) //~> 2017-03-12T05:45:10\n * @example DateTime.local(2017, 3, 12, 5, 45, 10, 765) //~> 2017-03-12T05:45:10.765\n * @return {DateTime}\n */\n static local() {\n const [opts, args] = lastOpts(arguments),\n [year, month, day, hour, minute, second, millisecond] = args;\n return quickDT({ year, month, day, hour, minute, second, millisecond }, opts);\n }\n\n /**\n * Create a DateTime in UTC\n * @param {number} [year] - The calendar year. If omitted (as in, call `utc()` with no arguments), the current time will be used\n * @param {number} [month=1] - The month, 1-indexed\n * @param {number} [day=1] - The day of the month\n * @param {number} [hour=0] - The hour of the day, in 24-hour time\n * @param {number} [minute=0] - The minute of the hour, meaning a number between 0 and 59\n * @param {number} [second=0] - The second of the minute, meaning a number between 0 and 59\n * @param {number} [millisecond=0] - The millisecond of the second, meaning a number between 0 and 999\n * @param {Object} options - configuration options for the DateTime\n * @param {string} [options.locale] - a locale to set on the resulting DateTime instance\n * @param {string} [options.outputCalendar] - the output calendar to set on the resulting DateTime instance\n * @param {string} [options.numberingSystem] - the numbering system to set on the resulting DateTime instance\n * @param {string} [options.weekSettings] - the week settings to set on the resulting DateTime instance\n * @example DateTime.utc() //~> now\n * @example DateTime.utc(2017) //~> 2017-01-01T00:00:00Z\n * @example DateTime.utc(2017, 3) //~> 2017-03-01T00:00:00Z\n * @example DateTime.utc(2017, 3, 12) //~> 2017-03-12T00:00:00Z\n * @example DateTime.utc(2017, 3, 12, 5) //~> 2017-03-12T05:00:00Z\n * @example DateTime.utc(2017, 3, 12, 5, 45) //~> 2017-03-12T05:45:00Z\n * @example DateTime.utc(2017, 3, 12, 5, 45, { locale: \"fr\" }) //~> 2017-03-12T05:45:00Z with a French locale\n * @example DateTime.utc(2017, 3, 12, 5, 45, 10) //~> 2017-03-12T05:45:10Z\n * @example DateTime.utc(2017, 3, 12, 5, 45, 10, 765, { locale: \"fr\" }) //~> 2017-03-12T05:45:10.765Z with a French locale\n * @return {DateTime}\n */\n static utc() {\n const [opts, args] = lastOpts(arguments),\n [year, month, day, hour, minute, second, millisecond] = args;\n\n opts.zone = FixedOffsetZone.utcInstance;\n return quickDT({ year, month, day, hour, minute, second, millisecond }, opts);\n }\n\n /**\n * Create a DateTime from a JavaScript Date object. Uses the default zone.\n * @param {Date} date - a JavaScript Date object\n * @param {Object} options - configuration options for the DateTime\n * @param {string|Zone} [options.zone='local'] - the zone to place the DateTime into\n * @return {DateTime}\n */\n static fromJSDate(date, options = {}) {\n const ts = isDate(date) ? date.valueOf() : NaN;\n if (Number.isNaN(ts)) {\n return DateTime.invalid(\"invalid input\");\n }\n\n const zoneToUse = normalizeZone(options.zone, Settings.defaultZone);\n if (!zoneToUse.isValid) {\n return DateTime.invalid(unsupportedZone(zoneToUse));\n }\n\n return new DateTime({\n ts: ts,\n zone: zoneToUse,\n loc: Locale.fromObject(options),\n });\n }\n\n /**\n * Create a DateTime from a number of milliseconds since the epoch (meaning since 1 January 1970 00:00:00 UTC). Uses the default zone.\n * @param {number} milliseconds - a number of milliseconds since 1970 UTC\n * @param {Object} options - configuration options for the DateTime\n * @param {string|Zone} [options.zone='local'] - the zone to place the DateTime into\n * @param {string} [options.locale] - a locale to set on the resulting DateTime instance\n * @param {string} options.outputCalendar - the output calendar to set on the resulting DateTime instance\n * @param {string} options.numberingSystem - the numbering system to set on the resulting DateTime instance\n * @param {string} options.weekSettings - the week settings to set on the resulting DateTime instance\n * @return {DateTime}\n */\n static fromMillis(milliseconds, options = {}) {\n if (!isNumber(milliseconds)) {\n throw new InvalidArgumentError(\n `fromMillis requires a numerical input, but received a ${typeof milliseconds} with value ${milliseconds}`\n );\n } else if (milliseconds < -MAX_DATE || milliseconds > MAX_DATE) {\n // this isn't perfect because we can still end up out of range because of additional shifting, but it's a start\n return DateTime.invalid(\"Timestamp out of range\");\n } else {\n return new DateTime({\n ts: milliseconds,\n zone: normalizeZone(options.zone, Settings.defaultZone),\n loc: Locale.fromObject(options),\n });\n }\n }\n\n /**\n * Create a DateTime from a number of seconds since the epoch (meaning since 1 January 1970 00:00:00 UTC). Uses the default zone.\n * @param {number} seconds - a number of seconds since 1970 UTC\n * @param {Object} options - configuration options for the DateTime\n * @param {string|Zone} [options.zone='local'] - the zone to place the DateTime into\n * @param {string} [options.locale] - a locale to set on the resulting DateTime instance\n * @param {string} options.outputCalendar - the output calendar to set on the resulting DateTime instance\n * @param {string} options.numberingSystem - the numbering system to set on the resulting DateTime instance\n * @param {string} options.weekSettings - the week settings to set on the resulting DateTime instance\n * @return {DateTime}\n */\n static fromSeconds(seconds, options = {}) {\n if (!isNumber(seconds)) {\n throw new InvalidArgumentError(\"fromSeconds requires a numerical input\");\n } else {\n return new DateTime({\n ts: seconds * 1000,\n zone: normalizeZone(options.zone, Settings.defaultZone),\n loc: Locale.fromObject(options),\n });\n }\n }\n\n /**\n * Create a DateTime from a JavaScript object with keys like 'year' and 'hour' with reasonable defaults.\n * @param {Object} obj - the object to create the DateTime from\n * @param {number} obj.year - a year, such as 1987\n * @param {number} obj.month - a month, 1-12\n * @param {number} obj.day - a day of the month, 1-31, depending on the month\n * @param {number} obj.ordinal - day of the year, 1-365 or 366\n * @param {number} obj.weekYear - an ISO week year\n * @param {number} obj.weekNumber - an ISO week number, between 1 and 52 or 53, depending on the year\n * @param {number} obj.weekday - an ISO weekday, 1-7, where 1 is Monday and 7 is Sunday\n * @param {number} obj.localWeekYear - a week year, according to the locale\n * @param {number} obj.localWeekNumber - a week number, between 1 and 52 or 53, depending on the year, according to the locale\n * @param {number} obj.localWeekday - a weekday, 1-7, where 1 is the first and 7 is the last day of the week, according to the locale\n * @param {number} obj.hour - hour of the day, 0-23\n * @param {number} obj.minute - minute of the hour, 0-59\n * @param {number} obj.second - second of the minute, 0-59\n * @param {number} obj.millisecond - millisecond of the second, 0-999\n * @param {Object} opts - options for creating this DateTime\n * @param {string|Zone} [opts.zone='local'] - interpret the numbers in the context of a particular zone. Can take any value taken as the first argument to setZone()\n * @param {string} [opts.locale='system\\'s locale'] - a locale to set on the resulting DateTime instance\n * @param {string} opts.outputCalendar - the output calendar to set on the resulting DateTime instance\n * @param {string} opts.numberingSystem - the numbering system to set on the resulting DateTime instance\n * @param {string} opts.weekSettings - the week settings to set on the resulting DateTime instance\n * @example DateTime.fromObject({ year: 1982, month: 5, day: 25}).toISODate() //=> '1982-05-25'\n * @example DateTime.fromObject({ year: 1982 }).toISODate() //=> '1982-01-01'\n * @example DateTime.fromObject({ hour: 10, minute: 26, second: 6 }) //~> today at 10:26:06\n * @example DateTime.fromObject({ hour: 10, minute: 26, second: 6 }, { zone: 'utc' }),\n * @example DateTime.fromObject({ hour: 10, minute: 26, second: 6 }, { zone: 'local' })\n * @example DateTime.fromObject({ hour: 10, minute: 26, second: 6 }, { zone: 'America/New_York' })\n * @example DateTime.fromObject({ weekYear: 2016, weekNumber: 2, weekday: 3 }).toISODate() //=> '2016-01-13'\n * @example DateTime.fromObject({ localWeekYear: 2022, localWeekNumber: 1, localWeekday: 1 }, { locale: \"en-US\" }).toISODate() //=> '2021-12-26'\n * @return {DateTime}\n */\n static fromObject(obj, opts = {}) {\n obj = obj || {};\n const zoneToUse = normalizeZone(opts.zone, Settings.defaultZone);\n if (!zoneToUse.isValid) {\n return DateTime.invalid(unsupportedZone(zoneToUse));\n }\n\n const loc = Locale.fromObject(opts);\n const normalized = normalizeObject(obj, normalizeUnitWithLocalWeeks);\n const { minDaysInFirstWeek, startOfWeek } = usesLocalWeekValues(normalized, loc);\n\n const tsNow = Settings.now(),\n offsetProvis = !isUndefined(opts.specificOffset)\n ? opts.specificOffset\n : zoneToUse.offset(tsNow),\n containsOrdinal = !isUndefined(normalized.ordinal),\n containsGregorYear = !isUndefined(normalized.year),\n containsGregorMD = !isUndefined(normalized.month) || !isUndefined(normalized.day),\n containsGregor = containsGregorYear || containsGregorMD,\n definiteWeekDef = normalized.weekYear || normalized.weekNumber;\n\n // cases:\n // just a weekday -> this week's instance of that weekday, no worries\n // (gregorian data or ordinal) + (weekYear or weekNumber) -> error\n // (gregorian month or day) + ordinal -> error\n // otherwise just use weeks or ordinals or gregorian, depending on what's specified\n\n if ((containsGregor || containsOrdinal) && definiteWeekDef) {\n throw new ConflictingSpecificationError(\n \"Can't mix weekYear/weekNumber units with year/month/day or ordinals\"\n );\n }\n\n if (containsGregorMD && containsOrdinal) {\n throw new ConflictingSpecificationError(\"Can't mix ordinal dates with month/day\");\n }\n\n const useWeekData = definiteWeekDef || (normalized.weekday && !containsGregor);\n\n // configure ourselves to deal with gregorian dates or week stuff\n let units,\n defaultValues,\n objNow = tsToObj(tsNow, offsetProvis);\n if (useWeekData) {\n units = orderedWeekUnits;\n defaultValues = defaultWeekUnitValues;\n objNow = gregorianToWeek(objNow, minDaysInFirstWeek, startOfWeek);\n } else if (containsOrdinal) {\n units = orderedOrdinalUnits;\n defaultValues = defaultOrdinalUnitValues;\n objNow = gregorianToOrdinal(objNow);\n } else {\n units = orderedUnits;\n defaultValues = defaultUnitValues;\n }\n\n // set default values for missing stuff\n let foundFirst = false;\n for (const u of units) {\n const v = normalized[u];\n if (!isUndefined(v)) {\n foundFirst = true;\n } else if (foundFirst) {\n normalized[u] = defaultValues[u];\n } else {\n normalized[u] = objNow[u];\n }\n }\n\n // make sure the values we have are in range\n const higherOrderInvalid = useWeekData\n ? hasInvalidWeekData(normalized, minDaysInFirstWeek, startOfWeek)\n : containsOrdinal\n ? hasInvalidOrdinalData(normalized)\n : hasInvalidGregorianData(normalized),\n invalid = higherOrderInvalid || hasInvalidTimeData(normalized);\n\n if (invalid) {\n return DateTime.invalid(invalid);\n }\n\n // compute the actual time\n const gregorian = useWeekData\n ? weekToGregorian(normalized, minDaysInFirstWeek, startOfWeek)\n : containsOrdinal\n ? ordinalToGregorian(normalized)\n : normalized,\n [tsFinal, offsetFinal] = objToTS(gregorian, offsetProvis, zoneToUse),\n inst = new DateTime({\n ts: tsFinal,\n zone: zoneToUse,\n o: offsetFinal,\n loc,\n });\n\n // gregorian data + weekday serves only to validate\n if (normalized.weekday && containsGregor && obj.weekday !== inst.weekday) {\n return DateTime.invalid(\n \"mismatched weekday\",\n `you can't specify both a weekday of ${normalized.weekday} and a date of ${inst.toISO()}`\n );\n }\n\n if (!inst.isValid) {\n return DateTime.invalid(inst.invalid);\n }\n\n return inst;\n }\n\n /**\n * Create a DateTime from an ISO 8601 string\n * @param {string} text - the ISO string\n * @param {Object} opts - options to affect the creation\n * @param {string|Zone} [opts.zone='local'] - use this zone if no offset is specified in the input string itself. Will also convert the time to this zone\n * @param {boolean} [opts.setZone=false] - override the zone with a fixed-offset zone specified in the string itself, if it specifies one\n * @param {string} [opts.locale='system's locale'] - a locale to set on the resulting DateTime instance\n * @param {string} [opts.outputCalendar] - the output calendar to set on the resulting DateTime instance\n * @param {string} [opts.numberingSystem] - the numbering system to set on the resulting DateTime instance\n * @param {string} [opts.weekSettings] - the week settings to set on the resulting DateTime instance\n * @example DateTime.fromISO('2016-05-25T09:08:34.123')\n * @example DateTime.fromISO('2016-05-25T09:08:34.123+06:00')\n * @example DateTime.fromISO('2016-05-25T09:08:34.123+06:00', {setZone: true})\n * @example DateTime.fromISO('2016-05-25T09:08:34.123', {zone: 'utc'})\n * @example DateTime.fromISO('2016-W05-4')\n * @return {DateTime}\n */\n static fromISO(text, opts = {}) {\n const [vals, parsedZone] = parseISODate(text);\n return parseDataToDateTime(vals, parsedZone, opts, \"ISO 8601\", text);\n }\n\n /**\n * Create a DateTime from an RFC 2822 string\n * @param {string} text - the RFC 2822 string\n * @param {Object} opts - options to affect the creation\n * @param {string|Zone} [opts.zone='local'] - convert the time to this zone. Since the offset is always specified in the string itself, this has no effect on the interpretation of string, merely the zone the resulting DateTime is expressed in.\n * @param {boolean} [opts.setZone=false] - override the zone with a fixed-offset zone specified in the string itself, if it specifies one\n * @param {string} [opts.locale='system's locale'] - a locale to set on the resulting DateTime instance\n * @param {string} opts.outputCalendar - the output calendar to set on the resulting DateTime instance\n * @param {string} opts.numberingSystem - the numbering system to set on the resulting DateTime instance\n * @param {string} opts.weekSettings - the week settings to set on the resulting DateTime instance\n * @example DateTime.fromRFC2822('25 Nov 2016 13:23:12 GMT')\n * @example DateTime.fromRFC2822('Fri, 25 Nov 2016 13:23:12 +0600')\n * @example DateTime.fromRFC2822('25 Nov 2016 13:23 Z')\n * @return {DateTime}\n */\n static fromRFC2822(text, opts = {}) {\n const [vals, parsedZone] = parseRFC2822Date(text);\n return parseDataToDateTime(vals, parsedZone, opts, \"RFC 2822\", text);\n }\n\n /**\n * Create a DateTime from an HTTP header date\n * @see https://www.w3.org/Protocols/rfc2616/rfc2616-sec3.html#sec3.3.1\n * @param {string} text - the HTTP header date\n * @param {Object} opts - options to affect the creation\n * @param {string|Zone} [opts.zone='local'] - convert the time to this zone. Since HTTP dates are always in UTC, this has no effect on the interpretation of string, merely the zone the resulting DateTime is expressed in.\n * @param {boolean} [opts.setZone=false] - override the zone with the fixed-offset zone specified in the string. For HTTP dates, this is always UTC, so this option is equivalent to setting the `zone` option to 'utc', but this option is included for consistency with similar methods.\n * @param {string} [opts.locale='system's locale'] - a locale to set on the resulting DateTime instance\n * @param {string} opts.outputCalendar - the output calendar to set on the resulting DateTime instance\n * @param {string} opts.numberingSystem - the numbering system to set on the resulting DateTime instance\n * @param {string} opts.weekSettings - the week settings to set on the resulting DateTime instance\n * @example DateTime.fromHTTP('Sun, 06 Nov 1994 08:49:37 GMT')\n * @example DateTime.fromHTTP('Sunday, 06-Nov-94 08:49:37 GMT')\n * @example DateTime.fromHTTP('Sun Nov 6 08:49:37 1994')\n * @return {DateTime}\n */\n static fromHTTP(text, opts = {}) {\n const [vals, parsedZone] = parseHTTPDate(text);\n return parseDataToDateTime(vals, parsedZone, opts, \"HTTP\", opts);\n }\n\n /**\n * Create a DateTime from an input string and format string.\n * Defaults to en-US if no locale has been specified, regardless of the system's locale. For a table of tokens and their interpretations, see [here](https://moment.github.io/luxon/#/parsing?id=table-of-tokens).\n * @param {string} text - the string to parse\n * @param {string} fmt - the format the string is expected to be in (see the link below for the formats)\n * @param {Object} opts - options to affect the creation\n * @param {string|Zone} [opts.zone='local'] - use this zone if no offset is specified in the input string itself. Will also convert the DateTime to this zone\n * @param {boolean} [opts.setZone=false] - override the zone with a zone specified in the string itself, if it specifies one\n * @param {string} [opts.locale='en-US'] - a locale string to use when parsing. Will also set the DateTime to this locale\n * @param {string} opts.numberingSystem - the numbering system to use when parsing. Will also set the resulting DateTime to this numbering system\n * @param {string} opts.weekSettings - the week settings to set on the resulting DateTime instance\n * @param {string} opts.outputCalendar - the output calendar to set on the resulting DateTime instance\n * @return {DateTime}\n */\n static fromFormat(text, fmt, opts = {}) {\n if (isUndefined(text) || isUndefined(fmt)) {\n throw new InvalidArgumentError(\"fromFormat requires an input string and a format\");\n }\n\n const { locale = null, numberingSystem = null } = opts,\n localeToUse = Locale.fromOpts({\n locale,\n numberingSystem,\n defaultToEN: true,\n }),\n [vals, parsedZone, specificOffset, invalid] = parseFromTokens(localeToUse, text, fmt);\n if (invalid) {\n return DateTime.invalid(invalid);\n } else {\n return parseDataToDateTime(vals, parsedZone, opts, `format ${fmt}`, text, specificOffset);\n }\n }\n\n /**\n * @deprecated use fromFormat instead\n */\n static fromString(text, fmt, opts = {}) {\n return DateTime.fromFormat(text, fmt, opts);\n }\n\n /**\n * Create a DateTime from a SQL date, time, or datetime\n * Defaults to en-US if no locale has been specified, regardless of the system's locale\n * @param {string} text - the string to parse\n * @param {Object} opts - options to affect the creation\n * @param {string|Zone} [opts.zone='local'] - use this zone if no offset is specified in the input string itself. Will also convert the DateTime to this zone\n * @param {boolean} [opts.setZone=false] - override the zone with a zone specified in the string itself, if it specifies one\n * @param {string} [opts.locale='en-US'] - a locale string to use when parsing. Will also set the DateTime to this locale\n * @param {string} opts.numberingSystem - the numbering system to use when parsing. Will also set the resulting DateTime to this numbering system\n * @param {string} opts.weekSettings - the week settings to set on the resulting DateTime instance\n * @param {string} opts.outputCalendar - the output calendar to set on the resulting DateTime instance\n * @example DateTime.fromSQL('2017-05-15')\n * @example DateTime.fromSQL('2017-05-15 09:12:34')\n * @example DateTime.fromSQL('2017-05-15 09:12:34.342')\n * @example DateTime.fromSQL('2017-05-15 09:12:34.342+06:00')\n * @example DateTime.fromSQL('2017-05-15 09:12:34.342 America/Los_Angeles')\n * @example DateTime.fromSQL('2017-05-15 09:12:34.342 America/Los_Angeles', { setZone: true })\n * @example DateTime.fromSQL('2017-05-15 09:12:34.342', { zone: 'America/Los_Angeles' })\n * @example DateTime.fromSQL('09:12:34.342')\n * @return {DateTime}\n */\n static fromSQL(text, opts = {}) {\n const [vals, parsedZone] = parseSQL(text);\n return parseDataToDateTime(vals, parsedZone, opts, \"SQL\", text);\n }\n\n /**\n * Create an invalid DateTime.\n * @param {string} reason - simple string of why this DateTime is invalid. Should not contain parameters or anything else data-dependent.\n * @param {string} [explanation=null] - longer explanation, may include parameters and other useful debugging information\n * @return {DateTime}\n */\n static invalid(reason, explanation = null) {\n if (!reason) {\n throw new InvalidArgumentError(\"need to specify a reason the DateTime is invalid\");\n }\n\n const invalid = reason instanceof Invalid ? reason : new Invalid(reason, explanation);\n\n if (Settings.throwOnInvalid) {\n throw new InvalidDateTimeError(invalid);\n } else {\n return new DateTime({ invalid });\n }\n }\n\n /**\n * Check if an object is an instance of DateTime. Works across context boundaries\n * @param {object} o\n * @return {boolean}\n */\n static isDateTime(o) {\n return (o && o.isLuxonDateTime) || false;\n }\n\n /**\n * Produce the format string for a set of options\n * @param formatOpts\n * @param localeOpts\n * @returns {string}\n */\n static parseFormatForOpts(formatOpts, localeOpts = {}) {\n const tokenList = formatOptsToTokens(formatOpts, Locale.fromObject(localeOpts));\n return !tokenList ? null : tokenList.map((t) => (t ? t.val : null)).join(\"\");\n }\n\n /**\n * Produce the the fully expanded format token for the locale\n * Does NOT quote characters, so quoted tokens will not round trip correctly\n * @param fmt\n * @param localeOpts\n * @returns {string}\n */\n static expandFormat(fmt, localeOpts = {}) {\n const expanded = expandMacroTokens(Formatter.parseFormat(fmt), Locale.fromObject(localeOpts));\n return expanded.map((t) => t.val).join(\"\");\n }\n\n static resetCache() {\n zoneOffsetTs = undefined;\n zoneOffsetGuessCache = {};\n }\n\n // INFO\n\n /**\n * Get the value of unit.\n * @param {string} unit - a unit such as 'minute' or 'day'\n * @example DateTime.local(2017, 7, 4).get('month'); //=> 7\n * @example DateTime.local(2017, 7, 4).get('day'); //=> 4\n * @return {number}\n */\n get(unit) {\n return this[unit];\n }\n\n /**\n * Returns whether the DateTime is valid. Invalid DateTimes occur when:\n * * The DateTime was created from invalid calendar information, such as the 13th month or February 30\n * * The DateTime was created by an operation on another invalid date\n * @type {boolean}\n */\n get isValid() {\n return this.invalid === null;\n }\n\n /**\n * Returns an error code if this DateTime is invalid, or null if the DateTime is valid\n * @type {string}\n */\n get invalidReason() {\n return this.invalid ? this.invalid.reason : null;\n }\n\n /**\n * Returns an explanation of why this DateTime became invalid, or null if the DateTime is valid\n * @type {string}\n */\n get invalidExplanation() {\n return this.invalid ? this.invalid.explanation : null;\n }\n\n /**\n * Get the locale of a DateTime, such 'en-GB'. The locale is used when formatting the DateTime\n *\n * @type {string}\n */\n get locale() {\n return this.isValid ? this.loc.locale : null;\n }\n\n /**\n * Get the numbering system of a DateTime, such 'beng'. The numbering system is used when formatting the DateTime\n *\n * @type {string}\n */\n get numberingSystem() {\n return this.isValid ? this.loc.numberingSystem : null;\n }\n\n /**\n * Get the output calendar of a DateTime, such 'islamic'. The output calendar is used when formatting the DateTime\n *\n * @type {string}\n */\n get outputCalendar() {\n return this.isValid ? this.loc.outputCalendar : null;\n }\n\n /**\n * Get the time zone associated with this DateTime.\n * @type {Zone}\n */\n get zone() {\n return this._zone;\n }\n\n /**\n * Get the name of the time zone.\n * @type {string}\n */\n get zoneName() {\n return this.isValid ? this.zone.name : null;\n }\n\n /**\n * Get the year\n * @example DateTime.local(2017, 5, 25).year //=> 2017\n * @type {number}\n */\n get year() {\n return this.isValid ? this.c.year : NaN;\n }\n\n /**\n * Get the quarter\n * @example DateTime.local(2017, 5, 25).quarter //=> 2\n * @type {number}\n */\n get quarter() {\n return this.isValid ? Math.ceil(this.c.month / 3) : NaN;\n }\n\n /**\n * Get the month (1-12).\n * @example DateTime.local(2017, 5, 25).month //=> 5\n * @type {number}\n */\n get month() {\n return this.isValid ? this.c.month : NaN;\n }\n\n /**\n * Get the day of the month (1-30ish).\n * @example DateTime.local(2017, 5, 25).day //=> 25\n * @type {number}\n */\n get day() {\n return this.isValid ? this.c.day : NaN;\n }\n\n /**\n * Get the hour of the day (0-23).\n * @example DateTime.local(2017, 5, 25, 9).hour //=> 9\n * @type {number}\n */\n get hour() {\n return this.isValid ? this.c.hour : NaN;\n }\n\n /**\n * Get the minute of the hour (0-59).\n * @example DateTime.local(2017, 5, 25, 9, 30).minute //=> 30\n * @type {number}\n */\n get minute() {\n return this.isValid ? this.c.minute : NaN;\n }\n\n /**\n * Get the second of the minute (0-59).\n * @example DateTime.local(2017, 5, 25, 9, 30, 52).second //=> 52\n * @type {number}\n */\n get second() {\n return this.isValid ? this.c.second : NaN;\n }\n\n /**\n * Get the millisecond of the second (0-999).\n * @example DateTime.local(2017, 5, 25, 9, 30, 52, 654).millisecond //=> 654\n * @type {number}\n */\n get millisecond() {\n return this.isValid ? this.c.millisecond : NaN;\n }\n\n /**\n * Get the week year\n * @see https://en.wikipedia.org/wiki/ISO_week_date\n * @example DateTime.local(2014, 12, 31).weekYear //=> 2015\n * @type {number}\n */\n get weekYear() {\n return this.isValid ? possiblyCachedWeekData(this).weekYear : NaN;\n }\n\n /**\n * Get the week number of the week year (1-52ish).\n * @see https://en.wikipedia.org/wiki/ISO_week_date\n * @example DateTime.local(2017, 5, 25).weekNumber //=> 21\n * @type {number}\n */\n get weekNumber() {\n return this.isValid ? possiblyCachedWeekData(this).weekNumber : NaN;\n }\n\n /**\n * Get the day of the week.\n * 1 is Monday and 7 is Sunday\n * @see https://en.wikipedia.org/wiki/ISO_week_date\n * @example DateTime.local(2014, 11, 31).weekday //=> 4\n * @type {number}\n */\n get weekday() {\n return this.isValid ? possiblyCachedWeekData(this).weekday : NaN;\n }\n\n /**\n * Returns true if this date is on a weekend according to the locale, false otherwise\n * @returns {boolean}\n */\n get isWeekend() {\n return this.isValid && this.loc.getWeekendDays().includes(this.weekday);\n }\n\n /**\n * Get the day of the week according to the locale.\n * 1 is the first day of the week and 7 is the last day of the week.\n * If the locale assigns Sunday as the first day of the week, then a date which is a Sunday will return 1,\n * @returns {number}\n */\n get localWeekday() {\n return this.isValid ? possiblyCachedLocalWeekData(this).weekday : NaN;\n }\n\n /**\n * Get the week number of the week year according to the locale. Different locales assign week numbers differently,\n * because the week can start on different days of the week (see localWeekday) and because a different number of days\n * is required for a week to count as the first week of a year.\n * @returns {number}\n */\n get localWeekNumber() {\n return this.isValid ? possiblyCachedLocalWeekData(this).weekNumber : NaN;\n }\n\n /**\n * Get the week year according to the locale. Different locales assign week numbers (and therefor week years)\n * differently, see localWeekNumber.\n * @returns {number}\n */\n get localWeekYear() {\n return this.isValid ? possiblyCachedLocalWeekData(this).weekYear : NaN;\n }\n\n /**\n * Get the ordinal (meaning the day of the year)\n * @example DateTime.local(2017, 5, 25).ordinal //=> 145\n * @type {number|DateTime}\n */\n get ordinal() {\n return this.isValid ? gregorianToOrdinal(this.c).ordinal : NaN;\n }\n\n /**\n * Get the human readable short month name, such as 'Oct'.\n * Defaults to the system's locale if no locale has been specified\n * @example DateTime.local(2017, 10, 30).monthShort //=> Oct\n * @type {string}\n */\n get monthShort() {\n return this.isValid ? Info.months(\"short\", { locObj: this.loc })[this.month - 1] : null;\n }\n\n /**\n * Get the human readable long month name, such as 'October'.\n * Defaults to the system's locale if no locale has been specified\n * @example DateTime.local(2017, 10, 30).monthLong //=> October\n * @type {string}\n */\n get monthLong() {\n return this.isValid ? Info.months(\"long\", { locObj: this.loc })[this.month - 1] : null;\n }\n\n /**\n * Get the human readable short weekday, such as 'Mon'.\n * Defaults to the system's locale if no locale has been specified\n * @example DateTime.local(2017, 10, 30).weekdayShort //=> Mon\n * @type {string}\n */\n get weekdayShort() {\n return this.isValid ? Info.weekdays(\"short\", { locObj: this.loc })[this.weekday - 1] : null;\n }\n\n /**\n * Get the human readable long weekday, such as 'Monday'.\n * Defaults to the system's locale if no locale has been specified\n * @example DateTime.local(2017, 10, 30).weekdayLong //=> Monday\n * @type {string}\n */\n get weekdayLong() {\n return this.isValid ? Info.weekdays(\"long\", { locObj: this.loc })[this.weekday - 1] : null;\n }\n\n /**\n * Get the UTC offset of this DateTime in minutes\n * @example DateTime.now().offset //=> -240\n * @example DateTime.utc().offset //=> 0\n * @type {number}\n */\n get offset() {\n return this.isValid ? +this.o : NaN;\n }\n\n /**\n * Get the short human name for the zone's current offset, for example \"EST\" or \"EDT\".\n * Defaults to the system's locale if no locale has been specified\n * @type {string}\n */\n get offsetNameShort() {\n if (this.isValid) {\n return this.zone.offsetName(this.ts, {\n format: \"short\",\n locale: this.locale,\n });\n } else {\n return null;\n }\n }\n\n /**\n * Get the long human name for the zone's current offset, for example \"Eastern Standard Time\" or \"Eastern Daylight Time\".\n * Defaults to the system's locale if no locale has been specified\n * @type {string}\n */\n get offsetNameLong() {\n if (this.isValid) {\n return this.zone.offsetName(this.ts, {\n format: \"long\",\n locale: this.locale,\n });\n } else {\n return null;\n }\n }\n\n /**\n * Get whether this zone's offset ever changes, as in a DST.\n * @type {boolean}\n */\n get isOffsetFixed() {\n return this.isValid ? this.zone.isUniversal : null;\n }\n\n /**\n * Get whether the DateTime is in a DST.\n * @type {boolean}\n */\n get isInDST() {\n if (this.isOffsetFixed) {\n return false;\n } else {\n return (\n this.offset > this.set({ month: 1, day: 1 }).offset ||\n this.offset > this.set({ month: 5 }).offset\n );\n }\n }\n\n /**\n * Get those DateTimes which have the same local time as this DateTime, but a different offset from UTC\n * in this DateTime's zone. During DST changes local time can be ambiguous, for example\n * `2023-10-29T02:30:00` in `Europe/Berlin` can have offset `+01:00` or `+02:00`.\n * This method will return both possible DateTimes if this DateTime's local time is ambiguous.\n * @returns {DateTime[]}\n */\n getPossibleOffsets() {\n if (!this.isValid || this.isOffsetFixed) {\n return [this];\n }\n const dayMs = 86400000;\n const minuteMs = 60000;\n const localTS = objToLocalTS(this.c);\n const oEarlier = this.zone.offset(localTS - dayMs);\n const oLater = this.zone.offset(localTS + dayMs);\n\n const o1 = this.zone.offset(localTS - oEarlier * minuteMs);\n const o2 = this.zone.offset(localTS - oLater * minuteMs);\n if (o1 === o2) {\n return [this];\n }\n const ts1 = localTS - o1 * minuteMs;\n const ts2 = localTS - o2 * minuteMs;\n const c1 = tsToObj(ts1, o1);\n const c2 = tsToObj(ts2, o2);\n if (\n c1.hour === c2.hour &&\n c1.minute === c2.minute &&\n c1.second === c2.second &&\n c1.millisecond === c2.millisecond\n ) {\n return [clone(this, { ts: ts1 }), clone(this, { ts: ts2 })];\n }\n return [this];\n }\n\n /**\n * Returns true if this DateTime is in a leap year, false otherwise\n * @example DateTime.local(2016).isInLeapYear //=> true\n * @example DateTime.local(2013).isInLeapYear //=> false\n * @type {boolean}\n */\n get isInLeapYear() {\n return isLeapYear(this.year);\n }\n\n /**\n * Returns the number of days in this DateTime's month\n * @example DateTime.local(2016, 2).daysInMonth //=> 29\n * @example DateTime.local(2016, 3).daysInMonth //=> 31\n * @type {number}\n */\n get daysInMonth() {\n return daysInMonth(this.year, this.month);\n }\n\n /**\n * Returns the number of days in this DateTime's year\n * @example DateTime.local(2016).daysInYear //=> 366\n * @example DateTime.local(2013).daysInYear //=> 365\n * @type {number}\n */\n get daysInYear() {\n return this.isValid ? daysInYear(this.year) : NaN;\n }\n\n /**\n * Returns the number of weeks in this DateTime's year\n * @see https://en.wikipedia.org/wiki/ISO_week_date\n * @example DateTime.local(2004).weeksInWeekYear //=> 53\n * @example DateTime.local(2013).weeksInWeekYear //=> 52\n * @type {number}\n */\n get weeksInWeekYear() {\n return this.isValid ? weeksInWeekYear(this.weekYear) : NaN;\n }\n\n /**\n * Returns the number of weeks in this DateTime's local week year\n * @example DateTime.local(2020, 6, {locale: 'en-US'}).weeksInLocalWeekYear //=> 52\n * @example DateTime.local(2020, 6, {locale: 'de-DE'}).weeksInLocalWeekYear //=> 53\n * @type {number}\n */\n get weeksInLocalWeekYear() {\n return this.isValid\n ? weeksInWeekYear(\n this.localWeekYear,\n this.loc.getMinDaysInFirstWeek(),\n this.loc.getStartOfWeek()\n )\n : NaN;\n }\n\n /**\n * Returns the resolved Intl options for this DateTime.\n * This is useful in understanding the behavior of formatting methods\n * @param {Object} opts - the same options as toLocaleString\n * @return {Object}\n */\n resolvedLocaleOptions(opts = {}) {\n const { locale, numberingSystem, calendar } = Formatter.create(\n this.loc.clone(opts),\n opts\n ).resolvedOptions(this);\n return { locale, numberingSystem, outputCalendar: calendar };\n }\n\n // TRANSFORM\n\n /**\n * \"Set\" the DateTime's zone to UTC. Returns a newly-constructed DateTime.\n *\n * Equivalent to {@link DateTime#setZone}('utc')\n * @param {number} [offset=0] - optionally, an offset from UTC in minutes\n * @param {Object} [opts={}] - options to pass to `setZone()`\n * @return {DateTime}\n */\n toUTC(offset = 0, opts = {}) {\n return this.setZone(FixedOffsetZone.instance(offset), opts);\n }\n\n /**\n * \"Set\" the DateTime's zone to the host's local zone. Returns a newly-constructed DateTime.\n *\n * Equivalent to `setZone('local')`\n * @return {DateTime}\n */\n toLocal() {\n return this.setZone(Settings.defaultZone);\n }\n\n /**\n * \"Set\" the DateTime's zone to specified zone. Returns a newly-constructed DateTime.\n *\n * By default, the setter keeps the underlying time the same (as in, the same timestamp), but the new instance will report different local times and consider DSTs when making computations, as with {@link DateTime#plus}. You may wish to use {@link DateTime#toLocal} and {@link DateTime#toUTC} which provide simple convenience wrappers for commonly used zones.\n * @param {string|Zone} [zone='local'] - a zone identifier. As a string, that can be any IANA zone supported by the host environment, or a fixed-offset name of the form 'UTC+3', or the strings 'local' or 'utc'. You may also supply an instance of a {@link DateTime#Zone} class.\n * @param {Object} opts - options\n * @param {boolean} [opts.keepLocalTime=false] - If true, adjust the underlying time so that the local time stays the same, but in the target zone. You should rarely need this.\n * @return {DateTime}\n */\n setZone(zone, { keepLocalTime = false, keepCalendarTime = false } = {}) {\n zone = normalizeZone(zone, Settings.defaultZone);\n if (zone.equals(this.zone)) {\n return this;\n } else if (!zone.isValid) {\n return DateTime.invalid(unsupportedZone(zone));\n } else {\n let newTS = this.ts;\n if (keepLocalTime || keepCalendarTime) {\n const offsetGuess = zone.offset(this.ts);\n const asObj = this.toObject();\n [newTS] = objToTS(asObj, offsetGuess, zone);\n }\n return clone(this, { ts: newTS, zone });\n }\n }\n\n /**\n * \"Set\" the locale, numberingSystem, or outputCalendar. Returns a newly-constructed DateTime.\n * @param {Object} properties - the properties to set\n * @example DateTime.local(2017, 5, 25).reconfigure({ locale: 'en-GB' })\n * @return {DateTime}\n */\n reconfigure({ locale, numberingSystem, outputCalendar } = {}) {\n const loc = this.loc.clone({ locale, numberingSystem, outputCalendar });\n return clone(this, { loc });\n }\n\n /**\n * \"Set\" the locale. Returns a newly-constructed DateTime.\n * Just a convenient alias for reconfigure({ locale })\n * @example DateTime.local(2017, 5, 25).setLocale('en-GB')\n * @return {DateTime}\n */\n setLocale(locale) {\n return this.reconfigure({ locale });\n }\n\n /**\n * \"Set\" the values of specified units. Returns a newly-constructed DateTime.\n * You can only set units with this method; for \"setting\" metadata, see {@link DateTime#reconfigure} and {@link DateTime#setZone}.\n *\n * This method also supports setting locale-based week units, i.e. `localWeekday`, `localWeekNumber` and `localWeekYear`.\n * They cannot be mixed with ISO-week units like `weekday`.\n * @param {Object} values - a mapping of units to numbers\n * @example dt.set({ year: 2017 })\n * @example dt.set({ hour: 8, minute: 30 })\n * @example dt.set({ weekday: 5 })\n * @example dt.set({ year: 2005, ordinal: 234 })\n * @return {DateTime}\n */\n set(values) {\n if (!this.isValid) return this;\n\n const normalized = normalizeObject(values, normalizeUnitWithLocalWeeks);\n const { minDaysInFirstWeek, startOfWeek } = usesLocalWeekValues(normalized, this.loc);\n\n const settingWeekStuff =\n !isUndefined(normalized.weekYear) ||\n !isUndefined(normalized.weekNumber) ||\n !isUndefined(normalized.weekday),\n containsOrdinal = !isUndefined(normalized.ordinal),\n containsGregorYear = !isUndefined(normalized.year),\n containsGregorMD = !isUndefined(normalized.month) || !isUndefined(normalized.day),\n containsGregor = containsGregorYear || containsGregorMD,\n definiteWeekDef = normalized.weekYear || normalized.weekNumber;\n\n if ((containsGregor || containsOrdinal) && definiteWeekDef) {\n throw new ConflictingSpecificationError(\n \"Can't mix weekYear/weekNumber units with year/month/day or ordinals\"\n );\n }\n\n if (containsGregorMD && containsOrdinal) {\n throw new ConflictingSpecificationError(\"Can't mix ordinal dates with month/day\");\n }\n\n let mixed;\n if (settingWeekStuff) {\n mixed = weekToGregorian(\n { ...gregorianToWeek(this.c, minDaysInFirstWeek, startOfWeek), ...normalized },\n minDaysInFirstWeek,\n startOfWeek\n );\n } else if (!isUndefined(normalized.ordinal)) {\n mixed = ordinalToGregorian({ ...gregorianToOrdinal(this.c), ...normalized });\n } else {\n mixed = { ...this.toObject(), ...normalized };\n\n // if we didn't set the day but we ended up on an overflow date,\n // use the last day of the right month\n if (isUndefined(normalized.day)) {\n mixed.day = Math.min(daysInMonth(mixed.year, mixed.month), mixed.day);\n }\n }\n\n const [ts, o] = objToTS(mixed, this.o, this.zone);\n return clone(this, { ts, o });\n }\n\n /**\n * Add a period of time to this DateTime and return the resulting DateTime\n *\n * Adding hours, minutes, seconds, or milliseconds increases the timestamp by the right number of milliseconds. Adding days, months, or years shifts the calendar, accounting for DSTs and leap years along the way. Thus, `dt.plus({ hours: 24 })` may result in a different time than `dt.plus({ days: 1 })` if there's a DST shift in between.\n * @param {Duration|Object|number} duration - The amount to add. Either a Luxon Duration, a number of milliseconds, the object argument to Duration.fromObject()\n * @example DateTime.now().plus(123) //~> in 123 milliseconds\n * @example DateTime.now().plus({ minutes: 15 }) //~> in 15 minutes\n * @example DateTime.now().plus({ days: 1 }) //~> this time tomorrow\n * @example DateTime.now().plus({ days: -1 }) //~> this time yesterday\n * @example DateTime.now().plus({ hours: 3, minutes: 13 }) //~> in 3 hr, 13 min\n * @example DateTime.now().plus(Duration.fromObject({ hours: 3, minutes: 13 })) //~> in 3 hr, 13 min\n * @return {DateTime}\n */\n plus(duration) {\n if (!this.isValid) return this;\n const dur = Duration.fromDurationLike(duration);\n return clone(this, adjustTime(this, dur));\n }\n\n /**\n * Subtract a period of time to this DateTime and return the resulting DateTime\n * See {@link DateTime#plus}\n * @param {Duration|Object|number} duration - The amount to subtract. Either a Luxon Duration, a number of milliseconds, the object argument to Duration.fromObject()\n @return {DateTime}\n */\n minus(duration) {\n if (!this.isValid) return this;\n const dur = Duration.fromDurationLike(duration).negate();\n return clone(this, adjustTime(this, dur));\n }\n\n /**\n * \"Set\" this DateTime to the beginning of a unit of time.\n * @param {string} unit - The unit to go to the beginning of. Can be 'year', 'quarter', 'month', 'week', 'day', 'hour', 'minute', 'second', or 'millisecond'.\n * @param {Object} opts - options\n * @param {boolean} [opts.useLocaleWeeks=false] - If true, use weeks based on the locale, i.e. use the locale-dependent start of the week\n * @example DateTime.local(2014, 3, 3).startOf('month').toISODate(); //=> '2014-03-01'\n * @example DateTime.local(2014, 3, 3).startOf('year').toISODate(); //=> '2014-01-01'\n * @example DateTime.local(2014, 3, 3).startOf('week').toISODate(); //=> '2014-03-03', weeks always start on Mondays\n * @example DateTime.local(2014, 3, 3, 5, 30).startOf('day').toISOTime(); //=> '00:00.000-05:00'\n * @example DateTime.local(2014, 3, 3, 5, 30).startOf('hour').toISOTime(); //=> '05:00:00.000-05:00'\n * @return {DateTime}\n */\n startOf(unit, { useLocaleWeeks = false } = {}) {\n if (!this.isValid) return this;\n\n const o = {},\n normalizedUnit = Duration.normalizeUnit(unit);\n switch (normalizedUnit) {\n case \"years\":\n o.month = 1;\n // falls through\n case \"quarters\":\n case \"months\":\n o.day = 1;\n // falls through\n case \"weeks\":\n case \"days\":\n o.hour = 0;\n // falls through\n case \"hours\":\n o.minute = 0;\n // falls through\n case \"minutes\":\n o.second = 0;\n // falls through\n case \"seconds\":\n o.millisecond = 0;\n break;\n case \"milliseconds\":\n break;\n // no default, invalid units throw in normalizeUnit()\n }\n\n if (normalizedUnit === \"weeks\") {\n if (useLocaleWeeks) {\n const startOfWeek = this.loc.getStartOfWeek();\n const { weekday } = this;\n if (weekday < startOfWeek) {\n o.weekNumber = this.weekNumber - 1;\n }\n o.weekday = startOfWeek;\n } else {\n o.weekday = 1;\n }\n }\n\n if (normalizedUnit === \"quarters\") {\n const q = Math.ceil(this.month / 3);\n o.month = (q - 1) * 3 + 1;\n }\n\n return this.set(o);\n }\n\n /**\n * \"Set\" this DateTime to the end (meaning the last millisecond) of a unit of time\n * @param {string} unit - The unit to go to the end of. Can be 'year', 'quarter', 'month', 'week', 'day', 'hour', 'minute', 'second', or 'millisecond'.\n * @param {Object} opts - options\n * @param {boolean} [opts.useLocaleWeeks=false] - If true, use weeks based on the locale, i.e. use the locale-dependent start of the week\n * @example DateTime.local(2014, 3, 3).endOf('month').toISO(); //=> '2014-03-31T23:59:59.999-05:00'\n * @example DateTime.local(2014, 3, 3).endOf('year').toISO(); //=> '2014-12-31T23:59:59.999-05:00'\n * @example DateTime.local(2014, 3, 3).endOf('week').toISO(); // => '2014-03-09T23:59:59.999-05:00', weeks start on Mondays\n * @example DateTime.local(2014, 3, 3, 5, 30).endOf('day').toISO(); //=> '2014-03-03T23:59:59.999-05:00'\n * @example DateTime.local(2014, 3, 3, 5, 30).endOf('hour').toISO(); //=> '2014-03-03T05:59:59.999-05:00'\n * @return {DateTime}\n */\n endOf(unit, opts) {\n return this.isValid\n ? this.plus({ [unit]: 1 })\n .startOf(unit, opts)\n .minus(1)\n : this;\n }\n\n // OUTPUT\n\n /**\n * Returns a string representation of this DateTime formatted according to the specified format string.\n * **You may not want this.** See {@link DateTime#toLocaleString} for a more flexible formatting tool. For a table of tokens and their interpretations, see [here](https://moment.github.io/luxon/#/formatting?id=table-of-tokens).\n * Defaults to en-US if no locale has been specified, regardless of the system's locale.\n * @param {string} fmt - the format string\n * @param {Object} opts - opts to override the configuration options on this DateTime\n * @example DateTime.now().toFormat('yyyy LLL dd') //=> '2017 Apr 22'\n * @example DateTime.now().setLocale('fr').toFormat('yyyy LLL dd') //=> '2017 avr. 22'\n * @example DateTime.now().toFormat('yyyy LLL dd', { locale: \"fr\" }) //=> '2017 avr. 22'\n * @example DateTime.now().toFormat(\"HH 'hours and' mm 'minutes'\") //=> '20 hours and 55 minutes'\n * @return {string}\n */\n toFormat(fmt, opts = {}) {\n return this.isValid\n ? Formatter.create(this.loc.redefaultToEN(opts)).formatDateTimeFromString(this, fmt)\n : INVALID;\n }\n\n /**\n * Returns a localized string representing this date. Accepts the same options as the Intl.DateTimeFormat constructor and any presets defined by Luxon, such as `DateTime.DATE_FULL` or `DateTime.TIME_SIMPLE`.\n * The exact behavior of this method is browser-specific, but in general it will return an appropriate representation\n * of the DateTime in the assigned locale.\n * Defaults to the system's locale if no locale has been specified\n * @see https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/DateTimeFormat\n * @param formatOpts {Object} - Intl.DateTimeFormat constructor options and configuration options\n * @param {Object} opts - opts to override the configuration options on this DateTime\n * @example DateTime.now().toLocaleString(); //=> 4/20/2017\n * @example DateTime.now().setLocale('en-gb').toLocaleString(); //=> '20/04/2017'\n * @example DateTime.now().toLocaleString(DateTime.DATE_FULL); //=> 'April 20, 2017'\n * @example DateTime.now().toLocaleString(DateTime.DATE_FULL, { locale: 'fr' }); //=> '28 août 2022'\n * @example DateTime.now().toLocaleString(DateTime.TIME_SIMPLE); //=> '11:32 AM'\n * @example DateTime.now().toLocaleString(DateTime.DATETIME_SHORT); //=> '4/20/2017, 11:32 AM'\n * @example DateTime.now().toLocaleString({ weekday: 'long', month: 'long', day: '2-digit' }); //=> 'Thursday, April 20'\n * @example DateTime.now().toLocaleString({ weekday: 'short', month: 'short', day: '2-digit', hour: '2-digit', minute: '2-digit' }); //=> 'Thu, Apr 20, 11:27 AM'\n * @example DateTime.now().toLocaleString({ hour: '2-digit', minute: '2-digit', hourCycle: 'h23' }); //=> '11:32'\n * @return {string}\n */\n toLocaleString(formatOpts = Formats.DATE_SHORT, opts = {}) {\n return this.isValid\n ? Formatter.create(this.loc.clone(opts), formatOpts).formatDateTime(this)\n : INVALID;\n }\n\n /**\n * Returns an array of format \"parts\", meaning individual tokens along with metadata. This is allows callers to post-process individual sections of the formatted output.\n * Defaults to the system's locale if no locale has been specified\n * @see https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/DateTimeFormat/formatToParts\n * @param opts {Object} - Intl.DateTimeFormat constructor options, same as `toLocaleString`.\n * @example DateTime.now().toLocaleParts(); //=> [\n * //=> { type: 'day', value: '25' },\n * //=> { type: 'literal', value: '/' },\n * //=> { type: 'month', value: '05' },\n * //=> { type: 'literal', value: '/' },\n * //=> { type: 'year', value: '1982' }\n * //=> ]\n */\n toLocaleParts(opts = {}) {\n return this.isValid\n ? Formatter.create(this.loc.clone(opts), opts).formatDateTimeParts(this)\n : [];\n }\n\n /**\n * Returns an ISO 8601-compliant string representation of this DateTime\n * @param {Object} opts - options\n * @param {boolean} [opts.suppressMilliseconds=false] - exclude milliseconds from the format if they're 0\n * @param {boolean} [opts.suppressSeconds=false] - exclude seconds from the format if they're 0\n * @param {boolean} [opts.includeOffset=true] - include the offset, such as 'Z' or '-04:00'\n * @param {boolean} [opts.extendedZone=false] - add the time zone format extension\n * @param {string} [opts.format='extended'] - choose between the basic and extended format\n * @example DateTime.utc(1983, 5, 25).toISO() //=> '1982-05-25T00:00:00.000Z'\n * @example DateTime.now().toISO() //=> '2017-04-22T20:47:05.335-04:00'\n * @example DateTime.now().toISO({ includeOffset: false }) //=> '2017-04-22T20:47:05.335'\n * @example DateTime.now().toISO({ format: 'basic' }) //=> '20170422T204705.335-0400'\n * @return {string}\n */\n toISO({\n format = \"extended\",\n suppressSeconds = false,\n suppressMilliseconds = false,\n includeOffset = true,\n extendedZone = false,\n } = {}) {\n if (!this.isValid) {\n return null;\n }\n\n const ext = format === \"extended\";\n\n let c = toISODate(this, ext);\n c += \"T\";\n c += toISOTime(this, ext, suppressSeconds, suppressMilliseconds, includeOffset, extendedZone);\n return c;\n }\n\n /**\n * Returns an ISO 8601-compliant string representation of this DateTime's date component\n * @param {Object} opts - options\n * @param {string} [opts.format='extended'] - choose between the basic and extended format\n * @example DateTime.utc(1982, 5, 25).toISODate() //=> '1982-05-25'\n * @example DateTime.utc(1982, 5, 25).toISODate({ format: 'basic' }) //=> '19820525'\n * @return {string}\n */\n toISODate({ format = \"extended\" } = {}) {\n if (!this.isValid) {\n return null;\n }\n\n return toISODate(this, format === \"extended\");\n }\n\n /**\n * Returns an ISO 8601-compliant string representation of this DateTime's week date\n * @example DateTime.utc(1982, 5, 25).toISOWeekDate() //=> '1982-W21-2'\n * @return {string}\n */\n toISOWeekDate() {\n return toTechFormat(this, \"kkkk-'W'WW-c\");\n }\n\n /**\n * Returns an ISO 8601-compliant string representation of this DateTime's time component\n * @param {Object} opts - options\n * @param {boolean} [opts.suppressMilliseconds=false] - exclude milliseconds from the format if they're 0\n * @param {boolean} [opts.suppressSeconds=false] - exclude seconds from the format if they're 0\n * @param {boolean} [opts.includeOffset=true] - include the offset, such as 'Z' or '-04:00'\n * @param {boolean} [opts.extendedZone=true] - add the time zone format extension\n * @param {boolean} [opts.includePrefix=false] - include the `T` prefix\n * @param {string} [opts.format='extended'] - choose between the basic and extended format\n * @example DateTime.utc().set({ hour: 7, minute: 34 }).toISOTime() //=> '07:34:19.361Z'\n * @example DateTime.utc().set({ hour: 7, minute: 34, seconds: 0, milliseconds: 0 }).toISOTime({ suppressSeconds: true }) //=> '07:34Z'\n * @example DateTime.utc().set({ hour: 7, minute: 34 }).toISOTime({ format: 'basic' }) //=> '073419.361Z'\n * @example DateTime.utc().set({ hour: 7, minute: 34 }).toISOTime({ includePrefix: true }) //=> 'T07:34:19.361Z'\n * @return {string}\n */\n toISOTime({\n suppressMilliseconds = false,\n suppressSeconds = false,\n includeOffset = true,\n includePrefix = false,\n extendedZone = false,\n format = \"extended\",\n } = {}) {\n if (!this.isValid) {\n return null;\n }\n\n let c = includePrefix ? \"T\" : \"\";\n return (\n c +\n toISOTime(\n this,\n format === \"extended\",\n suppressSeconds,\n suppressMilliseconds,\n includeOffset,\n extendedZone\n )\n );\n }\n\n /**\n * Returns an RFC 2822-compatible string representation of this DateTime\n * @example DateTime.utc(2014, 7, 13).toRFC2822() //=> 'Sun, 13 Jul 2014 00:00:00 +0000'\n * @example DateTime.local(2014, 7, 13).toRFC2822() //=> 'Sun, 13 Jul 2014 00:00:00 -0400'\n * @return {string}\n */\n toRFC2822() {\n return toTechFormat(this, \"EEE, dd LLL yyyy HH:mm:ss ZZZ\", false);\n }\n\n /**\n * Returns a string representation of this DateTime appropriate for use in HTTP headers. The output is always expressed in GMT.\n * Specifically, the string conforms to RFC 1123.\n * @see https://www.w3.org/Protocols/rfc2616/rfc2616-sec3.html#sec3.3.1\n * @example DateTime.utc(2014, 7, 13).toHTTP() //=> 'Sun, 13 Jul 2014 00:00:00 GMT'\n * @example DateTime.utc(2014, 7, 13, 19).toHTTP() //=> 'Sun, 13 Jul 2014 19:00:00 GMT'\n * @return {string}\n */\n toHTTP() {\n return toTechFormat(this.toUTC(), \"EEE, dd LLL yyyy HH:mm:ss 'GMT'\");\n }\n\n /**\n * Returns a string representation of this DateTime appropriate for use in SQL Date\n * @example DateTime.utc(2014, 7, 13).toSQLDate() //=> '2014-07-13'\n * @return {string}\n */\n toSQLDate() {\n if (!this.isValid) {\n return null;\n }\n return toISODate(this, true);\n }\n\n /**\n * Returns a string representation of this DateTime appropriate for use in SQL Time\n * @param {Object} opts - options\n * @param {boolean} [opts.includeZone=false] - include the zone, such as 'America/New_York'. Overrides includeOffset.\n * @param {boolean} [opts.includeOffset=true] - include the offset, such as 'Z' or '-04:00'\n * @param {boolean} [opts.includeOffsetSpace=true] - include the space between the time and the offset, such as '05:15:16.345 -04:00'\n * @example DateTime.utc().toSQL() //=> '05:15:16.345'\n * @example DateTime.now().toSQL() //=> '05:15:16.345 -04:00'\n * @example DateTime.now().toSQL({ includeOffset: false }) //=> '05:15:16.345'\n * @example DateTime.now().toSQL({ includeZone: false }) //=> '05:15:16.345 America/New_York'\n * @return {string}\n */\n toSQLTime({ includeOffset = true, includeZone = false, includeOffsetSpace = true } = {}) {\n let fmt = \"HH:mm:ss.SSS\";\n\n if (includeZone || includeOffset) {\n if (includeOffsetSpace) {\n fmt += \" \";\n }\n if (includeZone) {\n fmt += \"z\";\n } else if (includeOffset) {\n fmt += \"ZZ\";\n }\n }\n\n return toTechFormat(this, fmt, true);\n }\n\n /**\n * Returns a string representation of this DateTime appropriate for use in SQL DateTime\n * @param {Object} opts - options\n * @param {boolean} [opts.includeZone=false] - include the zone, such as 'America/New_York'. Overrides includeOffset.\n * @param {boolean} [opts.includeOffset=true] - include the offset, such as 'Z' or '-04:00'\n * @param {boolean} [opts.includeOffsetSpace=true] - include the space between the time and the offset, such as '05:15:16.345 -04:00'\n * @example DateTime.utc(2014, 7, 13).toSQL() //=> '2014-07-13 00:00:00.000 Z'\n * @example DateTime.local(2014, 7, 13).toSQL() //=> '2014-07-13 00:00:00.000 -04:00'\n * @example DateTime.local(2014, 7, 13).toSQL({ includeOffset: false }) //=> '2014-07-13 00:00:00.000'\n * @example DateTime.local(2014, 7, 13).toSQL({ includeZone: true }) //=> '2014-07-13 00:00:00.000 America/New_York'\n * @return {string}\n */\n toSQL(opts = {}) {\n if (!this.isValid) {\n return null;\n }\n\n return `${this.toSQLDate()} ${this.toSQLTime(opts)}`;\n }\n\n /**\n * Returns a string representation of this DateTime appropriate for debugging\n * @return {string}\n */\n toString() {\n return this.isValid ? this.toISO() : INVALID;\n }\n\n /**\n * Returns a string representation of this DateTime appropriate for the REPL.\n * @return {string}\n */\n [Symbol.for(\"nodejs.util.inspect.custom\")]() {\n if (this.isValid) {\n return `DateTime { ts: ${this.toISO()}, zone: ${this.zone.name}, locale: ${this.locale} }`;\n } else {\n return `DateTime { Invalid, reason: ${this.invalidReason} }`;\n }\n }\n\n /**\n * Returns the epoch milliseconds of this DateTime. Alias of {@link DateTime#toMillis}\n * @return {number}\n */\n valueOf() {\n return this.toMillis();\n }\n\n /**\n * Returns the epoch milliseconds of this DateTime.\n * @return {number}\n */\n toMillis() {\n return this.isValid ? this.ts : NaN;\n }\n\n /**\n * Returns the epoch seconds of this DateTime.\n * @return {number}\n */\n toSeconds() {\n return this.isValid ? this.ts / 1000 : NaN;\n }\n\n /**\n * Returns the epoch seconds (as a whole number) of this DateTime.\n * @return {number}\n */\n toUnixInteger() {\n return this.isValid ? Math.floor(this.ts / 1000) : NaN;\n }\n\n /**\n * Returns an ISO 8601 representation of this DateTime appropriate for use in JSON.\n * @return {string}\n */\n toJSON() {\n return this.toISO();\n }\n\n /**\n * Returns a BSON serializable equivalent to this DateTime.\n * @return {Date}\n */\n toBSON() {\n return this.toJSDate();\n }\n\n /**\n * Returns a JavaScript object with this DateTime's year, month, day, and so on.\n * @param opts - options for generating the object\n * @param {boolean} [opts.includeConfig=false] - include configuration attributes in the output\n * @example DateTime.now().toObject() //=> { year: 2017, month: 4, day: 22, hour: 20, minute: 49, second: 42, millisecond: 268 }\n * @return {Object}\n */\n toObject(opts = {}) {\n if (!this.isValid) return {};\n\n const base = { ...this.c };\n\n if (opts.includeConfig) {\n base.outputCalendar = this.outputCalendar;\n base.numberingSystem = this.loc.numberingSystem;\n base.locale = this.loc.locale;\n }\n return base;\n }\n\n /**\n * Returns a JavaScript Date equivalent to this DateTime.\n * @return {Date}\n */\n toJSDate() {\n return new Date(this.isValid ? this.ts : NaN);\n }\n\n // COMPARE\n\n /**\n * Return the difference between two DateTimes as a Duration.\n * @param {DateTime} otherDateTime - the DateTime to compare this one to\n * @param {string|string[]} [unit=['milliseconds']] - the unit or array of units (such as 'hours' or 'days') to include in the duration.\n * @param {Object} opts - options that affect the creation of the Duration\n * @param {string} [opts.conversionAccuracy='casual'] - the conversion system to use\n * @example\n * var i1 = DateTime.fromISO('1982-05-25T09:45'),\n * i2 = DateTime.fromISO('1983-10-14T10:30');\n * i2.diff(i1).toObject() //=> { milliseconds: 43807500000 }\n * i2.diff(i1, 'hours').toObject() //=> { hours: 12168.75 }\n * i2.diff(i1, ['months', 'days']).toObject() //=> { months: 16, days: 19.03125 }\n * i2.diff(i1, ['months', 'days', 'hours']).toObject() //=> { months: 16, days: 19, hours: 0.75 }\n * @return {Duration}\n */\n diff(otherDateTime, unit = \"milliseconds\", opts = {}) {\n if (!this.isValid || !otherDateTime.isValid) {\n return Duration.invalid(\"created by diffing an invalid DateTime\");\n }\n\n const durOpts = { locale: this.locale, numberingSystem: this.numberingSystem, ...opts };\n\n const units = maybeArray(unit).map(Duration.normalizeUnit),\n otherIsLater = otherDateTime.valueOf() > this.valueOf(),\n earlier = otherIsLater ? this : otherDateTime,\n later = otherIsLater ? otherDateTime : this,\n diffed = diff(earlier, later, units, durOpts);\n\n return otherIsLater ? diffed.negate() : diffed;\n }\n\n /**\n * Return the difference between this DateTime and right now.\n * See {@link DateTime#diff}\n * @param {string|string[]} [unit=['milliseconds']] - the unit or units units (such as 'hours' or 'days') to include in the duration\n * @param {Object} opts - options that affect the creation of the Duration\n * @param {string} [opts.conversionAccuracy='casual'] - the conversion system to use\n * @return {Duration}\n */\n diffNow(unit = \"milliseconds\", opts = {}) {\n return this.diff(DateTime.now(), unit, opts);\n }\n\n /**\n * Return an Interval spanning between this DateTime and another DateTime\n * @param {DateTime} otherDateTime - the other end point of the Interval\n * @return {Interval}\n */\n until(otherDateTime) {\n return this.isValid ? Interval.fromDateTimes(this, otherDateTime) : this;\n }\n\n /**\n * Return whether this DateTime is in the same unit of time as another DateTime.\n * Higher-order units must also be identical for this function to return `true`.\n * Note that time zones are **ignored** in this comparison, which compares the **local** calendar time. Use {@link DateTime#setZone} to convert one of the dates if needed.\n * @param {DateTime} otherDateTime - the other DateTime\n * @param {string} unit - the unit of time to check sameness on\n * @param {Object} opts - options\n * @param {boolean} [opts.useLocaleWeeks=false] - If true, use weeks based on the locale, i.e. use the locale-dependent start of the week; only the locale of this DateTime is used\n * @example DateTime.now().hasSame(otherDT, 'day'); //~> true if otherDT is in the same current calendar day\n * @return {boolean}\n */\n hasSame(otherDateTime, unit, opts) {\n if (!this.isValid) return false;\n\n const inputMs = otherDateTime.valueOf();\n const adjustedToZone = this.setZone(otherDateTime.zone, { keepLocalTime: true });\n return (\n adjustedToZone.startOf(unit, opts) <= inputMs && inputMs <= adjustedToZone.endOf(unit, opts)\n );\n }\n\n /**\n * Equality check\n * Two DateTimes are equal if and only if they represent the same millisecond, have the same zone and location, and are both valid.\n * To compare just the millisecond values, use `+dt1 === +dt2`.\n * @param {DateTime} other - the other DateTime\n * @return {boolean}\n */\n equals(other) {\n return (\n this.isValid &&\n other.isValid &&\n this.valueOf() === other.valueOf() &&\n this.zone.equals(other.zone) &&\n this.loc.equals(other.loc)\n );\n }\n\n /**\n * Returns a string representation of a this time relative to now, such as \"in two days\". Can only internationalize if your\n * platform supports Intl.RelativeTimeFormat. Rounds down by default.\n * @param {Object} options - options that affect the output\n * @param {DateTime} [options.base=DateTime.now()] - the DateTime to use as the basis to which this time is compared. Defaults to now.\n * @param {string} [options.style=\"long\"] - the style of units, must be \"long\", \"short\", or \"narrow\"\n * @param {string|string[]} options.unit - use a specific unit or array of units; if omitted, or an array, the method will pick the best unit. Use an array or one of \"years\", \"quarters\", \"months\", \"weeks\", \"days\", \"hours\", \"minutes\", or \"seconds\"\n * @param {boolean} [options.round=true] - whether to round the numbers in the output.\n * @param {number} [options.padding=0] - padding in milliseconds. This allows you to round up the result if it fits inside the threshold. Don't use in combination with {round: false} because the decimal output will include the padding.\n * @param {string} options.locale - override the locale of this DateTime\n * @param {string} options.numberingSystem - override the numberingSystem of this DateTime. The Intl system may choose not to honor this\n * @example DateTime.now().plus({ days: 1 }).toRelative() //=> \"in 1 day\"\n * @example DateTime.now().setLocale(\"es\").toRelative({ days: 1 }) //=> \"dentro de 1 día\"\n * @example DateTime.now().plus({ days: 1 }).toRelative({ locale: \"fr\" }) //=> \"dans 23 heures\"\n * @example DateTime.now().minus({ days: 2 }).toRelative() //=> \"2 days ago\"\n * @example DateTime.now().minus({ days: 2 }).toRelative({ unit: \"hours\" }) //=> \"48 hours ago\"\n * @example DateTime.now().minus({ hours: 36 }).toRelative({ round: false }) //=> \"1.5 days ago\"\n */\n toRelative(options = {}) {\n if (!this.isValid) return null;\n const base = options.base || DateTime.fromObject({}, { zone: this.zone }),\n padding = options.padding ? (this < base ? -options.padding : options.padding) : 0;\n let units = [\"years\", \"months\", \"days\", \"hours\", \"minutes\", \"seconds\"];\n let unit = options.unit;\n if (Array.isArray(options.unit)) {\n units = options.unit;\n unit = undefined;\n }\n return diffRelative(base, this.plus(padding), {\n ...options,\n numeric: \"always\",\n units,\n unit,\n });\n }\n\n /**\n * Returns a string representation of this date relative to today, such as \"yesterday\" or \"next month\".\n * Only internationalizes on platforms that supports Intl.RelativeTimeFormat.\n * @param {Object} options - options that affect the output\n * @param {DateTime} [options.base=DateTime.now()] - the DateTime to use as the basis to which this time is compared. Defaults to now.\n * @param {string} options.locale - override the locale of this DateTime\n * @param {string} options.unit - use a specific unit; if omitted, the method will pick the unit. Use one of \"years\", \"quarters\", \"months\", \"weeks\", or \"days\"\n * @param {string} options.numberingSystem - override the numberingSystem of this DateTime. The Intl system may choose not to honor this\n * @example DateTime.now().plus({ days: 1 }).toRelativeCalendar() //=> \"tomorrow\"\n * @example DateTime.now().setLocale(\"es\").plus({ days: 1 }).toRelative() //=> \"\"mañana\"\n * @example DateTime.now().plus({ days: 1 }).toRelativeCalendar({ locale: \"fr\" }) //=> \"demain\"\n * @example DateTime.now().minus({ days: 2 }).toRelativeCalendar() //=> \"2 days ago\"\n */\n toRelativeCalendar(options = {}) {\n if (!this.isValid) return null;\n\n return diffRelative(options.base || DateTime.fromObject({}, { zone: this.zone }), this, {\n ...options,\n numeric: \"auto\",\n units: [\"years\", \"months\", \"days\"],\n calendary: true,\n });\n }\n\n /**\n * Return the min of several date times\n * @param {...DateTime} dateTimes - the DateTimes from which to choose the minimum\n * @return {DateTime} the min DateTime, or undefined if called with no argument\n */\n static min(...dateTimes) {\n if (!dateTimes.every(DateTime.isDateTime)) {\n throw new InvalidArgumentError(\"min requires all arguments be DateTimes\");\n }\n return bestBy(dateTimes, (i) => i.valueOf(), Math.min);\n }\n\n /**\n * Return the max of several date times\n * @param {...DateTime} dateTimes - the DateTimes from which to choose the maximum\n * @return {DateTime} the max DateTime, or undefined if called with no argument\n */\n static max(...dateTimes) {\n if (!dateTimes.every(DateTime.isDateTime)) {\n throw new InvalidArgumentError(\"max requires all arguments be DateTimes\");\n }\n return bestBy(dateTimes, (i) => i.valueOf(), Math.max);\n }\n\n // MISC\n\n /**\n * Explain how a string would be parsed by fromFormat()\n * @param {string} text - the string to parse\n * @param {string} fmt - the format the string is expected to be in (see description)\n * @param {Object} options - options taken by fromFormat()\n * @return {Object}\n */\n static fromFormatExplain(text, fmt, options = {}) {\n const { locale = null, numberingSystem = null } = options,\n localeToUse = Locale.fromOpts({\n locale,\n numberingSystem,\n defaultToEN: true,\n });\n return explainFromTokens(localeToUse, text, fmt);\n }\n\n /**\n * @deprecated use fromFormatExplain instead\n */\n static fromStringExplain(text, fmt, options = {}) {\n return DateTime.fromFormatExplain(text, fmt, options);\n }\n\n /**\n * Build a parser for `fmt` using the given locale. This parser can be passed\n * to {@link DateTime.fromFormatParser} to a parse a date in this format. This\n * can be used to optimize cases where many dates need to be parsed in a\n * specific format.\n *\n * @param {String} fmt - the format the string is expected to be in (see\n * description)\n * @param {Object} options - options used to set locale and numberingSystem\n * for parser\n * @returns {TokenParser} - opaque object to be used\n */\n static buildFormatParser(fmt, options = {}) {\n const { locale = null, numberingSystem = null } = options,\n localeToUse = Locale.fromOpts({\n locale,\n numberingSystem,\n defaultToEN: true,\n });\n return new TokenParser(localeToUse, fmt);\n }\n\n /**\n * Create a DateTime from an input string and format parser.\n *\n * The format parser must have been created with the same locale as this call.\n *\n * @param {String} text - the string to parse\n * @param {TokenParser} formatParser - parser from {@link DateTime.buildFormatParser}\n * @param {Object} opts - options taken by fromFormat()\n * @returns {DateTime}\n */\n static fromFormatParser(text, formatParser, opts = {}) {\n if (isUndefined(text) || isUndefined(formatParser)) {\n throw new InvalidArgumentError(\n \"fromFormatParser requires an input string and a format parser\"\n );\n }\n const { locale = null, numberingSystem = null } = opts,\n localeToUse = Locale.fromOpts({\n locale,\n numberingSystem,\n defaultToEN: true,\n });\n\n if (!localeToUse.equals(formatParser.locale)) {\n throw new InvalidArgumentError(\n `fromFormatParser called with a locale of ${localeToUse}, ` +\n `but the format parser was created for ${formatParser.locale}`\n );\n }\n\n const { result, zone, specificOffset, invalidReason } = formatParser.explainFromTokens(text);\n\n if (invalidReason) {\n return DateTime.invalid(invalidReason);\n } else {\n return parseDataToDateTime(\n result,\n zone,\n opts,\n `format ${formatParser.format}`,\n text,\n specificOffset\n );\n }\n }\n\n // FORMAT PRESETS\n\n /**\n * {@link DateTime#toLocaleString} format like 10/14/1983\n * @type {Object}\n */\n static get DATE_SHORT() {\n return Formats.DATE_SHORT;\n }\n\n /**\n * {@link DateTime#toLocaleString} format like 'Oct 14, 1983'\n * @type {Object}\n */\n static get DATE_MED() {\n return Formats.DATE_MED;\n }\n\n /**\n * {@link DateTime#toLocaleString} format like 'Fri, Oct 14, 1983'\n * @type {Object}\n */\n static get DATE_MED_WITH_WEEKDAY() {\n return Formats.DATE_MED_WITH_WEEKDAY;\n }\n\n /**\n * {@link DateTime#toLocaleString} format like 'October 14, 1983'\n * @type {Object}\n */\n static get DATE_FULL() {\n return Formats.DATE_FULL;\n }\n\n /**\n * {@link DateTime#toLocaleString} format like 'Tuesday, October 14, 1983'\n * @type {Object}\n */\n static get DATE_HUGE() {\n return Formats.DATE_HUGE;\n }\n\n /**\n * {@link DateTime#toLocaleString} format like '09:30 AM'. Only 12-hour if the locale is.\n * @type {Object}\n */\n static get TIME_SIMPLE() {\n return Formats.TIME_SIMPLE;\n }\n\n /**\n * {@link DateTime#toLocaleString} format like '09:30:23 AM'. Only 12-hour if the locale is.\n * @type {Object}\n */\n static get TIME_WITH_SECONDS() {\n return Formats.TIME_WITH_SECONDS;\n }\n\n /**\n * {@link DateTime#toLocaleString} format like '09:30:23 AM EDT'. Only 12-hour if the locale is.\n * @type {Object}\n */\n static get TIME_WITH_SHORT_OFFSET() {\n return Formats.TIME_WITH_SHORT_OFFSET;\n }\n\n /**\n * {@link DateTime#toLocaleString} format like '09:30:23 AM Eastern Daylight Time'. Only 12-hour if the locale is.\n * @type {Object}\n */\n static get TIME_WITH_LONG_OFFSET() {\n return Formats.TIME_WITH_LONG_OFFSET;\n }\n\n /**\n * {@link DateTime#toLocaleString} format like '09:30', always 24-hour.\n * @type {Object}\n */\n static get TIME_24_SIMPLE() {\n return Formats.TIME_24_SIMPLE;\n }\n\n /**\n * {@link DateTime#toLocaleString} format like '09:30:23', always 24-hour.\n * @type {Object}\n */\n static get TIME_24_WITH_SECONDS() {\n return Formats.TIME_24_WITH_SECONDS;\n }\n\n /**\n * {@link DateTime#toLocaleString} format like '09:30:23 EDT', always 24-hour.\n * @type {Object}\n */\n static get TIME_24_WITH_SHORT_OFFSET() {\n return Formats.TIME_24_WITH_SHORT_OFFSET;\n }\n\n /**\n * {@link DateTime#toLocaleString} format like '09:30:23 Eastern Daylight Time', always 24-hour.\n * @type {Object}\n */\n static get TIME_24_WITH_LONG_OFFSET() {\n return Formats.TIME_24_WITH_LONG_OFFSET;\n }\n\n /**\n * {@link DateTime#toLocaleString} format like '10/14/1983, 9:30 AM'. Only 12-hour if the locale is.\n * @type {Object}\n */\n static get DATETIME_SHORT() {\n return Formats.DATETIME_SHORT;\n }\n\n /**\n * {@link DateTime#toLocaleString} format like '10/14/1983, 9:30:33 AM'. Only 12-hour if the locale is.\n * @type {Object}\n */\n static get DATETIME_SHORT_WITH_SECONDS() {\n return Formats.DATETIME_SHORT_WITH_SECONDS;\n }\n\n /**\n * {@link DateTime#toLocaleString} format like 'Oct 14, 1983, 9:30 AM'. Only 12-hour if the locale is.\n * @type {Object}\n */\n static get DATETIME_MED() {\n return Formats.DATETIME_MED;\n }\n\n /**\n * {@link DateTime#toLocaleString} format like 'Oct 14, 1983, 9:30:33 AM'. Only 12-hour if the locale is.\n * @type {Object}\n */\n static get DATETIME_MED_WITH_SECONDS() {\n return Formats.DATETIME_MED_WITH_SECONDS;\n }\n\n /**\n * {@link DateTime#toLocaleString} format like 'Fri, 14 Oct 1983, 9:30 AM'. Only 12-hour if the locale is.\n * @type {Object}\n */\n static get DATETIME_MED_WITH_WEEKDAY() {\n return Formats.DATETIME_MED_WITH_WEEKDAY;\n }\n\n /**\n * {@link DateTime#toLocaleString} format like 'October 14, 1983, 9:30 AM EDT'. Only 12-hour if the locale is.\n * @type {Object}\n */\n static get DATETIME_FULL() {\n return Formats.DATETIME_FULL;\n }\n\n /**\n * {@link DateTime#toLocaleString} format like 'October 14, 1983, 9:30:33 AM EDT'. Only 12-hour if the locale is.\n * @type {Object}\n */\n static get DATETIME_FULL_WITH_SECONDS() {\n return Formats.DATETIME_FULL_WITH_SECONDS;\n }\n\n /**\n * {@link DateTime#toLocaleString} format like 'Friday, October 14, 1983, 9:30 AM Eastern Daylight Time'. Only 12-hour if the locale is.\n * @type {Object}\n */\n static get DATETIME_HUGE() {\n return Formats.DATETIME_HUGE;\n }\n\n /**\n * {@link DateTime#toLocaleString} format like 'Friday, October 14, 1983, 9:30:33 AM Eastern Daylight Time'. Only 12-hour if the locale is.\n * @type {Object}\n */\n static get DATETIME_HUGE_WITH_SECONDS() {\n return Formats.DATETIME_HUGE_WITH_SECONDS;\n }\n}\n\n/**\n * @private\n */\nexport function friendlyDateTime(dateTimeish) {\n if (DateTime.isDateTime(dateTimeish)) {\n return dateTimeish;\n } else if (dateTimeish && dateTimeish.valueOf && isNumber(dateTimeish.valueOf())) {\n return DateTime.fromJSDate(dateTimeish);\n } else if (dateTimeish && typeof dateTimeish === \"object\") {\n return DateTime.fromObject(dateTimeish);\n } else {\n throw new InvalidArgumentError(\n `Unknown datetime argument: ${dateTimeish}, of type ${typeof dateTimeish}`\n );\n }\n}\n","import { DateTime } from 'luxon';\nimport { NumberRatchet } from './number-ratchet.js';\nexport class DurationRatchet {\n static formatMsDuration(ms, includeMS = false) {\n const rem_ms = Math.floor(ms % 1000);\n const seconds = Math.floor(ms / 1000) % 60;\n const minutes = Math.floor(ms / (1000 * 60)) % 60;\n const hours = Math.floor(ms / (1000 * 60 * 60)) % 24;\n const days = Math.floor(ms / (1000 * 60 * 60 * 24));\n const f = NumberRatchet.leadingZeros;\n let rval = f(hours, 2) + 'h' + f(minutes, 2) + 'm';\n rval += includeMS ? f(seconds, 2) + '.' + f(rem_ms, 3) + 's' : f(seconds, 2) + 's';\n if (days > 0) {\n rval = days + 'd' + rval;\n }\n return rval;\n }\n static colonFormatMsDuration(ms, includeMS = false) {\n const rem_ms = ms % 1000;\n const seconds = Math.floor(ms / 1000) % 60;\n const minutes = Math.floor(ms / (1000 * 60)) % 60;\n const hours = Math.floor(ms / (1000 * 60 * 60));\n const f = NumberRatchet.leadingZeros;\n let rval = f(hours, 2) + ':' + f(minutes, 2) + ':';\n rval += includeMS ? f(seconds, 2) + '.' + f(rem_ms, 3) : f(seconds, 2);\n return rval;\n }\n static daysBetween(d1, d2) {\n const dur = DateTime.fromJSDate(d1).diff(DateTime.fromJSDate(d2));\n return dur.days;\n }\n static createSteps(startEpochMS, endEpochMS, timezone, outputFormat, stepUnit) {\n let curDate = DateTime.fromMillis(startEpochMS).setZone(timezone);\n const endDate = DateTime.fromMillis(endEpochMS);\n const rval = [];\n while (curDate < endDate) {\n rval.push(curDate.toFormat(outputFormat));\n curDate = curDate.plus(stepUnit);\n }\n return rval;\n }\n}\n//# sourceMappingURL=duration-ratchet.js.map","import {Pipe, PipeTransform} from '@angular/core';\nimport {DurationRatchet} from \"@bitblit/ratchet-common/lang/duration-ratchet\";\nimport {NumberRatchet} from \"@bitblit/ratchet-common/lang/number-ratchet\";\n\n@Pipe({ name: 'acuteTimeAgo' , standalone: true})\nexport class TimeAgoFormattedPipe implements PipeTransform {\n transform(input: number): string {\n return DurationRatchet.formatMsDuration(new Date().getTime() - NumberRatchet.safeNumber(input));\n }\n}\n","import { Pipe, PipeTransform } from '@angular/core';\n\n@Pipe({ name: 'acuteTiming' , standalone: true})\nexport class TimingPipe implements PipeTransform {\n transform(time: number): string {\n if (time) {\n const minutes = Math.floor(time / 60);\n const seconds = Math.floor(time % 60);\n return `${this.initZero(minutes)}${minutes}:${this.initZero(seconds)}${seconds}`;\n }\n\n return '00:00';\n }\n\n private initZero(time: number): string {\n return time < 10 ? '0' : '';\n }\n}\n","import { Injectable } from '@angular/core';\nimport { NavigationEnd, Router } from '@angular/router';\nimport { Logger } from '@bitblit/ratchet-common/logger/logger';\n\n// eslint-disable-next-line @typescript-eslint/ban-types\ndeclare let gtag: Function;\n\n@Injectable({\n providedIn: 'root',\n})\n// See : https://lumin8media.com/blog/add-google-analytics-angular\nexport class GoogleAnalyticsService {\n private static readonly IS_PROD: boolean = true;\n\n constructor(private router: Router) {}\n\n public initialize() {\n this.onRouteChange();\n\n // dynamically add analytics scripts to document head\n try {\n const url:string = 'https://www.googletagmanager.com/gtag/js?id=';\n const gTagScript = document.createElement('script');\n gTagScript.async = true;\n const tagId: string = GoogleAnalyticsService.IS_PROD ? 'G-7D5BBK4K8X' : null;\n gTagScript.src = `${url}${tagId}`;\n document.head.appendChild(gTagScript);\n\n const dataLayerScript = document.createElement('script');\n dataLayerScript.innerHTML = `\n window.dataLayer = window.dataLayer || [];\n function gtag(){dataLayer.push(arguments);}\n gtag('js', new Date());\n gtag('config', '${tagId}', {'send_page_view': false});`;\n document.head.appendChild(dataLayerScript);\n } catch (e) {\n Logger.error('Error adding Google Analytics', e, e);\n }\n }\n\n // track visited routes\n private onRouteChange() {\n const tagId: string = GoogleAnalyticsService.IS_PROD ? 'G-7D5BBK4K8X' : null;\n\n this.router.events.subscribe((event) => {\n if (event instanceof NavigationEnd) {\n gtag('config', tagId, {\n page_path: event.urlAfterRedirects,\n });\n\n Logger.info('Sending Google Analytics tracking for: ', event.urlAfterRedirects);\n Logger.info('Google Analytics property ID: ', tagId);\n }\n });\n }\n\n // use gtag.js to send Google Analytics Events\n public event(action: string, eventCategory?: string, eventLabel?: string, value?: string) {\n gtag('event', action, {\n ...(eventCategory && { event_category: eventCategory }),\n ...(eventLabel && { event_label: eventLabel }),\n ...(value && { value: value }),\n });\n }\n}\n","import { Logger } from '@bitblit/ratchet-common/logger/logger';\nimport { LoggerLevelName } from '@bitblit/ratchet-common/logger/logger-level-name';\nexport class DefaultGraphqlRatchetErrorHandler {\n logLevel;\n rethrow;\n constructor(logLevel = LoggerLevelName.warn, rethrow = false) {\n this.logLevel = logLevel;\n this.rethrow = rethrow;\n }\n handleError(error, queryName, variables, authStyle) {\n Logger.logByLevel(this.logLevel, 'Graphql failed : %s : %s : Anon-%s : %j', error, queryName, authStyle, variables);\n if (this.rethrow) {\n throw error;\n }\n }\n}\n//# sourceMappingURL=default-graphql-ratchet-error-handler.js.map","import { Logger } from '../logger/logger.js';\nimport { StringRatchet } from \"./string-ratchet.js\";\nexport class ErrorRatchet {\n static safeStringifyErr(err, log = true) {\n let rval = 'ERR WAS NULL';\n if (err) {\n if (err['message']) {\n rval = err['message'];\n }\n else {\n try {\n rval = JSON.stringify(err);\n }\n catch (err2) {\n Logger.error('Failed to json stringify: %s', err2);\n rval = String(err);\n }\n }\n }\n if (log) {\n Logger.error('%s', rval, err);\n }\n return rval;\n }\n static asErr(input) {\n let rval = null;\n if (input) {\n if (input instanceof Error) {\n rval = input;\n }\n else {\n rval = new Error('Force-Cast to error : ' + String(input));\n }\n }\n return rval;\n }\n static fErr(format, ...input) {\n const msg = StringRatchet.format(format, ...input);\n return new Error(msg);\n }\n static throwFormattedErr(format, ...input) {\n throw ErrorRatchet.fErr(format, ...input);\n }\n}\n//# sourceMappingURL=error-ratchet.js.map","export class ClientError extends Error {\n response;\n request;\n constructor(response, request) {\n const message = `${ClientError.extractMessage(response)}: ${JSON.stringify({\n response,\n request,\n })}`;\n super(message);\n Object.setPrototypeOf(this, ClientError.prototype);\n this.response = response;\n this.request = request;\n // this is needed as Safari doesn't support .captureStackTrace\n if (typeof Error.captureStackTrace === `function`) {\n Error.captureStackTrace(this, ClientError);\n }\n }\n static extractMessage(response) {\n return response.errors?.[0]?.message ?? `GraphQL Error (Code: ${String(response.status)})`;\n }\n}\n//# sourceMappingURL=ClientError.js.map","export const uppercase = (str) => str.toUpperCase();\nexport const callOrIdentity = (value) => {\n return typeof value === `function` ? value() : value;\n};\nexport const zip = (a, b) => a.map((k, i) => [k, b[i]]);\nexport const HeadersInitToPlainObject = (headers) => {\n let oHeaders = {};\n if (headers instanceof Headers) {\n oHeaders = HeadersInstanceToPlainObject(headers);\n }\n else if (Array.isArray(headers)) {\n headers.forEach(([name, value]) => {\n if (name && value !== undefined) {\n oHeaders[name] = value;\n }\n });\n }\n else if (headers) {\n oHeaders = headers;\n }\n return oHeaders;\n};\nexport const HeadersInstanceToPlainObject = (headers) => {\n const o = {};\n headers.forEach((v, k) => {\n o[k] = v;\n });\n return o;\n};\nexport const tryCatch = (fn) => {\n try {\n const result = fn();\n if (isPromiseLikeValue(result)) {\n return result.catch((error) => {\n return errorFromMaybeError(error);\n });\n }\n return result;\n }\n catch (error) {\n return errorFromMaybeError(error);\n }\n};\n/**\n * Ensure that the given value is an error and return it. If it is not an error than\n * wrap it in one, passing the given value as the error message.\n */\nexport const errorFromMaybeError = (maybeError) => {\n if (maybeError instanceof Error)\n return maybeError;\n return new Error(String(maybeError));\n};\nexport const isPromiseLikeValue = (value) => {\n return (typeof value === `object`\n && value !== null\n && `then` in value\n && typeof value.then === `function`\n && `catch` in value\n && typeof value.catch === `function`\n && `finally` in value\n && typeof value.finally === `function`);\n};\nexport const casesExhausted = (value) => {\n throw new Error(`Unhandled case: ${String(value)}`);\n};\nexport const isPlainObject = (value) => {\n return typeof value === `object` && value !== null && !Array.isArray(value);\n};\nexport const entries = (obj) => Object.entries(obj);\nexport const values = (obj) => Object.values(obj);\nexport const mapValues = (object, fn) => {\n return Object.fromEntries(Object.entries(object).map(([key, value]) => {\n return [key, fn(value, key)];\n }));\n};\nexport const lowerCaseFirstLetter = (s) => {\n return s.charAt(0).toLowerCase() + s.slice(1);\n};\nexport function assertArray(v) {\n if (!Array.isArray(v))\n throw new Error(`Expected array. Got: ${String(v)}`);\n}\nexport function assertObject(v) {\n if (v === null || typeof v !== `object`)\n throw new Error(`Expected object. Got: ${String(v)}`);\n}\nexport const capitalizeFirstLetter = (string) => string.charAt(0).toUpperCase() + string.slice(1);\nexport const createDeferred = (options) => {\n let isResolved = false;\n let resolve;\n let reject;\n const promise = new Promise(($resolve, $reject) => {\n resolve = $resolve;\n reject = $reject;\n });\n return {\n promise,\n isResolved: () => isResolved,\n resolve: (value) => {\n isResolved = true;\n if (options?.strict && isResolved) {\n throw new Error(`Deferred is already resolved. Attempted to resolve with: ${JSON.stringify(value)}`);\n }\n resolve(value);\n },\n reject: (error) => reject(error),\n };\n};\nexport const debug = (...args) => {\n if (process.env[`DEBUG`]) {\n console.log(...args);\n }\n};\nexport const debugSub = (...args) => (...subArgs) => {\n debug(...args, ...subArgs);\n};\nexport const partitionErrors = (array) => {\n const errors = [];\n const values = [];\n for (const item of array) {\n if (item instanceof Error) {\n errors.push(item);\n }\n else {\n values.push(item);\n }\n }\n return [values, errors];\n};\n//# sourceMappingURL=prelude.js.map","export function devAssert(condition, message) {\n const booleanCondition = Boolean(condition);\n\n if (!booleanCondition) {\n throw new Error(message);\n }\n}\n","export function invariant(condition, message) {\n const booleanCondition = Boolean(condition);\n\n if (!booleanCondition) {\n throw new Error(\n message != null ? message : 'Unexpected invariant triggered.',\n );\n }\n}\n","import { invariant } from '../jsutils/invariant.mjs';\nconst LineRegExp = /\\r\\n|[\\n\\r]/g;\n/**\n * Represents a location in a Source.\n */\n\n/**\n * Takes a Source and a UTF-8 character offset, and returns the corresponding\n * line and column as a SourceLocation.\n */\nexport function getLocation(source, position) {\n let lastLineStart = 0;\n let line = 1;\n\n for (const match of source.body.matchAll(LineRegExp)) {\n typeof match.index === 'number' || invariant(false);\n\n if (match.index >= position) {\n break;\n }\n\n lastLineStart = match.index + match[0].length;\n line += 1;\n }\n\n return {\n line,\n column: position + 1 - lastLineStart,\n };\n}\n","import { getLocation } from './location.mjs';\n\n/**\n * Render a helpful description of the location in the GraphQL Source document.\n */\nexport function printLocation(location) {\n return printSourceLocation(\n location.source,\n getLocation(location.source, location.start),\n );\n}\n/**\n * Render a helpful description of the location in the GraphQL Source document.\n */\n\nexport function printSourceLocation(source, sourceLocation) {\n const firstLineColumnOffset = source.locationOffset.column - 1;\n const body = ''.padStart(firstLineColumnOffset) + source.body;\n const lineIndex = sourceLocation.line - 1;\n const lineOffset = source.locationOffset.line - 1;\n const lineNum = sourceLocation.line + lineOffset;\n const columnOffset = sourceLocation.line === 1 ? firstLineColumnOffset : 0;\n const columnNum = sourceLocation.column + columnOffset;\n const locationStr = `${source.name}:${lineNum}:${columnNum}\\n`;\n const lines = body.split(/\\r\\n|[\\n\\r]/g);\n const locationLine = lines[lineIndex]; // Special case for minified documents\n\n if (locationLine.length > 120) {\n const subLineIndex = Math.floor(columnNum / 80);\n const subLineColumnNum = columnNum % 80;\n const subLines = [];\n\n for (let i = 0; i < locationLine.length; i += 80) {\n subLines.push(locationLine.slice(i, i + 80));\n }\n\n return (\n locationStr +\n printPrefixedLines([\n [`${lineNum} |`, subLines[0]],\n ...subLines.slice(1, subLineIndex + 1).map((subLine) => ['|', subLine]),\n ['|', '^'.padStart(subLineColumnNum)],\n ['|', subLines[subLineIndex + 1]],\n ])\n );\n }\n\n return (\n locationStr +\n printPrefixedLines([\n // Lines specified like this: [\"prefix\", \"string\"],\n [`${lineNum - 1} |`, lines[lineIndex - 1]],\n [`${lineNum} |`, locationLine],\n ['|', '^'.padStart(columnNum)],\n [`${lineNum + 1} |`, lines[lineIndex + 1]],\n ])\n );\n}\n\nfunction printPrefixedLines(lines) {\n const existingLines = lines.filter(([_, line]) => line !== undefined);\n const padLen = Math.max(...existingLines.map(([prefix]) => prefix.length));\n return existingLines\n .map(([prefix, line]) => prefix.padStart(padLen) + (line ? ' ' + line : ''))\n .join('\\n');\n}\n","import { isObjectLike } from '../jsutils/isObjectLike.mjs';\nimport { getLocation } from '../language/location.mjs';\nimport {\n printLocation,\n printSourceLocation,\n} from '../language/printLocation.mjs';\n\nfunction toNormalizedOptions(args) {\n const firstArg = args[0];\n\n if (firstArg == null || 'kind' in firstArg || 'length' in firstArg) {\n return {\n nodes: firstArg,\n source: args[1],\n positions: args[2],\n path: args[3],\n originalError: args[4],\n extensions: args[5],\n };\n }\n\n return firstArg;\n}\n/**\n * A GraphQLError describes an Error found during the parse, validate, or\n * execute phases of performing a GraphQL operation. In addition to a message\n * and stack trace, it also includes information about the locations in a\n * GraphQL document and/or execution result that correspond to the Error.\n */\n\nexport class GraphQLError extends Error {\n /**\n * An array of `{ line, column }` locations within the source GraphQL document\n * which correspond to this error.\n *\n * Errors during validation often contain multiple locations, for example to\n * point out two things with the same name. Errors during execution include a\n * single location, the field which produced the error.\n *\n * Enumerable, and appears in the result of JSON.stringify().\n */\n\n /**\n * An array describing the JSON-path into the execution response which\n * corresponds to this error. Only included for errors during execution.\n *\n * Enumerable, and appears in the result of JSON.stringify().\n */\n\n /**\n * An array of GraphQL AST Nodes corresponding to this error.\n */\n\n /**\n * The source GraphQL document for the first location of this error.\n *\n * Note that if this Error represents more than one node, the source may not\n * represent nodes after the first node.\n */\n\n /**\n * An array of character offsets within the source GraphQL document\n * which correspond to this error.\n */\n\n /**\n * The original error thrown from a field resolver during execution.\n */\n\n /**\n * Extension fields to add to the formatted error.\n */\n\n /**\n * @deprecated Please use the `GraphQLErrorOptions` constructor overload instead.\n */\n constructor(message, ...rawArgs) {\n var _this$nodes, _nodeLocations$, _ref;\n\n const { nodes, source, positions, path, originalError, extensions } =\n toNormalizedOptions(rawArgs);\n super(message);\n this.name = 'GraphQLError';\n this.path = path !== null && path !== void 0 ? path : undefined;\n this.originalError =\n originalError !== null && originalError !== void 0\n ? originalError\n : undefined; // Compute list of blame nodes.\n\n this.nodes = undefinedIfEmpty(\n Array.isArray(nodes) ? nodes : nodes ? [nodes] : undefined,\n );\n const nodeLocations = undefinedIfEmpty(\n (_this$nodes = this.nodes) === null || _this$nodes === void 0\n ? void 0\n : _this$nodes.map((node) => node.loc).filter((loc) => loc != null),\n ); // Compute locations in the source for the given nodes/positions.\n\n this.source =\n source !== null && source !== void 0\n ? source\n : nodeLocations === null || nodeLocations === void 0\n ? void 0\n : (_nodeLocations$ = nodeLocations[0]) === null ||\n _nodeLocations$ === void 0\n ? void 0\n : _nodeLocations$.source;\n this.positions =\n positions !== null && positions !== void 0\n ? positions\n : nodeLocations === null || nodeLocations === void 0\n ? void 0\n : nodeLocations.map((loc) => loc.start);\n this.locations =\n positions && source\n ? positions.map((pos) => getLocation(source, pos))\n : nodeLocations === null || nodeLocations === void 0\n ? void 0\n : nodeLocations.map((loc) => getLocation(loc.source, loc.start));\n const originalExtensions = isObjectLike(\n originalError === null || originalError === void 0\n ? void 0\n : originalError.extensions,\n )\n ? originalError === null || originalError === void 0\n ? void 0\n : originalError.extensions\n : undefined;\n this.extensions =\n (_ref =\n extensions !== null && extensions !== void 0\n ? extensions\n : originalExtensions) !== null && _ref !== void 0\n ? _ref\n : Object.create(null); // Only properties prescribed by the spec should be enumerable.\n // Keep the rest as non-enumerable.\n\n Object.defineProperties(this, {\n message: {\n writable: true,\n enumerable: true,\n },\n name: {\n enumerable: false,\n },\n nodes: {\n enumerable: false,\n },\n source: {\n enumerable: false,\n },\n positions: {\n enumerable: false,\n },\n originalError: {\n enumerable: false,\n },\n }); // Include (non-enumerable) stack trace.\n\n /* c8 ignore start */\n // FIXME: https://github.com/graphql/graphql-js/issues/2317\n\n if (\n originalError !== null &&\n originalError !== void 0 &&\n originalError.stack\n ) {\n Object.defineProperty(this, 'stack', {\n value: originalError.stack,\n writable: true,\n configurable: true,\n });\n } else if (Error.captureStackTrace) {\n Error.captureStackTrace(this, GraphQLError);\n } else {\n Object.defineProperty(this, 'stack', {\n value: Error().stack,\n writable: true,\n configurable: true,\n });\n }\n /* c8 ignore stop */\n }\n\n get [Symbol.toStringTag]() {\n return 'GraphQLError';\n }\n\n toString() {\n let output = this.message;\n\n if (this.nodes) {\n for (const node of this.nodes) {\n if (node.loc) {\n output += '\\n\\n' + printLocation(node.loc);\n }\n }\n } else if (this.source && this.locations) {\n for (const location of this.locations) {\n output += '\\n\\n' + printSourceLocation(this.source, location);\n }\n }\n\n return output;\n }\n\n toJSON() {\n const formattedError = {\n message: this.message,\n };\n\n if (this.locations != null) {\n formattedError.locations = this.locations;\n }\n\n if (this.path != null) {\n formattedError.path = this.path;\n }\n\n if (this.extensions != null && Object.keys(this.extensions).length > 0) {\n formattedError.extensions = this.extensions;\n }\n\n return formattedError;\n }\n}\n\nfunction undefinedIfEmpty(array) {\n return array === undefined || array.length === 0 ? undefined : array;\n}\n/**\n * See: https://spec.graphql.org/draft/#sec-Errors\n */\n\n/**\n * Prints a GraphQLError to a string, representing useful location information\n * about the error's position in the source.\n *\n * @deprecated Please use `error.toString` instead. Will be removed in v17\n */\nexport function printError(error) {\n return error.toString();\n}\n/**\n * Given a GraphQLError, format it according to the rules described by the\n * Response Format, Errors section of the GraphQL Specification.\n *\n * @deprecated Please use `error.toJSON` instead. Will be removed in v17\n */\n\nexport function formatError(error) {\n return error.toJSON();\n}\n","/**\n * Return true if `value` is object-like. A value is object-like if it's not\n * `null` and has a `typeof` result of \"object\".\n */\nexport function isObjectLike(value) {\n return typeof value == 'object' && value !== null;\n}\n","import { GraphQLError } from './GraphQLError.mjs';\n/**\n * Produces a GraphQLError representing a syntax error, containing useful\n * descriptive information about the syntax error's position in the source.\n */\n\nexport function syntaxError(source, position, description) {\n return new GraphQLError(`Syntax Error: ${description}`, {\n source,\n positions: [position],\n });\n}\n","/**\n * Contains a range of UTF-8 character offsets and token references that\n * identify the region of the source from which the AST derived.\n */\nexport class Location {\n /**\n * The character offset at which this Node begins.\n */\n\n /**\n * The character offset at which this Node ends.\n */\n\n /**\n * The Token at which this Node begins.\n */\n\n /**\n * The Token at which this Node ends.\n */\n\n /**\n * The Source document the AST represents.\n */\n constructor(startToken, endToken, source) {\n this.start = startToken.start;\n this.end = endToken.end;\n this.startToken = startToken;\n this.endToken = endToken;\n this.source = source;\n }\n\n get [Symbol.toStringTag]() {\n return 'Location';\n }\n\n toJSON() {\n return {\n start: this.start,\n end: this.end,\n };\n }\n}\n/**\n * Represents a range of characters represented by a lexical token\n * within a Source.\n */\n\nexport class Token {\n /**\n * The kind of Token.\n */\n\n /**\n * The character offset at which this Node begins.\n */\n\n /**\n * The character offset at which this Node ends.\n */\n\n /**\n * The 1-indexed line number on which this Token appears.\n */\n\n /**\n * The 1-indexed column number at which this Token begins.\n */\n\n /**\n * For non-punctuation tokens, represents the interpreted value of the token.\n *\n * Note: is undefined for punctuation tokens, but typed as string for\n * convenience in the parser.\n */\n\n /**\n * Tokens exist as nodes in a double-linked-list amongst all tokens\n * including ignored tokens. <SOF> is always the first node and <EOF>\n * the last.\n */\n constructor(kind, start, end, line, column, value) {\n this.kind = kind;\n this.start = start;\n this.end = end;\n this.line = line;\n this.column = column; // eslint-disable-next-line @typescript-eslint/no-non-null-assertion\n\n this.value = value;\n this.prev = null;\n this.next = null;\n }\n\n get [Symbol.toStringTag]() {\n return 'Token';\n }\n\n toJSON() {\n return {\n kind: this.kind,\n value: this.value,\n line: this.line,\n column: this.column,\n };\n }\n}\n/**\n * The list of all possible AST node types.\n */\n\n/**\n * @internal\n */\nexport const QueryDocumentKeys = {\n Name: [],\n Document: ['definitions'],\n OperationDefinition: [\n 'name',\n 'variableDefinitions',\n 'directives',\n 'selectionSet',\n ],\n VariableDefinition: ['variable', 'type', 'defaultValue', 'directives'],\n Variable: ['name'],\n SelectionSet: ['selections'],\n Field: ['alias', 'name', 'arguments', 'directives', 'selectionSet'],\n Argument: ['name', 'value'],\n FragmentSpread: ['name', 'directives'],\n InlineFragment: ['typeCondition', 'directives', 'selectionSet'],\n FragmentDefinition: [\n 'name', // Note: fragment variable definitions are deprecated and will removed in v17.0.0\n 'variableDefinitions',\n 'typeCondition',\n 'directives',\n 'selectionSet',\n ],\n IntValue: [],\n FloatValue: [],\n StringValue: [],\n BooleanValue: [],\n NullValue: [],\n EnumValue: [],\n ListValue: ['values'],\n ObjectValue: ['fields'],\n ObjectField: ['name', 'value'],\n Directive: ['name', 'arguments'],\n NamedType: ['name'],\n ListType: ['type'],\n NonNullType: ['type'],\n SchemaDefinition: ['description', 'directives', 'operationTypes'],\n OperationTypeDefinition: ['type'],\n ScalarTypeDefinition: ['description', 'name', 'directives'],\n ObjectTypeDefinition: [\n 'description',\n 'name',\n 'interfaces',\n 'directives',\n 'fields',\n ],\n FieldDefinition: ['description', 'name', 'arguments', 'type', 'directives'],\n InputValueDefinition: [\n 'description',\n 'name',\n 'type',\n 'defaultValue',\n 'directives',\n ],\n InterfaceTypeDefinition: [\n 'description',\n 'name',\n 'interfaces',\n 'directives',\n 'fields',\n ],\n UnionTypeDefinition: ['description', 'name', 'directives', 'types'],\n EnumTypeDefinition: ['description', 'name', 'directives', 'values'],\n EnumValueDefinition: ['description', 'name', 'directives'],\n InputObjectTypeDefinition: ['description', 'name', 'directives', 'fields'],\n DirectiveDefinition: ['description', 'name', 'arguments', 'locations'],\n SchemaExtension: ['directives', 'operationTypes'],\n ScalarTypeExtension: ['name', 'directives'],\n ObjectTypeExtension: ['name', 'interfaces', 'directives', 'fields'],\n InterfaceTypeExtension: ['name', 'interfaces', 'directives', 'fields'],\n UnionTypeExtension: ['name', 'directives', 'types'],\n EnumTypeExtension: ['name', 'directives', 'values'],\n InputObjectTypeExtension: ['name', 'directives', 'fields'],\n};\nconst kindValues = new Set(Object.keys(QueryDocumentKeys));\n/**\n * @internal\n */\n\nexport function isNode(maybeNode) {\n const maybeKind =\n maybeNode === null || maybeNode === void 0 ? void 0 : maybeNode.kind;\n return typeof maybeKind === 'string' && kindValues.has(maybeKind);\n}\n/** Name */\n\nvar OperationTypeNode;\n\n(function (OperationTypeNode) {\n OperationTypeNode['QUERY'] = 'query';\n OperationTypeNode['MUTATION'] = 'mutation';\n OperationTypeNode['SUBSCRIPTION'] = 'subscription';\n})(OperationTypeNode || (OperationTypeNode = {}));\n\nexport { OperationTypeNode };\n","/**\n * The set of allowed directive location values.\n */\nvar DirectiveLocation;\n\n(function (DirectiveLocation) {\n DirectiveLocation['QUERY'] = 'QUERY';\n DirectiveLocation['MUTATION'] = 'MUTATION';\n DirectiveLocation['SUBSCRIPTION'] = 'SUBSCRIPTION';\n DirectiveLocation['FIELD'] = 'FIELD';\n DirectiveLocation['FRAGMENT_DEFINITION'] = 'FRAGMENT_DEFINITION';\n DirectiveLocation['FRAGMENT_SPREAD'] = 'FRAGMENT_SPREAD';\n DirectiveLocation['INLINE_FRAGMENT'] = 'INLINE_FRAGMENT';\n DirectiveLocation['VARIABLE_DEFINITION'] = 'VARIABLE_DEFINITION';\n DirectiveLocation['SCHEMA'] = 'SCHEMA';\n DirectiveLocation['SCALAR'] = 'SCALAR';\n DirectiveLocation['OBJECT'] = 'OBJECT';\n DirectiveLocation['FIELD_DEFINITION'] = 'FIELD_DEFINITION';\n DirectiveLocation['ARGUMENT_DEFINITION'] = 'ARGUMENT_DEFINITION';\n DirectiveLocation['INTERFACE'] = 'INTERFACE';\n DirectiveLocation['UNION'] = 'UNION';\n DirectiveLocation['ENUM'] = 'ENUM';\n DirectiveLocation['ENUM_VALUE'] = 'ENUM_VALUE';\n DirectiveLocation['INPUT_OBJECT'] = 'INPUT_OBJECT';\n DirectiveLocation['INPUT_FIELD_DEFINITION'] = 'INPUT_FIELD_DEFINITION';\n})(DirectiveLocation || (DirectiveLocation = {}));\n\nexport { DirectiveLocation };\n/**\n * The enum type representing the directive location values.\n *\n * @deprecated Please use `DirectiveLocation`. Will be remove in v17.\n */\n","/**\n * The set of allowed kind values for AST nodes.\n */\nvar Kind;\n\n(function (Kind) {\n Kind['NAME'] = 'Name';\n Kind['DOCUMENT'] = 'Document';\n Kind['OPERATION_DEFINITION'] = 'OperationDefinition';\n Kind['VARIABLE_DEFINITION'] = 'VariableDefinition';\n Kind['SELECTION_SET'] = 'SelectionSet';\n Kind['FIELD'] = 'Field';\n Kind['ARGUMENT'] = 'Argument';\n Kind['FRAGMENT_SPREAD'] = 'FragmentSpread';\n Kind['INLINE_FRAGMENT'] = 'InlineFragment';\n Kind['FRAGMENT_DEFINITION'] = 'FragmentDefinition';\n Kind['VARIABLE'] = 'Variable';\n Kind['INT'] = 'IntValue';\n Kind['FLOAT'] = 'FloatValue';\n Kind['STRING'] = 'StringValue';\n Kind['BOOLEAN'] = 'BooleanValue';\n Kind['NULL'] = 'NullValue';\n Kind['ENUM'] = 'EnumValue';\n Kind['LIST'] = 'ListValue';\n Kind['OBJECT'] = 'ObjectValue';\n Kind['OBJECT_FIELD'] = 'ObjectField';\n Kind['DIRECTIVE'] = 'Directive';\n Kind['NAMED_TYPE'] = 'NamedType';\n Kind['LIST_TYPE'] = 'ListType';\n Kind['NON_NULL_TYPE'] = 'NonNullType';\n Kind['SCHEMA_DEFINITION'] = 'SchemaDefinition';\n Kind['OPERATION_TYPE_DEFINITION'] = 'OperationTypeDefinition';\n Kind['SCALAR_TYPE_DEFINITION'] = 'ScalarTypeDefinition';\n Kind['OBJECT_TYPE_DEFINITION'] = 'ObjectTypeDefinition';\n Kind['FIELD_DEFINITION'] = 'FieldDefinition';\n Kind['INPUT_VALUE_DEFINITION'] = 'InputValueDefinition';\n Kind['INTERFACE_TYPE_DEFINITION'] = 'InterfaceTypeDefinition';\n Kind['UNION_TYPE_DEFINITION'] = 'UnionTypeDefinition';\n Kind['ENUM_TYPE_DEFINITION'] = 'EnumTypeDefinition';\n Kind['ENUM_VALUE_DEFINITION'] = 'EnumValueDefinition';\n Kind['INPUT_OBJECT_TYPE_DEFINITION'] = 'InputObjectTypeDefinition';\n Kind['DIRECTIVE_DEFINITION'] = 'DirectiveDefinition';\n Kind['SCHEMA_EXTENSION'] = 'SchemaExtension';\n Kind['SCALAR_TYPE_EXTENSION'] = 'ScalarTypeExtension';\n Kind['OBJECT_TYPE_EXTENSION'] = 'ObjectTypeExtension';\n Kind['INTERFACE_TYPE_EXTENSION'] = 'InterfaceTypeExtension';\n Kind['UNION_TYPE_EXTENSION'] = 'UnionTypeExtension';\n Kind['ENUM_TYPE_EXTENSION'] = 'EnumTypeExtension';\n Kind['INPUT_OBJECT_TYPE_EXTENSION'] = 'InputObjectTypeExtension';\n})(Kind || (Kind = {}));\n\nexport { Kind };\n/**\n * The enum type representing the possible kind values of AST nodes.\n *\n * @deprecated Please use `Kind`. Will be remove in v17.\n */\n","/**\n * An exported enum describing the different kinds of tokens that the\n * lexer emits.\n */\nvar TokenKind;\n\n(function (TokenKind) {\n TokenKind['SOF'] = '<SOF>';\n TokenKind['EOF'] = '<EOF>';\n TokenKind['BANG'] = '!';\n TokenKind['DOLLAR'] = '$';\n TokenKind['AMP'] = '&';\n TokenKind['PAREN_L'] = '(';\n TokenKind['PAREN_R'] = ')';\n TokenKind['SPREAD'] = '...';\n TokenKind['COLON'] = ':';\n TokenKind['EQUALS'] = '=';\n TokenKind['AT'] = '@';\n TokenKind['BRACKET_L'] = '[';\n TokenKind['BRACKET_R'] = ']';\n TokenKind['BRACE_L'] = '{';\n TokenKind['PIPE'] = '|';\n TokenKind['BRACE_R'] = '}';\n TokenKind['NAME'] = 'Name';\n TokenKind['INT'] = 'Int';\n TokenKind['FLOAT'] = 'Float';\n TokenKind['STRING'] = 'String';\n TokenKind['BLOCK_STRING'] = 'BlockString';\n TokenKind['COMMENT'] = 'Comment';\n})(TokenKind || (TokenKind = {}));\n\nexport { TokenKind };\n/**\n * The enum type representing the token kinds values.\n *\n * @deprecated Please use `TokenKind`. Will be remove in v17.\n */\n","/**\n * ```\n * WhiteSpace ::\n * - \"Horizontal Tab (U+0009)\"\n * - \"Space (U+0020)\"\n * ```\n * @internal\n */\nexport function isWhiteSpace(code) {\n return code === 0x0009 || code === 0x0020;\n}\n/**\n * ```\n * Digit :: one of\n * - `0` `1` `2` `3` `4` `5` `6` `7` `8` `9`\n * ```\n * @internal\n */\n\nexport function isDigit(code) {\n return code >= 0x0030 && code <= 0x0039;\n}\n/**\n * ```\n * Letter :: one of\n * - `A` `B` `C` `D` `E` `F` `G` `H` `I` `J` `K` `L` `M`\n * - `N` `O` `P` `Q` `R` `S` `T` `U` `V` `W` `X` `Y` `Z`\n * - `a` `b` `c` `d` `e` `f` `g` `h` `i` `j` `k` `l` `m`\n * - `n` `o` `p` `q` `r` `s` `t` `u` `v` `w` `x` `y` `z`\n * ```\n * @internal\n */\n\nexport function isLetter(code) {\n return (\n (code >= 0x0061 && code <= 0x007a) || // A-Z\n (code >= 0x0041 && code <= 0x005a) // a-z\n );\n}\n/**\n * ```\n * NameStart ::\n * - Letter\n * - `_`\n * ```\n * @internal\n */\n\nexport function isNameStart(code) {\n return isLetter(code) || code === 0x005f;\n}\n/**\n * ```\n * NameContinue ::\n * - Letter\n * - Digit\n * - `_`\n * ```\n * @internal\n */\n\nexport function isNameContinue(code) {\n return isLetter(code) || isDigit(code) || code === 0x005f;\n}\n","import { isWhiteSpace } from './characterClasses.mjs';\n/**\n * Produces the value of a block string from its parsed raw value, similar to\n * CoffeeScript's block string, Python's docstring trim or Ruby's strip_heredoc.\n *\n * This implements the GraphQL spec's BlockStringValue() static algorithm.\n *\n * @internal\n */\n\nexport function dedentBlockStringLines(lines) {\n var _firstNonEmptyLine2;\n\n let commonIndent = Number.MAX_SAFE_INTEGER;\n let firstNonEmptyLine = null;\n let lastNonEmptyLine = -1;\n\n for (let i = 0; i < lines.length; ++i) {\n var _firstNonEmptyLine;\n\n const line = lines[i];\n const indent = leadingWhitespace(line);\n\n if (indent === line.length) {\n continue; // skip empty lines\n }\n\n firstNonEmptyLine =\n (_firstNonEmptyLine = firstNonEmptyLine) !== null &&\n _firstNonEmptyLine !== void 0\n ? _firstNonEmptyLine\n : i;\n lastNonEmptyLine = i;\n\n if (i !== 0 && indent < commonIndent) {\n commonIndent = indent;\n }\n }\n\n return lines // Remove common indentation from all lines but first.\n .map((line, i) => (i === 0 ? line : line.slice(commonIndent))) // Remove leading and trailing blank lines.\n .slice(\n (_firstNonEmptyLine2 = firstNonEmptyLine) !== null &&\n _firstNonEmptyLine2 !== void 0\n ? _firstNonEmptyLine2\n : 0,\n lastNonEmptyLine + 1,\n );\n}\n\nfunction leadingWhitespace(str) {\n let i = 0;\n\n while (i < str.length && isWhiteSpace(str.charCodeAt(i))) {\n ++i;\n }\n\n return i;\n}\n/**\n * @internal\n */\n\nexport function isPrintableAsBlockString(value) {\n if (value === '') {\n return true; // empty string is printable\n }\n\n let isEmptyLine = true;\n let hasIndent = false;\n let hasCommonIndent = true;\n let seenNonEmptyLine = false;\n\n for (let i = 0; i < value.length; ++i) {\n switch (value.codePointAt(i)) {\n case 0x0000:\n case 0x0001:\n case 0x0002:\n case 0x0003:\n case 0x0004:\n case 0x0005:\n case 0x0006:\n case 0x0007:\n case 0x0008:\n case 0x000b:\n case 0x000c:\n case 0x000e:\n case 0x000f:\n return false;\n // Has non-printable characters\n\n case 0x000d:\n // \\r\n return false;\n // Has \\r or \\r\\n which will be replaced as \\n\n\n case 10:\n // \\n\n if (isEmptyLine && !seenNonEmptyLine) {\n return false; // Has leading new line\n }\n\n seenNonEmptyLine = true;\n isEmptyLine = true;\n hasIndent = false;\n break;\n\n case 9: // \\t\n\n case 32:\n // <space>\n hasIndent || (hasIndent = isEmptyLine);\n break;\n\n default:\n hasCommonIndent && (hasCommonIndent = hasIndent);\n isEmptyLine = false;\n }\n }\n\n if (isEmptyLine) {\n return false; // Has trailing empty lines\n }\n\n if (hasCommonIndent && seenNonEmptyLine) {\n return false; // Has internal indent\n }\n\n return true;\n}\n/**\n * Print a block string in the indented block form by adding a leading and\n * trailing blank line. However, if a block string starts with whitespace and is\n * a single-line, adding a leading blank line would strip that whitespace.\n *\n * @internal\n */\n\nexport function printBlockString(value, options) {\n const escapedValue = value.replace(/\"\"\"/g, '\\\\\"\"\"'); // Expand a block string's raw value into independent lines.\n\n const lines = escapedValue.split(/\\r\\n|[\\n\\r]/g);\n const isSingleLine = lines.length === 1; // If common indentation is found we can fix some of those cases by adding leading new line\n\n const forceLeadingNewLine =\n lines.length > 1 &&\n lines\n .slice(1)\n .every((line) => line.length === 0 || isWhiteSpace(line.charCodeAt(0))); // Trailing triple quotes just looks confusing but doesn't force trailing new line\n\n const hasTrailingTripleQuotes = escapedValue.endsWith('\\\\\"\"\"'); // Trailing quote (single or double) or slash forces trailing new line\n\n const hasTrailingQuote = value.endsWith('\"') && !hasTrailingTripleQuotes;\n const hasTrailingSlash = value.endsWith('\\\\');\n const forceTrailingNewline = hasTrailingQuote || hasTrailingSlash;\n const printAsMultipleLines =\n !(options !== null && options !== void 0 && options.minimize) && // add leading and trailing new lines only if it improves readability\n (!isSingleLine ||\n value.length > 70 ||\n forceTrailingNewline ||\n forceLeadingNewLine ||\n hasTrailingTripleQuotes);\n let result = ''; // Format a multi-line block quote to account for leading space.\n\n const skipLeadingNewLine = isSingleLine && isWhiteSpace(value.charCodeAt(0));\n\n if ((printAsMultipleLines && !skipLeadingNewLine) || forceLeadingNewLine) {\n result += '\\n';\n }\n\n result += escapedValue;\n\n if (printAsMultipleLines || forceTrailingNewline) {\n result += '\\n';\n }\n\n return '\"\"\"' + result + '\"\"\"';\n}\n","import { syntaxError } from '../error/syntaxError.mjs';\nimport { Token } from './ast.mjs';\nimport { dedentBlockStringLines } from './blockString.mjs';\nimport { isDigit, isNameContinue, isNameStart } from './characterClasses.mjs';\nimport { TokenKind } from './tokenKind.mjs';\n/**\n * Given a Source object, creates a Lexer for that source.\n * A Lexer is a stateful stream generator in that every time\n * it is advanced, it returns the next token in the Source. Assuming the\n * source lexes, the final Token emitted by the lexer will be of kind\n * EOF, after which the lexer will repeatedly return the same EOF token\n * whenever called.\n */\n\nexport class Lexer {\n /**\n * The previously focused non-ignored token.\n */\n\n /**\n * The currently focused non-ignored token.\n */\n\n /**\n * The (1-indexed) line containing the current token.\n */\n\n /**\n * The character offset at which the current line begins.\n */\n constructor(source) {\n const startOfFileToken = new Token(TokenKind.SOF, 0, 0, 0, 0);\n this.source = source;\n this.lastToken = startOfFileToken;\n this.token = startOfFileToken;\n this.line = 1;\n this.lineStart = 0;\n }\n\n get [Symbol.toStringTag]() {\n return 'Lexer';\n }\n /**\n * Advances the token stream to the next non-ignored token.\n */\n\n advance() {\n this.lastToken = this.token;\n const token = (this.token = this.lookahead());\n return token;\n }\n /**\n * Looks ahead and returns the next non-ignored token, but does not change\n * the state of Lexer.\n */\n\n lookahead() {\n let token = this.token;\n\n if (token.kind !== TokenKind.EOF) {\n do {\n if (token.next) {\n token = token.next;\n } else {\n // Read the next token and form a link in the token linked-list.\n const nextToken = readNextToken(this, token.end); // @ts-expect-error next is only mutable during parsing.\n\n token.next = nextToken; // @ts-expect-error prev is only mutable during parsing.\n\n nextToken.prev = token;\n token = nextToken;\n }\n } while (token.kind === TokenKind.COMMENT);\n }\n\n return token;\n }\n}\n/**\n * @internal\n */\n\nexport function isPunctuatorTokenKind(kind) {\n return (\n kind === TokenKind.BANG ||\n kind === TokenKind.DOLLAR ||\n kind === TokenKind.AMP ||\n kind === TokenKind.PAREN_L ||\n kind === TokenKind.PAREN_R ||\n kind === TokenKind.SPREAD ||\n kind === TokenKind.COLON ||\n kind === TokenKind.EQUALS ||\n kind === TokenKind.AT ||\n kind === TokenKind.BRACKET_L ||\n kind === TokenKind.BRACKET_R ||\n kind === TokenKind.BRACE_L ||\n kind === TokenKind.PIPE ||\n kind === TokenKind.BRACE_R\n );\n}\n/**\n * A Unicode scalar value is any Unicode code point except surrogate code\n * points. In other words, the inclusive ranges of values 0x0000 to 0xD7FF and\n * 0xE000 to 0x10FFFF.\n *\n * SourceCharacter ::\n * - \"Any Unicode scalar value\"\n */\n\nfunction isUnicodeScalarValue(code) {\n return (\n (code >= 0x0000 && code <= 0xd7ff) || (code >= 0xe000 && code <= 0x10ffff)\n );\n}\n/**\n * The GraphQL specification defines source text as a sequence of unicode scalar\n * values (which Unicode defines to exclude surrogate code points). However\n * JavaScript defines strings as a sequence of UTF-16 code units which may\n * include surrogates. A surrogate pair is a valid source character as it\n * encodes a supplementary code point (above U+FFFF), but unpaired surrogate\n * code points are not valid source characters.\n */\n\nfunction isSupplementaryCodePoint(body, location) {\n return (\n isLeadingSurrogate(body.charCodeAt(location)) &&\n isTrailingSurrogate(body.charCodeAt(location + 1))\n );\n}\n\nfunction isLeadingSurrogate(code) {\n return code >= 0xd800 && code <= 0xdbff;\n}\n\nfunction isTrailingSurrogate(code) {\n return code >= 0xdc00 && code <= 0xdfff;\n}\n/**\n * Prints the code point (or end of file reference) at a given location in a\n * source for use in error messages.\n *\n * Printable ASCII is printed quoted, while other points are printed in Unicode\n * code point form (ie. U+1234).\n */\n\nfunction printCodePointAt(lexer, location) {\n const code = lexer.source.body.codePointAt(location);\n\n if (code === undefined) {\n return TokenKind.EOF;\n } else if (code >= 0x0020 && code <= 0x007e) {\n // Printable ASCII\n const char = String.fromCodePoint(code);\n return char === '\"' ? \"'\\\"'\" : `\"${char}\"`;\n } // Unicode code point\n\n return 'U+' + code.toString(16).toUpperCase().padStart(4, '0');\n}\n/**\n * Create a token with line and column location information.\n */\n\nfunction createToken(lexer, kind, start, end, value) {\n const line = lexer.line;\n const col = 1 + start - lexer.lineStart;\n return new Token(kind, start, end, line, col, value);\n}\n/**\n * Gets the next token from the source starting at the given position.\n *\n * This skips over whitespace until it finds the next lexable token, then lexes\n * punctuators immediately or calls the appropriate helper function for more\n * complicated tokens.\n */\n\nfunction readNextToken(lexer, start) {\n const body = lexer.source.body;\n const bodyLength = body.length;\n let position = start;\n\n while (position < bodyLength) {\n const code = body.charCodeAt(position); // SourceCharacter\n\n switch (code) {\n // Ignored ::\n // - UnicodeBOM\n // - WhiteSpace\n // - LineTerminator\n // - Comment\n // - Comma\n //\n // UnicodeBOM :: \"Byte Order Mark (U+FEFF)\"\n //\n // WhiteSpace ::\n // - \"Horizontal Tab (U+0009)\"\n // - \"Space (U+0020)\"\n //\n // Comma :: ,\n case 0xfeff: // <BOM>\n\n case 0x0009: // \\t\n\n case 0x0020: // <space>\n\n case 0x002c:\n // ,\n ++position;\n continue;\n // LineTerminator ::\n // - \"New Line (U+000A)\"\n // - \"Carriage Return (U+000D)\" [lookahead != \"New Line (U+000A)\"]\n // - \"Carriage Return (U+000D)\" \"New Line (U+000A)\"\n\n case 0x000a:\n // \\n\n ++position;\n ++lexer.line;\n lexer.lineStart = position;\n continue;\n\n case 0x000d:\n // \\r\n if (body.charCodeAt(position + 1) === 0x000a) {\n position += 2;\n } else {\n ++position;\n }\n\n ++lexer.line;\n lexer.lineStart = position;\n continue;\n // Comment\n\n case 0x0023:\n // #\n return readComment(lexer, position);\n // Token ::\n // - Punctuator\n // - Name\n // - IntValue\n // - FloatValue\n // - StringValue\n //\n // Punctuator :: one of ! $ & ( ) ... : = @ [ ] { | }\n\n case 0x0021:\n // !\n return createToken(lexer, TokenKind.BANG, position, position + 1);\n\n case 0x0024:\n // $\n return createToken(lexer, TokenKind.DOLLAR, position, position + 1);\n\n case 0x0026:\n // &\n return createToken(lexer, TokenKind.AMP, position, position + 1);\n\n case 0x0028:\n // (\n return createToken(lexer, TokenKind.PAREN_L, position, position + 1);\n\n case 0x0029:\n // )\n return createToken(lexer, TokenKind.PAREN_R, position, position + 1);\n\n case 0x002e:\n // .\n if (\n body.charCodeAt(position + 1) === 0x002e &&\n body.charCodeAt(position + 2) === 0x002e\n ) {\n return createToken(lexer, TokenKind.SPREAD, position, position + 3);\n }\n\n break;\n\n case 0x003a:\n // :\n return createToken(lexer, TokenKind.COLON, position, position + 1);\n\n case 0x003d:\n // =\n return createToken(lexer, TokenKind.EQUALS, position, position + 1);\n\n case 0x0040:\n // @\n return createToken(lexer, TokenKind.AT, position, position + 1);\n\n case 0x005b:\n // [\n return createToken(lexer, TokenKind.BRACKET_L, position, position + 1);\n\n case 0x005d:\n // ]\n return createToken(lexer, TokenKind.BRACKET_R, position, position + 1);\n\n case 0x007b:\n // {\n return createToken(lexer, TokenKind.BRACE_L, position, position + 1);\n\n case 0x007c:\n // |\n return createToken(lexer, TokenKind.PIPE, position, position + 1);\n\n case 0x007d:\n // }\n return createToken(lexer, TokenKind.BRACE_R, position, position + 1);\n // StringValue\n\n case 0x0022:\n // \"\n if (\n body.charCodeAt(position + 1) === 0x0022 &&\n body.charCodeAt(position + 2) === 0x0022\n ) {\n return readBlockString(lexer, position);\n }\n\n return readString(lexer, position);\n } // IntValue | FloatValue (Digit | -)\n\n if (isDigit(code) || code === 0x002d) {\n return readNumber(lexer, position, code);\n } // Name\n\n if (isNameStart(code)) {\n return readName(lexer, position);\n }\n\n throw syntaxError(\n lexer.source,\n position,\n code === 0x0027\n ? 'Unexpected single quote character (\\'), did you mean to use a double quote (\")?'\n : isUnicodeScalarValue(code) || isSupplementaryCodePoint(body, position)\n ? `Unexpected character: ${printCodePointAt(lexer, position)}.`\n : `Invalid character: ${printCodePointAt(lexer, position)}.`,\n );\n }\n\n return createToken(lexer, TokenKind.EOF, bodyLength, bodyLength);\n}\n/**\n * Reads a comment token from the source file.\n *\n * ```\n * Comment :: # CommentChar* [lookahead != CommentChar]\n *\n * CommentChar :: SourceCharacter but not LineTerminator\n * ```\n */\n\nfunction readComment(lexer, start) {\n const body = lexer.source.body;\n const bodyLength = body.length;\n let position = start + 1;\n\n while (position < bodyLength) {\n const code = body.charCodeAt(position); // LineTerminator (\\n | \\r)\n\n if (code === 0x000a || code === 0x000d) {\n break;\n } // SourceCharacter\n\n if (isUnicodeScalarValue(code)) {\n ++position;\n } else if (isSupplementaryCodePoint(body, position)) {\n position += 2;\n } else {\n break;\n }\n }\n\n return createToken(\n lexer,\n TokenKind.COMMENT,\n start,\n position,\n body.slice(start + 1, position),\n );\n}\n/**\n * Reads a number token from the source file, either a FloatValue or an IntValue\n * depending on whether a FractionalPart or ExponentPart is encountered.\n *\n * ```\n * IntValue :: IntegerPart [lookahead != {Digit, `.`, NameStart}]\n *\n * IntegerPart ::\n * - NegativeSign? 0\n * - NegativeSign? NonZeroDigit Digit*\n *\n * NegativeSign :: -\n *\n * NonZeroDigit :: Digit but not `0`\n *\n * FloatValue ::\n * - IntegerPart FractionalPart ExponentPart [lookahead != {Digit, `.`, NameStart}]\n * - IntegerPart FractionalPart [lookahead != {Digit, `.`, NameStart}]\n * - IntegerPart ExponentPart [lookahead != {Digit, `.`, NameStart}]\n *\n * FractionalPart :: . Digit+\n *\n * ExponentPart :: ExponentIndicator Sign? Digit+\n *\n * ExponentIndicator :: one of `e` `E`\n *\n * Sign :: one of + -\n * ```\n */\n\nfunction readNumber(lexer, start, firstCode) {\n const body = lexer.source.body;\n let position = start;\n let code = firstCode;\n let isFloat = false; // NegativeSign (-)\n\n if (code === 0x002d) {\n code = body.charCodeAt(++position);\n } // Zero (0)\n\n if (code === 0x0030) {\n code = body.charCodeAt(++position);\n\n if (isDigit(code)) {\n throw syntaxError(\n lexer.source,\n position,\n `Invalid number, unexpected digit after 0: ${printCodePointAt(\n lexer,\n position,\n )}.`,\n );\n }\n } else {\n position = readDigits(lexer, position, code);\n code = body.charCodeAt(position);\n } // Full stop (.)\n\n if (code === 0x002e) {\n isFloat = true;\n code = body.charCodeAt(++position);\n position = readDigits(lexer, position, code);\n code = body.charCodeAt(position);\n } // E e\n\n if (code === 0x0045 || code === 0x0065) {\n isFloat = true;\n code = body.charCodeAt(++position); // + -\n\n if (code === 0x002b || code === 0x002d) {\n code = body.charCodeAt(++position);\n }\n\n position = readDigits(lexer, position, code);\n code = body.charCodeAt(position);\n } // Numbers cannot be followed by . or NameStart\n\n if (code === 0x002e || isNameStart(code)) {\n throw syntaxError(\n lexer.source,\n position,\n `Invalid number, expected digit but got: ${printCodePointAt(\n lexer,\n position,\n )}.`,\n );\n }\n\n return createToken(\n lexer,\n isFloat ? TokenKind.FLOAT : TokenKind.INT,\n start,\n position,\n body.slice(start, position),\n );\n}\n/**\n * Returns the new position in the source after reading one or more digits.\n */\n\nfunction readDigits(lexer, start, firstCode) {\n if (!isDigit(firstCode)) {\n throw syntaxError(\n lexer.source,\n start,\n `Invalid number, expected digit but got: ${printCodePointAt(\n lexer,\n start,\n )}.`,\n );\n }\n\n const body = lexer.source.body;\n let position = start + 1; // +1 to skip first firstCode\n\n while (isDigit(body.charCodeAt(position))) {\n ++position;\n }\n\n return position;\n}\n/**\n * Reads a single-quote string token from the source file.\n *\n * ```\n * StringValue ::\n * - `\"\"` [lookahead != `\"`]\n * - `\"` StringCharacter+ `\"`\n *\n * StringCharacter ::\n * - SourceCharacter but not `\"` or `\\` or LineTerminator\n * - `\\u` EscapedUnicode\n * - `\\` EscapedCharacter\n *\n * EscapedUnicode ::\n * - `{` HexDigit+ `}`\n * - HexDigit HexDigit HexDigit HexDigit\n *\n * EscapedCharacter :: one of `\"` `\\` `/` `b` `f` `n` `r` `t`\n * ```\n */\n\nfunction readString(lexer, start) {\n const body = lexer.source.body;\n const bodyLength = body.length;\n let position = start + 1;\n let chunkStart = position;\n let value = '';\n\n while (position < bodyLength) {\n const code = body.charCodeAt(position); // Closing Quote (\")\n\n if (code === 0x0022) {\n value += body.slice(chunkStart, position);\n return createToken(lexer, TokenKind.STRING, start, position + 1, value);\n } // Escape Sequence (\\)\n\n if (code === 0x005c) {\n value += body.slice(chunkStart, position);\n const escape =\n body.charCodeAt(position + 1) === 0x0075 // u\n ? body.charCodeAt(position + 2) === 0x007b // {\n ? readEscapedUnicodeVariableWidth(lexer, position)\n : readEscapedUnicodeFixedWidth(lexer, position)\n : readEscapedCharacter(lexer, position);\n value += escape.value;\n position += escape.size;\n chunkStart = position;\n continue;\n } // LineTerminator (\\n | \\r)\n\n if (code === 0x000a || code === 0x000d) {\n break;\n } // SourceCharacter\n\n if (isUnicodeScalarValue(code)) {\n ++position;\n } else if (isSupplementaryCodePoint(body, position)) {\n position += 2;\n } else {\n throw syntaxError(\n lexer.source,\n position,\n `Invalid character within String: ${printCodePointAt(\n lexer,\n position,\n )}.`,\n );\n }\n }\n\n throw syntaxError(lexer.source, position, 'Unterminated string.');\n} // The string value and lexed size of an escape sequence.\n\nfunction readEscapedUnicodeVariableWidth(lexer, position) {\n const body = lexer.source.body;\n let point = 0;\n let size = 3; // Cannot be larger than 12 chars (\\u{00000000}).\n\n while (size < 12) {\n const code = body.charCodeAt(position + size++); // Closing Brace (})\n\n if (code === 0x007d) {\n // Must be at least 5 chars (\\u{0}) and encode a Unicode scalar value.\n if (size < 5 || !isUnicodeScalarValue(point)) {\n break;\n }\n\n return {\n value: String.fromCodePoint(point),\n size,\n };\n } // Append this hex digit to the code point.\n\n point = (point << 4) | readHexDigit(code);\n\n if (point < 0) {\n break;\n }\n }\n\n throw syntaxError(\n lexer.source,\n position,\n `Invalid Unicode escape sequence: \"${body.slice(\n position,\n position + size,\n )}\".`,\n );\n}\n\nfunction readEscapedUnicodeFixedWidth(lexer, position) {\n const body = lexer.source.body;\n const code = read16BitHexCode(body, position + 2);\n\n if (isUnicodeScalarValue(code)) {\n return {\n value: String.fromCodePoint(code),\n size: 6,\n };\n } // GraphQL allows JSON-style surrogate pair escape sequences, but only when\n // a valid pair is formed.\n\n if (isLeadingSurrogate(code)) {\n // \\u\n if (\n body.charCodeAt(position + 6) === 0x005c &&\n body.charCodeAt(position + 7) === 0x0075\n ) {\n const trailingCode = read16BitHexCode(body, position + 8);\n\n if (isTrailingSurrogate(trailingCode)) {\n // JavaScript defines strings as a sequence of UTF-16 code units and\n // encodes Unicode code points above U+FFFF using a surrogate pair of\n // code units. Since this is a surrogate pair escape sequence, just\n // include both codes into the JavaScript string value. Had JavaScript\n // not been internally based on UTF-16, then this surrogate pair would\n // be decoded to retrieve the supplementary code point.\n return {\n value: String.fromCodePoint(code, trailingCode),\n size: 12,\n };\n }\n }\n }\n\n throw syntaxError(\n lexer.source,\n position,\n `Invalid Unicode escape sequence: \"${body.slice(position, position + 6)}\".`,\n );\n}\n/**\n * Reads four hexadecimal characters and returns the positive integer that 16bit\n * hexadecimal string represents. For example, \"000f\" will return 15, and \"dead\"\n * will return 57005.\n *\n * Returns a negative number if any char was not a valid hexadecimal digit.\n */\n\nfunction read16BitHexCode(body, position) {\n // readHexDigit() returns -1 on error. ORing a negative value with any other\n // value always produces a negative value.\n return (\n (readHexDigit(body.charCodeAt(position)) << 12) |\n (readHexDigit(body.charCodeAt(position + 1)) << 8) |\n (readHexDigit(body.charCodeAt(position + 2)) << 4) |\n readHexDigit(body.charCodeAt(position + 3))\n );\n}\n/**\n * Reads a hexadecimal character and returns its positive integer value (0-15).\n *\n * '0' becomes 0, '9' becomes 9\n * 'A' becomes 10, 'F' becomes 15\n * 'a' becomes 10, 'f' becomes 15\n *\n * Returns -1 if the provided character code was not a valid hexadecimal digit.\n *\n * HexDigit :: one of\n * - `0` `1` `2` `3` `4` `5` `6` `7` `8` `9`\n * - `A` `B` `C` `D` `E` `F`\n * - `a` `b` `c` `d` `e` `f`\n */\n\nfunction readHexDigit(code) {\n return code >= 0x0030 && code <= 0x0039 // 0-9\n ? code - 0x0030\n : code >= 0x0041 && code <= 0x0046 // A-F\n ? code - 0x0037\n : code >= 0x0061 && code <= 0x0066 // a-f\n ? code - 0x0057\n : -1;\n}\n/**\n * | Escaped Character | Code Point | Character Name |\n * | ----------------- | ---------- | ---------------------------- |\n * | `\"` | U+0022 | double quote |\n * | `\\` | U+005C | reverse solidus (back slash) |\n * | `/` | U+002F | solidus (forward slash) |\n * | `b` | U+0008 | backspace |\n * | `f` | U+000C | form feed |\n * | `n` | U+000A | line feed (new line) |\n * | `r` | U+000D | carriage return |\n * | `t` | U+0009 | horizontal tab |\n */\n\nfunction readEscapedCharacter(lexer, position) {\n const body = lexer.source.body;\n const code = body.charCodeAt(position + 1);\n\n switch (code) {\n case 0x0022:\n // \"\n return {\n value: '\\u0022',\n size: 2,\n };\n\n case 0x005c:\n // \\\n return {\n value: '\\u005c',\n size: 2,\n };\n\n case 0x002f:\n // /\n return {\n value: '\\u002f',\n size: 2,\n };\n\n case 0x0062:\n // b\n return {\n value: '\\u0008',\n size: 2,\n };\n\n case 0x0066:\n // f\n return {\n value: '\\u000c',\n size: 2,\n };\n\n case 0x006e:\n // n\n return {\n value: '\\u000a',\n size: 2,\n };\n\n case 0x0072:\n // r\n return {\n value: '\\u000d',\n size: 2,\n };\n\n case 0x0074:\n // t\n return {\n value: '\\u0009',\n size: 2,\n };\n }\n\n throw syntaxError(\n lexer.source,\n position,\n `Invalid character escape sequence: \"${body.slice(\n position,\n position + 2,\n )}\".`,\n );\n}\n/**\n * Reads a block string token from the source file.\n *\n * ```\n * StringValue ::\n * - `\"\"\"` BlockStringCharacter* `\"\"\"`\n *\n * BlockStringCharacter ::\n * - SourceCharacter but not `\"\"\"` or `\\\"\"\"`\n * - `\\\"\"\"`\n * ```\n */\n\nfunction readBlockString(lexer, start) {\n const body = lexer.source.body;\n const bodyLength = body.length;\n let lineStart = lexer.lineStart;\n let position = start + 3;\n let chunkStart = position;\n let currentLine = '';\n const blockLines = [];\n\n while (position < bodyLength) {\n const code = body.charCodeAt(position); // Closing Triple-Quote (\"\"\")\n\n if (\n code === 0x0022 &&\n body.charCodeAt(position + 1) === 0x0022 &&\n body.charCodeAt(position + 2) === 0x0022\n ) {\n currentLine += body.slice(chunkStart, position);\n blockLines.push(currentLine);\n const token = createToken(\n lexer,\n TokenKind.BLOCK_STRING,\n start,\n position + 3, // Return a string of the lines joined with U+000A.\n dedentBlockStringLines(blockLines).join('\\n'),\n );\n lexer.line += blockLines.length - 1;\n lexer.lineStart = lineStart;\n return token;\n } // Escaped Triple-Quote (\\\"\"\")\n\n if (\n code === 0x005c &&\n body.charCodeAt(position + 1) === 0x0022 &&\n body.charCodeAt(position + 2) === 0x0022 &&\n body.charCodeAt(position + 3) === 0x0022\n ) {\n currentLine += body.slice(chunkStart, position);\n chunkStart = position + 1; // skip only slash\n\n position += 4;\n continue;\n } // LineTerminator\n\n if (code === 0x000a || code === 0x000d) {\n currentLine += body.slice(chunkStart, position);\n blockLines.push(currentLine);\n\n if (code === 0x000d && body.charCodeAt(position + 1) === 0x000a) {\n position += 2;\n } else {\n ++position;\n }\n\n currentLine = '';\n chunkStart = position;\n lineStart = position;\n continue;\n } // SourceCharacter\n\n if (isUnicodeScalarValue(code)) {\n ++position;\n } else if (isSupplementaryCodePoint(body, position)) {\n position += 2;\n } else {\n throw syntaxError(\n lexer.source,\n position,\n `Invalid character within String: ${printCodePointAt(\n lexer,\n position,\n )}.`,\n );\n }\n }\n\n throw syntaxError(lexer.source, position, 'Unterminated string.');\n}\n/**\n * Reads an alphanumeric + underscore name from the source.\n *\n * ```\n * Name ::\n * - NameStart NameContinue* [lookahead != NameContinue]\n * ```\n */\n\nfunction readName(lexer, start) {\n const body = lexer.source.body;\n const bodyLength = body.length;\n let position = start + 1;\n\n while (position < bodyLength) {\n const code = body.charCodeAt(position);\n\n if (isNameContinue(code)) {\n ++position;\n } else {\n break;\n }\n }\n\n return createToken(\n lexer,\n TokenKind.NAME,\n start,\n position,\n body.slice(start, position),\n );\n}\n","const MAX_ARRAY_LENGTH = 10;\nconst MAX_RECURSIVE_DEPTH = 2;\n/**\n * Used to print values in error messages.\n */\n\nexport function inspect(value) {\n return formatValue(value, []);\n}\n\nfunction formatValue(value, seenValues) {\n switch (typeof value) {\n case 'string':\n return JSON.stringify(value);\n\n case 'function':\n return value.name ? `[function ${value.name}]` : '[function]';\n\n case 'object':\n return formatObjectValue(value, seenValues);\n\n default:\n return String(value);\n }\n}\n\nfunction formatObjectValue(value, previouslySeenValues) {\n if (value === null) {\n return 'null';\n }\n\n if (previouslySeenValues.includes(value)) {\n return '[Circular]';\n }\n\n const seenValues = [...previouslySeenValues, value];\n\n if (isJSONable(value)) {\n const jsonValue = value.toJSON(); // check for infinite recursion\n\n if (jsonValue !== value) {\n return typeof jsonValue === 'string'\n ? jsonValue\n : formatValue(jsonValue, seenValues);\n }\n } else if (Array.isArray(value)) {\n return formatArray(value, seenValues);\n }\n\n return formatObject(value, seenValues);\n}\n\nfunction isJSONable(value) {\n return typeof value.toJSON === 'function';\n}\n\nfunction formatObject(object, seenValues) {\n const entries = Object.entries(object);\n\n if (entries.length === 0) {\n return '{}';\n }\n\n if (seenValues.length > MAX_RECURSIVE_DEPTH) {\n return '[' + getObjectTag(object) + ']';\n }\n\n const properties = entries.map(\n ([key, value]) => key + ': ' + formatValue(value, seenValues),\n );\n return '{ ' + properties.join(', ') + ' }';\n}\n\nfunction formatArray(array, seenValues) {\n if (array.length === 0) {\n return '[]';\n }\n\n if (seenValues.length > MAX_RECURSIVE_DEPTH) {\n return '[Array]';\n }\n\n const len = Math.min(MAX_ARRAY_LENGTH, array.length);\n const remaining = array.length - len;\n const items = [];\n\n for (let i = 0; i < len; ++i) {\n items.push(formatValue(array[i], seenValues));\n }\n\n if (remaining === 1) {\n items.push('... 1 more item');\n } else if (remaining > 1) {\n items.push(`... ${remaining} more items`);\n }\n\n return '[' + items.join(', ') + ']';\n}\n\nfunction getObjectTag(object) {\n const tag = Object.prototype.toString\n .call(object)\n .replace(/^\\[object /, '')\n .replace(/]$/, '');\n\n if (tag === 'Object' && typeof object.constructor === 'function') {\n const name = object.constructor.name;\n\n if (typeof name === 'string' && name !== '') {\n return name;\n }\n }\n\n return tag;\n}\n","import { inspect } from './inspect.mjs';\n/* c8 ignore next 3 */\n\nconst isProduction =\n globalThis.process && // eslint-disable-next-line no-undef\n process.env.NODE_ENV === 'production';\n/**\n * A replacement for instanceof which includes an error warning when multi-realm\n * constructors are detected.\n * See: https://expressjs.com/en/advanced/best-practice-performance.html#set-node_env-to-production\n * See: https://webpack.js.org/guides/production/\n */\n\nexport const instanceOf =\n /* c8 ignore next 6 */\n // FIXME: https://github.com/graphql/graphql-js/issues/2317\n isProduction\n ? function instanceOf(value, constructor) {\n return value instanceof constructor;\n }\n : function instanceOf(value, constructor) {\n if (value instanceof constructor) {\n return true;\n }\n\n if (typeof value === 'object' && value !== null) {\n var _value$constructor;\n\n // Prefer Symbol.toStringTag since it is immune to minification.\n const className = constructor.prototype[Symbol.toStringTag];\n const valueClassName = // We still need to support constructor's name to detect conflicts with older versions of this library.\n Symbol.toStringTag in value // @ts-expect-error TS bug see, https://github.com/microsoft/TypeScript/issues/38009\n ? value[Symbol.toStringTag]\n : (_value$constructor = value.constructor) === null ||\n _value$constructor === void 0\n ? void 0\n : _value$constructor.name;\n\n if (className === valueClassName) {\n const stringifiedValue = inspect(value);\n throw new Error(`Cannot use ${className} \"${stringifiedValue}\" from another module or realm.\n\nEnsure that there is only one instance of \"graphql\" in the node_modules\ndirectory. If different versions of \"graphql\" are the dependencies of other\nrelied on modules, use \"resolutions\" to ensure only one version is installed.\n\nhttps://yarnpkg.com/en/docs/selective-version-resolutions\n\nDuplicate \"graphql\" modules cannot be used at the same time since different\nversions may have different capabilities and behavior. The data from one\nversion used in the function from another could produce confusing and\nspurious results.`);\n }\n }\n\n return false;\n };\n","import { devAssert } from '../jsutils/devAssert.mjs';\nimport { inspect } from '../jsutils/inspect.mjs';\nimport { instanceOf } from '../jsutils/instanceOf.mjs';\n\n/**\n * A representation of source input to GraphQL. The `name` and `locationOffset` parameters are\n * optional, but they are useful for clients who store GraphQL documents in source files.\n * For example, if the GraphQL input starts at line 40 in a file named `Foo.graphql`, it might\n * be useful for `name` to be `\"Foo.graphql\"` and location to be `{ line: 40, column: 1 }`.\n * The `line` and `column` properties in `locationOffset` are 1-indexed.\n */\nexport class Source {\n constructor(\n body,\n name = 'GraphQL request',\n locationOffset = {\n line: 1,\n column: 1,\n },\n ) {\n typeof body === 'string' ||\n devAssert(false, `Body must be a string. Received: ${inspect(body)}.`);\n this.body = body;\n this.name = name;\n this.locationOffset = locationOffset;\n this.locationOffset.line > 0 ||\n devAssert(\n false,\n 'line in locationOffset is 1-indexed and must be positive.',\n );\n this.locationOffset.column > 0 ||\n devAssert(\n false,\n 'column in locationOffset is 1-indexed and must be positive.',\n );\n }\n\n get [Symbol.toStringTag]() {\n return 'Source';\n }\n}\n/**\n * Test if the given value is a Source object.\n *\n * @internal\n */\n\nexport function isSource(source) {\n return instanceOf(source, Source);\n}\n","import { syntaxError } from '../error/syntaxError.mjs';\nimport { Location, OperationTypeNode } from './ast.mjs';\nimport { DirectiveLocation } from './directiveLocation.mjs';\nimport { Kind } from './kinds.mjs';\nimport { isPunctuatorTokenKind, Lexer } from './lexer.mjs';\nimport { isSource, Source } from './source.mjs';\nimport { TokenKind } from './tokenKind.mjs';\n/**\n * Configuration options to control parser behavior\n */\n\n/**\n * Given a GraphQL source, parses it into a Document.\n * Throws GraphQLError if a syntax error is encountered.\n */\nexport function parse(source, options) {\n const parser = new Parser(source, options);\n return parser.parseDocument();\n}\n/**\n * Given a string containing a GraphQL value (ex. `[42]`), parse the AST for\n * that value.\n * Throws GraphQLError if a syntax error is encountered.\n *\n * This is useful within tools that operate upon GraphQL Values directly and\n * in isolation of complete GraphQL documents.\n *\n * Consider providing the results to the utility function: valueFromAST().\n */\n\nexport function parseValue(source, options) {\n const parser = new Parser(source, options);\n parser.expectToken(TokenKind.SOF);\n const value = parser.parseValueLiteral(false);\n parser.expectToken(TokenKind.EOF);\n return value;\n}\n/**\n * Similar to parseValue(), but raises a parse error if it encounters a\n * variable. The return type will be a constant value.\n */\n\nexport function parseConstValue(source, options) {\n const parser = new Parser(source, options);\n parser.expectToken(TokenKind.SOF);\n const value = parser.parseConstValueLiteral();\n parser.expectToken(TokenKind.EOF);\n return value;\n}\n/**\n * Given a string containing a GraphQL Type (ex. `[Int!]`), parse the AST for\n * that type.\n * Throws GraphQLError if a syntax error is encountered.\n *\n * This is useful within tools that operate upon GraphQL Types directly and\n * in isolation of complete GraphQL documents.\n *\n * Consider providing the results to the utility function: typeFromAST().\n */\n\nexport function parseType(source, options) {\n const parser = new Parser(source, options);\n parser.expectToken(TokenKind.SOF);\n const type = parser.parseTypeReference();\n parser.expectToken(TokenKind.EOF);\n return type;\n}\n/**\n * This class is exported only to assist people in implementing their own parsers\n * without duplicating too much code and should be used only as last resort for cases\n * such as experimental syntax or if certain features could not be contributed upstream.\n *\n * It is still part of the internal API and is versioned, so any changes to it are never\n * considered breaking changes. If you still need to support multiple versions of the\n * library, please use the `versionInfo` variable for version detection.\n *\n * @internal\n */\n\nexport class Parser {\n constructor(source, options = {}) {\n const sourceObj = isSource(source) ? source : new Source(source);\n this._lexer = new Lexer(sourceObj);\n this._options = options;\n this._tokenCounter = 0;\n }\n /**\n * Converts a name lex token into a name parse node.\n */\n\n parseName() {\n const token = this.expectToken(TokenKind.NAME);\n return this.node(token, {\n kind: Kind.NAME,\n value: token.value,\n });\n } // Implements the parsing rules in the Document section.\n\n /**\n * Document : Definition+\n */\n\n parseDocument() {\n return this.node(this._lexer.token, {\n kind: Kind.DOCUMENT,\n definitions: this.many(\n TokenKind.SOF,\n this.parseDefinition,\n TokenKind.EOF,\n ),\n });\n }\n /**\n * Definition :\n * - ExecutableDefinition\n * - TypeSystemDefinition\n * - TypeSystemExtension\n *\n * ExecutableDefinition :\n * - OperationDefinition\n * - FragmentDefinition\n *\n * TypeSystemDefinition :\n * - SchemaDefinition\n * - TypeDefinition\n * - DirectiveDefinition\n *\n * TypeDefinition :\n * - ScalarTypeDefinition\n * - ObjectTypeDefinition\n * - InterfaceTypeDefinition\n * - UnionTypeDefinition\n * - EnumTypeDefinition\n * - InputObjectTypeDefinition\n */\n\n parseDefinition() {\n if (this.peek(TokenKind.BRACE_L)) {\n return this.parseOperationDefinition();\n } // Many definitions begin with a description and require a lookahead.\n\n const hasDescription = this.peekDescription();\n const keywordToken = hasDescription\n ? this._lexer.lookahead()\n : this._lexer.token;\n\n if (keywordToken.kind === TokenKind.NAME) {\n switch (keywordToken.value) {\n case 'schema':\n return this.parseSchemaDefinition();\n\n case 'scalar':\n return this.parseScalarTypeDefinition();\n\n case 'type':\n return this.parseObjectTypeDefinition();\n\n case 'interface':\n return this.parseInterfaceTypeDefinition();\n\n case 'union':\n return this.parseUnionTypeDefinition();\n\n case 'enum':\n return this.parseEnumTypeDefinition();\n\n case 'input':\n return this.parseInputObjectTypeDefinition();\n\n case 'directive':\n return this.parseDirectiveDefinition();\n }\n\n if (hasDescription) {\n throw syntaxError(\n this._lexer.source,\n this._lexer.token.start,\n 'Unexpected description, descriptions are supported only on type definitions.',\n );\n }\n\n switch (keywordToken.value) {\n case 'query':\n case 'mutation':\n case 'subscription':\n return this.parseOperationDefinition();\n\n case 'fragment':\n return this.parseFragmentDefinition();\n\n case 'extend':\n return this.parseTypeSystemExtension();\n }\n }\n\n throw this.unexpected(keywordToken);\n } // Implements the parsing rules in the Operations section.\n\n /**\n * OperationDefinition :\n * - SelectionSet\n * - OperationType Name? VariableDefinitions? Directives? SelectionSet\n */\n\n parseOperationDefinition() {\n const start = this._lexer.token;\n\n if (this.peek(TokenKind.BRACE_L)) {\n return this.node(start, {\n kind: Kind.OPERATION_DEFINITION,\n operation: OperationTypeNode.QUERY,\n name: undefined,\n variableDefinitions: [],\n directives: [],\n selectionSet: this.parseSelectionSet(),\n });\n }\n\n const operation = this.parseOperationType();\n let name;\n\n if (this.peek(TokenKind.NAME)) {\n name = this.parseName();\n }\n\n return this.node(start, {\n kind: Kind.OPERATION_DEFINITION,\n operation,\n name,\n variableDefinitions: this.parseVariableDefinitions(),\n directives: this.parseDirectives(false),\n selectionSet: this.parseSelectionSet(),\n });\n }\n /**\n * OperationType : one of query mutation subscription\n */\n\n parseOperationType() {\n const operationToken = this.expectToken(TokenKind.NAME);\n\n switch (operationToken.value) {\n case 'query':\n return OperationTypeNode.QUERY;\n\n case 'mutation':\n return OperationTypeNode.MUTATION;\n\n case 'subscription':\n return OperationTypeNode.SUBSCRIPTION;\n }\n\n throw this.unexpected(operationToken);\n }\n /**\n * VariableDefinitions : ( VariableDefinition+ )\n */\n\n parseVariableDefinitions() {\n return this.optionalMany(\n TokenKind.PAREN_L,\n this.parseVariableDefinition,\n TokenKind.PAREN_R,\n );\n }\n /**\n * VariableDefinition : Variable : Type DefaultValue? Directives[Const]?\n */\n\n parseVariableDefinition() {\n return this.node(this._lexer.token, {\n kind: Kind.VARIABLE_DEFINITION,\n variable: this.parseVariable(),\n type: (this.expectToken(TokenKind.COLON), this.parseTypeReference()),\n defaultValue: this.expectOptionalToken(TokenKind.EQUALS)\n ? this.parseConstValueLiteral()\n : undefined,\n directives: this.parseConstDirectives(),\n });\n }\n /**\n * Variable : $ Name\n */\n\n parseVariable() {\n const start = this._lexer.token;\n this.expectToken(TokenKind.DOLLAR);\n return this.node(start, {\n kind: Kind.VARIABLE,\n name: this.parseName(),\n });\n }\n /**\n * ```\n * SelectionSet : { Selection+ }\n * ```\n */\n\n parseSelectionSet() {\n return this.node(this._lexer.token, {\n kind: Kind.SELECTION_SET,\n selections: this.many(\n TokenKind.BRACE_L,\n this.parseSelection,\n TokenKind.BRACE_R,\n ),\n });\n }\n /**\n * Selection :\n * - Field\n * - FragmentSpread\n * - InlineFragment\n */\n\n parseSelection() {\n return this.peek(TokenKind.SPREAD)\n ? this.parseFragment()\n : this.parseField();\n }\n /**\n * Field : Alias? Name Arguments? Directives? SelectionSet?\n *\n * Alias : Name :\n */\n\n parseField() {\n const start = this._lexer.token;\n const nameOrAlias = this.parseName();\n let alias;\n let name;\n\n if (this.expectOptionalToken(TokenKind.COLON)) {\n alias = nameOrAlias;\n name = this.parseName();\n } else {\n name = nameOrAlias;\n }\n\n return this.node(start, {\n kind: Kind.FIELD,\n alias,\n name,\n arguments: this.parseArguments(false),\n directives: this.parseDirectives(false),\n selectionSet: this.peek(TokenKind.BRACE_L)\n ? this.parseSelectionSet()\n : undefined,\n });\n }\n /**\n * Arguments[Const] : ( Argument[?Const]+ )\n */\n\n parseArguments(isConst) {\n const item = isConst ? this.parseConstArgument : this.parseArgument;\n return this.optionalMany(TokenKind.PAREN_L, item, TokenKind.PAREN_R);\n }\n /**\n * Argument[Const] : Name : Value[?Const]\n */\n\n parseArgument(isConst = false) {\n const start = this._lexer.token;\n const name = this.parseName();\n this.expectToken(TokenKind.COLON);\n return this.node(start, {\n kind: Kind.ARGUMENT,\n name,\n value: this.parseValueLiteral(isConst),\n });\n }\n\n parseConstArgument() {\n return this.parseArgument(true);\n } // Implements the parsing rules in the Fragments section.\n\n /**\n * Corresponds to both FragmentSpread and InlineFragment in the spec.\n *\n * FragmentSpread : ... FragmentName Directives?\n *\n * InlineFragment : ... TypeCondition? Directives? SelectionSet\n */\n\n parseFragment() {\n const start = this._lexer.token;\n this.expectToken(TokenKind.SPREAD);\n const hasTypeCondition = this.expectOptionalKeyword('on');\n\n if (!hasTypeCondition && this.peek(TokenKind.NAME)) {\n return this.node(start, {\n kind: Kind.FRAGMENT_SPREAD,\n name: this.parseFragmentName(),\n directives: this.parseDirectives(false),\n });\n }\n\n return this.node(start, {\n kind: Kind.INLINE_FRAGMENT,\n typeCondition: hasTypeCondition ? this.parseNamedType() : undefined,\n directives: this.parseDirectives(false),\n selectionSet: this.parseSelectionSet(),\n });\n }\n /**\n * FragmentDefinition :\n * - fragment FragmentName on TypeCondition Directives? SelectionSet\n *\n * TypeCondition : NamedType\n */\n\n parseFragmentDefinition() {\n const start = this._lexer.token;\n this.expectKeyword('fragment'); // Legacy support for defining variables within fragments changes\n // the grammar of FragmentDefinition:\n // - fragment FragmentName VariableDefinitions? on TypeCondition Directives? SelectionSet\n\n if (this._options.allowLegacyFragmentVariables === true) {\n return this.node(start, {\n kind: Kind.FRAGMENT_DEFINITION,\n name: this.parseFragmentName(),\n variableDefinitions: this.parseVariableDefinitions(),\n typeCondition: (this.expectKeyword('on'), this.parseNamedType()),\n directives: this.parseDirectives(false),\n selectionSet: this.parseSelectionSet(),\n });\n }\n\n return this.node(start, {\n kind: Kind.FRAGMENT_DEFINITION,\n name: this.parseFragmentName(),\n typeCondition: (this.expectKeyword('on'), this.parseNamedType()),\n directives: this.parseDirectives(false),\n selectionSet: this.parseSelectionSet(),\n });\n }\n /**\n * FragmentName : Name but not `on`\n */\n\n parseFragmentName() {\n if (this._lexer.token.value === 'on') {\n throw this.unexpected();\n }\n\n return this.parseName();\n } // Implements the parsing rules in the Values section.\n\n /**\n * Value[Const] :\n * - [~Const] Variable\n * - IntValue\n * - FloatValue\n * - StringValue\n * - BooleanValue\n * - NullValue\n * - EnumValue\n * - ListValue[?Const]\n * - ObjectValue[?Const]\n *\n * BooleanValue : one of `true` `false`\n *\n * NullValue : `null`\n *\n * EnumValue : Name but not `true`, `false` or `null`\n */\n\n parseValueLiteral(isConst) {\n const token = this._lexer.token;\n\n switch (token.kind) {\n case TokenKind.BRACKET_L:\n return this.parseList(isConst);\n\n case TokenKind.BRACE_L:\n return this.parseObject(isConst);\n\n case TokenKind.INT:\n this.advanceLexer();\n return this.node(token, {\n kind: Kind.INT,\n value: token.value,\n });\n\n case TokenKind.FLOAT:\n this.advanceLexer();\n return this.node(token, {\n kind: Kind.FLOAT,\n value: token.value,\n });\n\n case TokenKind.STRING:\n case TokenKind.BLOCK_STRING:\n return this.parseStringLiteral();\n\n case TokenKind.NAME:\n this.advanceLexer();\n\n switch (token.value) {\n case 'true':\n return this.node(token, {\n kind: Kind.BOOLEAN,\n value: true,\n });\n\n case 'false':\n return this.node(token, {\n kind: Kind.BOOLEAN,\n value: false,\n });\n\n case 'null':\n return this.node(token, {\n kind: Kind.NULL,\n });\n\n default:\n return this.node(token, {\n kind: Kind.ENUM,\n value: token.value,\n });\n }\n\n case TokenKind.DOLLAR:\n if (isConst) {\n this.expectToken(TokenKind.DOLLAR);\n\n if (this._lexer.token.kind === TokenKind.NAME) {\n const varName = this._lexer.token.value;\n throw syntaxError(\n this._lexer.source,\n token.start,\n `Unexpected variable \"$${varName}\" in constant value.`,\n );\n } else {\n throw this.unexpected(token);\n }\n }\n\n return this.parseVariable();\n\n default:\n throw this.unexpected();\n }\n }\n\n parseConstValueLiteral() {\n return this.parseValueLiteral(true);\n }\n\n parseStringLiteral() {\n const token = this._lexer.token;\n this.advanceLexer();\n return this.node(token, {\n kind: Kind.STRING,\n value: token.value,\n block: token.kind === TokenKind.BLOCK_STRING,\n });\n }\n /**\n * ListValue[Const] :\n * - [ ]\n * - [ Value[?Const]+ ]\n */\n\n parseList(isConst) {\n const item = () => this.parseValueLiteral(isConst);\n\n return this.node(this._lexer.token, {\n kind: Kind.LIST,\n values: this.any(TokenKind.BRACKET_L, item, TokenKind.BRACKET_R),\n });\n }\n /**\n * ```\n * ObjectValue[Const] :\n * - { }\n * - { ObjectField[?Const]+ }\n * ```\n */\n\n parseObject(isConst) {\n const item = () => this.parseObjectField(isConst);\n\n return this.node(this._lexer.token, {\n kind: Kind.OBJECT,\n fields: this.any(TokenKind.BRACE_L, item, TokenKind.BRACE_R),\n });\n }\n /**\n * ObjectField[Const] : Name : Value[?Const]\n */\n\n parseObjectField(isConst) {\n const start = this._lexer.token;\n const name = this.parseName();\n this.expectToken(TokenKind.COLON);\n return this.node(start, {\n kind: Kind.OBJECT_FIELD,\n name,\n value: this.parseValueLiteral(isConst),\n });\n } // Implements the parsing rules in the Directives section.\n\n /**\n * Directives[Const] : Directive[?Const]+\n */\n\n parseDirectives(isConst) {\n const directives = [];\n\n while (this.peek(TokenKind.AT)) {\n directives.push(this.parseDirective(isConst));\n }\n\n return directives;\n }\n\n parseConstDirectives() {\n return this.parseDirectives(true);\n }\n /**\n * ```\n * Directive[Const] : @ Name Arguments[?Const]?\n * ```\n */\n\n parseDirective(isConst) {\n const start = this._lexer.token;\n this.expectToken(TokenKind.AT);\n return this.node(start, {\n kind: Kind.DIRECTIVE,\n name: this.parseName(),\n arguments: this.parseArguments(isConst),\n });\n } // Implements the parsing rules in the Types section.\n\n /**\n * Type :\n * - NamedType\n * - ListType\n * - NonNullType\n */\n\n parseTypeReference() {\n const start = this._lexer.token;\n let type;\n\n if (this.expectOptionalToken(TokenKind.BRACKET_L)) {\n const innerType = this.parseTypeReference();\n this.expectToken(TokenKind.BRACKET_R);\n type = this.node(start, {\n kind: Kind.LIST_TYPE,\n type: innerType,\n });\n } else {\n type = this.parseNamedType();\n }\n\n if (this.expectOptionalToken(TokenKind.BANG)) {\n return this.node(start, {\n kind: Kind.NON_NULL_TYPE,\n type,\n });\n }\n\n return type;\n }\n /**\n * NamedType : Name\n */\n\n parseNamedType() {\n return this.node(this._lexer.token, {\n kind: Kind.NAMED_TYPE,\n name: this.parseName(),\n });\n } // Implements the parsing rules in the Type Definition section.\n\n peekDescription() {\n return this.peek(TokenKind.STRING) || this.peek(TokenKind.BLOCK_STRING);\n }\n /**\n * Description : StringValue\n */\n\n parseDescription() {\n if (this.peekDescription()) {\n return this.parseStringLiteral();\n }\n }\n /**\n * ```\n * SchemaDefinition : Description? schema Directives[Const]? { OperationTypeDefinition+ }\n * ```\n */\n\n parseSchemaDefinition() {\n const start = this._lexer.token;\n const description = this.parseDescription();\n this.expectKeyword('schema');\n const directives = this.parseConstDirectives();\n const operationTypes = this.many(\n TokenKind.BRACE_L,\n this.parseOperationTypeDefinition,\n TokenKind.BRACE_R,\n );\n return this.node(start, {\n kind: Kind.SCHEMA_DEFINITION,\n description,\n directives,\n operationTypes,\n });\n }\n /**\n * OperationTypeDefinition : OperationType : NamedType\n */\n\n parseOperationTypeDefinition() {\n const start = this._lexer.token;\n const operation = this.parseOperationType();\n this.expectToken(TokenKind.COLON);\n const type = this.parseNamedType();\n return this.node(start, {\n kind: Kind.OPERATION_TYPE_DEFINITION,\n operation,\n type,\n });\n }\n /**\n * ScalarTypeDefinition : Description? scalar Name Directives[Const]?\n */\n\n parseScalarTypeDefinition() {\n const start = this._lexer.token;\n const description = this.parseDescription();\n this.expectKeyword('scalar');\n const name = this.parseName();\n const directives = this.parseConstDirectives();\n return this.node(start, {\n kind: Kind.SCALAR_TYPE_DEFINITION,\n description,\n name,\n directives,\n });\n }\n /**\n * ObjectTypeDefinition :\n * Description?\n * type Name ImplementsInterfaces? Directives[Const]? FieldsDefinition?\n */\n\n parseObjectTypeDefinition() {\n const start = this._lexer.token;\n const description = this.parseDescription();\n this.expectKeyword('type');\n const name = this.parseName();\n const interfaces = this.parseImplementsInterfaces();\n const directives = this.parseConstDirectives();\n const fields = this.parseFieldsDefinition();\n return this.node(start, {\n kind: Kind.OBJECT_TYPE_DEFINITION,\n description,\n name,\n interfaces,\n directives,\n fields,\n });\n }\n /**\n * ImplementsInterfaces :\n * - implements `&`? NamedType\n * - ImplementsInterfaces & NamedType\n */\n\n parseImplementsInterfaces() {\n return this.expectOptionalKeyword('implements')\n ? this.delimitedMany(TokenKind.AMP, this.parseNamedType)\n : [];\n }\n /**\n * ```\n * FieldsDefinition : { FieldDefinition+ }\n * ```\n */\n\n parseFieldsDefinition() {\n return this.optionalMany(\n TokenKind.BRACE_L,\n this.parseFieldDefinition,\n TokenKind.BRACE_R,\n );\n }\n /**\n * FieldDefinition :\n * - Description? Name ArgumentsDefinition? : Type Directives[Const]?\n */\n\n parseFieldDefinition() {\n const start = this._lexer.token;\n const description = this.parseDescription();\n const name = this.parseName();\n const args = this.parseArgumentDefs();\n this.expectToken(TokenKind.COLON);\n const type = this.parseTypeReference();\n const directives = this.parseConstDirectives();\n return this.node(start, {\n kind: Kind.FIELD_DEFINITION,\n description,\n name,\n arguments: args,\n type,\n directives,\n });\n }\n /**\n * ArgumentsDefinition : ( InputValueDefinition+ )\n */\n\n parseArgumentDefs() {\n return this.optionalMany(\n TokenKind.PAREN_L,\n this.parseInputValueDef,\n TokenKind.PAREN_R,\n );\n }\n /**\n * InputValueDefinition :\n * - Description? Name : Type DefaultValue? Directives[Const]?\n */\n\n parseInputValueDef() {\n const start = this._lexer.token;\n const description = this.parseDescription();\n const name = this.parseName();\n this.expectToken(TokenKind.COLON);\n const type = this.parseTypeReference();\n let defaultValue;\n\n if (this.expectOptionalToken(TokenKind.EQUALS)) {\n defaultValue = this.parseConstValueLiteral();\n }\n\n const directives = this.parseConstDirectives();\n return this.node(start, {\n kind: Kind.INPUT_VALUE_DEFINITION,\n description,\n name,\n type,\n defaultValue,\n directives,\n });\n }\n /**\n * InterfaceTypeDefinition :\n * - Description? interface Name Directives[Const]? FieldsDefinition?\n */\n\n parseInterfaceTypeDefinition() {\n const start = this._lexer.token;\n const description = this.parseDescription();\n this.expectKeyword('interface');\n const name = this.parseName();\n const interfaces = this.parseImplementsInterfaces();\n const directives = this.parseConstDirectives();\n const fields = this.parseFieldsDefinition();\n return this.node(start, {\n kind: Kind.INTERFACE_TYPE_DEFINITION,\n description,\n name,\n interfaces,\n directives,\n fields,\n });\n }\n /**\n * UnionTypeDefinition :\n * - Description? union Name Directives[Const]? UnionMemberTypes?\n */\n\n parseUnionTypeDefinition() {\n const start = this._lexer.token;\n const description = this.parseDescription();\n this.expectKeyword('union');\n const name = this.parseName();\n const directives = this.parseConstDirectives();\n const types = this.parseUnionMemberTypes();\n return this.node(start, {\n kind: Kind.UNION_TYPE_DEFINITION,\n description,\n name,\n directives,\n types,\n });\n }\n /**\n * UnionMemberTypes :\n * - = `|`? NamedType\n * - UnionMemberTypes | NamedType\n */\n\n parseUnionMemberTypes() {\n return this.expectOptionalToken(TokenKind.EQUALS)\n ? this.delimitedMany(TokenKind.PIPE, this.parseNamedType)\n : [];\n }\n /**\n * EnumTypeDefinition :\n * - Description? enum Name Directives[Const]? EnumValuesDefinition?\n */\n\n parseEnumTypeDefinition() {\n const start = this._lexer.token;\n const description = this.parseDescription();\n this.expectKeyword('enum');\n const name = this.parseName();\n const directives = this.parseConstDirectives();\n const values = this.parseEnumValuesDefinition();\n return this.node(start, {\n kind: Kind.ENUM_TYPE_DEFINITION,\n description,\n name,\n directives,\n values,\n });\n }\n /**\n * ```\n * EnumValuesDefinition : { EnumValueDefinition+ }\n * ```\n */\n\n parseEnumValuesDefinition() {\n return this.optionalMany(\n TokenKind.BRACE_L,\n this.parseEnumValueDefinition,\n TokenKind.BRACE_R,\n );\n }\n /**\n * EnumValueDefinition : Description? EnumValue Directives[Const]?\n */\n\n parseEnumValueDefinition() {\n const start = this._lexer.token;\n const description = this.parseDescription();\n const name = this.parseEnumValueName();\n const directives = this.parseConstDirectives();\n return this.node(start, {\n kind: Kind.ENUM_VALUE_DEFINITION,\n description,\n name,\n directives,\n });\n }\n /**\n * EnumValue : Name but not `true`, `false` or `null`\n */\n\n parseEnumValueName() {\n if (\n this._lexer.token.value === 'true' ||\n this._lexer.token.value === 'false' ||\n this._lexer.token.value === 'null'\n ) {\n throw syntaxError(\n this._lexer.source,\n this._lexer.token.start,\n `${getTokenDesc(\n this._lexer.token,\n )} is reserved and cannot be used for an enum value.`,\n );\n }\n\n return this.parseName();\n }\n /**\n * InputObjectTypeDefinition :\n * - Description? input Name Directives[Const]? InputFieldsDefinition?\n */\n\n parseInputObjectTypeDefinition() {\n const start = this._lexer.token;\n const description = this.parseDescription();\n this.expectKeyword('input');\n const name = this.parseName();\n const directives = this.parseConstDirectives();\n const fields = this.parseInputFieldsDefinition();\n return this.node(start, {\n kind: Kind.INPUT_OBJECT_TYPE_DEFINITION,\n description,\n name,\n directives,\n fields,\n });\n }\n /**\n * ```\n * InputFieldsDefinition : { InputValueDefinition+ }\n * ```\n */\n\n parseInputFieldsDefinition() {\n return this.optionalMany(\n TokenKind.BRACE_L,\n this.parseInputValueDef,\n TokenKind.BRACE_R,\n );\n }\n /**\n * TypeSystemExtension :\n * - SchemaExtension\n * - TypeExtension\n *\n * TypeExtension :\n * - ScalarTypeExtension\n * - ObjectTypeExtension\n * - InterfaceTypeExtension\n * - UnionTypeExtension\n * - EnumTypeExtension\n * - InputObjectTypeDefinition\n */\n\n parseTypeSystemExtension() {\n const keywordToken = this._lexer.lookahead();\n\n if (keywordToken.kind === TokenKind.NAME) {\n switch (keywordToken.value) {\n case 'schema':\n return this.parseSchemaExtension();\n\n case 'scalar':\n return this.parseScalarTypeExtension();\n\n case 'type':\n return this.parseObjectTypeExtension();\n\n case 'interface':\n return this.parseInterfaceTypeExtension();\n\n case 'union':\n return this.parseUnionTypeExtension();\n\n case 'enum':\n return this.parseEnumTypeExtension();\n\n case 'input':\n return this.parseInputObjectTypeExtension();\n }\n }\n\n throw this.unexpected(keywordToken);\n }\n /**\n * ```\n * SchemaExtension :\n * - extend schema Directives[Const]? { OperationTypeDefinition+ }\n * - extend schema Directives[Const]\n * ```\n */\n\n parseSchemaExtension() {\n const start = this._lexer.token;\n this.expectKeyword('extend');\n this.expectKeyword('schema');\n const directives = this.parseConstDirectives();\n const operationTypes = this.optionalMany(\n TokenKind.BRACE_L,\n this.parseOperationTypeDefinition,\n TokenKind.BRACE_R,\n );\n\n if (directives.length === 0 && operationTypes.length === 0) {\n throw this.unexpected();\n }\n\n return this.node(start, {\n kind: Kind.SCHEMA_EXTENSION,\n directives,\n operationTypes,\n });\n }\n /**\n * ScalarTypeExtension :\n * - extend scalar Name Directives[Const]\n */\n\n parseScalarTypeExtension() {\n const start = this._lexer.token;\n this.expectKeyword('extend');\n this.expectKeyword('scalar');\n const name = this.parseName();\n const directives = this.parseConstDirectives();\n\n if (directives.length === 0) {\n throw this.unexpected();\n }\n\n return this.node(start, {\n kind: Kind.SCALAR_TYPE_EXTENSION,\n name,\n directives,\n });\n }\n /**\n * ObjectTypeExtension :\n * - extend type Name ImplementsInterfaces? Directives[Const]? FieldsDefinition\n * - extend type Name ImplementsInterfaces? Directives[Const]\n * - extend type Name ImplementsInterfaces\n */\n\n parseObjectTypeExtension() {\n const start = this._lexer.token;\n this.expectKeyword('extend');\n this.expectKeyword('type');\n const name = this.parseName();\n const interfaces = this.parseImplementsInterfaces();\n const directives = this.parseConstDirectives();\n const fields = this.parseFieldsDefinition();\n\n if (\n interfaces.length === 0 &&\n directives.length === 0 &&\n fields.length === 0\n ) {\n throw this.unexpected();\n }\n\n return this.node(start, {\n kind: Kind.OBJECT_TYPE_EXTENSION,\n name,\n interfaces,\n directives,\n fields,\n });\n }\n /**\n * InterfaceTypeExtension :\n * - extend interface Name ImplementsInterfaces? Directives[Const]? FieldsDefinition\n * - extend interface Name ImplementsInterfaces? Directives[Const]\n * - extend interface Name ImplementsInterfaces\n */\n\n parseInterfaceTypeExtension() {\n const start = this._lexer.token;\n this.expectKeyword('extend');\n this.expectKeyword('interface');\n const name = this.parseName();\n const interfaces = this.parseImplementsInterfaces();\n const directives = this.parseConstDirectives();\n const fields = this.parseFieldsDefinition();\n\n if (\n interfaces.length === 0 &&\n directives.length === 0 &&\n fields.length === 0\n ) {\n throw this.unexpected();\n }\n\n return this.node(start, {\n kind: Kind.INTERFACE_TYPE_EXTENSION,\n name,\n interfaces,\n directives,\n fields,\n });\n }\n /**\n * UnionTypeExtension :\n * - extend union Name Directives[Const]? UnionMemberTypes\n * - extend union Name Directives[Const]\n */\n\n parseUnionTypeExtension() {\n const start = this._lexer.token;\n this.expectKeyword('extend');\n this.expectKeyword('union');\n const name = this.parseName();\n const directives = this.parseConstDirectives();\n const types = this.parseUnionMemberTypes();\n\n if (directives.length === 0 && types.length === 0) {\n throw this.unexpected();\n }\n\n return this.node(start, {\n kind: Kind.UNION_TYPE_EXTENSION,\n name,\n directives,\n types,\n });\n }\n /**\n * EnumTypeExtension :\n * - extend enum Name Directives[Const]? EnumValuesDefinition\n * - extend enum Name Directives[Const]\n */\n\n parseEnumTypeExtension() {\n const start = this._lexer.token;\n this.expectKeyword('extend');\n this.expectKeyword('enum');\n const name = this.parseName();\n const directives = this.parseConstDirectives();\n const values = this.parseEnumValuesDefinition();\n\n if (directives.length === 0 && values.length === 0) {\n throw this.unexpected();\n }\n\n return this.node(start, {\n kind: Kind.ENUM_TYPE_EXTENSION,\n name,\n directives,\n values,\n });\n }\n /**\n * InputObjectTypeExtension :\n * - extend input Name Directives[Const]? InputFieldsDefinition\n * - extend input Name Directives[Const]\n */\n\n parseInputObjectTypeExtension() {\n const start = this._lexer.token;\n this.expectKeyword('extend');\n this.expectKeyword('input');\n const name = this.parseName();\n const directives = this.parseConstDirectives();\n const fields = this.parseInputFieldsDefinition();\n\n if (directives.length === 0 && fields.length === 0) {\n throw this.unexpected();\n }\n\n return this.node(start, {\n kind: Kind.INPUT_OBJECT_TYPE_EXTENSION,\n name,\n directives,\n fields,\n });\n }\n /**\n * ```\n * DirectiveDefinition :\n * - Description? directive @ Name ArgumentsDefinition? `repeatable`? on DirectiveLocations\n * ```\n */\n\n parseDirectiveDefinition() {\n const start = this._lexer.token;\n const description = this.parseDescription();\n this.expectKeyword('directive');\n this.expectToken(TokenKind.AT);\n const name = this.parseName();\n const args = this.parseArgumentDefs();\n const repeatable = this.expectOptionalKeyword('repeatable');\n this.expectKeyword('on');\n const locations = this.parseDirectiveLocations();\n return this.node(start, {\n kind: Kind.DIRECTIVE_DEFINITION,\n description,\n name,\n arguments: args,\n repeatable,\n locations,\n });\n }\n /**\n * DirectiveLocations :\n * - `|`? DirectiveLocation\n * - DirectiveLocations | DirectiveLocation\n */\n\n parseDirectiveLocations() {\n return this.delimitedMany(TokenKind.PIPE, this.parseDirectiveLocation);\n }\n /*\n * DirectiveLocation :\n * - ExecutableDirectiveLocation\n * - TypeSystemDirectiveLocation\n *\n * ExecutableDirectiveLocation : one of\n * `QUERY`\n * `MUTATION`\n * `SUBSCRIPTION`\n * `FIELD`\n * `FRAGMENT_DEFINITION`\n * `FRAGMENT_SPREAD`\n * `INLINE_FRAGMENT`\n *\n * TypeSystemDirectiveLocation : one of\n * `SCHEMA`\n * `SCALAR`\n * `OBJECT`\n * `FIELD_DEFINITION`\n * `ARGUMENT_DEFINITION`\n * `INTERFACE`\n * `UNION`\n * `ENUM`\n * `ENUM_VALUE`\n * `INPUT_OBJECT`\n * `INPUT_FIELD_DEFINITION`\n */\n\n parseDirectiveLocation() {\n const start = this._lexer.token;\n const name = this.parseName();\n\n if (Object.prototype.hasOwnProperty.call(DirectiveLocation, name.value)) {\n return name;\n }\n\n throw this.unexpected(start);\n } // Core parsing utility functions\n\n /**\n * Returns a node that, if configured to do so, sets a \"loc\" field as a\n * location object, used to identify the place in the source that created a\n * given parsed object.\n */\n\n node(startToken, node) {\n if (this._options.noLocation !== true) {\n node.loc = new Location(\n startToken,\n this._lexer.lastToken,\n this._lexer.source,\n );\n }\n\n return node;\n }\n /**\n * Determines if the next token is of a given kind\n */\n\n peek(kind) {\n return this._lexer.token.kind === kind;\n }\n /**\n * If the next token is of the given kind, return that token after advancing the lexer.\n * Otherwise, do not change the parser state and throw an error.\n */\n\n expectToken(kind) {\n const token = this._lexer.token;\n\n if (token.kind === kind) {\n this.advanceLexer();\n return token;\n }\n\n throw syntaxError(\n this._lexer.source,\n token.start,\n `Expected ${getTokenKindDesc(kind)}, found ${getTokenDesc(token)}.`,\n );\n }\n /**\n * If the next token is of the given kind, return \"true\" after advancing the lexer.\n * Otherwise, do not change the parser state and return \"false\".\n */\n\n expectOptionalToken(kind) {\n const token = this._lexer.token;\n\n if (token.kind === kind) {\n this.advanceLexer();\n return true;\n }\n\n return false;\n }\n /**\n * If the next token is a given keyword, advance the lexer.\n * Otherwise, do not change the parser state and throw an error.\n */\n\n expectKeyword(value) {\n const token = this._lexer.token;\n\n if (token.kind === TokenKind.NAME && token.value === value) {\n this.advanceLexer();\n } else {\n throw syntaxError(\n this._lexer.source,\n token.start,\n `Expected \"${value}\", found ${getTokenDesc(token)}.`,\n );\n }\n }\n /**\n * If the next token is a given keyword, return \"true\" after advancing the lexer.\n * Otherwise, do not change the parser state and return \"false\".\n */\n\n expectOptionalKeyword(value) {\n const token = this._lexer.token;\n\n if (token.kind === TokenKind.NAME && token.value === value) {\n this.advanceLexer();\n return true;\n }\n\n return false;\n }\n /**\n * Helper function for creating an error when an unexpected lexed token is encountered.\n */\n\n unexpected(atToken) {\n const token =\n atToken !== null && atToken !== void 0 ? atToken : this._lexer.token;\n return syntaxError(\n this._lexer.source,\n token.start,\n `Unexpected ${getTokenDesc(token)}.`,\n );\n }\n /**\n * Returns a possibly empty list of parse nodes, determined by the parseFn.\n * This list begins with a lex token of openKind and ends with a lex token of closeKind.\n * Advances the parser to the next lex token after the closing token.\n */\n\n any(openKind, parseFn, closeKind) {\n this.expectToken(openKind);\n const nodes = [];\n\n while (!this.expectOptionalToken(closeKind)) {\n nodes.push(parseFn.call(this));\n }\n\n return nodes;\n }\n /**\n * Returns a list of parse nodes, determined by the parseFn.\n * It can be empty only if open token is missing otherwise it will always return non-empty list\n * that begins with a lex token of openKind and ends with a lex token of closeKind.\n * Advances the parser to the next lex token after the closing token.\n */\n\n optionalMany(openKind, parseFn, closeKind) {\n if (this.expectOptionalToken(openKind)) {\n const nodes = [];\n\n do {\n nodes.push(parseFn.call(this));\n } while (!this.expectOptionalToken(closeKind));\n\n return nodes;\n }\n\n return [];\n }\n /**\n * Returns a non-empty list of parse nodes, determined by the parseFn.\n * This list begins with a lex token of openKind and ends with a lex token of closeKind.\n * Advances the parser to the next lex token after the closing token.\n */\n\n many(openKind, parseFn, closeKind) {\n this.expectToken(openKind);\n const nodes = [];\n\n do {\n nodes.push(parseFn.call(this));\n } while (!this.expectOptionalToken(closeKind));\n\n return nodes;\n }\n /**\n * Returns a non-empty list of parse nodes, determined by the parseFn.\n * This list may begin with a lex token of delimiterKind followed by items separated by lex tokens of tokenKind.\n * Advances the parser to the next lex token after last item in the list.\n */\n\n delimitedMany(delimiterKind, parseFn) {\n this.expectOptionalToken(delimiterKind);\n const nodes = [];\n\n do {\n nodes.push(parseFn.call(this));\n } while (this.expectOptionalToken(delimiterKind));\n\n return nodes;\n }\n\n advanceLexer() {\n const { maxTokens } = this._options;\n\n const token = this._lexer.advance();\n\n if (maxTokens !== undefined && token.kind !== TokenKind.EOF) {\n ++this._tokenCounter;\n\n if (this._tokenCounter > maxTokens) {\n throw syntaxError(\n this._lexer.source,\n token.start,\n `Document contains more that ${maxTokens} tokens. Parsing aborted.`,\n );\n }\n }\n }\n}\n/**\n * A helper function to describe a token as a string for debugging.\n */\n\nfunction getTokenDesc(token) {\n const value = token.value;\n return getTokenKindDesc(token.kind) + (value != null ? ` \"${value}\"` : '');\n}\n/**\n * A helper function to describe a token kind as a string for debugging.\n */\n\nfunction getTokenKindDesc(kind) {\n return isPunctuatorTokenKind(kind) ? `\"${kind}\"` : kind;\n}\n","/**\n * Prints a string as a GraphQL StringValue literal. Replaces control characters\n * and excluded characters (\" U+0022 and \\\\ U+005C) with escape sequences.\n */\nexport function printString(str) {\n return `\"${str.replace(escapedRegExp, escapedReplacer)}\"`;\n} // eslint-disable-next-line no-control-regex\n\nconst escapedRegExp = /[\\x00-\\x1f\\x22\\x5c\\x7f-\\x9f]/g;\n\nfunction escapedReplacer(str) {\n return escapeSequences[str.charCodeAt(0)];\n} // prettier-ignore\n\nconst escapeSequences = [\n '\\\\u0000',\n '\\\\u0001',\n '\\\\u0002',\n '\\\\u0003',\n '\\\\u0004',\n '\\\\u0005',\n '\\\\u0006',\n '\\\\u0007',\n '\\\\b',\n '\\\\t',\n '\\\\n',\n '\\\\u000B',\n '\\\\f',\n '\\\\r',\n '\\\\u000E',\n '\\\\u000F',\n '\\\\u0010',\n '\\\\u0011',\n '\\\\u0012',\n '\\\\u0013',\n '\\\\u0014',\n '\\\\u0015',\n '\\\\u0016',\n '\\\\u0017',\n '\\\\u0018',\n '\\\\u0019',\n '\\\\u001A',\n '\\\\u001B',\n '\\\\u001C',\n '\\\\u001D',\n '\\\\u001E',\n '\\\\u001F',\n '',\n '',\n '\\\\\"',\n '',\n '',\n '',\n '',\n '',\n '',\n '',\n '',\n '',\n '',\n '',\n '',\n '', // 2F\n '',\n '',\n '',\n '',\n '',\n '',\n '',\n '',\n '',\n '',\n '',\n '',\n '',\n '',\n '',\n '', // 3F\n '',\n '',\n '',\n '',\n '',\n '',\n '',\n '',\n '',\n '',\n '',\n '',\n '',\n '',\n '',\n '', // 4F\n '',\n '',\n '',\n '',\n '',\n '',\n '',\n '',\n '',\n '',\n '',\n '',\n '\\\\\\\\',\n '',\n '',\n '', // 5F\n '',\n '',\n '',\n '',\n '',\n '',\n '',\n '',\n '',\n '',\n '',\n '',\n '',\n '',\n '',\n '', // 6F\n '',\n '',\n '',\n '',\n '',\n '',\n '',\n '',\n '',\n '',\n '',\n '',\n '',\n '',\n '',\n '\\\\u007F',\n '\\\\u0080',\n '\\\\u0081',\n '\\\\u0082',\n '\\\\u0083',\n '\\\\u0084',\n '\\\\u0085',\n '\\\\u0086',\n '\\\\u0087',\n '\\\\u0088',\n '\\\\u0089',\n '\\\\u008A',\n '\\\\u008B',\n '\\\\u008C',\n '\\\\u008D',\n '\\\\u008E',\n '\\\\u008F',\n '\\\\u0090',\n '\\\\u0091',\n '\\\\u0092',\n '\\\\u0093',\n '\\\\u0094',\n '\\\\u0095',\n '\\\\u0096',\n '\\\\u0097',\n '\\\\u0098',\n '\\\\u0099',\n '\\\\u009A',\n '\\\\u009B',\n '\\\\u009C',\n '\\\\u009D',\n '\\\\u009E',\n '\\\\u009F',\n];\n","import { devAssert } from '../jsutils/devAssert.mjs';\nimport { inspect } from '../jsutils/inspect.mjs';\nimport { isNode, QueryDocumentKeys } from './ast.mjs';\nimport { Kind } from './kinds.mjs';\n/**\n * A visitor is provided to visit, it contains the collection of\n * relevant functions to be called during the visitor's traversal.\n */\n\nexport const BREAK = Object.freeze({});\n/**\n * visit() will walk through an AST using a depth-first traversal, calling\n * the visitor's enter function at each node in the traversal, and calling the\n * leave function after visiting that node and all of its child nodes.\n *\n * By returning different values from the enter and leave functions, the\n * behavior of the visitor can be altered, including skipping over a sub-tree of\n * the AST (by returning false), editing the AST by returning a value or null\n * to remove the value, or to stop the whole traversal by returning BREAK.\n *\n * When using visit() to edit an AST, the original AST will not be modified, and\n * a new version of the AST with the changes applied will be returned from the\n * visit function.\n *\n * ```ts\n * const editedAST = visit(ast, {\n * enter(node, key, parent, path, ancestors) {\n * // @return\n * // undefined: no action\n * // false: skip visiting this node\n * // visitor.BREAK: stop visiting altogether\n * // null: delete this node\n * // any value: replace this node with the returned value\n * },\n * leave(node, key, parent, path, ancestors) {\n * // @return\n * // undefined: no action\n * // false: no action\n * // visitor.BREAK: stop visiting altogether\n * // null: delete this node\n * // any value: replace this node with the returned value\n * }\n * });\n * ```\n *\n * Alternatively to providing enter() and leave() functions, a visitor can\n * instead provide functions named the same as the kinds of AST nodes, or\n * enter/leave visitors at a named key, leading to three permutations of the\n * visitor API:\n *\n * 1) Named visitors triggered when entering a node of a specific kind.\n *\n * ```ts\n * visit(ast, {\n * Kind(node) {\n * // enter the \"Kind\" node\n * }\n * })\n * ```\n *\n * 2) Named visitors that trigger upon entering and leaving a node of a specific kind.\n *\n * ```ts\n * visit(ast, {\n * Kind: {\n * enter(node) {\n * // enter the \"Kind\" node\n * }\n * leave(node) {\n * // leave the \"Kind\" node\n * }\n * }\n * })\n * ```\n *\n * 3) Generic visitors that trigger upon entering and leaving any node.\n *\n * ```ts\n * visit(ast, {\n * enter(node) {\n * // enter any node\n * },\n * leave(node) {\n * // leave any node\n * }\n * })\n * ```\n */\n\nexport function visit(root, visitor, visitorKeys = QueryDocumentKeys) {\n const enterLeaveMap = new Map();\n\n for (const kind of Object.values(Kind)) {\n enterLeaveMap.set(kind, getEnterLeaveForKind(visitor, kind));\n }\n /* eslint-disable no-undef-init */\n\n let stack = undefined;\n let inArray = Array.isArray(root);\n let keys = [root];\n let index = -1;\n let edits = [];\n let node = root;\n let key = undefined;\n let parent = undefined;\n const path = [];\n const ancestors = [];\n /* eslint-enable no-undef-init */\n\n do {\n index++;\n const isLeaving = index === keys.length;\n const isEdited = isLeaving && edits.length !== 0;\n\n if (isLeaving) {\n key = ancestors.length === 0 ? undefined : path[path.length - 1];\n node = parent;\n parent = ancestors.pop();\n\n if (isEdited) {\n if (inArray) {\n node = node.slice();\n let editOffset = 0;\n\n for (const [editKey, editValue] of edits) {\n const arrayKey = editKey - editOffset;\n\n if (editValue === null) {\n node.splice(arrayKey, 1);\n editOffset++;\n } else {\n node[arrayKey] = editValue;\n }\n }\n } else {\n node = Object.defineProperties(\n {},\n Object.getOwnPropertyDescriptors(node),\n );\n\n for (const [editKey, editValue] of edits) {\n node[editKey] = editValue;\n }\n }\n }\n\n index = stack.index;\n keys = stack.keys;\n edits = stack.edits;\n inArray = stack.inArray;\n stack = stack.prev;\n } else if (parent) {\n key = inArray ? index : keys[index];\n node = parent[key];\n\n if (node === null || node === undefined) {\n continue;\n }\n\n path.push(key);\n }\n\n let result;\n\n if (!Array.isArray(node)) {\n var _enterLeaveMap$get, _enterLeaveMap$get2;\n\n isNode(node) || devAssert(false, `Invalid AST Node: ${inspect(node)}.`);\n const visitFn = isLeaving\n ? (_enterLeaveMap$get = enterLeaveMap.get(node.kind)) === null ||\n _enterLeaveMap$get === void 0\n ? void 0\n : _enterLeaveMap$get.leave\n : (_enterLeaveMap$get2 = enterLeaveMap.get(node.kind)) === null ||\n _enterLeaveMap$get2 === void 0\n ? void 0\n : _enterLeaveMap$get2.enter;\n result =\n visitFn === null || visitFn === void 0\n ? void 0\n : visitFn.call(visitor, node, key, parent, path, ancestors);\n\n if (result === BREAK) {\n break;\n }\n\n if (result === false) {\n if (!isLeaving) {\n path.pop();\n continue;\n }\n } else if (result !== undefined) {\n edits.push([key, result]);\n\n if (!isLeaving) {\n if (isNode(result)) {\n node = result;\n } else {\n path.pop();\n continue;\n }\n }\n }\n }\n\n if (result === undefined && isEdited) {\n edits.push([key, node]);\n }\n\n if (isLeaving) {\n path.pop();\n } else {\n var _node$kind;\n\n stack = {\n inArray,\n index,\n keys,\n edits,\n prev: stack,\n };\n inArray = Array.isArray(node);\n keys = inArray\n ? node\n : (_node$kind = visitorKeys[node.kind]) !== null &&\n _node$kind !== void 0\n ? _node$kind\n : [];\n index = -1;\n edits = [];\n\n if (parent) {\n ancestors.push(parent);\n }\n\n parent = node;\n }\n } while (stack !== undefined);\n\n if (edits.length !== 0) {\n // New root\n return edits[edits.length - 1][1];\n }\n\n return root;\n}\n/**\n * Creates a new visitor instance which delegates to many visitors to run in\n * parallel. Each visitor will be visited for each node before moving on.\n *\n * If a prior visitor edits a node, no following visitors will see that node.\n */\n\nexport function visitInParallel(visitors) {\n const skipping = new Array(visitors.length).fill(null);\n const mergedVisitor = Object.create(null);\n\n for (const kind of Object.values(Kind)) {\n let hasVisitor = false;\n const enterList = new Array(visitors.length).fill(undefined);\n const leaveList = new Array(visitors.length).fill(undefined);\n\n for (let i = 0; i < visitors.length; ++i) {\n const { enter, leave } = getEnterLeaveForKind(visitors[i], kind);\n hasVisitor || (hasVisitor = enter != null || leave != null);\n enterList[i] = enter;\n leaveList[i] = leave;\n }\n\n if (!hasVisitor) {\n continue;\n }\n\n const mergedEnterLeave = {\n enter(...args) {\n const node = args[0];\n\n for (let i = 0; i < visitors.length; i++) {\n if (skipping[i] === null) {\n var _enterList$i;\n\n const result =\n (_enterList$i = enterList[i]) === null || _enterList$i === void 0\n ? void 0\n : _enterList$i.apply(visitors[i], args);\n\n if (result === false) {\n skipping[i] = node;\n } else if (result === BREAK) {\n skipping[i] = BREAK;\n } else if (result !== undefined) {\n return result;\n }\n }\n }\n },\n\n leave(...args) {\n const node = args[0];\n\n for (let i = 0; i < visitors.length; i++) {\n if (skipping[i] === null) {\n var _leaveList$i;\n\n const result =\n (_leaveList$i = leaveList[i]) === null || _leaveList$i === void 0\n ? void 0\n : _leaveList$i.apply(visitors[i], args);\n\n if (result === BREAK) {\n skipping[i] = BREAK;\n } else if (result !== undefined && result !== false) {\n return result;\n }\n } else if (skipping[i] === node) {\n skipping[i] = null;\n }\n }\n },\n };\n mergedVisitor[kind] = mergedEnterLeave;\n }\n\n return mergedVisitor;\n}\n/**\n * Given a visitor instance and a node kind, return EnterLeaveVisitor for that kind.\n */\n\nexport function getEnterLeaveForKind(visitor, kind) {\n const kindVisitor = visitor[kind];\n\n if (typeof kindVisitor === 'object') {\n // { Kind: { enter() {}, leave() {} } }\n return kindVisitor;\n } else if (typeof kindVisitor === 'function') {\n // { Kind() {} }\n return {\n enter: kindVisitor,\n leave: undefined,\n };\n } // { enter() {}, leave() {} }\n\n return {\n enter: visitor.enter,\n leave: visitor.leave,\n };\n}\n/**\n * Given a visitor instance, if it is leaving or not, and a node kind, return\n * the function the visitor runtime should call.\n *\n * @deprecated Please use `getEnterLeaveForKind` instead. Will be removed in v17\n */\n\n/* c8 ignore next 8 */\n\nexport function getVisitFn(visitor, kind, isLeaving) {\n const { enter, leave } = getEnterLeaveForKind(visitor, kind);\n return isLeaving ? leave : enter;\n}\n","import { printBlockString } from './blockString.mjs';\nimport { printString } from './printString.mjs';\nimport { visit } from './visitor.mjs';\n/**\n * Converts an AST into a string, using one set of reasonable\n * formatting rules.\n */\n\nexport function print(ast) {\n return visit(ast, printDocASTReducer);\n}\nconst MAX_LINE_LENGTH = 80;\nconst printDocASTReducer = {\n Name: {\n leave: (node) => node.value,\n },\n Variable: {\n leave: (node) => '$' + node.name,\n },\n // Document\n Document: {\n leave: (node) => join(node.definitions, '\\n\\n'),\n },\n OperationDefinition: {\n leave(node) {\n const varDefs = wrap('(', join(node.variableDefinitions, ', '), ')');\n const prefix = join(\n [\n node.operation,\n join([node.name, varDefs]),\n join(node.directives, ' '),\n ],\n ' ',\n ); // Anonymous queries with no directives or variable definitions can use\n // the query short form.\n\n return (prefix === 'query' ? '' : prefix + ' ') + node.selectionSet;\n },\n },\n VariableDefinition: {\n leave: ({ variable, type, defaultValue, directives }) =>\n variable +\n ': ' +\n type +\n wrap(' = ', defaultValue) +\n wrap(' ', join(directives, ' ')),\n },\n SelectionSet: {\n leave: ({ selections }) => block(selections),\n },\n Field: {\n leave({ alias, name, arguments: args, directives, selectionSet }) {\n const prefix = wrap('', alias, ': ') + name;\n let argsLine = prefix + wrap('(', join(args, ', '), ')');\n\n if (argsLine.length > MAX_LINE_LENGTH) {\n argsLine = prefix + wrap('(\\n', indent(join(args, '\\n')), '\\n)');\n }\n\n return join([argsLine, join(directives, ' '), selectionSet], ' ');\n },\n },\n Argument: {\n leave: ({ name, value }) => name + ': ' + value,\n },\n // Fragments\n FragmentSpread: {\n leave: ({ name, directives }) =>\n '...' + name + wrap(' ', join(directives, ' ')),\n },\n InlineFragment: {\n leave: ({ typeCondition, directives, selectionSet }) =>\n join(\n [\n '...',\n wrap('on ', typeCondition),\n join(directives, ' '),\n selectionSet,\n ],\n ' ',\n ),\n },\n FragmentDefinition: {\n leave: (\n { name, typeCondition, variableDefinitions, directives, selectionSet }, // Note: fragment variable definitions are experimental and may be changed\n ) =>\n // or removed in the future.\n `fragment ${name}${wrap('(', join(variableDefinitions, ', '), ')')} ` +\n `on ${typeCondition} ${wrap('', join(directives, ' '), ' ')}` +\n selectionSet,\n },\n // Value\n IntValue: {\n leave: ({ value }) => value,\n },\n FloatValue: {\n leave: ({ value }) => value,\n },\n StringValue: {\n leave: ({ value, block: isBlockString }) =>\n isBlockString ? printBlockString(value) : printString(value),\n },\n BooleanValue: {\n leave: ({ value }) => (value ? 'true' : 'false'),\n },\n NullValue: {\n leave: () => 'null',\n },\n EnumValue: {\n leave: ({ value }) => value,\n },\n ListValue: {\n leave: ({ values }) => '[' + join(values, ', ') + ']',\n },\n ObjectValue: {\n leave: ({ fields }) => '{' + join(fields, ', ') + '}',\n },\n ObjectField: {\n leave: ({ name, value }) => name + ': ' + value,\n },\n // Directive\n Directive: {\n leave: ({ name, arguments: args }) =>\n '@' + name + wrap('(', join(args, ', '), ')'),\n },\n // Type\n NamedType: {\n leave: ({ name }) => name,\n },\n ListType: {\n leave: ({ type }) => '[' + type + ']',\n },\n NonNullType: {\n leave: ({ type }) => type + '!',\n },\n // Type System Definitions\n SchemaDefinition: {\n leave: ({ description, directives, operationTypes }) =>\n wrap('', description, '\\n') +\n join(['schema', join(directives, ' '), block(operationTypes)], ' '),\n },\n OperationTypeDefinition: {\n leave: ({ operation, type }) => operation + ': ' + type,\n },\n ScalarTypeDefinition: {\n leave: ({ description, name, directives }) =>\n wrap('', description, '\\n') +\n join(['scalar', name, join(directives, ' ')], ' '),\n },\n ObjectTypeDefinition: {\n leave: ({ description, name, interfaces, directives, fields }) =>\n wrap('', description, '\\n') +\n join(\n [\n 'type',\n name,\n wrap('implements ', join(interfaces, ' & ')),\n join(directives, ' '),\n block(fields),\n ],\n ' ',\n ),\n },\n FieldDefinition: {\n leave: ({ description, name, arguments: args, type, directives }) =>\n wrap('', description, '\\n') +\n name +\n (hasMultilineItems(args)\n ? wrap('(\\n', indent(join(args, '\\n')), '\\n)')\n : wrap('(', join(args, ', '), ')')) +\n ': ' +\n type +\n wrap(' ', join(directives, ' ')),\n },\n InputValueDefinition: {\n leave: ({ description, name, type, defaultValue, directives }) =>\n wrap('', description, '\\n') +\n join(\n [name + ': ' + type, wrap('= ', defaultValue), join(directives, ' ')],\n ' ',\n ),\n },\n InterfaceTypeDefinition: {\n leave: ({ description, name, interfaces, directives, fields }) =>\n wrap('', description, '\\n') +\n join(\n [\n 'interface',\n name,\n wrap('implements ', join(interfaces, ' & ')),\n join(directives, ' '),\n block(fields),\n ],\n ' ',\n ),\n },\n UnionTypeDefinition: {\n leave: ({ description, name, directives, types }) =>\n wrap('', description, '\\n') +\n join(\n ['union', name, join(directives, ' '), wrap('= ', join(types, ' | '))],\n ' ',\n ),\n },\n EnumTypeDefinition: {\n leave: ({ description, name, directives, values }) =>\n wrap('', description, '\\n') +\n join(['enum', name, join(directives, ' '), block(values)], ' '),\n },\n EnumValueDefinition: {\n leave: ({ description, name, directives }) =>\n wrap('', description, '\\n') + join([name, join(directives, ' ')], ' '),\n },\n InputObjectTypeDefinition: {\n leave: ({ description, name, directives, fields }) =>\n wrap('', description, '\\n') +\n join(['input', name, join(directives, ' '), block(fields)], ' '),\n },\n DirectiveDefinition: {\n leave: ({ description, name, arguments: args, repeatable, locations }) =>\n wrap('', description, '\\n') +\n 'directive @' +\n name +\n (hasMultilineItems(args)\n ? wrap('(\\n', indent(join(args, '\\n')), '\\n)')\n : wrap('(', join(args, ', '), ')')) +\n (repeatable ? ' repeatable' : '') +\n ' on ' +\n join(locations, ' | '),\n },\n SchemaExtension: {\n leave: ({ directives, operationTypes }) =>\n join(\n ['extend schema', join(directives, ' '), block(operationTypes)],\n ' ',\n ),\n },\n ScalarTypeExtension: {\n leave: ({ name, directives }) =>\n join(['extend scalar', name, join(directives, ' ')], ' '),\n },\n ObjectTypeExtension: {\n leave: ({ name, interfaces, directives, fields }) =>\n join(\n [\n 'extend type',\n name,\n wrap('implements ', join(interfaces, ' & ')),\n join(directives, ' '),\n block(fields),\n ],\n ' ',\n ),\n },\n InterfaceTypeExtension: {\n leave: ({ name, interfaces, directives, fields }) =>\n join(\n [\n 'extend interface',\n name,\n wrap('implements ', join(interfaces, ' & ')),\n join(directives, ' '),\n block(fields),\n ],\n ' ',\n ),\n },\n UnionTypeExtension: {\n leave: ({ name, directives, types }) =>\n join(\n [\n 'extend union',\n name,\n join(directives, ' '),\n wrap('= ', join(types, ' | ')),\n ],\n ' ',\n ),\n },\n EnumTypeExtension: {\n leave: ({ name, directives, values }) =>\n join(['extend enum', name, join(directives, ' '), block(values)], ' '),\n },\n InputObjectTypeExtension: {\n leave: ({ name, directives, fields }) =>\n join(['extend input', name, join(directives, ' '), block(fields)], ' '),\n },\n};\n/**\n * Given maybeArray, print an empty string if it is null or empty, otherwise\n * print all items together separated by separator if provided\n */\n\nfunction join(maybeArray, separator = '') {\n var _maybeArray$filter$jo;\n\n return (_maybeArray$filter$jo =\n maybeArray === null || maybeArray === void 0\n ? void 0\n : maybeArray.filter((x) => x).join(separator)) !== null &&\n _maybeArray$filter$jo !== void 0\n ? _maybeArray$filter$jo\n : '';\n}\n/**\n * Given array, print each item on its own line, wrapped in an indented `{ }` block.\n */\n\nfunction block(array) {\n return wrap('{\\n', indent(join(array, '\\n')), '\\n}');\n}\n/**\n * If maybeString is not null or empty, then wrap with start and end, otherwise print an empty string.\n */\n\nfunction wrap(start, maybeString, end = '') {\n return maybeString != null && maybeString !== ''\n ? start + maybeString + end\n : '';\n}\n\nfunction indent(str) {\n return wrap(' ', str.replace(/\\n/g, '\\n '));\n}\n\nfunction hasMultilineItems(maybeArray) {\n var _maybeArray$some;\n\n // FIXME: https://github.com/graphql/graphql-js/issues/2203\n\n /* c8 ignore next */\n return (_maybeArray$some =\n maybeArray === null || maybeArray === void 0\n ? void 0\n : maybeArray.some((str) => str.includes('\\n'))) !== null &&\n _maybeArray$some !== void 0\n ? _maybeArray$some\n : false;\n}\n","export const ACCEPT_HEADER = `Accept`;\nexport const CONTENT_TYPE_HEADER = `Content-Type`;\nexport const CONTENT_TYPE_JSON = `application/json`;\nexport const CONTENT_TYPE_GQL = `application/graphql-response+json`;\nexport const statusCodes = {\n success: 200,\n};\n//# sourceMappingURL=http.js.map","import { Kind } from 'graphql';\nimport { CONTENT_TYPE_GQL, CONTENT_TYPE_JSON } from '../../lib/http.js';\nimport { isPlainObject } from '../../lib/prelude.js';\n/**\n * Clean a GraphQL document to send it via a GET query\n */\nexport const cleanQuery = (str) => str.replace(/([\\s,]|#[^\\n\\r]+)+/g, ` `).trim();\nexport const isGraphQLContentType = (contentType) => {\n const contentTypeLower = contentType.toLowerCase();\n return contentTypeLower.includes(CONTENT_TYPE_GQL) || contentTypeLower.includes(CONTENT_TYPE_JSON);\n};\nexport const parseGraphQLExecutionResult = (result) => {\n try {\n if (Array.isArray(result)) {\n return {\n _tag: `Batch`,\n executionResults: result.map(parseExecutionResult),\n };\n }\n else if (isPlainObject(result)) {\n return {\n _tag: `Single`,\n executionResult: parseExecutionResult(result),\n };\n }\n else {\n throw new Error(`Invalid execution result: result is not object or array. \\nGot:\\n${String(result)}`);\n }\n }\n catch (e) {\n return e;\n }\n};\n/**\n * Example result:\n *\n * ```\n * {\n * \"data\": null,\n * \"errors\": [{\n * \"message\": \"custom error\",\n * \"locations\": [{ \"line\": 2, \"column\": 3 }],\n * \"path\": [\"playerNew\"]\n * }]\n * }\n * ```\n */\nexport const parseExecutionResult = (result) => {\n if (typeof result !== `object` || result === null) {\n throw new Error(`Invalid execution result: result is not object`);\n }\n let errors = undefined;\n let data = undefined;\n let extensions = undefined;\n if (`errors` in result) {\n if (!isPlainObject(result.errors) && !Array.isArray(result.errors)) {\n throw new Error(`Invalid execution result: errors is not plain object OR array`); // prettier-ignore\n }\n errors = result.errors;\n }\n // todo add test coverage for case of null. @see https://github.com/jasonkuhrt/graphql-request/issues/739\n if (`data` in result) {\n if (!isPlainObject(result.data) && result.data !== null) {\n throw new Error(`Invalid execution result: data is not plain object`); // prettier-ignore\n }\n data = result.data;\n }\n if (`extensions` in result) {\n if (!isPlainObject(result.extensions))\n throw new Error(`Invalid execution result: extensions is not plain object`); // prettier-ignore\n extensions = result.extensions;\n }\n return {\n data,\n errors,\n extensions,\n };\n};\nexport const isRequestResultHaveErrors = (result) => result._tag === `Batch`\n ? result.executionResults.some(isExecutionResultHaveErrors)\n : isExecutionResultHaveErrors(result.executionResult);\nexport const isExecutionResultHaveErrors = (result) => Array.isArray(result.errors) ? result.errors.length > 0 : Boolean(result.errors);\nexport const isOperationDefinitionNode = (definition) => {\n return (typeof definition === `object`\n && definition !== null\n && `kind` in definition\n && definition.kind === Kind.OPERATION_DEFINITION);\n};\n//# sourceMappingURL=graphql.js.map","import { tryCatch } from '../../lib/prelude.js';\nimport { isOperationDefinitionNode } from '../lib/graphql.js';\n/**\n * Refactored imports from `graphql` to be more specific, this helps import only the required files (100KiB)\n * instead of the entire package (greater than 500KiB) where tree-shaking is not supported.\n * @see https://github.com/jasonkuhrt/graphql-request/pull/543\n */\nimport { OperationTypeNode } from 'graphql';\nimport { parse } from 'graphql';\nimport { print } from 'graphql';\n/**\n * helpers\n */\nconst extractOperationName = (document) => {\n let operationName = undefined;\n const defs = document.definitions.filter(isOperationDefinitionNode);\n if (defs.length === 1) {\n operationName = defs[0].name?.value;\n }\n return operationName;\n};\nconst extractIsMutation = (document) => {\n let isMutation = false;\n const defs = document.definitions.filter(isOperationDefinitionNode);\n if (defs.length === 1) {\n isMutation = defs[0].operation === OperationTypeNode.MUTATION;\n }\n return isMutation;\n};\nexport const analyzeDocument = (document, excludeOperationName) => {\n const expression = typeof document === `string` ? document : print(document);\n let isMutation = false;\n let operationName = undefined;\n if (excludeOperationName) {\n return { expression, isMutation, operationName };\n }\n const docNode = tryCatch(() => (typeof document === `string` ? parse(document) : document));\n if (docNode instanceof Error) {\n return { expression, isMutation, operationName };\n }\n operationName = extractOperationName(docNode);\n isMutation = extractIsMutation(docNode);\n return { expression, operationName, isMutation };\n};\n//# sourceMappingURL=analyzeDocument.js.map","export const defaultJsonSerializer = JSON;\n//# sourceMappingURL=defaultJsonSerializer.js.map","import { ACCEPT_HEADER, CONTENT_TYPE_GQL, CONTENT_TYPE_HEADER, CONTENT_TYPE_JSON } from '../../lib/http.js';\nimport { casesExhausted, uppercase, zip } from '../../lib/prelude.js';\nimport { ClientError } from '../classes/ClientError.js';\nimport { cleanQuery, isGraphQLContentType, isRequestResultHaveErrors, parseGraphQLExecutionResult, } from '../lib/graphql.js';\nimport { defaultJsonSerializer } from './defaultJsonSerializer.js';\n// @ts-expect-error todo\nexport const runRequest = async (input) => {\n // todo make a Config type\n const config = {\n ...input,\n method: input.request._tag === `Single`\n ? input.request.document.isMutation\n ? `POST`\n : uppercase(input.method ?? `post`)\n : input.request.hasMutations\n ? `POST`\n : uppercase(input.method ?? `post`),\n fetchOptions: {\n ...input.fetchOptions,\n errorPolicy: input.fetchOptions.errorPolicy ?? `none`,\n },\n };\n const fetcher = createFetcher(config.method);\n const fetchResponse = await fetcher(config);\n if (!fetchResponse.ok) {\n return new ClientError({ status: fetchResponse.status, headers: fetchResponse.headers }, {\n query: input.request._tag === `Single` ? input.request.document.expression : input.request.query,\n variables: input.request.variables,\n });\n }\n const result = await parseResultFromResponse(fetchResponse, input.fetchOptions.jsonSerializer ?? defaultJsonSerializer);\n if (result instanceof Error)\n throw result; // todo something better\n const clientResponseBase = {\n status: fetchResponse.status,\n headers: fetchResponse.headers,\n };\n if (isRequestResultHaveErrors(result) && config.fetchOptions.errorPolicy === `none`) {\n // todo this client response on error is not consistent with the data type for success\n const clientResponse = result._tag === `Batch`\n ? { ...result.executionResults, ...clientResponseBase }\n : {\n ...result.executionResult,\n ...clientResponseBase,\n };\n // @ts-expect-error todo\n return new ClientError(clientResponse, {\n query: input.request._tag === `Single` ? input.request.document.expression : input.request.query,\n variables: input.request.variables,\n });\n }\n switch (result._tag) {\n case `Single`:\n // @ts-expect-error todo\n return {\n ...clientResponseBase,\n ...executionResultClientResponseFields(config)(result.executionResult),\n };\n case `Batch`:\n return {\n ...clientResponseBase,\n data: result.executionResults.map(executionResultClientResponseFields(config)),\n };\n default:\n casesExhausted(result);\n }\n};\nconst executionResultClientResponseFields = ($params) => (executionResult) => {\n return {\n extensions: executionResult.extensions,\n data: executionResult.data,\n errors: $params.fetchOptions.errorPolicy === `all` ? executionResult.errors : undefined,\n };\n};\nconst parseResultFromResponse = async (response, jsonSerializer) => {\n const contentType = response.headers.get(CONTENT_TYPE_HEADER);\n const text = await response.text();\n if (contentType && isGraphQLContentType(contentType)) {\n return parseGraphQLExecutionResult(jsonSerializer.parse(text));\n }\n else {\n // todo what is this good for...? Seems very random/undefined\n return parseGraphQLExecutionResult(text);\n }\n};\nconst createFetcher = (method) => async (params) => {\n const headers = new Headers(params.headers);\n let searchParams = null;\n let body = undefined;\n if (!headers.has(ACCEPT_HEADER)) {\n headers.set(ACCEPT_HEADER, [CONTENT_TYPE_GQL, CONTENT_TYPE_JSON].join(`, `));\n }\n if (method === `POST`) {\n const $jsonSerializer = params.fetchOptions.jsonSerializer ?? defaultJsonSerializer;\n body = $jsonSerializer.stringify(buildBody(params));\n if (typeof body === `string` && !headers.has(CONTENT_TYPE_HEADER)) {\n headers.set(CONTENT_TYPE_HEADER, CONTENT_TYPE_JSON);\n }\n }\n else {\n searchParams = buildQueryParams(params);\n }\n const init = { method, headers, body, ...params.fetchOptions };\n let url = new URL(params.url);\n let initResolved = init;\n if (params.middleware) {\n const result = await Promise.resolve(params.middleware({\n ...init,\n url: params.url,\n operationName: params.request._tag === `Single` ? params.request.document.operationName : undefined,\n variables: params.request.variables,\n }));\n const { url: urlNew, ...initNew } = result;\n url = new URL(urlNew);\n initResolved = initNew;\n }\n if (searchParams) {\n searchParams.forEach((value, name) => {\n url.searchParams.append(name, value);\n });\n }\n const $fetch = params.fetch ?? fetch;\n return await $fetch(url, initResolved);\n};\nconst buildBody = (params) => {\n switch (params.request._tag) {\n case `Single`:\n return {\n query: params.request.document.expression,\n variables: params.request.variables,\n operationName: params.request.document.operationName,\n };\n case `Batch`:\n return zip(params.request.query, params.request.variables ?? []).map(([query, variables]) => ({\n query,\n variables,\n }));\n default:\n throw casesExhausted(params.request);\n }\n};\nconst buildQueryParams = (params) => {\n const $jsonSerializer = params.fetchOptions.jsonSerializer ?? defaultJsonSerializer;\n const searchParams = new URLSearchParams();\n switch (params.request._tag) {\n case `Single`: {\n searchParams.append(`query`, cleanQuery(params.request.document.expression));\n if (params.request.variables) {\n searchParams.append(`variables`, $jsonSerializer.stringify(params.request.variables));\n }\n if (params.request.document.operationName) {\n searchParams.append(`operationName`, params.request.document.operationName);\n }\n return searchParams;\n }\n case `Batch`: {\n const variablesSerialized = params.request.variables?.map((v) => $jsonSerializer.stringify(v)) ?? [];\n const queriesCleaned = params.request.query.map(cleanQuery);\n const payload = zip(queriesCleaned, variablesSerialized).map(([query, variables]) => ({\n query,\n variables,\n }));\n searchParams.append(`query`, $jsonSerializer.stringify(payload));\n return searchParams;\n }\n default:\n throw casesExhausted(params.request);\n }\n};\n//# sourceMappingURL=runRequest.js.map","import { callOrIdentity, HeadersInitToPlainObject } from '../../lib/prelude.js';\nimport { parseBatchRequestArgs } from '../functions/batchRequests.js';\nimport { parseRawRequestArgs } from '../functions/rawRequest.js';\nimport { parseRequestArgs } from '../functions/request.js';\nimport { analyzeDocument } from '../helpers/analyzeDocument.js';\nimport { runRequest } from '../helpers/runRequest.js';\n/**\n * GraphQL Client.\n */\nexport class GraphQLClient {\n url;\n requestConfig;\n constructor(url, requestConfig = {}) {\n this.url = url;\n this.requestConfig = requestConfig;\n }\n /**\n * Send a GraphQL query to the server.\n */\n rawRequest = async (...args) => {\n const [queryOrOptions, variables, requestHeaders] = args;\n const rawRequestOptions = parseRawRequestArgs(queryOrOptions, variables, requestHeaders);\n const { headers, fetch = globalThis.fetch, method = `POST`, requestMiddleware, responseMiddleware, excludeOperationName, ...fetchOptions } = this.requestConfig;\n const { url } = this;\n if (rawRequestOptions.signal !== undefined) {\n fetchOptions.signal = rawRequestOptions.signal;\n }\n const document = analyzeDocument(rawRequestOptions.query, excludeOperationName);\n const response = await runRequest({\n url,\n request: {\n _tag: `Single`,\n document,\n variables: rawRequestOptions.variables,\n },\n headers: {\n ...HeadersInitToPlainObject(callOrIdentity(headers)),\n ...HeadersInitToPlainObject(rawRequestOptions.requestHeaders),\n },\n fetch,\n method,\n fetchOptions,\n middleware: requestMiddleware,\n });\n if (responseMiddleware) {\n await responseMiddleware(response, {\n operationName: document.operationName,\n variables,\n url: this.url,\n });\n }\n if (response instanceof Error) {\n throw response;\n }\n return response;\n };\n async request(documentOrOptions, ...variablesAndRequestHeaders) {\n const [variables, requestHeaders] = variablesAndRequestHeaders;\n const requestOptions = parseRequestArgs(documentOrOptions, variables, requestHeaders);\n const { headers, fetch = globalThis.fetch, method = `POST`, requestMiddleware, responseMiddleware, excludeOperationName, ...fetchOptions } = this.requestConfig;\n const { url } = this;\n if (requestOptions.signal !== undefined) {\n fetchOptions.signal = requestOptions.signal;\n }\n const analyzedDocument = analyzeDocument(requestOptions.document, excludeOperationName);\n const response = await runRequest({\n url,\n request: {\n _tag: `Single`,\n document: analyzedDocument,\n variables: requestOptions.variables,\n },\n headers: {\n ...HeadersInitToPlainObject(callOrIdentity(headers)),\n ...HeadersInitToPlainObject(requestOptions.requestHeaders),\n },\n fetch,\n method,\n fetchOptions,\n middleware: requestMiddleware,\n });\n if (responseMiddleware) {\n await responseMiddleware(response, {\n operationName: analyzedDocument.operationName,\n variables: requestOptions.variables,\n url: this.url,\n });\n }\n if (response instanceof Error) {\n throw response;\n }\n return response.data;\n }\n async batchRequests(documentsOrOptions, requestHeaders) {\n const batchRequestOptions = parseBatchRequestArgs(documentsOrOptions, requestHeaders);\n const { headers, excludeOperationName, ...fetchOptions } = this.requestConfig;\n if (batchRequestOptions.signal !== undefined) {\n fetchOptions.signal = batchRequestOptions.signal;\n }\n const analyzedDocuments = batchRequestOptions.documents.map(({ document }) => analyzeDocument(document, excludeOperationName));\n const expressions = analyzedDocuments.map(({ expression }) => expression);\n const hasMutations = analyzedDocuments.some(({ isMutation }) => isMutation);\n const variables = batchRequestOptions.documents.map(({ variables }) => variables);\n const response = await runRequest({\n url: this.url,\n request: {\n _tag: `Batch`,\n operationName: undefined,\n query: expressions,\n hasMutations,\n variables,\n },\n headers: {\n ...HeadersInitToPlainObject(callOrIdentity(headers)),\n ...HeadersInitToPlainObject(batchRequestOptions.requestHeaders),\n },\n fetch: this.requestConfig.fetch ?? globalThis.fetch,\n method: this.requestConfig.method || `POST`,\n fetchOptions,\n middleware: this.requestConfig.requestMiddleware,\n });\n if (this.requestConfig.responseMiddleware) {\n await this.requestConfig.responseMiddleware(response, {\n operationName: undefined,\n variables,\n url: this.url,\n });\n }\n if (response instanceof Error) {\n throw response;\n }\n return response.data;\n }\n setHeaders(headers) {\n this.requestConfig.headers = headers;\n return this;\n }\n /**\n * Attach a header to the client. All subsequent requests will have this header.\n */\n setHeader(key, value) {\n const { headers } = this.requestConfig;\n if (headers) {\n // todo what if headers is in nested array form... ?\n // @ts-expect-error todo\n headers[key] = value;\n }\n else {\n this.requestConfig.headers = { [key]: value };\n }\n return this;\n }\n /**\n * Change the client endpoint. All subsequent requests will send to this endpoint.\n */\n setEndpoint(value) {\n this.url = value;\n return this;\n }\n}\n//# sourceMappingURL=GraphQLClient.js.map","import { GraphQLClient } from '../classes/GraphQLClient.js';\n/**\n * Send a GraphQL Query to the GraphQL server for execution.\n */\nexport const rawRequest = async (...args) => {\n const [urlOrOptions, query, ...variablesAndRequestHeaders] = args;\n const requestOptions = parseRawRequestExtendedArgs(urlOrOptions, query, ...variablesAndRequestHeaders);\n const client = new GraphQLClient(requestOptions.url);\n return client.rawRequest({\n ...requestOptions,\n });\n};\nexport const parseRawRequestExtendedArgs = (urlOrOptions, query, ...variablesAndRequestHeaders) => {\n const [variables, requestHeaders] = variablesAndRequestHeaders;\n return typeof urlOrOptions === `string`\n ? {\n url: urlOrOptions,\n query: query,\n variables,\n requestHeaders,\n signal: undefined,\n }\n : urlOrOptions;\n};\nexport const parseRawRequestArgs = (queryOrOptions, variables, requestHeaders) => {\n return queryOrOptions.query\n ? queryOrOptions\n : {\n query: queryOrOptions,\n variables: variables,\n requestHeaders: requestHeaders,\n signal: undefined,\n };\n};\n//# sourceMappingURL=rawRequest.js.map","import { GraphQLClient } from '../classes/GraphQLClient.js';\n/**\n * Send a batch of GraphQL Document to the GraphQL server for execution.\n *\n * @example\n *\n * ```ts\n * // You can pass a raw string\n *\n * await batchRequests('https://foo.bar/graphql', [\n * {\n * query: `\n * {\n * query {\n * users\n * }\n * }`\n * },\n * {\n * query: `\n * {\n * query {\n * users\n * }\n * }`\n * }])\n *\n * // You can also pass a GraphQL DocumentNode as query. Convenient if you\n * // are using graphql-tag package.\n *\n * import gql from 'graphql-tag'\n *\n * await batchRequests('https://foo.bar/graphql', [{ query: gql`...` }])\n * ```\n */\nexport const batchRequests = async (...args) => {\n const params = parseBatchRequestsArgsExtended(args);\n const client = new GraphQLClient(params.url);\n return client.batchRequests(params);\n};\nexport const parseBatchRequestsArgsExtended = (args) => {\n if (args.length === 1) {\n return args[0];\n }\n else {\n return {\n url: args[0],\n documents: args[1],\n requestHeaders: args[2],\n signal: undefined,\n };\n }\n};\nexport const parseBatchRequestArgs = (documentsOrOptions, requestHeaders) => {\n // eslint-disable-next-line\n return documentsOrOptions.documents\n ? documentsOrOptions\n : {\n documents: documentsOrOptions,\n requestHeaders: requestHeaders,\n signal: undefined,\n };\n};\n//# sourceMappingURL=batchRequests.js.map","import { GraphQLClient } from '../classes/GraphQLClient.js';\n// dprint-ignore\n// eslint-disable-next-line\nexport async function request(urlOrOptions, document, ...variablesAndRequestHeaders) {\n const requestOptions = parseRequestExtendedArgs(urlOrOptions, document, ...variablesAndRequestHeaders);\n const client = new GraphQLClient(requestOptions.url);\n return client.request({\n ...requestOptions,\n });\n}\nexport const parseRequestArgs = (documentOrOptions, variables, requestHeaders) => {\n return documentOrOptions.document\n ? documentOrOptions\n : {\n document: documentOrOptions,\n variables: variables,\n requestHeaders: requestHeaders,\n signal: undefined,\n };\n};\nexport const parseRequestExtendedArgs = (urlOrOptions, document, ...variablesAndRequestHeaders) => {\n const [variables, requestHeaders] = variablesAndRequestHeaders;\n return typeof urlOrOptions === `string`\n ? {\n url: urlOrOptions,\n document: document,\n variables,\n requestHeaders,\n signal: undefined,\n }\n : urlOrOptions;\n};\n//# sourceMappingURL=request.js.map","export var AuthorizationStyle;\n(function (AuthorizationStyle) {\n AuthorizationStyle[\"TokenRequired\"] = \"TokenRequired\";\n AuthorizationStyle[\"AlwaysAnonymous\"] = \"AlwaysAnonymous\";\n AuthorizationStyle[\"AnonymousIfNoTokenAvailable\"] = \"AnonymousIfNoTokenAvailable\";\n})(AuthorizationStyle || (AuthorizationStyle = {}));\n//# sourceMappingURL=authorization-style.js.map","import { DefaultGraphqlRatchetErrorHandler } from \"./provider/default-graphql-ratchet-error-handler.js\";\nimport { RequireRatchet } from \"@bitblit/ratchet-common/lang/require-ratchet\";\nimport { Logger } from \"@bitblit/ratchet-common/logger/logger\";\nimport { ErrorRatchet } from \"@bitblit/ratchet-common/lang/error-ratchet\";\nimport { StringRatchet } from \"@bitblit/ratchet-common/lang/string-ratchet\";\nimport { GraphQLClient } from \"graphql-request\";\nimport { AuthorizationStyle } from \"./authorization-style\";\nexport class GraphqlRatchet {\n queryProvider;\n endpointProvider;\n jwtTokenProvider;\n errorHandler;\n clientCache = new Map();\n noAuthClient;\n cachedEndpoint;\n constructor(queryProvider, endpointProvider, jwtTokenProvider, errorHandler = new DefaultGraphqlRatchetErrorHandler()) {\n this.queryProvider = queryProvider;\n this.endpointProvider = endpointProvider;\n this.jwtTokenProvider = jwtTokenProvider;\n this.errorHandler = errorHandler;\n RequireRatchet.notNullOrUndefined(queryProvider, 'queryProvider');\n RequireRatchet.notNullOrUndefined(endpointProvider, 'endpointProvider');\n RequireRatchet.notNullOrUndefined(errorHandler, 'errorHandler');\n this.cachedEndpoint = this.endpointProvider.fetchGraphqlEndpoint();\n }\n currentAuthToken() {\n return this?.jwtTokenProvider?.fetchJwtToken();\n }\n async fetchQueryText(qry) {\n const text = await this.queryProvider.fetchQueryText(qry);\n if (!text) {\n Logger.warn('Could not find requested query : %s', qry);\n }\n return text;\n }\n createAnonymousApi() {\n Logger.info('Creating anonymous GraphQLClient');\n const rval = new GraphQLClient(this.cachedEndpoint, { errorPolicy: 'all' });\n return rval;\n }\n fetchApi(authStyle) {\n let rval = null;\n const jwtToken = authStyle === AuthorizationStyle.AlwaysAnonymous ? null : StringRatchet.trimToNull(this?.jwtTokenProvider?.fetchJwtToken());\n if (authStyle === AuthorizationStyle.TokenRequired && !jwtToken) {\n throw ErrorRatchet.fErr('No token provided, auth style is TokenRequired');\n }\n this.checkIfEndpointChanged();\n Logger.info('Fetch auth client %s', StringRatchet.obscure(StringRatchet.trimToEmpty(jwtToken), 2, 2));\n if (jwtToken) {\n Logger.debug('Fetching authd api');\n if (!this.clientCache.has(jwtToken)) {\n const newValue = this.createAuthApi(jwtToken);\n Logger.debug('Setting cache for this token to %s', newValue);\n this.clientCache.set(jwtToken, newValue);\n }\n else {\n Logger.debug('Fetching apollo client from cache');\n }\n rval = this.clientCache.get(jwtToken);\n }\n else {\n Logger.debug('Fetching unauthd ap');\n if (!this.noAuthClient) {\n this.noAuthClient = this.createAnonymousApi();\n }\n else {\n Logger.debug('Fetching anonymous client from cache');\n }\n rval = this.noAuthClient;\n }\n Logger.debug('FetchApi returning %s', rval);\n return rval;\n }\n createAuthApi(jwtToken) {\n Logger.info('Creating a new authenticated api for %s : %s', this.cachedEndpoint, StringRatchet.obscure(jwtToken, 2, 2));\n RequireRatchet.notNullUndefinedOrOnlyWhitespaceString(jwtToken, 'jwtToken');\n Logger.info('Creating auth apollo client %s', StringRatchet.obscure(jwtToken, 2, 2));\n const rval = new GraphQLClient(this.cachedEndpoint, { errorPolicy: 'all', headers: { authorization: `Bearer ${jwtToken}` } });\n return rval;\n }\n checkIfEndpointChanged() {\n const check = this.endpointProvider.fetchGraphqlEndpoint();\n if (check !== this.cachedEndpoint) {\n Logger.info('Endpoint changed from %s to %s - clearing apollo caches');\n this.clientCache = new Map();\n this.noAuthClient = null;\n this.cachedEndpoint = check;\n }\n }\n clearCaches() {\n Logger.info('Clearing cached apollo');\n this.clientCache = new Map();\n this.noAuthClient = null;\n this.cachedEndpoint = null;\n }\n static extractSingleValueFromResponse(data) {\n if (!data) {\n throw ErrorRatchet.fErr('Could not find response in : %j', data);\n }\n const keys = Object.keys(data);\n if (keys.length !== 1) {\n ErrorRatchet.throwFormattedErr('Unexpected number of keys : %s : %j', keys.length, keys);\n }\n const rval = data[keys[0]];\n return rval;\n }\n async executeQuery(queryName, variables, authStyle = AuthorizationStyle.TokenRequired) {\n let rval = null;\n try {\n const api = this.fetchApi(authStyle);\n if (api) {\n Logger.debug('API fetched for %s, fetching gql', queryName);\n const gql = await this.fetchQueryText(queryName);\n Logger.debug('API and GQL fetched for %s - running %s %s', queryName, gql, api);\n const newValues = await api.request(gql, variables);\n rval = GraphqlRatchet.extractSingleValueFromResponse(newValues);\n Logger.silly('Query returned: %j', rval);\n }\n else {\n ErrorRatchet.throwFormattedErr('Cannot run - no api fetched');\n }\n }\n catch (err) {\n Logger.silly('Exception caught in executeQuery : %s %s %j %s', err, queryName, variables, authStyle, err);\n this.errorHandler.handleError(err, queryName, variables, authStyle);\n }\n return rval;\n }\n async executeMutate(queryName, variables, authStyle = AuthorizationStyle.TokenRequired) {\n Logger.info('Mutate : %s : %j', queryName, variables);\n let rval = null;\n const api = this.fetchApi(authStyle);\n try {\n if (api) {\n const gql = await this.fetchQueryText(queryName);\n Logger.debug('API and GQL fetched for %s - running %s %s', queryName, gql, api);\n const newValues = await api.request(gql, variables);\n rval = GraphqlRatchet.extractSingleValueFromResponse(newValues);\n Logger.silly('Mutate returned: %j', rval);\n }\n else {\n ErrorRatchet.throwFormattedErr('Cannot run - no api fetched');\n }\n }\n catch (err) {\n this.errorHandler.handleError(err, queryName, variables, authStyle);\n }\n return rval;\n }\n}\n//# sourceMappingURL=graphql-ratchet.js.map","import { Injectable } from '@angular/core';\nimport { Logger } from '@bitblit/ratchet-common/logger/logger';\n\n\nexport function storageFinder(): Storage | null {\n if (typeof window !== 'undefined') {\n if (typeof window.localStorage !=='undefined') {\n return window.localStorage;\n }\n }\n return null;\n}\n\n@Injectable({providedIn: 'root'})\nexport class LocalStorageService<T> {\n private static readonly APP_NAME: string = 'Scribe';\n\n public get storageReady(): boolean {\n return !!storageFinder();\n }\n\n public clear(): void {\n this.update({ } as T );\n }\n\n public update(value: T): T {\n if (this.storageReady) {\n const toSave: T = value || ({} as T);\n const saveString: string = JSON.stringify(toSave);\n Logger.info('Updating storage to %s', saveString);\n localStorage.setItem(LocalStorageService.APP_NAME, saveString);\n return toSave;\n } else {\n Logger.info('Skipping update - storage not ready : %j', value);\n return {} as T;\n }\n }\n\n fetch(): T {\n if (this.storageReady) {\n const loadString: string = localStorage.getItem(LocalStorageService.APP_NAME) || '{}';\n const rval: T = JSON.parse(loadString) as T;\n return rval;\n } else {\n Logger.info('Skipping fetch - storage not ready');\n return {} as T;\n }\n }\n\n}\n","import { Injectable } from '@angular/core';\nimport { DialogService } from 'primeng/dynamicdialog';\nimport { MessageService } from 'primeng/api';\nimport { Logger } from '@bitblit/ratchet-common/logger/logger';\nimport { GraphqlRatchet } from '@bitblit/ratchet-graphql/graphql/graphql-ratchet';\nimport { BlockUiComponent } from \"../components/dialogs/block-ui/block-ui.component\";\nimport {AuthorizationStyle} from \"@bitblit/ratchet-graphql/graphql/authorization-style\";\n\n@Injectable({providedIn: 'root'})\nexport class GraphqlQueryService {\n constructor(\n private graphqlRatchet: GraphqlRatchet,\n private dialogService: DialogService,\n private messageService: MessageService,\n ) {}\n\n public async executeQuery<T>(queryName: string, variables: any, authStyle: AuthorizationStyle = AuthorizationStyle.TokenRequired\n ): Promise<T | null> {\n let rval: T | null = null;\n this.messageService.add({ severity: 'info', summary: 'Running query', detail: queryName, life: 3000 });\n\n Logger.info('eq: %j -: %s --: %s ---: %j', queryName, variables);\n\n try {\n rval = await this.graphqlRatchet.executeQuery<T>(queryName, variables, authStyle);\n } catch (err) {\n Logger.error('Fail : %s', err);\n } finally {\n this.messageService.clear();\n }\n return rval;\n }\n\n public async executeQueryWithBlock<T>(\n blockMessage: string,\n queryName: string,\n variables: any,\n authStyle: AuthorizationStyle = AuthorizationStyle.TokenRequired\n ): Promise<T | null> {\n let rval: T | null = null;\n this.messageService.add({ severity: 'info', summary: 'Running query', detail: queryName, life: 3000 });\n\n Logger.info('eqb: %j -: %s --: %s ---: %j', blockMessage, queryName, variables);\n\n try {\n rval = await BlockUiComponent.runPromiseWithUiBlock<T>(\n this.dialogService,\n this.graphqlRatchet.executeQuery<T>(queryName, variables, authStyle),\n blockMessage,\n );\n } catch (err) {\n Logger.error('Fail : %s', err);\n } finally {\n this.messageService.clear();\n }\n\n return rval;\n }\n\n\n public async executeMutate<T>(queryName: string, variables: any, authStyle: AuthorizationStyle = AuthorizationStyle.TokenRequired\n ): Promise<T | null> {\n let rval: T | null = null;\n this.messageService.add({ severity: 'info', summary: 'Running query', detail: queryName, life: 3000 });\n\n Logger.info('eq: %j -: %s --: %s ---: %j', queryName, variables);\n\n try {\n rval = await this.graphqlRatchet.executeMutate<T>(queryName, variables, authStyle);\n } catch (err) {\n Logger.error('Fail : %s', err);\n } finally {\n this.messageService.clear();\n }\n\n return rval;\n }\n\n public async executeMutateWithBlock<T>(\n blockMessage: string,\n queryName: string,\n variables: any,\n authStyle: AuthorizationStyle = AuthorizationStyle.TokenRequired\n\n ): Promise<T | null> {\n let rval: T | null = null;\n this.messageService.add({ severity: 'info', summary: 'Running query', detail: queryName, life: 3000 });\n\n try {\n rval = await BlockUiComponent.runPromiseWithUiBlock<T>(\n this.dialogService,\n this.graphqlRatchet.executeMutate<T>(queryName, variables, authStyle),\n blockMessage,\n );\n } catch (err) {\n Logger.error('Fail : %s', err);\n } finally {\n this.messageService.clear();\n }\n\n return rval;\n }\n}\n","import {Injectable} from '@angular/core';\n\n// Taken from https://juristr.com/blog/2016/09/ng2-get-window-ref/\n// Here to make transition to Angular Universal later easier\n\n/* This interface is optional, showing how you can add strong typings for custom globals.\n// Just use \"Window\" as the type if you don't have custom global stuff\nexport interface ICustomWindow extends Window {\n __custom_global_stuff: string;\n} */\n\nfunction getWindow(): any {\n if (typeof window !== 'undefined') {\n return window;\n } else {\n throw new Error('Cannot find window object - running in SSR?');\n }\n}\n\n@Injectable({providedIn: 'root'})\nexport class WindowRefService {\n public nativeWindow(): Window {\n return getWindow();\n }\n}\n","import { BuildInformation } from '@bitblit/ratchet-common/build/build-information';\n\nexport class NgxAcuteCommonInfo {\n // Empty constructor prevents instantiation\n // eslint-disable-next-line @typescript-eslint/no-empty-function\n private constructor() {}\n\n public static buildInformation(): BuildInformation {\n const val: BuildInformation = {\n version: 'LOCAL-SNAPSHOT',\n hash: 'LOCAL-HASH',\n branch: 'LOCAL-BRANCH',\n tag: 'LOCAL-TAG',\n timeBuiltISO: 'LOCAL-TIME-ISO',\n notes: 'LOCAL-NOTES',\n };\n return val;\n }\n}\n"],"names":["AnimationMetadataType","DomHandler","static","addClass","element","className","classList","add","addMultipleClasses","styles","trim","split","i","length","removeClass","remove","replace","RegExp","join","removeMultipleClasses","classNames","flat","filter","Boolean","forEach","cNames","this","hasClass","contains","test","siblings","Array","prototype","call","parentNode","children","child","find","selector","from","querySelectorAll","findSingle","isElement","querySelector","index","childNodes","num","nodeType","indexWithinGroup","attributeName","attributes","appendOverlay","overlay","target","appendTo","appendChild","alignOverlay","calculateMinWidth","style","minWidth","getOuterWidth","relativePosition","absolutePosition","gutter","getClosestRelativeElement","el","getComputedStyle","getPropertyValue","parentElement","elementDimensions","offsetParent","width","offsetWidth","height","offsetHeight","getHiddenElementDimensions","targetHeight","getBoundingClientRect","targetOffset","windowScrollTop","getWindowScrollTop","windowScrollLeft","getWindowScrollLeft","viewport","getViewport","relativeElement","relativeElementOffset","top","left","transformOrigin","horizontalOverflow","targetLeftOffsetInSpaceOfRelativeElement","marginTop","origin","elementOuterHeight","elementOuterWidth","targetOuterHeight","targetOuterWidth","Math","max","getParents","parents","concat","getScrollableParents","scrollableParents","overflowRegex","overflowCheck","node","styleDeclaration","window","parent","scrollSelectors","dataset","selectors","push","getHiddenElementOuterHeight","visibility","display","elementHeight","getHiddenElementOuterWidth","elementWidth","dimensions","scrollInView","container","item","borderTopValue","borderTop","parseFloat","paddingTopValue","paddingTop","containerRect","offset","document","body","scrollTop","scroll","clientHeight","itemHeight","getOuterHeight","fadeIn","duration","opacity","last","Date","tick","getTime","requestAnimationFrame","setTimeout","fadeOut","ms","gap","fading","setInterval","clearInterval","doc","documentElement","pageYOffset","clientTop","pageXOffset","scrollLeft","clientLeft","matches","p","Element","f","webkitMatchesSelector","s","indexOf","margin","marginLeft","marginRight","getHorizontalPadding","paddingLeft","paddingRight","getHorizontalMargin","innerWidth","getInnerHeight","paddingBottom","marginBottom","getHeight","borderTopWidth","borderBottomWidth","getWidth","borderLeftWidth","borderRightWidth","win","d","e","g","getElementsByTagName","clientWidth","innerHeight","getOffset","rect","replaceElementWith","replacementElement","replaceChild","getUserAgent","navigator","isClient","userAgent","isIE","ua","isIOS","isAndroid","isTouchDevice","maxTouchPoints","nativeElement","removeChild","removeElement","obj","HTMLElement","nodeName","calculateScrollbarWidth","calculatedScrollbarWidth","scrollDiv","createElement","scrollbarWidth","calculateScrollbarHeight","calculatedScrollbarHeight","scrollbarHeight","invokeElementMethod","methodName","args","apply","clearSelection","getSelection","empty","removeAllRanges","rangeCount","getRangeAt","getClientRects","error","getBrowser","browser","matched","resolveUserAgent","version","toLowerCase","match","exec","isInteger","value","Number","isFinite","floor","isHidden","isVisible","isExist","focus","options","activeElement","getFocusableSelectorString","getFocusableElements","focusableElements","visibleFocusableElements","focusableElement","computedStyle","getFocusableElement","getFirstFocusableElement","getLastFocusableElement","getNextFocusableElement","reverse","focusedIndex","ownerDocument","generateZIndex","zindex","toString","createRange","text","getTargetElement","nextElementSibling","previousElementSibling","type","hasOwnProperty","undefined","constructor","isFunction","getAttribute","name","isNaN","calculateBodyScrollbarWidth","blockBodyScroll","setProperty","unblockBodyScroll","removeProperty","setAttributes","append","setAttribute","attribute","computedStyles","rule","$attrs","reduce","cv","v","_cv","isArray","Object","entries","map","_k","_v","c","key","matchedEvent","addEventListener","Set","isFocusableElement","trigger","definitions","Trigger","animate","timings","Animate","tokens","Style","transition","stateChangeExpr","steps","Transition","expr","animation","Reference","useAnimation","AnimateRef","AnimationBuilder","i0","minVersion","ngImport","deps","Injectable","providedIn","useFactory","inject","BrowserAnimationBuilder","decorators","AnimationFactory","rootRenderer","super","animationModuleType","ANIMATION_MODULE_TYPE","optional","_nextAnimationId","typeData","id","encapsulation","ViewEncapsulation","None","data","_renderer","createRenderer","renderer","isAnimationRenderer","ɵRuntimeError","ngDevMode","build","entry","Sequence","sequence","issueAnimationCommand","BrowserAnimationFactory","token","RendererFactory2","DOCUMENT","ctorParameters","Document","Inject","_id","create","RendererAnimationPlayer","parentPlayer","_started","totalTime","_command","_listen","eventName","callback","listen","command","onDone","fn","onStart","onDestroy","init","hasStarted","play","pause","restart","finish","destroy","reset","setPosition","getPosition","animationRenderer","unwrapAnimationRenderer","engine","players","ObjectUtils","isObject","keys","equals","obj1","obj2","field","resolveFieldData","equalsByValue","arrA","arrB","dateA","isDate","dateB","regexpA","regexpB","fields","len","reorderArray","to","splice","insertIntoOrderedArray","arr","sourceArr","injected","findIndexInList","list","val","removeAccents","str","normalize","input","isEmpty","isNotEmpty","compare","value1","value2","locale","order","result","emptyValue1","emptyValue2","localeCompare","numeric","sort","nullSortOrder","finalSortOrder","merge","isPrintableCharacter","char","getItemValue","params","findLastIndex","lastIndexOf","findLast","deepEquals","a","b","lastId","UniqueComponentId","prefix","ConfirmEventType","zindexutils","zIndexes","getZIndex","parseInt","zIndex","get","set","baseZIndex","String","lastZIndex","newZIndex","clear","getCurrent","ZIndexUtils","ConfirmationService","requireConfirmationSource","Subject","acceptConfirmationSource","requireConfirmation$","asObservable","accept","confirm","confirmation","next","close","onAccept","ContextMenuService","activeItemKeyChange","activeItemKeyChange$","activeItemKey","changeKey","FilterMatchMode","FilterService","filterValue","filterMatchMode","filterLocale","filteredItems","fieldValue","filters","startsWith","toLocaleLowerCase","slice","notContains","endsWith","stringValue","notEquals","in","between","lt","lte","gt","gte","is","isNot","before","after","dateIs","toDateString","dateIsNot","dateBefore","dateAfter","valueCopy","setHours","register","MessageService","messageSource","clearSource","messageObserver","clearObserver","message","addAll","messages","OverlayService","clickSource","clickObservable","event","PrimeNGConfig","ripple","inputStyle","signal","overlayOptions","csp","nonce","filterMatchModeOptions","STARTS_WITH","CONTAINS","NOT_CONTAINS","ENDS_WITH","EQUALS","NOT_EQUALS","LESS_THAN","LESS_THAN_OR_EQUAL_TO","GREATER_THAN","GREATER_THAN_OR_EQUAL_TO","date","DATE_IS","DATE_IS_NOT","DATE_BEFORE","DATE_AFTER","translation","noFilter","matchAll","matchAny","addRule","removeRule","reject","choose","upload","cancel","pending","fileSizeTypes","dayNames","dayNamesShort","dayNamesMin","monthNames","monthNamesShort","chooseYear","chooseMonth","chooseDate","prevDecade","nextDecade","prevYear","nextYear","prevMonth","nextMonth","prevHour","nextHour","prevMinute","nextMinute","prevSecond","nextSecond","am","pm","dateFormat","firstDayOfWeek","today","weekHeader","weak","medium","strong","passwordPrompt","emptyMessage","searchMessage","selectionMessage","emptySelectionMessage","emptySearchMessage","emptyFilterMessage","aria","trueLabel","falseLabel","nullLabel","star","stars","selectAll","unselectAll","previous","navigation","moveTop","moveUp","moveDown","moveBottom","moveToTarget","moveToSource","moveAllToTarget","moveAllToSource","pageLabel","firstPageLabel","lastPageLabel","nextPageLabel","prevPageLabel","rowsPerPageLabel","previousPageLabel","jumpToPageDropdownLabel","jumpToPageInputLabel","selectRow","unselectRow","expandRow","collapseRow","showFilterMenu","hideFilterMenu","filterOperator","filterConstraint","editRow","saveEdit","cancelEdit","listView","gridView","slide","slideNumber","zoomImage","zoomIn","zoomOut","rotateRight","rotateLeft","listLabel","selectColor","removeLabel","browseFiles","maximizeLabel","modal","menu","tooltip","translationSource","translationObserver","getTranslation","setTranslation","Header","Component","isStandalone","template","isInline","standalone","Footer","PrimeTemplate","getType","TemplateRef","Directive","inputs","host","propDecorators","Input","SharedModule","NgModule","imports","exports","TranslationKeys","TreeDragDropService","dragStartSource","dragStopSource","dragStart$","dragStop$","startDrag","stopDrag","FocusTrap","pFocusTrapDisabled","platformId","PLATFORM_ID","ElementRef","firstHiddenFocusableElement","lastHiddenFocusableElement","ngOnInit","isPlatformBrowser","createHiddenFocusableElements","ngOnChanges","changes","currentValue","removeHiddenFocusableElements","getComputedSelector","createFocusableElement","onFocus","class","tabindex","role","bind","onFirstHiddenElementFocus","onLastHiddenElementFocus","prepend","currentTarget","relatedTarget","booleanAttribute","classAttribute","usesOnChanges","transform","FocusTrapModule","declarations","CommonModule","BaseIcon","label","spin","styleClass","ariaLabel","ariaHidden","getAttributes","isLabelEmpty","getClassNames","changeDetection","ChangeDetectionStrategy","OnPush","TimesIcon","usesInheritance","WindowMaximizeIcon","pathId","WindowMinimizeIcon","DynamicDialogContent","viewContainerRef","ViewContainerRef","DynamicDialogConfig","header","ariaLabelledBy","footer","closeOnEscape","focusOnShow","focusOnClose","focusTrap","autoZIndex","dismissableMask","rtl","contentStyle","transitionOptions","closable","showHeader","maskStyleClass","resizable","draggable","keepInViewport","minX","minY","maximizable","maximizeIcon","minimizeIcon","position","closeAriaLabel","duplicate","breakpoints","templates","DynamicDialogRef","_onClose","complete","_onDestroy","dragStart","_onDragStart","dragEnd","_onDragEnd","resizeInit","_onResizeInit","resizeEnd","_onResizeEnd","maximize","_onMaximize","onClose","onDragStart","onDragEnd","onResizeInit","onResizeEnd","onMaximize","onChildComponentLoaded","showAnimation","hideAnimation","DynamicDialogComponent","cd","config","dialogRef","zone","primeNGConfig","parentDialog","visible","componentRef","mask","resizing","dragging","maximized","_style","originalStyle","lastPageX","lastPageY","styleElement","insertionPoint","maskViewChild","contentViewChild","footerViewChild","headerViewChild","childComponentType","wrapper","documentKeydownListener","documentEscapeListener","maskClickListener","transformOptions","documentResizeListener","documentResizeEndListener","documentDragListener","documentDragEndListener","ARIA","domElements","getElementsByClassName","pop","parentContent","contentElements","footerTemplate","headerTemplate","contentTemplate","content","minimizeIconTemplate","minimizeicon","maximizeIconTemplate","maximizeicon","closeIconTemplate","closeicon","dynamicDialogCount","dynamicDialogs","containerStyle","createStyle","head","innerHTML","breakpoint","destroyStyle","ngAfterViewInit","loadChildComponent","getAriaLabelledBy","detectChanges","componentType","createComponent","instance","moveOnTop","onAnimationStart","toState","unbindGlobalListeners","bindGlobalListeners","enableModality","onAnimationEnd","onContainerDestroy","disableModality","markForCheck","hide","isSameNode","unbindMaskClickListener","destroyed","focusParentElement","focusable","runOutsideAngular","initResize","bindDocumentResizeListeners","pageX","pageY","onResize","deltaX","deltaY","containerWidth","containerHeight","contentHeight","newWidth","newHeight","minHeight","initDrag","onDrag","leftPos","topPos","endDrag","resetPosition","bindDocumentDragListener","bindDocumentDragEndListener","unbindDocumentDragEndListener","unbindDocumentDragListener","unbindDocumentResizeListeners","bindDocumentEscapeListener","unbindDocumentEscapeListener","documentTarget","which","ngOnDestroy","ChangeDetectorRef","Renderer2","NgZone","i3.PrimeNGConfig","skipSelf","viewQueries","propertyName","first","predicate","descendants","dependencies","kind","forwardRef","i4","NgClass","NgComponentOutlet","NgIf","NgStyle","i5.FocusTrap","animations","Default","SkipSelf","Optional","ViewChild","DynamicDialogModule","DynamicDialogInjector","_parentInjector","_additionalTokens","notFoundValue","DialogService","appRef","injector","dialogComponentRefMap","Map","open","duplicationPermission","appendDialogComponentToBody","getInstance","ref","WeakMap","sub","subscribe","destroySub","removeDialogComponentFromBody","unsubscribe","environmentInjector","elementInjector","attachView","hostView","domElem","rootNodes","has","dialogComponentRef","detachView","delete","permission","ApplicationRef","Injector","LoggerLevelName","LoggerRingBuffer","_lastLogMessage","timestamp","lvl","_buffer","_bufferIdx","_lastSnapshotIdx","_bufferSize","size","Error","currentIndex","lastSnapshotIdx","bufferSize","newSize","clearRingBuffer","getMessages","inStartFrom","reverseSort","rval","start","firstIdx","takeSnapshot","trailingEdge","logMessagesTruncated","getLastLogMessage","assign","addToRingBuffer","newMsg","LoggerOutputFunction","LoggerUtil","handlerFunctionMap","outputFn","output","process","stdout","write","myStdOut","chunk","cb","console","warn","info","log","debug","defaultHandlerFunction","levelIsEnabled","targetLevel","currentEnabled","idxTarget","LOG_LEVELS_IN_ORDER","LogMessageFormatType","RequireRatchet","isNullOrUndefined","ob","notNullOrUndefined","notNullUndefinedOrOnlyWhitespaceString","notNullUndefinedOrEmptyArray","equal","ob1","ob2","noNullOrUndefinedValuesInArray","expectedLength","customMsg","noNullOrUndefinedValuesInRestArgs","restArgs","constructorArgumentsMatchLengthAndAreNonNull","arguments","StringRatchet","DIGITS","UPPER_CASE_LATIN","LOWER_CASE_LATIN","stringIsInGivenAlphabet","alphabet","includes","charAt","stringToUint8Array","TextEncoder","encode","uint8ArrayToString","TextDecoder","decode","attemptJsonParse","trimToNull","JSON","parse","canParseAsJson","allUnique","check","allPermutationsOfLength","true","step","breakIntoBlocks","blockSize","separator","out","substring","createShortUid","uniquesPerSecond","radix","currentEpoch","now","asHex","random","createType4Guid","r","createRandomHexString","canonicalize","RFC_3986_RESERVED","formatBytes","bytes","decimals","dm","pow","toFixed","safeString","stringContainsOnlyWhitespace","stringContainsOnly","WHITESPACE","stringContainsOnlyNumbers","stringContainsOnlyAlphanumeric","stringContainsOnlyHex","inVal","validCharsIn","validChars","obscure","prefixLength","suffixLength","pl","sl","rem","leadingZeros","pad","negative","sVal","trimToEmpty","x","trimAllStringPropertiesToNullInPlace","trimAllStringPropertiesInPlace","trimAllStringPropertiesToEmptyInPlace","toEmpty","stripNonNumeric","csvSafe","stripNonAscii","previousValue","charCodeAt","replaceAll","src","dst","simpleTemplateFill","fillers","errorOnMissingFiller","opener","closer","circSafeJsonStringify","stringify","err","TypeError","lines","format","fmt","re","escaped","ptn","flag","arg","shift","unshift","ClassicSingleLineLogMessageFormatter","formatMessage","msg","meta","tmp","trace","subsVars","NoneLogMessageFormatter","_msg","_meta","StructuredJsonLogMessageFormatter","globalVars","toISOString","loggerInstanceName","loggerInstanceId","LoggerInstance","_guid","_loggerMeta","_ringBuffer","_formatter","_level","_handlerFunctionMap","_options","inOptions","level","addPreProcessor","proc","preProcessors","ringBuffer","dumpConfigurationIntoLog","verbose","silly","dumpOptionsIntoLog","labels","guid","changeRingBufferSize","ringBufferSize","updateTracePrefix","newValue","newOpts","formatType","initialLevel","outputFunction","oldId","newLevel","consoleLogPassThru","passThruPrefix","createLogMessage","formatMessages","msgs","m","recordMessageBuilder","msgBuild","recordMessage","toMessage","inMsg","errorP","warnP","infoP","verboseP","debugP","sillyP","logByLevel","importMessages","prefixIn","addTimestamp","mOut","Logger","global","applyDefaultsToOptions","DEFAULT_OPTIONS","loggerInstances","GLOBAL_PROVIDER","LOGGER_INSTANCE_MAP_GLOBAL_KEY","changeDefaultOptions","retroactive","values","li","getLogger","loggerName","inst","getRingBuffer","getLevel","setLevel","getOptions","buf","AlertComponent","AlertComponent_1","dialogService","cfg","showAlert","dialogSvc","title","BehaviorSubject","__decorate","AsyncPipe","ProgressSpinner","strokeWidth","fill","animationDuration","i1","ProgressSpinnerModule","BlockUiComponent","BlockUiComponent_1","createUiBlock","subMessage","runPromiseWithUiBlock","prom","dlg","CapitalizePipe","toUpperCase","Pipe","CurrencyRatchet","centToDollarFormat","cents","fractionDigits","dollarFormat","dollars","toLocaleString","minimumFractionDigits","maximumFractionDigits","dollarFormatNumberRange","range","low","high","DollarFormattedPipe","MapValuesPipe","returnArray","k","NumberWithCommasPipe","Intl","NumberFormat","OrderByPipe","OrderByPipe_1","_orderByComparator","propertyToCheck","desc","substr","property","comparison","pure","NumberRatchet","ifNotNumber","returnValueForNull","returnValueForUndefined","preParseCharacterMapping","toFixedDecimalNumber","placesAfterPoint","safeNumber","MAX_LEADING_ZEROS_FORMAT_LENGTH","inTest","inP1","inP2","p1","p2","useDefaultForNullAndUndefined","opts","safeNumberOpt","optionPart","DEFAULT_SAFE_NUMBER_OPTIONS","t2","cr","numberCSVToList","inputCSV","fitToWindow","b1","b2","min","windowSize","groupNumbersIntoContiguousRanges","inputData","minRangeSize","singles","ranges","j","distributeItemsEvenly","items","buckets","loc","minInclusive","maxExclusive","percentFormatNumberRange","pctFormatted","pct","PercentFormattedPipe","PluralPipe","pluralLabel","RoundPipe","round","LuxonError","InvalidDateTimeError","reason","InvalidIntervalError","InvalidDurationError","ConflictingSpecificationError","InvalidUnitError","unit","InvalidArgumentError","ZoneIsAbstractError","n","l","DATE_SHORT","year","month","day","DATE_MED","DATE_MED_WITH_WEEKDAY","weekday","DATE_FULL","DATE_HUGE","TIME_SIMPLE","hour","minute","TIME_WITH_SECONDS","second","TIME_WITH_SHORT_OFFSET","timeZoneName","TIME_WITH_LONG_OFFSET","TIME_24_SIMPLE","hourCycle","TIME_24_WITH_SECONDS","TIME_24_WITH_SHORT_OFFSET","TIME_24_WITH_LONG_OFFSET","DATETIME_SHORT","DATETIME_SHORT_WITH_SECONDS","DATETIME_MED","DATETIME_MED_WITH_SECONDS","DATETIME_MED_WITH_WEEKDAY","DATETIME_FULL","DATETIME_FULL_WITH_SECONDS","DATETIME_HUGE","DATETIME_HUGE_WITH_SECONDS","Zone","ianaName","isUniversal","offsetName","ts","formatOffset","otherZone","isValid","singleton","SystemZone","DateTimeFormat","resolvedOptions","timeZone","parseZoneInfo","getTimezoneOffset","dtfCache","typeToPos","era","ianaZoneCache","IANAZone","resetCache","isValidSpecifier","isValidZone","zoneName","valid","NaN","dtf","hour12","adOrBc","formatToParts","formatted","filled","pos","isUndefined","partsOffset","parsed","fMonth","fDay","fYear","fadOrBc","fHour","fMinute","fSecond","hackyOffset","abs","asTS","over","objToLocalTS","millisecond","intlLFCache","intlDTCache","getCachedDTF","locString","intlNumCache","intlRelCache","sysLocaleCache","weekInfoCache","listStuff","englishFn","intlFn","mode","listingMode","PolyNumberFormatter","intl","forceSimple","padTo","otherOpts","intlOpts","useGrouping","minimumIntegerDigits","inf","getCachedINF","fixed","padStart","roundTo","PolyDateFormatter","dt","z","originalZone","gmtOffset","offsetZ","setZone","plus","minutes","toJSDate","parts","part","PolyRelFormatter","isEnglish","hasRelative","rtf","base","cacheKeyOpts","RelativeTimeFormat","getCachedRTF","count","narrow","units","years","quarters","months","weeks","days","hours","seconds","lastable","isDay","isInPast","fmtValue","singular","lilUnits","fmtUnit","English.formatRelativeTime","fallbackWeekSettings","firstDay","minimalDays","weekend","Locale","fromOpts","numberingSystem","outputCalendar","weekSettings","defaultToEN","specifiedLocale","Settings","defaultLocale","localeR","numberingSystemR","defaultNumberingSystem","outputCalendarR","defaultOutputCalendar","weekSettingsR","validateWeekSettings","defaultWeekSettings","fromObject","numbering","parsedLocale","parsedNumberingSystem","parsedOutputCalendar","localeStr","xIndex","uIndex","selectedStr","smaller","calendar","parseLocaleString","intlConfigString","weekdaysCache","monthsCache","meridiemCache","eraCache","fastNumbersCached","fastNumbers","isActuallyEn","hasNoWeirdness","clone","alts","getOwnPropertyNames","redefaultToEN","redefaultToSystem","English.months","formatStr","DateTime","utc","mapMonths","extract","weekdays","English.weekdays","mapWeekdays","meridiems","English.meridiems","eras","English.eras","matching","dtFormatter","numberFormatter","relFormatter","listFormatter","ListFormat","getCachedLF","getWeekSettings","hasLocaleWeekInfo","getWeekInfo","weekInfo","getCachedWeekInfo","getStartOfWeek","getMinDaysInFirstWeek","getWeekendDays","other","FixedOffsetZone","utcInstance","parseSpecifier","signedOffset","InvalidZone","normalizeZone","defaultZone","lowered","isNumber","numberingSystems","arab","arabext","bali","beng","deva","fullwide","gujr","hanidec","khmr","knda","laoo","limb","mlym","mong","mymr","orya","tamldec","telu","thai","tibt","latn","numberingSystemsUTF16","hanidecChars","digitRegexCache","digitRegex","ns","throwOnInvalid","twoDigitCutoffYear","cutoffYear","t","resetCaches","Invalid","explanation","nonLeapLadder","leapLadder","unitOutOfRange","dayOfWeek","UTC","setUTCFullYear","getUTCFullYear","js","getUTCDay","computeOrdinal","isLeapYear","uncomputeOrdinal","ordinal","table","month0","findIndex","isoWeekdayToLocal","isoWeekday","startOfWeek","gregorianToWeek","gregObj","minDaysInFirstWeek","weekYear","weekNumber","weeksInWeekYear","timeObject","weekToGregorian","weekData","weekdayOfJan4","yearInDays","daysInYear","gregorianToOrdinal","gregData","ordinalToGregorian","ordinalData","usesLocalWeekValues","localWeekday","localWeekNumber","localWeekYear","hasInvalidGregorianData","validYear","validMonth","integerBetween","validDay","daysInMonth","hasInvalidTimeData","validHour","validMinute","validSecond","validMillisecond","o","bestBy","by","best","pair","prop","settings","some","thing","bottom","padded","parseInteger","string","parseFloating","parseMillis","fraction","number","digits","towardZero","factor","trunc","modMonth","floorMod","firstWeekOffset","weekOffset","weekOffsetNext","untruncateYear","offsetFormat","modified","offHourStr","offMinuteStr","offHour","offMin","asNumber","numericValue","normalizeObject","normalizer","normalized","u","sign","RangeError","pick","monthsLong","monthsShort","monthsNarrow","weekdaysLong","weekdaysShort","weekdaysNarrow","erasLong","erasShort","erasNarrow","stringifyTokens","splits","tokenToString","literal","macroTokenToFormatOpts","D","Formats.DATE_SHORT","DD","Formats.DATE_MED","DDD","Formats.DATE_FULL","DDDD","Formats.DATE_HUGE","Formats.TIME_SIMPLE","tt","Formats.TIME_WITH_SECONDS","ttt","Formats.TIME_WITH_SHORT_OFFSET","tttt","Formats.TIME_WITH_LONG_OFFSET","T","Formats.TIME_24_SIMPLE","TT","Formats.TIME_24_WITH_SECONDS","TTT","Formats.TIME_24_WITH_SHORT_OFFSET","TTTT","Formats.TIME_24_WITH_LONG_OFFSET","Formats.DATETIME_SHORT","ff","Formats.DATETIME_MED","fff","Formats.DATETIME_FULL","ffff","Formats.DATETIME_HUGE","F","Formats.DATETIME_SHORT_WITH_SECONDS","FF","Formats.DATETIME_MED_WITH_SECONDS","FFF","Formats.DATETIME_FULL_WITH_SECONDS","FFFF","Formats.DATETIME_HUGE_WITH_SECONDS","Formatter","parseFormat","current","currentFull","bracketed","formatOpts","systemLoc","formatWithSystemDefault","formatDateTime","formatDateTimeParts","formatInterval","interval","formatRange","end","formatDateTimeFromString","knownEnglish","useDateTimeFormatter","isOffsetFixed","allowZ","meridiem","English.meridiemForDateTime","English.monthForDateTime","English.weekdayForDateTime","maybeMacro","English.eraForDateTime","quarter","formatDurationFromString","dur","tokenToField","realTokens","found","lildur","mapped","shiftTo","ianaRegex","combineRegexes","regexes","full","source","combineExtractors","extractors","mergedVals","mergedZone","cursor","ex","patterns","regex","extractor","simpleParse","ret","offsetRegex","isoTimeBaseRegex","isoTimeRegex","isoTimeExtensionRegex","extractISOWeekData","extractISOOrdinalData","sqlTimeRegex","sqlTimeExtensionRegex","int","fallback","extractISOTime","milliseconds","extractISOOffset","local","fullOffset","extractIANAZone","isoTimeOnly","isoDuration","extractISODuration","yearStr","monthStr","weekStr","dayStr","hourStr","minuteStr","secondStr","millisecondsStr","hasNegativePrefix","negativeSeconds","maybeNegate","force","obsOffsets","GMT","EDT","EST","CDT","CST","MDT","MST","PDT","PST","fromStrings","weekdayStr","English.monthsShort","English.weekdaysLong","English.weekdaysShort","rfc2822","extractRFC2822","obsOffset","milOffset","rfc1123","rfc850","ascii","extractRFC1123Or850","extractASCII","isoYmdWithTimeExtensionRegex","isoWeekWithTimeExtensionRegex","isoOrdinalWithTimeExtensionRegex","isoTimeCombinedRegex","extractISOYmdTimeAndOffset","extractISOWeekTimeAndOffset","extractISOOrdinalDateAndTime","extractISOTimeAndOffset","extractISOTimeOnly","sqlYmdWithTimeExtensionRegex","sqlTimeCombinedRegex","extractISOTimeOffsetAndIANAZone","INVALID","lowOrderMatrix","casualMatrix","daysInYearAccurate","daysInMonthAccurate","accurateMatrix","orderedUnits","reverseUnits","conf","conversionAccuracy","matrix","Duration","durationToMillis","vals","sum","normalizeValues","reduceRight","previousVal","conv","rollUp","accurate","invalid","isLuxonDuration","fromMillis","normalizeUnit","fromDurationLike","durationLike","isDuration","fromISO","parseISODuration","fromISOTime","parseISOTimeOnly","week","toFormat","fmtOpts","toHuman","unitDisplay","listStyle","toObject","toISO","toISOTime","millis","toMillis","suppressMilliseconds","suppressSeconds","includePrefix","includeOffset","toJSON","Symbol","for","invalidReason","valueOf","minus","negate","mapUnits","reconfigure","as","rescale","newVals","removeZeroes","shiftToAll","built","accumulated","lastUnit","own","ak","negated","invalidExplanation","v1","v2","Interval","isLuxonInterval","fromDateTimes","builtStart","friendlyDateTime","builtEnd","validateError","validateStartEnd","startIsValid","endIsValid","isInterval","toDuration","startOf","useLocaleWeeks","diff","hasSame","isAfter","dateTime","isBefore","splitAt","dateTimes","sorted","results","added","splitBy","idx","divideEqually","numberOfParts","overlaps","abutsStart","abutsEnd","engulfs","intersection","union","intervals","final","sofar","xor","currentCount","ends","time","difference","toISODate","mapEndpoints","mapFn","Info","hasDST","proto","isValidIANAZone","locObj","getMinimumDaysInFirstWeek","getWeekendWeekdays","monthsFormat","weekdaysFormat","features","relative","localeWeek","dayDiff","earlier","later","utcDayStart","toUTC","keepLocalTime","highWater","lowestOrder","differs","differ","highOrderDiffs","remainingMillis","lowerOrderUnits","intUnit","post","deser","code","search","parseDigits","spaceOrNBSP","fromCharCode","spaceOrNBSPRegExp","fixListRegex","stripInsensitivities","oneOf","strings","startIndex","groups","h","simple","partTypeStyleToTokenVal","short","long","dayperiod","dayPeriod","hour24","dummyDateTimeCache","expandMacroTokens","formatOptsToTokens","maybeExpandMacroToken","TokenParser","one","two","three","four","six","oneOrTwo","oneToThree","oneToSix","oneToNine","twoToFour","fourToSix","unitate","unitForToken","disqualifyingUnit","regexString","handlers","explainFromTokens","rawMatches","all","matchIndex","specificOffset","Z","q","M","G","y","S","toField","dateTimeFromMatches","df","resolvedOpts","isSpace","actualType","tokenForPart","MAX_DATE","unsupportedZone","possiblyCachedWeekData","possiblyCachedLocalWeekData","localWeekData","old","fixOffset","localTS","tz","utcGuess","o2","o3","tsToObj","getUTCMonth","getUTCDate","getUTCHours","getUTCMinutes","getUTCSeconds","getUTCMilliseconds","objToTS","adjustTime","oPre","millisToAdd","parseDataToDateTime","parsedZone","interpretationZone","toTechFormat","extended","longFormat","extendedZone","defaultUnitValues","defaultWeekUnitValues","defaultOrdinalUnitValues","orderedWeekUnits","orderedOrdinalUnits","normalizeUnitWithLocalWeeks","weeknumber","weeksnumber","weeknumbers","weekyear","weekyears","quickDT","offsetProvis","zoneOffsetGuessCache","zoneOffsetTs","guessOffsetForZone","diffRelative","calendary","lastOpts","argList","ot","_zone","isLuxonDateTime","fromJSDate","zoneToUse","fromSeconds","tsNow","containsOrdinal","containsGregorYear","containsGregorMD","containsGregor","definiteWeekDef","useWeekData","defaultValues","objNow","foundFirst","higherOrderInvalid","validWeek","validWeekday","hasInvalidWeekData","validOrdinal","hasInvalidOrdinalData","gregorian","tsFinal","offsetFinal","parseISODate","fromRFC2822","preprocessRFC2822","parseRFC2822Date","fromHTTP","parseHTTPDate","fromFormat","localeToUse","parseFromTokens","fromString","fromSQL","parseSQL","isDateTime","parseFormatForOpts","localeOpts","tokenList","expandFormat","ceil","isWeekend","monthShort","monthLong","weekdayShort","weekdayLong","offsetNameShort","offsetNameLong","isInDST","getPossibleOffsets","dayMs","minuteMs","oEarlier","oLater","o1","ts1","ts2","c1","c2","isInLeapYear","weeksInLocalWeekYear","resolvedLocaleOptions","toLocal","keepCalendarTime","newTS","offsetGuess","asObj","setLocale","settingWeekStuff","mixed","normalizedUnit","endOf","toLocaleParts","ext","toISOWeekDate","toRFC2822","toHTTP","toSQLDate","toSQLTime","includeZone","includeOffsetSpace","toSQL","toSeconds","toUnixInteger","toBSON","includeConfig","otherDateTime","durOpts","otherIsLater","diffed","diffNow","until","inputMs","adjustedToZone","toRelative","padding","toRelativeCalendar","every","fromFormatExplain","fromStringExplain","buildFormatParser","fromFormatParser","formatParser","Formats.DATE_MED_WITH_WEEKDAY","Formats.DATETIME_MED_WITH_WEEKDAY","dateTimeish","DurationRatchet","formatMsDuration","includeMS","rem_ms","colonFormatMsDuration","daysBetween","d1","d2","createSteps","startEpochMS","endEpochMS","timezone","outputFormat","stepUnit","curDate","endDate","TimeAgoFormattedPipe","TimingPipe","initZero","GoogleAnalyticsService","router","initialize","onRouteChange","url","gTagScript","async","tagId","GoogleAnalyticsService_1","IS_PROD","dataLayerScript","events","NavigationEnd","gtag","page_path","urlAfterRedirects","action","eventCategory","eventLabel","event_category","event_label","Router","DefaultGraphqlRatchetErrorHandler","logLevel","rethrow","handleError","queryName","variables","authStyle","ErrorRatchet","safeStringifyErr","err2","asErr","fErr","throwFormattedErr","ClientError","response","request","extractMessage","setPrototypeOf","captureStackTrace","errors","status","uppercase","callOrIdentity","zip","HeadersInitToPlainObject","headers","oHeaders","Headers","HeadersInstanceToPlainObject","errorFromMaybeError","maybeError","isPromiseLikeValue","then","catch","finally","casesExhausted","isPlainObject","devAssert","condition","invariant","LineRegExp","getLocation","lastLineStart","line","column","printSourceLocation","sourceLocation","firstLineColumnOffset","locationOffset","lineIndex","lineOffset","lineNum","columnOffset","columnNum","locationStr","locationLine","subLineIndex","subLineColumnNum","subLines","printPrefixedLines","subLine","existingLines","_","padLen","GraphQLError","rawArgs","_this$nodes","_nodeLocations$","_ref","nodes","positions","path","originalError","extensions","firstArg","toNormalizedOptions","undefinedIfEmpty","nodeLocations","locations","originalExtensions","defineProperties","writable","enumerable","stack","defineProperty","configurable","toStringTag","location","formattedError","array","syntaxError","description","Location","startToken","endToken","Token","prev","QueryDocumentKeys","Name","OperationDefinition","VariableDefinition","Variable","SelectionSet","Field","Argument","FragmentSpread","InlineFragment","FragmentDefinition","IntValue","FloatValue","StringValue","BooleanValue","NullValue","EnumValue","ListValue","ObjectValue","ObjectField","NamedType","ListType","NonNullType","SchemaDefinition","OperationTypeDefinition","ScalarTypeDefinition","ObjectTypeDefinition","FieldDefinition","InputValueDefinition","InterfaceTypeDefinition","UnionTypeDefinition","EnumTypeDefinition","EnumValueDefinition","InputObjectTypeDefinition","DirectiveDefinition","SchemaExtension","ScalarTypeExtension","ObjectTypeExtension","InterfaceTypeExtension","UnionTypeExtension","EnumTypeExtension","InputObjectTypeExtension","kindValues","isNode","maybeNode","maybeKind","OperationTypeNode","DirectiveLocation","Kind","TokenKind","isWhiteSpace","isDigit","isLetter","isNameStart","isNameContinue","dedentBlockStringLines","_firstNonEmptyLine2","commonIndent","MAX_SAFE_INTEGER","firstNonEmptyLine","lastNonEmptyLine","_firstNonEmptyLine","indent","leadingWhitespace","Lexer","startOfFileToken","SOF","lastToken","lineStart","advance","lookahead","EOF","nextToken","readNextToken","COMMENT","isUnicodeScalarValue","isSupplementaryCodePoint","isLeadingSurrogate","isTrailingSurrogate","printCodePointAt","lexer","codePointAt","fromCodePoint","createToken","col","bodyLength","readComment","BANG","DOLLAR","AMP","PAREN_L","PAREN_R","SPREAD","COLON","AT","BRACKET_L","BRACKET_R","BRACE_L","PIPE","BRACE_R","readBlockString","readString","readNumber","readName","firstCode","isFloat","readDigits","FLOAT","INT","chunkStart","STRING","escape","readEscapedUnicodeVariableWidth","readEscapedUnicodeFixedWidth","readEscapedCharacter","point","readHexDigit","read16BitHexCode","trailingCode","currentLine","blockLines","BLOCK_STRING","NAME","MAX_ARRAY_LENGTH","MAX_RECURSIVE_DEPTH","inspect","formatValue","seenValues","previouslySeenValues","isJSONable","jsonValue","remaining","formatArray","object","tag","getObjectTag","properties","formatObject","formatObjectValue","instanceOf","globalThis","env","NODE_ENV","_value$constructor","stringifiedValue","Source","Parser","sourceObj","isSource","_lexer","_tokenCounter","parseName","expectToken","parseDocument","many","parseDefinition","peek","parseOperationDefinition","hasDescription","peekDescription","keywordToken","parseSchemaDefinition","parseScalarTypeDefinition","parseObjectTypeDefinition","parseInterfaceTypeDefinition","parseUnionTypeDefinition","parseEnumTypeDefinition","parseInputObjectTypeDefinition","parseDirectiveDefinition","parseFragmentDefinition","parseTypeSystemExtension","unexpected","OPERATION_DEFINITION","operation","QUERY","variableDefinitions","directives","selectionSet","parseSelectionSet","parseOperationType","parseVariableDefinitions","parseDirectives","operationToken","MUTATION","SUBSCRIPTION","optionalMany","parseVariableDefinition","VARIABLE_DEFINITION","variable","parseVariable","parseTypeReference","defaultValue","expectOptionalToken","parseConstValueLiteral","parseConstDirectives","VARIABLE","SELECTION_SET","selections","parseSelection","parseFragment","parseField","nameOrAlias","alias","FIELD","parseArguments","isConst","parseConstArgument","parseArgument","ARGUMENT","parseValueLiteral","hasTypeCondition","expectOptionalKeyword","FRAGMENT_SPREAD","parseFragmentName","INLINE_FRAGMENT","typeCondition","parseNamedType","expectKeyword","allowLegacyFragmentVariables","FRAGMENT_DEFINITION","parseList","parseObject","advanceLexer","parseStringLiteral","BOOLEAN","NULL","ENUM","varName","block","LIST","any","OBJECT","parseObjectField","OBJECT_FIELD","parseDirective","DIRECTIVE","innerType","LIST_TYPE","NON_NULL_TYPE","NAMED_TYPE","parseDescription","operationTypes","parseOperationTypeDefinition","SCHEMA_DEFINITION","OPERATION_TYPE_DEFINITION","SCALAR_TYPE_DEFINITION","interfaces","parseImplementsInterfaces","parseFieldsDefinition","OBJECT_TYPE_DEFINITION","delimitedMany","parseFieldDefinition","parseArgumentDefs","FIELD_DEFINITION","parseInputValueDef","INPUT_VALUE_DEFINITION","INTERFACE_TYPE_DEFINITION","types","parseUnionMemberTypes","UNION_TYPE_DEFINITION","parseEnumValuesDefinition","ENUM_TYPE_DEFINITION","parseEnumValueDefinition","parseEnumValueName","ENUM_VALUE_DEFINITION","getTokenDesc","parseInputFieldsDefinition","INPUT_OBJECT_TYPE_DEFINITION","parseSchemaExtension","parseScalarTypeExtension","parseObjectTypeExtension","parseInterfaceTypeExtension","parseUnionTypeExtension","parseEnumTypeExtension","parseInputObjectTypeExtension","SCHEMA_EXTENSION","SCALAR_TYPE_EXTENSION","OBJECT_TYPE_EXTENSION","INTERFACE_TYPE_EXTENSION","UNION_TYPE_EXTENSION","ENUM_TYPE_EXTENSION","INPUT_OBJECT_TYPE_EXTENSION","repeatable","parseDirectiveLocations","DIRECTIVE_DEFINITION","parseDirectiveLocation","noLocation","getTokenKindDesc","atToken","openKind","parseFn","closeKind","delimiterKind","maxTokens","isPunctuatorTokenKind","escapedRegExp","escapedReplacer","escapeSequences","BREAK","freeze","getEnterLeaveForKind","visitor","kindVisitor","enter","leave","print","ast","root","visitorKeys","enterLeaveMap","inArray","edits","ancestors","isLeaving","isEdited","editOffset","editKey","editValue","arrayKey","getOwnPropertyDescriptors","_enterLeaveMap$get","_enterLeaveMap$get2","visitFn","_node$kind","visit","printDocASTReducer","varDefs","wrap","argsLine","isBlockString","escapedValue","isSingleLine","forceLeadingNewLine","hasTrailingTripleQuotes","hasTrailingQuote","hasTrailingSlash","forceTrailingNewline","printAsMultipleLines","skipLeadingNewLine","printBlockString","hasMultilineItems","maybeArray","_maybeArray$filter$jo","maybeString","_maybeArray$some","ACCEPT_HEADER","CONTENT_TYPE_HEADER","CONTENT_TYPE_JSON","CONTENT_TYPE_GQL","cleanQuery","parseGraphQLExecutionResult","_tag","executionResults","parseExecutionResult","executionResult","isExecutionResultHaveErrors","isOperationDefinitionNode","definition","analyzeDocument","excludeOperationName","expression","operationName","isMutation","docNode","tryCatch","defs","extractOperationName","extractIsMutation","defaultJsonSerializer","runRequest","method","hasMutations","fetchOptions","errorPolicy","fetcher","createFetcher","fetchResponse","ok","query","parseResultFromResponse","jsonSerializer","clientResponseBase","isRequestResultHaveErrors","clientResponse","executionResultClientResponseFields","$params","contentType","contentTypeLower","isGraphQLContentType","searchParams","buildBody","buildQueryParams","URL","initResolved","middleware","Promise","resolve","urlNew","initNew","$fetch","fetch","$jsonSerializer","URLSearchParams","variablesSerialized","queriesCleaned","payload","GraphQLClient","requestConfig","rawRequest","queryOrOptions","requestHeaders","rawRequestOptions","parseRawRequestArgs","requestMiddleware","responseMiddleware","documentOrOptions","variablesAndRequestHeaders","requestOptions","parseRequestArgs","analyzedDocument","batchRequests","documentsOrOptions","batchRequestOptions","documents","parseBatchRequestArgs","analyzedDocuments","expressions","setHeaders","setHeader","setEndpoint","AuthorizationStyle","GraphqlRatchet","queryProvider","endpointProvider","jwtTokenProvider","errorHandler","clientCache","noAuthClient","cachedEndpoint","fetchGraphqlEndpoint","currentAuthToken","fetchJwtToken","fetchQueryText","qry","createAnonymousApi","fetchApi","jwtToken","AlwaysAnonymous","TokenRequired","checkIfEndpointChanged","createAuthApi","authorization","clearCaches","extractSingleValueFromResponse","executeQuery","api","gql","newValues","executeMutate","storageFinder","localStorage","GraphqlQueryService","graphqlRatchet","messageService","severity","summary","detail","life","executeQueryWithBlock","blockMessage","executeMutateWithBlock","LocalStorageService","storageReady","update","toSave","saveString","setItem","LocalStorageService_1","APP_NAME","loadString","getItem","WindowRefService","nativeWindow","getWindow","buildInformation","hash","branch","timeBuiltISO","notes"],"mappings":"+XAkBIA,ufCTJ,MAAMC,EACFC,cAAgB,IAChBA,gCAAkC,KAClCA,iCAAmC,KACnCA,eACA,eAAOC,CAASC,EAASC,GACjBD,GAAWC,IACPD,EAAQE,UACRF,EAAQE,UAAUC,IAAIF,GAEtBD,EAAQC,WAA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MACA,MACA,UACA,UACA,UACA,UACA,UACA,UACA,UACA,UACA,UACA,UACA,UACA,UACA,UACA,UACA,UACA,UACA,UACA,UACA,GACA,GACA,MACA,GACA,GACA,GACA,GACA,GACA,GACA,GACA,GACA,GACA,GACA,GACA,GACA,GACA,GACA,GACA,GACA,GACA,GACA,GACA,GACA,GACA,GACA,GACA,GACA,GACA,GACA,GACA,GACA,GACA,GACA,GACA,GACA,GACA,GACA,GACA,GACA,GACA,GACA,GACA,GACA,GACA,GACA,GACA,GACA,GACA,GACA,GACA,GACA,GACA,GACA,GACA,GACA,GACA,GACA,GACA,GACA,GACA,OACA,GACA,GACA,GACA,GACA,GACA,GACA,GACA,GACA,GACA,GACA,GACA,GACA,GACA,GACA,GACA,GACA,GACA,GACA,GACA,GACA,GACA,GACA,GACA,GACA,GACA,GACA,GACA,GACA,GACA,GACA,GACA,GACA,GACA,GACA,UACA,UACA,UACA,UACA,UACA,UACA,UACA,UACA,UACA,UACA,UACA,UACA,UACA,UACA,UACA,UACA,UACA,UACA,UACA,UACA,UACA,UACA,UACA,UACA,UACA,UACA,UACA,UACA,UACA,UACA,UACA,UACA,WCrKWC,GAAQrzE,OAAOszE,OAAO,CAAA,GAgU5B,SAASC,GAAqBC,EAAS3sD,GAC5C,MAAM4sD,EAAcD,EAAQ3sD,GAE5B,MAA2B,iBAAhB4sD,EAEFA,EACyB,mBAAhBA,EAET,CACLC,MAAOD,EACPE,WAAOl1E,GAIJ,CACLi1E,MAAOF,EAAQE,MACfC,MAAOH,EAAQG,MAEnB,CCnVO,SAASC,GAAMC,GACpB,ODgFK,SAAeC,EAAMN,EAASO,EAAcpT,IACjD,MAAMqT,EAAgB,IAAI7rD,IAE1B,IAAK,MAAMtB,KAAQ7mB,OAAOg5B,OAAO2qC,IAC/BqQ,EAAcxpE,IAAIqc,EAAM0sD,GAAqBC,EAAS3sD,IAIxD,IAAIg5C,EAMAv/D,EACAlM,EANA6/E,EAAU5kF,MAAM0Q,QAAQ+zE,GACx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