dara-core 1.25.0__py3-none-any.whl → 1.25.2__py3-none-any.whl

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.
@@ -4227,7 +4227,7 @@
4227
4227
  let recoilValue = null;
4228
4228
  const {
4229
4229
  key,
4230
- get,
4230
+ get: get2,
4231
4231
  cachePolicy_UNSTABLE: cachePolicy
4232
4232
  } = options;
4233
4233
  const set2 = options.set != null ? options.set : void 0;
@@ -4423,7 +4423,7 @@
4423
4423
  };
4424
4424
  };
4425
4425
  try {
4426
- result = get({
4426
+ result = get2({
4427
4427
  get: getRecoilValue,
4428
4428
  getCallback
4429
4429
  });
@@ -5028,9 +5028,9 @@
5028
5028
  const sel = Recoil_selector({
5029
5029
  key: `${options.key}__withFallback`,
5030
5030
  get: ({
5031
- get
5031
+ get: get2
5032
5032
  }) => {
5033
- const baseValue = get(base);
5033
+ const baseValue = get2(base);
5034
5034
  return baseValue instanceof DefaultValue$2$1 ? options.default : baseValue;
5035
5035
  },
5036
5036
  // $FlowFixMe[incompatible-call]
@@ -5312,10 +5312,10 @@
5312
5312
  Recoil_selectorFamily({
5313
5313
  key: "__waitForNone",
5314
5314
  get: (dependencies) => ({
5315
- get
5315
+ get: get2
5316
5316
  }) => {
5317
5317
  const deps = unwrapDependencies(dependencies);
5318
- const [results, exceptions] = concurrentRequests(get, deps);
5318
+ const [results, exceptions] = concurrentRequests(get2, deps);
5319
5319
  return wrapLoadables(dependencies, results, exceptions);
5320
5320
  },
5321
5321
  dangerouslyAllowMutability: true
@@ -5323,10 +5323,10 @@
5323
5323
  Recoil_selectorFamily({
5324
5324
  key: "__waitForAny",
5325
5325
  get: (dependencies) => ({
5326
- get
5326
+ get: get2
5327
5327
  }) => {
5328
5328
  const deps = unwrapDependencies(dependencies);
5329
- const [results, exceptions] = concurrentRequests(get, deps);
5329
+ const [results, exceptions] = concurrentRequests(get2, deps);
5330
5330
  if (exceptions.some((exp) => !Recoil_isPromise(exp))) {
5331
5331
  return wrapLoadables(dependencies, results, exceptions);
5332
5332
  }
@@ -5350,10 +5350,10 @@
5350
5350
  Recoil_selectorFamily({
5351
5351
  key: "__waitForAll",
5352
5352
  get: (dependencies) => ({
5353
- get
5353
+ get: get2
5354
5354
  }) => {
5355
5355
  const deps = unwrapDependencies(dependencies);
5356
- const [results, exceptions] = concurrentRequests(get, deps);
5356
+ const [results, exceptions] = concurrentRequests(get2, deps);
5357
5357
  if (exceptions.every((exp) => exp == null)) {
5358
5358
  return wrapResults(dependencies, results);
5359
5359
  }
@@ -5368,10 +5368,10 @@
5368
5368
  Recoil_selectorFamily({
5369
5369
  key: "__waitForAllSettled",
5370
5370
  get: (dependencies) => ({
5371
- get
5371
+ get: get2
5372
5372
  }) => {
5373
5373
  const deps = unwrapDependencies(dependencies);
5374
- const [results, exceptions] = concurrentRequests(get, deps);
5374
+ const [results, exceptions] = concurrentRequests(get2, deps);
5375
5375
  if (exceptions.every((exp) => !Recoil_isPromise(exp))) {
5376
5376
  return wrapLoadables(dependencies, results, exceptions);
5377
5377
  }
@@ -5388,10 +5388,10 @@
5388
5388
  Recoil_selectorFamily({
5389
5389
  key: "__noWait",
5390
5390
  get: (dependency) => ({
5391
- get
5391
+ get: get2
5392
5392
  }) => {
5393
5393
  try {
5394
- return Recoil_selector.value(loadableWithValue$4(get(dependency)));
5394
+ return Recoil_selector.value(loadableWithValue$4(get2(dependency)));
5395
5395
  } catch (exception) {
5396
5396
  return Recoil_selector.value(Recoil_isPromise(exception) ? loadableWithPromise$3(exception) : loadableWithError$3(exception));
5397
5397
  }
@@ -6651,7 +6651,7 @@
6651
6651
  return cb(config$2);
6652
6652
  });
6653
6653
  },
6654
- get: function get() {
6654
+ get: function get2() {
6655
6655
  return _config.cssPrefix;
6656
6656
  }
6657
6657
  });
@@ -13387,11 +13387,11 @@
13387
13387
  if (hasRequiredGet) return get_1;
13388
13388
  hasRequiredGet = 1;
13389
13389
  var baseGet = require_baseGet();
13390
- function get(object2, path, defaultValue) {
13390
+ function get2(object2, path, defaultValue) {
13391
13391
  var result = object2 == null ? void 0 : baseGet(object2, path);
13392
13392
  return result === void 0 ? defaultValue : result;
13393
13393
  }
13394
- get_1 = get;
13394
+ get_1 = get2;
13395
13395
  return get_1;
13396
13396
  }
13397
13397
  var _baseHasIn;
@@ -13447,14 +13447,14 @@
13447
13447
  function require_baseMatchesProperty() {
13448
13448
  if (hasRequired_baseMatchesProperty) return _baseMatchesProperty;
13449
13449
  hasRequired_baseMatchesProperty = 1;
13450
- var baseIsEqual = require_baseIsEqual(), get = requireGet(), hasIn = requireHasIn(), isKey = require_isKey(), isStrictComparable = require_isStrictComparable(), matchesStrictComparable = require_matchesStrictComparable(), toKey = require_toKey();
13450
+ var baseIsEqual = require_baseIsEqual(), get2 = requireGet(), hasIn = requireHasIn(), isKey = require_isKey(), isStrictComparable = require_isStrictComparable(), matchesStrictComparable = require_matchesStrictComparable(), toKey = require_toKey();
13451
13451
  var COMPARE_PARTIAL_FLAG = 1, COMPARE_UNORDERED_FLAG = 2;
13452
13452
  function baseMatchesProperty(path, srcValue) {
13453
13453
  if (isKey(path) && isStrictComparable(srcValue)) {
13454
13454
  return matchesStrictComparable(toKey(path), srcValue);
13455
13455
  }
13456
13456
  return function(object2) {
13457
- var objValue = get(object2, path);
13457
+ var objValue = get2(object2, path);
13458
13458
  return objValue === void 0 && objValue === srcValue ? hasIn(object2, path) : baseIsEqual(srcValue, objValue, COMPARE_PARTIAL_FLAG | COMPARE_UNORDERED_FLAG);
13459
13459
  };
13460
13460
  }
@@ -14019,10 +14019,10 @@
14019
14019
  };
14020
14020
  }
14021
14021
  /*!
14022
- * tabbable 6.3.0
14022
+ * tabbable 6.4.0
14023
14023
  * @license MIT, https://github.com/focus-trap/tabbable/blob/master/LICENSE
14024
14024
  */
14025
- var candidateSelectors = ["input:not([inert])", "select:not([inert])", "textarea:not([inert])", "a[href]:not([inert])", "button:not([inert])", "[tabindex]:not(slot):not([inert])", "audio[controls]:not([inert])", "video[controls]:not([inert])", '[contenteditable]:not([contenteditable="false"]):not([inert])', "details>summary:first-of-type:not([inert])", "details:not([inert])"];
14025
+ var candidateSelectors = ["input:not([inert]):not([inert] *)", "select:not([inert]):not([inert] *)", "textarea:not([inert]):not([inert] *)", "a[href]:not([inert]):not([inert] *)", "button:not([inert]):not([inert] *)", "[tabindex]:not(slot):not([inert]):not([inert] *)", "audio[controls]:not([inert]):not([inert] *)", "video[controls]:not([inert]):not([inert] *)", '[contenteditable]:not([contenteditable="false"]):not([inert]):not([inert] *)', "details>summary:first-of-type:not([inert]):not([inert] *)", "details:not([inert]):not([inert] *)"];
14026
14026
  var candidateSelector = /* @__PURE__ */ candidateSelectors.join(",");
14027
14027
  var NoElement = typeof Element === "undefined";
14028
14028
  var matches = NoElement ? function() {
@@ -14040,7 +14040,9 @@
14040
14040
  }
14041
14041
  var inertAtt = node === null || node === void 0 ? void 0 : (_node$getAttribute = node.getAttribute) === null || _node$getAttribute === void 0 ? void 0 : _node$getAttribute.call(node, "inert");
14042
14042
  var inert = inertAtt === "" || inertAtt === "true";
14043
- var result = inert || lookUp && node && _isInert(node.parentNode);
14043
+ var result = inert || lookUp && node && // closest does not exist on shadow roots, so we fall back to a manual
14044
+ // lookup upward, in case it is not defined.
14045
+ (typeof node.closest === "function" ? node.closest("[inert]") : _isInert(node.parentNode));
14044
14046
  return result;
14045
14047
  };
14046
14048
  var isContentEditable = function isContentEditable2(node) {
@@ -14274,10 +14276,7 @@
14274
14276
  return false;
14275
14277
  };
14276
14278
  var isNodeMatchingSelectorFocusable = function isNodeMatchingSelectorFocusable2(options, node) {
14277
- if (node.disabled || // we must do an inert look up to filter out any elements inside an inert ancestor
14278
- // because we're limited in the type of selectors we can use in JSDom (see related
14279
- // note related to `candidateSelectors`)
14280
- _isInert(node) || isHiddenInput(node) || isHidden(node, options) || // For a details element with a summary, the summary element gets the focus
14279
+ if (node.disabled || isHiddenInput(node) || isHidden(node, options) || // For a details element with a summary, the summary element gets the focus
14281
14280
  isDetailsWithSummary(node) || isDisabledFromFieldset(node)) {
14282
14281
  return false;
14283
14282
  }
@@ -14391,6 +14390,62 @@
14391
14390
  }
14392
14391
  return coords;
14393
14392
  }
14393
+ async function detectOverflow$1(state, options) {
14394
+ var _await$platform$isEle;
14395
+ if (options === void 0) {
14396
+ options = {};
14397
+ }
14398
+ const {
14399
+ x,
14400
+ y,
14401
+ platform: platform2,
14402
+ rects,
14403
+ elements,
14404
+ strategy
14405
+ } = state;
14406
+ const {
14407
+ boundary = "clippingAncestors",
14408
+ rootBoundary = "viewport",
14409
+ elementContext = "floating",
14410
+ altBoundary = false,
14411
+ padding = 0
14412
+ } = evaluate(options, state);
14413
+ const paddingObject = getPaddingObject(padding);
14414
+ const altContext = elementContext === "floating" ? "reference" : "floating";
14415
+ const element = elements[altBoundary ? altContext : elementContext];
14416
+ const clippingClientRect = rectToClientRect$1(await platform2.getClippingRect({
14417
+ element: ((_await$platform$isEle = await (platform2.isElement == null ? void 0 : platform2.isElement(element))) != null ? _await$platform$isEle : true) ? element : element.contextElement || await (platform2.getDocumentElement == null ? void 0 : platform2.getDocumentElement(elements.floating)),
14418
+ boundary,
14419
+ rootBoundary,
14420
+ strategy
14421
+ }));
14422
+ const rect = elementContext === "floating" ? {
14423
+ x,
14424
+ y,
14425
+ width: rects.floating.width,
14426
+ height: rects.floating.height
14427
+ } : rects.reference;
14428
+ const offsetParent = await (platform2.getOffsetParent == null ? void 0 : platform2.getOffsetParent(elements.floating));
14429
+ const offsetScale = await (platform2.isElement == null ? void 0 : platform2.isElement(offsetParent)) ? await (platform2.getScale == null ? void 0 : platform2.getScale(offsetParent)) || {
14430
+ x: 1,
14431
+ y: 1
14432
+ } : {
14433
+ x: 1,
14434
+ y: 1
14435
+ };
14436
+ const elementClientRect = rectToClientRect$1(platform2.convertOffsetParentRelativeRectToViewportRelativeRect ? await platform2.convertOffsetParentRelativeRectToViewportRelativeRect({
14437
+ elements,
14438
+ rect,
14439
+ offsetParent,
14440
+ strategy
14441
+ }) : rect);
14442
+ return {
14443
+ top: (clippingClientRect.top - elementClientRect.top + paddingObject.top) / offsetScale.y,
14444
+ bottom: (elementClientRect.bottom - clippingClientRect.bottom + paddingObject.bottom) / offsetScale.y,
14445
+ left: (clippingClientRect.left - elementClientRect.left + paddingObject.left) / offsetScale.x,
14446
+ right: (elementClientRect.right - clippingClientRect.right + paddingObject.right) / offsetScale.x
14447
+ };
14448
+ }
14394
14449
  const computePosition$1 = async (reference2, floating, config2) => {
14395
14450
  const {
14396
14451
  placement = "bottom",
@@ -14413,6 +14468,7 @@
14413
14468
  let middlewareData = {};
14414
14469
  let resetCount = 0;
14415
14470
  for (let i2 = 0; i2 < validMiddleware.length; i2++) {
14471
+ var _platform$detectOverf;
14416
14472
  const {
14417
14473
  name,
14418
14474
  fn
@@ -14430,7 +14486,10 @@
14430
14486
  strategy,
14431
14487
  middlewareData,
14432
14488
  rects,
14433
- platform: platform2,
14489
+ platform: {
14490
+ ...platform2,
14491
+ detectOverflow: (_platform$detectOverf = platform2.detectOverflow) != null ? _platform$detectOverf : detectOverflow$1
14492
+ },
14434
14493
  elements: {
14435
14494
  reference: reference2,
14436
14495
  floating
@@ -14474,62 +14533,6 @@
14474
14533
  middlewareData
14475
14534
  };
14476
14535
  };
14477
- async function detectOverflow$1(state, options) {
14478
- var _await$platform$isEle;
14479
- if (options === void 0) {
14480
- options = {};
14481
- }
14482
- const {
14483
- x,
14484
- y,
14485
- platform: platform2,
14486
- rects,
14487
- elements,
14488
- strategy
14489
- } = state;
14490
- const {
14491
- boundary = "clippingAncestors",
14492
- rootBoundary = "viewport",
14493
- elementContext = "floating",
14494
- altBoundary = false,
14495
- padding = 0
14496
- } = evaluate(options, state);
14497
- const paddingObject = getPaddingObject(padding);
14498
- const altContext = elementContext === "floating" ? "reference" : "floating";
14499
- const element = elements[altBoundary ? altContext : elementContext];
14500
- const clippingClientRect = rectToClientRect$1(await platform2.getClippingRect({
14501
- element: ((_await$platform$isEle = await (platform2.isElement == null ? void 0 : platform2.isElement(element))) != null ? _await$platform$isEle : true) ? element : element.contextElement || await (platform2.getDocumentElement == null ? void 0 : platform2.getDocumentElement(elements.floating)),
14502
- boundary,
14503
- rootBoundary,
14504
- strategy
14505
- }));
14506
- const rect = elementContext === "floating" ? {
14507
- x,
14508
- y,
14509
- width: rects.floating.width,
14510
- height: rects.floating.height
14511
- } : rects.reference;
14512
- const offsetParent = await (platform2.getOffsetParent == null ? void 0 : platform2.getOffsetParent(elements.floating));
14513
- const offsetScale = await (platform2.isElement == null ? void 0 : platform2.isElement(offsetParent)) ? await (platform2.getScale == null ? void 0 : platform2.getScale(offsetParent)) || {
14514
- x: 1,
14515
- y: 1
14516
- } : {
14517
- x: 1,
14518
- y: 1
14519
- };
14520
- const elementClientRect = rectToClientRect$1(platform2.convertOffsetParentRelativeRectToViewportRelativeRect ? await platform2.convertOffsetParentRelativeRectToViewportRelativeRect({
14521
- elements,
14522
- rect,
14523
- offsetParent,
14524
- strategy
14525
- }) : rect);
14526
- return {
14527
- top: (clippingClientRect.top - elementClientRect.top + paddingObject.top) / offsetScale.y,
14528
- bottom: (elementClientRect.bottom - clippingClientRect.bottom + paddingObject.bottom) / offsetScale.y,
14529
- left: (clippingClientRect.left - elementClientRect.left + paddingObject.left) / offsetScale.x,
14530
- right: (elementClientRect.right - clippingClientRect.right + paddingObject.right) / offsetScale.x
14531
- };
14532
- }
14533
14536
  const arrow$4 = (options) => ({
14534
14537
  name: "arrow",
14535
14538
  options,
@@ -14625,7 +14628,7 @@
14625
14628
  ...detectOverflowOptions
14626
14629
  } = evaluate(options, state);
14627
14630
  const placements$1$1 = alignment !== void 0 || allowedPlacements === placements$1 ? getPlacementList(alignment || null, autoAlignment, allowedPlacements) : allowedPlacements;
14628
- const overflow = await detectOverflow$1(state, detectOverflowOptions);
14631
+ const overflow = await platform2.detectOverflow(state, detectOverflowOptions);
14629
14632
  const currentIndex = ((_middlewareData$autoP = middlewareData.autoPlacement) == null ? void 0 : _middlewareData$autoP.index) || 0;
14630
14633
  const currentPlacement = placements$1$1[currentIndex];
14631
14634
  if (currentPlacement == null) {
@@ -14727,7 +14730,7 @@
14727
14730
  fallbackPlacements.push(...getOppositeAxisPlacements(initialPlacement, flipAlignment, fallbackAxisSideDirection, rtl));
14728
14731
  }
14729
14732
  const placements2 = [initialPlacement, ...fallbackPlacements];
14730
- const overflow = await detectOverflow$1(state, detectOverflowOptions);
14733
+ const overflow = await platform2.detectOverflow(state, detectOverflowOptions);
14731
14734
  const overflows = [];
14732
14735
  let overflowsData = ((_middlewareData$flip = middlewareData.flip) == null ? void 0 : _middlewareData$flip.overflows) || [];
14733
14736
  if (checkMainAxis) {
@@ -14876,7 +14879,8 @@
14876
14879
  const {
14877
14880
  x,
14878
14881
  y,
14879
- placement
14882
+ placement,
14883
+ platform: platform2
14880
14884
  } = state;
14881
14885
  const {
14882
14886
  mainAxis: checkMainAxis = true,
@@ -14899,7 +14903,7 @@
14899
14903
  x,
14900
14904
  y
14901
14905
  };
14902
- const overflow = await detectOverflow$1(state, detectOverflowOptions);
14906
+ const overflow = await platform2.detectOverflow(state, detectOverflowOptions);
14903
14907
  const crossAxis = getSideAxis(getSide(placement));
14904
14908
  const mainAxis = getOppositeAxis(crossAxis);
14905
14909
  let mainAxisCoord = coords[mainAxis];
@@ -14957,7 +14961,7 @@
14957
14961
  },
14958
14962
  ...detectOverflowOptions
14959
14963
  } = evaluate(options, state);
14960
- const overflow = await detectOverflow$1(state, detectOverflowOptions);
14964
+ const overflow = await platform2.detectOverflow(state, detectOverflowOptions);
14961
14965
  const side = getSide(placement);
14962
14966
  const alignment = getAlignment(placement);
14963
14967
  const isYAxis = getSideAxis(placement) === "y";
@@ -28021,7 +28025,7 @@
28021
28025
  }
28022
28026
  var passive2 = false;
28023
28027
  var options = Object.defineProperty({}, "passive", {
28024
- get: function get() {
28028
+ get: function get2() {
28025
28029
  passive2 = true;
28026
28030
  }
28027
28031
  });
@@ -33484,6 +33488,7 @@
33484
33488
  overflow: hidden;
33485
33489
  text-overflow: ellipsis;
33486
33490
  white-space: nowrap;
33491
+ font-size: ${(props) => props.size ? `${props.size}rem` : "1rem"};
33487
33492
  `;
33488
33493
  const SelectedItem = styled.div`
33489
33494
  overflow: hidden;
@@ -34529,6 +34534,7 @@
34529
34534
 
34530
34535
  font-weight: ${(props) => (props === null || props === void 0 ? void 0 : props.heading) ? "bold" : "normal"};
34531
34536
  color: ${(props) => getTextColor(props === null || props === void 0 ? void 0 : props.heading, props.isSelected, props.theme)};
34537
+ font-size: ${(props) => props.size ? `${props.size}rem` : "1rem"};
34532
34538
 
34533
34539
  ${(props) => {
34534
34540
  if (props.heading) {
@@ -34554,13 +34560,13 @@
34554
34560
  return [...acc, item];
34555
34561
  }, []);
34556
34562
  }
34557
- const SectionedListItem = ({ item, index: index2, getItemProps, isSelected, isHighlighted }) => {
34563
+ const SectionedListItem = ({ item, index: index2, getItemProps, isSelected, isHighlighted, size: size2 }) => {
34558
34564
  const theme2 = useClTheme();
34559
34565
  const _a = getItemProps({ index: index2, item }), { itemClassName } = _a, itemProps = __rest$3(_a, ["itemClassName"]);
34560
34566
  if (item.heading) {
34561
34567
  delete itemProps.onClick;
34562
34568
  }
34563
- return jsxRuntimeExports.jsxs(ListItemSpan, Object.assign({}, itemProps, { heading: item.heading, section: item.section, isSelected, title: item.label, item, index: index2, isHighlighted, children: [item.label || item.section, item.badge && jsxRuntimeExports.jsx(Badge, { color: item.badge.color || theme2.colors.primary, children: item.badge.label })] }));
34569
+ return jsxRuntimeExports.jsxs(ListItemSpan, Object.assign({}, itemProps, { heading: item.heading, section: item.section, isSelected, title: item.label, item, index: index2, size: size2, isHighlighted, children: [item.label || item.section, item.badge && jsxRuntimeExports.jsx(Badge, { color: item.badge.color || theme2.colors.primary, children: item.badge.label })] }));
34564
34570
  };
34565
34571
  function SectionedList(props) {
34566
34572
  var _a, _b, _c;
@@ -34652,8 +34658,8 @@
34652
34658
  const role = useRole(context, { role: "listbox" });
34653
34659
  const { getReferenceProps, getFloatingProps } = useInteractions([role]);
34654
34660
  const dropdownStyle = React$1.useMemo(() => Object.assign(Object.assign({}, floatingStyles), { marginLeft: -1 }), [floatingStyles]);
34655
- const renderListItem = React$1.useCallback((item, index2) => jsxRuntimeExports.jsx(SectionedListItem, { item, index: index2, getItemProps, isSelected: (selectedItem === null || selectedItem === void 0 ? void 0 : selectedItem.value) === item.value, isHighlighted: isOpen && kbdHighlightIdx !== void 0 && kbdHighlightIdx === index2 }, `item-${index2}-${isOpen && (selectedItem === null || selectedItem === void 0 ? void 0 : selectedItem.label) === item.label}`), [getItemProps, selectedItem, isOpen, kbdHighlightIdx]);
34656
- return jsxRuntimeExports.jsxs(Wrapper$6, { className: props.className, isDisabled: props.disabled, isErrored: false, isOpen, style: props.style, id: props.id, children: [jsxRuntimeExports.jsxs(InputWrapper$2, { disabled: props.disabled, isOpen, ref: refs.setReference, children: [jsxRuntimeExports.jsx(Input, Object.assign({}, getInputProps({ value: inputValue }), getReferenceProps())), jsxRuntimeExports.jsx(ChevronButton$1, { disabled: props.disabled, isOpen, getToggleButtonProps })] }), ReactDOM.createPortal(jsxRuntimeExports.jsx(DropdownList$1, { items, getItemProps, getFloatingProps, style: dropdownStyle, isOpen, getMenuProps, ref: refs.setFloating, kbdHighlightIdx, children: renderListItem }), document.body)] });
34661
+ const renderListItem = React$1.useCallback((item, index2) => jsxRuntimeExports.jsx(SectionedListItem, { item, index: index2, getItemProps, size: props.size, isSelected: (selectedItem === null || selectedItem === void 0 ? void 0 : selectedItem.value) === item.value, isHighlighted: isOpen && kbdHighlightIdx !== void 0 && kbdHighlightIdx === index2 }, `item-${index2}-${isOpen && (selectedItem === null || selectedItem === void 0 ? void 0 : selectedItem.label) === item.label}`), [getItemProps, selectedItem, isOpen, kbdHighlightIdx, props.size]);
34662
+ return jsxRuntimeExports.jsxs(Wrapper$6, { className: props.className, isDisabled: props.disabled, isErrored: false, isOpen, style: props.style, id: props.id, children: [jsxRuntimeExports.jsxs(InputWrapper$2, { disabled: props.disabled, isOpen, ref: refs.setReference, children: [jsxRuntimeExports.jsx(Input, Object.assign({}, getInputProps({ value: inputValue }), getReferenceProps(), { size: props.size })), jsxRuntimeExports.jsx(ChevronButton$1, { disabled: props.disabled, isOpen, getToggleButtonProps })] }), ReactDOM.createPortal(jsxRuntimeExports.jsx(DropdownList$1, { items, getItemProps, getFloatingProps, style: dropdownStyle, isOpen, size: props.size, getMenuProps, ref: refs.setFloating, kbdHighlightIdx, children: renderListItem }), document.body)] });
34657
34663
  }
34658
34664
  var toInteger_1;
34659
34665
  var hasRequiredToInteger;
@@ -34704,20 +34710,6 @@
34704
34710
  requireRound();
34705
34711
  const $f0a04ccd8dbdd83b$export$e5c5a5f917a5871c = typeof document !== "undefined" ? React$1.useLayoutEffect : () => {
34706
34712
  };
34707
- var $8ae05eaa5c114e9c$var$_React_useInsertionEffect;
34708
- const $8ae05eaa5c114e9c$var$useEarlyEffect = ($8ae05eaa5c114e9c$var$_React_useInsertionEffect = React$1["useInsertionEffect"]) !== null && $8ae05eaa5c114e9c$var$_React_useInsertionEffect !== void 0 ? $8ae05eaa5c114e9c$var$_React_useInsertionEffect : $f0a04ccd8dbdd83b$export$e5c5a5f917a5871c;
34709
- function $8ae05eaa5c114e9c$export$7f54fc3180508a52(fn) {
34710
- const ref = React$1.useRef(null);
34711
- $8ae05eaa5c114e9c$var$useEarlyEffect(() => {
34712
- ref.current = fn;
34713
- }, [
34714
- fn
34715
- ]);
34716
- return React$1.useCallback((...args) => {
34717
- const f = ref.current;
34718
- return f === null || f === void 0 ? void 0 : f(...args);
34719
- }, []);
34720
- }
34721
34713
  const $b5e257d569688ac6$var$defaultContext = {
34722
34714
  prefix: String(Math.round(Math.random() * 1e10)),
34723
34715
  current: 0
@@ -34995,7 +34987,7 @@
34995
34987
  function $65484d02dcb7eb3e$export$457c3d6518dd4c6f(props, opts = {}) {
34996
34988
  let { labelable, isLink, global: global2, events = global2, propNames } = opts;
34997
34989
  let filteredProps = {};
34998
- for (const prop in props) if (Object.prototype.hasOwnProperty.call(props, prop) && ($65484d02dcb7eb3e$var$DOMPropNames.has(prop) || labelable && $65484d02dcb7eb3e$var$labelablePropNames.has(prop) || isLink && $65484d02dcb7eb3e$var$linkPropNames.has(prop) || global2 && $65484d02dcb7eb3e$var$globalAttrs.has(prop) || events && $65484d02dcb7eb3e$var$globalEvents.has(prop) || prop.endsWith("Capture") && $65484d02dcb7eb3e$var$globalEvents.has(prop.slice(0, -7)) || (propNames === null || propNames === void 0 ? void 0 : propNames.has(prop)) || $65484d02dcb7eb3e$var$propRe.test(prop))) filteredProps[prop] = props[prop];
34990
+ for (const prop in props) if (Object.prototype.hasOwnProperty.call(props, prop) && ($65484d02dcb7eb3e$var$DOMPropNames.has(prop) || labelable && $65484d02dcb7eb3e$var$labelablePropNames.has(prop) || isLink && $65484d02dcb7eb3e$var$linkPropNames.has(prop) || global2 && $65484d02dcb7eb3e$var$globalAttrs.has(prop) || events && ($65484d02dcb7eb3e$var$globalEvents.has(prop) || prop.endsWith("Capture") && $65484d02dcb7eb3e$var$globalEvents.has(prop.slice(0, -7))) || (propNames === null || propNames === void 0 ? void 0 : propNames.has(prop)) || $65484d02dcb7eb3e$var$propRe.test(prop))) filteredProps[prop] = props[prop];
34999
34991
  return filteredProps;
35000
34992
  }
35001
34993
  function $7215afc6de606d6b$export$de79e2c695e052f3(element) {
@@ -35080,9 +35072,46 @@
35080
35072
  const $c87311424ea30a05$export$fedb369cb70207f1 = $c87311424ea30a05$var$cached(function() {
35081
35073
  return $c87311424ea30a05$export$186c6964ca17d99() || $c87311424ea30a05$export$7bef049ce92e4224();
35082
35074
  });
35075
+ const $c87311424ea30a05$export$78551043582a6a98 = $c87311424ea30a05$var$cached(function() {
35076
+ return $c87311424ea30a05$var$testUserAgent(/AppleWebKit/i) && !$c87311424ea30a05$export$6446a186d09e379e();
35077
+ });
35078
+ const $c87311424ea30a05$export$6446a186d09e379e = $c87311424ea30a05$var$cached(function() {
35079
+ return $c87311424ea30a05$var$testUserAgent(/Chrome/i);
35080
+ });
35083
35081
  const $c87311424ea30a05$export$a11b0059900ceec8 = $c87311424ea30a05$var$cached(function() {
35084
35082
  return $c87311424ea30a05$var$testUserAgent(/Android/i);
35085
35083
  });
35084
+ const $c87311424ea30a05$export$b7d78993b74f766d = $c87311424ea30a05$var$cached(function() {
35085
+ return $c87311424ea30a05$var$testUserAgent(/Firefox/i);
35086
+ });
35087
+ function $ea8dcbcb9ea1b556$export$95185d699e05d4d7(target, modifiers, setOpening = true) {
35088
+ var _window_event_type, _window_event;
35089
+ let { metaKey, ctrlKey, altKey, shiftKey } = modifiers;
35090
+ if ($c87311424ea30a05$export$b7d78993b74f766d() && ((_window_event = window.event) === null || _window_event === void 0 ? void 0 : (_window_event_type = _window_event.type) === null || _window_event_type === void 0 ? void 0 : _window_event_type.startsWith("key")) && target.target === "_blank") {
35091
+ if ($c87311424ea30a05$export$9ac100e40613ea10()) metaKey = true;
35092
+ else ctrlKey = true;
35093
+ }
35094
+ let event = $c87311424ea30a05$export$78551043582a6a98() && $c87311424ea30a05$export$9ac100e40613ea10() && !$c87311424ea30a05$export$7bef049ce92e4224() && true ? new KeyboardEvent("keydown", {
35095
+ keyIdentifier: "Enter",
35096
+ metaKey,
35097
+ ctrlKey,
35098
+ altKey,
35099
+ shiftKey
35100
+ }) : new MouseEvent("click", {
35101
+ metaKey,
35102
+ ctrlKey,
35103
+ altKey,
35104
+ shiftKey,
35105
+ detail: 1,
35106
+ bubbles: true,
35107
+ cancelable: true
35108
+ });
35109
+ $ea8dcbcb9ea1b556$export$95185d699e05d4d7.isOpening = setOpening;
35110
+ $7215afc6de606d6b$export$de79e2c695e052f3(target);
35111
+ target.dispatchEvent(event);
35112
+ $ea8dcbcb9ea1b556$export$95185d699e05d4d7.isOpening = false;
35113
+ }
35114
+ $ea8dcbcb9ea1b556$export$95185d699e05d4d7.isOpening = false;
35086
35115
  let $bbed8b41f857bcc0$var$transitionsByElement = /* @__PURE__ */ new Map();
35087
35116
  let $bbed8b41f857bcc0$var$transitionCallbacks = /* @__PURE__ */ new Set();
35088
35117
  function $bbed8b41f857bcc0$var$setupGlobalEvents() {
@@ -35228,6 +35257,20 @@
35228
35257
  refEffect
35229
35258
  ]);
35230
35259
  }
35260
+ var $8ae05eaa5c114e9c$var$_React_useInsertionEffect;
35261
+ const $8ae05eaa5c114e9c$var$useEarlyEffect = ($8ae05eaa5c114e9c$var$_React_useInsertionEffect = React$1["useInsertionEffect"]) !== null && $8ae05eaa5c114e9c$var$_React_useInsertionEffect !== void 0 ? $8ae05eaa5c114e9c$var$_React_useInsertionEffect : $f0a04ccd8dbdd83b$export$e5c5a5f917a5871c;
35262
+ function $8ae05eaa5c114e9c$export$7f54fc3180508a52(fn) {
35263
+ const ref = React$1.useRef(null);
35264
+ $8ae05eaa5c114e9c$var$useEarlyEffect(() => {
35265
+ ref.current = fn;
35266
+ }, [
35267
+ fn
35268
+ ]);
35269
+ return React$1.useCallback((...args) => {
35270
+ const f = ref.current;
35271
+ return f === null || f === void 0 ? void 0 : f(...args);
35272
+ }, []);
35273
+ }
35231
35274
  function $e7801be82b4b2a53$export$4debdb1a3f0fa79e(context, ref) {
35232
35275
  $f0a04ccd8dbdd83b$export$e5c5a5f917a5871c(() => {
35233
35276
  if (context && context.ref && ref) {
@@ -35255,12 +35298,15 @@
35255
35298
  form === null || form === void 0 ? void 0 : form.removeEventListener("reset", handleReset2);
35256
35299
  };
35257
35300
  }, [
35258
- ref,
35259
- handleReset2
35301
+ ref
35260
35302
  ]);
35261
35303
  }
35304
+ var $458b0a5536c1a7cf$var$_React_useInsertionEffect;
35305
+ const $458b0a5536c1a7cf$var$useEarlyEffect = typeof document !== "undefined" ? ($458b0a5536c1a7cf$var$_React_useInsertionEffect = React$1["useInsertionEffect"]) !== null && $458b0a5536c1a7cf$var$_React_useInsertionEffect !== void 0 ? $458b0a5536c1a7cf$var$_React_useInsertionEffect : React$1.useLayoutEffect : () => {
35306
+ };
35262
35307
  function $458b0a5536c1a7cf$export$40bfa8c7b0832715(value, defaultValue, onChange2) {
35263
35308
  let [stateValue, setStateValue] = React$1.useState(value || defaultValue);
35309
+ let valueRef = React$1.useRef(stateValue);
35264
35310
  let isControlledRef = React$1.useRef(value !== void 0);
35265
35311
  let isControlled = value !== void 0;
35266
35312
  React$1.useEffect(() => {
@@ -35270,29 +35316,19 @@
35270
35316
  isControlled
35271
35317
  ]);
35272
35318
  let currentValue = isControlled ? value : stateValue;
35319
+ $458b0a5536c1a7cf$var$useEarlyEffect(() => {
35320
+ valueRef.current = currentValue;
35321
+ });
35322
+ let [, forceUpdate] = React$1.useReducer(() => ({}), {});
35273
35323
  let setValue = React$1.useCallback((value2, ...args) => {
35274
- let onChangeCaller = (value3, ...onChangeArgs) => {
35275
- if (onChange2) {
35276
- if (!Object.is(currentValue, value3)) onChange2(value3, ...onChangeArgs);
35277
- }
35278
- if (!isControlled)
35279
- currentValue = value3;
35280
- };
35281
- if (typeof value2 === "function") {
35282
- let updateFunction = (oldValue, ...functionArgs) => {
35283
- let interceptedValue = value2(isControlled ? currentValue : oldValue, ...functionArgs);
35284
- onChangeCaller(interceptedValue, ...args);
35285
- if (!isControlled) return interceptedValue;
35286
- return oldValue;
35287
- };
35288
- setStateValue(updateFunction);
35289
- } else {
35290
- if (!isControlled) setStateValue(value2);
35291
- onChangeCaller(value2, ...args);
35324
+ let newValue = typeof value2 === "function" ? value2(valueRef.current) : value2;
35325
+ if (!Object.is(valueRef.current, newValue)) {
35326
+ valueRef.current = newValue;
35327
+ setStateValue(newValue);
35328
+ forceUpdate();
35329
+ onChange2 === null || onChange2 === void 0 ? void 0 : onChange2(newValue, ...args);
35292
35330
  }
35293
35331
  }, [
35294
- isControlled,
35295
- currentValue,
35296
35332
  onChange2
35297
35333
  ]);
35298
35334
  return [
@@ -35522,10 +35558,13 @@
35522
35558
  if ($1e5a04cdaf7d1af8$var$listeners.size === 0) window.removeEventListener("languagechange", $1e5a04cdaf7d1af8$var$updateLocale);
35523
35559
  };
35524
35560
  }, []);
35525
- if (isSSR2) return {
35526
- locale: "en-US",
35527
- direction: "ltr"
35528
- };
35561
+ if (isSSR2) {
35562
+ let locale2 = typeof window !== "undefined" && window[$1e5a04cdaf7d1af8$var$localeSymbol];
35563
+ return {
35564
+ locale: locale2 || "en-US",
35565
+ direction: "ltr"
35566
+ };
35567
+ }
35529
35568
  return defaultLocale;
35530
35569
  }
35531
35570
  const $18f2051aff69b9bf$var$I18nContext = /* @__PURE__ */ React$1.createContext(null);
@@ -35709,9 +35748,6 @@
35709
35748
  }
35710
35749
  };
35711
35750
  }, []);
35712
- let dispatchBlur = $8ae05eaa5c114e9c$export$7f54fc3180508a52((e2) => {
35713
- onBlur === null || onBlur === void 0 ? void 0 : onBlur(e2);
35714
- });
35715
35751
  return React$1.useCallback((e2) => {
35716
35752
  if (e2.target instanceof HTMLButtonElement || e2.target instanceof HTMLInputElement || e2.target instanceof HTMLTextAreaElement || e2.target instanceof HTMLSelectElement) {
35717
35753
  stateRef.current.isFocused = true;
@@ -35720,7 +35756,7 @@
35720
35756
  stateRef.current.isFocused = false;
35721
35757
  if (target.disabled) {
35722
35758
  let event = $8a9cb279dc87e130$export$525bc4921d56d4a(e3);
35723
- dispatchBlur(event);
35759
+ onBlur === null || onBlur === void 0 ? void 0 : onBlur(event);
35724
35760
  }
35725
35761
  if (stateRef.current.observer) {
35726
35762
  stateRef.current.observer.disconnect();
@@ -35752,7 +35788,7 @@
35752
35788
  });
35753
35789
  }
35754
35790
  }, [
35755
- dispatchBlur
35791
+ onBlur
35756
35792
  ]);
35757
35793
  }
35758
35794
  let $8a9cb279dc87e130$export$fda7da73ab5d4c48 = false;
@@ -35814,20 +35850,21 @@
35814
35850
  }
35815
35851
  function $507fabe10e71c6fb$var$handleKeyboardEvent(e2) {
35816
35852
  $507fabe10e71c6fb$var$hasEventBeforeFocus = true;
35817
- if ($507fabe10e71c6fb$var$isValidKey(e2)) {
35853
+ if (!$ea8dcbcb9ea1b556$export$95185d699e05d4d7.isOpening && $507fabe10e71c6fb$var$isValidKey(e2)) {
35818
35854
  $507fabe10e71c6fb$var$currentModality = "keyboard";
35819
35855
  $507fabe10e71c6fb$var$triggerChangeHandlers("keyboard", e2);
35820
35856
  }
35821
35857
  }
35822
35858
  function $507fabe10e71c6fb$var$handlePointerEvent(e2) {
35823
35859
  $507fabe10e71c6fb$var$currentModality = "pointer";
35860
+ "pointerType" in e2 ? e2.pointerType : "mouse";
35824
35861
  if (e2.type === "mousedown" || e2.type === "pointerdown") {
35825
35862
  $507fabe10e71c6fb$var$hasEventBeforeFocus = true;
35826
35863
  $507fabe10e71c6fb$var$triggerChangeHandlers("pointer", e2);
35827
35864
  }
35828
35865
  }
35829
35866
  function $507fabe10e71c6fb$var$handleClickEvent(e2) {
35830
- if ($6a7db85432448f7f$export$60278871457622de(e2)) {
35867
+ if (!$ea8dcbcb9ea1b556$export$95185d699e05d4d7.isOpening && $6a7db85432448f7f$export$60278871457622de(e2)) {
35831
35868
  $507fabe10e71c6fb$var$hasEventBeforeFocus = true;
35832
35869
  $507fabe10e71c6fb$var$currentModality = "virtual";
35833
35870
  }
@@ -35949,11 +35986,11 @@
35949
35986
  }
35950
35987
  function $3ad3f6e1647bc98d$export$80f3e147d781571c(element) {
35951
35988
  const ownerDocument = $431fbd86ca7dc216$export$b204af158042fbac(element);
35952
- const activeElement2 = $d4ee10de306f2510$export$cd4e5573fbe2b576(ownerDocument);
35953
35989
  if ($507fabe10e71c6fb$export$630ff653c5ada6a9() === "virtual") {
35954
- let lastFocusedElement = activeElement2;
35990
+ let lastFocusedElement = $d4ee10de306f2510$export$cd4e5573fbe2b576(ownerDocument);
35955
35991
  $bbed8b41f857bcc0$export$24490316f764c430(() => {
35956
- if ($d4ee10de306f2510$export$cd4e5573fbe2b576(ownerDocument) === lastFocusedElement && element.isConnected) $7215afc6de606d6b$export$de79e2c695e052f3(element);
35992
+ const activeElement2 = $d4ee10de306f2510$export$cd4e5573fbe2b576(ownerDocument);
35993
+ if ((activeElement2 === lastFocusedElement || activeElement2 === ownerDocument.body) && element.isConnected) $7215afc6de606d6b$export$de79e2c695e052f3(element);
35957
35994
  });
35958
35995
  } else $7215afc6de606d6b$export$de79e2c695e052f3(element);
35959
35996
  }
@@ -36230,7 +36267,7 @@
36230
36267
  id: null
36231
36268
  });
36232
36269
  let { addGlobalListener, removeGlobalListener } = $03deb23ff14920c4$export$4eaf04e54aa8eed6();
36233
- let move = $8ae05eaa5c114e9c$export$7f54fc3180508a52((originalEvent, pointerType, deltaX, deltaY) => {
36270
+ let move = React$1.useCallback((originalEvent, pointerType, deltaX, deltaY) => {
36234
36271
  if (deltaX === 0 && deltaY === 0) return;
36235
36272
  if (!state.current.didMove) {
36236
36273
  state.current.didMove = true;
@@ -36253,8 +36290,13 @@
36253
36290
  ctrlKey: originalEvent.ctrlKey,
36254
36291
  altKey: originalEvent.altKey
36255
36292
  });
36256
- });
36257
- let end2 = $8ae05eaa5c114e9c$export$7f54fc3180508a52((originalEvent, pointerType) => {
36293
+ }, [
36294
+ onMoveStart,
36295
+ onMove,
36296
+ state
36297
+ ]);
36298
+ let moveEvent = $8ae05eaa5c114e9c$export$7f54fc3180508a52(move);
36299
+ let end2 = React$1.useCallback((originalEvent, pointerType) => {
36258
36300
  $14c0b72509d70225$export$b0d6fa1ab32e3295();
36259
36301
  if (state.current.didMove) onMoveEnd === null || onMoveEnd === void 0 ? void 0 : onMoveEnd({
36260
36302
  type: "moveend",
@@ -36264,20 +36306,20 @@
36264
36306
  ctrlKey: originalEvent.ctrlKey,
36265
36307
  altKey: originalEvent.altKey
36266
36308
  });
36267
- });
36268
- let moveProps = React$1.useMemo(() => {
36269
- let moveProps2 = {};
36270
- let start2 = () => {
36271
- $14c0b72509d70225$export$16a4697467175487();
36272
- state.current.didMove = false;
36273
- };
36274
- {
36309
+ }, [
36310
+ onMoveEnd,
36311
+ state
36312
+ ]);
36313
+ let endEvent = $8ae05eaa5c114e9c$export$7f54fc3180508a52(end2);
36314
+ let [pointerDown, setPointerDown] = React$1.useState(null);
36315
+ $f0a04ccd8dbdd83b$export$e5c5a5f917a5871c(() => {
36316
+ if (pointerDown === "pointer") {
36275
36317
  let onPointerMove = (e2) => {
36276
36318
  if (e2.pointerId === state.current.id) {
36277
36319
  var _state_current_lastPosition, _state_current_lastPosition1;
36278
36320
  let pointerType = e2.pointerType || "mouse";
36279
36321
  var _state_current_lastPosition_pageX, _state_current_lastPosition_pageY;
36280
- move(e2, pointerType, e2.pageX - ((_state_current_lastPosition_pageX = (_state_current_lastPosition = state.current.lastPosition) === null || _state_current_lastPosition === void 0 ? void 0 : _state_current_lastPosition.pageX) !== null && _state_current_lastPosition_pageX !== void 0 ? _state_current_lastPosition_pageX : 0), e2.pageY - ((_state_current_lastPosition_pageY = (_state_current_lastPosition1 = state.current.lastPosition) === null || _state_current_lastPosition1 === void 0 ? void 0 : _state_current_lastPosition1.pageY) !== null && _state_current_lastPosition_pageY !== void 0 ? _state_current_lastPosition_pageY : 0));
36322
+ moveEvent(e2, pointerType, e2.pageX - ((_state_current_lastPosition_pageX = (_state_current_lastPosition = state.current.lastPosition) === null || _state_current_lastPosition === void 0 ? void 0 : _state_current_lastPosition.pageX) !== null && _state_current_lastPosition_pageX !== void 0 ? _state_current_lastPosition_pageX : 0), e2.pageY - ((_state_current_lastPosition_pageY = (_state_current_lastPosition1 = state.current.lastPosition) === null || _state_current_lastPosition1 === void 0 ? void 0 : _state_current_lastPosition1.pageY) !== null && _state_current_lastPosition_pageY !== void 0 ? _state_current_lastPosition_pageY : 0));
36281
36323
  state.current.lastPosition = {
36282
36324
  pageX: e2.pageX,
36283
36325
  pageY: e2.pageY
@@ -36287,29 +36329,47 @@
36287
36329
  let onPointerUp = (e2) => {
36288
36330
  if (e2.pointerId === state.current.id) {
36289
36331
  let pointerType = e2.pointerType || "mouse";
36290
- end2(e2, pointerType);
36332
+ endEvent(e2, pointerType);
36291
36333
  state.current.id = null;
36292
36334
  removeGlobalListener(window, "pointermove", onPointerMove, false);
36293
36335
  removeGlobalListener(window, "pointerup", onPointerUp, false);
36294
36336
  removeGlobalListener(window, "pointercancel", onPointerUp, false);
36337
+ setPointerDown(null);
36295
36338
  }
36296
36339
  };
36297
- moveProps2.onPointerDown = (e2) => {
36298
- if (e2.button === 0 && state.current.id == null) {
36299
- start2();
36300
- e2.stopPropagation();
36301
- e2.preventDefault();
36302
- state.current.lastPosition = {
36303
- pageX: e2.pageX,
36304
- pageY: e2.pageY
36305
- };
36306
- state.current.id = e2.pointerId;
36307
- addGlobalListener(window, "pointermove", onPointerMove, false);
36308
- addGlobalListener(window, "pointerup", onPointerUp, false);
36309
- addGlobalListener(window, "pointercancel", onPointerUp, false);
36310
- }
36340
+ addGlobalListener(window, "pointermove", onPointerMove, false);
36341
+ addGlobalListener(window, "pointerup", onPointerUp, false);
36342
+ addGlobalListener(window, "pointercancel", onPointerUp, false);
36343
+ return () => {
36344
+ removeGlobalListener(window, "pointermove", onPointerMove, false);
36345
+ removeGlobalListener(window, "pointerup", onPointerUp, false);
36346
+ removeGlobalListener(window, "pointercancel", onPointerUp, false);
36311
36347
  };
36312
36348
  }
36349
+ }, [
36350
+ pointerDown,
36351
+ addGlobalListener,
36352
+ removeGlobalListener
36353
+ ]);
36354
+ let moveProps = React$1.useMemo(() => {
36355
+ let moveProps2 = {};
36356
+ let start2 = () => {
36357
+ $14c0b72509d70225$export$16a4697467175487();
36358
+ state.current.didMove = false;
36359
+ };
36360
+ moveProps2.onPointerDown = (e2) => {
36361
+ if (e2.button === 0 && state.current.id == null) {
36362
+ start2();
36363
+ e2.stopPropagation();
36364
+ e2.preventDefault();
36365
+ state.current.lastPosition = {
36366
+ pageX: e2.pageX,
36367
+ pageY: e2.pageY
36368
+ };
36369
+ state.current.id = e2.pointerId;
36370
+ setPointerDown("pointer");
36371
+ }
36372
+ };
36313
36373
  let triggerKeyboardMove = (e2, deltaX, deltaY) => {
36314
36374
  start2();
36315
36375
  move(e2, "keyboard", deltaX, deltaY);
@@ -36346,8 +36406,6 @@
36346
36406
  return moveProps2;
36347
36407
  }, [
36348
36408
  state,
36349
- addGlobalListener,
36350
- removeGlobalListener,
36351
36409
  move,
36352
36410
  end2
36353
36411
  ]);
@@ -39081,6 +39139,8 @@ You must set sticky: 'left' | 'right' for the '${bugWithUnderColumnsSticky.Heade
39081
39139
  style: Object.assign(Object.assign(Object.assign({}, floatingStyles), { maxHeight: 800, minWidth: 150, zIndex: 9999 }), style)
39082
39140
  }), { isOpen, children: jsxRuntimeExports.jsx(SectionedList, { items: allowColumnHiding ? [resetFunctions, columnToggles] : [resetFunctions], onSelect: onOptionSelect }, isOpen ? "open" : "closed") })), document.body)] });
39083
39141
  };
39142
+ const { fontSize } = window.getComputedStyle(document.documentElement);
39143
+ const DEFAULT_ROW_HEIGHT = parseFloat(fontSize) * 2.5;
39084
39144
  var __rest$2 = function(s, e2) {
39085
39145
  var t2 = {};
39086
39146
  for (var p2 in s) if (Object.prototype.hasOwnProperty.call(s, p2) && e2.indexOf(p2) < 0)
@@ -39092,8 +39152,6 @@ You must set sticky: 'left' | 'right' for the '${bugWithUnderColumnsSticky.Heade
39092
39152
  }
39093
39153
  return t2;
39094
39154
  };
39095
- const { fontSize } = window.getComputedStyle(document.documentElement);
39096
- const ROW_HEIGHT = parseFloat(fontSize) * 2.5;
39097
39155
  const shouldForwardProp$2 = (prop) => !["isSorted", "onClickRow"].includes(prop);
39098
39156
  const Row = styled.div.withConfig({ shouldForwardProp: shouldForwardProp$2 })`
39099
39157
  cursor: ${(props) => props.onClickRow ? "pointer" : "default"};
@@ -39149,7 +39207,7 @@ You must set sticky: 'left' | 'right' for the '${bugWithUnderColumnsSticky.Heade
39149
39207
  align-items: center;
39150
39208
 
39151
39209
  min-width: 80px;
39152
- height: ${() => `${ROW_HEIGHT}px`};
39210
+ height: ${({ rowHeight }) => `${rowHeight}px`};
39153
39211
 
39154
39212
  color: ${(props) => props.theme.colors.grey6};
39155
39213
 
@@ -39161,19 +39219,19 @@ You must set sticky: 'left' | 'right' for the '${bugWithUnderColumnsSticky.Heade
39161
39219
  }
39162
39220
  `;
39163
39221
  const CellContent = styled.span`
39164
- overflow: hidden;
39222
+ overflow: ${({ hasRowHeight }) => hasRowHeight ? "unset" : "hidden"};
39165
39223
 
39166
39224
  width: 100%;
39167
39225
  padding: 0 1rem;
39168
39226
 
39169
- text-overflow: ellipsis;
39170
- white-space: nowrap;
39227
+ text-overflow: ${({ hasRowHeight }) => hasRowHeight ? "unset" : "ellipsis"};
39228
+ white-space: ${({ hasRowHeight }) => hasRowHeight ? "normal" : "nowrap"};
39171
39229
  `;
39172
39230
  const arePropsEqual = (prevProps, nextProps) => {
39173
39231
  var _a;
39174
39232
  return areEqual(prevProps, nextProps) && !(((_a = nextProps.data) === null || _a === void 0 ? void 0 : _a.headerGroups) || []).some((headerGroup) => ((headerGroup === null || headerGroup === void 0 ? void 0 : headerGroup.headers) || []).some((header) => header.isResizing));
39175
39233
  };
39176
- const RenderRow = React__namespace.memo(({ data: { width, currentEditCell, headerGroups, rows, prepareRow, getItem, totalColumnsWidth, onClickRow, throttledClickRow, backgroundColor, mappedColumns }, index: index2, style: renderRowStyle }) => {
39234
+ const RenderRow = React__namespace.memo(({ data: { width, currentEditCell, headerGroups, rows, prepareRow, getItem, totalColumnsWidth, onClickRow, throttledClickRow, backgroundColor, mappedColumns, rowHeight }, index: index2, style: renderRowStyle }) => {
39177
39235
  let row = rows[index2];
39178
39236
  if (getItem) {
39179
39237
  const value = getItem(index2);
@@ -39186,8 +39244,8 @@ You must set sticky: 'left' | 'right' for the '${bugWithUnderColumnsSticky.Heade
39186
39244
  }
39187
39245
  if (!row) {
39188
39246
  return jsxRuntimeExports.jsx("div", { children: headerGroups.map((headerGroup, gidx) => jsxRuntimeExports.jsx(RowPlaceholder, { style: {
39189
- height: ROW_HEIGHT,
39190
- top: (index2 + 1) * ROW_HEIGHT,
39247
+ height: rowHeight,
39248
+ top: (index2 + 1) * rowHeight,
39191
39249
  width: totalColumnsWidth > width ? totalColumnsWidth : "100%"
39192
39250
  }, children: headerGroup === null || headerGroup === void 0 ? void 0 : headerGroup.headers.map((col, cidx) => {
39193
39251
  const headerProps = col.getHeaderProps();
@@ -39205,16 +39263,24 @@ You must set sticky: 'left' | 'right' for the '${bugWithUnderColumnsSticky.Heade
39205
39263
  }
39206
39264
  };
39207
39265
  const _a = row.getRowProps({ style: renderRowStyle }), { style: rowStyle } = _a, restRow = __rest$2(_a, ["style"]);
39208
- return React$1.createElement(Row, Object.assign({}, restRow, { key: `row-${index2}`, onClick, onClickRow, style: Object.assign(Object.assign({}, rowStyle), { top: (index2 + 1) * ROW_HEIGHT, width: totalColumnsWidth > width ? totalColumnsWidth : "100%" }) }), row.cells.map((cell, colIdx) => {
39209
- var _a2;
39266
+ return React$1.createElement(Row, Object.assign({}, restRow, { key: `row-${index2}`, onClick, onClickRow, style: Object.assign(Object.assign({}, rowStyle), {
39267
+ // The first row is the header row which is not controlled by this rowHeight prop so it needs to be part of the calculation.
39268
+ top: index2 === 0 ? DEFAULT_ROW_HEIGHT : index2 * rowHeight + DEFAULT_ROW_HEIGHT,
39269
+ width: totalColumnsWidth > width ? totalColumnsWidth : "100%"
39270
+ }) }), row.cells.map((cell, colIdx) => {
39271
+ var _a2, _b, _c, _d, _e2;
39210
39272
  const cellProps = cell.getCellProps();
39211
39273
  return React$1.createElement(
39212
39274
  Cell,
39213
- Object.assign({}, cellProps, { key: `cell-${index2}-${colIdx}`, style: Object.assign(Object.assign({}, cellProps.style), { backgroundColor, justifyContent: mappedColumns[colIdx].align, maxWidth: (_a2 = cell.column) === null || _a2 === void 0 ? void 0 : _a2.maxWidth, width: (
39275
+ Object.assign({}, cellProps, { rowHeight, key: `cell-${index2}-${colIdx}`, style: Object.assign(Object.assign(Object.assign(Object.assign({}, cellProps.style), { backgroundColor, justifyContent: mappedColumns[colIdx].align, maxWidth: (_a2 = cell.column) === null || _a2 === void 0 ? void 0 : _a2.maxWidth, width: (
39214
39276
  // If width calc has messed up then use the raw width from the column
39215
39277
  cellProps.style.width === "NaNpx" ? mappedColumns[colIdx].width : cellProps.style.width
39216
- ) }) }),
39217
- jsxRuntimeExports.jsx(CellContent, { children: cell.render("Cell", {
39278
+ ) }), ((_b = mappedColumns[colIdx]) === null || _b === void 0 ? void 0 : _b.sticky) === "left" && typeof ((_c = mappedColumns[colIdx]) === null || _c === void 0 ? void 0 : _c.stickyOffset) === "number" ? {
39279
+ left: `${mappedColumns[colIdx].stickyOffset}px`
39280
+ } : {}), ((_d = mappedColumns[colIdx]) === null || _d === void 0 ? void 0 : _d.sticky) === "right" && typeof ((_e2 = mappedColumns[colIdx]) === null || _e2 === void 0 ? void 0 : _e2.stickyOffset) === "number" ? {
39281
+ right: `${mappedColumns[colIdx].stickyOffset}px`
39282
+ } : {}) }),
39283
+ jsxRuntimeExports.jsx(CellContent, { hasRowHeight: rowHeight !== DEFAULT_ROW_HEIGHT, children: cell.render("Cell", {
39218
39284
  colIdx,
39219
39285
  currentEditCell,
39220
39286
  rowIdx: index2
@@ -39294,7 +39360,7 @@ You must set sticky: 'left' | 'right' for the '${bugWithUnderColumnsSticky.Heade
39294
39360
  justify-content: space-between;
39295
39361
 
39296
39362
  min-width: 80px;
39297
- height: ${ROW_HEIGHT}px;
39363
+ height: ${DEFAULT_ROW_HEIGHT}px;
39298
39364
 
39299
39365
  color: ${(props) => props.theme.colors.text};
39300
39366
 
@@ -39379,6 +39445,26 @@ You must set sticky: 'left' | 'right' for the '${bugWithUnderColumnsSticky.Heade
39379
39445
  });
39380
39446
  return [...leftStickyCols, ...nonStickyCols, ...rightStickyCols];
39381
39447
  };
39448
+ const appendStickyOffsets = (columns) => {
39449
+ let leftOffset = 0;
39450
+ let rightOffset = 0;
39451
+ const rightStickyColumnWidths = columns.filter((col) => col.sticky === "right").slice(1).map((col) => parseInt(col.width) || 150);
39452
+ return columns.map((col) => {
39453
+ if (col.sticky === "left") {
39454
+ const nextCol = Object.assign(Object.assign({}, col), { stickyOffset: leftOffset });
39455
+ const width = parseInt(col.width) || 150;
39456
+ leftOffset += width;
39457
+ return nextCol;
39458
+ }
39459
+ if (col.sticky === "right") {
39460
+ rightOffset = rightStickyColumnWidths.reduce((acc, width) => acc + width, 0);
39461
+ const nextCol = Object.assign(Object.assign({}, col), { stickyOffset: rightOffset });
39462
+ rightStickyColumnWidths.shift();
39463
+ return nextCol;
39464
+ }
39465
+ return col;
39466
+ });
39467
+ };
39382
39468
  const filterComponentMap = {
39383
39469
  categorical: CategoricalFilter,
39384
39470
  datetime: DatetimeFilter,
@@ -39396,12 +39482,26 @@ You must set sticky: 'left' | 'right' for the '${bugWithUnderColumnsSticky.Heade
39396
39482
  return Object.assign(Object.assign({}, col), { Filter: filterComponentMap[col.filter] });
39397
39483
  });
39398
39484
  };
39485
+ const createActionColumn = (actions, accessor, sticky, disableSelectAll = false) => {
39486
+ const width = actions.includes(Actions.SELECT) ? 52 : actions.length * 24 + 24;
39487
+ return {
39488
+ Cell: ActionCell,
39489
+ Header: actions.includes(Actions.SELECT) && !disableSelectAll ? SelectHeader : "",
39490
+ accessor: accessor || "actions",
39491
+ actions,
39492
+ disableSortBy: true,
39493
+ maxWidth: width,
39494
+ minWidth: actions.includes(Actions.SELECT) ? 52 : 48,
39495
+ sticky: sticky || null,
39496
+ width
39497
+ };
39498
+ };
39399
39499
  const cells = {
39400
39500
  DATETIME: DatetimeCell,
39401
39501
  EDIT_INPUT: EditInputCell,
39402
39502
  EDIT_SELECT: EditSelectCell
39403
39503
  };
39404
- const createItemData$1 = memoizeOne$1((width, currentEditCell, headerGroups, rows, prepareRow, getItem, totalColumnsWidth, onClickRow, throttledClickRow, backgroundColor, mappedColumns) => ({
39504
+ const createItemData$1 = memoizeOne$1((width, currentEditCell, headerGroups, rows, prepareRow, getItem, totalColumnsWidth, onClickRow, throttledClickRow, backgroundColor, mappedColumns, rowHeight) => ({
39405
39505
  backgroundColor,
39406
39506
  currentEditCell,
39407
39507
  getItem,
@@ -39410,12 +39510,14 @@ You must set sticky: 'left' | 'right' for the '${bugWithUnderColumnsSticky.Heade
39410
39510
  onClickRow,
39411
39511
  prepareRow,
39412
39512
  rows,
39513
+ rowHeight,
39413
39514
  throttledClickRow,
39414
39515
  totalColumnsWidth,
39415
39516
  width
39416
39517
  }));
39417
- const Table = React$1.forwardRef(({ allowHiding, backgroundColor, className, columns, data: data2, getItem, initialSort = [], itemCount, maxRows, onAction, onChange: onChange2, onClickRow, onItemsRendered, onFilter, onSort, showTableOptions, style, tableOptionsStyle }, ref) => {
39518
+ const Table = React$1.forwardRef(({ allowHiding, actions, backgroundColor, className, columns, data: data2, getItem, initialSort = [], itemCount, maxRows, onAction, onChange: onChange2, onClickRow, onItemsRendered, onFilter, onSort, rowHeight, showTableOptions, style, tableOptionsStyle }, ref) => {
39418
39519
  const [currentSortBy, setCurrentSortBy] = React$1.useState(initialSort);
39520
+ const tableRowHeight = rowHeight || DEFAULT_ROW_HEIGHT;
39419
39521
  React$1.useEffect(
39420
39522
  () => {
39421
39523
  setCurrentSortBy(initialSort);
@@ -39445,7 +39547,14 @@ You must set sticky: 'left' | 'right' for the '${bugWithUnderColumnsSticky.Heade
39445
39547
  throttledSetEditCell([Number(cell[0]), cell[1]]);
39446
39548
  };
39447
39549
  const infiniteData = React$1.useMemo(() => Array(itemCount).fill(0), [itemCount]);
39448
- const mappedColumns = React$1.useMemo(() => appendFilterComponents(orderStickyCols(columns)), [columns]);
39550
+ const mappedColumns = React$1.useMemo(() => {
39551
+ let processedColumns = columns;
39552
+ if (actions && actions.length > 0) {
39553
+ const actionColumn = createActionColumn(actions);
39554
+ processedColumns = [...columns, actionColumn];
39555
+ }
39556
+ return appendStickyOffsets(appendFilterComponents(orderStickyCols(processedColumns)));
39557
+ }, [columns, actions]);
39449
39558
  const hasFixedColumns = React$1.useMemo(() => mappedColumns.some((column) => "sticky" in column), [mappedColumns]);
39450
39559
  const totalColumnsWidth = React$1.useMemo(() => mappedColumns.reduce((acc, column) => acc + (parseInt(column.width) || 150), 0), [mappedColumns]);
39451
39560
  const filterTypes = React$1.useMemo(() => ({
@@ -39501,11 +39610,15 @@ You must set sticky: 'left' | 'right' for the '${bugWithUnderColumnsSticky.Heade
39501
39610
  const showHeaderCellButtonContainer = showSort || showFilter || showOptions;
39502
39611
  return React$1.createElement(
39503
39612
  HeaderCell,
39504
- Object.assign({}, headerProps, { key: `col-${gidx}-${cidx}`, style: Object.assign(Object.assign({}, headerProps.style), {
39613
+ Object.assign({}, headerProps, { key: `col-${gidx}-${cidx}`, style: Object.assign(Object.assign(Object.assign(Object.assign({}, headerProps.style), {
39505
39614
  maxWidth: col.maxWidth,
39506
39615
  // If width calc has messed up then use the raw width from the column
39507
39616
  width: headerProps.style.width === "NaNpx" ? mappedColumns[cidx].width : headerProps.style.width
39508
- }) }),
39617
+ }), col.sticky === "left" && typeof col.stickyOffset === "number" ? {
39618
+ left: `${col.stickyOffset}px`
39619
+ } : {}), col.sticky === "right" && typeof col.stickyOffset === "number" ? {
39620
+ right: `${col.stickyOffset}px`
39621
+ } : {}) }),
39509
39622
  jsxRuntimeExports.jsxs(HeaderTooltipContainer, { isPrimitiveHeader: typeof headerContent === "string", children: [jsxRuntimeExports.jsx(HeaderContentWrapper, Object.assign({}, sortProps, { isPrimitiveHeader: typeof headerContent === "string", title: typeof headerContent === "string" ? headerContent : "", children: headerContent })), col.tooltip && jsxRuntimeExports.jsx(Tooltip, { content: col.tooltip, children: jsxRuntimeExports.jsx(TooltipIcon, { icon: faCircleQuestion }) })] }),
39510
39623
  showHeaderCellButtonContainer && jsxRuntimeExports.jsxs(HeaderCellButtonContainer, { children: [jsxRuntimeExports.jsxs(HeaderIconsWrapper, { children: [showSort && jsxRuntimeExports.jsx(HeaderIconWrapper, { children: jsxRuntimeExports.jsx(SortIcon, Object.assign({}, sortProps, { className: "tableSortArrow", icon: getSortIcon(col.isSorted, col.isSortedDesc), isSorted: col.isSorted })) }), showFilter ? jsxRuntimeExports.jsx(FilterContainer, { col }) : null, showOptions && jsxRuntimeExports.jsx(OptionsMenu, { allColumns, allowColumnHiding: allowHiding, numVisibleColumns, resetResizing, setAllFilters, style: tableOptionsStyle })] }), jsxRuntimeExports.jsx(ResizeBorder, Object.assign({}, resizerProps))] })
39511
39624
  );
@@ -39514,28 +39627,15 @@ You must set sticky: 'left' | 'right' for the '${bugWithUnderColumnsSticky.Heade
39514
39627
  // eslint-disable-next-line react-hooks/exhaustive-deps
39515
39628
  useDeepCompare([tableProps, totalColumnsWidth, headerGroups])
39516
39629
  );
39517
- return jsxRuntimeExports.jsx(Wrapper$2, Object.assign({}, getTableProps(), { "$hasMaxRows": !!maxRows, className: `${className} ${hasFixedColumns ? "sticky" : ""}`, style: Object.assign({ height: maxRows ? (Math.min(rows.length, maxRows) + 1) * ROW_HEIGHT : "100%" }, style), children: jsxRuntimeExports.jsx(AutoSizer, { children: ({ height, width }) => {
39518
- return jsxRuntimeExports.jsx(StyledFixedSizeList, { height, innerElementType: renderTable, itemCount: itemCount || rows.length, itemData: createItemData$1(width, currentEditCell, headerGroups, rows, prepareRow, getItem, totalColumnsWidth, onClickRow, throttledClickRow, backgroundColor, mappedColumns), itemSize: ROW_HEIGHT, onItemsRendered, style: {
39630
+ return jsxRuntimeExports.jsx(Wrapper$2, Object.assign({}, getTableProps(), { "$hasMaxRows": !!maxRows, className: `${className} ${hasFixedColumns ? "sticky" : ""}`, style: Object.assign({ height: maxRows ? (Math.min(rows.length, maxRows) + 1) * tableRowHeight : "100%" }, style), children: jsxRuntimeExports.jsx(AutoSizer, { children: ({ height, width }) => {
39631
+ return jsxRuntimeExports.jsx(StyledFixedSizeList, { height, innerElementType: renderTable, itemCount: itemCount || rows.length, itemData: createItemData$1(width, currentEditCell, headerGroups, rows, prepareRow, getItem, totalColumnsWidth, onClickRow, throttledClickRow, backgroundColor, mappedColumns, tableRowHeight), itemSize: tableRowHeight, onItemsRendered, style: {
39519
39632
  overflowX: width < totalColumnsWidth ? "auto" : "hidden",
39520
- overflowY: height < (rows.length + 1) * ROW_HEIGHT ? "auto" : "hidden"
39633
+ overflowY: height < (rows.length + 1) * tableRowHeight ? "auto" : "hidden"
39521
39634
  }, width, children: RenderRow }, "table-list");
39522
39635
  } }) }));
39523
39636
  });
39524
39637
  Table.displayName = "Table";
39525
- Table.ActionColumn = (actions, accessor, sticky, disableSelectAll = false) => {
39526
- const width = actions.includes(Actions.SELECT) ? 52 : actions.length * 24 + 24;
39527
- return {
39528
- Cell: ActionCell,
39529
- Header: actions.includes(Actions.SELECT) && !disableSelectAll ? SelectHeader : "",
39530
- accessor: accessor || "actions",
39531
- actions,
39532
- disableSortBy: true,
39533
- maxWidth: width,
39534
- minWidth: actions.includes(Actions.SELECT) ? 52 : 48,
39535
- sticky: sticky || null,
39536
- width
39537
- };
39538
- };
39638
+ Table.ActionColumn = createActionColumn;
39539
39639
  Table.Actions = Actions;
39540
39640
  Table.cells = cells;
39541
39641
  styled.div`
@@ -45171,7 +45271,7 @@ You must set sticky: 'left' | 'right' for the '${bugWithUnderColumnsSticky.Heade
45171
45271
  function baseAt(object2, paths) {
45172
45272
  var index2 = -1, length = paths.length, result2 = Array2(length), skip = object2 == null;
45173
45273
  while (++index2 < length) {
45174
- result2[index2] = skip ? undefined$1 : get(object2, paths[index2]);
45274
+ result2[index2] = skip ? undefined$1 : get2(object2, paths[index2]);
45175
45275
  }
45176
45276
  return result2;
45177
45277
  }
@@ -45616,7 +45716,7 @@ You must set sticky: 'left' | 'right' for the '${bugWithUnderColumnsSticky.Heade
45616
45716
  return matchesStrictComparable(toKey(path), srcValue);
45617
45717
  }
45618
45718
  return function(object2) {
45619
- var objValue = get(object2, path);
45719
+ var objValue = get2(object2, path);
45620
45720
  return objValue === undefined$1 && objValue === srcValue ? hasIn(object2, path) : baseIsEqual(srcValue, objValue, COMPARE_PARTIAL_FLAG | COMPARE_UNORDERED_FLAG);
45621
45721
  };
45622
45722
  }
@@ -48371,7 +48471,7 @@ You must set sticky: 'left' | 'right' for the '${bugWithUnderColumnsSticky.Heade
48371
48471
  function functionsIn(object2) {
48372
48472
  return object2 == null ? [] : baseFunctions(object2, keysIn(object2));
48373
48473
  }
48374
- function get(object2, path, defaultValue) {
48474
+ function get2(object2, path, defaultValue) {
48375
48475
  var result2 = object2 == null ? undefined$1 : baseGet(object2, path);
48376
48476
  return result2 === undefined$1 ? defaultValue : result2;
48377
48477
  }
@@ -49229,7 +49329,7 @@ You must set sticky: 'left' | 'right' for the '${bugWithUnderColumnsSticky.Heade
49229
49329
  lodash2.forInRight = forInRight;
49230
49330
  lodash2.forOwn = forOwn;
49231
49331
  lodash2.forOwnRight = forOwnRight;
49232
- lodash2.get = get;
49332
+ lodash2.get = get2;
49233
49333
  lodash2.gt = gt2;
49234
49334
  lodash2.gte = gte;
49235
49335
  lodash2.has = has;
@@ -50930,12 +51030,22 @@ You must set sticky: 'left' | 'right' for the '${bugWithUnderColumnsSticky.Heade
50930
51030
  await validateResponse(res, `Failed to cancel task with id: ${taskId}`);
50931
51031
  return true;
50932
51032
  }
51033
+ function serializeNestedKey$1(key) {
51034
+ if (typeof key === "string") {
51035
+ return key;
51036
+ }
51037
+ if (isLoopVariable(key)) {
51038
+ const loopNested = key.nested.join(",");
51039
+ return `LoopVar:${key.uid}:${loopNested}`;
51040
+ }
51041
+ return String(key);
51042
+ }
50933
51043
  function getUniqueIdentifier(variable, opts = {
50934
51044
  useNested: true
50935
51045
  }) {
50936
51046
  let identifier = variable.uid;
50937
51047
  if (opts.useNested && "nested" in variable) {
50938
- identifier += variable.nested.join(",");
51048
+ identifier += variable.nested.map(serializeNestedKey$1).join(",");
50939
51049
  }
50940
51050
  return identifier;
50941
51051
  }
@@ -61612,12 +61722,19 @@ import(${JSON.stringify(manifest.entry.module)});`;
61612
61722
  if (hasRequiredDist) return dist;
61613
61723
  hasRequiredDist = 1;
61614
61724
  Object.defineProperty(dist, "__esModule", { value: true });
61615
- dist.parse = parse2;
61616
- dist.serialize = serialize;
61725
+ dist.parseCookie = parseCookie;
61726
+ dist.parse = parseCookie;
61727
+ dist.stringifyCookie = stringifyCookie;
61728
+ dist.stringifySetCookie = stringifySetCookie;
61729
+ dist.serialize = stringifySetCookie;
61730
+ dist.parseSetCookie = parseSetCookie;
61731
+ dist.stringifySetCookie = stringifySetCookie;
61732
+ dist.serialize = stringifySetCookie;
61617
61733
  const cookieNameRegExp = /^[\u0021-\u003A\u003C\u003E-\u007E]+$/;
61618
61734
  const cookieValueRegExp = /^[\u0021-\u003A\u003C-\u007E]*$/;
61619
61735
  const domainValueRegExp = /^([.]?[a-z0-9]([a-z0-9-]{0,61}[a-z0-9])?)([.][a-z0-9]([a-z0-9-]{0,61}[a-z0-9])?)*$/i;
61620
61736
  const pathValueRegExp = /^[\u0020-\u003A\u003D-\u007E]*$/;
61737
+ const maxAgeRegExp = /^-?\d+$/;
61621
61738
  const __toString = Object.prototype.toString;
61622
61739
  const NullObject = /* @__PURE__ */ (() => {
61623
61740
  const C = function() {
@@ -61625,7 +61742,7 @@ import(${JSON.stringify(manifest.entry.module)});`;
61625
61742
  C.prototype = /* @__PURE__ */ Object.create(null);
61626
61743
  return C;
61627
61744
  })();
61628
- function parse2(str, options) {
61745
+ function parseCookie(str, options) {
61629
61746
  const obj = new NullObject();
61630
61747
  const len = str.length;
61631
61748
  if (len < 2)
@@ -61633,91 +61750,87 @@ import(${JSON.stringify(manifest.entry.module)});`;
61633
61750
  const dec = options?.decode || decode2;
61634
61751
  let index2 = 0;
61635
61752
  do {
61636
- const eqIdx = str.indexOf("=", index2);
61753
+ const eqIdx = eqIndex(str, index2, len);
61637
61754
  if (eqIdx === -1)
61638
61755
  break;
61639
- const colonIdx = str.indexOf(";", index2);
61640
- const endIdx = colonIdx === -1 ? len : colonIdx;
61756
+ const endIdx = endIndex(str, index2, len);
61641
61757
  if (eqIdx > endIdx) {
61642
61758
  index2 = str.lastIndexOf(";", eqIdx - 1) + 1;
61643
61759
  continue;
61644
61760
  }
61645
- const keyStartIdx = startIndex(str, index2, eqIdx);
61646
- const keyEndIdx = endIndex(str, eqIdx, keyStartIdx);
61647
- const key = str.slice(keyStartIdx, keyEndIdx);
61761
+ const key = valueSlice(str, index2, eqIdx);
61648
61762
  if (obj[key] === void 0) {
61649
- let valStartIdx = startIndex(str, eqIdx + 1, endIdx);
61650
- let valEndIdx = endIndex(str, endIdx, valStartIdx);
61651
- const value = dec(str.slice(valStartIdx, valEndIdx));
61652
- obj[key] = value;
61763
+ obj[key] = dec(valueSlice(str, eqIdx + 1, endIdx));
61653
61764
  }
61654
61765
  index2 = endIdx + 1;
61655
61766
  } while (index2 < len);
61656
61767
  return obj;
61657
61768
  }
61658
- function startIndex(str, index2, max2) {
61659
- do {
61660
- const code = str.charCodeAt(index2);
61661
- if (code !== 32 && code !== 9)
61662
- return index2;
61663
- } while (++index2 < max2);
61664
- return max2;
61665
- }
61666
- function endIndex(str, index2, min2) {
61667
- while (index2 > min2) {
61668
- const code = str.charCodeAt(--index2);
61669
- if (code !== 32 && code !== 9)
61670
- return index2 + 1;
61769
+ function stringifyCookie(cookie, options) {
61770
+ const enc = options?.encode || encodeURIComponent;
61771
+ const cookieStrings = [];
61772
+ for (const name of Object.keys(cookie)) {
61773
+ const val = cookie[name];
61774
+ if (val === void 0)
61775
+ continue;
61776
+ if (!cookieNameRegExp.test(name)) {
61777
+ throw new TypeError(`cookie name is invalid: ${name}`);
61778
+ }
61779
+ const value = enc(val);
61780
+ if (!cookieValueRegExp.test(value)) {
61781
+ throw new TypeError(`cookie val is invalid: ${val}`);
61782
+ }
61783
+ cookieStrings.push(`${name}=${value}`);
61671
61784
  }
61672
- return min2;
61785
+ return cookieStrings.join("; ");
61673
61786
  }
61674
- function serialize(name, val, options) {
61787
+ function stringifySetCookie(_name, _val, _opts) {
61788
+ const cookie = typeof _name === "object" ? _name : { ..._opts, name: _name, value: String(_val) };
61789
+ const options = typeof _val === "object" ? _val : _opts;
61675
61790
  const enc = options?.encode || encodeURIComponent;
61676
- if (!cookieNameRegExp.test(name)) {
61677
- throw new TypeError(`argument name is invalid: ${name}`);
61791
+ if (!cookieNameRegExp.test(cookie.name)) {
61792
+ throw new TypeError(`argument name is invalid: ${cookie.name}`);
61678
61793
  }
61679
- const value = enc(val);
61794
+ const value = cookie.value ? enc(cookie.value) : "";
61680
61795
  if (!cookieValueRegExp.test(value)) {
61681
- throw new TypeError(`argument val is invalid: ${val}`);
61796
+ throw new TypeError(`argument val is invalid: ${cookie.value}`);
61682
61797
  }
61683
- let str = name + "=" + value;
61684
- if (!options)
61685
- return str;
61686
- if (options.maxAge !== void 0) {
61687
- if (!Number.isInteger(options.maxAge)) {
61688
- throw new TypeError(`option maxAge is invalid: ${options.maxAge}`);
61798
+ let str = cookie.name + "=" + value;
61799
+ if (cookie.maxAge !== void 0) {
61800
+ if (!Number.isInteger(cookie.maxAge)) {
61801
+ throw new TypeError(`option maxAge is invalid: ${cookie.maxAge}`);
61689
61802
  }
61690
- str += "; Max-Age=" + options.maxAge;
61803
+ str += "; Max-Age=" + cookie.maxAge;
61691
61804
  }
61692
- if (options.domain) {
61693
- if (!domainValueRegExp.test(options.domain)) {
61694
- throw new TypeError(`option domain is invalid: ${options.domain}`);
61805
+ if (cookie.domain) {
61806
+ if (!domainValueRegExp.test(cookie.domain)) {
61807
+ throw new TypeError(`option domain is invalid: ${cookie.domain}`);
61695
61808
  }
61696
- str += "; Domain=" + options.domain;
61809
+ str += "; Domain=" + cookie.domain;
61697
61810
  }
61698
- if (options.path) {
61699
- if (!pathValueRegExp.test(options.path)) {
61700
- throw new TypeError(`option path is invalid: ${options.path}`);
61811
+ if (cookie.path) {
61812
+ if (!pathValueRegExp.test(cookie.path)) {
61813
+ throw new TypeError(`option path is invalid: ${cookie.path}`);
61701
61814
  }
61702
- str += "; Path=" + options.path;
61815
+ str += "; Path=" + cookie.path;
61703
61816
  }
61704
- if (options.expires) {
61705
- if (!isDate2(options.expires) || !Number.isFinite(options.expires.valueOf())) {
61706
- throw new TypeError(`option expires is invalid: ${options.expires}`);
61817
+ if (cookie.expires) {
61818
+ if (!isDate2(cookie.expires) || !Number.isFinite(cookie.expires.valueOf())) {
61819
+ throw new TypeError(`option expires is invalid: ${cookie.expires}`);
61707
61820
  }
61708
- str += "; Expires=" + options.expires.toUTCString();
61821
+ str += "; Expires=" + cookie.expires.toUTCString();
61709
61822
  }
61710
- if (options.httpOnly) {
61823
+ if (cookie.httpOnly) {
61711
61824
  str += "; HttpOnly";
61712
61825
  }
61713
- if (options.secure) {
61826
+ if (cookie.secure) {
61714
61827
  str += "; Secure";
61715
61828
  }
61716
- if (options.partitioned) {
61829
+ if (cookie.partitioned) {
61717
61830
  str += "; Partitioned";
61718
61831
  }
61719
- if (options.priority) {
61720
- const priority = typeof options.priority === "string" ? options.priority.toLowerCase() : void 0;
61832
+ if (cookie.priority) {
61833
+ const priority = typeof cookie.priority === "string" ? cookie.priority.toLowerCase() : void 0;
61721
61834
  switch (priority) {
61722
61835
  case "low":
61723
61836
  str += "; Priority=Low";
@@ -61729,11 +61842,11 @@ import(${JSON.stringify(manifest.entry.module)});`;
61729
61842
  str += "; Priority=High";
61730
61843
  break;
61731
61844
  default:
61732
- throw new TypeError(`option priority is invalid: ${options.priority}`);
61845
+ throw new TypeError(`option priority is invalid: ${cookie.priority}`);
61733
61846
  }
61734
61847
  }
61735
- if (options.sameSite) {
61736
- const sameSite = typeof options.sameSite === "string" ? options.sameSite.toLowerCase() : options.sameSite;
61848
+ if (cookie.sameSite) {
61849
+ const sameSite = typeof cookie.sameSite === "string" ? cookie.sameSite.toLowerCase() : cookie.sameSite;
61737
61850
  switch (sameSite) {
61738
61851
  case true:
61739
61852
  case "strict":
@@ -61746,11 +61859,98 @@ import(${JSON.stringify(manifest.entry.module)});`;
61746
61859
  str += "; SameSite=None";
61747
61860
  break;
61748
61861
  default:
61749
- throw new TypeError(`option sameSite is invalid: ${options.sameSite}`);
61862
+ throw new TypeError(`option sameSite is invalid: ${cookie.sameSite}`);
61750
61863
  }
61751
61864
  }
61752
61865
  return str;
61753
61866
  }
61867
+ function parseSetCookie(str, options) {
61868
+ const dec = options?.decode || decode2;
61869
+ const len = str.length;
61870
+ const endIdx = endIndex(str, 0, len);
61871
+ const eqIdx = eqIndex(str, 0, endIdx);
61872
+ const setCookie2 = eqIdx === -1 ? { name: "", value: dec(valueSlice(str, 0, endIdx)) } : {
61873
+ name: valueSlice(str, 0, eqIdx),
61874
+ value: dec(valueSlice(str, eqIdx + 1, endIdx))
61875
+ };
61876
+ let index2 = endIdx + 1;
61877
+ while (index2 < len) {
61878
+ const endIdx2 = endIndex(str, index2, len);
61879
+ const eqIdx2 = eqIndex(str, index2, endIdx2);
61880
+ const attr2 = eqIdx2 === -1 ? valueSlice(str, index2, endIdx2) : valueSlice(str, index2, eqIdx2);
61881
+ const val = eqIdx2 === -1 ? void 0 : valueSlice(str, eqIdx2 + 1, endIdx2);
61882
+ switch (attr2.toLowerCase()) {
61883
+ case "httponly":
61884
+ setCookie2.httpOnly = true;
61885
+ break;
61886
+ case "secure":
61887
+ setCookie2.secure = true;
61888
+ break;
61889
+ case "partitioned":
61890
+ setCookie2.partitioned = true;
61891
+ break;
61892
+ case "domain":
61893
+ setCookie2.domain = val;
61894
+ break;
61895
+ case "path":
61896
+ setCookie2.path = val;
61897
+ break;
61898
+ case "max-age":
61899
+ if (val && maxAgeRegExp.test(val))
61900
+ setCookie2.maxAge = Number(val);
61901
+ break;
61902
+ case "expires":
61903
+ if (!val)
61904
+ break;
61905
+ const date2 = new Date(val);
61906
+ if (Number.isFinite(date2.valueOf()))
61907
+ setCookie2.expires = date2;
61908
+ break;
61909
+ case "priority":
61910
+ if (!val)
61911
+ break;
61912
+ const priority = val.toLowerCase();
61913
+ if (priority === "low" || priority === "medium" || priority === "high") {
61914
+ setCookie2.priority = priority;
61915
+ }
61916
+ break;
61917
+ case "samesite":
61918
+ if (!val)
61919
+ break;
61920
+ const sameSite = val.toLowerCase();
61921
+ if (sameSite === "lax" || sameSite === "strict" || sameSite === "none") {
61922
+ setCookie2.sameSite = sameSite;
61923
+ }
61924
+ break;
61925
+ }
61926
+ index2 = endIdx2 + 1;
61927
+ }
61928
+ return setCookie2;
61929
+ }
61930
+ function endIndex(str, min2, len) {
61931
+ const index2 = str.indexOf(";", min2);
61932
+ return index2 === -1 ? len : index2;
61933
+ }
61934
+ function eqIndex(str, min2, max2) {
61935
+ const index2 = str.indexOf("=", min2);
61936
+ return index2 < max2 ? index2 : -1;
61937
+ }
61938
+ function valueSlice(str, min2, max2) {
61939
+ let start2 = min2;
61940
+ let end2 = max2;
61941
+ do {
61942
+ const code = str.charCodeAt(start2);
61943
+ if (code !== 32 && code !== 9)
61944
+ break;
61945
+ } while (++start2 < end2);
61946
+ while (end2 > start2) {
61947
+ const code = str.charCodeAt(end2 - 1);
61948
+ if (code !== 32 && code !== 9)
61949
+ break;
61950
+ end2--;
61951
+ }
61952
+ return str.slice(start2, end2);
61953
+ }
61754
61954
  function decode2(str) {
61755
61955
  if (str.indexOf("%") === -1)
61756
61956
  return str;
@@ -61765,7 +61965,7 @@ import(${JSON.stringify(manifest.entry.module)});`;
61765
61965
  }
61766
61966
  return dist;
61767
61967
  }
61768
- var distExports = requireDist();
61968
+ var distExports = /* @__PURE__ */ requireDist();
61769
61969
  var setCookie = { exports: {} };
61770
61970
  var hasRequiredSetCookie;
61771
61971
  function requireSetCookie() {
@@ -64370,6 +64570,71 @@ ${String(error)}`;
64370
64570
  }, [bus, onEvent]);
64371
64571
  return /* @__PURE__ */ React__namespace.createElement(EventBusContext.Provider, { value: bus }, children);
64372
64572
  }
64573
+ function findStreamVariables(variable) {
64574
+ const streams = [];
64575
+ const visited = /* @__PURE__ */ new Set();
64576
+ function walk(v) {
64577
+ if (!isVariable(v)) {
64578
+ return;
64579
+ }
64580
+ if (visited.has(v.uid)) {
64581
+ return;
64582
+ }
64583
+ visited.add(v.uid);
64584
+ if (isStreamVariable(v)) {
64585
+ streams.push(v);
64586
+ if (v.variables && Array.isArray(v.variables)) {
64587
+ v.variables.forEach(walk);
64588
+ }
64589
+ return;
64590
+ }
64591
+ if (isDerivedVariable(v)) {
64592
+ if (v.variables && Array.isArray(v.variables)) {
64593
+ v.variables.forEach(walk);
64594
+ }
64595
+ return;
64596
+ }
64597
+ if (isSwitchVariable(v)) {
64598
+ if (isVariable(v.value)) {
64599
+ walk(v.value);
64600
+ } else if (isCondition(v.value)) {
64601
+ walk(v.value.variable);
64602
+ }
64603
+ if (v.value_map && typeof v.value_map === "object") {
64604
+ Object.values(v.value_map).forEach(walk);
64605
+ }
64606
+ if (isVariable(v.default)) {
64607
+ walk(v.default);
64608
+ }
64609
+ return;
64610
+ }
64611
+ if (isStateVariable(v)) {
64612
+ walk(v.parent_variable);
64613
+ return;
64614
+ }
64615
+ if ("default" in v && isVariable(v.default)) {
64616
+ walk(v.default);
64617
+ }
64618
+ }
64619
+ walk(variable);
64620
+ return streams;
64621
+ }
64622
+ function findStreamVariablesInArray(variables) {
64623
+ const allStreams = [];
64624
+ const seenUids = /* @__PURE__ */ new Set();
64625
+ for (const v of variables) {
64626
+ if (isVariable(v)) {
64627
+ const streams = findStreamVariables(v);
64628
+ for (const stream of streams) {
64629
+ if (!seenUids.has(stream.uid)) {
64630
+ seenUids.add(stream.uid);
64631
+ allStreams.push(stream);
64632
+ }
64633
+ }
64634
+ }
64635
+ }
64636
+ return allStreams;
64637
+ }
64373
64638
  class StateSynchronizer {
64374
64639
  #observers;
64375
64640
  constructor() {
@@ -64524,22 +64789,15 @@ ${String(error)}`;
64524
64789
  selectorFamilyRegistry.set(
64525
64790
  key,
64526
64791
  Recoil_index_11({
64527
- get: (currentExtras) => ({ get }) => {
64528
- const variableValue = get(family(currentExtras));
64529
- return resolveNested(
64530
- variableValue,
64531
- variable.nested.map((n2) => String(n2))
64532
- );
64792
+ get: (currentExtras) => ({ get: get2 }) => {
64793
+ const variableValue = get2(family(currentExtras));
64794
+ return resolveNested(variableValue, variable.nested);
64533
64795
  },
64534
64796
  key,
64535
64797
  set: (currentExtras) => ({ set: set2 }, newValue) => {
64536
64798
  set2(
64537
64799
  family(currentExtras),
64538
- (v) => setNested(
64539
- v,
64540
- variable.nested.map((n2) => String(n2)),
64541
- newValue
64542
- )
64800
+ (v) => setNested(v, variable.nested, newValue)
64543
64801
  );
64544
64802
  }
64545
64803
  })
@@ -64570,10 +64828,20 @@ ${String(error)}`;
64570
64828
  function isPlaceholder(value) {
64571
64829
  return typeof value === "object" && "__ref" in value;
64572
64830
  }
64831
+ function serializeNestedKey(key) {
64832
+ if (typeof key === "string") {
64833
+ return key;
64834
+ }
64835
+ if (isLoopVariable(key)) {
64836
+ const loopNested = key.nested.join(",");
64837
+ return `LoopVar:${key.uid}:${loopNested}`;
64838
+ }
64839
+ return String(key);
64840
+ }
64573
64841
  function getIdentifier$1(variable) {
64574
64842
  let id = `${variable.__typename}:${variable.uid}`;
64575
64843
  if ("nested" in variable && variable.nested.length > 0) {
64576
- id += `:${variable.nested.join(",")}`;
64844
+ id += `:${variable.nested.map(serializeNestedKey).join(",")}`;
64577
64845
  }
64578
64846
  return id;
64579
64847
  }
@@ -69825,7 +70093,7 @@ ${String(error)}`;
69825
70093
  cachePolicy_UNSTABLE: {
69826
70094
  eviction: "most-recent"
69827
70095
  },
69828
- get: (extrasSerializable) => async ({ get }) => {
70096
+ get: (extrasSerializable) => async ({ get: get2 }) => {
69829
70097
  const resolvedVariables = await Promise.all(
69830
70098
  variable.variables.map(async (v) => {
69831
70099
  if (!isVariable(v)) {
@@ -69834,17 +70102,17 @@ ${String(error)}`;
69834
70102
  return resolveVariable(v, wsClient, taskContext, extrasSerializable.extras);
69835
70103
  })
69836
70104
  );
69837
- const selfTrigger = get(getOrRegisterTrigger(variable));
70105
+ const selfTrigger = get2(getOrRegisterTrigger(variable));
69838
70106
  const selectorKey = key + extrasSerializable.toJSON();
69839
70107
  const triggerList = buildTriggerList(variable.variables);
69840
- const triggers = registerChildTriggers(triggerList, get);
70108
+ const triggers = registerChildTriggers(triggerList, get2);
69841
70109
  triggers.unshift(selfTrigger);
69842
70110
  const derivedResult = resolveDerivedValue({
69843
70111
  key: selectorKey,
69844
70112
  variables: variable.variables,
69845
70113
  deps: variable.deps,
69846
70114
  resolvedVariables,
69847
- resolutionStrategy: { name: "get", get },
70115
+ resolutionStrategy: { name: "get", get: get2 },
69848
70116
  triggerList,
69849
70117
  triggers
69850
70118
  });
@@ -69874,7 +70142,7 @@ ${String(error)}`;
69874
70142
  cachePolicy_UNSTABLE: {
69875
70143
  eviction: "most-recent"
69876
70144
  },
69877
- get: (extrasSerializable) => async ({ get }) => {
70145
+ get: (extrasSerializable) => async ({ get: get2 }) => {
69878
70146
  const selectorKey = key + extrasSerializable.toJSON();
69879
70147
  const throwError = (error) => {
69880
70148
  error.selectorId = key;
@@ -69894,7 +70162,7 @@ ${String(error)}`;
69894
70162
  taskContext,
69895
70163
  extrasSerializable.extras
69896
70164
  );
69897
- let derivedResult = get(dvResultSelector);
70165
+ let derivedResult = get2(dvResultSelector);
69898
70166
  if (derivedResult.type === "previous") {
69899
70167
  return derivedResult.entry.result;
69900
70168
  }
@@ -69991,14 +70259,14 @@ ${String(error)}`;
69991
70259
  selectorFamilyRegistry.set(
69992
70260
  key,
69993
70261
  Recoil_index_11({
69994
- get: (extrasSerializable) => ({ get }) => {
70262
+ get: (extrasSerializable) => ({ get: get2 }) => {
69995
70263
  const dvSelector = getOrRegisterDerivedVariableValue(
69996
70264
  variable,
69997
70265
  wsClient,
69998
70266
  taskContext,
69999
70267
  extrasSerializable.extras
70000
70268
  );
70001
- const value = get(dvSelector);
70269
+ const value = get2(dvSelector);
70002
70270
  return "nested" in variable ? resolveNested(value, variable.nested) : value;
70003
70271
  },
70004
70272
  key: nanoid$1()
@@ -70890,12 +71158,144 @@ ${String(error)}`;
70890
71158
  unescapePathComponent
70891
71159
  });
70892
71160
  var getExports = requireGet();
70893
- const getPath = /* @__PURE__ */ getDefaultExportFromCjs(getExports);
71161
+ const get = /* @__PURE__ */ getDefaultExportFromCjs(getExports);
71162
+ const PAUSE_DEBOUNCE_MS = 1500;
71163
+ const ORPHAN_TIMEOUT_MS = 5e3;
71164
+ function createSubscriptionKey(uid2, extras) {
71165
+ return `${uid2}::${JSON.stringify(extras)}`;
71166
+ }
71167
+ const streamUsage = /* @__PURE__ */ new Map();
71168
+ function getOrCreateUsage(key) {
71169
+ let usage = streamUsage.get(key);
71170
+ if (!usage) {
71171
+ usage = { count: 0, connections: /* @__PURE__ */ new Map() };
71172
+ streamUsage.set(key, usage);
71173
+ }
71174
+ return usage;
71175
+ }
71176
+ function cleanupConnections(key) {
71177
+ const usage = streamUsage.get(key);
71178
+ if (!usage) {
71179
+ return;
71180
+ }
71181
+ if (usage.count > 0) {
71182
+ return;
71183
+ }
71184
+ for (const [, conn] of usage.connections) {
71185
+ if (conn.active) {
71186
+ if (conn.controller) {
71187
+ conn.controller.abort();
71188
+ }
71189
+ conn.cleanup = void 0;
71190
+ conn.controller = void 0;
71191
+ conn.active = false;
71192
+ }
71193
+ }
71194
+ }
71195
+ function restartConnections(key) {
71196
+ const usage = streamUsage.get(key);
71197
+ if (!usage) {
71198
+ return;
71199
+ }
71200
+ for (const [atomKey, conn] of usage.connections) {
71201
+ if (!conn.active) {
71202
+ try {
71203
+ const { cleanup, controller } = conn.start();
71204
+ conn.cleanup = cleanup;
71205
+ conn.controller = controller;
71206
+ conn.active = true;
71207
+ } catch (err2) {
71208
+ console.error(`Failed to restart stream connection ${atomKey}:`, err2);
71209
+ }
71210
+ }
71211
+ }
71212
+ }
71213
+ function abortExistingConnection(atomKey) {
71214
+ for (const usage of streamUsage.values()) {
71215
+ const conn = usage.connections.get(atomKey);
71216
+ if (conn?.active && conn.controller) {
71217
+ conn.controller.abort();
71218
+ conn.active = false;
71219
+ conn.cleanup = void 0;
71220
+ conn.controller = void 0;
71221
+ return true;
71222
+ }
71223
+ }
71224
+ return false;
71225
+ }
71226
+ function registerStreamConnection(uid2, extras, atomKey, start2) {
71227
+ const key = createSubscriptionKey(uid2, extras);
71228
+ const usage = getOrCreateUsage(key);
71229
+ abortExistingConnection(atomKey);
71230
+ const { cleanup, controller } = start2();
71231
+ usage.connections.set(atomKey, { start: start2, cleanup, controller, active: true });
71232
+ if (usage.count === 0 && !usage.orphanTimer) {
71233
+ usage.orphanTimer = setTimeout(() => {
71234
+ usage.orphanTimer = void 0;
71235
+ if (usage.count === 0) {
71236
+ cleanupConnections(key);
71237
+ }
71238
+ }, ORPHAN_TIMEOUT_MS);
71239
+ }
71240
+ return () => {
71241
+ const currentUsage = streamUsage.get(key);
71242
+ if (!currentUsage) {
71243
+ return;
71244
+ }
71245
+ const conn = currentUsage.connections.get(atomKey);
71246
+ if (conn?.active) {
71247
+ if (conn.controller) {
71248
+ conn.controller.abort();
71249
+ }
71250
+ conn.cleanup = void 0;
71251
+ conn.controller = void 0;
71252
+ conn.active = false;
71253
+ }
71254
+ currentUsage.connections.delete(atomKey);
71255
+ if (currentUsage.connections.size === 0 && currentUsage.count === 0) {
71256
+ if (currentUsage.cleanupTimer) {
71257
+ clearTimeout(currentUsage.cleanupTimer);
71258
+ }
71259
+ streamUsage.delete(key);
71260
+ }
71261
+ };
71262
+ }
71263
+ function subscribeStream(uid2, extras) {
71264
+ const key = createSubscriptionKey(uid2, extras);
71265
+ const usage = getOrCreateUsage(key);
71266
+ if (usage.cleanupTimer) {
71267
+ clearTimeout(usage.cleanupTimer);
71268
+ usage.cleanupTimer = void 0;
71269
+ }
71270
+ if (usage.orphanTimer) {
71271
+ clearTimeout(usage.orphanTimer);
71272
+ usage.orphanTimer = void 0;
71273
+ }
71274
+ const wasEmpty = usage.count === 0;
71275
+ usage.count++;
71276
+ if (wasEmpty) {
71277
+ restartConnections(key);
71278
+ }
71279
+ return () => {
71280
+ const currentUsage = streamUsage.get(key);
71281
+ if (!currentUsage) {
71282
+ return;
71283
+ }
71284
+ currentUsage.count = Math.max(0, currentUsage.count - 1);
71285
+ if (currentUsage.count === 0) {
71286
+ currentUsage.cleanupTimer = setTimeout(() => {
71287
+ currentUsage.cleanupTimer = void 0;
71288
+ cleanupConnections(key);
71289
+ }, PAUSE_DEBOUNCE_MS);
71290
+ }
71291
+ };
71292
+ }
71293
+ const streamSelectorFamilyRegistry = /* @__PURE__ */ new Map();
70894
71294
  function extractKey(item, keyAccessor) {
70895
71295
  if (item === null || item === void 0) {
70896
71296
  return void 0;
70897
71297
  }
70898
- const key = getPath(item, keyAccessor);
71298
+ const key = get(item, keyAccessor);
70899
71299
  if (typeof key === "string" || typeof key === "number") {
70900
71300
  return key;
70901
71301
  }
@@ -71056,19 +71456,12 @@ ${String(error)}`;
71056
71456
  function deserializeAtomParams(key) {
71057
71457
  return JSON.parse(key);
71058
71458
  }
71059
- const activeConnections = /* @__PURE__ */ new Map();
71060
71459
  const INITIAL_CONNECTED_STATE = {
71061
71460
  data: void 0,
71062
71461
  status: "connected"
71063
71462
  };
71064
71463
  function startStreamConnection(params, callbacks) {
71065
- const connectionKey = serializeAtomParams(params);
71066
- const existingController = activeConnections.get(connectionKey);
71067
- if (existingController) {
71068
- existingController.abort();
71069
- }
71070
71464
  const controller = new AbortController();
71071
- activeConnections.set(connectionKey, controller);
71072
71465
  let retryCount = 0;
71073
71466
  let isFirstMessage = true;
71074
71467
  let currentState = INITIAL_CONNECTED_STATE;
@@ -71129,9 +71522,11 @@ ${String(error)}`;
71129
71522
  // @ts-expect-error - Headers type doesn't match exactly
71130
71523
  headers: params.extras.headers
71131
71524
  });
71132
- return () => {
71133
- controller.abort();
71134
- activeConnections.delete(connectionKey);
71525
+ return {
71526
+ cleanup: () => {
71527
+ controller.abort();
71528
+ },
71529
+ controller
71135
71530
  };
71136
71531
  }
71137
71532
  function streamConnectionEffect(atomKey) {
@@ -71144,33 +71539,36 @@ ${String(error)}`;
71144
71539
  rejectInitialData = reject;
71145
71540
  });
71146
71541
  setSelf(initialDataPromise);
71147
- const cleanup = startStreamConnection(params, {
71148
- onFirstData: (state) => {
71149
- if (resolveInitialData) {
71150
- resolveInitialData(state);
71151
- resolveInitialData = null;
71152
- rejectInitialData = null;
71153
- }
71154
- setSelf(state);
71155
- },
71156
- onUpdate: (state) => {
71157
- setSelf(state);
71158
- },
71159
- onError: (error) => {
71160
- if (rejectInitialData) {
71161
- rejectInitialData(new Error(error));
71162
- resolveInitialData = null;
71163
- rejectInitialData = null;
71164
- } else {
71165
- setSelf({
71166
- data: void 0,
71167
- status: "error",
71168
- error
71169
- });
71542
+ const startConnection = () => {
71543
+ return startStreamConnection(params, {
71544
+ onFirstData: (state) => {
71545
+ if (resolveInitialData) {
71546
+ resolveInitialData(state);
71547
+ resolveInitialData = null;
71548
+ rejectInitialData = null;
71549
+ }
71550
+ setSelf(state);
71551
+ },
71552
+ onUpdate: (state) => {
71553
+ setSelf(state);
71554
+ },
71555
+ onError: (error) => {
71556
+ if (rejectInitialData) {
71557
+ rejectInitialData(new Error(error));
71558
+ resolveInitialData = null;
71559
+ rejectInitialData = null;
71560
+ } else {
71561
+ setSelf({
71562
+ data: void 0,
71563
+ status: "error",
71564
+ error
71565
+ });
71566
+ }
71170
71567
  }
71171
- }
71172
- });
71173
- return cleanup;
71568
+ });
71569
+ };
71570
+ const unregister = registerStreamConnection(params.uid, params.extras, atomKey, startConnection);
71571
+ return unregister;
71174
71572
  };
71175
71573
  }
71176
71574
  const streamAtomFamily = Recoil_index_10({
@@ -71182,12 +71580,12 @@ ${String(error)}`;
71182
71580
  }
71183
71581
  function getOrRegisterStreamVariableParams(variable, client2, taskContext, extras) {
71184
71582
  const key = getStreamRegistryKey(variable, "params-selector");
71185
- if (!selectorFamilyRegistry.has(key)) {
71186
- selectorFamilyRegistry.set(
71583
+ if (!streamSelectorFamilyRegistry.has(key)) {
71584
+ streamSelectorFamilyRegistry.set(
71187
71585
  key,
71188
71586
  Recoil_index_11({
71189
71587
  key: nanoid$1(),
71190
- get: (extrasSerializable) => async ({ get }) => {
71588
+ get: (extrasSerializable) => async ({ get: get2 }) => {
71191
71589
  const resolvedVariables = await Promise.all(
71192
71590
  variable.variables.map(async (v) => {
71193
71591
  if (!isVariable(v)) {
@@ -71197,8 +71595,8 @@ ${String(error)}`;
71197
71595
  })
71198
71596
  );
71199
71597
  const triggerList = buildTriggerList(variable.variables);
71200
- registerChildTriggers(triggerList, get);
71201
- const resolvedValues = resolvedVariables.map((v) => resolveValue(v, get));
71598
+ registerChildTriggers(triggerList, get2);
71599
+ const resolvedValues = resolvedVariables.map((v) => resolveValue(v, get2));
71202
71600
  const params = {
71203
71601
  uid: variable.uid,
71204
71602
  resolvedValues,
@@ -71211,77 +71609,56 @@ ${String(error)}`;
71211
71609
  })
71212
71610
  );
71213
71611
  }
71214
- const family = selectorFamilyRegistry.get(key);
71215
- const serializableExtras = new RequestExtrasSerializable(extras);
71216
- const selectorInstance = family(serializableExtras);
71217
- if (!selectorFamilyMembersRegistry.has(family)) {
71218
- selectorFamilyMembersRegistry.set(family, /* @__PURE__ */ new Map());
71219
- }
71220
- selectorFamilyMembersRegistry.get(family).set(serializableExtras.toJSON(), selectorInstance);
71221
- return selectorInstance;
71612
+ const family = streamSelectorFamilyRegistry.get(key);
71613
+ return family(new RequestExtrasSerializable(extras));
71222
71614
  }
71223
71615
  function getOrRegisterStreamVariableValue(variable, client2, taskContext, extras) {
71224
71616
  const key = getStreamRegistryKey(variable, "value-selector");
71225
- if (!selectorFamilyRegistry.has(key)) {
71226
- selectorFamilyRegistry.set(
71617
+ if (!streamSelectorFamilyRegistry.has(key)) {
71618
+ streamSelectorFamilyRegistry.set(
71227
71619
  key,
71228
71620
  Recoil_index_11({
71229
71621
  key: nanoid$1(),
71230
- get: (extrasSerializable) => ({ get }) => {
71622
+ get: (extrasSerializable) => ({ get: get2 }) => {
71231
71623
  const paramsSelector = getOrRegisterStreamVariableParams(
71232
71624
  variable,
71233
71625
  client2,
71234
71626
  taskContext,
71235
71627
  extrasSerializable.extras
71236
71628
  );
71237
- const atomKey = get(paramsSelector);
71629
+ const atomKey = get2(paramsSelector);
71238
71630
  const atom2 = streamAtomFamily(atomKey);
71239
- if (!streamAtomRegistry.has(atomKey)) {
71240
- streamAtomRegistry.set(atomKey, atom2);
71241
- }
71242
- const streamState = get(atom2);
71631
+ const streamState = get2(atom2);
71243
71632
  return getStreamValue(streamState, variable.key_accessor);
71244
71633
  }
71245
71634
  })
71246
71635
  );
71247
71636
  }
71248
- const family = selectorFamilyRegistry.get(key);
71249
- const serializableExtras = new RequestExtrasSerializable(extras);
71250
- const selectorInstance = family(serializableExtras);
71251
- if (!selectorFamilyMembersRegistry.has(family)) {
71252
- selectorFamilyMembersRegistry.set(family, /* @__PURE__ */ new Map());
71253
- }
71254
- selectorFamilyMembersRegistry.get(family).set(serializableExtras.toJSON(), selectorInstance);
71255
- return selectorInstance;
71637
+ const family = streamSelectorFamilyRegistry.get(key);
71638
+ return family(new RequestExtrasSerializable(extras));
71256
71639
  }
71257
71640
  function getOrRegisterStreamVariable(variable, client2, taskContext, extras) {
71258
71641
  const key = `StreamVariable:${getUniqueIdentifier(variable, { useNested: true })}:nested-selector`;
71259
- if (!selectorFamilyRegistry.has(key)) {
71260
- selectorFamilyRegistry.set(
71642
+ if (!streamSelectorFamilyRegistry.has(key)) {
71643
+ streamSelectorFamilyRegistry.set(
71261
71644
  key,
71262
71645
  Recoil_index_11({
71263
71646
  key: nanoid$1(),
71264
- get: (extrasSerializable) => ({ get }) => {
71647
+ get: (extrasSerializable) => ({ get: get2 }) => {
71265
71648
  const valueSelector = getOrRegisterStreamVariableValue(
71266
71649
  variable,
71267
71650
  client2,
71268
71651
  taskContext,
71269
71652
  extrasSerializable.extras
71270
71653
  );
71271
- const value = get(valueSelector);
71654
+ const value = get2(valueSelector);
71272
71655
  return "nested" in variable ? resolveNested(value, variable.nested) : value;
71273
71656
  }
71274
71657
  })
71275
71658
  );
71276
71659
  }
71277
- const family = selectorFamilyRegistry.get(key);
71278
- const serializableExtras = new RequestExtrasSerializable(extras);
71279
- const selectorInstance = family(serializableExtras);
71280
- if (!selectorFamilyMembersRegistry.has(family)) {
71281
- selectorFamilyMembersRegistry.set(family, /* @__PURE__ */ new Map());
71282
- }
71283
- selectorFamilyMembersRegistry.get(family).set(serializableExtras.toJSON(), selectorInstance);
71284
- return selectorInstance;
71660
+ const family = streamSelectorFamilyRegistry.get(key);
71661
+ return family(new RequestExtrasSerializable(extras));
71285
71662
  }
71286
71663
  var clone_1;
71287
71664
  var hasRequiredClone;
@@ -71307,10 +71684,11 @@ ${String(error)}`;
71307
71684
  }
71308
71685
  let returnVal = obj;
71309
71686
  for (const key of nested) {
71310
- if (!Object.keys(returnVal).includes(key)) {
71687
+ const stringKey = key;
71688
+ if (!Object.keys(returnVal).includes(stringKey)) {
71311
71689
  return null;
71312
71690
  }
71313
- returnVal = returnVal[key];
71691
+ returnVal = returnVal[stringKey];
71314
71692
  }
71315
71693
  return returnVal;
71316
71694
  }
@@ -71347,6 +71725,7 @@ ${String(error)}`;
71347
71725
  type: "derived",
71348
71726
  uid: variable.uid,
71349
71727
  values,
71728
+ // After templating, nested should be all strings
71350
71729
  nested: variable.nested
71351
71730
  };
71352
71731
  }
@@ -71391,6 +71770,7 @@ ${String(error)}`;
71391
71770
  type: "derived",
71392
71771
  uid: variable.uid,
71393
71772
  values,
71773
+ // After templating, nested should be all strings
71394
71774
  nested: variable.nested
71395
71775
  };
71396
71776
  }
@@ -72382,6 +72762,17 @@ Inferred class string: "${iconClasses}."`
72382
72762
  const lookupKey = String(value);
72383
72763
  return valueMap[lookupKey] ?? defaultValue;
72384
72764
  }
72765
+ function useStreamSubscription(streamUids, extras) {
72766
+ React$1.useEffect(() => {
72767
+ if (streamUids.length === 0) {
72768
+ return;
72769
+ }
72770
+ const unsubscribes = streamUids.map((uid2) => subscribeStream(uid2, extras));
72771
+ return () => {
72772
+ unsubscribes.forEach((unsub) => unsub());
72773
+ };
72774
+ }, [useDeepCompare(streamUids), extras]);
72775
+ }
72385
72776
  function isTaskResponse(response) {
72386
72777
  return response && typeof response === "object" && "task_id" in response;
72387
72778
  }
@@ -72444,7 +72835,7 @@ Inferred class string: "${iconClasses}."`
72444
72835
  cachePolicy_UNSTABLE: {
72445
72836
  eviction: "most-recent"
72446
72837
  },
72447
- get: (extrasSerializable) => async ({ get }) => {
72838
+ get: (extrasSerializable) => async ({ get: get2 }) => {
72448
72839
  const throwError = (error) => {
72449
72840
  error.selectorId = key;
72450
72841
  error.selectorExtras = extrasSerializable.toJSON();
@@ -72466,9 +72857,9 @@ Inferred class string: "${iconClasses}."`
72466
72857
  const resolvedKwargsList = Object.values(resolvedKwargs);
72467
72858
  const kwargsList = Object.values(dynamicKwargs);
72468
72859
  const triggerAtom = getOrRegisterComponentTrigger(uid2, loop_instance_uid);
72469
- const selfTrigger = get(triggerAtom);
72860
+ const selfTrigger = get2(triggerAtom);
72470
72861
  const triggerList = buildTriggerList(kwargsList);
72471
- const triggers = registerChildTriggers(triggerList, get);
72862
+ const triggers = registerChildTriggers(triggerList, get2);
72472
72863
  triggers.unshift(selfTrigger);
72473
72864
  const { extras } = extrasSerializable;
72474
72865
  let derivedResult = resolveDerivedValue({
@@ -72476,7 +72867,7 @@ Inferred class string: "${iconClasses}."`
72476
72867
  variables: kwargsList,
72477
72868
  deps: kwargsList,
72478
72869
  resolvedVariables: resolvedKwargsList,
72479
- resolutionStrategy: { name: "get", get },
72870
+ resolutionStrategy: { name: "get", get: get2 },
72480
72871
  triggerList,
72481
72872
  triggers
72482
72873
  });
@@ -72604,6 +72995,11 @@ Inferred class string: "${iconClasses}."`
72604
72995
  variablesContext?.variables.current.delete(getComponentRegistryKey(uid2));
72605
72996
  };
72606
72997
  }, []);
72998
+ const streamUids = React$1.useMemo(
72999
+ () => findStreamVariablesInArray(Object.values(dynamicKwargs)).map((s) => s.uid),
73000
+ [dynamicKwargs]
73001
+ );
73002
+ useStreamSubscription(streamUids, extras);
72607
73003
  const componentSelector = getOrRegisterServerComponent({
72608
73004
  name,
72609
73005
  uid: uid2,
@@ -72768,6 +73164,9 @@ Inferred class string: "${iconClasses}."`
72768
73164
  }
72769
73165
  var isPlainObjectExports = requireIsPlainObject();
72770
73166
  const isPlainObject = /* @__PURE__ */ getDefaultExportFromCjs(isPlainObjectExports);
73167
+ function isVariableWithNested(value) {
73168
+ return value && typeof value === "object" && "__typename" in value && typeof value.__typename === "string" && value.__typename.includes("Variable") && "nested" in value && Array.isArray(value.nested);
73169
+ }
72771
73170
  function createMarkers(scope, loopInstanceUid) {
72772
73171
  const markers = [];
72773
73172
  if (scope.action) {
@@ -72807,6 +73206,33 @@ Inferred class string: "${iconClasses}."`
72807
73206
  );
72808
73207
  continue;
72809
73208
  }
73209
+ if (isVariableWithNested(value) && !isLoopVariable(value)) {
73210
+ for (let i2 = 0; i2 < value.nested.length; i2++) {
73211
+ const nestedKey = value.nested[i2];
73212
+ if (isLoopVariable(nestedKey)) {
73213
+ markers.push({
73214
+ type: "nested_loop_var",
73215
+ path: dotPath,
73216
+ nestedIndex: i2,
73217
+ loopVarNested: nestedKey.nested
73218
+ });
73219
+ if (isDerivedVariable(value)) {
73220
+ markers.push({
73221
+ type: "derived_var",
73222
+ path: dotPath,
73223
+ loopInstanceUid: nestedKey.uid
73224
+ });
73225
+ }
73226
+ if (isPyComponent(value)) {
73227
+ markers.push({
73228
+ type: "server_component",
73229
+ path: dotPath,
73230
+ loopInstanceUid: nestedKey.uid
73231
+ });
73232
+ }
73233
+ }
73234
+ }
73235
+ }
72810
73236
  if (isPlainObject(value) || Array.isArray(value)) {
72811
73237
  const newScope = updateScope(scope, value, dotPath);
72812
73238
  walk(value, [...pathSegments, key], newScope);
@@ -72847,6 +73273,14 @@ Inferred class string: "${iconClasses}."`
72847
73273
  set(clonedRenderer, marker.path, value);
72848
73274
  break;
72849
73275
  }
73276
+ case "nested_loop_var": {
73277
+ const resolvedKey = resolveNested(loopValue, marker.loopVarNested);
73278
+ const variable = get(clonedRenderer, marker.path);
73279
+ if (variable && Array.isArray(variable.nested)) {
73280
+ variable.nested[marker.nestedIndex] = String(resolvedKey);
73281
+ }
73282
+ break;
73283
+ }
72850
73284
  case "action": {
72851
73285
  set(clonedRenderer, `${marker.path}.loading.uid`, nanoid$1());
72852
73286
  break;
@@ -74635,6 +75069,8 @@ Inferred class string: "${iconClasses}."`
74635
75069
  variablesContext?.variables.current.delete(variable.uid);
74636
75070
  };
74637
75071
  }, []);
75072
+ const streamUids = React$1.useMemo(() => findStreamVariables(variable).map((s) => s.uid), [variable.uid]);
75073
+ useStreamSubscription(streamUids, extras);
74638
75074
  if (isDerivedVariable(variable)) {
74639
75075
  const selector2 = useDerivedVariable(variable, wsClient, taskContext, extras);
74640
75076
  const selectorLoadable = Recoil_index_28(selector2);